From d0eedc364ccf9f7d0a43036d6b034f49180708a0 Mon Sep 17 00:00:00 2001 From: jt <jt@activesoft.com.cn> Date: 星期五, 31 五月 2024 09:11:29 +0800 Subject: [PATCH] test --- pages/modal/3018_2.vue | 58 +++++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 47 insertions(+), 11 deletions(-) diff --git a/pages/modal/3018_2.vue b/pages/modal/3018_2.vue index 5378344..d835297 100644 --- a/pages/modal/3018_2.vue +++ b/pages/modal/3018_2.vue @@ -823,6 +823,19 @@ ontap(item){ //鎵爜鍔熻兘 + // uni.scanCode({ + // //鎴愬姛鍥炶皟 + // success: function (res) { + // //鏉$爜绫诲瀷 + // console.log(res.scanType); + // //鏉$爜鐨勫� + // console.log(res.result); + // },//澶辫触鍥炶皟 + // fail: function (res) {}, + // //瀹屾垚鍥炶皟 + // complete: function (res) {}, + // }) + getApp().onScan((result)=>{ //console.log(result.decodedata); uni.hideKeyboard(); @@ -898,7 +911,7 @@ attr: req, dataJson:[], } - this.DataObjRunCustomEvent(info, data_attr); + this.DataObjRunCustomEvent(info, ""); } } @@ -1185,9 +1198,35 @@ } } } - } else if (data.action[i].action_type == 'set_global_attr') { - $this.$data.global_attr = data.action[i].value || []; - } + } else if (action.action_type == 'set_dlg_attr_show') { + var result = action.value; + result.forEach(async (attr,key) => { + $this.$data.head_styledef.form.items.forEach(async (ele,index) => { + //鍒ゆ柇鏄惁鏄爡鏍艰〃鍗�+ if(ele.name!='Layout'){ + if(ele.fieldId==attr.attr){ + ele.show=attr.show; + } + } else if(ele.name=='Layout'){ + ele.setting.colList.forEach(col=>{ + if(col){ + if(col.fieldId==attr.attr){ + col.show=attr.show; + } + } + }); + } + }); + }); + var head_styledef = JSON.parse(JSON.stringify($this.$data.head_styledef)); + $this.$data.head_styledef =[]; + $this.$data.head_styledef = head_styledef; + // console.log($this.$data.head_styledef); + } else if (action.action_type == 'set_global_attr') { + $this.$data.global_attr = action.value || []; + } else { + uni.showModal({title:"鎻愮ず",content:action.action_type + '姝ction灏氭湭澶勭悊锛�,showCancel:false,confirmText:"鍙栨秷"}); + } } } // var head_styledef = JSON.parse(JSON.stringify($this.head_styledef)); @@ -1460,13 +1499,10 @@ } } }); - } else { - var d = dialog({ - title: '<i class="ace-icon fa fa-info-circle"></i> ' + '鎻愮ず', - content: action.action_type + '姝ction灏氭湭澶勭悊锛� - }); - d.show(); - } + } + else { + uni.showModal({title:"鎻愮ず",content:action.action_type + '姝ction灏氭湭澶勭悊锛�,showCancel:false,confirmText:"鍙栨秷"}); + } } } }else{ -- Gitblit v1.9.1