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

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

diff --git a/src/views/console/workstation/CollDialog.vue b/src/views/console/workstation/CollDialog.vue
index 4b038e4..ef32a4c 100644
--- a/src/views/console/workstation/CollDialog.vue
+++ b/src/views/console/workstation/CollDialog.vue
@@ -95,26 +95,27 @@
             return this
         },
         getDetailList(params) {
-
-
             this.$HTTP.get(`/api/smart-collect/tpl/typelist`, {}, { params }).then(res => {
 
                 this.typeList = res.data || [];
                 // return res
             }).finally(() => {
-                this.$HTTP.get(`/api/blade-cps/workstation/listDatapointsByWorkstationId`, {}, { params }).then(res => {
-                    // res.data.records = res?.data?.records.map(v => {
-                    //     return {
-                    //         ...v,
-                    //         statusName: v.status ? '鍚敤' : '绂佺敤'
-                    //     }
-                    // })
-                    this.type = res.data.type
-                    this.tabledata = res.data.dpConfig || [];
-                    // return res
-                })
+                this.getList(params)
             })
 
+        },
+        getList(params) {
+            this.$HTTP.get(`/api/blade-cps/workstation/listDatapointsByWorkstationId`, {}, { params }).then(res => {
+                // res.data.records = res?.data?.records.map(v => {
+                //     return {
+                //         ...v,
+                //         statusName: v.status ? '鍚敤' : '绂佺敤'
+                //     }
+                // })
+                this.type = res.data.type
+                this.tabledata = res.data.dpConfig || [];
+                // return res
+            })
         },
         //琛ㄥ崟鎻愪氦鏂规硶
         submit() {
@@ -123,6 +124,12 @@
                 dpConfig: JSON.stringify(this.tabledata),
                 workstationId: this.params.id,
                 type: this.type
+            }).then(res => {
+                if (res.code === 200) {
+                    this.getList({
+                        workstationId: this.params.id,
+                    })
+                }
             })
         },
 

--
Gitblit v1.9.3