fix -- 修复因查询xml接口修改,导致其他页面无法加载流程图和表单的bug
This commit is contained in:
@@ -117,13 +117,13 @@
|
||||
<!-- 发起流程 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="60%" append-to-body>
|
||||
<el-table v-loading="processLoading" fit :data="definitionList" border >
|
||||
<el-table-column label="流程名称" align="center" prop="name" />
|
||||
<el-table-column label="流程名称" align="center" prop="processName" />
|
||||
<el-table-column label="流程版本" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium" >v{{ scope.row.version }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="流程分类" align="center" prop="category" />
|
||||
<el-table-column label="流程分类" align="center" prop="categoryCode" />
|
||||
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -265,19 +265,20 @@ export default {
|
||||
},
|
||||
listDefinition(){
|
||||
listDefinition(this.queryParams).then(response => {
|
||||
this.definitionList = response.data.records;
|
||||
this.processTotal = response.data.total;
|
||||
this.definitionList = response.rows;
|
||||
this.processTotal = response.total;
|
||||
this.processLoading = false;
|
||||
});
|
||||
},
|
||||
/** 发起流程申请 */
|
||||
handleStartProcess(row){
|
||||
this.$router.push({ path: '/task/record/index',
|
||||
this.$router.push({
|
||||
path: '/task/record/index',
|
||||
query: {
|
||||
definitionId: row.definitionId,
|
||||
deployId: row.deploymentId,
|
||||
procDefId:row.id,
|
||||
finished: true
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 取消流程申请 */
|
||||
|
||||
@@ -227,7 +227,7 @@ export default {
|
||||
instanceId: "", // 流程实例编号
|
||||
deployId: "", // 流程定义编号
|
||||
taskId: "" ,// 流程任务编号
|
||||
procDefId: "", // 流程编号
|
||||
definitionId: "", // 流程编号
|
||||
vars: "",
|
||||
targetKey:""
|
||||
},
|
||||
@@ -251,14 +251,13 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.taskForm.deployId = this.$route.query && this.$route.query.deployId;
|
||||
this.taskForm.definitionId = this.$route.query && this.$route.query.definitionId;
|
||||
this.taskForm.taskId = this.$route.query && this.$route.query.taskId;
|
||||
this.taskForm.procInsId = this.$route.query && this.$route.query.procInsId;
|
||||
this.taskForm.instanceId = this.$route.query && this.$route.query.procInsId;
|
||||
// 初始化表单
|
||||
this.taskForm.procDefId = this.$route.query && this.$route.query.procDefId;
|
||||
// 回显流程记录
|
||||
this.getFlowViewer(this.taskForm.procInsId);
|
||||
this.getModelDetail(this.taskForm.deployId);
|
||||
this.getModelDetail(this.taskForm.definitionId);
|
||||
// 流程任务重获取变量表单
|
||||
if (this.taskForm.taskId){
|
||||
this.processVariables( this.taskForm.taskId)
|
||||
@@ -307,11 +306,11 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
/** xml 文件 */
|
||||
getModelDetail(deployId) {
|
||||
getModelDetail(definitionId) {
|
||||
// 发送请求,获取xml
|
||||
readXml(deployId).then(res => {
|
||||
readXml(definitionId).then(res => {
|
||||
this.xmlData = res.data
|
||||
this.loadIndex = deployId
|
||||
this.loadIndex = definitionId
|
||||
})
|
||||
},
|
||||
getFlowViewer(procInsId) {
|
||||
@@ -491,10 +490,10 @@ export default {
|
||||
const formData = data.formData;
|
||||
formData.disabled = true;
|
||||
formData.formBtns = false;
|
||||
if (this.taskForm.procDefId) {
|
||||
if (this.taskForm.definitionId) {
|
||||
variables.variables = formData;
|
||||
// 启动流程并将表单数据加入流程变量
|
||||
definitionStart(this.taskForm.procDefId, JSON.stringify(variables)).then(res => {
|
||||
definitionStart(this.taskForm.definitionId, JSON.stringify(variables)).then(res => {
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
this.goBack();
|
||||
})
|
||||
|
||||
@@ -141,14 +141,17 @@ export default {
|
||||
});
|
||||
},
|
||||
// 跳转到处理页面
|
||||
handleProcess(row){
|
||||
this.$router.push({ path: '/task/record/index',
|
||||
handleProcess(row) {
|
||||
this.$router.push({
|
||||
path: '/task/record/index',
|
||||
query: {
|
||||
definitionId: row.procDefId,
|
||||
procInsId: row.procInsId,
|
||||
deployId: row.deployId,
|
||||
taskId: row.taskId,
|
||||
finished: true
|
||||
}})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
||||
Reference in New Issue
Block a user