<template>
  <div id="assetInformation" class="baseinfo-container">
    <el-form label-width="120px" :model="{ ...tagInfo }" ref="form">
      <div class="content">
        <headerTitle title="设备标签" style="margin-top: 15px"></headerTitle>
        <el-descriptions
          title=""
          :column="4"
          size="medium"
          border
          style="edit"
          :label-style="labelStyle"
     
          class="descriptions"
        >
          <el-descriptions-item>
            <template slot="label"> 老旧设备</template>
            <el-form-item label-width="0">
              <el-radio v-model="tagInfo.equipmentLabelJson[0].LJSB" label="1"
                >是</el-radio
              >
              <el-radio v-model="tagInfo.equipmentLabelJson[0].LJSB" label="2"
                >否</el-radio
              >
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 涉火设备</template>
            <el-form-item label-width="0">
              <el-radio v-model="tagInfo.equipmentLabelJson[0].SHSB" label="1"
                >是</el-radio
              >
              <el-radio v-model="tagInfo.equipmentLabelJson[0].SHSB" label="2"
                >否</el-radio
              >
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 涉火老旧设备</template>
            <el-form-item label-width="0">
              <el-radio v-model="tagInfo.equipmentLabelJson[0].SHLJSB" label="1"
                >是</el-radio
              >
              <el-radio v-model="tagInfo.equipmentLabelJson[0].SHLJSB" label="2"
                >否</el-radio
              >
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 关重设备</template>
            <el-form-item label-width="0">
              <el-radio v-model="tagInfo.equipmentLabelJson[0].GZSB" label="1"
                >是</el-radio
              >
              <el-radio v-model="tagInfo.equipmentLabelJson[0].GZSB" label="2"
                >否</el-radio
              >
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 关键设备</template>
            <el-form-item label-width="0">
              <el-radio v-model="tagInfo.equipmentLabelJson[0].GJSB" label="1"
                >是</el-radio
              >
              <el-radio v-model="tagInfo.equipmentLabelJson[0].GJSB" label="2"
                >否</el-radio
              >
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 特种设备</template>
            <el-form-item label-width="0">
              <el-radio v-model="tagInfo.equipmentLabelJson[0].TZSB" label="1"
                >是</el-radio
              >
              <el-radio v-model="tagInfo.equipmentLabelJson[0].TZSB" label="2"
                >否</el-radio
              >
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 环保设备</template>
            <el-form-item label-width="0">
              <el-radio v-model="tagInfo.equipmentLabelJson[0].HBSB" label="1"
                >是</el-radio
              >
              <el-radio v-model="tagInfo.equipmentLabelJson[0].HBSB" label="2"
                >否</el-radio
              >
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 主要生产设备</template>
            <el-form-item label-width="0">
              <el-radio v-model="tagInfo.equipmentLabelJson[0].ZYSCSB" label="1"
                >是</el-radio
              >
              <el-radio v-model="tagInfo.equipmentLabelJson[0].ZYSCSB" label="2"
                >否</el-radio
              >
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 辅助生产设备</template>
            <el-form-item label-width="0">
              <el-radio v-model="tagInfo.equipmentLabelJson[0].FZSCSB" label="1"
                >是</el-radio
              >
              <el-radio v-model="tagInfo.equipmentLabelJson[0].FZSCSB" label="2"
                >否</el-radio
              >
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 科研设备</template>
            <el-form-item label-width="0">
              <el-radio v-model="tagInfo.equipmentLabelJson[0].KYSB" label="1"
                >是</el-radio
              >
              <el-radio v-model="tagInfo.equipmentLabelJson[0].KYSB" label="2"
                >否</el-radio
              >
            </el-form-item>
          </el-descriptions-item>
        </el-descriptions>
      </div>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      labelStyle: {
        width: '180px'
      },
 
      tagInfo: {
        equipmentLabelJson: [
          {
            LJSB: '2', //老旧设备
            SHSB: '2', //涉火设备
            SHLJSB: '2', //涉火老旧设备
            GZSB: '2', //关重设备
            GJSB: '2', //关键设备
            TZSB: '2', //特种设备
            HBSB: '2', //环保设备
            ZYSCSB: '2', //主要生产设备
            FZSCSB: '2', //辅助生产设备
            KYSB: '2' //科研设备
          }
        ]
      }
    };
  },
  mounted() {},
  methods: {},
  props: {
    form: {
      type: Object,
      default: {}
    }
  },
  watch: {
    form: {
      deep: true, //深度监听设置为 true
      handler: function (newV) {
        this.tagInfo = newV;
      }
    }
  }
};
</script>

<style lang="scss" scoped>
:deep(.el-descriptions-item__label.is-bordered-label) {
  color: #606266;
}
::v-deep .descriptions {
  margin-bottom: 10px;
}
.baseinfo-container .basic-details-title {
  font-size: 16px;
  margin: 15px 0;
}
::v-deep .el-descriptions {
  .el-form-item {
    margin-bottom: 0px;
  }
}
</style>
