From bbf4ef74df2bf1e075710b433ecffc46a8562c51 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 06 九月 2024 17:23:54 +0800
Subject: [PATCH] test

---
 locale/es.json         |    1 
 pages/modal/3018_2.vue |    2 
 pages/modal/5601.vue   |  371 ++++++++++++++++++----------------------------------
 locale/zh-Hans.json    |   11 
 manifest.json          |    4 
 locale/en.json         |    1 
 locale/zh-Hant.json    |    1 
 7 files changed, 143 insertions(+), 248 deletions(-)

diff --git a/locale/en.json b/locale/en.json
index 4f3df46..eafed40 100644
--- a/locale/en.json
+++ b/locale/en.json
@@ -91,6 +91,7 @@
 	"page.execute_after_delete_event_failed": "Failed to execute 'after_delete' event",
 	"page.execute_query_event_failed": "Failed to execute 'Query_Event' event",
 	"page.icon_click_event_empty": "The icon click event is null",
+	"page.icon_click_callback_empty": "Icon click callback event is empty",
 	"page.after_select_event_empty": "鈥榓fter_select鈥�event is null",
 	"page.before_select_event_empty": "鈥榖efore_select鈥�event is null",
 	"page.tip_action_unprocessed": "This action has not been processed yet",
diff --git a/locale/es.json b/locale/es.json
index f291d1f..19be636 100644
--- a/locale/es.json
+++ b/locale/es.json
@@ -90,6 +90,7 @@
 	"page.execute_after_delete_event_failed": "Fall贸 la ejecuci贸n del evento 'after_delete'.",
 	"page.execute_query_event_failed": "Fall贸 la ejecuci贸n del evento 'Query_Event'.",
 	"page.icon_click_event_empty": "El icono hace clic en el evento en blanco",
+	"page.icon_click_callback_empty": "Icono haga clic en el evento de devoluci贸n de llamada en blanco",
 	"page.after_select_event_empty": "El evento 'after_select' est谩 vac铆o",
 	"page.before_select_event_empty": "El evento 'before_select' est谩 vac铆o",
 	"page.tip_action_unprocessed": "Esta acci贸n a煤n no se ha tramitado",
diff --git a/locale/zh-Hans.json b/locale/zh-Hans.json
index c8b8ea9..663d4f8 100644
--- a/locale/zh-Hans.json
+++ b/locale/zh-Hans.json
@@ -64,7 +64,7 @@
 	"page.mobox3_app_type": "mobox3 pda搴旂敤绫诲瀷",
 	"page.mobox3_port": "mobox3鏈嶅姟绔彛",
 
-	"page.input_server": "璇疯緭鍏ユ湇鍔″湴鍧�,	
+	"page.input_server": "璇疯緭鍏ユ湇鍔″湴鍧�,
 	"page.set_server": "璁剧疆鏈嶅姟",
 	"page.tip_app_update": "绯荤粺鏈夋柊鐗堟湰锛屾槸鍚﹂渶瑕佹洿鏂帮紵",
 	"page.tip_no_web_server": "鏈緭鍏ョ綉绔欏湴鍧�紝璇烽噸鏂伴厤缃緭鍏�,
@@ -74,7 +74,7 @@
 	"page.tip_get_file_fail_last": "鏂囦欢澶辫触",
 	"page.update_success": "鏇存柊鎴愬姛",
 	"page.update_fail": "鏇存柊澶辫触",
-	
+
 
 	"page.tip_no_app_param": "璇ュ姛鑳界偣鏈厤缃弬鏁帮紝璇烽噸鏂伴厤缃弬鏁�,
 	"page.select_user": "閫夋嫨浜哄憳",
@@ -93,6 +93,7 @@
 	"page.execute_after_delete_event_failed": "鎵ц鈥樺垹闄ゅ悗鈥欎簨浠跺け璐�,
 	"page.execute_query_event_failed": "鎵ц鈥滄煡璇簨浠垛�浜嬩欢澶辫触",
 	"page.icon_click_event_empty": "鍥炬爣鐐瑰嚮浜嬩欢涓虹┖",
+	"page.icon_click_callback_empty": "鍥炬爣鐐瑰嚮鍥炶皟浜嬩欢涓虹┖",
 	"page.after_select_event_empty": "鈥橀�鎷╁悗鈥欎簨浠朵负绌�,
 	"page.before_select_event_empty": "鈥橀�鎷╁墠鈥欎簨浠朵负绌�,
 	"page.tip_action_unprocessed": "姝ction灏氭湭澶勭悊",
@@ -125,9 +126,9 @@
 	"page.function_not_edit_dlg": "璇ュ姛鑳界偣鏈厤缃紪杈戠獥鍙o紒",
 	"page.no_find_attr_diaplay": "鏈壘鍒板彲鏄剧ず鐨勭殑灞炴�锛�,
 
-	
+
 	"page.cannot_prj_function": "鏆傛椂鏈敮鎸侀�鎷╅」鐩帴鍙o紒"
-	
-	
+
+
 
 }
\ No newline at end of file
diff --git a/locale/zh-Hant.json b/locale/zh-Hant.json
index 2411756..dbfd844 100644
--- a/locale/zh-Hant.json
+++ b/locale/zh-Hant.json
@@ -90,6 +90,7 @@
 	"page.execute_after_delete_event_failed": "鍩疯鈥樺垹闄ゅ緦鈥欎簨浠跺け鏁�,
 	"page.execute_query_event_failed": "鍩疯鈥滄熁瑭簨浠垛�浜嬩欢澶辨晽",
 	"page.icon_click_event_empty": "鍦栨榛炴搳浜嬩欢鐐虹┖",
+	"page.icon_click_callback_empty": "鍦栨榛炴搳鍥炴獢浜嬩欢鐐虹┖",
 	"page.after_select_event_empty": "鈥橀伕鎿囧緦鈥欎簨浠剁偤绌�,
 	"page.before_select_event_empty": "鈥橀伕鎿囧墠鈥欎簨浠剁偤绌�,
 	"page.tip_action_unprocessed": "姝ction灏氭湭铏曠悊",
diff --git a/manifest.json b/manifest.json
index 867f353..b15a172 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
     "name" : "MoboxPDA",
     "appid" : "__UNI__56D451E",
     "description" : "",
-    "versionName" : "1.1.19",
-    "versionCode" : 1119,
+    "versionName" : "1.1.20",
+    "versionCode" : 1120,
     "transformPx" : false,
     /* 5+App鐗规湁鐩稿叧 */
     "app-plus" : {
diff --git a/pages/modal/3018_2.vue b/pages/modal/3018_2.vue
index f741bb9..7bbbe9c 100644
--- a/pages/modal/3018_2.vue
+++ b/pages/modal/3018_2.vue
@@ -883,7 +883,7 @@
 				if (!onSuffixClickCallbackEvent.id) {
 					uni.showModal({
 						title: this.translateSys("tip"),
-						content: this.translate('icon_click_event_empty'),
+						content: this.translate('icon_click_callback_empty'),
 						showCancel: false,
 						confirmText: this.translateSys("cancel")
 					});
diff --git a/pages/modal/5601.vue b/pages/modal/5601.vue
index 5729403..73be24b 100644
--- a/pages/modal/5601.vue
+++ b/pages/modal/5601.vue
@@ -223,9 +223,11 @@
 					keys.forEach(function(key2, index) {
 						if (index + 1 == keys.length) {
 							that.$set(data, key2, val);
+							console.log("$set", key2, val)
 						} else {
 							if (!data[key2]) {
 								that.$set(data, key2, {});
+								console.log("$set", key2, {})
 							}
 						}
 						data = data[key2];
@@ -1020,121 +1022,8 @@
 											"set_dlg_attr") {
 											// value = {"attr":"xxx", "value":"xxx"}
 											var data = item.value;
-											$this.$data.head_styledef
-												.form.items.forEach(
-													async (
-														ele, index
-													) => {
-														if (ele
-															.name !=
-															"Layout"
-														) {
-															data.forEach(
-																async (ele2,
-																	index
-																) => {
-																	if (ele
-																		.fieldId ==
-																		ele2
-																		.attr
-																	) {
-																		if (ele.name ==
-																			'Select' &&
-																			ele2
-																			.choice_list
-																		) {
-																			const
-																				dictItemList = [];
-																			const
-																				choiceList =
-																				ele2
-																				.choice_list ||
-																				[];
-																			for (let d in
-																					choiceList) {
-																				const
-																					val =
-																					choiceList[
-																						d
-																					];
-																				dictItemList
-																					.push({
-																						text: val,
-																						value: val
-																					});
-																			}
-																			ele.dict =
-																				dictItemList;
-																		}
-
-																		ele.value =
-																			ele2
-																			.value;
-																	}
-																});
-														} else {
-															ele.setting
-																.colList
-																.forEach(
-																	async (
-																		col
-																	) => {
-																		if (
-																			col) {
-																			data.forEach(
-																				async (ele2,
-																					index
-																				) => {
-																					if (col
-																						.fieldId ==
-																						ele2
-																						.attr
-																					) {
-																						if (col
-																							.name ==
-																							'Select' &&
-																							ele2
-																							.choice_list
-																						) {
-																							const
-																								dictItemList = [];
-																							const
-																								choiceList =
-																								ele2
-																								.choice_list ||
-																								[];
-																							for (
-																								let d in
-																									choiceList
-																							) {
-																								const
-																									val =
-																									choiceList[
-																										d
-																									];
-																								dictItemList
-																									.push({
-																										text: val,
-																										value: val
-																									});
-																							}
-																							col.dict =
-																								dictItemList;
-																						}
-
-																						col.value =
-																							ele2
-																							.value;
-																					}
-																				});
-
-																		}
-
-																	})
-														}
-													})
+											$this.setFormValues(data)
 										}
-
 									});
 								} else {
 
@@ -1202,11 +1091,13 @@
 			//鏇存柊鍒嗛〉绛句腑鐨勫垪琛ㄩ」鍐呭
 			viewActionSetRow(value) {
 				const $this = this
-				const pageData = $this.pageDetail.find((page) => {
+				const pageIndex = $this.pageDetail.findIndex((
+					page, index2, arr) => {
 					return value.page_name == page.Name;
-				});
-				if (!pageData)
+				})
+				if (pageIndex < 0)
 					return
+				const pageData = $this.pageDetail[pageIndex]
 				var detailStyleDefList = pageData.DefList || []
 				detailStyleDefList.forEach(ele => {
 					value.row.forEach((rowData) => {
@@ -1262,6 +1153,7 @@
 					})
 				});
 				pageData.DefList = detailStyleDefList
+				$this.$set(this.pageDetail, pageIndex, pageData)
 
 			},
 			//鍔犺浇姝e湪鐮佺洏鍐呭
@@ -1270,11 +1162,13 @@
 				if (JSON.stringify(data.row) == '{}') {
 					return;
 				}
-				const pageData = this.pageDetail.find((page) => {
+				const pageIndex = $this.pageDetail.findIndex((
+					page, index2, arr) => {
 					return data.page_name == page.Name;
-				});
-				if (!pageData)
+				})
+				if (pageIndex < 0)
 					return
+				const pageData = $this.pageDetail[pageIndex]
 				var styleStr = JSON.stringify(pageData.StyleDef);
 
 				var detailStyle = JSON.parse(styleStr);
@@ -1309,18 +1203,21 @@
 						});
 
 						pageData.DefList.push(detailStyle);
-
+						this.$set(this.pageDetail, pageIndex, pageData)
 					});
 				}
 			},
 			//鍔犺浇宸茬爜鐩樺唴瀹� 			viewAceionContent(data) {
 				var $this = this;
-				const pageData = $this.pageDetail.find((page) => {
+				const pageIndex = $this.pageDetail.findIndex((
+					page, index2, arr) => {
 					return data.page_name == page.Name;
-				});
-				if (!pageData)
+				})
+				if (pageIndex < 0)
 					return
+				const pageData = $this.pageDetail[pageIndex]
+
 				pageData.ExtData = data.ext_data || {}
 
 				if (JSON.stringify(data.content) == '{}') {
@@ -1407,6 +1304,8 @@
 						} else {
 							pageData.DefList.push(detailStyle); //寰呭垎鎷� 						}
+						// $this.setData({pageDetail:pageD})
+						$this.$set(this.pageDetail, pageIndex, pageData)
 						$this.activelist.push({
 							active: false
 						});
@@ -1414,6 +1313,109 @@
 				}
 
 			},
+			setFormValues(data) {
+				const head_styledef = this.head_styledef
+				if (JSON.stringify(data) == '{}') {
+					return;
+				}
+				head_styledef.form.items.forEach(async (ele, index) => {
+					if (ele.name != "Layout") {
+						let curIndex = data.findIndex((attr, index2, arr) => {
+							return attr.attr == ele.fieldId;
+						})
+						if (curIndex > -1) {
+							const attr = data[curIndex]
+							if (ele.name ==
+								'Select' &&
+								attr
+								.choice_list
+							) {
+								const
+									dictItemList = [];
+								const
+									choiceList =
+									attr
+									.choice_list || [];
+								for (let d in
+										choiceList) {
+									const
+										val =
+										choiceList[
+											d
+										];
+									dictItemList
+										.push({
+											text: val,
+											value: val
+										});
+								}
+								ele.dict =
+									dictItemList;
+							}
+
+							ele.value =
+								attr
+								.value;
+						}
+					} else {
+						ele.setting
+							.colList
+							.forEach(
+								async (
+									col
+								) => {
+									if (
+										col) {
+										let curIndex = data.findIndex((
+											attr, index2, arr) => {
+											return attr.attr == col.fieldId;
+										})
+										if (curIndex > -1) {
+											const attr = data[curIndex]
+											if (col.name ==
+												'Select' &&
+												attr
+												.choice_list
+											) {
+												const
+													dictItemList = [];
+												const
+													choiceList =
+													attr
+													.choice_list || [];
+												for (let d in
+														choiceList) {
+													const
+														val =
+														choiceList[
+															d
+														];
+													dictItemList
+														.push({
+															text: val,
+															value: val
+														});
+												}
+												col.dict =
+													dictItemList;
+											}
+
+											col.value =
+												attr
+												.value;
+										}
+									}
+
+								})
+
+					}
+				})
+
+				this.setData({
+					head_styledef: head_styledef
+				})
+			},
+
 			onClickItem(e) { //閫夋嫨椤电
 				// console.log(e);
 				this.current = e.currentIndex
@@ -1838,7 +1840,8 @@
 														.confirm
 													) {
 														if (
-															pageData)
+															pageData
+														)
 															pageData
 															.DefList = [];
 														$this
@@ -1850,7 +1853,8 @@
 														.cancel
 													) {
 														if (
-															pageData)
+															pageData
+														)
 															pageData
 															.DefList = [];
 														$this
@@ -1983,121 +1987,8 @@
 										"set_dlg_attr") {
 										// value = {"attr":"xxx", "value":"xxx"}
 										var data = item.value;
-										$this.$data.head_styledef
-											.form.items.forEach(
-												async (
-													ele, index
-												) => {
-													if (ele
-														.name !=
-														"Layout"
-													) {
-														data.forEach(
-															async (ele2,
-																index
-															) => {
-																if (ele
-																	.fieldId ==
-																	ele2
-																	.attr
-																) {
-																	if (ele.name ==
-																		'Select' &&
-																		ele2
-																		.choice_list
-																	) {
-																		const
-																			dictItemList = [];
-																		const
-																			choiceList =
-																			ele2
-																			.choice_list ||
-																			[];
-																		for (let d in
-																				choiceList) {
-																			const
-																				val =
-																				choiceList[
-																					d
-																				];
-																			dictItemList
-																				.push({
-																					text: val,
-																					value: val
-																				});
-																		}
-																		ele.dict =
-																			dictItemList;
-																	}
-
-																	ele.value =
-																		ele2
-																		.value;
-																}
-															});
-													} else {
-														ele.setting
-															.colList
-															.forEach(
-																async (
-																	col
-																) => {
-																	if (
-																		col) {
-																		data.forEach(
-																			async (ele2,
-																				index
-																			) => {
-																				if (col
-																					.fieldId ==
-																					ele2
-																					.attr
-																				) {
-																					if (col
-																						.name ==
-																						'Select' &&
-																						ele2
-																						.choice_list
-																					) {
-																						const
-																							dictItemList = [];
-																						const
-																							choiceList =
-																							ele2
-																							.choice_list ||
-																							[];
-																						for (
-																							let d in
-																								choiceList
-																						) {
-																							const
-																								val =
-																								choiceList[
-																									d
-																								];
-																							dictItemList
-																								.push({
-																									text: val,
-																									value: val
-																								});
-																						}
-																						col.dict =
-																							dictItemList;
-																					}
-
-																					col.value =
-																						ele2
-																						.value;
-																				}
-																			});
-
-																	}
-
-																})
-													}
-												})
+										$this.setFormValues(data)
 									}
-
 
 								});
 							} else {

--
Gitblit v1.9.1