rev:更新流程实例

This commit is contained in:
2024-05-11 14:16:44 +08:00
parent ed91c89d4e
commit ccc198352a
6 changed files with 97 additions and 20 deletions

View File

@@ -68,4 +68,23 @@ export function getDeploymentById(id) {
})
}
export default {add, edit, del, getTypes, getTaskTypes, getStrategyList, publish, queryByParentId, getDeploymentById}
export function changeActive(data) {
return request({
url: 'api/bpmnExecution/changePdfActive',
method: 'post',
data
})
}
export default {
add,
edit,
del,
getTypes,
getTaskTypes,
getStrategyList,
publish,
queryByParentId,
getDeploymentById,
changeActive
}

View File

@@ -64,17 +64,43 @@
style="width: 100%;"
>
<el-table-column type="selection" width="55"/>
<el-table-column prop="proc_inst_id" label="当前流程"/>
<el-table-column prop="parent_id" label="父流程"/>
<el-table-column prop="deployment_id" label="当前实例版本"/>
<el-table-column prop="activity_id" label="当前实例节点"/>
<el-table-column prop="activity_name" label="当前实例节点名称"/>
<el-table-column prop="is_active" label="启用"/>
<el-table-column prop="status" label="实例状态"/>
<el-table-column prop="proc_inst_id" show-overflow-tooltip show-tooltip-when-overflow width="200" label="流程标识"/>
<el-table-column prop="parent_id" width="200" label="父流程"/>
<el-table-column v-if="false" prop="deployment_id" label="当前实例标识"/>
<el-table-column prop="deployment_name" show-overflow-tooltip show-tooltip-when-overflow width="130"
label="当前实例名称"/>
<el-table-column v-if="false" prop="activity_id" label="当前实例节点"/>
<el-table-column prop="activity_name" show-overflow-tooltip show-tooltip-when-overflow width="130"
label="当前实例节点名称"/>
<el-table-column prop="is_active" label="启用">
<template slot-scope="scope">
<el-switch
v-model="scope.row.is_active"
active-color="#13ce66"
:active-value=true
:inactive-value=false
@change="changeActive(scope.row)"
inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="status" label="实例状态">
<template slot-scope="scope">
<span
v-for="(item, index) in statusList"
:key="index"
:value="item.value"
v-if="scope.row.status == item.value"
>
{{ item.label }}
</span>
</template>
</el-table-column>
<el-table-column prop="remark" show-overflow-tooltip show-tooltip-when-overflow label="备注"/>
<el-table-column prop="form_id" label="业务主键"/>
<el-table-column prop="form_type" label="业务类型"/>
<el-table-column prop="form_data" show-overflow-tooltip show-tooltip-when-overflow label="业务数据"/>
<el-table-column prop="form_id" show-overflow-tooltip show-tooltip-when-overflow width="130" label="业务主键"/>
<el-table-column prop="form_type" show-overflow-tooltip show-tooltip-when-overflow width="130" label="业务类型"/>
<el-table-column prop="form_data" show-overflow-tooltip show-tooltip-when-overflow width="130"
show-overflow-tooltip show-tooltip-when-overflow label="业务数据"/>
<el-table-column prop="create_id" label="创建人" width="135"/>
<el-table-column prop="create_time" label="创建时间" width="135"/>
<el-table-column prop="update_time" label="修改时间" width="135"/>
@@ -149,6 +175,16 @@ export default {
formTypes: [],
permission: {},
modelJson: '',
statusList: [
{
value: "30",
label: "未知"
},
{
value: "20",
label: "未知"
}
],
rules: {
name: [
{required: true, message: '不能为空', trigger: 'blur'}
@@ -165,20 +201,17 @@ export default {
},
viewClick(row) {
curdExecution.getDeploymentById(row.deployment_id).then(res => {
this.$refs.viewCurrentFlowDesigner.showLogicFlowDesigner(res.model_editor_json,row);
this.$refs.viewCurrentFlowDesigner.showLogicFlowDesigner(res.model_editor_json, row);
})
},
//logicflow怎么设置当前节点的颜色
load(tree, treeNode, resolve) {
console.log(tree)
console.log(treeNode)
setTimeout(() => {
curdExecution.queryByParentId(tree.proc_inst_id).then(res => {
console.log(res)
resolve(res)
})
resolve(tree.children)
}, 100)
},
changeActive(row) {
curdExecution.changeActive(row)
}
}
}
</script>