From b1f20a79e8c5635e0f8aeea42df1d5804fd6dc1f Mon Sep 17 00:00:00 2001 From: cuiqian2004 <cuiqian2004@163.com> Date: 星期一, 17 六月 2024 18:01:29 +0800 Subject: [PATCH] delete event --- pages/modal/3037_2.vue | 38 +++++++++++++++++++++++++++++++++----- 1 files changed, 33 insertions(+), 5 deletions(-) diff --git a/pages/modal/3037_2.vue b/pages/modal/3037_2.vue index 989eed7..7765a23 100644 --- a/pages/modal/3037_2.vue +++ b/pages/modal/3037_2.vue @@ -1547,7 +1547,7 @@ if (action.action_type == 'set_dlg_attr') { var result = action.value; for (var i = 0; i < result.length; i++) { - if (result[i].choice_list) { + if (result[i].choice_list) { for (var c = 0; c < $this.head_styledef.form.items.length; c++) { var attr = $this.head_styledef.form.items[c]; if(attr.name!='Layout'){ @@ -1616,9 +1616,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:"鍙栨秷"}); + } } } @@ -1882,7 +1908,9 @@ } } } - } + } else { + uni.showModal({title:"鎻愮ず",content:action.action_type + '姝ction灏氭湭澶勭悊锛�,showCancel:false,confirmText:"鍙栨秷"}); + } } } -- Gitblit v1.9.1