cuiqian2004
2025-08-29 7662665a4f88da0f8afa804bd4a34dfbefc1fb56
pages/modal/ms_classAttr.vue
@@ -662,7 +662,9 @@
      dataObjDelele,
      dataObjRunCustomEvent
   } from "@/api/index.js"
   import {showInfo,
      showError,
      showLoading} from "@/js/Page.js"
   export default {
      components: {
         pickerAddress
@@ -708,21 +710,13 @@
         this.title = param.Add_BtnName ? param.Add_BtnName : options.titlename; //设置按钮文字
         console.log(param);
         if (!param.Master_Cls.View_Style) {
            uni.showModal({
               title: "提示",
               content: "该功能点未配置界面窗口,请重新配置!",
               showCancel: false,
               confirmText: "取消"
            });
            showInfo( "该功能点未配置界面窗口,请重新配置!")
            return;
         }
         if (!param.Master_Cls.View_Style.Name) {
            uni.showModal({
               title: "提示",
               content: "该功能点未配置窗口样式,请重新配置!",
               showCancel: false,
               confirmText: "取消"
            });
            showInfo( "该功能点未配置窗口样式,请重新配置!")
            return;
         }
         this.param = param;
@@ -772,25 +766,16 @@
               this.subClass_attr_init();
            } catch (ex) {
               console.log(ex)
               uni.showModal({
                  title: "错误1",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: "取消"
               });
               showError(ex,   "错误1")
            }
         },
         scan_classAttr_extButton(e) { //选择按钮前
            var $this = this;
            var Before_Select_Event = $this.param.Scan_Code.Before_Select_Event;
            if (!Before_Select_Event) {
               uni.showModal({
                  title: "提示",
                  content: "选择前事件为空!",
                  showCancel: false,
                  confirmText: "取消"
               });
               showInfo("选择前事件为空!")
               return;
            }
            var mast_attr = [];
@@ -800,12 +785,8 @@
               for (var j = 0; j < attr.length; j++) {
                  var ar = attr[j];
                  if (ar.Value == '请选择') {
                     uni.showModal({
                        title: "提示",
                        content: ar.DispName + "未选择数据!",
                        showCancel: false,
                        confirmText: "取消"
                     });
                     showInfo(ar.DispName + "未选择数据!")
                     return;
                  }
                  if (ar.Type == '引用对象(多个)')
@@ -860,13 +841,7 @@
                     if (ar.notempty == true && !ar.Value) {
                        // if(ar.NotEmpty=='1'){
                        uni.hideLoading();
                        // uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000});
                        uni.showModal({
                           title: "提示",
                           content: ar.DispName + '不能为空!',
                           showCancel: false,
                           confirmText: "取消"
                        });
                        showInfo( ar.DispName + '不能为空!');
                        return;
                     }
                  }
@@ -952,12 +927,8 @@
            var $this = this;
            var After_Select_Event = $this.param.Scan_Code.After_Select_Event;
            if (!After_Select_Event) {
               uni.showModal({
                  title: "提示",
                  content: "选择后事件为空!",
                  showCancel: false,
                  confirmText: "取消"
               });
               showInfo("选择后事件为空!")
               return;
            }
            var items = $this.check_list.items;
@@ -975,12 +946,8 @@
               }
            }
            if (data.length == 0) {
               uni.showModal({
                  title: "提示",
                  content: "未选择数据!",
                  showCancel: false,
                  confirmText: "取消"
               });
               showInfo("未选择数据!")
               return;
            }
            var mast_attr = [];
@@ -990,12 +957,8 @@
               for (var j = 0; j < attr.length; j++) {
                  var ar = attr[j];
                  if (ar.Value == '请选择') {
                     uni.showModal({
                        title: "提示",
                        content: ar.DispName + "未选择数据!",
                        showCancel: false,
                        confirmText: "取消"
                     });
                     showInfo( ar.DispName + "未选择数据!")
                     return;
                  }
                  mast_attr.push(this.formatAttr(ar))
@@ -1049,22 +1012,13 @@
               dataObjDelele(dataInfo).then(success => {
                  uni.hideLoading();
                  $this.subPanelList.splice(index, 1);
                  uni.showModal({
                     title: "提示",
                     content: "删除成功!",
                     showCancel: false,
                     confirmText: "取消"
                  });
                  showInfo("删除成功!")
               }).catch(ex => {
                  console.log(ex);
                  uni.hideLoading();
                  uni.showModal({
                     title: "提示9.1",
                     content: ex.errMsg,
                     showCancel: false,
                     confirmText: "取消"
                  });
                  showError(ex,   "错误9.1")
               });
            }
         },
@@ -1080,16 +1034,7 @@
               return result
            } catch (ex) {
               // console.log(ex);
               let exStr = JSON.stringify(ex)
               if (exStr == "{}")
                  exStr = ex
               let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
               uni.showModal({
                  title: "错误1.1",
                  content: tip,
                  showCancel: false,
                  confirmText: "取消"
               });
               showError(ex,   "错误1.1")
               return []
            };
         },
@@ -1109,16 +1054,7 @@
            } catch (ex) {
               // console.log(ex);
               let exStr = JSON.stringify(ex)
               if (exStr == "{}")
                  exStr = ex
               let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr
               uni.showModal({
                  title: "错误1.2",
                  content: tip,
                  showCancel: false,
                  confirmText: "取消"
               });
               showError(ex,   "错误1.2")
               return {}
            };
         },
@@ -1788,21 +1724,13 @@
            var before_click_button = $this.classAttrList[index].Attr[iindex].before_click_button;
            var button_callback = $this.classAttrList[index].Attr[iindex].button_callback;
            if (!before_click_button) {
               uni.showModal({
                  title: "提示",
                  content: "before_click_button-event_id为空!",
                  showCancel: false,
                  confirmText: "取消"
               });
               showInfo( "before_click_button-event_id为空!")
               return;
            }
            if (!button_callback) {
               uni.showModal({
                  title: "提示",
                  content: "button_callback-event_id为空!",
                  showCancel: false,
                  confirmText: "取消"
               });
               showInfo("button_callback-event_id为空!")
               return;
            }
            var data_attr = this.classAttrList[index].Attr[iindex];
@@ -1851,12 +1779,8 @@
         },
         classAttr_AddRef(e) {
            console.log(e.target);
            uni.showModal({
               title: "提示",
               content: "此功能还未实现!",
               showCancel: false,
               confirmText: "取消"
            });
            showInfo("此功能还未实现!")
            // var value=this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].RelCls[e.detail.value];
            // this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=value;
         },
@@ -1961,13 +1885,7 @@
                  if (ar.notempty == true && !ar.Value) {
                     // if(ar.NotEmpty=='1'){
                     uni.hideLoading();
                     // uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000});
                     uni.showModal({
                        title: "提示",
                        content: ar.DispName + '不能为空!',
                        showCancel: false,
                        confirmText: "取消"
                     });
                     showInfo( ar.DispName + '不能为空!');
                     return;
                  }
               }
@@ -2003,11 +1921,8 @@
               var action = JSON.parse(data.Action);
               if (action.ret == '0') {
                  if (action.result_type == '0') {
                     uni.showToast({
                        title: action.result,
                        icon: "success",
                        duration: 3000
                     });
                     showInfo( action.result)
                  }
                  // "{"ret":0, "result_type":0, "result":"创建成功123123123","info":""}"
               }
@@ -2021,12 +1936,7 @@
            }).catch(ex => {
               console.log(ex);
               uni.hideLoading();
               uni.showModal({
                  title: "提示",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: "取消"
               });
            showError(ex,   )
            });
         },
         class_attr_init() {
@@ -2195,12 +2105,8 @@
               // console.log(this.classAttrList);
            } else {
               uni.showModal({
                  title: "提示",
                  content: "未找到可显示的的属性",
                  showCancel: false,
                  confirmText: "取消"
               });
               showInfo( "未找到可显示的的属性")
            }
         },
         subClass_attr_init() {
@@ -2354,12 +2260,8 @@
               console.log(this.subClassAttrList);
            } else {
               uni.showModal({
                  title: "提示",
                  content: "未找到可显示的的属性",
                  showCancel: false,
                  confirmText: "取消"
               });
               showInfo( "未找到可显示的的属性")
            }
         },
         ini_DataObjRunCustomEvent(info) {
@@ -2455,12 +2357,8 @@
                           }
                        }
                     } else if (action_type == 'open_select_userdlg') {
                        uni.showModal({
                           title: "错误2.2",
                           content: "open_select_userdlg这个action_type还未处理!",
                           showCancel: false,
                           confirmText: "取消"
                        });
                        showInfo("open_select_userdlg这个action_type还未处理!")
                     }
                  }
               }
@@ -2468,12 +2366,7 @@
            }).catch(ex => {
               // console.log(ex);
               uni.showModal({
                  title: "错误2.1",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: "取消"
               });
               showError(ex,   "错误2.1")
            });
         },
         DataObjRunCustomEvent(info, data_attr) {
@@ -2614,12 +2507,7 @@
            }).catch(ex => {
               // console.log(ex);
               uni.showModal({
                  title: "错误3.1",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: "取消"
               });
               showError(ex,   "错误3.1")
            });
         },
         OKDataObjRunCustomEvent() {
@@ -2711,12 +2599,7 @@
            }).catch(ex => {
               // console.log(ex);
               uni.showModal({
                  title: "错误4.1",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: "取消"
               });
               showError(ex,   "错误4.1")
            });
         },
         DataObjRunCustomEvent_Return(eventid, data_attr, button_callback, index, iindex) {
@@ -2915,22 +2798,13 @@
                     }
                  }
               } else {
                  uni.showModal({
                     title: "提示5.2",
                     content: '调用 before_click_button 脚本返回空,event_id' + eventid,
                     showCancel: false,
                     confirmText: "取消"
                  });
                  showError('调用 before_click_button 脚本返回空,event_id' + eventid,   "错误5.2")
               }
            }).catch(ex => {
               // console.log(ex);
               uni.showModal({
                  title: "提示5.1",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: "取消"
               });
               showError(ex,   "错误5.1")
            });
         },
         scan_ini_DataObjRunCustomEvent(info) {
@@ -3026,13 +2900,10 @@
                              }
                           }
                        }
                     } else if (action_type == 'open_select_userdlg') {
                        uni.showModal({
                           title: "错误6.2",
                           content: "open_select_userdlg这个action_type还未处理!",
                           showCancel: false,
                           confirmText: "取消"
                        });
                     }
                     else if (action_type == 'open_select_userdlg') {
                        showInfo("open_select_userdlg这个action_type还未处理!")
                     }
                  }
               }
@@ -3040,12 +2911,7 @@
            }).catch(ex => {
               // console.log(ex);
               uni.showModal({
                  title: "错误6.1",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: "取消"
               });
               showError(ex,   "错误6.1")
            });
         },
         scan_DataObjRunCustomEvent(info, data_attr) {
@@ -3279,12 +3145,7 @@
            }).catch(ex => {
               // console.log(ex);
               uni.showModal({
                  title: "错误7.1",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: "取消"
               });
               showError(ex,   "错误7.1")
            });
         },
         scan_OKDataObjRunCustomEvent(eventID) {
@@ -3324,13 +3185,7 @@
                  if (ar.notempty == true && !ar.Value) {
                     // if(ar.NotEmpty=='1'){
                     uni.hideLoading();
                     // uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000});
                     uni.showModal({
                        title: "提示",
                        content: ar.DispName + '不能为空!',
                        showCancel: false,
                        confirmText: "取消"
                     });
                     showInfo(ar.DispName + '不能为空!')
                     return;
                  }
               }
@@ -3367,13 +3222,7 @@
                     if (ar.notempty == true && !ar.Value) {
                        // if(ar.NotEmpty=='1'){
                        uni.hideLoading();
                        // uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000});
                        uni.showModal({
                           title: "提示",
                           content: ar.DispName + '不能为空!',
                           showCancel: false,
                           confirmText: "取消"
                        });
                        showInfo(ar.DispName + '不能为空!')
                        return;
                     }
                  }
@@ -3430,12 +3279,8 @@
            }).catch(ex => {
               // console.log(ex);
               uni.hideLoading();
               uni.showModal({
                  title: "错误8.1",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: "取消"
               });
               showError(ex,   "错误8.1")
            });
         },
         scan_TriggerDataObjRunCustomEvent(eventID) {
@@ -3474,13 +3319,7 @@
                  if (ar.notempty == true && !ar.Value) {
                     // if(ar.NotEmpty=='1'){
                     uni.hideLoading();
                     // uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000});
                     uni.showModal({
                        title: "提示",
                        content: ar.DispName + '不能为空!',
                        showCancel: false,
                        confirmText: "取消"
                     });
                     showInfo(ar.DispName + '不能为空!')
                     return;
                  }
               }
@@ -3517,13 +3356,8 @@
                     if (ar.notempty == true && !ar.Value) {
                        // if(ar.NotEmpty=='1'){
                        uni.hideLoading();
                        // uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000});
                        uni.showModal({
                           title: "提示",
                           content: ar.DispName + '不能为空!',
                           showCancel: false,
                           confirmText: "取消"
                        });
                        showInfo(ar.DispName + '不能为空!')
                        return;
                     }
                  }
@@ -3580,12 +3414,7 @@
            }).catch(ex => {
               // console.log(ex);
               uni.hideLoading();
               uni.showModal({
                  title: "错误8.1",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: "取消"
               });
               showError(ex,   "错误8.1")
            });
         },
         formatAttr(attr) {