|
@@ -37,7 +37,7 @@
|
|
|
<div style="margin-top:6px;border-bottom: 1px solid lightgray"></div>
|
|
|
</p>
|
|
|
<div v-for="(item, index) in data.doctorSources" :key="index">
|
|
|
- <van-cell center is-link @click="toDoctorArangement(item)">
|
|
|
+ <van-cell center is-link @click="handleClickDoctor(item)">
|
|
|
<template #icon>
|
|
|
<van-image
|
|
|
style="width: 44.11px; height: 60.36px"
|
|
@@ -66,6 +66,7 @@ import { getOneWeekText, getNextSevenDate } from '../../../utils/date'
|
|
|
import { onMounted, reactive } from 'vue'
|
|
|
import { getSourcesByDate, getDoctorSources } from '../../../api/appointment'
|
|
|
import store from '../../../store'
|
|
|
+import {showConfirmDialog} from "vant";
|
|
|
|
|
|
const screenSize = store.state.screenSize
|
|
|
const labelStyle = {
|
|
@@ -116,10 +117,26 @@ const handleClickDate = (index, isFromMounted) => {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-const toDoctorArangement = (val) => {
|
|
|
+const handleClickDoctor = (val) => {
|
|
|
+ if (val.isrubric === '1') {
|
|
|
+ showConfirmDialog({
|
|
|
+ title: '温馨提示',
|
|
|
+ message: val.rubricTxt
|
|
|
+ }).then(() => {
|
|
|
+ toAppointment(val)
|
|
|
+ }).catch(() => {
|
|
|
+ console.log('cancel choose doctor')
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ toAppointment(val)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function toAppointment(val) {
|
|
|
const to = '/doctorArrangement/' + data.dateSelected + '/' + deptCode + '/' + val.doctorCode
|
|
|
router.push(to)
|
|
|
}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
const param = {
|
|
|
start: data.nextSevenDate[0].fullDate,
|