cuiqian2004
2024-06-14 c380a8d6e114ff623832d2b34fca52b10537a1d0
pages/modal/3018.vue
@@ -525,10 +525,19 @@
      components: {
            pickerAddress
        },
       onBackPress(e){
        // console.log("监听返回按钮事件",e);
        if(this.type){
           var eventChannel = this.$scope.eventChannel;
           // const eventChannel = this.getOpenerEventChannel();
           eventChannel.emit(this.type,"");
        }
       },
      data() {
         return {
            title: '新增',
            param:{},
            type:'',
            classAttrList:[],
            classGridStyle:[],
            edit_inital_event:"",  //弹窗初始化事件ID
@@ -548,7 +557,10 @@
         uni.setNavigationBarTitle({ title: options.titlename}); //设置顶部标题 
         var param = JSON.parse(options.param);
         this.$data.title = param.Add_BtnName?param.Add_BtnName:options.titlename; //设置按钮文字
         // console.log(param);
         if(options.type){
            this.$data.type = options.type;
         }
         console.log(param);
         if(!param.EditDlgMode){
            uni.showModal({title:"提示",content:"该功能点未配置编辑窗口,请重新配置!",showCancel:false,confirmText:"取消"});
            return;
@@ -973,6 +985,11 @@
            this.$refs.popup.close();
         },
         cancel(e){
            if(this.type){
               var eventChannel = this.$scope.eventChannel;
               // const eventChannel = this.getOpenerEventChannel();
               eventChannel.emit(this.type,"");
            }
            uni.navigateBack({
               delta:1 //返回层数,2则上上页
            });
@@ -981,7 +998,7 @@
            var $ele = e;
            //console.log(e.target)
            getApp().onScan((result)=>{
               //console.log(result.decodedata);
               console.log(result);
               this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result.decodedata;
               uni.hideKeyboard();
               this.onevent($ele,result.decodedata);
@@ -1403,7 +1420,7 @@
                  uni.redirectTo({
                     url:'../modal/3018?param='+JSON.stringify(this.$data.param)+"&titlename="+this.$data.title
                  });
                  // this.class_attr_init();
                  // this.cancel();
               }else{
                  uni.showModal({title:"错误",content:success.err_msg,showCancel:false,confirmText:"取消"});
               }
@@ -1475,7 +1492,7 @@
                      else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"});
                     return false
                  }else{
                     let tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : '';
                     var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : '';
                     if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"});
                  
                     if(data.action){
@@ -1620,7 +1637,7 @@
                      else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"});
                     return false
                  }else{
                     let tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : '';
                     var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : '';
                     if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"});
                  
                     var actionlist = data.action;
@@ -1810,7 +1827,7 @@
                      else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"});
                     return false
                  }else{
                     let tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : '';
                     var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : '';
                     if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"});
                  
                     var result = data.result;
@@ -1938,7 +1955,7 @@
                      else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"});
                     return false
                  }else{
                     let tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : '';
                     var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : '';
                     if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"});
                  
                     if (data != "") {