This commit is contained in:
那些花儿
2025-09-30 16:02:11 +08:00
parent 51aed94745
commit 056335a054
38 changed files with 23757 additions and 487 deletions
+5 -5
View File
@@ -293,11 +293,11 @@
<!-- <artifactId>nutz-plugins-validation</artifactId> -->
<!-- <version>1.r.69.v20220215</version> -->
<!-- </dependency> -->
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.0.8.Final</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.hibernate.validator</groupId>-->
<!-- <artifactId>hibernate-validator</artifactId>-->
<!-- <version>6.0.8.Final</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
@@ -11,6 +11,7 @@ import com.budwk.app.web.commons.auth.satoken.SaTokenDaoRedisImpl;
import com.budwk.app.web.commons.auth.satoken.StpInterfaceImpl;
import com.budwk.app.web.commons.base.Globals;
import com.budwk.app.web.commons.ext.pubsub.WebPubSub;
import com.budwk.app.zhgh.dayofficework.message.service.GlobalMessageSendService;
import lombok.extern.slf4j.Slf4j;
import org.beetl.core.GroupTemplate;
import org.nutz.boot.NbApp;
@@ -82,6 +83,7 @@ public class MainLauncher {
init_auth();
ioc.get(Globals.class);
ioc.get(FlowEngine.class);
ioc.get(GlobalMessageSendService.class);
AppIocUtil.setIoc(ioc);
}
@@ -0,0 +1,14 @@
package com.budwk.app.base.param;
import lombok.Data;
/**
* 自定义导出表格列
*/
@Data
public class ExportTableColumns {
private String label;
private String prop;
}
@@ -201,4 +201,14 @@ public interface ProcessTaskService extends BaseService<ProcessTask> {
* @param transferUserId 转办用户ID
*/
void transfer(Long taskId, String transferUserId);
/**
* 获取正在进行的任务
*
* @param bizIds 业务ID
* @param taskName 任务名称
* @return
*/
List<ProcessTask> getDoingTaskByBizIdTaskName(List<String> bizIds, String taskName);
}
@@ -485,7 +485,17 @@ public class ProcessTaskServiceImpl extends BaseServiceImpl<ProcessTask> impleme
processTaskList.forEach(processTask -> {
ProcessPublisher.notify(ProcessEvent.builder().eventType(ProcessEventTypeEnum.PROCESS_TASK_START).sourceId(processTask.getId()).build());
});
}
@Override
public List<ProcessTask> getDoingTaskByBizIdTaskName(List<String> bizIds, String taskName) {
List<ProcessInstance> instances = dao().query(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "in", bizIds));
List<Long> instanceIds = instances.stream().map(ProcessInstance::getId).toList();
List<ProcessTask> tasks = dao().query(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "in", instanceIds)
.and(ProcessTask::getTaskName, "=", taskName)
.and(ProcessTask::getTaskState, "=", ProcessTaskStateEnum.DOING.getCode()));
return tasks;
}
/**
@@ -22,30 +22,30 @@ import java.util.stream.Collectors;
@Slf4j
public class ParamValidationProcessor extends AbstractProcessor {
protected ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
// protected ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
@Override
public void process(ActionContext ac) throws Throwable {
Validator validator = factory.getValidator();
Method method = ac.getMethod();
Object[] methodArgs = ac.getMethodArgs();
Parameter[] parameters = method.getParameters();
for (int i = 0; i < parameters.length; i++) {
Parameter parameter = parameters[i];
boolean hasValidAnnotation = parameter.isAnnotationPresent(Valid.class);
if (hasValidAnnotation) {
Object argValue = methodArgs[i];
if (argValue == null) {
throw new MethodArgumentNotValidException(parameter.getName() + "不能为null");
}
Set<ConstraintViolation<Object>> violations = validator.validate(argValue);
if (!violations.isEmpty()) {
String errMsg = violations.stream().map(ConstraintViolation::getMessage).collect(Collectors.joining(""));
throw new MethodArgumentNotValidException(errMsg);
}
}
}
// Validator validator = factory.getValidator();
// Method method = ac.getMethod();
// Object[] methodArgs = ac.getMethodArgs();
// Parameter[] parameters = method.getParameters();
// for (int i = 0; i < parameters.length; i++) {
// Parameter parameter = parameters[i];
// boolean hasValidAnnotation = parameter.isAnnotationPresent(Valid.class);
// if (hasValidAnnotation) {
// Object argValue = methodArgs[i];
// if (argValue == null) {
// throw new MethodArgumentNotValidException(parameter.getName() + "不能为null");
// }
//
// Set<ConstraintViolation<Object>> violations = validator.validate(argValue);
// if (!violations.isEmpty()) {
// String errMsg = violations.stream().map(ConstraintViolation::getMessage).collect(Collectors.joining(""));
// throw new MethodArgumentNotValidException(errMsg);
// }
// }
// }
doNext(ac);
}
}
@@ -10,11 +10,12 @@ import org.nutz.ioc.Ioc;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import javax.annotation.PostConstruct;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
/**
* 全局消息发送服务
@@ -47,22 +48,18 @@ public class GlobalMessageSendService {
log.info("开始初始化消息发送策略...");
// 获取所有实现了GlobalMessageSendStrategy接口的Bean
String[] beanNames = ioc.getNames();
for (String beanName : beanNames) {
String[] namesByType = ioc.getNamesByType(GlobalMessageSendStrategy.class);
for (String beanName : namesByType) {
try {
Object bean = ioc.get(null, beanName);
if (bean instanceof GlobalMessageSendStrategy) {
GlobalMessageSendStrategy strategy = (GlobalMessageSendStrategy) bean;
GlobalMessageChannel channel = strategy.getChannel();
strategyMap.put(channel, strategy);
// 缓存本地策略
if (channel == GlobalMessageChannel.LOCAL) {
localStrategy = strategy;
}
log.info("注册消息发送策略:{} -> {}", channel.getValue(), strategy.getClass().getSimpleName());
GlobalMessageSendStrategy strategy = ioc.get(GlobalMessageSendStrategy.class, beanName);
GlobalMessageChannel channel = strategy.getChannel();
strategyMap.put(channel, strategy);
// 缓存本地策略
if (channel == GlobalMessageChannel.LOCAL) {
localStrategy = strategy;
}
log.info("注册消息发送策略:{} -> {}", channel.getValue(), strategy.getClass().getSimpleName());
} catch (Exception e) {
log.warn("初始化Bean {}时出错:{}", beanName, e.getMessage());
}
@@ -96,7 +93,7 @@ public class GlobalMessageSendService {
request.setType(type);
request.setReceiverIds(receiverIds);
request.setConfig(config);
sendMessage(request);
}
@@ -105,27 +102,27 @@ public class GlobalMessageSendService {
*/
public void sendMessage(GlobalMessageSendRequest request) {
try {
log.info("开始发送全局消息,标题:{},接收人数量:{}", request.getTitle(),
log.info("开始发送全局消息,标题:{},接收人数量:{}", request.getTitle(),
request.getReceiverIds() != null ? request.getReceiverIds().size() : 0);
// 参数校验
validateRequest(request);
// 获取启用的策略
List<GlobalMessageSendStrategy> enabledStrategies = getEnabledStrategies();
if (enabledStrategies.isEmpty()) {
log.warn("没有找到启用的消息发送策略");
return;
}
// 执行消息发送 - 本地消息优先,然后是外部策略
for (GlobalMessageSendStrategy strategy : enabledStrategies) {
try {
// 本地消息必须同步发送,确保优先完成
if (strategy.getChannel() == GlobalMessageChannel.LOCAL) {
strategy.send(request.getTitle(), request.getContent(), request.getType(),
request.getReceiverIds(), request.getConfig());
strategy.send(request.getTitle(), request.getContent(), request.getType(),
request.getReceiverIds(), request.getConfig());
log.info("本地消息发送成功");
} else {
// 外部消息策略根据配置决定同步或异步
@@ -133,8 +130,8 @@ public class GlobalMessageSendService {
// 异步发送
CompletableFuture.runAsync(() -> {
try {
strategy.send(request.getTitle(), request.getContent(), request.getType(),
request.getReceiverIds(), request.getConfig());
strategy.send(request.getTitle(), request.getContent(), request.getType(),
request.getReceiverIds(), request.getConfig());
log.info("异步发送消息成功,渠道:{}", strategy.getChannel().getValue());
} catch (Exception e) {
log.error("异步发送消息失败,渠道:{},错误:{}", strategy.getChannel().getValue(), e.getMessage(), e);
@@ -142,8 +139,8 @@ public class GlobalMessageSendService {
});
} else {
// 同步发送
strategy.send(request.getTitle(), request.getContent(), request.getType(),
request.getReceiverIds(), request.getConfig());
strategy.send(request.getTitle(), request.getContent(), request.getType(),
request.getReceiverIds(), request.getConfig());
log.info("同步发送消息成功,渠道:{}", strategy.getChannel().getValue());
}
}
@@ -156,7 +153,7 @@ public class GlobalMessageSendService {
}
}
}
log.info("全局消息发送完成,标题:{}", request.getTitle());
} catch (Exception e) {
log.error("全局消息发送失败,标题:{},错误:{}", request.getTitle(), e.getMessage(), e);
@@ -191,20 +188,20 @@ public class GlobalMessageSendService {
*/
private List<GlobalMessageSendStrategy> getEnabledStrategies() {
List<GlobalMessageSendStrategy> enabledStrategies = new ArrayList<>();
// 本地消息策略必须存在且优先添加
if (localStrategy != null) {
enabledStrategies.add(localStrategy);
log.debug("添加本地消息策略:{}", localStrategy.getChannel().getValue());
}
// 查找其他启用的策略
for (GlobalMessageSendStrategy strategy : strategyMap.values()) {
// 跳过本地策略(已经添加)
if (strategy.getChannel() == GlobalMessageChannel.LOCAL) {
continue;
}
// 检查策略是否启用
if (strategy.isEnabled()) {
enabledStrategies.add(strategy);
@@ -213,7 +210,7 @@ public class GlobalMessageSendService {
log.debug("跳过未启用的消息策略:{}", strategy.getChannel().getValue());
}
}
log.info("共找到{}个启用的消息发送策略", enabledStrategies.size());
return enabledStrategies;
}
@@ -2,9 +2,8 @@ package com.budwk.app.zhgh.democratic.proposal.controller.export;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.ExportTableColumns;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.zhgh.democratic.proposal.controller.vo.ProposalInfoPageVO;
import com.budwk.app.zhgh.democratic.proposal.param.ProposalQueryComprehensiveParam;
import com.budwk.app.zhgh.democratic.proposal.service.ProposalExportService;
import io.swagger.annotations.ApiOperation;
@@ -33,7 +32,8 @@ public class ProposalExportComprehensiveController {
@At("")
@Ok("beetl:/platform/zhgh/democratic/proposal/export/comprehensive/index.html")
@SaCheckPermission("proposal.export.comprehensive")
public void index() {}
public void index() {
}
@At
@SaCheckPermission("proposal.query.comprehensive")
@@ -42,7 +42,7 @@ public class ProposalExportComprehensiveController {
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,
@@ -56,8 +56,8 @@ public class ProposalExportComprehensiveController {
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
@@ -70,7 +70,7 @@ public class ProposalExportComprehensiveController {
ProposalQueryComprehensiveParam.buildSearch(cnd, pageForm);
cnd.groupBy("info.id");
sql.setCondition(cnd);
Pagination pagination = proposalExportService.listPageMap(pageForm.getPageNumber(),pageForm.getPageSize(), sql);
Pagination pagination = proposalExportService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
@@ -79,7 +79,7 @@ public class ProposalExportComprehensiveController {
@Ok("void")
@ApiOperation("导出汇总表excel")
@SaCheckPermission("proposal.query.comprehensive")
public void exportSummaryAsExcel(@Valid @Param("pageForm") ProposalQueryComprehensiveParam pageForm, HttpServletResponse response){
public void exportSummaryAsExcel(@Valid @Param("pageForm") ProposalQueryComprehensiveParam pageForm, HttpServletResponse response) {
proposalExportService.exportSummaryAsExcel(pageForm, response);
}
@@ -88,7 +88,7 @@ public class ProposalExportComprehensiveController {
@Ok("void")
@ApiOperation("导出提案立案汇总表excel")
@SaCheckPermission("proposal.query.comprehensive")
public void exportProposalRegisterSummaryAsExcel(@Valid @Param("pageForm") ProposalQueryComprehensiveParam pageForm, HttpServletResponse response){
public void exportProposalRegisterSummaryAsExcel(@Valid @Param("pageForm") ProposalQueryComprehensiveParam pageForm, HttpServletResponse response) {
proposalExportService.exportProposalRegisterSummaryAsExcel(pageForm, response);
}
@@ -96,7 +96,7 @@ public class ProposalExportComprehensiveController {
@Ok("void")
@ApiOperation("导出全部提案ZIP")
@SaCheckPermission("proposal.query.comprehensive")
public void exportAllProposalAsZip(@Valid @Param("pageForm") ProposalQueryComprehensiveParam pageForm, HttpServletResponse response){
public void exportAllProposalAsZip(@Valid @Param("pageForm") ProposalQueryComprehensiveParam pageForm, HttpServletResponse response) {
proposalExportService.exportProposalStatisticsAsZip(pageForm, response);
}
@@ -104,7 +104,7 @@ public class ProposalExportComprehensiveController {
@Ok("void")
@ApiOperation("导出全部提案反馈表ZIP")
@SaCheckPermission("proposal.query.comprehensive")
public void exportAllProposalFeedBackAsZip(@Valid @Param("pageForm") ProposalQueryComprehensiveParam pageForm, HttpServletResponse response){
public void exportAllProposalFeedBackAsZip(@Valid @Param("pageForm") ProposalQueryComprehensiveParam pageForm, HttpServletResponse response) {
proposalExportService.exportFeedBackAsZip(pageForm, response);
}
@@ -112,8 +112,16 @@ public class ProposalExportComprehensiveController {
@Ok("void")
@ApiOperation("导出征集表ZIP")
@SaCheckPermission("proposal.query.comprehensive")
public void exportCollectZip(@Valid @Param("pageForm") ProposalQueryComprehensiveParam pageForm, HttpServletResponse response){
public void exportCollectZip(@Valid @Param("pageForm") ProposalQueryComprehensiveParam pageForm, HttpServletResponse response) {
proposalExportService.exportCollectZip(pageForm, response);
}
@At
@Ok("void")
@ApiOperation("导出自定义表excel")
@SaCheckPermission("proposal.query.comprehensive")
public void exportCustomAsExcel(@Valid @Param("pageForm") ProposalQueryComprehensiveParam pageForm, @Param("tableColumns") ExportTableColumns[] tableColumns, HttpServletResponse response) {
proposalExportService.exportCustomAsExcel(pageForm, tableColumns, response);
}
}
@@ -49,7 +49,7 @@ public class ProposalQueryComprehensiveController {
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,
@@ -63,8 +63,8 @@ public class ProposalQueryComprehensiveController {
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
@@ -42,7 +42,7 @@ public class ProposalQueryHistoryController {
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,
@@ -56,8 +56,8 @@ public class ProposalQueryHistoryController {
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
@@ -1,24 +1,34 @@
package com.budwk.app.zhgh.democratic.proposal.controller.transact;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.lang.Dict;
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.enums.ProcessTaskStateEnum;
import com.budwk.app.flow.service.FlowCommonService;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.democratic.proposal.models.ProposalMerge;
import com.budwk.app.zhgh.democratic.proposal.param.ProposalSearchParam;
import com.budwk.app.zhgh.democratic.proposal.service.ProposalCommitteeFilingService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
import org.nutz.lang.random.R;
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;
@@ -30,8 +40,13 @@ import java.util.List;
@Api(tags = "提案委员会立案审核")
public class ProposalCommitteeFilingController {
@Inject
private Dao dao;
@Inject
private ProposalCommitteeFilingService proposalCommitteeFilingService;
@Inject
private FlowCommonService flowCommonService;
@At("")
@Ok("beetl:/platform/zhgh/democratic/proposal/transact/committeeFiling/index.html")
@@ -42,11 +57,12 @@ public class ProposalCommitteeFilingController {
@At
@SaCheckPermission("proposal.committeeFiling")
@ApiOperation("分页列表")
public Result pageData(@Valid ProposalSearchParam pageForm,boolean approval) {
public Result pageData(@Valid ProposalSearchParam pageForm, boolean approval) {
Sql sql = Sqls.create("""
SELECT
info.*,
type.name AS typeName,
IF(mer.proposalId IS NOT NULL, 1, 0) AS merge,
tcs.fullName AS sessionName,
tcd.`name` AS delegationName,
ins.id AS instanceId,
@@ -73,13 +89,14 @@ public class ProposalCommitteeFilingController {
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
LEFT JOIN proposal_info info ON info.id = ins.businessNo
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
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.and("t.taskName", "=", "committee");
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())){
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
}
if (approval) {
@@ -91,8 +108,38 @@ public class ProposalCommitteeFilingController {
cnd.groupBy("t.id");
cnd.desc("t.createdAt");
sql.setCondition(cnd);
Pagination pagination = proposalCommitteeFilingService.listPageMap(pageForm.getPageNumber(),pageForm.getPageSize(), sql);
Pagination pagination = proposalCommitteeFilingService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
@At
@SaCheckPermission("proposal.committeeFiling")
@ApiOperation("并案审核")
@Aop(TransAop.READ_COMMITTED)
public Result merge(@Param("data") String data) {
Dict args = Json.fromJson(Dict.class, data);
List<Integer> taskIds = (List<Integer>) args.get("processTaskIds");
List<String> proposalIds = (List<String>) args.get("proposalIds");
// 记录提案并案
dao.clear(ProposalMerge.class, Cnd.where(ProposalMerge::getProposalId, "in", proposalIds));
String groupId = R.UU32();
List<ProposalMerge> merges = proposalIds.stream().map(proposalId -> {
ProposalMerge merge = new ProposalMerge();
merge.setProposalId(proposalId);
merge.setGroupId(groupId);
return merge;
}).toList();
dao.insert(merges);
for (Integer taskId : taskIds) {
Dict taskArgs = args.clone();
taskArgs.put(FlowConst.PROCESS_TASK_ID_KEY, taskId);
flowCommonService.executeTask(taskArgs);
}
return Result.success();
}
}
@@ -41,7 +41,7 @@ public class ProposalFeedbackEvaluationController {
private ProposalCommonService proposalCommonService;
@At("")
@Ok("beetl:/platform/zhgh/democratic/proposal/transact/feedbackEvaluation/index.html")
@Ok("beetl:/platform/zhgh/democratic/proposal/transact/feedback/index.html")
@SaCheckPermission("proposal.feedbackEvaluation")
public void index() {
}
@@ -61,6 +61,7 @@ public class ProposalFeedbackEvaluationController {
SELECT
info.*,
type.name AS typeName,
IF(mer.proposalId IS NOT NULL, 1, 0) AS merge,
tcs.fullName AS sessionName,
tcd.`name` AS delegationName,
ins.id AS instanceId,
@@ -87,6 +88,7 @@ public class ProposalFeedbackEvaluationController {
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
LEFT JOIN proposal_info info ON info.id = ins.businessNo
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
$condition
@@ -1,11 +1,16 @@
package com.budwk.app.zhgh.democratic.proposal.controller.transact;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.vo.LabelValueVO;
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;
@@ -21,8 +26,10 @@ import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import javax.validation.Valid;
import java.util.List;
@@ -42,6 +49,8 @@ public class ProposalSchoolLeaderApprovalController {
private ProposalCommonService proposalCommonService;
@Inject
private ProcessTaskService processTaskService;
@Inject
private FlowCommonService flowCommonService;
@At("")
@Ok("beetl:/platform/zhgh/democratic/proposal/transact/schoolLeaderApproval/index.html")
@@ -66,6 +75,7 @@ public class ProposalSchoolLeaderApprovalController {
SELECT
info.*,
type.name AS typeName,
IF(mer.proposalId IS NOT NULL, 1, 0) AS merge,
tcs.fullName AS sessionName,
tcd.`name` AS delegationName,
ins.id AS instanceId,
@@ -92,6 +102,7 @@ public class ProposalSchoolLeaderApprovalController {
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
LEFT JOIN proposal_info info ON info.id = ins.businessNo
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
$condition
@@ -125,4 +136,32 @@ public class ProposalSchoolLeaderApprovalController {
}
@At
@SaCheckPermission("proposal.schoolLeaderApproval")
@ApiOperation("执行任务")
public Result executeTask(@Param("data") String data) {
Dict args = Json.fromJson(Dict.class, data);
String proposalId = args.getStr("proposalId");
// 单条审核
List<String> mergeProposalIds = proposalCommonService.mergeProposal(proposalId);
if (ObjectUtil.isEmpty(mergeProposalIds)) {
flowCommonService.executeTask(args);
return Result.success();
}
// 并案审核
ProcessTask thisTask = dao.fetch(ProcessTask.class, args.getLong(FlowConst.PROCESS_TASK_ID_KEY));
List<ProcessTask> mergeTasks = processTaskService.getDoingTaskByBizIdTaskName(mergeProposalIds, thisTask.getTaskName());
for (ProcessTask mergeTask : mergeTasks) {
Dict cloneArgs = args.clone();
cloneArgs.put(FlowConst.PROCESS_TASK_ID_KEY, mergeTask.getId());
flowCommonService.executeTask(cloneArgs);
}
return Result.success();
}
}
@@ -1,9 +1,13 @@
package com.budwk.app.zhgh.democratic.proposal.controller.transact;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil;
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;
@@ -20,12 +24,14 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
@@ -42,6 +48,8 @@ import java.util.stream.Stream;
@Api(tags = "提案承办单位答复")
public class ProposalUnderTakeReplyController {
@Inject
private Dao dao;
@Inject
private ProposalCommonService proposalCommonService;
@Inject
@@ -73,6 +81,7 @@ public class ProposalUnderTakeReplyController {
SELECT
info.*,
type.name AS typeName,
IF(mer.proposalId IS NOT NULL, 1, 0) AS merge,
tcs.fullName AS sessionName,
tcd.`name` AS delegationName,
ins.id AS instanceId,
@@ -104,6 +113,7 @@ public class ProposalUnderTakeReplyController {
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id
LEFT JOIN proposal_info info ON info.id = ins.businessNo
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 sys_user transferUser on transferUser.id = t.variable->>'$.tf_transferUserId'
@@ -143,6 +153,34 @@ public class ProposalUnderTakeReplyController {
return Result.success(pagination);
}
@At
@SaCheckPermission("proposal.unitReply")
@ApiOperation("执行任务")
public Result executeTask(@Param("data") String data) {
Dict args = Json.fromJson(Dict.class, data);
String proposalId = args.getStr("proposalId");
// 查询是否提案
// 单条审核
List<String> mergeProposalIds = proposalCommonService.mergeProposal(proposalId);
if (ObjectUtil.isEmpty(mergeProposalIds)) {
flowCommonService.executeTask(args);
return Result.success();
}
// 并案审核
ProcessTask thisTask = dao.fetch(ProcessTask.class, args.getLong(FlowConst.PROCESS_TASK_ID_KEY));
List<ProcessTask> mergeTasks = processTaskService.getDoingTaskByBizIdTaskName(mergeProposalIds, thisTask.getTaskName());
for (ProcessTask mergeTask : mergeTasks) {
Dict cloneArgs = args.clone();
cloneArgs.put(FlowConst.PROCESS_TASK_ID_KEY, mergeTask.getId());
flowCommonService.executeTask(cloneArgs);
}
return Result.success();
}
@At
@SaCheckPermission("proposal.unitReply")
@ApiOperation("查询本单位可转办用户")
@@ -167,7 +205,7 @@ public class ProposalUnderTakeReplyController {
@SaCheckPermission("proposal.unitReply")
@ApiOperation("转办")
@Aop(TransAop.READ_COMMITTED)
public Result transfer(@Param("taskId") @Valid Long taskId, @Param("userId") @Valid String userId) {
public Result transfer(@Param("taskId") @Valid Long taskId, @Param("proposalId") String proposalId, @Param("userId") @Valid String userId) {
// 此处设置转办用户的角色即可
Sys_role proxyRole = sysRoleService.getByCode(RoleConstant.PROPOSAL_UNIT_PROXY);
int count = sysRoleService.dao().count(Sys_user_role.class, Cnd.where(Sys_user_role::getUserId, "=", userId).and(Sys_user_role::getRoleId, "=", proxyRole.getId()));
@@ -181,7 +219,18 @@ public class ProposalUnderTakeReplyController {
sysRoleService.clearCache();
}
processTaskService.transfer(taskId, userId);
// 查询是否并案
List<String> mergeProposalIds = proposalCommonService.mergeProposal(proposalId);
if (ObjectUtil.isEmpty(mergeProposalIds)) {
processTaskService.transfer(taskId, userId);
return Result.success();
}
ProcessTask thisTask = dao.fetch(ProcessTask.class, taskId);
List<ProcessTask> mergeTasks = processTaskService.getDoingTaskByBizIdTaskName(mergeProposalIds, thisTask.getTaskName());
for (ProcessTask mergeTask : mergeTasks) {
processTaskService.transfer(mergeTask.getId(), userId);
}
return Result.success();
}
@@ -0,0 +1,31 @@
package com.budwk.app.zhgh.democratic.proposal.models;
import com.budwk.app.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
@Data
@EqualsAndHashCode(callSuper = true)
@Table("proposal_merge")
@TableMeta("{'mysql-charset':'utf8mb4'}")
@Comment("提案并案")
@TableIndexes(value = {
@Index(name = "INDEX_PROPOSAL_MERGE_PROPOSAL_ID", fields = "proposalId", unique = true)
})
public class ProposalMerge extends BaseModel {
@Id
@Comment("id")
private Long id;
@Column
@Comment("分组id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String groupId;
@Column
@Comment("提案id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String proposalId;
}
@@ -30,6 +30,10 @@ public class ProposalQueryComprehensiveParam extends PageForm {
private String caseFilingResult;
@ApiModelProperty(name = "提案立案结果")
private String[] caseFilingResults;
@ApiModelProperty(name = "提案立案类型")
private String caseFilingType;
@ApiModelProperty(name = "提案立案类型")
private String[] caseFilingTypes;
@ApiModelProperty(name = "提案类型")
private String type;
@ApiModelProperty(name = "提案类型")
@@ -1,5 +1,6 @@
package com.budwk.app.zhgh.democratic.proposal.service;
import com.budwk.app.base.param.ExportTableColumns;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
import com.budwk.app.zhgh.democratic.proposal.param.ProposalQueryComprehensiveParam;
@@ -72,4 +73,12 @@ public interface ProposalExportService extends BaseService<ProposalInfo> {
* @param response
*/
void exportCollectZip(ProposalQueryComprehensiveParam pageForm, HttpServletResponse response);
/**
* 导出自定义表excel
* @param pageForm
* @param tableColumns
* @param response
*/
void exportCustomAsExcel(ProposalQueryComprehensiveParam pageForm, ExportTableColumns[] tableColumns, HttpServletResponse response);
}
@@ -17,6 +17,7 @@ public interface ProposalCommonService extends BaseService<ProposalInfo> {
/**
* 导出word
*
* @param id
* @param response
*/
@@ -32,14 +33,16 @@ public interface ProposalCommonService extends BaseService<ProposalInfo> {
/**
* 导出单个反馈表
*
* @param id
* @param byteArrayOutputStream
*/
void exportProposalFeedBackAsDocx(String id,ByteArrayOutputStream byteArrayOutputStream);
void exportProposalFeedBackAsDocx(String id, ByteArrayOutputStream byteArrayOutputStream);
/**
* 导出征集表
*
* @param id
* @param byteArrayOutputStream
*/
@@ -71,6 +74,7 @@ public interface ProposalCommonService extends BaseService<ProposalInfo> {
/**
* 获取自管代表团
*
* @return
*/
List<String> getSelfManageDelegationIds();
@@ -78,6 +82,7 @@ public interface ProposalCommonService extends BaseService<ProposalInfo> {
/**
* 根据提案id查询并案的提案
*
* @param id
* @return
*/
@@ -85,8 +90,19 @@ public interface ProposalCommonService extends BaseService<ProposalInfo> {
/**
* 导出年度报告
*
* @param sessionId
* @param response
*/
void exportYearReport(String sessionId, HttpServletResponse response);
/**
* 合并提案
*
* @param id
* @return
*/
List<String> mergeProposal(String id);
}
@@ -27,6 +27,7 @@ import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.web.commons.base.Globals;
import com.budwk.app.zhgh.democratic.proposal.models.ProposalConsolidation;
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
import com.budwk.app.zhgh.democratic.proposal.models.ProposalMerge;
import com.budwk.app.zhgh.democratic.teachercongress.prepare.models.Teacher_congress_session;
import com.deepoove.poi.XWPFTemplate;
import com.deepoove.poi.config.Configure;
@@ -100,6 +101,30 @@ public class ProposalCommonServiceImpl extends BaseServiceImpl<ProposalInfo> imp
if (StrUtil.isNotBlank(info.getString("suggestUnits"))) {
info.put("suggestUnits", String.join(",", Json.fromJson(ArrayList.class, info.getString("suggestUnits"))));
}
// 并案提案
List<String> mergedProposalIds = mergeProposal(id);
if (ObjectUtil.isNotEmpty(mergedProposalIds)) {
Sql mergeSql = Sqls.create("""
SELECT
info.id,
info.name,
info.code,
info.createUserName,
type.name AS typeName,
tcde.NAME AS delegationName
FROM
`proposal_info` info
LEFT JOIN proposal_type type on type.id = info.typeId
LEFT JOIN teacher_congress_delegate tcd ON tcd.userId = info.createUserId AND tcd.sessionId = info.sessionId
LEFT JOIN teacher_congress_delegation tcde ON tcde.id = tcd.delegationId
WHERE info.id in (@ids)
""");
mergeSql.setParam("ids", mergedProposalIds);
List<NutMap> mergeInfos = listMap(mergeSql);
info.put("merges", mergeInfos);
}
return info;
}
@@ -238,7 +263,7 @@ public class ProposalCommonServiceImpl extends BaseServiceImpl<ProposalInfo> imp
String implementState = FlowUtil.variableToDict(masterUnitReplyTask.getVariable()).getStr("tf_implementState");
info.put(implementState, "");
// 承办单位名称
info.put("underTakeName",FlowUtil.variableToDict(masterUnitReplyTask.getVariable()).getStr("underTakeName"));
info.put("underTakeName", FlowUtil.variableToDict(masterUnitReplyTask.getVariable()).getStr("underTakeName"));
}
@@ -542,4 +567,14 @@ public class ProposalCommonServiceImpl extends BaseServiceImpl<ProposalInfo> imp
e.printStackTrace();
}
}
@Override
public List<String> mergeProposal(String id) {
ProposalMerge merge = dao().fetch(ProposalMerge.class, Cnd.where(ProposalMerge::getProposalId, "=", id));
if (merge != null) {
List<ProposalMerge> merges = dao().query(ProposalMerge.class, Cnd.where(ProposalMerge::getGroupId, "=", merge.getGroupId()));
return merges.stream().map(ProposalMerge::getProposalId).toList();
}
return null;
}
}
@@ -6,6 +6,7 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HtmlUtil;
import com.budwk.app.base.param.ExportTableColumns;
import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.base.utils.CommonDownloadUtil;
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
@@ -14,6 +15,8 @@ import com.budwk.app.flow.engine.util.FlowUtil;
import com.budwk.app.flow.entity.ProcessInstance;
import com.budwk.app.flow.entity.ProcessTask;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.sys.models.Sys_dict;
import com.budwk.app.sys.services.SysDictService;
import com.budwk.app.web.commons.base.Globals;
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
import com.budwk.app.zhgh.democratic.proposal.param.ProposalQueryComprehensiveParam;
@@ -41,6 +44,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@@ -53,6 +57,8 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
private ProposalCommonService proposalCommonService;
@Inject
private SysOfficeTemplateUtil sysOfficeTemplateUtil;
@Inject
private SysDictService sysDictService;
public ProposalExportServiceImpl(Dao dao) {
@@ -195,7 +201,7 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
// 查询附议人信息
ProcessTask inviteTask = dao().fetch(ProcessTask.class,
Cnd.where(ProcessTask::getProcessInstanceId, "=", instance.getId())
.and(ProcessTask::getTaskName, "=", "85b7b9bd-d706-48cb-99a1-ef1370fb1819")
.and(ProcessTask::getTaskName, "=", "invite")
.and(ProcessTask::getTaskState, "in",
List.of(ProcessTaskStateEnum.DOING.getCode(), ProcessTaskStateEnum.FINISHED.getCode()))
.desc(ProcessTask::getCreatedAt));
@@ -416,7 +422,7 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
info.put("measures", sysOfficeTemplateUtil.convertRichTextToDocText(info.getString("measures")));
// 处理建议承办单位
if(StrUtil.isNotBlank(info.getString("suggestUnits"))){
if (StrUtil.isNotBlank(info.getString("suggestUnits"))) {
info.put("suggestUnits", String.join("", Json.fromJsonAsList(String.class, info.getString("suggestUnits"))));
}
@@ -439,10 +445,11 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
NutMap variable = Json.fromJson(NutMap.class, inviteTask.getVariable());
if (variable != null) {
List<NutMap> seconders = variable.getAsList(FlowConst.TASK_FORM_DATA_PREFIX + "seconder", NutMap.class);
if(seconders != null){
if (seconders != null) {
String secondersNames = seconders.stream().map(seconder -> seconder.getString("userName")).collect(Collectors.joining(""));
docData.put("secondersNames", secondersNames);
}
docData.put("seconders", seconders);
}
}
@@ -521,4 +528,98 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
e.printStackTrace();
}
}
@Override
public void exportCustomAsExcel(ProposalQueryComprehensiveParam pageForm, ExportTableColumns[] tableColumns, HttpServletResponse response) {
// 基本信息查询
Sql sql = Sqls.create("""
SELECT
info.id,
info.name,
info.code,
info.researchFindings,
info.brief,
info.measures,
info.createUserName,
tcde.unitName,
tcde.mobile,
IF(mer.proposalId IS NOT NULL, '是', '') AS merge,
type.name AS typeName,
tcs.j,
tcs.c,
tcs.fullName AS sessionName,
tcd.`name` AS delegationName,
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_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
LEFT JOIN proposal_reply_unit pru ON pru.proposalId = info.id
$condition
""");
Cnd cnd = Cnd.NEW();
ProposalQueryComprehensiveParam.buildSearch(cnd, pageForm);
cnd.groupBy("info.id");
sql.setCondition(cnd);
// 导出的数据
List<NutMap> list = listMap(sql);
// 添加序号,去除富文本,获取附议人
for (int i = 0; i < list.size(); i++) {
list.get(i).put("index", i + 1);
list.get(i).put("brief", HtmlUtil.cleanHtmlTag(list.get(i).getString("brief")));
list.get(i).put("measures", HtmlUtil.cleanHtmlTag(list.get(i).getString("measures")));
// 流程实例
// ProcessInstance instance = dao().fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", list.get(i).getString("id")));
//
// // 查询附议人信息
// ProcessTask inviteTask = dao().fetch(ProcessTask.class,
// Cnd.where(ProcessTask::getProcessInstanceId, "=", instance.getId())
// .and(ProcessTask::getTaskName, "=", "invite")
// .and(ProcessTask::getTaskState, "in",
// List.of(ProcessTaskStateEnum.DOING.getCode(), ProcessTaskStateEnum.FINISHED.getCode()))
// .desc(ProcessTask::getCreatedAt));
//
// if (inviteTask != null) {
// NutMap variable = Json.fromJson(NutMap.class, inviteTask.getVariable());
// List<NutMap> seconders = variable.getAsList(FlowConst.TASK_FORM_DATA_PREFIX + "seconder", NutMap.class);
// list.get(i).put("secondedUserNames", seconders.stream().map(v -> v.getString("userName")).collect(Collectors.joining(",")));
// }
}
// 立案结果
List<Sys_dict> caseFilingResult = sysDictService.getSubListByCode("PROPOSAL_CASE_FILING_RESULT");
Map<String, String> caseFilingResultMap = caseFilingResult.stream().collect(Collectors.toMap(Sys_dict::getCode, Sys_dict::getName));
// 立案类型
List<Sys_dict> caseFilingType = sysDictService.getSubListByCode("PROPOSAL_CASE_FILING_TYPE");
Map<String, String> caseFilingTypeMap = caseFilingType.stream().collect(Collectors.toMap(Sys_dict::getCode, Sys_dict::getName));
// 流程状态
List<Sys_dict> processInstanceState = sysDictService.getSubListByCode("PROCESS_INSTANCE_STATE");
Map<String, String> processInstanceStateMap = processInstanceState.stream().collect(Collectors.toMap(Sys_dict::getCode, Sys_dict::getName));
for (NutMap row : list) {
row.put("caseFilingResult", caseFilingResultMap.get(row.getString("caseFilingResult")));
row.put("caseFilingType", caseFilingTypeMap.get(row.getString("caseFilingType")));
row.put("instanceState", processInstanceStateMap.get(row.getString("instanceState")));
}
List<ExcelExportEntity> exportEntities = new ArrayList<>();
for (ExportTableColumns column : tableColumns) {
exportEntities.add(new ExcelExportEntity(column.getLabel(), column.getProp(), 20));
}
Teacher_congress_session session = dao().fetch(Teacher_congress_session.class, pageForm.getSessionId());
String title = StrUtil.format("{}第{}{}教代会提案汇总表", Globals.AppName, session.getJ(), session.getC());
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF);
exportParams.setTitle(title);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
CommonDownloadUtil.download(title + ".xlsx", workbook, response);
}
}
@@ -3,7 +3,6 @@ package com.budwk.app.zhgh.mall.models.dto.goods;
import cn.hutool.json.JSONObject;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.validator.constraints.Length;
import org.nutz.lang.util.NutMap;
import javax.validation.Valid;
@@ -41,7 +40,6 @@ public class MallGoodsOperationDTO implements Serializable {
@ApiModelProperty(value = "商品名称", required = true)
@NotEmpty(message = "商品名称不能为空")
@Length(max = 50, message = "商品名称不能超过50个字符")
private String goodsName;
@ApiModelProperty(value = "详情")
+1 -1
View File
@@ -48,7 +48,7 @@
<logger name="java" additivity="false" />
<logger name="org.eclipse.jetty" level="INFO"/>
<logger name="org.quartz" level="INFO"/>
<logger name="org.nutz" level="DEBUG"/>
<logger name="org.nutz" level="INFO"/>
<!-- 日志级别和appender的关联 -->
<root level="DEBUG">
File diff suppressed because one or more lines are too long
@@ -1,188 +1,358 @@
<template>
<div class="ele-table-tool">
<div class="ele-table-tool-title">
<div class="ele-table-tool-title-label">
<slot v-if="$slots.label" name="label"></slot>
<span v-else>{{ label }}</span>
</div>
<div class="ele-table-tool-title-content">
<slot v-if="$slots.content" name="content"></slot>
<span v-else>{{ content }}</span>
</div>
<div class="ele-table-tool">
<div class="ele-table-tool-title">
<div class="ele-table-tool-title-label">
<slot v-if="$slots.label" name="label"></slot>
<span v-else>{{ label }}</span>
</div>
<div class="ele-table-tool-title-content">
<slot v-if="$slots.content" name="content"></slot>
<span v-else>{{ content }}</span>
</div>
</div>
<div class="ele-tool">
<div class="ele-space">
<slot></slot>
</div>
<div class="ele-tool-item ele-action" v-if="columns && columns.length > 0">
<!--控制列-->
<i class="el-icon-menu" @click="openColumns" ></i>
</div>
</div>
<el-dialog title="列设置" :visible.sync="columnDialog" width="40%">
<div class="column-setting-container">
<div class="column-setting-header">
<el-checkbox
:indeterminate="isIndeterminate"
v-model="checkAll"
@change="handleCheckAllChange">
全选
</el-checkbox>
<span class="column-count">已选择 {{ checkedColumns.length }} / {{ tempColumns.length }} </span>
</div>
<div class="ele-tool">
<div class="ele-space">
<slot></slot>
<!-- <el-radio-group v-if="show_audit" v-model="auditState" @change="auditStateChange" size="small">-->
<!--&lt;!&ndash; <el-radio-button :label="null">全部</el-radio-button>&ndash;&gt;-->
<!-- <el-radio-button :label="true">已审核</el-radio-button>-->
<!-- <el-radio-button :label="false">未审核</el-radio-button>-->
<!-- </el-radio-group>-->
</div>
<!-- <div class="ele-tool-item ele-action"></div>-->
</div>
</div>
<el-table
:data="tempColumns"
ref="columnTableRef"
@selection-change="handleSelectionChange"
row-key="prop"
class="column-setting-table"
max-height="500px">
<el-table-column type="selection" width="55" :selectable="isColumnSelectable"></el-table-column>
<el-table-column label="标题" prop="label" min-width="120"></el-table-column>
<!-- <el-table-column label="字段" prop="prop" min-width="100"></el-table-column>-->
<el-table-column label="宽度PX" prop="width" min-width="120">
<template slot-scope="{row}">
<el-input
v-model="row.width"
type="number"
size="mini"
placeholder="自动">
</el-input>
</template>
</el-table-column>
<el-table-column label="固定" prop="fixed" min-width="120">
<template slot-scope="{row}">
<el-radio-group v-model="row.fixed" size="mini" boder>
<el-radio-button label="left">左侧</el-radio-button>
<el-radio-button label="">自动</el-radio-button>
<el-radio-button label="right">右侧</el-radio-button>
</el-radio-group>
</template>
</el-table-column>
</el-table>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="columnDialog = false"> </el-button>
<el-button type="primary" @click="doColumns"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
module.exports = {
name: "index",
props: {
label: {
type: String,
default: "表格数据"
},
content: {
type: String,
default: ""
},
show_audit: {
type: Boolean,
default: false
},
audit_state: {
type: Boolean,
default: null
}
name: "index",
props: {
label: {
type: String,
default: "表格数据"
},
data() {
return {
auditState: false
}
content: {
type: String,
default: ""
},
methods: {
auditStateChange(val) {
if (this.show_audit) {
this.$emit("update:audit_state", val)
this.$emit("search", null)
columns: {
type: Array,
default: function () {
return []
}
},
},
data() {
return {
columnDialog: false,
checkedColumns: [],
checkAll: false,
isIndeterminate: false,
sortable: null, // Sortable实例
tempColumns: [] // 临时存储列配置,避免直接修改props
}
},
methods: {
// 打开列设置
openColumns() {
// 创建临时列配置的深拷贝,避免直接修改props
this.tempColumns = JSON.parse(JSON.stringify(this.columns))
this.columnDialog = true
this.initColumnSelection()
this.initSortable()
},
// 初始化拖拽排序
initSortable() {
this.$nextTick(() => {
if (this.$refs.columnTableRef && this.$refs.columnTableRef.$el) {
const tbody = this.$refs.columnTableRef.$el.querySelector('.el-table__body-wrapper tbody')
if (tbody && !this.sortable) {
this.sortable = new Sortable(tbody, {
animation: 150,
ghostClass: 'sortable-ghost',
chosenClass: 'sortable-chosen',
dragClass: 'sortable-drag',
onEnd: (evt) => {
const {oldIndex, newIndex} = evt
if (oldIndex !== newIndex) {
// 在tempColumns中重新排序
const movedItem = this.tempColumns.splice(oldIndex, 1)[0]
this.tempColumns.splice(newIndex, 0, movedItem)
// 重新初始化选择状态
this.$nextTick(() => {
this.initColumnSelection()
})
}
}
})
}
}
})
},
// 初始化列选择状态
initColumnSelection() {
// 设置默认选中状态(默认全部显示,除非明确指定visible为false
this.checkedColumns = this.tempColumns.filter(col => col.visible !== false)
// 更新全选状态
this.updateCheckAllStatus()
// 设置表格选中状态
this.$nextTick(() => {
if (this.$refs.columnTableRef) {
this.tempColumns.forEach(row => {
if (row.visible !== false) {
this.$refs.columnTableRef.toggleRowSelection(row, true)
}
})
}
})
},
watch: {
audit_state: {
handler: function (val) {
this.auditState = val === null ? false : val
},
immediate: true
// 处理列选择变化
handleSelectionChange(selection) {
this.checkedColumns = selection
this.updateCheckAllStatus()
},
// 更新全选状态
updateCheckAllStatus() {
const selectableColumns = this.tempColumns.filter(col => this.isColumnSelectable(col))
this.checkAll = this.checkedColumns.length === selectableColumns.length
this.isIndeterminate = this.checkedColumns.length > 0 && this.checkedColumns.length < selectableColumns.length
},
// 处理全选变化
handleCheckAllChange(val) {
const selectableColumns = this.tempColumns.filter(col => this.isColumnSelectable(col))
if (val) {
this.checkedColumns = [...selectableColumns]
selectableColumns.forEach(row => {
this.$refs.columnTableRef.toggleRowSelection(row, true)
})
} else {
this.checkedColumns = []
this.$refs.columnTableRef.clearSelection()
}
this.isIndeterminate = false
},
// 判断列是否可选择
isColumnSelectable(row) {
return row.required !== true && row.type !== 'selection' && row.type !== 'index'
},
// 确定保存列设置
doColumns() {
// 基于tempColumns创建新的列配置数组,保留用户修改的宽度和固定值
const updatedColumns = this.tempColumns.map(col => {
return {
...col,
visible: this.checkedColumns.map(cc => cc.prop).includes(col.prop)
}
})
this.$emit('update:columns', updatedColumns)
this.columnDialog = false
}
},
watch: {
columns: {
handler() {
// 只有在对话框未打开时才初始化,避免覆盖用户正在编辑的tempColumns
if (!this.columnDialog) {
this.initColumnSelection()
}
},
immediate: true
},
created() {}
columnDialog(val) {
if (!val && this.sortable) {
this.sortable.destroy()
this.sortable = null
}
}
},
created() {
},
beforeDestroy() {
if (this.sortable) {
this.sortable.destroy()
this.sortable = null
}
}
}
</script>
<style scoped>
.ele-table-tool:not(.ele-table-tool-default):not(.ele-table-tools-none) .ele-tool .ele-tool-item {
padding: 6px;
line-height: 1;
text-align: center;
border: unset;
border-radius: unset;
font-size: 14px;
padding: 6px;
line-height: 1;
text-align: center;
border: unset;
border-radius: unset;
font-size: 14px;
margin-left: 10px;
}
.ele-table-tool .ele-table-tool-title {
margin: 0;
margin: 0;
}
.ele-table-tool-title-label {
position: relative;
padding-left: 1em;
color: var(--color-primary);
font-weight: bold;
position: relative;
padding-left: 1em;
color: var(--color-primary);
font-weight: bold;
}
.ele-table-tool-title-label::before {
content: "";
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 5px;
height: 1.3em;
background-color: var(--color-primary);
border-radius: 2px;
content: "";
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 5px;
height: 1.3em;
background-color: var(--color-primary);
border-radius: 2px;
}
.ele-table-tool {
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-align: center;
margin-bottom: 10px;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-align: center;
margin-bottom: 10px;
}
.ele-table-tool,
.ele-table-tool .ele-table-tool-title {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
align-items: center;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
align-items: center;
}
.ele-table-tool .ele-table-tool-title {
-webkit-box-flex: 1;
-ms-flex: auto;
flex: auto;
margin-top: 5px;
margin-bottom: 5px;
-ms-flex-align: center;
-webkit-box-flex: 1;
-ms-flex: auto;
flex: auto;
margin-top: 5px;
margin-bottom: 5px;
-ms-flex-align: center;
}
.ele-table-tool .ele-table-tool-title > .ele-table-tool-title-label {
margin-right: 8px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin-right: 8px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.ele-table-tool .ele-table-tool-title > .ele-table-tool-title-content {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.ele-table-tool .ele-tool {
margin: 5px 0 5px auto;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin: 5px 0 5px auto;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.ele-table-tool .ele-tool .ele-tool-item {
font-size: 18px;
padding: 0 2px;
cursor: pointer;
font-size: 18px;
padding: 0 2px;
cursor: pointer;
}
.ele-table-tool .ele-tool .ele-tool-item .el-dropdown > i {
font-size: 18px;
font-size: 18px;
}
.ele-table-tool .ele-tool .ele-tool-item + .ele-tool-item {
margin-left: 10px;
margin-left: 10px;
}
.ele-table-tool.ele-toolbar-form .ele-table-tool-title {
margin-top: 0;
margin-bottom: 0;
margin-top: 0;
margin-bottom: 0;
}
.ele-table-tool.ele-toolbar-form .ele-table-tool-title .el-form-item,
.ele-table-tool.ele-toolbar-form .ele-table-tool-title .ele-form-actions {
margin-top: 5px;
margin-bottom: 5px;
margin-top: 5px;
margin-bottom: 5px;
}
.ele-table-tool.ele-toolbar-actions .ele-table-tool-title {
margin-top: 0;
margin-bottom: 0;
margin-top: 0;
margin-bottom: 0;
}
.ele-table-tool.ele-toolbar-actions .ele-table-tool-title > .el-button,
@@ -190,105 +360,163 @@ module.exports = {
.ele-table-tool.ele-toolbar-actions .ele-table-tool-title > .el-link,
.ele-table-tool.ele-toolbar-actions .ele-table-tool-title > .el-tag,
.ele-table-tool.ele-toolbar-actions .ele-table-tool-title > .ele-action {
margin-top: 5px;
margin-bottom: 5px;
margin-top: 5px;
margin-bottom: 5px;
}
.ele-table-tool:not(.ele-table-tool-default):not(.ele-table-tools-none) .ele-tool .ele-tool-item {
padding: 6px;
line-height: 1;
text-align: center;
border: 1px solid var(--border-color-base);
border-radius: 50%;
font-size: 14px;
padding: 6px;
line-height: 1;
text-align: center;
border: 1px solid var(--border-color-base);
border-radius: 50%;
font-size: 14px;
}
.ele-table-tool:not(.ele-table-tool-default):not(.ele-table-tools-none) .ele-tool .ele-tool-item .el-dropdown > i {
font-size: 14px;
font-size: 14px;
}
.ele-table-tool:not(.ele-table-tool-default):not(.ele-table-tools-none) .ele-tool .ele-tool-item:hover {
color: var(--color-primary);
border-color: var(--color-primary-3);
background-color: var(--color-primary-1);
color: var(--color-primary);
border-color: var(--color-primary-3);
background-color: var(--color-primary-1);
}
.ele-table-tool:not(.ele-table-tool-default):not(.ele-table-tools-none) .ele-tool .ele-tool-item:hover .el-dropdown > i {
color: var(--color-primary);
color: var(--color-primary);
}
.ele-table-tool-default {
margin-bottom: 0;
padding: 5px 15px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background: var(--table-header-background-color);
border-top: 1px solid var(--border-color-lighter);
border-left: 1px solid var(--border-color-lighter);
border-right: 1px solid var(--border-color-lighter);
margin-bottom: 0;
padding: 5px 15px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background: var(--table-header-background-color);
border-top: 1px solid var(--border-color-lighter);
border-left: 1px solid var(--border-color-lighter);
border-right: 1px solid var(--border-color-lighter);
}
.ele-table-tool-default .ele-tool .ele-tool-item {
font-size: 16px;
padding: 5px 6px;
border-radius: 2px;
border: 1px solid var(--border-color-light);
-webkit-box-sizing: border-box;
box-sizing: border-box;
line-height: 1;
font-size: 16px;
padding: 5px 6px;
border-radius: 2px;
border: 1px solid var(--border-color-light);
-webkit-box-sizing: border-box;
box-sizing: border-box;
line-height: 1;
}
.ele-table-tool-default .ele-tool .ele-tool-item .el-dropdown > i {
font-size: 16px;
font-size: 16px;
}
.ele-tab-tool {
padding: 0 15px;
-ms-flex-negative: 0;
flex-shrink: 0;
width: auto;
min-width: 40px;
height: 40px;
line-height: 40px;
-webkit-transition:
background-color 0.3s,
color 0.3s;
transition:
background-color 0.3s,
color 0.3s;
-webkit-box-sizing: border-box;
box-sizing: border-box;
text-align: center;
position: relative;
cursor: pointer;
padding: 0 15px;
-ms-flex-negative: 0;
flex-shrink: 0;
width: auto;
min-width: 40px;
height: 40px;
line-height: 40px;
-webkit-transition: background-color 0.3s,
color 0.3s;
transition: background-color 0.3s,
color 0.3s;
-webkit-box-sizing: border-box;
box-sizing: border-box;
text-align: center;
position: relative;
cursor: pointer;
}
.ele-tab-tool .el-icon-house {
font-size: 16px;
vertical-align: -1px;
font-size: 16px;
vertical-align: -1px;
}
.ele-tab-tool.is-tab:hover {
color: var(--color-primary);
background: var(--header-tool-hover-bg);
color: var(--color-primary);
background: var(--header-tool-hover-bg);
}
.ele-tab-tool.is-tab:after {
content: "";
width: 0;
height: 2px;
background: var(--color-primary);
position: absolute;
bottom: 0;
left: 0;
content: "";
width: 0;
height: 2px;
background: var(--color-primary);
position: absolute;
bottom: 0;
left: 0;
}
.ele-tab-tool.is-tab.is-active {
color: var(--color-primary);
background: var(--color-primary-1);
color: var(--color-primary);
background: var(--color-primary-1);
}
.ele-tab-tool.is-tab.is-active:after {
width: 100%;
width: 100%;
}
.column-setting-container {
/*max-height: calc(100vh - 182px);
overflow-y: auto;*/
}
.column-setting-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
padding: 10px;
background-color: #f5f7fa;
border-radius: 4px;
}
.column-count {
font-size: 12px;
color: #909399;
}
.column-setting-table {
margin-top: 10px;
}
/* 拖拽排序样式 */
.sortable-ghost {
opacity: 0.5;
background-color: #f5f7fa;
}
.sortable-chosen {
background-color: #e6f7ff;
border: 1px dashed #1890ff;
}
.sortable-drag {
opacity: 0.8;
transform: rotate(5deg);
}
/* 表格行拖拽提示 */
.column-setting-table .el-table__row {
cursor: move;
transition: all 0.3s ease;
}
.column-setting-table .el-table__row:hover {
background-color: #f5f7fa;
}
/* 拖拽提示文本 */
.column-setting-container::before {
content: "💡 提示:可以拖拽表格行来调整列的显示顺序";
display: block;
margin-bottom: 10px;
padding: 8px;
background-color: #fafafa;
border-left: 3px solid var(--color-primary);
}
</style>
@@ -50,21 +50,20 @@ const PROPOSAL_INFO = {
</el-descriptions>
<!--并案信息-->
<template v-if="viewData.consolidationProposals">
<template v-if="viewData.merges">
<div class="process-title">
并案信息
</div>
<el-table :data="viewData.consolidationProposals">
<el-table :data="viewData.merges" size="small">
<el-table-column label="序号" type="index" width="100px"></el-table-column>
<el-table-column label="提案编号" prop="code" sortable></el-table-column>
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="提案人" prop="createUserName"></el-table-column>
<el-table-column label="提案类别" prop="typeName"></el-table-column>
<el-table-column label="届次" prop="sessionName"></el-table-column>
<el-table-column label="代表团" prop="delegationName"></el-table-column>
<el-table-column label="操作" width="100px">
<template slot-scope="{row}">
<el-link type="primary" size="mini" @click="openView(row.id)">查看</el-link>
<el-link type="primary" size="mini" @click="openView(row)">查看</el-link>
</template>
</el-table-column>
</el-table>
@@ -193,10 +192,10 @@ const PROPOSAL_INFO = {
},
// 查看提案
openView(id) {
openView(row) {
this.viewDialogVisible = true
this.$nextTick(() => {
this.$refs.infoDialogRef.onOpen(id)
this.$refs.infoDialogRef.onOpen(row)
})
},
@@ -111,44 +111,45 @@ layout("/layouts/platform.html"){
</div>
</el-card>
<el-card shadow="never">
<table-tool>
<table-tool :columns.sync="tableColumns">
<el-button type="primary" size="small" @click="exportAllProposalAsZip">导出提案压缩包</el-button>
<el-button type="primary" size="small" @click="exportCollectZip">导出提案征集表压缩包</el-button>
<el-button type="primary" size="small" @click="exportAllProposalFeedBackAsZip">导出反馈表压缩包</el-button>
<el-button type="primary" size="small" @click="exportSummaryAsExcel">导出汇总表</el-button>
<!-- <el-button type="primary" size="small" @click="exportProposalRegisterSummaryAsExcel">导出立案汇总表-->
<el-button type="primary" size="small" @click="exportAllProposalFeedBackAsZip">导出反馈表压缩包
</el-button>
<el-button type="primary" size="small" @click="exportSummaryAsExcel">导出汇总表</el-button>
<!-- <el-button type="primary" size="small" @click="exportProposalRegisterSummaryAsExcel">导出立案汇总表-->
<el-button type="primary" size="small" @click="exportCustomAsExcel">自定义导出</el-button>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" header-align="center" style="width: 100%" row-key="id">
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
<el-table-column label="提案编号" prop="code" width="200px"></el-table-column>
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="提案人" prop="createUserName"></el-table-column>
<el-table-column label="提案类别" prop="typeName"></el-table-column>
<el-table-column label="届次" prop="sessionName"></el-table-column>
<el-table-column label="代表团" prop="delegationName"></el-table-column>
<el-table-column label="立案结果" prop="caseFilingResult">
<template scope="{row}">
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'caseFilingResult'" scope="{row}">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="row.caseFilingResult"></dict-tag>
</template>
</el-table-column>
<el-table-column label="是否并案" prop="isConsolidation">
<template scope="{row}">
<el-tag size="mini" v-if="row.isConsolidation" type="success"></el-tag>
<el-tag size="mini" v-else type="danger"></el-tag>
<template v-else-if="column.prop === 'caseFilingType'" scope="{row}">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
:value="row.caseFilingType"></dict-tag>
</template>
</el-table-column>
<el-table-column label="主办单位" prop="masterUnitName" show-overflow-tooltip></el-table-column>
<el-table-column label="协办单位" prop="slaveUnitNames" show-overflow-tooltip></el-table-column>
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template slot-scope="{row}">
<template v-else-if="column.prop === 'merge'" scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
</template>
<template v-else-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<el-table-column label="操作" fixed="right" min-width="200px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
<el-button size="mini" type="primary" @click="exportDocx(row.id)">导出</el-button>
@@ -168,7 +169,7 @@ layout("/layouts/platform.html"){
<!--#include("../../common/info.js"){}#-->
new Vue({
el: "#app",
dicts: ["PROPOSAL_TYPE", "PROPOSAL_CASE_FILING_RESULT"],
dicts: ["PROPOSAL_TYPE", "PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
store,
mixins: [initTableMixins],
components: {
@@ -189,7 +190,24 @@ layout("/layouts/platform.html"){
caseFilingResults: [],
unionId: null,
unitId: null
}
},
tableColumns: [
{label: "提案编号", prop: "code"},
{label: "提案名称", prop: "name"},
{label: "提案人", prop: "createUserName"},
{label: "提案类别", prop: "typeName"},
{label: "届次", prop: "sessionName"},
{label: "代表团", prop: "delegationName"},
{label: "立案结果", prop: "caseFilingResult"},
{label: "立案类型", prop: "caseFilingType"},
{label: "是否并案", prop: "merge"},
{label: "案由", prop: "brief", visible: false},
{label: "建议措施", prop: "measures", visible: false},
{label: "主办单位", prop: "masterUnitName"},
{label: "协办单位", prop: "slaveUnitNames"},
{label: "当前节点", prop: "curTaskName"},
{label: "流程状态", prop: "instanceState"}
]
}
},
methods: {
@@ -227,6 +245,13 @@ layout("/layouts/platform.html"){
})
},
exportCustomAsExcel() {
this.$downLoad("/platform/proposal/export/comprehensive/exportCustomAsExcel", {
pageForm: JSON.stringify(this.pageForm),
tableColumns: JSON.stringify(this.tableColumns.filter(item => item.visible !== false))
})
},
tagToggle(key, val) {
if (this.pageForm[key].includes(val)) {
this.pageForm[key].splice(this.pageForm[key].indexOf(val), 1)
@@ -13,69 +13,75 @@ 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-item label="承办单位">-->
<!-- <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>-->
<!-- </search-item>-->
<!-- <search-item label="承办单位">-->
<!-- <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>-->
<!-- </search-item>-->
</search>
</el-card>
<el-card shadow="never">
<el-card shadow="never" :body-style="{'padding-top': '0','padding-bottom': '0'}">
<div style="display: flex; align-items: center; min-height: 70px; border-bottom: 1px dashed rgb(230, 230, 230)">
<div style="width: 90px;margin-right: 10px">提案类别</div>
<div style="flex: 1;display: flex;gap: 5px;">
@@ -89,7 +95,7 @@ layout("/layouts/platform.html"){
</el-tag>
</div>
</div>
<div style="display: flex; align-items: center; min-height: 70px; border-bottom: 1px dashed rgb(230, 230, 230)">
<div style="display: flex; align-items: center; min-height: 70px;border-bottom: 1px dashed rgb(230, 230, 230)">
<div style="width: 90px;margin-right: 10px">立案结果</div>
<div style="flex: 1;display: flex;gap: 5px;">
<el-tag
@@ -102,10 +108,23 @@ layout("/layouts/platform.html"){
</el-tag>
</div>
</div>
<div style="display: flex; align-items: center; min-height: 70px;">
<div style="width: 90px;margin-right: 10px">立案类型</div>
<div style="flex: 1;display: flex;gap: 5px;">
<el-tag
v-for="item in dict.type.PROPOSAL_CASE_FILING_TYPE"
:key="item.code"
:effect="pageForm.caseFilingTypes && pageForm.caseFilingTypes.includes(item.code) ? 'dark':'plain'"
@click="tagToggle('caseFilingTypes',item.code)"
>
{{ item.label }}
</el-tag>
</div>
</div>
</el-card>
<el-card shadow="never">
<table-tool></table-tool>
<el-table :data="tableData" @sort-change="pageOrder" header-align="center" style="width: 100%" row-key="id">
<el-table :data="tableData" @sort-change="pageOrder" header-align="center" ref="tableRef" style="width: 100%" row-key="id">
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
<el-table-column label="提案编号" prop="code" width="100px" show-overflow-tooltip></el-table-column>
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
@@ -114,13 +133,19 @@ 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">
<el-table-column label="立案类型" prop="caseFilingType">
<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>
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
:value="row.caseFilingType"></dict-tag>
</template>
</el-table-column>
<el-table-column label="是否并案" prop="merge">
<template slot-scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
</template>
</el-table-column>
<el-table-column label="主办单位" prop="masterUnitName" show-overflow-tooltip></el-table-column>
@@ -150,9 +175,9 @@ layout("/layouts/platform.html"){
<script>
<!--#include("../../common/info.js"){}#-->
new Vue({
const vue = new Vue({
el: "#app",
dicts: ["PROPOSAL_TYPE", "PROPOSAL_CASE_FILING_RESULT"],
dicts: ["PROPOSAL_TYPE", "PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
store,
mixins: [initTableMixins],
components: {
@@ -169,6 +194,7 @@ layout("/layouts/platform.html"){
pageForm: {
typeIds: [],
caseFilingResults: [],
caseFilingTypes: [],
unionId: null,
unitId: null
}
@@ -181,7 +207,7 @@ layout("/layouts/platform.html"){
})
},
exportDocx(id) {
this.$downLoad("/platform/proposal/common/exportProposalAsDocx", { id })
this.$downLoad("/platform/proposal/common/exportProposalAsDocx", {id})
},
tagToggle(key, val) {
if (this.pageForm[key].includes(val)) {
@@ -204,7 +230,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
}
@@ -13,36 +13,32 @@ layout("/layouts/platform.html"){
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="代表团列表"></table-tool>
<table-tool label="代表团列表" :columns.sync="tableColumns"></table-tool>
<el-table :data="tableData" ref="tableRef" header-align="center" style="width: 100%" row-key="id" show-summary>
<el-table-column
:index="indexMethod"
align="center"
header-align="center"
label="序号"
type="index"
width="80px"
fixed="left"
></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template scope="{row}" v-if="column.prop=='dbtName'">
<el-link @click="openView(row)" type="primary">{{row.dbtName}}</el-link>
</template>
</el-table-column>
<el-table-column header-align="center" label="立案率" prop="caseRate">
<template scope="{row}">
<span v-if="row.SUBMIT_COUNT && !isNaN(row.CONFIRM_FILING) && !isNaN(row.SUBMIT_COUNT)">
{{ ((row.CONFIRM_FILING / row.SUBMIT_COUNT) * 100).toFixed(2) }}%
<template scope="{row}" v-else-if="column.prop=='caseRate'">
<span v-if="!isNaN(row.CONFIRM_FILING) && !isNaN(row.TOTAL) && row.TOTAL > 0">
{{ ((row.CONFIRM_FILING / row.TOTAL) * 100).toFixed(2) }}%
</span>
<span v-else>0.00%</span>
</template>
</el-table-column>
</el-table>
@@ -78,7 +74,6 @@ layout("/layouts/platform.html"){
tableColumns: [
{ label: "代表团名称", prop: "dbtName" },
{ label: "提案总数", prop: "TOTAL" },
{ label: "已提交提案数", prop: "SUBMIT_COUNT" }
],
delegationId: "",
dialogTitle: "",
@@ -124,6 +119,10 @@ layout("/layouts/platform.html"){
prop: item.code
})
})
this.tableColumns.push({
label: "立案率",
prop: "caseRate"
})
})
},
pageData() {
@@ -102,6 +102,19 @@ layout("/layouts/platform.html"){
</el-tag>
</div>
</div>
<div style="display: flex; align-items: center; min-height: 70px;">
<div style="width: 90px;margin-right: 10px">立案类型</div>
<div style="flex: 1;display: flex;gap: 5px;">
<el-tag
v-for="item in dict.type.PROPOSAL_CASE_FILING_TYPE"
:key="item.code"
:effect="pageForm.caseFilingTypes && pageForm.caseFilingTypes.includes(item.code) ? 'dark':'plain'"
@click="tagToggle('caseFilingTypes',item.code)"
>
{{ item.label }}
</el-tag>
</div>
</div>
</el-card>
<el-card shadow="never">
<table-tool></table-tool>
@@ -117,10 +130,15 @@ layout("/layouts/platform.html"){
<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="100px">
<el-table-column label="立案类型" prop="caseFilingType">
<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>
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
:value="row.caseFilingType"></dict-tag>
</template>
</el-table-column>
<el-table-column label="是否并案" prop="merge">
<template slot-scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
</template>
</el-table-column>
<el-table-column label="主办单位" prop="masterUnitName" show-overflow-tooltip></el-table-column>
@@ -152,7 +170,7 @@ layout("/layouts/platform.html"){
<!--#include("../../common/info.js"){}#-->
new Vue({
el: "#app",
dicts: ["PROPOSAL_TYPE", "PROPOSAL_CASE_FILING_RESULT"],
dicts: ["PROPOSAL_TYPE", "PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
store,
mixins: [initTableMixins],
components: {
@@ -169,6 +187,7 @@ layout("/layouts/platform.html"){
pageForm: {
typeIds: [],
caseFilingResults: [],
caseFilingTypes: [],
unionId: null,
unitId: null
}
@@ -43,7 +43,7 @@ layout("/layouts/platform.html"){
</el-card>
<el-card shadow="never">
<table-tool>
<table-tool :columns.sync="tableColumns">
<el-button type="primary" icon="el-icon-plus" size="small" @click="openMerge">并案审核</el-button>
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
<el-radio-button :label="true">已审核</el-radio-button>
@@ -51,16 +51,24 @@ 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"></el-table-column>
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
<el-table-column label="提案编号" prop="code"></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="sessionName"></el-table-column>
<el-table-column label="代表团" prop="delegationName"></el-table-column>
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template slot-scope="{row}">
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'caseFilingResult'" scope="{row}">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="row.caseFilingResult"></dict-tag>
</template>
<template v-else-if="column.prop === 'merge'" scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
</template>
<template v-else-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
@@ -148,7 +156,7 @@ layout("/layouts/platform.html"){
</template>
<template #public>
<merge ref="mergeRef"></merge>
<merge ref="mergeRef" @close="$refs.guava.index()"></merge>
</template>
</guava>
</div>
@@ -168,6 +176,15 @@ layout("/layouts/platform.html"){
},
data() {
return {
tableColumns: [
{label: "提案编号", prop: "code"},
{label: "提案名称", prop: "name"},
{label: "提案类别", prop: "typeName"},
{label: "届次", prop: "sessionName"},
{label: "代表团", prop: "delegationName"},
{label: "当前节点", prop: "curTaskName"},
{label: "流程状态", prop: "instanceState"}
],
pageForm: {
approval: false
},
@@ -231,17 +248,20 @@ layout("/layouts/platform.html"){
// 打开并案审核
openMerge() {
const selection = this.$refs.tableRef.selection
console.log(selection)
if (selection.length < 2) {
this.$message.warning('请先勾选需要并案审核的提案,至少需要两条提案')
return
}
this.$refs.guava.public(() => {
this.$refs.mergeRef.onOpen(selection)
this.$refs.mergeRef.onOpen(selection, {
processTaskIds: selection.map(v => v.taskId),
taskName: selection[0].curTaskName,
tf_masterUnitId: null,
tf_slaveUnitIds: []
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
@@ -17,16 +17,89 @@ const merge = {
</template>
</el-table-column>
</el-table>
<div>
<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-item label="审核意见" prop="approvalOpinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$emit('close')" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到提案人</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">提交</el-button>
</el-row>
</div>
</div>
`,
dicts: ["PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
data() {
return {
selection: []
selection: [],
formData: {
tf_masterUnitId: null,
tf_slaveUnitIds: []
},
underTakeOptions: []
}
},
methods: {
onOpen(selection) {
onOpen(selection, formData) {
this.selection = selection
this.formData = formData
this.listUnderTake()
},
// 移除
onRemove(index) {
@@ -35,6 +108,41 @@ const merge = {
return
}
this.selection.splice(index, 1)
},
// 查询承办单位
listUnderTake() {
this.$axios.post("/platform/proposal/common/listUnderTake").then((res) => {
if (res.code === 0) {
this.underTakeOptions = res.data
}
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading('提交中')
this.$axios.post("/platform/proposal/committeeFiling/merge", {
data: JSON.stringify({
...this.formData,
proposalIds: this.selection.map(v => v.id),
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),
tf_slaveUnitNameStr: this.formData.tf_slaveUnitIds.map(v => this.underTakeOptions.find(v2 => v2.id === v)?.name).join(','),
})
}).then((res) => {
if (res.code === 0) {
this.$emit('close')
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
}
}
@@ -21,22 +21,31 @@ layout("/layouts/platform.html"){
</el-card>
<el-card shadow="never">
<table-tool>
<table-tool :columns.sync="tableColumns">
<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" style="width: 100%">
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
<el-table-column label="提案编号" prop="code"></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="sessionName"></el-table-column>
<el-table-column label="代表团" prop="delegationName"></el-table-column>
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template slot-scope="{row}">
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'caseFilingResult'" scope="{row}">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="row.caseFilingResult"></dict-tag>
</template>
<template v-else-if="column.prop === 'merge'" scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
</template>
<template v-else-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
@@ -91,6 +100,15 @@ layout("/layouts/platform.html"){
},
data() {
return {
tableColumns: [
{label: "提案编号", prop: "code"},
{label: "提案名称", prop: "name"},
{label: "提案类别", prop: "typeName"},
{label: "届次", prop: "sessionName"},
{label: "代表团", prop: "delegationName"},
{label: "当前节点", prop: "curTaskName"},
{label: "流程状态", prop: "instanceState"}
],
pageForm: {
approval: false
},
@@ -56,6 +56,11 @@ layout("/layouts/platform.html"){
<el-table-column label="提案类别" prop="typeName"></el-table-column>
<el-table-column label="届次" prop="sessionName"></el-table-column>
<el-table-column label="代表团" prop="delegationName"></el-table-column>
<el-table-column label="是否并案" prop="merge">
<template slot-scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
</template>
</el-table-column>
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template slot-scope="{row}">
@@ -96,13 +101,13 @@ layout("/layouts/platform.html"){
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
<template v-if="['SATISFIED','FAIRLY_SATISFIED'].includes(formData.tf_feedback)">
<el-form-item label="通讯地址" prop="tf_address">
<el-form-item label="通讯地址" prop="tf_address" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input v-model="formData.tf_address" placeholder="请输入通讯地址" clearable></el-input>
</el-form-item>
<el-form-item label="联系电话" prop="tf_phone">
<el-form-item label="联系电话" prop="tf_phone" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input v-model="formData.tf_phone" placeholder="请输入联系电话" clearable></el-input>
</el-form-item>
<el-form-item label="邮政编码" prop="tf_postcode">
<el-form-item label="邮政编码" prop="tf_postcode" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input v-model="formData.tf_postcode" placeholder="请输入邮政编码" clearable></el-input>
</el-form-item>
</template>
@@ -22,18 +22,27 @@ layout("/layouts/platform.html"){
</search>
</el-card>
<el-card shadow="never">
<table-tool></table-tool>
<table-tool :columns.sync="tableColumns"></table-tool>
<el-table :data="tableData" @sort-change="pageOrder" header-align="center" style="width: 100%" row-key="id">
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
<el-table-column label="提案编号" prop="code"></el-table-column>
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="提案人" prop="createUserName"></el-table-column>
<el-table-column label="提案类别" prop="typeName"></el-table-column>
<el-table-column label="届次" prop="sessionName"></el-table-column>
<el-table-column label="代表团" prop="delegationName"></el-table-column>
<el-table-column prop="taskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template slot-scope="{row}">
<el-table-column label="序号" width="50" type="index" :index="indexMethod" fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'caseFilingResult'" scope="{row}">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="row.caseFilingResult"></dict-tag>
</template>
<template v-else-if="column.prop === 'merge'" scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
</template>
<template v-else-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
@@ -89,7 +98,17 @@ layout("/layouts/platform.html"){
data() {
return {
sessionOptions: [],
businessNo: null
businessNo: null,
tableColumns: [
{label: "提案编号", prop: "code"},
{label: "提案名称", prop: "name"},
{label: "提案人", prop: "createUserName"},
{label: "提案类别", prop: "typeName"},
{label: "届次", prop: "sessionName"},
{label: "代表团", prop: "delegationName"},
{label: "当前节点", prop: "curTaskName"},
{label: "流程状态", prop: "instanceState"}
]
}
},
methods: {
@@ -56,6 +56,11 @@ layout("/layouts/platform.html"){
<el-table-column label="提案类别" prop="typeName"></el-table-column>
<el-table-column label="届次" prop="sessionName"></el-table-column>
<el-table-column label="代表团" prop="delegationName"></el-table-column>
<el-table-column label="是否并案" prop="merge">
<template slot-scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
</template>
</el-table-column>
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template slot-scope="{row}">
@@ -136,32 +141,37 @@ layout("/layouts/platform.html"){
processTaskId: row.taskId,
taskKey: row.taskKey,
taskName: row.taskName,
proposalId: row.id
}
this.$refs.proposalInfoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const formData = {
...this.formData,
tf_approval: val
}
delete formData.taskKey
delete formData.taskName
this.$refs.formRef.validate(valid => {
if (!valid) return
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify(formData)
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const formData = {
...this.formData,
tf_approval: val
}
delete formData.taskKey
delete formData.taskName
this.$axios.post("/platform/proposal/schoolLeaderApproval/executeTask", {
data: JSON.stringify(formData)
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
})
})
},
@@ -195,7 +205,6 @@ layout("/layouts/platform.html"){
if (this.sessionOptions) {
this.$set(this.pageForm, "sessionId", this.sessionOptions[0].id)
this.pageData()
this.listDelegation()
}
}
})
@@ -21,23 +21,32 @@ layout("/layouts/platform.html"){
</el-card>
<el-card shadow="never">
<table-tool>
<table-tool :columns.sync="tableColumns">
<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" style="width: 100%">
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
<el-table-column label="提案编号" prop="code"></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="createUserName"></el-table-column>
<el-table-column label="代表团" prop="delegationName"></el-table-column>
<el-table-column label="附议人" prop="taskActorName"></el-table-column>
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template slot-scope="{row}">
<el-table-column label="序号" width="50" type="index" :index="indexMethod" fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'caseFilingResult'" scope="{row}">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="row.caseFilingResult"></dict-tag>
</template>
<template v-else-if="column.prop === 'merge'" scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
</template>
<template v-else-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
@@ -91,6 +100,16 @@ layout("/layouts/platform.html"){
},
data() {
return {
tableColumns: [
{label: "提案编号", prop: "code"},
{label: "提案名称", prop: "name"},
{label: "提案人", prop: "createUserName"},
{label: "提案类别", prop: "typeName"},
{label: "代表团", prop: "delegationName"},
{label: "附议人", prop: "taskActorName"},
{label: "当前节点", prop: "curTaskName"},
{label: "流程状态", prop: "instanceState"}
],
pageForm: {
approval: false
},
@@ -93,46 +93,45 @@ layout("/layouts/platform.html"){
</el-card>
<el-card shadow="never">
<table-tool>
<table-tool :columns.sync="tableColumns">
<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" style="width: 100%">
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
<el-table-column label="提案编号" prop="code"></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="delegationName"></el-table-column>
<el-table-column label="立案结果" prop="caseFilingResult">
<template scope="{row}">
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'caseFilingResult'" scope="{row}">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="row.caseFilingResult"></dict-tag>
</template>
</el-table-column>
<el-table-column label="当前节点" prop="curTaskName"></el-table-column>
<el-table-column label="承办单位" prop="underTakeName"></el-table-column>
<el-table-column label="承办类型" prop="underTakeIsMaster">
<template scope="{row}">
<template v-else-if="column.prop === 'merge'" scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
</template>
<template v-else-if="column.prop === 'underTakeIsMaster'" scope="{row}">
<el-tag v-if="row.underTakeIsMaster" size="small">主办</el-tag>
<el-tag v-else type="warning" size="small">协办</el-tag>
</template>
</el-table-column>
<el-table-column label="流程状态" prop="instanceState">
<template slot-scope="{row}">
<template v-else-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="转交" prop="transfer"
v-if="pageForm.approval && $auth.hasRoleOr('SYSADMIN,PROPOSAL_UNIT_LEADER')">
<template slot-scope="{row}">
{{row.transferUserName}}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" min-width="250px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
@@ -247,6 +246,18 @@ layout("/layouts/platform.html"){
},
data() {
return {
tableColumns: [
{label: "提案编号", prop: "code"},
{label: "提案名称", prop: "name"},
{label: "提案类别", prop: "typeName"},
{label: "代表团", prop: "delegationName"},
{label: "立案结果", prop: "caseFilingResult"},
{label: "是否并案", prop: "merge"},
{label: "承办单位", prop: "underTakeName"},
{label: "承办类型", prop: "underTakeIsMaster"},
{label: "当前节点", prop: "curTaskName"},
{label: "流程状态", prop: "instanceState"}
],
pageForm: {
approval: false
},
@@ -279,6 +290,7 @@ layout("/layouts/platform.html"){
processTaskId: row.taskId,
taskKey: row.taskKey,
taskName: row.taskName,
proposalId: row.id,
underTakeName: row.underTakeName,
underTakeIsMaster: row.underTakeIsMaster
}
@@ -287,29 +299,32 @@ layout("/layouts/platform.html"){
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading('提交中')
this.$refs.formRef.validate(valid => {
if (!valid) return
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading('提交中')
delete this.formData.underTakeIsMaster
delete this.formData.underTakeName
delete this.formData.underTakeIsMaster
delete this.formData.underTakeName
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
this.$axios.post("/platform/proposal/unitReply/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
@@ -21,22 +21,31 @@ layout("/layouts/platform.html"){
</el-card>
<el-card shadow="never">
<table-tool>
<!-- <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 :columns.sync="tableColumns">
<!-- <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" style="width: 100%">
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
<el-table-column label="提案编号" prop="code"></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="sessionName"></el-table-column>
<el-table-column label="代表团" prop="delegationName"></el-table-column>
<el-table-column prop="taskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template slot-scope="{row}">
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'caseFilingResult'" scope="{row}">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="row.caseFilingResult"></dict-tag>
</template>
<template v-else-if="column.prop === 'merge'" scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
</template>
<template v-else-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
@@ -68,6 +77,15 @@ layout("/layouts/platform.html"){
},
data() {
return {
tableColumns: [
{label: "提案编号", prop: "code"},
{label: "提案名称", prop: "name"},
{label: "提案类别", prop: "typeName"},
{label: "届次", prop: "sessionName"},
{label: "代表团", prop: "delegationName"},
{label: "当前节点", prop: "curTaskName"},
{label: "流程状态", prop: "instanceState"}
],
pageForm: {
approval: false
},