Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/v4
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.flow.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
@@ -53,7 +54,8 @@ public class FlowTodoCenterController {
|
||||
ins.state AS instanceState,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
cat.`name` categoryName
|
||||
cat.`name` categoryName,
|
||||
ins.variable ->> '$.instanceName' AS instanceName
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
@@ -65,6 +67,10 @@ public class FlowTodoCenterController {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
cnd.and("ta.actorId", "=", SecurityUtil.getUserId());
|
||||
cnd.andEX("def.category","=",category);
|
||||
if(StrUtil.isNotBlank(searchKeyword)){
|
||||
cnd.where().andLike("ins.variable ->> '$.instanceName'", searchKeyword);
|
||||
}
|
||||
cnd.desc("t.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = sysUserService.listPageMap(pageNumber, pageSize, sql);
|
||||
@@ -92,7 +98,8 @@ public class FlowTodoCenterController {
|
||||
ins.state AS instanceState,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
cat.`name` categoryName
|
||||
cat.`name` categoryName,
|
||||
ins.variable ->> '$.instanceName' AS instanceName
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
@@ -104,6 +111,10 @@ public class FlowTodoCenterController {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.FINISHED.getCode());
|
||||
cnd.and("ta.actorId", "=", SecurityUtil.getUserId());
|
||||
cnd.andEX("def.category","=",category);
|
||||
if(StrUtil.isNotBlank(searchKeyword)){
|
||||
cnd.where().andLike("ins.variable ->> '$.instanceName'", searchKeyword);
|
||||
}
|
||||
cnd.desc("t.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = sysUserService.listPageMap(pageNumber, pageSize, sql);
|
||||
@@ -127,6 +138,7 @@ public class FlowTodoCenterController {
|
||||
ins.operator,
|
||||
ins.variable,
|
||||
ins.createdAt,
|
||||
ins.variable ->> '$.instanceName' AS instanceName,
|
||||
GROUP_CONCAT(DISTINCT t.displayName) as taskName,
|
||||
cat.`name` categoryName
|
||||
FROM
|
||||
@@ -138,6 +150,11 @@ public class FlowTodoCenterController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("ins.operator", "=", SecurityUtil.getUserId());
|
||||
cnd.andEX("def.category","=",category);
|
||||
if(StrUtil.isNotBlank(searchKeyword)){
|
||||
cnd.where().andLike("ins.variable ->> '$.instanceName'", searchKeyword);
|
||||
}
|
||||
cnd.groupBy("ins.id");
|
||||
cnd.desc("ins.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = sysUserService.listPageMap(pageNumber, pageSize, sql);
|
||||
|
||||
@@ -3,9 +3,11 @@ package com.budwk.app.sys.controller.v4;
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.sys.models.Sys_menu;
|
||||
import com.budwk.app.sys.models.Sys_module;
|
||||
import com.budwk.app.sys.models.Sys_user_favorite_app;
|
||||
import com.budwk.app.sys.services.SysMenuService;
|
||||
import com.budwk.app.sys.services.SysUserService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -37,6 +39,8 @@ public class SysV4AppsController {
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private SysMenuService sysMenuService;
|
||||
@Inject
|
||||
private SysUserService sysUserService;
|
||||
|
||||
@At("/categories")
|
||||
@Ok("json")
|
||||
@@ -59,6 +63,7 @@ public class SysV4AppsController {
|
||||
@SaCheckLogin
|
||||
@ApiOperation("获取应用列表")
|
||||
public Result list(@Param("categoryId") String categoryId, @Param("letter") String letter, @Param("keyword") String keyword, @Param(value = "platform", df = "PC") String platform, HttpServletRequest req) {
|
||||
List<Sys_menu> menus = sysUserService.getMenus(SecurityUtil.getUserId());
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
m.id,
|
||||
@@ -80,6 +85,7 @@ public class SysV4AppsController {
|
||||
cnd.and("m.platform", "=", platform);
|
||||
cnd.and("m.disabled", "=", false);
|
||||
cnd.and(Cnd.exps("m.parentId", "is", null).or("m.parentId", "=", ""));
|
||||
cnd.and("m.id","in", menus.stream().map(Sys_menu::getId).toArray());
|
||||
cnd.andEX("m.moduleId", "=", categoryId);
|
||||
cnd.asc("m.location");
|
||||
if (StrUtil.isNotBlank(keyword)) {
|
||||
|
||||
@@ -88,7 +88,7 @@ const user = {
|
||||
},
|
||||
methods: {
|
||||
handleStatClick(type) {
|
||||
if (['todo', 'done', 'application'].includes(type)) {
|
||||
if (['todo', 'done', 'started'].includes(type)) {
|
||||
window.open('/flow/todoCenter?status=' + type)
|
||||
} else if (type === 'notification') {
|
||||
window.open('/platform/v4/msg')
|
||||
|
||||
@@ -228,10 +228,7 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
</el-table-column>
|
||||
<el-table-column prop="taskName" label="任务节点" min-width="150"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="categoryName" label="流程分类" min-width="150" show-overflow-tooltip>
|
||||
<template slot-scope="{row}">{{categoryOptions.find(item => item.id === row.category)?.name}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="categoryName" label="流程分类" min-width="150" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="initiatorName" label="申请人" min-width="120">
|
||||
<template slot-scope="{row}">{{row.variable.initiatorName}}</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -284,32 +284,12 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
<!-- 表格展示 -->
|
||||
<el-table v-loading="loading" :data="tasks" style="width: 100%" :key="activeTab"
|
||||
:header-cell-style="{backgroundColor: '#f5f7fa'}">
|
||||
<el-table-column prop="processInstanceName" label="流程名称" min-width="180" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span class="task-title">{{scope.row.variable?.instanceName}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="instanceName" label="流程名称" min-width="180" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="taskName" label="任务节点" min-width="150" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="categoryName" label="流程分类" min-width="150" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="initiatorName" label="申请人" min-width="120">
|
||||
<template slot-scope="{row}">{{row.variable.initiatorName}}</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="时间" min-width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <div v-if="activeTab === 'todo'">-->
|
||||
<!-- <i class="el-icon-time"></i>-->
|
||||
<!-- {{scope.row.createdAt}}-->
|
||||
<!-- </div>-->
|
||||
<!-- <div v-else-if="activeTab === 'done'">-->
|
||||
<!-- <i class="el-icon-check"></i>-->
|
||||
<!-- {{scope.row.finishTime}}-->
|
||||
<!-- </div>-->
|
||||
<!-- <div v-else-if="activeTab === 'started'">-->
|
||||
<!-- <i class="el-icon-s-promotion"></i>-->
|
||||
<!-- {{scope.row.createdAt}}-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column v-if="activeTab === 'started'" label="状态" width="100">
|
||||
<template slot-scope="{row}">{{processStatusMap[row.state]?.text}}</template>
|
||||
</el-table-column>
|
||||
@@ -394,6 +374,9 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
},
|
||||
|
||||
created() {
|
||||
if(GetQueryString("status")){
|
||||
this.activeTab = GetQueryString("status")
|
||||
}
|
||||
this.initData()
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user