<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 rx-cc">编号</div>
            <div class="content">
              {{ !isType ? item.code : item.aridRegionList[0].code }}
            </div>
          </div>

          <div class="rx ww33">
            <div class="lable rx-cc">状态</div>
            <div
              class="content"
              :style="{ color: item.status == 0 ? '#157A2C' : '#FFA929' }"
            >
              {{ item.status == 0 ? '空闲' : item.status == 1 ? '占用' : '' }}
            </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 rx-cc">位置</div>
            <div class="content rx-sc">
              <div>{{ !isType ? item.region : item.extInfo.region }}</div>
            </div>
          </div>
        </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: () => []
      },
      wordItem: {
        type: Object,
        default: () => {}
      },
      isType: {
        type: Boolean,
        default: false
      },

      remainingTime: {
        type: Number,
        default: 0
      }
    },

    computed: {},

    data() {
      return {};
    },

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

<style scoped lang="scss"></style>
