From 25f23d0761c7949068176db038cea74c4401fc04 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 25 七月 2024 18:25:49 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before into master

---
 src/components/do/b6-device-management/b6-data-acquisition-config.vue |   59 +++++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 41 insertions(+), 18 deletions(-)

diff --git a/src/components/do/b6-device-management/b6-data-acquisition-config.vue b/src/components/do/b6-device-management/b6-data-acquisition-config.vue
index bb598d9..f5e9149 100644
--- a/src/components/do/b6-device-management/b6-data-acquisition-config.vue
+++ b/src/components/do/b6-device-management/b6-data-acquisition-config.vue
@@ -19,15 +19,16 @@
         <el-table-column prop="fileType" align="center" label="鏂囦欢鍚庣紑"></el-table-column>
         <el-table-column prop="collectUrl" align="center" min-width="100" show-overflow-tooltip label="閲囬泦鍦板潃"></el-table-column>
         <el-table-column prop="storageUrl" align="center" min-width="100" show-overflow-tooltip label="瀛樺偍鍦板潃"></el-table-column>
-        <el-table-column prop="ip" align="center" label="IP鍦板潃"></el-table-column>
+        <el-table-column prop="ip" align="center" label="IP鍦板潃" min-width="100"></el-table-column>
+        <el-table-column prop="sample" align="center" label="妫�楠屽璞�" show-overflow-tooltip min-width="150"></el-table-column>
         <el-table-column prop="inspectionItem" align="center" label="妫�楠岄」" min-width="100"></el-table-column>
-        <el-table-column prop="inspectionItemSubClass" align="center" label="妫�楠岄」瀛愰」" min-width="100"></el-table-column>
-        <el-table-column prop="referx" align="center" label="鍙傜収X"></el-table-column>
+        <el-table-column prop="inspectionItemSubclass" align="center" label="妫�楠岄」瀛愰」" min-width="100"></el-table-column>
+        <el-table-column prop="referx" align="center" label="鍙傜収X" min-width="100"></el-table-column>
         <el-table-column prop="x" align="center" label="X"></el-table-column>
-        <el-table-column prop="refery" align="center" label="鍙傜収Y"></el-table-column>
+        <el-table-column prop="refery" align="center" label="鍙傜収Y" min-width="100"></el-table-column>
         <el-table-column prop="y" align="center" label="Y"></el-table-column>
         <el-table-column prop="formula" align="center" label="鍏紡"></el-table-column>
-        <el-table-column prop="section" label="鎿嶄綔" width="120">
+        <el-table-column prop="section" fixed="right" label="鎿嶄綔" width="120">
           <template slot-scope="scope">
             <el-button type="text" @click="dataConfig(scope.row)">鏁伴噰閰嶇疆</el-button>
           </template>
@@ -122,6 +123,16 @@
           </el-option>
         </el-select>
 			</div>
+      <div v-if="configForm.fileType == '.mdb'" class="search_thing" style="margin-bottom: 14px;">
+				<div class="search_label">濮旀墭瀛楁锛�</div>
+				<el-input size="small" placeholder="璇疯緭鍏�" clearable
+						v-model="configForm.mdbEntrustCode"></el-input>
+			</div>
+      <div v-if="configForm.fileType == '.mdb'" class="search_thing" style="margin-bottom: 14px;">
+				<div class="search_label">鏍峰搧瀛楁锛�</div>
+				<el-input size="small" placeholder="璇疯緭鍏�" clearable
+						v-model="configForm.mdbSampleCode"></el-input>
+			</div>
       <span slot="footer" class="dialog-footer">
 				<el-row>
 					<el-button @click="dialogVisible4=false">鍙� 娑�</el-button>
@@ -185,7 +196,7 @@
       specialSpanList: [],
       spanConfig: {
             special: {
-              main: "inspectionItemSubClass",
+              main: "inspectionItemSubclass",
               rows:[
               {
                 name:'deviceName',
@@ -212,15 +223,15 @@
                 index:6
               },
               {
-                name:'inspectionItemSubClass',
+                name:'inspectionItemSubclass',
                 index:7
               },
               {
-                name:'inspectionItemSubClass',
+                name:'inspectionItemSubclass',
                 index:12
               },
               {
-                name:'inspectionItemSubClass',
+                name:'inspectionItemSubclass',
                 index:13
               }
             ]
@@ -300,9 +311,12 @@
         }
     },
     init() {
-      this.tableList = []
+      // this.tableList = []
       this.$axios.get(this.$api.deviceScope.queryDataAcquisitionConfiguration + "?deviceId=" + this.deviceId + "&isDevice=" + false).then(res => {
         this.tableList = res.data
+        this.tableList.forEach(i => {
+          i.sample = i.sample.replaceAll('"', '').replaceAll("],", '锛�').replaceAll("[", '').replaceAll('"', '').replaceAll(']', '')
+        })
         if(this.tableList[0]) {
           this.$set(this.configForm, 'fileType', this.tableList[0].fileType)
           this.$set(this.configForm, 'collectUrl', this.tableList[0].collectUrl)
@@ -349,11 +363,13 @@
       this.$axios.post(this.$api.deviceScope.saveDataAcquisitionConfiguration + "?deviceId=" + this.deviceId, obj, {headers: {
             'Content-Type': 'application/json'
           }}).then(res => {
-        this.tableList = res.data
-        this.dialogVisible4 = false
-        this.upLoad4 = false
-        this.init()
-        this.$message.success('鎿嶄綔鎴愬姛')
+            if(res.code == 200) {
+              this.tableList = res.data
+              this.dialogVisible4 = false
+              this.init()
+              this.$message.success('鎿嶄綔鎴愬姛')
+            }
+            this.upLoad4 = false
       }).catch(err => {
         this.upLoad4 = false
       })
@@ -361,10 +377,15 @@
     dataConfig (row) {
       this.configForm = {
         deviceId: row.deviceId,
-        insProductItem: row.inspectionItemSubClass.trim()
+        inspectionItem: row.inspectionItem.trim(),
+        inspectionItemSubclass: row.inspectionItemSubclass,
+        structureItemParameterId: row.structureItemParameterId
       }
       this.dialogVisible3 = true
-      this.$axios.get(this.$api.deviceScope.queryDataAcquisitionConfiguration + "?deviceId=" + this.deviceId + "&insProductItem=" + row.inspectionItemSubClass.trim()  + "&isDevice=" + true).then(res => {
+      this.$axios.get(this.$api.deviceScope.queryDataAcquisitionConfiguration + "?deviceId=" + this.deviceId +
+      "&inspectionItem=" + row.inspectionItem.trim() +
+      "&isDevice=" + true +
+      "&inspectionItemSubclass=" + row.inspectionItemSubclass.trim()).then(res => {
         const data = res.data
         if(data[0]) {
           this.domains.splice(0, 1)
@@ -399,7 +420,9 @@
             }
             i.formula = this.configForm.formula
             i.deviceId = this.deviceId
-            i.insProductItem = this.configForm.insProductItem
+            i.inspectionItem = this.configForm.inspectionItem
+            i.inspectionItemSubclass = this.configForm.inspectionItemSubclass
+            i.structureItemParameterId = this.configForm.structureItemParameterId
           })
           this.$axios.post(this.$api.deviceScope.saveDataAcquisitionConfiguration + "?deviceId=" + this.deviceId, {dataConfigList: this.domains, isDevice: false},{headers: {
             'Content-Type': 'application/json'

--
Gitblit v1.9.3