<template>
  <div>
    <div class="basic-details-title border-none">
      <span class="border-span">模具信息</span>
    </div>
    <el-descriptions
      :label-style="labelStyle"
      :contentStyle="contentStyle"
      title=""
      :column="3"
      size="medium"
      border
    >
      <el-descriptions-item>
        <template slot="label"> 收缩系数</template>
        {{
          categoryMold.shrinkEffictive
            ? categoryMold.shrinkEffictive + '%'
            : null
        }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 芯杆数量 </template>
        {{ categoryMold.coreBarNum }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 模孔数量</template>
        {{ categoryMold.dieHoleNum }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 上冲头数量</template>
        {{ categoryMold.upperPunchNum }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 下冲头数量</template>
        {{ categoryMold.downPunchNum }}
      </el-descriptions-item>

      <el-descriptions-item>
        <template slot="label"> 最大冲压次数</template>
        {{ categoryMold.maxCyTimes }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 已冲压次数 </template>
        <!-- {{ categoryMold.startCyTimes }} -->
        <el-form-item label-width="0">
          <el-input size="small" v-model="categoryMold.cyTimes"></el-input>
        </el-form-item>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 大模体型号 </template>
        {{ categoryMold.maxMoldType }}
      </el-descriptions-item>

      <el-descriptions-item>
        <template slot="label"> 芯棒直径 </template>
        {{ categoryMold.mandrelDiameter }}
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>
<script>
  export default {
    props: {
      form: {
        type: Object,
        default: {
          workstation: {}
        }
      }
    },
    watch: {
      form: {
        //监听的对象
        deep: true, //深度监听设置为 true
        handler: function (newValue) {
          console.log(newValue.isPublic);
          this.categoryMold = newValue.category.categoryMold;
        }
      }
    },
    data() {
      return {
        labelStyle: {
          width: '200px'
        },
        contentStyle: {
          width: '400px'
        },
        categoryMold: {}
      };
    },
    methods: {
      async getDetailInfoAugr(data) {
        this.categoryMold = { ...data };
      }
    }
  };
</script>

<style lang="scss" scoped>
  .upload-container {
    display: flex;
    justify-content: flex-start;
    .file-list {
      margin-left: 50px;
      flex: 1;
    }
  }
  .basic-details-title {
    font-size: 16px;
    margin: 15px 0;
  }
</style>
