Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/v4
This commit is contained in:
@@ -1,19 +1,24 @@
|
||||
package com.budwk.app.sys.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import cn.hutool.core.lang.tree.TreeNode;
|
||||
import cn.hutool.core.lang.tree.TreeUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.bpm.service.BpmService;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
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.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.sys.models.*;
|
||||
import com.budwk.app.sys.services.*;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
@@ -41,35 +46,30 @@ import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/sys/union")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "分工会管理")
|
||||
@At("/platform/sys/union")
|
||||
public class SysUnionController {
|
||||
|
||||
@Inject
|
||||
private SysUnionService sysUnionService;
|
||||
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private SysDictService sysDictService;
|
||||
|
||||
@Inject
|
||||
private SysRoleService sysRoleService;
|
||||
|
||||
@Inject
|
||||
private SysUserService sysUserService;
|
||||
|
||||
@Inject
|
||||
private SysUnitService sysUnitService;
|
||||
|
||||
@Inject
|
||||
private BpmService bpmService;
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
private SysUnionService sysUnionService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/sys/union/index.html")
|
||||
@@ -266,28 +266,43 @@ public class SysUnionController {
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.userId,
|
||||
t2.username,
|
||||
t2.loginname,
|
||||
t3.`code` AS roleCode,
|
||||
t3.`name` AS roleName
|
||||
info.*,
|
||||
role.`name` AS roleName,
|
||||
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
|
||||
sys_user_role t1
|
||||
LEFT JOIN sys_user t2 ON t2.id = t1.userId
|
||||
LEFT JOIN sys_role t3 ON t3.id = t1.roleId
|
||||
sys_union_cadre info
|
||||
LEFT JOIN sys_role role ON role.`code` = info.roleCode
|
||||
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.where("t3.`code`", "in", branchUnionRoleCodes);
|
||||
cnd.and("t1.unionId", "=", unionId);
|
||||
|
||||
Cnd cnd = Cnd.where("role.`code`", "in", branchUnionRoleCodes);
|
||||
cnd.and("info.unionId", "=", unionId);
|
||||
if (StrUtil.isAllNotBlank(pageForm.getSearchName(), pageForm.getSearchKeyword())) {
|
||||
switch (pageForm.getSearchName()) {
|
||||
case "loginname" -> cnd.where().andLike("t2.loginname", pageForm.getSearchKeyword());
|
||||
case "username" -> cnd.where().andLike("t2.username", pageForm.getSearchKeyword());
|
||||
case "roleName" -> cnd.where().andLike("t3.`name`", pageForm.getSearchKeyword());
|
||||
case "loginname" -> cnd.where().andLike("info.loginname", pageForm.getSearchKeyword());
|
||||
case "username" -> cnd.where().andLike("info.username", pageForm.getSearchKeyword());
|
||||
case "roleName" -> cnd.where().andLike("role.`name`", pageForm.getSearchKeyword());
|
||||
}
|
||||
}
|
||||
// cnd.asc("t2.username");
|
||||
cnd.and(new Static("1=1 order by field(t3.code," + branchUnionRoleCodes.stream().map(code -> "'" + code + "'").collect(Collectors.joining(",")) + ")"));
|
||||
cnd.and(new Static("1=1 order by field(role.code," + branchUnionRoleCodes.stream().map(code -> "'" + code + "'").collect(Collectors.joining(",")) + ")"));
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = sysUserService.listMap(sql);
|
||||
return Result.success(list);
|
||||
@@ -319,16 +334,54 @@ public class SysUnionController {
|
||||
|
||||
// bpmService.startSubmitProcessInstance(BpmProcessConstant.BRANCH_UNION_WEIYUAN_AUTHORIZATION.name(), instanceName, permission.getId(), List.of("24017"), null);
|
||||
|
||||
sysRoleService.clear("sys_user_role", Cnd.where("roleId", "=", role.getId()).and("userId", "=", userId).and("unionId", "=", unionId));
|
||||
sysRoleService.insert("sys_user_role", Chain.make("roleId", role.getId()).add("userId", userId).add("unionId", unionId));
|
||||
sysRoleService.clearCache();
|
||||
sysUserService.clearCache();
|
||||
// sysRoleService.clear("sys_user_role", Cnd.where("roleId", "=", role.getId()).and("userId", "=", userId).and("unionId", "=", unionId));
|
||||
// sysRoleService.insert("sys_user_role", Chain.make("roleId", role.getId()).add("userId", userId).add("unionId", unionId));
|
||||
// sysRoleService.clearCache();
|
||||
// sysUserService.clearCache();
|
||||
|
||||
// 构建表结构存储
|
||||
View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", userId));
|
||||
|
||||
Sys_union_cadre unionCadre = new Sys_union_cadre();
|
||||
unionCadre.setUserId(userId);
|
||||
unionCadre.setUnionId(unionId);
|
||||
unionCadre.setMobile(user.getMobile());
|
||||
unionCadre.setUnionName(user.getUnionName());
|
||||
unionCadre.setLoginName(user.getLoginname());
|
||||
unionCadre.setUserName(user.getUsername());
|
||||
unionCadre.setRoleCode(roleCode);
|
||||
unionCadre.setApplyDate(new Date());
|
||||
unionCadre.setIsJoin(true);
|
||||
dao.insert(unionCadre);
|
||||
|
||||
// 去走工作流
|
||||
boolean isAdmin = AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name());
|
||||
Dict args = Dict.create();
|
||||
args.set("submit", isAdmin ? "admin" : "branch");
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, unionCadre);
|
||||
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("JCGHWY", unionCadre.getId(), SecurityUtil.getUserId(), args);
|
||||
// 自动完成第一个申请任务
|
||||
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||
for (ProcessTask task : doingTaskList) {
|
||||
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
|
||||
}
|
||||
|
||||
if (isAdmin) {
|
||||
// 如果是管理员,直接加角色
|
||||
sysRoleService.clear("sys_user_role", Cnd.where("roleId", "=", role.getId()).and("userId", "=", userId).and("unionId", "=", unionId));
|
||||
sysRoleService.insert("sys_user_role", Chain.make("roleId", role.getId()).add("userId", userId).add("unionId", unionId));
|
||||
sysRoleService.clearCache();
|
||||
sysUserService.clearCache();
|
||||
}
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("sys.manager.union.branchOfficer")
|
||||
@ApiOperation("删除分工会人员角色")
|
||||
@SaCheckPermission("sys.manager.union.branchOfficer")
|
||||
public Result deleteBranchUnionUserRole(String userId, String roleCode, String unionId) {
|
||||
Sys_role role = sysRoleService.fetch(Cnd.where("code", "=", roleCode));
|
||||
if (Lang.isEmpty(role)) {
|
||||
@@ -344,6 +397,10 @@ public class SysUnionController {
|
||||
cnd.and("unionId", "=", unionId);
|
||||
|
||||
sysRoleService.clear("sys_user_role", cnd);
|
||||
|
||||
dao.clear(Sys_union_cadre.class, Cnd.where("userId", "=", userId)
|
||||
.and("unionId", "=", unionId).and("roleCode", "=", roleCode));
|
||||
|
||||
sysRoleService.clearCache();
|
||||
sysUserService.clearCache();
|
||||
return Result.success();
|
||||
@@ -395,22 +452,78 @@ public class SysUnionController {
|
||||
@At
|
||||
@ApiOperation("按关键字查询分工会下的人员")
|
||||
@Ok("json:{ignoreNull:true}")
|
||||
@SaCheckPermission("sys.manager.union.partUnit")
|
||||
@SaCheckPermission("sys.manager.union")
|
||||
public Result listUserSelect(@Valid String unionId, @Valid String keyWord) {
|
||||
Sql sql = Sqls.create("select id,loginname,username,unitname from vw_user $condition");
|
||||
Sql sql = Sqls.create("select id,loginname,username,unitName from vw_user $condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and(View_user::getUnionId, "=", unionId);
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike(View_user::getLoginname, keyWord, true);
|
||||
seg.orLike(View_user::getUsername, keyWord, true);
|
||||
cnd.and(seg);
|
||||
cnd.limit(1, 10);
|
||||
sql.setCondition(cnd);
|
||||
sql.setCallback(Sqls.callback.entities());
|
||||
sql.setEntity(dao.getEntity(View_user.class));
|
||||
dao.execute(sql);
|
||||
List<View_user> list = sql.getList(View_user.class);
|
||||
return Result.success(list);
|
||||
Pagination pagination = sysUnionService.listPageMap(1, 10, sql);
|
||||
return Result.success(pagination.getList());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 基层干部审核相关
|
||||
*/
|
||||
@At
|
||||
@ApiOperation("基层干部审核菜单")
|
||||
@SaCheckPermission("sys.manager.union")
|
||||
public Result cadrePageData(PageForm pageForm, @Param("isJoin") Boolean isJoin) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
role.`name` AS roleName,
|
||||
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 sys_union_cadre info ON info.id = ins.businessNo
|
||||
LEFT JOIN sys_role role ON role.`code` = info.roleCode
|
||||
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", "=", "2978a74a-75c1-4f95-99f9-9c08c480f1b5");
|
||||
if (pageForm.getAudit()) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(),
|
||||
ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
|
||||
cnd.andEX("info.isJoin", "=", isJoin);
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.desc("t.createdAt");
|
||||
cnd.desc("info.applyDate");
|
||||
} else {
|
||||
cnd.orderBy("info." + pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = sysUnionService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.budwk.app.sys.interceptor;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
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;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.sys.models.Sys_role;
|
||||
import com.budwk.app.sys.models.Sys_union_cadre;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import com.budwk.app.sys.services.SysUserService;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author FKY
|
||||
* @name:SysUnionSchoolAuditInterceptor
|
||||
* @Date 2025/10/28 10:15
|
||||
* @注释
|
||||
*/
|
||||
public class SysUnionSchoolAuditInterceptor implements FlowInterceptor {
|
||||
|
||||
|
||||
@Override
|
||||
public void intercept(Execution execution) {
|
||||
// 是否审核通过
|
||||
boolean submitType = execution.getArgs().getInt("submitType").equals(ProcessSubmitTypeEnum.AGREE.getCode());
|
||||
if (submitType) {
|
||||
// 审核通过,添加相应的角色
|
||||
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
|
||||
|
||||
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
|
||||
SysUserService sysUserService = ServiceContext.find(SysUserService.class);
|
||||
|
||||
// 表单数据
|
||||
Sys_union_cadre unionBean = JSONUtil.toBean(formDataStr, Sys_union_cadre.class);
|
||||
|
||||
// 清除对应角色然后再新增
|
||||
Sys_role role = sysRoleService.getByCode(unionBean.getRoleCode());
|
||||
sysRoleService.clear("sys_user_role", Cnd.where("roleId", "=", role.getId())
|
||||
.and("userId", "=", unionBean.getUserId()).and("unionId", "=", unionBean.getUnionId()));
|
||||
sysRoleService.insert("sys_user_role", Chain.make("roleId", role.getId())
|
||||
.add("userId", unionBean.getUserId()).add("unionId", unionBean.getUnionId()));
|
||||
|
||||
// 清除缓存
|
||||
sysRoleService.clearCache();
|
||||
sysUserService.clearCache();
|
||||
}
|
||||
// 未审核通过,不作操作
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.budwk.app.sys.models;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author FKY
|
||||
* @name:Sys_union_cadre
|
||||
* @Date 2025/10/28 10:22
|
||||
* @注释
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class Sys_union_cadre extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("工会Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("用户Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userId;
|
||||
|
||||
@Column
|
||||
@Comment("用户名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("联系方式")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("角色编码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String roleCode;
|
||||
|
||||
@Column
|
||||
@Comment("添加时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date applyDate;
|
||||
|
||||
@Column
|
||||
@Comment("加入还是退出")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private Boolean isJoin;
|
||||
}
|
||||
@@ -258,6 +258,7 @@ public class Sys_user extends BaseModel implements Serializable {
|
||||
private Integer loginCount;
|
||||
|
||||
@Column
|
||||
@DataCenterColumn(name = "单位号", key = "dwh")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unitId;
|
||||
|
||||
|
||||
@@ -114,8 +114,6 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
|
||||
Map<String, List<Sys_data_dict>> dataDictMap = dataDictList.stream().collect(Collectors.groupingBy(Sys_data_dict::getParentCode));
|
||||
|
||||
Map<String, NutMap> financeUserMap = pullFinance();
|
||||
// // 博士后进站日期数据
|
||||
// Map<String, Date> doctoralData = pullPostDoctoral();
|
||||
|
||||
// 获取配置文件 接口地址 和 token
|
||||
DataCenterProperties.Credential credential = dataCenterProperties.credential("teacher");
|
||||
@@ -167,11 +165,15 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
|
||||
// 特殊处理 根据身份证号获取性别和出生年月
|
||||
if ("sfzjh".equals(mapping.field.getName())) {
|
||||
String idCard = raw.getStr(mapping.key);
|
||||
if (StrUtil.isNotBlank(idCard)) {
|
||||
int gender = IdcardUtil.getGenderByIdCard(idCard);
|
||||
// 性别(1 : 男 , 0 : 女)
|
||||
sysUser.setSex(gender == 1 ? "男" : "女");
|
||||
mapping.field.set(sysUser, raw.getStr(mapping.key));
|
||||
if (StrUtil.isNotBlank(idCard) && IdcardUtil.isValidCard(idCard)) {
|
||||
try {
|
||||
int gender = IdcardUtil.getGenderByIdCard(idCard);
|
||||
// 性别(1 : 男 , 0 : 女)
|
||||
sysUser.setSex(gender == 1 ? "男" : "女");
|
||||
mapping.field.set(sysUser, raw.getStr(mapping.key));
|
||||
} catch (Exception e) {
|
||||
sysUser.setSex(null);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mapping.field.set(sysUser, raw.getStr(mapping.key));
|
||||
@@ -185,8 +187,7 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
|
||||
}
|
||||
}
|
||||
|
||||
// 设置单位相关信息
|
||||
sysUser.setUnitId(raw.getStr("dwh"));
|
||||
// 设置拉取时间
|
||||
sysUser.setPullTime(nowDate);
|
||||
|
||||
// 判断财务信息有没有值,
|
||||
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
package com.budwk.app.zhgh.activity.leadthought.controller;
|
||||
|
||||
|
||||
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.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.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtInfo;
|
||||
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Dao;
|
||||
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 java.util.List;
|
||||
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/leadThought/apply")
|
||||
public class LeadThoughtApplyController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
@Inject
|
||||
private LeadThoughtInfoService leadThoughtInfoService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/activity/leadthought/apply/index.html")
|
||||
@SaCheckPermission("leadThought.apply")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("保存申请")
|
||||
@SaCheckPermission("leadThought.apply")
|
||||
@SLog(tag = "思政板块保存申请", msg = "保存申请")
|
||||
public Result save(@Param("data") LeadThoughtInfo info) {
|
||||
if (StrUtil.isBlank(info.getId())) {
|
||||
leadThoughtInfoService.buildDbColumn(info);
|
||||
}
|
||||
dao.insertOrUpdate(info);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("leadThought.apply")
|
||||
@SLog(tag = "思政板块提交申请", msg = "提交申请")
|
||||
public Result submit(@Param("data") LeadThoughtInfo info) {
|
||||
if (StrUtil.isBlank(info.getId())) {
|
||||
leadThoughtInfoService.buildDbColumn(info);
|
||||
}
|
||||
dao.insertOrUpdate(info);
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, info);
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("SZBKSB", 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
|
||||
@ApiOperation("重新提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("leadThought.apply")
|
||||
@SLog(tag = "思政板块重新提交申请", msg = "重新提交申请")
|
||||
public Result submitAgain(@Param("data") LeadThoughtInfo info, @Param("taskId") Long taskId) {
|
||||
if (StrUtil.isBlank(info.getId())) {
|
||||
leadThoughtInfoService.buildDbColumn(info);
|
||||
}
|
||||
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
|
||||
@ApiOperation("获取填写信息")
|
||||
@SaCheckPermission("leadThought.apply")
|
||||
public Result findWriteInfo(String id) {
|
||||
return Result.success(dao.fetch(LeadThoughtInfo.class, id));
|
||||
}
|
||||
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
package com.budwk.app.zhgh.activity.leadthought.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.base.utils.DateUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtInfo;
|
||||
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
|
||||
import com.budwk.app.zhgh.activity.leadthought.vo.LeadThoughtPageForm;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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.Strings;
|
||||
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;
|
||||
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api("思政板块-我的申报记录")
|
||||
@At("/platform/leadThought/mine")
|
||||
public class LeadThoughtApplyMineController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private LeadThoughtInfoService leadThoughtInfoService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/activity/leadthought/mine/index.html")
|
||||
@SaCheckPermission("leadThought.mine")
|
||||
public void index() {}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("数据记录")
|
||||
@SaCheckPermission("leadThought.mine")
|
||||
public Result pageData(LeadThoughtPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
p.manageName,
|
||||
type.typeName,
|
||||
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
|
||||
lead_thought_info info
|
||||
LEFT JOIN `lead_thought_project` p ON p.id = info.manageId
|
||||
LEFT JOIN `lead_thought_type` type ON type.id = info.typeId
|
||||
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();
|
||||
pageForm.buildSearch(cnd, "info.");
|
||||
cnd.groupBy("t.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = leadThoughtInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("删除申报记录")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("leadThought.mine")
|
||||
@SLog(tag = "思政板块-我的申报", msg = "删除了一条数据,id:${args[0]}")
|
||||
public Result onDelete(@Valid String id) {
|
||||
dao.clear(LeadThoughtInfo.class, Cnd.where("id", "=", id));
|
||||
// 流程相关操作
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("获取填报信息")
|
||||
@SaCheckPermission("leadThought.mine")
|
||||
public Result findOne(String id) {
|
||||
return Result.success(leadThoughtInfoService.findOne(id));
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package com.budwk.app.zhgh.activity.leadthought.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
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.DateUtil;
|
||||
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.activity.leadthought.model.LeadThoughtInfo;
|
||||
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
|
||||
import com.budwk.app.zhgh.activity.leadthought.vo.LeadThoughtPageForm;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.dao.Chain;
|
||||
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.lang.Strings;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api("思政板块-分工会审核")
|
||||
@At("/platform/leadThought/branchUnionAudit")
|
||||
public class LeadThoughtBranchUnionAuditController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@Inject
|
||||
private LeadThoughtInfoService leadThoughtInfoService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/activity/leadthought/branchunionaudit/index.html")
|
||||
@SaCheckPermission("leadThought.fghOption")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("数据列表")
|
||||
@SaCheckPermission("leadThought.branchUnionAudit")
|
||||
public Result pageData(LeadThoughtPageForm 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,
|
||||
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 lead_thought_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();
|
||||
pageForm.buildSearch(cnd, "info.");
|
||||
|
||||
cnd.and("t.taskName", "=", "8337f4ee-d8ff-45e2-8e21-978d916f64da");
|
||||
if (pageForm.getAudit()) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
|
||||
cnd.groupBy("t.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = leadThoughtInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+278
@@ -0,0 +1,278 @@
|
||||
package com.budwk.app.zhgh.activity.leadthought.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
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.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
||||
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.vo.ProcessTaskVO;
|
||||
import com.budwk.app.sys.services.SysOfficeTemplateService;
|
||||
import com.budwk.app.web.commons.base.Globals;
|
||||
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtInfo;
|
||||
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtType;
|
||||
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
|
||||
import com.budwk.app.zhgh.activity.leadthought.vo.LeadThoughtPageForm;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.ddr.poi.html.HtmlRenderPolicy;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
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.servlet.http.HttpServletResponse;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/leadThought/query")
|
||||
public class LeadThoughtQueryController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private LeadThoughtInfoService leadThoughtInfoService;
|
||||
@Inject
|
||||
private SysOfficeTemplateUtil sysOfficeTemplateUtil;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/activity/leadthought/query/index.html")
|
||||
@SaCheckPermission("leadThought.query")
|
||||
public void index() {}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("数据列表")
|
||||
@SaCheckPermission("leadThought.query")
|
||||
public Result pageData(LeadThoughtPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
p.manageName,
|
||||
type.typeName,
|
||||
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
|
||||
lead_thought_info info
|
||||
LEFT JOIN `lead_thought_project` p ON p.id = info.manageId
|
||||
LEFT JOIN `lead_thought_type` type ON type.id = info.typeId
|
||||
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();
|
||||
pageForm.buildSearch(cnd, "info.");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = leadThoughtInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("leadThought.query")
|
||||
public void exportAllInfo(@Param(value = "searchName") String searchName,
|
||||
@Param(value = "searchKeyword") String searchKeyword,
|
||||
@Param(value = "year") Integer year,
|
||||
@Param(value = "manageId") String manageId,
|
||||
@Param(value = "typeId") String typeId,
|
||||
@Param(value = "projectName") String projectName,
|
||||
HttpServletResponse response) throws IOException {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
lti.*,
|
||||
au.stateColor,
|
||||
au.stateName,
|
||||
su.`name` AS applyUnitName,
|
||||
ssu.`name` AS jointUnitName
|
||||
FROM
|
||||
`lead_thought_info` lti
|
||||
LEFT JOIN `audit_state` au ON lti.state = au.stateId
|
||||
LEFT JOIN `user` u ON u.id = lti.userId
|
||||
LEFT JOIN `sys_unit` su ON su.id = lti.applyUnit
|
||||
LEFT JOIN `sys_unit` ssu ON ssu.id = lti.jointUnit
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (Strings.isNotBlank(searchName) && Strings.isNotBlank(searchKeyword)) {
|
||||
cnd.and(searchName, "like", "%" + searchKeyword + "%");
|
||||
}
|
||||
cnd.andEX("YEAR(lti.applyTime)", "=", year);
|
||||
cnd.andEX("lti.manageId", "=", manageId);
|
||||
cnd.andEX("lti.typeId", "=", typeId);
|
||||
if (Strings.isNotBlank(projectName)) {
|
||||
cnd.and("lti.projectName", "like", "%" + projectName + "%");
|
||||
}
|
||||
cnd.and("lti.state", "=", 6250);
|
||||
cnd.desc("lti.applyTime");
|
||||
sql.setCondition(cnd);
|
||||
List<Record> list = leadThoughtInfoService.list(sql);
|
||||
|
||||
ZipOutputStream zipOutputStream = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
|
||||
HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
|
||||
// HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||
// Configure config = Configure.newBuilder().bind("funds", policy)
|
||||
// .bind("content", htmlRenderPolicy)
|
||||
// .build();
|
||||
// list.forEach(v -> {
|
||||
// try {
|
||||
// NutMap nutMap = getExportData(v.getString("id"));
|
||||
// String fileName = nutMap.getString("manageName") + nutMap.getString("applyUnitName") + "登记表.docx";
|
||||
// zipOutputStream.putNextEntry(new ZipEntry(fileName));
|
||||
// XWPFTemplate.compile(officeTemplateUtil.getPath("leadThought"), config).render(nutMap).write(zipOutputStream);
|
||||
// zipOutputStream.closeEntry();
|
||||
// } catch (IOException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// });
|
||||
zipOutputStream.finish();
|
||||
zipOutputStream.close();
|
||||
response.getOutputStream().close();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("leadThought.query")
|
||||
public void exportInfo(String id, HttpServletResponse response) {
|
||||
try {
|
||||
NutMap infoMap = getExportData(id);
|
||||
if (Lang.isNotEmpty(infoMap)) {
|
||||
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
||||
HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
|
||||
htmlRenderPolicy.getConfig().setShowDefaultTableBorderInTableCell(true);
|
||||
Configure config = Configure.builder()
|
||||
.bind("funds", policy)
|
||||
.bind("content", htmlRenderPolicy)
|
||||
.build();
|
||||
|
||||
String fileName = "【" + infoMap.getString("applyUnitName") + "】" + infoMap.getString("manageName") + "申报表.docx";
|
||||
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("leadThought"), config).render(infoMap)
|
||||
.writeAndClose(byteArrayOutputStream);
|
||||
CommonDownloadUtil.download(fileName, byteArrayOutputStream.toByteArray(), response);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public NutMap getExportData(String id) {
|
||||
try {
|
||||
NutMap infoMap = leadThoughtInfoService.findOne(id);
|
||||
NutMap resultMap = NutMap.NEW();
|
||||
|
||||
// 流程实例
|
||||
ProcessInstance processInstance = dao.fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", id));
|
||||
List<ProcessTask> doneTaskList = flowEngine.processTaskService().getDoneTaskList(processInstance.getId(), null);
|
||||
List<ProcessTaskVO> doneTaskVos = new ArrayList<>();
|
||||
for (ProcessTask doneTask : doneTaskList) {
|
||||
ProcessTaskVO taskVO = flowEngine.processTaskService().findById(doneTask.getId());
|
||||
doneTaskVos.add(taskVO);
|
||||
}
|
||||
|
||||
doneTaskVos.stream().filter(v -> "项目评审".equals(v.getDisplayName()))
|
||||
.min(Comparator.comparing(ProcessTaskVO::getCreatedAt))
|
||||
.ifPresent(v -> {
|
||||
Dict taskFormData = v.getTaskFormData();
|
||||
resultMap.put("xghOption", taskFormData.getStr("tf_opinion"));
|
||||
resultMap.put("xghTime", DateUtil.format(v.getFinishTime(), "yyyy年MM月dd日"));
|
||||
if (StrUtil.isNotBlank(taskFormData.getStr("tf_sign"))) {
|
||||
resultMap.put("xqz", sysOfficeTemplateUtil.createPictureRenderData(taskFormData.getStr("tf_sign")));
|
||||
}
|
||||
});
|
||||
|
||||
resultMap.setv("manageName", infoMap.getString("manageName"));
|
||||
resultMap.setv("projectName", infoMap.getString("projectName"));
|
||||
resultMap.setv("applyUnitName", infoMap.getString("applyUnitName"));
|
||||
resultMap.setv("jointUnitName", infoMap.getString("jointUnitName"));
|
||||
resultMap.setv("headName", infoMap.getString("headName"));
|
||||
resultMap.setv("mobile", infoMap.getString("mobile"));
|
||||
resultMap.setv("email", infoMap.getString("email"));
|
||||
resultMap.setv("projectTheme", infoMap.getString("projectTheme"));
|
||||
resultMap.setv("content", infoMap.getString("content"));
|
||||
resultMap.setv("xfu", infoMap.getString("schoolFundsAmount"));
|
||||
resultMap.setv("dfu", infoMap.getString("deptFundsAmount"));
|
||||
resultMap.setv("sfu", infoMap.getString("sumFundsAmount"));
|
||||
|
||||
resultMap.setv("nup", infoMap.getString("numberPeople"));
|
||||
resultMap.setv("nul", infoMap.getString("numberLeader"));
|
||||
resultMap.setv("nut", infoMap.getString("numberTeacher"));
|
||||
resultMap.setv("unitp", infoMap.getString("unitPercentage"));
|
||||
resultMap.setv("ldp", infoMap.getString("leaderPercentage"));
|
||||
resultMap.setv("teap", infoMap.getString("teacherPercentage"));
|
||||
|
||||
|
||||
List<LeadThoughtInfo.LeadThoughtFunds> leadThoughtFunds =
|
||||
JSONUtil.toList(infoMap.getString("leadThoughtFunds"), LeadThoughtInfo.LeadThoughtFunds.class);
|
||||
|
||||
List<NutMap> list = leadThoughtFunds.stream().map(v -> {
|
||||
NutMap map = NutMap.NEW();
|
||||
map.setv("epa", v.getExpenseAccount());
|
||||
map.setv("axm", v.getApplySchoolMoney());
|
||||
map.setv("adm", v.getDeptMoney());
|
||||
map.setv("att", v.getAmountTo());
|
||||
return map;
|
||||
}).toList();
|
||||
resultMap.setv("funds", list);
|
||||
|
||||
List<LeadThoughtType> typeList = leadThoughtInfoService.dao().query(LeadThoughtType.class, Cnd.NEW());
|
||||
typeList.forEach(v -> {
|
||||
if (v.getTypeName().equals(infoMap.getString("typeName"))) {
|
||||
v.setTypeName("(√)" + v.getTypeName());
|
||||
}
|
||||
});
|
||||
resultMap.setv("types", typeList);
|
||||
return resultMap;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
package com.budwk.app.zhgh.activity.leadthought.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
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.DateUtil;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtInfo;
|
||||
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
|
||||
import com.budwk.app.zhgh.activity.leadthought.vo.LeadThoughtPageForm;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.dao.Chain;
|
||||
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.lang.Strings;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api("思政板块-校工会审核")
|
||||
@At("/platform/leadThought/schoolUnionAudit")
|
||||
public class LeadThoughtSchoolUnionAuditController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private LeadThoughtInfoService leadThoughtInfoService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/activity/leadthought/schoolunionaudit/index.html")
|
||||
@SaCheckPermission("leadThought.schoolUnionAudit")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("数据列表")
|
||||
@SaCheckPermission("leadThought.schoolUnionAudit")
|
||||
public Result pageData(LeadThoughtPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
p.manageName,
|
||||
type.typeName,
|
||||
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 lead_thought_info info ON info.id = ins.businessNo
|
||||
LEFT JOIN `lead_thought_project` p ON p.id = info.manageId
|
||||
LEFT JOIN `lead_thought_type` type ON type.id = info.typeId
|
||||
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();
|
||||
pageForm.buildSearch(cnd, "info.");
|
||||
|
||||
cnd.and("t.taskName", "=", "9ef58fdb-f45f-4df2-b11b-b9581b7ee949");
|
||||
if (pageForm.getAudit()) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
|
||||
cnd.groupBy("t.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = leadThoughtInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
package com.budwk.app.zhgh.activity.leadthought.controller.basic;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
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.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtProject;
|
||||
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
|
||||
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.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api("思政项目管理")
|
||||
@At("/platform/leadThought/basic/manage")
|
||||
public class LeadThoughtManageController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private LeadThoughtInfoService leadThoughtInfoService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/activity/leadthought/basic/manage/index.html")
|
||||
@SaCheckPermission("leadThought.basic.manage")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("数据列表")
|
||||
@SaCheckPermission("leadThought.basic.manage")
|
||||
public Result pageData(PageForm pageForm,
|
||||
@Param(value = "projectName") String projectName,
|
||||
@Param(value = "year") Integer year) {
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
*
|
||||
from
|
||||
lead_thought_project
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(projectName)) {
|
||||
cnd.and(Cnd.likeEX("projectName", projectName));
|
||||
}
|
||||
cnd.andEX("YEAR(createTime)", "=", year);
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = leadThoughtInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("添加项目")
|
||||
@SaCheckPermission("leadThought.basic.manage")
|
||||
@SLog(tag = "添加项目", msg = "项目名称:${args[0].projectName}")
|
||||
public Result doAdd(LeadThoughtProject project) {
|
||||
project.setCreateTime(DateUtil.now());
|
||||
dao.insert(project);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("编辑项目")
|
||||
@SaCheckPermission("leadThought.basic.manage")
|
||||
@SLog(tag = "编辑项目", msg = "项目名称:${args[0].projectName}")
|
||||
public Result doEdit(LeadThoughtProject project) {
|
||||
dao.updateIgnoreNull(project);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("删除项目")
|
||||
@SaCheckPermission("leadThought.basic.manage")
|
||||
@SLog(tag = "删除项目", msg = "项目ID:${args[0]}")
|
||||
public Result doDelete(String id) {
|
||||
dao.clear(LeadThoughtProject.class, Cnd.where("id", "=", id));
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("获取项目列表")
|
||||
@SaCheckPermission(value = {"leadThought.manage", "leadThought.apply"}, mode = SaMode.OR)
|
||||
public Result getProjectList() {
|
||||
List<LeadThoughtProject> list = dao.query(LeadThoughtProject.class, Cnd.where("isOpen", "=", 1));
|
||||
return Result.success(list);
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package com.budwk.app.zhgh.activity.leadthought.controller.basic;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
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.zhgh.activity.leadthought.model.LeadThoughtType;
|
||||
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api("思政项目类型管理")
|
||||
@At("/platform/leadThought/basic/type")
|
||||
public class LeadThoughtTypeController {
|
||||
|
||||
|
||||
@Inject
|
||||
private LeadThoughtInfoService leadThoughtInfoService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/activity/leadthought/basic/type/index.html")
|
||||
@SaCheckPermission("leadThought.basic.type")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("数据列表")
|
||||
@SaCheckPermission("leadThought.basic.type")
|
||||
public Result pageData(PageForm pageForm, @Param(value = "typeName") String typeName) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("select * from lead_thought_type $condition");
|
||||
cnd.and(Cnd.likeEX("typeName", typeName));
|
||||
cnd.asc("sortNum");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = leadThoughtInfoService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("添加类型")
|
||||
@SaCheckPermission("leadThought.basic.type")
|
||||
@SLog(tag = "思政板块项目类型添加", msg = "思政板块项目类型添加")
|
||||
public Result doAdd(LeadThoughtType type) {
|
||||
int count = leadThoughtInfoService.count("lead_thought_type", Cnd.where("typeCode", "=", type.getTypeCode()));
|
||||
if (count > 0) {
|
||||
return Result.error("编码重复");
|
||||
}
|
||||
leadThoughtInfoService.dao().insert(type);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("修改类型")
|
||||
@SaCheckPermission("leadThought.basic.type")
|
||||
@SLog(tag = "思政板块项目类型修改", msg = "思政板块项目类型修改")
|
||||
public Result doEdit(LeadThoughtType type) {
|
||||
int count = leadThoughtInfoService.count("lead_thought_type", Cnd.where("typeCode", "=", type.getTypeCode()).and("id", "!=", type.getId()));
|
||||
if (count > 0) {
|
||||
return Result.error("编码重复");
|
||||
}
|
||||
leadThoughtInfoService.dao().update(type);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("删除类型")
|
||||
@SaCheckPermission("leadThought.basic.type")
|
||||
@SLog(tag = "删除类型", msg = "类型ID:${args[0]}")
|
||||
public Result doDelete(String id) {
|
||||
leadThoughtInfoService.clear("lead_thought_type", Cnd.where("id", "=", id));
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("查询所有类型")
|
||||
@SaCheckPermission(value = {"leadThought.manage", "leadThought.apply", "leadThought.type"}, mode = SaMode.OR)
|
||||
public Result findAllType() {
|
||||
List<LeadThoughtType> list = leadThoughtInfoService.dao().query(LeadThoughtType.class, Cnd.where("isOpen", "=", 1).asc("sortNum"));
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
package com.budwk.app.zhgh.activity.leadthought.model;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Table
|
||||
public class LeadThoughtInfo {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("项目id(年度项目)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String manageId;
|
||||
|
||||
@Column
|
||||
@Comment("项目名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String projectName;
|
||||
|
||||
@Column
|
||||
@Comment("申报单位Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String applyUnitId;
|
||||
|
||||
@Column
|
||||
@Comment("申报单位名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String applyUnitName;
|
||||
|
||||
@Column
|
||||
@Comment("联合单位Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String jointUnitId;
|
||||
|
||||
@Column
|
||||
@Comment("联合单位名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String jointUnitName;
|
||||
|
||||
@Column
|
||||
@Comment("负责人Id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String userId;
|
||||
|
||||
@Column
|
||||
@Comment("项目负责人")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String headName;
|
||||
|
||||
@Column
|
||||
@Comment("手机")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("邮箱")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String email;
|
||||
|
||||
@Column
|
||||
@Comment("项目规模(人数)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String numberPeople;
|
||||
|
||||
@Column
|
||||
@Comment("领导参加人数")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String numberLeader;
|
||||
|
||||
@Column
|
||||
@Comment("骨干教师参加人数")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String numberTeacher;
|
||||
|
||||
@Column
|
||||
@Comment("占本单位人数%比")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String unitPercentage;
|
||||
|
||||
@Column
|
||||
@Comment("占本领导人数%比")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String leaderPercentage;
|
||||
|
||||
@Column
|
||||
@Comment("占本骨干教师人数%比")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String teacherPercentage;
|
||||
|
||||
@Column
|
||||
@Comment("项目主题")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||
private String projectTheme;
|
||||
|
||||
@Column
|
||||
@Comment("项目类别ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String typeId;
|
||||
|
||||
@Column
|
||||
@Comment("项目主要内容/进度安排")
|
||||
@ColDefine(type = ColType.TEXT)
|
||||
private String content;
|
||||
|
||||
@Column
|
||||
@Comment("校工会经费合计")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String schoolFundsAmount;
|
||||
|
||||
@Column
|
||||
@Comment("部门经费合计")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String deptFundsAmount;
|
||||
|
||||
@Column
|
||||
@Comment("总计")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String sumFundsAmount;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
@Comment("填报时间")
|
||||
private String applyTime;
|
||||
|
||||
@Column
|
||||
@Comment("项目经费详情")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<LeadThoughtFunds> leadThoughtFunds;
|
||||
|
||||
@Data
|
||||
public static class LeadThoughtFunds {
|
||||
// 开支科目
|
||||
private String expenseAccount;
|
||||
// 向校工会申请经费
|
||||
private String applySchoolMoney;
|
||||
// 部门配套经费
|
||||
private String deptMoney;
|
||||
// 合计
|
||||
private String amountTo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.budwk.app.zhgh.activity.leadthought.model;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
@Data
|
||||
@Table
|
||||
public class LeadThoughtProject {
|
||||
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String manageName;
|
||||
|
||||
@Column
|
||||
@Comment("创建时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String createTime;
|
||||
|
||||
@Column
|
||||
@Comment("排序编号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String sortNum;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@Comment("是否开启")
|
||||
private boolean isOpen;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.budwk.app.zhgh.activity.leadthought.model;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
@Data
|
||||
@Table
|
||||
public class LeadThoughtType {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("类别编码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String typeCode;
|
||||
|
||||
@Column
|
||||
@Comment("类型名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String typeName;
|
||||
|
||||
@Column
|
||||
@Comment("排序编号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String sortNum;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@Comment("是否开启")
|
||||
private boolean isOpen;
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.budwk.app.zhgh.activity.leadthought.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtInfo;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
public interface LeadThoughtInfoService extends BaseService<LeadThoughtInfo> {
|
||||
|
||||
NutMap findOne(String id);
|
||||
|
||||
void buildDbColumn(LeadThoughtInfo info);
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package com.budwk.app.zhgh.activity.leadthought.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.base.utils.DateUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.activity.leadthought.model.LeadThoughtInfo;
|
||||
import com.budwk.app.zhgh.activity.leadthought.service.LeadThoughtInfoService;
|
||||
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.Daos;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class LeadThoughtInfoServiceImpl extends BaseServiceImpl<LeadThoughtInfo> implements LeadThoughtInfoService {
|
||||
|
||||
public LeadThoughtInfoServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NutMap findOne(String id) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
lti.*,
|
||||
ltp.manageName,
|
||||
ltt.typeName
|
||||
FROM
|
||||
`lead_thought_info` lti
|
||||
LEFT JOIN `lead_thought_project` ltp ON ltp.id = lti.manageId
|
||||
LEFT JOIN `lead_thought_type` ltt ON ltt.id = lti.typeId
|
||||
where lti.id=@id
|
||||
""");
|
||||
sql.setParam("id", id);
|
||||
return (NutMap) Daos.query(dao(), sql.toString(), Sqls.callback.map());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDbColumn(LeadThoughtInfo info) {
|
||||
List<LeadThoughtInfo.LeadThoughtFunds> fundsList = info.getLeadThoughtFunds();
|
||||
Double schoolFundsAmount = 0.00;
|
||||
Double deptFundsAmount = 0.00;
|
||||
Double sumFundsAmount = 0.00;
|
||||
for (LeadThoughtInfo.LeadThoughtFunds funds : fundsList) {
|
||||
schoolFundsAmount = schoolFundsAmount + Double.parseDouble(funds.getApplySchoolMoney());
|
||||
deptFundsAmount = deptFundsAmount + Double.parseDouble(funds.getDeptMoney());
|
||||
sumFundsAmount = sumFundsAmount + Double.parseDouble(funds.getAmountTo());
|
||||
}
|
||||
info.setUserId(SecurityUtil.getUserId());
|
||||
info.setApplyTime(DateUtil.getDate());
|
||||
info.setSchoolFundsAmount(String.valueOf(schoolFundsAmount));
|
||||
info.setDeptFundsAmount(String.valueOf(deptFundsAmount));
|
||||
info.setSumFundsAmount(String.valueOf(sumFundsAmount));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.budwk.app.zhgh.activity.leadthought.vo;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.lang.Strings;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author FKY
|
||||
* @name:LeadThoughtPageForm
|
||||
* @Date 2025/10/29 10:26
|
||||
* @注释
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("思政板块公共参数")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class LeadThoughtPageForm extends PageForm {
|
||||
|
||||
@ApiModelProperty("年份")
|
||||
private Integer year;
|
||||
|
||||
@ApiModelProperty("管理Id")
|
||||
private String manageId;
|
||||
|
||||
@ApiModelProperty("项目类型Id")
|
||||
private String typeId;
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
public void buildSearch(Cnd cnd, String prefix){
|
||||
if (cnd == null) {
|
||||
cnd = Cnd.NEW();
|
||||
}
|
||||
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
cnd.and(prefix + "userId", "=", SecurityUtil.getUserId());
|
||||
}
|
||||
|
||||
cnd.andEX("YEAR(%s)".formatted((prefix + "applyTime")), "=", this.getYear());
|
||||
cnd.andEX(prefix + "manageId", "=", this.getManageId());
|
||||
cnd.andEX(prefix + "typeId", "=", this.getTypeId());
|
||||
if (Strings.isNotBlank(this.getProjectName())) {
|
||||
cnd.and(prefix + "projectName", "like", "%" + this.getProjectName() + "%");
|
||||
}
|
||||
cnd.desc(prefix + "applyTime");
|
||||
}
|
||||
}
|
||||
+6
-12
@@ -18,6 +18,7 @@ import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.mode.FundMemberImportExcelMode;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.vo.FundMemberCommonPageForm;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
@@ -43,9 +44,9 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundMember/batchJoin")
|
||||
@Ok("json:full")
|
||||
@Api("基金会员-批量加入")
|
||||
@At("/platform/fundMember/batchJoin")
|
||||
public class FundMemberBatchJoinController {
|
||||
|
||||
@Inject
|
||||
@@ -64,7 +65,7 @@ public class FundMemberBatchJoinController {
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.batchJoin")
|
||||
public Result pageData(PageForm pageForm, String unionId, String unitId, String userState) {
|
||||
public Result pageData(FundMemberCommonPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
id,
|
||||
@@ -72,6 +73,8 @@ public class FundMemberBatchJoinController {
|
||||
loginname,
|
||||
sex,
|
||||
userState,
|
||||
preparedBy,
|
||||
personType,
|
||||
unitName,
|
||||
unionName
|
||||
FROM
|
||||
@@ -80,16 +83,7 @@ public class FundMemberBatchJoinController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("aidFundMember", "!=", 1);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("username", pageForm.getSearchKeyword());
|
||||
seg.orLike("loginname", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
cnd.andEX("unionId", "=", unionId);
|
||||
cnd.andEX("unitId", "=", unitId);
|
||||
cnd.andEX("userState", "=", userState);
|
||||
pageForm.buildSearch(cnd, "");
|
||||
cnd.asc("unionName").asc("unitName").asc("id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
|
||||
+6
-9
@@ -22,6 +22,7 @@ import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberHis;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.vo.FundMemberCommonPageForm;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
@@ -45,9 +46,9 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundMember/query")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "基金会员-查询")
|
||||
@At("/platform/fundMember/query")
|
||||
public class FundMemberQueryController {
|
||||
|
||||
@Inject
|
||||
@@ -66,7 +67,7 @@ public class FundMemberQueryController {
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
public Result pageData(PageForm pageForm, Integer year, String unionId) {
|
||||
public Result pageData(FundMemberCommonPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.id,
|
||||
@@ -75,6 +76,8 @@ public class FundMemberQueryController {
|
||||
u.sex,
|
||||
u.birthday,
|
||||
u.userState,
|
||||
u.preparedBy,
|
||||
u.personType,
|
||||
u.unitName,
|
||||
u.unionName,
|
||||
(SELECT changeTime FROM fund_member_change_record WHERE loginName = u.loginName AND isJoin = 1 ORDER BY changeTime DESC limit 1) joinTime
|
||||
@@ -84,13 +87,7 @@ public class FundMemberQueryController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("u.aidFundMember", "=", 1);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("u.username", pageForm.getSearchKeyword());
|
||||
seg.orLike("u.loginname", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX("u.unionId", "=", unionId);
|
||||
pageForm.buildSearch(cnd, "u.");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
|
||||
+5
@@ -1,9 +1,11 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberChangeRecord;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
@@ -36,5 +38,8 @@ public class FundMemberChangeRecordServiceImpl extends BaseServiceImpl<FundMembe
|
||||
record.setChangeOrigin(changeOrigin);
|
||||
record.setChangeTime(new Date());
|
||||
insert(record);
|
||||
|
||||
// 同步修改人员数据
|
||||
dao().update(Sys_user.class, Chain.make("aidFundMember", isJoin), Cnd.where(Sys_user::getLoginname, "=", loginName));
|
||||
}
|
||||
}
|
||||
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.vo;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author FKY
|
||||
* @name:FundMemberCommonVo
|
||||
* @Date 2025/10/27 17:35
|
||||
* @注释
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("基金会员公共查询VO")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class FundMemberCommonPageForm extends PageForm {
|
||||
|
||||
// 工会id
|
||||
@ApiModelProperty("工会id")
|
||||
private String unionId;
|
||||
|
||||
// 单位id
|
||||
@ApiModelProperty("单位id")
|
||||
private String unitId;
|
||||
|
||||
// 在职状态
|
||||
@ApiModelProperty("在职状态")
|
||||
private List<String> userStates;
|
||||
|
||||
// 在职状态
|
||||
@ApiModelProperty("编制类别")
|
||||
private List<String> preparedBys;
|
||||
|
||||
// 教职工类别
|
||||
@ApiModelProperty("教职工类别")
|
||||
private List<String> personTypes;
|
||||
|
||||
public void buildSearch(Cnd cnd, String prefix){
|
||||
if (cnd == null) {
|
||||
cnd = Cnd.NEW();
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(this.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike(prefix + "username", this.getSearchKeyword());
|
||||
seg.orLike(prefix + "loginname", this.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
cnd.andEX(prefix + "unionId", "=", this.getUnionId());
|
||||
cnd.andEX(prefix + "unitId", "=", this.getUnitId());
|
||||
cnd.andEX(prefix + "userState", "in", this.getUserStates());
|
||||
cnd.andEX(prefix + "preparedBy", "in", this.getPreparedBys());
|
||||
cnd.andEX(prefix + "personType", "in", this.getPersonTypes());
|
||||
}
|
||||
}
|
||||
+8
-3
@@ -5,6 +5,7 @@ import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.pinyin.PinyinUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
@@ -141,19 +142,21 @@ public class TeacherCongressDelegatePushController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("tc.delegate.push")
|
||||
@SLog(tag = "民主管理-教代会代表推选", msg = "获取本分工会下的非代表用户")
|
||||
// @SLog(tag = "民主管理-教代会代表推选", msg = "获取本分工会下的非代表用户")
|
||||
public Result getUnionUser(String sessionId, String unionId) {
|
||||
// 查询预选中的代表
|
||||
Cnd cndx = Cnd.where("sessionId", "=", sessionId);
|
||||
cndx.andEX("unionId", "=", SecurityUtil.getUnionId());
|
||||
List<TeacherCongressDelegatePush> delegateList = dao.query(TeacherCongressDelegatePush.class, cndx);
|
||||
delegateList.sort(Comparator.comparing(u -> PinyinUtil.getFirstLetter(u.getUserName().charAt(0))));
|
||||
|
||||
List<String> userIds = delegateList.stream().map(TeacherCongressDelegatePush::getUserId).toList();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.id AS userId,
|
||||
u.loginname as loginName,
|
||||
u.username as userName,
|
||||
u.professionalTitle,
|
||||
u.professionalTitle,
|
||||
u.professionalLevel,
|
||||
u.sex,
|
||||
u.birthday,
|
||||
@@ -176,7 +179,9 @@ public class TeacherCongressDelegatePushController {
|
||||
cnd.and("tcdp.id", "is", null);
|
||||
cnd.and("u.unionId", "=", SecurityUtil.getUnionId());
|
||||
sql.setCondition(cnd);
|
||||
List userList = baseService.listMap(sql);
|
||||
List<NutMap> userList = baseService.listMap(sql);
|
||||
|
||||
userList.sort(Comparator.comparing(u -> PinyinUtil.getFirstLetter(u.getString("userName").charAt(0))));
|
||||
return Result.success(Map.of("userData", userList, "userValue", delegateList));
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -176,4 +176,8 @@ public class MemberChangeManageController {
|
||||
return Result.success(map);
|
||||
}
|
||||
|
||||
|
||||
public void doExport() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import org.nutz.mvc.annotation.Ok;
|
||||
@IocBean
|
||||
@Api("个人核对")
|
||||
@Ok("json:full")
|
||||
@At("/platform/personnel/check/verification/manage")
|
||||
@At("/platform/personnel/check/verification/single")
|
||||
public class CheckTaskSingleController {
|
||||
|
||||
@Inject
|
||||
|
||||
+2
-3
@@ -91,8 +91,7 @@ public class CheckTaskVerificationController {
|
||||
dao.clear(CheckTaskPersonnel.class, Cnd.where("taskId", "=", vo.getId()));
|
||||
}
|
||||
|
||||
// 插入逻辑
|
||||
|
||||
// 以下是插入逻辑
|
||||
// 1.界面可能会对相关审核步骤做修改,修改审核流程配置
|
||||
dao.update(vo.getBusinessConfig());
|
||||
|
||||
@@ -108,7 +107,7 @@ public class CheckTaskVerificationController {
|
||||
|
||||
|
||||
// 4.读取文件,构造数据(动态字段 data),往 CheckTaskPersonnel 表中插入数据
|
||||
// todo 读取文件 转换成数据
|
||||
// todo 读取文件 转换成数据 同时还要把字段转化成数据库的字段来存储
|
||||
|
||||
|
||||
return Result.success();
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
const branchUnionCadreAudit = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="基层干部">
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<!-- <el-button size="small" @click="doAudit(true)" :disabled="!multipleSelection.length" type="primary"-->
|
||||
<!-- icon="el-icon-check">批量通过-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button size="small" @click="doAudit(false)" :disabled="!multipleSelection.length" type="danger"-->
|
||||
<!-- icon="el-icon-check">批量拒绝-->
|
||||
<!-- </el-button>-->
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id"
|
||||
style="width: 100%" @selection-change="handleSelectionChange" height="65vh">
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod"
|
||||
label="序号" width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template v-if="column.prop==='isJoin'" scope="{row:{isJoin}}">
|
||||
<span v-if="isJoin" class="text-info">加入</span>
|
||||
<span v-else class="text-danger">退出</span>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='instanceState'">
|
||||
<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="180px" v-if="!pageForm.audit">
|
||||
<template scope="{row}">
|
||||
<template v-if="row.taskState === 10">
|
||||
<el-button @click="handleTaskAction(row, 1)" size="mini" type="primary">通过</el-button>
|
||||
<el-button @click="handleTaskAction(row, 2)" size="mini" type="danger">拒绝</el-button>
|
||||
</template>
|
||||
<el-button v-if="row.canRevoke" @click="openRevoke(row)" size="mini" type="danger">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-row class="el-pagination-container" style="margin-bottom: 0">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
`,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
audit: false
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: 'loginName', label: '工号' },
|
||||
{ prop: 'userName', label: '姓名' },
|
||||
{ prop: 'unionName', label: '所属工会' },
|
||||
{ prop: 'mobile', label: '联系方式' },
|
||||
{ prop: 'roleName', label: '职务' },
|
||||
{ prop: 'isJoin', label: '申请类型' },
|
||||
{ prop: "curTaskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
multipleSelection: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
doAudit(pass) {
|
||||
this.$confirm('是否确认提交?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const ids = JSON.stringify(this.multipleSelection.map(v => v.id))
|
||||
this.$axios.post('/platform/sys/union/cadreDoAudit', {ids, pass})
|
||||
.then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.$refs.table.clearSelection();
|
||||
this.$message.success(resp.msg)
|
||||
}else{
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
handleTaskAction(row, val) {
|
||||
const msg = val === 1 ? "通过" : "拒绝"
|
||||
this.$confirm("您确定要" + msg + "吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.formData = {
|
||||
origin: row.origin,
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
pageData() {
|
||||
this.$axios.post('/platform/sys/union/cadrePageData', this.pageForm)
|
||||
.then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ const branchUnionManage = {
|
||||
<el-input placeholder="请输入分工会名称" clearable size="small" style="width: 300px" v-model="pageForm.searchKeyword"></el-input>
|
||||
|
||||
<el-button type="primary" class="ml5" size="small" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
<!-- <el-button icon="el-icon-s-check" type="primary" style="margin-left: auto" size="small">基层干部审核</el-button>-->
|
||||
<el-button @click="openAudit" icon="el-icon-s-check" type="primary" style="margin-left: auto" size="small">基层干部审核</el-button>
|
||||
<el-button @click="openAdd" icon="ti-plus" type="primary" size="small" v-if="$auth.hasPermission('sys.manager.union.add')">新建分工会</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@@ -75,6 +75,10 @@ const branchUnionManage = {
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
})
|
||||
},
|
||||
// 基层干部审核
|
||||
openAudit() {
|
||||
this.$emit('union-cadre')
|
||||
},
|
||||
openAdd() {
|
||||
this.dialogFormVisible = true
|
||||
this.$nextTick(() => {
|
||||
|
||||
@@ -14,7 +14,7 @@ const branchUnionUserManage = {
|
||||
@keyup.enter.native="doSearch"
|
||||
>
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" size="small" placeholder="查询类型"
|
||||
style="width: 120px">
|
||||
style="width: 80px !important;">
|
||||
<el-option label="角色" value="roleName"></el-option>
|
||||
<el-option label="姓名" value="username"></el-option>
|
||||
<el-option label="工号" value="loginname"></el-option>
|
||||
@@ -28,9 +28,11 @@ const branchUnionUserManage = {
|
||||
</el-card>
|
||||
<el-card shadow="never" style="border: 1px solid var(--border-color-lighter); margin-top: 10px">
|
||||
<el-table :data="tableData" border size="small">
|
||||
<el-table-column prop="username" label="姓名"></el-table-column>
|
||||
<el-table-column prop="loginname" label="工号"></el-table-column>
|
||||
<el-table-column prop="roleName" 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="mobile" label="联系方式"></el-table-column>
|
||||
<el-table-column prop="roleName" label="职务"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前状态"></el-table-column>
|
||||
<el-table-column label="操作" width="100px"
|
||||
v-if="$auth.hasPermission('sys.manager.union.branchOfficer')">
|
||||
<template scope="scope">
|
||||
@@ -95,7 +97,7 @@ const branchUnionUserManage = {
|
||||
})
|
||||
},
|
||||
doSubmit() {
|
||||
$.post("/platform/sys/union/insertBranchUnionUserRole", {
|
||||
this.$axios.post("/platform/sys/union/insertBranchUnionUserRole", {
|
||||
...this.formData,
|
||||
unionId: this.union_id
|
||||
}).then((res) => {
|
||||
@@ -103,6 +105,8 @@ const branchUnionUserManage = {
|
||||
this.dialogFormVisible = false
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -3,89 +3,98 @@ layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<el-row type="flex" :gutter="20" style="height: calc(100vh - 126px)">
|
||||
<el-col :span="5">
|
||||
<el-card shadow="never" style="height: 100%" body-style="{ height: '100%' }">
|
||||
<el-input placeholder="输入关键字进行查找" v-model="filterText" clearable></el-input>
|
||||
<div style="max-height: calc(100vh - 200px); overflow-y: auto">
|
||||
<el-tree
|
||||
:data="treeData"
|
||||
ref="treeRef"
|
||||
:expand-on-click-node="false"
|
||||
:props="{
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
}"
|
||||
default-expand-all
|
||||
@node-click="treeNodeClick"
|
||||
:filter-node-method="filterNode"
|
||||
highlight-current
|
||||
>
|
||||
<template slot-scope="{ node, data }">
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-row type="flex" :gutter="20" style="height: calc(100vh - 126px)">
|
||||
<el-col :span="5">
|
||||
<el-card shadow="never" style="height: 100%" body-style="{ height: '100%' }">
|
||||
<el-input placeholder="输入关键字进行查找" v-model="filterText" clearable></el-input>
|
||||
<div style="max-height: calc(100vh - 200px); overflow-y: auto">
|
||||
<el-tree
|
||||
:data="treeData"
|
||||
ref="treeRef"
|
||||
:expand-on-click-node="false"
|
||||
:props="{
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
}"
|
||||
default-expand-all
|
||||
@node-click="treeNodeClick"
|
||||
:filter-node-method="filterNode"
|
||||
highlight-current
|
||||
>
|
||||
<template slot-scope="{ node, data }">
|
||||
<span class="el-tree-node__label">
|
||||
<i class="el-icon-folder-opened" v-if="node.level===1"></i>
|
||||
<i class="el-icon-folder" v-else></i>
|
||||
{{node.label}}
|
||||
</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-card shadow="never">
|
||||
<el-tabs v-model="schoolUnionTabActive" type="card" v-if="currentTreeNode==null || currentTreeNode.level===1">
|
||||
<el-tab-pane name="branchUnionManage">
|
||||
<span slot="label">
|
||||
<i class="el-icon-school"></i>
|
||||
分工会信息
|
||||
</span>
|
||||
<sys-union-branch-union-manage @refresh="getTreeData()"></sys-union-branch-union-manage>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="schoolUnionInfo" v-if="$auth.hasPermission('sys.manager.union.schoolOfficer')">
|
||||
<span slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
校工会信息
|
||||
</span>
|
||||
<sys-union-school-union-user-manage></sys-union-school-union-user-manage>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<el-tabs v-model="branchUnionTabActive" @tab-click="branchTabChange" type="card" v-if="currentTreeNode && currentTreeNode.level===2">
|
||||
<el-tab-pane name="branchUnionUserManage">
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-card shadow="never">
|
||||
<el-tabs v-model="schoolUnionTabActive" type="card" v-if="currentTreeNode==null || currentTreeNode.level===1">
|
||||
<el-tab-pane name="branchUnionManage">
|
||||
<span slot="label">
|
||||
<i class="el-icon-school"></i>
|
||||
分工会信息
|
||||
</span>
|
||||
<sys-union-branch-union-manage @refresh="getTreeData()" @union-cadre="unionCadreInit"></sys-union-branch-union-manage>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="schoolUnionInfo" v-if="$auth.hasPermission('sys.manager.union.schoolOfficer')">
|
||||
<span slot="label">
|
||||
<i class="el-icon-office-building"></i>
|
||||
校工会信息
|
||||
</span>
|
||||
<sys-union-school-union-user-manage></sys-union-school-union-user-manage>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<el-tabs v-model="branchUnionTabActive" @tab-click="branchTabChange" type="card" v-if="currentTreeNode && currentTreeNode.level===2">
|
||||
<el-tab-pane name="branchUnionUserManage">
|
||||
<span slot="label">
|
||||
<i class="el-icon-school"></i>
|
||||
分工会干部
|
||||
</span>
|
||||
<sys-union-branch-union-user-manage
|
||||
ref="branchUnionUserManageRef"
|
||||
:union_id="currentTreeData.id"
|
||||
></sys-union-branch-union-user-manage>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="branchUnionPartUnitManage">
|
||||
<sys-union-branch-union-user-manage
|
||||
ref="branchUnionUserManageRef"
|
||||
:union_id="currentTreeData.id"
|
||||
></sys-union-branch-union-user-manage>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="branchUnionPartUnitManage">
|
||||
<span slot="label">
|
||||
<i class="el-icon-school"></i>
|
||||
组成单位
|
||||
</span>
|
||||
<sys-union-branch-union-part-unit-manage
|
||||
ref="branchUnionPartUnitManageRef"
|
||||
:union_id="currentTreeData.id"
|
||||
></sys-union-branch-union-part-unit-manage>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="branchUnionGroup">
|
||||
<sys-union-branch-union-part-unit-manage
|
||||
ref="branchUnionPartUnitManageRef"
|
||||
:union_id="currentTreeData.id"
|
||||
></sys-union-branch-union-part-unit-manage>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="branchUnionGroup">
|
||||
<span slot="label">
|
||||
<i class="el-icon-school"></i>
|
||||
工会小组
|
||||
</span>
|
||||
<sys-union-branch-union-group-manage
|
||||
ref="branchUnionGroupRef"
|
||||
:union_id="currentTreeData.id"
|
||||
></sys-union-branch-union-group-manage>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<sys-union-branch-union-group-manage
|
||||
ref="branchUnionGroupRef"
|
||||
:union_id="currentTreeData.id"
|
||||
></sys-union-branch-union-group-manage>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<sys-union-branch-union-cadre-audit ref="unionCadreAuditRef">
|
||||
</sys-union-branch-union-cadre-audit>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -94,6 +103,7 @@ layout("/layouts/platform.html"){
|
||||
<!--#include("branchUnionUserManage.js"){}#-->
|
||||
<!--#include("branchUnionPartUnitManage.js"){}#-->
|
||||
<!--#include("branchUnionGroupManage.js"){}#-->
|
||||
<!--#include("branchUnionCadreAudit.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
@@ -102,7 +112,8 @@ layout("/layouts/platform.html"){
|
||||
"sys-union-school-union-user-manage": schoolUnionUserManage,
|
||||
"sys-union-branch-union-user-manage": branchUnionUserManage,
|
||||
"sys-union-branch-union-part-unit-manage": branchUnionPartUnitManage,
|
||||
"sys-union-branch-union-group-manage": branchUnionGroupManage
|
||||
"sys-union-branch-union-group-manage": branchUnionGroupManage,
|
||||
"sys-union-branch-union-cadre-audit": branchUnionCadreAudit
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -144,7 +155,14 @@ layout("/layouts/platform.html"){
|
||||
this.$nextTick(() => {
|
||||
this.$refs[val.name + "Ref"].doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 基层干部审核初始化
|
||||
unionCadreInit() {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.unionCadreAuditRef.pageData()
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getTreeData()
|
||||
|
||||
@@ -0,0 +1,328 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="思政申报" define_key="SZBKSB"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-descriptions :column="3" border>
|
||||
|
||||
<el-descriptions-item label="归属项目" :span="1.5">
|
||||
<el-form-item prop="manageId">
|
||||
<el-select v-model="formData.manageId" placeholder="请选择项目名称" clearable>
|
||||
<el-option v-for="o in projectList" :label="o.manageName" :value="o.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目名称" :span="1.5">
|
||||
<el-form-item prop="projectName">
|
||||
<el-input placeholder="请填写项目名称" v-model="formData.projectName" maxlength="100"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="申报单位">
|
||||
<el-form-item prop="applyUnitName">
|
||||
<el-input placeholder="申报单位" readonly v-model="formData.applyUnitName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联合单位">
|
||||
<el-form-item prop="jointUnitId">
|
||||
<el-select placeholder="联合单位" v-model="formData.jointUnitId"
|
||||
style="width: 100%;"
|
||||
@change="changeJointUnit"
|
||||
clearable filterable>
|
||||
<el-option v-for="item in units" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申报时间">
|
||||
<el-form-item prop="applyTime">
|
||||
<el-date-picker
|
||||
readonly
|
||||
placeholder="申报时间"
|
||||
type="date"
|
||||
v-model="formData.applyTime"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="负责人">
|
||||
<el-form-item prop="headName">
|
||||
<el-input placeholder="负责人" readonly v-model="formData.headName"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input placeholder="联系方式" v-model="formData.mobile" maxlength="11"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="邮箱">
|
||||
<el-form-item prop="email">
|
||||
<el-input placeholder="邮箱" v-model="formData.email" maxlength="20"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="项目规模(人数)">
|
||||
<el-form-item prop="numberPeople">
|
||||
<el-input-number placeholder="项目规模(人数)" v-model="formData.numberPeople"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="领导参加人数">
|
||||
<el-form-item prop="numberLeader">
|
||||
<el-input-number placeholder="领导参加人数" v-model="formData.numberLeader"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="骨干教师参加人数">
|
||||
<el-form-item prop="numberTeacher">
|
||||
<el-input-number placeholder="骨干教师参加人数" v-model="formData.numberTeacher"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="单位人数占比">
|
||||
<el-form-item prop="unitPercentage">
|
||||
<el-input-number placeholder="占本单位人数百分比" v-model="formData.unitPercentage"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="领导人数占比">
|
||||
<el-form-item prop="leaderPercentage">
|
||||
<el-input-number placeholder="占本领导人数百分比" v-model="formData.leaderPercentage"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="骨干教师人数占比">
|
||||
<el-form-item prop="teacherPercentage">
|
||||
<el-input placeholder="占本骨干教师人数百分比" v-model="formData.teacherPercentage"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="项目类别">
|
||||
<el-form-item prop="typeId">
|
||||
<el-select v-model="formData.typeId" placeholder="请选择项目类别" clearable>
|
||||
<el-option v-for="o in typeList" :label="o.typeName" :value="o.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目主题" :span="2">
|
||||
<el-form-item prop="projectTheme">
|
||||
<el-input placeholder="项目主题" v-model="formData.projectTheme" maxlength="255"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="项目经费预算" :span="3">
|
||||
<el-form-item prop="leadThoughtFunds">
|
||||
<el-table :data="formData.leadThoughtFunds" border size="small">
|
||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="开支科目" prop="expenseAccount">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.expenseAccount" maxlength="100"
|
||||
placeholder="请填写开支科目"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="向校工会申请经费(元)" prop="applySchoolMoney">
|
||||
<template slot-scope="{row}">
|
||||
<el-input @input="changNum(row)" v-model="row.applySchoolMoney"
|
||||
oninput="value=value.replace(/[^0-9.]/g,'')" placeholder="请填写向校工会申请经费"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="部门配套经费(元)" prop="deptMoney">
|
||||
<template slot-scope="{row}">
|
||||
<el-input @input="changNum(row)" v-model="row.deptMoney"
|
||||
oninput="value=value.replace(/[^0-9.]/g,'')" placeholder="请填写部门配套经费"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="合计(元)" prop="amountTo">
|
||||
<template slot-scope="{row}">
|
||||
<el-input readonly v-model="row.amountTo" placeholder="填写前两项后自动计算"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column width="100px">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button type="primary" size="mini"
|
||||
@click="formData.leadThoughtFunds.push({})">添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini"
|
||||
:disabled="formData.leadThoughtFunds.length===0"
|
||||
@click="formData.leadThoughtFunds.splice(scope.$index,1)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="项目主要内容/进度安排">
|
||||
<el-form-item prop="content">
|
||||
<text-editor v-model="formData.content"></text-editor>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</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="onFinishTask" v-else>提交</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {
|
||||
leadThoughtFunds: []
|
||||
},
|
||||
formRules: {
|
||||
manageId: [{required: true, message: '请选择归属项目', trigger: ['blur', 'change']}],
|
||||
projectName: [{required: true, message: '请填写项目名称', trigger: ['blur', 'change']}],
|
||||
applyUnitName: [{required: true, message: '请填写申报单位', trigger: ['blur', 'change']}],
|
||||
headName: [{required: true, message: '请填写项目负责人', trigger: ['blur', 'change']}],
|
||||
mobile: [{required: true, message: '请填写手机', trigger: ['blur', 'change']}],
|
||||
email: [{required: true, message: '请填写邮箱', trigger: ['blur', 'change']}],
|
||||
numberPeople: [{required: true, message: '请填写项目规模(人数)', trigger: ['blur', 'change']}],
|
||||
numberLeader: [{required: true, message: '请填写领导参加人数', trigger: ['blur', 'change']}],
|
||||
numberTeacher: [{required: true, message: '请填写骨干教师参加人数', trigger: ['blur', 'change']}],
|
||||
unitPercentage: [{required: true, message: '请填写占本单位人数%比', trigger: ['blur', 'change']}],
|
||||
leaderPercentage: [{required: true, message: '请填写占本领导人数%比', trigger: ['blur', 'change']}],
|
||||
teacherPercentage: [{required: true, message: '请填写占本骨干教师人数%比', trigger: ['blur', 'change']}],
|
||||
projectTheme: [{required: true, message: '请填写项目主题', trigger: ['blur', 'change']}],
|
||||
typeId: [{required: true, message: '请选择项目类别', trigger: ['blur', 'change']}],
|
||||
leadThoughtFunds: [{required: true, message: '请填写项目经费预算', trigger: ['blur', 'change']}],
|
||||
content: [{required: true, message: '请填写项目主要内容/进度安排', trigger: ['blur', 'change']}],
|
||||
},
|
||||
projectList: [],
|
||||
typeList: [],
|
||||
units: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changNum(value) {
|
||||
value.amountTo = null
|
||||
if (!isNaN(value.applySchoolMoney) && value.applySchoolMoney !== undefined && value.applySchoolMoney !== '' &&
|
||||
!isNaN(value.deptMoney) && value.deptMoney !== undefined && value.deptMoney !== '') {
|
||||
value.amountTo = parseInt(value.applySchoolMoney) + parseInt(value.deptMoney)
|
||||
}
|
||||
},
|
||||
changeJointUnit(val) {
|
||||
const data = this.units.find(item => item.id === val)
|
||||
this.$set(this.formData, "jointUnitName", data?.name)
|
||||
},
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post('/platform/leadThought/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush('/platform/leadThought/mine')
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post('/platform/leadThought/apply/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush('/platform/leadThought/mine')
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onFinishTask() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post('/platform/leadThought/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: this.taskId,
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush('/platform/leadThought/mine')
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
init() {
|
||||
if (this.id) {
|
||||
this.$axios.post("/platform/leadThought/apply/findWriteInfo", {id: this.id})
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const user = this.$store.state.user
|
||||
this.$set(this.formData, 'mobile', user.mobile)
|
||||
this.$set(this.formData, 'email', user.email)
|
||||
this.$set(this.formData, 'headName', user.username)
|
||||
this.$set(this.formData, 'applyUnitId', user.unit.id)
|
||||
this.$set(this.formData, 'applyUnitName', user.unit.name)
|
||||
this.$set(this.formData, 'applyTime', moment().format('YYYY-MM-DD'))
|
||||
}
|
||||
},
|
||||
async getProjectList() {
|
||||
const resp = await this.$axios.post('/platform/leadThought/basic/manage/getProjectList')
|
||||
this.projectList = resp.data
|
||||
},
|
||||
async getAllType() {
|
||||
const resp = await this.$axios.post('/platform/leadThought/basic/type/findAllType')
|
||||
this.typeList = resp.data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
await this.getProjectList()
|
||||
await this.getAllType()
|
||||
this.units = await this.$businessTool.listUnit()
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,185 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.dialog-footer .el-button {
|
||||
padding: 12px 30px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="项目名称">
|
||||
<el-input placeholder="请输入项目名称" clearable v-model="pageForm.projectName"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="项目列表">
|
||||
<el-button @click="openAdd" size="medium" type="primary">新建项目</el-button>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='isOpen'">
|
||||
<el-switch @change="switchChange(row)" v-model="row.isOpen"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="doDelete(row)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" :close-on-click-modal="false" width="40%">
|
||||
<el-form :model="formData" ref="addForm" :rules="formRules"
|
||||
label-width="100px">
|
||||
<el-form-item label="项目名称" prop="manageName">
|
||||
<el-input type="text" v-model="formData.manageName" maxlength="50" placeholder="请输入项目名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否开启" prop="isOpen">
|
||||
<el-switch v-model="formData.isOpen" active-color="#13ce66"
|
||||
inactive-color="#ff4949"></el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" :disabled="subDis" @click="operation">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
title: "",
|
||||
subDis: false,
|
||||
dialogVisible: false,
|
||||
tabLoading: false,
|
||||
pageForm: {},
|
||||
formRules: {
|
||||
manageName: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
||||
},
|
||||
formData: {},
|
||||
tableColumns: [
|
||||
{label: '名称', prop: 'manageName', sortable: true},
|
||||
{label: '创建时间', prop: 'createTime', sortable: true},
|
||||
{label: '是否开启', prop: 'isOpen'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openAdd() {
|
||||
this.title = "添加项目"
|
||||
this.formData = {
|
||||
isOpen: true
|
||||
}
|
||||
this.dialogVisible = true;
|
||||
if (this.$refs['addForm']) {
|
||||
this.$refs['addForm'].resetFields()
|
||||
}
|
||||
},
|
||||
openEdit(data) {
|
||||
this.title = "编辑项目"
|
||||
this.formData = data
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
async operation() {
|
||||
let method = this.formData.id ? "/doEdit" : "/doAdd"
|
||||
this.$refs["addForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: "正在提交中。。。",
|
||||
spinner: "el-icon-loading",
|
||||
background: "rgba(0, 0, 0, 0.7)"
|
||||
});
|
||||
const resp = await this.$axios.post(loc() + method, this.formData)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.dialogVisible = false
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async doDelete(row) {
|
||||
this.$confirm('确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" === a) {
|
||||
const resp = await this.$axios.post(loc() + "/doDelete", {id: row.id})
|
||||
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async switchChange(data) {
|
||||
this.formData = data
|
||||
const resp = await this.$axios.post(loc() + "/doEdit", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,179 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
|
||||
<search @search="doSearch">
|
||||
<search-item label="类别名称">
|
||||
<el-input @keyup.enter.native="doSearch" clearable
|
||||
placeholder="请输入类别名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.typeName">
|
||||
</el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="类别列表">
|
||||
<el-button @click="openAdd" size="medium" type="primary">新建类别</el-button>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='isOpen'">
|
||||
<el-switch @change="switchChange(row)" v-model="row.isOpen"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="doDelete(row)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" :close-on-click-modal="false" width="40%">
|
||||
<el-form :model="formData" ref="addForm" :rules="formRules"
|
||||
label-width="100px">
|
||||
<el-form-item label="类别编码" prop="typeCode">
|
||||
<el-input type="text" v-model="formData.typeCode" maxlength="50" placeholder="请填写类别编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序编号" prop="sortNum">
|
||||
<el-input type="text" v-model="formData.sortNum" maxlength="50" placeholder="请填写排序编号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="类别名称" prop="typeName">
|
||||
<el-input type="text" v-model="formData.typeName" maxlength="50" placeholder="请填写类别名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否开启" prop="isOpen">
|
||||
<el-switch v-model="formData.isOpen" active-color="#13ce66"
|
||||
inactive-color="#ff4949"></el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" :disabled="subDis" @click="operation">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {},
|
||||
title: '',
|
||||
dialogVisible: false,
|
||||
subDis: false,
|
||||
tableColumns: [
|
||||
{label: '类别编码', prop: 'typeCode', sortable: true},
|
||||
{label: '排序编号', prop: 'sortNum', sortable: true},
|
||||
{label: '类别名称', prop: 'typeName', sortable: true},
|
||||
{label: '是否开启', prop: 'isOpen'},
|
||||
],
|
||||
formData: {},
|
||||
formRules: {
|
||||
typeName: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
||||
typeCode: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
||||
sortNum: [{required: false, message: '必选', trigger: ['blur', 'change']}],
|
||||
isOpen: [{required: false, message: '必选', trigger: ['blur', 'change']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openAdd() {
|
||||
this.title = "添加类别"
|
||||
this.formData = {
|
||||
isOpen: true
|
||||
}
|
||||
this.dialogVisible = true;
|
||||
if (this.$refs['addForm']) {
|
||||
this.$refs['addForm'].resetFields()
|
||||
}
|
||||
},
|
||||
openEdit(data) {
|
||||
this.title = "编辑类别"
|
||||
this.formData = data
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
async operation() {
|
||||
let method = this.formData.id ? "/doEdit" : "/doAdd"
|
||||
this.$refs["addForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: "正在提交中。。。",
|
||||
spinner: "el-icon-loading",
|
||||
background: "rgba(0, 0, 0, 0.7)"
|
||||
});
|
||||
const resp = await this.$axios.post(loc() + method, this.formData)
|
||||
|
||||
if (resp.code === 0) {
|
||||
this.dialogVisible = false
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
loading.close()
|
||||
}
|
||||
});
|
||||
},
|
||||
async doDelete(row) {
|
||||
this.$confirm('确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" === a) {
|
||||
const resp = await this.$axios.post(loc() + "/doDelete", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async switchChange(data) {
|
||||
this.formData = data
|
||||
const resp = await this.$axios.post(loc() + "/doEdit", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<common-query ref="commonQueryRef" @search="search"></common-query>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool>
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<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" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='instanceState'">
|
||||
<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="300">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="openRevoke(row)" size="mini" type="danger">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
<template #edit>
|
||||
<info ref="infoRef">
|
||||
<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(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
<!--#include("../common/commonQuery.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
audit: false
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: 'projectName', label: '项目名称', sortable: true},
|
||||
{ prop: 'applyUnitName', label: '申报单位', sortable: true},
|
||||
{ prop: 'headName', label: '项目负责人', sortable: true},
|
||||
{ prop: 'projectTheme', label: '项目主题', sortable: true},
|
||||
{ prop: 'numberPeople', label: '项目规模(人数)', sortable: true},
|
||||
{ prop: 'numberLeader', label: '领导人数', sortable: true},
|
||||
{ prop: 'numberTeacher', label: '骨干教师人数', sortable: true},
|
||||
{ prop: "curTaskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
|
||||
// 审核相关
|
||||
showApprovalForm: false,
|
||||
formData: {
|
||||
tf_opinion: ""
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': INFO,
|
||||
'common-query': COMMON_QUERY,
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openApproval(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
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()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
openRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(()=>{
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
search(pageForm){
|
||||
if (pageForm) {
|
||||
this.pageForm = {...this.pageForm, ...pageForm}
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,82 @@
|
||||
const COMMON_QUERY = {
|
||||
template: /*language=HTML*/ `
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="项目名称">
|
||||
<el-input placeholder="请选择项目名称" clearable v-model="pageForm.projectName"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
|
||||
<search-item label="归属专题">
|
||||
<el-select v-model="pageForm.manageId" placeholder="请选择归属专题"
|
||||
style="width: 100%;"
|
||||
clearable
|
||||
@change="doSearch()"
|
||||
filterable>
|
||||
<el-option v-for="o in projectList"
|
||||
:label="o.manageName"
|
||||
:value="o.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="归属类目">
|
||||
<el-select v-model="pageForm.typeId" placeholder="请选择归属类目"
|
||||
style="width: 100%;" clearable @change="doSearch()" filterable>
|
||||
<el-option v-for="o in typeList"
|
||||
:label="o.typeName"
|
||||
:value="o.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
`,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
searchKeyword: '',
|
||||
year: moment().format('YYYY'),
|
||||
projectName: '',
|
||||
manageId: '',
|
||||
typeId: ''
|
||||
},
|
||||
typeList: [],
|
||||
projectList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.$emit('search', this.pageForm)
|
||||
},
|
||||
getProjectList() {
|
||||
this.$axios.post('/platform/leadThought/basic/manage/getProjectList')
|
||||
.then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.projectList = resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getAllType() {
|
||||
this.$axios.post('/platform/leadThought/basic/type/findAllType')
|
||||
.then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.typeList = resp.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getProjectList()
|
||||
this.getAllType()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
const INFO = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">
|
||||
申报信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="归属项目" :span="1.5">{{ viewData.manageName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="项目名称" :span="1.5">{{ viewData.projectName }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="申报单位">{{ viewData.applyUnitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联合单位">{{ viewData.jointUnitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申报时间">{{ viewData.applyTime }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="负责人">{{ viewData.headName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">{{ viewData.mobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="邮箱">{{ viewData.email }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="项目规模(人数)">{{ viewData.numberPeople }}</el-descriptions-item>
|
||||
<el-descriptions-item label="领导参加人数">{{ viewData.numberLeader }}</el-descriptions-item>
|
||||
<el-descriptions-item label="骨干教师参加人数">{{ viewData.numberTeacher }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="占单位人数比">{{ viewData.unitPercentage }}</el-descriptions-item>
|
||||
<el-descriptions-item label="占领导人数比">{{ viewData.numberLeader }}</el-descriptions-item>
|
||||
<el-descriptions-item label="占骨干教师人数比">{{ viewData.teacherPercentage }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="项目类别">{{ viewData.typeName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="项目主题" :span="2">{{ viewData.projectTheme }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="项目经费预算" :span="3">
|
||||
<el-table v-if="viewData.leadThoughtFunds && viewData.leadThoughtFunds.length"
|
||||
:data="viewData.leadThoughtFunds" size="mini" border
|
||||
:header-cell-style="{background:'#eff3f6'}"
|
||||
style="width: 100%">
|
||||
<el-table-column prop="expenseAccount" label="开支科目" align="center"></el-table-column>
|
||||
<el-table-column prop="applySchoolMoney" label="向校工会申请经费" align="center"></el-table-column>
|
||||
<el-table-column prop="deptMoney" label="部门配套经费" align="center"></el-table-column>
|
||||
<el-table-column prop="amountTo" label="合计" align="center"></el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-else :image-size="50" description="暂无家庭成员信息"></el-empty>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="活动内容与形式" :span="3">
|
||||
<div class="text-left" v-html="viewData.content"></div>
|
||||
</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="办理意见" :span="3" 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 {
|
||||
row: {},
|
||||
viewData: {},
|
||||
doneTasks: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.info()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
info() {
|
||||
this.$axios.post("/platform/leadThought/mine/findOne", { id: this.row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
this.viewData.leadThoughtFunds = JSON.parse(res.data.leadThoughtFunds)
|
||||
}
|
||||
})
|
||||
},
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<common-query ref="commonQueryRef" @search="search"></common-query>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool></table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="220" fixed="right">
|
||||
<template slot-scope="{row}">
|
||||
<!-- <el-button size="mini" @click="openView(row)">查看</el-button>-->
|
||||
<!-- <el-button size="mini" v-if="[6250].includes(row.state)"-->
|
||||
<!-- @click="exportInfo(row.id)">导出-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button @click="openEdit(row)" size="mini" type="primary"-->
|
||||
<!-- v-if="[6000,6100,6125,6200].includes(row.state)">-->
|
||||
<!-- 编辑-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button @click="doDelete(row.id)" size="mini" type="danger"-->
|
||||
<!-- v-if="[6000,6100,6125,6200].includes(row.state)">删除-->
|
||||
<!-- </el-button>-->
|
||||
|
||||
<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 #view>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
<!--#include("../common/commonQuery.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{ prop: 'projectName', label: '项目名称', sortable: true},
|
||||
{ prop: 'manageName', label: '专题名称', sortable: true},
|
||||
{ prop: 'applyUnitName', label: '申报单位', sortable: true},
|
||||
{ prop: 'headName', label: '项目负责人', sortable: true},
|
||||
{ prop: 'typeName', label: '归属类目', sortable: true},
|
||||
{ prop: 'projectTheme', label: '项目主题', sortable: true},
|
||||
{ prop: 'numberPeople', label: '项目规模(人数)', sortable: true},
|
||||
{ prop: 'numberLeader', label: '领导人数', sortable: true},
|
||||
{ prop: 'numberTeacher', label: '骨干教师人数', sortable: true},
|
||||
{ prop: "taskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': INFO,
|
||||
'common-query': COMMON_QUERY,
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
commonUtil.pjaxPush('/platform/leadThought/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((resp) => {
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/platform/leadThought/mine/onDelete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(res.msg)
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
exportInfo(id) {
|
||||
window.open('/platform/leadThought/stat/exportInfo?id=' + id)
|
||||
},
|
||||
search(pageForm){
|
||||
if (pageForm) {
|
||||
this.pageForm = {...this.pageForm, ...pageForm}
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,117 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<common-query ref="commonQueryRef" @search="search"></common-query>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool>
|
||||
<!-- <el-button size="mini" type="primary" @click="exportAllInfo">导出全部</el-button>-->
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='instanceState'">
|
||||
<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="180">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" @click="openView(row)">查看</el-button>
|
||||
<el-button size="mini" type="primary" @click="exportInfo(row.id)">导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
<!--#include("../common/commonQuery.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{ prop: 'projectName', label: '项目名称', sortable: true},
|
||||
{ prop: 'manageName', label: '专题名称', sortable: true},
|
||||
{ prop: 'applyUnitName', label: '申报单位', sortable: true},
|
||||
{ prop: 'headName', label: '项目负责人', sortable: true},
|
||||
{ prop: 'typeName', label: '归属类目', sortable: true},
|
||||
{ prop: 'projectTheme', label: '项目主题', sortable: true},
|
||||
{ prop: 'numberPeople', label: '项目规模(人数)', sortable: true},
|
||||
{ prop: 'numberLeader', label: '领导人数', sortable: true},
|
||||
{ prop: 'numberTeacher', label: '骨干教师人数', sortable: true},
|
||||
// { prop: "curTaskName", label: "当前节点" },
|
||||
// { prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': INFO,
|
||||
'common-query': COMMON_QUERY,
|
||||
},
|
||||
methods: {
|
||||
exportAllInfo() {
|
||||
// const {searchName, searchKeyword, year, manageId, typeId, projectName} = this.pageForm
|
||||
// window.open('/platform/leadThought/stat/exportAllInfo?searchName=' + searchName +
|
||||
// "&searchKeyword=" + searchKeyword +
|
||||
// "&year=" + year +
|
||||
// "&manageId=" + manageId +
|
||||
// "&typeId=" + typeId +
|
||||
// "&projectName=" + projectName)
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
exportInfo(id) {
|
||||
this.$downLoad('/platform/leadThought/query/exportInfo', {id})
|
||||
},
|
||||
search(pageForm){
|
||||
if (pageForm) {
|
||||
this.pageForm = {...this.pageForm, ...pageForm}
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+196
@@ -0,0 +1,196 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<common-query ref="commonQueryRef" @search="search"></common-query>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool>
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<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" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='instanceState'">
|
||||
<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="300">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="openRevoke(row)" size="mini" type="danger">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
<template #edit>
|
||||
<info ref="infoRef">
|
||||
<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(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
<!--#include("../common/commonQuery.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
audit: false
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: 'projectName', label: '项目名称', sortable: true},
|
||||
{ prop: 'manageName', label: '专题名称', sortable: true},
|
||||
{ prop: 'applyUnitName', label: '申报单位', sortable: true},
|
||||
{ prop: 'headName', label: '项目负责人', sortable: true},
|
||||
{ prop: 'typeName', label: '归属类目', sortable: true},
|
||||
{ prop: 'projectTheme', label: '项目主题', sortable: true},
|
||||
{ prop: 'numberPeople', label: '项目规模(人数)', sortable: true},
|
||||
{ prop: 'numberLeader', label: '领导人数', sortable: true},
|
||||
{ prop: 'numberTeacher', label: '骨干教师人数', sortable: true},
|
||||
{ prop: "curTaskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
|
||||
// 审核相关
|
||||
showApprovalForm: false,
|
||||
formData: {
|
||||
tf_opinion: ""
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': INFO,
|
||||
'common-query': COMMON_QUERY,
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openApproval(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
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()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
openRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(()=>{
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
search(pageForm){
|
||||
debugger
|
||||
if (pageForm) {
|
||||
this.pageForm = {...this.pageForm, ...pageForm}
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+68
-11
@@ -10,8 +10,8 @@ layout("/layouts/platform.html"){
|
||||
clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择所属工会" clearable>
|
||||
<el-select v-model="pageForm.unionId" @change="flushUnits" @clear="flushUnits"
|
||||
style="width: 100%" placeholder="请选择所属工会" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
@@ -19,6 +19,30 @@ layout("/layouts/platform.html"){
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属单位">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择所属单位" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="在职状态">
|
||||
<dict-select v-model="pageForm.userStates" placeholder="请选择在职状态" @change="doSearch"
|
||||
code="USER_STATE" multiple collapse-tags></dict-select>
|
||||
</search-item>
|
||||
<search-item label="教职工类别">
|
||||
<dict-select v-model="pageForm.personTypes" placeholder="请选择教职工类别" @change="doSearch"
|
||||
code="USER_PERSON_TYPE" multiple collapse-tags></dict-select>
|
||||
</search-item>
|
||||
<search-item label="编制类别">
|
||||
<dict-select v-model="pageForm.preparedBys" placeholder="请选择编制类别" @change="doSearch"
|
||||
code="USER_PREPARED_BY_TYPE" multiple collapse-tags></dict-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
@@ -76,17 +100,26 @@ layout("/layouts/platform.html"){
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: "工号", prop: "loginname"},
|
||||
{label: "姓名", prop: "username"},
|
||||
{label: "性别", prop: "sex"},
|
||||
{label: "出生年月", prop: "birthday"},
|
||||
{label: "在职状态", prop: "userState"},
|
||||
{label: "所属单位", prop: "unitName"},
|
||||
{label: "所属工会", prop: "unionName"},
|
||||
{ label: "工号", prop: "loginname" },
|
||||
{ label: "姓名", prop: "username" },
|
||||
{ label: "性别", prop: "sex" },
|
||||
{ label: "出生年月", prop: "birthday" },
|
||||
{ label: "在职状态", prop: "userState", sortable: true },
|
||||
{ label: "教职工类别", prop: "personType", sortable: true },
|
||||
{ label: '编制类别', prop: 'preparedBy', sortable: true },
|
||||
{ label: "所属工会", prop: "unionName" },
|
||||
{ label: "所属单位", prop: "unitName" },
|
||||
],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
pageForm: {
|
||||
approval: false
|
||||
approval: false,
|
||||
searchKeyword: '',
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
userStates: [],
|
||||
personTypes: [],
|
||||
preparedBys: [],
|
||||
},
|
||||
formData: {},
|
||||
showImportDialog: false
|
||||
@@ -114,10 +147,34 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
|
||||
this.units = data
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
pageData() {
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
|
||||
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
|
||||
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
|
||||
this.$axios.post('/platform/fundMember/batchJoin/pageData', pageForm)
|
||||
.then(res => {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
const role = this.$auth.hasRoleOr("SYSADMIN, SCHOOL_UNION_ADMIN")
|
||||
this.$businessTool.listUnit(role ? null : this.$store.state.user.union.id).then((res) => (this.unitOptions = res))
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -5,24 +5,48 @@ layout("/layouts/platform.html"){
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="请选择年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<!-- <search-item label="年度">-->
|
||||
<!-- <el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="请选择年度"-->
|
||||
<!-- style="width: 100%"></el-date-picker>-->
|
||||
<!-- </search-item>-->
|
||||
<search-item label="姓名/工号">
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="请输入姓名或工号"
|
||||
clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择所属工会" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" @change="flushUnits" @clear="flushUnits"
|
||||
style="width: 100%" placeholder="请选择所属工会" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="所属单位">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择所属单位" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="在职状态">
|
||||
<dict-select v-model="pageForm.userStates" placeholder="请选择在职状态" @change="doSearch"
|
||||
code="USER_STATE" multiple collapse-tags></dict-select>
|
||||
</search-item>
|
||||
<search-item label="教职工类别">
|
||||
<dict-select v-model="pageForm.personTypes" placeholder="请选择教职工类别" @change="doSearch"
|
||||
code="USER_PERSON_TYPE" multiple collapse-tags></dict-select>
|
||||
</search-item>
|
||||
<search-item label="编制类别">
|
||||
<dict-select v-model="pageForm.preparedBys" placeholder="请选择编制类别" @change="doSearch"
|
||||
code="USER_PREPARED_BY_TYPE" multiple collapse-tags></dict-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
@@ -84,15 +108,19 @@ layout("/layouts/platform.html"){
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: "工号", prop: "loginName"},
|
||||
{label: "姓名", prop: "userName"},
|
||||
{label: "性别", prop: "sex"},
|
||||
{label: "出生年月", prop: "birthday"},
|
||||
{label: "在职状态", prop: "userState"},
|
||||
{label: "所属工会", prop: "unionName"},
|
||||
{label: "加入时间", prop: "joinTime"},
|
||||
{ label: "工号", prop: "loginName" },
|
||||
{ label: "姓名", prop: "userName" },
|
||||
{ label: "性别", prop: "sex" },
|
||||
{ label: "出生年月", prop: "birthday" },
|
||||
{ label: "在职状态", prop: "userState", sortable: true },
|
||||
{ label: "教职工类别", prop: "personType", sortable: true },
|
||||
{ label: '编制类别', prop: 'preparedBy', sortable: true },
|
||||
{ label: "所属工会", prop: "unionName" },
|
||||
{ label: "所属单位", prop: "unitName" },
|
||||
{ label: "加入时间", prop: "joinTime" },
|
||||
],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
@@ -157,8 +185,29 @@ layout("/layouts/platform.html"){
|
||||
// 导出本年新会员名单
|
||||
exportNewMemberExcel(){
|
||||
this.$downLoad('/platform/fundMember/query/exportNewMemberExcel')
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
|
||||
this.units = data
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
pageData() {
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
|
||||
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
|
||||
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
|
||||
this.$axios.post('/platform/fundMember/query/pageData', pageForm)
|
||||
.then(res => {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
|
||||
@@ -4,7 +4,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="医疗互助基金会员入会申请" define_key="FUND_MEMBER"></snaker-start>
|
||||
<snaker-start slot="header" label="基金会员入会申请" define_key="FUND_MEMBER"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="120px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
|
||||
+99
-17
@@ -70,16 +70,51 @@ layout("/layouts/platform.html"){
|
||||
<dict-select v-model="pageForm.USER_CHANGE_TYPE" placeholder="异动类型" @change="doSearch"
|
||||
code="UserType"></dict-select>
|
||||
</div>-->
|
||||
|
||||
|
||||
<el-button type="primary" size="small" icon="el-icon-printer" @click="exportExcel">导出会员名单</el-button>
|
||||
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
trigger="click"
|
||||
width="200">
|
||||
|
||||
<div style="padding:4px 0;border-bottom:1px solid #eee;">
|
||||
<el-button size="mini" @click="checkAll">全选</el-button>
|
||||
<el-button size="mini" @click="invertCheck">反选</el-button>
|
||||
</div>
|
||||
|
||||
<div style="max-height:40vh;overflow-y:auto;padding:6px 0;">
|
||||
<el-checkbox-group v-model="checkedFields">
|
||||
<el-checkbox
|
||||
v-for="f in tableColumns"
|
||||
:key="f.prop"
|
||||
:label="f.prop"
|
||||
style="display:block;margin:6px 0;">
|
||||
{{ f.label }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
|
||||
<el-button
|
||||
slot="reference"
|
||||
type="text"
|
||||
icon="el-icon-s-operation"
|
||||
size="small"
|
||||
style="margin-left:12px;">
|
||||
列设置
|
||||
</el-button>
|
||||
</el-popover>
|
||||
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
class="vi-table" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号" type="index" width="80px"></el-table-column>
|
||||
label="序号" type="index" width="80px" fixed="left"></el-table-column>
|
||||
<el-table-column :label="column.label" :prop="column.prop"
|
||||
:sortable="column.sortable" :width="column.width"
|
||||
align="center" header-align="center" min-width="100px"
|
||||
v-if="checkedFields.includes(column.prop)" :fixed="column.fixed"
|
||||
show-overflow-tooltip v-for="column in tableColumns">
|
||||
<template scope="{row}" v-if="column.prop=='loginname'">
|
||||
<el-link @click="openView(row.id)" type="primary">{{row.loginname}}</el-link>
|
||||
@@ -125,8 +160,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作"
|
||||
prop="userOnline"
|
||||
width="100px">
|
||||
prop="userOnline" width="100px" fixed="right">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini">
|
||||
@@ -214,19 +248,41 @@ layout("/layouts/platform.html"){
|
||||
unions: [],
|
||||
units: [],
|
||||
id: "",
|
||||
tableColumns: [
|
||||
{prop: 'loginname', label: '工号', sortable: true},
|
||||
{prop: 'username', label: '姓名', sortable: true},
|
||||
{prop: 'sex', label: '性别', sortable: true, width: '100px'},
|
||||
{prop: 'birthday', label: '出生年月', sortable: true},
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'personType', label: '教职工类别', sortable: true},
|
||||
{prop: 'preparedBy', label: '编制类别', sortable: true},
|
||||
{prop: 'unionName', label: '所属工会', sortable: true},
|
||||
{prop: 'unitName', label: '所属单位', sortable: true},
|
||||
],
|
||||
tableColumns: [
|
||||
{ prop: "loginname", label: "工号", width: 120, fixed: "left"},
|
||||
{ prop: "username", label: "姓名", width: 120, fixed: "left" },
|
||||
{ prop: "sex", label: "性别", width: 120},
|
||||
{ prop: "birthday", label: "出生年月", width: 120, sortable: true },
|
||||
{ prop: "nationality", label: "国籍", width: 120, sortable: true, checked: 0 },
|
||||
{ prop: "nation", label: "民族", width: 120, sortable: true},
|
||||
{ prop: "mobile", label: "联系电话", width: 120 },
|
||||
{ prop: "political", label: "政治面貌", width: 120, sortable: true},
|
||||
{ prop: "userState", label: "在职状态", width: 120, sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", width: 120, sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", width: 120, sortable: true },
|
||||
{ prop: "postDoctoralJoinDate", label: "进站时间", sortable: true, checked: 0 },
|
||||
{ prop: "unionName", label: "所属工会", width: 120, sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", width: 120, sortable: true },
|
||||
{ prop: "idCardType", label: "证件类型", width: 120, sortable: true, checked: 0 },
|
||||
{ prop: "idCard", label: "证件号码", width: 120, sortable: true, checked: 0 },
|
||||
{ prop: "marriage", label: "婚姻状况", width: 120, sortable: true, checked: 0 },
|
||||
{ prop: "jobCategory", label: "岗位类别", width: 120, sortable: true, checked: 0 },
|
||||
|
||||
{ prop: "professionalTitle", label: "职称", width: 120, sortable: true, checked: 0 },
|
||||
{ prop: "professionalLevel", label: "职级", width: 120, sortable: true, checked: 0 },
|
||||
{ prop: "employeeSource", label: "职工来源", width: 120, sortable: true, checked: 0 },
|
||||
{ prop: "administrativeLevel", label: "行政级别(管理岗位)", width: 120, sortable: true, checked: 0 },
|
||||
{ prop: "positionSeries", label: "岗位系列", width: 120, sortable: true, checked: 0 },
|
||||
{ prop: "positionLevel", label: "岗级", width: 120, sortable: true, checked: 0 },
|
||||
{ prop: "administrativePositionLevel", label: "行政岗级", width: 120, sortable: true, checked: 0 },
|
||||
{ prop: "arrivalAtSchoolDate", label: "来校时间", width: 120, sortable: true, checked: 0 },
|
||||
{ prop: "teachingTime", label: "从教年月", width: 120, sortable: true, checked: 0 },
|
||||
{ prop: "expectedLeaveSchoolDate", label: "预计/最后离校时间", width: 120, sortable: true, checked: 0 },
|
||||
],
|
||||
|
||||
changeTypeData: []
|
||||
changeTypeData: [],
|
||||
|
||||
checkedFields: []
|
||||
},
|
||||
components: {
|
||||
"member-info": MEMBER_INFO,
|
||||
@@ -290,6 +346,17 @@ layout("/layouts/platform.html"){
|
||||
this.pageForm.changeDateEnd = val[1]
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 导出会员名单
|
||||
*/
|
||||
exportExcel() {
|
||||
const pageForm = clone(this.pageForm)
|
||||
const data = this.tableColumns.filter(item => this.checkedFields.includes(item.prop)).map(item => {
|
||||
return {prop: item.prop, label: item.label}
|
||||
})
|
||||
pageForm.columns = JSON.stringify(data)
|
||||
this.$downLoad("/platform/member/change/manage/doExport", pageForm)
|
||||
},
|
||||
async initData() {
|
||||
const isAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
if (isAdmin) {
|
||||
@@ -307,8 +374,23 @@ layout("/layouts/platform.html"){
|
||||
this.units = data
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
checkAll() {
|
||||
this.checkedFields = this.tableColumns.map(c => c.prop);
|
||||
},
|
||||
invertCheck() {
|
||||
const all = this.tableColumns.map(c => c.prop);
|
||||
this.checkedFields = all.filter(p => !this.checkedFields.includes(p));
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
showColumns() {
|
||||
return this.tableColumns.filter(c => this.checkedFields.includes(c.prop));
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.checkedFields = this.tableColumns.filter(c => c.checked !== 0).map(c => c.prop);
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
this.pageData()
|
||||
|
||||
@@ -25,24 +25,24 @@ layout("/layouts/platform.html"){
|
||||
placement="bottom"
|
||||
trigger="click"
|
||||
width="200">
|
||||
<!-- 点击外部/空白自动关闭,无需额外代码 -->
|
||||
|
||||
<div style="padding:4px 0;">
|
||||
<el-button type="text" size="mini" @click="checkAll">全选</el-button>
|
||||
<el-button type="text" size="mini" @click="invertCheck">反选</el-button>
|
||||
<div style="padding:4px 0;border-bottom:1px solid #eee;">
|
||||
<el-button size="mini" @click="checkAll">全选</el-button>
|
||||
<el-button size="mini" @click="invertCheck">反选</el-button>
|
||||
</div>
|
||||
|
||||
<el-checkbox-group v-model="checkedFields">
|
||||
<el-checkbox
|
||||
v-for="f in tableColumns"
|
||||
:key="f.prop"
|
||||
:label="f.prop"
|
||||
style="display:block;margin:6px 0;">
|
||||
{{ f.label }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<div style="max-height:40vh;overflow-y:auto;padding:6px 0;">
|
||||
<el-checkbox-group v-model="checkedFields">
|
||||
<el-checkbox
|
||||
v-for="f in tableColumns"
|
||||
:key="f.prop"
|
||||
:label="f.prop"
|
||||
style="display:block;margin:6px 0;">
|
||||
{{ f.label }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
|
||||
<!-- 触发器:文字按钮 -->
|
||||
<el-button
|
||||
slot="reference"
|
||||
type="text"
|
||||
|
||||
+14
-14
@@ -53,24 +53,24 @@ layout("/layouts/platform.html"){
|
||||
placement="bottom"
|
||||
trigger="click"
|
||||
width="200">
|
||||
<!-- 点击外部/空白自动关闭,无需额外代码 -->
|
||||
|
||||
<div style="padding:4px 0;">
|
||||
<el-button type="text" size="mini" @click="checkAll">全选</el-button>
|
||||
<el-button type="text" size="mini" @click="invertCheck">反选</el-button>
|
||||
<div style="padding:4px 0;border-bottom:1px solid #eee;">
|
||||
<el-button size="mini" @click="checkAll">全选</el-button>
|
||||
<el-button size="mini" @click="invertCheck">反选</el-button>
|
||||
</div>
|
||||
|
||||
<el-checkbox-group v-model="checkedFields">
|
||||
<el-checkbox
|
||||
v-for="f in tableColumns"
|
||||
:key="f.prop"
|
||||
:label="f.prop"
|
||||
style="display:block;margin:6px 0;">
|
||||
{{ f.label }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<div style="max-height:40vh;overflow-y:auto;padding:6px 0;">
|
||||
<el-checkbox-group v-model="checkedFields">
|
||||
<el-checkbox
|
||||
v-for="f in tableColumns"
|
||||
:key="f.prop"
|
||||
:label="f.prop"
|
||||
style="display:block;margin:6px 0;">
|
||||
{{ f.label }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
|
||||
<!-- 触发器:文字按钮 -->
|
||||
<el-button
|
||||
slot="reference"
|
||||
type="text"
|
||||
|
||||
+102
-22
@@ -37,24 +37,59 @@ const importAndMap = {
|
||||
</div>
|
||||
|
||||
<!-- 字段列表 -->
|
||||
<el-table :data="headerList" size="small" max-height="500" :show-header="false" style="width: 100%">
|
||||
<el-table-column width="60">
|
||||
<template slot-scope="scope">
|
||||
<el-table :data="headerList" size="small" max-height="500"
|
||||
:show-header="true" style="width: 100%">
|
||||
<!-- 列1:是否可编辑(核对时允许修改) -->
|
||||
<el-table-column label="可修改" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip effect="dark" content="勾选后可在核对页面修改该字段" placement="top">
|
||||
<el-checkbox v-model="scope.row.selected"></el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="字段名称" prop="name">
|
||||
<template slot-scope="scope">
|
||||
<strong>{{ scope.row.name }}</strong>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="示例值" prop="sample">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #666;">{{ scope.row.sample || '空' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 列2:Excel 字段名称 -->
|
||||
<el-table-column label="Excel 字段名" prop="name">
|
||||
<template slot-scope="scope">
|
||||
<strong>{{ scope.row.name }}</strong>
|
||||
<!-- 高亮关键字段 -->
|
||||
<el-tag size="mini" type="warning" v-if="isIdField(scope.row.name)"
|
||||
style="margin-left: 5px">主键
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 列3:示例值 -->
|
||||
<el-table-column label="示例值" prop="sample">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #666; font-family: monospace;">
|
||||
{{ scope.row.sample || '空' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 列4:对应数据库字段(核心!自动匹配 + 可改) -->
|
||||
<el-table-column label="映射到数据库字段" >
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.dbField"
|
||||
filterable
|
||||
placeholder="请选择对应字段"
|
||||
style="width: 100%"
|
||||
@change="onMappingChange(scope.row)"
|
||||
>
|
||||
<el-option
|
||||
v-for="field in dbFieldOptions"
|
||||
:key="field.value"
|
||||
:label="field.label + '(' + field.value + ')'"
|
||||
:value="field.value"
|
||||
>
|
||||
<span style="float: left">{{ field.value }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ field.label }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 数据预览 -->
|
||||
@@ -91,11 +126,45 @@ const importAndMap = {
|
||||
return {
|
||||
fileList: [],
|
||||
workbook: null,
|
||||
headers: [], // 原始表头数组
|
||||
rawData: [], // 解析出的原始二维数组
|
||||
headerList: [], // { name, sample, selected }
|
||||
previewData: [], // 对象数组,用于预览
|
||||
submitting: false
|
||||
// 原始表头数组
|
||||
headers: [],
|
||||
// 解析出的原始二维数组
|
||||
rawData: [],
|
||||
headerList: [],
|
||||
// 对象数组,用于预览
|
||||
previewData: [],
|
||||
submitting: false,
|
||||
// 数据库字段选项
|
||||
dbFieldOptions: [
|
||||
{ value: "loginname", label: "工号" },
|
||||
{ value: "username", label: "姓名" },
|
||||
{ value: "sex", label: "性别"},
|
||||
{ value: "birthday", label: "出生年月" },
|
||||
{ value: "nationality", label: "国籍" },
|
||||
{ value: "nation", label: "民族"},
|
||||
{ value: "mobile", label: "联系电话" },
|
||||
{ value: "political", label: "政治面貌"},
|
||||
{ value: "userState", label: "在职状态" },
|
||||
{ value: "personType", label: "教职工类别" },
|
||||
{ value: "preparedBy", label: "编制类别" },
|
||||
{ value: "postDoctoralJoinDate", label: "进站时间" },
|
||||
{ value: "unionId", label: "所属工会" },
|
||||
{ value: "unitId", label: "所属单位" },
|
||||
{ value: "idCardType", label: "证件类型" },
|
||||
{ value: "idCard", label: "证件号码" },
|
||||
{ value: "marriage", label: "婚姻状况" },
|
||||
{ value: "jobCategory", label: "岗位类别" },
|
||||
{ value: "professionalTitle", label: "职称" },
|
||||
{ value: "professionalLevel", label: "职级" },
|
||||
{ value: "employeeSource", label: "职工来源" },
|
||||
{ value: "administrativeLevel", label: "行政级别(管理岗位)" },
|
||||
{ value: "positionSeries", label: "岗位系列" },
|
||||
{ value: "positionLevel", label: "岗级" },
|
||||
{ value: "administrativePositionLevel", label: "行政岗级" },
|
||||
{ value: "arrivalAtSchoolDate", label: "来校时间" },
|
||||
{ value: "teachingTime", label: "从教年月" },
|
||||
{ value: "expectedLeaveSchoolDate", label: "预计/最后离校时间" },
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -162,12 +231,23 @@ const importAndMap = {
|
||||
this.generatePreview()
|
||||
}
|
||||
reader.readAsArrayBuffer(rawFile)
|
||||
|
||||
//
|
||||
|
||||
} catch (err) {
|
||||
this.$message.error('文件解析失败')
|
||||
console.error(err)
|
||||
}
|
||||
},
|
||||
|
||||
onMappingChange() {
|
||||
|
||||
},
|
||||
isIdField(header) {
|
||||
// 主键字段,必填
|
||||
return ['工号', '编号', '身份证'].some(k => header.includes(k))
|
||||
},
|
||||
|
||||
resetState() {
|
||||
this.headers = []
|
||||
this.rawData = []
|
||||
|
||||
Reference in New Issue
Block a user