动态表单
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="add-config">
|
||||
<div class="add-config" :class="[activeStep == 1 ? 'formLayout' : '']">
|
||||
<ai-detail>
|
||||
<ai-title slot="title" :title="detailTitle" isShowBack isShowBottomBorder @onBackClick="handleBack"/>
|
||||
<template slot="step">
|
||||
@@ -53,7 +53,8 @@ export default {
|
||||
},
|
||||
processAnnexDefs: [],
|
||||
detailObj: {},
|
||||
refresh: true
|
||||
refresh: true,
|
||||
tableFieldInfos: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -85,12 +86,9 @@ export default {
|
||||
this.handleBaseInfo()
|
||||
break
|
||||
case 1:
|
||||
this.$refs['applyForm'].handleApplyForm().then(ret => {
|
||||
this.applyForm.tableId = ret.id
|
||||
this.applyForm.approvalSteps = ret.approvalSteps.toString()
|
||||
this.$refs['applyForm'].onConfirm().then(res => {
|
||||
this.tableFieldInfos = res
|
||||
this.activeStep++
|
||||
}).catch(err => {
|
||||
console.error(err);
|
||||
})
|
||||
break
|
||||
case 2:
|
||||
@@ -106,7 +104,7 @@ export default {
|
||||
handleBaseInfo() {
|
||||
this.$refs['baseInfo'].banseInfoForm().then(res => {
|
||||
if (res) {
|
||||
this.$refs['applyForm'].getFormList()
|
||||
// this.$refs['applyForm'].getFormList()
|
||||
this.baseInfo = res
|
||||
this.activeStep++
|
||||
}
|
||||
@@ -121,7 +119,10 @@ export default {
|
||||
...this.detailObj,
|
||||
...this.baseInfo,
|
||||
processDefStatus: Number(this.baseInfo.processDefStatus),
|
||||
tableId: this.applyForm.tableId,
|
||||
tableInfo: {
|
||||
tableFieldInfos: this.tableFieldInfos
|
||||
},
|
||||
tableType: 0,
|
||||
processAnnexDefs: this.annexs.map(e => ({...e, mustFill: Number(e.mustFill)})),
|
||||
processNodeList: res.processNodeList,
|
||||
processType: this.processType
|
||||
@@ -168,6 +169,15 @@ export default {
|
||||
.add-config {
|
||||
height: 100%;
|
||||
|
||||
&.formLayout {
|
||||
::v-deep .ai-detail__content--wrapper {
|
||||
max-width: 100%;
|
||||
height: calc(100%)!important;
|
||||
padding: 0!important;
|
||||
overflow: hidden!important;
|
||||
}
|
||||
}
|
||||
|
||||
.step {
|
||||
width: 100%;
|
||||
height: 72px;
|
||||
|
||||
Reference in New Issue
Block a user