From c8eb1d74a09537143e697c849ca6e8986344212e Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期四, 12 九月 2024 17:28:19 +0800
Subject: [PATCH] 3018 disabled也要显示具体控件

---
 pages/modal/ms_classAttr.vue | 1414 +++++++++++++++++++++++++++-------------------------------
 1 files changed, 649 insertions(+), 765 deletions(-)

diff --git a/pages/modal/ms_classAttr.vue b/pages/modal/ms_classAttr.vue
index e1c74dd..3cca6da 100644
--- a/pages/modal/ms_classAttr.vue
+++ b/pages/modal/ms_classAttr.vue
@@ -646,6 +646,14 @@
 <script>
 	import pickerAddress from '../../js/pickerAddress/pickerAddress.vue'
 	import utils from "@/js/utils.js"
+	import {
+		classAttrList,
+		classGridStyleInfo,
+		dataObjAdd,
+		dataObjDelele,
+		dataObjRunCustomEvent
+	} from "@/api/index.js"
+
 	export default {
 		components: {
 			pickerAddress
@@ -670,6 +678,15 @@
 				check_list: {},
 			}
 		},
+		onNavigationBarButtonTap(e) {
+			//鍒锋柊
+			uni.redirectTo({
+				url: '../modal/ms_classAttr?param=' + JSON.stringify(this.param) +
+					"&titlename=" + this.title
+			});
+
+		},
+
 		onLoad(options) {
 			// console.log(options);
 			uni.setNavigationBarTitle({
@@ -701,79 +718,56 @@
 			//     Model: param.EditDlgMode,
 			//     Name: param.Master_Cls.View_Style.Name
 			// }
-			//涓绘暟鎹被鑾峰彇
-			var dataInfo = {
-				class_id: param.Master_Cls.ID
-			};
-			var $this = this;
-			$this.$store.state.thisareaFuncID = param.Master_Cls.ID;
-			// console.log($this.$store.getters.getclassAttrList);
-			if ($this.$store.getters.getclassAttrList) {
-				$this.$data.classAttrList = $this.$store.getters.getclassAttrList.data;
-				$this.classGridStyleInfo(param.Master_Cls.ID, $this.$data.param.Master_Cls.View_Style.Name, 'Mast');
-			} else {
-				$this.$store.dispatch('classAttrList', dataInfo).then(success => {
-					// console.log(success);
-					if (success.code == '00000') {
-						$this.$data.classAttrList = success.data;
+			this.loadData()
 
-						$this.classGridStyleInfo(param.Master_Cls.ID, $this.$data.param.Master_Cls.View_Style.Name,
-							'Mast');
-					} else {
-						uni.showModal({
-							title: "閿欒1",
-							content: success.msg,
-							showCancel: false,
-							confirmText: "鍙栨秷"
-						});
-					}
-				}).catch(ex => {
-					// console.log(ex);
-					uni.showModal({
-						title: "閿欒1.1",
-						content: ex.errMsg,
-						showCancel: false,
-						confirmText: "鍙栨秷"
-					});
-				});
-			}
-
-			//浠庢暟鎹被鑾峰彇
-			var subdataInfo = {
-				class_id: param.Sub_Cls.ID
-			};
-			$this.$store.state.thisareaFuncSubID = param.Sub_Cls.ID;
-			if ($this.$store.getters.getSubClassAttrList) {
-				$this.$data.subClassAttrList = $this.$store.getters.getSubClassAttrList.data;
-				$this.classGridStyleInfo(param.Sub_Cls.ID, $this.$data.param.Sub_Cls.View_Style.Name, 'Sub');
-			} else {
-				$this.$store.dispatch('subClassAttrList', subdataInfo).then(success => {
-					// console.log(success);
-					if (success.code == '00000') {
-						$this.$data.subClassAttrList = success.data;
-
-						$this.classGridStyleInfo(param.Sub_Cls.ID, $this.$data.param.Sub_Cls.View_Style.Name,
-							'Sub');
-					} else {
-						uni.showModal({
-							title: "閿欒1_1",
-							content: success.msg,
-							showCancel: false,
-							confirmText: "鍙栨秷"
-						});
-					}
-				}).catch(ex => {
-					// console.log(ex);
-					uni.showModal({
-						title: "閿欒1_1.1",
-						content: ex.errMsg,
-						showCancel: false,
-						confirmText: "鍙栨秷"
-					});
-				});
-			}
 		},
 		methods: {
+			setData(obj) {
+				let that = this;
+				let keys = [];
+				let val, data;
+
+				Object.keys(obj).forEach(function(key) {
+					keys = key.split(".");
+					val = obj[key];
+					data = that.$data;
+					keys.forEach(function(key2, index) {
+						if (index + 1 == keys.length) {
+							that.$set(data, key2, val);
+						} else {
+							if (!data[key2]) {
+								that.$set(data, key2, {});
+							}
+						}
+						data = data[key2];
+					});
+				});
+			},
+			async loadData() {
+				try {
+					const param = this.param
+
+					this.$data.classAttrList = await this.classAttrGetList(param.Master_Cls?.ID)
+					this.$data.classGridStyle = await this.classGridStyleInfo(param.Master_Cls?.ID, param.Master_Cls
+						?.View_Style?.Name)
+					this.class_attr_init();
+
+
+					this.$data.subClassAttrList = await this.classAttrGetList(param.Sub_Cls?.ID)
+					this.$data.subClassGridStyle = await this.classGridStyleInfo(param.Sub_Cls?.ID, param.Sub_Cls
+						?.View_Style
+						?.Name)
+					this.subClass_attr_init();
+
+				} catch (ex) {
+					uni.showModal({
+						title: "閿欒1",
+						content: ex.errMsg,
+						showCancel: false,
+						confirmText: "鍙栨秷"
+					});
+				}
+			},
 			scan_classAttr_extButton(e) { //閫夋嫨鎸夐挳鍓� 				var $this = this;
 				var Before_Select_Event = $this.$data.param.Scan_Code.Before_Select_Event;
@@ -1039,25 +1033,16 @@
 					uni.showLoading({
 						title: "鍔犺浇涓�.."
 					});
-					this.$store.dispatch('DelObj', dataInfo).then(success => {
-						console.log(success);
+					dataObjDelele(dataInfo).then(success => {
 						uni.hideLoading();
-						if (success.code == '00000') {
-							$this.$data.subPanelList.splice(index, 1);
-							uni.showModal({
-								title: "鎻愮ず",
-								content: "鍒犻櫎鎴愬姛锛�,
-								showCancel: false,
-								confirmText: "鍙栨秷"
-							});
-						} else {
-							uni.showModal({
-								title: "閿欒9",
-								content: success.msg,
-								showCancel: false,
-								confirmText: "鍙栨秷"
-							});
-						}
+						$this.$data.subPanelList.splice(index, 1);
+						uni.showModal({
+							title: "鎻愮ず",
+							content: "鍒犻櫎鎴愬姛锛�,
+							showCancel: false,
+							confirmText: "鍙栨秷"
+						});
+
 					}).catch(ex => {
 						console.log(ex);
 						uni.hideLoading();
@@ -1070,89 +1055,61 @@
 					});
 				}
 			},
-			async classGridStyleInfo(clsid, styleName, clsType) {
-				var $this = this;
-				var gridstyleInfo = {
-					class_id: clsid,
-					name: styleName,
-					type: '2'
+			async classAttrGetList(clsid) {
+				try {
+
+					var $this = this;
+					var dataInfo = {
+						class_id: clsid,
+					};
+					const result = await classAttrList(dataInfo) || []
+					return result
+				} catch (ex) {
+					// console.log(ex);
+					let exStr = JSON.stringify(ex)
+					if (exStr == "{}")
+						exStr = ex
+					let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
+					uni.showModal({
+						title: this.translateSys("error") + " 1.1",
+						content: tip,
+						showCancel: false,
+						confirmText: this.translateSys("cancel")
+					});
+					return []
 				};
-				// console.log($this.$store.getters.getclassGridStyleInfo);
-				//鑾峰彇涓绘暟鎹被鐣岄潰鏍峰紡
-				if (clsType == 'Mast') {
-					$this.$store.state.thisEditName = styleName;
-					if ($this.$store.getters.getclassGridStyleInfo) {
-						$this.$data.classGridStyle = $this.$store.getters.getclassGridStyleInfo.data;
-						$this.class_attr_init();
-					} else {
-						//console.log(gridstyleInfo);
-						$this.$store.dispatch('classGridStyleInfo', gridstyleInfo).then(success => {
-							// console.log(success);
-
-							if (success.code == '00000') {
-
-								success.data.StyleDef = JSON.parse(success.data.StyleDef);
-								$this.$data.classGridStyle = success.data;
-
-								$this.class_attr_init();
-
-
-							} else {
-								uni.showModal({
-									title: "閿欒1.2",
-									content: success.msg,
-									showCancel: false,
-									confirmText: "鍙栨秷"
-								});
-							}
-						}).catch(ex => {
-							console.log(ex);
-							uni.showModal({
-								title: "閿欒1.3",
-								content: ex.errMsg,
-								showCancel: false,
-								confirmText: "鍙栨秷"
-							});
-						});
-					}
-				} else if (clsType == 'Sub') { //鑾峰彇浠庢暟鎹被鐣岄潰鏍峰紡
-					$this.$store.state.thisEditSubName = styleName;
-					if ($this.$store.getters.getSubClassGridStyleInfo) {
-						$this.$data.subClassGridStyle = $this.$store.getters.getSubClassGridStyleInfo.data;
-						$this.subClass_attr_init();
-					} else {
-						//console.log(gridstyleInfo);
-						
-						$this.$store.dispatch('subClassGridStyleInfo', gridstyleInfo).then(success => {
-							// console.log(success);
-							if (success.code == '00000') {
-
-								success.data.StyleDef = JSON.parse(success.data.StyleDef);
-								$this.$data.subClassGridStyle = success.data;
-
-								$this.subClass_attr_init();
-		
-
-							} else {
-								uni.showModal({
-									title: "閿欒1.2",
-									content: success.msg,
-									showCancel: false,
-									confirmText: "鍙栨秷"
-								});
-							}
-						}).catch(ex => {
-							console.log(ex);
-							uni.showModal({
-								title: "閿欒1.3",
-								content: ex.errMsg,
-								showCancel: false,
-								confirmText: "鍙栨秷"
-							});
-						});
-					}
-				}
 			},
+
+			async classGridStyleInfo(clsid, styleName) {
+				try {
+
+					var $this = this;
+					var gridstyleInfo = {
+						class_id: clsid,
+						name: styleName,
+						type: '2'
+					};
+					const result = await classGridStyleInfo(gridstyleInfo)
+					result.style_def = JSON.parse(styledef);
+					return result
+
+				} catch (ex) {
+					// console.log(ex);
+					let exStr = JSON.stringify(ex)
+					if (exStr == "{}")
+						exStr = ex
+					let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
+					uni.showModal({
+						title: this.translateSys("error") + " 1.2",
+						content: tip,
+						showCancel: false,
+						confirmText: this.translateSys("cancel")
+					});
+					return {}
+				};
+			},
+
+
 			ontap(e) { //鎵爜鍔熻兘
 				//console.log(e.target)
 				getApp().onScan((result) => {
@@ -1921,35 +1878,27 @@
 
 				// return
 				console.log(dataInfo);
-				this.$store.dispatch('addclassattr', dataInfo).then(success => {
-					console.log(success);
+				dataObjAdd(dataInfo).then(data => {
+					console.log(data);
 					uni.hideLoading();
-					if (success.code == '00000') {
-						var action = JSON.parse(success.data.Action);
-						if (action.ret == '0') {
-							if (action.result_type == '0') {
-								uni.showToast({
-									title: action.result,
-									icon: "success",
-									duration: 3000
-								});
-							}
-							// "{"ret":0, "result_type":0, "result":"鍒涘缓鎴愬姛123123123","info":""}"
+					var action = JSON.parse(data.Action);
+					if (action.ret == '0') {
+						if (action.result_type == '0') {
+							uni.showToast({
+								title: action.result,
+								icon: "success",
+								duration: 3000
+							});
 						}
-						//鍒锋柊
-						uni.redirectTo({
-							url: '../modal/ms_classAttr?param=' + JSON.stringify(this.$data.param) +
-								"&titlename=" + this.$data.title
-						});
-						// this.class_attr_init();
-					} else {
-						uni.showModal({
-							title: "閿欒",
-							content: success.msg,
-							showCancel: false,
-							confirmText: "鍙栨秷"
-						});
+						// "{"ret":0, "result_type":0, "result":"鍒涘缓鎴愬姛123123123","info":""}"
 					}
+					//鍒锋柊
+					// uni.redirectTo({
+					// 	url: '../modal/ms_classAttr?param=' + JSON.stringify(this.$data.param) +
+					// 		"&titlename=" + this.$data.title
+					// });
+					// // this.class_attr_init();
+
 				}).catch(ex => {
 					console.log(ex);
 					uni.hideLoading();
@@ -2311,85 +2260,76 @@
 					global_attr: global_attr
 				}
 				console.log(dataInfo);
-				this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
-					console.log(success);
-					if (success.code == '00000') {
-						var data = JSON.parse(success.data);
-						var actionlist = data.action;
-						if (actionlist) {
-							for (var j = 0; j < actionlist.length; j++) {
-								var action = actionlist[j]
-								var action_type = action.action_type;
-								var value = action.value;
-								if (action_type == 'set_dlg_attr') {
-									if (value) {
-										var val = value;
-										if (typeof value == 'string') {
-											val = JSON.parse(value);
-										}
-										console.log(val);
-										for (var i = 0; i < val.length; i++) {
-											for (var a = 0; a < this.$data.classAttrList.length; a++) {
-												for (var l = 0; l < this.$data.classAttrList[a].Attr.length; l++) {
-													var ca = this.$data.classAttrList[a].Attr[l];
-													if (val[i].attr == ca.Name) {
-														if (utils.classUtils.attrTypeIsDict(ca.Type)) {
-															var dictItemList = [];
-															for (var d in val[i].choice_list) {
-																var val = val[i].choice_list[d];
-																dictItemList.push({
-																	"CN_S_NAME": val,
-																	"Name": val,
-																	"label": val,
-																	"value": val
-																});
+				dataObjRunCustomEvent(dataInfo).then(success => {
+					var data = JSON.parse(success);
+					var actionlist = data.action;
+					if (actionlist) {
+						for (var j = 0; j < actionlist.length; j++) {
+							var action = actionlist[j]
+							var action_type = action.action_type;
+							var value = action.value;
+							if (action_type == 'set_dlg_attr') {
+								if (value) {
+									var val = value;
+									if (typeof value == 'string') {
+										val = JSON.parse(value);
+									}
+									console.log(val);
+									for (var i = 0; i < val.length; i++) {
+										for (var a = 0; a < this.$data.classAttrList.length; a++) {
+											for (var l = 0; l < this.$data.classAttrList[a].Attr.length; l++) {
+												var ca = this.$data.classAttrList[a].Attr[l];
+												if (val[i].attr == ca.Name) {
+													if (utils.classUtils.attrTypeIsDict(ca.Type)) {
+														var dictItemList = [];
+														for (var d in val[i].choice_list) {
+															var val = val[i].choice_list[d];
+															dictItemList.push({
+																"CN_S_NAME": val,
+																"Name": val,
+																"label": val,
+																"value": val
+															});
 
-															}
-															ca.dictitem = dictItemList;
-															// attr[j].dictitem = val[i].choice_list;
-														} else {
-															// ca.value = val[i].value;
 														}
+														ca.dictitem = dictItemList;
+														// attr[j].dictitem = val[i].choice_list;
+													} else {
+														// ca.value = val[i].value;
 													}
 												}
 											}
+										}
 
-											var length = 0;
-											if (!this.$data.refdatastore.filter(function(s) {
-													return val[i].attr == s.attr
-												}).length) {
-												length = 1;
-												this.$data.refdatastore.push(val[i]);
-											}
-											if (length == 0) {
-												for (var j = 0; j < this.$data.refdatastore.length; j++) {
-													if (this.$data.refdatastore[j].attr == val[i].attr) {
-														this.$data.refdatastore[j].value = val[i].value;
-													}
+										var length = 0;
+										if (!this.$data.refdatastore.filter(function(s) {
+												return val[i].attr == s.attr
+											}).length) {
+											length = 1;
+											this.$data.refdatastore.push(val[i]);
+										}
+										if (length == 0) {
+											for (var j = 0; j < this.$data.refdatastore.length; j++) {
+												if (this.$data.refdatastore[j].attr == val[i].attr) {
+													this.$data.refdatastore[j].value = val[i].value;
 												}
 											}
 										}
 									}
 								}
-								if (action_type == 'open_select_userdlg') {
-									uni.showModal({
-										title: "閿欒2.2",
-										content: "open_select_userdlg杩欎釜action_type杩樻湭澶勭悊锛�,
-										showCancel: false,
-										confirmText: "鍙栨秷"
-									});
-								}
+							}
+							if (action_type == 'open_select_userdlg') {
+								uni.showModal({
+									title: "閿欒2.2",
+									content: "open_select_userdlg杩欎釜action_type杩樻湭澶勭悊锛�,
+									showCancel: false,
+									confirmText: "鍙栨秷"
+								});
 							}
 						}
-
-					} else {
-						uni.showModal({
-							title: "閿欒2",
-							content: success.msg,
-							showCancel: false,
-							confirmText: "鍙栨秷"
-						});
 					}
+
+
 				}).catch(ex => {
 					// console.log(ex);
 					uni.showModal({
@@ -2442,108 +2382,100 @@
 					global_attr: JSON.stringify(this.$data.global_attr)
 				}
 				console.log(dataInfo);
-				this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
+				dataObjRunCustomEvent(dataInfo).then(success => {
 					console.log(success);
-					if (success.code == '00000') {
-						var data = JSON.parse(success.data);
-						var actionlist = data.action;
+					var data = JSON.parse(success);
+					var actionlist = data.action;
 
-						if (actionlist) {
-							console.log(actionlist);
-							for (var i = 0; i < actionlist.length; i++) {
-								var action = actionlist[i];
-								if (action.action_type == 'set_dlg_attr') {
-									var result = action.value;
-									for (var i = 0; i < result.length; i++) {
-										if (result[i].choice_list) {
-											for (var c = 0; c < $this.$data.classAttrList.length; c++) {
-												var attr = $this.$data.classAttrList[c].Attr;
-												for (var j = 0; j < attr.length; j++) {
-													if (attr[j].Name == result[i].attr) {
-														if (utils.classUtils.attrTypeIsDict(attr[j].Type)) {
-															var dictItemList = [];
-															for (var d in result[i].choice_list) {
-																var val = result[i].choice_list[d];
-																dictItemList.push({
-																	"CN_S_NAME": val,
-																	"Name": val,
-																	"label": val,
-																	"value": val
-																});
-															}
-															attr[j].dictitem = dictItemList;
-															// attr[j].dictitem = result[i].choice_list;
+					if (actionlist) {
+						console.log(actionlist);
+						for (var i = 0; i < actionlist.length; i++) {
+							var action = actionlist[i];
+							if (action.action_type == 'set_dlg_attr') {
+								var result = action.value;
+								for (var i = 0; i < result.length; i++) {
+									if (result[i].choice_list) {
+										for (var c = 0; c < $this.$data.classAttrList.length; c++) {
+											var attr = $this.$data.classAttrList[c].Attr;
+											for (var j = 0; j < attr.length; j++) {
+												if (attr[j].Name == result[i].attr) {
+													if (utils.classUtils.attrTypeIsDict(attr[j].Type)) {
+														var dictItemList = [];
+														for (var d in result[i].choice_list) {
+															var val = result[i].choice_list[d];
+															dictItemList.push({
+																"CN_S_NAME": val,
+																"Name": val,
+																"label": val,
+																"value": val
+															});
 														}
+														attr[j].dictitem = dictItemList;
+														// attr[j].dictitem = result[i].choice_list;
 													}
 												}
 											}
 										}
-										for (var c = 0; c < $this.$data.classAttrList.length; c++) {
-											var attr = $this.$data.classAttrList[c].Attr;
-											for (var j = 0; j < attr.length; j++) {
-												console.log(attr[j].Name + '==' + result[i].attr);
-												if (attr[j].Name == result[i].attr) {
-													attr[j].Value = result[i].value;
-												}
-											}
-										}
-										var length = 0;
-										if (!$this.$data.refdatastore.filter(function(s) {
-												return result[i].attr == s.attr
-											}).length) {
-											length = 1;
-											$this.$data.refdatastore.push(result[i]);
-										}
-										if (length == 0) {
-											for (var j = 0; j < $this.$data.refdatastore.length; j++) {
-												if ($this.$data.refdatastore[j].attr == result[i].attr) {
-													$this.$data.refdatastore[j].value = result[i].value;
-												}
+									}
+									for (var c = 0; c < $this.$data.classAttrList.length; c++) {
+										var attr = $this.$data.classAttrList[c].Attr;
+										for (var j = 0; j < attr.length; j++) {
+											console.log(attr[j].Name + '==' + result[i].attr);
+											if (attr[j].Name == result[i].attr) {
+												attr[j].Value = result[i].value;
 											}
 										}
 									}
-								} else if (data.action[i].action_type == 'set_global_attr') {
-									$this.$data.global_attr = data.action[i].value || [];
-								}
-							}
-						}
-
-						if (data.result) {
-							var result = data.result;
-							for (var i = 0; i < result.length; i++) {
-								for (var c = 0; c < $this.$data.classAttrList.length; c++) {
-									var attr = $this.$data.classAttrList[c].Attr;
-									for (var j = 0; j < attr.length; j++) {
-										if (attr[j].Name == result[i].attr) {
-											attr[j].Value = result[i].value;
+									var length = 0;
+									if (!$this.$data.refdatastore.filter(function(s) {
+											return result[i].attr == s.attr
+										}).length) {
+										length = 1;
+										$this.$data.refdatastore.push(result[i]);
+									}
+									if (length == 0) {
+										for (var j = 0; j < $this.$data.refdatastore.length; j++) {
+											if ($this.$data.refdatastore[j].attr == result[i].attr) {
+												$this.$data.refdatastore[j].value = result[i].value;
+											}
 										}
 									}
 								}
-
-								var length = 0;
-								if (!$this.$data.refdatastore.filter(function(s) {
-										return result[i].attr == s.attr
-									}).length) {
-									length = 1;
-									$this.$data.refdatastore.push(result[i]);
-								}
-								if (length == 0) {
-									for (var j = 0; j < $this.$data.refdatastore.length; j++) {
-										if ($this.$data.refdatastore[j].attr == result[i].attr) {
-											$this.$data.refdatastore[j].value = result[i].value;
-										}
-									}
-								}
+							} else if (data.action[i].action_type == 'set_global_attr') {
+								$this.$data.global_attr = data.action[i].value || [];
 							}
 						}
-					} else {
-						uni.showModal({
-							title: "閿欒3",
-							content: success.msg,
-							showCancel: false,
-							confirmText: "鍙栨秷"
-						});
 					}
+
+					if (data.result) {
+						var result = data.result;
+						for (var i = 0; i < result.length; i++) {
+							for (var c = 0; c < $this.$data.classAttrList.length; c++) {
+								var attr = $this.$data.classAttrList[c].Attr;
+								for (var j = 0; j < attr.length; j++) {
+									if (attr[j].Name == result[i].attr) {
+										attr[j].Value = result[i].value;
+									}
+								}
+							}
+
+							var length = 0;
+							if (!$this.$data.refdatastore.filter(function(s) {
+									return result[i].attr == s.attr
+								}).length) {
+								length = 1;
+								$this.$data.refdatastore.push(result[i]);
+							}
+							if (length == 0) {
+								for (var j = 0; j < $this.$data.refdatastore.length; j++) {
+									if ($this.$data.refdatastore[j].attr == result[i].attr) {
+										$this.$data.refdatastore[j].value = result[i].value;
+									}
+								}
+							}
+						}
+					}
+
 				}).catch(ex => {
 					// console.log(ex);
 					uni.showModal({
@@ -2617,38 +2549,30 @@
 					global_attr: JSON.stringify(this.$data.global_attr)
 				}
 				console.log(dataInfo);
-				this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
+				dataObjRunCustomEvent(dataInfo).then(success => {
 					console.log(success);
-					if (success.code == '00000') {
-						var data = JSON.parse(success.data);
-						var result = data.result;
-						for (var i = 0; i < result.length; i++) {
-							// self.class_attr_ele.find('.attr_field[data-field="' + result[i].attr + '"]').val(result[i].value).data('val', result[i].value);
-							var length = 0;
-							if (!this.$data.refdatastore.filter(function(s) {
-									return result[i].attr == s.attr
-								}).length) {
-								length = 1;
-								this.$data.refdatastore.push(result[i]);
-							}
-							if (length == 0) {
-								for (var j = 0; j < this.$data.refdatastore.length; j++) {
-									if (this.$data.refdatastore[j].attr == result[i].attr) {
-										this.$data.refdatastore[j].value = result[i].value;
-									}
+					var data = JSON.parse(success);
+					var result = data.result;
+					for (var i = 0; i < result.length; i++) {
+						// self.class_attr_ele.find('.attr_field[data-field="' + result[i].attr + '"]').val(result[i].value).data('val', result[i].value);
+						var length = 0;
+						if (!this.$data.refdatastore.filter(function(s) {
+								return result[i].attr == s.attr
+							}).length) {
+							length = 1;
+							this.$data.refdatastore.push(result[i]);
+						}
+						if (length == 0) {
+							for (var j = 0; j < this.$data.refdatastore.length; j++) {
+								if (this.$data.refdatastore[j].attr == result[i].attr) {
+									this.$data.refdatastore[j].value = result[i].value;
 								}
 							}
 						}
-
-						this.add();
-					} else {
-						uni.showModal({
-							title: "閿欒4",
-							content: success.msg,
-							showCancel: false,
-							confirmText: "鍙栨秷"
-						});
 					}
+
+					this.add();
+
 				}).catch(ex => {
 					// console.log(ex);
 					uni.showModal({
@@ -2722,149 +2646,141 @@
 					global_attr: JSON.stringify(this.$data.global_attr)
 				}
 				console.log(dataInfo);
-				this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
+				dataObjRunCustomEvent(dataInfo).then(success => {
 					console.log(success);
-					if (success.code == '00000') {
-						var data = JSON.parse(success.data);
-						if (data != "") {
+					var data = JSON.parse(success);
+					if (data != "") {
 
-							var actions = data.action;
-							console.log(actions);
-							if (actions) {
-								for (var i = 0; i < actions.length; i++) {
-									var action = actions[i];
-									var val = action.value;
-									var enviroment = JSON.stringify(enviroment);
+						var actions = data.action;
+						console.log(actions);
+						if (actions) {
+							for (var i = 0; i < actions.length; i++) {
+								var action = actions[i];
+								var val = action.value;
+								var enviroment = JSON.stringify(enviroment);
 
-									if (action.action_type == 'open_panel') {
-										var d = dialog({
-											title: '<i class="ace-icon fa fa-info-circle"></i> ' + '鎻愮ず',
-											content: action.action_type + '姝ction灏氭湭澶勭悊锛�
-										});
-										d.show();
-									} else if (action.action_type == 'open_select_userdlg') {
-										var style = val.style;
-										// style == 'user' ? '閫夋嫨浜哄憳' : style == 'department' ? '閫夋嫨閮ㄩ棬' : style == 'role' ? '閫夋嫨瑙掕壊' : ''
-										var $this = this;
-										var param = {
-											index: index,
-											iindex: iindex,
-											button_callback: button_callback,
-											req: req,
-											data_attr: data_attr
+								if (action.action_type == 'open_panel') {
+									var d = dialog({
+										title: '<i class="ace-icon fa fa-info-circle"></i> ' + '鎻愮ず',
+										content: action.action_type + '姝ction灏氭湭澶勭悊锛�
+									});
+									d.show();
+								} else if (action.action_type == 'open_select_userdlg') {
+									var style = val.style;
+									// style == 'user' ? '閫夋嫨浜哄憳' : style == 'department' ? '閫夋嫨閮ㄩ棬' : style == 'role' ? '閫夋嫨瑙掕壊' : ''
+									var $this = this;
+									var param = {
+										index: index,
+										iindex: iindex,
+										button_callback: button_callback,
+										req: req,
+										data_attr: data_attr
+									}
+									uni.navigateTo({
+										url: '../selpsn/index?mulit=false&param=' + JSON.stringify(
+											param),
+										events: {
+											AddPer(data, param) {
+												// console.log(param);
+												console.log(data);
+												var callback_eventid = param.button_callback.trim();
+												var info = {
+													eventid: callback_eventid,
+													edtype: "0",
+													projectid: '',
+													rclsid: '',
+													robjid: '',
+													userlogin: '',
+													clsid: $this.$data.param.Master_Cls.ID,
+													objid: "",
+													attr: param.req,
+													inputparameter: data
+												}
+												$this.DataObjRunCustomEvent(info, param.data_attr);
+											}
 										}
-										uni.navigateTo({
-											url: '../selpsn/index?mulit=false&param=' + JSON.stringify(
-												param),
-											events: {
-												AddPer(data, param) {
-													// console.log(param);
-													console.log(data);
-													var callback_eventid = param.button_callback.trim();
+									});
+								} else if (action.action_type == 'open_data_query_dlg') {
+
+								} else if (action.action_type == 'open_common_dlg') {
+									var value = action.value;
+									var d = dialog({
+										title: '<i class="ace-icon fa fa-info-circle"></i> ' + '鎻愮ず',
+										content: action.action_type + '姝ction灏氭湭澶勭悊锛�
+									});
+									d.show();
+								} else if (action.action_type == 'open_project_query_dlg') {
+									//console.log(action.value.select_range);
+									//console.log(action.value.mulit_select);
+									var priRel = '-1';
+									if (action.value.select_range == '鍏ㄩ儴鐩稿叧')
+										priRel = '0';
+									else if (action.value.select_range == '鎴戣礋璐g殑椤圭洰')
+										priRel = '1';
+									else if (action.value.select_range == '鎴戝垱寤虹殑')
+										priRel = '2';
+									else if (action.value.select_range == '鎴戝弬涓庣殑' || action.value
+										.select_range == '鎴戝弬鍔犵殑')
+										priRel = '3';
+									else if (action.value.select_range == '鎴戝叧娉ㄧ殑')
+										priRel = '4';
+									else if (action.value.select_range == '鎴戜笅灞炵殑椤圭洰')
+										priRel = '5';
+
+									var $this = this;
+									var param_ = {
+										index: index,
+										iindex: iindex,
+										button_callback: button_callback,
+										req: req
+									}
+									uni.navigateTo({
+										url: '../selPrj/index?relation=' + priRel + '&param=' + JSON
+											.stringify(param_),
+										events: {
+											AddPer(data, param) {
+												$this.$data.classAttrList[param.index].Attr[param
+													.iindex].Value = data[0].Name;
+												$this.$data.classAttrList[param.index].Attr[param
+														.iindex].ValID = data[0].ID + ';' + data[0]
+													.Name;
+												var callback_eventid = param.button_callback.trim();
+												if (callback_eventid) {
 													var info = {
 														eventid: callback_eventid,
-														edtype: "0",
-														projectid: '',
-														rclsid: '',
-														robjid: '',
-														userlogin: '',
+														edtype: "2",
+														projectid: data[0].ID,
+														rclsid: "",
+														robjid: "",
+														userlogin: "",
 														clsid: $this.$data.param.Master_Cls.ID,
 														objid: "",
 														attr: param.req,
-														inputparameter: data
 													}
-													$this.DataObjRunCustomEvent(info, param.data_attr);
+
+													$this.DataObjRunCustomEvent(info);
 												}
 											}
-										});
-									} else if (action.action_type == 'open_data_query_dlg') {
-
-									} else if (action.action_type == 'open_common_dlg') {
-										var value = action.value;
-										var d = dialog({
-											title: '<i class="ace-icon fa fa-info-circle"></i> ' + '鎻愮ず',
-											content: action.action_type + '姝ction灏氭湭澶勭悊锛�
-										});
-										d.show();
-									} else if (action.action_type == 'open_project_query_dlg') {
-										//console.log(action.value.select_range);
-										//console.log(action.value.mulit_select);
-										var priRel = '-1';
-										if (action.value.select_range == '鍏ㄩ儴鐩稿叧')
-											priRel = '0';
-										else if (action.value.select_range == '鎴戣礋璐g殑椤圭洰')
-											priRel = '1';
-										else if (action.value.select_range == '鎴戝垱寤虹殑')
-											priRel = '2';
-										else if (action.value.select_range == '鎴戝弬涓庣殑' || action.value
-											.select_range == '鎴戝弬鍔犵殑')
-											priRel = '3';
-										else if (action.value.select_range == '鎴戝叧娉ㄧ殑')
-											priRel = '4';
-										else if (action.value.select_range == '鎴戜笅灞炵殑椤圭洰')
-											priRel = '5';
-
-										var $this = this;
-										var param_ = {
-											index: index,
-											iindex: iindex,
-											button_callback: button_callback,
-											req: req
 										}
-										uni.navigateTo({
-											url: '../selPrj/index?relation=' + priRel + '&param=' + JSON
-												.stringify(param_),
-											events: {
-												AddPer(data, param) {
-													$this.$data.classAttrList[param.index].Attr[param
-														.iindex].Value = data[0].Name;
-													$this.$data.classAttrList[param.index].Attr[param
-															.iindex].ValID = data[0].ID + ';' + data[0]
-														.Name;
-													var callback_eventid = param.button_callback.trim();
-													if (callback_eventid) {
-														var info = {
-															eventid: callback_eventid,
-															edtype: "2",
-															projectid: data[0].ID,
-															rclsid: "",
-															robjid: "",
-															userlogin: "",
-															clsid: $this.$data.param.Master_Cls.ID,
-															objid: "",
-															attr: param.req,
-														}
-
-														$this.DataObjRunCustomEvent(info);
-													}
-												}
-											}
-										});
-									} else {
-										var d = dialog({
-											title: '<i class="ace-icon fa fa-info-circle"></i> ' + '鎻愮ず',
-											content: action.action_type + '姝ction灏氭湭澶勭悊锛�
-										});
-										d.show();
-									}
+									});
+								} else {
+									var d = dialog({
+										title: '<i class="ace-icon fa fa-info-circle"></i> ' + '鎻愮ず',
+										content: action.action_type + '姝ction灏氭湭澶勭悊锛�
+									});
+									d.show();
 								}
 							}
-						} else {
-							uni.showModal({
-								title: "鎻愮ず5.2",
-								content: '璋冪敤 before_click_button 鑴氭湰杩斿洖绌猴紝event_id' + eventid,
-								showCancel: false,
-								confirmText: "鍙栨秷"
-							});
 						}
 					} else {
 						uni.showModal({
-							title: "閿欒5",
-							content: success.msg,
+							title: "鎻愮ず5.2",
+							content: '璋冪敤 before_click_button 鑴氭湰杩斿洖绌猴紝event_id' + eventid,
 							showCancel: false,
 							confirmText: "鍙栨秷"
 						});
 					}
+
 				}).catch(ex => {
 					// console.log(ex);
 					uni.showModal({
@@ -2909,86 +2825,78 @@
 					global_attr: global_attr
 				}
 				console.log(dataInfo);
-				this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
+				dataObjRunCustomEvent(dataInfo).then(success => {
 					console.log(success);
-					if (success.code == '00000') {
-						var data = JSON.parse(success.data);
-						var actionlist = data.action;
-						if (actionlist) {
-							for (var j = 0; j < actionlist.length; j++) {
-								var action = actionlist[j]
-								var action_type = action.action_type;
-								var value = action.value;
-								if (action_type == 'set_dlg_attr') {
-									if (value) {
-										var val = value;
-										if (typeof value == 'string') {
-											val = JSON.parse(value);
-										}
-										console.log(val);
-										for (var i = 0; i < val.length; i++) {
-											for (var a = 0; a < this.$data.subClassAttrList.length; a++) {
-												for (var l = 0; l < this.$data.subClassAttrList[a].Attr
-													.length; l++) {
-													var ca = this.$data.subClassAttrList[a].Attr[l];
-													if (val[i].attr == ca.Name) {
-														if (utils.classUtils.attrTypeIsDict(ca.Type)) {
-															var dictItemList = [];
-															for (var d in val[i].choice_list) {
-																var val = val[i].choice_list[d];
-																dictItemList.push({
-																	"CN_S_NAME": val,
-																	"Name": val,
-																	"label": val,
-																	"value": val
-																});
+					var data = JSON.parse(success);
+					var actionlist = data.action;
+					if (actionlist) {
+						for (var j = 0; j < actionlist.length; j++) {
+							var action = actionlist[j]
+							var action_type = action.action_type;
+							var value = action.value;
+							if (action_type == 'set_dlg_attr') {
+								if (value) {
+									var val = value;
+									if (typeof value == 'string') {
+										val = JSON.parse(value);
+									}
+									console.log(val);
+									for (var i = 0; i < val.length; i++) {
+										for (var a = 0; a < this.$data.subClassAttrList.length; a++) {
+											for (var l = 0; l < this.$data.subClassAttrList[a].Attr
+												.length; l++) {
+												var ca = this.$data.subClassAttrList[a].Attr[l];
+												if (val[i].attr == ca.Name) {
+													if (utils.classUtils.attrTypeIsDict(ca.Type)) {
+														var dictItemList = [];
+														for (var d in val[i].choice_list) {
+															var val = val[i].choice_list[d];
+															dictItemList.push({
+																"CN_S_NAME": val,
+																"Name": val,
+																"label": val,
+																"value": val
+															});
 
-															}
-															ca.dictitem = dictItemList;
-															// attr[j].dictitem = val[i].choice_list;
-														} else {
-															// ca.value = val[i].value;
 														}
+														ca.dictitem = dictItemList;
+														// attr[j].dictitem = val[i].choice_list;
+													} else {
+														// ca.value = val[i].value;
 													}
 												}
 											}
+										}
 
-											var length = 0;
-											if (!this.$data.refdatastore.filter(function(s) {
-													return val[i].attr == s.attr
-												}).length) {
-												length = 1;
-												this.$data.refdatastore.push(val[i]);
-											}
-											if (length == 0) {
-												for (var j = 0; j < this.$data.refdatastore.length; j++) {
-													if (this.$data.refdatastore[j].attr == val[i].attr) {
-														this.$data.refdatastore[j].value = val[i].value;
-													}
+										var length = 0;
+										if (!this.$data.refdatastore.filter(function(s) {
+												return val[i].attr == s.attr
+											}).length) {
+											length = 1;
+											this.$data.refdatastore.push(val[i]);
+										}
+										if (length == 0) {
+											for (var j = 0; j < this.$data.refdatastore.length; j++) {
+												if (this.$data.refdatastore[j].attr == val[i].attr) {
+													this.$data.refdatastore[j].value = val[i].value;
 												}
 											}
 										}
 									}
 								}
-								if (action_type == 'open_select_userdlg') {
-									uni.showModal({
-										title: "閿欒6.2",
-										content: "open_select_userdlg杩欎釜action_type杩樻湭澶勭悊锛�,
-										showCancel: false,
-										confirmText: "鍙栨秷"
-									});
-								}
+							}
+							if (action_type == 'open_select_userdlg') {
+								uni.showModal({
+									title: "閿欒6.2",
+									content: "open_select_userdlg杩欎釜action_type杩樻湭澶勭悊锛�,
+									showCancel: false,
+									confirmText: "鍙栨秷"
+								});
 							}
 						}
-
-					} else {
-						uni.showModal({
-							title: "閿欒6",
-							content: success.msg,
-							showCancel: false,
-							confirmText: "鍙栨秷"
-						});
 					}
+
+
 				}).catch(ex => {
 					// console.log(ex);
 					uni.showModal({
@@ -3041,198 +2949,190 @@
 					global_attr: JSON.stringify(global_attr)
 				}
 				console.log(dataInfo);
-				this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
+				dataObjRunCustomEvent(dataInfo).then(success => {
 					console.log(success);
-					if (success.code == '00000') {
-						var data = JSON.parse(success.data);
-						var actionlist = data.action;
+					var data = JSON.parse(success);
+					var actionlist = data.action;
 
-						if (actionlist) {
-							console.log(actionlist);
-							for (var ii = 0; ii < actionlist.length; ii++) {
-								var action = actionlist[ii];
-								if (action.action_type == 'set_dlg_attr') {
-									var result = action.value;
-									for (var i = 0; i < result.length; i++) {
-										if (result[i].choice_list) {
-											for (var s = 0; s < $this.$data.subPanelList.length; s++) {
-												for (var c = 0; c < $this.$data.subPanelList[s].subClassAttrList
-													.length; c++) {
-													var attr = $this.$data.subPanelList[s].subClassAttrList[c]
-														.Attr;
-													for (var j = 0; j < attr.length; j++) {
-														if (attr[j].Name == result[i].attr) {
-															if (utils.classUtils.attrTypeIsDict(attr[j].Type)) {
-																var dictItemList = [];
-																for (var d in result[i].choice_list) {
-																	var val = result[i].choice_list[d];
-																	dictItemList.push({
-																		"CN_S_NAME": val,
-																		"Name": val,
-																		"label": val,
-																		"value": val
-																	});
-																}
-																attr[j].dictitem = dictItemList;
-																// attr[j].dictitem = result[i].choice_list;
-															}
-														}
-													}
-												}
-											}
-										}
+					if (actionlist) {
+						console.log(actionlist);
+						for (var ii = 0; ii < actionlist.length; ii++) {
+							var action = actionlist[ii];
+							if (action.action_type == 'set_dlg_attr') {
+								var result = action.value;
+								for (var i = 0; i < result.length; i++) {
+									if (result[i].choice_list) {
 										for (var s = 0; s < $this.$data.subPanelList.length; s++) {
 											for (var c = 0; c < $this.$data.subPanelList[s].subClassAttrList
 												.length; c++) {
-												var attr = $this.$data.subPanelList[s].subClassAttrList[c].Attr;
+												var attr = $this.$data.subPanelList[s].subClassAttrList[c]
+													.Attr;
 												for (var j = 0; j < attr.length; j++) {
-													console.log(attr[j].Name + '==' + result[i].attr);
 													if (attr[j].Name == result[i].attr) {
-														attr[j].Value = result[i].value;
-													}
-												}
-											}
-										}
-										var length = 0;
-										if (!$this.$data.refdatastore.filter(function(s) {
-												return result[i].attr == s.attr
-											}).length) {
-											length = 1;
-											$this.$data.refdatastore.push(result[i]);
-										}
-										if (length == 0) {
-											for (var j = 0; j < $this.$data.refdatastore.length; j++) {
-												if ($this.$data.refdatastore[j].attr == result[i].attr) {
-													$this.$data.refdatastore[j].value = result[i].value;
-												}
-											}
-										}
-									}
-								} else if (action.action_type == 'set_global_attr') {
-									$this.$actiontr = action.value || [];
-								} else if (action.action_type == 'open_common_dlg') { //鎵撳紑渚ф粦寮规
-									var $this = this;
-									if (action.value.common_dlg_id == 'check_list') {
-										$this.$data.check_list = action.value.config;
-										if (action.value.config.appear_style == 'sideslip') //鍒ゆ柇鏄惁鏄晶婊�-											$this.$data.popupType = 'right';
-										else
-											$this.$data.popupType = 'center'
-										// open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦�uni-popup 缁勪欢涓婄粦瀹�type灞炴�
-										$this.$refs.popup.open($this.$data.popupType);
-									}
-								} else if (action.action_type == 'add_subcls_panel') { //涓讳粠鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�-									var result = action.value;
-									var $this = this;
-									let list_1 = JSON.parse(JSON.stringify(this.$data.subClassAttrList));
-									var scanCodeVal = $this.$data.scanCodeVal;
-									var rand = '';
-									for (var i = 0; i < 5; i++) { //鐢熸垚5浣嶉殢鏈烘暟
-										rand += Math.floor(Math.random() * 10);
-									}
-									if (info.inputParamter[0].attr) {
-										if (info.inputParamter[0].attr == "mast_input_3037") //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�-											scanCodeVal = "mast_input_3037-" + rand;
-									}
-									if (info.attr[0].attr) {
-										if (info.attr[0].attr == "mast_input_3037") //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�-											scanCodeVal = "mast_input_3037-" + rand;
-									}
-									$this.$data.subPanelList.push({
-										scanCodeVal: scanCodeVal,
-										subClassAttr: list_1
-									});
-									for (var i = 0; i < result.length; i++) {
-										for (var s = 0; s < $this.$data.subPanelList.length; s++) {
-											if ($this.$data.subPanelList[s].scanCodeVal == scanCodeVal) {
-												if (result[i].attr == "S_ID")
-													$this.$data.subPanelList[s].ObjID = result[i].value;
-												var _subClassAttr = $this.$data.subPanelList[s].subClassAttr;
-												for (var c = 0; c < _subClassAttr.length; c++) {
-													var attr = _subClassAttr[c].Attr;
-													for (var j = 0; j < attr.length; j++) {
-														// console.log(attr[j].Name+'=='+result[i].attr);
-														if (attr[j].Name == result[i].attr) {
-															attr[j].Value = result[i].value;
+														if (utils.classUtils.attrTypeIsDict(attr[j].Type)) {
+															var dictItemList = [];
+															for (var d in result[i].choice_list) {
+																var val = result[i].choice_list[d];
+																dictItemList.push({
+																	"CN_S_NAME": val,
+																	"Name": val,
+																	"label": val,
+																	"value": val
+																});
+															}
+															attr[j].dictitem = dictItemList;
+															// attr[j].dictitem = result[i].choice_list;
 														}
 													}
 												}
-
-												// $this.$data.subPanelList[s].subClassAttr=list_1;
-											}
-										}
-										var length = 0;
-										if (!$this.$data.refdatastore.filter(function(s) {
-												return result[i].attr == s.attr
-											}).length) {
-											length = 1;
-											$this.$data.refdatastore.push(result[i]);
-										}
-										if (length == 0) {
-											for (var j = 0; j < $this.$data.refdatastore.length; j++) {
-												if ($this.$data.refdatastore[j].attr == result[i].attr) {
-													$this.$data.refdatastore[j].value = result[i].value;
-												}
 											}
 										}
 									}
-								}
-
-							}
-						}
-
-						if (data.result) {
-							let list_1 = JSON.parse(JSON.stringify(this.$data.subClassAttrList));
-							var scanCodeVal = $this.$data.scanCodeVal;
-							if (info.inputParamter[0].attr == "mast_input_3037")
-								scanCodeVal = "mast_input_3037-" + ii;
-							$this.$data.subPanelList.push({
-								scanCodeVal: scanCodeVal,
-								subClassAttr: list_1
-							});
-							var result = data.result;
-							for (var i = 0; i < result.length; i++) {
-								for (var s = 0; s < $this.$data.subPanelList.length; s++) {
-									if ($this.$data.subPanelList[s].scanCodeVal == scanCodeVal) {
-										if (result[i].attr == "S_ID")
-											$this.$data.subPanelList[s].ObjID = result[i].value;
-										var _subClassAttr = $this.$data.subPanelList[s].subClassAttr;
-										for (var c = 0; c < _subClassAttr.length; c++) {
-											var attr = _subClassAttr[c].Attr;
+									for (var s = 0; s < $this.$data.subPanelList.length; s++) {
+										for (var c = 0; c < $this.$data.subPanelList[s].subClassAttrList
+											.length; c++) {
+											var attr = $this.$data.subPanelList[s].subClassAttrList[c].Attr;
 											for (var j = 0; j < attr.length; j++) {
-												// console.log(attr[j].Name+'=='+result[i].attr);
+												console.log(attr[j].Name + '==' + result[i].attr);
 												if (attr[j].Name == result[i].attr) {
 													attr[j].Value = result[i].value;
 												}
 											}
 										}
 									}
+									var length = 0;
+									if (!$this.$data.refdatastore.filter(function(s) {
+											return result[i].attr == s.attr
+										}).length) {
+										length = 1;
+										$this.$data.refdatastore.push(result[i]);
+									}
+									if (length == 0) {
+										for (var j = 0; j < $this.$data.refdatastore.length; j++) {
+											if ($this.$data.refdatastore[j].attr == result[i].attr) {
+												$this.$data.refdatastore[j].value = result[i].value;
+											}
+										}
+									}
 								}
+							} else if (action.action_type == 'set_global_attr') {
+								$this.$actiontr = action.value || [];
+							} else if (action.action_type == 'open_common_dlg') { //鎵撳紑渚ф粦寮规
+								var $this = this;
+								if (action.value.common_dlg_id == 'check_list') {
+									$this.$data.check_list = action.value.config;
+									if (action.value.config.appear_style == 'sideslip') //鍒ゆ柇鏄惁鏄晶婊�+										$this.$data.popupType = 'right';
+									else
+										$this.$data.popupType = 'center'
+									// open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦�uni-popup 缁勪欢涓婄粦瀹�type灞炴�
+									$this.$refs.popup.open($this.$data.popupType);
+								}
+							} else if (action.action_type == 'add_subcls_panel') { //涓讳粠鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+								var result = action.value;
+								var $this = this;
+								let list_1 = JSON.parse(JSON.stringify(this.$data.subClassAttrList));
+								var scanCodeVal = $this.$data.scanCodeVal;
+								var rand = '';
+								for (var i = 0; i < 5; i++) { //鐢熸垚5浣嶉殢鏈烘暟
+									rand += Math.floor(Math.random() * 10);
+								}
+								if (info.inputParamter[0].attr) {
+									if (info.inputParamter[0].attr == "mast_input_3037") //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+										scanCodeVal = "mast_input_3037-" + rand;
+								}
+								if (info.attr[0].attr) {
+									if (info.attr[0].attr == "mast_input_3037") //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+										scanCodeVal = "mast_input_3037-" + rand;
+								}
+								$this.$data.subPanelList.push({
+									scanCodeVal: scanCodeVal,
+									subClassAttr: list_1
+								});
+								for (var i = 0; i < result.length; i++) {
+									for (var s = 0; s < $this.$data.subPanelList.length; s++) {
+										if ($this.$data.subPanelList[s].scanCodeVal == scanCodeVal) {
+											if (result[i].attr == "S_ID")
+												$this.$data.subPanelList[s].ObjID = result[i].value;
+											var _subClassAttr = $this.$data.subPanelList[s].subClassAttr;
+											for (var c = 0; c < _subClassAttr.length; c++) {
+												var attr = _subClassAttr[c].Attr;
+												for (var j = 0; j < attr.length; j++) {
+													// console.log(attr[j].Name+'=='+result[i].attr);
+													if (attr[j].Name == result[i].attr) {
+														attr[j].Value = result[i].value;
+													}
+												}
+											}
 
-								var length = 0;
-								if (!$this.$data.refdatastore.filter(function(s) {
-										return result[i].attr == s.attr
-									}).length) {
-									length = 1;
-									$this.$data.refdatastore.push(result[i]);
-								}
-								if (length == 0) {
-									for (var j = 0; j < $this.$data.refdatastore.length; j++) {
-										if ($this.$data.refdatastore[j].attr == result[i].attr) {
-											$this.$data.refdatastore[j].value = result[i].value;
+											// $this.$data.subPanelList[s].subClassAttr=list_1;
+										}
+									}
+									var length = 0;
+									if (!$this.$data.refdatastore.filter(function(s) {
+											return result[i].attr == s.attr
+										}).length) {
+										length = 1;
+										$this.$data.refdatastore.push(result[i]);
+									}
+									if (length == 0) {
+										for (var j = 0; j < $this.$data.refdatastore.length; j++) {
+											if ($this.$data.refdatastore[j].attr == result[i].attr) {
+												$this.$data.refdatastore[j].value = result[i].value;
+											}
 										}
 									}
 								}
 							}
+
 						}
-					} else {
-						uni.showModal({
-							title: "閿欒7",
-							content: success.msg,
-							showCancel: false,
-							confirmText: "鍙栨秷"
-						});
 					}
+
+					if (data.result) {
+						let list_1 = JSON.parse(JSON.stringify(this.$data.subClassAttrList));
+						var scanCodeVal = $this.$data.scanCodeVal;
+						if (info.inputParamter[0].attr == "mast_input_3037")
+							scanCodeVal = "mast_input_3037-" + ii;
+						$this.$data.subPanelList.push({
+							scanCodeVal: scanCodeVal,
+							subClassAttr: list_1
+						});
+						var result = data.result;
+						for (var i = 0; i < result.length; i++) {
+							for (var s = 0; s < $this.$data.subPanelList.length; s++) {
+								if ($this.$data.subPanelList[s].scanCodeVal == scanCodeVal) {
+									if (result[i].attr == "S_ID")
+										$this.$data.subPanelList[s].ObjID = result[i].value;
+									var _subClassAttr = $this.$data.subPanelList[s].subClassAttr;
+									for (var c = 0; c < _subClassAttr.length; c++) {
+										var attr = _subClassAttr[c].Attr;
+										for (var j = 0; j < attr.length; j++) {
+											// console.log(attr[j].Name+'=='+result[i].attr);
+											if (attr[j].Name == result[i].attr) {
+												attr[j].Value = result[i].value;
+											}
+										}
+									}
+								}
+							}
+
+							var length = 0;
+							if (!$this.$data.refdatastore.filter(function(s) {
+									return result[i].attr == s.attr
+								}).length) {
+								length = 1;
+								$this.$data.refdatastore.push(result[i]);
+							}
+							if (length == 0) {
+								for (var j = 0; j < $this.$data.refdatastore.length; j++) {
+									if ($this.$data.refdatastore[j].attr == result[i].attr) {
+										$this.$data.refdatastore[j].value = result[i].value;
+									}
+								}
+							}
+						}
+					}
+
 				}).catch(ex => {
 					// console.log(ex);
 					uni.showModal({
@@ -3368,29 +3268,21 @@
 				}
 				// console.log(JSON.stringify(dataInfo));
 				console.log(dataInfo);
-				this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
+				dataObjRunCustomEvent(dataInfo).then(success => {
 					console.log(success);
 					uni.hideLoading();
-					if (success.code == '00000') {
-						var data = JSON.parse(success.data);
-						var result = data.result;
-						if (eventID != $this.$data.param.After_OK_Event.ID)
-							$this.scan_OKDataObjRunCustomEvent($this.$data.param.After_OK_Event.ID);
-						else {
-							//鍒锋柊
-							uni.redirectTo({
-								url: '../modal/ms_classAttr?param=' + JSON.stringify($this.$data.param) +
-									"&titlename=" + $this.$data.title
-							});
-						}
-					} else {
-						uni.showModal({
-							title: "閿欒8",
-							content: success.msg,
-							showCancel: false,
-							confirmText: "鍙栨秷"
-						});
-					}
+					var data = JSON.parse(success);
+					var result = data.result;
+					if (eventID != $this.$data.param.After_OK_Event.ID)
+						$this.scan_OKDataObjRunCustomEvent($this.$data.param.After_OK_Event.ID);
+					// else {
+					// 	//鍒锋柊
+					// 	uni.redirectTo({
+					// 		url: '../modal/ms_classAttr?param=' + JSON.stringify($this.$data.param) +
+					// 			"&titlename=" + $this.$data.title
+					// 	});
+					// }
+
 				}).catch(ex => {
 					// console.log(ex);
 					uni.hideLoading();
@@ -3526,29 +3418,21 @@
 				}
 				// console.log(JSON.stringify(dataInfo));
 				console.log(dataInfo);
-				this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
+				dataObjRunCustomEvent(dataInfo).then(success => {
 					console.log(success);
 					uni.hideLoading();
-					if (success.code == '00000') {
-						var data = JSON.parse(success.data);
-						var result = data.result;
-						if (eventID != $this.$data.param.After_Trigger_Event.ID)
-							$this.scan_TriggerDataObjRunCustomEvent($this.$data.param.After_Trigger_Event.ID);
-						else {
-							//鍒锋柊
-							uni.redirectTo({
-								url: '../modal/ms_classAttr?param=' + JSON.stringify($this.$data.param) +
-									"&titlename=" + $this.$data.title
-							});
-						}
-					} else {
-						uni.showModal({
-							title: "閿欒8",
-							content: success.msg,
-							showCancel: false,
-							confirmText: "鍙栨秷"
-						});
-					}
+					var data = JSON.parse(success);
+					var result = data.result;
+					if (eventID != $this.$data.param.After_Trigger_Event.ID)
+						$this.scan_TriggerDataObjRunCustomEvent($this.$data.param.After_Trigger_Event.ID);
+					// else {
+					// 	//鍒锋柊
+					// 	uni.redirectTo({
+					// 		url: '../modal/ms_classAttr?param=' + JSON.stringify($this.$data.param) +
+					// 			"&titlename=" + $this.$data.title
+					// 	});
+					// }
+
 				}).catch(ex => {
 					// console.log(ex);
 					uni.hideLoading();

--
Gitblit v1.9.1