Compare commits

...
10 Commits
Author SHA1 Message Date
c-zhouhf1 a12ef31f26 commit 2026-05-29 16:18:11 +08:00
c-zhouhf1 e2bcdc31bd commit 2026-05-21 14:44:15 +08:00
c-zhouhf1 1b423919c0 commit 2026-04-24 15:51:48 +08:00
c-zhouhf1 d5f4243277 commit 2026-03-18 09:15:58 +08:00
c-zhouhf1 6b75ad3ac1 commit 2026-03-03 16:35:49 +08:00
c-zhouhf1 f49729c938 commit 2026-02-24 10:43:02 +08:00
c-zhouhf1 592a399d61 commit 2026-02-24 10:42:22 +08:00
c-zhouhf1 98265fd7af commit 2026-02-09 14:14:58 +08:00
c-zhouhf1 54d5c69892 commit 2026-01-30 10:48:06 +08:00
c-zhouhf1 8bcf6e500e commit 2025-12-29 14:51:22 +08:00
41 changed files with 485 additions and 266 deletions
@@ -1,6 +1,7 @@
package com.budwk.app.base.event.role; package com.budwk.app.base.event.role;
import org.nutz.mvc.Mvcs; import com.budwk.app.base.utils.AppIocUtil;
import org.nutz.ioc.Ioc;
/** /**
* @version 1.0 * @version 1.0
@@ -12,9 +13,10 @@ import org.nutz.mvc.Mvcs;
public class RoleEventPublisher { public class RoleEventPublisher {
public static void broadcast(RoleEventMsg event){ public static void broadcast(RoleEventMsg event){
String[] names = Mvcs.getIoc().getNamesByType(RoleEventListener.class); Ioc ioc = AppIocUtil.get();
String[] names = ioc.getNamesByType(RoleEventListener.class);
for (String name : names) { for (String name : names) {
RoleEventListener listener = Mvcs.getIoc().get(RoleEventListener.class, name); RoleEventListener listener = ioc.get(RoleEventListener.class, name);
listener.receive(event); listener.receive(event);
} }
} }
@@ -1,5 +1,6 @@
package com.budwk.app.flow.handler; package com.budwk.app.flow.handler;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.constant.RoleConstant; import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.flow.engine.AssignmentHandler; import com.budwk.app.flow.engine.AssignmentHandler;
import com.budwk.app.flow.engine.core.Execution; import com.budwk.app.flow.engine.core.Execution;
@@ -24,6 +25,10 @@ public class FlowUnitManagerHandler implements AssignmentHandler {
@Override @Override
public List<String> assign(TaskModel model, Execution execution) { public List<String> assign(TaskModel model, Execution execution) {
String unitId = SecurityUtil.getUnitId(); String unitId = SecurityUtil.getUnitId();
String argsUnitId = execution.getArgs().getStr("argsUnitId");
if (StrUtil.isNotBlank(argsUnitId)){
unitId = argsUnitId;
}
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class); SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
Sys_role role = sysRoleService.getByCode(RoleConstant.UNIT_MANAGER); Sys_role role = sysRoleService.getByCode(RoleConstant.UNIT_MANAGER);
@@ -42,7 +47,7 @@ public class FlowUnitManagerHandler implements AssignmentHandler {
@Override @Override
public String getMessage() { public String getMessage() {
return "获取当前登录用户所在单位负责人"; return "获取当前登录用户所在单位负责人(如果argsUnitId存在则查询argsUnitId单位的单位负责人)";
} }
public int getOrder() { public int getOrder() {
@@ -42,7 +42,7 @@ public class SysDataUserPullController {
@ApiOperation("分页数据") @ApiOperation("分页数据")
@Ok("json:{locked:'password|idCard|mobile'}") @Ok("json:{locked:'password|idCard|mobile'}")
public Result pageData(@Valid SysDataUserPullPageForm pageForm) { public Result pageData(@Valid SysDataUserPullPageForm pageForm) {
Sql sql = Sqls.create("select us.*,su.`name` AS unit_name from sys_user_source us left join sys_unit su ON su.id = us.unitId $condition"); Sql sql = Sqls.create("select * from sys_user_source$condition");
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
cnd.andEX(Sys_user_source::getPullTime, "=", pageForm.getPullTime()); cnd.andEX(Sys_user_source::getPullTime, "=", pageForm.getPullTime());
cnd.and(Cnd.likeEX(Sys_user_source::getUsername, pageForm.getUserName())); cnd.and(Cnd.likeEX(Sys_user_source::getUsername, pageForm.getUserName()));
@@ -57,7 +57,7 @@ public class SysDataUserPullController {
} }
cnd.desc(Sys_user_source::getPullTime); cnd.desc(Sys_user_source::getPullTime);
sql.setCondition(cnd); sql.setCondition(cnd);
Pagination pagination = sysUserPullService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), sql); Pagination pagination = sysUserPullService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination); return Result.success(pagination);
} }
@@ -263,35 +263,65 @@ public class SysHomeController {
// @CacheDefaults(cacheName = RedisConstant.PLATFORM_REDIS_WKCACHE_PREFIX + "web_news", isHash = true) // @CacheDefaults(cacheName = RedisConstant.PLATFORM_REDIS_WKCACHE_PREFIX + "web_news", isHash = true)
// @CacheResult(cacheKey = "news", ignoreNull = true, cacheLiveTime = 60 * 60 * 24) // @CacheResult(cacheKey = "news", ignoreNull = true, cacheLiveTime = 60 * 60 * 24)
public Result getNews() { public Result getNews() {
// 定义要爬取的URL
String domain = "https://gh.hgu.edu.cn"; String domain = "https://gh.hgu.edu.cn";
JSONObject root = new JSONObject();
root.set("grassroots", new ArrayList<>());
root.set("notices", new ArrayList<>());
try { try {
// 使用Jsoup连接到URL并获取页面内容 // 工会官网首页栏目结构由外部站点维护,抓取时设置超时,避免首页接口长时间阻塞。
Document doc = Jsoup.connect(domain).get(); Document doc = Jsoup.connect(domain).timeout(5000).get();
JSONObject root = new JSONObject(); root.set("grassroots", parseWebsiteNews(doc.select(".sec1 .s1-right li a"), domain, false));
List<JSONObject> newsArray = new ArrayList<>(); root.set("notices", parseWebsiteNews(doc.select(".sec2 .dt-list2 li a"), domain, true));
Elements newsItems = doc.select("table[cellspacing=3] tr");
for (Element item : newsItems) {
Element aElement = item.select("a").first();
if(aElement == null) {
continue;
}
String date = item.select(".timestyle125262").text().trim();
String title = aElement.attr("title").trim();
String url = aElement.attr("href").trim();
JSONObject node = new JSONObject();
node.set("title", title);
node.set("date", date);
node.set("url", "https://gh.hgu.edu.cn/" + url);
newsArray.add(node);
}
root.set("grassroots", newsArray);
return Result.success(root); return Result.success(root);
} catch (Exception e) { } catch (Exception e) {
log.error(e); log.error(e);
return Result.success(); return Result.success(root);
} }
} }
/**
* 解析工会官网首页新闻栏目。
*
* @param elements 官网栏目链接节点,工会动态为.sec1 .s1-right li a,通知公告为.sec2 .dt-list2 li a
* @param domain 官网域名,用于把info/xxx.htm、/__local/xxx等相对地址补全为可直接打开的绝对地址
* @param notice 是否为通知公告;通知公告日期由“年月”和“日”拆分展示,需要单独拼接
* @return List<JSONObject>,字段包括title标题、date发布日期、url详情地址,前端直接按数组轮播展示
*/
private List<JSONObject> parseWebsiteNews(Elements elements, String domain, boolean notice) {
List<JSONObject> newsArray = new ArrayList<>();
for (Element item : elements) {
String title = StrUtil.blankToDefault(item.attr("title").trim(), item.select("p,h3").first() == null ? "" : item.select("p,h3").first().text().trim());
String url = item.attr("href").trim();
if (StrUtil.isBlank(title) || StrUtil.isBlank(url)) {
continue;
}
String date;
if (notice) {
String day = item.select(".date p").text().trim();
String yearMonth = item.select(".date span").text().trim();
date = StrUtil.isBlank(yearMonth) ? day : yearMonth + "-" + day;
} else {
date = item.select("span").text().trim();
}
JSONObject node = new JSONObject();
node.set("title", title);
node.set("date", date);
node.set("url", buildWebsiteUrl(domain, url));
newsArray.add(node);
}
return newsArray;
}
private String buildWebsiteUrl(String domain, String url) {
if (StrUtil.startWithIgnoreCase(url, "http")) {
return url;
}
if (url.startsWith("/")) {
return domain + url;
}
return domain + "/" + url;
}
} }
@@ -391,11 +391,11 @@ public class SysMenuController {
@At @At
@Ok("json") @Ok("json")
@SaCheckPermission("sys.manager.menu.edit") @SaCheckPermission("sys.manager.menu.edit")
public Object sortDo(@Param("ids") String ids, HttpServletRequest req) { public Object sortDo(@Param("ids") String ids, @Param("platform") String platform, HttpServletRequest req) {
try { try {
String[] menuIds = StringUtils.split(ids, ","); String[] menuIds = StringUtils.split(ids, ",");
int i = 0; int i = 0;
sysMenuService.execute(Sqls.create("update sys_menu set location=0")); sysMenuService.execute(Sqls.create("update sys_menu set location=0 where platform = '%s'".formatted(platform)));
for (String s : menuIds) { for (String s : menuIds) {
if (!Strings.isBlank(s)) { if (!Strings.isBlank(s)) {
sysMenuService.update(org.nutz.dao.Chain.make("location", i), Cnd.where("id", "=", s)); sysMenuService.update(org.nutz.dao.Chain.make("location", i), Cnd.where("id", "=", s));
@@ -425,11 +425,11 @@ public class SysMenuController {
@SaCheckPermission("sys.manager.menu") @SaCheckPermission("sys.manager.menu")
@ApiOperation("更新首页推荐应用或服务") @ApiOperation("更新首页推荐应用或服务")
public Result updateRecommendSetting(@Param("menuIds") String[] menuIds, String platform, String type) { public Result updateRecommendSetting(@Param("menuIds") String[] menuIds, String platform, String type) {
String column = ""; String column = "";
switch (type) { switch (type) {
case "app" -> column = "isRecommendApp"; case "app" -> column = "isRecommendApp";
case "service" -> column = "isRecommendService"; case "service" -> column = "isRecommendService";
} }
sysMenuService.update(Chain.make(column, 0), Cnd.where("id", "is not", null).and("platform", "=", platform)); sysMenuService.update(Chain.make(column, 0), Cnd.where("id", "is not", null).and("platform", "=", platform));
if (ArrayUtil.isNotEmpty(menuIds)) { if (ArrayUtil.isNotEmpty(menuIds)) {
sysMenuService.update(Chain.make(column, 1), Cnd.where("id", "in", menuIds).and("platform", "=", platform)); sysMenuService.update(Chain.make(column, 1), Cnd.where("id", "in", menuIds).and("platform", "=", platform));
@@ -124,7 +124,7 @@ public class SysDataUnitPullServiceImpl extends BaseServiceImpl<Sys_unit> implem
} }
log.info("本次拉取单位数据,新增{}条,更新{}条", insertList.size(), updateList.size()); log.info("本次拉取单位数据,新增{}条,更新{}条", insertList.size(), updateList.size());
dao().insert(insertList); dao().insert(insertList);
dao().update(updateList); dao().updateIgnoreNull(updateList);
} }
@@ -202,15 +202,17 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
} else { } else {
// 修改现有用户 // 修改现有用户
u.setId(user.getId()); u.setId(user.getId());
u.setMember(null);
u.setMemberTime(null);
// 更新会员状态 // 更新会员状态
boolean currentIsMember = user.getMember() != null && user.getMember(); /* boolean currentIsMember = user.getMember() != null && user.getMember();
if (!currentIsMember) { if (!currentIsMember) {
addMemberUserIds.add(user.getId()); addMemberUserIds.add(user.getId());
} else{ } else{
removeMemberUserIds.add(user.getId()); removeMemberUserIds.add(user.getId());
} }*/
needDoUpdateList.add(u); needDoUpdateList.add(u);
} }
@@ -383,7 +385,7 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
log.info("全量更新用户数据完成,耗时: {} 毫秒", (endTime - startTime)); log.info("全量更新用户数据完成,耗时: {} 毫秒", (endTime - startTime));
return "更新完成: 新增用户 " + needInitUserList.size() + " 个, 更新用户 " + needDoUpdateList.size() return "更新完成: 新增用户 " + needInitUserList.size() + " 个, 更新用户 " + needDoUpdateList.size()
+ " 个, 待添加会员 " + addMemberUserIds.size() + " 个, 待移除会员 " + removeMemberUserIds.size() + ""; + " 个, 待添加会员 " + addMemberUserIds.size() + " 个, 待移除会员 " + removeMemberUserIds.size() + "";
} }
/** /**
@@ -469,8 +471,8 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
// 生成变更信息描述 // 生成变更信息描述
String changeInfos = changeList.stream() String changeInfos = changeList.stream()
.map(v -> v.getString("fieldName", "") + "" + .map(v -> v.getString("fieldName", "") + "" +
HtmlUtil.cleanHtmlTag(v.getString("sourceValue", "")) + "" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue", "")) + "" +
HtmlUtil.cleanHtmlTag(v.getString("newValue", ""))) HtmlUtil.cleanHtmlTag(v.getString("newValue", "")))
.collect(Collectors.joining("")); .collect(Collectors.joining(""));
// 设置历史记录信息 // 设置历史记录信息
@@ -70,7 +70,7 @@ public class SysDataUserIncrUpdateServiceImpl implements SysDataUserUpdateServic
// 检查是否符合会员条件 // 检查是否符合会员条件
// 1. 用户状态为"在岗" // 1. 用户状态为"在岗"
if ("在岗".equals(sysUser.getUserState())) { /* if ("在岗".equals(sysUser.getUserState())) {
// 2. 检查聘用方式条件 // 2. 检查聘用方式条件
List<String> membershipQualifyingPreparedBy = Arrays.asList("新人事代理", "校聘合同制", "事业编制"); List<String> membershipQualifyingPreparedBy = Arrays.asList("新人事代理", "校聘合同制", "事业编制");
@@ -94,7 +94,7 @@ public class SysDataUserIncrUpdateServiceImpl implements SysDataUserUpdateServic
} }
} else { } else {
sysUser.setMember(false); sysUser.setMember(false);
} }*/
} }
List<List<Sys_user>> splitSysUsers = ListUtil.split(sysUsers, 500); List<List<Sys_user>> splitSysUsers = ListUtil.split(sysUsers, 500);
@@ -117,7 +117,7 @@ public class SysDataUserIncrUpdateServiceImpl implements SysDataUserUpdateServic
sysRoleService.clearCache(); sysRoleService.clearCache();
//比较单位数据 //比较单位数据
List<Sys_unit> sysUnits = dao.query(Sys_unit.class, Cnd.where(Sys_unit::getUnitLevel, "=", 2)); /* List<Sys_unit> sysUnits = dao.query(Sys_unit.class, Cnd.where(Sys_unit::getUnitLevel, "=", 2));
List<String> sysUnitIds = sysUnits.stream().map(Sys_unit::getId).toList(); List<String> sysUnitIds = sysUnits.stream().map(Sys_unit::getId).toList();
//信息中心的数据 转为单位代码 ->单位名称 map //信息中心的数据 转为单位代码 ->单位名称 map
@@ -141,7 +141,7 @@ public class SysDataUserIncrUpdateServiceImpl implements SysDataUserUpdateServic
}).toList(); }).toList();
ThreadUtil.execAsync(() -> { ThreadUtil.execAsync(() -> {
dao.insert(insertUnits); dao.insert(insertUnits);
}); });*/
// 计算设置为会员的人数 // 计算设置为会员的人数
long memberCount = sysUsers.stream().filter(Sys_user::getMember).count(); long memberCount = sysUsers.stream().filter(Sys_user::getMember).count();
@@ -152,6 +152,6 @@ public class SysDataUserIncrUpdateServiceImpl implements SysDataUserUpdateServic
RoleEventPublisher.broadcast(new RoleEventMsg(unitId, RoleConstant.PROPOSAL_BRANCH_SCHOOL_LEADER.name(), RoleEventMsg.RENEW_ROLE)); RoleEventPublisher.broadcast(new RoleEventMsg(unitId, RoleConstant.PROPOSAL_BRANCH_SCHOOL_LEADER.name(), RoleEventMsg.RENEW_ROLE));
} }
return StrUtil.format("增量更新成功,本次更新新入职老师{}人,新增单位{}个,设置为会员{}人。", sysUsers.size(), insertUnits.size(), memberCount); return StrUtil.format("增量更新成功,本次更新新入职老师{}人,新增单位{}个,设置为会员{}人。", sysUsers.size(), 0, memberCount);
} }
} }
@@ -175,6 +175,7 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
// 设置单位相关信息 // 设置单位相关信息
sysUser.setUnitId(raw.getStr("szdwdm")); sysUser.setUnitId(raw.getStr("szdwdm"));
sysUser.setUnitName(raw.getStr("szksmc"));
sysUser.setPullTime(nowDate); sysUser.setPullTime(nowDate);
@@ -186,7 +187,7 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
dao().insert(latestSourceList); dao().insert(latestSourceList);
// 人员的单位数据和数据库的单位数据比较,如果人员里面有单位不存在,去更新单位数据 // 人员的单位数据和数据库的单位数据比较,如果人员里面有单位不存在,去更新单位数据
List<String> sourceUnitIds = latestSourceList.stream().map(Sys_user_source::getUnitId).distinct().toList(); /* List<String> sourceUnitIds = latestSourceList.stream().map(Sys_user_source::getUnitId).distinct().toList();
Sql sql = Sqls.create("select id from sys_unit group by id"); Sql sql = Sqls.create("select id from sys_unit group by id");
sql.setCallback(Sqls.callback.strList()); sql.setCallback(Sqls.callback.strList());
dao().execute(sql); dao().execute(sql);
@@ -195,7 +196,7 @@ public class SysDataUserPullServiceImpl extends BaseServiceImpl<Sys_user_source>
if (!new HashSet<>(unitIds).containsAll(sourceUnitIds)) { if (!new HashSet<>(unitIds).containsAll(sourceUnitIds)) {
log.info("单位需要更新,正在同步更新"); log.info("单位需要更新,正在同步更新");
sysDataUnitPullService.updateUnits(unitIds); sysDataUnitPullService.updateUnits(unitIds);
} }*/
return nowDate; return nowDate;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@@ -43,6 +43,7 @@ public class SysUserAllRenewJob implements Job {
NutMap conditionGroupMap = (NutMap)jobDataMap.get("conditionGroup"); NutMap conditionGroupMap = (NutMap)jobDataMap.get("conditionGroup");
if(conditionGroupMap == null || conditionGroupMap.isEmpty()){ if(conditionGroupMap == null || conditionGroupMap.isEmpty()){
log.error("SysUserAllRenewJob定时任务执行中止,原因:conditionGroup为null"); log.error("SysUserAllRenewJob定时任务执行中止,原因:conditionGroup为null");
return;
} }
String conditionGroupStr = Json.toJson(conditionGroupMap).replace("@currentDate", DateUtil.today()); String conditionGroupStr = Json.toJson(conditionGroupMap).replace("@currentDate", DateUtil.today());
ConditionGroup conditionGroup = null; ConditionGroup conditionGroup = null;
@@ -57,6 +58,6 @@ public class SysUserAllRenewJob implements Job {
param.setUpdateMode(SysDataUpdateMode.ALL.name()); param.setUpdateMode(SysDataUpdateMode.ALL.name());
param.setConditionGroup(conditionGroup); param.setConditionGroup(conditionGroup);
// sysDataUserUpdateService.update(param); sysDataUserUpdateService.update(param);
} }
} }
@@ -100,7 +100,9 @@ public class ActivityCultureUserStatisticsController {
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
cnd.and("atp.tissueId", "=", activityId); cnd.and("atp.tissueId", "=", activityId);
cnd.andEX("atp.unionId", "=", unionId); cnd.andEX("atp.unionId", "=", unionId);
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(),
RoleConstant.SCHOOL_UNION_ADMIN.name(),
RoleConstant.SCHOOL_UNION_ACTIVITY_ADMIN.name())) {
if (List.of(40001, 40002).contains(activity_type)) { if (List.of(40001, 40002).contains(activity_type)) {
cnd.and("atp.unionId", "=", SecurityUtil.getUnionId()); cnd.and("atp.unionId", "=", SecurityUtil.getUnionId());
} else if (activity_type == 40003) { } else if (activity_type == 40003) {
@@ -157,7 +159,9 @@ public class ActivityCultureUserStatisticsController {
Cnd cnd = Cnd.where("tissue.activity_type", "=", activity_type); Cnd cnd = Cnd.where("tissue.activity_type", "=", activity_type);
cnd.and("tissue.projectTypeCode", "!=", 50004); cnd.and("tissue.projectTypeCode", "!=", 50004);
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(),
RoleConstant.SCHOOL_UNION_ADMIN.name(),
RoleConstant.SCHOOL_UNION_ACTIVITY_ADMIN.name())) {
cnd.and("tissue.signUpMethod", "in", List.of(1, 2, 3)); cnd.and("tissue.signUpMethod", "in", List.of(1, 2, 3));
if (activity_type == 40002) { if (activity_type == 40002) {
cnd.and("tissue.unionId", "=", SecurityUtil.getUnionId()); cnd.and("tissue.unionId", "=", SecurityUtil.getUnionId());
@@ -80,7 +80,7 @@ public class ActivityCultureServiceImpl extends BaseServiceImpl<ActivityTissue>
} }
@Override @Override
public Object pageData(PageForm page, String year, String name,Double money, String unionId, String projectTypeCode, Integer activity_type) { public Object pageData(PageForm page, String year, String name, Double money, String unionId, String projectTypeCode, Integer activity_type) {
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
@@ -131,7 +131,8 @@ public class ActivityCultureServiceImpl extends BaseServiceImpl<ActivityTissue>
SqlExpressionGroup group = new SqlExpressionGroup(); SqlExpressionGroup group = new SqlExpressionGroup();
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(),
RoleConstant.SCHOOL_UNION_ADMIN.name())) { RoleConstant.SCHOOL_UNION_ADMIN.name(),
RoleConstant.SCHOOL_UNION_ACTIVITY_ADMIN.name())) {
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) { if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
group.or("tissue.unionId", "=", SecurityUtil.getUnionId()); group.or("tissue.unionId", "=", SecurityUtil.getUnionId());
} else if (AuthUtil.hasRole(RoleConstant.CLUB_PRESIDENT.name())) { } else if (AuthUtil.hasRole(RoleConstant.CLUB_PRESIDENT.name())) {
@@ -140,7 +140,7 @@ public class ExecutiveCommitteePushController {
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class, ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
Cnd.where("teacherMeetId", "=", teacherMeetId)); Cnd.where("teacherMeetId", "=", teacherMeetId));
/* if (ObjectUtil.isEmpty(config)) { if (ObjectUtil.isEmpty(config)) {
return Result.error("请先配置基础信息"); return Result.error("请先配置基础信息");
} }
if (config.getFirstStartTime().getTime() > System.currentTimeMillis()) { if (config.getFirstStartTime().getTime() > System.currentTimeMillis()) {
@@ -148,7 +148,7 @@ public class ExecutiveCommitteePushController {
} }
if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) { if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) {
return Result.error("一次预选已结束"); return Result.error("一次预选已结束");
}*/ }
int dbCount = dao.count(ExecutiveCommitteeOnePush.class, int dbCount = dao.count(ExecutiveCommitteeOnePush.class,
Cnd.where("teacherMeetId", "=", teacherMeetId) Cnd.where("teacherMeetId", "=", teacherMeetId)
@@ -1,6 +1,7 @@
package com.budwk.app.zhgh.democratic.grassrootscongress.controller.material; package com.budwk.app.zhgh.democratic.grassrootscongress.controller.material;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.constant.RoleConstant; import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.page.Pagination; import com.budwk.app.base.page.Pagination;
@@ -76,7 +77,8 @@ public class GrassrootsCongressMaterialApprovalController {
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
cnd.and("t.taskName", "=", "zlsh"); cnd.and("t.taskName", "=", "zlsh");
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())){ if (!StpUtil.hasRole(RoleConstant.SYSADMIN.name()) &&
!StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name())) {
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
} }
@@ -1,6 +1,7 @@
package com.budwk.app.zhgh.democratic.grassrootscongress.controller.meeting; package com.budwk.app.zhgh.democratic.grassrootscongress.controller.meeting;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.constant.RoleConstant; import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.page.Pagination; import com.budwk.app.base.page.Pagination;
@@ -76,7 +77,8 @@ public class GrassrootsCongressMeetingApprovalController {
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
cnd.and("t.taskName", "=", "8384aafd-3cdb-49ab-a11f-c5d145b1672c"); cnd.and("t.taskName", "=", "8384aafd-3cdb-49ab-a11f-c5d145b1672c");
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())){ if (!StpUtil.hasRole(RoleConstant.SYSADMIN.name()) &&
!StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name())) {
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
} }
@@ -66,6 +66,7 @@ public class ProposalSecondedController {
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
SELECT SELECT
us.unionName, us.unionName,
us.unitId,
info.*, info.*,
type.name AS typeName, type.name AS typeName,
tcs.fullName AS sessionName, tcs.fullName AS sessionName,
@@ -60,7 +60,7 @@ public class ProposalMasterUnitAssignmentHandler implements AssignmentHandler {
} }
// 获取负责人 // 获取负责人
Sys_role sysRole = sysRoleService.getByCode(RoleConstant.PROPOSAL_UNIT_LEADER); Sys_role sysRole = sysRoleService.getByCode(RoleConstant.UNIT_MANAGER);
List<Sys_user_role> sysUserRoles = dao.query(Sys_user_role.class, Cnd.where(Sys_user_role::getRoleId, "=", sysRole.getId()).and(Sys_user_role::getUnderTakeId, "=", undertake.getId())); List<Sys_user_role> sysUserRoles = dao.query(Sys_user_role.class, Cnd.where(Sys_user_role::getRoleId, "=", sysRole.getId()).and(Sys_user_role::getUnderTakeId, "=", undertake.getId()));
List<String> selectUserIds = sysUserRoles.stream().map(Sys_user_role::getUserId).toList(); List<String> selectUserIds = sysUserRoles.stream().map(Sys_user_role::getUserId).toList();
@@ -177,6 +177,7 @@ public class ProposalCommonServiceImpl extends BaseServiceImpl<ProposalInfo> imp
info.code, info.code,
info.brief, info.brief,
info.measures, info.measures,
info.researchFindings,
info.createUserName, info.createUserName,
DATE_FORMAT(info.createTime, '%Y年%m月%d日') AS createTime, DATE_FORMAT(info.createTime, '%Y年%m月%d日') AS createTime,
info.unitName, info.unitName,
@@ -199,6 +200,8 @@ public class ProposalCommonServiceImpl extends BaseServiceImpl<ProposalInfo> imp
//处理下富文本 //处理下富文本
String brief = docData.getString("brief"); String brief = docData.getString("brief");
String measures = docData.getString("measures"); String measures = docData.getString("measures");
String researchFindings = docData.getString("researchFindings");
docData.put("researchFindings", sysOfficeTemplateUtil.convertRichTextToDocText(researchFindings));
docData.put("brief", sysOfficeTemplateUtil.convertRichTextToDocText(brief)); docData.put("brief", sysOfficeTemplateUtil.convertRichTextToDocText(brief));
docData.put("measures", sysOfficeTemplateUtil.convertRichTextToDocText(measures)); docData.put("measures", sysOfficeTemplateUtil.convertRichTextToDocText(measures));
@@ -218,8 +221,27 @@ public class ProposalCommonServiceImpl extends BaseServiceImpl<ProposalInfo> imp
// 按任务节点分组 // 按任务节点分组
Map<String, List<ProcessTaskVO>> taskGroups = doneTaskVos.stream().collect(Collectors.groupingBy(ProcessTaskVO::getDisplayName)); Map<String, List<ProcessTaskVO>> taskGroups = doneTaskVos.stream().collect(Collectors.groupingBy(ProcessTaskVO::getDisplayName));
docData.putAll(taskGroups);
Optional<List<ProcessTaskVO>> optionalList = taskGroups.entrySet().stream()
.filter(entry -> entry.getKey().contains("党委书记审核"))
.map(Map.Entry::getValue)
.findFirst();
if (optionalList.isPresent()) {
List<ProcessTaskVO> tasks = optionalList.get();
docData.put("auditName","党委书记审核");
taskGroups.put("auditInfo",tasks);
}else{
Optional<List<ProcessTaskVO>> optionalList2 = taskGroups.entrySet().stream()
.filter(entry -> entry.getKey().contains("单位负责人审核"))
.map(Map.Entry::getValue)
.findFirst();
List<ProcessTaskVO> tasks = optionalList2.get();
docData.put("auditName","单位负责人审核");
taskGroups.put("auditInfo",tasks);
}
docData.putAll(taskGroups);
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy(); LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy(); HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
htmlRenderPolicy.getConfig().setShowDefaultTableBorderInTableCell(true); htmlRenderPolicy.getConfig().setShowDefaultTableBorderInTableCell(true);
@@ -227,6 +249,7 @@ public class ProposalCommonServiceImpl extends BaseServiceImpl<ProposalInfo> imp
Configure config = Configure.builder() Configure config = Configure.builder()
.bind("seconders", policy) .bind("seconders", policy)
.bind("提案附议", policy) .bind("提案附议", policy)
.bind("researchFindings", htmlRenderPolicy)
.bind("brief", htmlRenderPolicy) .bind("brief", htmlRenderPolicy)
.bind("measures", htmlRenderPolicy) .bind("measures", htmlRenderPolicy)
.bind("taskFormData.tf_opinion", htmlRenderPolicy) .bind("taskFormData.tf_opinion", htmlRenderPolicy)
@@ -41,10 +41,7 @@ import org.nutz.lang.util.NutMap;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
@@ -193,8 +190,18 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
// 添加序号,去除富文本,获取附议人 // 添加序号,去除富文本,获取附议人
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
list.get(i).put("index", i + 1); list.get(i).put("index", i + 1);
list.get(i).put("brief", HtmlUtil.cleanHtmlTag(list.get(i).getString("brief"))); if (StrUtil.isNotBlank(list.get(i).getString("researchFindings"))) {
list.get(i).put("measures", HtmlUtil.cleanHtmlTag(list.get(i).getString("measures"))); list.get(i).put("researchFindings",
HtmlUtil.unescape(HtmlUtil.cleanHtmlTag(list.get(i).getString("researchFindings")))
.replaceAll("\\s+", " ")
.trim());
}
list.get(i).put("brief", HtmlUtil.unescape(HtmlUtil.cleanHtmlTag(list.get(i).getString("brief")))
.replaceAll("\\s+", " ")
.trim());
list.get(i).put("measures", HtmlUtil.unescape(HtmlUtil.cleanHtmlTag(list.get(i).getString("measures")))
.replaceAll("\\s+", " ")
.trim());
list.get(i).put("suggestUnits", list.get(i).getString("suggestUnits").replace("[", "").replace("]", "")); list.get(i).put("suggestUnits", list.get(i).getString("suggestUnits").replace("[", "").replace("]", ""));
@@ -211,11 +218,16 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
if (inviteTask != null) { if (inviteTask != null) {
NutMap variable = Json.fromJson(NutMap.class, inviteTask.getVariable()); NutMap variable = Json.fromJson(NutMap.class, inviteTask.getVariable());
List<NutMap> seconders = variable.getAsList(FlowConst.TASK_FORM_DATA_PREFIX + "seconder", NutMap.class); if (StrUtil.isNotBlank(variable.getString("variable"))) {
list.get(i).put("secondedUserNames", seconders.stream().map(v -> v.getString("userName")).collect(Collectors.joining(","))); 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<Map<String, Object>> safeList = list.stream().map(nutMap -> {
Map<String, Object> map = new HashMap<>(nutMap);
return map;
}).collect(Collectors.toList());
List<ExcelExportEntity> exportEntities = new ArrayList<>(); List<ExcelExportEntity> exportEntities = new ArrayList<>();
exportEntities.add(new ExcelExportEntity("序号", "index", 10)); exportEntities.add(new ExcelExportEntity("序号", "index", 10));
exportEntities.add(new ExcelExportEntity("提案编号", "code", 20)); exportEntities.add(new ExcelExportEntity("提案编号", "code", 20));
@@ -235,7 +247,7 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
ExportParams exportParams = new ExportParams(); ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF); exportParams.setType(ExcelType.XSSF);
exportParams.setTitle(title); exportParams.setTitle(title);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list); Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, safeList);
CommonDownloadUtil.download(title + ".xlsx", workbook, response); CommonDownloadUtil.download(title + ".xlsx", workbook, response);
} }
@@ -250,7 +262,7 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
List<NutMap> list = listMap(sql); List<NutMap> list = listMap(sql);
for (NutMap row : list) { for (NutMap row : list) {
String content = HtmlUtil.cleanHtmlTag(StrUtil.blankToDefault(row.getString("masterUnderTakeReply"), "")); String content = HtmlUtil.removeHtmlTag(StrUtil.blankToDefault(row.getString("masterUnderTakeReply"), ""));
row.put("masterUnderTakeReply", content); row.put("masterUnderTakeReply", content);
} }
@@ -421,6 +433,7 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
NutMap info = (NutMap) sql.getResult(); NutMap info = (NutMap) sql.getResult();
// 处理富文本内容 // 处理富文本内容
info.put("researchFindings", sysOfficeTemplateUtil.convertRichTextToDocText(info.getString("researchFindings")));
info.put("brief", sysOfficeTemplateUtil.convertRichTextToDocText(info.getString("brief"))); info.put("brief", sysOfficeTemplateUtil.convertRichTextToDocText(info.getString("brief")));
info.put("measures", sysOfficeTemplateUtil.convertRichTextToDocText(info.getString("measures"))); info.put("measures", sysOfficeTemplateUtil.convertRichTextToDocText(info.getString("measures")));
@@ -478,6 +491,7 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
.bind("seconders", policy) .bind("seconders", policy)
.bind("brief", htmlRenderPolicy) .bind("brief", htmlRenderPolicy)
.bind("measures", htmlRenderPolicy) .bind("measures", htmlRenderPolicy)
.bind("researchFindings", htmlRenderPolicy)
.build(); .build();
try { try {
@@ -541,6 +555,7 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
info.name, info.name,
info.code, info.code,
info.researchFindings, info.researchFindings,
info.suggestUnits,
info.brief, info.brief,
info.measures, info.measures,
info.createUserName, info.createUserName,
@@ -573,8 +588,18 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
// 添加序号,去除富文本,获取附议人 // 添加序号,去除富文本,获取附议人
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
list.get(i).put("index", i + 1); list.get(i).put("index", i + 1);
list.get(i).put("brief", HtmlUtil.cleanHtmlTag(list.get(i).getString("brief"))); if (StrUtil.isNotBlank(list.get(i).getString("researchFindings"))) {
list.get(i).put("measures", HtmlUtil.cleanHtmlTag(list.get(i).getString("measures"))); list.get(i).put("researchFindings", HtmlUtil.unescape(HtmlUtil.cleanHtmlTag(list.get(i).getString("researchFindings")))
.replaceAll("\\s+", " ")
.trim());
}
list.get(i).put("brief", HtmlUtil.unescape(HtmlUtil.cleanHtmlTag(list.get(i).getString("brief")))
.replaceAll("\\s+", " ")
.trim());
list.get(i).put("measures", HtmlUtil.unescape(HtmlUtil.cleanHtmlTag(list.get(i).getString("measures")))
.replaceAll("\\s+", " ")
.trim());
list.get(i).put("suggestUnits", list.get(i).getString("suggestUnits").replace("[", "").replace("]", ""));
// 流程实例 // 流程实例
// ProcessInstance instance = dao().fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", list.get(i).getString("id"))); // ProcessInstance instance = dao().fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", list.get(i).getString("id")));
@@ -610,6 +635,11 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
row.put("instanceState", processInstanceStateMap.get(row.getString("instanceState"))); row.put("instanceState", processInstanceStateMap.get(row.getString("instanceState")));
} }
List<Map<String, Object>> safeList = list.stream().map(nutMap -> {
Map<String, Object> map = new HashMap<>(nutMap);
return map;
}).collect(Collectors.toList());
List<ExcelExportEntity> exportEntities = new ArrayList<>(); List<ExcelExportEntity> exportEntities = new ArrayList<>();
for (ExportTableColumns column : tableColumns) { for (ExportTableColumns column : tableColumns) {
@@ -622,7 +652,7 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
ExportParams exportParams = new ExportParams(); ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF); exportParams.setType(ExcelType.XSSF);
exportParams.setTitle(title); exportParams.setTitle(title);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list); Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, safeList);
CommonDownloadUtil.download(title + ".xlsx", workbook, response); CommonDownloadUtil.download(title + ".xlsx", workbook, response);
} }
} }
@@ -33,6 +33,7 @@ import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.aop.Aop; import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import org.nutz.lang.util.NutMap; import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok; import org.nutz.mvc.annotation.Ok;
@@ -40,6 +41,7 @@ import org.nutz.mvc.annotation.POST;
import org.nutz.mvc.annotation.Param; import org.nutz.mvc.annotation.Param;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
@@ -285,6 +287,9 @@ public class TeacherCongressDelegationController {
} }
if (type.equals("TEACHER_CONGRESS_VICE_DELEGATION_HEAD")){ if (type.equals("TEACHER_CONGRESS_VICE_DELEGATION_HEAD")){
List<Record> recordList = dao.query("sys_user_role", Cnd.where("tcSessionId", "=", sessionId).and("tcDelegationId", "=", delegationId).and("roleId", "=", role.getId())); List<Record> recordList = dao.query("sys_user_role", Cnd.where("tcSessionId", "=", sessionId).and("tcDelegationId", "=", delegationId).and("roleId", "=", role.getId()));
if (Lang.isEmpty(recordList)) {
return Result.success(new ArrayList<>());
}
List<String> userIdList = recordList.stream().map(record -> record.getString("userId")).toList(); List<String> userIdList = recordList.stream().map(record -> record.getString("userId")).toList();
String userIds = userIdList.stream() String userIds = userIdList.stream()
.map(s -> "'" + s + "'") // 给每个元素加上单引号 .map(s -> "'" + s + "'") // 给每个元素加上单引号
@@ -307,7 +312,9 @@ public class TeacherCongressDelegationController {
}else{ }else{
Record record = dao.fetch("sys_user_role", Cnd.where("tcSessionId", "=", sessionId).and("tcDelegationId", "=", delegationId).and("roleId", "=", role.getId())); Record record = dao.fetch("sys_user_role", Cnd.where("tcSessionId", "=", sessionId).and("tcDelegationId", "=", delegationId).and("roleId", "=", role.getId()));
String userId = Optional.ofNullable(record).map(r -> r.getString("userId")).orElse(null); String userId = Optional.ofNullable(record).map(r -> r.getString("userId")).orElse(null);
if (Lang.isEmpty(userId)) {
return Result.success(new NutMap());
}
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
SELECT SELECT
u.id as userId, u.id as userId,
@@ -338,7 +345,7 @@ public class TeacherCongressDelegationController {
* @param delegationId 代表团ID * @param delegationId 代表团ID
* @param sessionId 届次ID * @param sessionId 届次ID
* @param userId 团长id * @param userId 团长id
* @param viceUserId 副团长id * @param viceUserIds 副团长id
* @param contactUserId 联络人 * @param contactUserId 联络人
* @return * @return
*/ */
@@ -167,6 +167,7 @@ public class MaternityLeaveFamilyPlanningOfficeAuditController {
maternityLeaveService.update(maternityLeave); maternityLeaveService.update(maternityLeave);
args.put("argsUnitId",maternityLeave.getUnitId());
flowCommonService.executeTask(args); flowCommonService.executeTask(args);
return Result.success(); return Result.success();
@@ -1,5 +1,6 @@
package com.budwk.app.zhgh.staffbenefit.maternityLeave.models; package com.budwk.app.zhgh.staffbenefit.maternityLeave.models;
import cn.hutool.json.JSONObject;
import com.budwk.app.base.model.BaseModel; import com.budwk.app.base.model.BaseModel;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@@ -8,6 +9,7 @@ import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* @author : hongqiwei * @author : hongqiwei
@@ -188,6 +190,11 @@ public class MaternityLeave extends BaseModel implements Serializable {
@Comment("是否多胞胎") @Comment("是否多胞胎")
private Boolean isMultipleBirths; private Boolean isMultipleBirths;
@Column
@Comment("附件")
@ColDefine(type = ColType.MYSQL_JSON)
private List<JSONObject> files;
} }
File diff suppressed because one or more lines are too long
@@ -1965,7 +1965,7 @@ layout("/layouts/v4/baseLayout.html"){
<div class="oa-notice-header-icon"> <div class="oa-notice-header-icon">
<i class="fa fa-users"></i> <i class="fa fa-users"></i>
</div> </div>
<h2 class="oa-notice-header-title">基层动态</h2> <h2 class="oa-notice-header-title">工会动态</h2>
</div> </div>
</div> </div>
<div class="oa-grassroots-content"> <div class="oa-grassroots-content">
@@ -1988,8 +1988,8 @@ layout("/layouts/v4/baseLayout.html"){
<div class="oa-empty-state-icon"> <div class="oa-empty-state-icon">
<i class="fa fa-users"></i> <i class="fa fa-users"></i>
</div> </div>
<div class="oa-empty-state-title">暂无基层动态</div> <div class="oa-empty-state-title">暂无工会动态</div>
<div class="oa-empty-state-desc">当前没有可用的基层动态内容</div> <div class="oa-empty-state-desc">当前没有可用的工会动态内容</div>
</div> </div>
</div> </div>
</div> </div>
@@ -86,7 +86,7 @@ layout("/layouts/v4/baseLayout.html"){
</div> </div>
<jcdt :list="websiteNews.grassroots"></jcdt> <jcdt :grassroots="websiteNews.grassroots" :notices="websiteNews.notices"></jcdt>
</div> </div>
</div> </div>
@@ -105,6 +105,7 @@ layout("/layouts/v4/baseLayout.html"){
return{ return{
websiteNews:{ websiteNews:{
grassroots:[], grassroots:[],
notices:[],
} }
} }
}, },
@@ -122,7 +123,11 @@ layout("/layouts/v4/baseLayout.html"){
getWebSiteNews(){ getWebSiteNews(){
this.$axios.post('/platform/home/getNews').then(res => { this.$axios.post('/platform/home/getNews').then(res => {
if (res.code === 0) { if (res.code === 0) {
this.websiteNews = res.data const data = res.data || {}
this.websiteNews = {
grassroots: data.grassroots || [],
notices: data.notices || [],
}
} }
}) })
} }
+107 -61
View File
@@ -2,28 +2,27 @@ const jcdt = {
template: /*language=HTML*/ ` template: /*language=HTML*/ `
<div class="jcdt-wrapper"> <div class="jcdt-wrapper">
<div class="jcdt-container"> <div class="jcdt-container">
<div class="jcdt-title"> <el-carousel class="jcdt-carousel" height="340px" :interval="10000" indicator-position="none" arrow="always">
<span>基层动态</span> <el-carousel-item v-for="section in sections" :key="section.key">
</div> <div class="jcdt-title">
<div class="jcdt-content"> <span>{{section.title}}</span>
<div class="jcdt-list">
<div class="jcdt-item" v-for="item in list" :key="item.title" @click="onLink(item)">
<div class="date" v-if="item.date">{{item.date}}</div>
<div style="display: flex; align-items: center">
<div >
<el-image style="width: 30px" src="/assets/platform/img/v4/xw.png" alt="流程中心"></el-image>
</div>
<div class="title">{{item.title}}</div>
</div>
<!--<div class="image">
<img v-if="item.image" :src="item.image" alt="">
<img v-else src="/assets/platform/img/v4/not-image.png" alt="">
</div>-->
<!-- <div class="summary">{{item.summary}}</div>-->
</div> </div>
</div> <div class="jcdt-content">
</div> <div v-if="section.list.length > 0" class="jcdt-list">
<div class="jcdt-item" v-for="item in section.list" :key="item.url || item.title" @click="onLink(item)">
<div class="date" v-if="item.date">
<i class="el-icon-alarm-clock"></i>
<span>{{item.date}}</span>
</div>
<div class="jcdt-item-main">
<div class="title">{{item.title}}</div>
</div>
</div>
</div>
<div v-else class="jcdt-empty">暂无{{section.title}}</div>
</div>
</el-carousel-item>
</el-carousel>
</div> </div>
</div> </div>
`, `,
@@ -31,9 +30,29 @@ const jcdt = {
return {} return {}
}, },
props: { props: {
list: { grassroots: {
type: Array, type: Array,
default: [] default: () => []
},
notices: {
type: Array,
default: () => []
}
},
computed: {
sections() {
return [
{
key: "grassroots",
title: "工会要闻",
list: (this.grassroots || []).slice(0, 8)
},
{
key: "notices",
title: "通知公告",
list: (this.notices || []).slice(0, 8)
}
]
} }
}, },
methods: { methods: {
@@ -54,94 +73,112 @@ const jcdt = {
width: 80%; width: 80%;
max-width: 80%; max-width: 80%;
margin: 0 auto; margin: 0 auto;
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 12px; border-radius: 12px;
padding: 20px; padding: 42px 20px 40px;
margin-bottom: 10px; margin-bottom: 10px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
} }
.jcdt-title{ .jcdt-carousel {
width: 100%;
}
/deep/ .jcdt-carousel .el-carousel__container {
height: 340px;
}
/deep/ .jcdt-carousel .el-carousel__item {
overflow: visible;
}
/deep/ .jcdt-title{
font-size: 30px; font-size: 30px;
color: #000000; color: #000000;
display: block; display: block;
font-weight: bold; font-weight: bold;
position: relative; position: relative;
text-align: center; text-align: center;
padding: 20px 0; padding: 0 0 24px;
} }
/deep/ .jcdt-container .jcdt-title span::before { /deep/ .jcdt-container .jcdt-title span::before {
content: ''; content: '';
width: 24px;
height: 11px;
background: url(https://www.ncu.edu.cn/images/titl.svg) no-repeat center;
background-size: 24px 11px;
display: inline-block; display: inline-block;
margin-right: 0; margin-right: 8px;
vertical-align: middle; vertical-align: middle;
color: #e60012;
font-size: 16px;
font-weight: 400;
} }
/deep/ .jcdt-container .jcdt-title span::after { /deep/ .jcdt-container .jcdt-title span::after {
content: ''; content: '';
width: 24px;
height: 11px;
background: url(https://www.ncu.edu.cn/images/titr.svg) no-repeat center;
background-size: 24px 11px;
display: inline-block; display: inline-block;
margin-left: 0; margin-left: 8px;
vertical-align: middle; vertical-align: middle;
color: #e60012;
font-size: 16px;
font-weight: 400;
} }
.jcdt-list { /deep/ .jcdt-list {
display: grid; display: grid;
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 20px; gap: 20px;
} }
.jcdt-item { /deep/ .jcdt-item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 16px; padding: 16px;
border: none; border: none;
border-bottom: 3px solid transparent; border-bottom: 3px solid #c11623;
transition: all 0.3s ease; transition: all 0.3s ease;
cursor: pointer; cursor: pointer;
height: auto;
border-radius: 12px; border-radius: 12px;
} min-height: 84px;
.jcdt-item:hover{
background: #ffffff; background: #ffffff;
border-bottom-color: var(--color-primary); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
transform: translateY(-4px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
} }
.jcdt-item .date { /deep/ .jcdt-item-main {
display: flex;
align-items: center;
}
/deep/ .jcdt-item:hover{
background: #ffffff;
transform: translateY(-4px);
box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}
/deep/ .jcdt-item .date {
font-size: 20px; font-size: 20px;
/*font-weight: bold;*/ font-weight: bold;
white-space: nowrap; white-space: nowrap;
text-align: left; text-align: left;
margin-bottom: 8px; margin-bottom: 8px;
transition: opacity 0.3s ease; transition: opacity 0.3s ease;
} }
.jcdt-item .title { /deep/ .jcdt-item .date i {
color: #c11623;
font-size: 18px;
margin-right: 4px;
}
/deep/ .jcdt-item .title {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
/*margin-bottom: 12px;*/
line-height: 1.4; line-height: 1.4;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
overflow: hidden; overflow: hidden;
/*height: 45px;*/
} }
.jcdt-item .image { /deep/ .jcdt-item .image {
width: 100%; width: 100%;
height: 180px; height: 180px;
margin: 0 0 16px 0; margin: 0 0 16px 0;
@@ -155,14 +192,14 @@ const jcdt = {
transition: transform 0.3s ease; transition: transform 0.3s ease;
} }
.jcdt-item .image img { /deep/ .jcdt-item .image img {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
transition: transform 0.3s ease; transition: transform 0.3s ease;
} }
.jcdt-item .summary { /deep/ .jcdt-item .summary {
font-size: 14px; font-size: 14px;
color: #666; color: #666;
line-height: 1.6; line-height: 1.6;
@@ -174,5 +211,14 @@ const jcdt = {
margin-bottom: 12px; margin-bottom: 12px;
} }
/deep/ .jcdt-empty {
height: 160px;
display: flex;
align-items: center;
justify-content: center;
color: #909399;
font-size: 16px;
}
` `
}; };
@@ -14,7 +14,8 @@
<!-- 引入 core 包和对应 css--> <!-- 引入 core 包和对应 css-->
<script src="/assets/platform/plugins/logicflow/logic-flow.js"></script> <script src="/assets/platform/plugins/logicflow/logic-flow.js"></script>
<link rel="stylesheet" href="/assets/platform/plugins/logicflow/index.css"/> <link rel="stylesheet" href="/assets/platform/plugins/logicflow/index.css"/>
<script src="https://cdn.jsdelivr.net/npm/@logicflow/extension@2.1.4/dist/index.min.js"></script> <script src="/assets/platform/plugins/logicflow/index.min.js"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/@logicflow/extension@2.1.4/dist/index.min.js"></script>-->
<script src="/assets/platform/plugins/snaker/SnakerflowDesigner.umd.js"></script> <script src="/assets/platform/plugins/snaker/SnakerflowDesigner.umd.js"></script>
<style> <style>
#snaker-flow-preview { #snaker-flow-preview {
@@ -80,13 +80,13 @@ layout("/layouts/platform.html"){
<el-table-column prop="postDoctoralJoinDate" label="进站时间" sortable width="120"></el-table-column> <el-table-column prop="postDoctoralJoinDate" label="进站时间" sortable width="120"></el-table-column>
<el-table-column prop="personType" label="教职工类别" sortable width="120"></el-table-column> <el-table-column prop="personType" label="教职工类别" sortable width="120"></el-table-column>
<el-table-column prop="comeSchoolDate" label="来校年月" sortable width="120"></el-table-column> <el-table-column prop="comeSchoolDate" label="来校年月" sortable width="120"></el-table-column>
<el-table-column prop="technicalTitle" label="技术职称" sortable width="120"></el-table-column> <!-- <el-table-column prop="technicalTitle" label="技术职称" sortable width="120"></el-table-column>-->
<el-table-column prop="position" label="干部职务" sortable width="120" show-overflow-tooltip></el-table-column> <!-- <el-table-column prop="position" label="干部职务" sortable width="120" show-overflow-tooltip></el-table-column>-->
<el-table-column prop="education" label="学历" show-overflow-tooltip sortable width="120"></el-table-column> <!-- <el-table-column prop="education" label="学历" show-overflow-tooltip sortable width="120"></el-table-column>-->
<el-table-column prop="academicDegree" label="学位" show-overflow-tooltip sortable width="120"></el-table-column> <!-- <el-table-column prop="academicDegree" label="学位" show-overflow-tooltip sortable width="120"></el-table-column>-->
<el-table-column prop="unitName" label="单位" show-overflow-tooltip sortable width="120"></el-table-column> <el-table-column prop="unitName" label="单位" show-overflow-tooltip sortable width="120"></el-table-column>
<el-table-column prop="unitId" label="单位编码" sortable width="120"></el-table-column> <el-table-column prop="unitId" label="单位编码" sortable width="120"></el-table-column>
<el-table-column prop="nationality" label="国籍" sortable></el-table-column> <!-- <el-table-column prop="nationality" label="国籍" sortable></el-table-column>-->
<el-table-column prop="nation" label="民族" sortable></el-table-column> <el-table-column prop="nation" label="民族" sortable></el-table-column>
</el-table> </el-table>
<!--#include("/layouts/pagination.html"){}#--> <!--#include("/layouts/pagination.html"){}#-->
@@ -75,13 +75,13 @@ layout("/layouts/platform.html"){
<el-table-column prop="preparedBy" label="编制类别" sortable width="120"></el-table-column> <el-table-column prop="preparedBy" label="编制类别" sortable width="120"></el-table-column>
<el-table-column prop="personType" label="教职工类别" sortable width="120"></el-table-column> <el-table-column prop="personType" label="教职工类别" sortable width="120"></el-table-column>
<el-table-column prop="arrivalAtSchoolDate" label="来校年月" sortable width="120"></el-table-column> <el-table-column prop="arrivalAtSchoolDate" label="来校年月" sortable width="120"></el-table-column>
<el-table-column prop="technicalTitle" label="技术职称" sortable width="120"></el-table-column> <!-- <el-table-column prop="technicalTitle" label="技术职称" sortable width="120"></el-table-column>-->
<el-table-column prop="position" label="职务" sortable width="120" show-overflow-tooltip></el-table-column> <!-- <el-table-column prop="position" label="职务" sortable width="120" show-overflow-tooltip></el-table-column>-->
<el-table-column prop="education" label="学历" show-overflow-tooltip sortable width="120"></el-table-column> <!-- <el-table-column prop="education" label="学历" show-overflow-tooltip sortable width="120"></el-table-column>-->
<el-table-column prop="academicDegree" label="学位" show-overflow-tooltip sortable width="120"></el-table-column> <!-- <el-table-column prop="academicDegree" label="学位" show-overflow-tooltip sortable width="120"></el-table-column>-->
<el-table-column prop="unitName" label="单位" show-overflow-tooltip sortable width="120"></el-table-column> <el-table-column prop="unitName" label="单位" show-overflow-tooltip sortable width="120"></el-table-column>
<el-table-column prop="unitId" label="单位编码" sortable width="120"></el-table-column> <el-table-column prop="unitId" label="单位编码" sortable width="120"></el-table-column>
<el-table-column prop="nationality" label="国籍" sortable></el-table-column> <!-- <el-table-column prop="nationality" label="国籍" sortable></el-table-column>-->
<el-table-column prop="nation" label="民族" sortable></el-table-column> <el-table-column prop="nation" label="民族" sortable></el-table-column>
</el-table> </el-table>
<!--#include("/layouts/pagination.html"){}#--> <!--#include("/layouts/pagination.html"){}#-->
@@ -2,25 +2,25 @@
layout("/layouts/platform.html"){ layout("/layouts/platform.html"){
#--> #-->
<style> <style>
.context-menu { .context-menu {
position: fixed; position: fixed;
background: #fff; background: #fff;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
border-radius: 4px; border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1); box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
z-index: 3000; z-index: 3000;
list-style: none; list-style: none;
padding: 5px 0; padding: 5px 0;
margin: 0; margin: 0;
font-size: 14px; font-size: 14px;
} }
.context-menu li { .context-menu li {
padding: 7px 20px; padding: 7px 20px;
cursor: pointer; cursor: pointer;
} }
.context-menu li:hover { .context-menu li:hover {
background: #f2f6fc; background: #f2f6fc;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<el-card shadow="never"> <el-card shadow="never">
@@ -52,17 +52,17 @@ layout("/layouts/platform.html"){
</el-button> </el-button>
</table-tool> </table-tool>
<el-table <el-table
:data="tableData" :data="tableData"
:highlight-current-row="true" :highlight-current-row="true"
:key="tableKey" :key="tableKey"
:load="loadChild" :load="loadChild"
@row-contextmenu="openMenu" @row-contextmenu="openMenu"
:expand-row-keys="expandedRowKeysRenew" :expand-row-keys="expandedRowKeysRenew"
@expand-change="handleExpandChange" @expand-change="handleExpandChange"
ref="tableData" ref="tableData"
style="width: 100%" style="width: 100%"
lazy lazy
row-key="id" row-key="id"
> >
<el-table-column align="left" header-align="left" label="菜单名称" prop="name" width="200"></el-table-column> <el-table-column align="left" header-align="left" label="菜单名称" prop="name" width="200"></el-table-column>
<el-table-column align="center" header-align="center" label="菜单图标" prop="icon" width="100"> <el-table-column align="center" header-align="center" label="菜单图标" prop="icon" width="100">
@@ -124,13 +124,13 @@ layout("/layouts/platform.html"){
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 右键菜单 --> <!-- 右键菜单 -->
<ul v-show="menuVisible" class="context-menu" :style="{left: menuLeft + 'px', top: menuTop + 'px'}"> <ul v-show="menuVisible" class="context-menu" :style="{left: menuLeft + 'px', top: menuTop + 'px'}">
<li @click="handleAddMenu(currentRow)">新建菜单</li> <li @click="handleAddMenu(currentRow)">新建菜单</li>
<li v-if="showAddMenu" @click="handleAddChildMenu(currentRow)">添加子菜单</li> <li v-if="showAddMenu" @click="handleAddChildMenu(currentRow)">添加子菜单</li>
<li @click="handleEdit(currentRow)">编辑</li> <li @click="handleEdit(currentRow)">编辑</li>
<li @click="handleDelete(currentRow)">删除</li> <li @click="handleDelete(currentRow)">删除</li>
</ul> </ul>
</el-card> </el-card>
@@ -140,7 +140,7 @@ layout("/layouts/platform.html"){
<sort ref="sortRef" @refresh="doSearch"></sort> <sort ref="sortRef" @refresh="doSearch"></sort>
<recommend-setting ref="recommendSettingRef" @refresh="doSearch"></recommend-setting> <recommend-setting ref="recommendSettingRef" @refresh="doSearch"></recommend-setting>
</div> </div>
<script> <script nonce="${cspNonce!}">
<!--#include("permissionForm.js"){}#--> <!--#include("permissionForm.js"){}#-->
<!--#include("basicForm.js"){}#--> <!--#include("basicForm.js"){}#-->
<!--#include("sort.js"){}#--> <!--#include("sort.js"){}#-->
@@ -165,65 +165,65 @@ layout("/layouts/platform.html"){
expandedRowKeysRenew: [], expandedRowKeysRenew: [],
tableTreeRefreshTool: [], tableTreeRefreshTool: [],
// 右键打开菜单相关 // 右键打开菜单相关
currentRow: null, currentRow: null,
menuVisible: false, menuVisible: false,
menuLeft: 0, menuLeft: 0,
menuTop: 0, menuTop: 0,
showAddMenu: false, showAddMenu: false,
} }
}, },
methods: { methods: {
/* 右键行 */ /* 右键行 */
openMenu(row, column, event) { openMenu(row, column, event) {
this.showAddMenu = row.type === 'menu'; this.showAddMenu = row.type === 'menu';
// 阻止浏览器默认菜单 // 阻止浏览器默认菜单
event.preventDefault(); event.preventDefault();
this.currentRow = row; this.currentRow = row;
this.menuVisible = true; this.menuVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
const menu = this.$el.querySelector('.context-menu'); const menu = this.$el.querySelector('.context-menu');
const h = menu.offsetHeight || 100; const h = menu.offsetHeight || 100;
const sh = document.documentElement.clientHeight; const sh = document.documentElement.clientHeight;
let top = event.clientY; let top = event.clientY;
if (top + h > sh) top -= h; if (top + h > sh) top -= h;
this.menuLeft = event.clientX; this.menuLeft = event.clientX;
this.menuTop = top; this.menuTop = top;
}); });
}, },
// 新建菜单 // 新建菜单
handleAddMenu(row) { handleAddMenu(row) {
console.log(row) console.log(row)
this.$refs.basicFormRef.onOpen(null, this.pageForm.platform) this.$refs.basicFormRef.onOpen(null, this.pageForm.platform)
}, },
handleAddChildMenu(row) { handleAddChildMenu(row) {
this.$refs.basicFormRef.addChildMenu(row, this.pageForm.platform) this.$refs.basicFormRef.addChildMenu(row, this.pageForm.platform)
}, },
handleEdit(row) { handleEdit(row) {
// 判断子菜单的type是权限还是菜单 // 判断子菜单的type是权限还是菜单
if (row.type === 'menu') { if (row.type === 'menu') {
this.$refs.basicFormRef.onOpen(row.id, this.pageForm.platform) this.$refs.basicFormRef.onOpen(row.id, this.pageForm.platform)
} else { } else {
this.$refs.permissionFormRef.onOpen(row.id) this.$refs.permissionFormRef.onOpen(row.id)
} }
}, },
handleDelete(row) { handleDelete(row) {
// 删除逻辑 // 删除逻辑
console.log(row) console.log(row)
this.$confirm("此操作将删除 " + row.name, "提示", { this.$confirm("此操作将删除 " + row.name, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.$axios.post("/platform/sys/menu/delete/" + row.id).then((res) => { this.$axios.post("/platform/sys/menu/delete/" + row.id).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success(res.msg) this.$message.success(res.msg)
this.loadChildByExpandedKeys() this.loadChildByExpandedKeys()
} }
}) })
}) })
}, },
doSearch() { doSearch() {
this.initTreeTable() this.initTreeTable()
}, },
@@ -327,13 +327,13 @@ layout("/layouts/platform.html"){
}) })
} }
}, },
mounted() { mounted() {
// 点击任意处关闭菜单 // 点击任意处关闭菜单
document.addEventListener('click', () => (this.menuVisible = false)); document.addEventListener('click', () => (this.menuVisible = false));
}, },
beforeDestroy() { beforeDestroy() {
document.removeEventListener('click', () => (this.menuVisible = false)); document.removeEventListener('click', () => (this.menuVisible = false));
}, },
created() { created() {
setTimeout(() => { setTimeout(() => {
if (this.dict.type.SYS_MENU_PLATFORM) { if (this.dict.type.SYS_MENU_PLATFORM) {
@@ -20,11 +20,13 @@ const SYS_MENU_SORT_COMPONENT = {
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "label" label: "label"
} },
platform: 'PC'
} }
}, },
methods: { methods: {
onOpen(platform) { onOpen(platform) {
this.platform = platform
this.sortDialogVisible = true this.sortDialogVisible = true
this.$axios.post("/platform/sys/menu/menuAll", { platform }).then((res) => { this.$axios.post("/platform/sys/menu/menuAll", { platform }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
@@ -48,7 +50,7 @@ const SYS_MENU_SORT_COMPONENT = {
}) })
this.getTreeIds(ids, this.sortMenuData) this.getTreeIds(ids, this.sortMenuData)
this.$axios this.$axios
.post("/platform/sys/menu/sortDo", { ids: ids.toString() }) .post("/platform/sys/menu/sortDo", { ids: ids.toString(), platform: this.platform })
.then((res) => { .then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success(res.msg) this.$message.success(res.msg)
@@ -148,6 +148,15 @@ layout("/layouts/platform.html"){
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" <enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag> size="small"></enum-tag>
</template> </template>
<template v-else-if="column.prop === 'researchFindings'" scope="{row}">
<span v-html="row.researchFindings"></span>
</template>
<template v-else-if="column.prop === 'brief'" scope="{row}">
<span v-html="row.brief"></span>
</template>
<template v-else-if="column.prop === 'measures'" scope="{row}">
<span v-html="row.measures"></span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" min-width="200px"> <el-table-column label="操作" fixed="right" min-width="200px">
<template scope="{row}"> <template scope="{row}">
@@ -201,6 +210,7 @@ layout("/layouts/platform.html"){
{label: "立案结果", prop: "caseFilingResult"}, {label: "立案结果", prop: "caseFilingResult"},
// {label: "立案类型", prop: "caseFilingType"}, // {label: "立案类型", prop: "caseFilingType"},
{label: "是否并案", prop: "merge"}, {label: "是否并案", prop: "merge"},
{label: "调研情况", prop: "researchFindings", visible: false},
{label: "案由", prop: "brief", visible: false}, {label: "案由", prop: "brief", visible: false},
{label: "建议措施", prop: "measures", visible: false}, {label: "建议措施", prop: "measures", visible: false},
{label: "主办单位", prop: "masterUnitName"}, {label: "主办单位", prop: "masterUnitName"},
@@ -139,6 +139,7 @@ layout("/layouts/platform.html"){
processTaskId: row.taskId, processTaskId: row.taskId,
taskName: row.curTaskName, taskName: row.curTaskName,
type: type, type: type,
argsUnitId: row.unitId,
tf_opinion: "同意该提案" tf_opinion: "同意该提案"
} }
this.$refs.proposalInfoRef.onOpen(row) this.$refs.proposalInfoRef.onOpen(row)
@@ -90,6 +90,15 @@ layout("/layouts/platform.html"){
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item></el-descriptions-item> <el-descriptions-item></el-descriptions-item>
<el-descriptions-item label="出生医学证明" :span="2">
<el-form-item prop="files">
<file-upload :value.sync="formData.files"
upload_mode="drag"
:upload_number="10" upload_result_category="array"
accept=".pdf,.jpg, .jpeg, .png"
complete_result></file-upload>
</el-form-item>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
<!-- <table-tool label="假期类别"></table-tool> <!-- <table-tool label="假期类别"></table-tool>
<el-descriptions :column="2" border> <el-descriptions :column="2" border>
@@ -205,6 +214,7 @@ layout("/layouts/platform.html"){
isDystocia: [{required: true, message: '请选择是否难产', trigger: 'change'}], isDystocia: [{required: true, message: '请选择是否难产', trigger: 'change'}],
isThreeChildren: [{required: true, message: '请选择是否三胎', trigger: 'change'}], isThreeChildren: [{required: true, message: '请选择是否三胎', trigger: 'change'}],
isMultipleBirths: [{required: true, message: '请选择是否多胞胎', trigger: 'change'}], isMultipleBirths: [{required: true, message: '请选择是否多胞胎', trigger: 'change'}],
files: [{required: true, message: '请上传出生医学证明', trigger: 'change'}],
}, },
} }
}, },
@@ -28,12 +28,15 @@ const maternityLeaveInfo = {
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="是否多胞胎">{{viewData.isMultipleBirths?'是':'否'}} <el-descriptions-item label="是否多胞胎">{{viewData.isMultipleBirths?'是':'否'}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="出生医学证明" :span="2">
<file-preview :files="viewData.files" complete_result></file-preview>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
<table-tool label="假期时间"></table-tool> <!--<table-tool label="假期时间"></table-tool>
<el-descriptions :column="2" border class="flow-task-form"> <el-descriptions :column="2" border class="flow-task-form">
</el-descriptions> </el-descriptions>
-->
<template v-for="task in doneTasks"> <template v-for="task in doneTasks">
<div class="mt10"> <div class="mt10">
<div class="process-title">{{ task.displayName }}</div> <div class="process-title">{{ task.displayName }}</div>
@@ -95,12 +98,12 @@ const maternityLeaveInfo = {
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item></el-descriptions-item> <el-descriptions-item></el-descriptions-item>
</template> </template>
<el-descriptions-item label="签字" :span="3" v-if="!task.ext.isFirstTaskNode"> <!-- <el-descriptions-item label="签字" :span="3" v-if="!task.ext.isFirstTaskNode">
<el-image :src="task.ext.tf_userSign" <el-image :src="task.ext.tf_userSign"
v-if="task.ext.tf_userSign" v-if="task.ext.tf_userSign"
class="signature-image"></el-image> class="signature-image"></el-image>
<span v-else>暂无</span> <span v-else>暂无</span>
</el-descriptions-item> </el-descriptions-item>-->
</el-descriptions> </el-descriptions>
</div> </div>
</template> </template>
@@ -173,12 +173,12 @@ layout("/layouts/platform.html"){
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea> <user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="电子签名" span="2"> <!--<el-descriptions-item label="电子签名" span="2">
<el-form-item label="电子签名" prop="tf_userSign" <el-form-item label="电子签名" prop="tf_userSign"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"> :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_userSign"></pc-signature> <pc-signature v-model="formData.tf_userSign"></pc-signature>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>-->
</el-descriptions> </el-descriptions>
@@ -89,10 +89,10 @@ layout("/layouts/platform.html"){
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"> :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea> <user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item> </el-form-item>
<el-form-item label="电子签名" prop="tf_userSign" <!-- <el-form-item label="电子签名" prop="tf_userSign"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"> :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_userSign"></pc-signature> <pc-signature v-model="formData.tf_userSign"></pc-signature>
</el-form-item> </el-form-item>-->
</el-form> </el-form>
<el-row type="flex" justify="end"> <el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button> <el-button @click="$refs.guava.index()" size="small">取消</el-button>
@@ -89,9 +89,9 @@ layout("/layouts/platform.html"){
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"> :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea> <user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item> </el-form-item>
<el-form-item label="电子签名" prop="tf_userSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> <!-- <el-form-item label="电子签名" prop="tf_userSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">-->
<pc-signature v-model="formData.tf_userSign"></pc-signature> <!-- <pc-signature v-model="formData.tf_userSign"></pc-signature>-->
</el-form-item> <!-- </el-form-item>-->
</el-form> </el-form>
<el-row type="flex" justify="end"> <el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button> <el-button @click="$refs.guava.index()" size="small">取消</el-button>
@@ -143,6 +143,7 @@ layout("/layouts/platform_h5.html"){
processTaskId: row.taskId, processTaskId: row.taskId,
taskName: row.curTaskName, taskName: row.curTaskName,
type: type, type: type,
argsUnitId: row.unitId,
tf_opinion: "同意该提案" tf_opinion: "同意该提案"
} }
}, },
@@ -117,6 +117,22 @@ layout("/layouts/platform_h5.html"){
</van-radio-group> </van-radio-group>
</template> </template>
</van-field> </van-field>
<van-cell-group title="出生医学证明">
<van-field class="more-text" name="files" :rules="[{ required: true,message:'请上传出生医学证明' }]"
label="" required>
<template #input>
<h5-file-upload
slot="input"
:value.sync="formData.files"
:upload_number="10"
upload_mode="file"
upload_result_category="array"
upload_result_type="url"
complete_result
></h5-file-upload>
</template>
</van-field>
</van-cell-group>
</van-cell-group> </van-cell-group>
<!-- <van-cell-group title="假期类型" class="form-section"> <!-- <van-cell-group title="假期类型" class="form-section">
@@ -19,6 +19,9 @@ const MATERNITY_LEAVE_INFO = {
<van-cell title="是否难产">{{ viewData.isDystocia ?'是':'否'}}</van-cell> <van-cell title="是否难产">{{ viewData.isDystocia ?'是':'否'}}</van-cell>
<van-cell title="是否三胎">{{ viewData.isThreeChildren ?'是':'否'}}</van-cell> <van-cell title="是否三胎">{{ viewData.isThreeChildren ?'是':'否'}}</van-cell>
<van-cell title="是否多胞胎">{{ viewData.isMultipleBirths ?'是':'否'}}</van-cell> <van-cell title="是否多胞胎">{{ viewData.isMultipleBirths ?'是':'否'}}</van-cell>
<van-cell title="出生医学证明" class="direction-column-cell">
<file-preview :files="viewData.files" complete_result></file-preview>
</van-cell>
</van-cell-group> </van-cell-group>
<template v-for="(task,index) in doneTasks"> <template v-for="(task,index) in doneTasks">
<div class="process-title"> <div class="process-title">