From 2239ff215b1896273aa0714917011c23abbb0fd5 Mon Sep 17 00:00:00 2001
From: hanjian <272005125@qq.com>
Date: Tue, 3 Sep 2024 20:33:12 +0800
Subject: [PATCH] update
---
src/components/MonitorDrawer/index.vue | 1 +
src/views/tool/index.vue | 11 +-
.../workflowList/addWorkflow/tool_release.vue | 139 +++++++++---------
3 files changed, 79 insertions(+), 72 deletions(-)
diff --git a/src/components/MonitorDrawer/index.vue b/src/components/MonitorDrawer/index.vue
index 16897b4..36931a3 100644
--- a/src/components/MonitorDrawer/index.vue
+++ b/src/components/MonitorDrawer/index.vue
@@ -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
}
}
diff --git a/src/views/tool/index.vue b/src/views/tool/index.vue
index e9d0a2b..a3f0137 100644
--- a/src/views/tool/index.vue
+++ b/src/views/tool/index.vue
@@ -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
diff --git a/src/views/workflowList/addWorkflow/tool_release.vue b/src/views/workflowList/addWorkflow/tool_release.vue
index 01084af..8136466 100644
--- a/src/views/workflowList/addWorkflow/tool_release.vue
+++ b/src/views/workflowList/addWorkflow/tool_release.vue
@@ -2,17 +2,14 @@
- 流程监控
- 删除
- 提交
- 保存
- 关闭
+ 流程监控
+ 提交
+ 暂存
+ 撤销
+ 关闭
@@ -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