This commit is contained in:
那些花儿
2025-10-19 19:17:30 +08:00
parent 6e5c612600
commit 4269459d70
31 changed files with 1208 additions and 184 deletions
@@ -17,6 +17,7 @@ import com.budwk.app.flow.entity.ProcessDefine;
import com.budwk.app.flow.entity.ProcessInstance;
import com.budwk.app.flow.entity.ProcessTask;
import com.budwk.app.flow.enums.ProcessEventTypeEnum;
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
import com.budwk.app.flow.enums.ProcessTaskPerformTypeEnum;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.flow.service.FlowCommonService;
@@ -27,6 +28,7 @@ import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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.ioc.aop.Aop;
@@ -269,6 +271,9 @@ public class FlowCommonController {
// 激活
dao.update(selfTask);
// 流程激活
dao.update(ProcessInstance.class, Chain.make("state", ProcessInstanceStateEnum.DOING.getCode()),Cnd.where(ProcessInstance::getId, "=", selfTask.getProcessInstanceId()));
// 发送任务撤回事件 确保上面执行成功
for (ProcessTask task : taskList) {
ProcessPublisher.notify(ProcessEvent.builder().eventType(ProcessEventTypeEnum.PROCESS_TASK_REVOKE).sourceId(task.getId()).build());
@@ -1,6 +1,7 @@
package com.budwk.app.zhgh.democratic.proposal.controller.export;
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.ExportTableColumns;
import com.budwk.app.base.result.Result;
@@ -67,6 +68,9 @@ public class ProposalExportComprehensiveController {
$condition
""");
Cnd cnd = Cnd.NEW();
if(StrUtil.isNotBlank(pageForm.getUnderTakeUnitId())){
cnd.andEX("pru.unitId", "=", pageForm.getUnderTakeUnitId());
}
ProposalQueryComprehensiveParam.buildSearch(cnd, pageForm);
cnd.groupBy("info.id");
sql.setCondition(cnd);
@@ -5,6 +5,7 @@ import cn.hutool.core.util.ArrayUtil;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.result.Result;
import com.budwk.app.flow.entity.ProcessTask;
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.zhgh.democratic.proposal.param.ProposalQueryComprehensiveParam;
import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService;
@@ -99,6 +100,7 @@ public class ProposalQueryCollectProgressController {
if (ArrayUtil.contains(pageForm.getCollectIds(), 40)) {
seg.or("t.taskName", "not in", List.of("startTask", "second", "delegation"));
seg.and("t.taskName", "is not", null);
seg.or("ins.state","=", ProcessInstanceStateEnum.FINISHED.getCode());
}
if (!seg.isEmpty()) {
cnd.and(seg);
@@ -107,14 +109,14 @@ public class ProposalQueryCollectProgressController {
sql.setCondition(cnd);
Pagination pagination = proposalCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
List<NutMap> list = (List<NutMap>) pagination.getList();
for (NutMap row : list) {
int count = dao.count(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "=", row.getString("instanceId"))
.and(ProcessTask::getTaskName, "=", "second")
.and(ProcessTask::getTaskState, "=", ProcessTaskStateEnum.FINISHED.getCode())
);
}
// for (NutMap row : list) {
// int count = dao.count(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "=", row.getString("instanceId"))
// .and(ProcessTask::getTaskName, "=", "second")
// .and(ProcessTask::getTaskState, "=", ProcessTaskStateEnum.FINISHED.getCode())
// );
//
//
// }
return Result.success(pagination);
}
@@ -114,8 +114,8 @@ public class ProposalQueryComprehensiveController {
}
}
if(StrUtil.isNotBlank(pageForm.getUndertakeUnitId())){
if(StrUtil.isNotBlank(pageForm.getUnderTakeUnitId())){
cnd.andEX("pru.unitId", "=", pageForm.getUnderTakeUnitId());
}
ProposalQueryComprehensiveParam.buildSearch(cnd, pageForm);
cnd.groupBy("info.id");
@@ -45,7 +45,7 @@ public class ProposalQueryYearReportController {
Sql sql = Sqls.create("""
SELECT
info.*,
COUNT(p.consolidationIds) > 0 AS isConsolidation,
IF(mer.proposalId IS NOT NULL, 1, 0) AS merge,
type.name AS typeName,
tcs.fullName AS sessionName,
tcd.`name` AS delegationName,
@@ -59,8 +59,8 @@ public class ProposalQueryYearReportController {
GROUP_CONCAT(DISTINCT CASE WHEN pru.isMaster = 0 THEN pru.unitName END) AS slaveUnitNames
FROM
proposal_info info
LEFT JOIN proposal_consolidation p ON JSON_CONTAINS(p.consolidationIds, JSON_QUOTE(info.id))
LEFT JOIN proposal_type type on type.id = info.typeId
LEFT JOIN proposal_merge mer ON mer.proposalId = info.id
LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId
LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId
LEFT JOIN teacher_congress_delegate tcde on tcde.loginName = info.createUserLoginName
@@ -21,6 +21,7 @@ import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import javax.validation.Valid;
@@ -48,7 +49,7 @@ public class ProposalSeniorBasicController {
Sql sql = Sqls.create("""
SELECT
info.*,
COUNT(p.consolidationIds) > 0 AS isConsolidation,
IF(mer.proposalId IS NOT NULL, 1, 0) AS merge,
type.name AS typeName,
tcs.fullName AS sessionName,
tcd.`name` AS delegationName,
@@ -58,15 +59,16 @@ public class ProposalSeniorBasicController {
ins.variable instanceVariable,
ins.processDefineId instanceProcessDefineId,
t.displayName curTaskName,
JSON_UNQUOTE(JSON_EXTRACT(caseTasks.variable, '$.tf_hostUnitName')) AS masterUnitName,
JSON_EXTRACT(caseTasks.variable, '$.tf_helpUnitNames') AS slaveUnitNames
GROUP_CONCAT(DISTINCT CASE WHEN pru.isMaster = 1 THEN pru.unitName END) AS masterUnitName,
GROUP_CONCAT(DISTINCT CASE WHEN pru.isMaster = 0 THEN pru.unitName END) AS slaveUnitNames
FROM
proposal_info info
LEFT JOIN proposal_consolidation p ON JSON_CONTAINS(p.consolidationIds, JSON_QUOTE(info.id))
LEFT JOIN proposal_merge mer ON mer.proposalId = info.id
LEFT JOIN proposal_type type on type.id = info.typeId
LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId
LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId
LEFT JOIN teacher_congress_delegate tcde on tcde.loginName = info.createUserLoginName
LEFT JOIN proposal_reply_unit pru ON pru.proposalId = info.id
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
LEFT JOIN (SELECT processInstanceId, MAX(finishTime) AS finishTime FROM wf_process_task WHERE taskName = '9846ab38-40c5-4093-bafc-a9b3b443338b' AND taskState = 20 GROUP BY processInstanceId) latestTasks ON latestTasks.processInstanceId = ins.id
LEFT JOIN wf_process_task caseTasks ON caseTasks.processInstanceId = ins.id AND caseTasks.taskName = '9846ab38-40c5-4093-bafc-a9b3b443338b' AND caseTasks.taskState = 20 AND caseTasks.finishTime = latestTasks.finishTime
@@ -74,9 +76,6 @@ public class ProposalSeniorBasicController {
$condition
""");
Cnd cnd = Cnd.NEW();
if (StrUtil.isNotBlank(pageForm.getUndertakeUnitId())) {
}
ProposalQueryComprehensiveParam.buildSearch(cnd, pageForm);
cnd.groupBy("info.id");
sql.setCondition(cnd);
@@ -89,8 +88,8 @@ public class ProposalSeniorBasicController {
@SaCheckPermission("proposal.senior.basic")
@ApiOperation(value = "提案内容修改")
@Aop(TransAop.READ_COMMITTED)
public Result update(@Valid ProposalInfo proposalInfo) {
dao.update(proposalInfo,"^name|typeId|brief|measures|excerpt$$");
public Result update(@Valid @Param("info") ProposalInfo proposalInfo) {
dao.update(proposalInfo,"^name|typeId|brief|measures|excerpt|suggestUnits$");
return Result.success();
}
@@ -50,7 +50,7 @@ public class ProposalSeniorDeleteController {
Sql sql = Sqls.create("""
SELECT
info.*,
COUNT(p.consolidationIds) > 0 AS isConsolidation,
IF(mer.proposalId IS NOT NULL, 1, 0) AS merge,
type.name AS typeName,
tcs.fullName AS sessionName,
tcd.`name` AS delegationName,
@@ -62,18 +62,19 @@ public class ProposalSeniorDeleteController {
t.displayName curTaskName
FROM
proposal_info info
LEFT JOIN proposal_consolidation p ON JSON_CONTAINS(p.consolidationIds, JSON_QUOTE(info.id))
LEFT JOIN proposal_merge mer ON mer.proposalId = info.id
LEFT JOIN proposal_type type on type.id = info.typeId
LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId
LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId
LEFT JOIN teacher_congress_delegate tcde on tcde.loginName = info.createUserLoginName
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
LEFT JOIN proposal_reply_unit pru ON pru.proposalId = info.id
$condition
""");
Cnd cnd = Cnd.NEW();
if (StrUtil.isNotBlank(pageForm.getUndertakeUnitId())) {
if (StrUtil.isNotBlank(pageForm.getUnderTakeUnitId())) {
cnd.andEX("pru.unitId", "=", pageForm.getUnderTakeUnitId());
}
ProposalQueryComprehensiveParam.buildSearch(cnd, pageForm);
cnd.groupBy("info.id");
@@ -56,7 +56,7 @@ public class ProposalSeniorFeedBackController {
Sql sql = Sqls.create("""
SELECT
info.*,
COUNT(p.consolidationIds) > 0 AS isConsolidation,
IF(mer.proposalId IS NOT NULL, 1, 0) AS merge,
type.name AS typeName,
tcs.fullName AS sessionName,
tcd.`name` AS delegationName,
@@ -66,26 +66,32 @@ public class ProposalSeniorFeedBackController {
ins.variable instanceVariable,
ins.processDefineId instanceProcessDefineId,
t.displayName curTaskName,
JSON_UNQUOTE(JSON_EXTRACT(caseTasks.variable, '$.tf_hostUnitName')) AS masterUnitName,
JSON_EXTRACT(caseTasks.variable, '$.tf_helpUnitNames') AS slaveUnitNames
GROUP_CONCAT(DISTINCT CASE WHEN pru.isMaster = 1 THEN pru.unitName END) AS masterUnitName,
GROUP_CONCAT(DISTINCT CASE WHEN pru.isMaster = 0 THEN pru.unitName END) AS slaveUnitNames,
JSON_UNQUOTE(JSON_EXTRACT(latestFeedBack.variable, '$.tf_feedback')) AS tf_feedback
FROM
proposal_info info
LEFT JOIN proposal_consolidation p ON JSON_CONTAINS(p.consolidationIds, JSON_QUOTE(info.id))
LEFT JOIN proposal_merge mer ON mer.proposalId = info.id
LEFT JOIN proposal_type type on type.id = info.typeId
LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId
LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId
LEFT JOIN teacher_congress_delegate tcde on tcde.loginName = info.createUserLoginName
LEFT JOIN proposal_reply_unit pru ON pru.proposalId = info.id
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
LEFT JOIN (SELECT processInstanceId, MAX(finishTime) AS finishTime FROM wf_process_task WHERE taskName = '9846ab38-40c5-4093-bafc-a9b3b443338b' AND taskState = 20 GROUP BY processInstanceId) latestTasks ON latestTasks.processInstanceId = ins.id
LEFT JOIN wf_process_task caseTasks ON caseTasks.processInstanceId = ins.id AND caseTasks.taskName = '9846ab38-40c5-4093-bafc-a9b3b443338b' AND caseTasks.taskState = 20 AND caseTasks.finishTime = latestTasks.finishTime
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
LEFT JOIN (
SELECT
processInstanceId,
variable,
ROW_NUMBER() OVER (PARTITION BY processInstanceId ORDER BY finishTime DESC) as rn
FROM wf_process_task
WHERE taskName = 'feedback'
) latestFeedBack ON latestFeedBack.processInstanceId = ins.id AND latestFeedBack.rn = 1
$condition
""");
Cnd cnd = Cnd.NEW();
if (StrUtil.isNotBlank(pageForm.getUndertakeUnitId())) {
}
ProposalQueryComprehensiveParam.buildSearch(cnd, pageForm);
// cnd.and("latestFeedBack.id","is not",null);
cnd.groupBy("info.id");
sql.setCondition(cnd);
Pagination pagination = proposalCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
@@ -97,7 +103,7 @@ public class ProposalSeniorFeedBackController {
@ApiOperation(value = "反馈信息")
public Result info(@Param("instanceId") String instanceId) {
List<ProcessTask> taskList = dao.query(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "=", instanceId)
.and(ProcessTask::getTaskName, "=", "013a7cf9-20dd-4188-a196-53fd595448e5")
.and(ProcessTask::getTaskName, "=", "feedback")
.and(ProcessTask::getTaskState, "=", ProcessTaskStateEnum.FINISHED.getCode())
);
@@ -50,7 +50,7 @@ public class ProposalSeniorTypeController {
Sql sql = Sqls.create("""
SELECT
info.*,
COUNT(p.consolidationIds) > 0 AS isConsolidation,
IF(mer.proposalId IS NOT NULL, 1, 0) AS merge,
type.name AS typeName,
tcs.fullName AS sessionName,
tcd.`name` AS delegationName,
@@ -60,15 +60,16 @@ public class ProposalSeniorTypeController {
ins.variable instanceVariable,
ins.processDefineId instanceProcessDefineId,
t.displayName curTaskName,
JSON_UNQUOTE(JSON_EXTRACT(caseTasks.variable, '$.tf_hostUnitName')) AS masterUnitName,
JSON_EXTRACT(caseTasks.variable, '$.tf_helpUnitNames') AS slaveUnitNames
GROUP_CONCAT(DISTINCT CASE WHEN pru.isMaster = 1 THEN pru.unitName END) AS masterUnitName,
GROUP_CONCAT(DISTINCT CASE WHEN pru.isMaster = 0 THEN pru.unitName END) AS slaveUnitNames
FROM
proposal_info info
LEFT JOIN proposal_consolidation p ON JSON_CONTAINS(p.consolidationIds, JSON_QUOTE(info.id))
LEFT JOIN proposal_merge mer ON mer.proposalId = info.id
LEFT JOIN proposal_type type on type.id = info.typeId
LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId
LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId
LEFT JOIN teacher_congress_delegate tcde on tcde.loginName = info.createUserLoginName
LEFT JOIN proposal_reply_unit pru ON pru.proposalId = info.id
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
LEFT JOIN (SELECT processInstanceId, MAX(finishTime) AS finishTime FROM wf_process_task WHERE taskName = '9846ab38-40c5-4093-bafc-a9b3b443338b' AND taskState = 20 GROUP BY processInstanceId) latestTasks ON latestTasks.processInstanceId = ins.id
LEFT JOIN wf_process_task caseTasks ON caseTasks.processInstanceId = ins.id AND caseTasks.taskName = '9846ab38-40c5-4093-bafc-a9b3b443338b' AND caseTasks.taskState = 20 AND caseTasks.finishTime = latestTasks.finishTime
@@ -76,8 +77,8 @@ public class ProposalSeniorTypeController {
$condition
""");
Cnd cnd = Cnd.NEW();
if (StrUtil.isNotBlank(pageForm.getUndertakeUnitId())) {
if (StrUtil.isNotBlank(pageForm.getUnderTakeUnitId())) {
cnd.andEX("pru.unitId", "=", pageForm.getUnderTakeUnitId());
}
ProposalQueryComprehensiveParam.buildSearch(cnd, pageForm);
cnd.groupBy("info.id");
@@ -80,7 +80,7 @@ public class ProposalCommitteeFilingController {
t.taskParentId,
t.variable taskVariable,
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
IF(rt.id IS NOT NULL OR (ins.state = 20 AND info.caseFilingResult = 'NOT'), 1, 0) AS canRevoke
FROM
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
@@ -47,7 +47,7 @@ public class ProposalQueryComprehensiveParam extends PageForm {
@ApiModelProperty(name = "承办单位编码")
private String replyUnitCode;
@ApiModelProperty(name = "承办单位ID")
private String undertakeUnitId;
private String underTakeUnitId;
@ApiModelProperty(name = "征集进度状态")
private Integer[] collectIds;
@@ -93,25 +93,19 @@ public class ProposalQueryComprehensiveParam extends PageForm {
if (StrUtil.isNotBlank(searchParam.getCreateUserName())) {
cnd.where().andLike("info.createUserName", searchParam.getCreateUserName());
}
//提案人分工会
// 提案人分工会
cnd.andEX("tcde.unionId", "=", searchParam.getUnionId());
//提案人单位
// 提案人单位
cnd.andEX("tcde.unitId", "=", searchParam.getUnitId());
//提案类型
// 提案类型
cnd.andEX("info.typeId", "=", searchParam.getType());
cnd.andEX("info.typeId", "in", searchParam.getTypeIds());
//提案立案结果
// 提案立案结果
cnd.andEX("info.caseFilingResult", "in", searchParam.getCaseFilingResults());
//承办单位编码
cnd.andEX("pru.code", "=", searchParam.getReplyUnitCode());
//承办单位Id
SqlExpressionGroup seg = new SqlExpressionGroup();
if(StrUtil.isNotBlank(searchParam.getUndertakeUnitId())){
seg.orLike("JSON_EXTRACT(caseUnitTasks.extVariable, '$.hostUnitId')",searchParam.getUndertakeUnitId());
seg.orLike("JSON_EXTRACT(caseUnitTasks.extVariable, '$.helpUnitIds')",searchParam.getUndertakeUnitId());
cnd.and(seg);
}
// 提案立案类型
cnd.andEX("info.caseFilingType", "in", searchParam.getCaseFilingTypes());
// 承办单位编码
cnd.andEX("pru.unitId", "=", searchParam.getUnderTakeUnitId());
}
}
@@ -3,10 +3,16 @@ 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.result.Result;
import com.budwk.app.base.utils.CommonDownloadUtil;
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.Teacher_congress_delegate;
import com.budwk.app.zhgh.democratic.teachercongress.delegation.models.Teacher_congress_delegation;
import com.budwk.app.zhgh.democratic.teachercongress.prepare.models.Teacher_congress_session;
import com.deepoove.poi.XWPFTemplate;
import com.deepoove.poi.config.Configure;
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.Inject;
@@ -15,6 +21,11 @@ import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -26,6 +37,9 @@ public class TeacherCongressDelegateTransitionController {
@Inject
private Dao dao;
@Inject
private SysOfficeTemplateUtil sysOfficeTemplateUtil;
@At("")
@Ok("beetl:/platform/zhgh/democratic/teachercongress/delegate/transition/index.html")
@@ -47,8 +61,11 @@ public class TeacherCongressDelegateTransitionController {
List<Teacher_congress_delegate> delegates = dao.query(Teacher_congress_delegate.class, Cnd.where(Teacher_congress_delegate::getSessionId, "=", sessionId));
dao.fetchLinks(delegates, "delegation");
// 上一届次代表
List<Teacher_congress_delegate> lastDelegates = dao.query(Teacher_congress_delegate.class, Cnd.where(Teacher_congress_delegate::getSessionId, "=", lastSession.getId()));
dao.fetchLinks(lastDelegates, "delegation");
List<Teacher_congress_delegate> lastDelegates = new ArrayList<>();
if (lastSession != null) {
dao.query(Teacher_congress_delegate.class, Cnd.where(Teacher_congress_delegate::getSessionId, "=", lastSession.getId()));
dao.fetchLinks(lastDelegates, "delegation");
}
// 代表数据
List<NutMap> delegateFull = delegates.stream().map(delegate -> {
@@ -76,20 +93,21 @@ public class TeacherCongressDelegateTransitionController {
}).toList();
List<HashMap<String, Object>> list = delegations.stream().map(delegation -> {
HashMap<String, Object> map = new HashMap<>();
List<NutMap> list = delegations.stream().map(delegation -> {
NutMap map = NutMap.NEW();
map.put("id", delegation.getId());
map.put("name", delegation.getName());
map.put("code", delegation.getCode());
// 上一届次人数
map.put("lastCount", delegateFull.stream().filter(delegate -> delegate.getString("lastDelegationCode").equals(delegation.getCode())).count());
// 增补代表数 (上一届次不是代表 但是本届次是代表)
map.put("addCount", delegateFull.stream().filter(delegate -> StrUtil.isBlank(delegate.getString("lastDelegationCode")) && delegate.getString("delegationCode").equals(delegation.getCode())));
map.put("addCount", delegateFull.stream().filter(delegate -> StrUtil.isBlank(delegate.getString("lastDelegationCode")) && delegate.getString("delegationCode").equals(delegation.getCode())).count());
// 转入代表数 (上一届次是代表 但是在别的代表团)
map.put("transferCount", delegateFull.stream().filter(delegate -> !delegate.getString("lastDelegationCode").equals(delegation.getCode()) && delegate.getString("delegationCode").equals(delegation.getCode())));
map.put("transferCount", delegateFull.stream().filter(delegate -> StrUtil.isNotBlank(delegate.getString("lastDelegationCode")) && !delegate.getString("lastDelegationCode").equals(delegation.getCode()) && delegate.getString("delegationCode").equals(delegation.getCode())).count());
// 转出代表数 (上一届次在本团 本届次转出去了)
map.put("transferOutCount", delegateFull.stream().filter(delegate -> delegate.getString("lastDelegationCode").equals(delegation.getCode()) && StrUtil.isNotBlank(delegate.getString("delegationCode")) && !delegate.getString("delegationCode").equals(delegation.getCode())));
map.put("transferOutCount", delegateFull.stream().filter(delegate -> delegate.getString("lastDelegationCode").equals(delegation.getCode()) && StrUtil.isNotBlank(delegate.getString("delegationCode")) && !delegate.getString("delegationCode").equals(delegation.getCode())).count());
// 减少代表数 (上一届次是代表 本届次不是代表)
map.put("reduceCount", delegateFull.stream().filter(delegate -> delegate.getString("lastDelegationCode").equals(delegation.getCode()) && StrUtil.isBlank(delegate.getString("delegationCode"))));
map.put("reduceCount", delegateFull.stream().filter(delegate -> delegate.getString("lastDelegationCode").equals(delegation.getCode()) && StrUtil.isBlank(delegate.getString("delegationCode"))).count());
// 当前代表数
map.put("currentCount", delegateFull.stream().filter(delegate -> delegate.getString("delegationCode").equals(delegation.getCode())).count());
return map;
@@ -98,4 +116,131 @@ public class TeacherCongressDelegateTransitionController {
return Result.success(list);
}
@At
@SaCheckPermission("tc.delegate.transition")
@ApiOperation("代表换届详情")
public Result detail(String sessionId, String delegationId) {
HashMap<String, Object> data = innerData(sessionId, delegationId);
return Result.success(data);
}
@At
@SaCheckPermission("tc.delegate.transition")
public void exportDocx(String sessionId, String delegationId, HttpServletResponse response) {
HashMap<String, Object> data = innerData(sessionId, delegationId);
List<NutMap> addUser = (List<NutMap>) data.get("addUser");
for (int i = 0; i < addUser.size(); i++) {
addUser.get(i).put("index", i + 1);
}
List<NutMap> transferUser = (List<NutMap>) data.get("transferUser");
for (int i = 0; i < transferUser.size(); i++) {
transferUser.get(i).put("index", i + 1);
}
List<NutMap> transferOutUser = (List<NutMap>) data.get("transferOutUser");
for (int i = 0; i < transferOutUser.size(); i++) {
transferOutUser.get(i).put("index", i + 1);
}
List<NutMap> transferInOutUser = new ArrayList<>();
transferInOutUser.addAll(transferUser);
transferInOutUser.addAll(transferOutUser);
data.put("transferInOutUser", transferInOutUser);
data.put("addUserCount", ((List<NutMap>) data.get("addUser")).size());
LoopRowTableRenderPolicy hackLoopTableRenderPolicy = new LoopRowTableRenderPolicy();
Configure config = Configure.builder()
.bind("transferInOutUser", hackLoopTableRenderPolicy)
.bind("addUser", hackLoopTableRenderPolicy)
.build();
ByteArrayOutputStream byteOs = new ByteArrayOutputStream();
try {
InputStream inputStream = sysOfficeTemplateUtil.getTemplate("tcDelegateTransition");
XWPFTemplate.compile(inputStream, config)
.render(data)
.writeAndClose(byteOs);
CommonDownloadUtil.download(data.get("delegationName")+"代表换届变动信息.docx", byteOs.toByteArray(), response);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
public HashMap<String, Object> innerData(String sessionId, String delegationId) {
// 当前届次
Teacher_congress_session session = dao.fetch(Teacher_congress_session.class, sessionId);
// 上一届次
Teacher_congress_session lastSession = dao.fetch(Teacher_congress_session.class, Cnd.where(Teacher_congress_session::getStartDate, "<", session.getStartDate()).desc(Teacher_congress_session::getStartDate));
// 当前代表团
Teacher_congress_delegation delegation = dao.fetch(Teacher_congress_delegation.class, delegationId);
// 当前届次代表团代表
List<Teacher_congress_delegate> delegates = dao.query(Teacher_congress_delegate.class, Cnd.where(Teacher_congress_delegate::getSessionId, "=", sessionId).and(Teacher_congress_delegate::getDelegationId, "=", delegation.getId()));
dao.fetchLinks(delegates, "delegation");
// 上一届次代表
List<Teacher_congress_delegate> lastDelegates = new ArrayList<>();
if (lastSession != null) {
dao.query(Teacher_congress_delegate.class, Cnd.where(Teacher_congress_delegate::getSessionId, "=", lastSession.getId()));
dao.fetchLinks(lastDelegates, "delegation");
}
// 代表数据
List<NutMap> delegateFull = delegates.stream().map(delegate -> {
NutMap delegateMap = NutMap.NEW();
delegateMap.put("userId", delegate.getUserId());
delegateMap.put("userName", delegate.getUserName());
// 本届次代表团信息
delegateMap.put("delegationId", delegate.getDelegationId());
delegateMap.put("delegationName", delegate.getDelegation().getName());
delegateMap.put("delegationCode", delegate.getDelegation().getCode());
// 上一届次代表团信息
lastDelegates.stream().filter(lastDelegate -> lastDelegate.getUserId().equals(delegate.getUserId())).findFirst().ifPresentOrElse(lastDelegate -> {
delegateMap.put("lastDelegationId", lastDelegate.getDelegationId());
delegateMap.put("lastDelegationName", lastDelegate.getDelegation().getName());
delegateMap.put("lastDelegationCode", lastDelegate.getDelegation().getCode());
}, () -> {
delegateMap.put("lastDelegationId", "");
delegateMap.put("lastDelegationName", "");
delegateMap.put("lastDelegationCode", "");
});
return delegateMap;
}).toList();
// 增补代表数据 (上一届次不是代表 但是本届次是代表)
List<NutMap> addUser = delegateFull.stream().filter(delegate -> StrUtil.isBlank(delegate.getString("lastDelegationCode")) && delegate.getString("delegationCode").equals(delegation.getCode())).toList();
// 转入代表数据 (上一届次是代表 但是在别的代表团)
List<NutMap> transferUser = delegateFull.stream().filter(delegate -> StrUtil.isNotBlank(delegate.getString("lastDelegationCode")) && !delegate.getString("lastDelegationCode").equals(delegation.getCode()) && delegate.getString("delegationCode").equals(delegation.getCode())).toList();
// 转出代表数据 (上一届次在本团 本届次转出去了)
List<NutMap> transferOutUser = delegateFull.stream().filter(delegate -> delegate.getString("lastDelegationCode").equals(delegation.getCode()) && StrUtil.isNotBlank(delegate.getString("delegationCode")) && !delegate.getString("delegationCode").equals(delegation.getCode())).toList();
// 减少代表数据 (上一届次是代表 本届次不是代表)
List<NutMap> reduceUser = delegateFull.stream().filter(delegate -> delegate.getString("lastDelegationCode").equals(delegation.getCode()) && StrUtil.isBlank(delegate.getString("delegationCode"))).toList();
// 当前代表人数
int currentCount = delegates.size();
HashMap<String, Object> map = new HashMap<>();
map.put("addUser", addUser);
map.put("transferUser", transferUser);
map.put("transferOutUser", transferOutUser);
map.put("reduceUser", reduceUser);
map.put("currentCount", currentCount);
map.put("sessionName", session.getFullName());
map.put("delegationName", delegation.getName());
return map;
}
}
@@ -75,7 +75,7 @@ layout("/layouts/platform.html"){
</el-select>
</search-item>
<search-item label="承办单位">
<el-select clearable filterable placeholder="承办单位" v-model="pageForm.undertakeUnitId">
<el-select clearable filterable placeholder="承办单位" v-model="pageForm.underTakeUnitId">
<el-option :key="item.code" :label="item.name" :value="item.id"
v-for="item in underTakeOptions"></el-option>
</el-select>
@@ -216,6 +216,7 @@ layout("/layouts/platform.html"){
</template>
<template v-else-if="column.prop === 'merge'" scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
<el-tag v-else type="warning" size="small"></el-tag>
</template>
<template v-else-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
@@ -113,6 +113,7 @@ layout("/layouts/platform.html"){
<el-table-column label="是否并案" prop="merge">
<template slot-scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
<el-tag v-else type="warning" size="small"></el-tag>
</template>
</el-table-column>
<el-table-column label="主办单位" prop="masterUnitName" show-overflow-tooltip></el-table-column>
@@ -69,7 +69,7 @@ layout("/layouts/platform.html"){
</el-select>
</search-item>
<search-item label="承办单位">
<el-select clearable filterable placeholder="承办单位" v-model="pageForm.undertakeUnitId">
<el-select clearable filterable placeholder="承办单位" v-model="pageForm.underTakeUnitId">
<el-option :key="item.code" :label="item.name" :value="item.code" v-for="item in underTakeOptions"></el-option>
</el-select>
</search-item>
@@ -9,59 +9,65 @@ layout("/layouts/platform.html"){
<el-card shadow="never">
<search @search="doSearch">
<search-item label="教代会">
<el-select @change="meetingChange" clearable filterable placeholder="所属教代会" v-model="pageForm.sessionId">
<el-option :key="item.id" :label="item.fullName" :value="item.id" v-for="item in sessionOptions"></el-option>
<el-select @change="meetingChange" clearable filterable placeholder="所属教代会"
v-model="pageForm.sessionId">
<el-option :key="item.id" :label="item.fullName" :value="item.id"
v-for="item in sessionOptions"></el-option>
</el-select>
</search-item>
<search-item label="提案名称">
<el-input
@keyup.enter.native="doSearch"
clearable
placeholder="请输入提案名称"
v-model="pageForm.name"
style="width: 100%"
@keyup.enter.native="doSearch"
clearable
placeholder="请输入提案名称"
v-model="pageForm.name"
style="width: 100%"
></el-input>
</search-item>
<search-item label="提案编码">
<el-input
@keyup.enter.native="doSearch"
clearable
placeholder="请输入提案编码"
v-model="pageForm.code"
style="width: 100%"
@keyup.enter.native="doSearch"
clearable
placeholder="请输入提案编码"
v-model="pageForm.code"
style="width: 100%"
></el-input>
</search-item>
<search-item label="提案人姓名">
<el-input
@keyup.enter.native="doSearch"
clearable
placeholder="请输入提案人姓名"
v-model="pageForm.createUserName"
style="width: 100%"
@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%"
@keyup.enter.native="doSearch"
clearable
placeholder="请输入提案人工号"
v-model="pageForm.createUserLoginName"
style="width: 100%"
></el-input>
</search-item>
<search-item label="代表团">
<el-select clearable filterable placeholder="所属代表团" v-model="pageForm.delegationId">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in delegationOptions"></el-option>
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in delegationOptions"></el-option>
</el-select>
</search-item>
<search-item label="提案分工会">
<el-select clearable filterable placeholder="分工会" v-model="pageForm.unionId" @change="pageForm.unitId=null;listUnit();">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unionOptions"></el-option>
<el-select clearable filterable placeholder="分工会" v-model="pageForm.unionId"
@change="pageForm.unitId=null;listUnit();">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in unionOptions"></el-option>
</el-select>
</search-item>
<search-item label="提案单位">
<el-select clearable filterable placeholder="提案单位" v-model="pageForm.unitId">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitOptions"></el-option>
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in unitOptions"></el-option>
</el-select>
</search-item>
</search>
@@ -77,13 +83,14 @@ layout("/layouts/platform.html"){
<el-table-column label="代表团" prop="delegationName"></el-table-column>
<el-table-column label="立案结果" prop="caseFilingResult">
<template scope="{row}">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT" :value="row.caseFilingResult"></dict-tag>
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="row.caseFilingResult"></dict-tag>
</template>
</el-table-column>
<el-table-column label="是否并案" prop="isConsolidation" width="100">
<template scope="{row}">
<el-tag size="mini" v-if="row.isConsolidation" type="success"></el-tag>
<el-tag size="mini" v-else type="danger"></el-tag>
<el-tag size="mini" v-else type="warning"></el-tag>
</template>
</el-table-column>
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
@@ -122,36 +129,63 @@ layout("/layouts/platform.html"){
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-form-item label="提案名称" prop="name">
<el-form-item label="提案名称" prop="name"
:rules="[{required:true,message:'请输入提案名称',trigger:'blur'}]">
<el-input maxlength="100" placeholder="提案名称" v-model="formData.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="提案方式" prop="source">
<el-input :value="dict.type.PROPOSAL_SOURCE.find(v=>v.code === formData.source)?.name" disabled></el-input>
<el-input :value="dict.type.PROPOSAL_SOURCE.find(v=>v.code === formData.source)?.name"
disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="typeId" label="提案类别" :rules="[{required:true,message:'请选择类型',trigger:'blur'}]">
<el-select v-model="formData.typeId">
<el-option :key="item.code" :label="item.name" :value="item.id" v-for="item in typeOptions"></el-option>
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-form-item label="提案类别" prop="typeId">
<el-select v-model="formData.typeId" style="width: 100%">
<el-option :key="item.code" :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="excerpt">-->
<!-- <el-input-->
<!-- v-model="formData.excerpt"-->
<!-- type="textarea"-->
<!-- autosize-->
<!-- :autosize="{ minRows: 4, maxRows: 4}"-->
<!-- placeholder="提案摘要"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="建议承办单位" prop="suggestUnits">
<el-select v-model="formData.suggestUnits" multiple filterable style="width: 100%"
placeholder="请选择建议承办单位">
<el-option :key="item.id" :label="item.name" :value="item.name"
v-for="item in suggestUnitOptions"></el-option>
</el-select>
</el-form-item>
<el-form-item label="提案摘要" prop="excerpt">
<el-input
v-model="formData.excerpt"
type="textarea"
autosize
:autosize="{ minRows: 4, maxRows: 4}"
placeholder="提案摘要"
></el-input>
<el-form-item label="案由" prop="brief">
<text-editor v-model="formData.brief" key="brief" placeholder="案由"></text-editor>
</el-form-item>
<el-form-item label="提案内容和依据" prop="brief">
<text-editor v-model="formData.brief" key="brief" placeholder="提案内容和依据"></text-editor>
</el-form-item>
<el-form-item label="改进建议和措施" prop="measures">
<text-editor v-model="formData.measures" key="measures" placeholder="改进建议和措施"></text-editor>
<el-form-item label="建议措施" prop="measures">
<text-editor v-model="formData.measures" key="measures"
placeholder="建议措施"></text-editor>
</el-form-item>
<!-- <el-form-item label="附件上传" prop="files">-->
<!-- <file-upload-->
<!-- :value.sync="formData.files"-->
<!-- :upload_number="5"-->
<!-- upload_result_category="array"-->
<!-- upload_mode="drag"-->
<!-- complete_result-->
<!-- ></file-upload>-->
<!-- </el-form-item>-->
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()">取 消</el-button>
@@ -178,13 +212,17 @@ layout("/layouts/platform.html"){
delegationOptions: [],
unionOptions: [],
unitOptions: [],
suggestUnitOptions: [],
pageForm: {
types: [],
caseFilingResults: [],
unionId: null,
unitId: null
},
typeDialog: false
typeDialog: false,
formData: {
suggestUnits: []
}
}
},
methods: {
@@ -194,8 +232,18 @@ layout("/layouts/platform.html"){
})
},
onOpenEdit(row) {
this.$refs.guava.edit(()=>{
this.formData = { ...row }
this.$refs.guava.edit(() => {
let suggestUnits = []
try {
suggestUnits = JSON.parse(row.suggestUnits)
} catch (e) {
console.log(e)
}
this.formData = {
...row,
suggestUnits: suggestUnits
}
})
},
doUpdateBasic() {
@@ -206,7 +254,9 @@ layout("/layouts/platform.html"){
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/senior/basic/update", this.formData).then((res) => {
this.$axios.post("/platform/senior/basic/update", {
info: JSON.stringify(this.formData)
}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.$refs.guava.index()
@@ -231,7 +281,7 @@ layout("/layouts/platform.html"){
this.listDelegation()
},
listDelegation() {
this.$axios.post("/platform/proposal/common/listDelegation", { sessionId: this.pageForm.sessionId }).then((res) => {
this.$axios.post("/platform/proposal/common/listDelegation", {sessionId: this.pageForm.sessionId}).then((res) => {
if (res.code === 0) {
this.delegationOptions = res.data
}
@@ -255,9 +305,18 @@ layout("/layouts/platform.html"){
},
listUnit() {
this.$businessTool.listUnit(this.pageForm.unionId).then((res) => (this.unitOptions = res))
}
},
// 建议承办单位
listSuggestUnit() {
this.$axios.post("/platform/proposal/common/listUnderTake").then((res) => {
if (res.code === 0) {
this.suggestUnitOptions = res.data
}
})
},
},
created() {
this.listSuggestUnit()
this.listSession()
this.listUnion()
this.listUnit()
@@ -90,7 +90,7 @@ layout("/layouts/platform.html"){
<el-table-column label="是否并案" prop="isConsolidation" width="100">
<template scope="{row}">
<el-tag size="mini" v-if="row.isConsolidation" type="success"></el-tag>
<el-tag size="mini" v-else type="danger"></el-tag>
<el-tag size="mini" v-else type="warning"></el-tag>
</template>
</el-table-column>
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
@@ -100,6 +100,11 @@ layout("/layouts/platform.html"){
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="反馈评价" prop="tf_feedback" width="150px">
<template slot-scope="{row}">
<dict-tag :options="dict.type.PROPOSAL_FEEDBACK" :value="row.tf_feedback"></dict-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
@@ -136,6 +141,18 @@ layout("/layouts/platform.html"){
placeholder="请输入您的办理意见"
></el-input>
</el-descriptions-item>
<el-descriptions-item label="通讯地址" :span="2">
<el-input v-model="task.taskFormData.tf_address" placeholder="请输入通讯地址"
clearable></el-input>
</el-descriptions-item>
<el-descriptions-item label="联系电话" :span="2">
<el-input v-model="task.taskFormData.tf_phone" placeholder="请输入联系电话"
clearable></el-input>
</el-descriptions-item>
<el-descriptions-item label="邮政编码" :span="2">
<el-input v-model="task.taskFormData.tf_postcode" placeholder="请输入邮政编码"
clearable></el-input>
</el-descriptions-item>
</el-descriptions>
</template>
<el-row type="flex" justify="end" slot="footer">
@@ -180,10 +197,14 @@ layout("/layouts/platform.html"){
})
},
onOpenEdit(instanceId) {
this.editDialogVisible = true
this.$axios.post('/platform/senior/feedback/info', {instanceId}).then(res => {
if (res.code === 0) {
this.tasks = res.data
if (this.tasks && this.tasks.length > 0) {
this.editDialogVisible = true
} else {
this.$message.warning("当前无法修改反馈评价")
}
}
})
},
@@ -195,8 +216,8 @@ layout("/layouts/platform.html"){
feedback: v?.taskFormData?.tf_feedback
}
})
this.$axios.post('/platform/senior/feedback/update', {data:JSON.stringify(params)}).then(res=>{
if(res.code===0){
this.$axios.post('/platform/senior/feedback/update', {data: JSON.stringify(params)}).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
this.editDialogVisible = false
this.doSearch()
@@ -54,6 +54,7 @@ layout("/layouts/platform.html"){
</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-column label="序号" width="50" type="index" :index="indexMethod" fixed="left"></el-table-column>
<el-table-column
:label="column.label"
@@ -66,7 +67,8 @@ layout("/layouts/platform.html"){
v-if="column.visible !== false"
>
<template v-if="column.prop === 'caseFilingResult'" scope="{row}">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
<dict-tag v-if="row.taskState!==10"
:options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="row.caseFilingResult"></dict-tag>
</template>
<template v-else-if="column.prop === 'merge'" scope="{row}">
@@ -185,6 +187,7 @@ layout("/layouts/platform.html"){
{label: "提案名称", prop: "name", width: "200px"},
{label: "提案类别", prop: "typeName"},
{label: "届次", prop: "sessionName"},
{label: "立案结果", prop: "caseFilingResult"},
{label: "代表团", prop: "delegationName"},
{label: "当前节点", prop: "curTaskName"},
{label: "流程状态", prop: "instanceState"}
@@ -49,6 +49,7 @@ layout("/layouts/platform.html"){
</template>
<template v-else-if="column.prop === 'merge'" scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
<el-tag v-else type="warning" size="small"></el-tag>
</template>
<template v-else-if="column.prop === 'underTakeIsMaster'" scope="{row}">
<el-tag v-if="row.underTakeIsMaster" size="small">主办</el-tag>
@@ -63,7 +63,7 @@ layout("/layouts/platform.html"){
邀请附议人
</el-button>
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="openRevoke(row)">
</el-button>
<!-- v-if="row.taskKey === 'startTask' || !row.instanceId"-->
<el-button size="mini" type="danger" @click="del(row.id)">
@@ -70,6 +70,7 @@ layout("/layouts/platform.html"){
</template>
<template v-else-if="column.prop === 'merge'" scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
<el-tag v-else type="warning" size="small"></el-tag>
</template>
<template v-else-if="column.prop === 'underTakeIsMaster'" scope="{row}">
<el-tag v-if="row.underTakeIsMaster" size="small">主办</el-tag>
@@ -120,6 +120,7 @@ layout("/layouts/platform.html"){
</template>
<template v-else-if="column.prop === 'merge'" scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
<el-tag v-else type="warning" size="small"></el-tag>
</template>
<template v-else-if="column.prop === 'underTakeIsMaster'" scope="{row}">
<el-tag v-if="row.underTakeIsMaster" size="small">主办</el-tag>
@@ -115,23 +115,22 @@ layout("/layouts/platform.html"){
<!-- ></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="调研情况" prop="researchFindings">
<el-input
v-model="formData.researchFindings"
type="textarea"
autosize
:autosize="{ minRows: 4, maxRows: 4}"
placeholder="调研情况"
></el-input>
</el-form-item>
<!-- <el-form-item label="调研情况" prop="researchFindings">-->
<!-- <el-input-->
<!-- v-model="formData.researchFindings"-->
<!-- type="textarea"-->
<!-- autosize-->
<!-- :autosize="{ minRows: 4, maxRows: 4}"-->
<!-- placeholder="调研情况"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="建议承办单位" prop="suggestUnits">
<el-select v-model="formData.suggestUnits" multiple style="width: 100%">
<el-select v-model="formData.suggestUnits" multiple filterable style="width: 100%" placeholder="请选择建议承办单位">
<el-option :key="item.id" :label="item.name" :value="item.name"
v-for="item in suggestUnitOptions"></el-option>
</el-select>
</el-form-item>
<el-form-item label="案由" prop="brief">
<text-editor v-model="formData.brief" key="brief" placeholder="案由"></text-editor>
</el-form-item>
@@ -3,16 +3,79 @@ layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="教代会">
<el-select v-model="pageForm.sessionId" @change="doSearch">
<el-option v-for="item in sessionOptions" :label="item.fullName" :value="item.id"
:key="item.id"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<el-table :data="tableData" @sort-change="pageOrder" header-align="center" row-key="id" ref="tableRef"
style="width: 100%">
<el-table-column type="index" width="55" label="序号" :index="indexMethod" fixed="left"></el-table-column>
<el-table-column label="代表团名称" prop="name" fixed="left"></el-table-column>
<el-table-column label="上届次代表数" prop="lastCount"></el-table-column>
<el-table-column label="增补代表数" prop="addCount"></el-table-column>
<el-table-column label="转入代表数" prop="transferCount"></el-table-column>
<el-table-column label="转出代表数" prop="transferOutCount"></el-table-column>
<el-table-column label="减少代表数" prop="reduceCount"></el-table-column>
<el-table-column label="本届代表数" prop="currentCount"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="onView(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<transition-docx ref="transitionDocxRef"></transition-docx>
</div>
<script>
<!--#include('transitionDocx.js'){}#-->
const app = new Vue({
el: "#app",
data(){
return{
mixins: [initTableMixins],
components: {
'transition-docx': transitionDocx
},
data() {
return {
sessionOptions: [],
}
},
methods: {
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()
}
}
})
},
pageData() {
this.$axios.post("/platform/zhgh/democratic/teacherCongress/delegate/transition/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = res.data
}
})
},
onView(row) {
this.$refs.transitionDocxRef.onOpen(this.pageForm.sessionId, row.id)
}
},
created() {
this.listSession()
}
})
</script>
@@ -0,0 +1,426 @@
const transitionDocx = {
template: /*language=HTML*/ `
<el-dialog title="调动情况" :visible.sync="visible" width="210mm">
<div class="document-container">
<!-- 文档标题 -->
<div class="document-header">
<h2 class="document-title">{{ transition.sessionName }}</h2>
<h3 class="document-subtitle">增补、更换代表与代表调动情况统计表</h3>
<div class="document-info">
<span class="info-item">代表团名称:{{ transition.delegationName }}</span>
<span class="info-item">填表人:{{ fillPerson }}</span>
<span class="info-item">填表日期:{{ currentDate }}</span>
</div>
</div>
<!-- 主表格 -->
<div class="main-table-container">
<table class="document-table">
<thead>
<tr>
<th class="sequence-col">序号</th>
<th class="name-col">代表姓名</th>
<th class="original-col">原代表团名称</th>
<th class="current-col">现代表团名称</th>
<th class="reason-col">变动类型</th>
</tr>
</thead>
<tbody>
<!-- 增补代表块 -->
<template v-if="transition.addUser && transition.addUser.length > 0">
<tr class="section-header">
<td colspan="5" class="section-title">增补代表 ({{ transition.addUser.length }}人)</td>
</tr>
<tr v-for="(user, index) in transition.addUser" :key="'add-' + index" class="data-row add-row">
<td class="sequence-col">{{ index + 1 }}</td>
<td class="name-col">{{ user.userName }}</td>
<td class="original-col">{{ user.lastDelegationName || '-' }}</td>
<td class="current-col">{{ user.delegationName }}</td>
<td class="reason-col">新增代表</td>
</tr>
</template>
<!-- 调出代表块 -->
<template v-if="transition.transferOutUser && transition.transferOutUser.length > 0">
<tr class="section-header">
<td colspan="5" class="section-title">调出代表 ({{ transition.transferOutUser.length }}人)</td>
</tr>
<tr v-for="(user, index) in transition.transferOutUser" :key="'out-' + index" class="data-row out-row">
<td class="sequence-col">{{ index + 1 }}</td>
<td class="name-col">{{ user.userName }}</td>
<td class="original-col">{{ user.lastDelegationName }}</td>
<td class="current-col">{{ user.delegationName || '-' }}</td>
<td class="reason-col">调出代表</td>
</tr>
</template>
<!-- 调入代表块 -->
<template v-if="transition.transferUser && transition.transferUser.length > 0">
<tr class="section-header">
<td colspan="5" class="section-title">调入代表 ({{ transition.transferUser.length }}人)</td>
</tr>
<tr v-for="(user, index) in transition.transferUser" :key="'transfer-' + index" class="data-row transfer-row">
<td class="sequence-col">{{ index + 1 }}</td>
<td class="name-col">{{ user.userName }}</td>
<td class="original-col">{{ user.lastDelegationName || '-' }}</td>
<td class="current-col">{{ user.delegationName }}</td>
<td class="reason-col">调入代表</td>
</tr>
</template>
<!-- 减少代表块 -->
<template v-if="transition.reduceUser && transition.reduceUser.length > 0">
<tr class="section-header">
<td colspan="5" class="section-title">减少代表 ({{ transition.reduceUser.length }}人)</td>
</tr>
<tr v-for="(user, index) in transition.reduceUser" :key="'reduce-' + index" class="data-row reduce-row">
<td class="sequence-col">{{ index + 1 }}</td>
<td class="name-col">{{ user.userName }}</td>
<td class="original-col">{{ user.lastDelegationName }}</td>
<td class="current-col">-</td>
<td class="reason-col">减少代表</td>
</tr>
</template>
<!-- 空数据提示 -->
<template v-if="!hasAnyData">
<tr class="empty-data-row">
<td colspan="5" class="empty-message">暂无代表变动数据</td>
</tr>
</template>
</tbody>
</table>
</div>
<!-- 统计信息 -->
<div class="statistics-text">
本代表团按照民主程序,增补调整以上 <span class="number-blank">{{ totalChangeCount }}</span>
名代表,实际本代表团代表
<span class="number-blank">{{ transition.currentCount || 0 }}</span> 人。
</div>
<!-- 签名区域 -->
<div class="signature-area">
<div class="signature-left">
<span>院党委组织负责人签字:</span>
<span class="signature-line"></span>
</div>
<div class="signature-right">
<span>(院党委组织盖章)</span>
</div>
</div>
<!-- 日期 -->
<div class="date-area">
<span class="date-text">{{ currentYear }} 年 {{ currentMonth }} 月 {{ currentDay }} 日</span>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="visible = false">关闭</el-button>
<el-button type="primary" @click="printDocument">打印</el-button>
</div>
</el-dialog>
`,
data() {
return {
visible: false,
sessionId: '',
delegationId: '',
transition: {},
fillPerson: ''
}
},
computed: {
totalRows() {
let count = 0;
if (this.transition.addUser) count += this.transition.addUser.length;
if (this.transition.transferOutUser) count += this.transition.transferOutUser.length;
if (this.transition.transferUser) count += this.transition.transferUser.length;
if (this.transition.reduceUser) count += this.transition.reduceUser.length;
return count;
},
totalChangeCount() {
let count = 0;
if (this.transition.addUser) count += this.transition.addUser.length;
if (this.transition.transferOutUser) count += this.transition.transferOutUser.length;
if (this.transition.reduceUser) count += this.transition.reduceUser.length;
return count;
},
hasAnyData() {
return (this.transition.addUser && this.transition.addUser.length > 0) ||
(this.transition.transferOutUser && this.transition.transferOutUser.length > 0) ||
(this.transition.transferUser && this.transition.transferUser.length > 0) ||
(this.transition.reduceUser && this.transition.reduceUser.length > 0);
},
currentDate() {
const now = new Date();
return this.$moment().format('YYYY年MM月DD日');
},
currentYear() {
return new Date().getFullYear();
},
currentMonth() {
return new Date().getMonth() + 1;
},
currentDay() {
return new Date().getDate();
}
},
methods: {
onOpen(sessionId, delegationId) {
this.sessionId = sessionId;
this.delegationId = delegationId;
this.visible = true;
this.getDetail();
},
getDetail() {
this.$axios.post('/platform/zhgh/democratic/teacherCongress/delegate/transition/detail', {
sessionId: this.sessionId,
delegationId: this.delegationId
}).then(res => {
if (res.code === 0) {
this.transition = res.data
}
})
},
getAddReason(user) {
if (user.lastDelegationName) {
return `` + user.lastDelegationName + '调入';
}
return '新增代表';
},
printDocument() {
this.$downLoad('/platform/zhgh/democratic/teacherCongress/delegate/transition/exportDocx',{
sessionId: this.sessionId,
delegationId: this.delegationId
})
}
},
style: /*language=CSS*/ `
/* 对话框样式 */
/deep/ .el-dialog__body {
max-height: 70vh;
overflow-y: auto;
padding: 0;
}
/* 文档容器 */
/deep/ .document-container {
width: 210mm;
min-height: 297mm;
max-width: 100%;
margin: 0 auto;
padding: 20mm;
background: white;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
font-family: 'SimSun', '宋体', serif;
font-size: 12px;
line-height: 1.5;
color: #000;
box-sizing: border-box;
}
/* 文档标题样式 */
/deep/ .document-header {
text-align: center;
margin-bottom: 30px;
}
/deep/ .document-title {
font-size: 18px;
font-weight: bold;
margin: 0 0 10px 0;
color: #333;
}
/deep/ .document-subtitle {
font-size: 16px;
font-weight: bold;
margin: 0 0 20px 0;
color: #333;
}
/deep/ .document-info {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
font-size: 14px;
}
/deep/ .info-item {
flex: 1;
text-align: center;
}
/* 主表格样式 */
/deep/ .main-table-container {
margin: 20px 0;
}
/deep/ .document-table {
width: 100%;
border-collapse: collapse;
border: 2px solid #000;
font-size: 14px;
}
/deep/ .document-table th,
/deep/ .document-table td {
border: 1px solid #000;
padding: 8px 4px;
text-align: center;
vertical-align: middle;
word-wrap: break-word;
}
/deep/ .document-table th {
font-weight: bold;
height: 40px;
}
/deep/ .document-table td {
height: 35px;
min-height: 35px;
}
/* 列宽设置 */
/deep/ .sequence-col {
width: 8%;
min-width: 50px;
}
/deep/ .name-col {
width: 20%;
min-width: 100px;
}
/deep/ .original-col {
width: 25%;
min-width: 120px;
}
/deep/ .reason-col {
width: 25%;
min-width: 120px;
}
/deep/ .transfer-name-col {
width: 20%;
min-width: 100px;
}
/deep/ .original-delegation-col {
width: 25%;
min-width: 120px;
}
/deep/ .current-delegation-col {
width: 25%;
min-width: 120px;
}
/* 分组标题样式 */
/deep/ .section-header {
font-weight: bold;
}
/deep/ .section-title {
text-align: center;
font-size: 14px;
font-weight: bold;
color: #333;
padding: 8px 0;
border: 1px solid #000;
}
/* 数据行样式 */
/deep/ .data-row:nth-child(even) {
}
/deep/ .data-row:nth-child(odd) {
}
/* 空数据样式 */
/deep/ .empty-data-row {
height: 60px;
}
/deep/ .empty-message {
text-align: center;
color: #999;
font-style: italic;
padding: 20px 0;
}
/* 子表头样式 */
/deep/ .sub-header th {
background-color: #e8f4f8;
font-weight: bold;
}
/* 统计信息样式 */
/deep/ .statistics-text {
margin: 30px 0 20px 0;
text-align: center;
font-size: 14px;
line-height: 1.8;
}
/deep/ .number-blank {
display: inline-block;
min-width: 30px;
border-bottom: 1px solid #000;
text-align: center;
font-weight: bold;
margin: 0 5px;
padding: 0 5px;
}
/* 签名区域样式 */
/deep/ .signature-area {
display: flex;
justify-content: space-between;
align-items: center;
margin: 40px 0 20px 0;
font-size: 14px;
}
/deep/ .signature-left {
display: flex;
align-items: center;
}
/deep/ .signature-line {
display: inline-block;
width: 150px;
border-bottom: 1px solid #000;
margin-left: 10px;
height: 20px;
}
/deep/ .signature-right {
font-size: 14px;
}
/* 日期区域样式 */
/deep/ .date-area {
text-align: right;
margin: 20px 0;
font-size: 14px;
}
/deep/ .date-text {
margin-right: 50px;
}
/* 对话框样式调整 */
/deep/ .dialog-footer {
text-align: center;
padding: 20px 0;
}
`
}
@@ -47,6 +47,48 @@ const PROPOSAL_INFO = {
<!-- </van-cell>-->
</van-cell-group>
<!--并案信息-->
<van-cell-group title="并案信息" v-if="viewData.merges && viewData.merges.length">
<van-cell v-for="(merge, index) in viewData.merges" :key="merge.id"
:title="(index + 1) + '. ' + merge.name"
:label="'提案编号:' + merge.code + ' | 提案人:' + merge.createUserName + ' | 类别:' + merge.typeName + ' | 代表团:' + merge.delegationName"
is-link
@click="openView(merge)">
</van-cell>
</van-cell-group>
<!--委员会成员意见-->
<template v-if="viewData.commissionerOpinions && viewData.commissionerOpinions.length">
<div class="process-title" style="margin-bottom: 0!important;">
委员会成员意见
</div>
<div v-for="(opinion, index) in viewData.commissionerOpinions" :key="index"
style="margin-bottom: 16px;">
<van-cell :title="opinion.commissionerName + '(' + opinion.commissionerLoginName + ')'"
class="direction-column-cell">
</van-cell>
<van-cell title="立案结果">
<div style="display: flex;justify-content: end;">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="opinion.caseFilingResult"></dict-tag>
<template v-if="opinion.caseFilingType">
(
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
:value="opinion.caseFilingType"></dict-tag>
)
</template>
</div>
</van-cell>
<van-cell title="意见" v-if="opinion.opinionText">
<div>{{ opinion.opinionText }}</div>
</van-cell>
<van-cell title="时间" v-if="opinion.opinionTime">
{{ opinion.opinionTime }}
</van-cell>
</div>
</template>
<template v-for="task in doneTasks">
<van-cell-group :title="task.displayName" v-if="task.ext.isFirstTaskNode">
<van-cell title="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})
@@ -76,28 +118,6 @@ const PROPOSAL_INFO = {
<el-table-column label="代表团" prop="delegationName"
show-overflow-tooltip></el-table-column>
</el-table>
<!-- <table>-->
<!-- <thead>-->
<!-- <tr>-->
<!-- <th>姓名</th>-->
<!-- <th>工号</th>-->
<!-- <th>性别</th>-->
<!-- <th>单位</th>-->
<!-- <th>分工会</th>-->
<!-- <th>代表团</th>-->
<!-- </tr>-->
<!-- </thead>-->
<!-- <tbody>-->
<!-- <tr v-for="item in task?.taskFormData?.seconder">-->
<!-- <td>{{item.userName}}</td>-->
<!-- <td>{{item.loginName}}</td>-->
<!-- <td>{{item.sex}}</td>-->
<!-- <td>{{item.unitName}}</td>-->
<!-- <td>{{item.unionName}}</td>-->
<!-- <td>{{item.delegationName}}</td>-->
<!-- </tr>-->
<!-- </tbody>-->
<!-- </table>-->
</van-cell>
</van-cell-group>
@@ -108,11 +128,20 @@ const PROPOSAL_INFO = {
</van-cell>
<van-cell title="办理时间">{{ task.finishTime }}</van-cell>
<van-cell title="立案结果">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="task.ext.caseFilingResult"></dict-tag>
<div style="display: flex;justify-content: center">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="task.ext.tf_caseFilingResult"></dict-tag>
<template v-if="task.ext.tf_caseFilingType">
(
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
:value="task.ext.tf_caseFilingType"></dict-tag>
)
</template>
</div>
</van-cell>
<van-cell title="主办单位">{{ task.ext.tf_hostUnitName }}</van-cell>
<van-cell title="协办单位">{{ task?.ext?.tf_helpUnitNames?.join('、') }}</van-cell>
<van-cell title="主办单位">{{ task.ext.tf_masterUnitName }}</van-cell>
<van-cell title="协办单位">{{ task?.ext?.tf_slaveUnitNameStr }}</van-cell>
</van-cell-group>
<van-cell-group :title="task.displayName" v-else>
@@ -129,8 +158,8 @@ const PROPOSAL_INFO = {
:value="task.ext.tf_feedback"></dict-tag>
</van-cell>
<van-cell title="办理结果" v-else>
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="task.ext.caseFilingResult"></dict-tag>
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</van-cell>
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
<div v-html="task.taskFormData.tf_opinion"></div>
@@ -149,6 +178,7 @@ const PROPOSAL_INFO = {
viewData: {},
doneTasks: [],
row: null,
originalRow: null, // 用于保存原始数据,支持返回功能
}
},
methods: {
@@ -175,10 +205,27 @@ const PROPOSAL_INFO = {
},
// 查看提案
openView(id) {
this.$nextTick(() => {
this.$refs.infoDialogRef.onOpen(id)
})
openView(row) {
// 如果传入的是并案对象,则打开新的详情页面
if (row && typeof row === 'object' && row.id) {
// 创建一个新的提案详情组件实例来显示并案详情
this.$nextTick(() => {
// 可以通过事件总线或者其他方式来打开新的详情页面
// 这里暂时使用简单的方式,直接在当前组件中显示
const currentRow = this.row;
this.row = row;
this.getInfo();
// 保存原来的数据,以便返回时恢复
this.originalRow = currentRow;
})
} else {
// 原有的逻辑,通过ID查看
this.$nextTick(() => {
if (this.$refs.infoDialogRef) {
this.$refs.infoDialogRef.onOpen(row)
}
})
}
},
// 获取已办任务审批记录
@@ -82,6 +82,38 @@ layout("/layouts/platform_h5.html"){
maxlength="100"
show-word-limit
></van-field>
<template v-if="['SATISFIED','FAIRLY_SATISFIED'].includes(formData.tf_feedback)">
<van-field
v-model="formData.tf_address"
name="tf_address"
label="通讯地址"
placeholder="请输入通讯地址"
:rules="[{ required: true, message: '请输入通讯地址' }]"
required
show-word-limit
></van-field>
<!--联系电话-->
<van-field
v-model="formData.tf_phone"
name="tf_phone"
label="联系电话"
placeholder="请输入联系电话"
:rules="[{ required: true, message: '请输入联系电话' }]"
required
show-word-limit
></van-field>
<!--邮政编码-->
<van-field
v-model="formData.tf_postcode"
name="tf_postcode"
label="邮政编码"
placeholder="请输入邮政编码"
:rules="[{ required: true, message: '请输入邮政编码' }]"
required
show-word-limit
></van-field>
</template>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="$refs.proposalInfoRef.onClose()">取消</van-button>
@@ -25,7 +25,7 @@ layout("/layouts/platform_h5.html"){
<table-column label="提案类别">{{row.typeName}}</table-column>
<table-column label="提案人">{{row.createUserName}}</table-column>
<table-column label="代表团">{{row.delegationName}}</table-column>
<table-column label="当前节点">{{row.curTaskName}}</table-column>
<table-column label="当前节点">{{row.taskName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
@@ -43,7 +43,7 @@ layout("/layouts/platform_h5.html"){
<i class="fa fa-user-plus"></i>
<span>邀请附议人</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(item)">
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<i class="fa fa-undo"></i>
<span>撤回</span>
</div>
@@ -128,8 +128,10 @@ layout("/layouts/platform_h5.html"){
})
.then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
this.$toast.success(resp.msg)
this.doSearch()
if(res.code===0){
this.$toast.success(res.msg)
this.doSearch()
}
})
})
},
@@ -65,8 +65,8 @@ layout("/layouts/platform_h5.html"){
></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(4)">退回答复</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意答复</van-button>
<van-button type="danger" block @click="handleTaskAction('back')">退回答复</van-button>
<van-button type="primary" block @click="handleTaskAction('agree')">同意答复</van-button>
</div>
</div>
</proposal-info>
@@ -129,7 +129,9 @@ layout("/layouts/platform_h5.html"){
this.$refs.proposalInfoRef.onOpen(row)
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
taskKey: row.taskKey,
taskName: row.taskName,
proposalId: row.id
}
},
@@ -140,11 +142,17 @@ layout("/layouts/platform_h5.html"){
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
const formData = {
...this.formData,
tf_approval: val
}
delete formData.taskKey
delete formData.taskName
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
data: JSON.stringify(formData)
}).then((res) => {
if (res.code === 0) {
this.$refs.proposalInfoRef.onClose()
@@ -3,7 +3,75 @@ layout("/layouts/platform_h5.html"){
#-->
<style>
.suggestion-unit-picker {
height: 100%;
display: flex;
flex-direction: column;
}
.picker-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px;
background-color: #f8f8f8;
border-bottom: 1px solid #eee;
}
.picker-cancel, .picker-confirm {
background: none;
border: none;
font-size: 16px;
color: #1989fa;
cursor: pointer;
}
.picker-cancel {
color: #969799;
}
.picker-title {
font-size: 16px;
font-weight: 500;
color: #323233;
}
.search-container {
padding: 12px 16px;
background-color: #fff;
border-bottom: 1px solid #eee;
}
.options-container {
flex: 1;
overflow-y: auto;
background-color: #fff;
}
.option-item {
display: flex;
align-items: center;
width: 100%;
}
.option-text {
margin-left: 12px;
flex: 1;
font-size: 14px;
color: #323233;
}
.van-checkbox {
margin-right: 0;
}
.van-cell {
padding: 12px 16px;
}
.van-cell:active {
background-color: #f2f3f5;
}
</style>
<div id="app" v-cloak>
@@ -113,6 +181,7 @@ layout("/layouts/platform_h5.html"){
placeholder="请选择提案方式"
@click="showSourcePicker = true"
:rules="[{ required: true, message: '请选择提案方式' }]"
required
></van-field>
<van-popup v-model="showSourcePicker" position="bottom">
<van-picker
@@ -132,6 +201,7 @@ layout("/layouts/platform_h5.html"){
placeholder="请选择提案类别"
@click="showTypePicker = true"
:rules="[{ required: true, message: '请选择提案类别' }]"
required
></van-field>
<van-popup v-model="showTypePicker" position="bottom">
<van-picker
@@ -142,6 +212,61 @@ layout("/layouts/platform_h5.html"){
></van-picker>
</van-popup>
<van-field
:value="formData.suggestUnits.length > 0 ? formData.suggestUnits.join(', ') : ''"
is-link
readonly
name="suggestUnits"
label="建议承办单位"
placeholder="请选择建议承办单位"
@click="showSuggestionUnitPicker = true"
:rules="[{ required: true, message: '请选择建议承办单位' }]"
required
></van-field>
<van-popup v-model="showSuggestionUnitPicker" position="bottom" :style="{ height: '70%' }">
<div class="suggestion-unit-picker">
<!-- 头部工具栏 -->
<div class="picker-toolbar">
<button class="picker-cancel" @click="onSuggestionUnitCancel">取消</button>
<div class="picker-title">选择建议承办单位</div>
<button class="picker-confirm" @click="onSuggestionUnitConfirm">确认</button>
</div>
<!-- 搜索框 -->
<div class="search-container">
<van-search
v-model="suggestionUnitSearchText"
placeholder="搜索承办单位"
@input="onSuggestionUnitSearch"
></van-search>
</div>
<!-- 选项列表 -->
<div class="options-container">
<van-checkbox-group v-model="selectedSuggestionUnits">
<van-cell-group>
<van-cell
v-for="item in filteredSuggestionUnits"
:key="item.id"
clickable
@click="toggleSuggestionUnit(item)"
>
<template #title>
<div class="option-item">
<van-checkbox
:name="item.name"
:checked="selectedSuggestionUnits.includes(item.name)"
@click.stop
/>
<span class="option-text">{{ item.name }}</span>
</div>
</template>
</van-cell>
</van-cell-group>
</van-checkbox-group>
</div>
</div>
</van-popup>
</van-cell-group>
<van-cell-group title="提案内容" class="form-group">
@@ -226,7 +351,9 @@ layout("/layouts/platform_h5.html"){
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
formData: {},
formData: {
suggestUnits: []
},
sessionOptions: [],
sourceOptions: [],
delegationOptions: [],
@@ -245,7 +372,14 @@ layout("/layouts/platform_h5.html"){
proposalConfig: {},
noticeDialogVisible: false,
isWriteTime: true
isWriteTime: true,
// 建议承办单位
suggestUnitOptions: [],
showSuggestionUnitPicker: false,
selectedSuggestionUnits: [], // 当前选中的承办单位
suggestionUnitSearchText: '', // 搜索文本
filteredSuggestionUnits: [] // 过滤后的承办单位列表
}
},
methods: {
@@ -272,6 +406,46 @@ layout("/layouts/platform_h5.html"){
this.showTypePicker = false;
},
onSuggestionUnitConfirm() {
// 将选中的承办单位保存到表单数据中
this.formData.suggestUnits = [...this.selectedSuggestionUnits];
this.showSuggestionUnitPicker = false;
},
onSuggestionUnitCancel() {
// 取消时恢复到之前的选择状态
this.selectedSuggestionUnits = [...this.formData.suggestUnits];
this.suggestionUnitSearchText = '';
this.showSuggestionUnitPicker = false;
},
// 切换承办单位选择状态
toggleSuggestionUnit(item) {
const index = this.selectedSuggestionUnits.indexOf(item.name);
if (index > -1) {
this.selectedSuggestionUnits.splice(index, 1);
} else {
this.selectedSuggestionUnits.push(item.name);
}
},
// 搜索承办单位
onSuggestionUnitSearch(value) {
this.suggestionUnitSearchText = value;
this.filterSuggestionUnits();
},
// 过滤承办单位列表
filterSuggestionUnits() {
if (!this.suggestionUnitSearchText) {
this.filteredSuggestionUnits = this.suggestUnitOptions;
} else {
this.filteredSuggestionUnits = this.suggestUnitOptions.filter(item =>
item.name.toLowerCase().includes(this.suggestionUnitSearchText.toLowerCase())
);
}
},
onCommitteeConfirm(value) {
this.formData.committeeId = value.value;
this.$set(this.formData, 'committeeName', value.text);
@@ -445,6 +619,15 @@ layout("/layouts/platform_h5.html"){
});
},
// 建议承办单位
listSuggestUnit() {
this.$axios.post("/platform/proposal/common/listUnderTake").then((res) => {
if (res.code === 0) {
this.suggestUnitOptions = res.data
}
})
},
// 查询开启的教代会
listOpenSession(isModify = false) {
this.$axios.post("/platform/proposal/common/listOpenSession").then(async (res) => {
@@ -546,8 +729,27 @@ layout("/layouts/platform_h5.html"){
},
created() {
this.init();
this.listSuggestUnit();
this.listProposalType();
this.getProposalConfig();
},
watch: {
// 监听suggestUnitOptions变化,初始化过滤列表
suggestUnitOptions: {
handler(newVal) {
this.filteredSuggestionUnits = newVal;
},
immediate: true
},
// 监听选择器显示状态,重置搜索和选择状态
showSuggestionUnitPicker(newVal) {
if (newVal) {
// 打开选择器时,初始化选择状态
this.selectedSuggestionUnits = [...this.formData.suggestUnits];
this.suggestionUnitSearchText = '';
this.filterSuggestionUnits();
}
}
}
})
</script>