提交代码
parent
750c6eec1d
commit
7bd6985565
|
@ -20,7 +20,6 @@ import com.ruoyi.system.service.ISysPostService;
|
|||
import com.ruoyi.system.service.ISysUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.flowable.bpmn.model.BpmnModel;
|
||||
import org.flowable.engine.repository.Deployment;
|
||||
import org.flowable.engine.repository.ProcessDefinition;
|
||||
|
@ -28,7 +27,6 @@ import org.flowable.engine.repository.ProcessDefinitionQuery;
|
|||
import org.flowable.engine.runtime.ProcessInstance;
|
||||
import org.flowable.image.impl.DefaultProcessDiagramGenerator;
|
||||
import org.flowable.task.api.Task;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
|
@ -9,12 +9,9 @@ import com.ruoyi.flowable.service.IFlowInstanceService;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.flowable.common.engine.api.FlowableObjectNotFoundException;
|
||||
import org.flowable.engine.history.HistoricProcessInstance;
|
||||
import org.flowable.task.api.Task;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
|
|
|
@ -4,12 +4,9 @@ package com.ruoyi.flowable.service.impl;
|
|||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.alibaba.fastjson2.TypeReference;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.flowable.common.constant.ProcessConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
|
@ -43,13 +40,11 @@ import org.flowable.bpmn.model.Process;
|
|||
import org.flowable.bpmn.model.*;
|
||||
import org.flowable.common.engine.api.FlowableException;
|
||||
import org.flowable.common.engine.api.FlowableObjectNotFoundException;
|
||||
import org.flowable.common.engine.impl.identity.Authentication;
|
||||
import org.flowable.engine.ProcessEngineConfiguration;
|
||||
import org.flowable.engine.history.HistoricActivityInstance;
|
||||
import org.flowable.engine.history.HistoricProcessInstance;
|
||||
import org.flowable.engine.history.HistoricProcessInstanceQuery;
|
||||
import org.flowable.engine.repository.ProcessDefinition;
|
||||
import org.flowable.engine.runtime.ActivityInstance;
|
||||
import org.flowable.engine.runtime.Execution;
|
||||
import org.flowable.engine.runtime.ProcessInstance;
|
||||
import org.flowable.engine.task.Comment;
|
||||
|
|
|
@ -362,15 +362,15 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
public int resetPwd(SysUser user)
|
||||
{
|
||||
|
||||
// List<Long> userIds = userMapper.selectUserByDept();
|
||||
// List<SysUserRole> sysUserRoleList = new ArrayList<>();
|
||||
// for(Long id:userIds){
|
||||
// SysUserRole sr = new SysUserRole();
|
||||
// sr.setUserId(id);
|
||||
// sr.setRoleId(5L);
|
||||
// sysUserRoleList.add(sr);
|
||||
// }
|
||||
// userRoleMapper.batchUserRole(sysUserRoleList);
|
||||
List<Long> userIds = userMapper.selectUserByDept();
|
||||
List<SysUserRole> sysUserRoleList = new ArrayList<>();
|
||||
for(Long id:userIds){
|
||||
SysUserRole sr = new SysUserRole();
|
||||
sr.setUserId(id);
|
||||
sr.setRoleId(48L);
|
||||
sysUserRoleList.add(sr);
|
||||
}
|
||||
userRoleMapper.batchUserRole(sysUserRoleList);
|
||||
|
||||
return userMapper.updateUser(user);
|
||||
}
|
||||
|
|
|
@ -215,9 +215,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<select id="selectUserByDept" resultType="Long">
|
||||
select u.user_id from sys_user u
|
||||
left join sys_dept d on d.dept_id=u.dept_id
|
||||
where d.ancestors like '%188%'
|
||||
select DISTINCT user_id from sur_project_userinfo where job_type!=24 and dept_type=2 and is_del = 0 and user_id not in (select user_id from sys_user_role where role_id=48 or role_id=42)
|
||||
</select>
|
||||
|
||||
<delete id="deleteUserByIds" parameterType="Long">
|
||||
|
|
|
@ -306,7 +306,9 @@ export default {
|
|||
this.loading = false;
|
||||
//关闭并刷新列表
|
||||
this.getList();
|
||||
});
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});;
|
||||
}).catch(() => {
|
||||
console.log("取消操作");
|
||||
});
|
||||
|
|
|
@ -11,9 +11,11 @@
|
|||
<div>流程详情 【{{ title }}】 - 当前进度【{{ jdtitle }}】<span v-if="showjd"> - 当前节点【{{options.taskName}}】</span></div>
|
||||
</template>
|
||||
<div class="drawer">
|
||||
<div class="drawerLeft block containers">
|
||||
<div class="canvas" ref="flowCanvas"></div>
|
||||
<div class="maskLayer" />
|
||||
<div class="drawerLeft">
|
||||
<div class="block containers">
|
||||
<div class="canvas" ref="flowCanvas"></div>
|
||||
<div class="maskLayer" />
|
||||
</div>
|
||||
<el-timeline>
|
||||
<el-timeline-item
|
||||
v-for="(item,index ) in flowRecordList"
|
||||
|
|
|
@ -11,9 +11,11 @@
|
|||
<div>流程详情 【{{ title }}】 - 当前进度【{{ jdtitle }}】<span v-if="showjd"> - 当前节点【{{options.taskName}}】</span></div>
|
||||
</template>
|
||||
<div class="drawer">
|
||||
<div class="drawerLeft block containers">
|
||||
<div class="canvas" ref="flowCanvas"></div>
|
||||
<div class="maskLayer" />
|
||||
<div class="drawerLeft">
|
||||
<div class="block containers">
|
||||
<div class="canvas" ref="flowCanvas"></div>
|
||||
<div class="maskLayer" />
|
||||
</div>
|
||||
<el-timeline>
|
||||
<el-timeline-item
|
||||
v-for="(item,index ) in flowRecordList"
|
||||
|
|
|
@ -0,0 +1,444 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-drawer
|
||||
v-if="onOpen"
|
||||
:visible.sync="onOpen"
|
||||
ref="drawer"
|
||||
direction="rtl"
|
||||
size="60%"
|
||||
@close="closeCallBack"
|
||||
>
|
||||
<template slot="title">
|
||||
<div>工程管理 【{{ title }}】</div>
|
||||
</template>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
v-loading="loading"
|
||||
label-width="120px"
|
||||
style="padding-right: 35px;"
|
||||
>
|
||||
<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">
|
||||
<template slot="label">
|
||||
<i class="el-icon-map-location"></i>
|
||||
所属项目<span class="cr"> *</span>
|
||||
</template>
|
||||
<el-select
|
||||
v-model="form.businessKey"
|
||||
placeholder="请选择所属项目"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
:disabled="disPro"
|
||||
@change="projectChage"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item,index) in projectOptions"
|
||||
:key="index"
|
||||
:label="item.projectName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label">
|
||||
<i class="el-icon-school"></i>
|
||||
申请单位
|
||||
</template>
|
||||
{{ deptName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label">
|
||||
<i class="el-icon-collection-tag"></i>
|
||||
申请事项
|
||||
</template>
|
||||
{{ title }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label">
|
||||
<i class="el-icon-user"></i>
|
||||
申请人
|
||||
</template>
|
||||
{{ nickName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label">
|
||||
<i class="el-icon-s-flag"></i>
|
||||
申请日期
|
||||
</template>
|
||||
{{ form.date }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label">
|
||||
<i class="el-icon-time"></i>
|
||||
请假日期<span class="cr"> *</span>
|
||||
</template>
|
||||
<el-date-picker
|
||||
v-model="daterangeMarksTime"
|
||||
style="width: 400px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="checkTime"
|
||||
></el-date-picker>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label">
|
||||
<i class="el-icon-tickets"></i>
|
||||
请假时间
|
||||
</template>
|
||||
{{times}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label">
|
||||
<i class="el-icon-chat-dot-square"></i>
|
||||
请假事由<span class="cr"> *</span>
|
||||
</template>
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="form.remark"
|
||||
placeholder="请输入申请说明"
|
||||
rows="5"
|
||||
max="1"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div style="text-align: center;margin-top: 30px;">
|
||||
<el-button type="primary" @click="submitForm">提交申请</el-button>
|
||||
<el-button @click="doCanel">取 消</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import store from "@/store";
|
||||
import { definitionStart, flowXmlAndNode } from "@/api/flowable/definition";
|
||||
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
|
||||
import { complete, getNextFlowNodeByStart } from "@/api/flowable/todo";
|
||||
import { findFormDatasByProcInsId } from "@/api/flowable/businessKey";
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
closeCallBack: {
|
||||
type: Function,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 抽屉层
|
||||
onOpen: false,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 标题
|
||||
title: "",
|
||||
// 表单参数
|
||||
form: {
|
||||
businessKey: "",
|
||||
projectName: "",
|
||||
files: "",
|
||||
remark: "",
|
||||
date:"",
|
||||
},
|
||||
// 表单校验
|
||||
rules: {},
|
||||
projectOptions: null,
|
||||
deptName: null,
|
||||
nickName: null,
|
||||
disPro: false,
|
||||
bpmnViewer: null,
|
||||
options: {},
|
||||
taskTitle: null,
|
||||
taskOpen: false,
|
||||
daterangeMarksTime: [],
|
||||
//label样式
|
||||
labelStyle: { width: "180px" },
|
||||
times:"... ...",
|
||||
date:null
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
beforeDestroy() {},
|
||||
methods: {
|
||||
// 项目选择
|
||||
projectChage(val) {
|
||||
let projectName = "";
|
||||
this.projectOptions.forEach((item) => {
|
||||
if ((item.id = val)) {
|
||||
projectName = item.projectName;
|
||||
return;
|
||||
}
|
||||
});
|
||||
this.form.projectName = projectName;
|
||||
},
|
||||
doCanel() {
|
||||
this.onOpen = false;
|
||||
},
|
||||
show(options) {
|
||||
this.options = options;
|
||||
this.form={};
|
||||
this.title = options.procDefName;
|
||||
this.initFormDate(options.procInsId);
|
||||
this.onOpen = true;
|
||||
flowXmlAndNode({ procInsId:options.procInsId, deployId: options.deployId }).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.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;
|
||||
let day = (hours/24)+1;//这里默认加1天,PS:2023-09-10 2023-09-11实际请假应该为2天,而不是一天
|
||||
if(hours%24>0) day++;
|
||||
this.form.day=day;
|
||||
this.times="共 "+day+" 天"
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if(!this.form.businessKey){
|
||||
this.$modal.msgWarning("请选择所属项目...");
|
||||
return;
|
||||
}
|
||||
if (null != this.daterangeMarksTime && "" != this.daterangeMarksTime) {
|
||||
this.form.beginDate = this.daterangeMarksTime[0];
|
||||
this.form.endDate = this.daterangeMarksTime[1];
|
||||
}else{
|
||||
this.$modal.msgWarning("请选择请假日期...");
|
||||
return;
|
||||
}
|
||||
if(!this.form.day){
|
||||
this.$modal.msgWarning("请选择请假日期...");
|
||||
return;
|
||||
}
|
||||
if(!this.form.remark){
|
||||
this.$modal.msgWarning("请输入请假事由...");
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
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();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置高亮颜色的
|
||||
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 lang="scss">
|
||||
.bjs-powered-by {
|
||||
display: none !important;
|
||||
}
|
||||
.maskLayer {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
top: 66px;
|
||||
}
|
||||
.cr{
|
||||
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>
|
|
@ -0,0 +1,376 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-drawer
|
||||
v-if="onOpen"
|
||||
:visible.sync="onOpen"
|
||||
ref="drawer"
|
||||
direction="rtl"
|
||||
size="60%"
|
||||
@close="closeCallBack"
|
||||
>
|
||||
<template slot="title">
|
||||
<div>工程管理 【{{ title }}】</div>
|
||||
</template>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
v-loading="loading"
|
||||
label-width="120px"
|
||||
style="padding-right: 35px"
|
||||
>
|
||||
<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"
|
||||
placeholder="请选择所属项目"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
:disabled="disPro"
|
||||
@change="projectChage"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item,index) in projectOptions"
|
||||
:key="index"
|
||||
:label="item.projectName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发起单位">
|
||||
{{ deptName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="发起人">
|
||||
{{ nickName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="审批事项">
|
||||
{{ title }}
|
||||
</el-form-item>
|
||||
<el-form-item label="审批内容" prop="files">
|
||||
<FileUpload
|
||||
@input="fileInput"
|
||||
:limit="9"
|
||||
v-model="form.files"
|
||||
:fileType="['pdf', 'png', 'jpg', 'jpeg', 'doc', 'docx', 'xls', 'xlsx']"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请说明" prop="remark">
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="form.remark"
|
||||
placeholder="请输入申请说明"
|
||||
rows="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div style="text-align: center">
|
||||
<el-button type="primary" @click="submitForm">提交流程</el-button>
|
||||
<el-button @click="doCanel">取 消</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import store from "@/store";
|
||||
import { definitionStart, flowXmlAndNode } from "@/api/flowable/definition";
|
||||
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
|
||||
import { findFormDatasByProcInsId } from "@/api/flowable/businessKey";
|
||||
import { complete, getNextFlowNodeByStart } from "@/api/flowable/todo";
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
closeCallBack: {
|
||||
type: Function,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 抽屉层
|
||||
onOpen: false,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 标题
|
||||
title: "",
|
||||
// 表单参数
|
||||
form: {
|
||||
businessKey: "",
|
||||
projectName: "",
|
||||
files: "",
|
||||
remark: "",
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
businessKey: [{ required: true, message: "请选择所属项目", trigger: "blur" }],
|
||||
files: [{ required: true, message: "请上传申请内容", trigger: "blur" }],
|
||||
remark: [
|
||||
{ required: false, message: "请输入申请说明", trigger: "blur" },
|
||||
{
|
||||
max: 500,
|
||||
message: "申请说明最多输入500字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
projectOptions: null,
|
||||
deptName: null,
|
||||
nickName: null,
|
||||
disPro: false,
|
||||
bpmnViewer: null,
|
||||
options: {},
|
||||
taskTitle: null,
|
||||
taskOpen: false,
|
||||
daterangeMarksTime: [],
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
beforeDestroy() {},
|
||||
methods: {
|
||||
// 项目选择
|
||||
projectChage(val) {
|
||||
let projectName = "";
|
||||
this.projectOptions.forEach((item) => {
|
||||
if ((item.id = val)) {
|
||||
projectName = item.projectName;
|
||||
return;
|
||||
}
|
||||
});
|
||||
this.form.projectName = projectName;
|
||||
},
|
||||
doCanel() {
|
||||
this.onOpen = false;
|
||||
},
|
||||
show(options) {
|
||||
this.options = options;
|
||||
this.onOpen = true;
|
||||
this.title = options.procDefName;
|
||||
this.initFormDate(options.procInsId);
|
||||
flowXmlAndNode({ procInsId:options.procInsId, deployId: options.deployId }).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.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) {
|
||||
fileUrls = "";
|
||||
files.forEach((item) => {
|
||||
fileUrls += "," + item.url;
|
||||
});
|
||||
fileUrls = fileUrls.substring(1);
|
||||
}
|
||||
this.form.files = fileUrls;
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
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();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置高亮颜色的
|
||||
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 lang="scss">
|
||||
.bjs-powered-by {
|
||||
display: none !important;
|
||||
}
|
||||
.maskLayer {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
position: absolute;
|
||||
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>
|
||||
|
|
@ -215,6 +215,8 @@
|
|||
</el-dialog>
|
||||
<initTaskDrawer ref="initTaskDrawer" :closeCallBack="getList"></initTaskDrawer>
|
||||
<initLeaveTaskDrawer ref="initLeaveTaskDrawer" :closeCallBack="getList"></initLeaveTaskDrawer>
|
||||
<editTaskDrawer ref="editTaskDrawer" :closeCallBack="getList"></editTaskDrawer>
|
||||
<editLeaveTaskDrawer ref="editLeaveTaskDrawer" :closeCallBack="getList"></editLeaveTaskDrawer>
|
||||
<detailDrawer ref="detailDrawer"></detailDrawer>
|
||||
<detailLeaveDrawer ref="detailLeaveDrawer"></detailLeaveDrawer>
|
||||
</div>
|
||||
|
@ -233,7 +235,9 @@ import { myProcessList,stopProcess } from "@/api/flowable/process";
|
|||
import {allList,queryCount} from "@/api/flowable/businessKey";
|
||||
import {myDefinitionList} from "@/api/flowable/definition";
|
||||
import initTaskDrawer from "./initTaskDrawer.vue";
|
||||
import initLeaveTaskDrawer from './initLeaveTaskDrawer'
|
||||
import initLeaveTaskDrawer from './initLeaveTaskDrawer.vue'
|
||||
import editTaskDrawer from "./editTaskDrawer.vue";
|
||||
import editLeaveTaskDrawer from './editLeaveTaskDrawer.vue'
|
||||
import detailDrawer from "./detail/detailDrawer.vue";
|
||||
import detailLeaveDrawer from "./detail/detailLeaveDrawer.vue";
|
||||
export default {
|
||||
|
@ -242,7 +246,9 @@ export default {
|
|||
initTaskDrawer,
|
||||
initLeaveTaskDrawer,
|
||||
detailDrawer,
|
||||
detailLeaveDrawer
|
||||
detailLeaveDrawer,
|
||||
editTaskDrawer,
|
||||
editLeaveTaskDrawer
|
||||
},
|
||||
dicts: ["sys_process_category"],
|
||||
data() {
|
||||
|
@ -427,9 +433,9 @@ export default {
|
|||
/** 继续办理 */
|
||||
handleActivate(row){
|
||||
if(row.procDefKey=="flow_xmglzdl_qjspb"){
|
||||
this.$refs.initLeaveTaskDrawer.show(row);
|
||||
this.$refs.editLeaveTaskDrawer.show(row);
|
||||
}else{
|
||||
this.$refs.initTaskDrawer.show(row);
|
||||
this.$refs.editTaskDrawer.show(row);
|
||||
}
|
||||
},
|
||||
/** 判断是否继续办理 */
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
label-width="120px"
|
||||
style="padding-right: 35px;"
|
||||
>
|
||||
<div class="block containers">
|
||||
<div class="canvas" ref="flowCanvas"></div>
|
||||
<div class="maskLayer" />
|
||||
</div>
|
||||
<div class="mycanvas">
|
||||
<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">
|
||||
|
@ -38,12 +38,12 @@
|
|||
:disabled="disPro"
|
||||
@change="projectChage"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in projectOptions"
|
||||
:key="index"
|
||||
:label="item.projectName"
|
||||
:value="item.id"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item,index) in projectOptions"
|
||||
:key="index"
|
||||
:label="item.projectName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-descriptions-item>
|
||||
|
@ -73,7 +73,7 @@
|
|||
<i class="el-icon-s-flag"></i>
|
||||
申请日期
|
||||
</template>
|
||||
{{ form.date }}
|
||||
{{ date }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label">
|
||||
|
@ -126,8 +126,7 @@
|
|||
import store from "@/store";
|
||||
import { definitionStart, flowXmlAndNode } from "@/api/flowable/definition";
|
||||
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
|
||||
import { complete, getNextFlowNodeByStart } from "@/api/flowable/todo";
|
||||
import { findFormDatasByProcInsId } from "@/api/flowable/businessKey";
|
||||
import { getNextFlowNodeByStart } from "@/api/flowable/todo";
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
|
@ -150,7 +149,6 @@ export default {
|
|||
projectName: "",
|
||||
files: "",
|
||||
remark: "",
|
||||
date:"",
|
||||
},
|
||||
// 表单校验
|
||||
rules: {},
|
||||
|
@ -206,24 +204,16 @@ export default {
|
|||
show(options) {
|
||||
this.options = options;
|
||||
this.form={};
|
||||
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);
|
||||
});
|
||||
}
|
||||
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);
|
||||
});
|
||||
},
|
||||
async initFlowImage(data) {
|
||||
const self = this;
|
||||
|
@ -232,37 +222,13 @@ export default {
|
|||
container: this.$refs.flowCanvas,
|
||||
height: "150px",
|
||||
});
|
||||
await self.bpmnViewer.importXML(data.xmlData);
|
||||
await self.bpmnViewer.importXML(data);
|
||||
// 自适应
|
||||
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;
|
||||
|
@ -306,110 +272,19 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
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) => {
|
||||
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 lang="scss">
|
||||
<style>
|
||||
.bjs-powered-by {
|
||||
display: none !important;
|
||||
}
|
||||
|
@ -424,68 +299,4 @@ 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>
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
label-width="120px"
|
||||
style="padding-right: 35px"
|
||||
>
|
||||
<div class="block containers">
|
||||
<div class="canvas" ref="flowCanvas"></div>
|
||||
<div class="maskLayer" />
|
||||
<div>
|
||||
<div class="canvas" ref="flowCanvas"></div>
|
||||
<div class="maskLayer" />
|
||||
</div>
|
||||
<el-form-item label="所属项目" prop="businessKey">
|
||||
<el-select
|
||||
|
@ -32,12 +32,12 @@
|
|||
:disabled="disPro"
|
||||
@change="projectChage"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in projectOptions"
|
||||
<el-option
|
||||
v-for="(item,index) in projectOptions"
|
||||
:key="index"
|
||||
:label="item.projectName"
|
||||
:value="item.id"
|
||||
>
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -54,7 +54,6 @@
|
|||
<FileUpload
|
||||
@input="fileInput"
|
||||
:limit="9"
|
||||
v-model="form.files"
|
||||
:fileType="['pdf', 'png', 'jpg', 'jpeg', 'doc', 'docx', 'xls', 'xlsx']"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
@ -79,8 +78,7 @@
|
|||
import store from "@/store";
|
||||
import { definitionStart, flowXmlAndNode } from "@/api/flowable/definition";
|
||||
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
|
||||
import { findFormDatasByProcInsId } from "@/api/flowable/businessKey";
|
||||
import { complete, getNextFlowNodeByStart } from "@/api/flowable/todo";
|
||||
import { getNextFlowNodeByStart } from "@/api/flowable/todo";
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
|
@ -164,58 +162,29 @@ 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;
|
||||
//判断是否重新发起
|
||||
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);
|
||||
});
|
||||
}
|
||||
flowXmlAndNode({ deployId: options.deploymentId }).then((res) => {
|
||||
this.initFlowImage(res.data.xmlData);
|
||||
});
|
||||
},
|
||||
async initFlowImage(data) {
|
||||
const self = this;
|
||||
try {
|
||||
self.bpmnViewer = new BpmnViewer({
|
||||
container: this.$refs.flowCanvas,
|
||||
height: "150px",
|
||||
});
|
||||
await self.bpmnViewer.importXML(data.xmlData);
|
||||
await self.bpmnViewer.importXML(data);
|
||||
// 自适应
|
||||
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) {
|
||||
|
@ -231,119 +200,19 @@ export default {
|
|||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
// 根据当前任务或者流程设计配置的下一步节点 todo 暂时未涉及到考虑网关、表达式和多节点情况
|
||||
// getNextFlowNodeByStart({
|
||||
// deploymentId: this.options.deploymentId,
|
||||
// variables: this.form,
|
||||
// }).then((res) => {
|
||||
// const data = res.data;
|
||||
// if (data) {
|
||||
// console.log(data);
|
||||
// this.loading = false;
|
||||
// }
|
||||
// });
|
||||
// 启动流程并将表单数据加入流程变量
|
||||
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) => {
|
||||
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 lang="scss">
|
||||
<style>
|
||||
.bjs-powered-by {
|
||||
display: none !important;
|
||||
}
|
||||
|
@ -354,68 +223,4 @@ 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>
|
||||
|
|
|
@ -88,8 +88,8 @@
|
|||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<initTaskDrawer ref="initTaskDrawer" :closeCallBack="getList"></initTaskDrawer>
|
||||
<initLeaveTaskDrawer ref="initLeaveTaskDrawer" :closeCallBack="getList"></initLeaveTaskDrawer>
|
||||
<editTaskDrawer ref="editTaskDrawer" :closeCallBack="getList"></editTaskDrawer>
|
||||
<editLeaveTaskDrawer ref="editLeaveTaskDrawer" :closeCallBack="getList"></editLeaveTaskDrawer>
|
||||
<approveDrawer ref="approveDrawer" :closeCallBack="getList"></approveDrawer>
|
||||
<approveLeaveDrawer ref="approveLeaveDrawer" :closeCallBack="getList"></approveLeaveDrawer>
|
||||
</div>
|
||||
|
@ -100,14 +100,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 editTaskDrawer from "../myProcess/editTaskDrawer.vue";
|
||||
import editLeaveTaskDrawer from '../myProcess/editLeaveTaskDrawer.vue'
|
||||
import approveDrawer from "./detail/approveDrawer.vue";
|
||||
import approveLeaveDrawer from "./detail/approveLeaveDrawer.vue";
|
||||
|
||||
export default {
|
||||
name: "Deploy",
|
||||
components: {initTaskDrawer,initLeaveTaskDrawer,approveDrawer,approveLeaveDrawer},
|
||||
components: {approveDrawer,approveLeaveDrawer,editTaskDrawer,editLeaveTaskDrawer},
|
||||
dicts: ["sys_process_category"],
|
||||
data() {
|
||||
return {
|
||||
|
@ -185,9 +185,9 @@ export default {
|
|||
handleProcess(row){
|
||||
if(row.taskName=="提交申请"){
|
||||
if(row.procDefKey=="flow_xmglzdl_qjspb"){
|
||||
this.$refs.initLeaveTaskDrawer.show(row);
|
||||
this.$refs.editLeaveTaskDrawer.show(row);
|
||||
}else{
|
||||
this.$refs.initTaskDrawer.show(row);
|
||||
this.$refs.editTaskDrawer.show(row);
|
||||
}
|
||||
}else{
|
||||
//根据不同业务跳转不同表单
|
||||
|
|
|
@ -602,7 +602,7 @@ export default {
|
|||
this.form.projectName = this.project.projectName;
|
||||
this.form.deptId = this.unitActiveName;
|
||||
this.open = true;
|
||||
this.title = "添加特种人员";
|
||||
this.title = "添加材料取样复试";
|
||||
//查询单位人员
|
||||
this.$api.publics
|
||||
.selectProjectUnitUser({
|
||||
|
|
|
@ -11,14 +11,12 @@ import com.ruoyi.common.enums.SysRoleEnum;
|
|||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.yanzhu.jh.project.domain.SurProject;
|
||||
import com.yanzhu.jh.project.domain.SurProjectChecking;
|
||||
import com.yanzhu.jh.project.domain.SurProjectUnitInfo;
|
||||
import com.yanzhu.jh.project.domain.SurProjectUserinfo;
|
||||
import com.yanzhu.jh.project.service.ISurProjectService;
|
||||
import com.yanzhu.jh.project.service.ISurProjectUnitInfoService;
|
||||
import com.yanzhu.jh.project.service.ISurProjectUserinfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
@ -127,7 +125,10 @@ PublicsController extends BaseController {
|
|||
public TableDataInfo queryUnitList(SurProjectUnitInfo surProjectUnitInfo)
|
||||
{
|
||||
surProjectUnitInfo.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
if(SysRoleEnum.ZBDW.getCode().equals(surProjectUnitInfo.getNowRole())){
|
||||
if(Convert.toInt(surProjectUnitInfo.getNowRole())<5){
|
||||
//查询所有符合条件的单位
|
||||
}else{
|
||||
//查询当前登录人所在单位
|
||||
surProjectUnitInfo.setUnitId(getDeptId());
|
||||
}
|
||||
return getDataTable(surProjectUnitInfoService.selectSurProjectUnitInfoList(surProjectUnitInfo));
|
||||
|
|
|
@ -65,11 +65,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!-- 查询条件-项目部门 -->
|
||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||
<!--子部门数据-->
|
||||
<if test='nowRole == "4"'> and (sp.deptId = #{nowDept} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
|
||||
<if test='nowRole == "4"'> and (sp.deptId = #{nowDept} or spcd.witness_user=#{nowUserName})</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and (spui.unitId = #{nowDept} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and (spui.unitId = #{nowDept} or spcd.witness_user=#{nowUserName})</if>
|
||||
<!--普通用户查询项目人员-->
|
||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
|
||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spcd.witness_user=#{nowUserName})</if>
|
||||
<if test='activeName == "sjz"'> and spcd.check_state = '1'</if>
|
||||
<if test='activeName == "ywc"'> and spcd.check_state = '2'</if>
|
||||
</where>
|
||||
|
@ -102,11 +102,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!-- 查询条件-项目部门 -->
|
||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||
<!--子部门数据-->
|
||||
<if test='nowRole == "4"'> and (sp.deptId = #{nowDept} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
|
||||
<if test='nowRole == "4"'> and (sp.deptId = #{nowDept} or spcd.witness_user=#{nowUserName})</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and (spui.unitId = #{nowDept} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and (spui.unitId = #{nowDept} or spcd.witness_user=#{nowUserName})</if>
|
||||
<!--普通用户查询项目人员-->
|
||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spm.quality_user=#{nowUserName} or spm.supervise_user=#{nowUserName})</if>
|
||||
<if test='nowRole == "15" or nowRole == "16" or nowRole == "17" or nowRole == "99"'> and spu.is_del=0 and (spu.user_id = #{nowUser} or spcd.witness_user=#{nowUserName})</if>
|
||||
GROUP BY check_state
|
||||
</where>
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue