提交代码

dev_xds
姜玉琦 2024-03-18 22:48:40 +08:00
parent 1b8fb5fac3
commit 509eb22d28
14 changed files with 2127 additions and 1648 deletions

View File

@ -113,7 +113,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/login","/wechat/**", "/common/**", "/register", "/captchaImage","/bgscreen/**","/publics/**","/system/dict/data/**").permitAll()
// 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/**/img/**", "/profile/**").permitAll()
.antMatchers(HttpMethod.GET, "/", "/*.txt", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/**/img/**", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated()

View File

@ -8,7 +8,11 @@
size="80%"
>
<template slot="title">
<div>流程详情 {{ title }} - 当前进度{{ jdtitle }}<span v-if="showjd"> - {{options.taskName}}</span></div>
<div>
流程详情 {{ title }} - 当前进度{{ jdtitle }}<span v-if="showjd">
- 当前节点{{ options.taskName }}</span
>
</div>
</template>
<div class="drawer">
<div class="drawerLeft">
@ -23,36 +27,67 @@
:icon="setIcon(item)"
:color="setColor(item)"
>
<p style="font-weight: 700"> {{ getSort(index) }}{{item.taskName}}{{item.commentResult}}</p>
<p style="font-weight: 700">
{{ getSort(index) }}{{ item.taskName }}{{ item.commentResult }}
</p>
<el-card :body-style="{ padding: '6px' }">
<el-descriptions class="margin-top" :column="1" size="small" border>
<el-descriptions-item v-if="item.assigneeName" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.assigneeName"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-user"></i>办理人</template>
{{ item.assigneeName }}
<el-tag type="info" size="mini">{{ item.deptName }}</el-tag>
</el-descriptions-item>
<el-descriptions-item v-if="item.candidate" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.candidate"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-user"></i>候选办理</template>
{{ item.candidate }}
</el-descriptions-item>
<el-descriptions-item v-if="item.deleteReason" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.deleteReason"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-user"></i>驳回节点</template>
{{ getDeleteReason(item.deleteReason) }}
</el-descriptions-item>
<el-descriptions-item label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-date"></i>接收时间</template>
{{ item.startTime }}
</el-descriptions-item>
<el-descriptions-item v-if="item.endTime" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.endTime"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-date"></i>处理时间</template>
{{ item.endTime }}
</el-descriptions-item>
<el-descriptions-item v-if="item.duration" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.duration"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-time"></i>处理耗时</template>
{{ getDurationDate(item.duration) }}
</el-descriptions-item>
<el-descriptions-item v-if="item.message" label-class-name="my-label" :labelStyle="labelStyle">
<template slot="label"><i class="el-icon-tickets"></i>处理意见</template>
<el-descriptions-item
v-if="item.message"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"
><i class="el-icon-tickets"></i>处理意见</template
>
{{ item.message }}
</el-descriptions-item>
</el-descriptions>
@ -61,9 +96,7 @@
</el-timeline>
</div>
<div class="drawerRight">
<el-form
label-width="100px"
>
<el-form label-width="100px">
<el-form-item label="所属项目">
{{ initData.projectName }}
</el-form-item>
@ -83,7 +116,7 @@
type="text"
icon="el-icon-paperclip"
@click="handledownload(file)"
>{{file.substring(file.lastIndexOf('/')+1)}}</el-button
>{{ file.substring(file.lastIndexOf("/") + 1) }}</el-button
>
</div>
</el-form-item>
@ -103,11 +136,13 @@
<script>
import { flowXmlAndNode } from "@/api/flowable/definition";
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
import {findCommentByProcInsId,findFormDatasByProcInsId} from "@/api/flowable/businessKey";
import {
findCommentByProcInsId,
findFormDatasByProcInsId,
} from "@/api/flowable/businessKey";
export default {
components: {},
props: {
},
props: {},
data() {
return {
//
@ -127,7 +162,7 @@ export default {
showjd: false,
//label
labelStyle: { width: "180px" },
initData:{}
initData: {},
};
},
computed: {},
@ -138,8 +173,7 @@ export default {
methods: {
setIcon(row) {
if (row.endTime) {
if(row.commentResult=="驳回")
{
if (row.commentResult == "驳回") {
return "el-icon-close";
} else {
return "el-icon-check";
@ -150,8 +184,7 @@ export default {
},
setColor(row) {
if (row.endTime) {
if(row.commentResult=="驳回")
{
if (row.commentResult == "驳回") {
return "#f56c6c";
} else {
return "#2bc418";
@ -188,9 +221,11 @@ export default {
}
this.getFlowRecordList(options.procInsId, options.deployId);
this.getFormDatasList(options.procInsId, options.deployId);
flowXmlAndNode({ procInsId:options.procInsId, deployId: options.deployId }).then((res) => {
flowXmlAndNode({ procInsId: options.procInsId, deployId: options.deployId }).then(
(res) => {
this.initFlowImage(res.data);
});
}
);
},
async initFlowImage(data) {
const self = this;
@ -203,7 +238,7 @@ export default {
//
self.bpmnViewer.get("canvas").zoom("fit-viewport", "auto");
if (data.nodeData !== undefined && data.nodeData.length > 0) {
self.fillColor(data.nodeData)
self.fillColor(data.nodeData);
}
} catch (err) {
console.error(err.message, err.warnings);
@ -218,13 +253,15 @@ export default {
// }).catch(res => {
// this.$message.error("...");
// })
const that = this
const params = {procInsId: procInsId}
findCommentByProcInsId(params).then(res => {
const that = this;
const params = { procInsId: procInsId };
findCommentByProcInsId(params)
.then((res) => {
that.flowRecordList = res.data;
}).catch(res => {
this.$message.error("数据异常,请联系管理员...");
})
.catch((res) => {
this.$message.error("数据异常,请联系管理员...");
});
},
/** 流程表单数据 */
getFormDatasList(procInsId, deployId) {
@ -235,123 +272,162 @@ export default {
// }).catch(res => {
// this.$message.error("...");
// })
const that = this
const params = {procInsId: procInsId}
findFormDatasByProcInsId(params).then(res => {
const that = this;
const params = { procInsId: procInsId };
findFormDatasByProcInsId(params)
.then((res) => {
this.initData = res.data;
this.initData.files = res.data.files.split(',');
}).catch(res => {
this.$message.error("数据异常,请联系管理员...");
this.initData.files = res.data.files.split(",");
})
.catch((res) => {
this.$message.error("数据异常,请联系管理员...");
});
},
//
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') {
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)
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')
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')
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') {
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)
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')
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') {
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)
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')
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)
} 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
canvas.addMarker(nn.id, "highlight");
canvas.addMarker(n.id, "highlight");
return;
}
})
}
else if (n.$type === 'bpmn:EndEvent') {
});
} else if (n.$type === "bpmn:EndEvent") {
if (endTask.key === n.id && endTask.completed) {
canvas.addMarker(n.id, 'highlight')
return
canvas.addMarker(n.id, "highlight");
return;
}
}
})
});
},
getDurationDate(val) {
//
let days = Math.floor(val / (24 * 3600 * 1000))
let days = Math.floor(val / (24 * 3600 * 1000));
//
let leave1 = val % (24 * 3600 * 1000) //
let hours = Math.floor(leave1 / (3600 * 1000))
let leave1 = val % (24 * 3600 * 1000); //
let hours = Math.floor(leave1 / (3600 * 1000));
//
let leave2 = leave1 % (3600 * 1000) //
let minutes = Math.floor(leave2 / (60 * 1000))
let leave2 = leave1 % (3600 * 1000); //
let minutes = Math.floor(leave2 / (60 * 1000));
//
let leave3 = leave2 % (60 * 1000) //
let seconds = Math.round(leave3 / 1000)
let leave3 = leave2 % (60 * 1000); //
let seconds = Math.round(leave3 / 1000);
if (days > 0) {
if (days < 10) days = "0" + days;
if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return days + '天' + hours + '小时' + minutes + '分钟' + seconds + '秒';
return days + "天" + hours + "小时" + minutes + "分钟" + seconds + "秒";
}
if (hours > 0) {
if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return hours + '小时' + minutes + '分钟' + seconds + '秒';
return hours + "小时" + minutes + "分钟" + seconds + "秒";
}
if (minutes > 0) {
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return minutes + '分钟' + seconds + '秒';
return minutes + "分钟" + seconds + "秒";
}
if (seconds > 0) {
if (seconds < 10) seconds = "0" + seconds;
return seconds + '秒';
return seconds + "秒";
}
},
handledownload(url) {
let fileType = url.split(".");
if (fileTypes.indexOf(fileType) > -1) {
window.open(process.env.VUE_APP_BASE_API + url);
} else {
this.$download.resource(url);
}
},
getDeleteReason(val) {
val = val.replace("Change activity to ", "");
@ -361,7 +437,7 @@ export default {
return "驳回至" + flowRecordList[i].taskName;
}
}
}
},
},
};
</script>
@ -383,7 +459,6 @@ export default {
padding-right: 20px;
.bjs-powered-by {
display: none !important;
}
.maskLayer {
width: 100%;

View File

@ -8,7 +8,11 @@
size="80%"
>
<template slot="title">
<div>流程详情 {{ title }} - 当前进度{{ jdtitle }}<span v-if="showjd"> - {{options.taskName}}</span></div>
<div>
流程详情 {{ title }} - 当前进度{{ jdtitle }}<span v-if="showjd">
- 当前节点{{ options.taskName }}</span
>
</div>
</template>
<div class="drawer">
<div class="drawerLeft">
@ -23,36 +27,67 @@
:icon="setIcon(item)"
:color="setColor(item)"
>
<p style="font-weight: 700"> {{ getSort(index) }}{{item.taskName}}{{item.commentResult}}</p>
<p style="font-weight: 700">
{{ getSort(index) }}{{ item.taskName }}{{ item.commentResult }}
</p>
<el-card :body-style="{ padding: '6px' }">
<el-descriptions class="margin-top" :column="1" size="small" border>
<el-descriptions-item v-if="item.assigneeName" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.assigneeName"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-user"></i>办理人</template>
{{ item.assigneeName }}
<el-tag type="info" size="mini">{{ item.deptName }}</el-tag>
</el-descriptions-item>
<el-descriptions-item v-if="item.candidate" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.candidate"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-user"></i>候选办理</template>
{{ item.candidate }}
</el-descriptions-item>
<el-descriptions-item v-if="item.deleteReason" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.deleteReason"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-user"></i>驳回节点</template>
{{ getDeleteReason(item.deleteReason) }}
</el-descriptions-item>
<el-descriptions-item label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-date"></i>接收时间</template>
{{ item.startTime }}
</el-descriptions-item>
<el-descriptions-item v-if="item.endTime" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.endTime"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-date"></i>处理时间</template>
{{ item.endTime }}
</el-descriptions-item>
<el-descriptions-item v-if="item.duration" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.duration"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-time"></i>处理耗时</template>
{{ getDurationDate(item.duration) }}
</el-descriptions-item>
<el-descriptions-item v-if="item.message" label-class-name="my-label" :labelStyle="labelStyle">
<template slot="label"><i class="el-icon-tickets"></i>处理意见</template>
<el-descriptions-item
v-if="item.message"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"
><i class="el-icon-tickets"></i>处理意见</template
>
{{ item.message }}
</el-descriptions-item>
</el-descriptions>
@ -62,7 +97,13 @@
</div>
<div class="drawerRight">
<el-card class="box-card">
<el-descriptions class="margin-top" :title="title" :column="1" size="medium" border>
<el-descriptions
class="margin-top"
:title="title"
:column="1"
size="medium"
border
>
<el-descriptions-item label-class-name="my-label" :labelStyle="labelStyle">
<template slot="label">
<i class="el-icon-map-location"></i>
@ -121,7 +162,7 @@
</el-descriptions-item>
</el-descriptions>
</el-card>
<div style="text-align: center;margin-top: 30px;">
<div style="text-align: center; margin-top: 30px">
<el-button type="danger" @click="doCanel"> </el-button>
</div>
</div>
@ -133,11 +174,13 @@
<script>
import { flowXmlAndNode } from "@/api/flowable/definition";
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
import {findCommentByProcInsId,findFormDatasByProcInsId} from "@/api/flowable/businessKey";
import {
findCommentByProcInsId,
findFormDatasByProcInsId,
} from "@/api/flowable/businessKey";
export default {
components: {},
props: {
},
props: {},
data() {
return {
//
@ -157,7 +200,7 @@
showjd: false,
//label
labelStyle: { width: "180px" },
initData:{}
initData: {},
};
},
computed: {},
@ -168,8 +211,7 @@
methods: {
setIcon(row) {
if (row.endTime) {
if(row.commentResult=="驳回")
{
if (row.commentResult == "驳回") {
return "el-icon-close";
} else {
return "el-icon-check";
@ -180,8 +222,7 @@
},
setColor(row) {
if (row.endTime) {
if(row.commentResult=="驳回")
{
if (row.commentResult == "驳回") {
return "#f56c6c";
} else {
return "#2bc418";
@ -218,9 +259,11 @@
}
this.getFlowRecordList(options.procInsId, options.deployId);
this.getFormDatasList(options.procInsId, options.deployId);
flowXmlAndNode({ procInsId:options.procInsId, deployId: options.deployId }).then((res) => {
flowXmlAndNode({ procInsId: options.procInsId, deployId: options.deployId }).then(
(res) => {
this.initFlowImage(res.data);
});
}
);
},
async initFlowImage(data) {
const self = this;
@ -233,7 +276,7 @@
//
self.bpmnViewer.get("canvas").zoom("fit-viewport", "auto");
if (data.nodeData !== undefined && data.nodeData.length > 0) {
self.fillColor(data.nodeData)
self.fillColor(data.nodeData);
}
} catch (err) {
console.error(err.message, err.warnings);
@ -248,13 +291,15 @@
// }).catch(res => {
// this.$message.error("...");
// })
const that = this
const params = {procInsId: procInsId}
findCommentByProcInsId(params).then(res => {
const that = this;
const params = { procInsId: procInsId };
findCommentByProcInsId(params)
.then((res) => {
that.flowRecordList = res.data;
}).catch(res => {
this.$message.error("数据异常,请联系管理员...");
})
.catch((res) => {
this.$message.error("数据异常,请联系管理员...");
});
},
/** 流程表单数据 */
getFormDatasList(procInsId, deployId) {
@ -265,118 +310,152 @@
// }).catch(res => {
// this.$message.error("...");
// })
const that = this
const params = {procInsId: procInsId}
findFormDatasByProcInsId(params).then(res => {
const that = this;
const params = { procInsId: procInsId };
findFormDatasByProcInsId(params)
.then((res) => {
this.initData = res.data;
}).catch(res => {
this.$message.error("数据异常,请联系管理员...");
})
.catch((res) => {
this.$message.error("数据异常,请联系管理员...");
});
},
//
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') {
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)
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')
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')
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') {
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)
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')
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') {
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)
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')
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)
} 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
canvas.addMarker(nn.id, "highlight");
canvas.addMarker(n.id, "highlight");
return;
}
})
}
else if (n.$type === 'bpmn:EndEvent') {
});
} else if (n.$type === "bpmn:EndEvent") {
if (endTask.key === n.id && endTask.completed) {
canvas.addMarker(n.id, 'highlight')
return
canvas.addMarker(n.id, "highlight");
return;
}
}
})
});
},
getDurationDate(val) {
//
let days = Math.floor(val / (24 * 3600 * 1000))
let days = Math.floor(val / (24 * 3600 * 1000));
//
let leave1 = val % (24 * 3600 * 1000) //
let hours = Math.floor(leave1 / (3600 * 1000))
let leave1 = val % (24 * 3600 * 1000); //
let hours = Math.floor(leave1 / (3600 * 1000));
//
let leave2 = leave1 % (3600 * 1000) //
let minutes = Math.floor(leave2 / (60 * 1000))
let leave2 = leave1 % (3600 * 1000); //
let minutes = Math.floor(leave2 / (60 * 1000));
//
let leave3 = leave2 % (60 * 1000) //
let seconds = Math.round(leave3 / 1000)
let leave3 = leave2 % (60 * 1000); //
let seconds = Math.round(leave3 / 1000);
if (days > 0) {
if (days < 10) days = "0" + days;
if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return days + '天' + hours + '小时' + minutes + '分钟' + seconds + '秒';
return days + "天" + hours + "小时" + minutes + "分钟" + seconds + "秒";
}
if (hours > 0) {
if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return hours + '小时' + minutes + '分钟' + seconds + '秒';
return hours + "小时" + minutes + "分钟" + seconds + "秒";
}
if (minutes > 0) {
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return minutes + '分钟' + seconds + '秒';
return minutes + "分钟" + seconds + "秒";
}
if (seconds > 0) {
if (seconds < 10) seconds = "0" + seconds;
return seconds + '秒';
return seconds + "秒";
}
},
handledownload(url) {
@ -390,7 +469,7 @@
return "驳回至" + flowRecordList[i].taskName;
}
}
}
},
},
};
</script>
@ -412,7 +491,6 @@
padding-right: 20px;
.bjs-powered-by {
display: none !important;
}
.maskLayer {
width: 100%;
@ -496,4 +574,3 @@
}
}
</style>

View File

@ -55,7 +55,7 @@
@input="fileInput"
:limit="9"
v-model="form.files"
:fileType="['pdf', 'png', 'jpg', 'jpeg', 'doc', 'docx', 'xls', 'xlsx']"
:fileType="['pdf', 'png', 'jpg', 'jpeg']"
/>
</el-form-item>
<el-form-item label="申请说明" prop="remark">
@ -153,9 +153,11 @@
this.onOpen = true;
this.title = options.procDefName;
this.initFormDate(options.procInsId);
flowXmlAndNode({ procInsId:options.procInsId, deployId: options.deployId }).then((res) => {
flowXmlAndNode({ procInsId: options.procInsId, deployId: options.deployId }).then(
(res) => {
this.initFlowImage(res.data);
});
}
);
},
async initFlowImage(data) {
const self = this;
@ -168,7 +170,7 @@
//
self.bpmnViewer.get("canvas").zoom("fit-viewport", "auto");
if (data.nodeData !== undefined && data.nodeData.length > 0) {
self.fillColor(data.nodeData)
self.fillColor(data.nodeData);
}
} catch (err) {
console.error(err.message, err.warnings);
@ -176,9 +178,12 @@
},
/** 流程表单数据 */
initFormDate(procInsId, deployId) {
this.projectOptions=[{id:this.options.businessKey,projectName:this.options.businessKeyName}];
const params = {procInsId: procInsId}
findFormDatasByProcInsId(params).then(res => {
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;
@ -188,9 +193,10 @@
this.form.assignee = store.getters.name;
this.form.procInsId = this.options.procInsId;
this.form.instanceId = this.options.procInsId;
}).catch(res => {
this.$message.error("数据异常,请联系管理员...");
})
.catch((res) => {
this.$message.error("数据异常,请联系管理员...");
});
},
fileInput(files) {
let fileUrls = "";
@ -212,10 +218,10 @@
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');
INITIATOR: this.form.INITIATOR,
};
complete(this.form).then((res) => {
this.$store.dispatch("settingAwaitNum");
this.$modal.msgSuccess("任务提交成功");
this.loading = false;
//
@ -226,74 +232,106 @@
},
//
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') {
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)
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')
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')
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') {
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)
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')
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') {
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)
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')
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)
} 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
canvas.addMarker(nn.id, "highlight");
canvas.addMarker(n.id, "highlight");
return;
}
})
}
else if (n.$type === 'bpmn:EndEvent') {
});
} else if (n.$type === "bpmn:EndEvent") {
if (endTask.key === n.id && endTask.completed) {
canvas.addMarker(n.id, 'highlight')
return
canvas.addMarker(n.id, "highlight");
return;
}
}
})
});
},
},
};
@ -376,4 +414,3 @@
}
}
</style>

View File

@ -49,14 +49,26 @@
<el-form-item label="审批事项">
{{ title }}
</el-form-item>
<el-form-item label="审批内容" prop="files" v-if="options.flowKey!='flow_xmglzdl_qjsp' && options.flowKey!='flow_aql_sxkj'">
<el-form-item
label="审批内容"
prop="files"
v-if="
options.flowKey != 'flow_xmglzdl_qjsp' && options.flowKey != 'flow_aql_sxkj'
"
>
<FileUpload
@input="fileInput"
:limit="9"
:fileType="['pdf', 'png', 'jpg', 'jpeg', 'doc', 'docx', 'xls', 'xlsx']"
:fileType="['pdf', 'png', 'jpg', 'jpeg']"
/>
</el-form-item>
<el-form-item label="申请说明" prop="remark" v-if="options.flowKey!='flow_xmglzdl_qjsp' && options.flowKey!='flow_aql_sxkj'">
<el-form-item
label="申请说明"
prop="remark"
v-if="
options.flowKey != 'flow_xmglzdl_qjsp' && options.flowKey != 'flow_aql_sxkj'
"
>
<el-input
type="textarea"
v-model="form.remark"

View File

@ -54,7 +54,7 @@
<FileUpload
@input="fileInput"
:limit="9"
:fileType="['pdf', 'png', 'jpg', 'jpeg', 'doc', 'docx', 'xls', 'xlsx']"
:fileType="['pdf', 'png', 'jpg', 'jpeg']"
/>
</el-form-item>
<el-form-item label="申请说明" prop="remark">

View File

@ -9,7 +9,11 @@
size="80%"
>
<template slot="title">
<div>流程详情 {{ title }} - 当前进度{{ jdtitle }}<span v-if="showjd"> - {{options.taskName}}</span></div>
<div>
流程详情 {{ title }} - 当前进度{{ jdtitle }}<span v-if="showjd">
- 当前节点{{ options.taskName }}</span
>
</div>
</template>
<div class="drawer">
<div class="drawerLeft block containers">
@ -22,36 +26,67 @@
:icon="setIcon(item)"
:color="setColor(item)"
>
<p style="font-weight: 700"> {{ getSort(index) }}{{item.taskName}}{{item.commentResult}}</p>
<p style="font-weight: 700">
{{ getSort(index) }}{{ item.taskName }}{{ item.commentResult }}
</p>
<el-card :body-style="{ padding: '6px' }">
<el-descriptions class="margin-top" :column="1" size="small" border>
<el-descriptions-item v-if="item.assigneeName" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.assigneeName"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-user"></i>办理人</template>
{{ item.assigneeName }}
<el-tag type="info" size="mini">{{ item.deptName }}</el-tag>
</el-descriptions-item>
<el-descriptions-item v-if="item.candidate" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.candidate"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-user"></i>候选办理</template>
{{ item.candidate }}
</el-descriptions-item>
<el-descriptions-item v-if="item.deleteReason" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.deleteReason"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-user"></i>驳回节点</template>
{{ getDeleteReason(item.deleteReason) }}
</el-descriptions-item>
<el-descriptions-item label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-date"></i>接收时间</template>
{{ item.startTime }}
</el-descriptions-item>
<el-descriptions-item v-if="item.endTime" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.endTime"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-date"></i>处理时间</template>
{{ item.endTime }}
</el-descriptions-item>
<el-descriptions-item v-if="item.duration" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.duration"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-time"></i>处理耗时</template>
{{ getDurationDate(item.duration) }}
</el-descriptions-item>
<el-descriptions-item v-if="item.message" label-class-name="my-label" :labelStyle="labelStyle">
<template slot="label"><i class="el-icon-tickets"></i>处理意见</template>
<el-descriptions-item
v-if="item.message"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"
><i class="el-icon-tickets"></i>处理意见</template
>
{{ item.message }}
</el-descriptions-item>
</el-descriptions>
@ -61,7 +96,12 @@
</div>
<div class="drawerRight">
<el-form
ref="form" :model="form" :rules="rules" label-width="100px" v-loading="loading">
ref="form"
:model="form"
:rules="rules"
label-width="100px"
v-loading="loading"
>
<el-form-item label="所属项目">
{{ initData.projectName }}
</el-form-item>
@ -81,7 +121,7 @@
type="text"
icon="el-icon-paperclip"
@click="handledownload(file)"
>{{file.substring(file.lastIndexOf('/')+1)}}</el-button
>{{ file.substring(file.lastIndexOf("/") + 1) }}</el-button
>
</div>
</el-form-item>
@ -112,16 +152,50 @@
</el-select>
</el-form-item>
<div style="text-align: center">
<el-button icon="el-icon-s-custom" v-if="false" type="primary" plain size="mini"></el-button>
<el-button icon="el-icon-check" type="success" size="mini" @click="handlePass"></el-button>
<el-button icon="el-icon-back" type="warning" size="mini" @click="handleBack">退</el-button>
<el-button icon="el-icon-circle-close" type="danger" size="mini" @click="handleReject"></el-button>
<el-button
icon="el-icon-s-custom"
v-if="false"
type="primary"
plain
size="mini"
>任务转办</el-button
>
<el-button
icon="el-icon-check"
type="success"
size="mini"
@click="handlePass"
>审批通过</el-button
>
<el-button
icon="el-icon-back"
type="warning"
size="mini"
@click="handleBack"
>退回任务</el-button
>
<el-button
icon="el-icon-circle-close"
type="danger"
size="mini"
@click="handleReject"
>驳回上级</el-button
>
</div>
</el-form>
<div class="page-warning">
<p><strong style="color: #67C23A;">审批通过</strong> 操作后代表您对当前任务满意任务进入下一阶段</p>
<p><strong style="color: #E6A23C;">退回任务</strong> 操作后代表您对当前任务不满意任务进入您选择的阶段或者直接退回给申请人重新申请</p>
<p><strong style="color: #F56C6C;">驳回上级</strong> 操作后代表您对当前任务不满意任务退回到上一阶段继续处理</p>
<p>
<strong style="color: #67c23a">审批通过</strong>
操作后代表您对当前任务满意任务进入下一阶段
</p>
<p>
<strong style="color: #e6a23c">退回任务</strong>
操作后代表您对当前任务不满意任务进入您选择的阶段或者直接退回给申请人重新申请
</p>
<p>
<strong style="color: #f56c6c">驳回上级</strong>
操作后代表您对当前任务不满意任务退回到上一阶段继续处理
</p>
</div>
</div>
</div>
@ -134,7 +208,10 @@ import store from "@/store";
import { flowXmlAndNode } from "@/api/flowable/definition";
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
import { complete, rejectTask, returnTask, returnList } from "@/api/flowable/todo";
import {findCommentByProcInsId,findFormDatasByProcInsId} from "@/api/flowable/businessKey";
import {
findCommentByProcInsId,
findFormDatasByProcInsId,
} from "@/api/flowable/businessKey";
export default {
components: {},
props: {
@ -177,7 +254,8 @@ export default {
initData: {},
returnTaskList: [], // 退
returnTask: false,
returnTaskBtn:false
returnTaskBtn: false,
fileTypes:['pdf','png','jpg','jpeg'],
};
},
computed: {},
@ -190,19 +268,21 @@ export default {
handlePass() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.$confirm('是否确认审批通过当前流程申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$confirm("是否确认审批通过当前流程申请?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.loading = true;
complete(this.form).then(res => {
complete(this.form).then((res) => {
this.$modal.msgSuccess("任务审批成功");
this.loading = false;
//
this.$refs.drawer.closeDrawer();
});
}).catch(() => {
})
.catch(() => {
console.log("取消操作");
});
}
@ -212,19 +292,21 @@ export default {
handleReject() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.$confirm('是否确认审批驳回当前流程申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$confirm("是否确认审批驳回当前流程申请?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.loading = true;
rejectTask(this.form).then(res => {
rejectTask(this.form).then((res) => {
this.$modal.msgSuccess("任务驳回成功");
this.loading = false;
//
this.$refs.drawer.closeDrawer();
});
}).catch(() => {
})
.catch(() => {
console.log("取消操作");
});
}
@ -243,32 +325,34 @@ export default {
this.$modal.msgWarning("请选择退回节点");
return;
}
this.$confirm('是否确认退回当前流程申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$confirm("是否确认退回当前流程申请?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.loading = true;
returnTask(this.form).then(res => {
returnTask(this.form).then((res) => {
this.$modal.msgSuccess("任务退回成功");
this.loading = false;
//
this.$refs.drawer.closeDrawer();
});
}).catch(() => {
})
.catch(() => {
console.log("取消操作");
});
}
});
},
initReturnList() {
returnList(this.form).then(res => {
returnList(this.form).then((res) => {
this.returnTaskList = res.data;
//退>1退
if (res.data.length > 1) {
this.returnTaskBtn = true;
}
})
});
},
initFormDate() {
this.form.taskId = this.options.taskId;
@ -284,8 +368,7 @@ export default {
},
setIcon(row) {
if (row.endTime) {
if(row.commentResult=="驳回")
{
if (row.commentResult == "驳回") {
return "el-icon-close";
} else {
return "el-icon-check";
@ -296,8 +379,7 @@ export default {
},
setColor(row) {
if (row.endTime) {
if(row.commentResult=="驳回")
{
if (row.commentResult == "驳回") {
return "#f56c6c";
} else {
return "#2bc418";
@ -335,9 +417,11 @@ export default {
}
this.getFlowRecordList(options.procInsId, options.deployId);
this.getFormDatasList(options.procInsId, options.deployId);
flowXmlAndNode({ procInsId:options.procInsId, deployId: options.deployId }).then((res) => {
flowXmlAndNode({ procInsId: options.procInsId, deployId: options.deployId }).then(
(res) => {
this.initFlowImage(res.data);
});
}
);
},
async initFlowImage(data) {
const self = this;
@ -350,7 +434,7 @@ export default {
//
self.bpmnViewer.get("canvas").zoom("fit-viewport", "auto");
if (data.nodeData !== undefined && data.nodeData.length > 0) {
self.fillColor(data.nodeData)
self.fillColor(data.nodeData);
}
} catch (err) {
console.error(err.message, err.warnings);
@ -365,13 +449,15 @@ export default {
// }).catch(res => {
// this.$message.error("...");
// })
const that = this
const params = {procInsId: procInsId}
findCommentByProcInsId(params).then(res => {
const that = this;
const params = { procInsId: procInsId };
findCommentByProcInsId(params)
.then((res) => {
that.flowRecordList = res.data;
}).catch(res => {
this.$message.error("数据异常,请联系管理员...");
})
.catch((res) => {
this.$message.error("数据异常,请联系管理员...");
});
},
/** 流程表单数据 */
getFormDatasList(procInsId, deployId) {
@ -382,123 +468,162 @@ export default {
// }).catch(res => {
// this.$message.error("...");
// })
const that = this
const params = {procInsId: procInsId}
findFormDatasByProcInsId(params).then(res => {
const that = this;
const params = { procInsId: procInsId };
findFormDatasByProcInsId(params)
.then((res) => {
this.initData = res.data;
this.initData.files = res.data.files.split(',');
}).catch(res => {
this.$message.error("数据异常,请联系管理员...");
this.initData.files = res.data.files.split(",");
})
.catch((res) => {
this.$message.error("数据异常,请联系管理员...");
});
},
//
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') {
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)
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')
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')
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') {
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)
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')
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') {
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)
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')
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)
} 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
canvas.addMarker(nn.id, "highlight");
canvas.addMarker(n.id, "highlight");
return;
}
})
}
else if (n.$type === 'bpmn:EndEvent') {
});
} else if (n.$type === "bpmn:EndEvent") {
if (endTask.key === n.id && endTask.completed) {
canvas.addMarker(n.id, 'highlight')
return
canvas.addMarker(n.id, "highlight");
return;
}
}
})
});
},
getDurationDate(val) {
//
let days = Math.floor(val / (24 * 3600 * 1000))
let days = Math.floor(val / (24 * 3600 * 1000));
//
let leave1 = val % (24 * 3600 * 1000) //
let hours = Math.floor(leave1 / (3600 * 1000))
let leave1 = val % (24 * 3600 * 1000); //
let hours = Math.floor(leave1 / (3600 * 1000));
//
let leave2 = leave1 % (3600 * 1000) //
let minutes = Math.floor(leave2 / (60 * 1000))
let leave2 = leave1 % (3600 * 1000); //
let minutes = Math.floor(leave2 / (60 * 1000));
//
let leave3 = leave2 % (60 * 1000) //
let seconds = Math.round(leave3 / 1000)
let leave3 = leave2 % (60 * 1000); //
let seconds = Math.round(leave3 / 1000);
if (days > 0) {
if (days < 10) days = "0" + days;
if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return days + '天' + hours + '小时' + minutes + '分钟' + seconds + '秒';
return days + "天" + hours + "小时" + minutes + "分钟" + seconds + "秒";
}
if (hours > 0) {
if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return hours + '小时' + minutes + '分钟' + seconds + '秒';
return hours + "小时" + minutes + "分钟" + seconds + "秒";
}
if (minutes > 0) {
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return minutes + '分钟' + seconds + '秒';
return minutes + "分钟" + seconds + "秒";
}
if (seconds > 0) {
if (seconds < 10) seconds = "0" + seconds;
return seconds + '秒';
return seconds + "秒";
}
},
handledownload(url) {
let fileType = url.split(".");
if(fileTypes.indexOf(fileType)>-1){
window.open(process.env.VUE_APP_BASE_API+url);
}else{
this.$download.resource(url);
}
},
getDeleteReason(val) {
val = val.replace("Change activity to ", "");
@ -531,7 +656,6 @@ export default {
padding-right: 20px;
.bjs-powered-by {
display: none !important;
}
.maskLayer {
width: 100%;
@ -618,7 +742,7 @@ export default {
padding: 8px 16px;
background-color: #f0f9eb;
border-radius: 4px;
border-left: 5px solid #67C23A;
border-left: 5px solid #67c23a;
margin: 20px 0;
font-size: 13px;
margin-top: 30px;

View File

@ -9,7 +9,11 @@
size="80%"
>
<template slot="title">
<div>流程详情 {{ title }} - 当前进度{{ jdtitle }}<span v-if="showjd"> - {{options.taskName}}</span></div>
<div>
流程详情 {{ title }} - 当前进度{{ jdtitle }}<span v-if="showjd">
- 当前节点{{ options.taskName }}</span
>
</div>
</template>
<div class="drawer">
<div class="drawerLeft block containers">
@ -22,36 +26,67 @@
:icon="setIcon(item)"
:color="setColor(item)"
>
<p style="font-weight: 700"> {{ getSort(index) }}{{item.taskName}}{{item.commentResult}}</p>
<p style="font-weight: 700">
{{ getSort(index) }}{{ item.taskName }}{{ item.commentResult }}
</p>
<el-card :body-style="{ padding: '6px' }">
<el-descriptions class="margin-top" :column="1" size="small" border>
<el-descriptions-item v-if="item.assigneeName" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.assigneeName"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-user"></i>办理人</template>
{{ item.assigneeName }}
<el-tag type="info" size="mini">{{ item.deptName }}</el-tag>
</el-descriptions-item>
<el-descriptions-item v-if="item.candidate" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.candidate"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-user"></i>候选办理</template>
{{ item.candidate }}
</el-descriptions-item>
<el-descriptions-item v-if="item.deleteReason" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.deleteReason"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-user"></i>驳回节点</template>
{{ getDeleteReason(item.deleteReason) }}
</el-descriptions-item>
<el-descriptions-item label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-date"></i>接收时间</template>
{{ item.startTime }}
</el-descriptions-item>
<el-descriptions-item v-if="item.endTime" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.endTime"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-date"></i>处理时间</template>
{{ item.endTime }}
</el-descriptions-item>
<el-descriptions-item v-if="item.duration" label-class-name="my-label" :labelStyle="labelStyle">
<el-descriptions-item
v-if="item.duration"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"><i class="el-icon-time"></i>处理耗时</template>
{{ getDurationDate(item.duration) }}
</el-descriptions-item>
<el-descriptions-item v-if="item.message" label-class-name="my-label" :labelStyle="labelStyle">
<template slot="label"><i class="el-icon-tickets"></i>处理意见</template>
<el-descriptions-item
v-if="item.message"
label-class-name="my-label"
:labelStyle="labelStyle"
>
<template slot="label"
><i class="el-icon-tickets"></i>处理意见</template
>
{{ item.message }}
</el-descriptions-item>
</el-descriptions>
@ -61,7 +96,13 @@
</div>
<div class="drawerRight">
<el-card class="box-card">
<el-descriptions class="margin-top" :title="title" :column="1" size="medium" border>
<el-descriptions
class="margin-top"
:title="title"
:column="1"
size="medium"
border
>
<el-descriptions-item label-class-name="my-label" :labelStyle="labelStyle">
<template slot="label">
<i class="el-icon-map-location"></i>
@ -120,7 +161,14 @@
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-form ref="form" :model="form" :rules="rules" label-width="100px" v-loading="loading" style="margin-top: 30px;">
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="100px"
v-loading="loading"
style="margin-top: 30px"
>
<el-form-item label="审批意见" prop="comment">
<el-input
type="textarea"
@ -145,16 +193,52 @@
</el-select>
</el-form-item>
<div style="text-align: center">
<el-button icon="el-icon-s-custom" v-if="false" type="primary" plain size="mini" @click="handleAssign"></el-button>
<el-button icon="el-icon-check" type="success" size="mini" @click="handlePass"></el-button>
<el-button icon="el-icon-back" v-if="returnTaskBtn" type="warning" size="mini" @click="handleBack">退</el-button>
<el-button icon="el-icon-circle-close" type="danger" size="mini" @click="handleReject"></el-button>
<el-button
icon="el-icon-s-custom"
v-if="false"
type="primary"
plain
size="mini"
@click="handleAssign"
>任务转办</el-button
>
<el-button
icon="el-icon-check"
type="success"
size="mini"
@click="handlePass"
>审批通过</el-button
>
<el-button
icon="el-icon-back"
v-if="returnTaskBtn"
type="warning"
size="mini"
@click="handleBack"
>退回任务</el-button
>
<el-button
icon="el-icon-circle-close"
type="danger"
size="mini"
@click="handleReject"
>驳回上级</el-button
>
</div>
</el-form>
<div class="page-warning">
<p><strong style="color: #67C23A;">审批通过</strong> 操作后代表您对当前任务满意任务进入下一阶段</p>
<p><strong style="color: #E6A23C;">退回任务</strong> 操作后代表您对当前任务不满意任务进入您选择的阶段或者直接退回给申请人重新申请</p>
<p><strong style="color: #F56C6C;">驳回上级</strong> 操作后代表您对当前任务不满意任务退回到上一阶段继续处理</p>
<p>
<strong style="color: #67c23a">审批通过</strong>
操作后代表您对当前任务满意任务进入下一阶段
</p>
<p>
<strong style="color: #e6a23c">退回任务</strong>
操作后代表您对当前任务不满意任务进入您选择的阶段或者直接退回给申请人重新申请
</p>
<p>
<strong style="color: #f56c6c">驳回上级</strong>
操作后代表您对当前任务不满意任务退回到上一阶段继续处理
</p>
</div>
</div>
</div>
@ -167,7 +251,10 @@ import store from "@/store";
import { flowXmlAndNode } from "@/api/flowable/definition";
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
import { complete, rejectTask, returnTask, returnList } from "@/api/flowable/todo";
import {findCommentByProcInsId,findFormDatasByProcInsId} from "@/api/flowable/businessKey";
import {
findCommentByProcInsId,
findFormDatasByProcInsId,
} from "@/api/flowable/businessKey";
export default {
components: {},
props: {
@ -210,7 +297,7 @@ export default {
initData: {},
returnTaskList: [], // 退
returnTask: false,
returnTaskBtn:false
returnTaskBtn: false,
};
},
computed: {},
@ -223,19 +310,21 @@ export default {
handlePass() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.$confirm('是否确认审批通过当前流程申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$confirm("是否确认审批通过当前流程申请?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.loading = true;
complete(this.form).then(res => {
complete(this.form).then((res) => {
this.$modal.msgSuccess("任务审批成功");
this.loading = false;
//
this.$refs.drawer.closeDrawer();
});
}).catch(() => {
})
.catch(() => {
console.log("取消操作");
});
}
@ -245,19 +334,21 @@ export default {
handleReject() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.$confirm('是否确认审批驳回当前流程申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$confirm("是否确认审批驳回当前流程申请?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.loading = true;
rejectTask(this.form).then(res => {
rejectTask(this.form).then((res) => {
this.$modal.msgSuccess("任务驳回成功");
this.loading = false;
//
this.$refs.drawer.closeDrawer();
});
}).catch(() => {
})
.catch(() => {
console.log("取消操作");
});
}
@ -276,32 +367,34 @@ export default {
this.$modal.msgWarning("请选择退回节点");
return;
}
this.$confirm('是否确认退回当前流程申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$confirm("是否确认退回当前流程申请?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.loading = true;
returnTask(this.form).then(res => {
returnTask(this.form).then((res) => {
this.$modal.msgSuccess("任务退回成功");
this.loading = false;
//
this.$refs.drawer.closeDrawer();
});
}).catch(() => {
})
.catch(() => {
console.log("取消操作");
});
}
});
},
initReturnList() {
returnList(this.form).then(res => {
returnList(this.form).then((res) => {
this.returnTaskList = res.data;
//退>1退
if (res.data.length > 1) {
this.returnTaskBtn = true;
}
})
});
},
initFormDate() {
this.form.taskId = this.options.taskId;
@ -317,8 +410,7 @@ export default {
},
setIcon(row) {
if (row.endTime) {
if(row.commentResult=="驳回")
{
if (row.commentResult == "驳回") {
return "el-icon-close";
} else {
return "el-icon-check";
@ -329,8 +421,7 @@ export default {
},
setColor(row) {
if (row.endTime) {
if(row.commentResult=="驳回")
{
if (row.commentResult == "驳回") {
return "#f56c6c";
} else {
return "#2bc418";
@ -368,9 +459,11 @@ export default {
}
this.getFlowRecordList(options.procInsId, options.deployId);
this.getFormDatasList(options.procInsId, options.deployId);
flowXmlAndNode({ procInsId:options.procInsId, deployId: options.deployId }).then((res) => {
flowXmlAndNode({ procInsId: options.procInsId, deployId: options.deployId }).then(
(res) => {
this.initFlowImage(res.data);
});
}
);
},
async initFlowImage(data) {
const self = this;
@ -383,7 +476,7 @@ export default {
//
self.bpmnViewer.get("canvas").zoom("fit-viewport", "auto");
if (data.nodeData !== undefined && data.nodeData.length > 0) {
self.fillColor(data.nodeData)
self.fillColor(data.nodeData);
}
} catch (err) {
console.error(err.message, err.warnings);
@ -398,13 +491,15 @@ export default {
// }).catch(res => {
// this.$message.error("...");
// })
const that = this
const params = {procInsId: procInsId}
findCommentByProcInsId(params).then(res => {
const that = this;
const params = { procInsId: procInsId };
findCommentByProcInsId(params)
.then((res) => {
that.flowRecordList = res.data;
}).catch(res => {
this.$message.error("数据异常,请联系管理员...");
})
.catch((res) => {
this.$message.error("数据异常,请联系管理员...");
});
},
/** 流程表单数据 */
getFormDatasList(procInsId, deployId) {
@ -415,118 +510,152 @@ export default {
// }).catch(res => {
// this.$message.error("...");
// })
const that = this
const params = {procInsId: procInsId}
findFormDatasByProcInsId(params).then(res => {
const that = this;
const params = { procInsId: procInsId };
findFormDatasByProcInsId(params)
.then((res) => {
this.initData = res.data;
}).catch(res => {
this.$message.error("数据异常,请联系管理员...");
})
.catch((res) => {
this.$message.error("数据异常,请联系管理员...");
});
},
//
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') {
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)
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')
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')
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') {
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)
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')
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') {
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)
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')
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)
} 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
canvas.addMarker(nn.id, "highlight");
canvas.addMarker(n.id, "highlight");
return;
}
})
}
else if (n.$type === 'bpmn:EndEvent') {
});
} else if (n.$type === "bpmn:EndEvent") {
if (endTask.key === n.id && endTask.completed) {
canvas.addMarker(n.id, 'highlight')
return
canvas.addMarker(n.id, "highlight");
return;
}
}
})
});
},
getDurationDate(val) {
//
let days = Math.floor(val / (24 * 3600 * 1000))
let days = Math.floor(val / (24 * 3600 * 1000));
//
let leave1 = val % (24 * 3600 * 1000) //
let hours = Math.floor(leave1 / (3600 * 1000))
let leave1 = val % (24 * 3600 * 1000); //
let hours = Math.floor(leave1 / (3600 * 1000));
//
let leave2 = leave1 % (3600 * 1000) //
let minutes = Math.floor(leave2 / (60 * 1000))
let leave2 = leave1 % (3600 * 1000); //
let minutes = Math.floor(leave2 / (60 * 1000));
//
let leave3 = leave2 % (60 * 1000) //
let seconds = Math.round(leave3 / 1000)
let leave3 = leave2 % (60 * 1000); //
let seconds = Math.round(leave3 / 1000);
if (days > 0) {
if (days < 10) days = "0" + days;
if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return days + '天' + hours + '小时' + minutes + '分钟' + seconds + '秒';
return days + "天" + hours + "小时" + minutes + "分钟" + seconds + "秒";
}
if (hours > 0) {
if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return hours + '小时' + minutes + '分钟' + seconds + '秒';
return hours + "小时" + minutes + "分钟" + seconds + "秒";
}
if (minutes > 0) {
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
return minutes + '分钟' + seconds + '秒';
return minutes + "分钟" + seconds + "秒";
}
if (seconds > 0) {
if (seconds < 10) seconds = "0" + seconds;
return seconds + '秒';
return seconds + "秒";
}
},
handledownload(url) {
@ -563,7 +692,6 @@ export default {
padding-right: 20px;
.bjs-powered-by {
display: none !important;
}
.maskLayer {
width: 100%;
@ -650,7 +778,7 @@ export default {
padding: 8px 16px;
background-color: #f0f9eb;
border-radius: 4px;
border-left: 5px solid #67C23A;
border-left: 5px solid #67c23a;
margin: 20px 0;
font-size: 13px;
margin-top: 30px;

View File

@ -128,7 +128,8 @@
<el-table
v-loading="loading"
:data="surProjectSpecialList"
@selection-change="handleSelectionChange" stripe
@selection-change="handleSelectionChange"
stripe
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
@ -259,7 +260,14 @@
/>
</el-tabs>
<!-- 添加或修改项目特种人员对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false" :close-on-press-escape="false">
<el-dialog
:title="title"
:visible.sync="open"
width="500px"
append-to-body
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="项目名称" prop="projectName">
<el-input v-model="form.projectName" placeholder="请输入项目名称" disabled />
@ -622,7 +630,8 @@ export default {
},
/** 下载证书 */
handledownload(row) {
this.$download.resource(row.credentialFile);
window.open(process.env.VUE_APP_BASE_API + row.credentialFile);
//this.$download.resource(row.credentialFile);
},
},
};

View File

@ -585,7 +585,8 @@ export default {
},
/** 下载证书 */
handledownload(row) {
this.$download.resource(row.credentialFile);
window.open(process.env.VUE_APP_BASE_API+row.credentialFile);
//this.$download.resource(row.credentialFile);
},
},
};

View File

@ -4,6 +4,7 @@ import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.DeptTypeEnum;
import com.ruoyi.common.enums.SysRoleEnum;
@ -25,6 +26,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* @version : V1.0
@ -45,6 +47,9 @@ public class WechatUserLoginServiceImpl implements IWechatUserLoginService {
appInfo.put("wx9997d071b4996f23","5bcc9ca17b31133d93a025871fc5021d");
}
@Autowired
private RedisCache redisCache;
@Autowired
private ISysUserService userService;
@ -125,6 +130,7 @@ public class WechatUserLoginServiceImpl implements IWechatUserLoginService {
map.put("userId", Convert.toStr(userData.get("user_id")));
map.put("nickname",userData.get("nick_name"));
map.put("openId",openId);
map.put("unionid",redisCache.getCacheObject("openid-unionid"+openId));
//验证手机号码是否绑定
int count = wechatUserLoginMapper.checkBindByOpenId(openId);
if(count > 0){
@ -176,7 +182,10 @@ public class WechatUserLoginServiceImpl implements IWechatUserLoginService {
String resultStr = HttpUtil.get(url);
JSONObject json = JSONObject.parseObject(resultStr);
//删除参数session_key否则小程序检测关键参数暴露提示整改
String key = "openid-unionid"+json.get("openid");
redisCache.setCacheObject(key,json.get("unionid"),24, TimeUnit.HOURS);
json.remove("session_key");
return json;
}

View File

@ -15,12 +15,16 @@ user:
# Spring配置
spring:
# 微信资源验证访问
web:
resources:
static-locations: classpath:/wxstatic/
# 资源信息
messages:
# 国际化资源文件路径
basename: i18n/messages
profiles:
active: druid
active: prod
# 文件上传
servlet:
multipart:

View File

@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null and userId != ''">userId,</if>
<if test="loginName != null and loginName != ''">loginName,</if>
<if test="nickname != null and nickname != ''">nickname,</if>
<if test="unionid != null and unionid != ''">unionid,</if>
creatTime
) values
(
@ -42,13 +43,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null and userId != ''">#{userId},</if>
<if test="loginName != null and loginName != ''">#{loginName},</if>
<if test="nickname != null and nickname != ''">#{nickname},</if>
<if test="unionid != null and unionid != ''">#{unionid},</if>
now()
)
</insert>
<!--更新用户openid-->
<update id="updateUserOpenId" parameterType="String">
update sys_user_openid set userId=#{userId},loginName=#{loginName},nickname=#{nickname} where openId =#{openId} and isDel = 0
update sys_user_openid set userId=#{userId},loginName=#{loginName},nickname=#{nickname},unionid=#{unionid} where openId =#{openId} and isDel = 0
</update>
<!--根据电话查询用户id-->

View File

@ -0,0 +1 @@
29aef62cd1316f1635063c5b86a3ffee