feat: v3版疗休养优化4

This commit is contained in:
2026-10-26 14:28:19 +08:00
parent 65fac78cfb
commit fcb6ba7e2d
17 changed files with 281 additions and 372 deletions
@@ -24,20 +24,23 @@ public class TherapyRecuperationModule {
{"base", "目的地管理", "/baseManagement", "TheBaseManagement"},
{"branchSelect", "分工会选择线路", "/lineFghSelect?mode=1", "lineFghSelect"},
{"schoolSelect", "校工会选择线路", "/lineXghSelect?mode=2", "lineXghSelect"},
{"overview", "线路选择总览", "/lineSelectionOverview", "lineSelectionOverview"},
{"overview", "线路选择查询", "/lineSelectionOverview", "lineSelectionOverview"},
{"cluster", "线路组团", "/lineCluster", "lineCluster"},
{"adjustment", "线路调剂", "/lineAdjustment", "line.adjustment"},
{"import", "参加人员导入", "/joinUserImport", "joinUser.import"},
{"branchAudit", "分工会审核", "/TheRapyAudit", "TheRapyAudit"},
{"travelAudit", "自由组团审核", "/TheRapyTravelAudit", "TheRapyTravelAudit"},
{"schoolAudit", "校工会审核", "/TheRapyXghAudit", "TheRapyXghAudit"},
{"branchQuery", "分工会查询", "/query", "TheRapyQuery"},
{"userQuery", "报名人员查询", "/user/query", "TheRapyUserQuery"},
{"queryStatistics", "查询统计", "/query/statics", "queryStatics"},
{"lineStatistics", "线路统计", "/statistics", "statistics"},
{"agencyStatistics", "旅行社月度统计", "/travelAgencyMonthlyStatistics", "travelAgencyMonthlyStatistics"},
{"unionStatistics", "分工会线路数量统计", "/statistics/unionLineNumberStatistics", "unionLineNumberStatistics"}
{"branchQuery", "分工会信息查询", "/query", "TheRapyQuery"},
{"userQuery", "校工会信息查询", "/user/query", "TheRapyUserQuery"},
{"queryStatistics", "满意度统计", "/query/statics", "queryStatics"},
{"lineStatistics", "成团结果通知", "/statistics", "statistics"},
{"agencyStatistics", "人数统计", "/travelAgencyMonthlyStatistics", "travelAgencyMonthlyStatistics"},
{"unionStatistics", "分工会线路选择统计", "/statistics/unionLineNumberStatistics", "unionLineNumberStatistics"}
};
public static final List<String> MENU_SCREENS = List.of("agency", "line", "branchSelect", "schoolSelect",
"queryStatistics", "branchQuery", "userQuery", "overview", "lineStatistics", "config",
"unionStatistics", "agencyStatistics");
@Inject
private Dao dao;
@@ -130,6 +133,9 @@ public class TherapyRecuperationModule {
for (String[] screen : SCREENS) {
Sys_menu menu = addMenu(module.getId(), root.getId(), screen[1], ROOT + "?screen=" + screen[0],
"inclusiveTherapyV3." + screen[3], "pc");
int position = MENU_SCREENS.indexOf(screen[0]);
dao.update(Sys_menu.class, Chain.make("showit", position >= 0)
.add("location", position >= 0 ? position + 1 : MENU_SCREENS.size() + 1), Cnd.where("id", "=", menu.getId()));
for (Sys_role role : roles) {
String code = role.getCode();
boolean school = List.of("sysadmin", "superadmin", "A06", "SchoolUnionMemberAdmin", "SYSADMIN", "SCHOOL_UNION_ADMIN", "SCHOOL_UNION_WELFARE_ADMIN", "SCHOOL_UNION_MEMBER_ADMIN").contains(code);
@@ -142,6 +148,7 @@ public class TherapyRecuperationModule {
}
}
Sys_menu signup = addMenu(module.getId(), root.getId(), "疗休养报名", ROOT + "?screen=signup", "inclusiveTherapyV3.signup", "pc");
dao.update(Sys_menu.class, Chain.make("showit", false), Cnd.where("id", "=", signup.getId()));
Sys_module h5Module = dao.fetch(Sys_module.class, Cnd.where("name", "=", module.getName()).and("platform", "=", "h5"));
if (h5Module == null) {
h5Module = new Sys_module();
@@ -94,7 +94,11 @@ public class TherapyCommonController {
private NutMap fileInfo(Sys_file file) {
return NutMap.NEW().addv("id", file.getId()).addv("filename", file.getName())
.addv("filepath", file.getDownloadPath()).addv("url", file.getDownloadPath());
.addv("filepath", file.getDownloadPath()).addv("url", file.getDownloadPath())
.addv("name", file.getName()).addv("downloadPath", file.getDownloadPath())
.addv("engine", file.getEngine()).addv("bucket", file.getBucket())
.addv("objName", file.getObjName()).addv("storagePath", file.getStoragePath())
.addv("suffix", file.getSuffix()).addv("sizeKb", file.getSizeKb()).addv("sizeInfo", file.getSizeInfo());
}
@At
@@ -112,8 +116,10 @@ public class TherapyCommonController {
@SaCheckLogin
@POST
public Result deleteFile(String id) {
if (Strings.isBlank(id)) return Result.error("缺少文件ID");
Sys_file file = sysFileService.fetch(id);
if (file != null && !Objects.equals(file.getCreatedBy(), TherapyContext.getUserId())
if (file == null) return Result.success();
if (!Objects.equals(file.getCreatedBy(), TherapyContext.getUserId())
&& !TherapyContext.hasAnyRoles("sysadmin,A06")) return Result.error("无权删除此文件");
sysFileService.delete(Collections.singletonList(id));
return Result.success();
@@ -6,6 +6,9 @@ import com.budwk.app.zhgh.staffbenefit.therapyRecuperation.TherapyRecuperationMo
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@IocBean
@At("/platform/inclusiveTherapyV3")
@@ -14,6 +17,17 @@ public class TherapyWorkspaceController {
@SaCheckLogin
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/index.html")
public void index(String screen, HttpServletRequest request) {
if (screen == null) {
for (String key : TherapyRecuperationModule.MENU_SCREENS) {
for (String[] candidate : TherapyRecuperationModule.SCREENS) {
if (candidate[0].equals(key) && StpUtil.hasPermission("inclusiveTherapyV3." + candidate[3])) {
screen = key;
break;
}
}
if (screen != null) break;
}
}
String url = TherapyRecuperationModule.ROOT + "/mobile/index";
if (screen != null && !"signup".equals(screen)) {
boolean found = false;
@@ -27,6 +41,23 @@ public class TherapyWorkspaceController {
}
if (!found) throw new IllegalArgumentException("未知的普惠疗休养V3页面");
}
List<String[]> tabs = new ArrayList<>();
String[][] groups = {{"line", "base"}, {"overview", "cluster", "adjustment"},
{"branchQuery", "branchAudit", "travelAudit"}, {"userQuery", "schoolAudit", "import"}};
for (String[] group : groups) {
if (Arrays.asList(group).contains(screen)) {
for (String key : group) {
for (String[] candidate : TherapyRecuperationModule.SCREENS) {
if (candidate[0].equals(key) && StpUtil.hasPermission("inclusiveTherapyV3." + candidate[3])) {
tabs.add(candidate);
}
}
}
break;
}
}
request.setAttribute("therapyTabs", tabs);
request.setAttribute("therapyShowTabs", tabs.size() > 1);
request.setAttribute("therapyPageUrl", url);
}
}
@@ -70,7 +70,7 @@ public class TheRapyRecuperationBaseManagerController {
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/baseManage/baseManagement.html")
@SaCheckPermission("inclusiveTherapyV3.line")
@SaCheckPermission("inclusiveTherapyV3.TheBaseManagement")
public void index() {
}
@@ -62,7 +62,7 @@ public class TherapyContext {
}
public static String getRoleCodesJson() {
SysUserService userService = Mvcs.getIoc().get(SysUserService.class);
SysUserService userService = Mvcs.getIoc().get(SysUserService.class, "sysUserServiceImpl");
java.util.List<String> roles = new java.util.ArrayList<>(userService.getRoleCodeList(userService.fetch(getUserId())));
for (String role : Arrays.asList("sysadmin", "A06", "H03", "H04", "H06", "SchoolUnionMemberAdmin")) {
if (hasRole(role) && !roles.contains(role)) roles.add(role);
@@ -0,0 +1,13 @@
-- 仅清理普惠疗休养V3菜单及角色菜单关联,保留职工权益模块和业务数据。
START TRANSACTION;
DELETE rm FROM sys_role_menu rm
INNER JOIN sys_menu m ON m.id = rm.menuId
WHERE m.permission = 'inclusiveTherapyV3'
OR m.permission LIKE 'inclusiveTherapyV3.%';
DELETE FROM sys_menu
WHERE permission = 'inclusiveTherapyV3'
OR permission LIKE 'inclusiveTherapyV3.%';
COMMIT;
@@ -0,0 +1,118 @@
-- 普惠疗休养V3:父菜单及12个子菜单,归属已有的职工权益模块。
-- 角色菜单关系暂时只授予本项目超级管理员角色 SYSADMIN。
SET NAMES utf8mb4;
START TRANSACTION;
-- 普惠疗休养V3
INSERT INTO sys_menu (id, parentId, path, name, type, href, target, icon, showit, disabled, permission, location, hasChildren, platform, moduleId, createdBy, createdAt, updatedBy, updatedAt, delFlag)
SELECT '7ea90000000000000000000000000000', '',
(SELECT LPAD(COALESCE(MAX(CAST(path AS UNSIGNED)),0)+1,4,'0') FROM sys_menu WHERE CHAR_LENGTH(path)=4),
'普惠疗休养V3', 'menu', '/platform/inclusiveTherapyV3', '_self', 'fa fa-heart', 1, 0,
'inclusiveTherapyV3', 50, 1, 'pc', id, '', UNIX_TIMESTAMP(NOW())*1000, '', UNIX_TIMESTAMP(NOW())*1000, 0
FROM sys_module WHERE name='职工权益' AND platform='pc' LIMIT 1;
-- 旅行社管理
INSERT INTO sys_menu (id, parentId, path, name, type, href, target, icon, showit, disabled, permission, location, hasChildren, platform, moduleId, createdBy, createdAt, updatedBy, updatedAt, delFlag)
SELECT '7ea90000000000000000000000000001', id, CONCAT(path, '0001'),
'旅行社管理', 'menu', '/platform/inclusiveTherapyV3?screen=agency', '_self', 'fa fa-th-large', 1, 0,
'inclusiveTherapyV3.travelAgency', 1, 0, 'pc', moduleId, '', UNIX_TIMESTAMP(NOW())*1000, '', UNIX_TIMESTAMP(NOW())*1000, 0
FROM sys_menu WHERE permission='inclusiveTherapyV3';
-- 线路管理
INSERT INTO sys_menu (id, parentId, path, name, type, href, target, icon, showit, disabled, permission, location, hasChildren, platform, moduleId, createdBy, createdAt, updatedBy, updatedAt, delFlag)
SELECT '7ea90000000000000000000000000002', id, CONCAT(path, '0002'),
'线路管理', 'menu', '/platform/inclusiveTherapyV3?screen=line', '_self', 'fa fa-th-large', 1, 0,
'inclusiveTherapyV3.line', 2, 0, 'pc', moduleId, '', UNIX_TIMESTAMP(NOW())*1000, '', UNIX_TIMESTAMP(NOW())*1000, 0
FROM sys_menu WHERE permission='inclusiveTherapyV3';
-- 分工会选择线路
INSERT INTO sys_menu (id, parentId, path, name, type, href, target, icon, showit, disabled, permission, location, hasChildren, platform, moduleId, createdBy, createdAt, updatedBy, updatedAt, delFlag)
SELECT '7ea90000000000000000000000000003', id, CONCAT(path, '0003'),
'分工会选择线路', 'menu', '/platform/inclusiveTherapyV3?screen=branchSelect', '_self', 'fa fa-th-large', 1, 0,
'inclusiveTherapyV3.lineFghSelect', 3, 0, 'pc', moduleId, '', UNIX_TIMESTAMP(NOW())*1000, '', UNIX_TIMESTAMP(NOW())*1000, 0
FROM sys_menu WHERE permission='inclusiveTherapyV3';
-- 校工会选择线路
INSERT INTO sys_menu (id, parentId, path, name, type, href, target, icon, showit, disabled, permission, location, hasChildren, platform, moduleId, createdBy, createdAt, updatedBy, updatedAt, delFlag)
SELECT '7ea90000000000000000000000000004', id, CONCAT(path, '0004'),
'校工会选择线路', 'menu', '/platform/inclusiveTherapyV3?screen=schoolSelect', '_self', 'fa fa-th-large', 1, 0,
'inclusiveTherapyV3.lineXghSelect', 4, 0, 'pc', moduleId, '', UNIX_TIMESTAMP(NOW())*1000, '', UNIX_TIMESTAMP(NOW())*1000, 0
FROM sys_menu WHERE permission='inclusiveTherapyV3';
-- 满意度统计
INSERT INTO sys_menu (id, parentId, path, name, type, href, target, icon, showit, disabled, permission, location, hasChildren, platform, moduleId, createdBy, createdAt, updatedBy, updatedAt, delFlag)
SELECT '7ea90000000000000000000000000005', id, CONCAT(path, '0005'),
'满意度统计', 'menu', '/platform/inclusiveTherapyV3?screen=queryStatistics', '_self', 'fa fa-th-large', 1, 0,
'inclusiveTherapyV3.queryStatics', 5, 0, 'pc', moduleId, '', UNIX_TIMESTAMP(NOW())*1000, '', UNIX_TIMESTAMP(NOW())*1000, 0
FROM sys_menu WHERE permission='inclusiveTherapyV3';
-- 分工会信息查询
INSERT INTO sys_menu (id, parentId, path, name, type, href, target, icon, showit, disabled, permission, location, hasChildren, platform, moduleId, createdBy, createdAt, updatedBy, updatedAt, delFlag)
SELECT '7ea90000000000000000000000000006', id, CONCAT(path, '0006'),
'分工会信息查询', 'menu', '/platform/inclusiveTherapyV3?screen=branchQuery', '_self', 'fa fa-th-large', 1, 0,
'inclusiveTherapyV3.TheRapyQuery', 6, 0, 'pc', moduleId, '', UNIX_TIMESTAMP(NOW())*1000, '', UNIX_TIMESTAMP(NOW())*1000, 0
FROM sys_menu WHERE permission='inclusiveTherapyV3';
-- 校工会信息查询
INSERT INTO sys_menu (id, parentId, path, name, type, href, target, icon, showit, disabled, permission, location, hasChildren, platform, moduleId, createdBy, createdAt, updatedBy, updatedAt, delFlag)
SELECT '7ea90000000000000000000000000007', id, CONCAT(path, '0007'),
'校工会信息查询', 'menu', '/platform/inclusiveTherapyV3?screen=userQuery', '_self', 'fa fa-th-large', 1, 0,
'inclusiveTherapyV3.TheRapyUserQuery', 7, 0, 'pc', moduleId, '', UNIX_TIMESTAMP(NOW())*1000, '', UNIX_TIMESTAMP(NOW())*1000, 0
FROM sys_menu WHERE permission='inclusiveTherapyV3';
-- 线路选择查询
INSERT INTO sys_menu (id, parentId, path, name, type, href, target, icon, showit, disabled, permission, location, hasChildren, platform, moduleId, createdBy, createdAt, updatedBy, updatedAt, delFlag)
SELECT '7ea90000000000000000000000000008', id, CONCAT(path, '0008'),
'线路选择查询', 'menu', '/platform/inclusiveTherapyV3?screen=overview', '_self', 'fa fa-th-large', 1, 0,
'inclusiveTherapyV3.lineSelectionOverview', 8, 0, 'pc', moduleId, '', UNIX_TIMESTAMP(NOW())*1000, '', UNIX_TIMESTAMP(NOW())*1000, 0
FROM sys_menu WHERE permission='inclusiveTherapyV3';
-- 成团结果通知
INSERT INTO sys_menu (id, parentId, path, name, type, href, target, icon, showit, disabled, permission, location, hasChildren, platform, moduleId, createdBy, createdAt, updatedBy, updatedAt, delFlag)
SELECT '7ea90000000000000000000000000009', id, CONCAT(path, '0009'),
'成团结果通知', 'menu', '/platform/inclusiveTherapyV3?screen=lineStatistics', '_self', 'fa fa-th-large', 1, 0,
'inclusiveTherapyV3.statistics', 9, 0, 'pc', moduleId, '', UNIX_TIMESTAMP(NOW())*1000, '', UNIX_TIMESTAMP(NOW())*1000, 0
FROM sys_menu WHERE permission='inclusiveTherapyV3';
-- 基础设置
INSERT INTO sys_menu (id, parentId, path, name, type, href, target, icon, showit, disabled, permission, location, hasChildren, platform, moduleId, createdBy, createdAt, updatedBy, updatedAt, delFlag)
SELECT '7ea9000000000000000000000000000a', id, CONCAT(path, '0010'),
'基础设置', 'menu', '/platform/inclusiveTherapyV3?screen=config', '_self', 'fa fa-th-large', 1, 0,
'inclusiveTherapyV3.TheRapyConfig', 10, 0, 'pc', moduleId, '', UNIX_TIMESTAMP(NOW())*1000, '', UNIX_TIMESTAMP(NOW())*1000, 0
FROM sys_menu WHERE permission='inclusiveTherapyV3';
-- 分工会线路选择统计
INSERT INTO sys_menu (id, parentId, path, name, type, href, target, icon, showit, disabled, permission, location, hasChildren, platform, moduleId, createdBy, createdAt, updatedBy, updatedAt, delFlag)
SELECT '7ea9000000000000000000000000000b', id, CONCAT(path, '0011'),
'分工会线路选择统计', 'menu', '/platform/inclusiveTherapyV3?screen=unionStatistics', '_self', 'fa fa-th-large', 1, 0,
'inclusiveTherapyV3.unionLineNumberStatistics', 11, 0, 'pc', moduleId, '', UNIX_TIMESTAMP(NOW())*1000, '', UNIX_TIMESTAMP(NOW())*1000, 0
FROM sys_menu WHERE permission='inclusiveTherapyV3';
-- 人数统计
INSERT INTO sys_menu (id, parentId, path, name, type, href, target, icon, showit, disabled, permission, location, hasChildren, platform, moduleId, createdBy, createdAt, updatedBy, updatedAt, delFlag)
SELECT '7ea9000000000000000000000000000c', id, CONCAT(path, '0012'),
'人数统计', 'menu', '/platform/inclusiveTherapyV3?screen=agencyStatistics', '_self', 'fa fa-th-large', 1, 0,
'inclusiveTherapyV3.travelAgencyMonthlyStatistics', 12, 0, 'pc', moduleId, '', UNIX_TIMESTAMP(NOW())*1000, '', UNIX_TIMESTAMP(NOW())*1000, 0
FROM sys_menu WHERE permission='inclusiveTherapyV3';
-- 仅授予超级管理员角色
INSERT INTO sys_role_menu (roleId, menuId)
SELECT r.id, m.id FROM sys_role r CROSS JOIN sys_menu m
WHERE r.code='SYSADMIN' AND r.disabled=0 AND COALESCE(r.delFlag,0)=0
AND m.permission IN (
'inclusiveTherapyV3',
'inclusiveTherapyV3.travelAgency',
'inclusiveTherapyV3.line',
'inclusiveTherapyV3.lineFghSelect',
'inclusiveTherapyV3.lineXghSelect',
'inclusiveTherapyV3.queryStatics',
'inclusiveTherapyV3.TheRapyQuery',
'inclusiveTherapyV3.TheRapyUserQuery',
'inclusiveTherapyV3.lineSelectionOverview',
'inclusiveTherapyV3.statistics',
'inclusiveTherapyV3.TheRapyConfig',
'inclusiveTherapyV3.unionLineNumberStatistics',
'inclusiveTherapyV3.travelAgencyMonthlyStatistics');
COMMIT;
@@ -1,9 +1,9 @@
-- v4 职工福利 / 普惠疗休养V3独立子模块初始化脚本(MySQL 8)。
-- 在 v4 目标数据库中执行;表结构依据 therapyRecuperation 模块实体定义。
-- v3 the_rapy_recuperation_* 对应本模块 inclusive_therapy_v3_*,不覆盖 v4 其他疗休养表。
-- 仅新增表、视图、默认配置、菜单及角色权限关联,不迁移 v3 历史业务数据。
-- 已存在的表、视图、配置和菜单保留原值;脚本不修订已有表结构。
-- 依赖 v4 已有 vw_user、sys_union、sys_unit、sys_config、sys_module、sys_menu、sys_role、sys_role_menu。
-- 仅新增表、视图和默认配置,不迁移 v3 历史业务数据。
-- 已存在的表、视图和配置保留原值;脚本不修订已有表结构。
-- 依赖 v4 已有 vw_user、sys_union、sys_unit、sys_config。
-- DDL 存在 MySQL 隐式提交;后续初始化记录使用单独事务。
SET NAMES utf8mb4;
@@ -361,327 +361,4 @@ INSERT INTO `inclusive_therapy_v3_config`
SELECT REPLACE(UUID(),'-',''),'普惠疗休养V3配置',0,0,0,1,1,0,JSON_ARRAY()
WHERE NOT EXISTS (SELECT 1 FROM `inclusive_therapy_v3_config`);
SET @inclusive_therapy_v3_pc_module = COALESCE(
(SELECT m.`moduleId` FROM `sys_menu` m INNER JOIN `sys_module` s ON s.`id`=m.`moduleId`
WHERE m.`href` LIKE '/platform/recuperation%' AND m.`platform`='pc' ORDER BY m.`id` LIMIT 1),
(SELECT `id` FROM `sys_module` WHERE `name`='职工福利' AND `platform`='pc' ORDER BY `id` LIMIT 1),
REPLACE(UUID(),'-','')
);
INSERT INTO `sys_module` (`id`,`name`,`platform`,`sortNum`,`faIcon`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_pc_module,'职工福利','pc',50,'fa fa-heart','',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_module` WHERE `id`=@inclusive_therapy_v3_pc_module);
SET @inclusive_therapy_v3_module_name = (SELECT `name` FROM `sys_module` WHERE `id`=@inclusive_therapy_v3_pc_module);
SET @inclusive_therapy_v3_module_sort = (SELECT `sortNum` FROM `sys_module` WHERE `id`=@inclusive_therapy_v3_pc_module);
SET @inclusive_therapy_v3_h5_module = COALESCE(
(SELECT `id` FROM `sys_module` WHERE `name`=@inclusive_therapy_v3_module_name AND `platform`='h5' ORDER BY `id` LIMIT 1),
REPLACE(UUID(),'-','')
);
INSERT INTO `sys_module` (`id`,`name`,`platform`,`sortNum`,`faIcon`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_h5_module,@inclusive_therapy_v3_module_name,'h5',@inclusive_therapy_v3_module_sort,'fa fa-heart','',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_module` WHERE `id`=@inclusive_therapy_v3_h5_module);
SET @inclusive_therapy_v3_menu_root = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT('',LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=4
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_root,'',@inclusive_therapy_v3_next_path,'普惠疗休养V3','menu','/platform/inclusiveTherapyV3','_self','fa fa-heart',1,0,'inclusiveTherapyV3',
@inclusive_therapy_v3_next_location,1,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3');
SET @inclusive_therapy_v3_root_path = (SELECT `path` FROM `sys_menu` WHERE `id`=@inclusive_therapy_v3_menu_root);
-- 基础设置
SET @inclusive_therapy_v3_menu_config = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyConfig' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_config,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'基础设置','menu','/platform/inclusiveTherapyV3?screen=config','_self','fa fa-heart',1,0,'inclusiveTherapyV3.TheRapyConfig',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyConfig');
-- 旅行社管理
SET @inclusive_therapy_v3_menu_agency = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.travelAgency' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_agency,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'旅行社管理','menu','/platform/inclusiveTherapyV3?screen=agency','_self','fa fa-heart',1,0,'inclusiveTherapyV3.travelAgency',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.travelAgency');
-- 线路管理
SET @inclusive_therapy_v3_menu_line = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.line' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_line,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'线路管理','menu','/platform/inclusiveTherapyV3?screen=line','_self','fa fa-heart',1,0,'inclusiveTherapyV3.line',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.line');
-- 目的地管理
SET @inclusive_therapy_v3_menu_base = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheBaseManagement' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_base,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'目的地管理','menu','/platform/inclusiveTherapyV3?screen=base','_self','fa fa-heart',1,0,'inclusiveTherapyV3.TheBaseManagement',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheBaseManagement');
-- 分工会选择线路
SET @inclusive_therapy_v3_menu_branchSelect = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineFghSelect' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_branchSelect,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'分工会选择线路','menu','/platform/inclusiveTherapyV3?screen=branchSelect','_self','fa fa-heart',1,0,'inclusiveTherapyV3.lineFghSelect',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineFghSelect');
-- 校工会选择线路
SET @inclusive_therapy_v3_menu_schoolSelect = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineXghSelect' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_schoolSelect,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'校工会选择线路','menu','/platform/inclusiveTherapyV3?screen=schoolSelect','_self','fa fa-heart',1,0,'inclusiveTherapyV3.lineXghSelect',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineXghSelect');
-- 线路选择总览
SET @inclusive_therapy_v3_menu_overview = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineSelectionOverview' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_overview,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'线路选择总览','menu','/platform/inclusiveTherapyV3?screen=overview','_self','fa fa-heart',1,0,'inclusiveTherapyV3.lineSelectionOverview',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineSelectionOverview');
-- 线路组团
SET @inclusive_therapy_v3_menu_cluster = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineCluster' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_cluster,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'线路组团','menu','/platform/inclusiveTherapyV3?screen=cluster','_self','fa fa-heart',1,0,'inclusiveTherapyV3.lineCluster',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.lineCluster');
-- 线路调剂
SET @inclusive_therapy_v3_menu_adjustment = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.line.adjustment' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_adjustment,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'线路调剂','menu','/platform/inclusiveTherapyV3?screen=adjustment','_self','fa fa-heart',1,0,'inclusiveTherapyV3.line.adjustment',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.line.adjustment');
-- 参加人员导入
SET @inclusive_therapy_v3_menu_import = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.joinUser.import' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_import,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'参加人员导入','menu','/platform/inclusiveTherapyV3?screen=import','_self','fa fa-heart',1,0,'inclusiveTherapyV3.joinUser.import',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.joinUser.import');
-- 分工会审核
SET @inclusive_therapy_v3_menu_branchAudit = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyAudit' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_branchAudit,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'分工会审核','menu','/platform/inclusiveTherapyV3?screen=branchAudit','_self','fa fa-heart',1,0,'inclusiveTherapyV3.TheRapyAudit',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyAudit');
-- 自由组团审核
SET @inclusive_therapy_v3_menu_travelAudit = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyTravelAudit' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_travelAudit,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'自由组团审核','menu','/platform/inclusiveTherapyV3?screen=travelAudit','_self','fa fa-heart',1,0,'inclusiveTherapyV3.TheRapyTravelAudit',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyTravelAudit');
-- 校工会审核
SET @inclusive_therapy_v3_menu_schoolAudit = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyXghAudit' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_schoolAudit,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'校工会审核','menu','/platform/inclusiveTherapyV3?screen=schoolAudit','_self','fa fa-heart',1,0,'inclusiveTherapyV3.TheRapyXghAudit',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyXghAudit');
-- 分工会查询
SET @inclusive_therapy_v3_menu_branchQuery = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyQuery' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_branchQuery,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'分工会查询','menu','/platform/inclusiveTherapyV3?screen=branchQuery','_self','fa fa-heart',1,0,'inclusiveTherapyV3.TheRapyQuery',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyQuery');
-- 报名人员查询
SET @inclusive_therapy_v3_menu_userQuery = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyUserQuery' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_userQuery,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'报名人员查询','menu','/platform/inclusiveTherapyV3?screen=userQuery','_self','fa fa-heart',1,0,'inclusiveTherapyV3.TheRapyUserQuery',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.TheRapyUserQuery');
-- 查询统计
SET @inclusive_therapy_v3_menu_queryStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.queryStatics' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_queryStatistics,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'查询统计','menu','/platform/inclusiveTherapyV3?screen=queryStatistics','_self','fa fa-heart',1,0,'inclusiveTherapyV3.queryStatics',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.queryStatics');
-- 线路统计
SET @inclusive_therapy_v3_menu_lineStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.statistics' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_lineStatistics,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'线路统计','menu','/platform/inclusiveTherapyV3?screen=lineStatistics','_self','fa fa-heart',1,0,'inclusiveTherapyV3.statistics',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.statistics');
-- 旅行社月度统计
SET @inclusive_therapy_v3_menu_agencyStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.travelAgencyMonthlyStatistics' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_agencyStatistics,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'旅行社月度统计','menu','/platform/inclusiveTherapyV3?screen=agencyStatistics','_self','fa fa-heart',1,0,'inclusiveTherapyV3.travelAgencyMonthlyStatistics',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.travelAgencyMonthlyStatistics');
-- 分工会线路数量统计
SET @inclusive_therapy_v3_menu_unionStatistics = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.unionLineNumberStatistics' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_unionStatistics,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'分工会线路数量统计','menu','/platform/inclusiveTherapyV3?screen=unionStatistics','_self','fa fa-heart',1,0,'inclusiveTherapyV3.unionLineNumberStatistics',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.unionLineNumberStatistics');
SET @inclusive_therapy_v3_menu_signup = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.signup' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT(@inclusive_therapy_v3_root_path,LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=CHAR_LENGTH(@inclusive_therapy_v3_root_path)+4 AND LEFT(`path`,CHAR_LENGTH(@inclusive_therapy_v3_root_path))=@inclusive_therapy_v3_root_path
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_signup,@inclusive_therapy_v3_menu_root,@inclusive_therapy_v3_next_path,'疗休养报名','menu','/platform/inclusiveTherapyV3?screen=signup','_self','fa fa-heart',1,0,'inclusiveTherapyV3.signup',
@inclusive_therapy_v3_next_location,0,'pc',@inclusive_therapy_v3_pc_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.signup');
SET @inclusive_therapy_v3_menu_mobile = COALESCE((SELECT `id` FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.mobile' LIMIT 1),REPLACE(UUID(),'-',''));
SET @inclusive_therapy_v3_next_path = (
SELECT CONCAT('',LPAD(COALESCE(MAX(CAST(RIGHT(`path`,4) AS UNSIGNED)),0)+1,4,'0'))
FROM `sys_menu` WHERE CHAR_LENGTH(`path`)=4
);
SET @inclusive_therapy_v3_next_location = (SELECT COALESCE(MAX(`location`),0)+1 FROM `sys_menu`);
INSERT INTO `sys_menu`
(`id`,`parentId`,`path`,`name`,`type`,`href`,`target`,`icon`,`showit`,`disabled`,`permission`,`location`,`hasChildren`,`platform`,`moduleId`,`createdBy`,`createdAt`,`updatedBy`,`updatedAt`,`delFlag`)
SELECT @inclusive_therapy_v3_menu_mobile,'',@inclusive_therapy_v3_next_path,'普惠疗休养V3','menu','/platform/inclusiveTherapyV3/mobile/index','_self','fa fa-heart',1,0,'inclusiveTherapyV3.mobile',
@inclusive_therapy_v3_next_location,0,'h5',@inclusive_therapy_v3_h5_module,'',@inclusive_therapy_v3_now,'',@inclusive_therapy_v3_now,0
WHERE NOT EXISTS (SELECT 1 FROM `sys_menu` WHERE `permission`='inclusiveTherapyV3.mobile');
INSERT INTO `sys_role_menu` (`roleId`,`menuId`)
SELECT r.`id`,m.`id` FROM `sys_role` r CROSS JOIN `sys_menu` m
WHERE r.`disabled`=0 AND r.`code` IN ('sysadmin','superadmin','A06','SchoolUnionMemberAdmin','SYSADMIN','SCHOOL_UNION_ADMIN','SCHOOL_UNION_WELFARE_ADMIN','SCHOOL_UNION_MEMBER_ADMIN')
AND m.`permission` IN ('inclusiveTherapyV3','inclusiveTherapyV3.TheRapyConfig','inclusiveTherapyV3.travelAgency','inclusiveTherapyV3.line','inclusiveTherapyV3.TheBaseManagement','inclusiveTherapyV3.lineFghSelect','inclusiveTherapyV3.lineXghSelect','inclusiveTherapyV3.lineSelectionOverview','inclusiveTherapyV3.lineCluster','inclusiveTherapyV3.line.adjustment','inclusiveTherapyV3.joinUser.import','inclusiveTherapyV3.TheRapyAudit','inclusiveTherapyV3.TheRapyTravelAudit','inclusiveTherapyV3.TheRapyXghAudit','inclusiveTherapyV3.TheRapyQuery','inclusiveTherapyV3.TheRapyUserQuery','inclusiveTherapyV3.queryStatics','inclusiveTherapyV3.statistics','inclusiveTherapyV3.travelAgencyMonthlyStatistics','inclusiveTherapyV3.unionLineNumberStatistics')
AND NOT EXISTS (SELECT 1 FROM `sys_role_menu` rel WHERE rel.`roleId`=r.`id` AND rel.`menuId`=m.`id`);
INSERT INTO `sys_role_menu` (`roleId`,`menuId`)
SELECT r.`id`,m.`id` FROM `sys_role` r CROSS JOIN `sys_menu` m
WHERE r.`disabled`=0 AND r.`code` IN ('H03','H04','H06','BRANCH_UNION_ADMIN','BRANCH_UNION_CHAIRMAN')
AND m.`permission` IN ('inclusiveTherapyV3','inclusiveTherapyV3.line','inclusiveTherapyV3.TheBaseManagement','inclusiveTherapyV3.lineFghSelect','inclusiveTherapyV3.lineSelectionOverview','inclusiveTherapyV3.lineCluster','inclusiveTherapyV3.line.adjustment','inclusiveTherapyV3.TheRapyAudit','inclusiveTherapyV3.TheRapyTravelAudit','inclusiveTherapyV3.TheRapyQuery')
AND NOT EXISTS (SELECT 1 FROM `sys_role_menu` rel WHERE rel.`roleId`=r.`id` AND rel.`menuId`=m.`id`);
INSERT INTO `sys_role_menu` (`roleId`,`menuId`)
SELECT r.`id`,m.`id` FROM `sys_role` r CROSS JOIN `sys_menu` m
WHERE r.`disabled`=0 AND r.`code` IN ('public','PUBLIC','MEMBER','sysadmin','superadmin','SYSADMIN')
AND m.`permission` IN ('inclusiveTherapyV3','inclusiveTherapyV3.signup','inclusiveTherapyV3.mobile')
AND NOT EXISTS (SELECT 1 FROM `sys_role_menu` rel WHERE rel.`roleId`=r.`id` AND rel.`menuId`=m.`id`);
COMMIT;
@@ -40,3 +40,14 @@ window.therapyPreview = function(value) {
return /^(https?:|data:|blob:|\/)/.test(value) ? value :
'/platform/inclusiveTherapyV3/common/preview?id=' + encodeURIComponent(value);
};
if (window.vant) {
window.preview = function(filename, id) {
const address = therapyPreview(id);
if (/\.(jpe?g|png|gif|bmp|webp|svg)$/i.test(filename || '')) {
vant.ImagePreview([address]);
} else {
window.open(address);
}
};
}
@@ -1,10 +1,26 @@
<template>
<el-drawer title="参加人员范围设置" :visible.sync="userScopeDialog" size="90%" :append-to-body="true" @closed="$emit('group_change')">
<iframe v-if="userScopeDialog" src="/platform/activity/basic/scope" title="参加人员范围设置" style="width:100%;height:calc(100vh - 90px);border:0"></iframe>
<el-drawer title="参加人员范围设置" :visible.sync="userScopeDialog" size="90%" :append-to-body="true" @closed="loadGroups">
<div style="padding:0 20px 10px">
<el-select :value="group_id" placeholder="选择疗休养参加人员分组" filterable clearable @change="$emit('update:group_id', $event)">
<el-option v-for="group in groups" :key="group.groupId" :label="group.groupName" :value="group.groupId"></el-option>
</el-select>
<el-button type="text" @click="loadGroups">刷新分组</el-button>
</div>
<iframe v-if="userScopeDialog" src="/platform/activity/basic/scope" title="参加人员范围设置" style="width:100%;height:calc(100vh - 150px);border:0"></iframe>
</el-drawer>
</template>
<script>
module.exports = {
data() { return {userScopeDialog: false}; }
props: {group_id: {type: [String, Number], default: null}},
data() { return {userScopeDialog: false, groups: []}; },
watch: {userScopeDialog(value) { if (value) this.loadGroups(); }},
methods: {
async loadGroups() {
const result = await $.get('/platform/activity/basic/scope/getActivityUserScopeGroup');
if (result.code !== 0) { this.$message.error(result.msg); return; }
this.groups = result.data || [];
this.$emit('group_change');
}
}
};
</script>
@@ -1,7 +1,7 @@
<template>
<div>
<div v-if="view">
<a v-for="file in files" :key="file.id || file.filepath" :href="file.filepath || preview(file.id)" target="_blank" style="display:block">{{ file.filename || file.name }}</a>
<a v-for="file in files" :key="file.id || file.filepath" :href="file.downloadPath || file.filepath || preview(file.id)" target="_blank" style="display:block">{{ file.name || file.filename }}</a>
</div>
<el-upload v-else action="/platform/inclusiveTherapyV3/common/uploadFile" name="file"
:limit="max" :multiple="max > 1" :file-list="fileList" :drag="card"
@@ -17,7 +17,7 @@ module.exports = {
max: {type: Number, default: 10}, type: Array, max_size: Number},
data() { return {fileList: []}; },
watch: {files: {immediate: true, deep: true, handler(files) {
this.fileList = (files || []).map(file => ({name: file.filename || file.name, url: file.filepath || therapyPreview(file.id), rawInfo: file}));
this.fileList = (files || []).map(file => ({name: file.name || file.filename, url: file.downloadPath || file.filepath || therapyPreview(file.id), rawInfo: file}));
}}},
methods: {
preview: therapyPreview,
@@ -28,15 +28,19 @@ module.exports = {
return true;
},
success(result, file, list) {
if (result.code !== 0) { this.$message.error(result.msg); return; }
if (result.code !== 0) {
list.splice(list.indexOf(file), 1);
this.$message.error(result.msg); return;
}
file.rawInfo = result.data;
file.url = result.data.downloadPath || result.data.filepath;
this.emit(list);
},
remove(file, list) { this.emit(list); },
emit(list) {
this.$emit('update:files', list.map(file => file.rawInfo || file.response && file.response.data).filter(Boolean));
},
open(file) { window.open(file.url || file.rawInfo && file.rawInfo.filepath); }
open(file) { window.open(file.url || file.rawInfo && (file.rawInfo.downloadPath || file.rawInfo.filepath)); }
}
};
</script>
@@ -8,11 +8,12 @@
</template>
<script>
module.exports = {
props: {value: {type: Array, default: () => []}, limit: {type: Number, default: 1},
props: {value: {type: [String, Array], default: ''}, limit: {type: Number, default: 1},
width: {type: Number, default: 100}, height: {type: Number, default: 100}, fileType: Array, fileSize: Number},
data() { return {fileList: []}; },
watch: {value: {immediate: true, deep: true, handler(values) {
this.fileList = (values || []).map((value, index) => ({name: '图片' + (index + 1), url: therapyPreview(value)}));
const items = Array.isArray(values) ? values : values ? [values] : [];
this.fileList = items.map((value, index) => ({name: '图片' + (index + 1), url: therapyPreview(value), storedValue: value}));
}}},
methods: {
beforeUpload(file) {
@@ -25,12 +26,19 @@ module.exports = {
return true;
},
success(result, file, list) {
if (result.code !== 0) { this.$message.error(result.msg); return; }
if (result.code !== 0) {
list.splice(list.indexOf(file), 1);
this.$message.error(result.msg); return;
}
file.url = result.data.filepath;
file.storedValue = result.data.filepath;
this.emit(list);
},
remove(file, list) { this.emit(list); },
emit(list) { this.$emit('input', list.map(file => file.response ? file.response.data.filepath : file.url)); },
emit(list) {
const values = list.map(file => file.storedValue).filter(Boolean);
this.$emit('input', Array.isArray(this.value) ? values : values[0] || '');
},
open(file) { window.open(file.url); }
}
};
@@ -448,10 +448,11 @@ module.exports = {
methods: {
// 返回布尔值
beforeRead(file) {
if (Array.isArray(file)) return file.every(item => this.beforeRead(item));
const lastIndexOf = file.name.lastIndexOf(".")
const type = this.type.map(v => v.toLowerCase()).includes(file.name.substr(lastIndexOf + 1).toLowerCase())
if (!type) {
this.$message.warning(`上传文件只能是 ${this.type.map(v => v.toLowerCase()).join("/")} 格式!`);
this.$toast(`上传文件只能是 ${this.type.map(v => v.toLowerCase()).join("/")} 格式!`);
return false;
}
return true;
@@ -466,13 +467,11 @@ module.exports = {
* 查看资源
*/
showSource(showItem) {
const show = this.resolvingShowByFileName(showItem.filepath)
const show = this.resolvingShowByFileName(showItem.name || showItem.filename || '')
if (show == 1 || show == 2 || show == 3) {
$('.viewFile').viewer({
url: 'src',
});
window.open(showItem.downloadPath || showItem.filepath || therapyPreview(showItem.id));
} else if (show == 4 || show == 5 || show == 7) {
preview(showItem.filepath, showItem.id)
preview(showItem.name || showItem.filename, showItem.id)
}
},
/**
@@ -596,9 +595,13 @@ module.exports = {
return FILE_DOMAIN + fileItem;
},
change(fileList) {
this.$emit("update:files", fileList.map(v => v.data))
this.$emit("update:files", fileList.map(v => v.data).filter(Boolean))
},
afterRead(file) {
if (Array.isArray(file)) {
file.forEach(item => this.afterRead(item));
return;
}
file.status = 'uploading';
file.message = '上传中...';
@@ -616,7 +619,12 @@ module.exports = {
if (code === 0) {
file.status = 'success';
file.data = data
file.url = data.downloadPath || data.filepath || therapyPreview(data.id)
this.change(this.fileList)
} else {
file.status = 'failed';
file.message = res.msg || '上传失败';
this.$toast.fail(file.message);
}
},
error: (err) => {
@@ -627,18 +635,19 @@ module.exports = {
},
doDelete(file) {
if (file.data) {
const {filename, filepath} = file.data
if (this.del) {
$.post(FILE_DELETE_ADDRESS, {filepath})
const {id} = file.data
if (this.del && id) {
$.post(FILE_DELETE_ADDRESS, {id})
}
this.change(this.fileList)
}
},
clickPreview(file) {
const {filepath, id} = file.data
const show = this.resolvingShowByFileName(filepath)
if (!file.data) return;
const {filename, name, id} = file.data
const show = this.resolvingShowByFileName(name || filename || '')
if (show == 4 || show == 5 || show == 7) {
preview(filepath, id)
preview(name || filename, id)
}
},
updateFileList(val) {
@@ -647,15 +656,15 @@ module.exports = {
return
}
const pending = this.fileList.filter(file => !file.data);
this.fileList = val.map(v => {
let url = ''
if (this.resolvingShowByFileName(v.filename) == 1) {
url = APP_DOMAIN + '/platform/inclusiveTherapyV3/common/preview?id=' + v.id
console.log(url)
return {data: v, url, isImage: true, file: {name: v.filename}, status: 'success'}
const name = v.name || v.filename || ''
const url = v.downloadPath || v.filepath || therapyPreview(v.id)
if (this.resolvingShowByFileName(name) == 1) {
return {data: v, url, isImage: true, file: {name}, status: 'success'}
}
return {data: v, url, file: {name: v.filename}, status: 'success'}
})
return {data: v, url, file: {name}, status: 'success'}
}).concat(pending)
},
},
created() {
@@ -668,4 +677,4 @@ module.exports = {
.van-image-preview .van-image-preview__close-icon--top-right {
font-size: 50px !important;
}
</style>
</style>
@@ -715,7 +715,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
signUpStartTime: null,
signUpEndTime: null,
changeEndTime: null,
files: [],
files: '',
signUpMode: null,
createMode: null,
playStartTime: null,
@@ -1,5 +1,12 @@
<!--#
layout("/layouts/platform.html"){
#-->
<!--# if(therapyShowTabs){ #-->
<div style="padding:10px;background:#fff;border-bottom:1px solid #eee">
<!--# for(tab in therapyTabs){ #-->
<a class="btn btn-default" href="/platform/inclusiveTherapyV3?screen=${tab[0],escape}">${tab[1],escape}</a>
<!--# } #-->
</div>
<!--# } #-->
<iframe src="${therapyPageUrl,escape}" title="普惠疗休养V3" style="width:100%;height:calc(100vh - 100px);border:0;background:#fff"></iframe>
<!--# } #-->
@@ -1,6 +1,6 @@
<!doctype html>
<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<title>?????</title>
<title>普惠疗休养V3</title>
<script src="${base!}/assets/platform/plugins/vue/vue.js"></script>
<script src="${base!}/assets/platform/plugins/jquery/jquery.js"></script>
<script src="${base!}/assets/platform/plugins/vue-http-loader/httpVueLoader.js"></script>
@@ -1,6 +1,6 @@
<!doctype html>
<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<title>?????</title>
<title>普惠疗休养V3</title>
<script src="${base!}/assets/platform/plugins/vue/vue.js"></script>
<script src="${base!}/assets/platform/plugins/jquery/jquery.js"></script>
<script src="${base!}/assets/platform/plugins/vue-http-loader/httpVueLoader.js"></script>
@@ -10,6 +10,8 @@
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="${base!}/assets/platform/fonts/font-awesome.min.css">
<link rel="stylesheet" href="${base!}/assets/platform/fonts/themify-icons.css">
<link rel="stylesheet" href="${base!}/assets/platform/plugins/viewerjs/viewer.css">
<script src="${base!}/assets/platform/plugins/viewerjs/viewer.js"></script>
<link rel="stylesheet" href="${base!}/assets/staffbenefit/therapyRecuperation/css/common.css">
<link rel="stylesheet" href="${base!}/assets/staffbenefit/therapyRecuperation/css/main.css">
<link rel="stylesheet" href="${base!}/assets/staffbenefit/therapyRecuperation/css/elmain.css">