From c54802aead926ec66f2c1263ce1615aee0623728 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 16 八月 2024 17:26:01 +0800
Subject: [PATCH] mobox3 端口配置

---
 pages/modal/classAttr.vue |  100 +++++++++++++++++++++++++++-----------------------
 1 files changed, 54 insertions(+), 46 deletions(-)

diff --git a/pages/modal/classAttr.vue b/pages/modal/classAttr.vue
index 244c93b..5cf1d89 100644
--- a/pages/modal/classAttr.vue
+++ b/pages/modal/classAttr.vue
@@ -326,6 +326,14 @@
 				popupParam: {},
 			}
 		},
+		onNavigationBarButtonTap(e) {
+			//鍒锋柊
+			uni.redirectTo({
+				url: '../modal/classAttr?param=' + JSON.stringify(this.param) +
+					"&titlename=" + this.title
+			});
+
+		},
 		onLoad(options) {
 			// console.log(options);
 			uni.setNavigationBarTitle({
@@ -353,47 +361,51 @@
 				return;
 			}
 			this.$data.param = param;
-			var edit_dlg = {
-				Model: param.EditDlgMode,
-				Name: param.Edit_dlg.Name
-			}
-			var dataInfo = {
-				class_id: param.clsid
-			};
-			var $this = this;
-			$this.$store.state.thisareaFuncID = param.clsid;
-			// console.log($this.$store.getters.getclassAttrList);
-			//鑾峰彇
-			if ($this.$store.getters.getclassAttrList) {
-				$this.$data.classAttrList = $this.$store.getters.getclassAttrList.data;
-				$this.classGridStyleInfo();
-			} else
-				$this.$store.dispatch('classAttrList', dataInfo).then(success => {
-					// console.log(success);
-					if (success.code == '00000') {
-						$this.$data.classAttrList = success.data;
 
-						$this.classGridStyleInfo();
-					} else {
+			this.loadData()
+		},
+		methods: {
+			loadData() {
+				var $this = this;
+				var edit_dlg = {
+					Model: $this.param.EditDlgMode,
+					Name: $this.param.Edit_dlg.Name
+				}
+				var dataInfo = {
+					class_id: $this.param.clsid
+				};
+				$this.$store.state.thisareaFuncID = $this.param.clsid;
+				// console.log($this.$store.getters.getclassAttrList);
+				//鑾峰彇
+				if ($this.$store.getters.getclassAttrList) {
+					$this.$data.classAttrList = $this.$store.getters.getclassAttrList.data;
+					$this.classGridStyleInfo();
+				} else {
+					$this.$store.dispatch('classAttrList', dataInfo).then(success => {
+						// console.log(success);
+						if (success.code == '00000') {
+							$this.$data.classAttrList = success.data;
+
+							$this.classGridStyleInfo();
+						} else {
+							uni.showModal({
+								title: "閿欒1",
+								content: success.msg,
+								showCancel: false,
+								confirmText: "鍙栨秷"
+							});
+						}
+					}).catch(ex => {
+						// console.log(ex);
 						uni.showModal({
-							title: "閿欒1",
-							content: success.msg,
+							title: "閿欒1.1",
+							content: ex.errMsg,
 							showCancel: false,
 							confirmText: "鍙栨秷"
 						});
-					}
-				}).catch(ex => {
-					// console.log(ex);
-					uni.showModal({
-						title: "閿欒1.1",
-						content: ex.errMsg,
-						showCancel: false,
-						confirmText: "鍙栨秷"
 					});
-				});
-
-		},
-		methods: {
+				}
+			},
 			classAttr_extButton(index, iindex) { //寮规灞傛樉绀�type:top bottom center left right
 				var $this = this;
 				$this.$data.popupType = 'right'
@@ -578,7 +590,6 @@
 				var value = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].dictitem[e
 					.target.value];
 				var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']];
-				console.log(data_attr);
 				if (value.Name != data_attr.Value) {
 					this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = value
 						.Name;
@@ -703,6 +714,7 @@
 								req.push(this.formatAttr(ar))
 							}
 						}
+
 						var info = {
 							eventid: eventid,
 							edtype: "0",
@@ -986,12 +998,7 @@
 								icon: "success",
 								duration: 3000
 							});
-						//鍒锋柊
-						
-						// uni.redirectTo({
-						// 	url: '../modal/classAttr?param=' + JSON.stringify(this.$data.param) +
-						// 		"&titlename=" + this.$data.title
-						// });
+
 						// this.class_attr_init();
 					} else {
 						uni.showModal({
@@ -1111,12 +1118,12 @@
 							var ar = attr[j];
 							req.push({
 								attr: ar.attr,
-								val: ar.value ? ar.value : ''
+								value: ar.value ? ar.value : ''
 							});
 						}
 					}
 					var eventlist = this.$data.classGridStyle.StyleDef.event;
-				
+
 					if (eventlist) {
 						if (eventlist.length > 0) {
 							for (var i = 0; i < eventlist.length; i++) {
@@ -1150,7 +1157,7 @@
 
 					console.log(this.$data.classGridStyle);
 					console.log(this.$data.classAttrList);
-					
+
 				} else {
 					uni.showModal({
 						title: "鎻愮ず",
@@ -1327,6 +1334,7 @@
 					dataJson: JSON.stringify(info.dataJson)
 				}
 				console.log(dataInfo);
+			
 				this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
 					console.log(success);
 					if (success.code == '00000') {
@@ -1471,7 +1479,7 @@
 							length = 1;
 							req.push({
 								'attr': this.$data.refdatastore[i].attr,
-								'val': this.$data.refdatastore[i].value
+								'value': this.$data.refdatastore[i].value
 							});
 						}
 					}

--
Gitblit v1.9.1