zouyu
2024-03-14 f6c6a4067d68eb1d78a46bf44c279c0faff1d39b
src/components/view/b2-standard.vue
@@ -151,20 +151,20 @@
            <el-table :data="productList" style="width: 100%;" height="100%" tooltip-effect="dark" stripe :fit="true" border
               @selection-change="handleSelectionChange">
               <el-table-column type="selection" width="65"></el-table-column>
               <el-table-column prop="inspectionItem" label="检验项" show-overflow-tooltip></el-table-column>
               <el-table-column prop="inspectionItemClassify" label="检验项类型" width="120" show-overflow-tooltip></el-table-column>
               <el-table-column prop="inspectionItemSubclass" label="检验项小类" width="120" show-overflow-tooltip></el-table-column>
               <el-table-column prop="laboratory" label="实验室" width="120" show-overflow-tooltip></el-table-column>
               <el-table-column prop="inspectionItem" label="检验项" min-width="140" show-overflow-tooltip></el-table-column>
               <!-- <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="unit" label="计量单位" width="100" show-overflow-tooltip></el-table-column>
               <el-table-column prop="price" label="单价" width="100" show-overflow-tooltip></el-table-column>
               <el-table-column prop="manHour" label="工时" width="80" show-overflow-tooltip></el-table-column>
               <el-table-column prop="manHourGroup" label="工时分组" width="100" show-overflow-tooltip></el-table-column>
               <el-table-column prop="deviceGroup" label="设备组" show-overflow-tooltip></el-table-column>
               <el-table-column prop="deviceGroup" label="设备组" width="120" show-overflow-tooltip></el-table-column>
               <el-table-column prop="section" label="区间" width="120" show-overflow-tooltip></el-table-column>
               <el-table-column prop="ask" label="要求值" width="220px">
                  <template slot-scope="scope">
                     <el-input size="small" placeholder="要求值" v-model="scope.row.ask" clearable
                        @change="(value)=>upStandardProductList(value,scope.row.id)" v-if="upStandardProduct"></el-input>
                        @change="(value)=>upStandardProductList(value,scope.row.id)" v-if="upStandardProduct" type="textarea" :autosize="{ minRows: 1, maxRows: 3}"></el-input>
                     <span v-else>{{scope.row.ask}}</span>
                  </template>
               </el-table-column>
@@ -208,9 +208,7 @@
                  <span class="required-span">* </span>样品名称:
               </el-col>
               <el-col :span="16" :offset="1">
                  <el-select v-model="addOb.sample" size="small" style="width: 100%;" clearable>
                     <el-option v-for="(a, ai) in sample" :key="ai" :value="a.value" :label="a.label"></el-option>
                  </el-select>
                  <el-input v-model="addOb.sample" placeholder="请输入样品名称" clearable size="small"></el-input>
               </el-col>
            </el-row>
            <el-row style="line-height: 50px;">
@@ -311,7 +309,21 @@
               showSelect: true,
               select: true,
               do: [],
               tagField: {},
               tagField: {
                  inspectionItemType: {
                     select: []
                  },
                  valueType: {
                     select: []
                  },
                  bsm:{
                     select: []
                  },
                  inspectionValueType:{
                     select:[]
                  },
                  deviceGroup:{select:[]}
               },
               selectField: {},
            }
         }
@@ -321,9 +333,14 @@
         this.selectEnumByCategoryForFactory()
         this.selectStandardTreeList()
         this.obtainItemParameterList()
         this.selectEnumByCategoryForsampleType()
         // this.selectEnumByCategoryForsampleType()
         this.selectTestObjectByName()
         this.selectStandardMethods()
         this.selectEnumByCategoryForDevice()
         this.selectEnumByCategory()
         this.selectEnumByCategoryForValue()
         this.selectEnumByCategoryForSpecial()
         this.selectEnumByCategoryForInspectionValueType()
      },
      methods: {
         filterNode(value, data) {
@@ -347,6 +364,11 @@
            }
            this.selectTree = data2.replace(' - ', '')
            this.selectsStandardMethodByFLSSM()
            let trees = this.selectTree.split(" - ")
            this.addOb.factory = trees[0]
            this.addOb.laboratory = trees[1]
            this.addOb.sampleType = trees[2]
            this.addOb.sample = trees[3]
         },
         getNodeParent(val) {
            if (val.parent != null) {
@@ -400,6 +422,42 @@
               this.sampleType = res.data
            })
         },
         selectEnumByCategoryForDevice() {
            this.$axios.post(this.$api.enums.selectEnumByCategory, {
               category: "设备分类"
            }).then(res => {
               this.componentData.tagField.deviceGroup.select = res.data
            })
         },
         selectEnumByCategory() {
            this.$axios.post(this.$api.enums.selectEnumByCategory, {
               category: "检验项类型"
            }).then(res => {
               res.data[1].type = 'info'
               this.componentData.tagField.inspectionItemType.select = res.data
            })
         },
         selectEnumByCategoryForValue() {
            this.$axios.post(this.$api.enums.selectEnumByCategory, {
               category: "取值类型"
            }).then(res => {
               this.componentData.tagField.valueType.select = res.data
            })
         },
         selectEnumByCategoryForSpecial() {
            this.$axios.post(this.$api.enums.selectEnumByCategory, {
               category: "是否"
            }).then(res => {
               this.componentData.tagField.bsm.select = res.data
            })
         },
         selectEnumByCategoryForInspectionValueType() {
            this.$axios.post(this.$api.enums.selectEnumByCategory, {
               category: "检验值类型"
            }).then(res => {
               this.componentData.tagField.inspectionValueType.select = res.data
            })
         },
         selectStandardTreeList() {
            this.treeLoad = true
            this.$axios.get(this.$api.standardTree.selectStandardTreeList).then(res => {
@@ -428,7 +486,7 @@
                     value: a.specimenName
                  })
               })
               this.sample = data
               this.sampleType = data
            })
         },
         selectStandardMethods() {