Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d452d4ad92 | ||
|
|
6ea864cb64 |
+2
-2
@@ -131,7 +131,7 @@ public class TherapyRecuperationModule {
|
||||
Sys_menu root = addMenu(module.getId(), "", "普惠疗休养V3", ROOT, "inclusiveTherapyV3", "pc");
|
||||
List<Sys_role> roles = dao.query(Sys_role.class, Cnd.where("disabled", "=", false));
|
||||
for (String[] screen : SCREENS) {
|
||||
Sys_menu menu = addMenu(module.getId(), root.getId(), screen[1], ROOT + "?screen=" + screen[0],
|
||||
Sys_menu menu = addMenu(module.getId(), root.getId(), screen[1], ROOT + screen[2],
|
||||
"inclusiveTherapyV3." + screen[3], "pc");
|
||||
int position = MENU_SCREENS.indexOf(screen[0]);
|
||||
dao.update(Sys_menu.class, Chain.make("showit", position >= 0)
|
||||
@@ -147,7 +147,7 @@ public class TherapyRecuperationModule {
|
||||
}
|
||||
}
|
||||
}
|
||||
Sys_menu signup = addMenu(module.getId(), root.getId(), "疗休养报名", ROOT + "?screen=signup", "inclusiveTherapyV3.signup", "pc");
|
||||
Sys_menu signup = addMenu(module.getId(), root.getId(), "疗休养报名", ROOT + "/mobile/index", "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) {
|
||||
|
||||
+5
-24
@@ -5,18 +5,16 @@ import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.therapyRecuperation.TherapyRecuperationModule;
|
||||
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;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/inclusiveTherapyV3")
|
||||
public class TherapyWorkspaceController {
|
||||
@At("")
|
||||
@SaCheckLogin
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/therapyRecuperation/index.html")
|
||||
public void index(String screen, HttpServletRequest request) {
|
||||
@Ok("void")
|
||||
public void index(String screen, HttpServletResponse response) throws IOException {
|
||||
if (screen == null) {
|
||||
for (String key : TherapyRecuperationModule.MENU_SCREENS) {
|
||||
for (String[] candidate : TherapyRecuperationModule.SCREENS) {
|
||||
@@ -41,23 +39,6 @@ public class TherapyWorkspaceController {
|
||||
}
|
||||
if (!found) throw new IllegalArgumentException("未知的普惠疗休养V3页面");
|
||||
}
|
||||
List<String[]> tabs = new ArrayList<>();
|
||||
String[][] groups = {{"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);
|
||||
response.sendRedirect(url);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -96,12 +96,12 @@ public class TheRapyRecuperationLineController {
|
||||
/**
|
||||
* 新线路导入模板中“联系方式”列下标,设置为文本格式避免手机号被Excel转成科学计数法。
|
||||
*/
|
||||
private static final int LINE_IMPORT_CONTACT_PHONE_COLUMN_INDEX = 10;
|
||||
private static final int LINE_IMPORT_CONTACT_PHONE_COLUMN_INDEX = 12;
|
||||
|
||||
/**
|
||||
* 新线路导入模板中“移动端缩略图”列下标,用于定位Excel内嵌图片。
|
||||
*/
|
||||
private static final int LINE_IMPORT_THUMBNAIL_COLUMN_INDEX = 13;
|
||||
private static final int LINE_IMPORT_THUMBNAIL_COLUMN_INDEX = 15;
|
||||
|
||||
@Inject
|
||||
private TheRapyRecuperationLineService lineService;
|
||||
@@ -458,7 +458,7 @@ public class TheRapyRecuperationLineController {
|
||||
List<String> excelLots = lots.stream().map(v -> v.getLotName() + "_" + v.getId()).collect(Collectors.toList());
|
||||
|
||||
List<Field> needAddReplaceFields = Arrays.stream(TheRapyLineImportExcelMode.class.getDeclaredFields())
|
||||
.filter(v -> List.of("lotId", "regionalNature", "signUpMode", "isEnabled").contains(v.getName()))
|
||||
.filter(v -> List.of("lotId", "regionalNature", "signUpMode", "isEnabled", "familySignUp").contains(v.getName()))
|
||||
.collect(Collectors.toList());
|
||||
for (Field field : needAddReplaceFields) {
|
||||
Excel excelAnnotation = field.getAnnotation(Excel.class);
|
||||
@@ -476,7 +476,7 @@ public class TheRapyRecuperationLineController {
|
||||
e.put("replace", buildRegionalNatureExcelOptions());
|
||||
} else if (field.getName().equals("signUpMode")) {
|
||||
e.put("replace", buildSignUpModeExcelOptions());
|
||||
} else if (field.getName().equals("isEnabled")) {
|
||||
} else if (field.getName().equals("isEnabled") || field.getName().equals("familySignUp")) {
|
||||
e.put("replace", new String[]{"是_是", "否_否"});
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -24,6 +24,9 @@ public class TheRapyLineImportExcelMode {
|
||||
@Excel(name = "线路类型")
|
||||
private String regionalNature;
|
||||
|
||||
@Excel(name = "旅行社名称")
|
||||
private String travelAgencyName;
|
||||
|
||||
@Excel(name = "交通工具")
|
||||
private String trafficTools;
|
||||
|
||||
@@ -33,6 +36,9 @@ public class TheRapyLineImportExcelMode {
|
||||
@Excel(name = "预计费用(元/人次)")
|
||||
private String estimatedCost;
|
||||
|
||||
@Excel(name = "家属报名")
|
||||
private String familySignUp;
|
||||
|
||||
@Excel(name = "组织形式")
|
||||
private String signUpMode;
|
||||
|
||||
|
||||
+19
@@ -16,6 +16,7 @@ import com.budwk.app.zhgh.staffbenefit.therapyRecuperation.model.TheRapyRecupera
|
||||
import com.budwk.app.zhgh.staffbenefit.therapyRecuperation.model.TheRapyRecuperationLine;
|
||||
import com.budwk.app.zhgh.staffbenefit.therapyRecuperation.model.TheRapyRecuperationLineUnionSelect;
|
||||
import com.budwk.app.zhgh.staffbenefit.therapyRecuperation.model.TheRapyRecuperationLot;
|
||||
import com.budwk.app.zhgh.staffbenefit.therapyRecuperation.model.TheRapyRecuperationTravelAgency;
|
||||
import com.budwk.app.zhgh.staffbenefit.therapyRecuperation.service.TheRapyRecuperationLineService;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.RenderingHints;
|
||||
@@ -229,6 +230,8 @@ public class TheRapyRecuperationLineServiceImpl extends TherapyServiceImpl<TheRa
|
||||
&& StrUtil.isBlank(mode.getLineContactPhone())
|
||||
&& StrUtil.isBlank(mode.getContent())
|
||||
&& StrUtil.isBlank(mode.getIsEnabled())
|
||||
&& StrUtil.isBlank(mode.getTravelAgencyName())
|
||||
&& StrUtil.isBlank(mode.getFamilySignUp())
|
||||
&& StrUtil.isBlank(mode.getFiles()));
|
||||
}
|
||||
|
||||
@@ -239,6 +242,12 @@ public class TheRapyRecuperationLineServiceImpl extends TherapyServiceImpl<TheRa
|
||||
* @param rowNumber Excel行号
|
||||
*/
|
||||
private void validImportRequired(TheRapyLineImportExcelMode mode, int rowNumber) {
|
||||
if (StrUtil.isBlank(mode.getTravelAgencyName())) {
|
||||
throw new IllegalArgumentException("第" + rowNumber + "行旅行社名称不能为空");
|
||||
}
|
||||
if (!StrUtil.equalsAny(StrUtil.trim(mode.getFamilySignUp()), "是", "否")) {
|
||||
throw new IllegalArgumentException("第" + rowNumber + "行家属报名必填,请填写是或否");
|
||||
}
|
||||
if (mode.getYear() == null) {
|
||||
throw new IllegalArgumentException("第" + rowNumber + "行年度不能为空");
|
||||
}
|
||||
@@ -268,7 +277,17 @@ public class TheRapyRecuperationLineServiceImpl extends TherapyServiceImpl<TheRa
|
||||
* @return 线路实体
|
||||
*/
|
||||
private TheRapyRecuperationLine buildLineByImportMode(TheRapyLineImportExcelMode mode, TheRapyLineImportImageMode imageMode, int rowNumber) {
|
||||
List<TheRapyRecuperationTravelAgency> agencies = dao().query(TheRapyRecuperationTravelAgency.class,
|
||||
Cnd.where("year", "=", mode.getYear()).and("travelAgencyName", "=", StrUtil.trim(mode.getTravelAgencyName())));
|
||||
if (agencies.isEmpty()) {
|
||||
throw new IllegalArgumentException("第" + rowNumber + "行旅行社名称在该年度不存在");
|
||||
}
|
||||
if (agencies.size() > 1) {
|
||||
throw new IllegalArgumentException("第" + rowNumber + "行旅行社名称在该年度存在重名,无法确定旅行社");
|
||||
}
|
||||
TheRapyRecuperationLine line = new TheRapyRecuperationLine();
|
||||
line.setTravelAgencyId(agencies.get(0).getId());
|
||||
line.setIsFamilySignUp("是".equals(StrUtil.trim(mode.getFamilySignUp())));
|
||||
line.setYear(mode.getYear());
|
||||
line.setSerialNumber(mode.getSerialNumber());
|
||||
line.setLineName(mode.getLineName());
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ public class TheRapyRecuperationLineUnionSelectServiceImpl extends TherapyServic
|
||||
us.playEndTime,
|
||||
us.changeEndTime,
|
||||
us.isOpen,
|
||||
us.signUpMode,
|
||||
IFNULL(us.signUpMode, line.signUpMode) AS signUpMode,
|
||||
line.createMode,
|
||||
gh.unionname AS createUnionName,
|
||||
u.username AS createUserName,
|
||||
|
||||
+9
@@ -13,6 +13,15 @@ import java.util.Collection;
|
||||
|
||||
@IocBean
|
||||
public class TherapyContext {
|
||||
public static boolean isEmbeddedPage() {
|
||||
return "1".equals(Mvcs.getReq().getParameter("therapyEmbedded"));
|
||||
}
|
||||
|
||||
public static String getEmbeddedPageUrl() {
|
||||
String query = Mvcs.getReq().getQueryString();
|
||||
return Mvcs.getReq().getRequestURI() + (Strings.isBlank(query) ? "?" : "?" + query + "&") + "therapyEmbedded=1";
|
||||
}
|
||||
|
||||
public static String getUserId() {
|
||||
return SecurityUtil.getUserId();
|
||||
}
|
||||
|
||||
@@ -15,84 +15,84 @@ 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,
|
||||
'旅行社管理', 'menu', '/platform/inclusiveTherapyV3/travelAgency', '_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,
|
||||
'线路管理', 'menu', '/platform/inclusiveTherapyV3/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,
|
||||
'分工会选择线路', 'menu', '/platform/inclusiveTherapyV3/lineFghSelect?mode=1', '_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,
|
||||
'校工会选择线路', 'menu', '/platform/inclusiveTherapyV3/lineXghSelect?mode=2', '_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,
|
||||
'满意度统计', 'menu', '/platform/inclusiveTherapyV3/query/statics', '_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,
|
||||
'分工会信息查询', 'menu', '/platform/inclusiveTherapyV3/query', '_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,
|
||||
'校工会信息查询', 'menu', '/platform/inclusiveTherapyV3/user/query', '_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,
|
||||
'线路选择查询', 'menu', '/platform/inclusiveTherapyV3/lineSelectionOverview', '_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,
|
||||
'成团结果通知', 'menu', '/platform/inclusiveTherapyV3/statistics', '_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,
|
||||
'基础设置', 'menu', '/platform/inclusiveTherapyV3/TheRapyConfig', '_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,
|
||||
'分工会线路选择统计', 'menu', '/platform/inclusiveTherapyV3/statistics/unionLineNumberStatistics', '_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,
|
||||
'人数统计', 'menu', '/platform/inclusiveTherapyV3/travelAgencyMonthlyStatistics', '_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';
|
||||
|
||||
|
||||
@@ -1,17 +1,6 @@
|
||||
const sublime = {
|
||||
jumpPagePjax(url) {
|
||||
window.location.href = url;
|
||||
},
|
||||
showLoadingbar() {
|
||||
if (!document.getElementById('therapy-loading')) {
|
||||
const bar = document.createElement('div');
|
||||
bar.id = 'therapy-loading';
|
||||
document.body.appendChild(bar);
|
||||
}
|
||||
},
|
||||
closeLoadingbar() {
|
||||
const bar = document.getElementById('therapy-loading');
|
||||
if (bar) bar.remove();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -89,7 +78,6 @@ Vue.directive('throttle', {
|
||||
$.ajaxSetup({
|
||||
traditional: true,
|
||||
error(xhr) {
|
||||
sublime.closeLoadingbar();
|
||||
const message = xhr.responseJSON && xhr.responseJSON.msg || '请求失败,请稍后重试';
|
||||
if (window.ELEMENT) ELEMENT.Message.error(message);
|
||||
else if (window.vant) vant.Toast.fail(message);
|
||||
|
||||
@@ -93,10 +93,8 @@ const initTableMixins = {
|
||||
},
|
||||
pageData(url) {
|
||||
const address = url ? url : loc() + "/pageData"
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
$.post(address, this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code == 0) {
|
||||
this.tableData = data.data.list;
|
||||
@@ -105,7 +103,6 @@ const initTableMixins = {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json").always(() => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -384,7 +384,7 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
return search(menus, []);
|
||||
}
|
||||
|
||||
const result = findMenuPath(this.menus, targetHref)
|
||||
const result = findMenuPath(this.menus, this.getMenuOwnerFullPath()) || findMenuPath(this.menus, targetHref)
|
||||
if(result){
|
||||
this.activeMenuIndex = result[result.length-1]['id']
|
||||
this.openedMenus = result.map(v=>v.id)
|
||||
@@ -399,6 +399,10 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
// 默认选中
|
||||
getMenuOwnerPath() {
|
||||
const pathname = window.location.pathname
|
||||
if (pathname === "/platform/inclusiveTherapyV3") {
|
||||
const screen = new URLSearchParams(window.location.search).get("screen")
|
||||
if (screen) return pathname + "?screen=" + encodeURIComponent(screen)
|
||||
}
|
||||
// API配置表单不是独立菜单,直接刷新表单地址时仍归属API配置菜单。
|
||||
if (pathname === "/platform/personGovernance/apiConfig/form") {
|
||||
return "/platform/personGovernance/apiConfig"
|
||||
|
||||
-2
@@ -954,14 +954,12 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
return data
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.states = JSON.stringify(pageForm.states)
|
||||
|
||||
$.post(loc() + "/pageData", pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
|
||||
-2
@@ -797,14 +797,12 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
this.unionOptions = data
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.states = JSON.stringify(pageForm.states)
|
||||
|
||||
$.post(loc() + "/pageData", pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
|
||||
-2
@@ -957,14 +957,12 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
return data
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.states = JSON.stringify(pageForm.states)
|
||||
|
||||
$.post(loc() + "/pageData", pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
|
||||
+10
-5
@@ -821,6 +821,13 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
const valid = await this.$validateForm(this.$refs['form'])
|
||||
if (!valid) return
|
||||
|
||||
const confirm = await this.$confirmAction('确定保存该线路吗?', '保存确认', {
|
||||
confirmButtonText: '确认保存',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
loading = this.$loading({
|
||||
lock: true,
|
||||
text: '提交中',
|
||||
@@ -829,6 +836,8 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
});
|
||||
delete this.formData.travelAgency
|
||||
const resp = await $.post(loc() + '/doSubmit', this.formData)
|
||||
loading.close()
|
||||
loading = null
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
await this.$confirm('需要将该线路设置为出行线路吗?', '提示', {
|
||||
@@ -836,11 +845,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
if ("${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('sysadmin')||@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('A06')}" === 'true') {
|
||||
sublime.jumpPagePjax('/platform/inclusiveTherapyV3/lineXghSelect?mode=2')
|
||||
} else {
|
||||
sublime.jumpPagePjax('/platform/inclusiveTherapyV3/lineFghSelect?mode=1')
|
||||
}
|
||||
window.top.location.href = '/platform/inclusiveTherapyV3/lineXghSelect?mode=2'
|
||||
}).catch(() => {
|
||||
this.$refs.guava.index()
|
||||
this.pageData()
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<!--# if(therapyShowTabs && therapyPageUrl != '/platform/inclusiveTherapyV3/line' && therapyPageUrl != '/platform/inclusiveTherapyV3/baseManagement'){ #-->
|
||||
<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>
|
||||
<!--# } #-->
|
||||
|
||||
+6
-1
@@ -1,3 +1,7 @@
|
||||
<!--# if(!@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.isEmbeddedPage()){ #-->
|
||||
<!--# layout("/layouts/platform.html"){ #-->
|
||||
<iframe src="${@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.getEmbeddedPageUrl(),escape}" title="普惠疗休养V3" style="width:100%;height:calc(100vh - 100px);border:0;background:#fff"></iframe>
|
||||
<!--# } } else { #-->
|
||||
<!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>普惠疗休养V3</title>
|
||||
@@ -47,5 +51,6 @@ Vue.directive('auth', {inserted(el, binding) {
|
||||
if (!requested.some(role => roles.includes(role))) el.parentNode.removeChild(el);
|
||||
}});
|
||||
</script>
|
||||
<style>body{margin:0;padding:12px;box-sizing:border-box;background:#f6f6f6} [v-cloak]{display:none} #therapy-loading{position:fixed;top:0;left:0;height:3px;width:100%;background:#409eff;z-index:99999}</style>
|
||||
<style>body{margin:0;padding:12px;box-sizing:border-box;background:#f6f6f6} [v-cloak]{display:none}</style>
|
||||
</head><body>${layoutContent}</body></html>
|
||||
<!--# } #-->
|
||||
|
||||
-7
@@ -1450,7 +1450,6 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
this.$message.warning('请先选择需要查看的记录');
|
||||
return
|
||||
}
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
const pageForm = clone(this.pageFormUser)
|
||||
pageForm.id = this.applyUserRow.id
|
||||
@@ -1466,7 +1465,6 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
.always(() => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
});
|
||||
this.$refs.guava.view()
|
||||
@@ -1505,7 +1503,6 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
this.tableLoading = true
|
||||
this.tableData = []
|
||||
$.post(loc() + "/getSelfUnionUser", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
@@ -1640,7 +1637,6 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
this.tableLoading = true
|
||||
this.tableData = []
|
||||
$.post(loc() + "/getLxsData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
@@ -1654,7 +1650,6 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
this.tableLoading = true
|
||||
this.tableData = []
|
||||
$.post(loc() + "/getJdData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
@@ -1668,7 +1663,6 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
this.tableLoading = true
|
||||
this.tableData = []
|
||||
$.post(loc() + "/getXlData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
@@ -1682,7 +1676,6 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
this.tableLoading = true
|
||||
this.tableData = []
|
||||
$.post(loc() + "/getRyData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
|
||||
-2
@@ -317,7 +317,6 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
return d ? d.label : null
|
||||
},
|
||||
async pageData() {
|
||||
sublime.showLoadingbar()
|
||||
this.tableLoading = true
|
||||
try {
|
||||
const resp = await $.post(loc() + '/pageData', this.pageForm)
|
||||
@@ -330,7 +329,6 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
} catch (error) {
|
||||
this.$actionError(error)
|
||||
} finally {
|
||||
sublime.closeLoadingbar()
|
||||
this.tableLoading = false
|
||||
}
|
||||
},
|
||||
|
||||
+10
-8
@@ -145,16 +145,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>-->
|
||||
<template slot-scope="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
|
||||
{{signUpModeName(signUpMode)}}
|
||||
<template slot-scope="{row}">
|
||||
<template v-if="column.prop==='signUpMode'">
|
||||
{{signUpModeName(row.signUpMode)}}
|
||||
</template>
|
||||
<template slot-scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
|
||||
{{createModeName(createMode)}}
|
||||
<template v-else-if="column.prop==='createMode'">
|
||||
{{createModeName(row.createMode)}}
|
||||
</template>
|
||||
<template slot-scope="{row}" v-else-if="column.prop==='belongUnionName'">
|
||||
<template v-else-if="column.prop==='belongUnionName'">
|
||||
{{pageForm.mode == 2 && pageForm.selectStatus == 1 ? '校工会' : row.belongUnionName}}
|
||||
</template>
|
||||
<template slot-scope="{row}" v-else-if="column.prop==='playTime'">
|
||||
<template v-else-if="column.prop==='playTime'">
|
||||
<template v-if="row.playTimes">
|
||||
<!--<el-tooltip placement="top">
|
||||
<div slot="content">
|
||||
@@ -183,13 +184,14 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
|
||||
选择并设置出行时间段
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="{row}" v-else-if="column.prop==='createUnionName'">
|
||||
<template v-else-if="column.prop==='createUnionName'">
|
||||
<span v-if="!row.isSelect">
|
||||
{{row.createUnionName}}
|
||||
</span>
|
||||
<span v-else>{{row.belongUnionName}}</span>
|
||||
</template>
|
||||
<template slot-scope="{row}" v-else>{{row[column.prop]}}</template>
|
||||
<template v-else>{{row[column.prop]}}</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="100px">
|
||||
|
||||
Reference in New Issue
Block a user