From 07a41ade45c962e93a9d449ce1be0eec52e66a6a Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 19 三月 2025 10:44:32 +0800
Subject: [PATCH] 内部单不能修改报告

---
 src/components/view/a6-device-management.vue |   74 ++++++++++++++++++++++---------------
 1 files changed, 44 insertions(+), 30 deletions(-)

diff --git a/src/components/view/a6-device-management.vue b/src/components/view/a6-device-management.vue
index a5e0e51..478341e 100644
--- a/src/components/view/a6-device-management.vue
+++ b/src/components/view/a6-device-management.vue
@@ -162,7 +162,7 @@
 				</el-col>
 				<!-- 鍙宠竟甯冨眬 -->
 				<el-col :span="7">
-					<el-form :label-position="labelPosition" :model="formData" label-width="120px" ref="ruleForm">
+					<el-form :label-position="labelPosition" :model="formData" label-width="140px" ref="ruleForm">
             <!-- 瀹為獙瀹ゅ垪琛� -->
             <el-form-item label="鎵�灞為儴闂�:">
               <el-select :disabled="isUp" v-model="formData.subordinateDepartmentsId" placeholder="璇烽�夋嫨" size="small" style="width:100%">
@@ -421,7 +421,7 @@
 				</el-row>
 			</span>
     </el-dialog>
-    <dataAcquisitionConfig v-if="showData" :tableList="tableList"/>
+    <dataAcquisitionConfig v-if="showData" :deviceId="deviceId"/>
 	</div>
 </template>
 
@@ -435,6 +435,16 @@
 		},
 		data() {
 			return {
+				deviceId: '',
+				fileTypeOptions: [
+					{label: 'csv', value: '.csv'},
+					{label: 'db', value: '.db'},
+					{label: 'mdb', value: '.mdb'},
+					{label: 'word', value: '.docx'},
+					{label: 'excel', value: '.xlsx'},
+					{label: 'txt', value: '.txt'},
+					{label: 'png', value: '.png'},
+				],
 				//鏄惁鏄。妗堜慨璁�  true涓嶆槸 false鏄�
 				isUp: true,
 				formData: {
@@ -476,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: {
@@ -519,7 +531,8 @@
             }
 					},
 					requiredAdd: [],
-					requiredUp: []
+					requiredUp: [],
+          needSort: ['deviceName', 'acquisitionDate', 'activationDate', 'lastCalibrationDate', 'nextCalibrationDate', 'deviceStatus'],
 				},
 				entityCopy: {},
 				upIndex: 0,
@@ -574,8 +587,8 @@
 					this.subordinateDepartmentsList = data
 				})
 			},
-			refreshTable() {
-				this.$refs['ValueTable'].selectList()
+			refreshTable(e) {
+				this.$refs['ValueTable'].selectList(e)
 			},
 			refresh() {
 				this.componentData.entity = this.HaveJson(this.entityCopy)
@@ -602,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, {
@@ -798,7 +811,7 @@
 					}
 					this.$message.success('淇敼鎴愬姛')
 					this.upLoad = false
-					this.refreshTable()
+					this.refreshTable('page')
 					this.dialogVisible = false
 				}).catch(e => {
 					this.$message.error('淇敼澶辫触')
@@ -827,7 +840,7 @@
           this.$message.error('鏈緭鍏ュ惎鐢ㄦ棩鏈�')
           return
         }
-        if(!this.formData2.deviceStatus){
+        if(this.formData2.deviceStatus==='' || this.formData2.deviceStatus===null){
           this.$message.error('鏈�夋嫨褰撳墠鐘舵��')
           return
         }
@@ -836,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'
@@ -848,7 +861,7 @@
 					}
 					this.$message.success('鎻愪氦鎴愬姛')
 					this.upLoad2 = false
-					this.refreshTable()
+					this.refreshTable('page')
 					this.dialogVisible2 = false
 					this.formData2 = {
 						imageUpload: '',
@@ -877,6 +890,7 @@
           list2.push(obj)
         })
         this.tableList = list2
+		this.deviceId = row.id
       },
       closeDataVue () {
         this.showData = false
@@ -918,7 +932,7 @@
 						return
 					}
 					this.$message.success('鎿嶄綔鎴愬姛')
-					this.refreshTable()
+					this.refreshTable('page')
 					this.dialogVisible3 = false
 				}).catch(e => {
 					this.$message.error('鎿嶄綔澶辫触')

--
Gitblit v1.9.3