Crunchy
2024-04-25 71c4ece010f68a74eeff5e986caecb9a0bb2e36c
src/components/view/b2-standard.vue
@@ -60,6 +60,7 @@
   .product_table .el-table {
      height: 100%;
   }
  .sort{
    width: 80% !important;
    overflow: hidden;
@@ -169,7 +170,8 @@
               <!-- <el-table-column prop="inspectionItemClassify" label="检验项类型" width="120" show-overflow-tooltip></el-table-column> -->
               <el-table-column prop="inspectionItemSubclass" label="检验项子项" min-width="140"
                  show-overflow-tooltip></el-table-column>
               <el-table-column prop="sonLaboratory" label="子实验室" width="130" show-overflow-tooltip></el-table-column>
          <el-table-column prop="sonLaboratory" label="子实验室" width="130" show-overflow-tooltip :filters="filters"
            :filter-method="filterHandler"></el-table-column>
               <el-table-column prop="ask" label="要求值" min-width="200px">
                  <template slot-scope="scope">
                     <el-input size="small" placeholder="要求值" v-model="scope.row.ask" clearable
@@ -362,7 +364,8 @@
               },
               selectField: {},
            },
            expandedKeys: []
        expandedKeys: [],
        filters: []
         }
      },
      mounted() {
@@ -378,6 +381,7 @@
         this.selectEnumByCategoryForValue()
         this.selectEnumByCategoryForSpecial()
         this.selectEnumByCategoryForInspectionValueType()
      this.selectEnumByCategoryForSonLaboratory()
      },
      methods: {
         filterNode(value, data) {
@@ -450,6 +454,19 @@
               category: "工厂"
            }).then(res => {
               this.factory = res.data
        })
      },
      selectEnumByCategoryForSonLaboratory() {
        this.$axios.post(this.$api.enums.selectEnumByCategory, {
          category: "子实验室"
        }).then(res => {
          this.factory = []
          res.data.forEach(a=>{
            this.filters.push({
              text: a.label,
              value: a.value
            })
          })
            })
         },
         selectEnumByCategoryForsampleType() {
@@ -813,6 +830,10 @@
               this.$message.success('已保存')
            })
         },
      filterHandler(value, row, column) {
        const property = column['property'];
        return row[property] === value;
      }
      }
   }
</script>