| | |
| | | //表单是否可编辑 |
| | | type:Boolean, |
| | | default:true |
| | | } |
| | | }, |
| | | initValue:{ |
| | | type: Object, |
| | | default: () => {}, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | watch: { |
| | | formItems: { |
| | | handler(val) { |
| | | if(val[0] &&val[0].column && val[0].column.isArray()){ |
| | | if (val[0] && val[0].column && val[0].column.isArray()) { |
| | | this.getInitGroup(val); |
| | | }else{ |
| | | } else { |
| | | this.getInit(val); |
| | | } |
| | | if (this.initValue) { |
| | | Object.assign(this.form, this.initValue); |
| | | } |
| | | }, |
| | | immediate: true, |
| | |
| | | code = this.initItem(code); |
| | | column.push(code); |
| | | this.allColumn.push(code); |
| | | console.log('allColumn',this.allColumn) |
| | | } |
| | | this.option.column = column; |
| | | }, |
| | |
| | | if(col.data && col.data.length>0){ |
| | | col.dicData = col.data.map((d) => { |
| | | return { |
| | | label: d.value, |
| | | key: d.key, |
| | | value: d.key, |
| | | label: d.key, |
| | | key: d.value, |
| | | value: d.value, |
| | | attributes:d.attributes |
| | | }; |
| | | }); |