commit
This commit is contained in:
@@ -105,7 +105,7 @@ const apply = {
|
||||
watch: {
|
||||
applyTime() {
|
||||
this.$nextTick(async () => {
|
||||
await this.queryAllowTime()
|
||||
await this.queryAllowDay()
|
||||
})
|
||||
},
|
||||
},
|
||||
@@ -166,7 +166,7 @@ const apply = {
|
||||
},
|
||||
async onOpen(row, applyRow = null) {
|
||||
this.row = row
|
||||
await this.queryAllowTime()
|
||||
await this.queryAllowDay()
|
||||
if(applyRow) {
|
||||
this.taskId = applyRow.taskId
|
||||
this.bizId = applyRow.bizId
|
||||
@@ -231,11 +231,11 @@ const apply = {
|
||||
}
|
||||
},
|
||||
// 查询哪些天是开放的
|
||||
async queryAllowTime() {
|
||||
async queryAllowDay() {
|
||||
const days = Array.from(document.querySelectorAll('.div-Calendar'))
|
||||
.map(el => el.getAttribute('data-day'))
|
||||
.sort()
|
||||
const {data} = await this.$axios.post("/platform/site/apply/queryAllowTime", {
|
||||
const {data} = await this.$axios.post("/platform/site/apply/queryAllowDay", {
|
||||
siteId: this.row.id,
|
||||
startTime: days[0],
|
||||
endTime: days[days.length - 1],
|
||||
@@ -254,17 +254,17 @@ const apply = {
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.div-Calendar {
|
||||
::v-deep .div-Calendar {
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
}
|
||||
.div-Calendar p {
|
||||
::v-deep .div-Calendar p {
|
||||
margin: 0;
|
||||
}
|
||||
.el-calendar-day:has(.not-allow-day) {
|
||||
::v-deep .el-calendar-day:has(.not-allow-day) {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.el-dialog__body {
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0;
|
||||
}
|
||||
`
|
||||
|
||||
@@ -3,19 +3,7 @@ layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.div-Calendar {
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
}
|
||||
.div-Calendar p {
|
||||
margin: 0;
|
||||
}
|
||||
.el-calendar-day:has(.not-allow-day) {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.el-dialog__body {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
@@ -140,7 +140,7 @@ const basicForm = {
|
||||
style="width: 100%"
|
||||
placeholder="开始时间"
|
||||
v-model="row.startTime"
|
||||
:picker-options="{ start: '00:00',step: '00:30',end: '24:00'}">
|
||||
:picker-options="{ start: '00:00',step: '00:30',end: '23:59'}">
|
||||
</el-time-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -150,7 +150,7 @@ const basicForm = {
|
||||
style="width: 100%"
|
||||
placeholder="结束时间"
|
||||
v-model="row.endTime"
|
||||
:picker-options="{start: '00:00',step: '00:30',end: '24:00',minTime: row.start_time }">
|
||||
:picker-options="{start: '00:00',step: '00:30',end: '23:59',minTime: row.start_time }">
|
||||
</el-time-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
Reference in New Issue
Block a user