From f8c3dd87bb7c89e6b00cae3bc376b5e888e0f355 Mon Sep 17 00:00:00 2001 From: "@jyuhsin" <729757837@qq.com> Date: Mon, 12 May 2025 11:23:28 +0800 Subject: [PATCH] commit --- .../site/SiteReserveController.java | 127 ++++- .../activity/models/ActivitySiteInfo.java | 32 +- .../activity/models/ActivitySiteReserve.java | 5 + .../activity/services/SiteReserveService.java | 4 + .../services/impl/SiteReserveServiceImpl.java | 33 ++ .../components/activity/site/ReserveInfo.vue | 97 +--- .../views/mobile/activity/site/info.html | 81 ++- .../views/mobile/activity/site/reserve.html | 94 ++-- .../platform/activity/site/SiteManage.html | 206 ++++---- .../platform/activity/site/SiteRecord.html | 3 - .../platform/activity/site/SiteReserve.html | 473 +++++------------- 11 files changed, 489 insertions(+), 666 deletions(-) diff --git a/src/main/java/io/v/nutz/activity/controller/site/SiteReserveController.java b/src/main/java/io/v/nutz/activity/controller/site/SiteReserveController.java index 23254c0..6786107 100644 --- a/src/main/java/io/v/nutz/activity/controller/site/SiteReserveController.java +++ b/src/main/java/io/v/nutz/activity/controller/site/SiteReserveController.java @@ -1,15 +1,22 @@ package io.v.nutz.activity.controller.site; +import cn.hutool.core.date.DateField; +import cn.hutool.core.date.DateTime; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; import cn.wizzer.framework.base.Result; +import io.v.nutz.activity.models.ActivitySiteInfo; import io.v.nutz.activity.models.ActivitySiteReserve; +import io.v.nutz.activity.models.ActivityType; import io.v.nutz.activity.services.ActivityCommonService; import io.v.nutz.activity.services.SiteInfoService; import io.v.nutz.activity.services.SiteReserveService; import io.v.nutz.annontation.ViReturn; import io.v.nutz.base.utils.MsgApi; import io.v.nutz.base.utils.PageUtil; +import io.v.nutz.constant.AuditTypeEnum; +import io.v.nutz.modules.models.AuditState; import io.v.nutz.sys.models.Sys_user; import io.v.nutz.sys.services.SysUnitService; import io.v.nutz.sys.services.SysUserService; @@ -33,7 +40,9 @@ import org.nutz.mvc.annotation.Ok; import org.nutz.mvc.annotation.Param; import java.util.ArrayList; +import java.util.Date; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -153,6 +162,17 @@ public class SiteReserveController { @ViReturn public Object doAdd(@Param("data") ActivitySiteReserve activitySiteReserve, @Param("days") String[] days) { + Map validateSiteReserve = siteReserveService.validateSiteReserve( + activitySiteReserve.getSite_id(), + activitySiteReserve.getReserve_day(), + activitySiteReserve.getStart_time(), + activitySiteReserve.getEnd_time(), + activitySiteReserve.getJoinCount() + ); + if(validateSiteReserve.containsKey(false)) { + return Result.error(validateSiteReserve.get(false)); + } + String r = R.UU32(); activitySiteReserve.setSqid(r); @@ -178,8 +198,7 @@ public class SiteReserveController { siteReserveService.insert(activitySiteReserve); } - //发送微信提醒审核人 - //查询状态码对应的审核人 + //发送微信提醒审核人,查询状态码对应的审核人 Sql sql = Sqls.create(""" select userId,u.loginname,u.username from audit_state_user asu left join `user` u on u.id = asu.userId left join audit_state s on s.stateId=asu.stateId $condition @@ -348,17 +367,17 @@ public class SiteReserveController { List stateList = list.stream().map(o -> o.getString("stateId")).collect(Collectors.toList()); Sql i = Sqls.create(""" - SELECT + SELECT ar.*, - `as`.stateAuditType - FROM + `as`.stateAuditType + FROM activity_site_reserve ar left join audit_state `as` on `as`.stateId = ar.reserve_state $condition """); - cnd.and("site_id", "=", site_id) + cnd.and("site_id", "=", site_id); //.and("reserve_day", "=", reserve_day) - .and("reserve_state", "not in", stateList); + // .and("reserve_state", "not in", stateList); i.setCondition(cnd); List list1 = siteReserveService.list(i); @@ -367,4 +386,98 @@ public class SiteReserveController { return record; } + @At + @ViReturn + public Object getAllowTime(String siteId, Integer year, Integer month) { + if(StrUtil.isBlank(siteId)) { + return new ArrayList<>(); + } + // 构造该月的第一天,并设置为当天的 00:00:00 + Date startDate = DateUtil.parse(year + "-" + month + "-01", "yyyy-MM-dd"); + startDate = DateUtil.beginOfMonth(startDate); + // 获取该月最后一天 23:59:59 + Date endDate = DateUtil.endOfMonth(startDate); + // 获取该月的所有日期(包含第一天到最后一天) + List dateList = DateUtil.rangeToList(startDate, endDate, DateField.DAY_OF_MONTH); + // 找出第一个日期往前 7 天,最后一个日期往后 15 天 + Date newStartDate = DateUtil.offsetDay(startDate, -7); // 往前 7 天 + Date newEndDate = DateUtil.offsetDay(endDate, 15); // 往后 15 天 + // 获取新的日期范围(包含前后扩展的日期) + List fullDateList = DateUtil.rangeToList(newStartDate, newEndDate, DateField.DAY_OF_MONTH); + + //查询场地 + ActivitySiteInfo siteInfo = siteInfoService.fetch(siteId); + List openHours = siteInfo.getOpen_hours(); + List weekNumList = openHours.stream().map(o -> o.getInt("weekNum")).distinct().collect(Collectors.toList()); + + List result = new ArrayList<>(); + //循环时间段 + for (DateTime day : fullDateList) { + //先判断星期 + int week = day.dayOfWeek() - 1; + if(weekNumList.contains(week)) { + result.add(DateUtil.format(day, "yyyy-MM-dd")); + } + } + return result; + } + + @At + @ViReturn + public Object getTimesByDay(String siteId, String day) { + //获取场地 + ActivitySiteInfo siteInfo = siteInfoService.fetch(siteId); + List openHours = siteInfo.getOpen_hours(); + Integer maxNum = siteInfo.getMaxNum(); + + //获取星期 + DateTime dateTime = DateUtil.parse(day); + int week = dateTime.dayOfWeek() - 1; + + List result = new ArrayList<>(); + //这个是满足星期的所有时间 + List mapList = openHours.stream().filter(o -> o.getInt("weekNum") == week).collect(Collectors.toList()); + for (NutMap nutMap : mapList) { + String startTime = nutMap.getString("start_time"); + String endTime = nutMap.getString("end_time"); + int timeUnit = nutMap.getInt("timeUnit"); + if(timeUnit == 0) { + result.add(NutMap.NEW().addv("start_time", startTime).addv("end_time", endTime)); + } else { + // 构造起始时间 + DateTime start = DateUtil.parse(startTime, "HH:mm"); // "09:00" + DateTime end = DateUtil.parse(endTime, "HH:mm"); // "17:00" + DateTime current = start; + while (DateUtil.compare(current, end) < 0) { // 当前时间 <= 结束时间 + DateTime next = DateUtil.offsetSecond(current, (int) (timeUnit * 3600)); + // 如果超过结束时间,则使用 endTime + if (DateUtil.compare(next, end) > 0) { + result.add(NutMap.NEW().addv("start_time", DateUtil.format(current, "HH:mm")).addv("end_time", DateUtil.format(end, "HH:mm"))); + break; + } else { + result.add(NutMap.NEW().addv("start_time", DateUtil.format(current, "HH:mm")).addv("end_time", DateUtil.format(next, "HH:mm"))); + } + current = next; + } + } + } + + ActivityType type = siteInfoService.dao().fetch(ActivityType.class, siteInfo.getTypeId()); + List stateList = siteInfoService.dao().query(AuditState.class, Cnd.where("module", "=", type.getModuleName()).and("stateAuditType", "!=", AuditTypeEnum.REJECT.getValue())); + //找预约记录 + for (NutMap nutMap : result) { + List reserveList = siteInfoService.dao().query( + ActivitySiteReserve.class, + Cnd.where("site_id", "=", siteId) + .and("reserve_day", "=", day) + .and("start_time", "=", nutMap.getString("start_time")) + .and("end_time", "=", nutMap.getString("end_time")) + .and("reserve_state", "in", stateList.stream().map(AuditState::getStateId).collect(Collectors.toList())) + ); + int count = reserveList.stream().mapToInt(ActivitySiteReserve::getJoinCount).sum(); + nutMap.addv("allowCount", maxNum); + nutMap.addv("hasCount", count); + } + return result; + } } diff --git a/src/main/java/io/v/nutz/activity/models/ActivitySiteInfo.java b/src/main/java/io/v/nutz/activity/models/ActivitySiteInfo.java index b705858..15be75f 100644 --- a/src/main/java/io/v/nutz/activity/models/ActivitySiteInfo.java +++ b/src/main/java/io/v/nutz/activity/models/ActivitySiteInfo.java @@ -51,7 +51,7 @@ public class ActivitySiteInfo { @Column @Comment("开放时段") @ColDefine(type = ColType.MYSQL_JSON) - private List open_hours; + private List open_hours; @Column @Comment("创建人") @@ -68,28 +68,28 @@ public class ActivitySiteInfo { @ColDefine(type = ColType.INT) private Integer typeId; - @Column - @Comment("是否多次预约") - @ColDefine(type = ColType.BOOLEAN) - private Boolean multiple; - - @Column - @Comment("限定工作日预约") - @ColDefine(type = ColType.BOOLEAN) - private Boolean workday; - @Column @Comment("限制男女,0表示不限制,1表示限制男,2表示限制女") @ColDefine(type = ColType.INT) private Integer sexLimit; - @Column - @Comment("预约时间") - @ColDefine(type = ColType.MYSQL_JSON) - private List openWeekTime; - @Column @Comment("场地的禁用时间") @ColDefine(type = ColType.MYSQL_JSON) private List notApplyTimeList; + + @Column + @Comment("场地介绍") + @ColDefine(type = ColType.TEXT) + private String introduce; + + @Column + @Comment("可容纳人数") + @ColDefine(type = ColType.INT) + private Integer maxNum; + + @Column + @Comment("面向预约对象(1.面向分工会,2.面向个人,3.面向集体)") + @ColDefine(type = ColType.INT) + private Integer reserveTarget; } diff --git a/src/main/java/io/v/nutz/activity/models/ActivitySiteReserve.java b/src/main/java/io/v/nutz/activity/models/ActivitySiteReserve.java index 72f7509..9220118 100644 --- a/src/main/java/io/v/nutz/activity/models/ActivitySiteReserve.java +++ b/src/main/java/io/v/nutz/activity/models/ActivitySiteReserve.java @@ -122,4 +122,9 @@ public class ActivitySiteReserve extends BaseModel { @Comment("参与人员") @ColDefine(type = ColType.VARCHAR, width = 200) private String joinUser; + + @Column + @Comment("预约人数") + @ColDefine(type = ColType.INT) + private Integer joinCount; } diff --git a/src/main/java/io/v/nutz/activity/services/SiteReserveService.java b/src/main/java/io/v/nutz/activity/services/SiteReserveService.java index 52cb68b..fc99013 100644 --- a/src/main/java/io/v/nutz/activity/services/SiteReserveService.java +++ b/src/main/java/io/v/nutz/activity/services/SiteReserveService.java @@ -4,5 +4,9 @@ package io.v.nutz.activity.services; import cn.wizzer.framework.base.service.BaseService; import io.v.nutz.activity.models.ActivitySiteReserve; +import java.util.Map; + public interface SiteReserveService extends BaseService { + + Map validateSiteReserve(String siteId, String day, String startTime, String endTime, Integer joinCount); } diff --git a/src/main/java/io/v/nutz/activity/services/impl/SiteReserveServiceImpl.java b/src/main/java/io/v/nutz/activity/services/impl/SiteReserveServiceImpl.java index f839903..adbc99b 100644 --- a/src/main/java/io/v/nutz/activity/services/impl/SiteReserveServiceImpl.java +++ b/src/main/java/io/v/nutz/activity/services/impl/SiteReserveServiceImpl.java @@ -2,11 +2,20 @@ package io.v.nutz.activity.services.impl; import cn.wizzer.framework.base.service.BaseServiceImpl; +import io.v.nutz.activity.models.ActivitySiteInfo; import io.v.nutz.activity.models.ActivitySiteReserve; +import io.v.nutz.activity.models.ActivityType; import io.v.nutz.activity.services.SiteReserveService; +import io.v.nutz.constant.AuditTypeEnum; +import io.v.nutz.modules.models.AuditState; +import org.nutz.dao.Cnd; import org.nutz.dao.Dao; import org.nutz.ioc.loader.annotation.IocBean; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + /** * @author: Aaron * @create: 2020-12-13 14:32 @@ -14,7 +23,31 @@ import org.nutz.ioc.loader.annotation.IocBean; **/ @IocBean(args = {"refer:dao"}) public class SiteReserveServiceImpl extends BaseServiceImpl implements SiteReserveService { + public SiteReserveServiceImpl(Dao dao) { super(dao); } + + @Override + public Map validateSiteReserve(String siteId, String day, String startTime, String endTime, Integer joinCount) { + ActivitySiteInfo siteInfo = dao().fetch(ActivitySiteInfo.class, siteId); + + ActivityType type = dao().fetch(ActivityType.class, siteInfo.getTypeId()); + + List stateList = dao().query(AuditState.class, Cnd.where("module", "=", type.getModuleName()).and("stateAuditType", "!=", AuditTypeEnum.REJECT.getValue())); + + List reserveList = dao().query( + ActivitySiteReserve.class, + Cnd.where("site_id", "=", siteId) + .and("reserve_day", "=", day) + .and("start_time", "=", startTime) + .and("end_time", "=", endTime) + .and("reserve_state", "in", stateList.stream().map(AuditState::getStateId).collect(Collectors.toList())) + ); + int count = reserveList.stream().mapToInt(ActivitySiteReserve::getJoinCount).sum(); + if((count + joinCount) >= siteInfo.getMaxNum()) { + return Map.of(false, "预约人数已满"); + } + return Map.of(true, ""); + } } diff --git a/src/main/resources/static/components/activity/site/ReserveInfo.vue b/src/main/resources/static/components/activity/site/ReserveInfo.vue index 012c4db..a62d05d 100644 --- a/src/main/resources/static/components/activity/site/ReserveInfo.vue +++ b/src/main/resources/static/components/activity/site/ReserveInfo.vue @@ -32,82 +32,27 @@ - - - - - {{ viewData.reserve_person }} - - - - - {{ viewData.sex }} - - - - - {{ viewData.loginname }} - - - - - {{ viewData.reserve_person_unit }} - - - - - {{ viewData.reserve_person_phone }} - - - - - - ({{ viewData.concat_day }}) {{ viewData.start_time }} - {{ viewData.end_time }} - - - - - - - - - - - - - {{ viewData.site_name }} - - - - - {{ viewData.state_name }} - {{ viewData.state_name }} - {{ viewData.state_name }} - - - - - - -
-
- -
{{ viewData.back_option }}
-
- -
+ + {{ viewData.reserve_person }} + {{ viewData.sex }} + {{ viewData.loginname }} + {{ viewData.reserve_person_unit }} + {{ viewData.reserve_person_phone }} + ({{ viewData.concat_day }}) {{ viewData.start_time }} - {{ viewData.end_time }} + {{ viewData.site_name }} + + {{ viewData.state_name }} + {{ viewData.state_name }} + {{ viewData.state_name }} + + +
+
+ +
+
+
diff --git a/src/main/resources/views/mobile/activity/site/info.html b/src/main/resources/views/mobile/activity/site/info.html index dd65b37..34fada0 100644 --- a/src/main/resources/views/mobile/activity/site/info.html +++ b/src/main/resources/views/mobile/activity/site/info.html @@ -44,7 +44,7 @@ layout("/mobile/platform.html"){ } .title { - font-size: 13px; + font-size: 14px; font-weight: bold; flex: 1; overflow: hidden; @@ -220,7 +220,6 @@ layout("/mobile/platform.html"){ | {{o.name}} -
{{o.address}}
{{o.meetingtypename}} @@ -230,21 +229,22 @@ layout("/mobile/platform.html"){
- -  联系人: - {{o.contact_person}} - - - - 联系方式:{{o.contact_phone}} - - - - 开放时间:工作日 - {{o.open_time}} - +
+ 场地地址: + {{o.address}} +
+
+  联系人: + {{o.contact_person}} +
+
+ 联系方式: + {{o.contact_phone}} +
+
+ 场地介绍: + 点我查看 +
@@ -258,35 +258,9 @@ layout("/mobile/platform.html"){ -
爱心母婴室管理规定
-
一、基本原则
-
-

1.使用对象:有哺乳需求的本校在职女教职工。

-

2.开放时间:工作日8:00--17:30。

-

3.使用制度:实行预约登记制。凡有哺乳需求的女教职工提前向校工会提出使用申请,经审核通过并开通权限后即可使用。

-

4.日常管理:由校工会负责。

-
- -
二、管理人员
-
-

1.负责爱心母婴室使用登记管理。

-

2.定期保养设备,确保正常使用。

-

3.保持室内整洁、卫生安全,做好保洁消毒记录。

-

4.定期收集意见和建议,不断改进服务。

-
-
三、使用人员
-
-

1.遵守学校安全管理制度和爱心母婴室管理规定。

-

2.严禁吸烟,安全使用电器,爱护公物,损坏赔偿。

-

3.保持室内卫生清洁,勿大声喧哗,不影响楼内工作秩序。

-

4.妥善保管自带物品,冰存的母乳须贴上姓名标签并及时取走。

-

5.不得擅自携他人入内,不做和哺乳无关事宜,使用完毕及时离开。

-

6.欢迎在《爱心母婴室使用意见簿》上留下您宝贵的意见和建议。

-
-
-

联系人:曾钰媛梦 84894774、15850692181

- - 已知晓并遵守 +
场地介绍
+
+ 关闭
@@ -302,10 +276,19 @@ layout("/mobile/platform.html"){ typeList: [], show: false, siteId: '', + viewData: {}, } }, methods: { + viewIntroduce(o) { + this.viewData = o + this.show = true + }, openView(o) { + if(o.reservetarget === 1 && "${@shiro.hasRole('H04')}" === 'false' && "${@shiro.hasRole('sysadmin')}" === 'false') { + vant.Toast('该场地只能分工会主席预约') + return + } this.siteId = o.id if (o.sexlimit === 1 || o.sexlimit === 2) { const sex = o.sexlimit === 1 ? '男' : '女' @@ -318,10 +301,6 @@ layout("/mobile/platform.html"){ location.href = '/mobile/activity/site/info/reserve?id=' + o.id } }, - toReserve() { - location.href = '/mobile/activity/site/info/reserve?id=' + this.siteId - this.show = false - }, doSearch() { this.pageForm.pageNumber = 1 this.tableData = [] @@ -356,4 +335,4 @@ layout("/mobile/platform.html"){ \ No newline at end of file +#--> diff --git a/src/main/resources/views/mobile/activity/site/reserve.html b/src/main/resources/views/mobile/activity/site/reserve.html index fdd07d2..34a7b15 100644 --- a/src/main/resources/views/mobile/activity/site/reserve.html +++ b/src/main/resources/views/mobile/activity/site/reserve.html @@ -179,11 +179,11 @@ layout("/mobile/platform.html"){ - {{person}} - ${@shiro.getPrincipalProperty('sex')} - ${@shiro.getPrincipalProperty('loginname')} - {{unit}} - {{phone}} + {{formData.reserve_person}} + {{formData.sex}} + {{formData.loginname}} + {{formData.reserve_person_unit}} + {{formData.reserve_person_phone}}
@@ -192,8 +192,13 @@ layout("/mobile/platform.html"){
{{site.name}} + + +
- 关闭 确认 @@ -226,10 +231,7 @@ layout("/mobile/platform.html"){ data() { return { isLoad: false, - person: "${@shiro.getPrincipalProperty('username')}", - unit: "${@shiro.getPrincipalProperty('unit').getName()}", - phone: "${@shiro.getPrincipalProperty('mobile')}", - message: '', + formData: {}, show: false, site_id: '', site: {}, @@ -241,8 +243,7 @@ layout("/mobile/platform.html"){ selectDate: null, //已经预约的记录 alreadyReserveRecord: [], - holidays: ['2022-06-03', '2022-06-04', '2022-06-05', '2022-09-10', '2022-09-11', '2022-09-12', - '2022-10-01', '2022-10-02', '2022-10-03', '2022-10-04', '2022-10-05', '2022-10-06', '2022-10-07',], + allowDayList: [], } }, computed: { @@ -269,11 +270,6 @@ layout("/mobile/platform.html"){ }, calendarFormatter() { return (day) => { - // 休息日不能选择 - /*let week = day.date.getDay() - if (week === 0 || week === 6) { - day.type = 'disabled' - }*/ return day } } @@ -307,7 +303,7 @@ layout("/mobile/platform.html"){ while (wk.length < 7) { const addDate = moment(startDate).add(count, 'd') let dis = false - if(this.site.openWeekTime && !this.site.openWeekTime.includes(addDate.day())) { + if(this.allowDayList.length > 0 && !this.allowDayList.includes(moment(addDate).format('YYYY-MM-DD'))) { dis = true } wk.push({ @@ -331,14 +327,27 @@ layout("/mobile/platform.html"){ vant.Toast('请选择要预约的时段') return } + this.$set(this.formData, "reserve_person", '${@shiro.getPrincipalProperty("username")}') + this.$set(this.formData, "sex", "${@shiro.getPrincipalProperty('sex')}") + this.$set(this.formData, "loginname", "${@shiro.getPrincipalProperty('loginname')}") + this.$set(this.formData, "reserve_person_unit", '${@shiro.getPrincipalProperty("unit").getName()}') + this.$set(this.formData, "reserve_person_phone", '${@shiro.getPrincipalProperty("mobile")}') + + if(this.site.reserveTarget === 1 || this.site.reserveTarget === 3) { + this.$set(this.formData, "joinCount", this.site.maxNum) + } else { + this.$set(this.formData, "joinCount", 1) + } + this.show = true }, async reserveDo() { const resp = await $.post('/mobile/activity/site/info/reserveDo', { siteId: this.site_id, times: JSON.stringify(this.times), - message: this.message, - joinUser: this.joinUser, + message: this.formData.message, + joinUser: this.formData.joinUser, + joinCount: this.formData.joinCount, }) if (resp.code === 0) { vant.Toast('预约成功') @@ -361,6 +370,7 @@ layout("/mobile/platform.html"){ if (index > -1) { this.times.splice(index, 1) } else { + this.times = [] cloneItem.day = this.selectDate.format('YYYY-MM-DD') cloneItem.fullDay = cloneItem.day + ' ' + cloneItem.start_time + '-' + cloneItem.end_time this.times.push(cloneItem) @@ -395,11 +405,7 @@ layout("/mobile/platform.html"){ if (now.getTime() >= new Date(end).getTime() && this.selectDate.format('YYYY-MM-DD') === moment().format('YYYY-MM-DD')) { return 0 } else { - if (this.site.multiple) { - return 1 - } else { - return item.hasReserve === true ? 2 : 1 - } + return item.hasCount >= item.allowCount ? 2 : 1 } }, async onLoad() { @@ -411,16 +417,11 @@ layout("/mobile/platform.html"){ this.loading = false }, async getReserve() { - const resp = await $.post('/mobile/activity/site/info/getReserve', { + const { data } = await $.get("/platform/activity/site/reserve/getTimesByDay", { siteId: this.site_id, day: moment(this.selectDate).format('YYYY-MM-DD'), }) - if (resp.code === 0) { - resp.data.forEach(item => { - item.isClick = true - }) - this.timeData = resp.data - } + this.timeData = data }, async getMyReservation() { const resp = await $.post('/mobile/activity/site/info/getMyReservation', { @@ -430,26 +431,23 @@ layout("/mobile/platform.html"){ this.alreadyReserveRecord = resp.data.map(v => v.reserve_day + " " + v.start_time + "-" + v.end_time) } }, - getLatestWorkDay() { - let selectDate = moment() - if(this.site.workday === true) { - if (selectDate.day() === 0) { - //周日 - selectDate = moment().add(1, 'd') - } else if (selectDate.day() === 6) { - //周六 - selectDate = moment().add(2, 'd') - } - } - return selectDate - } + async getAllowTime(year = null, month = null) { + const m = moment(this.selectDate, "YYYY年M月") + const { data } = await $.get("/platform/activity/site/reserve/getAllowTime", { + siteId: this.site_id, + year: year != null ? year : m.year(), + month: month != null ? month : m.month() + 1, + }) + this.allowDayList = data + }, }, async created() { this.site_id = getQueryString('id') + this.selectDate = moment() await this.getReserve() await this.onLoad() - this.selectDate = this.getLatestWorkDay() - this.setWeekList(this.selectDate) + await this.getAllowTime() + await this.setWeekList(this.selectDate) await this.getMyReservation() this.isLoad = true } diff --git a/src/main/resources/views/platform/activity/site/SiteManage.html b/src/main/resources/views/platform/activity/site/SiteManage.html index d8383e4..9d75fc4 100644 --- a/src/main/resources/views/platform/activity/site/SiteManage.html +++ b/src/main/resources/views/platform/activity/site/SiteManage.html @@ -2,9 +2,7 @@ layout("/layouts/platform.html"){ #-->
@@ -57,24 +55,6 @@ layout("/layouts/platform.html"){ - - - - - - - - - -