| | |
| | | |
| | | |
| | | 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(); |
| | |
| | | attr: req, |
| | | dataJson:[], |
| | | } |
| | | this.DataObjRunCustomEvent(info, data_attr); |
| | | this.DataObjRunCustomEvent(info, ""); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | } 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 + '此action尚未处理!',showCancel:false,confirmText:"取消"}); |
| | | } |
| | | } |
| | | } |
| | | // var head_styledef = JSON.parse(JSON.stringify($this.head_styledef)); |
| | |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | | } |
| | | } |
| | | else { |
| | | uni.showModal({title:"提示",content:action.action_type + '此action尚未处理!',showCancel:false,confirmText:"取消"}); |
| | | } |
| | | } |
| | | } |
| | | }else{ |