|
|
@ -39,11 +39,11 @@ |
|
|
|
> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="上午接种时间" prop="startTime"> |
|
|
|
<el-form-item label="上午接种时间" prop="morningTime"> |
|
|
|
<el-time-picker |
|
|
|
is-range |
|
|
|
arrow-control |
|
|
|
v-model="startTime" |
|
|
|
v-model="morningTime" |
|
|
|
format="HH:mm" |
|
|
|
value-format="HH:mm" |
|
|
|
range-separator="至" |
|
|
@ -56,11 +56,11 @@ |
|
|
|
> |
|
|
|
</el-time-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="下午接种时间" prop="endTime"> |
|
|
|
<el-form-item label="下午接种时间" prop="afterTime"> |
|
|
|
<el-time-picker |
|
|
|
is-range |
|
|
|
arrow-control |
|
|
|
v-model="endTime" |
|
|
|
v-model="afterTime" |
|
|
|
format="HH:mm" |
|
|
|
value-format="HH:mm" |
|
|
|
range-separator="至" |
|
|
@ -186,8 +186,8 @@ export default { |
|
|
|
}, |
|
|
|
keyWords: null, |
|
|
|
// organizationList: [], |
|
|
|
startTime: null, |
|
|
|
endTime: null, |
|
|
|
morningTime: null, |
|
|
|
afterTime: null, |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
@ -260,29 +260,29 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
startTimeChange() { |
|
|
|
if (Array.isArray(this.startTime) && this.startTime.length > 0) { |
|
|
|
let hour_0 = Number(this.startTime[0].substring(0, 2)); |
|
|
|
let hour_1 = Number(this.startTime[1].substring(0, 2)); |
|
|
|
if (Array.isArray(this.morningTime) && this.morningTime.length > 0) { |
|
|
|
let hour_0 = Number(this.morningTime[0].substring(0, 2)); |
|
|
|
let hour_1 = Number(this.morningTime[1].substring(0, 2)); |
|
|
|
if (hour_0 >= 12 || hour_1 >= 12) { |
|
|
|
this.$message.error("请选择00:00-11:59时间段的时间"); |
|
|
|
this.startTime = null; |
|
|
|
this.morningTime = null; |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.dataForm.moStartTime = this.startTime[0]; |
|
|
|
this.dataForm.moEndTime = this.startTime[1]; |
|
|
|
this.dataForm.moStartTime = this.morningTime[0]; |
|
|
|
this.dataForm.moEndTime = this.morningTime[1]; |
|
|
|
} |
|
|
|
}, |
|
|
|
endTimeChange() { |
|
|
|
if (Array.isArray(this.endTime) && this.endTime.length > 0) { |
|
|
|
let hour_0 = Number(this.endTime[0].substring(0, 2)); |
|
|
|
let hour_1 = Number(this.endTime[1].substring(0, 2)); |
|
|
|
if (Array.isArray(this.afterTime) && this.afterTime.length > 0) { |
|
|
|
let hour_0 = Number(this.afterTime[0].substring(0, 2)); |
|
|
|
let hour_1 = Number(this.afterTime[1].substring(0, 2)); |
|
|
|
if (hour_0 < 12 || hour_1 < 12) { |
|
|
|
this.$message.error("请选择12:00-23:59时间段的时间"); |
|
|
|
this.endTime = null; |
|
|
|
this.afterTime = null; |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.dataForm.afStartTime = this.endTime[0]; |
|
|
|
this.dataForm.afEndTime = this.endTime[1]; |
|
|
|
this.dataForm.afStartTime = this.afterTime[0]; |
|
|
|
this.dataForm.afEndTime = this.afterTime[1]; |
|
|
|
} |
|
|
|
}, |
|
|
|
closeSubmit() { |
|
|
@ -435,8 +435,8 @@ export default { |
|
|
|
...this.dataForm, |
|
|
|
...res.data, |
|
|
|
}; |
|
|
|
this.startTime = [res.data.moStartTime,res.data.moEndTime] |
|
|
|
this.endTime = [res.data.afStartTime,res.data.afEndTime] |
|
|
|
this.morningTime = [res.data.moStartTime,res.data.moEndTime] |
|
|
|
this.afterTime = [res.data.afStartTime,res.data.afEndTime] |
|
|
|
this.initMap(); |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
@ -448,11 +448,11 @@ export default { |
|
|
|
if (!valid) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.startTime === null){ |
|
|
|
if(this.morningTime === null){ |
|
|
|
this.$message.error('请填写上午接种时间'); |
|
|
|
return false |
|
|
|
} |
|
|
|
if(this.endTime === null ){ |
|
|
|
if(this.afterTime === null ){ |
|
|
|
this.$message.error('请填写下午接种时间'); |
|
|
|
return false |
|
|
|
} |
|
|
|