<template>
  <div>
    <div class="title_box rx-bc mt6">
      <div class="name">工艺参数 </div>

      <div class="rx-bc"> </div>
    </div>

    <div class="content_table2">
      <div class="head row rx-sc">
        <div class="item ww40">参数名</div>
        <div class="item ww40">参数值</div>
        <div class="item ww20">单位</div>
      </div>

      <div class="table">
        <div class="tr row rx-sc" v-for="(it, idx) in list" :key="idx">
          <div class="item ww40">
            {{ it.name }}
          </div>
          <div class="item ww40" v-if="it.textType != 3">
            {{ it.defaultValue }}
          </div>

          <div class="item ww40" v-if="it.textType == 3">
            {{ it.minValue }} - {{ it.maxValue }}
          </div>
          <div class="item ww20">
            {{ it.unitName }}
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'ProduceBom',

    props: {
      list: {
        type: Array,
        default: () => []
      }
    },

    data() {
      return {};
    }
  };
</script>

<style lang="scss" scoped>
  .content_table2 {
    width: 100%;
    margin-top: 6px;

    .row {
      width: 100%;

      .item {
        color: #404446;
        font-size: 14px;
        padding-left: 6px;
      }

      .color157 {
        color: #157a2c;
      }

      .ww40 {
        width: 40%;
      }

      .ww20 {
        width: 20%;
      }
    }

    .head {
      height: 32px;
      background: #f7f9fa;
      border-top: 1px solid #e3e5e5;
      border-left: 1px solid #e3e5e5;

      .item {
        height: 32px;
        line-height: 32px;
        border-right: 1px solid #e3e5e5;
        box-sizing: border-box;
      }
    }

    .tr {
      border-top: 1px solid #e3e5e5;
      border-left: 1px solid #e3e5e5;

      .item {
        font-size: 12px;
        min-height: 32px;
        display: flex;
        align-items: center;
        border-right: 1px solid #e3e5e5;
        box-sizing: border-box;
        white-space: normal;
        word-break: break-all;
      }

      &:last-child {
        border-bottom: 1px solid #e3e5e5;
      }
    }
  }
</style>
