fix: 修复流程设计保存成功后页面未刷新问题

rf
tony 2023-01-06 15:11:33 +08:00
parent 40fcf5ced2
commit 942f5e1f54
2 changed files with 35 additions and 23 deletions

View File

@ -172,16 +172,13 @@
</el-dialog> </el-dialog>
<!-- 流程图 --> <!-- 流程图 -->
<el-dialog :title="readImage.title" :visible.sync="readImage.open" width="70%" append-to-body> <el-dialog :title="flowImageTitle" :visible.sync="flowImageOpen" width="70%" append-to-body>
<!-- <el-image :src="readImage.src"></el-image> -->
<flow :flowData="flowData"/> <flow :flowData="flowData"/>
</el-dialog> </el-dialog>
<!--表单配置详情--> <!--表单配置详情-->
<el-dialog :title="formTitle" :visible.sync="formConfOpen" width="50%" append-to-body> <el-dialog :title="formTitle" :visible.sync="formConfOpen" width="50%" append-to-body>
<div class="test-form"> <v-form-render :form-data="formRenderData" ref="vFormRef"/>
<parser :key="new Date().getTime()" :form-conf="formConf" />
</div>
</el-dialog> </el-dialog>
<!--挂载表单--> <!--挂载表单-->
@ -215,9 +212,7 @@
/> />
</el-col> </el-col>
<el-col :span="14" :xs="24"> <el-col :span="14" :xs="24">
<div v-if="currentRow"> <v-form-render :form-data="formRenderData" ref="vFormRef"/>
<parser :key="new Date().getTime()" :form-conf="currentRow" />
</div>
</el-col> </el-col>
</el-row> </el-row>
</el-dialog> </el-dialog>
@ -287,11 +282,9 @@ export default {
formDeployTitle: "", formDeployTitle: "",
formList: [], formList: [],
formTotal:0, formTotal:0,
formConf: {}, // flowImageTitle: '',
readImage:{ flowImageOpen: false,
open: false, formRenderData:{},
src: "",
},
// bpmn.xml // bpmn.xml
upload: { upload: {
// xml // xml
@ -331,7 +324,6 @@ export default {
deployId: null deployId: null
}, },
deployId: '', deployId: '',
currentRow: null,
// xml // xml
flowData: {}, flowData: {},
// //
@ -344,6 +336,12 @@ export default {
created() { created() {
this.getList(); this.getList();
}, },
activated() {
const time = this.$route.query.t;
if (time != null) {
this.getList();
}
},
methods: { methods: {
/** 查询流程定义列表 */ /** 查询流程定义列表 */
getList() { getList() {
@ -414,19 +412,25 @@ export default {
}, },
/** 流程图查看 */ /** 流程图查看 */
handleReadImage(deployId){ handleReadImage(deployId){
this.readImage.title = "流程图"; this.flowImageTitle = "流程图";
this.readImage.open = true; this.flowImageOpen = true;
// this.readImage.src = process.env.VUE_APP_BASE_API + "/flowable/definition/readImage/" + deploymentId;
flowXmlAndNode({deployId:deployId}).then(res => { flowXmlAndNode({deployId:deployId}).then(res => {
this.flowData = res.data; this.flowData = res.data;
}) })
}, },
/** 表单查看 */ /** 表单查看 */
handleForm(formId){ handleForm(formId) {
getForm(formId).then(res =>{ getForm(formId).then(res => {
this.formTitle = "表单详情"; this.formTitle = "表单详情";
this.formConfOpen = true; this.formConfOpen = true;
this.formConf = JSON.parse(res.data.formContent) //
this.$nextTick(() => {
this.$refs.vFormRef.setFormJson(res.data.formContent);
this.$nextTick(() => {
//
this.$refs.vFormRef.disableForm();
})
})
}) })
}, },
/** 启动流程 */ /** 启动流程 */
@ -473,7 +477,15 @@ export default {
}, },
handleCurrentChange(data) { handleCurrentChange(data) {
if (data) { if (data) {
this.currentRow = JSON.parse(data.formContent); //
this.$nextTick(() => {
this.$refs.vFormRef.setFormJson(JSON.parse(data.formContent));
//
this.$nextTick(() => {
//
this.$refs.vFormRef.disableForm();
})
})
} }
}, },
/** 挂起/激活流程 */ /** 挂起/激活流程 */

View File

@ -108,8 +108,8 @@ export default {
saveXml(params).then(res => { saveXml(params).then(res => {
this.$modal.msgSuccess(res.msg) this.$modal.msgSuccess(res.msg)
// //
this.$store.dispatch("tagsView/delView", this.$route); const obj = { path: "/flowable/definition", query: { t: Date.now()} };
this.$router.go(-1) this.$tab.closeOpenPage(obj);
}) })
}, },
/** 指定流程办理人员列表 */ /** 指定流程办理人员列表 */