提交代码

dev_xds
姜玉琦 2023-09-12 01:52:22 +08:00
parent bca6a3aafd
commit a2581d63e9
16 changed files with 532 additions and 65 deletions

View File

@ -107,7 +107,11 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
taskService.addComment(taskVo.getTaskId(), taskVo.getInstanceId(), FlowComment.DELEGATE.getType(), taskVo.getComment());
taskService.resolveTask(taskVo.getTaskId(), taskVo.getVariables());
} else {
taskService.addComment(taskVo.getTaskId(), taskVo.getInstanceId(), FlowComment.NORMAL.getType(), taskVo.getComment());
if(task.getName().equals("提交申请")){
taskService.addComment(taskVo.getTaskId(), taskVo.getInstanceId(), FlowComment.NORMAL.getType(), "重新提交流程申请!!");
}else{
taskService.addComment(taskVo.getTaskId(), taskVo.getInstanceId(), FlowComment.NORMAL.getType(), taskVo.getComment());
}
taskService.setAssignee(taskVo.getTaskId(), taskVo.getUserId());
taskService.complete(taskVo.getTaskId(), taskVo.getVariables());
}

View File

@ -29,6 +29,7 @@
FROM
vw_flow_all fa
<where>
<if test="taskName != null and taskName != ''"> and fa.taskName like concat('%', #{taskName}, '%')</if>
<if test="procDefName != null and procDefName != ''"> and fa.procDefName like concat('%', #{procDefName}, '%')</if>
<if test="businessKey != null and businessKey != ''"> and fa.businessKey = #{businessKey}</if>
<if test="startDeptName != null and startDeptName != ''"> and fa.startDeptName like concat('%', #{startDeptName}, '%')</if>
@ -37,9 +38,9 @@
<if test="category != null and category != ''"> and fa.category = #{category}</if>
<if test="params.beginDate != null and params.beginDate != '' and params.endDate != null and params.endDate != ''"> and fa.createTime between #{params.beginDate} and #{params.endDate}</if>
<!-- 查询条件-项目部门 -->
<if test="projectDeptId != null "> and fa.businesDeptId = #{projectDeptId}</if>
<if test="projectDeptId != null "> and fa.businessDeptId = #{projectDeptId}</if>
<!--子部门数据-->
<if test='nowRole == "4"'> and fa.businesDeptId = #{nowDept}</if>
<if test='nowRole == "4"'> and fa.businessDeptId = #{nowDept}</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and fa.businessKey in (select DISTINCT projectId from sur_project_unit_info where unitId=#{nowDept} and del_flag=0)</if>
<!--普通用户查询项目人员-->
@ -70,9 +71,9 @@
<if test="category != null and category != ''"> and fa.category = #{category}</if>
<if test="params.beginDate != null and params.beginDate != '' and params.endDate != null and params.endDate != ''"> and fa.createTime between #{params.beginDate} and #{params.endDate}</if>
<!-- 查询条件-项目部门 -->
<if test="projectDeptId != null "> and fa.businesDeptId = #{projectDeptId}</if>
<if test="projectDeptId != null "> and fa.businessDeptId = #{projectDeptId}</if>
<!--子部门数据-->
<if test='nowRole == "4"'> and fa.businesDeptId = #{nowDept}</if>
<if test='nowRole == "4"'> and fa.businessDeptId = #{nowDept}</if>
<!--监理单位/总包公司/分包单位查询当前关联数据-->
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and fa.businessKey in (select DISTINCT projectId from sur_project_unit_info where unitId=#{nowDept} and del_flag=0)</if>
<!--普通用户查询项目人员-->

View File

@ -54,6 +54,10 @@ export default {
return variables;
}
},
mounted() {
//tips
this.$store.dispatch('settingAwaitNum');
},
methods: {
handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })

View File

@ -1,3 +1,5 @@
import { start } from "nprogress"
const getters = {
sidebar: state => state.app.sidebar,
size: state => state.app.size,
@ -17,5 +19,6 @@ const getters = {
topbarRouters:state => state.permission.topbarRouters,
defaultRoutes:state => state.permission.defaultRoutes,
sidebarRouters:state => state.permission.sidebarRouters,
awaitTaskNum:state => state.flowtask.awaitTaskNum
}
export default getters

View File

@ -3,6 +3,7 @@ import Vuex from 'vuex'
import app from './modules/app'
import dict from './modules/dict'
import user from './modules/user'
import flowtask from './modules/flowtask'
import tagsView from './modules/tagsView'
import permission from './modules/permission'
import settings from './modules/settings'
@ -17,7 +18,8 @@ const store = new Vuex.Store({
user,
tagsView,
permission,
settings
settings,
flowtask
},
getters
})

View File

@ -102,7 +102,7 @@
<template slot-scope="scope">
<el-tag v-if="scope.row.finishTime == null" size="mini"></el-tag>
<el-tag type="success" v-if="scope.row.finishTime != null && scope.row.ASSIGNEE_ != null" size="mini"></el-tag>
<el-tag type="danger" v-if="scope.row.finishTime != null && scope.row.ASSIGNEE_ == null" size="mini"></el-tag>
<el-tag type="danger" v-if="scope.row.finishTime != null && scope.row.ASSIGNEE_ == null" size="mini"></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="150" align="center" fixed="right" class-name="small-padding fixed-width">

View File

@ -180,7 +180,7 @@ export default {
this.jdtitle="进行中";
this.showjd=true;
}else if(options.finishTime!=null && options.assigneeId==null){
this.jdtitle="已撤销";
this.jdtitle="已终止";
}else{
this.jdtitle="已完成";
}
@ -356,7 +356,6 @@ export default {
let flowRecordList = this.flowRecordList;
for(let i=0;i<flowRecordList.length;i++){
if(flowRecordList[i].taskDefKey==val){
console.log(i);
return "驳回至"+flowRecordList[i].taskName;
}
}
@ -425,7 +424,7 @@ export default {
}
.djs-container svg {
min-height: 650px;
min-height: 150px;
}
.highlight.djs-shape .djs-visual > :nth-child(1) {

View File

@ -210,7 +210,7 @@
this.jdtitle="进行中";
this.showjd=true;
}else if(options.finishTime!=null && options.assigneeId==null){
this.jdtitle="已撤销";
this.jdtitle="已终止";
}else{
this.jdtitle="已完成";
}
@ -385,7 +385,6 @@
let flowRecordList = this.flowRecordList;
for(let i=0;i<flowRecordList.length;i++){
if(flowRecordList[i].taskDefKey==val){
console.log(i);
return "驳回至"+flowRecordList[i].taskName;
}
}
@ -454,7 +453,7 @@
}
.djs-container svg {
min-height: 650px;
min-height: 150px;
}
.highlight.djs-shape .djs-visual > :nth-child(1) {

View File

@ -131,6 +131,7 @@
</el-table-column>
<el-table-column label="操作" width="150" align="center" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-if="getActivate(scope.row)" @click="handleActivate(scope.row)" type="text" size="small" icon="el-icon-edit-outline"></el-button>
<el-button @click="handleFlowRecord(scope.row)" type="text" size="small" icon="el-icon-finished">查看详情</el-button>
<el-button v-if="scope.row.finishTime == null" @click="handleStop(scope.row)" type="text" size="small" icon="el-icon-refresh-left"></el-button>
<el-button v-if="scope.row.finishTime == null" @click="handleDelete(scope.row)" type="text" size="small" icon="el-icon-delete" v-hasPermi="['system:deployment:remove']"></el-button>
@ -160,7 +161,7 @@
</el-form-item>
<el-form-item label="流程类型" prop="category">
<el-select
v-model="queryParams.category"
v-model="queryProcessParams.category"
@keyup.enter.native="handleProcessQuery"
placeholder="请选择流程类型"
clearable
@ -423,6 +424,22 @@ export default {
// }
// })
},
/** 继续办理 */
handleActivate(row){
if(row.procDefKey=="flow_xmglzdl_qjspb"){
this.$refs.initLeaveTaskDrawer.show(row);
}else{
this.$refs.initTaskDrawer.show(row);
}
},
/** 判断是否继续办理 */
getActivate(row){
if(row.taskName=="提交申请" && row.assigneeId==this.$store.getters.userId){
return true;
}else{
return false;
}
},
/** 取消流程申请 */
handleStop(row){
const params = {

View File

@ -7,7 +7,6 @@
direction="rtl"
size="60%"
@close="closeCallBack"
style="padding-left: 20px; padding-right: 20px"
>
<template slot="title">
<div>工程管理 {{ title }}</div>
@ -20,8 +19,10 @@
label-width="120px"
style="padding-right: 35px;"
>
<div class="canvas" ref="flowCanvas"></div>
<div class="maskLayer" />
<div class="block containers">
<div class="canvas" ref="flowCanvas"></div>
<div class="maskLayer" />
</div>
<el-card class="box-card" style="margin-left:35px;">
<el-descriptions class="margin-top" :title="title" :column="2" size="medium" border>
<el-descriptions-item :span="2" prop="businessKey">
@ -72,7 +73,7 @@
<i class="el-icon-s-flag"></i>
申请日期
</template>
{{ date }}
{{ form.date }}
</el-descriptions-item>
<el-descriptions-item label-class-name="my-label" :labelStyle="labelStyle">
<template slot="label">
@ -125,7 +126,8 @@
import store from "@/store";
import { definitionStart, flowXmlAndNode } from "@/api/flowable/definition";
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
import { getNextFlowNodeByStart } from "@/api/flowable/todo";
import { complete, getNextFlowNodeByStart } from "@/api/flowable/todo";
import { findFormDatasByProcInsId } from "@/api/flowable/businessKey";
export default {
components: {},
@ -148,6 +150,7 @@ export default {
projectName: "",
files: "",
remark: "",
date:"",
},
//
rules: {},
@ -203,16 +206,24 @@ export default {
show(options) {
this.options = options;
this.form={};
this.initMyProject();
this.title = options.name;
this.deptName = store.getters.dept.deptName;
this.nickName = store.getters.name;
this.date = this.$dt(new Date()).format("YYYY-MM-DD");
this.form.date = this.$dt(new Date()).format("YYYY-MM-DD HH:mm");
this.onOpen = true;
flowXmlAndNode({ deployId: options.deploymentId }).then((res) => {
this.initFlowImage(res.data.xmlData);
});
if(options.procInsId){
this.title = options.procDefName;
this.initFormDate(options.procInsId);
this.onOpen = true;
flowXmlAndNode({ procInsId:options.procInsId, deployId: options.deployId }).then((res) => {
this.initFlowImage(res.data);
});
}else{
this.initMyProject();
this.title = options.name;
this.deptName = store.getters.dept.deptName;
this.nickName = store.getters.name;
this.form.date = this.$dt(new Date()).format("YYYY-MM-DD HH:mm");
this.onOpen = true;
flowXmlAndNode({ deployId: options.deploymentId }).then((res) => {
this.initFlowImage(res.data);
});
}
},
async initFlowImage(data) {
const self = this;
@ -221,13 +232,37 @@ export default {
container: this.$refs.flowCanvas,
height: "150px",
});
await self.bpmnViewer.importXML(data);
await self.bpmnViewer.importXML(data.xmlData);
//
self.bpmnViewer.get("canvas").zoom("fit-viewport", "auto");
if (data.nodeData !==undefined && data.nodeData.length > 0 ) {
self.fillColor(data.nodeData)
}
} catch (err) {
console.error(err.message, err.warnings);
}
},
/** 流程表单数据 */
initFormDate(procInsId, deployId) {
this.projectOptions=[{id:this.options.businessKey,projectName:this.options.businessKeyName}];
const params = {procInsId: procInsId}
findFormDatasByProcInsId(params).then(res => {
this.form = res.data;
this.deptName = this.options.startDeptName;
this.nickName = this.options.startUserName;
this.form.taskId = this.options.taskId;
this.form.taskName = this.options.taskName;
this.form.userId = store.getters.userId;
this.form.procInsId = this.options.procInsId;
this.form.instanceId = this.options.procInsId;
this.times = res.data.day;
this.daterangeMarksTime=[];
this.daterangeMarksTime[0]=new Date(res.data.beginDate);
this.daterangeMarksTime[1]=new Date(res.data.endDate);
}).catch(res => {
this.$message.error("数据异常,请联系管理员...");
})
},
checkTime(val) {
let time = new Date(val[1]).getTime()-new Date(val[0]).getTime();
let hours = time/3600000;
@ -271,19 +306,110 @@ export default {
return;
}
this.loading = true;
definitionStart(this.options.id, JSON.stringify(this.form)).then((res) => {
if(this.options.procInsId){
this.form.variables={
businessKey:this.form.businessKey,
projectName:this.form.projectName,
beginDate:this.form.beginDate,
endDate:this.form.endDate,
remark:this.form.remark,
day:this.form.day,
date:this.form.date,
INITIATOR:this.form.INITIATOR
}
complete(this.form).then(res => {
this.$store.dispatch('settingAwaitNum');
this.$modal.msgSuccess("任务提交成功");
this.loading = false;
//
this.$refs.drawer.closeDrawer();
});
}else{
definitionStart(this.options.id, JSON.stringify(this.form)).then((res) => {
this.$modal.msgSuccess(res.msg);
this.loading = false;
//
this.$refs.drawer.closeDrawer();
});
}
}
});
},
//
fillColor(nodeData) {
const canvas = this.bpmnViewer.get('canvas')
this.bpmnViewer.getDefinitions().rootElements[0].flowElements.forEach(n => {
const completeTask = nodeData.find(m => m.key === n.id)
const todoTask = nodeData.find(m => !m.completed)
const endTask = nodeData[nodeData.length - 1]
if (n.$type === 'bpmn:UserTask') {
if (completeTask) {
canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
n.outgoing?.forEach(nn => {
const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
if (targetTask) {
if (todoTask && completeTask.key === todoTask.key && !todoTask.completed){
canvas.addMarker(nn.id, todoTask.completed ? 'highlight' : 'highlight-todo')
canvas.addMarker(nn.targetRef.id, todoTask.completed ? 'highlight' : 'highlight-todo')
}else {
canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
canvas.addMarker(nn.targetRef.id, targetTask.completed ? 'highlight' : 'highlight-todo')
}
}
})
}
}
//
else if (n.$type === 'bpmn:ExclusiveGateway') {
if (completeTask) {
canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
n.outgoing?.forEach(nn => {
const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
if (targetTask) {
canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
canvas.addMarker(nn.targetRef.id, targetTask.completed ? 'highlight' : 'highlight-todo')
}
})
}
}
//
else if (n.$type === 'bpmn:ParallelGateway') {
if (completeTask) {
canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
n.outgoing?.forEach(nn => {
const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
if (targetTask) {
canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
canvas.addMarker(nn.targetRef.id, targetTask.completed ? 'highlight' : 'highlight-todo')
}
})
}
}
else if (n.$type === 'bpmn:StartEvent') {
n.outgoing.forEach(nn => {
const completeTask = nodeData.find(m => m.key === nn.targetRef.id)
if (completeTask) {
canvas.addMarker(nn.id, 'highlight')
canvas.addMarker(n.id, 'highlight')
return
}
})
}
else if (n.$type === 'bpmn:EndEvent') {
if (endTask.key === n.id && endTask.completed) {
canvas.addMarker(n.id, 'highlight')
return
}
}
})
},
},
};
</script>
<style>
<style lang="scss">
.bjs-powered-by {
display: none !important;
}
@ -298,4 +424,68 @@ export default {
font-weight: 700;
color: red;
}
.app-container{
.containers {
.canvas {
width: 100%;
height: 150px;
}
.panel {
position: absolute;
right: 0;
top: 50px;
width: 300px;
}
.load {
margin-right: 10px;
}
.el-form-item__label{
font-size: 13px;
}
.djs-palette{
left: 0px!important;
top: 0px;
border-top: none;
}
.djs-container svg {
min-height: 150px;
}
.highlight.djs-shape .djs-visual > :nth-child(1) {
fill: green !important;
stroke: green !important;
fill-opacity: 0.2 !important;
}
.highlight.djs-shape .djs-visual > :nth-child(2) {
fill: green !important;
}
.highlight.djs-shape .djs-visual > path {
fill: green !important;
fill-opacity: 0.2 !important;
stroke: green !important;
}
.highlight.djs-connection > .djs-visual > path {
stroke: green !important;
}
.highlight-todo.djs-connection > .djs-visual > path {
stroke: orange !important;
stroke-dasharray: 4px !important;
fill-opacity: 0.2 !important;
}
.highlight-todo.djs-shape .djs-visual > :nth-child(1) {
fill: orange !important;
stroke: orange !important;
stroke-dasharray: 4px !important;
fill-opacity: 0.2 !important;
}
.overlays-div {
font-size: 10px;
color: red;
width: 100px;
top: -20px !important;
}
}
}
</style>

View File

@ -7,7 +7,6 @@
direction="rtl"
size="60%"
@close="closeCallBack"
style="padding-left: 20px; padding-right: 20px"
>
<template slot="title">
<div>工程管理 {{ title }}</div>
@ -20,8 +19,10 @@
label-width="120px"
style="padding-right: 35px"
>
<div class="canvas" ref="flowCanvas"></div>
<div class="maskLayer" />
<div class="block containers">
<div class="canvas" ref="flowCanvas"></div>
<div class="maskLayer" />
</div>
<el-form-item label="所属项目" prop="businessKey">
<el-select
v-model="form.businessKey"
@ -53,6 +54,7 @@
<FileUpload
@input="fileInput"
:limit="9"
v-model="form.files"
:fileType="['pdf', 'png', 'jpg', 'jpeg', 'doc', 'docx', 'xls', 'xlsx']"
/>
</el-form-item>
@ -77,7 +79,8 @@
import store from "@/store";
import { definitionStart, flowXmlAndNode } from "@/api/flowable/definition";
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
import { getNextFlowNodeByStart } from "@/api/flowable/todo";
import { findFormDatasByProcInsId } from "@/api/flowable/businessKey";
import { complete, getNextFlowNodeByStart } from "@/api/flowable/todo";
export default {
components: {},
@ -161,29 +164,58 @@ export default {
},
show(options) {
this.options = options;
this.initMyProject();
this.title = options.name;
this.deptName = store.getters.dept.deptName;
this.nickName = store.getters.name;
const self = this;
this.onOpen = true;
flowXmlAndNode({ deployId: options.deploymentId }).then((res) => {
this.initFlowImage(res.data.xmlData);
});
//
if(options.procInsId){
this.title = options.procDefName;
this.initFormDate(options.procInsId);
flowXmlAndNode({ procInsId:options.procInsId, deployId: options.deployId }).then((res) => {
this.initFlowImage(res.data);
});
}else{
this.initMyProject();
this.title = options.name;
this.deptName = store.getters.dept.deptName;
this.nickName = store.getters.name;
flowXmlAndNode({ deployId: options.deploymentId }).then((res) => {
this.initFlowImage(res.data);
});
}
},
async initFlowImage(data) {
const self = this;
try {
self.bpmnViewer = new BpmnViewer({
container: this.$refs.flowCanvas,
height: "150px",
});
await self.bpmnViewer.importXML(data);
await self.bpmnViewer.importXML(data.xmlData);
//
self.bpmnViewer.get("canvas").zoom("fit-viewport", "auto");
if (data.nodeData !==undefined && data.nodeData.length > 0 ) {
self.fillColor(data.nodeData)
}
} catch (err) {
console.error(err.message, err.warnings);
}
},
/** 流程表单数据 */
initFormDate(procInsId, deployId) {
this.projectOptions=[{id:this.options.businessKey,projectName:this.options.businessKeyName}];
const params = {procInsId: procInsId}
findFormDatasByProcInsId(params).then(res => {
this.form = res.data;
this.deptName = this.options.startDeptName;
this.nickName = this.options.startUserName;
this.form.taskId = this.options.taskId;
this.form.taskName = this.options.taskName;
this.form.userId = store.getters.userId;
this.form.procInsId = this.options.procInsId;
this.form.instanceId = this.options.procInsId;
}).catch(res => {
this.$message.error("数据异常,请联系管理员...");
})
},
fileInput(files) {
let fileUrls = "";
if (files.length > 0) {
@ -211,20 +243,107 @@ export default {
// }
// });
//
definitionStart(this.options.id, JSON.stringify(this.form)).then((res) => {
if(this.options.procInsId){
this.form.variables={
businessKey:this.form.businessKey,
projectName:this.form.projectName,
files:this.form.files,
remark:this.form.remark,
INITIATOR:this.form.INITIATOR
}
complete(this.form).then(res => {
this.$store.dispatch('settingAwaitNum');
this.$modal.msgSuccess("任务提交成功");
this.loading = false;
//
this.$refs.drawer.closeDrawer();
});
}else{
definitionStart(this.options.id, JSON.stringify(this.form)).then((res) => {
this.$modal.msgSuccess(res.msg);
this.loading = false;
//
this.$refs.drawer.closeDrawer();
});
}
}
});
},
//
fillColor(nodeData) {
const canvas = this.bpmnViewer.get('canvas')
this.bpmnViewer.getDefinitions().rootElements[0].flowElements.forEach(n => {
const completeTask = nodeData.find(m => m.key === n.id)
const todoTask = nodeData.find(m => !m.completed)
const endTask = nodeData[nodeData.length - 1]
if (n.$type === 'bpmn:UserTask') {
if (completeTask) {
canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
n.outgoing?.forEach(nn => {
const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
if (targetTask) {
if (todoTask && completeTask.key === todoTask.key && !todoTask.completed){
canvas.addMarker(nn.id, todoTask.completed ? 'highlight' : 'highlight-todo')
canvas.addMarker(nn.targetRef.id, todoTask.completed ? 'highlight' : 'highlight-todo')
}else {
canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
canvas.addMarker(nn.targetRef.id, targetTask.completed ? 'highlight' : 'highlight-todo')
}
}
})
}
}
//
else if (n.$type === 'bpmn:ExclusiveGateway') {
if (completeTask) {
canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
n.outgoing?.forEach(nn => {
const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
if (targetTask) {
canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
canvas.addMarker(nn.targetRef.id, targetTask.completed ? 'highlight' : 'highlight-todo')
}
})
}
}
//
else if (n.$type === 'bpmn:ParallelGateway') {
if (completeTask) {
canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
n.outgoing?.forEach(nn => {
const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
if (targetTask) {
canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
canvas.addMarker(nn.targetRef.id, targetTask.completed ? 'highlight' : 'highlight-todo')
}
})
}
}
else if (n.$type === 'bpmn:StartEvent') {
n.outgoing.forEach(nn => {
const completeTask = nodeData.find(m => m.key === nn.targetRef.id)
if (completeTask) {
canvas.addMarker(nn.id, 'highlight')
canvas.addMarker(n.id, 'highlight')
return
}
})
}
else if (n.$type === 'bpmn:EndEvent') {
if (endTask.key === n.id && endTask.completed) {
canvas.addMarker(n.id, 'highlight')
return
}
}
})
},
},
};
</script>
<style>
<style lang="scss">
.bjs-powered-by {
display: none !important;
}
@ -235,4 +354,68 @@ export default {
z-index: 9999;
top: 66px;
}
.app-container{
.containers {
.canvas {
width: 100%;
height: 150px;
}
.panel {
position: absolute;
right: 0;
top: 50px;
width: 300px;
}
.load {
margin-right: 10px;
}
.el-form-item__label{
font-size: 13px;
}
.djs-palette{
left: 0px!important;
top: 0px;
border-top: none;
}
.djs-container svg {
min-height: 150px;
}
.highlight.djs-shape .djs-visual > :nth-child(1) {
fill: green !important;
stroke: green !important;
fill-opacity: 0.2 !important;
}
.highlight.djs-shape .djs-visual > :nth-child(2) {
fill: green !important;
}
.highlight.djs-shape .djs-visual > path {
fill: green !important;
fill-opacity: 0.2 !important;
stroke: green !important;
}
.highlight.djs-connection > .djs-visual > path {
stroke: green !important;
}
.highlight-todo.djs-connection > .djs-visual > path {
stroke: orange !important;
stroke-dasharray: 4px !important;
fill-opacity: 0.2 !important;
}
.highlight-todo.djs-shape .djs-visual > :nth-child(1) {
fill: orange !important;
stroke: orange !important;
stroke-dasharray: 4px !important;
fill-opacity: 0.2 !important;
}
.overlays-div {
font-size: 10px;
color: red;
width: 100px;
top: -20px !important;
}
}
}
</style>

View File

@ -50,6 +50,22 @@
/>
</el-select>
</el-form-item>
<el-form-item label="当前节点" prop="taskName">
<el-select
v-model="queryParams.taskName"
placeholder="请选择所属项目"
filterable
clearable
>
<el-option
v-for="(item, index) in taskOptions"
:key="index"
:label="item.text"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="申请人" prop="startUserName" v-if="showPro">
<el-input
v-model="queryParams.startUserName"
@ -183,6 +199,16 @@ export default {
activeName:"await",
showPro:false,
projectOptions: null,
taskOptions:[
{text:"提交申请",value:"提交申请"},
{text:"监理专监审批",value:"监理专监"},
{text:"监理总监审批",value:"监理总监"},
{text:"甲方代表审批",value:"甲方代表"},
{text:"设计总监审批",value:"设计总监"},
{text:"工程负责人审批",value:"工程负责人"},
{text:"总包项目经理审批",value:"总包项目经理"},
{text:"分包项目经理确认",value:"分包项目经理"},
]
};
},
created() {

View File

@ -574,7 +574,7 @@ export default {
}
.djs-container svg {
min-height: 650px;
min-height: 150px;
}
.highlight.djs-shape .djs-visual > :nth-child(1) {
@ -619,5 +619,6 @@ export default {
border-left: 5px solid #67C23A;
margin: 20px 0;
font-size: 13px;
margin-top: 30px;
}
</style>

View File

@ -606,7 +606,7 @@ export default {
}
.djs-container svg {
min-height: 650px;
min-height: 150px;
}
.highlight.djs-shape .djs-visual > :nth-child(1) {
@ -651,5 +651,6 @@ export default {
border-left: 5px solid #67C23A;
margin: 20px 0;
font-size: 13px;
margin-top: 30px;
}
</style>

View File

@ -86,6 +86,8 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<initTaskDrawer ref="initTaskDrawer" :closeCallBack="getList"></initTaskDrawer>
<initLeaveTaskDrawer ref="initLeaveTaskDrawer" :closeCallBack="getList"></initLeaveTaskDrawer>
<approveDrawer ref="approveDrawer" :closeCallBack="getList"></approveDrawer>
<approveLeaveDrawer ref="approveLeaveDrawer" :closeCallBack="getList"></approveLeaveDrawer>
</div>
@ -96,12 +98,14 @@ import {
delDeployment,
} from "@/api/flowable/todo";
import {myAwaitFlowTaskList} from "@/api/flowable/businessKey";
import initTaskDrawer from "../myProcess/initTaskDrawer.vue";
import initLeaveTaskDrawer from '../myProcess/initLeaveTaskDrawer'
import approveDrawer from "./detail/approveDrawer.vue";
import approveLeaveDrawer from "./detail/approveLeaveDrawer.vue";
export default {
name: "Deploy",
components: {approveDrawer,approveLeaveDrawer},
components: {initTaskDrawer,initLeaveTaskDrawer,approveDrawer,approveLeaveDrawer},
dicts: ["sys_process_category"],
data() {
return {
@ -159,16 +163,39 @@ export default {
this.todoList = response.rows;
this.total = response.total;
this.loading = false;
//
//this.$store.dispatch('settingAwaitNum');
//
let els=document.querySelectorAll(".todo_num_tips");
if(els.length>0){
els.forEach(el=>{
el.innerHTML=response.total;
if(response.total>0){
el.style.display="inline";
}else{
el.style.display="none";
}
});
}
});
},
//
handleProcess(row){
//
if(row.procDefKey=="flow_xmglzdl_qjspb"){
this.$refs.approveLeaveDrawer.show(row);
if(row.taskName=="提交申请"){
if(row.procDefKey=="flow_xmglzdl_qjspb"){
this.$refs.initLeaveTaskDrawer.show(row);
}else{
this.$refs.initTaskDrawer.show(row);
}
}else{
this.$refs.approveDrawer.show(row);
//
if(row.procDefKey=="flow_xmglzdl_qjspb"){
this.$refs.approveLeaveDrawer.show(row);
}else{
this.$refs.approveDrawer.show(row);
}
}
// this.$router.push({ path: '/flowable/task/todo/detail/index',
// query: {
// procInsId: row.procInsId,

View File

@ -164,12 +164,14 @@
<script>
import { listSurProject } from "@/api/project/surProject";
import { myAwaitFlowTaskList } from "@/api/flowable/businessKey";
import projectUserInfoDrawer from "@/views/project/surProjectUserInfo/projectUserInfoDrawer.vue";
import ProjectScheduleDlg from "../surProjectSchedule/ProjectScheduleDlg.vue";
import AssessDrawer from "../surProjectQuarterlyAssess/assessDrawer.vue";
import buildNodeDrawer from "../surBuildNode/buildNodeDrawer.vue";
import attendanceDrawer from "../surProjectAttendance/attendanceDrawer.vue";
import costOutputDrawer from '@/views/project/costOutput/costOutputDrawer.vue'
export default {
dicts: [
"sys_check_state",
@ -200,23 +202,31 @@ export default {
mounted() {
this.loadData();
this.$bus.$on("todo_tips_click",name=>{
console.log("----todo点击----",name)
});
//this.test();
// this.$bus.$on("todo_tips_click",name=>{
// console.log("----todo----",name)
// });
//this.initProjectTask();
},
methods: {
test(){
setInterval(() => {
initProjectTask(){
//
let params={
pageNum: 1,
pageSize: 10,
};
myAwaitFlowTaskList(params).then(response => {
let els=document.querySelectorAll(".todo_num_tips");
if(els.length>0){
els.forEach(el=>{
el.innerHTML=Math.random().toString().substring(4,6);
el.style.display="inline";
el.innerHTML=response.total;
if(response.total>0){
el.style.display="inline";
}else{
el.style.display="none";
}
});
}
}, 1000);
});
},
doPrjCostOutput(){
this.$refs.costOutput.show(this.prj);