This commit is contained in:
hanjian 2024-09-03 20:33:12 +08:00
parent a9cc1de148
commit 2239ff215b
3 changed files with 79 additions and 72 deletions

View File

@ -33,6 +33,7 @@
let protocol = window.location.protocol
let hostname = window.location.hostname;
let workflowManageUrl = protocol + '//' + hostname + ':9080' + process.env.VUE_APP_WORKFLOW_MANAGE_URL
workflowManageUrl = 'http://124.223.108.21:9080/ebpm-process-manage'
this.src = workflowManageUrl + '/workflow/trace/traceProcess.do?processInstanceId=' + procInstId
}
}

View File

@ -501,9 +501,14 @@ export default {
// this.multiple = !selection.length;
},
handleDetail(row){
this.detailDrawerOpen = true
this.detailOpen = true
this.toolDetail = row
if(row.recordStatus === 'done'){
this.detailDrawerOpen = true
this.detailOpen = true
this.toolDetail = row
} else {
let status = row.recordStatus === 'draft' ? '1' : '0'
this.handleOpen({type:'tool_release', procInstId:row.procInstId, status:status})
}
},
handleFileDownload(row){
this.fileDetailDrawerOpen = true

View File

@ -2,17 +2,14 @@
<div v-loading="loading||detailLoading">
<div class="drawer-head">
<div class="cell-title">
<div v-if="pListData && pListData.procInstId">
<p class="title">审核工具</p>
</div>
<div v-else>新增工具</div>
<p class="title">工具发布</p>
</div>
<div class="cell-btn">
<el-button type="primary" v-if="pListData && pListData.procInstId" @click="handleMonitor">流程监控</el-button>
<el-button v-if="editStatus && pListData.procInstId" type="danger" @click="deleteForm">删除</el-button>
<el-button v-if="(editStatus || workflowStatus)" type="primary" @click="submitForm">提交</el-button>
<el-button v-if="editStatus" type="primary" @click="saveForm">保存</el-button>
<el-button @click="close">关闭</el-button>
<el-button type="primary" v-if="pListData && pListData.procInstId" @click="handleMonitor" icon="el-icon-data-line">流程监控</el-button>
<el-button v-if="(editStatus || workflowStatus)" type="primary" @click="submitForm" icon="el-icon-finished">提交</el-button>
<el-button v-if="editStatus && !pListData.procInstId" type="primary" @click="saveForm" icon="el-icon-check">暂存</el-button>
<el-button v-if="editStatus && pListData.procInstId" type="danger" @click="deleteForm" icon="el-icon-close">撤销</el-button>
<el-button @click="close" icon="el-icon-close">关闭</el-button>
</div>
</div>
<template v-if="attributeModelBool('approve') && workflowStatus">
@ -306,7 +303,7 @@ import {
import WorkflowLogs from '@/views/workflowList/workflowLogs/index.vue'
import AddDoc from '@/views/tool/AddDoc.vue'
import Treeselect from '@riophae/vue-treeselect'
import { deptTreeSelect } from "@/api/system/user";
import { addUser, deptTreeSelect, updateUser } from '@/api/system/user'
import { addTool, checkToolExist, getInfoByBpmcId, updateTool } from '@/api/tool/tool'
import blUserSelector from '@/components/user-selector/src/user-selector.vue'
import ToolSelector from '@/components/tool-selector/index.vue'
@ -576,67 +573,71 @@ export default {
//
saveForm() {
let _this = this
if (!_this.procDefKey) {
_this.$message.warning("尚未进行流程设置,将无法发起流程!");
return;
}
_this.loading = true
let formData = JSON.parse(JSON.stringify(_this.form))
formData.recordStatus = "draft";
formData.editStatus = _this.editStatus
formData.association = JSON.stringify(_this.form.association)
if (formData.toolId) {
this.$set(formData,'documentList',_this.docList)
updateTool(formData).then((res) => {
if (res.code===200) {
_this.$message({
message: '保存成功',//
type:'success',  //
duration:1200,  //, 0 1200
_this.$refs["eForm"].validate(valid => {
if (valid) {
if (!_this.procDefKey) {
_this.$message.warning("尚未进行流程设置,将无法发起流程!");
return;
}
_this.loading = true
let formData = JSON.parse(JSON.stringify(_this.form))
formData.recordStatus = "draft";
formData.editStatus = _this.editStatus
formData.association = JSON.stringify(_this.form.association)
if (formData.toolId) {
this.$set(formData,'documentList',_this.docList)
updateTool(formData).then((res) => {
if (res.code===200) {
_this.$message({
message: '保存成功',//
type:'success',  //
duration:1200,  //, 0 1200
});
}
}).finally(()=>{
_this.loading = false
});
} else {
let wf_receivers = [];
wf_receivers.push({
receiveUserId: _this.userInfo.userName,
receiveUserOrgId: _this.userInfo.deptId
});
let wf_procTitle = "【工具发布】" + (formData.toolName?formData.toolName:"")
formData.bpmClientInputModel = {
model: {
wf_procDefId: _this.pListData.procDefId,
wf_procDefKey: _this.procDefKey,
wf_procTitle: wf_procTitle,
wf_sendUserId: _this.userInfo.userName,
wf_sendUserOrgId: _this.userInfo.deptId,
wf_receivers: wf_receivers,
wf_curActDefName: _this.pListData.actDefName,
wf_curActDefId: _this.pListData.actDefId,
wf_nextActDefName: _this.pListData.actDefName,
wf_nextActDefId: _this.pListData.actDefId,
},
type: formData.type,
review: _this.attributeModelBool('approve'),
};
formData.editStatus = _this.editStatus
this.$set(formData,'documentList',_this.docList)
addTool(formData).then((res) => {
if (res.code===200) {
_this.form.toolId = res.data.businessKey;
_this.procInstInfoAndStatus(res.data.procInstId)
_this.$message({
message: '保存成功',//
type:'success',  //
duration:1200,  //, 0 1200
});
}
}).finally(()=>{
_this.loading = false
});
}
}).finally(()=>{
_this.loading = false
});
} else {
let wf_receivers = [];
wf_receivers.push({
receiveUserId: _this.userInfo.userName,
receiveUserOrgId: _this.userInfo.deptId
});
let wf_procTitle = "【工具发布】" + (formData.toolName?formData.toolName:"")
formData.bpmClientInputModel = {
model: {
wf_procDefId: _this.pListData.procDefId,
wf_procDefKey: _this.procDefKey,
wf_procTitle: wf_procTitle,
wf_sendUserId: _this.userInfo.userName,
wf_sendUserOrgId: _this.userInfo.deptId,
wf_receivers: wf_receivers,
wf_curActDefName: _this.pListData.actDefName,
wf_curActDefId: _this.pListData.actDefId,
wf_nextActDefName: _this.pListData.actDefName,
wf_nextActDefId: _this.pListData.actDefId,
},
type: formData.type,
review: _this.attributeModelBool('approve'),
};
formData.editStatus = _this.editStatus
this.$set(formData,'documentList',_this.docList)
addTool(formData).then((res) => {
if (res.code===200) {
_this.form.toolId = res.data.businessKey;
_this.procInstInfoAndStatus(res.data.procInstId)
_this.$message({
message: '保存成功',//
type:'success',  //
duration:1200,  //, 0 1200
});
}
}).finally(()=>{
_this.loading = false
});
}
}
});
},
deleteForm(){
let _this = this