cuiqian2004
2024-07-11 0df15ed47f6e2aa5eb0610890bed7dcbaabc7c92
test
1个文件已添加
13个文件已修改
1360 ■■■■ 已修改文件
locale/en.json 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
locale/es.json 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
locale/zh-Hans.json 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
locale/zh-Hant.json 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/index.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/modal/3018_2.vue 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/modal/3037_2.vue 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/modal/3200.vue 353 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/modal/5600.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/modal/5601.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/modal/5602.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/modal/small-wnd/ext-button.vue 650 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/modal/small-wnd/line.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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!"
}
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!"
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": "未设置编辑窗口样式",
    "page.cannot_empty": "不能为空",
    "page.required": "  必填"
    "page.required": "必填",
    "page.cannot_rlated_function": "不支持跳转到功能点",
    "page.function_not_exist": "功能点不存在!"
}
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": "功能點不存在!"
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" : {
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) { //判断是否是Mobox3
                            success.result.forEach(async (area, index) => {
                                if (area.client_type == 2) { //判断类型是否是PDA类型
@@ -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的param是base64字符串
                    if (!paramStr.includes('"')) param = Base64.decode(paramStr);
                }
                if (!param) {
                    uni.showModal({
                        title: this.translateSys("tip"),
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,
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,
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的param是json字符串
                                    param = paramStr.replace(/\\/g, "");
                                    //mobox3的param是base64字符串
                                    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, //返回层数,2则上上页
                                            });
                                        } 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;
        }
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,
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,
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)">&#xe568;</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,
pages/modal/small-wnd/ext-button.vue
New file
@@ -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({})); //将字符串转换为bas}e64编码
                if (info.dataJson)
                    info.dataJson = Base64.encode(JSON.stringify(info.dataJson)); //将字符串转换为base64编码
                var obj_attr = {};
                info.attr.forEach(item => {
                    obj_attr[item.attr] = item.val;
                });
                extinfo = Base64.encode(JSON.stringify(extinfo)); //将字符串转换为base64编码
                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)); //将字符串转换为base64编码
                var global_attr = Base64.encode(JSON.stringify({})); //将字符串转换为base64编码
                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 + '此action尚未处理!'
                                                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&param=' + 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 + '此action尚未处理!'
                                                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 == '我负责的项目')
                                                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 +
                                                    '&param=' +
                                                    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 + '此action尚未处理!'
                                            });
                                            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(/&nbsp;/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(/&nbsp;/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>
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) {},