fix -- 修复"发起流程"表单渲染不刷新问题

This commit is contained in:
konbai
2022-05-12 23:08:01 +08:00
parent b898d3275b
commit ed355c4a81

View File

@@ -3,7 +3,6 @@
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>发起流程</span> <span>发起流程</span>
<!-- <el-button style="float: right; padding: 3px 0" type="text">关闭</el-button>-->
</div> </div>
<el-col :span="18" :offset="3"> <el-col :span="18" :offset="3">
<div class="form-conf" v-if="formOpen"> <div class="form-conf" v-if="formOpen">
@@ -26,19 +25,22 @@ export default {
}, },
data() { data() {
return { return {
definitionId: null,
deployId: null,
formOpen: false, formOpen: false,
formData: {} formData: {},
} }
}, },
created() { beforeRouteEnter(to, from, next) {
this.definitionId = this.$route.query && this.$route.query.definitionId; next(vm => {
this.deployId = this.$route.query && this.$route.query.deployId; vm.initData()
this.getFormData(this.deployId); })
}, },
methods: { methods: {
/** 流程流转记录 */ initData() {
getFormData(deployId) { this.definitionId = this.$route.query && this.$route.query.definitionId;
getFormByDeployId(deployId).then(res => { this.deployId = this.$route.query && this.$route.query.deployId;
getFormByDeployId(this.deployId).then(res => {
if (res.data) { if (res.data) {
this.formData = res.data; this.formData = res.data;
this.formOpen = true this.formOpen = true