commit
This commit is contained in:
@@ -12,9 +12,6 @@ import com.budwk.app.base.result.Result;
|
|||||||
import com.budwk.app.flow.engine.AssignmentHandler;
|
import com.budwk.app.flow.engine.AssignmentHandler;
|
||||||
import com.budwk.app.flow.engine.CandidateHandler;
|
import com.budwk.app.flow.engine.CandidateHandler;
|
||||||
import com.budwk.app.flow.entity.ProcessDesign;
|
import com.budwk.app.flow.entity.ProcessDesign;
|
||||||
import com.budwk.app.flow.entity.ProcessInstance;
|
|
||||||
import com.budwk.app.flow.entity.ProcessTask;
|
|
||||||
import com.budwk.app.flow.entity.ProcessTaskActor;
|
|
||||||
import com.budwk.app.flow.service.ProcessDesignService;
|
import com.budwk.app.flow.service.ProcessDesignService;
|
||||||
import com.budwk.app.sys.services.SysUserService;
|
import com.budwk.app.sys.services.SysUserService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -109,42 +106,6 @@ public class FlowDesignController {
|
|||||||
request.setAttribute("id", request.getParameter("id"));
|
request.setAttribute("id", request.getParameter("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
|
||||||
@ApiOperation("获取流程设计分页列表")
|
|
||||||
@SaCheckPermission("flow.design")
|
|
||||||
public void onUpdate(){
|
|
||||||
|
|
||||||
List<ProcessTask> tasks = dao.query(ProcessTask.class, Cnd.where("taskName", "=", "committee"));
|
|
||||||
List<Long> list = tasks.stream().map(ProcessTask::getId).toList();
|
|
||||||
|
|
||||||
List<ProcessTaskActor> actorList = dao.query(ProcessTaskActor.class, Cnd.where(ProcessTaskActor::getProcessTaskId, "in", list));
|
|
||||||
|
|
||||||
List<ProcessInstance> instanceList = dao.query(ProcessInstance.class, Cnd.where(ProcessInstance::getProcessDefineId, "=", 389));
|
|
||||||
|
|
||||||
for (ProcessTask task : tasks) {
|
|
||||||
task.setTaskName("personnelOffice");
|
|
||||||
task.setDisplayName("人事处审核");
|
|
||||||
task.setFormKey("/platform/proposal/personnelOffice");
|
|
||||||
task.setH5FormKey("/platform/proposal/personnelOffice/h5");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (ProcessTaskActor actor : actorList) {
|
|
||||||
actor.setActorId("a2e5874eb28e42e9811f1af4d4bcb5a5");
|
|
||||||
actor.setActorAccount("001094");
|
|
||||||
actor.setActorName("郑胜水");
|
|
||||||
actor.setActorUnitName("人事处(党委教师工作部、人才工作办公室)");
|
|
||||||
actor.setActorUnitId("1001");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (ProcessInstance instance : instanceList) {
|
|
||||||
instance.setProcessDefineId(396L);
|
|
||||||
}
|
|
||||||
|
|
||||||
dao.update(tasks);
|
|
||||||
dao.update(actorList);
|
|
||||||
dao.update(instanceList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ApiOperation("获取流程设计分页列表")
|
@ApiOperation("获取流程设计分页列表")
|
||||||
@SaCheckPermission("flow.design")
|
@SaCheckPermission("flow.design")
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@IocBean
|
@IocBean
|
||||||
@At("/platform/sys/menu")
|
@At("/platform/sys/menu")
|
||||||
@@ -391,11 +390,11 @@ public class SysMenuController {
|
|||||||
@At
|
@At
|
||||||
@Ok("json")
|
@Ok("json")
|
||||||
@SaCheckPermission("sys.manager.menu.edit")
|
@SaCheckPermission("sys.manager.menu.edit")
|
||||||
public Object sortDo(@Param("ids") String ids, HttpServletRequest req) {
|
public Object sortDo(@Param("ids") String ids, @Param("platform") String platform, HttpServletRequest req) {
|
||||||
try {
|
try {
|
||||||
String[] menuIds = StringUtils.split(ids, ",");
|
String[] menuIds = StringUtils.split(ids, ",");
|
||||||
int i = 0;
|
int i = 0;
|
||||||
sysMenuService.execute(Sqls.create("update sys_menu set location=0"));
|
sysMenuService.execute(Sqls.create("update sys_menu set location=0 where platform = '%s'".formatted(platform)));
|
||||||
for (String s : menuIds) {
|
for (String s : menuIds) {
|
||||||
if (!Strings.isBlank(s)) {
|
if (!Strings.isBlank(s)) {
|
||||||
sysMenuService.update(org.nutz.dao.Chain.make("location", i), Cnd.where("id", "=", s));
|
sysMenuService.update(org.nutz.dao.Chain.make("location", i), Cnd.where("id", "=", s));
|
||||||
@@ -425,11 +424,11 @@ public class SysMenuController {
|
|||||||
@SaCheckPermission("sys.manager.menu")
|
@SaCheckPermission("sys.manager.menu")
|
||||||
@ApiOperation("更新首页推荐应用或服务")
|
@ApiOperation("更新首页推荐应用或服务")
|
||||||
public Result updateRecommendSetting(@Param("menuIds") String[] menuIds, String platform, String type) {
|
public Result updateRecommendSetting(@Param("menuIds") String[] menuIds, String platform, String type) {
|
||||||
String column = "";
|
String column = "";
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "app" -> column = "isRecommendApp";
|
case "app" -> column = "isRecommendApp";
|
||||||
case "service" -> column = "isRecommendService";
|
case "service" -> column = "isRecommendService";
|
||||||
}
|
}
|
||||||
sysMenuService.update(Chain.make(column, 0), Cnd.where("id", "is not", null).and("platform", "=", platform));
|
sysMenuService.update(Chain.make(column, 0), Cnd.where("id", "is not", null).and("platform", "=", platform));
|
||||||
if (ArrayUtil.isNotEmpty(menuIds)) {
|
if (ArrayUtil.isNotEmpty(menuIds)) {
|
||||||
sysMenuService.update(Chain.make(column, 1), Cnd.where("id", "in", menuIds).and("platform", "=", platform));
|
sysMenuService.update(Chain.make(column, 1), Cnd.where("id", "in", menuIds).and("platform", "=", platform));
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ layout("/layouts/platform.html"){
|
|||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<table-tool>
|
<table-tool>
|
||||||
<el-button type="primary" @click="onAdd" size="small" icon="el-icon-plus">新增</el-button>
|
<el-button type="primary" @click="onAdd" size="small" icon="el-icon-plus">新增</el-button>
|
||||||
<el-button type="primary" @click="onUpdate" size="small" icon="el-icon-plus">更新</el-button>
|
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||||
@@ -147,9 +146,6 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onUpdate(){
|
|
||||||
this.$axios.post(loc()+"/onUpdate")
|
|
||||||
},
|
|
||||||
onAdd() {
|
onAdd() {
|
||||||
this.formData = {}
|
this.formData = {}
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
|
|||||||
@@ -2,25 +2,25 @@
|
|||||||
layout("/layouts/platform.html"){
|
layout("/layouts/platform.html"){
|
||||||
#-->
|
#-->
|
||||||
<style>
|
<style>
|
||||||
.context-menu {
|
.context-menu {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 1px solid #dcdfe6;
|
border: 1px solid #dcdfe6;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
|
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
|
||||||
z-index: 3000;
|
z-index: 3000;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
.context-menu li {
|
.context-menu li {
|
||||||
padding: 7px 20px;
|
padding: 7px 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.context-menu li:hover {
|
.context-menu li:hover {
|
||||||
background: #f2f6fc;
|
background: #f2f6fc;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
@@ -52,17 +52,17 @@ layout("/layouts/platform.html"){
|
|||||||
</el-button>
|
</el-button>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
:highlight-current-row="true"
|
:highlight-current-row="true"
|
||||||
:key="tableKey"
|
:key="tableKey"
|
||||||
:load="loadChild"
|
:load="loadChild"
|
||||||
@row-contextmenu="openMenu"
|
@row-contextmenu="openMenu"
|
||||||
:expand-row-keys="expandedRowKeysRenew"
|
:expand-row-keys="expandedRowKeysRenew"
|
||||||
@expand-change="handleExpandChange"
|
@expand-change="handleExpandChange"
|
||||||
ref="tableData"
|
ref="tableData"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
lazy
|
lazy
|
||||||
row-key="id"
|
row-key="id"
|
||||||
>
|
>
|
||||||
<el-table-column align="left" header-align="left" label="菜单名称" prop="name" width="200"></el-table-column>
|
<el-table-column align="left" header-align="left" label="菜单名称" prop="name" width="200"></el-table-column>
|
||||||
<el-table-column align="center" header-align="center" label="菜单图标" prop="icon" width="100">
|
<el-table-column align="center" header-align="center" label="菜单图标" prop="icon" width="100">
|
||||||
@@ -124,13 +124,13 @@ layout("/layouts/platform.html"){
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<!-- 右键菜单 -->
|
<!-- 右键菜单 -->
|
||||||
<ul v-show="menuVisible" class="context-menu" :style="{left: menuLeft + 'px', top: menuTop + 'px'}">
|
<ul v-show="menuVisible" class="context-menu" :style="{left: menuLeft + 'px', top: menuTop + 'px'}">
|
||||||
<li @click="handleAddMenu(currentRow)">新建菜单</li>
|
<li @click="handleAddMenu(currentRow)">新建菜单</li>
|
||||||
<li v-if="showAddMenu" @click="handleAddChildMenu(currentRow)">添加子菜单</li>
|
<li v-if="showAddMenu" @click="handleAddChildMenu(currentRow)">添加子菜单</li>
|
||||||
<li @click="handleEdit(currentRow)">编辑</li>
|
<li @click="handleEdit(currentRow)">编辑</li>
|
||||||
<li @click="handleDelete(currentRow)">删除</li>
|
<li @click="handleDelete(currentRow)">删除</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ layout("/layouts/platform.html"){
|
|||||||
<sort ref="sortRef" @refresh="doSearch"></sort>
|
<sort ref="sortRef" @refresh="doSearch"></sort>
|
||||||
<recommend-setting ref="recommendSettingRef" @refresh="doSearch"></recommend-setting>
|
<recommend-setting ref="recommendSettingRef" @refresh="doSearch"></recommend-setting>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script nonce="${cspNonce!}">
|
||||||
<!--#include("permissionForm.js"){}#-->
|
<!--#include("permissionForm.js"){}#-->
|
||||||
<!--#include("basicForm.js"){}#-->
|
<!--#include("basicForm.js"){}#-->
|
||||||
<!--#include("sort.js"){}#-->
|
<!--#include("sort.js"){}#-->
|
||||||
@@ -165,65 +165,65 @@ layout("/layouts/platform.html"){
|
|||||||
expandedRowKeysRenew: [],
|
expandedRowKeysRenew: [],
|
||||||
tableTreeRefreshTool: [],
|
tableTreeRefreshTool: [],
|
||||||
|
|
||||||
// 右键打开菜单相关
|
// 右键打开菜单相关
|
||||||
currentRow: null,
|
currentRow: null,
|
||||||
menuVisible: false,
|
menuVisible: false,
|
||||||
menuLeft: 0,
|
menuLeft: 0,
|
||||||
menuTop: 0,
|
menuTop: 0,
|
||||||
showAddMenu: false,
|
showAddMenu: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/* 右键行 */
|
/* 右键行 */
|
||||||
openMenu(row, column, event) {
|
openMenu(row, column, event) {
|
||||||
this.showAddMenu = row.type === 'menu';
|
this.showAddMenu = row.type === 'menu';
|
||||||
// 阻止浏览器默认菜单
|
// 阻止浏览器默认菜单
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.currentRow = row;
|
this.currentRow = row;
|
||||||
|
|
||||||
this.menuVisible = true;
|
this.menuVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const menu = this.$el.querySelector('.context-menu');
|
const menu = this.$el.querySelector('.context-menu');
|
||||||
const h = menu.offsetHeight || 100;
|
const h = menu.offsetHeight || 100;
|
||||||
const sh = document.documentElement.clientHeight;
|
const sh = document.documentElement.clientHeight;
|
||||||
let top = event.clientY;
|
let top = event.clientY;
|
||||||
if (top + h > sh) top -= h;
|
if (top + h > sh) top -= h;
|
||||||
this.menuLeft = event.clientX;
|
this.menuLeft = event.clientX;
|
||||||
this.menuTop = top;
|
this.menuTop = top;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 新建菜单
|
// 新建菜单
|
||||||
handleAddMenu(row) {
|
handleAddMenu(row) {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
this.$refs.basicFormRef.onOpen(null, this.pageForm.platform)
|
this.$refs.basicFormRef.onOpen(null, this.pageForm.platform)
|
||||||
},
|
},
|
||||||
handleAddChildMenu(row) {
|
handleAddChildMenu(row) {
|
||||||
this.$refs.basicFormRef.addChildMenu(row, this.pageForm.platform)
|
this.$refs.basicFormRef.addChildMenu(row, this.pageForm.platform)
|
||||||
},
|
},
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
// 判断子菜单的type是权限还是菜单
|
// 判断子菜单的type是权限还是菜单
|
||||||
if (row.type === 'menu') {
|
if (row.type === 'menu') {
|
||||||
this.$refs.basicFormRef.onOpen(row.id, this.pageForm.platform)
|
this.$refs.basicFormRef.onOpen(row.id, this.pageForm.platform)
|
||||||
} else {
|
} else {
|
||||||
this.$refs.permissionFormRef.onOpen(row.id)
|
this.$refs.permissionFormRef.onOpen(row.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
// 删除逻辑
|
// 删除逻辑
|
||||||
console.log(row)
|
console.log(row)
|
||||||
this.$confirm("此操作将删除 " + row.name, "提示", {
|
this.$confirm("此操作将删除 " + row.name, "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post("/platform/sys/menu/delete/" + row.id).then((res) => {
|
this.$axios.post("/platform/sys/menu/delete/" + row.id).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.loadChildByExpandedKeys()
|
this.loadChildByExpandedKeys()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
doSearch() {
|
doSearch() {
|
||||||
this.initTreeTable()
|
this.initTreeTable()
|
||||||
},
|
},
|
||||||
@@ -327,13 +327,13 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// 点击任意处关闭菜单
|
// 点击任意处关闭菜单
|
||||||
document.addEventListener('click', () => (this.menuVisible = false));
|
document.addEventListener('click', () => (this.menuVisible = false));
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
document.removeEventListener('click', () => (this.menuVisible = false));
|
document.removeEventListener('click', () => (this.menuVisible = false));
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.dict.type.SYS_MENU_PLATFORM) {
|
if (this.dict.type.SYS_MENU_PLATFORM) {
|
||||||
|
|||||||
Reference in New Issue
Block a user