cuiqian2004
2025-08-29 7662665a4f88da0f8afa804bd4a34dfbefc1fb56
pages/modal/classAttr.vue
@@ -304,14 +304,17 @@
      dataObjAdd,
      dataObjRunCustomEvent
   } from "@/api/index.js"
   import {
      showInfo,
      showError
   } from "@/js/Page.js"
   export default {
      components: {
         pickerAddress
      },
      data() {
         return {
               largeMode: getApp().globalData.largeMode || false,
            largeMode: getApp().globalData.largeMode || false,
            title: '新增',
            param: {},
            focusField: "",
@@ -361,21 +364,13 @@
         this.title = param.Add_BtnName ? param.Add_BtnName : options.titlename; //设置按钮文字
         // console.log(param);
         if (!param.EditDlgMode) {
            uni.showModal({
               title: "提示",
               content: "该功能点未配置编辑窗口,请重新配置!",
               showCancel: false,
               confirmText: "取消"
            });
            showInfo("该功能点未配置编辑窗口,请重新配置!")
            return;
         }
         if (!param.Edit_dlg.Name) {
            uni.showModal({
               title: "提示",
               content: "该功能点未配置窗口样式,请重新配置!",
               showCancel: false,
               confirmText: "取消"
            });
            showInfo("该功能点未配置窗口样式,请重新配置!")
            return;
         }
         this.param = param;
@@ -429,12 +424,8 @@
               this.class_attr_init();
            } catch (ex) {
               uni.showModal({
                  title: "错误1",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: "取消"
               });
               showError(ex, "错误1" )
            }
         },
         classAttr_extButton(index, iindex) { //弹框层显示 type:top bottom center left right
@@ -463,21 +454,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;
            }
            this.DataObjRunCustomEvent_Return(before_click_button, data_attr, button_callback, index, iindex);
@@ -520,12 +503,8 @@
               }
            }
            if (!$this.popupParam) {
               uni.showModal({
                  title: "提示",
                  content: "popupParam为空!",
                  showCancel: false,
                  confirmText: "取消"
               });
               showInfo( "popupParam为空!")
               return;
            }
            $this.classAttrList[$this.popupParam.index].Attr[$this.popupParam.iindex].Value = name;
@@ -574,7 +553,7 @@
                     if (ele.hidden != true) {
                        if (utils.classUtils.attrTypeIsString(ele.Type) || utils.classUtils
                                 .attrTypeIsInt(ele.Type)) {
                           .attrTypeIsInt(ele.Type)) {
                           const field = `${e.target.dataset['index']}-${i}`
                           if (this
                              .focusOldField ==
@@ -888,16 +867,9 @@
            });
         },
         classAttr_AddRef(e) {
            console.log(e.target);
            uni.showModal({
               title: "提示",
               content: "此功能还未实现!",
               showCancel: false,
               confirmText: "取消"
            });
            // 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;
         },
            showInfo("此功能还未实现!")
            },
         classAttr_AddPrj(index, iindex) {
            var param = {
               index: index,
@@ -985,13 +957,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;
                  }
               }
@@ -1029,39 +996,25 @@
                  console.log(action);
                  if (action.ret == '0') {
                     if (action.ret != 0) {
                        uni.showModal({
                           title: "提示",
                           content: '执行脚本失败,' + action.result,
                           showCancel: false,
                           confirmText: "取消"
                        });
                        showError( '执行脚本失败,' + action.result, "提示")
                        return;
                     }
                     if (action.info) {
                        uni.showModal({
                           title: "提示",
                           content: '执行脚本失败,' + action.info,
                           showCancel: false,
                           confirmText: "取消"
                        });
                        showError( '执行脚本失败,' + action.info, "提示")
                        return;
                     }
                     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":""}"
                  }
               } else
                  uni.showToast({
                     title: "创建成功!",
                     icon: "success",
                     duration: 3000
                  });
                  showInfo("创建成功!");
               //刷新
               uni.redirectTo({
                  url: '../modal/classAttr?param=' + JSON.stringify(this.param) +
@@ -1072,12 +1025,7 @@
            }).catch(ex => {
               console.log(ex);
               uni.hideLoading();
               uni.showModal({
                  title: "提示",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: "取消"
               });
               showError(ex, "提示")
            });
         },
         class_attr_init() {
@@ -1230,12 +1178,8 @@
               console.log(this.classAttrList);
            } else {
               uni.showModal({
                  title: "提示",
                  content: "未找到可显示的的属性",
                  showCancel: false,
                  confirmText: "取消"
               });
               showInfo( "未找到可显示的的属性")
            }
         },
         ini_DataObjRunCustomEvent(info) {
@@ -1326,12 +1270,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还未处理!")
                     }
                     // else if (action_type == 'tip_dlg') {
@@ -1341,12 +1281,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) {
@@ -1490,12 +1425,7 @@
            }).catch(ex => {
               // console.log(ex);
               uni.showModal({
                  title: "错误3.1",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: "取消"
               });
            showError(ex, "提示3.1")
            });
         },
         OKDataObjRunCustomEvent() {
@@ -1584,12 +1514,7 @@
               this.add();
            }).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) {
@@ -1797,22 +1722,14 @@
                     }
                  }
               } 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")
            });
         },
         formatAttr(attr) {
@@ -2145,7 +2062,7 @@
      margin-top: 50rpx;
      padding: 15rpx;
      line-height: 1.5;
   /*    background: #27A6E1;
      /*    background: #27A6E1;
      border: none;
      color: #fff; */
      background: #fff;