<template>
  <div>
    <div class="title_box rx-bc mt6">
      <div class="name">设备信息 </div>

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

    <div class="material">
      <div class="content_table" v-for="(item, index) in list" :key="index">
        <div class="item rx-sc">
          <div class="rx ww33">
            <div class="lable lable90 rx-cc">工位名称</div>
            <div class="content">
              {{
                item.workstationName ||
                (item.extInfo && item.extInfo.workstationName)
              }}
            </div>
          </div>

          <div class="rx ww33">
            <div class="lable rx-cc">设备编码</div>
            <div class="content">{{ item.code }}</div>
          </div>

          <div class="rx ww33">
            <div class="lable rx-cc">设备名称</div>
            <div class="content">{{ item.name }}</div>
          </div>
        </div>

        <div class="item rx-sc">
          <div class="rx ww33">
            <div class="lable lable90 rx-cc">固资编码</div>
            <div class="content rx-sc">
              <div>{{ item.extInfo.fixCode }}</div>
            </div>
          </div>

          <div class="rx ww33">
            <div class="lable rx-cc">编号</div>
            <div class="content rx-sc">
              <div>{{ item.extInfo.codeNumber }}</div>
            </div>
          </div>

          <div class="rx ww33">
            <div class="lable rx-cc">炉次号</div>
            <div class="content content_num rx-sc">
              <el-input size="mini" v-model="item.extInfo.heatNumber" placeholder="请输入炉次号" />
            </div>
          </div>
        </div>

        
        <div class="sort_index">
          {{ index + 1}}
        </div>

        <div class="del_box">
          <el-link type="danger" icon="el-icon-delete" @click="getDelete(index)"></el-link>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'deviceBom',
  props: {
    list: {
      type: Array,
      default: () => []
    },
    isDetails: {
      type: Boolean,
      default: false
    }
  },

  computed: {},

  data() {
    return {};
  },

  methods: {
    getDelete(idx) {
      this.list.splice(idx, 1);
    }
  }
};
</script>

<style scoped lang="scss">

</style>
