Forráskód Böngészése

检验后样品保存记录表list对接调整-编辑时已保存的默认选中(川北)

shenqilong 8 hónapja
szülő
commit
758f8fc11c

+ 7 - 1
src/views/component/sampleDisposalRecords/sampleDisposalRecordsbc.vue

@@ -327,7 +327,7 @@ export default {
       ])
         .then((res) => {
           this.loading = false
-          this.lisData = res.data
+          this.lisData = res.data || []
           if (
             this.formSearchOld.group != this.formSearch.group ||
             this.formSearchOld.chaxunrqi != this.formSearch.chaxunrqi
@@ -340,6 +340,12 @@ export default {
             this.multipleSelection = []
             this.sumData[0].tiaoMaHao = ''
           }
+          if (this.isdisabled) {
+            this.multipleSelection = this.lisData.filter((i) => i.STATE == 2)
+            this.multipleSelection.forEach((row) => {
+              this.$refs.listable.toggleRowSelection(row)
+            })
+          }
           this.formSearchOld.group = this.formSearch.group
           this.formSearchOld.chaxunrqi = this.formSearch.chaxunrqi
         })