| | |
| | | $this.$data.detail2_styledef = ret.result.style_def ? JSON.parse(styledef) : {}; |
| | | $this.$data.detail2_styledef.SelBut_Checked = false; |
| | | // console.log($this.$data.detail2_styledef); |
| | | $this.styleDef.form.attrs.forEach((attr) => { |
| | | // info[attr.name]=attr.value; |
| | | $this.detail2_styledef.form.items.forEach(async (ele, index) => { |
| | | if (ele.name != 'Layout') { |
| | | if (ele.fieldId == attr.name) { |
| | | ele.value = attr.value; |
| | | } |
| | | } else if (ele.name == 'Layout') { |
| | | ele.setting.colList.forEach(async (col, key) => { |
| | | if (col) { |
| | | if (col.fieldId == attr.name) { |
| | | col.value = attr.value; |
| | | } |
| | | if ($this.detail2_styledef.form?.items) { |
| | | $this.styleDef.form.attrs.forEach((attr) => { |
| | | // info[attr.name]=attr.value; |
| | | $this.detail2_styledef.form.items.forEach(async (ele, index) => { |
| | | if (ele.name != 'Layout') { |
| | | if (ele.fieldId == attr.name) { |
| | | ele.value = attr.value; |
| | | } |
| | | }); |
| | | } |
| | | } else if (ele.name == 'Layout') { |
| | | ele.setting.colList.forEach(async (col, key) => { |
| | | if (col) { |
| | | if (col.fieldId == attr.name) { |
| | | col.value = attr.value; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| | | setTimeout(function() { |
| | | var detail2_styledef = JSON.parse(JSON.stringify($this.detail2_styledef)); |
| | | $this.detail2_styledef = []; |