Merge remote-tracking branch 'origin/main'

This commit is contained in:
@jyuhsin
2026-03-23 15:33:26 +08:00
11 changed files with 435 additions and 235 deletions
@@ -49,7 +49,7 @@ public class ExecutiveCommitteeFormalPushController {
@Inject
private BaseService baseService;
@At("/index")
@At("")
@SaCheckPermission("executiveCommittee.formalPush")
@Ok("beetl:/platform/zhgh/democratic/executiveCommittee/formalPush/index.html")
public void index() {
@@ -1,22 +1,21 @@
package com.budwk.app.zhgh.democratic.executiveCommittee.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Validator;
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.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeTwoPush;
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeConfig;
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeOnePush;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
@@ -30,8 +29,10 @@ import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author zhf
@@ -42,7 +43,7 @@ import java.util.Map;
@At("/platform/executiveCommittee/preparatoryGroupPush")
@Ok("json:full")
@Slf4j
@Api(tags = "执委会推选-正式委员录入")
@Api(tags = "执委会推选-筹备组推选")
public class ExecutiveCommitteePushController {
@Inject
@@ -62,49 +63,38 @@ public class ExecutiveCommitteePushController {
public Result pageData(PageForm pageForm,
String teacherMeetId,
String delegationId,
String unionId,
String roleCode) {
String unionId) {
Sql sql = Sqls.create("""
SELECT
SELECT
t1.*,
t2.loginName,
t2.userName,
t3.name AS unitName,
t4.name unionName,
t5.sex,
t2.name AS unitName,
t3.name unionName,
t4.sex,
TIMESTAMPDIFF(
YEAR,
t5.birthday,
t4.birthday,
CURDATE()) AS age,
t6.name AS delegationName
t5.name AS delegationName
FROM
`executive_committee_two_push` t1
LEFT JOIN executive_committee_one_push t2 on t2.userId=t1.userId and t2.teacherMeetId=t1.teacherMeetId
LEFT JOIN sys_unit t3 ON t2.unitId = t3.id
LEFT JOIN `sys_union` t4 ON t4.id = t3.unionid
LEFT JOIN `vw_user` t5 ON t5.id = t1.userId
LEFT JOIN teacher_congress_delegation t6 ON t6.id = t2.delegationId
`executive_committee_one_push` t1
LEFT JOIN sys_unit t2 ON t1.unitId = t2.id
LEFT JOIN `sys_union` t3 ON t3.id = t2.unionid
LEFT JOIN `vw_user` t4 ON t4.id = t1.userId
LEFT JOIN teacher_congress_delegation t5 ON t5.id = t1.delegationId
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.andEX("t1.teacherMeetId", "=", teacherMeetId);
cnd.andEX("t2.delegationId", "=", delegationId);
cnd.andEX("t1.roleCode", "=", roleCode);
cnd.andEX("t1.isFormal", "=", true);
if (StpUtil.hasRole(RoleConstant.SYSADMIN.name()) ||
StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name()) ||
StpUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
cnd.andEX("t4.id", "=", unionId);
} else {
cnd.andEX("t4.id", "=", SecurityUtil.getUnionId());
}
cnd.andEX("t1.delegationId", "=", delegationId);
cnd.andEX("t3.id", "=", unionId);
cnd.andEX("t1.addType", "=", 2);
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup group = new SqlExpressionGroup();
group.orLike("t2.userName", pageForm.getSearchKeyword());
group.orLike("t2.loginName", pageForm.getSearchKeyword());
group.orLike("t1.userName", pageForm.getSearchKeyword());
group.orLike("t1.loginName", pageForm.getSearchKeyword());
cnd.and(group);
}
cnd.asc("t6.code").asc("t2.firstLetter");
cnd.asc("t5.code").asc("t1.firstLetter");
sql.setCondition(cnd);
return Result.success(baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql));
}
@@ -114,53 +104,93 @@ public class ExecutiveCommitteePushController {
@SaCheckPermission("executiveCommittee.preparatoryGroupPush")
@ApiOperation("查询可以推选委员和已经推选的人员")
public Result getDelegationUser(String teacherMeetId) {
List<ExecutiveCommitteeTwoPush> twoPushList = dao.query(ExecutiveCommitteeTwoPush.class,
Cnd.where("teacherMeetId", "=", teacherMeetId).and(ExecutiveCommitteeTwoPush::getRoleCode, "is not", null));
List<ExecutiveCommitteeTwoPush> userValue = twoPushList.stream().filter(ExecutiveCommitteeTwoPush::getIsFormal).toList();
List<String> userIds = userValue.stream().map(ExecutiveCommitteeTwoPush::getUserId).toList();
List<ExecutiveCommitteeOnePush> userValue = dao.query(ExecutiveCommitteeOnePush.class,
Cnd.where("teacherMeetId", "=", teacherMeetId)
.and("addType", "=", 2));
List<ExecutiveCommitteeOnePush> onePushList = dao.query(ExecutiveCommitteeOnePush.class, Cnd.NEW());
List<String> userIds = onePushList.stream().map(ExecutiveCommitteeOnePush::getUserId).collect(Collectors.toList());
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
Cnd.where("teacherMeetId", "=", teacherMeetId));
Cnd cnd = Cnd.NEW();
cnd.andEX("db.sessionId", "=", teacherMeetId);
cnd.andEX("db.userId", "not in", userIds);
cnd.andEX("db.userId", "!=", SecurityUtil.getUserId());
Sql sql = Sqls.create("""
SELECT
t2.id userId,
t2.username userName,
t2.loginname loginName,
t2.unitName,
t2.sex,
t2.professionalTitle,
t2.professionalLevel,
t1.roleCode,
TIMESTAMPDIFF(
YEAR,
t2.birthday,
CURDATE()) age
SELECT
db.*,
u.professionalTitle,
u.professionalLevel,
TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) AS age
FROM
executive_committee_two_push t1
LEFT JOIN `vw_user` t2 ON t1.userId = t2.id
teacher_congress_delegate db
LEFT JOIN `vw_user` u ON db.userId = u.id
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.andEX("t1.teacherMeetId", "=", teacherMeetId);
cnd.andEX("t1.userId", "not in", userIds);
sql.setCondition(cnd);
List<NutMap> userData = baseService.listMap(sql);
return Result.success(Map.of("userData", userData, "userValue", userValue));
return Result.success(Map.of("userData", userData, "userValue", userValue,"prepareGroupQuotaCount",config.getPrepareGroupQuotaCount()));
}
@At
@SaCheckPermission("executiveCommittee.preparatoryGroupPush")
@SLog(tag = "执委会推选-正式委员录入", msg = "推选委员")
@SLog(tag = "执委会推选-筹备组推选", msg = "推选委员")
public Result addOnePush(@Param("userValue") String[] userValue,
String teacherMeetId) {
try {
if (ObjectUtil.isEmpty(userValue)) {
return Result.error("请选择要录入的委员!");
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
Cnd.where("teacherMeetId", "=", teacherMeetId));
if (ObjectUtil.isEmpty(config)) {
return Result.error("请先配置基础信息");
}
if (ObjectUtil.isEmpty(teacherMeetId)) {
return Result.error("选择教代会!");
if (config.getFirstStartTime().getTime() > System.currentTimeMillis()) {
return Result.error("等待一次预选开始时间");
}
List<ExecutiveCommitteeTwoPush> twoPushList = dao.query(ExecutiveCommitteeTwoPush.class, Cnd.where(ExecutiveCommitteeTwoPush::getTeacherMeetId, "=", teacherMeetId).and(ExecutiveCommitteeTwoPush::getUserId, "in", userValue));
List<String> ids = twoPushList.stream().map(ExecutiveCommitteeTwoPush::getId).toList();
dao.update(ExecutiveCommitteeTwoPush.class, Chain.make("isFormal", true), Cnd.where("id", "in", ids));
if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) {
return Result.error("一次预选已结束");
}
int dbCount = dao.count(ExecutiveCommitteeOnePush.class,
Cnd.where("teacherMeetId", "=", teacherMeetId)
.and("addType", "=", 2));
if (dbCount + userValue.length > config.getPrepareGroupQuotaCount()) {
return Result.error("推选人数限制" + config.getPrepareGroupQuotaCount() + "");
}
Sql sql = Sqls.create("""
SELECT
t1.*
FROM
teacher_congress_delegate t1
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.and("t1.sessionId", "=", teacherMeetId);
cnd.andEX("t1.userId", "in", userValue);
sql.setCondition(cnd);
List<NutMap> dbList = baseService.listMap(sql);
List<ExecutiveCommitteeOnePush> list = new ArrayList<>();
for (String id : userValue) {
NutMap jdhDb = dbList.stream().filter(v -> v.getString("userId").equals(id)).findFirst().orElse(null);
if (ObjectUtil.isEmpty(jdhDb)) {
return Result.error("请选择正确的代表!");
}
ExecutiveCommitteeOnePush onePush = new ExecutiveCommitteeOnePush();
onePush.setPushDate(DateUtil.date());
onePush.setUserId(jdhDb.getString("userId"));
onePush.setUserName(jdhDb.getString("userName"));
onePush.setLoginName(jdhDb.getString("loginName"));
onePush.setDelegationId(jdhDb.getString("delegationId"));
onePush.setUnionId(jdhDb.getString("unionId"));
onePush.setUnitId(jdhDb.getString("unitId"));
onePush.setTeacherMeetId(teacherMeetId);
String firstLetter = String.valueOf(getFirstLetter(jdhDb.getString("userName")));
onePush.setFirstLetter(firstLetter);
onePush.setAddType(2);
list.add(onePush);
}
dao.insert(list);
return Result.success("添加成功!");
} catch (Exception e) {
e.printStackTrace();
@@ -172,9 +202,16 @@ public class ExecutiveCommitteePushController {
@SaCheckPermission("executiveCommittee.preparatoryGroupPush")
@SLog(tag = "执委会推选-筹备组推选", msg = "删除推选的人")
public Result doDelete(@Valid String id, @Valid String teacherMeetId) {
dao.update(ExecutiveCommitteeTwoPush.class, Chain.make("isFormal", false), Cnd.where("id", "=", id));
return Result.success("删除成功!");
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
Cnd.where("teacherMeetId", "=", teacherMeetId));
if (ObjectUtil.isEmpty(config)) {
return Result.error("请先配置基础信息");
}
int num = dao.clear(ExecutiveCommitteeOnePush.class, Cnd.where("id", "=", id));
return num >= 0 ? Result.success() : Result.error();
}
public static char getFirstLetter(String str) {
if (str == null || str.isEmpty()) {
throw new IllegalArgumentException("字符串不能为空");
@@ -40,6 +40,7 @@ public class ExecutiveCommitteeMemberServiceImpl extends BaseServiceImpl impleme
( SELECT count( 1 ) FROM executive_committee_two_push tp WHERE tp.userId = op.userId ) as pushCount,
CASE op.addType
WHEN 1 THEN '执委会委员'
WHEN 2 THEN '筹备组推选'
WHEN 3 THEN '工会委员会委员'
ELSE '未知'
END AS addTypeName
@@ -1,22 +1,30 @@
package com.budwk.app.zhgh.democratic.proposal.controller.transact;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONUtil;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.result.Result;
import com.budwk.app.flow.constant.FlowConst;
import com.budwk.app.flow.entity.ProcessTask;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.flow.service.FlowCommonService;
import com.budwk.app.flow.service.ProcessTaskService;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
import com.budwk.app.zhgh.democratic.proposal.models.ProposalMerge;
import com.budwk.app.zhgh.democratic.proposal.param.ProposalSearchParam;
import com.budwk.app.zhgh.democratic.proposal.service.ProposalCommitteeFilingService;
import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
@@ -26,12 +34,14 @@ import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
import org.nutz.lang.random.R;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import javax.validation.Valid;
import java.util.List;
import java.util.Objects;
@IocBean
@At("/platform/proposal/committeeFiling")
@@ -47,6 +57,12 @@ public class ProposalCommitteeFilingController {
@Inject
private FlowCommonService flowCommonService;
@Inject
private ProposalCommonService proposalCommonService;
@Inject
private ProcessTaskService processTaskService;
@At("")
@Ok("beetl:/platform/zhgh/democratic/proposal/transact/committeeFiling/index.html")
@@ -121,6 +137,7 @@ public class ProposalCommitteeFilingController {
List<Integer> taskIds = (List<Integer>) args.get("processTaskIds");
List<String> proposalIds = (List<String>) args.get("proposalIds");
List<NutMap> proposals = (List<NutMap>) args.get("proposals");
// 记录提案并案
dao.clear(ProposalMerge.class, Cnd.where(ProposalMerge::getProposalId, "in", proposalIds));
@@ -136,10 +153,81 @@ public class ProposalCommitteeFilingController {
for (Integer taskId : taskIds) {
Dict taskArgs = args.clone();
taskArgs.put(FlowConst.PROCESS_TASK_ID_KEY, taskId);
NutMap proposal = proposals.stream().filter(v -> v.getInt("taskId") == taskId).findFirst().orElse(null);
taskArgs.put("tf_proposalId", proposal.getString("id"));
taskArgs.put("tf_code", proposal.getString("tf_code"));
taskArgs.put("tf_oldCode", proposal.getString("tf_oldCode"));
taskArgs.put("tf_typeId", proposal.getString("tf_typeId"));
taskArgs.put("tf_oldTypeId", proposal.getString("tf_oldTypeId"));
if (!proposal.getString("tf_code").equals(proposal.getString("tf_oldCode"))) {
dao.update(ProposalInfo.class, Chain.make("code", proposal.getString("tf_code")), Cnd.where(ProposalInfo::getId, "=", proposal.getString("id")));
}
if (!proposal.getString("tf_typeId").equals(proposal.getString("tf_oldTypeId"))) {
dao.update(ProposalInfo.class, Chain.make("typeId", proposal.getString("tf_typeId")), Cnd.where(ProposalInfo::getId, "=", proposal.getString("id")));
}
flowCommonService.executeTask(taskArgs);
}
return Result.success();
}
@At
@SaCheckLogin
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("proposal.committeeFiling")
@ApiOperation("撤销任务")
public Result revokeTask(@Param("taskId") Long taskId, @Param("proposalId") String proposalId) {
// 单条撤回
List<String> mergeProposalIds = proposalCommonService.mergeProposal(proposalId);
if (ObjectUtil.isEmpty(mergeProposalIds)) {
//撤回要把修改的提案编号和提案类型同步改回来
ProcessTask processTask = dao.fetch(ProcessTask.class, taskId);
Dict processTaskArgs = JSONUtil.toBean(processTask.getVariable(), Dict.class);
String tfOldCode = processTaskArgs.getStr("tf_oldCode");
String tfOldTypeId = processTaskArgs.getStr("tf_oldTypeId");
dao.update(ProposalInfo.class,
Chain.make("code", tfOldCode).add("typeId", tfOldTypeId),
Cnd.where(ProposalInfo::getId, "=", proposalId));
flowCommonService.revokeTask(taskId);
return Result.success();
}
// 并案撤回
ProcessTask thisTask = dao.fetch(ProcessTask.class, taskId);
List<ProcessTask> mergeTasks = processTaskService.getDoneTaskByBizIdTaskName(mergeProposalIds, thisTask.getTaskName());
for (ProcessTask mergeTask : mergeTasks) {
//撤回要把修改的提案编号和提案类型同步改回来
Dict processTaskArgs = JSONUtil.toBean(mergeTask.getVariable(), Dict.class);
String tfOldCode = processTaskArgs.getStr("tf_oldCode");
String tfOldTypeId = processTaskArgs.getStr("tf_oldTypeId");
dao.update(ProposalInfo.class,
Chain.make("code", tfOldCode).add("typeId", tfOldTypeId),
Cnd.where(ProposalInfo::getId, "=", processTaskArgs.getStr("tf_proposalId")));
flowCommonService.revokeTask(mergeTask.getId());
}
// 删除并案信息
dao.clear(ProposalMerge.class, Cnd.where(ProposalMerge::getProposalId, "in", mergeProposalIds));
return Result.success();
}
@At
@ApiOperation("执行任务")
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("proposal.committeeFiling")
public Result executeTask(@Param("data") String data) {
Dict args = Json.fromJson(Dict.class, data);
if (Objects.isNull(args.getStr("proposalId"))) {
return Result.error("参数错误!");
}
// 审核修改提案编号和提案类型
dao.update(
ProposalInfo.class,
Chain.make("code", args.getStr("tf_code")).add("typeId", args.getStr("tf_typeId")),
Cnd.where(ProposalInfo::getId, "=", args.getStr("proposalId")));
flowCommonService.executeTask(args);
return Result.success();
}
}
@@ -17,7 +17,7 @@ import com.budwk.app.flow.service.FlowCommonService;
import com.budwk.app.flow.service.ProcessTaskService;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
import com.budwk.app.zhgh.democratic.proposal.models.ProposalMerge;
import com.budwk.app.zhgh.democratic.proposal.param.ProposalSearchParam;
import com.budwk.app.zhgh.democratic.proposal.service.ProposalCommitteeFilingUnitService;
import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService;
@@ -148,8 +148,7 @@ public class ProposalCommitteeFilingUnitController {
flowCommonService.executeTask(cloneArgs);
}
ProposalInfo info = proposalCommonService.fetch(proposalId);
info.setCaseFilingResult(args.getStr("caseFilingResult"));
baseService.dao().clear(ProposalMerge.class, Cnd.where(ProposalMerge::getProposalId, "in", mergeProposalIds));
return Result.success();
}
@@ -178,30 +177,30 @@ public class ProposalCommitteeFilingUnitController {
@At
@SaCheckPermission("proposal.committeeFilingUnit")
public Result doUpData(){
List<ProcessTask> tasks = baseService.dao().query(ProcessTask.class, Cnd.where("taskName", "=", "personnelOffice"));
List<ProcessTask> tasks = baseService.dao().query(ProcessTask.class, Cnd.where("taskName", "=", "committee"));
List<Long> list = tasks.stream().map(ProcessTask::getId).toList();
List<ProcessTaskActor> actorList = baseService.dao().query(ProcessTaskActor.class, Cnd.where(ProcessTaskActor::getProcessTaskId, "in", list));
List<ProcessInstance> instanceList = baseService.dao().query(ProcessInstance.class, Cnd.where(ProcessInstance::getProcessDefineId, "=", 396));
List<ProcessInstance> instanceList = baseService.dao().query(ProcessInstance.class, Cnd.where(ProcessInstance::getProcessDefineId, "=", 399));
for (ProcessTask task : tasks) {
task.setTaskName("committee");
task.setDisplayName("提案委员会立案");
task.setDisplayName("人事处审核");
task.setFormKey("/platform/proposal/committee");
task.setH5FormKey("");
}
for (ProcessTaskActor actor : actorList) {
actor.setActorId("1fb89886bf4c43dcb48409c83d3363c3");
actor.setActorAccount("018054");
actor.setActorName("赵丽霞");
actor.setActorUnitName("工会");
actor.setActorUnitId("0011");
actor.setActorId("a2e5874eb28e42e9811f1af4d4bcb5a5");
actor.setActorAccount("001094");
actor.setActorName("郑胜水");
actor.setActorUnitName("人事处(党委教师工作部、人才工作办公室)");
actor.setActorUnitId("1001");
}
for (ProcessInstance instance : instanceList) {
instance.setProcessDefineId(399L);
instance.setProcessDefineId(400L);
}
baseService.update(tasks);
@@ -67,6 +67,7 @@ layout("/layouts/platform.html"){
:data="tableData"
row-key="id"
@sort-change="pageOrder"
v-loading="tableLoading"
>
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
@@ -41,19 +41,6 @@ layout("/layouts/platform.html"){
v-for="item in delegations"></el-option>
</el-select>
</search-item>
<search-item label="委员类别">
<el-select
v-model="pageForm.roleCode"
filterable
placeholder="请选择委员类别"
clearable
style="width:100%;"
>
<el-option label="执委会委员" value="1"></el-option>
<el-option label="工会委员会委员" value="2"></el-option>
<el-option label="经审委员会委员" value="3"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
@@ -63,7 +50,7 @@ layout("/layouts/platform.html"){
size="small"
type="primary"
@click="$refs.onePushFormalRef.onOpen(pageForm.teacherMeetId)"
>正式委员录入
>委员推选
</el-button>
</table-tool>
@@ -86,13 +73,6 @@ layout("/layouts/platform.html"){
<el-table-column align="center" label="代表团" prop="delegationName"></el-table-column>
<el-table-column align="center" label="所属工会" prop="unionName"></el-table-column>
<el-table-column align="center" label="所属单位" prop="unitName"></el-table-column>
<el-table-column label="委员类别" prop="roleCode">
<template scope="{row}">
<el-tag v-if="row.roleCode === '1'">执委会委员</el-tag>
<el-tag v-if="row.roleCode === '2'">工会委员会委员</el-tag>
<el-tag v-if="row.roleCode === '3'">经审委员会委员</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="100" fixed="right">
<template scope="{row}">
<el-button
@@ -29,9 +29,9 @@ const PROPOSAL_INFO = {
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="viewData.caseFilingResult"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="调研情况" :span="3">
<!--<el-descriptions-item label="调研情况" :span="3">
<div class="text-left">{{viewData.researchFindings}}</div>
</el-descriptions-item>
</el-descriptions-item>-->
<el-descriptions-item label="提案案由" :span="3">
<div class="text-left" v-html="viewData.brief"></div>
</el-descriptions-item>
@@ -24,24 +24,24 @@ layout("/layouts/platform.html"){
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.createUserKeyword"></el-input>
</search-item>
<!-- <search-item label="提案人姓名">-->
<!-- <el-input-->
<!-- @keyup.enter.native="doSearch"-->
<!-- clearable-->
<!-- placeholder="请输入提案人姓名"-->
<!-- v-model="pageForm.createUserName"-->
<!-- style="width: 100%"-->
<!-- ></el-input>-->
<!-- </search-item>-->
<!-- <search-item label="提案人工号">-->
<!-- <el-input-->
<!-- @keyup.enter.native="doSearch"-->
<!-- clearable-->
<!-- placeholder="请输入提案人工号"-->
<!-- v-model="pageForm.createUserLoginName"-->
<!-- style="width: 100%"-->
<!-- ></el-input>-->
<!-- </search-item>-->
<!-- <search-item label="提案人姓名">-->
<!-- <el-input-->
<!-- @keyup.enter.native="doSearch"-->
<!-- clearable-->
<!-- placeholder="请输入提案人姓名"-->
<!-- v-model="pageForm.createUserName"-->
<!-- style="width: 100%"-->
<!-- ></el-input>-->
<!-- </search-item>-->
<!-- <search-item label="提案人工号">-->
<!-- <el-input-->
<!-- @keyup.enter.native="doSearch"-->
<!-- clearable-->
<!-- placeholder="请输入提案人工号"-->
<!-- v-model="pageForm.createUserLoginName"-->
<!-- style="width: 100%"-->
<!-- ></el-input>-->
<!-- </search-item>-->
</search>
</el-card>
@@ -53,9 +53,10 @@ layout("/layouts/platform.html"){
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" ref="tableRef" row-key="id" style="width: 100%">
<el-table :data="tableData" @sort-change="pageOrder" ref="tableRef" row-key="id" style="width: 100%" v-loading="tableLoading">
<el-table-column type="selection" width="50" fixed="left" v-if="!pageForm.approval"></el-table-column>
<el-table-column label="序号" width="50" type="index" :index="indexMethod" fixed="left"></el-table-column>
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
@@ -99,54 +100,81 @@ layout("/layouts/platform.html"){
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="">
<el-form-item label="立案结果" prop="tf_caseFilingResult"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.tf_caseFilingResult" size="small">
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_RESULT" :label="item.code"
border>{{item.label}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="['CONFIRM_FILING'].includes(formData.tf_caseFilingResult)" label="立案类型"
prop="tf_caseFilingType"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.tf_caseFilingType" size="small">
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_TYPE" :label="item.code" border>
{{item.label}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="主办单位"
v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult)"
:rules="[{required:['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult),message:'必填',trigger:['change','blur']}]"
prop="tf_masterUnitId"
>
<el-select v-model="formData.tf_masterUnitId" filterable clearable style="width: 100%">
<el-option
v-for="item in underTakeOptions"
:label="item.name"
:value="item.id"
:key="item.id"
:disabled="formData && formData.tf_slaveUnitIds.includes(item.id)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="协办单位"
v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult)"
prop="tf_slaveUnitIds"
>
<el-select v-model="formData.tf_slaveUnitIds" filterable clearable multiple
style="width: 100%">
<el-option
v-for="item in underTakeOptions"
:label="item.name"
:value="item.id"
:key="item.id"
:disabled="item.id===formData.tf_masterUnitId"
></el-option>
</el-select>
</el-form-item>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="提案编号" prop="tf_code"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input placeholder="提案编号" v-model="formData.tf_code"
style="width: 100%;"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="提案类别" prop="tf_typeId"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-select filterable placeholder="提案类别" v-model="formData.tf_typeId"
style="width: 100%;">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in typeOptions"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<!-- <el-form-item label="立案结果" prop="tf_caseFilingResult"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.tf_caseFilingResult" size="small">
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_RESULT" :label="item.code"
border>{{item.label}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="['CONFIRM_FILING'].includes(formData.tf_caseFilingResult)" label="立案类型"
prop="tf_caseFilingType"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.tf_caseFilingType" size="small">
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_TYPE" :label="item.code" border>
{{item.label}}
</el-radio>
</el-radio-group>
</el-form-item>-->
<template>
<!--
:rules="[{required:['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult),message:'必填',trigger:['change','blur']}]"
v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult)"
-->
<el-form-item
label="主办单位"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
prop="tf_masterUnitId"
>
<el-select v-model="formData.tf_masterUnitId" filterable clearable style="width: 100%">
<el-option
v-for="item in underTakeOptions"
:label="item.name"
:value="item.id"
:key="item.id"
:disabled="formData && formData.tf_slaveUnitIds.includes(item.id)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="协办单位"
prop="tf_slaveUnitIds"
>
<el-select v-model="formData.tf_slaveUnitIds" filterable clearable multiple
style="width: 100%">
<el-option
v-for="item in underTakeOptions"
:label="item.name"
:value="item.id"
:key="item.id"
:disabled="item.id===formData.tf_masterUnitId"
></el-option>
</el-select>
</el-form-item>
</template>
<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>
@@ -162,7 +190,7 @@ layout("/layouts/platform.html"){
</template>
<template #public>
<merge ref="mergeRef" @close="$refs.guava.index()"></merge>
<merge ref="mergeRef" @close="mergeClose"></merge>
</template>
</guava>
</div>
@@ -174,6 +202,7 @@ layout("/layouts/platform.html"){
new Vue({
el: "#app",
store,
dicts: ["PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
mixins: [initTableMixins],
components: {
@@ -202,10 +231,16 @@ layout("/layouts/platform.html"){
showApprovalForm: false,
sessionOptions: [],
delegationOptions: [],
underTakeOptions: []
underTakeOptions: [],
typeOptions: [],
}
},
methods: {
mergeClose() {
this.doSearch()
this.$refs.guava.index()
this.$refs.tableRef.clearSelection();
},
openView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
@@ -216,7 +251,12 @@ layout("/layouts/platform.html"){
this.$refs.guava.edit(() => {
this.showApprovalForm = true
this.formData = {
tf_code: row.code,
tf_oldCode: row.code,
tf_typeId: row.typeId,
tf_oldTypeId: row.typeId,
processTaskId: row.taskId,
proposalId: row.id,
taskName: row.curTaskName,
tf_masterUnitId: null,
tf_slaveUnitIds: []
@@ -242,7 +282,7 @@ layout("/layouts/platform.html"){
}
const loading = createLoading('提交中')
this.$axios.post("/flow/common/executeTask", {
this.$axios.post("/platform/proposal/committeeFiling/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val,
@@ -287,7 +327,10 @@ layout("/layouts/platform.html"){
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
this.$axios.post("/platform/proposal/committeeFiling/revokeTask", {
taskId: row.taskId,
proposalId: row.id
}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
@@ -321,12 +364,21 @@ layout("/layouts/platform.html"){
this.underTakeOptions = res.data
}
})
}
},
// 获取提案类别
listProposalType() {
this.$axios.post("/platform/proposal/common/listProposalType").then((res) => {
if (res.code === 0) {
this.typeOptions = res.data
}
})
},
},
created() {
this.pageData()
this.listOpenSession()
this.listUnderTake()
this.listProposalType()
}
})
</script>
@@ -6,13 +6,26 @@ const merge = {
</div>
<el-table :data="selection" ref="tableRef" row-key="id" style="width: 100%">
<el-table-column label="序号" width="50" type="index"></el-table-column>
<el-table-column label="提案编号" prop="code"></el-table-column>
<el-table-column label="提案编号" prop="code">
<template slot-scope="{row}">
<el-input placeholder="提案编号" v-model="row.tf_code"
style="width: 100%;"></el-input>
</template>
</el-table-column>
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="提案类别" prop="typeName"></el-table-column>
<el-table-column label="提案类别" prop="typeName">
<template slot-scope="{row}">
<el-select filterable placeholder="提案类别" v-model="row.tf_typeId"
style="width: 100%;">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in typeOptions"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="届次" prop="sessionName"></el-table-column>
<el-table-column label="代表团" prop="delegationName"></el-table-column>
<el-table-column label="操作" fixed="right" width="100px">
<template scope="scope">
<template slot-scope="scope">
<el-button @click="onRemove(scope.$index)" size="mini" type="danger">移除</el-button>
</template>
</el-table-column>
@@ -22,55 +35,61 @@ const merge = {
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="">
<el-form-item label="立案结果" prop="tf_caseFilingResult"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.tf_caseFilingResult" size="small">
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_RESULT" :label="item.code"
border>{{item.label}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="['CONFIRM_FILING'].includes(formData.tf_caseFilingResult)" label="立案类型"
prop="tf_caseFilingType"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.tf_caseFilingType" size="small">
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_TYPE" :label="item.code" border>
{{item.label}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="主办单位"
v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult)"
:rules="[{required:['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult),message:'必填',trigger:['change','blur']}]"
prop="tf_masterUnitId"
>
<el-select v-model="formData.tf_masterUnitId" filterable clearable style="width: 100%">
<el-option
v-for="item in underTakeOptions"
:label="item.name"
:value="item.id"
:key="item.id"
:disabled="formData && formData.tf_slaveUnitIds.includes(item.id)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="协办单位"
v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult)"
prop="tf_slaveUnitIds"
>
<el-select v-model="formData.tf_slaveUnitIds" filterable clearable multiple
style="width: 100%">
<el-option
v-for="item in underTakeOptions"
:label="item.name"
:value="item.id"
:key="item.id"
:disabled="item.id===formData.tf_masterUnitId"
></el-option>
</el-select>
</el-form-item>
<el-form :model="formData" ref="formRef" label-width="120px" label-suffix="">
<!-- <el-form-item label="立案结果" prop="tf_caseFilingResult"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.tf_caseFilingResult" size="small">
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_RESULT" :label="item.code"
border>{{item.label}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="['CONFIRM_FILING'].includes(formData.tf_caseFilingResult)" label="立案类型"
prop="tf_caseFilingType"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.tf_caseFilingType" size="small">
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_TYPE" :label="item.code" border>
{{item.label}}
</el-radio>
</el-radio-group>
</el-form-item>-->
<!--
v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult)"
:rules="[{required:['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult),message:'必填',trigger:['change','blur']}]"
-->
<template>
<el-form-item
label="主办单位"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
prop="tf_masterUnitId"
>
<el-select v-model="formData.tf_masterUnitId" filterable clearable style="width: 100%">
<el-option
v-for="item in underTakeOptions"
:label="item.name"
:value="item.id"
:key="item.id"
:disabled="formData && formData.tf_slaveUnitIds.includes(item.id)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="协办单位"
prop="tf_slaveUnitIds"
>
<el-select v-model="formData.tf_slaveUnitIds" filterable clearable multiple
style="width: 100%">
<el-option
v-for="item in underTakeOptions"
:label="item.name"
:value="item.id"
:key="item.id"
:disabled="item.id===formData.tf_masterUnitId"
></el-option>
</el-select>
</el-form-item>
</template>
<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>
@@ -92,14 +111,30 @@ const merge = {
tf_masterUnitId: null,
tf_slaveUnitIds: []
},
underTakeOptions: []
underTakeOptions: [],
typeOptions: [],
}
},
methods: {
onOpen(selection, formData) {
selection.map(row => {
this.$set(row, 'tf_code', row.code)
this.$set(row, 'tf_oldCode', row.code)
this.$set(row, 'tf_typeId', row.typeId)
this.$set(row, 'tf_oldTypeId', row.typeId)
})
this.selection = selection
this.formData = formData
this.listUnderTake()
this.listProposalType()
},
// 获取提案类别
listProposalType() {
this.$axios.post("/platform/proposal/common/listProposalType").then((res) => {
if (res.code === 0) {
this.typeOptions = res.data
}
})
},
// 移除
onRemove(index) {
@@ -118,6 +153,12 @@ const merge = {
})
},
handleTaskAction(val) {
const names=this.selection.filter(row => !row.tf_code).map(row => row.name).join(',')
if (names){
this.$message.warning(names+"必须要填写提案编号!")
return
}
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@@ -136,6 +177,7 @@ const merge = {
data: JSON.stringify({
...this.formData,
proposalIds: this.selection.map(v => v.id),
proposals:this.selection,
submitType: val,
tf_masterUnitName: this.formData.tf_masterUnitId ? this.underTakeOptions.find(v => v.id === this.formData.tf_masterUnitId)?.name : null,
tf_slaveUnitNames: this.formData.tf_slaveUnitIds.map(v => this.underTakeOptions.find(v2 => v2.id === v)?.name),
@@ -48,14 +48,14 @@ layout("/layouts/platform.html"){
<el-card shadow="never">
<table-tool :columns.sync="tableColumns">
<!-- <el-button type="primary" icon="el-icon-plus" size="small" @click="openMerge">并案审核</el-button>-->
<el-button type="primary" icon="el-icon-plus" size="small" @click="doUpData">更新</el-button>
<!-- <el-button type="primary" icon="el-icon-plus" size="small" @click="doUpData">更新</el-button>-->
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" ref="tableRef" row-key="id" style="width: 100%">
<el-table-column type="selection" width="50" fixed="left" v-if="!pageForm.approval"></el-table-column>
<el-table :data="tableData" @sort-change="pageOrder" ref="tableRef" row-key="id" style="width: 100%" v-loading="tableLoading">
<!-- <el-table-column type="selection" width="50" fixed="left" v-if="!pageForm.approval"></el-table-column>-->
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
fixed="left"></el-table-column>
<el-table-column
@@ -124,7 +124,7 @@ layout("/layouts/platform.html"){
:rules="[{required:['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult),message:'必填',trigger:['change','blur']}]"
prop="tf_masterUnitId"
>
<el-select v-model="formData.tf_masterUnitId" filterable clearable style="width: 100%">
<el-select v-model="formData.tf_masterUnitId" filterable clearable style="width: 100%" disabled>
<el-option
v-for="item in underTakeOptions"
:label="item.name"
@@ -139,7 +139,7 @@ layout("/layouts/platform.html"){
prop="tf_slaveUnitIds"
>
<el-select v-model="formData.tf_slaveUnitIds" filterable clearable multiple
style="width: 100%">
style="width: 100%" disabled>
<el-option
v-for="item in underTakeOptions"
:label="item.name"