commit
This commit is contained in:
-1
@@ -49,7 +49,6 @@ public class OutlayReimburseSummaryServiceImpl extends BaseServiceImpl implement
|
||||
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();
|
||||
|
||||
+326
-12
@@ -1,34 +1,47 @@
|
||||
package com.budwk.app.zhgh.democratic.teachercongress.delegate.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
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 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.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.views.View_user;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.TeacherCongressDelegatePush;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.Teacher_congress_delegate;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.service.TeacherCongressDelegatePushService;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.prepare.models.Teacher_congress_quota_allocation;
|
||||
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.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.time.LocalDate;
|
||||
import java.time.Period;
|
||||
import java.time.ZoneId;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
@@ -47,6 +60,13 @@ public class TeacherCongressDelegatePushController {
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
|
||||
|
||||
@Inject
|
||||
private TeacherCongressDelegatePushService teacherCongressDelegatePushService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/teachercongress/delegate/push/index.html")
|
||||
@SaCheckPermission("tc.delegate.push")
|
||||
@@ -54,6 +74,58 @@ public class TeacherCongressDelegatePushController {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("tc.delegate.push")
|
||||
public Result pageData(PageForm pageForm,
|
||||
@Param(value = "sessionId") String sessionId,
|
||||
@Param(value = "isFormalOrAttendance") String isFormalOrAttendance) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
|
||||
FROM
|
||||
teacher_congress_delegate_push info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("info.sessionId", "=", sessionId);
|
||||
|
||||
if (!"全部".equals(isFormalOrAttendance)) {
|
||||
cnd.and("info.representativeType", "=", isFormalOrAttendance);
|
||||
}
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("info.userName", pageForm.getSearchKeyword());
|
||||
group.orLike("info.loginName", pageForm.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
}
|
||||
cnd.desc("info.createdAt");
|
||||
cnd.and("info.createdBy", "=", SecurityUtil.getUserId());
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取本分工会下的非代表用户
|
||||
*
|
||||
@@ -68,15 +140,15 @@ public class TeacherCongressDelegatePushController {
|
||||
// 查询预选中的代表
|
||||
Cnd cndx = Cnd.where("sessionId", "=", sessionId);
|
||||
cndx.andEX("unionId", "=", SecurityUtil.getUnionId());
|
||||
List<Teacher_congress_delegate> delegateList = dao.query(Teacher_congress_delegate.class, cndx);
|
||||
// u.professionalTitle,
|
||||
// u.professionalLevel,
|
||||
List<TeacherCongressDelegatePush> delegateList = dao.query(TeacherCongressDelegatePush.class, cndx);
|
||||
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.professionalLevel,
|
||||
u.sex,
|
||||
u.birthday,
|
||||
u.nation,
|
||||
@@ -92,6 +164,7 @@ public class TeacherCongressDelegatePushController {
|
||||
sql.setParam("sessionId", sessionId);
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("u.member", "=", 1);
|
||||
cnd.andEX("u.id", "not in", userIds);
|
||||
cnd.and("tcd.userId", "is", null);
|
||||
cnd.and("tcdp.id", "is", null);
|
||||
cnd.and("u.unionId", "=", SecurityUtil.getUnionId());
|
||||
@@ -101,11 +174,10 @@ public class TeacherCongressDelegatePushController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 推选代表
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission("tc.delegate.push")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("推选代表")
|
||||
public Object addPreselectionDb(@Param("userValue") String[] userValue, String sessionId, String representativeType) {
|
||||
List<TeacherCongressDelegatePush> list = new ArrayList<>();
|
||||
for (String id : userValue) {
|
||||
@@ -118,6 +190,7 @@ public class TeacherCongressDelegatePushController {
|
||||
tmd.setUserName(user.getUsername());
|
||||
tmd.setLoginName(user.getLoginname());
|
||||
tmd.setSex(user.getSex());
|
||||
tmd.setMobile(user.getMobile());
|
||||
tmd.setNation(user.getNation());
|
||||
tmd.setEducation(user.getEducation());
|
||||
tmd.setAcademicDegree(user.getAcademicDegree());
|
||||
@@ -155,8 +228,249 @@ public class TeacherCongressDelegatePushController {
|
||||
list.add(tmd);
|
||||
}
|
||||
dao.insert(list);
|
||||
|
||||
|
||||
list.forEach(teacherCongressDelegatePush -> {
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, teacherCongressDelegatePush);
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("TXDB", teacherCongressDelegatePush.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("删除")
|
||||
@SaCheckPermission("tc.delegate.push")
|
||||
@SLog(tag = "删除推选代表", msg = "删除推选代表")
|
||||
public Result delete(@Valid String id) {
|
||||
baseService.dao().delete(TeacherCongressDelegatePush.class, id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("提交到资格审查")
|
||||
@SaCheckPermission("tc.delegate.push")
|
||||
@SLog(tag = "代表管理-代表推选", msg = "提交到资格审查")
|
||||
public Result batchSubmit(@Param("ids") @Valid String[] ids, String sessionId) {
|
||||
|
||||
|
||||
Teacher_congress_quota_allocation allocation = dao.fetch(Teacher_congress_quota_allocation.class,
|
||||
Cnd.where(Teacher_congress_quota_allocation::getSessionId, "=", sessionId)
|
||||
.and(Teacher_congress_quota_allocation::getUnionId, "=", SecurityUtil.getUnionId()));
|
||||
|
||||
|
||||
if (allocation == null) {
|
||||
return Result.error("请先设置名额分配");
|
||||
}
|
||||
if (allocation.getAllocationNum() == 0) {
|
||||
return Result.error("请先设置名额分配");
|
||||
}
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
|
||||
FROM
|
||||
teacher_congress_delegate_push info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("info.sessionId", "=", sessionId);
|
||||
cnd.andEX("info.unionId", "=", SecurityUtil.getUnionId());
|
||||
cnd.andEX("t.taskName", "=", "53ff0c2a-ba93-45e9-a9fd-db51cdab3080");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> writeList = baseService.listMap(sql);
|
||||
|
||||
// 已上报总人数
|
||||
int total = writeList.size();
|
||||
// 已上报女代表人数
|
||||
int female = (int) writeList.stream().filter(v -> List.of("女", "女性").contains(v.getString("sex"))).count();
|
||||
// 已上报高级职称专任教师人数
|
||||
int seniorTeacher = (int) writeList.stream().filter(v -> v.getBoolean("seniorTeacher")).count();
|
||||
// 已上报专任教师人数
|
||||
int ordinaryTeacher = (int) writeList.stream().filter(v -> v.getBoolean("ordinaryTeacher")).count();
|
||||
// 已上报45岁以下代表
|
||||
int under45 = (int) writeList.stream().filter(v -> Convert.toInt(v.getInt("age"), 0) <= 45).count();
|
||||
|
||||
StringBuffer tips = new StringBuffer();
|
||||
|
||||
if (total > allocation.getAllocationNum()) {
|
||||
tips.append("上报总人数超出分配名额!");
|
||||
}
|
||||
/* if (female < allocation.getFemaleNum()) {
|
||||
tips.append("女教师代表数不满足分配名额数!");
|
||||
}
|
||||
|
||||
if (seniorTeacher < allocation.getSeniorTeaNum()) {
|
||||
tips.append("高级职称专任教师数不满足分配名额数!");
|
||||
}
|
||||
|
||||
if (ordinaryTeacher < allocation.getOrdinaryTeaNum()) {
|
||||
tips.append("专任教师数不满足分配名额数!");
|
||||
}
|
||||
|
||||
if (under45 < allocation.getLess45Num()) {
|
||||
tips.append("45岁以下教师代表数不满足分配名额数!");
|
||||
}*/
|
||||
|
||||
if (StrUtil.isNotBlank(tips)) {
|
||||
return Result.error(tips.toString());
|
||||
}
|
||||
teacherCongressDelegatePushService.batchSubmit(ids, sessionId);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("本单位代表上报情况")
|
||||
@SaCheckPermission("tc.delegate.push")
|
||||
public Result selfUnionPushMetric(String sessionId, String unionId) {
|
||||
|
||||
Teacher_congress_quota_allocation allocation = dao.fetch(Teacher_congress_quota_allocation.class,
|
||||
Cnd.where(Teacher_congress_quota_allocation::getSessionId, "=", sessionId)
|
||||
.and(Teacher_congress_quota_allocation::getUnionId, "=", SecurityUtil.getUnionId()));
|
||||
if(allocation == null){
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariale,
|
||||
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 taskVariale,
|
||||
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
|
||||
teacher_congress_delegate_push info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
|
||||
AND t.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("info.sessionId", "=", sessionId);
|
||||
cnd.andEX("info.unionId", "=", SecurityUtil.getUnionId());
|
||||
cnd.andEX("info.representativeType", "=", "正式代表");
|
||||
cnd.and("ins.state", "=", ProcessTaskStateEnum.FINISHED.getCode());
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> writeList = baseService.listMap(sql);
|
||||
|
||||
|
||||
// 上报总人数
|
||||
int total = writeList.size();
|
||||
// 女代表人数
|
||||
int female = (int) writeList.stream().filter(v -> List.of("女", "女性").contains(v.getString("sex"))).count();
|
||||
// 高级职称专任教师人数
|
||||
int seniorTeacher = (int) writeList.stream().filter(v->v.getBoolean("seniorTeacher")).count();
|
||||
// 专任教师人数
|
||||
int ordinaryTeacher = (int) writeList.stream().filter(v->v.getBoolean("ordinaryTeacher")).count();
|
||||
// 45岁以下代表
|
||||
int under45 = (int) writeList.stream().filter(v -> Convert.toInt(v.getInt("age"), 0) <= 45).count();
|
||||
// 少数民族代表
|
||||
long ethnicMinority = writeList.stream().filter(v -> StrUtil.isNotBlank(v.getString("nation")) && !"汉族".equals(v.getString("nation"))).count();
|
||||
// 校领导数
|
||||
long schoolLeader = writeList.stream().filter(v->v.getBoolean("schoolLeader")).count();
|
||||
// 中层领导数
|
||||
long middleLevelLeader = writeList.stream().filter(v->v.getBoolean("middleLevelLeader")).count();
|
||||
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
|
||||
HashMap<String, Object> totalMap = new HashMap<>();
|
||||
totalMap.put("current", total);
|
||||
totalMap.put("target", allocation.getAllocationNum());
|
||||
totalMap.put("progress", allocation.getAllocationNum() != 0 ? (double) total / allocation.getAllocationNum() : 0.0);
|
||||
totalMap.put("remaining", allocation.getAllocationNum() - total);
|
||||
hashMap.put("total", totalMap);
|
||||
|
||||
HashMap<String, Object> femaleMap = new HashMap<>();
|
||||
femaleMap.put("current", female);
|
||||
femaleMap.put("target", allocation.getFemaleNum());
|
||||
femaleMap.put("progress", allocation.getFemaleNum() != 0 ? (double) female / allocation.getFemaleNum() : 0.0);
|
||||
femaleMap.put("remaining", allocation.getFemaleNum() - female);
|
||||
hashMap.put("female", femaleMap);
|
||||
|
||||
HashMap<String, Object> seniorTeaMap = new HashMap<>();
|
||||
seniorTeaMap.put("current", seniorTeacher);
|
||||
seniorTeaMap.put("target", allocation.getSeniorTeaNum());
|
||||
seniorTeaMap.put("progress", allocation.getSeniorTeaNum() != 0 ? (double) seniorTeacher / allocation.getSeniorTeaNum() : 0.0);
|
||||
seniorTeaMap.put("remaining", allocation.getSeniorTeaNum() - seniorTeacher);
|
||||
hashMap.put("seniorTeacher", seniorTeaMap);
|
||||
|
||||
HashMap<String, Object> ordinaryTeaMap = new HashMap<>();
|
||||
ordinaryTeaMap.put("current", ordinaryTeacher);
|
||||
ordinaryTeaMap.put("target", allocation.getOrdinaryTeaNum());
|
||||
ordinaryTeaMap.put("progress", allocation.getOrdinaryTeaNum() != 0 ? (double) ordinaryTeacher / allocation.getOrdinaryTeaNum() : 0.0);
|
||||
ordinaryTeaMap.put("remaining", allocation.getOrdinaryTeaNum() - ordinaryTeacher);
|
||||
hashMap.put("ordinaryTeacher", ordinaryTeaMap);
|
||||
|
||||
HashMap<String, Object> under45Map = new HashMap<>();
|
||||
under45Map.put("current", under45);
|
||||
under45Map.put("target", allocation.getLess45Num());
|
||||
under45Map.put("progress", allocation.getLess45Num() != 0 ? (double) under45 / allocation.getLess45Num() : 0.0);
|
||||
under45Map.put("remaining", allocation.getLess45Num() - under45);
|
||||
hashMap.put("under45", under45Map);
|
||||
|
||||
/* HashMap<String, Object> ethnicMinorityMap = new HashMap<>();
|
||||
ethnicMinorityMap.put("current", (int) ethnicMinority);
|
||||
ethnicMinorityMap.put("target", allocation.getEthnicMinorityNum());
|
||||
ethnicMinorityMap.put("progress", allocation.getEthnicMinorityNum() != 0 ? (double) (int) ethnicMinority / allocation.getEthnicMinorityNum() : 0.0);
|
||||
ethnicMinorityMap.put("remaining", allocation.getEthnicMinorityNum() - (int) ethnicMinority);
|
||||
hashMap.put("ethnicMinority", ethnicMinorityMap);
|
||||
|
||||
HashMap<String, Object> schoolLeaderMap = new HashMap<>();
|
||||
schoolLeaderMap.put("current", (int) schoolLeader);
|
||||
schoolLeaderMap.put("target", allocation.getSchoolLeaderNum());
|
||||
schoolLeaderMap.put("progress", allocation.getSchoolLeaderNum() != 0 ? (double) (int) schoolLeader / allocation.getSchoolLeaderNum() : 0.0);
|
||||
schoolLeaderMap.put("remaining", allocation.getSchoolLeaderNum() - (int) schoolLeader);
|
||||
hashMap.put("schoolLeader", schoolLeaderMap);
|
||||
|
||||
HashMap<String, Object> middleLevelLeaderMap = new HashMap<>();
|
||||
middleLevelLeaderMap.put("current", (int) middleLevelLeader);
|
||||
middleLevelLeaderMap.put("target", allocation.getMiddleLevelLeaderNum());
|
||||
middleLevelLeaderMap.put("progress", allocation.getMiddleLevelLeaderNum() != 0 ? (double) (int) middleLevelLeader / allocation.getMiddleLevelLeaderNum() : 0.0);
|
||||
middleLevelLeaderMap.put("remaining", allocation.getMiddleLevelLeaderNum() - (int) middleLevelLeader);
|
||||
hashMap.put("middleLevelLeader", middleLevelLeaderMap);*/
|
||||
|
||||
return Result.success(hashMap);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
package com.budwk.app.zhgh.democratic.teachercongress.delegate.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
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.democratic.teachercongress.delegate.models.TeacherCongressDelegatePush;
|
||||
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.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/9/23 14:04
|
||||
* @description 代表推选代表填写
|
||||
*/
|
||||
@IocBean
|
||||
@At("/platform/teacherCongress/delegate/push/write")
|
||||
@Ok("json:full")
|
||||
@Api(value = "/platform/teacherCongress/delegate/push/write", tags = "代表推选代表填写")
|
||||
public class TeacherCongressDelegatePushWriteController {
|
||||
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/teachercongress/delegate/push/write.html")
|
||||
@SaCheckPermission("tc.delegate.push.write")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("代表信息初始信息")
|
||||
@SaCheckPermission("tc.delegate.push.write")
|
||||
public Result info(String sessionId, String userId) {
|
||||
userId = StrUtil.blankToDefault(userId, SecurityUtil.getUserId());
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariale,
|
||||
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 taskVariale,
|
||||
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
|
||||
teacher_congress_delegate_push info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id
|
||||
AND t.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("info.sessionId", "=", sessionId);
|
||||
cnd.and("info.userId", "=", userId);
|
||||
sql.setCondition(cnd);
|
||||
sql.setCallback(Sqls.callback.map());
|
||||
dao.execute(sql);
|
||||
NutMap delegate = (NutMap) sql.getResult();
|
||||
if (ObjectUtil.isNull(delegate)) {
|
||||
return Result.success(Map.of("isSelected", false));
|
||||
}
|
||||
return Result.success(Map.of("isSelected", true, "delegate", delegate));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("代表信息填写保存")
|
||||
@SaCheckPermission("tc.delegate.push.write")
|
||||
public Result save(TeacherCongressDelegatePush teacherCongressDelegatePush){
|
||||
dao.updateIgnoreNull(teacherCongressDelegatePush);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("代表信息填写提交")
|
||||
@SaCheckPermission("tc.delegate.push.write")
|
||||
public Result submit(TeacherCongressDelegatePush teacherCongressDelegatePush,String taskId){
|
||||
dao.updateIgnoreNull(teacherCongressDelegatePush);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.AGREE.getCode());
|
||||
flowCommonService.executeTask(dict);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.budwk.app.zhgh.democratic.teachercongress.delegate.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
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.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/9/23 16:35
|
||||
* @description 代表推选资格审查
|
||||
*/
|
||||
@IocBean
|
||||
@At("/platform/teacherCongress/delegate/push/zcAudit")
|
||||
@Ok("json:full")
|
||||
@Api(value = "/platform/teacherCongress/delegate/push/zcAudit", tags = "代表推选资格审查")
|
||||
public class TeacherCongressDelegatePushZgAuditController {
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/teachercongress/delegate/push/zcAudit.html")
|
||||
@SaCheckPermission("tc.delegate.push.zcAudit")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("tc.delegate.push")
|
||||
public Result pageData(PageForm pageForm,
|
||||
@Param(value = "sessionId") String sessionId,
|
||||
@Param(value = "unionId") String unionId,
|
||||
@Param(value = "approval") Boolean approval,
|
||||
@Param(value = "isFormalOrAttendance") String isFormalOrAttendance) {
|
||||
|
||||
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 teacher_congress_delegate_push info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "=", "900217e4-4332-4a21-90dd-363b8be17801");
|
||||
// cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
if (!"全部".equals(isFormalOrAttendance)) {
|
||||
cnd.and("info.representativeType", "=", isFormalOrAttendance);
|
||||
}
|
||||
cnd.andEX("info.sessionId", "=", sessionId);
|
||||
cnd.andEX("info.unionId", "=", unionId);
|
||||
if (approval) {
|
||||
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");
|
||||
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.desc("t.createdAt");
|
||||
} else {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
|
||||
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pageVO = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pageVO);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
-5
@@ -117,11 +117,6 @@ public class TeacherCongressDelegatePush extends BaseModel {
|
||||
@Default("0")
|
||||
private Boolean middleLevelLeader;
|
||||
|
||||
@Column
|
||||
@Comment("行政职称===>position")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String administrativeTitle;
|
||||
|
||||
@Column
|
||||
@Comment("年龄")
|
||||
@ColDefine(type = ColType.INT)
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package com.budwk.app.zhgh.democratic.teachercongress.delegate.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.TeacherCongressDelegatePush;
|
||||
|
||||
public interface TeacherCongressDelegatePushService extends BaseService<TeacherCongressDelegatePush> {
|
||||
|
||||
void batchSubmit(String[] ids, String sessionId);
|
||||
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.budwk.app.zhgh.democratic.teachercongress.delegate.service;
|
||||
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.TeacherCongressDelegatePush;
|
||||
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.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/9/24 09:40
|
||||
* @description
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class TeacherCongressDelegatePushServiceImpl extends BaseServiceImpl<TeacherCongressDelegatePush> implements TeacherCongressDelegatePushService {
|
||||
public TeacherCongressDelegatePushServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
|
||||
@Override
|
||||
public void batchSubmit(String[] ids, String sessionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
|
||||
FROM
|
||||
teacher_congress_delegate_push info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("info.id", "in", ids);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> delegatePushList = listMap(sql);
|
||||
|
||||
delegatePushList.forEach(push -> {
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, push.getString("taskId"));
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.AGREE.getCode());
|
||||
flowCommonService.executeTask(dict);
|
||||
});
|
||||
}
|
||||
}
|
||||
+132
-27
@@ -8,16 +8,16 @@ layout("/layouts/platform.html"){
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
<search-item label="教代会">
|
||||
<el-select v-model="pageForm.sessionId" @change="sessionChange">
|
||||
<el-select v-model="pageForm.sessionId">
|
||||
<el-option v-for="item in sessionOptions" :label="item.fullName" :value="item.id"
|
||||
:key="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="分工会">
|
||||
<el-select v-model="pageForm.unionId" filterable @change="listUnit" clearable style="width: 100%">
|
||||
<el-option v-for="i in unionOptions" :label="i.name" :key="i.id" :value="i.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<!-- <search-item label="分工会">
|
||||
<el-select v-model="pageForm.unionId" filterable @change="listUnit" clearable style="width: 100%">
|
||||
<el-option v-for="i in unionOptions" :label="i.name" :key="i.id" :value="i.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>-->
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
@@ -41,7 +41,7 @@ layout("/layouts/platform.html"){
|
||||
@click="$refs.pushAttendanceRef.onOpen(pageForm.sessionId,pageForm.unionId)"
|
||||
>列席代表预选
|
||||
</el-button>
|
||||
<el-button icon="el-icon-download" size="small" type="primary" @click="doExport">导出</el-button>
|
||||
<!-- <el-button icon="el-icon-download" size="small" type="primary" @click="doExport">导出</el-button>-->
|
||||
|
||||
<el-button icon="el-icon-check" size="small" type="primary" @click="onBatchSubmit">正式代表提交上报
|
||||
</el-button>
|
||||
@@ -60,75 +60,113 @@ layout("/layouts/platform.html"){
|
||||
row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
>
|
||||
<el-table-column type="selection" width="55" reserve-selection fixed="left"></el-table-column>
|
||||
<el-table-column type="selection" width="55" reserve-selection fixed="left" :selectable="(row)=>{return row.taskKey==='0cacd1e7-7bb2-47dd-818b-6a73062e0c62'}"></el-table-column>
|
||||
<el-table-column type="index" width="55" label="序号" :index="indexMethod" fixed="left"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName" width="100" fixed="left"></el-table-column>
|
||||
<el-table-column label="年龄" prop="age" width="100"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex" width="100" fixed="left"></el-table-column>
|
||||
<el-table-column label="民族" prop="nation" min-width="100"></el-table-column>
|
||||
<el-table-column label="职称" prop="jobTitle" min-width="150"></el-table-column>
|
||||
<el-table-column label="职级" prop="jobTitleLevel" min-width="100"></el-table-column>
|
||||
<el-table-column label="职称" prop="professionalTitle" min-width="150"></el-table-column>
|
||||
<el-table-column label="职级" prop="professionalLevel" min-width="100"></el-table-column>
|
||||
<el-table-column label="校级领导" prop="schoolLeader" min-width="100">
|
||||
<template scope="{row}">
|
||||
<template v-slot="{row}">
|
||||
<el-checkbox
|
||||
v-if="row"
|
||||
v-model="row.schoolLeader"
|
||||
:style="{'pointer-events':row.stateCode===0?'auto':'none'}"
|
||||
:style="{'pointer-events':(row.taskKey === 'startTask' || row.taskKey==='53ff0c2a-ba93-45e9-a9fd-db51cdab3080' || !row.instanceId)?'auto':'none'}"
|
||||
></el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="中层领导" prop="middleLevelLeader" min-width="100">
|
||||
<template scope="{row}">
|
||||
<template v-slot="{row}">
|
||||
<el-checkbox
|
||||
v-if="row"
|
||||
v-model="row.middleLevelLeader"
|
||||
:style="{'pointer-events':row.stateCode===0?'auto':'none'}"
|
||||
:style="{'pointer-events':(row.taskKey === 'startTask' || row.taskKey==='53ff0c2a-ba93-45e9-a9fd-db51cdab3080' || !row.instanceId)?'auto':'none'}"
|
||||
></el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="专任教师" prop="ordinaryTeacher" min-width="100">
|
||||
<template scope="{row}">
|
||||
<template v-slot="{row}">
|
||||
<el-checkbox
|
||||
v-if="row"
|
||||
v-model="row.ordinaryTeacher"
|
||||
:style="{'pointer-events':row.stateCode===0?'auto':'none'}"
|
||||
:style="{'pointer-events':(row.taskKey === 'startTask' || row.taskKey==='53ff0c2a-ba93-45e9-a9fd-db51cdab3080' || !row.instanceId)?'auto':'none'}"
|
||||
></el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="高级职称专任教师" prop="seniorTeacher" min-width="150">
|
||||
<template scope="{row}">
|
||||
<template v-slot="{row}">
|
||||
<el-checkbox
|
||||
v-if="row"
|
||||
v-model="row.seniorTeacher"
|
||||
style="pointer-events:none"
|
||||
:style="{'pointer-events':(row.taskKey === 'startTask' || row.taskKey==='53ff0c2a-ba93-45e9-a9fd-db51cdab3080' || !row.instanceId)?'auto':'none'}"
|
||||
></el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="教代会代表" prop="isJdh" min-width="100">
|
||||
<template scope="{row}">
|
||||
<template v-slot="{row}">
|
||||
<el-checkbox
|
||||
v-if="row"
|
||||
v-model="row.isJdh"
|
||||
:style="{'pointer-events':row.stateCode===0?'auto':'none'}"
|
||||
:style="{'pointer-events':(row.taskKey === 'startTask' || row.taskKey==='53ff0c2a-ba93-45e9-a9fd-db51cdab3080' || !row.instanceId)?'auto':'none'}"
|
||||
></el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工代会代表" prop="isGdh" min-width="100">
|
||||
<template scope="{row}">
|
||||
<template v-slot="{row}">
|
||||
<el-checkbox
|
||||
v-if="row"
|
||||
v-model="row.isGdh"
|
||||
:style="{'pointer-events':row.stateCode===0?'auto':'none'}"
|
||||
:style="{'pointer-events':(row.taskKey === 'startTask' || row.taskKey==='53ff0c2a-ba93-45e9-a9fd-db51cdab3080' || !row.instanceId)?'auto':'none'}"
|
||||
></el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="代表类型" prop="representativeType" show-overflow-tooltip width="100"
|
||||
fixed="right"></el-table-column>
|
||||
<el-table-column label="代表类型" prop="representativeType" show-overflow-tooltip width="100"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点" width="120"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || row.taskKey==='53ff0c2a-ba93-45e9-a9fd-db51cdab3080' || !row.instanceId" @click="onEdit(row)" size="mini"
|
||||
type="primary">编辑
|
||||
</el-button>
|
||||
<template >
|
||||
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-else-if="row.taskKey === 'startTask' || row.taskKey==='53ff0c2a-ba93-45e9-a9fd-db51cdab3080' || !row.instanceId" @click="onDelete(row.id)"
|
||||
size="mini" type="danger">删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<push-formal-dialog ref="pushFormalRef" @refresh="doSearch"></push-formal-dialog>
|
||||
<push-attendance-dialog ref="pushAttendanceRef" @refresh="doSearch"></push-attendance-dialog>
|
||||
|
||||
|
||||
<el-dialog :close-on-click-modal="false"
|
||||
class="write-dialog"
|
||||
:visible.sync="writeDialog"
|
||||
:title="isRead ? '查看' : '编辑'"
|
||||
top="50px"
|
||||
width="60%">
|
||||
<div style="max-height: 75vh;overflow-y: auto">
|
||||
<formal-write ref="formalWriteRef" :is_read="isRead" :user_id="userId"
|
||||
:session_id="pageForm.sessionId"
|
||||
@refresh="writeDialog=false;doSearch()"></formal-write>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -136,6 +174,8 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#include('push-progress.js'){}#-->
|
||||
<!--#include('push-formal-dialog.js'){}#-->
|
||||
<!--#include('push-attendance-dialog.js'){}#-->
|
||||
<!--#include('write.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
@@ -143,14 +183,79 @@ layout("/layouts/platform.html"){
|
||||
components: {
|
||||
'push-progress': pushProgress,
|
||||
'push-formal-dialog': pushFormalDialog,
|
||||
'push-attendance-dialog': pushAttendanceDialog,
|
||||
'formal-write': write
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sessionOptions:[],
|
||||
unionOptions:[]
|
||||
pageForm: {
|
||||
isFormalOrAttendance: "全部"
|
||||
},
|
||||
sessionOptions: [],
|
||||
unionOptions: [],
|
||||
|
||||
writeDialog: false,
|
||||
isRead: false,
|
||||
userId: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.pageData()
|
||||
const fullName = this.sessionOptions.find(v => v.id === this.pageForm.sessionId)?.fullName;
|
||||
|
||||
this.$refs.pushProgressRef.refreshData(this.pageForm.sessionId, fullName)
|
||||
},
|
||||
onView(row) {
|
||||
this.writeDialog = true
|
||||
this.userId = row.userId
|
||||
this.isRead = true
|
||||
},
|
||||
onEdit(row) {
|
||||
this.writeDialog = true
|
||||
this.userId = row.userId
|
||||
this.isRead = false
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/teacherCongress/delegate/push/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doExport() {
|
||||
},
|
||||
onBatchSubmit() {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
if (selection.length === 0){
|
||||
this.$message.warning('请选择要上报的记录')
|
||||
return
|
||||
}
|
||||
this.$confirm('您确定要上报吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const {code, msg} = await this.$axios.post('/platform/teacherCongress/delegate/push/batchSubmit', {
|
||||
ids: JSON.stringify(selection.map(v => v.id)),
|
||||
sessionId: this.pageForm.sessionId
|
||||
})
|
||||
if (code === 0) {
|
||||
this.$message.success(msg)
|
||||
this.doSearch()
|
||||
this.$refs.tableRef.clearSelection()
|
||||
} else {
|
||||
this.$message.error(msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
listUnion() {
|
||||
this.$businessTool.listUnion().then((res) => {
|
||||
this.unionOptions = res
|
||||
@@ -162,7 +267,7 @@ layout("/layouts/platform.html"){
|
||||
this.sessionOptions = res.data
|
||||
if (this.sessionOptions && this.sessionOptions.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionOptions[0].id
|
||||
// this.pageData()
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
const pushAttendanceDialog = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog :close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
title="列席代表预选"
|
||||
class="push-attendance-dialog"
|
||||
width="70%">
|
||||
<el-transfer
|
||||
ref="transfer"
|
||||
v-model="userValue"
|
||||
:data="userData"
|
||||
:filter-method="filterMethod"
|
||||
:props="{key: 'id',label: 'name'}"
|
||||
:titles="['可报人员名单', '当前选择']"
|
||||
filterable
|
||||
>
|
||||
<div slot-scope="{ option }">
|
||||
<div class="transfer-item">
|
||||
<div class="transfer-item-name">{{ option.userName }} - {{ option.loginName }}</div>
|
||||
<div class="transfer-item-details">
|
||||
<span class="detail-item">{{ option.sex}}</span>
|
||||
<span class="detail-item" v-if="option.age">{{ option.age }}岁</span>
|
||||
<span class="detail-item" v-if="option.professionalTitle">{{ option.professionalTitle }}</span>
|
||||
<span class="detail-item" v-if="option.professionalLevel">{{ option.professionalLevel }}</span>
|
||||
<span class="detail-item" v-if="option.nation">{{ option.nation }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-transfer>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="onConfirm">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
userValue: [],
|
||||
userData: [],
|
||||
rightChecked: [],
|
||||
attendanceRightChecked: [],
|
||||
sessionId: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onOpen(sessionId, unionId) {
|
||||
this.dialogVisible = true
|
||||
this.sessionId = sessionId
|
||||
this.userValue = []
|
||||
this.userData = []
|
||||
const {code, data} = await $.get('/platform/teacherCongress/delegate/push/getUnionUser', {
|
||||
sessionId: sessionId,
|
||||
unionId: unionId
|
||||
})
|
||||
if (code === 0) {
|
||||
data.userData.forEach(v => {
|
||||
this.userData.push({id: v.userId, ...v})
|
||||
})
|
||||
}
|
||||
},
|
||||
filterMethod(query, item) {
|
||||
return item.userName.indexOf(query) > -1
|
||||
},
|
||||
async onConfirm() {
|
||||
const {code, msg} = await $.post('/platform/teacherCongress/delegate/push/addPreselectionDb', {
|
||||
userValue: JSON.stringify(this.userValue),
|
||||
sessionId: this.sessionId,
|
||||
representativeType: '列席代表'
|
||||
})
|
||||
if (code === 0) {
|
||||
this.dialogVisible = false
|
||||
this.$message.success(msg)
|
||||
this.$emit('refresh')
|
||||
}
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.push-attendance-dialog ::v-deep .el-transfer{
|
||||
text-align: center!important;
|
||||
}
|
||||
|
||||
.push-attendance-dialog ::v-deep .el-transfer-panel__item.el-checkbox {
|
||||
height: auto;
|
||||
display: block;
|
||||
margin-right: 0;
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.push-attendance-dialog ::v-deep .el-checkbox__input {
|
||||
vertical-align: top;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.push-attendance-dialog ::v-deep .transfer-item {
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.push-attendance-dialog ::v-deep .transfer-item-name {
|
||||
font-weight: bold;
|
||||
margin-bottom: 3px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.push-attendance-dialog ::v-deep .transfer-item-details {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.push-attendance-dialog ::v-deep .detail-item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
.push-attendance-dialog ::v-deep .el-transfer-panel{
|
||||
height: 60vh;
|
||||
text-align: left !important;
|
||||
width: 35% !important;
|
||||
}
|
||||
|
||||
.push-attendance-dialog ::v-deep .el-transfer-panel__body {
|
||||
height: calc(100% - 40px) !important;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.push-attendance-dialog ::v-deep .el-transfer-panel__list.is-filterable {
|
||||
flex: 1;
|
||||
}
|
||||
`
|
||||
}
|
||||
+4
-4
@@ -20,8 +20,8 @@ const pushFormalDialog = {
|
||||
<div class="transfer-item-details">
|
||||
<span class="detail-item">{{ option.sex}}</span>
|
||||
<span class="detail-item" v-if="option.age">{{ option.age }}岁</span>
|
||||
<span class="detail-item" v-if="option.jobTitle">{{ option.jobTitle }}</span>
|
||||
<span class="detail-item" v-if="option.jobTitleLevel">{{ option.jobTitleLevel }}</span>
|
||||
<span class="detail-item" v-if="option.professionalTitle">{{ option.professionalTitle }}</span>
|
||||
<span class="detail-item" v-if="option.professionalLevel">{{ option.professionalLevel }}</span>
|
||||
<span class="detail-item" v-if="option.nation">{{ option.nation }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -49,7 +49,7 @@ const pushFormalDialog = {
|
||||
this.sessionId = sessionId
|
||||
this.userValue = []
|
||||
this.userData = []
|
||||
const {code, data} = await $.get('/platform/teacherCongress/delegate/push/getUnionUser', {
|
||||
const {code, data} = await this.$axios.post('/platform/teacherCongress/delegate/push/getUnionUser', {
|
||||
sessionId: sessionId,
|
||||
unionId: unionId
|
||||
})
|
||||
@@ -63,7 +63,7 @@ const pushFormalDialog = {
|
||||
return item.userName.indexOf(query) > -1
|
||||
},
|
||||
async onConfirm() {
|
||||
const {code, msg} = await $.post('/platform/teacherCongress/delegate/push/addPreselectionDb', {
|
||||
const {code, msg} = await this.$axios.post('/platform/teacherCongress/delegate/push/addPreselectionDb', {
|
||||
userValue: JSON.stringify(this.userValue),
|
||||
sessionId: this.sessionId,
|
||||
representativeType: '正式代表'
|
||||
|
||||
+5
-5
@@ -179,7 +179,7 @@ const pushProgress = {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 少数民族数 -->
|
||||
<!-- <!– 少数民族数 –>
|
||||
<div class="metric-card">
|
||||
<div class="metric-header">
|
||||
<div>
|
||||
@@ -210,7 +210,7 @@ const pushProgress = {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 校级领导 -->
|
||||
<!– 校级领导 –>
|
||||
<div class="metric-card">
|
||||
<div class="metric-header">
|
||||
<div>
|
||||
@@ -241,7 +241,7 @@ const pushProgress = {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 中层领导 -->
|
||||
<!– 中层领导 –>
|
||||
<div class="metric-card">
|
||||
<div class="metric-header">
|
||||
<div>
|
||||
@@ -270,7 +270,7 @@ const pushProgress = {
|
||||
metrics.middleLevelLeader.remaining
|
||||
}} 人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -379,7 +379,7 @@ const pushProgress = {
|
||||
async refreshData(sessionId, teacherMeetName, unionId) {
|
||||
this.teacherMeetName = teacherMeetName
|
||||
const {code, data} = await $.get('/platform/teacherCongress/delegate/push/selfUnionPushMetric', {
|
||||
teacherMeetId: sessionId,
|
||||
sessionId: sessionId,
|
||||
unionId: unionId
|
||||
})
|
||||
if (code === 0) {
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<formal-write ref="formalWriteRef"></formal-write>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('write.js'){}#-->
|
||||
new Vue({
|
||||
el: '#app',
|
||||
components: {
|
||||
'formal-write': write
|
||||
},
|
||||
store,
|
||||
data(){
|
||||
return{
|
||||
isRead:false,
|
||||
userId:null
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.userId = this.$store.state.user.id
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+546
@@ -0,0 +1,546 @@
|
||||
const write = {
|
||||
template: /*language=HTML*/ `
|
||||
<div class="container-x1">
|
||||
|
||||
<div class="form-container">
|
||||
<header class="header-x">
|
||||
<div class="header-left">
|
||||
<h1 class="title">代表信息填写</h1>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
当前届次:
|
||||
<el-select
|
||||
v-model="formData.sessionId"
|
||||
:disabled="session_id!=null && user_id!=null"
|
||||
@change="teacherMeetIdChange"
|
||||
>
|
||||
<el-option v-for="item in sessionOptions" :label="item.fullName" :value="item.id"
|
||||
:key="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="notice-panel" :class="{ hidden: isSelected }">
|
||||
<div>
|
||||
<i class="el-icon-warning notice-icon"></i>
|
||||
<h2 class="notice-title">暂未被推选为教代会代表</h2>
|
||||
<p class="notice-text">如有疑问,请联系所在单位</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="info-box" :class="{ hidden: !isSelected }">
|
||||
<div class="info-content">
|
||||
<i class="fa fa-info-circle info-icon"></i>
|
||||
<div class="info-text">
|
||||
<h3 class="info-title">推选信息</h3>
|
||||
<p class="info-desc">您已被预选为{{ sessionName }}代表</p>
|
||||
<div class="info-details">
|
||||
<p>推选单位:{{ formData.unionName }}</p>
|
||||
<p>推选时间:{{ formData.pushTime }}</p>
|
||||
<p>代表类型:
|
||||
<span>{{
|
||||
[formData.isJdh && ('教代会'+formData.representativeType), formData.isGdh && ('工代会'+formData.representativeType)].filter(Boolean).join('、')
|
||||
}}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="rules"
|
||||
label-width="100px"
|
||||
label-position="top"
|
||||
:class="{ hidden: !isSelected }"
|
||||
:disabled="(formData && formData.taskKey!=='53ff0c2a-ba93-45e9-a9fd-db51cdab3080') || is_read"
|
||||
>
|
||||
<div class="form-section">
|
||||
<h3 class="section-title">基本信息</h3>
|
||||
<div class="form-grid">
|
||||
<el-form-item label="姓名" prop="userName">
|
||||
<el-input v-model="formData.userName" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工号" prop="loginName">
|
||||
<el-input v-model="formData.loginName" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-radio-group v-model="formData.sex">
|
||||
<el-radio label="男">男</el-radio>
|
||||
<el-radio label="女">女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="出生年月" prop="birthday">
|
||||
<el-date-picker
|
||||
v-model="formData.birthday"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 100%"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="民族" prop="nation">
|
||||
<dict-select v-model="formData.nation" style="width: 100%" placeholder="请选择民族"
|
||||
code="USER_NATION"></dict-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="政治面貌" prop="political">
|
||||
<el-input maxlength="100" placeholder="政治面貌"
|
||||
v-model="formData.political"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="学历" prop="education">
|
||||
<dict-select v-model="formData.education" style="width: 100%" placeholder="请选择学历"
|
||||
code="USER_EDUCATION"></dict-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学位" prop="academicDegree">
|
||||
<dict-select v-model="formData.academicDegree" style="width: 100%"
|
||||
placeholder="请选择学位"
|
||||
code="USER_ACADEMIC_DEGREE"></dict-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="所属工会">
|
||||
<el-input
|
||||
v-model="formData.unionName"
|
||||
readonly
|
||||
placeholder="请输入所属工会"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="所属单位">
|
||||
<el-input
|
||||
v-model="formData.unitName"
|
||||
readonly
|
||||
placeholder="请输入所属单位"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="职称" prop="professionalTitle">
|
||||
<dict-select v-model="formData.professionalTitle" style="width: 100%"
|
||||
placeholder="请选择职称"
|
||||
code="technical_title_level"></dict-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="职级" prop="professionalLevel">
|
||||
<dict-select v-model="formData.professionalLevel" style="width: 100%"
|
||||
placeholder="请选择职级"
|
||||
code="JobTitle"></dict-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否专任教师" prop="ordinaryTeacher">
|
||||
<el-radio-group v-model="formData.ordinaryTeacher" size="small">
|
||||
<el-radio border :label="true">是</el-radio>
|
||||
<el-radio border :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否高级职称专任教师" prop="seniorTeacher">
|
||||
<el-radio-group v-model="formData.seniorTeacher" size="small">
|
||||
<el-radio border :label="true">是</el-radio>
|
||||
<el-radio border :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="校级领导" prop="schoolLeader">
|
||||
<el-radio-group v-model="formData.schoolLeader" size="small">
|
||||
<el-radio border :label="true">是</el-radio>
|
||||
<el-radio border :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="中层领导" prop="middleLevelLeader">
|
||||
<el-radio-group v-model="formData.middleLevelLeader" size="small">
|
||||
<el-radio border :label="true">是</el-radio>
|
||||
<el-radio border :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
</div>
|
||||
<div class="form-grid">
|
||||
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input v-model="formData.mobile" maxlength="11"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!--<el-form-item label="电子邮箱" prop="email">
|
||||
<el-input v-model="formData.email" maxlength="255"></el-input>
|
||||
</el-form-item>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="formData && formData.taskKey==='53ff0c2a-ba93-45e9-a9fd-db51cdab3080'" class="form-actions">
|
||||
<el-button @click="onSave">保存草稿</el-button>
|
||||
<el-button type="primary" @click="onSubmit">提交信息</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<div v-if="isSelected && formData && formData.taskKey!=='53ff0c2a-ba93-45e9-a9fd-db51cdab3080'" class="completion-panel">
|
||||
<div>
|
||||
<i class="el-icon-success completion-icon"></i>
|
||||
<h2 class="completion-title">信息提交成功</h2>
|
||||
<p class="completion-text">您已成功提交代表信息,感谢您的配合!</p>
|
||||
<div class="completion-actions">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
mixins: [initTableMixins],
|
||||
components: {},
|
||||
props: {
|
||||
user_id: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
session_id: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
is_read: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isSelected: true,
|
||||
formData: {
|
||||
teacherMeetId: null
|
||||
},
|
||||
rules: {
|
||||
age: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
nation: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
position: [{required: false, message: '必填', trigger: ['blur', 'change']}],
|
||||
political: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
education: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
academicDegree: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
jobTitle: [{required: false, message: '必填', trigger: ['blur', 'change']}],
|
||||
email: [{required: false, message: '必填', trigger: ['blur', 'change']}],
|
||||
vita: [{required: true, message: '必填', trigger: ['blur', 'change']}]
|
||||
},
|
||||
sessionOptions: [],
|
||||
representativeTypeList: ['正式代表', '列席代表'],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
sessionName() {
|
||||
if (this.session_id) {
|
||||
return this.sessionOptions.find(v => v.id === this.session_id)?.fullName
|
||||
} else if (this.formData.sessionId) {
|
||||
return this.sessionOptions.find(v => v.id === this.formData.sessionId)?.fullName
|
||||
}
|
||||
return null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
user_id: {
|
||||
handler(val) {
|
||||
if (val && this.session_id) {
|
||||
this.initOtherInfo()
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
session_id(val) {
|
||||
if (val && this.user_id) {
|
||||
this.formData.sessionId = val
|
||||
this.initOtherInfo()
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.listSession()
|
||||
if (!this.user_id && !this.session_id) {
|
||||
await this.initInfo()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async listSession() {
|
||||
const res = await this.$axios.post("/platform/teacherCongress/common/listSession")
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
if (this.sessionOptions && this.sessionOptions.length > 0) {
|
||||
this.$set(this.formData, 'sessionId', this.sessionOptions[0].id)
|
||||
}
|
||||
}
|
||||
},
|
||||
async initOtherInfo() {
|
||||
const {code, data} = await $.get('/platform/teacherCongress/delegate/push/write/info', {
|
||||
sessionId: this.session_id,
|
||||
userId: this.user_id
|
||||
})
|
||||
if (code === 0) {
|
||||
this.isSelected = data.isSelected
|
||||
if (this.isSelected) {
|
||||
this.formData = data.delegate
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
async initInfo() {
|
||||
const {code, data} = await $.get('/platform/teacherCongress/delegate/push/write/info', {
|
||||
sessionId: this.formData.sessionId
|
||||
})
|
||||
if (code === 0) {
|
||||
this.isSelected = data.isSelected
|
||||
if (this.isSelected) {
|
||||
this.formData = data.delegate
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
teacherMeetIdChange() {
|
||||
this.initInfo()
|
||||
},
|
||||
|
||||
onSave() {
|
||||
this.$refs.formRef.validate(async valid => {
|
||||
if (valid) {
|
||||
this.$confirm('保存后可继续编辑,您确定要保存吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const {code} = await $.post('/platform/teacherCongress/delegate/push/write/save', this.formData)
|
||||
if (code === 0) {
|
||||
this.$message.success('保存成功')
|
||||
this.$emit('refresh')
|
||||
if (this.session_id && this.user_id) {
|
||||
await this.initOtherInfo()
|
||||
} else {
|
||||
await this.initInfo()
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('保存失败')
|
||||
}
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate(async valid => {
|
||||
if (valid) {
|
||||
this.$confirm('您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const {code} = await $.post('/platform/teacherCongress/delegate/push/write/submit', this.formData)
|
||||
if (code === 0) {
|
||||
this.$message.success('提交成功')
|
||||
this.$emit('refresh')
|
||||
if (this.session_id && this.user_id) {
|
||||
await this.initOtherInfo()
|
||||
} else {
|
||||
await this.initInfo()
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('提交失败')
|
||||
}
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.container-x1 {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.header-x {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: white;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.header-x .header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.header-x .header-left .back-button {
|
||||
color: #64748b;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.header-x .header-left .back-button:hover {
|
||||
color: #2563eb;
|
||||
}
|
||||
|
||||
.header-x .header-left .title {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.header-x .header-right {
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.notice-panel {
|
||||
background-color: white;
|
||||
border-radius: 8px;
|
||||
padding: 32px;
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.notice-panel .notice-icon {
|
||||
color: #ccc;
|
||||
font-size: 48px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.notice-panel .notice-title {
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.notice-panel .notice-text {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.completion-panel {
|
||||
background-color: white;
|
||||
border-radius: 8px;
|
||||
padding: 40px;
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.completion-panel .completion-icon {
|
||||
color: #67c23a;
|
||||
font-size: 48px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.completion-panel .completion-title {
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.completion-panel .completion-text {
|
||||
color: #666;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.completion-panel ::v-deep .completion-actions {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
::v-deep .form-container {
|
||||
background-color: white;
|
||||
border-radius: 8px;
|
||||
padding: 32px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
::v-deep .info-box {
|
||||
border-left: 4px solid #2563eb;
|
||||
background-color: #ebf5ff;
|
||||
padding: 16px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.info-box ::v-deep .info-content {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.info-box .info-content ::v-deep .info-icon {
|
||||
color: #2563eb;
|
||||
margin-right: 12px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.info-box .info-content ::v-deep .info-text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.info-box .info-content .info-text ::v-deep .info-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.info-box .info-content .info-text ::v-deep .info-desc {
|
||||
color: #666;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.info-box .info-content .info-text ::v-deep .info-details {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.info-box .info-content .info-text .info-details p {
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
::v-deep .form-section {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.form-section ::v-deep .section-title {
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.form-section ::v-deep .form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
column-gap: 12px;
|
||||
}
|
||||
|
||||
.form-section ::v-deep .form-grid.full-width {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
/* Form actions styles */
|
||||
::v-deep .form-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 16px;
|
||||
margin-top: 32px;
|
||||
padding-top: 24px;
|
||||
border-top: 1px solid #dcdfe6;
|
||||
}
|
||||
|
||||
.form-actions ::v-deep .el-button {
|
||||
border-radius: 4px !important;
|
||||
padding: 10px 24px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
::v-deep .hidden {
|
||||
display: none !important;
|
||||
}
|
||||
`
|
||||
|
||||
}
|
||||
+204
@@ -0,0 +1,204 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
<search-item label="教代会">
|
||||
<el-select v-model="pageForm.sessionId">
|
||||
<el-option v-for="item in sessionOptions" :label="item.fullName" :value="item.id"
|
||||
:key="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="分工会">
|
||||
<el-select v-model="pageForm.unionId" filterable @change="listUnit" clearable style="width: 100%">
|
||||
<el-option v-for="i in unionOptions" :label="i.name" :key="i.id" :value="i.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-radio-group @change="doSearch" v-model="pageForm.isFormalOrAttendance" size="small">
|
||||
<el-radio-button label="全部"></el-radio-button>
|
||||
<el-radio-button label="正式代表"></el-radio-button>
|
||||
<el-radio-button label="列席代表"></el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-radio-group v-model="pageForm.approval" size="small" class="ml10"
|
||||
@change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
</table-tool>
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="tableData"
|
||||
row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
>
|
||||
<el-table-column type="selection" width="55" reserve-selection></el-table-column>
|
||||
<el-table-column type="index" width="55" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName" width="100"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex" width="50"></el-table-column>
|
||||
<el-table-column label="分工会" prop="unionName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="民族" prop="nation"></el-table-column>
|
||||
<el-table-column label="政治面貌" prop="political"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="学历" prop="education"></el-table-column>
|
||||
<el-table-column label="职称" prop="professionalTitle"></el-table-column>
|
||||
<el-table-column label="职级" prop="professionalLevel"></el-table-column>
|
||||
<el-table-column label="教代会代表" prop="isJdh">
|
||||
<template v-slot="{row}">
|
||||
{{row.isJdh?"是":"否"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工代会代表" prop="isGdh">
|
||||
<template v-slot="{row}">
|
||||
{{row.isGdh?"是":"否"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="代表类型" prop="representativeType"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="handleTaskAction(row,1)" size="mini" type="primary">
|
||||
通过
|
||||
</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="handleTaskAction(row,2)" size="mini" type="danger">
|
||||
拒绝
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<el-dialog :close-on-click-modal="false"
|
||||
class="write-dialog"
|
||||
:visible.sync="writeDialog"
|
||||
:title="isRead ? '查看' : '编辑'"
|
||||
top="50px"
|
||||
width="60%">
|
||||
<div style="max-height: 75vh;overflow-y: auto">
|
||||
<formal-write ref="formalWriteRef" :is_read="isRead" :user_id="userId"
|
||||
:session_id="pageForm.sessionId"
|
||||
@refresh="writeDialog=false;doSearch()"></formal-write>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('write.js'){}#-->
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'formal-write': write
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sessionOptions: [],
|
||||
unionOptions: [],
|
||||
pageForm: {
|
||||
isFormalOrAttendance: "全部",
|
||||
unionId: "",
|
||||
sessionId: "",
|
||||
approval: false,
|
||||
},
|
||||
|
||||
writeDialog: false,
|
||||
isRead: false,
|
||||
userId: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.writeDialog = true
|
||||
this.userId = row.userId
|
||||
this.isRead = true
|
||||
},
|
||||
handleTaskAction(row, submitType) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: submitType
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
listUnion() {
|
||||
this.$businessTool.listUnion().then((res) => {
|
||||
this.unionOptions = res
|
||||
})
|
||||
},
|
||||
listSession() {
|
||||
this.$axios.post("/platform/teacherCongress/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
if (this.sessionOptions && this.sessionOptions.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionOptions[0].id
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.listUnion()
|
||||
this.listSession()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user