Browse Source

动态表单配置

preview
wxz 2 years ago
parent
commit
cae3b9a56d
  1. 6
      epmet-oper-web/src/views/modules/dyform/createFormItem.vue
  2. 24
      epmet-oper-web/src/views/modules/dyform/itemList.vue

6
epmet-oper-web/src/views/modules/dyform/createFormItem.vue

@ -88,7 +88,7 @@ export default {
tableName: null,
columnName: null,
itemType: null,
required: null,
required: false,
optionSourceType: null,
optionSourceValue: null
},
@ -295,7 +295,7 @@ export default {
});
this.resetForm()
this.$emit("onClose") //
this.$emit("onClose", { type: 'submit' }) //
} else {
this.$message({
type: 'error',
@ -312,7 +312,7 @@ export default {
*/
onCancelBtnClick() {
this.resetForm()
this.$emit("onClose")
this.$emit("onClose", { type: 'cancel' })
},
resetForm() {

24
epmet-oper-web/src/views/modules/dyform/itemList.vue

@ -38,14 +38,15 @@
</el-card>
<el-card>
<!-- :span-method="mergeCells"-->
<!-- default-expand-all-->
<el-table
:span-method="mergeCells"
:data="formItemList"
style="width: 100%;margin-bottom: 20px;"
:span-method="mergeCells"
style="width: 100%"
row-key="id"
border
default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
:tree-props="{children: 'children'}">
<el-table-column
prop="formCode"
label="表单编码"
@ -61,6 +62,11 @@
label="表单项名称"
width="180">
</el-table-column>
<el-table-column
prop="parentItemLabel"
label="上级表单项"
width="180">
</el-table-column>
<el-table-column
prop="optionSourceType"
label="选项来源类型">
@ -213,10 +219,12 @@ export default {
this.setMergeRowQty(httpData.data[i], httpData.data[i + 1], i === 0);
// hasChildren
item.hasChildren = (item.children.length > 0);
// item.hasChildren = (item.children.length > 0);
}
debugger
this.formItemList = httpData.data;
console.log(this.formItemList)
})
})
},
@ -349,9 +357,11 @@ export default {
})
},
onClose() {
onClose({ type: type }) {
this.createDlgVisible = false;
if (type === 'submit') {
this.loadItemList() //
}
}
},

Loading…
Cancel
Save