..
This commit is contained in:
@@ -40,7 +40,7 @@ public class FlowTodoCenter {
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result todo(Integer pageNumber, Integer pageSize, String keyword, String categoty) {
|
||||
public Result todo(Integer pageNumber, Integer pageSize, String searchKeyword, String category) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t.id AS taskId,
|
||||
@@ -75,7 +75,7 @@ public class FlowTodoCenter {
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result done(Integer pageNumber, Integer pageSize, String keyword, String categoty) {
|
||||
public Result done(Integer pageNumber, Integer pageSize, String searchKeyword, String category) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t.id AS taskId,
|
||||
@@ -110,7 +110,7 @@ public class FlowTodoCenter {
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result started(Integer pageNumber, Integer pageSize, String keyword, String categoty) {
|
||||
public Result started(Integer pageNumber, Integer pageSize, String searchKeyword, String category) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
ins.id AS instanceId,
|
||||
|
||||
@@ -9,20 +9,24 @@ import lombok.Getter;
|
||||
@Getter
|
||||
@DictEnum(key = "ProcessInstanceStateEnum", name = "流程实例状态")
|
||||
public enum ProcessInstanceStateEnum {
|
||||
DOING(10, "进行中"),
|
||||
FINISHED(20, "已完成"),
|
||||
WITHDRAW(30, "已撤回"),
|
||||
INTERRUPT(40, "强行终止"),
|
||||
REJECT(45, "已拒绝"),
|
||||
PENDING(50, "挂起"),
|
||||
ABANDON(99, "已废弃");
|
||||
DOING(10, "进行中", null),
|
||||
FINISHED(20, "已完成", "success"),
|
||||
WITHDRAW(30, "已撤回", "danger"),
|
||||
INTERRUPT(40, "强行终止", "danger"),
|
||||
REJECT(45, "已拒绝", "danger"),
|
||||
PENDING(50, "挂起", "danger"),
|
||||
ABANDON(99, "已废弃", "danger");
|
||||
|
||||
private final Integer code;
|
||||
|
||||
private final String message;
|
||||
|
||||
ProcessInstanceStateEnum(Integer code, String message) {
|
||||
private final String type;
|
||||
|
||||
ProcessInstanceStateEnum(Integer code, String message, String type) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ public class SysRoleController {
|
||||
|
||||
@At
|
||||
@Ok("json")
|
||||
@SaCheckPermission("sys.manager.role.menu")
|
||||
// @SaCheckPermission("sys.manager.role.menu")
|
||||
@SLog(tag = "分配角色菜单", msg = "角色名称:${args[3].getAttribute('name')}")
|
||||
public Object menuDo(@Param("menuIds") String menuIds, @Param("platform") String platform, @Param("roleId") String roleId, HttpServletRequest req) {
|
||||
try {
|
||||
|
||||
@@ -14,7 +14,10 @@ import com.budwk.app.base.exception.BaseException;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.sys.models.*;
|
||||
import com.budwk.app.sys.models.Sys_dict;
|
||||
import com.budwk.app.sys.models.Sys_role;
|
||||
import com.budwk.app.sys.models.Sys_unit;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.sys.services.SysDictService;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import com.budwk.app.sys.services.SysUnitService;
|
||||
@@ -286,7 +289,7 @@ public class SysUnitController {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
nodeList.add(new TreeNode<>(list.get(i).getId(), list.get(i).getParentId(), list.get(i).getName(), i));
|
||||
}
|
||||
List<Tree<String>> treeList = TreeUtil.build(nodeList, "1");
|
||||
List<Tree<String>> treeList = TreeUtil.build(nodeList, StrUtil.blankToDefault(pid, "1"));
|
||||
|
||||
// NutMap menuMap = NutMap.NEW();
|
||||
// for (Sys_unit unit : list) {
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.budwk.app.sys.controller.message;
|
||||
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
|
||||
/**
|
||||
* 消息发送者
|
||||
*/
|
||||
public interface SysMessageSender {
|
||||
|
||||
/**
|
||||
* 发送消息
|
||||
* @param message 消息内容
|
||||
* @param receiver 接收人
|
||||
* @return 发送结果
|
||||
*/
|
||||
// boolean send(Message message, Sys_user receiver);
|
||||
|
||||
/**
|
||||
* 支持的渠道类型
|
||||
* @return 渠道类型
|
||||
*/
|
||||
String getChannelType();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.budwk.app.sys.controller.message;
|
||||
|
||||
public class SysSmsMessageSender {
|
||||
}
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
package com.budwk.app.zhgh.democratic.grassrootscongress.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.bpm.param.BpmTaskApprovalParam;
|
||||
import com.budwk.app.bpm.service.BpmService;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.service.GrassrootsCongressMeetingService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @ClassName GrassrootsCongressMeetingAuditController
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2024/9/6 15:17
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/grassrootsCongress/materials/audit")
|
||||
@Api(tags = "基层双代会资料审核")
|
||||
public class GrassrootsCongressMaterialsAuditController {
|
||||
|
||||
@Inject
|
||||
private BpmService bpmService;
|
||||
@Inject
|
||||
private GrassrootsCongressMeetingService grassrootsCongressMeetingService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/grassrootscongress/materials/audit/index.html")
|
||||
@SaCheckPermission("grassrootsCongress.materials.audit")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("资料列表")
|
||||
@SaCheckPermission("grassrootsCongress.materials.audit")
|
||||
public Result pageData(PageForm pageForm, Integer year, String unionId) {
|
||||
Pagination pagination = grassrootsCongressMeetingService.pageData(pageForm, year, unionId);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("会议资料审核")
|
||||
@SaCheckPermission("grassrootsCongress.materials.audit")
|
||||
@SLog(type = "基层双代会", tag = "基层双代会资料审核", msg = "校工会审核信息")
|
||||
public Result approval(@Param("approval") @Valid BpmTaskApprovalParam approvalParam) {
|
||||
bpmService.completeTask(approvalParam.getProcessInstanceTaskId(), approvalParam.getBpmTaskApprovalTypeEnum(), null, null);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("会议批复撤回")
|
||||
@SaCheckPermission("grassrootsCongress.materials.audit")
|
||||
@SLog(type = "基层双代会", tag = "基层双代会资料撤回", msg = "基层双代会资料撤回")
|
||||
public Result revoke(@Valid String taskId) {
|
||||
bpmService.revokeTask(taskId);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
-143
@@ -1,143 +0,0 @@
|
||||
package com.budwk.app.zhgh.democratic.grassrootscongress.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.BpmProcessConstant;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.exception.BaseException;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.bpm.service.BpmService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.models.GrassrootsCongressMaterialsInfo;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.service.GrassrootsCongressMeetingService;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.vo.GrassrootsCongressMaterialVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName GrassrootsCongressMaterialsController
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2024/9/6 9:53
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/grassrootsCongress/materials/manage")
|
||||
@Api(tags = "基层双代会资料管理")
|
||||
public class GrassrootsCongressMaterialsController {
|
||||
|
||||
@Inject
|
||||
private GrassrootsCongressMeetingService grassrootsCongressMeetingService;
|
||||
@Inject
|
||||
private BpmService bpmService;
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
@Inject
|
||||
private CommonService commonService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/grassrootscongress/materials/manage/index.html")
|
||||
@SaCheckPermission("grassrootsCongress.materials.manage")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("我的资料列表")
|
||||
@SaCheckPermission("grassrootsCongress.materials.manage")
|
||||
public Result pageData(PageForm pageForm, Integer year) {
|
||||
Pagination pagination = grassrootsCongressMeetingService.pageData(pageForm, year);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("提交")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("grassrootsCongress.materials.manage")
|
||||
@SLog(tag = "基层双代会", msg = "上传会议资料", type = "grassrootsCongressMaterials")
|
||||
public Result doSave(@Param("data") GrassrootsCongressMaterialsInfo data) {
|
||||
data.setCreatedDate(new Date());
|
||||
data.setUserName(SecurityUtil.getUserUsername());
|
||||
data.setLoginName(SecurityUtil.getUserLoginname());
|
||||
data.setUserId(SecurityUtil.getUserId());
|
||||
grassrootsCongressMeetingService.insertOrUpdate(data);
|
||||
bpmService.startSaveProcessInstance(BpmProcessConstant.GRASSROOTS_CONGRESS_MATERIALS.name(), data.getMaterialsName(), data.getId(), null);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("提交")
|
||||
@Aop({TransAop.READ_COMMITTED})
|
||||
@SaCheckPermission("grassrootsCongress.materials.manage")
|
||||
@SLog(type = "grassrootsCongressMaterials", tag = "基层双代会", msg = "会议请示添加会议")
|
||||
public Result doSubmit(@Param("data") GrassrootsCongressMaterialsInfo data) {
|
||||
data.setCreatedDate(new Date());
|
||||
data.setUserName(SecurityUtil.getUserUsername());
|
||||
data.setLoginName(SecurityUtil.getUserLoginname());
|
||||
data.setUserId(SecurityUtil.getUserId());
|
||||
grassrootsCongressMeetingService.insertOrUpdate(data);
|
||||
String approvalLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.SCHOOL_UNION_ADMIN);
|
||||
if (StrUtil.isBlank(approvalLoginName)) {
|
||||
throw new BaseException("会议资料审批人未设置");
|
||||
}
|
||||
bpmService.startSubmitProcessInstance(BpmProcessConstant.GRASSROOTS_CONGRESS_MATERIALS.name(), data.getMaterialsName(), data.getId(), List.of(approvalLoginName), null);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("删除会议资料")
|
||||
@SaCheckPermission("grassrootsCongress.myMeeting")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(type = "grassrootsCongressMaterials", tag = "基层双代会", msg = "删除会议资料")
|
||||
public Result doDelete(@Valid String id) {
|
||||
grassrootsCongressMeetingService.dao().delete(GrassrootsCongressMaterialsInfo.class, id);
|
||||
bpmService.deleteInstance(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("撤回申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "基层双代会", msg = "撤回申请")
|
||||
@SaCheckPermission("grassrootsCongress.myMeeting")
|
||||
public Result revokeApply(@Valid String id) {
|
||||
bpmService.revokeApply(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("grassrootsCongress.materials.manage")
|
||||
@ApiOperation("查询单个会议资料信息")
|
||||
public Result findOne(@Valid String id) {
|
||||
Sql sql = Sqls.create("""
|
||||
select * from grassroots_congress_materials_info where id=@id
|
||||
""").setParam("id", id);
|
||||
GrassrootsCongressMaterialVo grassrootsCongressMaterialVo = (GrassrootsCongressMaterialVo) baseService.fetchVO(sql, GrassrootsCongressMaterialVo.class);
|
||||
grassrootsCongressMaterialVo.setNodeTasks(bpmService.getNodeTasks(BpmProcessConstant.GRASSROOTS_CONGRESS_MATERIALS, id));
|
||||
return Result.success(grassrootsCongressMaterialVo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.budwk.app.zhgh.democratic.grassrootscongress.controller.material;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.service.GrassrootsCongressService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/grassrootsCongress/material/approval")
|
||||
@Api(tags = "基层双代会-会议资料-校工会审核")
|
||||
public class GrassrootsCongressMaterialApprovalController {
|
||||
|
||||
@Inject
|
||||
private GrassrootsCongressService grassrootsCongressService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/grassrootscongress/material/approval/index.html")
|
||||
@SaCheckPermission("grassrootsCongress.material.approval")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("会议列表")
|
||||
@SaCheckPermission("grassrootsCongress.material.approval")
|
||||
public Result pageData(PageForm pageForm, Integer year, String unionId, boolean approval) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN grassroots_congress_materials_info info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "=", "zlsh");
|
||||
|
||||
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())){
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
}
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
|
||||
cnd.andEX("YEAR(info.createdTime)", "=", year);
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.desc("info.createdAt");
|
||||
} else {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pageVO = grassrootsCongressService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pageVO);
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.budwk.app.zhgh.democratic.grassrootscongress.controller.material;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.models.GrassrootsCongressMaterialsInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/grassrootsCongress/material/common")
|
||||
@Api(tags = "基层双代会-会议资料-公共")
|
||||
public class GrassrootsCongressMaterialCommonController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("获取申请信息")
|
||||
public Result info(@Param("id") String id) {
|
||||
GrassrootsCongressMaterialsInfo info = dao.fetch(GrassrootsCongressMaterialsInfo.class, id);
|
||||
return Result.success(info);
|
||||
}
|
||||
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
package com.budwk.app.zhgh.democratic.grassrootscongress.controller.material;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.models.GrassrootsCongressMaterialsInfo;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.models.GrassrootsCongressMeetingInfo;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.param.GrassrootsCongressPageForm;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.service.GrassrootsCongressService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/grassrootsCongress/material/mine")
|
||||
@Api(tags = "基层双代会-会议资料-我的申请")
|
||||
public class GrassrootsCongressMaterialMineController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private GrassrootsCongressService grassrootsCongressService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/grassrootscongress/material/mine/index.html")
|
||||
@SaCheckPermission("grassrootsCongress.material.mine")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("我的请示列表")
|
||||
@SaCheckPermission("grassrootsCongress.material.mine")
|
||||
public Result pageData(@Valid GrassrootsCongressPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask' AND taskState in (10,20)) AS startTaskId
|
||||
FROM
|
||||
grassroots_congress_materials_info info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||
cnd.and("info.createdBy", "=", SecurityUtil.getUserId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.and(Cnd.likeEX("info.meetingName", pageForm.getSearchKeyword()));
|
||||
}
|
||||
cnd.andEX("YEAR(info.createdTime)", "=", pageForm.getYear());
|
||||
cnd.desc("info.createdTime");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = grassrootsCongressService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("删除会议请示")
|
||||
@SaCheckPermission("grassrootsCongress.material.mine")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "基层双代会-会议资料-我的申请", msg = "删除")
|
||||
public Result delete(@Valid String id) {
|
||||
dao.clear(GrassrootsCongressMaterialsInfo.class, Cnd.where("id", "=", id));
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("基层双代会届次")
|
||||
@SaCheckPermission("grassrootsCongress.material.mine")
|
||||
public Result getAllJc(Integer year) {
|
||||
List<GrassrootsCongressMeetingInfo> query = dao.query(GrassrootsCongressMeetingInfo.class,
|
||||
Cnd.where("YEAR(createTime)", "=", year).and("fullName", "is not", null).groupBy("fullName"));
|
||||
if (Lang.isNotEmpty(query)) {
|
||||
List<String> list = query.stream().map(GrassrootsCongressMeetingInfo::getFullName).toList();
|
||||
return Result.success(list);
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.budwk.app.zhgh.democratic.grassrootscongress.controller.material;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.param.GrassrootsCongressPageForm;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.service.GrassrootsCongressService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/grassrootsCongress/material/statistics")
|
||||
@Api(tags = "基层双代会-会议资料-统计")
|
||||
public class GrassrootsCongressMaterialStatisticsController {
|
||||
|
||||
@Inject
|
||||
private GrassrootsCongressService grassrootsCongressService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/grassrootscongress/material/statistics/index.html")
|
||||
@SaCheckPermission("grassrootsCongress.material.statistics")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("汇总统计列表")
|
||||
@SaCheckPermission("grassrootsCongress.material.statistics")
|
||||
public Result pageData(GrassrootsCongressPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId
|
||||
FROM
|
||||
grassroots_congress_materials_info info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("ins.state","=", ProcessInstanceStateEnum.FINISHED.getCode());
|
||||
cnd.andEX("YEAR(info.createdTime)", "=", pageForm.getYear());
|
||||
cnd.desc("info.createdTime");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = grassrootsCongressService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
}
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
package com.budwk.app.zhgh.democratic.grassrootscongress.controller.material;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.models.GrassrootsCongressMaterialsInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/grassrootsCongress/material/write")
|
||||
@Api(tags = "基层双代会-资料上传")
|
||||
public class GrassrootsCongressMaterialWriteController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/grassrootscongress/material/write/index.html")
|
||||
@SaCheckPermission("grassrootsCongress.material.write")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("保存")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "基层双代会-资料资料", msg = "保存资料")
|
||||
@SaCheckPermission("grassrootsCongress.material.write")
|
||||
public Result save(@Param("data") GrassrootsCongressMaterialsInfo info) {
|
||||
info.setCreatedTime(new Date());
|
||||
dao.insertOrUpdate(info);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("提交")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "基层双代会-资料请示", msg = "提交资料")
|
||||
@SaCheckPermission("grassrootsCongress.material.write")
|
||||
public Result submit(@Param("data") GrassrootsCongressMaterialsInfo info) {
|
||||
info.setCreatedTime(new Date());
|
||||
dao.insertOrUpdate(info);
|
||||
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("JCSDHHYZL", info.getId(), SecurityUtil.getUserId(), args);
|
||||
|
||||
// 自动完成第一个申请任务
|
||||
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||
for (ProcessTask task : doingTaskList) {
|
||||
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("重新提交申请")
|
||||
@SLog(tag = "基层双代会-资料请示", msg = "重新提交申请")
|
||||
@SaCheckPermission("grassrootsCongress.material.write")
|
||||
public Result submitAgain(@Param("data") GrassrootsCongressMaterialsInfo info, @Param("taskId") Long taskId) {
|
||||
dao.insertOrUpdate(info);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||
flowCommonService.executeTask(dict);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("grassrootsCongress")
|
||||
@ApiOperation("查询单个资料信息")
|
||||
public Result info(@Valid String id) {
|
||||
GrassrootsCongressMaterialsInfo info = dao.fetch(GrassrootsCongressMaterialsInfo.class, id);
|
||||
return Result.success(info);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("查询分工会申请成功的届次信息")
|
||||
@SaCheckPermission("grassrootsCongress.material.write")
|
||||
public Result listSession(String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.id,
|
||||
info.fullName
|
||||
FROM
|
||||
`grassroots_congress_meeting_info` info
|
||||
LEFT JOIN wf_process_instance inst ON inst.businessNo = info.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("inst.state","=", ProcessInstanceStateEnum.FINISHED.getCode());
|
||||
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())){
|
||||
cnd.andEX("info.unionId","=", unionId);
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
sql.setCallback(Sqls.callback.maps());
|
||||
dao.execute(sql);
|
||||
List<NutMap> list = sql.getList(NutMap.class);
|
||||
return Result.success(list);
|
||||
}
|
||||
}
|
||||
+4
-2
@@ -44,7 +44,7 @@ public class GrassrootsCongressMeetingApprovalController {
|
||||
@At
|
||||
@ApiOperation("会议列表")
|
||||
@SaCheckPermission("grassrootsCongress.meeting.approval")
|
||||
public Result pageData(PageForm pageForm, Integer year, String meetingName, String unionId, boolean approval) {
|
||||
public Result pageData(PageForm pageForm, Integer year, String unionId, boolean approval) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
@@ -87,7 +87,9 @@ public class GrassrootsCongressMeetingApprovalController {
|
||||
}
|
||||
|
||||
cnd.andEX("YEAR(info.createTime)", "=", year);
|
||||
cnd.and(Cnd.likeEX("info.meetingName", meetingName));
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.and(Cnd.likeEX("info.meetingName", pageForm.getSearchKeyword()));
|
||||
}
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
|
||||
-4
@@ -59,14 +59,10 @@ public class GrassrootsCongressMeetingStatisticsController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("ins.state","=", ProcessInstanceStateEnum.FINISHED.getCode());
|
||||
|
||||
cnd.andEX("YEAR(info.createTime)", "=", pageForm.getYear());
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.and(Cnd.likeEX("info.meetingName", pageForm.getSearchKeyword()));
|
||||
}
|
||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||
cnd.and("info.createUserId", "=", SecurityUtil.getUserId());
|
||||
}
|
||||
cnd.desc("info.createTime");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = grassrootsCongressService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
|
||||
+45
@@ -16,12 +16,15 @@ import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.models.GrassrootsCongressMeetingInfo;
|
||||
import com.budwk.app.zhgh.democratic.grassrootscongress.service.GrassrootsCongressService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
@@ -45,6 +48,8 @@ public class GrassrootsCongressMeetingWriteController {
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
@Inject
|
||||
private GrassrootsCongressService grassrootsCongressService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/grassrootscongress/meeting/write/index.html")
|
||||
@@ -59,6 +64,26 @@ public class GrassrootsCongressMeetingWriteController {
|
||||
@SLog(tag = "基层双代会-会议请示", msg = "保存会议")
|
||||
@SaCheckPermission("grassrootsCongress.meeting.write")
|
||||
public Result save(@Param("data") GrassrootsCongressMeetingInfo data) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
count(1)
|
||||
FROM
|
||||
`grassroots_congress_meeting_info` info
|
||||
LEFT JOIN wf_process_instance inst ON inst.businessNo = info.id
|
||||
WHERE inst.state=20 AND info.unionId = @unionId
|
||||
AND info.j = @j AND info.c = @c
|
||||
""");
|
||||
sql.setParam("unionId", data.getUnionId());
|
||||
sql.setParam("j", data.getJ());
|
||||
sql.setParam("c", data.getC());
|
||||
int count = grassrootsCongressService.count(sql);
|
||||
|
||||
if (count > 0) {
|
||||
return Result.error("该届次已存在!");
|
||||
}
|
||||
|
||||
|
||||
data.setFullName(data.getJ() + data.getC());
|
||||
data.setCreateTime(DateUtil.now());
|
||||
data.setCreateUserId(SecurityUtil.getUserId());
|
||||
data.setCreateUserName(SecurityUtil.getUserUsername());
|
||||
@@ -72,6 +97,25 @@ public class GrassrootsCongressMeetingWriteController {
|
||||
@SLog(tag = "基层双代会-会议请示", msg = "提交会议")
|
||||
@SaCheckPermission("grassrootsCongress.meeting.write")
|
||||
public Result submit(@Param("data") GrassrootsCongressMeetingInfo data) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
count(1)
|
||||
FROM
|
||||
`grassroots_congress_meeting_info` info
|
||||
LEFT JOIN wf_process_instance inst ON inst.businessNo = info.id
|
||||
WHERE inst.state=20 AND info.unionId = @unionId
|
||||
AND info.j = @j AND info.c = @c
|
||||
""");
|
||||
sql.setParam("unionId", data.getUnionId());
|
||||
sql.setParam("j", data.getJ());
|
||||
sql.setParam("c", data.getC());
|
||||
int count = grassrootsCongressService.count(sql);
|
||||
|
||||
if (count > 0) {
|
||||
return Result.error("该届次已存在!");
|
||||
}
|
||||
|
||||
data.setFullName(data.getJ() + data.getC());
|
||||
data.setCreateTime(DateUtil.now());
|
||||
data.setCreateUserId(SecurityUtil.getUserId());
|
||||
data.setCreateUserName(SecurityUtil.getUserUsername());
|
||||
@@ -97,6 +141,7 @@ public class GrassrootsCongressMeetingWriteController {
|
||||
@SLog(tag = "基层双代会-会议请示", msg = "重新提交申请")
|
||||
@SaCheckPermission("grassrootsCongress.meeting.write")
|
||||
public Result submitAgain(@Param("data") GrassrootsCongressMeetingInfo data, @Param("taskId") Long taskId) {
|
||||
data.setFullName(data.getJ() + data.getC());
|
||||
dao.insertOrUpdate(data);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
|
||||
+7
-7
@@ -10,12 +10,6 @@ import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName GrassrootsCongressMaterialsInfo
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2024/9/6 10:06
|
||||
*/
|
||||
@Data
|
||||
@Comment("基层双代会资料")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@@ -49,6 +43,11 @@ public class GrassrootsCongressMaterialsInfo extends BaseModel {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("创建人工会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("教代会id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@@ -73,10 +72,11 @@ public class GrassrootsCongressMaterialsInfo extends BaseModel {
|
||||
@Comment("附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<JSONObject> files;
|
||||
|
||||
@Column
|
||||
@Comment("创建时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date createdDate;
|
||||
private Date createdTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ public class ProposalConfigTypeController {
|
||||
@At
|
||||
@SaCheckPermission("proposal.config.type")
|
||||
@ApiModelProperty("删除提案类型")
|
||||
@SLog(type = "提案类型配置", tag = "删除提案类型", msg = "${id}")
|
||||
@SLog(type = "提案类型配置", tag = "删除提案类型", msg = "id:${id}")
|
||||
public Result delete(@Valid Integer id){
|
||||
int count = dao.count(ProposalInfo.class, Cnd.where(ProposalInfo::getTypeId, "=", id));
|
||||
if(count > 0){
|
||||
|
||||
+5
-10
@@ -1,24 +1,16 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.controller.query;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
||||
import com.budwk.app.bpm.models.BpmProcessTask;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalConfig;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalUndertake;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
@@ -26,7 +18,10 @@ import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -65,7 +60,7 @@ public class ProposalQueryUnitReplyController {
|
||||
// 主办任务记录
|
||||
List<ProcessTask> masterUnitTasks = dao.query(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "in", instIds)
|
||||
.and(ProcessTask::getTaskState, "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.DOING.getCode()))
|
||||
.and(ProcessTask::getTaskName, "=", "85cf23da-2dd5-4007-a1e9-bd9bfddc68f0"));
|
||||
.and(ProcessTask::getTaskName, "in", List.of("85cf23da-2dd5-4007-a1e9-bd9bfddc68f0", "5ed5a1be-0cd3-4b47-a0d5-238d53b61f34")));
|
||||
|
||||
// 协办任务记录
|
||||
List<ProcessTask> slaveUnitTasks = dao.query(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "in", instIds)
|
||||
|
||||
+20
-8
@@ -1,12 +1,14 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.controller.senior;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.democratic.proposal.controller.vo.ProposalInfoPageVO;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalQueryComprehensiveParam;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
@@ -31,7 +33,7 @@ public class ProposalSeniorBasicController {
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
private ProposalCommonService proposalCommonService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/proposal/senior/basic/index.html")
|
||||
@@ -50,25 +52,35 @@ public class ProposalSeniorBasicController {
|
||||
type.name AS typeName,
|
||||
tcs.fullName AS sessionName,
|
||||
tcd.`name` AS delegationName,
|
||||
inst.processInstanceNodeId,
|
||||
inst.processInstanceNodeCode,
|
||||
inst.processInstanceNodeName,
|
||||
inst.processInstanceTaskIds,
|
||||
inst.processInstanceStatus
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.displayName curTaskName,
|
||||
JSON_UNQUOTE(JSON_EXTRACT(caseTasks.variable, '$.tf_hostUnitName')) AS masterUnitName,
|
||||
JSON_EXTRACT(caseTasks.variable, '$.tf_helpUnitNames') AS slaveUnitNames
|
||||
FROM
|
||||
proposal_info info
|
||||
LEFT JOIN proposal_consolidation p ON JSON_CONTAINS(p.consolidationIds, JSON_QUOTE(info.id))
|
||||
LEFT JOIN proposal_type type on type.id = info.typeId
|
||||
LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId
|
||||
LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId
|
||||
LEFT JOIN bpm_process_instance inst ON inst.processInstanceBusinessId = info.id
|
||||
LEFT JOIN teacher_congress_delegate tcde on tcde.loginName = info.createUserLoginName
|
||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
|
||||
LEFT JOIN (SELECT processInstanceId, MAX(finishTime) AS finishTime FROM wf_process_task WHERE taskName = '9846ab38-40c5-4093-bafc-a9b3b443338b' AND taskState = 20 GROUP BY processInstanceId) latestTasks ON latestTasks.processInstanceId = ins.id
|
||||
LEFT JOIN wf_process_task caseTasks ON caseTasks.processInstanceId = ins.id AND caseTasks.taskName = '9846ab38-40c5-4093-bafc-a9b3b443338b' AND caseTasks.taskState = 20 AND caseTasks.finishTime = latestTasks.finishTime
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getUndertakeUnitId())) {
|
||||
|
||||
}
|
||||
ProposalQueryComprehensiveParam.buildSearch(cnd, pageForm);
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = baseService.listPageVO(pageForm, sql, ProposalInfoPageVO.class);
|
||||
Pagination pagination = proposalCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
+15
-6
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.controller.senior;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
@@ -57,20 +58,32 @@ public class ProposalSeniorDeleteController {
|
||||
COUNT(p.consolidationIds) > 0 AS isConsolidation,
|
||||
type.name AS typeName,
|
||||
tcs.fullName AS sessionName,
|
||||
tcd.`name` AS delegationName
|
||||
tcd.`name` AS delegationName,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.displayName curTaskName
|
||||
FROM
|
||||
proposal_info info
|
||||
LEFT JOIN proposal_consolidation p ON JSON_CONTAINS(p.consolidationIds, JSON_QUOTE(info.id))
|
||||
LEFT JOIN proposal_type type on type.id = info.typeId
|
||||
LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId
|
||||
LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId
|
||||
LEFT JOIN teacher_congress_delegate tcde on tcde.loginName = info.createUserLoginName
|
||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getUndertakeUnitId())) {
|
||||
|
||||
}
|
||||
ProposalQueryComprehensiveParam.buildSearch(cnd, pageForm);
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = proposalCommonService.listPageVO(pageForm, sql, ProposalInfoPageVO.class);
|
||||
Pagination pagination = proposalCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@@ -81,10 +94,6 @@ public class ProposalSeniorDeleteController {
|
||||
@SLog(tag = "提案管理系统-高级管理-万能删除提案", msg = "删除提案")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result delete(String id) {
|
||||
// dao.clear(ProposalReplyUnit.class, Cnd.where(ProposalReplyUnit::getProposalId, "=", id));
|
||||
// dao.clear(ProposalSeconded.class, Cnd.where(ProposalReplyUnit::getProposalId, "=", id));
|
||||
// dao.clear(ProposalInfo.class, Cnd.where(ProposalInfo::getId, "=", id));
|
||||
// bpmService.deleteInstance(id);
|
||||
dao.clear(ProposalInfo.class, Cnd.where("id", "=", id));
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.controller.senior;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.flow.vo.ProcessTaskVO;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalQueryComprehensiveParam;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/senior/feedback")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "提案-高级管理-反馈评分修改")
|
||||
public class ProposalSeniorFeedBackController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private ProposalCommonService proposalCommonService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/proposal/senior/feedback/index.html")
|
||||
@SaCheckPermission("proposal.senior.feedback")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.senior.feedback")
|
||||
@ApiOperation(value = "分页列表")
|
||||
public Result pageData(@Valid @Param("pageForm") ProposalQueryComprehensiveParam pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
COUNT(p.consolidationIds) > 0 AS isConsolidation,
|
||||
type.name AS typeName,
|
||||
tcs.fullName AS sessionName,
|
||||
tcd.`name` AS delegationName,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.displayName curTaskName,
|
||||
JSON_UNQUOTE(JSON_EXTRACT(caseTasks.variable, '$.tf_hostUnitName')) AS masterUnitName,
|
||||
JSON_EXTRACT(caseTasks.variable, '$.tf_helpUnitNames') AS slaveUnitNames
|
||||
FROM
|
||||
proposal_info info
|
||||
LEFT JOIN proposal_consolidation p ON JSON_CONTAINS(p.consolidationIds, JSON_QUOTE(info.id))
|
||||
LEFT JOIN proposal_type type on type.id = info.typeId
|
||||
LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId
|
||||
LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId
|
||||
LEFT JOIN teacher_congress_delegate tcde on tcde.loginName = info.createUserLoginName
|
||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
|
||||
LEFT JOIN (SELECT processInstanceId, MAX(finishTime) AS finishTime FROM wf_process_task WHERE taskName = '9846ab38-40c5-4093-bafc-a9b3b443338b' AND taskState = 20 GROUP BY processInstanceId) latestTasks ON latestTasks.processInstanceId = ins.id
|
||||
LEFT JOIN wf_process_task caseTasks ON caseTasks.processInstanceId = ins.id AND caseTasks.taskName = '9846ab38-40c5-4093-bafc-a9b3b443338b' AND caseTasks.taskState = 20 AND caseTasks.finishTime = latestTasks.finishTime
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getUndertakeUnitId())) {
|
||||
|
||||
}
|
||||
ProposalQueryComprehensiveParam.buildSearch(cnd, pageForm);
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = proposalCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.senior.feedback")
|
||||
@ApiOperation(value = "反馈信息")
|
||||
public Result info(@Param("instanceId") String instanceId) {
|
||||
List<ProcessTask> taskList = dao.query(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "=", instanceId)
|
||||
.and(ProcessTask::getTaskName, "=", "013a7cf9-20dd-4188-a196-53fd595448e5")
|
||||
.and(ProcessTask::getTaskState, "=", ProcessTaskStateEnum.FINISHED.getCode())
|
||||
);
|
||||
|
||||
List<ProcessTaskVO> doneTaskVos = new ArrayList<>();
|
||||
for (ProcessTask doneTask : taskList) {
|
||||
ProcessTaskVO taskVO = flowEngine.processTaskService().findById(doneTask.getId());
|
||||
doneTaskVos.add(taskVO);
|
||||
}
|
||||
return Result.success(doneTaskVos);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.senior.feedback")
|
||||
@ApiOperation(value = "修改反馈信息")
|
||||
@SLog(tag = "提案-高级管理-反馈评分修改", msg = "修改反馈信息")
|
||||
public Result update(@Param("data")String data) {
|
||||
List<NutMap> tasks = Json.fromJsonAsList(NutMap.class, data);
|
||||
for (NutMap task : tasks) {
|
||||
ProcessTask processTask = flowEngine.processTaskService().fetch(task.getInt("id"));
|
||||
NutMap variable = Json.fromJson(NutMap.class, processTask.getVariable());
|
||||
variable.setv(FlowConst.TASK_FORM_DATA_PREFIX+"feedback",task.getString("feedback"));
|
||||
variable.setv(FlowConst.TASK_FORM_DATA_PREFIX+"opinion",task.getString("opinion"));
|
||||
processTask.setVariable(Json.toJson(variable));
|
||||
dao.update(processTask,"variable");
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+21
-3
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.controller.senior;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
@@ -8,6 +9,7 @@ import com.budwk.app.zhgh.democratic.proposal.controller.vo.ProposalInfoPageVO;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalQueryComprehensiveParam;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalSeniorUpdateTypeParam;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
@@ -33,7 +35,7 @@ public class ProposalSeniorTypeController {
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
private ProposalCommonService proposalCommonService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/proposal/senior/type/index.html")
|
||||
@@ -51,20 +53,36 @@ public class ProposalSeniorTypeController {
|
||||
COUNT(p.consolidationIds) > 0 AS isConsolidation,
|
||||
type.name AS typeName,
|
||||
tcs.fullName AS sessionName,
|
||||
tcd.`name` AS delegationName
|
||||
tcd.`name` AS delegationName,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.displayName curTaskName,
|
||||
JSON_UNQUOTE(JSON_EXTRACT(caseTasks.variable, '$.tf_hostUnitName')) AS masterUnitName,
|
||||
JSON_EXTRACT(caseTasks.variable, '$.tf_helpUnitNames') AS slaveUnitNames
|
||||
FROM
|
||||
proposal_info info
|
||||
LEFT JOIN proposal_consolidation p ON JSON_CONTAINS(p.consolidationIds, JSON_QUOTE(info.id))
|
||||
LEFT JOIN proposal_type type on type.id = info.typeId
|
||||
LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId
|
||||
LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId
|
||||
LEFT JOIN teacher_congress_delegate tcde on tcde.loginName = info.createUserLoginName
|
||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
|
||||
LEFT JOIN (SELECT processInstanceId, MAX(finishTime) AS finishTime FROM wf_process_task WHERE taskName = '9846ab38-40c5-4093-bafc-a9b3b443338b' AND taskState = 20 GROUP BY processInstanceId) latestTasks ON latestTasks.processInstanceId = ins.id
|
||||
LEFT JOIN wf_process_task caseTasks ON caseTasks.processInstanceId = ins.id AND caseTasks.taskName = '9846ab38-40c5-4093-bafc-a9b3b443338b' AND caseTasks.taskState = 20 AND caseTasks.finishTime = latestTasks.finishTime
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getUndertakeUnitId())) {
|
||||
|
||||
}
|
||||
ProposalQueryComprehensiveParam.buildSearch(cnd, pageForm);
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = baseService.listPageVO(pageForm, sql, ProposalInfoPageVO.class);
|
||||
Pagination pagination = proposalCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
+4
-22
@@ -1,46 +1,27 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.controller.transact;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
||||
import com.budwk.app.bpm.models.BpmProcessTask;
|
||||
import com.budwk.app.bpm.param.BpmTaskApprovalParam;
|
||||
import com.budwk.app.bpm.service.BpmService;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.sys.services.SysMsgService;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.proposal.controller.vo.ProposalInfoPageVO;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalUndertake;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalCommitteeFilingApprovalParam;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalSearchParam;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.ProposalCommitteeFilingService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/proposal/committeeFiling")
|
||||
@@ -59,7 +40,7 @@ public class ProposalCommitteeFilingController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.delegation")
|
||||
@SaCheckPermission("proposal.committeeFiling")
|
||||
@ApiOperation("分页列表")
|
||||
public Result pageData(@Valid ProposalSearchParam pageForm,boolean approval) {
|
||||
Sql sql = Sqls.create("""
|
||||
@@ -98,8 +79,9 @@ public class ProposalCommitteeFilingController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "=", "9846ab38-40c5-4093-bafc-a9b3b443338b");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())){
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
}
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
|
||||
+4
-1
@@ -99,7 +99,10 @@ public class ProposalDelegationController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "=", "93d5ba64-8220-4e62-9783-83422f474b36");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())){
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
}
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
|
||||
+20
-12
@@ -1,30 +1,24 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.controller.transact;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
||||
import com.budwk.app.bpm.service.BpmService;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.proposal.controller.vo.ProposalInfoPageVO;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalFeedbackEvaluationParam;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalSearchParam;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.ProposalFeedbackEvaluationService;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
@@ -42,9 +36,9 @@ import java.util.List;
|
||||
public class ProposalFeedbackEvaluationController {
|
||||
|
||||
@Inject
|
||||
private ProposalCommonService proposalCommonService;
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private ProposalFeedbackEvaluationService proposalFeedbackEvaluationService;
|
||||
private ProposalCommonService proposalCommonService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/proposal/transact/feedbackEvaluation/index.html")
|
||||
@@ -110,4 +104,18 @@ public class ProposalFeedbackEvaluationController {
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.feedbackEvaluation")
|
||||
@ApiOperation("获取立案信息")
|
||||
public Result caseInfo(@Param("instId") String instId) {
|
||||
ProcessTask task = dao.fetch(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "=", instId)
|
||||
.and(ProcessTask::getTaskName, "=", "9846ab38-40c5-4093-bafc-a9b3b443338b")
|
||||
.and(ProcessTask::getTaskState, "=", ProcessTaskStateEnum.FINISHED.getCode())
|
||||
.desc(ProcessTask::getCreatedAt)
|
||||
);
|
||||
JSONObject variable = JSONUtil.parseObj(task.getVariable());
|
||||
return Result.success(variable);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ public class ProposalUnderTakeReplyController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "in", List.of("85cf23da-2dd5-4007-a1e9-bd9bfddc68f0", "c9a1586e-272b-41b8-b438-0be9f9e3781d"));
|
||||
cnd.and("t.taskName", "in", List.of("85cf23da-2dd5-4007-a1e9-bd9bfddc68f0", "c9a1586e-272b-41b8-b438-0be9f9e3781d","5ed5a1be-0cd3-4b47-a0d5-238d53b61f34"));
|
||||
|
||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
+18
-7
@@ -1,13 +1,10 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.controller.transact;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.BpmProcessConstant;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.bpm.service.BpmService;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
@@ -20,6 +17,7 @@ import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.ProposalWriteService;
|
||||
import com.budwk.app.zhgh.democratic.suggestionBox.models.SuggestionBox;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.Teacher_congress_delegate;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.prepare.models.Teacher_congress_session;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -68,7 +66,7 @@ public class ProposalWriteController {
|
||||
@SLog(tag = "提案管理系统-我的提案", msg = "保存提案")
|
||||
public Result save(@Param("info") ProposalInfo proposalInfo) {
|
||||
if (StrUtil.isBlank(proposalInfo.getCode())) {
|
||||
proposalInfo.setCode(proposalWriteService.generateProposalCode(proposalInfo.getSessionId(),proposalInfo.getDelegationId()));
|
||||
proposalInfo.setCode(proposalWriteService.generateProposalCode(proposalInfo.getSessionId(), proposalInfo.getDelegationId()));
|
||||
}
|
||||
dao.insertOrUpdate(proposalInfo);
|
||||
return Result.success(proposalInfo);
|
||||
@@ -81,7 +79,7 @@ public class ProposalWriteController {
|
||||
@SLog(tag = "提案管理系统-我的提案", msg = "提交提案")
|
||||
public Result submit(@Param("info") ProposalInfo proposalInfo) {
|
||||
if (StrUtil.isBlank(proposalInfo.getCode())) {
|
||||
proposalInfo.setCode(proposalWriteService.generateProposalCode(proposalInfo.getSessionId(),proposalInfo.getDelegationId()));
|
||||
proposalInfo.setCode(proposalWriteService.generateProposalCode(proposalInfo.getSessionId(), proposalInfo.getDelegationId()));
|
||||
}
|
||||
dao.insertOrUpdate(proposalInfo);
|
||||
|
||||
@@ -89,6 +87,8 @@ public class ProposalWriteController {
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, proposalInfo);
|
||||
args.set(FlowConst.TASK_FORM_DATA_PREFIX + "source", proposalInfo.getSource());
|
||||
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("JDHTA", proposalInfo.getId(), SecurityUtil.getUserId(), args);
|
||||
|
||||
// 自动完成第一个申请任务
|
||||
@@ -105,12 +105,14 @@ public class ProposalWriteController {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("重新提交提案")
|
||||
@SLog(tag = "提案管理系统-我的提案", msg = "重新提交提案")
|
||||
public Result submitAgain(@Param("data") SuggestionBox suggestionBox, @Param("taskId") Long taskId) {
|
||||
dao.insertOrUpdate(suggestionBox);
|
||||
public Result submitAgain(@Param("info") ProposalInfo proposalInfo, @Param("taskId") Long taskId) {
|
||||
dao.insertOrUpdate(proposalInfo);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||
dict.set(FlowConst.TASK_FORM_DATA_PREFIX + "source", proposalInfo.getSource());
|
||||
|
||||
flowCommonService.executeTask(dict);
|
||||
return Result.success();
|
||||
}
|
||||
@@ -143,4 +145,13 @@ public class ProposalWriteController {
|
||||
return Result.success().addData(sysDicts);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.write")
|
||||
@ApiOperation("检查提案撰写时间")
|
||||
public Result checkWriteTime(@Valid String sessionId) {
|
||||
Teacher_congress_session session = dao.fetch(Teacher_congress_session.class, sessionId);
|
||||
boolean flag = session.getCollectStartTime().getTime() < System.currentTimeMillis() && System.currentTimeMillis() < session.getCollectEndTime().getTime();
|
||||
return Result.success().addData(flag);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.handler;
|
||||
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.AssignmentHandler;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import com.budwk.app.sys.models.Sys_role;
|
||||
import com.budwk.app.sys.models.Sys_user_role;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import com.budwk.app.sys.services.SysUserService;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 提案代表团团长
|
||||
*/
|
||||
public class ProposalDelegationAssignmentHandler implements AssignmentHandler {
|
||||
@Override
|
||||
public List<String> assign(TaskModel model, Execution execution) {
|
||||
NutMap variable = Json.fromJson(NutMap.class, execution.getProcessInstance().getVariable());
|
||||
ProposalInfo info = variable.getAs(FlowConst.FORM_DATA, ProposalInfo.class);
|
||||
|
||||
String sessionId = info.getSessionId();
|
||||
String delegationId = info.getDelegationId();
|
||||
|
||||
|
||||
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
|
||||
Sys_role role = sysRoleService.getByCode(RoleConstant.TEACHER_CONGRESS_DELEGATION_HEAD);
|
||||
|
||||
Sys_user_role user_role = ServiceContext.find(Dao.class).fetch(Sys_user_role.class, Cnd.where(Sys_user_role::getRoleId, "=", role.getId())
|
||||
.and(Sys_user_role::getTcDelegationId, "=", delegationId)
|
||||
.and(Sys_user_role::getTcSessionId, "=", sessionId));
|
||||
|
||||
if(user_role==null){
|
||||
throw new RuntimeException("您所在的代表团没有设置团长,无法流转到下一步,请联系校工会进行设置。");
|
||||
}
|
||||
return List.of(user_role.getUserId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "当前代表代表团团长";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return 210;
|
||||
}
|
||||
|
||||
}
|
||||
-2
@@ -11,12 +11,10 @@ import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ProposalSchoolLeaderCandidateHandler implements CandidateHandler {
|
||||
|
||||
|
||||
@Override
|
||||
public List<Candidate> handle(TaskModel model) {
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.handler;
|
||||
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.AssignmentHandler;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import com.budwk.app.sys.models.Sys_role;
|
||||
import com.budwk.app.sys.models.Sys_user_role;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 提案委员会主任
|
||||
*/
|
||||
public class ProposalWyhAssignmentHandler implements AssignmentHandler {
|
||||
@Override
|
||||
public List<String> assign(TaskModel model, Execution execution) {
|
||||
NutMap variable = Json.fromJson(NutMap.class, execution.getProcessInstance().getVariable());
|
||||
ProposalInfo info = variable.getAs(FlowConst.FORM_DATA, ProposalInfo.class);
|
||||
|
||||
String sessionId = info.getSessionId();
|
||||
|
||||
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
|
||||
Sys_role role = sysRoleService.getByCode(RoleConstant.PROPOSAL_COMMITTEE_DIRECTOR);
|
||||
|
||||
Sys_user_role user_role = ServiceContext.find(Dao.class).fetch(Sys_user_role.class, Cnd.where(Sys_user_role::getRoleId, "=", role.getId()).and(Sys_user_role::getTcSessionId, "=", sessionId));
|
||||
|
||||
if (user_role == null) {
|
||||
throw new RuntimeException("没有设置提案委员会主任,无法流转到下一步,请联系校工会进行设置。");
|
||||
}
|
||||
return List.of(user_role.getUserId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "教代会提案委员会主任";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return 220;
|
||||
}
|
||||
|
||||
}
|
||||
+4
-3
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.interceptor;
|
||||
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowInterceptor;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||
@@ -20,7 +21,7 @@ import java.util.List;
|
||||
/**
|
||||
* 提案委员会立案后置拦截器
|
||||
*/
|
||||
public class ProposalUnitNameInterceptor implements FlowInterceptor {
|
||||
public class ProposalCaseFilingInterceptor implements FlowInterceptor {
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void intercept(Execution execution) {
|
||||
@@ -35,7 +36,7 @@ public class ProposalUnitNameInterceptor implements FlowInterceptor {
|
||||
|
||||
// 单位名称
|
||||
variable.setv("unitName", taskActor.getActorUnitName());
|
||||
variable.setv("unitId",taskActor.getActorUnitId());
|
||||
variable.setv("unitId", taskActor.getActorUnitId());
|
||||
|
||||
// 是否主办
|
||||
variable.setv("isMaster", task.getTaskName().equals("85cf23da-2dd5-4007-a1e9-bd9bfddc68f0"));
|
||||
@@ -46,7 +47,7 @@ public class ProposalUnitNameInterceptor implements FlowInterceptor {
|
||||
// 更新立案结果
|
||||
ProcessInstance processInstance = execution.getProcessInstance();
|
||||
String businessNo = processInstance.getBusinessNo();
|
||||
dao.update(ProposalInfo.class, Chain.make("caseFilingResult", execution.getArgs().getStr("")), Cnd.where(ProposalInfo::getId, "=", businessNo));
|
||||
dao.update(ProposalInfo.class, Chain.make("caseFilingResult", execution.getArgs().getStr(FlowConst.TASK_FORM_DATA_PREFIX + "caseFilingResult")), Cnd.where(ProposalInfo::getId, "=", businessNo));
|
||||
|
||||
dao.update(processTaskList, "variable");
|
||||
}
|
||||
+13
-7
@@ -1,6 +1,8 @@
|
||||
package com.budwk.app.zhgh.democratic.suggestionBox.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
@@ -24,7 +26,7 @@ import org.nutz.mvc.annotation.Param;
|
||||
@IocBean
|
||||
@At("/platform/suggestionBox/mine")
|
||||
@Ok("json:full")
|
||||
@Api("意见箱-我的")
|
||||
@Api("建言献策-我的申请")
|
||||
public class SuggestionBoxMineController {
|
||||
|
||||
@Inject
|
||||
@@ -36,15 +38,14 @@ public class SuggestionBoxMineController {
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/suggestionBox/mine/index.html")
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("suggestionBox.mine")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result pageData(Integer pageNumber, Integer pageSize) {
|
||||
@SaCheckPermission("suggestionBox.mine")
|
||||
public Result pageData(Integer pageNumber, Integer pageSize, String title, Integer year) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.id,
|
||||
@@ -79,6 +80,10 @@ public class SuggestionBoxMineController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("info.createdBy", "=", SecurityUtil.getUserId());
|
||||
if (StrUtil.isNotBlank(title)) {
|
||||
cnd.where().andLike("info.title", title);
|
||||
}
|
||||
cnd.andEX("YEAR(info.submitTime)", "=", year);
|
||||
cnd.desc("info.submitTime");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = suggestionBoxService.listPageMap(pageNumber, pageSize, sql);
|
||||
@@ -86,9 +91,10 @@ public class SuggestionBoxMineController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("suggestionBox.mine")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("删除")
|
||||
@SLog(tag = "建言献策-我的申请", msg = "删除")
|
||||
public Result delete(@Param("id") String id) {
|
||||
suggestionBoxService.delete(id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
|
||||
+12
-8
@@ -1,7 +1,9 @@
|
||||
package com.budwk.app.zhgh.democratic.suggestionBox.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
@@ -27,7 +29,7 @@ import java.util.List;
|
||||
@IocBean
|
||||
@At("/platform/suggestionBox/write")
|
||||
@Ok("json:full")
|
||||
@Api("意见箱-撰写")
|
||||
@Api("建言献策-填写申请")
|
||||
public class SuggestionBoxWriteController {
|
||||
|
||||
@Inject
|
||||
@@ -39,14 +41,15 @@ public class SuggestionBoxWriteController {
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/suggestionBox/write/index.html")
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("suggestionBox.write")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("suggestionBox.write")
|
||||
@ApiOperation("保存申请")
|
||||
@SLog(tag = "建言献策-填写申请", msg = "保存申请")
|
||||
public Result save(@Param("data") SuggestionBox suggestionBox) {
|
||||
dao.insertOrUpdate(suggestionBox);
|
||||
return Result.success();
|
||||
@@ -54,8 +57,10 @@ public class SuggestionBoxWriteController {
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("suggestionBox.write")
|
||||
@ApiOperation("提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "建言献策-填写申请", msg = "提交申请")
|
||||
public Result submit(@Param("data") SuggestionBox suggestionBox) {
|
||||
dao.insertOrUpdate(suggestionBox);
|
||||
// 开启流程实例
|
||||
@@ -73,9 +78,10 @@ public class SuggestionBoxWriteController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("suggestionBox.write")
|
||||
@ApiOperation("重新提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "建言献策-填写申请", msg = "重新提交申请")
|
||||
public Result submitAgain(@Param("data") SuggestionBox suggestionBox, @Param("taskId") Long taskId) {
|
||||
dao.insertOrUpdate(suggestionBox);
|
||||
|
||||
@@ -86,14 +92,12 @@ public class SuggestionBoxWriteController {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("suggestionBox.write")
|
||||
@ApiOperation("获取申请信息")
|
||||
public Result info(@Param("id") String id) {
|
||||
SuggestionBox box = dao.fetch(SuggestionBox.class, id);
|
||||
return Result.success(box);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+159
-6
@@ -1,20 +1,35 @@
|
||||
package com.budwk.app.zhgh.democratic.teachercongress.delegate.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.model.ExcelImportRes;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.sys.models.Sys_role;
|
||||
import com.budwk.app.sys.models.Sys_user_role;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import com.budwk.app.sys.services.SysUserService;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.mode.TeacherCongressImportExcel;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.Teacher_congress_delegate;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.param.*;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.service.TeacherCongressDelegateService;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegation.models.Teacher_congress_delegation;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegation.models.Teacher_congress_delegation_unit;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddressList;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.*;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
@@ -23,14 +38,17 @@ import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.AdaptBy;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.mvc.upload.TempFile;
|
||||
import org.nutz.mvc.upload.UploadAdaptor;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 代表高级管理
|
||||
@@ -38,13 +56,12 @@ import java.util.Optional;
|
||||
@IocBean
|
||||
@At("/platform/teacherCongress/delegate/manage")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class TeacherCongressDelegateManageController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
@Inject
|
||||
private SysUserService sysUserService;
|
||||
@Inject
|
||||
private SysRoleService sysRoleService;
|
||||
@@ -285,4 +302,140 @@ public class TeacherCongressDelegateManageController {
|
||||
sysRoleService.clearCache();
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("tc.delegate.manage")
|
||||
@ApiOperation("下载模版")
|
||||
public void downloadTemplate(HttpServletResponse response, String sessionId) {
|
||||
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||
entities.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||
entities.add(new ExcelExportEntity("姓名", "username", 20));
|
||||
entities.add(new ExcelExportEntity("代表团", "delegationName", 20));
|
||||
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList());
|
||||
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
DataValidationHelper helper = sheet.getDataValidationHelper();
|
||||
|
||||
// 添加代表团下拉列
|
||||
List<Teacher_congress_delegation> delegations = dao.query(Teacher_congress_delegation.class, Cnd.where(Teacher_congress_delegation::getSessionId, "=", sessionId).asc(Teacher_congress_delegation::getCode));
|
||||
String[] delegationNames = delegations.stream().map(Teacher_congress_delegation::getName).toArray(String[]::new);
|
||||
|
||||
CellRangeAddressList delegationAddressList = new CellRangeAddressList(0, 65535, 2, 2);
|
||||
DataValidationConstraint dataValidationConstraint = helper.createExplicitListConstraint(delegationNames);
|
||||
DataValidation validation = helper.createValidation(dataValidationConstraint, delegationAddressList);
|
||||
sheet.addValidationData(validation);
|
||||
|
||||
CommonDownloadUtil.download("教代会代表导入模版.xlsx", workbook, response);
|
||||
}
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("tc.delegate.manage")
|
||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||
public Result importByExcel(@Param("file") TempFile tempFile, @Param("sessionId") String sessionId) {
|
||||
// 读取数据
|
||||
List<TeacherCongressImportExcel> excelList = ExcelImportUtil.importExcel(tempFile.getFile(), TeacherCongressImportExcel.class, new ImportParams());
|
||||
|
||||
// 查询用户
|
||||
List<String> loginNames = excelList.stream().map(TeacherCongressImportExcel::getLoginName).filter(StrUtil::isNotBlank).collect(Collectors.toList());
|
||||
List<View_user> sysUsers = dao.query(View_user.class, Cnd.where(View_user::getLoginname, "in", loginNames));
|
||||
|
||||
// 查询当前届次的代表
|
||||
List<Teacher_congress_delegate> delegates = dao.query(Teacher_congress_delegate.class, Cnd.where(Teacher_congress_delegate::getSessionId, "=", sessionId));
|
||||
|
||||
// 查询当前届次的代表团
|
||||
List<Teacher_congress_delegation> delegations = dao.query(Teacher_congress_delegation.class, Cnd.where(Teacher_congress_delegation::getSessionId, "=", sessionId));
|
||||
Map<String, Teacher_congress_delegation> delegationMap = delegations.stream().collect(Collectors.toMap(Teacher_congress_delegation::getName, v -> v));
|
||||
|
||||
// 创建结果集
|
||||
ExcelImportRes<TeacherCongressImportExcel> excelImportRes = new ExcelImportRes<>();
|
||||
excelImportRes.setTotalRecords(excelList.size());
|
||||
|
||||
|
||||
for (int i = 0; i < excelList.size(); i++) {
|
||||
TeacherCongressImportExcel excel = excelList.get(i);
|
||||
if (StrUtil.isBlank(excel.getLoginName())) {
|
||||
excel.setErrInfo("工号为空", i + 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
// 不能在excel里重复
|
||||
if (excelList.stream().filter(s -> s.getLoginName().equals(excel.getLoginName())).count() > 1) {
|
||||
excel.setErrInfo("重复数据", i + 1);
|
||||
}
|
||||
|
||||
View_user user = sysUsers.stream().filter(s -> s.getLoginname().equals(excel.getLoginName())).findFirst().orElse(null);
|
||||
if (user == null) {
|
||||
excel.setErrInfo("无此用户", i + 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (delegates.stream().anyMatch(s -> s.getUserId().equals(user.getId()))) {
|
||||
excel.setErrInfo("该用户已设置为代表", i + 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StrUtil.isBlank(excel.getDelegationName())) {
|
||||
excel.setErrInfo("代表团为空", i + 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!delegationMap.containsKey(excel.getDelegationName())) {
|
||||
excel.setErrInfo("无此代表团", i + 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
Sql sql = Sqls.queryEntity("""
|
||||
SELECT
|
||||
t1.id as userId,
|
||||
t1.username AS userName,
|
||||
t1.loginName AS loginName,
|
||||
t1.sex,
|
||||
TIMESTAMPDIFF(YEAR,t1.birthday,CURDATE()) AS age,
|
||||
t1.mobile,
|
||||
t1.unitId,
|
||||
t2.NAME AS unitName,
|
||||
t3.id AS unionId,
|
||||
t3.NAME AS unionName
|
||||
FROM
|
||||
`sys_user` t1
|
||||
LEFT JOIN sys_unit t2 ON t2.id = t1.unitId
|
||||
LEFT JOIN sys_union t3 ON t3.id = t2.unionId
|
||||
WHERE t1.id = (@userId)
|
||||
""");
|
||||
sql.setParam("userId", user.getId());
|
||||
sql.setCallback(Sqls.callback.entity());
|
||||
sql.setEntity(dao.getEntity(Teacher_congress_delegate.class));
|
||||
dao.execute(sql);
|
||||
Teacher_congress_delegate delegate = (Teacher_congress_delegate) sql.getResult();
|
||||
|
||||
delegate.setDelegationId(delegationMap.get(excel.getDelegationName()).getId());
|
||||
delegate.setSessionId(sessionId);
|
||||
// 正式代表
|
||||
delegate.setRoleId("72e24b5b4c4f4e90a6641e6af8487e42");
|
||||
|
||||
try {
|
||||
dao.insert(delegate);
|
||||
dao.insert("sys_user_role", Chain.make("userId", delegate.getUserId()).add("roleId", delegate.getRoleId()).add("tcSessionId", sessionId).add("tcDelegationId", delegate.getDelegationId()));
|
||||
sysUserService.clearCache();
|
||||
} catch (Exception e) {
|
||||
log.error("导入代表失败:{}", e.getMessage());
|
||||
excel.setErrInfo("添加失败", i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
// 添加错误记录
|
||||
excelImportRes.setErrorDetails(excelList.stream().filter(s -> StrUtil.isNotBlank(s.getErrMsg())).collect(Collectors.toList()));
|
||||
excelImportRes.setFailedCount(excelImportRes.getErrorDetails().size());
|
||||
|
||||
return Result.success(excelImportRes);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+4
-1
@@ -6,6 +6,7 @@ import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.Teacher_congress_delegate;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.param.TeacherCongressDelegateManagePageParam;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.service.TeacherCongressDelegateService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
@@ -49,13 +50,15 @@ public class TeacherCongressDelegateReadController {
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("tc.delegate.read")
|
||||
@ApiOperation("导出xlsx")
|
||||
public void exportXlsx(TeacherCongressDelegateManagePageParam param, HttpServletResponse response) {
|
||||
teacherDelegateService.exportXlsx(param, response);
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("tc.delegate.read.exportDocx")
|
||||
@SaCheckPermission("tc.delegate.read")
|
||||
@ApiOperation("导出docx")
|
||||
public void exportDocx(TeacherCongressDelegateManagePageParam param, HttpServletResponse response){
|
||||
teacherDelegateService.exportDocx(param, response);
|
||||
}
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.budwk.app.zhgh.democratic.teachercongress.delegate.mode;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.budwk.app.base.model.ExcelImportError;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 教代会代表导入模板
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class TeacherCongressImportExcel extends ExcelImportError {
|
||||
|
||||
@Excel(name = "工号")
|
||||
private String loginName;
|
||||
|
||||
@Excel(name = "姓名")
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "代表团")
|
||||
private String delegationName;
|
||||
|
||||
}
|
||||
+5
@@ -105,3 +105,8 @@
|
||||
.el-button{
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.el-descriptions .is-bordered{
|
||||
table-layout: fixed;!important;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
.lf-graph {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 0;
|
||||
background: #ffffff;
|
||||
user-select: none;
|
||||
}
|
||||
.lf-element-text {
|
||||
cursor: text;
|
||||
}
|
||||
.lf-text-disabled {
|
||||
pointer-events: none;
|
||||
}
|
||||
.lf-text-draggable {
|
||||
cursor: move;
|
||||
}
|
||||
.lf-node-anchor {
|
||||
cursor: crosshair;
|
||||
}
|
||||
.lf-node-anchor-hover {
|
||||
visibility: hidden;
|
||||
}
|
||||
.lf-anchor:hover .lf-node-anchor-hover {
|
||||
visibility: visible;
|
||||
}
|
||||
.lf-edge.pointer-none {
|
||||
pointer-events: none;
|
||||
}
|
||||
.lf-edge-append {
|
||||
cursor: pointer;
|
||||
}
|
||||
.lf-edge-animation {
|
||||
stroke-dashoffset: 100%;
|
||||
animation: lf_animate_dash 5s linear infinite;
|
||||
}
|
||||
@keyframes lf_animate_dash {
|
||||
to {
|
||||
stroke-dashoffset: 0;
|
||||
}
|
||||
}
|
||||
/* node */
|
||||
.lf-node-not-allow {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.lf-polyline-append-ns-resize {
|
||||
cursor: ns-resize;
|
||||
}
|
||||
.lf-polyline-append-ew-resize {
|
||||
cursor: ew-resize;
|
||||
}
|
||||
.lf-dragging {
|
||||
cursor: grabbing;
|
||||
}
|
||||
.lf-drag-able {
|
||||
cursor: default;
|
||||
}
|
||||
.lf-bezier-adjust-anchor {
|
||||
cursor: pointer;
|
||||
}
|
||||
/* background */
|
||||
.lf-background,
|
||||
.lf-grid {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
.lf-background-area {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
/* html-overlay */
|
||||
.lf-html-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
pointer-events: none;
|
||||
overflow: hidden;
|
||||
user-select: none;
|
||||
}
|
||||
.lf-html-overlay__transform > * {
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
.lf-text-editable {
|
||||
pointer-events: all;
|
||||
}
|
||||
.lf-text-input {
|
||||
text-align: center;
|
||||
outline: none;
|
||||
position: absolute;
|
||||
border: 1px solid #edefed;
|
||||
box-sizing: border-box;
|
||||
line-height: 1.2;
|
||||
border-radius: 3px;
|
||||
resize: none;
|
||||
padding: 5px;
|
||||
min-height: 20px;
|
||||
min-width: 100px;
|
||||
white-space: pre;
|
||||
background: #fff;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.lf-get-text-height {
|
||||
display: inline-block;
|
||||
word-break: break-all;
|
||||
/* 为了跟输入效果保持一致,设置透明边框占位 */
|
||||
border: 1px solid transparent;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.lf-node-text-auto-wrap {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
/* border: 1px solid transparent; */
|
||||
}
|
||||
.lf-node-text-auto-wrap-content {
|
||||
line-height: 1.2;
|
||||
background: transparent;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
width: 100%;
|
||||
}
|
||||
.lf-node-text-ellipsis-content {
|
||||
line-height: 1.2;
|
||||
background: transparent;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
/* overflow: hidden;
|
||||
text-overflow: ellipsis; */
|
||||
width: 100%;
|
||||
}
|
||||
.lf-node-text-ellipsis-content>div{
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
/* tool-overlay */
|
||||
.lf-tool-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 2;
|
||||
pointer-events: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
.lf-tool-overlay > * {
|
||||
pointer-events: all;
|
||||
}
|
||||
/* modification-overlay */
|
||||
|
||||
.modification-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
pointer-events: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
.modification-overlay > * {
|
||||
pointer-events: all;
|
||||
}
|
||||
.lf-outline,.lf-snapline {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.lf-keyboard-tips {
|
||||
float: right;
|
||||
}
|
||||
.lf-node-select-decorate {
|
||||
transform: translate(-50%, -50%);
|
||||
pointer-events: none;
|
||||
border: 1px dashed #343435;
|
||||
position: absolute;
|
||||
}
|
||||
.lf-multiple-select {
|
||||
position: absolute;
|
||||
border: 2px dashed rgba(24, 125, 255, 0.8);
|
||||
box-shadow: 0px 0px 3px 0px rgba(24, 125, 255, 0.5);
|
||||
cursor: move;
|
||||
}
|
||||
.lf-edge-adjust-point {
|
||||
cursor: move;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,9 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<template v-for="item in options">
|
||||
<el-tag :key="item[value_key]" v-if="item[value_key] === value" v-bind="$attrs">{{ item[label_key] }}</el-tag>
|
||||
</template>
|
||||
</div>
|
||||
<div>
|
||||
<template v-for="item in options">
|
||||
<el-tag :key="item[value_key]" v-if="item[value_key] === value" v-bind="$attrs"
|
||||
:type="item.type"
|
||||
>{{ item[label_key] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -12,73 +15,73 @@ const enumCache = {}
|
||||
const requestPromises = {}
|
||||
|
||||
module.exports = {
|
||||
name: "DictTag",
|
||||
props: {
|
||||
value: { type: String | Number },
|
||||
name: { type: String },
|
||||
value_key: {
|
||||
type: String,
|
||||
default: "code"
|
||||
},
|
||||
label_key: {
|
||||
type: String,
|
||||
default: "name"
|
||||
}
|
||||
name: "DictTag",
|
||||
props: {
|
||||
value: {type: String | Number},
|
||||
name: {type: String},
|
||||
value_key: {
|
||||
type: String,
|
||||
default: "code"
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
code:{
|
||||
handler(val) {
|
||||
this.getEnumOptions()
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getEnumOptions() {
|
||||
// // 检查数据缓存
|
||||
// if (enumCache[this.name]) {
|
||||
// this.options = enumCache[this.name]
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// // 检查是否已有相同请求在进行中
|
||||
// if (requestPromises[this.name]) {
|
||||
// requestPromises[this.name].then(data => {
|
||||
// this.options = data
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
|
||||
// 创建请求Promise并缓存
|
||||
requestPromises[this.name] = $.get("/open/common/dictEnumOptions", { name: this.name })
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
// 存入数据缓存
|
||||
enumCache[this.name] = res.data
|
||||
// 清除请求Promise缓存
|
||||
delete requestPromises[this.name]
|
||||
return res.data
|
||||
}
|
||||
})
|
||||
|
||||
requestPromises[this.name].then(data => {
|
||||
this.options = data
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
label_key: {
|
||||
type: String,
|
||||
default: "name"
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
code: {
|
||||
handler(val) {
|
||||
this.getEnumOptions()
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getEnumOptions() {
|
||||
// // 检查数据缓存
|
||||
// if (enumCache[this.name]) {
|
||||
// this.options = enumCache[this.name]
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// // 检查是否已有相同请求在进行中
|
||||
// if (requestPromises[this.name]) {
|
||||
// requestPromises[this.name].then(data => {
|
||||
// this.options = data
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
|
||||
// 创建请求Promise并缓存
|
||||
requestPromises[this.name] = $.get("/open/common/dictEnumOptions", {name: this.name})
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
// 存入数据缓存
|
||||
enumCache[this.name] = res.data
|
||||
// 清除请求Promise缓存
|
||||
delete requestPromises[this.name]
|
||||
return res.data
|
||||
}
|
||||
})
|
||||
|
||||
requestPromises[this.name].then(data => {
|
||||
this.options = data
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-tag + .el-tag {
|
||||
margin-left: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -727,6 +727,9 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
<div class="info-item">
|
||||
<span class="info-label">工会:</span>
|
||||
<span class="info-value">
|
||||
<!--#if(!isEmpty(@auth.getPrincipalProperty('union'))){#-->
|
||||
${@auth.getPrincipalProperty('union').getName()}
|
||||
<!--#}#-->
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,13 +8,15 @@
|
||||
<script src="/assets/platform/plugins/vue/vue.js"></script>
|
||||
<script src="/assets/platform/plugins/jquery/jquery.js"></script>
|
||||
<script src="/assets/platform/plugins/element-ui/lib/index.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.staticfile.net/element-ui/2.15.14/theme-chalk/index.css" />
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/index.css" />
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/index_custom.css" />
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/override.css" />
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/root.css" />
|
||||
<!-- 引入 core 包和对应 css-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/@logicflow/core@1.2.12/dist/logic-flow.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@logicflow/core@1.2.12/dist/style/index.css" />
|
||||
<script src="/assets/platform/plugins/logicflow/logic-flow.js"></script>
|
||||
<link rel="stylesheet" href="/assets/platform/plugins/logicflow/index.css" />
|
||||
<!-- <script src="https://cdn.jsdelivr.net/npm/@logicflow/core@1.2.12/dist/logic-flow.js"></script>-->
|
||||
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@logicflow/core@1.2.12/dist/style/index.css" />-->
|
||||
<script src="/assets/platform/plugins/snaker/SnakerflowDesigner.umd.js"></script>
|
||||
<style>
|
||||
#app {
|
||||
|
||||
@@ -252,13 +252,15 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
|
||||
<!-- 搜索筛选区域 -->
|
||||
<el-card shadow="never" class="filter-section">
|
||||
<el-form :inline="true" :model="searchForm" class="search-form">
|
||||
<el-form :inline="true" :model="pageForm" class="search-form">
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.keyword" placeholder="请输入关键词搜索" prefix-icon="el-icon-search" clearable></el-input>
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="请输入关键词搜索" prefix-icon="el-icon-search"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.category" placeholder="所有流程分类" clearable>
|
||||
<el-option v-for="type in categoryOptions" :key="type.id" :label="type.name" :value="type.id"></el-option>
|
||||
<el-select v-model="pageForm.category" placeholder="所有流程分类" clearable>
|
||||
<el-option v-for="type in categoryOptions" :key="type.id" :label="type.name"
|
||||
:value="type.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -279,15 +281,18 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
</div>
|
||||
|
||||
<!-- 表格展示 -->
|
||||
<el-table v-loading="loading" :data="tasks" style="width: 100%" :key="activeTab" :header-cell-style="{backgroundColor: '#f5f7fa'}">
|
||||
<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="taskName" label="任务节点" min-width="150" 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>
|
||||
<template slot-scope="{row}">{{categoryOptions.find(item => item.id === row.category)?.name}}</template>
|
||||
<template slot-scope="{row}">{{categoryOptions.find(item => item.id === row.category)?.name}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="initiatorName" label="申请人" min-width="120">
|
||||
<template slot-scope="{row}">{{row.variable.initiatorName}}</template>
|
||||
@@ -324,11 +329,11 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
<!-- 分页 -->
|
||||
<div class="pagination-container" v-if="tasks.length > 0">
|
||||
<el-pagination
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="currentPage"
|
||||
:page-size="pageSize"
|
||||
layout="prev, pager, next, jumper"
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -345,12 +350,16 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
doneCount: 0,
|
||||
startedCount: 0,
|
||||
|
||||
// 搜索表单
|
||||
searchForm: {
|
||||
// 查询表单
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
todoCount: 0,
|
||||
keyword: "",
|
||||
category: ""
|
||||
},
|
||||
|
||||
|
||||
// 流程类型选项
|
||||
categoryOptions: [],
|
||||
|
||||
@@ -358,11 +367,6 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
tasks: [],
|
||||
loading: false,
|
||||
|
||||
// 分页
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
|
||||
// 标签页
|
||||
activeTab: "todo",
|
||||
|
||||
@@ -371,13 +375,13 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
dialogVisible: false,
|
||||
|
||||
processStatusMap: {
|
||||
10: { text: "进行中", class: "doing" },
|
||||
20: { text: "已完成", class: "finished" },
|
||||
30: { text: "已撤回", class: "withdraw" },
|
||||
40: { text: "强行终止", class: "interrupt" },
|
||||
45: { text: "已拒绝", class: "reject" },
|
||||
50: { text: "挂起", class: "pending" },
|
||||
99: { text: "已废弃", class: "abandon" }
|
||||
10: {text: "进行中", class: "doing"},
|
||||
20: {text: "已完成", class: "finished"},
|
||||
30: {text: "已撤回", class: "withdraw"},
|
||||
40: {text: "强行终止", class: "interrupt"},
|
||||
45: {text: "已拒绝", class: "reject"},
|
||||
50: {text: "挂起", class: "pending"},
|
||||
99: {text: "已废弃", class: "abandon"}
|
||||
},
|
||||
|
||||
// 任务状态枚举
|
||||
@@ -392,20 +396,8 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
totalPages() {
|
||||
return Math.ceil(this.total / this.pageSize)
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.initData()
|
||||
// 监听
|
||||
window.GlobalBroadcastChannel.addEventListener("message", (event) => {
|
||||
if (event.data.type === "task-complete") {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -419,7 +411,7 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
try {
|
||||
const res = await $.post("/flow/todoCenter/statistics")
|
||||
if (res.code === 0) {
|
||||
const { todoCount, doneCount, startedCount } = res.data
|
||||
const {todoCount, doneCount, startedCount} = res.data
|
||||
this.todoCount = todoCount
|
||||
this.doneCount = doneCount
|
||||
this.startedCount = startedCount
|
||||
@@ -443,18 +435,10 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
async getTasks() {
|
||||
this.loading = true
|
||||
try {
|
||||
const params = {
|
||||
page: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
type: this.activeTab,
|
||||
keyword: this.searchForm.keyword,
|
||||
category: this.searchForm.category
|
||||
}
|
||||
|
||||
const res = await $.post("/flow/todoCenter/" + this.activeTab, params)
|
||||
const res = await $.post("/flow/todoCenter/" + this.activeTab, this.pageForm)
|
||||
if (res.code === 0) {
|
||||
this.tasks = res.data.list
|
||||
this.total = res.data.totalCount
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
this.dialogVisible = false
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -468,46 +452,39 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
// 处理标签页点击
|
||||
handleTabClick(tab) {
|
||||
this.activeTab = tab.name
|
||||
this.currentPage = 1
|
||||
this.pageForm.pageNumber = 1
|
||||
this.getTasks()
|
||||
},
|
||||
|
||||
// 搜索
|
||||
search() {
|
||||
this.currentPage = 1
|
||||
this.pageForm.pageNumber = 1
|
||||
this.getTasks()
|
||||
this.getStatistics()
|
||||
},
|
||||
|
||||
// 重置搜索
|
||||
reset() {
|
||||
this.searchForm = {
|
||||
keyword: "",
|
||||
category: ""
|
||||
}
|
||||
this.pageForm.searchKeyword = ""
|
||||
this.pageForm.category = ""
|
||||
this.search()
|
||||
},
|
||||
|
||||
// 处理页码变化
|
||||
handleCurrentChange(val) {
|
||||
this.currentPage = val
|
||||
this.pageForm.pageNumber = val
|
||||
this.getTasks()
|
||||
},
|
||||
|
||||
// 查看任务详情
|
||||
viewTaskDetail(task) {
|
||||
// this.currentTask = task
|
||||
// this.dialogVisible = true
|
||||
},
|
||||
|
||||
// 处理任务
|
||||
async openView(task) {
|
||||
const { taskId, taskState, instanceId, businessNo } = task
|
||||
if (taskState === this.taskStateEnum.DOING) {
|
||||
window.open("/flow/common/approval/form?instanceId=" + instanceId + "&taskId=" + taskId + "&businessId=" + businessNo)
|
||||
} else {
|
||||
window.open("/flow/common/approval/form?instanceId=" + instanceId + "&businessId=" + businessNo)
|
||||
}
|
||||
const {taskId, taskState, instanceId, businessNo} = task
|
||||
// if (taskState === this.taskStateEnum.DOING) {
|
||||
// window.open("/flow/common/approval/form?instanceId=" + instanceId + "&taskId=" + taskId + "&businessId=" + businessNo)
|
||||
// } else {
|
||||
// window.open("/flow/common/approval/form?instanceId=" + instanceId + "&businessId=" + businessNo)
|
||||
// }
|
||||
this.$message.error("功能开发中...")
|
||||
},
|
||||
|
||||
// 获取空状态文本
|
||||
|
||||
@@ -6,35 +6,37 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never">
|
||||
<el-row type="flex" style="column-gap: 10px">
|
||||
<el-select placeholder="请选择日志类型" size="medium" v-model="pageForm.searchType">
|
||||
<el-option :key="item.value" :label="item.label" :value="item.value" v-for="item in options"></el-option>
|
||||
<el-option :key="item.value" :label="item.label" :value="item.value"
|
||||
v-for="item in options"></el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
:picker-options="pickerOptions"
|
||||
align="right"
|
||||
end-placeholder="结束日期"
|
||||
range-separator="至"
|
||||
size="medium"
|
||||
start-placeholder="开始日期"
|
||||
type="datetimerange"
|
||||
v-model="searchDate"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
:picker-options="pickerOptions"
|
||||
align="right"
|
||||
end-placeholder="结束日期"
|
||||
range-separator="至"
|
||||
size="medium"
|
||||
start-placeholder="开始日期"
|
||||
type="datetimerange"
|
||||
v-model="searchDate"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
></el-date-picker>
|
||||
<el-button @click="doSearch" icon="el-icon-search" size="medium" type="primary"></el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:default-sort="{prop: 'createdat', order: 'descending'}"
|
||||
@sort-change="pageOrder"
|
||||
header-align="center"
|
||||
style="width: 100%"
|
||||
:data="tableData"
|
||||
:default-sort="{prop: 'createdat', order: 'descending'}"
|
||||
@sort-change="pageOrder"
|
||||
header-align="center"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column align="center" header-align="center" label="操作人" prop="username" sortable>
|
||||
<template slot-scope="scope">{{scope.row.username+'/'+scope.row.loginname}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作时间" prop="createdat" sortable width="200">
|
||||
<el-table-column align="center" header-align="center" label="操作时间" prop="createdat" sortable
|
||||
width="200">
|
||||
<template slot-scope="scope">{{formatAt(scope.row.createdat)}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="日志类型" prop="type" width="120">
|
||||
@@ -45,14 +47,39 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="执行动作" prop="tag" width="200" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="执行动作" prop="tag" width="200"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="日志内容" prop="msg" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" label="执行类" prop="src"></el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" label="IP" prop="ip"></el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="openView(scope.row)" size="mini" type="primary">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="查看" :visible.sync="dialogVisible" width="70%">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="操作人">{{row.username}}</el-descriptions-item>
|
||||
<el-descriptions-item label="操作时间">{{formatAt(row.createdat)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="日志类型">
|
||||
<span v-if="row.type=='platform'">平台日志</span>
|
||||
<span v-if="row.type=='info'">登录日志</span>
|
||||
<span v-if="row.type=='api'">接口日志</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="执行动作" :span="2">{{row.tag}}</el-descriptions-item>
|
||||
<el-descriptions-item label="日志内容" :span="2">{{row.msg}}</el-descriptions-item>
|
||||
<el-descriptions-item label="执行类" :span="2">{{row.src}}</el-descriptions-item>
|
||||
<el-descriptions-item label="IP" :span="2">{{row.ip}}</el-descriptions-item>
|
||||
<el-descriptions-item label="参数" :span="2">{{row.param}}</el-descriptions-item>
|
||||
<el-descriptions-item label="结果" :span="2">{{row.result}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -126,7 +153,9 @@ layout("/layouts/platform.html"){
|
||||
searchDate: "",
|
||||
searchType: ""
|
||||
},
|
||||
searchDate: []
|
||||
searchDate: [],
|
||||
dialogVisible: false,
|
||||
row: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -178,6 +207,10 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
"json"
|
||||
)
|
||||
},
|
||||
openView(row) {
|
||||
this.row = {...row}
|
||||
this.dialogVisible = true
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
|
||||
@@ -1,19 +1,32 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.highlight {
|
||||
background-color: yellow;
|
||||
font-weight: bold;
|
||||
padding: 1px 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<el-row type="flex" style="column-gap: 10px">
|
||||
<el-select v-model="pageForm.system_name" style="width: 180px" filterable clearable placeholder="请选择所属模块">
|
||||
<el-select v-model="pageForm.system_name" style="width: 180px" filterable clearable
|
||||
placeholder="请选择所属模块">
|
||||
<el-option v-for="item in menuOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" style="width: 300px" @keyup.enter.native="doSearch">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" style="width: 300px"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 120px">
|
||||
<el-option label="角色名称" value="`name`"></el-option>
|
||||
<el-option label="角色标识" value="`code`"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword2" @keyup.enter.native="doSearch" style="width: 300px">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword2" @keyup.enter.native="doSearch"
|
||||
style="width: 300px">
|
||||
<el-select v-model="pageForm.searchName2" slot="prepend" placeholder="查询类型" style="width: 80px">
|
||||
<el-option label="姓名" value="username"></el-option>
|
||||
<el-option label="工号" value="loginname"></el-option>
|
||||
@@ -26,7 +39,8 @@ layout("/layouts/platform.html"){
|
||||
<i class="ti-plus"></i>
|
||||
新建角色
|
||||
</el-button>
|
||||
<el-button @click="$refs.sortRef.onOpen()" size="medium" type="primary" icon="el-icon-sort">排序</el-button>
|
||||
<el-button @click="$refs.sortRef.onOpen()" size="medium" type="primary" icon="el-icon-sort">排序
|
||||
</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
@@ -49,25 +63,27 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
@sort-change="pageOrder"
|
||||
header-align="center"
|
||||
:default-sort="{prop: 'serialNumber', order: 'ascending'}"
|
||||
style="width: 100%"
|
||||
:data="tableData"
|
||||
@sort-change="pageOrder"
|
||||
header-align="center"
|
||||
:default-sort="{prop: 'serialNumber', order: 'ascending'}"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column sortable type="index" :index="indexMethod" label="序号" width="100px" align="center"></el-table-column>
|
||||
<el-table-column sortable type="index" :index="indexMethod" label="序号" width="100px"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column sortable prop="name" label="角色名称" align="center"></el-table-column>
|
||||
<el-table-column sortable prop="sort" label="排序编号" align="center"></el-table-column>
|
||||
<el-table-column prop="code" sortable label="角色标识" align="center" :show-overflow-tooltip="true"></el-table-column>
|
||||
<!-- <el-table-column prop="menuName" label="所属模块" align="center" :show-overflow-tooltip="true" sortable>-->
|
||||
<!-- <template slot-scope="scope">
|
||||
<span v-if="scope.row.unit==null" style="font-weight: bold">
|
||||
系统角色
|
||||
</span>
|
||||
<span v-if="scope.row.unit!=null">
|
||||
{{scope.row.unit.name}}
|
||||
</span>
|
||||
</template>-->
|
||||
<el-table-column prop="code" sortable label="角色标识" align="center"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
<!-- <el-table-column prop="menuName" label="所属模块" align="center" :show-overflow-tooltip="true" sortable>-->
|
||||
<!-- <template slot-scope="scope">
|
||||
<span v-if="scope.row.unit==null" style="font-weight: bold">
|
||||
系统角色
|
||||
</span>
|
||||
<span v-if="scope.row.unit!=null">
|
||||
{{scope.row.unit.name}}
|
||||
</span>
|
||||
</template>-->
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="disabled" label="启用状态" align="center" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
@@ -83,18 +99,28 @@ layout("/layouts/platform.html"){
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'role',id:scope.row.id,name:scope.row.name}">查看系统权限</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'menu',id:scope.row.id,name:scope.row.name}">分配PC系统权限</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'h5_menu',id:scope.row.id,name:scope.row.name}">分配H5系统权限</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'user',id:scope.row.id,name:scope.row.name}">关联用户</el-dropdown-item>
|
||||
<el-dropdown-item divided :command="{type:'enable',id:scope.row.id,name:scope.row.name,row:scope.row}">
|
||||
<el-dropdown-item :command="{type:'role',id:scope.row.id,name:scope.row.name}">
|
||||
查看系统权限
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'menu',id:scope.row.id,name:scope.row.name}">
|
||||
分配PC系统权限
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'h5_menu',id:scope.row.id,name:scope.row.name}">
|
||||
分配H5系统权限
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'user',id:scope.row.id,name:scope.row.name}">关联用户
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided
|
||||
:command="{type:'enable',id:scope.row.id,name:scope.row.name,row:scope.row}">
|
||||
启用
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'disable',id:scope.row.id,name:scope.row.name,row:scope.row}">禁用</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{type:'disable',id:scope.row.id,name:scope.row.name,row:scope.row}">禁用
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided :command="{type:'edit',id:scope.row.id}">修改</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{type:'delete',id:scope.row.id,name:scope.row.name}"
|
||||
v-if="scope.row.code!='superadmin'&&scope.row.code!='public'"
|
||||
:command="{type:'delete',id:scope.row.id,name:scope.row.name}"
|
||||
v-if="scope.row.code!='superadmin'&&scope.row.code!='public'"
|
||||
>
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
@@ -106,7 +132,8 @@ layout("/layouts/platform.html"){
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<el-dialog append-to-body title="新建角色" :visible.sync="addDialogVisible" :close-on-click-modal="false" width="70%">
|
||||
<el-dialog append-to-body title="新建角色" :visible.sync="addDialogVisible" :close-on-click-modal="false"
|
||||
width="70%">
|
||||
<el-form :model="formData" ref="addForm" :rules="formRules" size="small" label-width="80px">
|
||||
<!-- <el-form-item class="is-required" prop="system_name" label="所属系统" label-width="80px">-->
|
||||
<!-- <el-select v-model="formData.system_name" style="width: 100%" filterable clearable placeholder="请选择">-->
|
||||
@@ -114,10 +141,12 @@ layout("/layouts/platform.html"){
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item prop="name" label="角色名称">
|
||||
<el-input maxlength="50" placeholder="角色名称" v-model="formData.name" auto-complete="off" tabindex="2" type="text"></el-input>
|
||||
<el-input maxlength="50" placeholder="角色名称" v-model="formData.name" auto-complete="off" tabindex="2"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code" label="角色标识">
|
||||
<el-input maxlength="150" placeholder="角色标识" v-model="formData.code" auto-complete="off" tabindex="3" type="text"></el-input>
|
||||
<el-input maxlength="150" placeholder="角色标识" v-model="formData.code" auto-complete="off"
|
||||
tabindex="3" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="sort" label="排序编号">
|
||||
<el-input-number placeholder="排序编号" v-model="formData.sort"></el-input-number>
|
||||
@@ -146,13 +175,16 @@ layout("/layouts/platform.html"){
|
||||
<el-button type="primary" @click="doAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog append-to-body title="修改角色" :visible.sync="editDialogVisible" :close-on-click-modal="false" width="40%">
|
||||
<el-dialog append-to-body title="修改角色" :visible.sync="editDialogVisible" :close-on-click-modal="false"
|
||||
width="40%">
|
||||
<el-form :model="formData" ref="editForm" :rules="formRules" size="small" label-width="80px">
|
||||
<el-form-item prop="name" label="角色名称">
|
||||
<el-input maxlength="50" placeholder="角色名称" v-model="formData.name" auto-complete="off" tabindex="2" type="text"></el-input>
|
||||
<el-input maxlength="50" placeholder="角色名称" v-model="formData.name" auto-complete="off" tabindex="2"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code" label="角色标识">
|
||||
<el-input maxlength="150" placeholder="角色标识" v-model="formData.code" auto-complete="off" tabindex="3" type="text"></el-input>
|
||||
<el-input maxlength="150" placeholder="角色标识" v-model="formData.code" auto-complete="off"
|
||||
tabindex="3" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="code" label="所属系统">-->
|
||||
<!-- <el-select v-model="formData.system_name" style="width: 100%" filterable clearable placeholder="请选择">-->
|
||||
@@ -172,53 +204,74 @@ layout("/layouts/platform.html"){
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog :title="roleDialogTitle" :visible.sync="roleDialogVisible" width="70%">
|
||||
<el-table :data="roleTableData" style="width: 100%" size="small" :highlight-current-row="true" row-key="id" lazy :load="loadRoleChild">
|
||||
<el-table :data="roleTableData" style="width: 100%" size="small" :highlight-current-row="true" row-key="id" lazy
|
||||
:load="loadRoleChild">
|
||||
<el-table-column
|
||||
label="菜单名称"
|
||||
header-align="center"
|
||||
prop="name"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
align="left"
|
||||
label="菜单名称"
|
||||
header-align="center"
|
||||
prop="name"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
align="left"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column label="URL" header-align="center" prop="href" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="URL" header-align="center" prop="href"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
|
||||
<el-table-column label="资源类型" header-align="center" prop="type" :show-overflow-tooltip="true" align="center">
|
||||
<el-table-column label="资源类型" header-align="center" prop="type" :show-overflow-tooltip="true"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<i v-if="scope.row.type=='menu'" style="font-weight: bold">菜单</i>
|
||||
<i v-if="scope.row.type=='data'">数据</i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="权限标识" header-align="center" prop="permission" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="权限标识" header-align="center" prop="permission"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="roleDialogVisible = false">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog append-to-body :title="menuDialogTitle" :visible.sync="menuDialogVisible" :close-on-click-modal="false" width="70%">
|
||||
<el-dialog append-to-body :title="menuDialogTitle" :visible.sync="menuDialogVisible" :close-on-click-modal="false"
|
||||
width="70%">
|
||||
<!-- 搜索框 -->
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<el-input
|
||||
v-model="searchText"
|
||||
placeholder="搜索"
|
||||
size="small"
|
||||
clearable
|
||||
style="width: 300px"
|
||||
>
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
</el-input>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 3px">
|
||||
<el-button size="small" @click="menuRoleSelAll">全选</el-button>
|
||||
<el-button size="small" @click="menuRoleSelClear">清空</el-button>
|
||||
</el-row>
|
||||
|
||||
<!-- :data="doMenuData"-->
|
||||
|
||||
<el-tree
|
||||
ref="doMenuTree"
|
||||
:data="doMenuData"
|
||||
:default-checked-keys="doMenuCheckedData"
|
||||
check-strictly
|
||||
show-checkbox
|
||||
node-key="id"
|
||||
check-strictly
|
||||
:props="defaultProps"
|
||||
ref="doMenuTree"
|
||||
:data="filteredMenuData"
|
||||
:default-checked-keys="doMenuCheckedData"
|
||||
check-strictly
|
||||
show-checkbox
|
||||
node-key="id"
|
||||
check-strictly
|
||||
:props="defaultProps"
|
||||
:filter-node-method="filterNode"
|
||||
>
|
||||
<span class="custom-tree-node" slot-scope="scope">
|
||||
<span>{{ scope.node.label }}</span>
|
||||
<span>
|
||||
<span v-if="scope.data.type=='menu'" style="font-weight: bold">菜单权限</span>
|
||||
<span v-if="scope.data.type=='data'">数据权限</span>
|
||||
</span>
|
||||
<span class="custom-tree-node" slot-scope="{ node, data }">
|
||||
<span v-html="getDisplayText(node, data)"></span>
|
||||
<span>
|
||||
<span v-if="data.type=='menu'" style="font-weight: bold; color: #409EFF;">菜单权限</span>
|
||||
<span v-if="data.type=='data'" style="color: #67C23A;">数据权限</span>
|
||||
</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -226,23 +279,25 @@ layout("/layouts/platform.html"){
|
||||
<el-button type="primary" @click="doMenu">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog append-to-body :title="userDialogTitle" :visible.sync="userDialogVisible" :close-on-click-modal="false" width="70%">
|
||||
<el-dialog append-to-body :title="userDialogTitle" :visible.sync="userDialogVisible" :close-on-click-modal="false"
|
||||
width="70%">
|
||||
<div class="block mb10">
|
||||
<el-select
|
||||
size="small"
|
||||
style="width: 60%"
|
||||
class="span_n"
|
||||
v-model="selUsers"
|
||||
multiple
|
||||
filterable
|
||||
remote
|
||||
default-first-option
|
||||
reserve-keyword
|
||||
:remote-method="remoteMethod"
|
||||
:loading="loading"
|
||||
placeholder="请输入用户名或姓名"
|
||||
size="small"
|
||||
style="width: 60%"
|
||||
class="span_n"
|
||||
v-model="selUsers"
|
||||
multiple
|
||||
filterable
|
||||
remote
|
||||
default-first-option
|
||||
reserve-keyword
|
||||
:remote-method="remoteMethod"
|
||||
:loading="loading"
|
||||
placeholder="请输入用户名或姓名"
|
||||
>
|
||||
<el-option v-for="item in dbUsers" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
<el-option v-for="item in dbUsers" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
<el-button size="small" @click="userAddRole">将用户加入角色</el-button>
|
||||
<div class="pull-right offscreen-right">
|
||||
@@ -250,24 +305,28 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="userTableData"
|
||||
@sort-change="userPageOrder"
|
||||
size="small"
|
||||
header-align="center"
|
||||
style="width: 100%"
|
||||
@selection-change="userSelectionChange"
|
||||
:data="userTableData"
|
||||
@sort-change="userPageOrder"
|
||||
size="small"
|
||||
header-align="center"
|
||||
style="width: 100%"
|
||||
@selection-change="userSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="35"></el-table-column>
|
||||
<el-table-column sortable prop="loginname" label="用户名" header-align="center"></el-table-column>
|
||||
<el-table-column prop="username" label="姓名" header-align="center" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column prop="unitname" label="所属单位" header-align="center" align="center" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column sortable prop="disabled" label="帐号状态" header-align="center" align="center" :show-overflow-tooltip="true">
|
||||
<el-table-column prop="username" label="姓名" header-align="center"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column prop="unitname" label="所属单位" header-align="center" align="center"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column sortable prop="disabled" label="帐号状态" header-align="center" align="center"
|
||||
:show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<i v-if="scope.row.disabled" class="fa fa-circle text-danger ml5"></i>
|
||||
<i v-if="!scope.row.disabled" class="fa fa-circle text-success ml5"></i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="useronline" label="在线状态" header-align="center" align="center" :show-overflow-tooltip="true">
|
||||
<el-table-column sortable prop="useronline" label="在线状态" header-align="center" align="center"
|
||||
:show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<i v-if="scope.row.useronline" class="text-success ml5">在线</i>
|
||||
<i v-if="!scope.row.useronline" class="text-danger ml5">离线</i>
|
||||
@@ -275,13 +334,13 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
@size-change="userPageSizeChange"
|
||||
@current-change="userPageNumberChange"
|
||||
:current-page="userForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="userForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="userForm.totalCount"
|
||||
@size-change="userPageSizeChange"
|
||||
@current-change="userPageNumberChange"
|
||||
:current-page="userForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="userForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="userForm.totalCount"
|
||||
></el-pagination>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="userDialogVisible = false">关 闭</el-button>
|
||||
@@ -298,8 +357,8 @@ layout("/layouts/platform.html"){
|
||||
el: "#app",
|
||||
dicts: ["SYS_MENU_PLATFORM"],
|
||||
mixins: [initTableMixins],
|
||||
components:{
|
||||
sort:sort_component
|
||||
components: {
|
||||
sort: sort_component
|
||||
},
|
||||
data() {
|
||||
const self = this
|
||||
@@ -359,18 +418,18 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
formRules: {
|
||||
// parentUnit: [{ validator: validateUnit, trigger: ["blur", "change"] }],
|
||||
name: [{ required: true, message: "角色名称", trigger: ["blur", "change"] }],
|
||||
name: [{required: true, message: "角色名称", trigger: ["blur", "change"]}],
|
||||
code: [
|
||||
{ required: true, message: "角色标识", trigger: ["blur", "change"] },
|
||||
{ validator: validateName, trigger: ["blur", "change"] }
|
||||
{required: true, message: "角色标识", trigger: ["blur", "change"]},
|
||||
{validator: validateName, trigger: ["blur", "change"]}
|
||||
]
|
||||
},
|
||||
editRules: {
|
||||
// parentUnit: [{ validator: validateUnit, trigger: ["blur", "change"] }],
|
||||
name: [{ required: true, message: "角色名称", trigger: ["blur", "change"] }],
|
||||
name: [{required: true, message: "角色名称", trigger: ["blur", "change"]}],
|
||||
code: [
|
||||
{ required: true, message: "角色标识", trigger: ["blur", "change"] },
|
||||
{ validator: validateName, trigger: ["blur", "change"] }
|
||||
{required: true, message: "角色标识", trigger: ["blur", "change"]},
|
||||
{validator: validateName, trigger: ["blur", "change"]}
|
||||
]
|
||||
},
|
||||
roleDialogTitle: "查看角色权限",
|
||||
@@ -406,17 +465,63 @@ layout("/layouts/platform.html"){
|
||||
checkStrictly: true,
|
||||
multiple: false,
|
||||
lazyLoad: (node, resolve) => {
|
||||
this.$axios.post("/platform/sys/unit/tree", { pid: node.value }).then((res) => {
|
||||
this.$axios.post("/platform/sys/unit/tree", {pid: node.value}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
resolve(res.data)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
platform: ""
|
||||
platform: "",
|
||||
|
||||
// 分配权限搜索
|
||||
searchText: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 根据第一级菜单名称过滤数据
|
||||
filteredMenuData() {
|
||||
if (!this.searchText.trim()) {
|
||||
return this.doMenuData;
|
||||
}
|
||||
|
||||
const searchText = this.searchText.toLowerCase();
|
||||
return this.doMenuData.filter(item => {
|
||||
return item.label.toLowerCase().includes(searchText);
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 搜索处理
|
||||
handleSearch(value) {
|
||||
this.$refs.doMenuTree.filter(value);
|
||||
},
|
||||
|
||||
// 过滤节点方法
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.label.toLowerCase().indexOf(value.toLowerCase()) !== -1;
|
||||
},
|
||||
|
||||
// 获取显示文本(只对第一级菜单高亮)
|
||||
getDisplayText(node, data) {
|
||||
const text = node.label;
|
||||
// 判断是否为第一级菜单(没有父节点或父节点是根节点)
|
||||
if (node.level === 1 && this.searchText) {
|
||||
return this.highlightText(text);
|
||||
}
|
||||
return text;
|
||||
},
|
||||
|
||||
// 高亮搜索文本
|
||||
highlightText(text) {
|
||||
if (!this.searchText || !text) {
|
||||
return text;
|
||||
}
|
||||
const searchRegex = new RegExp('(' + this.searchText + ')', 'gi');
|
||||
return text.replace(searchRegex, '<span class="highlight">$1</span>');
|
||||
},
|
||||
|
||||
exportRoles() {
|
||||
this.$downLoad.post(loc() + "/exportRoles?" + this.pageForm)
|
||||
},
|
||||
@@ -442,12 +547,13 @@ layout("/layouts/platform.html"){
|
||||
type: "warning"
|
||||
})
|
||||
.then(async () => {
|
||||
const { code, msg } = await this.$axios.post("/platform/sys/role/doSettingMemberRole")
|
||||
const {code, msg} = await this.$axios.post("/platform/sys/role/doSettingMemberRole")
|
||||
if (code === 0) {
|
||||
this.$message.success(msg)
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => {
|
||||
})
|
||||
},
|
||||
formatAt(val) {
|
||||
if (val > 0) return moment(val).format("YYYY-MM-DD HH:mm")
|
||||
@@ -558,6 +664,11 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
doMenu() {
|
||||
if (this.searchText) {
|
||||
this.$message.warning('请清空搜索条件后再提交')
|
||||
return;
|
||||
}
|
||||
|
||||
const ids = this.$refs["doMenuTree"].getCheckedKeys()
|
||||
if (!ids || ids.length === 0) {
|
||||
this.$message.warning("请选择菜单或数据权限")
|
||||
@@ -583,14 +694,14 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
initRoleTreeTable() {
|
||||
this.$axios.post("/platform/sys/role/menu/" + this.roleId, { pid: "" }).then((res) => {
|
||||
this.$axios.post("/platform/sys/role/menu/" + this.roleId, {pid: ""}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.roleTableData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
loadRoleChild(tree, treeNode, resolve) {
|
||||
this.$axios.post("/platform/sys/role/menu/" + this.roleId, { pid: tree.id }).then((res) => {
|
||||
this.$axios.post("/platform/sys/role/menu/" + this.roleId, {pid: tree.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
resolve(res.data)
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="单位">
|
||||
<el-cascader :props="props" v-model="parentUnitSearch" placeholder="请选择单位" clearable></el-cascader>
|
||||
<el-cascader :props="props" v-model="parentUnitSearch" placeholder="请选择单位" clearable filterable></el-cascader>
|
||||
</search-item>
|
||||
<search-item>
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" @keyup.enter.native="doSearch">
|
||||
@@ -82,7 +82,7 @@ layout("/layouts/platform.html"){
|
||||
<el-dialog title="新建用户" :visible.sync="addDialogVisible" :close-on-click-modal="false" width="40%">
|
||||
<el-form :model="formData" ref="addForm" :rules="formRules" size="small" label-width="80px">
|
||||
<el-form-item class="is-required" prop="parentUnit" label="所属单位" label-width="80px">
|
||||
<el-cascader :props="props" v-model="parentUnit" placeholder="请选择单位" style="width: 100%"></el-cascader>
|
||||
<el-cascader :props="props" v-model="parentUnit" placeholder="请选择单位" filterable style="width: 100%"></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item prop="loginname" label="工号">
|
||||
<el-input maxlength="100" placeholder="工号" v-model="formData.loginname" auto-complete="off" tabindex="2" type="text"></el-input>
|
||||
|
||||
-204
@@ -1,204 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="会议名称">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入会议名称"
|
||||
v-model="pageForm.searchKeyword">
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会:">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable style="width: 100%">
|
||||
<el-option v-for="item in unionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
</search>
|
||||
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool label="会议列表">
|
||||
<el-radio-group v-model="pageForm.audit" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:size="tableSize"
|
||||
@sort-change="pageOrder"
|
||||
class="vi-table"
|
||||
row-key="processTaskId"
|
||||
style="width: 100%; margin-bottom: 20px"
|
||||
>
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:key="column.prop"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前节点" prop="processInstanceNodeName"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" prop="userOnline"
|
||||
width="200">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">
|
||||
查看
|
||||
</el-button>
|
||||
<template v-if="$auth.hasRole('SCHOOL_UNION_WC_AUDIT_ADMIN')">
|
||||
<el-button v-if="row.processInstanceTaskStatus==='ACTIVE'"
|
||||
@click="openApproval(row)"
|
||||
size="mini"
|
||||
type="primary">
|
||||
审核</el-button>
|
||||
<el-button
|
||||
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
|
||||
@click="openRevoke(row.processInstanceTaskId)"
|
||||
size="mini"
|
||||
type="danger">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #public>
|
||||
<info ref="info"></info>
|
||||
<div v-if="showApprovalForm">
|
||||
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
|
||||
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:false,message:'必填',trigger:['change','blur']}]">
|
||||
<pc-signature v-model="formData.approvalSignature"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button plain @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button type="danger" @click="doApproval('BACK')">退回重新填写</el-button>
|
||||
<el-button type="danger" @click="doApproval('REJECT')">拒绝</el-button>
|
||||
<el-button type="primary" @click="doApproval('PASS')">同意</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
dicts: ["PROCESS_INSTANCE_STATE"],
|
||||
data() {
|
||||
return {
|
||||
unionList: [],
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY")
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "meetingName", label: "会议名称" },
|
||||
{ prop: "meetingTime", label: "会议时间" },
|
||||
{ prop: "fullName", label: "届次" },
|
||||
{ prop: "createUserName", label: "申请人" },
|
||||
{ prop: "meetingType", label: "会议类型" },
|
||||
{ prop: "createTime", label: "申请时间" }
|
||||
],
|
||||
showApprovalForm: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info": INFO,
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.public(() => {
|
||||
this.$refs.info.onOpen(row.id)
|
||||
this.showApprovalForm = false
|
||||
})
|
||||
},
|
||||
openApproval(row) {
|
||||
this.$refs.guava.public(() => {
|
||||
this.$refs.info.onOpen(row.id)
|
||||
this.formData = row.approvalParam
|
||||
this.showApprovalForm = true
|
||||
})
|
||||
},
|
||||
doApproval(approvalType) {
|
||||
this.formData.bpmTaskApprovalType = approvalType
|
||||
this.$refs.approvalFormRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$axios
|
||||
.post(loc() + "/approval", {
|
||||
approval: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openRevoke(taskId) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post(loc() + "/revoke", { taskId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,80 +0,0 @@
|
||||
const INFO = {
|
||||
template: `
|
||||
<div>
|
||||
<div>
|
||||
<el-descriptions :column="2" border class="margin-top" style="margin: 10px" title="">
|
||||
<el-descriptions-item label="会议名称" span="2">
|
||||
<span class="item-center"> {{ viewData.meetingName }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="类型">
|
||||
{{viewData.fullName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人">
|
||||
{{viewData.createUserName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">
|
||||
{{viewData.createTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请单位">
|
||||
{{viewData.unitName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请工会">
|
||||
{{viewData.unitName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
<el-descriptions-item label="会议议程" span="2">
|
||||
<div v-html="viewData.meetingTopic"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注" span="2">
|
||||
{{viewData.meetingRemark}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="请示附件" span="2">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div>
|
||||
<div v-for="nodeTask in viewData.nodeTasks" :key="nodeTask.id">
|
||||
<div class="process-title">
|
||||
{{nodeTask.nodeName}}
|
||||
</div>
|
||||
<div v-if="nodeTask.nodeCode === 20">
|
||||
<el-descriptions :column="3" border v-for="task in nodeTask.tasks" :key="task.id">
|
||||
<el-descriptions-item label="审核人">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ task.endOn }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核结果">
|
||||
<div v-if="task.extVariable">
|
||||
<el-tag type="success" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'PASS'">同意</el-tag>
|
||||
<el-tag type="danger" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'BACK'">退回重新填写</el-tag>
|
||||
<el-tag type="danger" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'REJECT'">建议撤销</el-tag>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见" :span="3">{{ task.extVariable.approvalOpinion}}</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" :span="3">
|
||||
<el-image :src="task.extVariable.approvalSignature"
|
||||
v-if="task.extVariable && task.extVariable.approvalSignature"
|
||||
class="signature-image"></el-image>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(id) {
|
||||
this.$axios.post("/platform/grassrootsCongress/meeting/findOne", { id: id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
// resp.data.files = JSON.parse(resp.data.files)
|
||||
this.viewData = resp.data
|
||||
console.log(resp.data)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
+174
@@ -0,0 +1,174 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="所属工会:">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in unionList" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool label="会议列表">
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" @sort-change="pageOrder">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column label="届次" prop="fullName"></el-table-column>
|
||||
<el-table-column label="资料名称" prop="materialsName"></el-table-column>
|
||||
<el-table-column label="资料类型" prop="materialsType"></el-table-column>
|
||||
<el-table-column label="申请人" prop="userName"></el-table-column>
|
||||
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="当前节点" prop="curTaskName"></el-table-column>
|
||||
<el-table-column label="流程状态" prop="instanceState">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" prop="userOnline" width="300">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<grassroots-congress-material-info ref="grassrootsCongressMaterialInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到提案人</el-button>
|
||||
<el-button @click="handleTaskAction(20)" size="small" type="danger">不同意</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</grassroots-congress-material-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("../info.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"grassroots-congress-material-info": GRASSROOTS_CONGRESS_MATERIAL_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
unionList: [],
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY"),
|
||||
approval: false
|
||||
},
|
||||
showApprovalForm: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.grassrootsCongressMaterialInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.grassrootsCongressMaterialInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,99 @@
|
||||
const GRASSROOTS_CONGRESS_MATERIAL_INFO = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">
|
||||
申请信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<el-descriptions :column="2" border class="margin-top" style="margin: 10px">
|
||||
<el-descriptions-item label="届次" span="2">{{ viewData.fullName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="资料名称">{{viewData.materialsName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="资料类型">{{viewData.materialsType}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人">{{viewData.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{viewData.createdTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请工会">{{viewData.unionName}}</el-descriptions-item>
|
||||
<el-descriptions-item label=""></el-descriptions-item>
|
||||
<el-descriptions-item label="请示附件" span="2">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<template v-for="task in doneTasks">
|
||||
<div class="mt10">
|
||||
<div class="process-title">{{ task.displayName }}</div>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||
}}({{task.ext.initiatorAccount}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<slot></slot>
|
||||
|
||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post('/platform/grassrootsCongress/material/common/info', {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查看流程图
|
||||
openChart() {
|
||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
|
||||
}
|
||||
}
|
||||
}
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker placeholder="选择年" style="width: 100%" type="year" v-model="pageForm.year" value-format="yyyy"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="会议名称">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入会议名称" v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool label="会议列表"></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column label="届次" prop="fullName"></el-table-column>
|
||||
<el-table-column label="资料名称" prop="materialsName"></el-table-column>
|
||||
<el-table-column label="资料类型" prop="materialsType"></el-table-column>
|
||||
<el-table-column label="申请人" prop="userName"></el-table-column>
|
||||
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" prop="userOnline" width="300">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #public>
|
||||
<grassroots-congress-material-info ref="grassrootsCongressMaterialInfoRef"></grassroots-congress-material-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("../info.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"grassroots-congress-material-info": GRASSROOTS_CONGRESS_MATERIAL_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY")
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.public(() => {
|
||||
this.$refs.grassrootsCongressMaterialInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
|
||||
onEdit(row) {
|
||||
window.location.href = '/platform/grassrootsCongress/material/write?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/grassrootsCongress/material/mine/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="所属工会:">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in unionList" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool label="资料列表">
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" @sort-change="pageOrder">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column label="届次" prop="fullName"></el-table-column>
|
||||
<el-table-column label="资料名称" prop="materialsName"></el-table-column>
|
||||
<el-table-column label="资料类型" prop="materialsType"></el-table-column>
|
||||
<el-table-column label="申请人" prop="userName"></el-table-column>
|
||||
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="当前节点" prop="curTaskName"></el-table-column>
|
||||
<el-table-column label="流程状态" prop="instanceState">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" prop="userOnline" width="300">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #public>
|
||||
<grassroots-congress-material-info ref="grassrootsCongressMaterialInfoRef"></grassroots-congress-material-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("../info.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"grassroots-congress-material-info": GRASSROOTS_CONGRESS_MATERIAL_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
unionList: [],
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY")
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.public(() => {
|
||||
this.$refs.grassrootsCongressMaterialInfoRef.onOpen(row)
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="基层双代会会议资料" define_key="JCSDHHYZL"></snaker-start>
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="formRef">
|
||||
<el-form-item label="所属教代会" prop="sessionId">
|
||||
<el-select placeholder="请选择" style="width: 100%" v-model="formData.sessionId"
|
||||
@change="sessionChange">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.fullName"
|
||||
:value="item.id"
|
||||
v-for="item in sessionOptions">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="资料名称" prop="materialsName">
|
||||
<el-input
|
||||
clearable
|
||||
maxlength="50"
|
||||
placeholder="请填写资料名称"
|
||||
v-model="formData.materialsName">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="资料类型" prop="materialsType">
|
||||
<dict-select code="GRASSROOTS_CONGRESS_MATERIAL_TYPE" v-model="formData.materialsType"></dict-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件上传" prop="files">
|
||||
<file-upload
|
||||
:upload_number="3"
|
||||
:value.sync="formData.files"
|
||||
accept=".doc,.docx,.xls,.xlsx,.pdf,.jpg,.png,.jpeg"
|
||||
complete_result
|
||||
upload_mode="file"
|
||||
upload_result_category="array"
|
||||
>
|
||||
</file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="submitAgain" v-else>提交1</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formRules: {
|
||||
sessionId: [{required: true, message: "请选择所属届次", trigger: "change"}],
|
||||
materialsName: [{required: true, message: "请填写资料名称", trigger: "blur"}],
|
||||
materialsType: [{required: true, message: "请选择资料类型", trigger: "change"}],
|
||||
files: [{required: true, message: "请上传附件", trigger: "change"}]
|
||||
},
|
||||
formData: {},
|
||||
sessionOptions: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 保存
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/grassrootsCongress/material/write/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("保存成功")
|
||||
window.location.href = '/platform/grassrootsCongress/material/mine'
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 提交
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/grassrootsCongress/material/write/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/grassrootsCongress/material/mine'
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 提交
|
||||
submitAgain() {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/grassrootsCongress/material/write/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/grassrootsCongress/material/mine'
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 届次列表
|
||||
listSession(unionId) {
|
||||
this.$axios.post("/platform/grassrootsCongress/material/write/listSession", {unionId}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.sessionOptions = resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 届次change
|
||||
sessionChange(id) {
|
||||
const session = this.sessionOptions.find((s) => s.id === id)
|
||||
this.$set(this.formData, "fullName", session.fullName)
|
||||
},
|
||||
|
||||
|
||||
// 初始化
|
||||
init() {
|
||||
if (this.bizId) {
|
||||
this.$axios.post("/platform/grassrootsCongress/material/write/info", {id: this.bizId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.listSession(res.data.unionId)
|
||||
this.formData = res.data
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.listSession(this.$store.state.user.union.id)
|
||||
this.$set(this.formData, "userId", this.$store.state.user.id)
|
||||
this.$set(this.formData, "userName", this.$store.state.user.username)
|
||||
this.$set(this.formData, "loginName", this.$store.state.user.loginname)
|
||||
this.$set(this.formData, "unionName", this.$store.state.user.union.name)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
-196
@@ -1,196 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="资料名称">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入资料名称"
|
||||
v-model="pageForm.searchKeyword">
|
||||
</el-input>
|
||||
</search-item>
|
||||
|
||||
</search>
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="资料列表">
|
||||
<el-radio-group v-model="pageForm.audit" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:size="tableSize"
|
||||
@sort-change="pageOrder"
|
||||
class="vi-table"
|
||||
row-key="processTaskId"
|
||||
style="width: 100%; margin-bottom: 20px"
|
||||
>
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:key="column.prop"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='createdAt'">
|
||||
{{$moment(row.createdAt).format("YYYY-MM-DD")}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前节点" prop="processInstanceNodeName"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" prop="userOnline"
|
||||
width="300">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button v-if="row.processInstanceTaskStatus==='ACTIVE'"
|
||||
@click="openApproval(row)"
|
||||
size="mini"
|
||||
type="primary">
|
||||
审核</el-button>
|
||||
<el-button
|
||||
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
|
||||
@click="openRevoke(row.processInstanceTaskId)"
|
||||
size="mini"
|
||||
type="danger">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #public>
|
||||
<info ref="info"></info>
|
||||
<div v-if="showApprovalForm">
|
||||
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
|
||||
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:false,message:'必填',trigger:['change','blur']}]">
|
||||
<pc-signature v-model="formData.approvalSignature"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button plain @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button type="danger" @click="doApproval('BACK')">退回重新填写</el-button>
|
||||
<el-button type="danger" @click="doApproval('REJECT')">拒绝</el-button>
|
||||
<el-button type="primary" @click="doApproval('PASS')">同意</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
dicts: ["PROCESS_INSTANCE_STATE"],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY")
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "materialsName", label: "资料名称" },
|
||||
{ prop: "fullName", label: "所属教代会" },
|
||||
{ prop: "materialsType", label: "资料类型" },
|
||||
{ prop: "userName", label: "上传人" },
|
||||
{ prop: "unionName", label: "工会" },
|
||||
{ prop: "createdAt", label: "上传时间" }
|
||||
],
|
||||
showApprovalForm: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info": INFO
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.public(() => {
|
||||
this.$refs.info.onOpen(row.id)
|
||||
this.showApprovalForm = false
|
||||
})
|
||||
},
|
||||
openApproval(row) {
|
||||
this.$refs.guava.public(() => {
|
||||
this.$refs.info.onOpen(row.id)
|
||||
this.formData = row.approvalParam
|
||||
this.showApprovalForm = true
|
||||
})
|
||||
},
|
||||
doApproval(approvalType) {
|
||||
this.formData.bpmTaskApprovalType = approvalType
|
||||
this.$refs.approvalFormRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$axios
|
||||
.post(loc() + "/approval", {
|
||||
approval: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openRevoke(taskId) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post(loc() + "/revoke", { taskId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
-68
@@ -1,68 +0,0 @@
|
||||
const GRASSROOTS_CONGRESS_MATERIALS_APPROVAL_RECORD_COMPONENT = {
|
||||
template: `
|
||||
<div class="process-task-record">
|
||||
<template v-if="approvalRecord.length > 0" v-for="item in approvalRecord">
|
||||
<div v-if="item.taskName === '3104afc7-f897-4664-b58a-e99ef7ae4c59'" class="mb25">
|
||||
<div class="process-title">
|
||||
{{item.displayName}}
|
||||
</div>
|
||||
<el-descriptions :column="3" border :key="item.displayName + item.taskParentId">
|
||||
<template v-for="task in item.processTaskVOList">
|
||||
<el-descriptions-item label="姓名">{{task.taskActor?.actorUserName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工号">{{task.taskActor?.actorId}}</el-descriptions-item>
|
||||
<el-descriptions-item label="填写时间">{{$moment(task.createdAt).format('YYYY-MM-DD HH:mm:ss')}}</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="process-title">
|
||||
{{item.displayName}}
|
||||
</div>
|
||||
<el-descriptions :column="3" border :key="item.displayName + item.taskParentId">
|
||||
<template v-for="task in item.processTaskVOList">
|
||||
<el-descriptions-item label="姓名">{{task.taskActor?.actorUserName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工号">{{task.taskActor?.actorId}}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{task.finishTime ? task.finishTime : '暂无'}}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核结果">
|
||||
{{Object.keys(task.ext.submitTypeText).length !== 0 ? task.ext.submitTypeText : '暂无'}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见" :span="3">{{task.ext.comment ? task.ext.comment : '暂无'}}</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<el-empty v-else description="暂无审核记录"></el-empty>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
id: {
|
||||
handler: function (val) {
|
||||
if (val) {
|
||||
this.findOne()
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
approvalRecord: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
findOne() {
|
||||
this.$axios.post("/platform/wf/processCommon/approvalRecord", { businessNo: this.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.approvalRecord = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
-81
@@ -1,81 +0,0 @@
|
||||
const INFO = {
|
||||
template: `
|
||||
<div>
|
||||
<div>
|
||||
<el-descriptions :column="2" border class="margin-top" style="margin: 10px" title="">
|
||||
<el-descriptions-item label="会议名称" span="2">
|
||||
<span class="item-center"> {{ viewData.materialsName }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="上传人">
|
||||
{{viewData.userName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="上传时间">
|
||||
{{viewData.createdDate}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属工会">
|
||||
{{viewData.unionName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="教代会届次">
|
||||
{{viewData.fullName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="资料类型">
|
||||
{{viewData.materialsType}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
<el-descriptions-item label="请示附件" span="2">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<div v-for="nodeTask in viewData.nodeTasks" :key="nodeTask.id">
|
||||
<div class="process-title">
|
||||
{{nodeTask.nodeName}}
|
||||
</div>
|
||||
<div v-if="nodeTask.nodeCode === 20">
|
||||
<el-descriptions :column="3" border v-for="task in nodeTask.tasks" :key="task.id">
|
||||
<el-descriptions-item label="审核人">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核时间">{{ task.endOn }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核结果">
|
||||
<div v-if="task.extVariable">
|
||||
<el-tag type="success" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'PASS'">同意</el-tag>
|
||||
<el-tag type="danger" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'BACK'">退回重新填写</el-tag>
|
||||
<el-tag type="danger" size="mini" v-if="task.extVariable.bpmTaskApprovalType === 'REJECT'">建议撤销</el-tag>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见" :span="3">{{ task.extVariable.approvalOpinion}}</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" :span="3">
|
||||
<el-image :src="task.extVariable.approvalSignature"
|
||||
v-if="task.extVariable && task.extVariable.approvalSignature"
|
||||
class="signature-image"></el-image>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div v-if="nodeTask.nodeCode === 50">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(id) {
|
||||
this.$axios.post("/platform/grassrootsCongress/materials/manage/findOne", { id: id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.files) {
|
||||
resp.data.files = JSON.parse(resp.data.files)
|
||||
}
|
||||
this.viewData = resp.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
const GRASSROOTS_CONGRESS_MATERIALS_VIEW_FORM = {
|
||||
template: `
|
||||
<el-descriptions :column="2" border class="margin-top" style="margin: 10px" title="">
|
||||
<el-descriptions-item label="会议名称" span="2">
|
||||
<span class="item-center"> {{ viewData.materialsName }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="上传人">
|
||||
{{viewData.userName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="上传时间">
|
||||
{{viewData.createdDate}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属工会">
|
||||
{{viewData.unionName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="教代会届次">
|
||||
{{viewData.fullName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="资料类型">
|
||||
{{viewData.materialsType}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
<el-descriptions-item label="请示附件" span="2">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initData(id) {
|
||||
this.$axios.post("/platform/grassrootsCongress/materials/manage/findOne", { id: id }).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.files){
|
||||
resp.data.files = JSON.parse(resp.data.files)
|
||||
}
|
||||
this.viewData = resp.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
-149
@@ -1,149 +0,0 @@
|
||||
const GRASSROOTS_CONGRESS_MATERIALS_ADD_FROM = {
|
||||
template: `
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
:visible.sync="formDialogVisible"
|
||||
width="50%">
|
||||
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="addForm">
|
||||
|
||||
<el-form-item label="上传人" prop="userName">
|
||||
<el-input readonly v-model="formData.userName">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属教代会" prop="sessionId">
|
||||
<el-select placeholder="请选择" style="width: 100%" v-model="formData.sessionId" @change="sessionChange">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.fullName"
|
||||
:value="item.id"
|
||||
v-for="item in sessionOptions">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="资料名称" prop="materialsName">
|
||||
<el-input
|
||||
clearable
|
||||
maxlength="50"
|
||||
placeholder="请填写会议名称"
|
||||
v-model="formData.materialsName">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="资料类型" prop="materialsType">
|
||||
<dict-select code="GRASSROOTS_CONGRESS_MATERIALS"
|
||||
v-model="formData.materialsType"></dict-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件上传" prop="files">
|
||||
<file-upload
|
||||
:upload_number="3"
|
||||
:value.sync="formData.files"
|
||||
accept=".doc,.docx,.xls,.xlsx,.pdf,.jpg,.png,.jpeg"
|
||||
complete_result
|
||||
upload_mode="file"
|
||||
upload_result_category="array"
|
||||
>
|
||||
<template #explain>
|
||||
图片类请上传jpg/png/jpeg等格式,文档类请上传doc/docx/xls/xlsx/pdf等格式,上传数量为3个
|
||||
</template>
|
||||
</file-upload>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="doSubmit('doSave')" type="primary">保 存</el-button>
|
||||
<el-button @click="doSubmit('doSubmit')" type="primary">提 交</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
`,
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
formRules: {
|
||||
sessionId: [{ required: true, message: "请填写所属教代会", trigger: ["blur", "change"] }],
|
||||
materialsName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写资料名称",
|
||||
trigger: ["blur", "change"]
|
||||
}
|
||||
],
|
||||
materialsType: [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写资料类型",
|
||||
trigger: ["blur", "change"]
|
||||
}
|
||||
],
|
||||
files: [{ required: true, message: "请填写资料类型", trigger: ["blur", "change"] }]
|
||||
},
|
||||
formDialogVisible: false,
|
||||
title: "",
|
||||
sessionOptions: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
sessionChange(id) {
|
||||
const sess = this.sessionOptions.find((s) => s.id === id)
|
||||
this.$set(this.formData, "fullName", sess.fullName)
|
||||
},
|
||||
addDialog() {
|
||||
this.title = "新增会议资料"
|
||||
this.formDialogVisible = true
|
||||
if (this.$refs["addForm"]) this.$refs["addForm"].resetFields()
|
||||
this.querySessionList()
|
||||
this.init()
|
||||
},
|
||||
openEdit(id) {
|
||||
this.title = "编辑会议资料"
|
||||
this.formDialogVisible = true
|
||||
this.findOne(id)
|
||||
},
|
||||
findOne(id) {
|
||||
this.$axios.post("/platform/grassrootsCongress/materials/manage/findOne", { id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.files) {
|
||||
resp.data.files = JSON.parse(resp.data.files)
|
||||
}
|
||||
this.formData = resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
async doSubmit(type) {
|
||||
if (type === "doSubmit") {
|
||||
let valid = await this.$refs["addForm"].validate()
|
||||
if (!valid) return
|
||||
}
|
||||
this.formLoading = true
|
||||
const data = { ...this.formData }
|
||||
data.files = JSON.stringify(data.files)
|
||||
const url =
|
||||
type === "doSave" ? "/platform/grassrootsCongress/materials/manage/doSave" : "/platform/grassrootsCongress/materials/manage/doSubmit"
|
||||
this.$axios.post(url, { data: JSON.stringify(data) }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.init()
|
||||
this.formDialogVisible = false
|
||||
this.$emit("do_search")
|
||||
}
|
||||
this.formLoading = false
|
||||
})
|
||||
},
|
||||
init() {
|
||||
this.$set(this.formData, "userId", this.$store.state.user.id)
|
||||
this.$set(this.formData, "userName", this.$store.state.user.username)
|
||||
this.$set(this.formData, "loginName", this.$store.state.user.loginName)
|
||||
this.$set(this.formData, "unionName", this.$store.state.user.union.name)
|
||||
},
|
||||
querySessionList(unionId) {
|
||||
this.$axios.post("/platform/grassrootsCongress/meeting/querySessionList", { unionId }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.sessionOptions = resp.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
-175
@@ -1,175 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="资料名称">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入资料名称"
|
||||
v-model="pageForm.searchKeyword">
|
||||
</el-input>
|
||||
</search-item>
|
||||
|
||||
</search>
|
||||
|
||||
</el-card>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="资料列表">
|
||||
<el-button @click="openAdd" icon="el-icon-s-promotion" size="mini" type="primary">
|
||||
上传资料
|
||||
</el-button>
|
||||
</table-tool>
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:size="tableSize"
|
||||
@sort-change="pageOrder"
|
||||
class="vi-table"
|
||||
row-key="processTaskId"
|
||||
style="width: 100%; margin-bottom: 20px"
|
||||
>
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:key="column.prop"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='createdAt'">
|
||||
{{$moment(row.createdAt).format("YYYY-MM-DD")}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前节点" prop="processInstanceNodeName"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" prop="userOnline"
|
||||
width="300">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
||||
<el-button v-if="[10,40].includes(row.processInstanceNodeCode)" size="mini" type="primary" @click="openEdit(row)">编辑</el-button>
|
||||
<el-button
|
||||
v-if="[20].includes(row.processInstanceNodeCode) && !row.nextTaskIsComplete"
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="openRevoke(row)"
|
||||
>
|
||||
撤销
|
||||
</el-button>
|
||||
<el-button v-if="[10].includes(row.processInstanceNodeCode)" size="mini" type="danger" @click="doDelete(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
|
||||
</el-card>
|
||||
|
||||
<template #public>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<add-form @do_search="doSearch" ref="addForm"></add-form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("addFrom.js"){}#-->
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
dicts: ["PROCESS_INSTANCE_STATE"],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY")
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "materialsName", label: "资料名称" },
|
||||
{ prop: "fullName", label: "所属教代会" },
|
||||
{ prop: "materialsType", label: "资料类型" },
|
||||
{ prop: "userName", label: "上传人" },
|
||||
{ prop: "unionName", label: "工会" },
|
||||
{ prop: "createdAt", label: "上传时间" }
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"add-form": GRASSROOTS_CONGRESS_MATERIALS_ADD_FROM,
|
||||
"info": INFO
|
||||
},
|
||||
methods: {
|
||||
doDelete(row) {
|
||||
this.$confirm("确定要删除此会议资料吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/grassrootsCongress/materials/manage/doDelete", { id: row.id }).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
},
|
||||
openRevoke(row) {
|
||||
this.$confirm("您确定要撤销申请吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post(loc() + "/revokeApply", { id: row.id }).then((resp) => {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
})
|
||||
},
|
||||
openView(row){
|
||||
this.$refs.guava.public(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$refs.addForm.addDialog()
|
||||
this.$refs.addForm.openEdit(row.id)
|
||||
},
|
||||
openAdd() {
|
||||
this.$refs.addForm.addDialog()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+2
-2
@@ -42,8 +42,8 @@ layout("/layouts/platform.html"){
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column label="会议名称" prop="meetingName"></el-table-column>
|
||||
<el-table-column label="会议时间" prop="meetingTime"></el-table-column>
|
||||
<el-table-column label="届" prop="j"></el-table-column>
|
||||
<el-table-column label="次" prop="c"></el-table-column>
|
||||
<el-table-column label="届数" prop="j"></el-table-column>
|
||||
<el-table-column label="次数" prop="c"></el-table-column>
|
||||
<el-table-column label="申请人" prop="createUserName"></el-table-column>
|
||||
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="会议类型" prop="meetingType"></el-table-column>
|
||||
|
||||
+2
-2
@@ -21,8 +21,8 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column label="会议名称" prop="meetingName"></el-table-column>
|
||||
<el-table-column label="会议时间" prop="meetingTime"></el-table-column>
|
||||
<el-table-column label="届" prop="j"></el-table-column>
|
||||
<el-table-column label="次" prop="c"></el-table-column>
|
||||
<el-table-column label="届数" prop="j"></el-table-column>
|
||||
<el-table-column label="次数" prop="c"></el-table-column>
|
||||
<el-table-column label="申请人" prop="createUserName"></el-table-column>
|
||||
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="会议类型" prop="meetingType"></el-table-column>
|
||||
|
||||
+2
-2
@@ -21,8 +21,8 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column label="会议名称" prop="meetingName"></el-table-column>
|
||||
<el-table-column label="会议时间" prop="meetingTime"></el-table-column>
|
||||
<el-table-column label="届" prop="j"></el-table-column>
|
||||
<el-table-column label="次" prop="c"></el-table-column>
|
||||
<el-table-column label="届数" prop="j"></el-table-column>
|
||||
<el-table-column label="次数" prop="c"></el-table-column>
|
||||
<el-table-column label="申请人" prop="createUserName"></el-table-column>
|
||||
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="会议类型" prop="meetingType"></el-table-column>
|
||||
|
||||
-228
@@ -1,228 +0,0 @@
|
||||
const GRASSROOTS_CONGRESS_MEETINGS_ADD_FROM = {
|
||||
template: `
|
||||
<div>
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="addForm">
|
||||
|
||||
<el-row :gutter="40">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="届数" prop="j">
|
||||
<dict-select @change="jChange" code="TEACHER_CONGRESS_J"
|
||||
v-model="formData.j"></dict-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
||||
<el-form-item label="次数" prop="c">
|
||||
<dict-select @change="cChange" code="TEACHER_CONGRESS_C"
|
||||
v-model="formData.c"></dict-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="会议名称" prop="meetingName">
|
||||
<el-input
|
||||
clearable
|
||||
maxlength="100"
|
||||
placeholder="请填写会议名称"
|
||||
v-model="formData.meetingName">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="类型" prop="meetingType">
|
||||
<el-radio-group v-model="formData.meetingType">
|
||||
<el-radio-button label="换届会">换届会</el-radio-button>
|
||||
<el-radio-button label="届中会">届中会</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请单位" prop="unitName">
|
||||
<el-input :clearable="false"
|
||||
placeholder="申请单位"
|
||||
readonly
|
||||
v-model="formData.unitName">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所在工会" prop="unionName">
|
||||
<el-input :clearable="false"
|
||||
placeholder="所在工会"
|
||||
readonly
|
||||
v-model="formData.unionName">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="会议时间" prop="meetingTime">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
placeholder="选择会议时间"
|
||||
style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="formData.meetingTime"
|
||||
value-format="yyyy-MM-dd HH:mm">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请时间" prop="createTime">
|
||||
<el-input :clearable="false"
|
||||
placeholder="申请时间"
|
||||
readonly
|
||||
v-model="formData.createTime">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="会议议程" prop="meetingTopic">
|
||||
<text-editor v-model="formData.meetingTopic"></text-editor>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="meetingRemark">
|
||||
<el-input :rows="4" maxlength="500" placeholder="请输入备注" type="textarea"
|
||||
v-model="formData.meetingRemark"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="请示附件" prop="files">
|
||||
<file-upload
|
||||
:value.sync="formData.files"
|
||||
:upload_number="1"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_mode="drag"
|
||||
accept=".doc,.docx,.xls,.xlsx,.pdf"
|
||||
>
|
||||
<template #explain>
|
||||
图片类请上传jpg/png/jpeg等格式,文档类请上传doc/docx/xls/xlsx/pdf等格式,上传数量为1个
|
||||
</template>
|
||||
</file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="justify-content: flex-end;display: flex">
|
||||
<el-button v-if="id" @click="$store.dispatch('pjaxRoute', '/platform/grassrootsCongress/myMeeting')">返回</el-button>
|
||||
<el-button :loading="formLoading" @click="doSubmit('doSave')" type="primary">保 存
|
||||
</el-button>
|
||||
<el-button :loading="formLoading" @click="doSubmit('doSubmit')" type="primary">提 交
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
id: "",
|
||||
formRules: {
|
||||
meetingName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写会议名称",
|
||||
trigger: ["blur", "change"]
|
||||
}
|
||||
],
|
||||
meetingTime: [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写会议时间",
|
||||
trigger: ["blur", "change"]
|
||||
}
|
||||
],
|
||||
meetingTopic: [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写会议议程",
|
||||
trigger: ["blur", "change"]
|
||||
}
|
||||
],
|
||||
files: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
j: [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写届数",
|
||||
trigger: ["blur", "change"]
|
||||
}
|
||||
],
|
||||
c: [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写次数",
|
||||
trigger: ["blur", "change"]
|
||||
}
|
||||
]
|
||||
},
|
||||
formData: {
|
||||
j: "",
|
||||
c: "",
|
||||
files: [],
|
||||
meetingName: "",
|
||||
meetingType: "届中会"
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jChange() {
|
||||
const j = this.formData.j ? "第" + this.formData.j : ""
|
||||
const c = this.formData.c ? "第" + this.formData.c : ""
|
||||
const str = "关于召开" + this.formData.unitName + j + c + "教职工代表大会、工会会员代表大会的请示"
|
||||
this.formData.meetingName = str
|
||||
},
|
||||
cChange() {
|
||||
const j = this.formData.j ? "第" + this.formData.j : ""
|
||||
const c = this.formData.c ? "第" + this.formData.c : ""
|
||||
const str = "关于召开" + this.formData.unitName + j + c + "教职工代表大会、工会会员代表大会的请示"
|
||||
this.formData.meetingName = str
|
||||
},
|
||||
async doSubmit(type) {
|
||||
if (type === "doSubmit") {
|
||||
let valid = await this.$refs["addForm"].validate()
|
||||
if (!valid) return
|
||||
}
|
||||
this.formLoading = true
|
||||
this.formData.fullName = this.formData.j + this.formData.c
|
||||
const data = { ...this.formData }
|
||||
data.files = JSON.stringify(data.files)
|
||||
const url = type === "doSave" ? "/platform/grassrootsCongress/meeting/doSave" : "/platform/grassrootsCongress/meeting/doSubmit"
|
||||
this.$axios.post(url, { data: JSON.stringify(data) }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
if (this.$refs["addForm"]) this.$refs["addForm"].resetFields()
|
||||
this.init()
|
||||
if (data.id) {
|
||||
this.formLoading = false
|
||||
this.$store.dispatch("pjaxRoute", "/platform/grassrootsCongress/myMeeting")
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
this.formLoading = false
|
||||
})
|
||||
},
|
||||
findOne(id) {
|
||||
this.$axios.post("/platform/grassrootsCongress/meeting/findOne", { id: id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.formData = resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
init(id) {
|
||||
if (id) {
|
||||
this.id = id
|
||||
this.findOne(id)
|
||||
} else {
|
||||
this.$set(this.formData, "createTime", this.$moment(new Date()).format("YYYY-MM-DD"))
|
||||
this.$set(this.formData, "unionId", this.$store.state.user.union.id)
|
||||
this.$set(this.formData, "unionName", this.$store.state.user.union.name)
|
||||
this.$set(this.formData, "unitId", this.$store.state.user.unit.id)
|
||||
this.$set(this.formData, "unitName", this.$store.state.user.unit.name)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {}
|
||||
}
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<h3 style="color: var(--color-primary)">双代会请示</h3>
|
||||
</template>
|
||||
<add-form ref="addForm"></add-form>
|
||||
</el-card>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("addFrom.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"add-form": GRASSROOTS_CONGRESS_MEETINGS_ADD_FROM
|
||||
},
|
||||
methods: {},
|
||||
created() {
|
||||
setTimeout(() => {
|
||||
this.$refs.addForm.init(GetQueryString('id'))
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
-102
@@ -1,102 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker placeholder="选择年" style="width: 100%" type="year"
|
||||
@change="getAllJc()"
|
||||
v-model="pageForm.year" value-format="yyyy"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="届次">
|
||||
<el-select placeholder="届次" style="width: 100%;" v-model="pageForm.fullName">
|
||||
<el-option :key="item" :label="item" :value="item"
|
||||
v-for="item in fullNameList"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select clearable placeholder="所属工会" style="width: 100%;" v-model="pageForm.unionId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="工会列表"></table-tool>
|
||||
<el-table v-if="tableData" :data="tableData" border>
|
||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="工会名称" prop="name"></el-table-column>
|
||||
<el-table-column label="工会编码" prop="unionCode"></el-table-column>
|
||||
<el-table-column label="届次名称" prop="fullName">
|
||||
<template slot-scope="scope">
|
||||
{{ pageForm.fullName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当年会议次数" prop="unionNum"></el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-else :image-size="200"></el-empty>
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY")
|
||||
},
|
||||
fullNameList: [],
|
||||
unions: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getAllJc() {
|
||||
this.$axios.post("/platform/grassrootsCongress/myMeeting/getAllJc",{year:this.pageForm.year}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.fullNameList = resp.data
|
||||
if (this.fullNameList && this.fullNameList.length > 0) {
|
||||
this.pageForm.fullName = this.fullNameList[0]
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
const isAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
if (isAdmin) {
|
||||
this.$businessTool.listUnion(this.pageForm.unionId).then((data) => {
|
||||
this.unions = data
|
||||
})
|
||||
} else {
|
||||
this.$businessTool.listUnion(this.$store.state.user.union.id).then((data) => {
|
||||
this.unions = data
|
||||
})
|
||||
}
|
||||
this.getAllJc()
|
||||
},
|
||||
pageData() {
|
||||
this.$axios.post(loc() + '/pageData', this.pageForm)
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
-175
@@ -1,175 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker placeholder="选择年" style="width: 100%" type="year" v-model="pageForm.year" value-format="yyyy"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="会议名称">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入会议名称" v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
<template v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN')">
|
||||
<search-item label="所属工会">
|
||||
<el-select clearable placeholder="所属工会" style="width: 100%;" v-model="pageForm.unionId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</template>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool label="会议列表"></table-tool>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:size="tableSize"
|
||||
@sort-change="pageOrder"
|
||||
class="vi-table"
|
||||
row-key="processTaskId"
|
||||
style="width: 100%; margin-bottom: 20px"
|
||||
>
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index" width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:key="column.prop"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" prop="userOnline" width="300">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
||||
<el-button v-if="[10,40].includes(row.processInstanceNodeCode)" size="mini" type="primary" @click="openEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="[20].includes(row.processInstanceNodeCode) && !row.nextTaskIsComplete"
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="openRevoke(row)"
|
||||
>
|
||||
撤销
|
||||
</el-button>
|
||||
<el-button v-if="[10].includes(row.processInstanceNodeCode)" size="mini" type="danger" @click="doDelete(row)">删除</el-button>
|
||||
<template v-if="$auth.hasRole('SYSADMIN') && ![10].includes(row.processInstanceNodeCode)">
|
||||
<el-button size="mini" type="danger" @click="doDelete(row)">删除</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #public>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
dicts: ["PROCESS_INSTANCE_STATE"],
|
||||
data() {
|
||||
return {
|
||||
unionList: [],
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY")
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "meetingName", label: "会议名称" },
|
||||
{ prop: "meetingTime", label: "会议时间" },
|
||||
{ prop: "fullName", label: "届次" },
|
||||
{ prop: "createUserName", label: "申请人" },
|
||||
{ prop: "unionName", label: "所属工会" },
|
||||
{ prop: "meetingType", label: "会议类型" },
|
||||
{ prop: "createTime", label: "申请时间" }
|
||||
],
|
||||
businessNo: "",
|
||||
unions: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
info: INFO
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.public(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
openRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post(loc() + "/revoke", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$store.dispatch("pjaxRoute", "/platform/grassrootsCongress/meeting?id=" + row.id)
|
||||
},
|
||||
doDelete(row) {
|
||||
this.$confirm("确定要删除此会议吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/grassrootsCongress/myMeeting/doDelete", { id: row.id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
const isAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
if (isAdmin) {
|
||||
this.$businessTool.listUnion(this.pageForm.unionId).then((data) => {
|
||||
this.unions = data
|
||||
})
|
||||
} else {
|
||||
this.$businessTool.listUnion(this.$store.state.user.union.id).then((data) => {
|
||||
this.unions = data
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.initData()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
-54
@@ -1,54 +0,0 @@
|
||||
const GRASSROOTS_CONGRESS_MEETINGS_VIEW_FROM = {
|
||||
template: `
|
||||
<div>
|
||||
<el-descriptions :column="2" border class="margin-top" style="margin: 10px" title="">
|
||||
<el-descriptions-item label="会议名称" span="2">
|
||||
<span class="item-center"> {{ viewData.meetingName }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="类型">
|
||||
{{viewData.fullName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人">
|
||||
{{viewData.createUserName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">
|
||||
{{viewData.createTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请单位">
|
||||
{{viewData.unitName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请工会">
|
||||
{{viewData.unitName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
<el-descriptions-item label="会议议程" span="2">
|
||||
<div v-html="viewData.meetingTopic"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注" span="2">
|
||||
{{viewData.meetingRemark}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="请示附件" span="2">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
</el-tabs>
|
||||
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initData(id) {
|
||||
this.$axios.post("/platform/grassrootsCongress/meeting/findOne", { id: id }).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
resp.data.files = JSON.parse(resp.data.files)
|
||||
this.viewData = resp.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,7 +119,9 @@ const PROPOSAL_INFO = {
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{ task.taskFormData.opinion }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">
|
||||
<div v-html="task.taskFormData.tf_opinion"></div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -89,7 +89,7 @@ layout("/layouts/platform.html"){
|
||||
this.$axios.post(loc() + "/delete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
+11
-22
@@ -64,37 +64,35 @@ layout("/layouts/platform.html"){
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="承办单位">
|
||||
<el-select clearable filterable placeholder="承办单位" v-model="pageForm.undertakeUnitId">
|
||||
<el-option :key="item.code" :label="item.name" :value="item.code" v-for="item in underTakeOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" header-align="center" style="width: 100%" row-key="id">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
|
||||
<el-table-column label="提案编号" prop="code" width="200px"></el-table-column>
|
||||
<el-table-column label="提案名称" prop="name">
|
||||
<template scope="{row}">
|
||||
<el-link type="primary" @click="onOpen(row)">{{row.name}}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提案编号" prop="code" width="100px" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="提案人" prop="createUserName"></el-table-column>
|
||||
<el-table-column label="提案类别" prop="typeName"></el-table-column>
|
||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||
<el-table-column label="立案结果" prop="caseFilingResult">
|
||||
<template scope="{row}">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT" :value="row.caseFilingResult"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否并案" prop="isConsolidation">
|
||||
<el-table-column label="是否并案" prop="isConsolidation" width="100">
|
||||
<template scope="{row}">
|
||||
<el-tag size="mini" v-if="row.isConsolidation" type="success">是</el-tag>
|
||||
<el-tag size="mini" v-else type="danger">否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前节点" prop="processInstanceNodeName"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
||||
@@ -178,7 +176,6 @@ layout("/layouts/platform.html"){
|
||||
sessionOptions: [],
|
||||
typeOptions: [],
|
||||
delegationOptions: [],
|
||||
underTakeOptions: [],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
pageForm: {
|
||||
@@ -252,13 +249,6 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
listUnderTake() {
|
||||
this.$axios.post("/platform/proposal/common/listUnderTake").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.underTakeOptions = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
listUnion() {
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
@@ -269,7 +259,6 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
created() {
|
||||
this.listSession()
|
||||
this.listUnderTake()
|
||||
this.listUnion()
|
||||
this.listUnit()
|
||||
this.listProposalType()
|
||||
|
||||
+12
-23
@@ -64,39 +64,38 @@ layout("/layouts/platform.html"){
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="承办单位">
|
||||
<el-select clearable filterable placeholder="承办单位" v-model="pageForm.undertakeUnitId">
|
||||
<el-option :key="item.code" :label="item.name" :value="item.code" v-for="item in underTakeOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" header-align="center" style="width: 100%" row-key="id">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
|
||||
<el-table-column label="提案编号" prop="code" width="200px"></el-table-column>
|
||||
<el-table-column label="提案名称" prop="name"></el-table-column>
|
||||
<el-table-column label="提案编号" prop="code" width="100px" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="提案人" prop="createUserName"></el-table-column>
|
||||
<el-table-column label="提案类别" prop="typeName"></el-table-column>
|
||||
<el-table-column label="届次" prop="sessionName"></el-table-column>
|
||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||
<el-table-column label="立案结果" prop="caseFilingResult">
|
||||
<template scope="{row}">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT" :value="row.caseFilingResult"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否并案" prop="isConsolidation">
|
||||
<el-table-column label="是否并案" prop="isConsolidation" width="100">
|
||||
<template scope="{row}">
|
||||
<el-tag size="mini" v-if="row.isConsolidation" type="success">是</el-tag>
|
||||
<el-tag size="mini" v-else type="danger">否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前节点" prop="processInstanceNodeName"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
||||
<el-button size="mini" type="danger" @click="del(row.id)">删除</el-button>
|
||||
<el-button size="mini" type="danger" @click="onDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -137,11 +136,10 @@ layout("/layouts/platform.html"){
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
del(id) {
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定删除该提案吗?", "提示", {
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
@@ -177,14 +175,6 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
listUnderTake() {
|
||||
this.$axios.post("/platform/proposal/common/listUnderTake").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.underTakeOptions = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
listUnion() {
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
},
|
||||
@@ -194,7 +184,6 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
created() {
|
||||
this.listSession()
|
||||
this.listUnderTake()
|
||||
this.listUnion()
|
||||
this.listUnit()
|
||||
}
|
||||
|
||||
+271
@@ -0,0 +1,271 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style></style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="教代会">
|
||||
<el-select @change="meetingChange" clearable filterable placeholder="所属教代会"
|
||||
v-model="pageForm.sessionId">
|
||||
<el-option :key="item.id" :label="item.fullName" :value="item.id"
|
||||
v-for="item in sessionOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="提案名称">
|
||||
<el-input
|
||||
@keyup.enter.native="doSearch"
|
||||
clearable
|
||||
placeholder="请输入提案名称"
|
||||
v-model="pageForm.name"
|
||||
style="width: 100%"
|
||||
></el-input>
|
||||
</search-item>
|
||||
<search-item label="提案编码">
|
||||
<el-input
|
||||
@keyup.enter.native="doSearch"
|
||||
clearable
|
||||
placeholder="请输入提案编码"
|
||||
v-model="pageForm.code"
|
||||
style="width: 100%"
|
||||
></el-input>
|
||||
</search-item>
|
||||
<search-item label="提案人姓名">
|
||||
<el-input
|
||||
@keyup.enter.native="doSearch"
|
||||
clearable
|
||||
placeholder="请输入提案人姓名"
|
||||
v-model="pageForm.createUserName"
|
||||
style="width: 100%"
|
||||
></el-input>
|
||||
</search-item>
|
||||
<search-item label="提案人工号">
|
||||
<el-input
|
||||
@keyup.enter.native="doSearch"
|
||||
clearable
|
||||
placeholder="请输入提案人工号"
|
||||
v-model="pageForm.createUserLoginName"
|
||||
style="width: 100%"
|
||||
></el-input>
|
||||
</search-item>
|
||||
<search-item label="代表团">
|
||||
<el-select clearable filterable placeholder="所属代表团" v-model="pageForm.delegationId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in delegationOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="提案分工会">
|
||||
<el-select clearable filterable placeholder="分工会" v-model="pageForm.unionId"
|
||||
@change="pageForm.unitId=null;listUnit();">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in unionOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="提案单位">
|
||||
<el-select clearable filterable placeholder="提案单位" v-model="pageForm.unitId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in unitOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" header-align="center" style="width: 100%" row-key="id">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
|
||||
<el-table-column label="提案编号" prop="code" width="100px" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="提案人" prop="createUserName"></el-table-column>
|
||||
<el-table-column label="提案类别" prop="typeName"></el-table-column>
|
||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||
<el-table-column label="立案结果" prop="caseFilingResult">
|
||||
<template scope="{row}">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="row.caseFilingResult"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否并案" prop="isConsolidation" width="100">
|
||||
<template scope="{row}">
|
||||
<el-tag size="mini" v-if="row.isConsolidation" type="success">是</el-tag>
|
||||
<el-tag size="mini" v-else type="danger">否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
||||
<el-button size="mini" type="primary" @click="onOpenEdit(row.instanceId)">修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<proposal-info ref="infoRef"></proposal-info>
|
||||
</template>
|
||||
|
||||
<el-dialog title="修改反馈评价" :visible.sync="editDialogVisible" width="50%">
|
||||
<template v-for="task in tasks">
|
||||
<el-descriptions border class="flow-task-form" :column="2" :key="task.id">
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果" :span="2">
|
||||
<el-radio-group v-model="task.taskFormData.tf_feedback" size="small">
|
||||
<el-radio v-for="item in dict.type.PROPOSAL_FEEDBACK" :key="item.code"
|
||||
:label="item.code" border>{{item.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" :span="2" v-if="!task.ext.isFirstTaskNode">
|
||||
<el-input
|
||||
v-model="task.taskFormData.tf_opinion"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="请输入您的办理意见"
|
||||
></el-input>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
<el-row type="flex" justify="end" slot="footer">
|
||||
<el-button @click="editDialogVisible=false">取 消</el-button>
|
||||
<el-button type="primary" @click="onSubmit">确 定</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/platform/zhgh/democratic/proposal/common/info.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ['PROPOSAL_CASE_FILING_RESULT', 'PROCESS_TASK_SUBMIT_TYPE', 'PROPOSAL_FEEDBACK'],
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sessionOptions: [],
|
||||
typeOptions: [],
|
||||
delegationOptions: [],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
pageForm: {
|
||||
types: [],
|
||||
caseFilingResults: [],
|
||||
unionId: null,
|
||||
unitId: null
|
||||
},
|
||||
tasks: [],
|
||||
editDialogVisible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onOpenEdit(instanceId) {
|
||||
this.editDialogVisible = true
|
||||
this.$axios.post('/platform/senior/feedback/info', {instanceId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
const params = this.tasks.map(v => {
|
||||
return {
|
||||
id: v.id,
|
||||
opinion: v?.taskFormData?.tf_opinion,
|
||||
feedback: v?.taskFormData?.tf_feedback
|
||||
}
|
||||
})
|
||||
this.$axios.post('/platform/senior/feedback/update', {data:JSON.stringify(params)}).then(res=>{
|
||||
if(res.code===0){
|
||||
this.$message.success(res.msg)
|
||||
this.editDialogVisible = false
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
listProposalType() {
|
||||
this.$axios.post("/platform/proposal/common/listProposalType").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.typeOptions = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
async meetingChange(val) {
|
||||
this.pageForm.delegationId = null
|
||||
this.listDelegation()
|
||||
},
|
||||
listDelegation() {
|
||||
this.$axios.post("/platform/proposal/common/listDelegation", {sessionId: this.pageForm.sessionId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.delegationOptions = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
listSession() {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
if (this.sessionOptions) {
|
||||
this.$set(this.pageForm, "sessionId", this.sessionOptions[0].id)
|
||||
this.listDelegation()
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
listUnion() {
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
},
|
||||
|
||||
listUnit() {
|
||||
this.$businessTool.listUnit(this.pageForm.unionId).then((res) => (this.unitOptions = res))
|
||||
},
|
||||
|
||||
pageData() {
|
||||
this.$axios
|
||||
.post(loc() + "/pageData", {
|
||||
pageForm: JSON.stringify(this.pageForm)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.listSession()
|
||||
this.listUnion()
|
||||
this.listUnit()
|
||||
this.listProposalType()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -64,39 +64,35 @@ layout("/layouts/platform.html"){
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="承办单位">
|
||||
<el-select clearable filterable placeholder="承办单位" v-model="pageForm.undertakeUnitId">
|
||||
<el-option :key="item.code" :label="item.name" :value="item.code" v-for="item in underTakeOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" header-align="center" style="width: 100%" row-key="id">
|
||||
<el-table-column label="序号" width="50px" type="index" :index="indexMethod"></el-table-column>
|
||||
<el-table-column label="提案编号" prop="code" width="200px"></el-table-column>
|
||||
<el-table-column label="提案名称" prop="name">
|
||||
<template scope="{row}">
|
||||
<el-link type="primary" @click="onOpen(row)">{{row.name}}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
|
||||
<el-table-column label="提案编号" prop="code" width="100px" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="提案人" prop="createUserName"></el-table-column>
|
||||
<el-table-column label="提案类别" prop="typeName"></el-table-column>
|
||||
<el-table-column label="届次" prop="sessionName"></el-table-column>
|
||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||
<el-table-column label="立案结果" prop="caseFilingResult">
|
||||
<template scope="{row}">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT" :value="row.caseFilingResult"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否并案" prop="isConsolidation">
|
||||
<el-table-column label="是否并案" prop="isConsolidation" width="100">
|
||||
<template scope="{row}">
|
||||
<el-tag size="mini" v-if="row.isConsolidation" type="success">是</el-tag>
|
||||
<el-tag size="mini" v-else type="danger">否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前节点" prop="processInstanceNodeName"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="onOpen(row)">查看</el-button>
|
||||
@@ -145,11 +141,8 @@ layout("/layouts/platform.html"){
|
||||
typeOptions: [],
|
||||
sessionOptions: [],
|
||||
delegationOptions: [],
|
||||
underTakeOptions: [],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
businessNo: "",
|
||||
tabActive: "0",
|
||||
pageForm: {
|
||||
types: [],
|
||||
caseFilingResults: [],
|
||||
@@ -225,14 +218,6 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
listUnderTake() {
|
||||
this.$axios.post("/platform/proposal/common/listUnderTake").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.underTakeOptions = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
listUnion() {
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
},
|
||||
@@ -242,7 +227,6 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
created() {
|
||||
this.listSession()
|
||||
this.listUnderTake()
|
||||
this.listUnion()
|
||||
this.listUnit()
|
||||
this.listProposalType()
|
||||
|
||||
+5
-5
@@ -83,15 +83,15 @@ layout("/layouts/platform.html"){
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="">
|
||||
<el-form-item label="立案结果" prop="caseFilingResult" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-radio-group v-model="formData.caseFilingResult" size="small">
|
||||
<el-form-item label="立案结果" prop="tf_caseFilingResult" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-radio-group v-model="formData.tf_caseFilingResult" size="small">
|
||||
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_RESULT" :label="item.code" border>{{item.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="主办单位"
|
||||
v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.caseFilingResult)"
|
||||
:rules="[{required:['CONFIRM_FILING','SUGGESTION'].includes(formData.caseFilingResult),message:'必填',trigger:['change','blur']}]"
|
||||
v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult)"
|
||||
:rules="[{required:['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult),message:'必填',trigger:['change','blur']}]"
|
||||
>
|
||||
<el-select v-model="formData.tf_hostUnitId" filterable clearable style="width: 100%">
|
||||
<el-option
|
||||
@@ -103,7 +103,7 @@ layout("/layouts/platform.html"){
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="协办单位" v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.caseFilingResult)">
|
||||
<el-form-item label="协办单位" v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult)">
|
||||
<el-select v-model="formData.tf_helpUnitIds" filterable clearable multiple style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in underTakeOptions"
|
||||
|
||||
+21
-6
@@ -57,7 +57,6 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="届次" prop="sessionName"></el-table-column>
|
||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="taskName" label="承办类型"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
@@ -84,9 +83,12 @@ layout("/layouts/platform.html"){
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="">
|
||||
<el-form-item label="满意度" prop="tf_feedback" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-form-item label="满意度" prop="tf_feedback"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-radio-group v-model="formData.tf_feedback" size="small">
|
||||
<el-radio v-for="item in dict.type.PROPOSAL_FEEDBACK" :key="item.code" :label="item.code" border>{{item.label}}</el-radio>
|
||||
<el-radio v-for="item in dict.type.PROPOSAL_FEEDBACK" :key="item.code"
|
||||
:label="item.code" border>{{item.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
@@ -140,6 +142,7 @@ layout("/layouts/platform.html"){
|
||||
processTaskId: row.taskId,
|
||||
taskKey: row.taskKey,
|
||||
taskName: row.taskName,
|
||||
instanceId: row.instanceId
|
||||
}
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
@@ -150,14 +153,15 @@ layout("/layouts/platform.html"){
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
}).then(async () => {
|
||||
const formData = {
|
||||
...this.formData,
|
||||
submitType: val
|
||||
}
|
||||
// 不满意
|
||||
if(this.formData.tf_feedback === 'DISSATISFIED'){
|
||||
formData.tf_hostUnitId = "da59e22f2a744a128b4f71c037c8d32e"
|
||||
if (this.formData.tf_feedback === 'DISSATISFIED') {
|
||||
const caseInfo = await this.getCaseInfo(this.formData.instanceId)
|
||||
formData.tf_hostUnitId = caseInfo.tf_hostUnitId
|
||||
}
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify(formData)
|
||||
@@ -187,6 +191,17 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
|
||||
// 获取立案信息
|
||||
async getCaseInfo(instId) {
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = await this.$axios.post('/platform/proposal/feedbackEvaluation/caseInfo', {instId})
|
||||
if (code === 0) {
|
||||
return data
|
||||
}
|
||||
},
|
||||
|
||||
// 教代会
|
||||
async meetingChange(val) {
|
||||
this.formData.delegationId = null
|
||||
|
||||
@@ -103,9 +103,11 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/proposal/mine/revokeApply", { id: row.id }).then((resp) => {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
+5
@@ -55,6 +55,11 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="提案类别" prop="typeName"></el-table-column>
|
||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||
<el-table-column label="立案结果" prop="caseFilingResult">
|
||||
<template scope="{row}">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT" :value="row.caseFilingResult"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前节点" prop="curTaskName"></el-table-column>
|
||||
<el-table-column label="承办单位" prop="taskUnitName"></el-table-column>
|
||||
<el-table-column label="承办类型" prop="taskName"></el-table-column>
|
||||
|
||||
+71
-33
@@ -135,7 +135,7 @@ layout("/layouts/platform.html"){
|
||||
<pc-signature v-model="formData.signature"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="end" type="flex" v-if="showButton">
|
||||
<el-row justify="end" type="flex" v-if="isWriteTime">
|
||||
<el-button @click="onSave" type="primary">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onSubmitAgain" v-else>提交</el-button>
|
||||
@@ -190,7 +190,7 @@ layout("/layouts/platform.html"){
|
||||
proposalConfig: {},
|
||||
noticeDialogVisible: false,
|
||||
|
||||
showButton: true
|
||||
isWriteTime: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -201,10 +201,6 @@ layout("/layouts/platform.html"){
|
||||
this.$message.warning("请填写提案名称")
|
||||
return
|
||||
}
|
||||
if (this.formData.brief.length < this.proposalConfig.briefMinLength) {
|
||||
this.$message.warning("提案内容和依据最少为" + this.proposalConfig.briefMinLength + "字")
|
||||
return
|
||||
}
|
||||
|
||||
this.$axios.post("/platform/proposal/write/save", {info: JSON.stringify(this.formData)}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
@@ -218,38 +214,62 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
// 提交
|
||||
onSubmit() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/proposal/write/submit', {info: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/proposal/mine'
|
||||
}
|
||||
async onSubmit() {
|
||||
const valid = await this.$refs["addForm"].validate()
|
||||
if (valid) {
|
||||
if (!this.formData.name || this.formData.name.trim().length < 1) {
|
||||
this.$message.warning("请填写提案名称")
|
||||
return
|
||||
}
|
||||
if (this.formData.brief.length < this.proposalConfig.briefMinLength) {
|
||||
this.$message.warning("提案内容和依据最少为" + this.proposalConfig.briefMinLength + "字")
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/proposal/write/submit', {info: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/proposal/mine'
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 重新提交
|
||||
onSubmitAgain() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/proposal/write/submitAgain', {
|
||||
info: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/proposal/mine'
|
||||
}
|
||||
async onSubmitAgain() {
|
||||
const valid = await this.$refs["addForm"].validate()
|
||||
if (valid) {
|
||||
if (!this.formData.name || this.formData.name.trim().length < 1) {
|
||||
this.$message.warning("请填写提案名称")
|
||||
return
|
||||
}
|
||||
if (this.formData.brief.length < this.proposalConfig.briefMinLength) {
|
||||
this.$message.warning("提案内容和依据最少为" + this.proposalConfig.briefMinLength + "字")
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/proposal/write/submitAgain', {
|
||||
info: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/proposal/mine'
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 获取提案类别
|
||||
@@ -296,7 +316,10 @@ layout("/layouts/platform.html"){
|
||||
this.sessionOptions = res.data
|
||||
if (!isModify && this.sessionOptions) {
|
||||
this.$set(this.formData, "sessionId", this.sessionOptions[0].id)
|
||||
// 获取代表团
|
||||
await this.searchMineDelegation()
|
||||
// 检查是否在撰写时间内
|
||||
this.checkWriteTime()
|
||||
}
|
||||
await this.listDelegation()
|
||||
await this.listSource()
|
||||
@@ -322,6 +345,20 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
|
||||
// 检查是否在撰写时间内
|
||||
checkWriteTime() {
|
||||
this.$axios.post("/platform/proposal/write/checkWriteTime", {sessionId: this.formData.sessionId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
if (!res.data) {
|
||||
this.$message.warning("当前时间不在撰写时间段内")
|
||||
this.isWriteTime = false
|
||||
} else {
|
||||
this.isWriteTime = true
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
init() {
|
||||
if (this.bizId) {
|
||||
this.$axios.post("/platform/proposal/write/detail", {id: this.bizId}).then((res) => {
|
||||
@@ -333,6 +370,7 @@ layout("/layouts/platform.html"){
|
||||
} else {
|
||||
// this.noticeDialogVisible = true
|
||||
this.listOpenSession(false)
|
||||
|
||||
this.$set(this.formData, "createUserId", this.$store.state.user.id)
|
||||
this.$set(this.formData, "createUserName", this.$store.state.user.username)
|
||||
this.$set(this.formData, "createUserLoginName", this.$store.state.user.loginname)
|
||||
|
||||
@@ -18,12 +18,11 @@ layout("/layouts/platform.html"){
|
||||
<table-tool></table-tool>
|
||||
<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 prop="title" label="投稿标题"></el-table-column>
|
||||
<el-table-column prop="loginName" label="投稿人工号"></el-table-column>
|
||||
<el-table-column prop="userName" label="投稿人姓名"></el-table-column>
|
||||
<el-table-column prop="unitName" label="投稿人单位"></el-table-column>
|
||||
<el-table-column prop="unionName" label="投稿人工会"></el-table-column>
|
||||
<!-- <el-table-column prop="submitTime" label="投稿时间"></el-table-column>-->
|
||||
<el-table-column prop="title" label="标题"></el-table-column>
|
||||
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="unitName" label="单位"></el-table-column>
|
||||
<el-table-column prop="unionName" label="工会"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
|
||||
+18
-1
@@ -38,6 +38,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button size="small" type="primary" icon="el-icon-plus" @click="excelImportDialog = true">导入代表</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-plus" @click="$refs.addFormRef.onOpen(pageForm.sessionId)">新增代表</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
@@ -88,6 +89,20 @@ layout("/layouts/platform.html"){
|
||||
<add-form ref="addFormRef" @refresh="doSearch"></add-form>
|
||||
|
||||
<adjust-form ref="adjustFormRef" @refresh="doSearch"></adjust-form>
|
||||
|
||||
|
||||
<!--导入名单-->
|
||||
<excel-import
|
||||
ref="excelImportRef"
|
||||
url="/platform/teacherCongress/delegate/manage/importByExcel"
|
||||
template_url="/platform/teacherCongress/delegate/manage/downloadTemplate"
|
||||
:visible.sync="excelImportDialog"
|
||||
title="导入"
|
||||
width="700px"
|
||||
:extra_params="{sessionId:pageForm.sessionId}"
|
||||
@import-success="doSearch"
|
||||
></excel-import>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/assets/platform/module/democratic/teachercongress/teacherCongressCommonApi.js"></script>
|
||||
@@ -115,7 +130,9 @@ layout("/layouts/platform.html"){
|
||||
unitOptions: [],
|
||||
|
||||
roleOptions: [],
|
||||
formRules: {}
|
||||
formRules: {},
|
||||
|
||||
excelImportDialog: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
+1
-9
@@ -39,15 +39,7 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button size="small" type="primary" icon="el-icon-download" @click="exportXlsx">导出Excel</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-download"
|
||||
@click="exportDocx"
|
||||
v-if="$auth.hasPermission('tc.delegate.read.exportDocx')"
|
||||
>
|
||||
导出Word
|
||||
</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-download" @click="exportDocx">导出Word</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" header-align="center" row-key="id" ref="tableRef" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" reserve-selection fixed="left"></el-table-column>
|
||||
|
||||
Reference in New Issue
Block a user