From 5c8aaba66c16b1a143fdec27e29ad36eaefd1e3a Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期二, 31 十二月 2024 14:33:25 +0800
Subject: [PATCH] 无源器件检验开发

---
 src/components/view/a6-device-management.vue |   81 ++++++++++++++--------------------------
 1 files changed, 29 insertions(+), 52 deletions(-)

diff --git a/src/components/view/a6-device-management.vue b/src/components/view/a6-device-management.vue
index b687008..478341e 100644
--- a/src/components/view/a6-device-management.vue
+++ b/src/components/view/a6-device-management.vue
@@ -225,20 +225,6 @@
 								</el-upload>
 							</div>
 						</el-form-item>
-		<el-form-item label="妫�娴嬬殑鏂囦欢绫诲瀷:">
-            <el-select :disabled="isUp" v-model="formData.fileType" placeholder="璇烽�夋嫨鏂囦欢绫诲瀷" clearable>
-              <el-option v-for="item in fileTypeOptions"
-                         :key="item.value"
-                         :label="item.label"
-                         :value="item.value"></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="閲囬泦鍦板潃:" clearable>
-            <el-input :disabled="isUp" v-model="formData.collectUrl"></el-input>
-          </el-form-item>
-          <el-form-item label="鍌ㄥ瓨鍦板潃:">
-            <el-input :disabled="isUp" v-model="formData.storageUrl"></el-input>
-          </el-form-item>
 					</el-form>
 				</el-col>
 			</el-row>
@@ -382,20 +368,6 @@
 								</el-upload>
 							</div>
 						</el-form-item>
-						<el-form-item label="妫�娴嬬殑鏂囦欢绫诲瀷:">
-            <el-select v-model="formData.fileType" placeholder="璇烽�夋嫨鏂囦欢绫诲瀷" clearable>
-              <el-option v-for="item in fileTypeOptions"
-                         :key="item.value"
-                         :label="item.label"
-                         :value="item.value"></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="閲囬泦鍦板潃:" clearable>
-            <el-input v-model="formData.collectUrl"></el-input>
-          </el-form-item>
-          <el-form-item label="鍌ㄥ瓨鍦板潃:">
-            <el-input v-model="formData.storageUrl"></el-input>
-          </el-form-item>
 					</el-form>
 				</el-col>
 			</el-row>
@@ -449,7 +421,7 @@
 				</el-row>
 			</span>
     </el-dialog>
-    <dataAcquisitionConfig v-if="showData" :tableList="tableList"/>
+    <dataAcquisitionConfig v-if="showData" :deviceId="deviceId"/>
 	</div>
 </template>
 
@@ -463,6 +435,7 @@
 		},
 		data() {
 			return {
+				deviceId: '',
 				fileTypeOptions: [
 					{label: 'csv', value: '.csv'},
 					{label: 'db', value: '.db'},
@@ -513,15 +486,17 @@
 						font: '妗f淇',
 						type: 'text',
 						method: 'isUpdate'
-					}, {
-						id: 'handleConfig',
-						font: '鏁伴噰閰嶇疆',
-						type: 'text',
-						method: 'handleConfig',
-            disabFun: (row, index) => {
-              return row.insProductItem === ''
-            }
-					}],
+					}
+          // , {
+					// 	id: 'handleConfig',
+					// 	font: '鏁伴噰閰嶇疆',
+					// 	type: 'text',
+					// 	method: 'handleConfig',
+          //   disabFun: (row, index) => {
+          //     return row.insProductItem === ''
+          //   }
+					// }
+        ],
           headNoShow:['enDeviceName'],
 					tagField: {
 						deviceStatus: {
@@ -556,7 +531,8 @@
             }
 					},
 					requiredAdd: [],
-					requiredUp: []
+					requiredUp: [],
+          needSort: ['deviceName', 'acquisitionDate', 'activationDate', 'lastCalibrationDate', 'nextCalibrationDate', 'deviceStatus'],
 				},
 				entityCopy: {},
 				upIndex: 0,
@@ -639,17 +615,17 @@
 						config = true
 					}
 				}
-				if (!config) {
-							this.componentData.do.splice(2, 1)
-						}
-						if (!up) {
-							this.componentData.do.splice(1, 1)
-						}
-						if (!del) {
-							this.componentData.do.splice(0, 1)
-						}
-						this.addPower = add
-					},
+				// if (!config) {
+        //   this.componentData.do.splice(2, 1)
+        // }
+        if (!up) {
+          this.componentData.do.splice(1, 1)
+        }
+        if (!del) {
+          this.componentData.do.splice(0, 1)
+        }
+        this.addPower = add
+      },
 			// 鑾峰彇瀛楀吀
 			selectEnumByCategory() {
 				this.$axios.post(this.$api.enums.selectEnumByCategory, {
@@ -864,7 +840,7 @@
           this.$message.error('鏈緭鍏ュ惎鐢ㄦ棩鏈�')
           return
         }
-        if(!this.formData2.deviceStatus){
+        if(this.formData2.deviceStatus==='' || this.formData2.deviceStatus===null){
           this.$message.error('鏈�夋嫨褰撳墠鐘舵��')
           return
         }
@@ -873,7 +849,7 @@
           return
         }
 				this.upLoad2 = true;
-        this.formData2.insProductIds = this.formData2.insProductIds.join()
+        this.formData2.insProductIds = this.formData2.insProductIds?this.formData2.insProductIds.join():''
 				this.$axios.post(this.$api.deviceScope.addDeviceParameter, this.formData2, {
 					headers: {
 						'Content-Type': 'application/json'
@@ -914,6 +890,7 @@
           list2.push(obj)
         })
         this.tableList = list2
+		this.deviceId = row.id
       },
       closeDataVue () {
         this.showData = false

--
Gitblit v1.9.3