This commit is contained in:
JyuHsin
2025-03-25 14:39:36 +08:00
parent 7084976d72
commit 0a1214c1de
@@ -115,7 +115,7 @@ layout("/mobile/platform.html"){
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak v-if="isLoad">
<van-nav-bar <van-nav-bar
:title="site.name" :title="site.name"
left-arrow left-arrow
@@ -149,7 +149,7 @@ layout("/mobile/platform.html"){
</div> </div>
<div class="container"> <div class="container">
<table v-if="weekList.find(o => o.day === selectDate)?.disabled === false"> <table v-if="weekList.find(o => moment(o.day).unix() === moment(selectDate).unix())?.disabled === false">
<tr v-for="item in timeData"> <tr v-for="item in timeData">
<td class="time">{{item.start_time + '-' + item.end_time}}</td> <td class="time">{{item.start_time + '-' + item.end_time}}</td>
<td> <td>
@@ -224,6 +224,7 @@ layout("/mobile/platform.html"){
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
isLoad: false,
person: "${@shiro.getPrincipalProperty('username')}", person: "${@shiro.getPrincipalProperty('username')}",
unit: "${@shiro.getPrincipalProperty('unit').getName()}", unit: "${@shiro.getPrincipalProperty('unit').getName()}",
phone: "${@shiro.getPrincipalProperty('mobile')}", phone: "${@shiro.getPrincipalProperty('mobile')}",
@@ -305,9 +306,16 @@ layout("/mobile/platform.html"){
while (wk.length < 7) { while (wk.length < 7) {
const addDate = moment(startDate).add(count, 'd') const addDate = moment(startDate).add(count, 'd')
const addDateFormat = moment(addDate).format('YYYY-MM-DD') const addDateFormat = moment(addDate).format('YYYY-MM-DD')
let dis = false
if(this.site.openWeekTime && !this.site.openWeekTime.includes(addDate.day())) {
dis = true
}
if(this.site.notApplyTimeList && this.site.notApplyTimeList?.includes(addDateFormat)) {
dis = true
}
wk.push({ wk.push({
day: addDate, day: addDate,
disabled: !this.site.openWeekTime.includes(addDate.day()) || this.site.notApplyTimeList.includes(addDateFormat) disabled: dis
}) })
count++ count++
} }
@@ -427,7 +435,7 @@ layout("/mobile/platform.html"){
this.selectDate = this.getLatestWorkDay() this.selectDate = this.getLatestWorkDay()
this.setWeekList(this.selectDate) this.setWeekList(this.selectDate)
await this.getMyReservation() await this.getMyReservation()
this.isLoad = true
} }
}) })
</script> </script>