From 9fe29d060ff1b2259648e77305fca3eb6baed29b Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期六, 19 十月 2024 20:58:05 +0800
Subject: [PATCH] update

---
 src/views/console/workstation/CollDialog.vue |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/views/console/workstation/CollDialog.vue b/src/views/console/workstation/CollDialog.vue
index aee2c64..9b84e1c 100644
--- a/src/views/console/workstation/CollDialog.vue
+++ b/src/views/console/workstation/CollDialog.vue
@@ -39,7 +39,7 @@
                 </template>
                 <template #default="scope">
                     <el-select :disabled="!scope.row.status" v-model="scope.row[item.prop]"
-                        @change="change($event, scope.row, scope.$index, item.prop)" placeholder="" size="small"
+                        @change="change($event, scope.row, scope.$index, item)" placeholder="" size="small"
                         v-if="item.type === 'option'">
                         <el-option v-for="item in item.options" :key="item.value || item" :label="(item?.label || item)"
                             :value="(item.value || item)" />
@@ -93,19 +93,10 @@
 
     },
     methods: {
-        change(e, row, index, prop) {
-            console.log(e)
+        change(e, row, index, { prop, options }) {
+            console.log(e, options)
             if (prop === 'dpCategory' && e !== 'Other') {
-                const label = [{
-                    label: '鐘舵��',
-                    value: 'DeviceStatus'
-                }, {
-                    label: '浜ч噺',
-                    value: 'Output'
-                }, {
-                    label: '鍛婅',
-                    value: 'Alarm'
-                }].find(v => v.value === e).label
+                const label = options.find(v => v.value === e).label
                 this.tabledata[index].dpLabel = label
                 this.tabledata[index].dpName = e
             } else if (prop === 'dpCategory' && e === 'Other') {

--
Gitblit v1.9.3