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/3200_view.vue | 99 ++++++++++++++++++++++++++++---------------------
1 files changed, 57 insertions(+), 42 deletions(-)
diff --git a/pages/modal/3200_view.vue b/pages/modal/3200_view.vue
index 169b378..ffb290d 100644
--- a/pages/modal/3200_view.vue
+++ b/pages/modal/3200_view.vue
@@ -40,7 +40,9 @@
import classUtils from "@/js/utils.js"
import {
showInfo,
- showError
+ showError,
+ showLoading,
+ hideLoading
} from "@/js/Page.js"
import {
appGetInfo,
@@ -98,47 +100,56 @@
},
async onLoad(options) {
// console.log(options);
- uni.setNavigationBarTitle({
- title: options.titlename
- }); //璁剧疆椤堕儴鏍囬
- this.title = options.titlename;
- this.param = JSON.parse(options.param);
- console.log(this.param);
- this.styleDef = JSON.parse(options.style);
- // console.log(this.styleDef);
- if (this.param.ViewPage.View_UIDef.ui_type == "HTML椤甸潰") {
- // HTML椤甸潰
- //鑾峰彇鏁版嵁绫荤殑HTML椤甸潰
- this.Html_UIstyleGetInfo(this.param.DataCls.id, this.param.ViewPage.View_UIDef.id, 'viewPage');
- } else {
- this.Detail2_UIstyleGetInfo(this.param.DataCls.id, this.param.ViewPage.View_UIDef.id);
- }
-
-
- //杩涘叆椤甸潰鍚庝簨浠�- var eventid = this.param.ViewPage.Enter_View_Event?.id;
- if (eventid) {
- try {
- var obj_attr = {
- 'S_ID': this.styleDef.form.objId
- };
- this.styleDef.form.attrs.forEach((attr) => {
- obj_attr[attr.name] = attr.value;
- });
- // console.log(obj_attr);
- var input_param = Base64.encode(JSON.stringify(obj_attr));
- this.runCustomEvent({
- ed_type: 0,
- start_transaction: true,
- class_id: this.param.DataCls.id,
- event_id: eventid,
- data_obj_id: this.styleDef.form.objId,
- obj_attr,
- input_param,
- });
- } catch (ex) {
- showError(ex, this.translateSys('error'))
+ try {
+ showLoading("loading...")
+ uni.setNavigationBarTitle({
+ title: options.titlename
+ }); //璁剧疆椤堕儴鏍囬
+ this.title = options.titlename;
+ this.param = JSON.parse(options.param);
+ console.log(this.param);
+ this.styleDef = JSON.parse(options.style);
+ // console.log(this.styleDef);
+ if (this.param.ViewPage.View_UIDef.ui_type == "HTML椤甸潰") {
+ // HTML椤甸潰
+ //鑾峰彇鏁版嵁绫荤殑HTML椤甸潰
+ await this.Html_UIstyleGetInfo(this.param.DataCls.id, this.param.ViewPage.View_UIDef.id,
+ 'viewPage');
+ } else {
+ await this.Detail2_UIstyleGetInfo(this.param.DataCls.id, this.param.ViewPage.View_UIDef.id);
}
+
+
+ //杩涘叆椤甸潰鍚庝簨浠�+ var eventid = this.param.ViewPage.Enter_View_Event?.id;
+ if (eventid) {
+ try {
+ var obj_attr = {
+ 'S_ID': this.styleDef.form.objId
+ };
+ this.styleDef.form.attrs.forEach((attr) => {
+ obj_attr[attr.name] = attr.value;
+ });
+ // console.log(obj_attr);
+ var input_param = Base64.encode(JSON.stringify(obj_attr));
+ await this.runCustomEvent({
+ ed_type: 0,
+ start_transaction: true,
+ class_id: this.param.DataCls.id,
+ event_id: eventid,
+ data_obj_id: this.styleDef.form.objId,
+ obj_attr,
+ input_param,
+ });
+ } catch (ex) {
+ showError(ex, this.translateSys('error'))
+ }
+ }
+ hideLoading()
+ } catch (ex) {
+
+ hideLoading()
+ showError(ex, this.translateSys("error"));
}
},
methods: {
@@ -401,6 +412,7 @@
//鎵ц瑙﹀彂浜嬩欢
async triggerEvent(btn, style, enviroment) {
try {
+ showLoading("loading...")
btn.disabled = true
var obj_attr = {
'S_ID': this.styleDef.form.objId
@@ -411,6 +423,7 @@
// console.log(obj_attr);
// let input_param = Base64.encode(JSON.stringify(obj_attr));
// return;
+
await this.runCustomEvent({
ed_type: 0,
start_transaction: true,
@@ -420,7 +433,9 @@
obj_attr: obj_attr,
});
btn.disabled = false
+ hideLoading()
} catch (ex) {
+ hideLoading()
showError(ex, this.translateSys('error') + "3")
}
},
@@ -455,7 +470,7 @@
if (time)
showError(tip, this.translateSys('tip'))
else
- showInfo(tip)
+ showInfo(tip)
if ([0, 2, 3, 4, -1].includes(result.result_type)) {
if (result.result_type == 2) {
--
Gitblit v1.9.1