| | |
| | | } |
| | | } |
| | | } |
| | | } 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:"取消"}); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | uni.showModal({title:"提示",content:action.action_type + '此action尚未处理!',showCancel:false,confirmText:"取消"}); |
| | | } |
| | | } |
| | | } |