From 2151a84932d1ceb9723f45923b223d147d3bb512 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期日, 27 十月 2024 14:56:26 +0800
Subject: [PATCH] 过程参数

---
 src/views/home/widgets/index.vue |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/src/views/home/widgets/index.vue b/src/views/home/widgets/index.vue
index acace0d..c25ad0e 100644
--- a/src/views/home/widgets/index.vue
+++ b/src/views/home/widgets/index.vue
@@ -278,23 +278,34 @@
 			},
 			//闅愯棌缁勪欢
 			remove(item){
-				var newCopmsList = this.grid.copmsList
-				newCopmsList.forEach((obj, index) => {
-					var newObj = obj.filter(o=>o!=item)
-					newCopmsList[index] = newObj;
+				this.$nextTick(()=> {
+					var newCopmsList = this.grid.copmsList;
+					newCopmsList.forEach((obj, index) => {
+						var newObj = obj.filter(o=>o!=item)
+						newCopmsList[index] = newObj;
+					})
+					this.grid.data.forEach((item1,index1)=> {
+						if(item1.cardKey == item) {
+							this.grid.data.splice(index1,1);
+						}
+					})
 				})
 			},
 			//淇濆瓨
 			save(){
 				this.customizing = false
 				this.$refs.widgets.style.removeProperty('transform')
-				this.$TOOL.data.set("grid", this.grid)
+				this.$TOOL.data.set("grid", this.grid);
+				//this.apiResource.workStationIdList
 				//淇濆瓨鎺ュ彛
 				//var copmsList = this.grid.copmsList;
 				//var flattened = copmsList.reduce((acc, val) => acc.concat(val), []); //鎵佸钩鍖� 
 				//var data = this.grid.data.filter(item=>this.nowCompsList.includes(item.cardKey));
 				this.grid.data.forEach(item=> {
 					item.layoutConfig = JSON.stringify(this.grid.copmsList);
+					if(item.cardKey == "mdcRunning") {
+						item.apiResource = JSON.stringify({workStationIdList: []})
+					}
 				})
 				var obj = {
 					workbenchCardAddVOList: this.grid.data,

--
Gitblit v1.9.3