From 0df15ed47f6e2aa5eb0610890bed7dcbaabc7c92 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期四, 11 七月 2024 17:32:07 +0800
Subject: [PATCH] test
---
locale/es.json | 9
pages/modal/3018_2.vue | 101 ++-
pages/modal/5602.vue | 56 +-
pages/modal/5601.vue | 36 +
pages/modal/3037_2.vue | 72 ++-
pages/modal/small-wnd/line.vue | 13
pages/modal/3200.vue | 353 +++++++++++----
pages/index/index.vue | 4
locale/zh-Hans.json | 11
manifest.json | 4
locale/en.json | 7
pages/modal/5600.vue | 36 +
locale/zh-Hant.json | 8
pages/modal/small-wnd/ext-button.vue | 650 ++++++++++++++++++++++++++++
14 files changed, 1,140 insertions(+), 220 deletions(-)
diff --git a/locale/en.json b/locale/en.json
index bd451b9..eaaf2f3 100644
--- a/locale/en.json
+++ b/locale/en.json
@@ -106,7 +106,12 @@
"page.tip_no_data_last": "!",
"page.execute_event_success": "Successfully executed event",
"page.are_you_sure_delete_sorted_data": "Are you sure to delete the sorted data?",
- "page.are_you_sure_delete_coded_disk_data": "Are you sure to delete the encoded disk data?锛�
+ "page.are_you_sure_delete_coded_disk_data": "Are you sure to delete the encoded disk data?锛�,
+ "page.tip_no_set_edit_wnd": "No editing window style set",
+ "page.cannot_empty": "Cannot be empty",
+ "page.required": "Required",
+ "page.cannot_rlated_function": "Do not support jumping to function points",
+ "page.function_not_exist": "Function point does not exist!"
}
\ No newline at end of file
diff --git a/locale/es.json b/locale/es.json
index 85e70ea..1f54263 100644
--- a/locale/es.json
+++ b/locale/es.json
@@ -105,8 +105,13 @@
"page.tip_no_data_last": "!",
"page.execute_event_success": "El evento de ejecuci贸n fue exitoso",
"page.are_you_sure_delete_sorted_data": "驴驴 est谩s seguro de eliminar los datos clasificados?",
- "page.are_you_sure_delete_coded_disk_data": "驴驴 est谩s seguro de eliminar los datos del disco codificado?"
-
+ "page.are_you_sure_delete_coded_disk_data": "驴驴 est谩s seguro de eliminar los datos del disco codificado?",
+ "page.tip_no_set_edit_wnd": "No se establece el estilo de la ventana de edici贸n",
+ "page.cannot_empty": "No puede estar vac铆o",
+ "page.required": "Obligatorio",
+ "page.cannot_rlated_function": "No se admite saltar a un punto funcional",
+ "page.function_not_exist": "隆隆 los puntos funcionales no existen!"
+
diff --git a/locale/zh-Hans.json b/locale/zh-Hans.json
index de85b2b..e40cecb 100644
--- a/locale/zh-Hans.json
+++ b/locale/zh-Hans.json
@@ -57,6 +57,7 @@
"sys.sorting": "鍒嗘嫞",
"sys.view": "娴忚",
"sys.unrealized": "鏈疄鐜�,
+
"page.set_server": "璁剧疆鏈嶅姟",
"page.tip_app_update": "绯荤粺鏈夋柊鐗堟湰锛屾槸鍚﹂渶瑕佹洿鏂帮紵",
@@ -111,12 +112,8 @@
"page.are_you_sure_delete_coded_disk_data": "纭畾鍒犻櫎璇ュ凡鐮佺洏鏁版嵁锛�,
"page.tip_no_set_edit_wnd": "鏈缃紪杈戠獥鍙f牱寮�,
"page.cannot_empty": "涓嶈兘涓虹┖",
- "page.required": " 蹇呭~"
-
-
-
-
-
-
+ "page.required": "蹇呭~",
+ "page.cannot_rlated_function": "涓嶆敮鎸佽烦杞埌鍔熻兘鐐�,
+ "page.function_not_exist": "鍔熻兘鐐逛笉瀛樺湪!"
}
\ No newline at end of file
diff --git a/locale/zh-Hant.json b/locale/zh-Hant.json
index 87c7ca6..6d127e7 100644
--- a/locale/zh-Hant.json
+++ b/locale/zh-Hant.json
@@ -105,7 +105,13 @@
"page.tip_no_data_last": "涓矑鏈夋暩鎿氾紒",
"page.execute_event_success": "鍩疯浜嬩欢鎴愬姛锛�,
"page.are_you_sure_delete_sorted_data": "纰哄畾鍒犻櫎瑭插凡鍒嗘弨鏁告摎锛�,
- "page.are_you_sure_delete_coded_disk_data": "纰哄畾鍒犻櫎瑭插凡纰肩洡鏁告摎锛�
+ "page.are_you_sure_delete_coded_disk_data": "纰哄畾鍒犻櫎瑭插凡纰肩洡鏁告摎锛�,
+ "page.tip_no_set_edit_wnd": "鏈ō瀹氱法杓绐楁ǎ寮�,
+ "page.cannot_empty": "涓嶈兘鐐虹┖",
+ "page.required": " 蹇呭~",
+ "page.cannot_rlated_function": "涓嶆敮鎸佽烦杞夊埌鍔熻兘榛�,
+ "page.function_not_exist": "鍔熻兘榛炰笉瀛樺湪锛�
+
diff --git a/manifest.json b/manifest.json
index 1c5f80c..e71ccd0 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
"name" : "MoboxPDA",
"appid" : "__UNI__56D451E",
"description" : "",
- "versionName" : "1.1.00",
- "versionCode" : 1100,
+ "versionName" : "1.1.01",
+ "versionCode" : 1101,
"transformPx" : false,
/* 5+App鐗规湁鐩稿叧 */
"app-plus" : {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 1c3878d..d9a6c2a 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -63,6 +63,7 @@
// console.log(success);
if (success.code == '00000' || success.err_code == 0) {
this.data = success.data;
+
if (success.err_code != undefined) { //鍒ゆ柇鏄惁鏄疢obox3
success.result.forEach(async (area, index) => {
if (area.client_type == 2) { //鍒ゆ柇绫诲瀷鏄惁鏄疨DA绫诲瀷
@@ -104,6 +105,7 @@
if (success.err_code == 0) {
if ((success.result || []).length > 0) {
$this.data.push(success.result[0]);
+ console.log("onLoad",$this.data )
this.$store.commit("areaFunc", $this.data);
}
@@ -137,7 +139,7 @@
//mobox3鐨刾aram鏄痓ase64瀛楃涓� if (!paramStr.includes('"')) param = Base64.decode(paramStr);
}
-
+
if (!param) {
uni.showModal({
title: this.translateSys("tip"),
diff --git a/pages/modal/3018_2.vue b/pages/modal/3018_2.vue
index 73b45c7..674429b 100644
--- a/pages/modal/3018_2.vue
+++ b/pages/modal/3018_2.vue
@@ -203,14 +203,15 @@
const items = $this.head_styledef.form.items || []
for (let i in items) {
const ele = items[i]
- if (ele.name == 'Input' || ele.name == 'InputNumber'|| ele.name == 'Textarea') {
+ if (ele.name == 'Input' || ele.name == 'InputNumber' || ele.name == 'Textarea') {
if ($this.focusFieldId == ele.fieldId) {
$this.onScanValue(ele, res.result)
break;
}
} else if (ele.name == "Layot") {
let curIndex = (ele.setting.colList || []).findIndex((col, index2, arr) => {
- return (col.name == 'Input' || col.name == 'InputNumber'|| col.name == 'Textarea') && $this
+ return (col.name == 'Input' || col.name == 'InputNumber' || col
+ .name == 'Textarea') && $this
.focusFieldId == col.fieldId;
})
if (curIndex > -1) {
@@ -288,7 +289,8 @@
await this.DictGetInfo(ele.bind.dict, index, 'mast');
}
if ($this.focusFieldId == "") {
- if (ele.name == 'Input' || ele.name == 'InputNumber'|| ele.name == 'Textarea') {
+ if (ele.name == 'Input' || ele.name == 'InputNumber' || ele.name ==
+ 'Textarea') {
$this.setData({
focusFieldId: ele.fieldId
})
@@ -401,12 +403,18 @@
var tip = data.err_info ? typeof data.err_info == 'string' ? data
.err_info : data
.err_info.join('<br/>') : '';
- if (data.ret == 801) uni.showModal({
- title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
+ if (data.ret == 801) {
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ }
else uni.showModal({
title: this.translateSys("tip"),
content: tip + ',' + this.translateSys('tip') + ':' + data.ret,
@@ -678,7 +686,7 @@
const ele = items[i]
if (ele.name != "Layout") {
- if (ele.name == 'Input' || ele.name == 'InputNumber'|| ele.name == 'Textarea') {
+ if (ele.name == 'Input' || ele.name == 'InputNumber' || ele.name == 'Textarea') {
if (attr == ele.fieldId) {
findd = true
} else {
@@ -695,7 +703,8 @@
} else {
if (findd) {
let curIndex = ele.setting.colList.findIndex((col, index2, arr) => {
- return (col.name == 'Input' || col.name == 'InputNumber'|| col.name == 'Textarea');
+ return (col.name == 'Input' || col.name == 'InputNumber' || col.name ==
+ 'Textarea');
})
if (curIndex > -1) {
$this.setData({
@@ -713,7 +722,7 @@
findd = true
let curIndex2 = ele.setting.colList.findIndex((col, index2, arr) => {
return (col.name == 'Input' || col.name ==
- 'InputNumber'|| col.name == 'Textarea') &&
+ 'InputNumber' || col.name == 'Textarea') &&
index2 >
curIndex;
})
@@ -1004,12 +1013,18 @@
var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info :
data
.err_info.join('<br/>') : '';
- if (data.ret == 801) uni.showModal({
- title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
+ if (data.ret == 801) {
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ }
else uni.showModal({
title: this.translateSys("tip"),
content: tip + ',' + this.translateSys('tip') + ':' + data.ret,
@@ -1335,12 +1350,18 @@
var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info :
data
.err_info.join('<br/>') : '';
- if (data.ret == 801) uni.showModal({
- title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
+ if (data.ret == 801){
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ }
else uni.showModal({
title: this.translateSys("tip"),
content: tip + ',' + this.translateSys('tip') + ':' + data.ret,
@@ -1656,11 +1677,14 @@
icon: "success",
duration: 3000
});
- //鍒锋柊
- uni.redirectTo({
- url: '../modal/3018_2?param=' + JSON.stringify(this.$data.param) +
- "&titlename=" + this.$data.title
- });
+ if (this.$data.param.After_Btn_Refresh) {
+ //鍒锋柊
+ uni.redirectTo({
+ url: '../modal/3018_2?param=' + JSON.stringify(this.$data.param) +
+ "&titlename=" + this.$data.title
+ });
+ }
+
// this.class_attr_init();
} else {
uni.showModal({
@@ -1719,13 +1743,18 @@
var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info :
data
.err_info.join('<br/>') : '';
- if (data.ret == 801) uni.showModal({
- title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
- else uni.showModal({
+ if (data.ret == 801) {
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ } else uni.showModal({
title: this.translateSys("tip"),
content: tip + ',' + this.translateSys('tip') + ':' + data.ret,
showCancel: false,
diff --git a/pages/modal/3037_2.vue b/pages/modal/3037_2.vue
index da8388a..ed1de33 100644
--- a/pages/modal/3037_2.vue
+++ b/pages/modal/3037_2.vue
@@ -480,12 +480,18 @@
if (data.ret != 0) {
var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data
.err_info.join('<br/>') : '';
- if (data.ret == 801) uni.showModal({
- title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
+ if (data.ret == 801) {
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ }
else uni.showModal({
title: this.translateSys("tip"),
content: tip + ',' + this.translateSys('tip') + ':' + data.ret,
@@ -1200,12 +1206,18 @@
if (data.ret != 0) {
var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data
.err_info.join('<br/>') : '';
- if (data.ret == 801) uni.showModal({
- title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
+ if (data.ret == 801) {
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ }
else uni.showModal({
title: this.translateSys("tip"),
content: tip + ',' + this.translateSys('tip') + ':' + data.ret,
@@ -1488,12 +1500,18 @@
if (data.ret != 0) {
var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data
.err_info.join('<br/>') : '';
- if (data.ret == 801) uni.showModal({
- title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
+ if (data.ret == 801) {
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ }
else uni.showModal({
title: this.translateSys("tip"),
content: tip + this.translateSys('comma') + this.translate('result') +this.translateSys('colon') + data.ret,
@@ -1843,12 +1861,18 @@
if (data.ret != 0) {
var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data
.err_info.join('<br/>') : '';
- if (data.ret == 801) uni.showModal({
- title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
+ if (data.ret == 801){
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ }
else uni.showModal({
title: this.translateSys("tip"),
content: tip + ',' + this.translateSys('tip') + ':' + data.ret,
diff --git a/pages/modal/3200.vue b/pages/modal/3200.vue
index acea277..a8f7bac 100644
--- a/pages/modal/3200.vue
+++ b/pages/modal/3200.vue
@@ -39,25 +39,8 @@
<div class="dv-listHtml-Panel" v-if="ListHtml_Panel" v-html="ListHtml_Panel[ii]" :style="param.ListPage.CheckBox==true && param.ListPage.Click_View==true?'width:85%;':
param.ListPage.CheckBox==false && param.ListPage.Click_View==true?'width:91%;':
param.ListPage.CheckBox==true && param.ListPage.Click_View==false?'width:88%;':'width:100%;'">
- <!-- <div class="dv_panel_content">
- <div class="dv_panel_attr">
- <label>No锛�/label>
- <span>TA240129-00001</span>
+
</div>
- <div class="dv_panel_attr">
- <div class="dv_box_node">
- <p><span>姣涙枡绾胯竟</span></p>
- <label>L002-1</label>
- </div>
- <i class="mobox-normal-right"></i>
- <div class="dv_box_node">
- <p><span>姣涙枡绾胯竟</span></p>
- <label>L003-3</label>
- </div>
- </div>
- </div> -->
- </div>
- <!-- 鑷畾涔夎〃鍗曠被鍨嬫樉绀�-->
<div class="dv-panel-input" v-if="!ListHtml_Panel" :style="param.ListPage.CheckBox==true && param.ListPage.Click_View==true?'width:85%;':
param.ListPage.CheckBox==false && param.ListPage.Click_View==true?'width:91%;':
param.ListPage.CheckBox==true && param.ListPage.Click_View==false?'width:88%;':'width:100%;'">
@@ -591,13 +574,18 @@
if (result.ret != 0) {
var tip = result.err_info ? typeof result.err_info == 'string' ? result
.err_info : result.err_info.join('<br/>') : '';
- if (result.ret == 801) uni.showModal({
- title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
- else uni.showModal({
+ if (result.ret == 801) {
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ } else uni.showModal({
title: this.translateSys("tip"),
content: tip + ',' + this.translateSys('tip') + ':' + result
.ret,
@@ -955,6 +943,14 @@
this.DeleteObj(btn, style, enviroment);
// } else if (btn.FunCode == "TriggerEvent") {
// this.triggerEvent(btn, style, enviroment);
+ } else if (btn.FunCode == "TriggerEvent") {
+ this.TriggerEvent(btn, style, enviroment);
+ // } else if (btn.FunCode == "TriggerEvent") {
+ // this.triggerEvent(btn, style, enviroment);
+ } else if (btn.FunCode == "RelatedFunction") {
+ this.RelatedFunction(btn, style, enviroment);
+ // } else if (btn.FunCode == "TriggerEvent") {
+ // this.triggerEvent(btn, style, enviroment);
} else {
uni.showModal({
title: this.translateSys("tip"),
@@ -1056,6 +1052,92 @@
});
},
+ //鎵ц浜嬩欢
+ TriggerEvent(btn, style, enviroment) {},
+ //璺宠浆
+ async RelatedFunction(btn, style, enviroment) {
+
+ if (
+ btn.Related_Function?.Def_Code == "3018" ||
+ btn.Related_Function?.Def_Code == "3037" ||
+ btn.Related_Function?.Def_Code == "3200" ||
+ btn.Related_Function?.Def_Code == "3201" ||
+ btn.Related_Function?.Def_Code == "5600" ||
+ btn.Related_Function?.Def_Code == "5601" ||
+ btn.Related_Function?.Def_Code == "5602"
+ ) {
+ let name = btn.Related_Function?.Def_Code
+ if (btn.Related_Function?.Def_Code == "3018" || btn.Related_Function?.Def_Code == "3037")
+ name = btn.Related_Function?.Def_Code + "_2"
+
+ var $this = this;
+ var json = {
+ app_id: appId,
+ };
+ this.$store.dispatch('appGetInfo', json).then(success => {
+ // console.log(success);
+ if (success.err_code == 0) {
+ if ((success.result || []).length > 0) {
+ const app = success.result[0]
+ var param = "";
+ var appName = app.name || app.list_name
+ .Name;
+ var paramStr = app.param
+ if (paramStr) {
+ //mobox2鐨刾aram鏄痡son瀛楃涓�+ param = paramStr.replace(/\\/g, "");
+ //mobox3鐨刾aram鏄痓ase64瀛楃涓�+ if (!paramStr.includes('"')) param = Base64.decode(paramStr);
+ }
+ if (!param) {
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: this.translate('tip_no_app_param'),
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ return;
+ }
+
+ uni.navigateTo({
+ url: '../modal/' + name + '?param=' + param + "&titlename=" +
+ appName +
+ "&type=relatedFunction&attrValue=" + JSON.stringify(style
+ .form),
+ events: {
+ relatedFunction: function(data) {
+ console.log(data);
+ $this.Refresh();
+ },
+ }
+ });
+ } else {
+ uni.showModal({
+ title: this.translateSys("error"),
+ content: this.translate("function_not_exist"),
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ }
+ } else {
+ uni.showModal({
+ title: this.translateSys("error"),
+ content: success.msg,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ }
+ }).catch(ex => {
+ // console.log(ex);
+ uni.showModal({
+ title: this.translateSys("error"),
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ });
+ }
+ },
//鎵ц鍚庡鐞嗕簨浠� async AfterProcess_Event(clsId, afterProcess_Event, enviroment) {
try {
@@ -1094,7 +1176,8 @@
var attr = item.fieldId;
this.head_styledef.form.model[attr] = item.value;
var onChangeEvent = item.bind.onChangeEvent; //鍐呭鍙樺寲鍚庝簨浠�- var onSuffixClickCallbackEvent = item.bind.onSuffixClickCallbackEvent; //鍚庡浘鏍囩偣鍑讳簨浠�+ var onSuffixClickCallbackEvent = item.bind
+ .onSuffixClickCallbackEvent; //鍚庡浘鏍囩偣鍑讳簨浠� var onSuffixClickEvent = item.bind.onSuffixClickEvent; //鍚庡浘鏍囩偣鍑诲洖璋� var isflag = false;
@@ -1196,24 +1279,34 @@
if (ret.err_code == 0) {
var result = ret.result;
if (result.ret != 0) {
- var tip = result.err_info ? typeof result.err_info == 'string' ? result
+ var tip = result.err_info ? typeof result.err_info ==
+ 'string' ?
+ result
.err_info : result.err_info.join('<br/>') : '';
- if (result.ret == 801) uni.showModal({
+ if (result.ret == 801) {
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ } else uni.showModal({
title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
- else uni.showModal({
- title: this.translateSys("tip"),
- content: tip + ',' + this.translateSys('tip') + ':' + result
+ content: tip + ',' + this.translateSys('tip') +
+ ':' +
+ result
.ret,
showCancel: false,
confirmText: this.translateSys("cancel")
});
return false;
} else {
- var tip = result.info ? typeof result.info == 'string' ? result.info :
+ var tip = result.info ? typeof result.info == 'string' ? result
+ .info :
result.info.join('<br/>') : '';
if (tip) uni.showModal({
title: this.translateSys("tip"),
@@ -1227,16 +1320,23 @@
if (item.action_type == "set_dlg_attr") {
// value = {"attr":"xxx", "value":"xxx"}
var data = item.value;
- $this.$data.head_styledef.form.items.forEach(async (
- ele, index) => {
- data.forEach(async (ele2, index) => {
- if (ele.fieldId == ele2
- .attr) {
- ele.value = ele2
- .value;
- }
- });
- });
+ $this.$data.head_styledef.form.items
+ .forEach(
+ async (
+ ele, index) => {
+ data.forEach(async (ele2,
+ index) => {
+ if (ele
+ .fieldId ==
+ ele2
+ .attr
+ ) {
+ ele.value =
+ ele2
+ .value;
+ }
+ });
+ });
}
});
} else {
@@ -1274,7 +1374,8 @@
var tip = typeof ex == "string" ? ex : ex.message;
uni.showModal({
title: this.translateSys("error") + "8.2",
- content: this.translate('execute_after_change_event_failed') + this.translateSys(
+ content: this.translate('execute_after_change_event_failed') + this
+ .translateSys(
"comma") +
this.translate('reason') + this.translateSys("colon") + tip,
showCancel: false,
@@ -1301,23 +1402,33 @@
if (ret.err_code == 0) {
var result = ret.result;
if (result.ret != 0) {
- var tip = result.err_info ? typeof result.err_info == 'string' ? result
+ var tip = result.err_info ? typeof result.err_info ==
+ 'string' ?
+ result
.err_info : result.err_info.join('<br/>') : '';
- if (result.ret == 801) uni.showModal({
+ if (result.ret == 801) {
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ } else uni.showModal({
title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
- else uni.showModal({
- title: this.translateSys("tip"),
- content: tip + ',' + this.translateSys('tip') + ':' + result.ret,
+ content: tip + ',' + this.translateSys('tip') +
+ ':' +
+ result.ret,
showCancel: false,
confirmText: this.translateSys("cancel")
});
return false;
} else {
- var tip = result.info ? typeof result.info == 'string' ? result.info : result
+ var tip = result.info ? typeof result.info == 'string' ? result
+ .info : result
.info.join('<br/>') : '';
if (tip) uni.showModal({
title: this.translateSys("tip"),
@@ -1328,24 +1439,31 @@
if (result.result_type == 0 && result.action) {
result.action.forEach(item => {
- if (item.action_type == "goback_to_pre_page") { //杩斿洖涓婁竴椤�+ if (item.action_type ==
+ "goback_to_pre_page") { //杩斿洖涓婁竴椤� var value = item.value;
uni.navigateBack({
delta: 1, //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
});
- } else if (item.action_type == "hidden_button") { //闅愯棌鎸夐挳
+ } else if (item.action_type ==
+ "hidden_button") { //闅愯棌鎸夐挳
var value = item.value;
value.forEach(btn => {
- var index = $this.param.ListPage.Page_Button
- .findIndex(button => button.ShowName ==
+ var index = $this.param
+ .ListPage
+ .Page_Button
+ .findIndex(button => button
+ .ShowName ==
btn)
if (index > -1)
- $this.param.ListPage.Page_Button.splice(
+ $this.param.ListPage
+ .Page_Button.splice(
index, 1)
})
// } else if(item.action_type == "refresh_cur_row"){ //
// var value = item.value;
- } else if (item.action_type == "set_panel_html") { //鏄剧ずHtml椤甸潰
+ } else if (item.action_type ==
+ "set_panel_html") { //鏄剧ずHtml椤甸潰
// var value = item.value;
$this.ListHtml_Panel = item.value;
// $this.detail1StyleDefList.forEach((ele,index)=>{
@@ -1354,15 +1472,23 @@
} else {
uni.showModal({
- title: this.translateSys("tip"),
+ title: this.translateSys(
+ "tip"),
content: this.translateSys(
- "quotation_mark_left") + item
- .action_type + this.translateSys(
- "quotation_mark_right") + this
+ "quotation_mark_left"
+ ) +
+ item
+ .action_type + this
+ .translateSys(
+ "quotation_mark_right"
+ ) +
+ this
.translate(
- "tip_action_unprocessed"),
+ "tip_action_unprocessed"
+ ),
showCancel: false,
- confirmText: this.translateSys("cancel")
+ confirmText: this.translateSys(
+ "cancel")
});
}
});
@@ -1445,13 +1571,17 @@
var seps = [' not in', ' in', '<>', '!=', '<=', '>=', '<', '=', '>', ' like']
list.forEach(ls => {
var where = ls.trim()
- if (where.startsWith('(') && where.endsWith(')')) where = where.replace(/^\(/, '').replace(
+ if (where.startsWith('(') && where.endsWith(')')) where = where.replace(
+ /^\(/,
+ '').replace(
/\)$/, '')
if (where.toLowerCase().includes(' and ')) {
// 浜岀骇and鏀惧湪绗竴绾ф暟缁勪腑
where.split(/ and /i).forEach(li => {
var l = li.trim()
- if (l.startsWith('(') && l.endsWith(')')) l = l.replace(/^\(/, '').replace(
+ if (l.startsWith('(') && l.endsWith(')')) l = l.replace(
+ /^\(/,
+ '').replace(
/\)$/, '')
var sep = ''
for (var i = 0; i < seps.length; i++) {
@@ -1462,21 +1592,33 @@
}
if (sep) {
var values = l.split(new RegExp(sep, 'i'))
- var field = values[0]?.trim().replace(/^\[/, '').replace(/\]$/, '')
+ var field = values[0]?.trim().replace(/^\[/, '')
+ .replace(
+ /\]$/, '')
var value = ''
var op = sep.trim()
- if ([' in', ' not in'].includes(sep) && values[1]?.toLowerCase().includes(
- 'select ') && values[1]?.toLowerCase().includes(' from ')) {
- value = l.replace(field, '').replace(/^\s*(in|not in)\s*/i, '').trim()
- if (value.startsWith('(') && value.endsWith(')')) value = value
+ if ([' in', ' not in'].includes(sep) && values[1]
+ ?.toLowerCase().includes(
+ 'select ') && values[1]?.toLowerCase()
+ .includes(
+ ' from ')) {
+ value = l.replace(field, '').replace(
+ /^\s*(in|not in)\s*/i, '').trim()
+ if (value.startsWith('(') && value.endsWith(')'))
+ value = value
.replace(/^\(/, '').replace(/\)$/, '').trim()
} else {
- value = values[1]?.trim().replace(/^\'/, '').replace(/\'$/, '')
+ value = values[1]?.trim().replace(/^\'/, '')
+ .replace(
+ /\'$/, '')
if (['in', 'not in'].includes(op)) {
- value = value.replace(/^\(/, '').replace(/\)$/, '')
- value = value.split(',').map(v => v.trim().replace(/^\'/, '')
+ value = value.replace(/^\(/, '').replace(/\)$/,
+ '')
+ value = value.split(',').map(v => v.trim()
+ .replace(
+ /^\'/, '')
.replace(/\'$/, ''))
}
}
@@ -1492,7 +1634,9 @@
var s = []
where.split(/ or /i).forEach(li => {
var l = li.trim()
- if (l.startsWith('(') && l.endsWith(')')) l = l.replace(/^\(/, '').replace(
+ if (l.startsWith('(') && l.endsWith(')')) l = l.replace(
+ /^\(/,
+ '').replace(
/\)$/, '')
var sep = ''
for (var i = 0; i < seps.length; i++) {
@@ -1503,21 +1647,33 @@
}
if (sep) {
var values = l.split(new RegExp(sep, 'i'))
- var field = values[0]?.trim().replace(/^\[/, '').replace(/\]$/, '')
+ var field = values[0]?.trim().replace(/^\[/, '')
+ .replace(
+ /\]$/, '')
var value = ''
var op = sep.trim()
- if ([' in', ' not in'].includes(sep) && values[1]?.toLowerCase().includes(
- 'select ') && values[1]?.toLowerCase().includes(' from ')) {
- value = l.replace(field, '').replace(/^\s*(in|not in)\s*/i, '').trim()
- if (value.startsWith('(') && value.endsWith(')')) value = value
+ if ([' in', ' not in'].includes(sep) && values[1]
+ ?.toLowerCase().includes(
+ 'select ') && values[1]?.toLowerCase()
+ .includes(
+ ' from ')) {
+ value = l.replace(field, '').replace(
+ /^\s*(in|not in)\s*/i, '').trim()
+ if (value.startsWith('(') && value.endsWith(')'))
+ value = value
.replace(/^\(/, '').replace(/\)$/, '').trim()
} else {
- value = values[1]?.trim().replace(/^\'/, '').replace(/\'$/, '')
+ value = values[1]?.trim().replace(/^\'/, '')
+ .replace(
+ /\'$/, '')
if (['in', 'not in'].includes(op)) {
- value = value.replace(/^\(/, '').replace(/\)$/, '')
- value = value.split(',').map(v => v.trim().replace(/^\'/, '')
+ value = value.replace(/^\(/, '').replace(/\)$/,
+ '')
+ value = value.split(',').map(v => v.trim()
+ .replace(
+ /^\'/, '')
.replace(/\'$/, ''))
}
}
@@ -1533,7 +1689,9 @@
var li = where
// 鍗曚竴鏌ヨ鏉′欢鐩存帴鏀惧湪绗竴绾ф暟缁勪腑
var l = li.trim()
- if (l.startsWith('(') && l.endsWith(')')) l = l.replace(/^\(/, '').replace(/\)$/, '')
+ if (l.startsWith('(') && l.endsWith(')')) l = l.replace(/^\(/, '')
+ .replace(
+ /\)$/, '')
var sep = ''
for (var i = 0; i < seps.length; i++) {
if (l.toLowerCase().includes(seps[i])) {
@@ -1547,18 +1705,23 @@
var value = ''
var op = sep.trim()
- if ([' in', ' not in'].includes(sep) && values[1]?.toLowerCase().includes('select ') &&
+ if ([' in', ' not in'].includes(sep) && values[1]?.toLowerCase()
+ .includes('select ') &&
values[1]?.toLowerCase().includes(' from ')) {
- value = l.replace(field, '').replace(/^\s*(in|not in)\s*/i, '').trim()
- if (value.startsWith('(') && value.endsWith(')')) value = value.replace(/^\(/, '')
+ value = l.replace(field, '').replace(/^\s*(in|not in)\s*/i, '')
+ .trim()
+ if (value.startsWith('(') && value.endsWith(')')) value = value
+ .replace(/^\(/, '')
.replace(/\)$/, '').trim()
} else {
value = values[1]?.trim().replace(/^\'/, '').replace(/\'$/, '')
if (['in', 'not in'].includes(op)) {
value = value.replace(/^\(/, '').replace(/\)$/, '')
- value = value.split(',').map(v => v.trim().replace(/^\'/, '').replace(/\'$/,
- ''))
+ value = value.split(',').map(v => v.trim().replace(/^\'/,
+ '')
+ .replace(/\'$/,
+ ''))
}
}
sql.push([{
@@ -1696,7 +1859,7 @@
}
.dv-panel-buticon .btn-padding {
- padding: 0rpx 20rpx;
+ padding: 10rpx 20rpx;
display: inline-block;
vertical-align: middle;
}
diff --git a/pages/modal/5600.vue b/pages/modal/5600.vue
index 1024330..13cfe4c 100644
--- a/pages/modal/5600.vue
+++ b/pages/modal/5600.vue
@@ -742,12 +742,18 @@
if (result.ret != 0) {
var tip = result.err_info ? typeof result.err_info == 'string' ? result
.err_info : result.err_info.join('<br/>') : '';
- if (result.ret == 801) uni.showModal({
- title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
+ if (result.ret == 801) {
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ }
else uni.showModal({
title: this.translateSys("tip"),
content: tip + ',' + this.translateSys('tip') + ':' + result
@@ -1716,12 +1722,18 @@
if (result.ret != 0) {
var tip = result.err_info ? typeof result.err_info == 'string' ? result.err_info :
result.err_info.join('<br/>') : '';
- if (result.ret == 801) uni.showModal({
- title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
+ if (result.ret == 801){
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ }
else uni.showModal({
title: this.translateSys("tip"),
content: tip + ',' + this.translateSys('tip') + ':' + result.ret,
diff --git a/pages/modal/5601.vue b/pages/modal/5601.vue
index c4389c5..1bfc358 100644
--- a/pages/modal/5601.vue
+++ b/pages/modal/5601.vue
@@ -666,12 +666,18 @@
if (result.ret != 0) {
var tip = result.err_info ? typeof result.err_info == 'string' ? result
.err_info : result.err_info.join('<br/>') : '';
- if (result.ret == 801) uni.showModal({
- title: this.translateSys('tip'),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
+ if (result.ret == 801){
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ }
else uni.showModal({
title: this.translateSys('tip'),
content: tip + ',' + this.translateSys('tip') + ':' + result
@@ -1416,12 +1422,18 @@
var tip = result.err_info ? typeof result
.err_info == 'string' ? result.err_info :
result.err_info.join('<br/>') : '';
- if (result.ret == 801) uni.showModal({
- title: this.translateSys('tip'),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
+ if (result.ret == 801) {
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ }
else uni.showModal({
title: this.translateSys('tip'),
content: tip + ',' + this.translateSys('tip') + ':' + result.ret,
diff --git a/pages/modal/5602.vue b/pages/modal/5602.vue
index fcb74fd..402cc3a 100644
--- a/pages/modal/5602.vue
+++ b/pages/modal/5602.vue
@@ -24,7 +24,7 @@
:type="item.name=='Input'?'text':'number'" v-model="item.value" :disabled="item.disabled"
:placeholder="item.placeholder"
:style="{'width':item.setting.prefix && item.setting.suffix?'78%':item.setting.prefix || item.setting.suffix?'87%':'96%'}"
- :focus="focusFieldId == item.fieldId" @focus="ontap(index,item)" @click="onClick(item)"
+ :focus="focusFieldId == item.fieldId" @focus="ontap(index,item)" @click="onClick(item)"
@keyup.enter="onEnterChange(item)" @blur="onEnterChange(item)" />
<text v-if="item.setting.suffix" class="uni-icon" :class="[item.setting.suffix]"
@click="onEnterChange(item)"></text>
@@ -289,7 +289,7 @@
}
}
},
-
+
async Head_UIStyleGetInfo(class_id, style_id) { //鑾峰彇鑷畾涔夎〃鍗曟牱寮� var $this = this;
var dataInfo = {
@@ -493,7 +493,7 @@
});
});
},
- onClick(item) {
+ onClick(item) {
this.focusFieldId = item.fieldId
},
ontap(index, item) { //鎵爜鍔熻兘
@@ -523,7 +523,7 @@
var findd = false
for (let i in $this.head_styledef.form.items) {
const ele = $this.head_styledef.form.items[i]
-
+
if (ele.name != "Layout") {
if (ele.name == 'Input' || ele.name == 'InputNumber') {
if (attr == ele.fieldId) {
@@ -535,9 +535,9 @@
})
break
}
-
+
}
-
+
}
} else {
if (findd) {
@@ -551,7 +551,7 @@
})
break
}
-
+
} else {
let curIndex = ele.setting.colList.findIndex((col, index2, arr) => {
return attr == col.fieldId;
@@ -573,11 +573,11 @@
}
}
}
-
+
}
}
}
-
+
// if(onSuffixClickCallbackEvent.id){ //鍚庡浘鏍囩偣鍑讳簨浠� // this.onSuffixClick(onSuffixClickCallbackEvent);
// }
@@ -729,13 +729,18 @@
if (result.ret != 0) {
var tip = result.err_info ? typeof result.err_info == 'string' ? result
.err_info : result.err_info.join('<br/>') : '';
- if (result.ret == 801) uni.showModal({
- title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
- else uni.showModal({
+ if (result.ret == 801) {
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ } else uni.showModal({
title: this.translateSys("tip"),
content: tip + ',' + this.translateSys('tip') + ':' + result
.ret,
@@ -1702,13 +1707,18 @@
if (result.ret != 0) {
var tip = result.err_info ? typeof result.err_info == 'string' ? result.err_info :
result.err_info.join('<br/>') : '';
- if (result.ret == 801) uni.showModal({
- title: this.translateSys("tip"),
- content: tip,
- showCancel: false,
- confirmText: this.translateSys("cancel")
- });
- else uni.showModal({
+ if (result.ret == 801) {
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
+ }
+ uni.showModal({
+ title: this.translateSys("tip"),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys("cancel")
+ });
+ } else uni.showModal({
title: this.translateSys("tip"),
content: tip + ',' + this.translateSys('tip') + ':' + result.ret,
showCancel: false,
diff --git a/pages/modal/small-wnd/ext-button.vue b/pages/modal/small-wnd/ext-button.vue
new file mode 100644
index 0000000..19c2191
--- /dev/null
+++ b/pages/modal/small-wnd/ext-button.vue
@@ -0,0 +1,650 @@
+<template>
+ <view class="uni-page-modal-small-wnd-ref-ext-button">
+ <view class="uni-panel-ext-button">
+ <input class="uni-panel-input" type="text" v-model="visible" :disabled="disabled" @on-blur="onChange" />
+ <view class="uni-panel-right-ico">
+ <a @click="onClick"><i class="ace-icon fa fa-plus-circle"></i></a>
+ </view>
+ </view>
+ </view>
+</template>
+<script>
+ import {
+ Base64
+ } from "js-base64";
+ import lua from "@/lua";
+ import {
+ showError
+ } from "@/libs/util";
+ export default {
+ name: "OIDataSmallDialogRefExtButton",
+ components: {
+
+ },
+ props: {
+ clsId: String,
+ icon: String,
+ action: String,
+ beforeClickEvent: String,
+ callbackEvent: String,
+ enviroment: Object,
+ objAttr: Object,
+ modelValue: String,
+ form: Object,
+ disabled: Boolean,
+ },
+ data() {
+ return {
+ openDataQueryDlg: {
+ visible: false,
+ title: "",
+ param: {},
+ },
+ openSelectUserDlg: {
+ visible: false,
+ title: "",
+ subTitle: "",
+ orgShowDept: false,
+ orgShowUser: true,
+ orgShowRole: false,
+ showOrgTab: true,
+ showUserTab: true,
+ multi: false,
+ },
+ openCommonDlg: {
+ visible: false,
+ param: {},
+ },
+ };
+ },
+ computed: {
+ visible: {
+ get() {
+ return this.modelValue;
+ },
+ set(value) {
+ this.$emit("update:modelValue", value);
+ },
+ },
+ actionId() {
+ let id = this.action;
+ if (!id) return "";
+ if (id[0] != "{" && id[id.length - 1] != "}") id = `{${id}}`;
+ return id;
+ },
+ beforeClickEventId() {
+ let id = this.beforeClickEvent;
+ if (!id) return "";
+ if (id[0] != "{" && id[id.length - 1] != "}") id = `{${id}}`;
+ return id;
+ },
+ callbackEventId() {
+ let id = this.callbackEvent;
+ if (!id) return "";
+ if (id[0] != "{" && id[id.length - 1] != "}") id = `{${id}}`;
+ return id;
+ },
+ },
+ methods: {
+ async onClick() {
+ try {
+ if (!this.beforeClickEventId)
+ return this.$Message.warning("鏈寚瀹氣�鐐瑰嚮鎸夐挳鍓嶁�浜嬩欢");
+ if (!this.callbackEventId)
+ return this.$Message.warning("鏈寚瀹氣�鎸夐挳鍥炶皟鈥濅簨浠�);
+ this.dataObjRunCustomEvent_Return();
+
+ } catch (ex) {
+ this.showError(ex);
+ }
+ },
+ async onClicked({
+ inputParameter = {},
+ dataJson = []
+ }) {
+ try {
+ let extInfo = {
+ ...this.enviroment,
+ edit_dlg: {
+ type: "small",
+ class_id: this.clsId,
+ },
+ };
+ if (typeof inputParameter == "object")
+ inputParameter = JSON.stringify(inputParameter);
+ await lua(
+ this,
+ await runCustomEvent({
+ ed_type: 0,
+ class_id: this.clsId,
+ event_id: this.callbackEventId,
+ obj_attr: this.objAttr,
+ ext_info: Base64.encode(JSON.stringify(extInfo)),
+ data_json: Base64.encode(JSON.stringify(dataJson)),
+ input_param: Base64.encode(inputParameter),
+ })
+ );
+ } catch (ex) {
+ this.showError(ex);
+ }
+ },
+ dataObjRunCustomEvent(info, data_attr) {
+ var $this = this;
+ let extInfo = {
+ ...this.enviroment,
+ edit_dlg: {
+ type: "small",
+ class_id: this.clsId,
+ },
+ };
+
+ var global_attr = Base64.encode(JSON.stringify({})); //灏嗗瓧绗︿覆杞崲涓篵as}e64缂栫爜
+ if (info.dataJson)
+ info.dataJson = Base64.encode(JSON.stringify(info.dataJson)); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
+ var obj_attr = {};
+ info.attr.forEach(item => {
+ obj_attr[item.attr] = item.val;
+ });
+ extinfo = Base64.encode(JSON.stringify(extinfo)); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
+ var dataInfo = {
+ ed_type: info.edtype,
+ start_transaction: '',
+ class_id: info.clsid,
+ class_name: '',
+ event_id: info.eventid,
+ event_name: '',
+ data_obj_id: info.objid,
+ obj_attr: obj_attr,
+ prj_id: info.projectid,
+ ref_cls_id: info.rclsid,
+ rel_obj_id: info.robjid,
+ user_login: info.userlogin,
+ data_json: info.dataJson,
+ compose_info: '',
+ ext_info: extinfo,
+ global_attr: global_attr,
+ input_param: '',
+ };
+ console.log(dataInfo);
+ // return;
+ this.$store.dispatch('runCustomEvent', dataInfo).then(success => {
+ console.log(success);
+ if (success.err_code == 0) {
+ var data = success.result;
+ if (data.ret != 0) {
+ var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info :
+ data
+ .err_info.join('<br/>') : '';
+ if (data.ret == 801) uni.showModal({
+ title: this.translateSys('tip'),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys('cancel')
+ });
+ else uni.showModal({
+ title: this.translateSys('tip'),
+ content: tip + ',鎻愮ず:' + data.ret,
+ showCancel: false,
+ confirmText: this.translateSys('cancel')
+ });
+ return false
+ } else {
+ var tip = data.info ? typeof data.info == 'string' ? data.info : data.info
+ .join(
+ '<br/>') : '';
+ if (tip) uni.showModal({
+ title: this.translateSys('tip'),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys('cancel')
+ });
+
+ 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 (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;
+ }
+ }
+ }
+ }
+ } 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;
+ }
+ }
+ }
+ }
+ }
+ }
+ } else {
+ uni.showModal({
+ title: this.translateSys('error') + " 3",
+ content: success.err_msg,
+ showCancel: false,
+ confirmText: this.translateSys('cancel')
+ });
+ }
+ }).catch(ex => {
+ // console.log(ex);
+ uni.showModal({
+ title: this.translateSys('error') + " 3.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: this.translateSys('cancel')
+ });
+ });
+ },
+
+ dataObjRunCustomEvent_Return() {
+ let extInfo = {
+ ...this.enviroment,
+ edit_dlg: {
+ type: "small",
+ class_id: this.clsId,
+ },
+ };
+ extinfo = Base64.encode(JSON.stringify(extinfo)); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
+ var global_attr = Base64.encode(JSON.stringify({})); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
+ var dataInfo = {
+ ed_type: "0",
+ class_id: this.clsId,
+ event_id: this.beforeClickEventId,
+ obj_attr: this.objAttr,
+ ext_info: extinfo,
+ global_attr: global_attr,
+ };
+ console.log(dataInfo);
+ // return;
+ this.$store.dispatch('runCustomEvent', dataInfo).then(success => {
+ console.log(success);
+ if (success.err_code == 0) {
+ var data = success.result;
+ if (data.ret != 0) {
+ var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info :
+ data
+ .err_info.join('<br/>') : '';
+ if (data.ret == 801) uni.showModal({
+ title: this.translateSys('tip'),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys('cancel')
+ });
+ else uni.showModal({
+ title: this.translateSys('tip'),
+ content: tip + ',鎻愮ず:' + data.ret,
+ showCancel: false,
+ confirmText: this.translateSys('cancel')
+ });
+ return false
+ } else {
+ var tip = data.info ? typeof data.info == 'string' ? data.info : data.info
+ .join(
+ '<br/>') : '';
+ if (tip) uni.showModal({
+ title: this.translateSys('tip'),
+ content: tip,
+ showCancel: false,
+ confirmText: this.translateSys('cancel')
+ });
+
+ 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);
+
+ if (action.action_type == 'open_panel') {
+
+ uni.showModal({
+ title: this.translateSys('tip'),
+ content: action.action_type + '姝ction灏氭湭澶勭悊锛�
+ showCancel: false,
+ confirmText: this.translateSys('close')
+ })
+
+ } else if (action.action_type == 'open_select_userdlg') {
+ var style = val.style;
+ var $this = this;
+ var param = {
+ button_callback: ,
+ req: req,
+ data_attr: data_attr
+ }
+ uni.navigateTo({
+ url: '../selpsn/index?mulit=false¶m=' + JSON
+ .stringify(
+ param),
+ events: {
+ AddPer(data, param) {
+ console.log(data, param);
+ let inputParameter = data;
+ this.onClicked({
+ inputParameter
+ });
+ }
+ }
+ });
+ } else if (action.action_type == 'open_data_query_dlg') {
+ uni.showModal({
+ title: this.translateSys('tip'),
+ content: action.action_type + '姝ction灏氭湭澶勭悊锛�
+ showCancel: false,
+ confirmText: this.translateSys('close')
+ })
+ } else if (action.action_type == 'open_common_dlg') {
+ var $this = this;
+ if (val.common_dlg_id == 'check_list') {
+ $this.$data.check_list = val.config;
+ if (val.config.appear_style == 'sideslip') //鍒ゆ柇鏄惁鏄晶婊�+ $this.$data.popupType = 'right';
+ else
+ $this.$data.popupType = 'center'
+ // open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦�uni-popup 缁勪欢涓婄粦瀹�type灞炴�
+ $this.$refs.popup.open($this.$data.popupType);
+ var popupParam = {
+ index: index,
+ iindex: iindex,
+ button_callback: button_callback,
+ req: req,
+ data_attr: data_attr
+ }
+ $this.$data.popupParam = popupParam;
+ }
+ } else if (action.action_type == 'open_project_query_dlg') {
+ 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 +
+ '¶m=' +
+ 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 ($this.callbackEventId) {
+ var info = {
+ eventid: $this.callbackEventId,
+ edtype: "2",
+ projectid: data[0].ID,
+ rclsid: "",
+ robjid: "",
+ userlogin: "",
+ clsid: $this.clsId,
+ objid: "",
+ attr: param.req,
+ dataJson: [],
+ }
+
+ $this.DataObjRunCustomEvent(info);
+ }
+ }
+ }
+ });
+ } else {
+ var d = dialog({
+ title: '<i class="ace-icon fa fa-info-circle"></i> ' +
+ this.translateSys('tip'),
+ content: action.action_type + '姝ction灏氭湭澶勭悊锛�
+ });
+ d.show();
+ }
+ }
+ }
+ } else {
+ uni.showModal({
+ title: this.translateSys('tip') + "5.2",
+ content: '璋冪敤 before_click_button 鑴氭湰杩斿洖绌猴紝event_id' + eventid,
+ showCancel: false,
+ confirmText: this.translateSys('cancel')
+ });
+ }
+ }
+ } else {
+ uni.showModal({
+ title: this.translateSys('error') + " 5",
+ content: success.err_msg,
+ showCancel: false,
+ confirmText: this.translateSys('cancel')
+ });
+ }
+ }).catch(ex => {
+ // console.log(ex);
+ uni.showModal({
+ title: this.translateSys('tip') + "5.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: this.translateSys('cancel')
+ });
+ });
+ },
+
+ async onChange() {
+ try {
+ if (!this.actionId) return;
+ let extInfo = {
+ ...this.enviroment,
+ };
+ await lua(
+ this,
+ await runCustomEvent({
+ ed_type: 0,
+ class_id: this.clsId,
+ event_id: this.actionId,
+ obj_attr: this.objAttr,
+ ext_info: Base64.encode(JSON.stringify(extInfo)),
+ })
+ );
+ } catch (ex) {
+ this.showError(ex);
+ }
+ },
+ async onOpenDataQueryDlgOK(data) {
+ if (!data) throw new Error("鏈幏鍙栧埌閫変腑鏁版嵁");
+ let dataJson = [];
+ if (data instanceof Array) {
+ // 澶氶�
+ data.forEach((d) => {
+ let id = d.id;
+ let attrs = [];
+ Object.keys(d).forEach((attr) => {
+ let value = (d[attr] || "").replace(/ /g, " ");
+ attrs.push({
+ attr,
+ value
+ });
+ });
+ dataJson.push({
+ id,
+ attrs
+ });
+ });
+ } else if (data instanceof Object) {
+ // 鍗曢�
+ let id = data.id;
+ let attrs = [];
+ Object.keys(data).forEach((attr) => {
+ let value = (data[attr] || "").replace(/ /g, " ");
+ attrs.push({
+ attr,
+ value
+ });
+ });
+ // dataJson.push({ id, attrs });
+ dataJson = {
+ id,
+ attrs
+ };
+ }
+ this.onClicked({
+ dataJson
+ });
+ },
+ onOpenSelectUserDlgOK(list) {
+ let inputParameter = "";
+ let datas = [];
+ list.forEach((l) => {
+ datas.push({
+ id: l.id,
+ name: l.name,
+ type: l.type,
+ });
+ });
+ inputParameter = datas;
+ this.onClicked({
+ inputParameter
+ });
+ },
+ onOpenCommonDlgOK(datas) {
+ let inputParameter = "";
+ if (typeof datas == "string") inputParameter = datas;
+ else inputParameter = JSON.stringify(datas);
+ this.onClicked({
+ inputParameter
+ });
+ },
+ setFormValues(attrs) {
+ this.refSmallDialog.setFormValues(attrs);
+ },
+ hideFormItems(attrs) {
+ this.refSmallDialog.hideFormItems(attrs);
+ },
+ setFormAllValues(attrs) {
+ this.$emit("on-set-all-value", attrs);
+ },
+ showError(ex) {
+ showError(this, ex);
+ },
+ },
+ setup() {
+
+ },
+ };
+</script>
+
+<style lang="less">
+ .uni-page-modal-small-wnd-ref-ext-button {
+ .uni-panel-input-content {
+ display: flex;
+ flex-direction: row;
+ width: 100%;
+
+ .uni-panel-input {
+ flex: 1;
+ }
+
+ .uni-panel-right-ico {
+ padding: 5rpx;
+ margin: 5rpx;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/modal/small-wnd/line.vue b/pages/modal/small-wnd/line.vue
index ee958d2..bc40cd2 100644
--- a/pages/modal/small-wnd/line.vue
+++ b/pages/modal/small-wnd/line.vue
@@ -1,8 +1,5 @@
<template>
<view class="uni-page-modal-small-wnd-line">
-
-
-
<uni-forms ref="baseForm" :modelValue="form" :label-position="control_style=='宸﹀彸甯冨眬' ? 'left':'top'"
:label-align="control_style=='宸﹀彸甯冨眬' ? 'right':'left'" :label-width="titleWdith">
<view class="uni-group-item" v-for="(group,index) in show_style" :key="group.attrgroup_name">
@@ -18,6 +15,12 @@
v-for="(attr,i) in group.attrs" :key="`attr-${index}-${i}`">
<uni-forms-item :label="attrLabel(attr)" :required="attrRequired(attr)" :error="errTip[attr.attr]">
<view class="input-wrapper">
+ <view class="uni-panel-ext-button" v-if="attr.ext_button==true">
+ <input class="uni-panel-input" type="text" v-model="visible" :disabled="disabled" @on-blur="onChange" />
+ <view class="uni-panel-right-ico">
+ <a @click="onClickExtButton"><i class="ace-icon fa fa-plus-circle"></i></a>
+ </view>
+ </view>
<input v-if="attr.type == 'input'" :ref="`ref${attr.attr}`" v-model="form[attr.attr]"
:ref="`ref${attr.attr}`" :disabled="!attr.edit" @on-blur="onChange(attr)" />
<textarea v-else-if="attr.type == 'textarea'" :ref="`ref${attr.attr}`"
@@ -404,7 +407,9 @@
this.showError(ex);
}
},
- onClickExtButton(gindex, index) {},
+ onClickExtButton(gindex, index) {
+
+ },
onClickAddPsn(gindex, index) {},
onClickAddPrj(gindex, index) {},
--
Gitblit v1.9.1