From 733cfa21c16c019c0337f948ac884ca4961ea2ad Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期二, 04 三月 2025 17:01:42 +0800
Subject: [PATCH] test

---
 pages/modal/ms_classAttr.vue | 1787 ++++++++++++++++++++++++++++++-----------------------------
 1 files changed, 912 insertions(+), 875 deletions(-)

diff --git a/pages/modal/ms_classAttr.vue b/pages/modal/ms_classAttr.vue
index add9dce..ce3a18b 100644
--- a/pages/modal/ms_classAttr.vue
+++ b/pages/modal/ms_classAttr.vue
@@ -30,16 +30,21 @@
 							<image class="divX" src="../../images/msg_50_new.png"></image>-->
 							<input
 								:type="attr.Type=='鏁存暟' || attr.Type=='娴偣鏁� || attr.Type=='int' || attr.Type=='float'?'number':'text'"
-								:value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'"
-								:data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}"
-								:disabled="attr.edit?false:true">
+								:value="attr.Value" :focus="focusField ==`${index}-${iindex}`" @focus="ontap"
+								@click="onClick(index,iindex)" @blur="onevent"
+								v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex"
+								:style="{'width':attr.Width}" :disabled="attr.edit?false:true">
 							<!-- =='flase'?true:false -->
-							<textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'"
-								:data-index="index" :data-iindex="iindex" style="height:60px;"
-								:style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea>
-							<textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'"
-								:data-index="index" :data-iindex="iindex" style="height:90px;"
-								:style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea>
+							<textarea :value="attr.Value" :focus="focusField == `${index}-${iindex}`" @focus="ontap"
+								@click="onClick(index,iindex)"  @blur="onevent"
+								v-else-if="attr.Height=='2'" :data-index="index" :data-iindex="iindex"
+								style="height:60px;" :style="{'width':attr.Width}"
+								:disabled="attr.edit?false:true"></textarea>
+							<textarea :value="attr.Value" :focus="focusField == `${index}-${iindex}`" @focus="ontap"
+								@click="onClick(index,iindex)" @blur="onevent"
+								v-else-if="attr.Height=='3'" :data-index="index" :data-iindex="iindex"
+								style="height:90px;" :style="{'width':attr.Width}"
+								:disabled="attr.edit?false:true"></textarea>
 							<!-- </div> -->
 						</view>
 						<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
@@ -51,16 +56,19 @@
 								<image class="divX" src="../../images/msg_50_new.png"></image> -->
 							<input
 								:type="attr.Type=='鏁存暟' || attr.Type=='娴偣鏁� || attr.Type=='int' || attr.Type=='float' ?'number':'text'"
-								class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent"
-								v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex"
+								class="attr_field" :value="attr.Value" :focus="focusField ==`${index}-${iindex}`"
+								@focus="ontap" @blur="onevent" @click="onClick(index,iindex)" v-if="attr.Height=='1'"
+								:data-index="index" :data-iindex="iindex"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}"
 								:disabled="attr.edit?false:true">
-							<textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent"
+							<textarea class="attr_field" :value="attr.Value" :focus="focusField == `${index}-${iindex}`"
+								@focus="ontap" @blur="onevent" @click="onClick(index,iindex)"
 								v-else-if="attr.Height=='2'" :data-index="index" :data-iindex="iindex"
 								style="height:60px;"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}"
 								:disabled="attr.edit?false:true"></textarea>
-							<textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent"
+							<textarea class="attr_field" :value="attr.Value" :focus="focusField == `${index}-${iindex}`"
+								@focus="ontap" @blur="onevent" @click="onClick(index,iindex)"
 								v-else-if="attr.Height=='3'" :data-index="index" :data-iindex="iindex"
 								style="height:90px;"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}"
@@ -161,7 +169,7 @@
 								<a class="class_attr_add_ref"><i class="ace-icon fa fa-plus-circle"></i></a>
 							</div>
 							<input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}"
-								disabled="true">
+								disabled="true" :maxlength="-1">
 						</view>
 						<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
 							<p class="tx_title2"
@@ -170,7 +178,7 @@
 							</p>
 							<input type="text" class="attr_field" :data-index="index" :data-iindex="iindex"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}"
-								disabled="true">
+								disabled="true" :maxlength="-1">
 							<div class="text-right2" v-if="attr.Type=='寮曠敤瀵硅薄(鍗曚釜)'|| attr.Type=='obj-ref'">
 								<a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]"
 									:data-classname="attr.RelCls.split('|')[1]"><i
@@ -195,7 +203,8 @@
 								<a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i
 										class="ace-icon fa fa-plus-circle"></i></a>
 							</div>
-							<input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true">
+							<input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true"
+								:maxlength="-1">
 						</view>
 						<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
 							<p class="tx_title2"
@@ -204,7 +213,7 @@
 							</p>
 							<input type="text" class="attr_field" :value="attr.Value"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}"
-								disabled="true">
+								disabled="true" :maxlength="-1">
 							<div class="text-right2">
 								<a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i
 										class="ace-icon fa fa-plus-circle"></i></a>
@@ -221,7 +230,8 @@
 								<a href="#" class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i
 										class="ace-icon fa fa-plus-circle"></i></a>
 							</div>
-							<input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true">
+							<input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true"
+								:maxlength="-1">
 						</view>
 						<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
 							<p class="tx_title2"
@@ -230,7 +240,7 @@
 							</p>
 							<input type="text" class="attr_field" :value="attr.Value"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true ?10:5) - 9 +'%'}"
-								disabled="true">
+								disabled="true" :maxlength="-1">
 							<div class="text-right2">
 								<a class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i
 										class="ace-icon fa fa-plus-circle"></i></a>
@@ -244,7 +254,7 @@
 								:style="{'font-family':classattr.Font.Name?classattr.Font.Name:'initial','font-size':classattr.Font.Size?classattr.Font.Size:'initial','font-weight':classattr.Font.Bold?'bold':'initial','font-style':classattr.Font.Tilt?'italic':'initial','text-decoration':classattr.Font.Underline?'underline':'initial','background-color':classattr.Font.Bk_Color,'color':classattr.Font.Text_Color,'width':classattr.title_p_wdith+'%'}"><i
 									class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text>
 							<input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}"
-								:disabled="attr.edit?false:true">
+								:disabled="attr.edit?false:true" :maxlength="-1">
 						</view>
 						<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
 							<p class="tx_title2"
@@ -253,7 +263,7 @@
 							</p>
 							<input type="text" class="attr_field" :data-index="index" :data-iindex="iindex"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true ?10:5) +'%'}"
-								:disabled="attr.edit?false:true">
+								:disabled="attr.edit?false:true" :maxlength="-1">
 							<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
 						</view>
 					</view>
@@ -292,7 +302,8 @@
 					<!-- 宸﹀彸甯冨眬 -->
 					<p class="tx_title2">{{param.Scan_Code.Name}}:</p>
 					<input type="text" class="attr_field" :value="scanCodeVal" @focus="scan_ontap" @blur="scan_onevent"
-						:style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-14)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-5)+'%;'">
+						:style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-14)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-5)+'%;'"
+						:maxlength="-1">
 					<div class="text-right2" v-if="param.Scan_Code.Have_Select_Button==true">
 						<a @tap="scan_classAttr_extButton()"><i class="ace-icon fa"
 								:class="param.Scan_Code.Img?param.Scan_Code.Img:'fa-plus-circle'"></i></a>
@@ -645,7 +656,15 @@
 
 <script>
 	import pickerAddress from '../../js/pickerAddress/pickerAddress.vue'
-	import classUtils from "@/js/utils.js"
+	import utils from "@/js/utils.js"
+	import {
+		classAttrList,
+		classGridStyleInfo,
+		dataObjAdd,
+		dataObjDelele,
+		dataObjRunCustomEvent
+	} from "@/api/index.js"
+
 	export default {
 		components: {
 			pickerAddress
@@ -654,6 +673,8 @@
 			return {
 				title: '鏂板',
 				param: {},
+				focusField: "",
+				focusOldField: "",
 				classAttrList: [],
 				classGridStyle: [],
 				edit_inital_event: "", //寮圭獥鍒濆鍖栦簨浠禝D
@@ -670,6 +691,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 +731,57 @@
 			//     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) {
+					console.log(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;
@@ -830,7 +838,7 @@
 						for (var j = 0; j < attr.length; j++) {
 							var ar = attr[j];
 							if (ar.Value == '璇烽�鎷� || ar.Value == '鈥斺�璇烽�鎷┾�鈥�) ar.Value = '';
-							if (classUtils.attrTypeIsDict(ar.Type)) {
+							if (utils.classUtils.attrTypeIsDict(ar.Type)) {
 								if (ar.select == true) { //鍒ゆ柇涓嬫媺鏄惁澶氶�
 									var valStr = "";
 									for (var v in ar.Value) {
@@ -1039,25 +1047,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,83 +1069,69 @@
 					});
 				}
 			},
-			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) || []
+					console.log("classAttrGetList", result)
+					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: "閿欒1.1",
+						content: tip,
+						showCancel: false,
+						confirmText: "鍙栨秷"
+					});
+					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.StyleDef = JSON.parse(result.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: "閿欒1.2",
+						content: tip,
+						showCancel: false,
+						confirmText: "鍙栨秷"
+					});
+					return {}
+				};
+			},
+
+			onClick(index, iindex) {
+				this.focusField = `${index}-${iindex}`
+					console.log("onClick", this.focusField)
+			},
+		
 			ontap(e) { //鎵爜鍔熻兘
 				//console.log(e.target)
+				this.focusOldField = `${e.target.dataset['index']}-${e.target.dataset['iindex']}`
 				getApp().onScan((result) => {
 					//console.log(result.decodedata);
 					var isVal = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[
@@ -1158,7 +1143,8 @@
 					// }
 					//涓绘暟鎹被鎵爜鏌ヨ鏁版嵁
 					if (isVal != result.decodedata) {
-						this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]
+						this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[
+								'iindex']]
 							.Value = result.decodedata;
 						uni.hideKeyboard();
 						//瀛愭暟鎹被鎵爜鍖轰簨浠惰剼鏈�@@ -1193,18 +1179,93 @@
 
 							this.scan_DataObjRunCustomEvent(info, "");
 						}
+						if (result.decodedata) { //绗竴涓緭鍏ユ涓嶄负绌�+							//鍒濆鍖栵紝涓嬩釜杈撳叆妗唂ocus灞炴�
+							const attrs = this.$data.classAttrList[e.target.dataset['index']].Attr || []
+							var findd = false
+							for (let i = e.target.dataset['iindex'] + 1; i < attrs.length; i++) {
+								const ele = attrs[i]
+
+								if (ele.hidden != true) {
+									if (utils.classUtils.attrTypeIsString(ele.Type) || utils.classUtils
+											.attrTypeIsInt(ele.Type)) {
+										const field = `${e.target.dataset['index']}-${i}`
+										if (this
+											.focusOldField ==
+											field) {
+											this.setData({
+												focusField: ""
+											})
+										} else {
+											this.setData({
+												focusField: this
+													.focusOldField
+											})
+										}
+										this.$nextTick(() => {
+											this.setData({
+												focusField: field
+											})
+										});
+										findd = true
+										break
+									}
+								}
+
+
+							}
+							if (findd) {
+								return
+							}
+							for (let i = e.target.dataset['index'] + 1; i < this.classAttrList.length; i++) {
+								const attrs2 = this.classAttrList[i].Attr || []
+								for (let ii in attrs2) {
+									const ele = attrs2[ii]
+									if (ele.hidden != true) {
+										if (utils.classUtils.attrTypeIsString(ele.Type) || utils.classUtils
+											.attrTypeIsInt(ele.Type)) {
+											const field = `${i}-${ii}`
+											if (this
+												.focusOldField ==
+												field) {
+												this.setData({
+													focusField: ""
+												})
+											} else {
+												this.setData({
+													focusField: this
+														.focusOldField
+												})
+											}
+											this.$nextTick(() => {
+												this.setData({
+													focusField: field
+												})
+											});
+											break
+										}
+									}
+								}
+								if (findd) {
+									break
+								}
+							}
+						}
 					}
+
 				})
 			},
 			subontap(e) { //鎵爜鍔熻兘
 				//console.log(e.target)
 				getApp().onScan((result) => {
 					//console.log(result.decodedata);
-					var isVal = this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset[
-						'iindex']].Value;
+					var isVal = this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target
+						.dataset[
+							'iindex']].Value;
 					//涓绘暟鎹被鎵爜鏌ヨ鏁版嵁
 					if (isVal != result.decodedata) {
-						this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]
+						this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset[
+								'iindex']]
 							.Value = result.decodedata;
 						uni.hideKeyboard();
 						//瀛愭暟鎹被鎵爜鍖轰簨浠惰剼鏈�@@ -1356,39 +1417,50 @@
 			},
 			onarrow(index, open) {
 				// console.log(index+'--'+open);
-				var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Open;
+				var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[
+					'iindex']].Open;
 				if (!data_attr) {
-					this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e
-						.target.dataset['iindex']].Value = open == true ? false : true;
+					this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']]
+						.Attr[e
+							.target.dataset['iindex']].Value = open == true ? false : true;
 					return;
 				}
-				this.$data.classAttrList[e.target.dataset['iiindex']].subClassAttr[index].Open = open == true ? false :
+				this.$data.classAttrList[e.target.dataset['iiindex']].subClassAttr[index].Open = open == true ?
+					false :
 					true;
 			},
 			ondateTime(e) {
 				//console.log(e.target)
-				var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value;
+				var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[
+					'iindex']].Value;
 				if (!data_attr) {
-					this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e
-						.target.dataset['iindex']].Value = e.target.value;
+					this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']]
+						.Attr[e
+							.target.dataset['iindex']].Value = e.target.value;
 					return;
 				}
-				this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e.target
+				this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e
+					.target
 					.value;
 
 			},
 			onchange(e) {
 				console.log(e.target);
-				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']];
+				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
+					this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value =
+						value
 						.Name;
-					console.log(this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]
+					console.log(this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[
+							'iindex']]
 						.Value);
-					var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]
+					var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[
+							'iindex']]
 						.action;
 					if (eventid) {
 						// self.event_no_sub = 1;
@@ -1458,7 +1530,7 @@
 								var attr = attrlist[i].Attr;
 								for (var j = 0; j < attr.length; j++) {
 									var ar = attr[j];
-									if (classUtils.attrTypeIsDict(ar.Type))
+									if (utils.classUtils.attrTypeIsDict(ar.Type))
 										req.push({
 											attr: ar.Name,
 											value: itemvalue.Name
@@ -1487,18 +1559,21 @@
 			},
 			sub_onchange(e) {
 				console.log(e.target);
-				var value = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']]
+				var value = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[
+						'index']]
 					.Attr[e.target.dataset['iindex']].dictitem[e.target.value];
 				var data_attr = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[
 					'index']].Attr[e.target.dataset['iindex']];
 				console.log(data_attr);
 				if (value.Name != data_attr.Value) {
-					this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e
-						.target.dataset['iindex']].Value = value.Name;
+					this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']]
+						.Attr[e
+							.target.dataset['iindex']].Value = value.Name;
 					console.log(this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[
 						'index']].Attr[e.target.dataset['iindex']].Value);
-					var eventid = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[
-						'index']].Attr[e.target.dataset['iindex']].action;
+					var eventid = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target
+						.dataset[
+							'index']].Attr[e.target.dataset['iindex']].action;
 					if (eventid) {
 						// self.event_no_sub = 1;
 						var req = [];
@@ -1573,7 +1648,7 @@
 								var attr = attrlist[i].Attr;
 								for (var j = 0; j < attr.length; j++) {
 									var ar = attr[j];
-									if (classUtils.attrTypeIsDict(ar.Type))
+									if (utils.classUtils.attrTypeIsDict(ar.Type))
 										req.push({
 											attr: ar.Name,
 											value: itemvalue.Name
@@ -1602,15 +1677,18 @@
 			},
 			onevent(e) {
 				// console.log(e.target);
-				var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']];
+				var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[
+					'iindex']];
 				if (!data_attr) {
-					this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e
-						.target.dataset['iindex']].Value = e.target.value;
+					this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']]
+						.Attr[e
+							.target.dataset['iindex']].Value = e.target.value;
 					return;
 				}
 				// console.log(data_attr);
 				if (e.target.value != data_attr.Value) {
-					this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e.target
+					this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e
+						.target
 						.value;
 					// var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action;
 					//瀛愭暟鎹被鎵爜鍖轰簨浠惰剼鏈�@@ -1651,16 +1729,20 @@
 			oncheck(e) {
 				// console.log(e.target);
 				var ischecked = e.target.dataset.ischeck ? false : true;
-				var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']];
+				var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[
+					'iindex']];
 				if (!data_attr) {
-					this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e
-						.target.dataset['iindex']].Value = ischecked;
+					this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']]
+						.Attr[e
+							.target.dataset['iindex']].Value = ischecked;
 					return;
 				}
 				// console.log(data_attr);
 				if (ischecked != data_attr.Value) {
-					this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = ischecked;
-					var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]
+					this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value =
+						ischecked;
+					var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[
+							'iindex']]
 						.action;
 					if (eventid) {
 						// self.event_no_sub = 1;
@@ -1698,7 +1780,8 @@
 			addresschange(e) {
 				// console.log(e.target);
 				console.log(e.data.join(';'))
-				this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e.data
+				this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e
+					.data
 					.join(';');
 			},
 			classAttr_extButton(index, iindex) {
@@ -1739,7 +1822,8 @@
 							// console.log(param);
 							console.log(data);
 							$this.$data.classAttrList[param.index].Attr[param.iindex].Value = data[0].Name;
-							$this.$data.classAttrList[param.index].Attr[param.iindex].ValID = data[0].Login + ';' +
+							$this.$data.classAttrList[param.index].Attr[param.iindex].ValID = data[0]
+								.Login + ';' +
 								data[0].Name;
 
 							var eventid = $this.$data.classAttrList[param.index].Attr[param.iindex].action;
@@ -1790,7 +1874,8 @@
 							// console.log(param);
 							// console.log(data);
 							$this.$data.classAttrList[param.index].Attr[param.iindex].Value = data[0].Name;
-							$this.$data.classAttrList[param.index].Attr[param.iindex].ValID = data[0].ID + ';' +
+							$this.$data.classAttrList[param.index].Attr[param.iindex].ValID = data[0].ID +
+								';' +
 								data[0].Name;
 
 							var eventid = $this.$data.classAttrList[param.index].Attr[param.iindex].action;
@@ -1849,7 +1934,7 @@
 					for (var j = 0; j < attr.length; j++) {
 						var ar = attr[j];
 						if (ar.Value == '璇烽�鎷� || ar.Value == '鈥斺�璇烽�鎷┾�鈥�) ar.Value = '';
-						if (classUtils.attrTypeIsDict(ar.Type)) {
+						if (utils.classUtils.attrTypeIsDict(ar.Type)) {
 							if (ar.select == true) { //鍒ゆ柇涓嬫媺鏄惁澶氶�
 								var valStr = "";
 								for (var v in ar.Value) {
@@ -1913,35 +1998,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();
@@ -1954,21 +2031,25 @@
 				});
 			},
 			class_attr_init() {
-				var attrlist = this.$data.classGridStyle.StyleDef.show_style
+				const attrlist = this.$data.classGridStyle.StyleDef?.show_style || []
 				var newattrlist = [];
+
 				if (this.$data.classAttrList.length > 0) {
 					for (var i = 0; i < attrlist.length; i++) {
 						var open = attrlist[i].open;
 						var name = attrlist[i].attrgroup_name;
 						var attrs = attrlist[i].attrs;
+		
 						for (var s = 0; s < this.$data.classAttrList.length; s++) {
 							var clsattr = this.$data.classAttrList[s];
+			
 							if (name == clsattr.Name) {
 								var attr = [];
 								for (var j = 0; j < attrs.length; j++) {
 									for (var l = 0; l < clsattr.Attr.length; l++) {
 										var ca = clsattr.Attr[l];
 										if (attrs[j].attr == ca.Name) {
+
 											ca.action = attrs[j].action;
 											ca.edit = attrs[j].edit;
 											ca.notempty = attrs[j].notempty;
@@ -1980,6 +2061,7 @@
 											ca.hidden = attrs[j].hidden;
 											ca.select = attrs[j].select == undefined ? false : attrs[j].select;
 											ca.Value = "";
+
 											if (ca.dictitem) {
 												if (ca.select == true)
 													ca.Value = []; //ca.dictitem[0].CN_S_NAME;
@@ -1994,17 +2076,20 @@
 														ca.Value = ca.dictitem[d].CN_S_NAME;
 												}
 											}
-											if (classUtils.attrTypeIsDate(ca)) {
+
+											if (utils.classUtils.attrTypeIsDateTime(ca.Type)) {
 												var nowDate = new Date();
 												var date = {
 													year: nowDate.getFullYear(),
 													month: nowDate.getMonth() + 1,
 													day: nowDate.getDate()
 												}
-												ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + date
-													.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day);
+												ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' +
+													date
+													.month) + '-' + (date.day >= 10 ? date.day : '0' + date
+													.day);
 											}
-											if (classUtils.attrTypeIsObjRefMulti(ca)) {
+											if (utils.classUtils.attrTypeIsObjRefMulti(ca.Type)) {
 												var relClsList = [];
 												var attr_rescls = ca.RelCls.split(',');
 												for (var ii in attr_rescls) {
@@ -2017,15 +2102,28 @@
 												ca.RelClsList = relClsList;
 												ca.Value = '璇�;
 											}
-											if (classUtils.attrTypeIsRegion(ca))
-												ca.Value = '璇烽�鎷�;
-											if (classUtils.attrTypeIsBool(ca))
-												ca.Value = false;
 
+											if (utils.classUtils.attrTypeIsRegion(ca.Type))
+												ca.Value = '璇烽�鎷�;
+											if (utils.classUtils.attrTypeIsBool(ca.Type))
+												ca.Value = false;
+											if (ca.hidden != true) {
+												if (utils.classUtils.attrTypeIsString(ca.Type) || utils.classUtils
+													.attrTypeIsInt(ca.Type) || utils.classUtils.attrTypeIsFloat(ca
+														.Type)) {
+													if (this.focusField == "") {
+														this.setData({
+															focusField: `${newattrlist.length}-${attr.length}`
+														})
+													}
+												}
+											}
 											attr.push(ca);
+
 										}
 									}
 								}
+					
 								newattrlist.push({
 									BkColor: clsattr.BkColor,
 									HasAce: clsattr.HasAce,
@@ -2036,7 +2134,8 @@
 									Attr: attr,
 									control_style: this.$data.classGridStyle.StyleDef.control_style,
 									title_p_wdith: this.$data.classGridStyle.StyleDef.title_p_wdith,
-									Font: this.$data.classGridStyle.StyleDef.Font ? this.$data.classGridStyle
+									Font: this.$data.classGridStyle.StyleDef.Font ? this.$data
+										.classGridStyle
 										.StyleDef.Font : {},
 									Bk_Color: this.$data.classGridStyle.StyleDef.Bk_Color ? this.$data
 										.classGridStyle.StyleDef.Bk_Color : '#FFFFFF',
@@ -2044,30 +2143,24 @@
 										.classGridStyle.StyleDef.Text_Color : '#000000'
 								})
 							}
+
 						}
 					}
 					if (newattrlist.length > 0) {
 						this.$data.classAttrList = newattrlist;
 					}
 					var req = [];
-					if (this.$data.classGridStyle.StyleDef) {
-						if (this.$data.classGridStyle.StyleDef.show_style.length > 0) {
-							var attrlist = this.$data.classGridStyle.StyleDef.show_style
-							// $el.find('.attr_field').prop('readonly', true);
-							// $el.find('.attr_field').prop('disabled', true);
-							for (var i = 0; i < attrlist.length; i++) {
-								var attr = attrlist[i].attrs
-								for (var j = 0; j < attr.length; j++) {
-									var ar = attr[j];
-									req.push({
-										attr: ar.attr,
-										value: ar.value ? ar.value : ''
-									});
-								}
-							}
+
+					for (var i = 0; i < attrlist.length; i++) {
+						var attr = attrlist[i].attrs
+						for (var j = 0; j < attr.length; j++) {
+							var ar = attr[j];
+							req.push({
+								attr: ar.attr,
+								value: ar.value ? ar.value : ''
+							});
 						}
 					}
-
 					var eventlist = this.$data.classGridStyle.StyleDef.event;
 					if (eventlist) {
 						if (eventlist.length > 0) {
@@ -2099,8 +2192,8 @@
 						}
 						this.ini_DataObjRunCustomEvent(info);
 					}
-					console.log(this.$data.classGridStyle);
-					console.log(this.$data.classAttrList);
+					// console.log(this.$data.classGridStyle);
+					// console.log(this.$data.classAttrList);
 
 				} else {
 					uni.showModal({
@@ -2112,7 +2205,7 @@
 				}
 			},
 			subClass_attr_init() {
-				var attrlist = this.$data.subClassGridStyle.StyleDef.show_style
+				var attrlist = this.$data.subClassGridStyle.StyleDef.show_style || []
 				var newattrlist = [];
 				if (this.$data.subClassAttrList.length > 0) {
 					for (var i = 0; i < attrlist.length; i++) {
@@ -2152,17 +2245,19 @@
 														ca.Value = ca.dictitem[d].CN_S_NAME;
 												}
 											}
-											if (classUtils.attrTypeIsDate(ca)) {
+											if (utils.classUtils.attrTypeIsDateTime(ca.Type)) {
 												var nowDate = new Date();
 												var date = {
 													year: nowDate.getFullYear(),
 													month: nowDate.getMonth() + 1,
 													day: nowDate.getDate()
 												}
-												ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + date
-													.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day);
+												ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' +
+													date
+													.month) + '-' + (date.day >= 10 ? date.day : '0' + date
+													.day);
 											}
-											if (classUtils.attrTypeIsObjRefMulti(ca)) {
+											if (utils.classUtils.attrTypeIsObjRefMulti(ca.Type)) {
 												var relClsList = [];
 												var attr_rescls = ca.RelCls.split(',');
 												for (var ii in attr_rescls) {
@@ -2175,9 +2270,9 @@
 												ca.RelClsList = relClsList;
 												ca.Value = '璇�;
 											}
-											if (classUtils.attrTypeIsRegion(ca))
+											if (utils.classUtils.attrTypeIsRegion(ca.Type))
 												ca.Value = '璇烽�鎷�;
-											if (classUtils.attrTypeIsBool(ca))
+											if (utils.classUtils.attrTypeIsBool(ca.Type))
 												ca.Value = false;
 
 											attr.push(ca);
@@ -2194,11 +2289,13 @@
 									Attr: attr,
 									control_style: this.$data.subClassGridStyle.StyleDef.control_style,
 									title_p_wdith: this.$data.subClassGridStyle.StyleDef.title_p_wdith,
-									Font: this.$data.subClassGridStyle.StyleDef.Font ? this.$data.subClassGridStyle
+									Font: this.$data.subClassGridStyle.StyleDef.Font ? this.$data
+										.subClassGridStyle
 										.StyleDef.Font : {},
 									Bk_Color: this.$data.subClassGridStyle.StyleDef.Bk_Color ? this.$data
 										.subClassGridStyle.StyleDef.Bk_Color : '#FFFFFF',
-									Text_Color: this.$data.subClassGridStyle.StyleDef.Text_Color ? this.$data
+									Text_Color: this.$data.subClassGridStyle.StyleDef.Text_Color ? this
+										.$data
 										.subClassGridStyle.StyleDef.Text_Color : '#000000'
 								})
 							}
@@ -2208,24 +2305,21 @@
 						this.$data.subClassAttrList = newattrlist;
 					}
 					var req = [];
-					if (this.$data.subClassGridStyle.StyleDef) {
-						if (this.$data.subClassGridStyle.StyleDef.show_style.length > 0) {
-							var attrlist = this.$data.subClassGridStyle.StyleDef.show_style
-							// $el.find('.attr_field').prop('readonly', true);
-							// $el.find('.attr_field').prop('disabled', true);
-							for (var i = 0; i < attrlist.length; i++) {
-								var attr = attrlist[i].attrs
-								for (var j = 0; j < attr.length; j++) {
-									var ar = attr[j];
-									req.push({
-										attr: ar.attr,
-										value: ar.value ? ar.value : ''
-									});
-								}
+					if (attrlist.length > 0) {
+
+						// $el.find('.attr_field').prop('readonly', true);
+						// $el.find('.attr_field').prop('disabled', true);
+						for (var i = 0; i < attrlist.length; i++) {
+							var attr = attrlist[i].attrs
+							for (var j = 0; j < attr.length; j++) {
+								var ar = attr[j];
+								req.push({
+									attr: ar.attr,
+									value: ar.value ? ar.value : ''
+								});
 							}
 						}
 					}
-
 					var eventlist = this.$data.subClassGridStyle.StyleDef.event;
 					if (eventlist) {
 						if (eventlist.length > 0) {
@@ -2303,85 +2397,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 (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: "鍙栨秷"
-									});
-								}
+							} else 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({
@@ -2434,108 +2519,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 (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({
@@ -2609,38 +2686,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({
@@ -2714,149 +2783,147 @@
 					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({
@@ -2901,86 +2968,77 @@
 					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 (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: "鍙栨秷"
-									});
-								}
+							} else 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({
@@ -3033,198 +3091,193 @@
 					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 (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
+											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({
@@ -3249,7 +3302,7 @@
 						var ar = attr[j];
 						if (ar.Value == '璇烽�鎷� || ar.Value == '鈥斺�璇烽�鎷┾�鈥�) ar.Value = '';
 
-						if (classUtils.attrTypeIsDict(ar.Type)) {
+						if (utils.classUtils.attrTypeIsDict(ar.Type)) {
 							if (ar.select == true) { //鍒ゆ柇涓嬫媺鏄惁澶氶�
 								var valStr = "";
 								for (var v in ar.Value) {
@@ -3293,7 +3346,7 @@
 							var ar = attr[j];
 							if (ar.Value == '璇烽�鎷� || ar.Value == '鈥斺�璇烽�鎷┾�鈥�) ar.Value = '';
 
-							if (classUtils.attrTypeIsDict(ar.Type)) {
+							if (utils.classUtils.attrTypeIsDict(ar.Type)) {
 								if (ar.select == true) { //鍒ゆ柇涓嬫媺鏄惁澶氶�
 									var valStr = "";
 									for (var v in ar.Value) {
@@ -3360,29 +3413,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();
@@ -3407,7 +3452,7 @@
 					for (var j = 0; j < attr.length; j++) {
 						var ar = attr[j];
 						if (ar.Value == '璇烽�鎷� || ar.Value == '鈥斺�璇烽�鎷┾�鈥�) ar.Value = '';
-						if (classUtils.attrTypeIsDict(ar.Type)) {
+						if (utils.classUtils.attrTypeIsDict(ar.Type)) {
 							if (ar.select == true) { //鍒ゆ柇涓嬫媺鏄惁澶氶�
 								var valStr = "";
 								for (var v in ar.Value) {
@@ -3450,7 +3495,7 @@
 						for (var j = 0; j < attr.length; j++) {
 							var ar = attr[j];
 							if (ar.Value == '璇烽�鎷� || ar.Value == '鈥斺�璇烽�鎷┾�鈥�) ar.Value = '';
-							if (classUtils.attrTypeIsDict(ar.Type)) {
+							if (utils.classUtils.attrTypeIsDict(ar.Type)) {
 								if (ar.select == true) { //鍒ゆ柇涓嬫媺鏄惁澶氶�
 									var valStr = "";
 									for (var v in ar.Value) {
@@ -3518,29 +3563,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();
@@ -3553,15 +3590,15 @@
 				});
 			},
 			formatAttr(attr) {
-				if (classUtils.attrTypeIsObjRefMulti(attr.Type)) //if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
+				if (utils.classUtils.attrTypeIsObjRefMulti(attr.Type)) //if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
 					if (attr.Value == '璇�) ar.Value = '';
-				if (classUtils.attrTypeIsUser(attr.Type) || classUtils.attrTypeIsProject(attr
+				if (utils.classUtils.attrTypeIsUser(attr.Type) || utils.classUtils.attrTypeIsProject(attr
 						.Type)) //if(ar.Type=='寮曠敤浜哄憳' || ar.Type=='寮曠敤椤圭洰')
 					return {
 						attr: attr.Name,
 						value: attr.ValID ? attr.ValID : ''
 					};
-				else if (classUtils.attrTypeIsBool(attr.Type)) //if(ar.Type=='甯冨皵鍊�)
+				else if (utils.classUtils.attrTypeIsBool(attr.Type)) //if(ar.Type=='甯冨皵鍊�)
 					return {
 						attr: attr.Name,
 						value: attr.Value ? '1' : '0'

--
Gitblit v1.9.1