From 49dfdd3bf265db28d38167f34e9aabfdd3e8e5db Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 17 十月 2025 10:16:58 +0800
Subject: [PATCH] imagebutton

---
 pages/modal/3202.vue |   69 ++++++++++++++++++++++------------
 1 files changed, 44 insertions(+), 25 deletions(-)

diff --git a/pages/modal/3202.vue b/pages/modal/3202.vue
index 7860655..6f3d68e 100644
--- a/pages/modal/3202.vue
+++ b/pages/modal/3202.vue
@@ -40,7 +40,9 @@
 	import classUtils from "@/js/utils.js"
 	import {
 		showInfo,
-		showError
+		showError,
+		showLoading,
+		hideLoading
 	} from "@/js/Page.js"
 	import {
 		appGetInfo,
@@ -116,29 +118,36 @@
 
 		},
 		async onLoad(options) {
-			// console.log(options);
-			uni.setNavigationBarTitle({
-				title: options.titlename
-			}); //璁剧疆椤堕儴鏍囬 
-			this.title = options.titlename;
-			this.param = JSON.parse(options.param);
-			const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined
-			this.styledef = {};
-			this.head_styledef = {
-				form: {
-					items: []
-				}
-			};
-			this.detail1_styledef = {};
-			this.detail1StyleDefList = [];
-			this.items = [];
-			this.active_id = '';
-			this.activeItem = {};
-			this.click_item_view = false
-			if (this.param?.ClickItem_Event?.id)
-				this.click_item_view = true
-			await this.Detail1_UIstyleGetInfo(this.param.ClsID, this.param.ListItem_Panel.id);
-			this.initial(paramValue)
+			try {
+				showLoading("loading...")
+				// console.log(options);
+				uni.setNavigationBarTitle({
+					title: options.titlename
+				}); //璁剧疆椤堕儴鏍囬 
+				this.title = options.titlename;
+				this.param = JSON.parse(options.param);
+				const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined
+				this.styledef = {};
+				this.head_styledef = {
+					form: {
+						items: []
+					}
+				};
+				this.detail1_styledef = {};
+				this.detail1StyleDefList = [];
+				this.items = [];
+				this.active_id = '';
+				this.activeItem = {};
+				this.click_item_view = false
+				if (this.param?.ClickItem_Event?.id)
+					this.click_item_view = true
+				await this.Detail1_UIstyleGetInfo(this.param.ClsID, this.param.ListItem_Panel.id);
+				this.initial(paramValue)
+				hideLoading()
+			} catch (ex) {
+				hideLoading()
+				showError(ex, this.translateSys("error"));
+			}
 
 		},
 		methods: {
@@ -218,6 +227,7 @@
 						};
 						runCustomEvent(dataInfo).then(result => {
 							console.log(result);
+							
 							if (result.ret != 0 && result.ret != 1) {
 								let cls_name = result.event_info?.cls_name
 								let event_name = result.event_info?.event_name
@@ -588,6 +598,7 @@
 				if (!this.clickItemEvent.id) {
 					return;
 				}
+				showLoading("loading...")
 				const $this = this
 
 				var obj_attr = this.head_styledef.form.model;
@@ -628,6 +639,7 @@
 					data_json,
 				}).then(result => {
 					// console.log(result);
+						hideLoading()
 					if (result.ret != 0 && result.ret != 1) {
 						let cls_name = result.event_info?.cls_name
 						let event_name = result.event_info?.event_name
@@ -693,6 +705,7 @@
 
 				}).catch(ex => {
 					// console.log(ex);
+						hideLoading()
 					showError(ex, this.translateSys("error") + "8.1")
 				});
 			},
@@ -746,7 +759,7 @@
 			//鎵ц瑙﹀彂浜嬩欢
 			async triggerEvent(btn, style, enviroment) {
 				const $this = this
-
+showLoading("loading...")
 				var obj_attr = this.head_styledef.form.model;
 				// console.log(obj_attr);
 				var input_param = Base64.encode(
@@ -784,6 +797,7 @@
 					input_param,
 					data_json,
 				}).then(result => {
+						hideLoading()
 					// console.log(result);
 					if (result.ret != 0 && result.ret != 1) {
 						let cls_name = result.event_info?.cls_name
@@ -855,6 +869,7 @@
 
 				}).catch(ex => {
 					// console.log(ex);
+						hideLoading()
 					showError(ex, this.translateSys("error") + "8.1")
 				});
 			},
@@ -1017,6 +1032,7 @@
 			async onChange(event) {
 				try {
 					if (event.id) {
+						showLoading("loading...")
 						var obj_attr = this.head_styledef.form.model;
 						console.log(obj_attr);
 						var input_param = Base64.encode(
@@ -1049,6 +1065,7 @@
 						};
 						runCustomEvent(dataInfo).then(result => {
 							console.log(result);
+							hideLoading()
 							if (result.ret != 0 && result.ret != 1) {
 								let cls_name = result.event_info?.cls_name
 								let event_name = result.event_info?.event_name
@@ -1143,10 +1160,12 @@
 
 						}).catch(ex => {
 							// console.log(ex);
+							hideLoading()
 							showError(ex, this.translateSys("error") + "8.1")
 						});
 					}
 				} catch (ex) {
+					hideLoading()
 					showError(ex, this.translateSys('error') + "8.2")
 
 				}

--
Gitblit v1.9.1