From 509eb22d28ee6771c6dc968f168ff25bcda70412 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?=
<7507756+jiang_yuqi@user.noreply.gitee.com>
Date: Mon, 18 Mar 2024 22:48:40 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../framework/config/SecurityConfig.java | 2 +-
.../task/myProcess/detail/detailDrawer.vue | 559 ++++++-----
.../myProcess/detail/detailLeaveDrawer.vue | 879 ++++++++++--------
.../task/myProcess/editTaskDrawer.vue | 729 ++++++++-------
.../task/myProcess/initSpaceTaskDrawer.vue | 18 +-
.../task/myProcess/initTaskDrawer.vue | 8 +-
.../task/todo/detail/approveDrawer.vue | 792 +++++++++-------
.../task/todo/detail/approveLeaveDrawer.vue | 750 ++++++++-------
.../views/project/surProjectSpecial/index.vue | 15 +-
.../surProjectSpecialDrawer.vue | 3 +-
.../impl/WechatUserLoginServiceImpl.java | 9 +
.../src/main/resources/application.yml | 6 +-
.../mapper/WechatUserLoginMapper.xml | 4 +-
.../main/resources/wxstatic/oQUTTivnSQ.txt | 1 +
14 files changed, 2127 insertions(+), 1648 deletions(-)
create mode 100644 ruoyi-wechat/src/main/resources/wxstatic/oQUTTivnSQ.txt
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
index ae19dfea..b1812558 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
@@ -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()
diff --git a/ruoyi-ui/src/views/flowable/task/myProcess/detail/detailDrawer.vue b/ruoyi-ui/src/views/flowable/task/myProcess/detail/detailDrawer.vue
index 511bb08f..94deac8a 100644
--- a/ruoyi-ui/src/views/flowable/task/myProcess/detail/detailDrawer.vue
+++ b/ruoyi-ui/src/views/flowable/task/myProcess/detail/detailDrawer.vue
@@ -8,93 +8,126 @@
size="80%"
>
- 流程详情 【{{ title }}】 - 当前进度【{{ jdtitle }}】 - 当前节点【{{options.taskName}}】
+
+ 流程详情 【{{ title }}】 - 当前进度【{{ jdtitle }}】
+ - 当前节点【{{ options.taskName }}】
+
-
-
-
-
- {{ getSort(index) }}{{item.taskName}}{{item.commentResult}}
-
-
-
- 办理人
- {{item.assigneeName}}
- {{item.deptName}}
-
-
- 候选办理
- {{item.candidate}}
-
-
- 驳回节点
- {{getDeleteReason(item.deleteReason)}}
-
-
- 接收时间
- {{item.startTime}}
-
-
- 处理时间
- {{item.endTime}}
-
-
- 处理耗时
- {{getDurationDate(item.duration)}}
-
-
- 处理意见
- {{item.message}}
-
-
-
-
-
-
-
-
-
- {{ initData.projectName }}
-
-
- {{ options.startDeptName }}
-
-
- {{ options.startUserName }}
-
-
- {{ title }}
-
-
-
-
{{file.substring(file.lastIndexOf('/')+1)}}
+
+
-
-
- {{initData.remark}}
-
-
-
关 闭
+
+
+
+ {{ getSort(index) }}{{ item.taskName }}{{ item.commentResult }}
+
+
+
+
+ 办理人
+ {{ item.assigneeName }}
+ {{ item.deptName }}
+
+
+ 候选办理
+ {{ item.candidate }}
+
+
+ 驳回节点
+ {{ getDeleteReason(item.deleteReason) }}
+
+
+ 接收时间
+ {{ item.startTime }}
+
+
+ 处理时间
+ {{ item.endTime }}
+
+
+ 处理耗时
+ {{ getDurationDate(item.duration) }}
+
+
+ 处理意见
+ {{ item.message }}
+
+
+
+
+
+
+
+
+
+ {{ initData.projectName }}
+
+
+ {{ options.startDeptName }}
+
+
+ {{ options.startUserName }}
+
+
+ {{ title }}
+
+
+
+ {{ file.substring(file.lastIndexOf("/") + 1) }}
+
+
+
+ {{ initData.remark }}
+
+
+ 关 闭
+
+
-
-
@@ -103,11 +136,13 @@
-
\ No newline at end of file
+}
+
diff --git a/ruoyi-ui/src/views/flowable/task/myProcess/editTaskDrawer.vue b/ruoyi-ui/src/views/flowable/task/myProcess/editTaskDrawer.vue
index f6049657..753981a9 100644
--- a/ruoyi-ui/src/views/flowable/task/myProcess/editTaskDrawer.vue
+++ b/ruoyi-ui/src/views/flowable/task/myProcess/editTaskDrawer.vue
@@ -1,184 +1,189 @@
-
-
+
+
+ 工程管理 【{{ title }}】
+
+
-
- 工程管理 【{{ title }}】
-
-
-
-
-
+
+
+
-
-
-
-
- {{ deptName }}
-
-
- {{ nickName }}
-
-
- {{ title }}
-
-
-
-
-
-
-
-
- 提交流程
- 取 消
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+}
+
diff --git a/ruoyi-ui/src/views/flowable/task/myProcess/initSpaceTaskDrawer.vue b/ruoyi-ui/src/views/flowable/task/myProcess/initSpaceTaskDrawer.vue
index 04c954b4..7b9b633f 100644
--- a/ruoyi-ui/src/views/flowable/task/myProcess/initSpaceTaskDrawer.vue
+++ b/ruoyi-ui/src/views/flowable/task/myProcess/initSpaceTaskDrawer.vue
@@ -49,14 +49,26 @@
{{ title }}
-
+
-
+
-
+ >
@@ -54,7 +54,7 @@
diff --git a/ruoyi-ui/src/views/flowable/task/todo/detail/approveDrawer.vue b/ruoyi-ui/src/views/flowable/task/todo/detail/approveDrawer.vue
index 136f9d83..1d13de8b 100644
--- a/ruoyi-ui/src/views/flowable/task/todo/detail/approveDrawer.vue
+++ b/ruoyi-ui/src/views/flowable/task/todo/detail/approveDrawer.vue
@@ -9,121 +9,195 @@
size="80%"
>
- 流程详情 【{{ title }}】 - 当前进度【{{ jdtitle }}】 - 当前节点【{{options.taskName}}】
+
+ 流程详情 【{{ title }}】 - 当前进度【{{ jdtitle }}】
+ - 当前节点【{{ options.taskName }}】
+
-
-
-
-
-
- {{ getSort(index) }}{{item.taskName}}{{item.commentResult}}
-
-
-
- 办理人
- {{item.assigneeName}}
- {{item.deptName}}
-
-
- 候选办理
- {{item.candidate}}
-
-
- 驳回节点
- {{getDeleteReason(item.deleteReason)}}
-
-
- 接收时间
- {{item.startTime}}
-
-
- 处理时间
- {{item.endTime}}
-
-
- 处理耗时
- {{getDurationDate(item.duration)}}
-
-
- 处理意见
- {{item.message}}
-
-
-
-
-
-
-
-
-
- {{ initData.projectName }}
-
-
- {{ options.startDeptName }}
-
-
- {{ options.startUserName }}
-
-
- {{ title }}
-
-
-
- {{file.substring(file.lastIndexOf('/')+1)}}
-
-
-
- {{initData.remark}}
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
任务转办
-
审批通过
-
退回任务
-
驳回上级
+
+ {{ getSort(index) }}{{ item.taskName }}{{ item.commentResult }}
+
+
+
+
+ 办理人
+ {{ item.assigneeName }}
+ {{ item.deptName }}
+
+
+ 候选办理
+ {{ item.candidate }}
+
+
+ 驳回节点
+ {{ getDeleteReason(item.deleteReason) }}
+
+
+ 接收时间
+ {{ item.startTime }}
+
+
+ 处理时间
+ {{ item.endTime }}
+
+
+ 处理耗时
+ {{ getDurationDate(item.duration) }}
+
+
+ 处理意见
+ {{ item.message }}
+
+
+
+
+
+
+
+
+
+ {{ initData.projectName }}
+
+
+ {{ options.startDeptName }}
+
+
+ {{ options.startUserName }}
+
+
+ {{ title }}
+
+
+
+ {{ file.substring(file.lastIndexOf("/") + 1) }}
+
+
+
+ {{ initData.remark }}
+
+
+
+
+
+
+
+
+
+
+
+ 任务转办
+ 审批通过
+ 退回任务
+ 驳回上级
+
+
+
+
+ “审批通过”
+ 操作后,代表您对当前任务满意,任务进入下一阶段。
+
+
+ “退回任务”
+ 操作后,代表您对当前任务不满意,任务进入您选择的阶段,或者直接退回给申请人重新申请。
+
+
+ “驳回上级”
+ 操作后,代表您对当前任务不满意,任务退回到上一阶段继续处理。
+
+
-
-
-
“审批通过” 操作后,代表您对当前任务满意,任务进入下一阶段。
-
“退回任务” 操作后,代表您对当前任务不满意,任务进入您选择的阶段,或者直接退回给申请人重新申请。
-
“驳回上级” 操作后,代表您对当前任务不满意,任务退回到上一阶段继续处理。
-
-
@@ -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: {
@@ -150,7 +227,7 @@ export default {
loading: false,
// 标题
title: "",
- jdtitle:"",
+ jdtitle: "",
// 表单参数
form: {},
// 表单校验
@@ -164,20 +241,21 @@ export default {
},
],
},
- queryParams:{
- nickName:null,
- phonenumber:null,
+ queryParams: {
+ nickName: null,
+ phonenumber: null,
},
bpmnViewer: null,
options: {},
flowRecordList: [],
- showjd:false,
+ showjd: false,
//label样式
labelStyle: { width: "180px" },
- initData:{},
- returnTaskList: [], // 回退列表数据
- returnTask:false,
- returnTaskBtn:false
+ initData: {},
+ returnTaskList: [], // 回退列表数据
+ returnTask: false,
+ returnTaskBtn: false,
+ fileTypes:['pdf','png','jpg','jpeg'],
};
},
computed: {},
@@ -190,21 +268,23 @@ export default {
handlePass() {
this.$refs["form"].validate((valid) => {
if (valid) {
- this.$confirm('是否确认审批通过当前流程申请?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.loading=true;
- complete(this.form).then(res => {
- this.$modal.msgSuccess("任务审批成功");
- this.loading = false;
- //关闭并刷新列表
- this.$refs.drawer.closeDrawer();
+ this.$confirm("是否确认审批通过当前流程申请?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.loading = true;
+ complete(this.form).then((res) => {
+ this.$modal.msgSuccess("任务审批成功");
+ this.loading = false;
+ //关闭并刷新列表
+ this.$refs.drawer.closeDrawer();
+ });
+ })
+ .catch(() => {
+ console.log("取消操作");
});
- }).catch(() => {
- console.log("取消操作");
- });
}
});
},
@@ -212,65 +292,69 @@ export default {
handleReject() {
this.$refs["form"].validate((valid) => {
if (valid) {
- this.$confirm('是否确认审批驳回当前流程申请?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.loading=true;
- rejectTask(this.form).then(res => {
- this.$modal.msgSuccess("任务驳回成功");
- this.loading = false;
- //关闭并刷新列表
- this.$refs.drawer.closeDrawer();
+ this.$confirm("是否确认审批驳回当前流程申请?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.loading = true;
+ rejectTask(this.form).then((res) => {
+ this.$modal.msgSuccess("任务驳回成功");
+ this.loading = false;
+ //关闭并刷新列表
+ this.$refs.drawer.closeDrawer();
+ });
+ })
+ .catch(() => {
+ console.log("取消操作");
});
- }).catch(() => {
- console.log("取消操作");
- });
}
});
},
/** 退回任务 */
- handleBack(){
- if(!this.returnTask){
- this.returnTask=true;
+ handleBack() {
+ if (!this.returnTask) {
+ this.returnTask = true;
this.$modal.msgWarning("请选择退回节点");
return;
}
this.$refs["form"].validate((valid) => {
if (valid) {
- if(!this.form.targetKey){
+ if (!this.form.targetKey) {
this.$modal.msgWarning("请选择退回节点");
return;
}
- this.$confirm('是否确认退回当前流程申请?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.loading=true;
- returnTask(this.form).then(res => {
- this.$modal.msgSuccess("任务退回成功");
- this.loading = false;
- //关闭并刷新列表
- this.$refs.drawer.closeDrawer();
+ this.$confirm("是否确认退回当前流程申请?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.loading = true;
+ returnTask(this.form).then((res) => {
+ this.$modal.msgSuccess("任务退回成功");
+ this.loading = false;
+ //关闭并刷新列表
+ this.$refs.drawer.closeDrawer();
+ });
+ })
+ .catch(() => {
+ console.log("取消操作");
});
- }).catch(() => {
- console.log("取消操作");
- });
}
});
},
- initReturnList(){
- returnList(this.form).then(res => {
+ initReturnList() {
+ returnList(this.form).then((res) => {
this.returnTaskList = res.data;
//退回节点>1时,可显示退回按钮
- if(res.data.length>1){
- this.returnTaskBtn=true;
+ if (res.data.length > 1) {
+ this.returnTaskBtn = true;
}
- })
+ });
},
- initFormDate(){
+ initFormDate() {
this.form.taskId = this.options.taskId;
this.form.taskName = this.options.taskName;
this.form.userId = store.getters.userId;
@@ -278,16 +362,15 @@ export default {
this.form.procInsId = this.options.procInsId;
this.form.instanceId = this.options.procInsId;
this.form.executionId = this.options.procInsId;
- this.returnTask=false;
- this.returnTaskBtn=false;
+ this.returnTask = false;
+ this.returnTaskBtn = false;
this.initReturnList();
},
setIcon(row) {
if (row.endTime) {
- if(row.commentResult=="驳回")
- {
+ if (row.commentResult == "驳回") {
return "el-icon-close";
- }else{
+ } else {
return "el-icon-check";
}
} else {
@@ -296,10 +379,9 @@ export default {
},
setColor(row) {
if (row.endTime) {
- if(row.commentResult=="驳回")
- {
+ if (row.commentResult == "驳回") {
return "#f56c6c";
- }else{
+ } else {
return "#2bc418";
}
} else {
@@ -325,19 +407,21 @@ export default {
this.showjd = false;
this.form = {};
this.initFormDate();
- if(options.finishTime==null){
- this.jdtitle="进行中";
- this.showjd=true;
- }else if(options.finishTime!=null && options.assigneeId==null){
- this.jdtitle="已撤销";
- }else{
- this.jdtitle="已完成";
+ if (options.finishTime == null) {
+ this.jdtitle = "进行中";
+ this.showjd = true;
+ } else if (options.finishTime != null && options.assigneeId == null) {
+ this.jdtitle = "已撤销";
+ } else {
+ this.jdtitle = "已完成";
}
this.getFlowRecordList(options.procInsId, options.deployId);
this.getFormDatasList(options.procInsId, options.deployId);
- flowXmlAndNode({ procInsId:options.procInsId, deployId: options.deployId }).then((res) => {
- this.initFlowImage(res.data);
- });
+ flowXmlAndNode({ procInsId: options.procInsId, deployId: options.deployId }).then(
+ (res) => {
+ this.initFlowImage(res.data);
+ }
+ );
},
async initFlowImage(data) {
const self = this;
@@ -349,8 +433,8 @@ export default {
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)
+ if (data.nodeData !== undefined && data.nodeData.length > 0) {
+ 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 => {
- that.flowRecordList = res.data;
- }).catch(res => {
- this.$message.error("数据异常,请联系管理员...");
- })
+ const that = this;
+ const params = { procInsId: procInsId };
+ findCommentByProcInsId(params)
+ .then((res) => {
+ that.flowRecordList = res.data;
+ })
+ .catch((res) => {
+ this.$message.error("数据异常,请联系管理员...");
+ });
},
/** 流程表单数据 */
getFormDatasList(procInsId, deployId) {
@@ -382,131 +468,170 @@ export default {
// }).catch(res => {
// this.$message.error("数据异常,请联系管理员...");
// })
- 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("数据异常,请联系管理员...");
- })
+ 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("数据异常,请联系管理员...");
+ });
},
// 设置高亮颜色的
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')
- }else {
- canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
- canvas.addMarker(nn.targetRef.id, targetTask.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"
+ );
}
}
- })
+ });
}
}
// 排他网关
- 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){
+ 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)
- 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 + '秒';
+ 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 + "秒";
}
- 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 + '秒';
+ 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 + "秒";
}
- if(minutes>0){
- if(minutes<10) minutes = "0"+minutes;
- if(seconds<10) seconds = "0"+seconds;
- return minutes + '分钟' + seconds + '秒';
+ if (minutes > 0) {
+ if (minutes < 10) minutes = "0" + minutes;
+ if (seconds < 10) seconds = "0" + seconds;
+ return minutes + "分钟" + seconds + "秒";
}
- if(seconds>0){
- if(seconds<10) seconds = "0"+seconds;
- return seconds + '秒';
+ if (seconds > 0) {
+ if (seconds < 10) seconds = "0" + seconds;
+ return seconds + "秒";
}
},
- handledownload(url){
- this.$download.resource(url);
+ 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 ","");
+ getDeleteReason(val) {
+ val = val.replace("Change activity to ", "");
let flowRecordList = this.flowRecordList;
- for(let i=0;i
diff --git a/ruoyi-ui/src/views/flowable/task/todo/detail/approveLeaveDrawer.vue b/ruoyi-ui/src/views/flowable/task/todo/detail/approveLeaveDrawer.vue
index 1715fdbc..7efe37ce 100644
--- a/ruoyi-ui/src/views/flowable/task/todo/detail/approveLeaveDrawer.vue
+++ b/ruoyi-ui/src/views/flowable/task/todo/detail/approveLeaveDrawer.vue
@@ -9,59 +9,100 @@
size="80%"
>
- 流程详情 【{{ title }}】 - 当前进度【{{ jdtitle }}】 - 当前节点【{{options.taskName}}】
+
+ 流程详情 【{{ title }}】 - 当前进度【{{ jdtitle }}】
+ - 当前节点【{{ options.taskName }}】
+
-
-
-
-
-
- {{ getSort(index) }}{{item.taskName}}{{item.commentResult}}
-
-
-
- 办理人
- {{item.assigneeName}}
- {{item.deptName}}
-
-
- 候选办理
- {{item.candidate}}
-
-
- 驳回节点
- {{getDeleteReason(item.deleteReason)}}
-
-
- 接收时间
- {{item.startTime}}
-
-
- 处理时间
- {{item.endTime}}
-
-
- 处理耗时
- {{getDurationDate(item.duration)}}
-
-
- 处理意见
- {{item.message}}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{ getSort(index) }}{{ item.taskName }}{{ item.commentResult }}
+
+
+
+
+ 办理人
+ {{ item.assigneeName }}
+ {{ item.deptName }}
+
+
+ 候选办理
+ {{ item.candidate }}
+
+
+ 驳回节点
+ {{ getDeleteReason(item.deleteReason) }}
+
+
+ 接收时间
+ {{ item.startTime }}
+
+
+ 处理时间
+ {{ item.endTime }}
+
+
+ 处理耗时
+ {{ getDurationDate(item.duration) }}
+
+
+ 处理意见
+ {{ item.message }}
+
+
+
+
+
+
+
+
+
@@ -109,54 +150,97 @@
请假时间
- 共 {{initData.day}} 天
+ 共 {{ initData.day }} 天
请假事由
- {{initData.remark}}
+ {{ initData.remark }}
-
+
-
-
-
-
-
-
-
-
-
-
-
-
任务转办
-
审批通过
-
退回任务
-
驳回上级
+
+
+
+
+
+
+
+
+
+
+ 任务转办
+ 审批通过
+ 退回任务
+ 驳回上级
+
+
+
+
+ “审批通过”
+ 操作后,代表您对当前任务满意,任务进入下一阶段。
+
+
+ “退回任务”
+ 操作后,代表您对当前任务不满意,任务进入您选择的阶段,或者直接退回给申请人重新申请。
+
+
+ “驳回上级”
+ 操作后,代表您对当前任务不满意,任务退回到上一阶段继续处理。
+
+
-
-
-
“审批通过” 操作后,代表您对当前任务满意,任务进入下一阶段。
-
“退回任务” 操作后,代表您对当前任务不满意,任务进入您选择的阶段,或者直接退回给申请人重新申请。
-
“驳回上级” 操作后,代表您对当前任务不满意,任务退回到上一阶段继续处理。
-
-
@@ -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: {
@@ -183,7 +270,7 @@ export default {
loading: false,
// 标题
title: "",
- jdtitle:"",
+ jdtitle: "",
// 表单参数
form: {},
// 表单校验
@@ -197,20 +284,20 @@ export default {
},
],
},
- queryParams:{
- nickName:null,
- phonenumber:null,
+ queryParams: {
+ nickName: null,
+ phonenumber: null,
},
bpmnViewer: null,
options: {},
flowRecordList: [],
- showjd:false,
+ showjd: false,
//label样式
labelStyle: { width: "180px" },
- initData:{},
- returnTaskList: [], // 回退列表数据
- returnTask:false,
- returnTaskBtn:false
+ initData: {},
+ returnTaskList: [], // 回退列表数据
+ returnTask: false,
+ returnTaskBtn: false,
};
},
computed: {},
@@ -223,21 +310,23 @@ export default {
handlePass() {
this.$refs["form"].validate((valid) => {
if (valid) {
- this.$confirm('是否确认审批通过当前流程申请?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.loading=true;
- complete(this.form).then(res => {
- this.$modal.msgSuccess("任务审批成功");
- this.loading = false;
- //关闭并刷新列表
- this.$refs.drawer.closeDrawer();
+ this.$confirm("是否确认审批通过当前流程申请?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.loading = true;
+ complete(this.form).then((res) => {
+ this.$modal.msgSuccess("任务审批成功");
+ this.loading = false;
+ //关闭并刷新列表
+ this.$refs.drawer.closeDrawer();
+ });
+ })
+ .catch(() => {
+ console.log("取消操作");
});
- }).catch(() => {
- console.log("取消操作");
- });
}
});
},
@@ -245,65 +334,69 @@ export default {
handleReject() {
this.$refs["form"].validate((valid) => {
if (valid) {
- this.$confirm('是否确认审批驳回当前流程申请?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.loading=true;
- rejectTask(this.form).then(res => {
- this.$modal.msgSuccess("任务驳回成功");
- this.loading = false;
- //关闭并刷新列表
- this.$refs.drawer.closeDrawer();
+ this.$confirm("是否确认审批驳回当前流程申请?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.loading = true;
+ rejectTask(this.form).then((res) => {
+ this.$modal.msgSuccess("任务驳回成功");
+ this.loading = false;
+ //关闭并刷新列表
+ this.$refs.drawer.closeDrawer();
+ });
+ })
+ .catch(() => {
+ console.log("取消操作");
});
- }).catch(() => {
- console.log("取消操作");
- });
}
});
},
/** 退回任务 */
- handleBack(){
- if(!this.returnTask){
- this.returnTask=true;
+ handleBack() {
+ if (!this.returnTask) {
+ this.returnTask = true;
this.$modal.msgWarning("请选择退回节点");
return;
}
this.$refs["form"].validate((valid) => {
if (valid) {
- if(!this.form.targetKey){
+ if (!this.form.targetKey) {
this.$modal.msgWarning("请选择退回节点");
return;
}
- this.$confirm('是否确认退回当前流程申请?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.loading=true;
- returnTask(this.form).then(res => {
- this.$modal.msgSuccess("任务退回成功");
- this.loading = false;
- //关闭并刷新列表
- this.$refs.drawer.closeDrawer();
+ this.$confirm("是否确认退回当前流程申请?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.loading = true;
+ returnTask(this.form).then((res) => {
+ this.$modal.msgSuccess("任务退回成功");
+ this.loading = false;
+ //关闭并刷新列表
+ this.$refs.drawer.closeDrawer();
+ });
+ })
+ .catch(() => {
+ console.log("取消操作");
});
- }).catch(() => {
- console.log("取消操作");
- });
}
});
},
- initReturnList(){
- returnList(this.form).then(res => {
+ initReturnList() {
+ returnList(this.form).then((res) => {
this.returnTaskList = res.data;
//退回节点>1时,可显示退回按钮
- if(res.data.length>1){
- this.returnTaskBtn=true;
+ if (res.data.length > 1) {
+ this.returnTaskBtn = true;
}
- })
+ });
},
- initFormDate(){
+ initFormDate() {
this.form.taskId = this.options.taskId;
this.form.taskName = this.options.taskName;
this.form.userId = store.getters.userId;
@@ -311,16 +404,15 @@ export default {
this.form.procInsId = this.options.procInsId;
this.form.instanceId = this.options.procInsId;
this.form.executionId = this.options.procInsId;
- this.returnTask=false;
- this.returnTaskBtn=false;
+ this.returnTask = false;
+ this.returnTaskBtn = false;
this.initReturnList();
},
setIcon(row) {
if (row.endTime) {
- if(row.commentResult=="驳回")
- {
+ if (row.commentResult == "驳回") {
return "el-icon-close";
- }else{
+ } else {
return "el-icon-check";
}
} else {
@@ -329,10 +421,9 @@ export default {
},
setColor(row) {
if (row.endTime) {
- if(row.commentResult=="驳回")
- {
+ if (row.commentResult == "驳回") {
return "#f56c6c";
- }else{
+ } else {
return "#2bc418";
}
} else {
@@ -358,19 +449,21 @@ export default {
this.showjd = false;
this.form = {};
this.initFormDate();
- if(options.finishTime==null){
- this.jdtitle="进行中";
- this.showjd=true;
- }else if(options.finishTime!=null && options.assigneeId==null){
- this.jdtitle="已撤销";
- }else{
- this.jdtitle="已完成";
+ if (options.finishTime == null) {
+ this.jdtitle = "进行中";
+ this.showjd = true;
+ } else if (options.finishTime != null && options.assigneeId == null) {
+ this.jdtitle = "已撤销";
+ } else {
+ this.jdtitle = "已完成";
}
this.getFlowRecordList(options.procInsId, options.deployId);
this.getFormDatasList(options.procInsId, options.deployId);
- flowXmlAndNode({ procInsId:options.procInsId, deployId: options.deployId }).then((res) => {
- this.initFlowImage(res.data);
- });
+ flowXmlAndNode({ procInsId: options.procInsId, deployId: options.deployId }).then(
+ (res) => {
+ this.initFlowImage(res.data);
+ }
+ );
},
async initFlowImage(data) {
const self = this;
@@ -382,8 +475,8 @@ export default {
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)
+ if (data.nodeData !== undefined && data.nodeData.length > 0) {
+ 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 => {
- that.flowRecordList = res.data;
- }).catch(res => {
- this.$message.error("数据异常,请联系管理员...");
- })
+ const that = this;
+ const params = { procInsId: procInsId };
+ findCommentByProcInsId(params)
+ .then((res) => {
+ that.flowRecordList = res.data;
+ })
+ .catch((res) => {
+ this.$message.error("数据异常,请联系管理员...");
+ });
},
/** 流程表单数据 */
getFormDatasList(procInsId, deployId) {
@@ -415,130 +510,164 @@ export default {
// }).catch(res => {
// this.$message.error("数据异常,请联系管理员...");
// })
- const that = this
- const params = {procInsId: procInsId}
- findFormDatasByProcInsId(params).then(res => {
- this.initData = res.data;
- }).catch(res => {
- this.$message.error("数据异常,请联系管理员...");
- })
+ const that = this;
+ const params = { procInsId: procInsId };
+ findFormDatasByProcInsId(params)
+ .then((res) => {
+ this.initData = res.data;
+ })
+ .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')
- }else {
- canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
- canvas.addMarker(nn.targetRef.id, targetTask.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"
+ );
}
}
- })
+ });
}
}
// 排他网关
- 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){
+ 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)
- 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 + '秒';
+ 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 + "秒";
}
- 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 + '秒';
+ 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 + "秒";
}
- if(minutes>0){
- if(minutes<10) minutes = "0"+minutes;
- if(seconds<10) seconds = "0"+seconds;
- return minutes + '分钟' + seconds + '秒';
+ if (minutes > 0) {
+ if (minutes < 10) minutes = "0" + minutes;
+ if (seconds < 10) seconds = "0" + seconds;
+ return minutes + "分钟" + seconds + "秒";
}
- if(seconds>0){
- if(seconds<10) seconds = "0"+seconds;
- return seconds + '秒';
+ if (seconds > 0) {
+ if (seconds < 10) seconds = "0" + seconds;
+ return seconds + "秒";
}
},
- handledownload(url){
+ handledownload(url) {
this.$download.resource(url);
},
- getDeleteReason(val){
- val = val.replace("Change activity to ","");
+ getDeleteReason(val) {
+ val = val.replace("Change activity to ", "");
let flowRecordList = this.flowRecordList;
- for(let i=0;i
diff --git a/ruoyi-ui/src/views/project/surProjectSpecial/index.vue b/ruoyi-ui/src/views/project/surProjectSpecial/index.vue
index 5a4c58cf..d7d48aaa 100644
--- a/ruoyi-ui/src/views/project/surProjectSpecial/index.vue
+++ b/ruoyi-ui/src/views/project/surProjectSpecial/index.vue
@@ -128,7 +128,8 @@
-
+
@@ -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);
},
},
};
diff --git a/ruoyi-ui/src/views/project/surProjectSpecial/surProjectSpecialDrawer.vue b/ruoyi-ui/src/views/project/surProjectSpecial/surProjectSpecialDrawer.vue
index 97efccef..a339ee81 100644
--- a/ruoyi-ui/src/views/project/surProjectSpecial/surProjectSpecialDrawer.vue
+++ b/ruoyi-ui/src/views/project/surProjectSpecial/surProjectSpecialDrawer.vue
@@ -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);
},
},
};
diff --git a/ruoyi-wechat/src/main/java/com/ruoyi/web/userLogin/service/impl/WechatUserLoginServiceImpl.java b/ruoyi-wechat/src/main/java/com/ruoyi/web/userLogin/service/impl/WechatUserLoginServiceImpl.java
index 16f2ccaf..ae864f8a 100644
--- a/ruoyi-wechat/src/main/java/com/ruoyi/web/userLogin/service/impl/WechatUserLoginServiceImpl.java
+++ b/ruoyi-wechat/src/main/java/com/ruoyi/web/userLogin/service/impl/WechatUserLoginServiceImpl.java
@@ -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;
}
diff --git a/ruoyi-wechat/src/main/resources/application.yml b/ruoyi-wechat/src/main/resources/application.yml
index 13af2178..4bc38c5d 100644
--- a/ruoyi-wechat/src/main/resources/application.yml
+++ b/ruoyi-wechat/src/main/resources/application.yml
@@ -15,12 +15,16 @@ user:
# Spring配置
spring:
+ # 微信资源验证访问
+ web:
+ resources:
+ static-locations: classpath:/wxstatic/
# 资源信息
messages:
# 国际化资源文件路径
basename: i18n/messages
profiles:
- active: druid
+ active: prod
# 文件上传
servlet:
multipart:
diff --git a/ruoyi-wechat/src/main/resources/mapper/WechatUserLoginMapper.xml b/ruoyi-wechat/src/main/resources/mapper/WechatUserLoginMapper.xml
index 69c0fefa..153d93a0 100644
--- a/ruoyi-wechat/src/main/resources/mapper/WechatUserLoginMapper.xml
+++ b/ruoyi-wechat/src/main/resources/mapper/WechatUserLoginMapper.xml
@@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
userId,
loginName,
nickname,
+ unionid,
creatTime
) values
(
@@ -42,13 +43,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{userId},
#{loginName},
#{nickname},
+ #{unionid},
now()
)
- 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
diff --git a/ruoyi-wechat/src/main/resources/wxstatic/oQUTTivnSQ.txt b/ruoyi-wechat/src/main/resources/wxstatic/oQUTTivnSQ.txt
new file mode 100644
index 00000000..eaec9df5
--- /dev/null
+++ b/ruoyi-wechat/src/main/resources/wxstatic/oQUTTivnSQ.txt
@@ -0,0 +1 @@
+29aef62cd1316f1635063c5b86a3ffee
\ No newline at end of file