From 9ae83a12c2b9c764e28760fb9c3c09fe697c8990 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期一, 22 七月 2024 14:56:00 +0800
Subject: [PATCH] 3018 按钮修改

---
 pages/modal/3200.vue |   91 ++++++++++++++++++++++++++++-----------------
 1 files changed, 57 insertions(+), 34 deletions(-)

diff --git a/pages/modal/3200.vue b/pages/modal/3200.vue
index 2a21fda..1df943b 100644
--- a/pages/modal/3200.vue
+++ b/pages/modal/3200.vue
@@ -273,7 +273,40 @@
 			}); //璁剧疆椤堕儴鏍囬 
 			this.$data.title = options.titlename;
 			this.$data.param = JSON.parse(options.param);
-			this.initial( options.paramValue);
+
+
+			this.styledef = {};
+			this.head_styledef = {
+				form: {
+					items: []
+				}
+			};
+			this.detail1_styledef = {};
+			this.detail1StyleDefList = [];
+			this.detail2_styledef = {};
+			this.detail2StyleDefList = [];
+			this.ListHtml_Panel = "";
+			this.ListPageHtml_Show = {
+				name: "",
+				event: {
+					id: "",
+					name: ""
+				}
+			};
+			this.items = [];
+			this.active_id = '';
+			this.activelist = [];
+
+			if (this.param.ListPage.ListItem_UIDef?.ui_type == "HTML椤甸潰") {
+				// HTML椤甸潰
+				//鑾峰彇鏁版嵁绫荤殑HTML椤甸潰
+				await this.Html_UIstyleGetInfo(this.param.DataCls.id, this.param.ListPage.ListItem_UIDef.id, options
+					.paramValue);
+			} else {
+				await this.Detail1_UIstyleGetInfo(this.param.DataCls.id, this.param.ListPage.ListItem_UIDef.id);
+
+				await this.initial(options.paramValue);
+			}
 			// this.isFilter=true;
 			// if(this.param.ShowFilter)
 			//   this.isFilter=false;
@@ -308,7 +341,7 @@
 				let that = this;
 				let keys = [];
 				let val, data;
-			
+
 				Object.keys(obj).forEach(function(key) {
 					keys = key.split(".");
 					val = obj[key];
@@ -325,31 +358,9 @@
 					});
 				});
 			},
-			
+
 			//鍒濆鍖� 			async initial(paramValue) {
-				this.styledef = {};
-				this.head_styledef = {
-					form: {
-						items: []
-					}
-				};
-				this.detail1_styledef = {};
-				this.detail1StyleDefList = [];
-				this.detail2_styledef = {};
-				this.detail2StyleDefList = [];
-				this.items = [];
-				this.active_id = '';
-				this.activelist = [];
-				this.ListHtml_Panel = "";
-				this.ListPageHtml_Show = {
-					name: "",
-					event: {
-						id: "",
-						name: ""
-					}
-				};
-
 				this.isFilter = true;
 				if (this.param.ShowFilter)
 					this.isFilter = false;
@@ -380,13 +391,6 @@
 							}
 						})
 					}
-				}
-				if (this.param.ListPage.ListItem_UIDef?.ui_type == "HTML椤甸潰") {
-					// HTML椤甸潰
-					//鑾峰彇鏁版嵁绫荤殑HTML椤甸潰
-					await this.Html_UIstyleGetInfo(this.param.DataCls.id, this.param.ListPage.ListItem_UIDef.id);
-				} else {
-					await this.Detail1_UIstyleGetInfo(this.param.DataCls.id, this.param.ListPage.ListItem_UIDef.id);
 				}
 				this.orderby = this.param.Order ? this.param.Order : 'T_CREATE Desc';
 				if (this.param.Query_Event) {
@@ -510,7 +514,7 @@
 				});
 
 			},
-			async Html_UIstyleGetInfo(class_id, style_id) { //鑾峰彇鑷畾涔夎〃鍗曟牱寮�+			async Html_UIstyleGetInfo(class_id, style_id, paramValue) { //鑾峰彇鑷畾涔夎〃鍗曟牱寮� 				var $this = this;
 				var dataInfo = {
 					class_id: class_id,
@@ -527,8 +531,11 @@
 							if (!ret.result.style_def.includes('"')) styledef = Base64.decode(ret.result
 								.style_def);
 						}
+						// console.log(styledef);
 						$this.ListPageHtml_Show = ret.result.style_def ? JSON.parse(styledef) : {};
 						// console.log($this.ListPageHtml_Show);
+
+						$this.initial(paramValue);
 					} else {
 						uni.showModal({
 							title: this.translateSys("error") + "10",
@@ -743,6 +750,7 @@
 							if (ret.result) {
 								$this.page_count = ret.result.page_count;
 								if (ret.result.page_count > 1) $this.query_id = ret.result.query_id;
+								// console.log($this.ListPageHtml_Show.event);
 								if ($this.ListPageHtml_Show.event.id) {
 									ret.result.obj_list.forEach((obj) => {
 										var info = {
@@ -986,6 +994,13 @@
 					if (btn.FunCode == "Add" || btn.FunCode == "Modify") {
 						if (btn.Edit_dlg.Model == "small") {
 							this.showAddSmallDialog(btn, style, enviroment);
+						} else {
+							uni.showModal({
+								title: this.translateSys("tip"),
+								content: this.translateSys("unrealized"),
+								showCancel: false,
+								confirmText: this.translateSys("cancel")
+							});
 						}
 					} else if (btn.FunCode == "Delete") {
 						this.DeleteObj(btn, style, enviroment);
@@ -1235,7 +1250,7 @@
 							if ((success.result || []).length > 0) {
 								const app = success.result[0]
 								var param = "";
-								var appName = app.name || app.list_name
+								var appName = app.list_name || app.name 
 									.Name;
 								var paramStr = app.param
 								if (paramStr) {
@@ -1291,6 +1306,14 @@
 							confirmText: this.translateSys("cancel")
 						});
 					});
+				} else {
+					uni.showModal({
+						title: this.translateSys("error"),
+						content: this.translate("cannot_related_function"),
+						showCancel: false,
+						confirmText: this.translateSys("cancel")
+					});
+
 				}
 			},
 			//鎵ц鍚庡鐞嗕簨浠�
--
Gitblit v1.9.1