diff --git a/ruoyi-ui/src/views/flowable/definition/index.vue b/ruoyi-ui/src/views/flowable/definition/index.vue index 8e992877..6d8b72a6 100644 --- a/ruoyi-ui/src/views/flowable/definition/index.vue +++ b/ruoyi-ui/src/views/flowable/definition/index.vue @@ -25,15 +25,15 @@ - - - - - - - - - + + + + + + + + + 流程分类:
- + - - + + + - +
+ +
@@ -212,21 +215,23 @@ /> - +
+ +
- - - - - - - - - - + + + + + + + + + +
@@ -282,9 +287,11 @@ export default { formDeployTitle: "", formList: [], formTotal:0, - flowImageTitle: '', - flowImageOpen: false, - formRenderData:{}, + formConf: {}, // 默认表单数据 + readImage:{ + open: false, + src: "", + }, // bpmn.xml 导入 upload: { // 是否显示弹出层(xml导入) @@ -324,6 +331,7 @@ export default { deployId: null }, deployId: '', + currentRow: null, // xml flowData: {}, // 表单参数 @@ -412,25 +420,19 @@ export default { }, /** 流程图查看 */ handleReadImage(deployId){ - this.flowImageTitle = "流程图"; - this.flowImageOpen = true; + this.readImage.title = "流程图"; + this.readImage.open = true; + // this.readImage.src = process.env.VUE_APP_BASE_API + "/flowable/definition/readImage/" + deploymentId; flowXmlAndNode({deployId:deployId}).then(res => { this.flowData = res.data; }) }, /** 表单查看 */ - handleForm(formId) { - getForm(formId).then(res => { + handleForm(formId){ + getForm(formId).then(res =>{ this.formTitle = "表单详情"; this.formConfOpen = true; - // 回显表单 - this.$nextTick(() => { - this.$refs.vFormRef.setFormJson(res.data.formContent); - this.$nextTick(() => { - // 表单禁用 - this.$refs.vFormRef.disableForm(); - }) - }) + this.formConf = JSON.parse(res.data.formContent) }) }, /** 启动流程 */ @@ -477,22 +479,14 @@ export default { }, handleCurrentChange(data) { if (data) { - // 回显表单 - this.$nextTick(() => { - this.$refs.vFormRef.setFormJson(JSON.parse(data.formContent)); - // 加载表单填写的数据 - this.$nextTick(() => { - // 表单禁用 - this.$refs.vFormRef.disableForm(); - }) - }) + this.currentRow = JSON.parse(data.formContent); } }, /** 挂起/激活流程 */ handleUpdateSuspensionState(row){ let state = 1; if (row.suspensionState === 1) { - state = 2 + state = 2 } const params = { deployId: row.deploymentId,