gaoluyang
2024-07-22 d4bfd8248ae2c45b7ce441c55c97e204a287f835
src/components/do/b6-device-management/b6-data-acquisition-config.vue
@@ -14,7 +14,8 @@
      <el-table :data="tableList.slice((page.current - 1) * page.size, page.current * page.size)"
                border tooltip-effect="dark" style="width: 100%;" height="100%">
        <el-table-column type="index" label="序号" align="center" width="65"></el-table-column>
        <el-table-column prop="insProductItem" align="center" label="检验项目">
        <el-table-column prop="inspectionItemSubclass" align="center" label="检验项"></el-table-column>
        <el-table-column prop="insProductItem" align="center" label="检验项子项">
        </el-table-column>
        <el-table-column prop="section" label="操作" width="120">
          <template slot-scope="scope">
@@ -101,6 +102,7 @@
    this.tableList.forEach(i => {
      let data = i.insProductItem.split(',')
      i.insProductItem = data[data.length - 1]
      i.inspectionItemSubclass = data[data.length - 2]
    })
  },
  data() {
@@ -203,11 +205,15 @@
      // 删除公式formItem
      const index = this.domains.indexOf(item)
      if (index !== -1 && this.domains.length > 1) {
        this.$axios.get(this.$api.deviceScope.deleteDataAcquisitionConfiguration + "?id=" + item.id).then(res => {
          if(res.code == 200) {
            this.domains.splice(index, 1)
          }
        })
        if(item.id){
            this.$axios.delete(this.$api.deviceScope.deleteDataAcquisitionConfiguration + "?id=" + item.id).then(res => {
            if(res.code == 200) {
              this.domains.splice(index, 1)
            }
          })
        } else {
          this.domains.splice(index, 1)
        }
      } else {
        this.$message.error('不允许删除最后一条数据!');
      }