|
@@ -1,11 +1,10 @@
|
|
|
<template>
|
|
|
<window-size>
|
|
|
- <div style="margin-left: 5px">
|
|
|
- <van-tag round type="primary">
|
|
|
- {{ getDate() }}
|
|
|
- </van-tag>
|
|
|
- </div>
|
|
|
- <div style="height: 5px"></div>
|
|
|
+ <van-notice-bar
|
|
|
+ v-show="data.doctorSources.length > 0"
|
|
|
+ left-icon="warning-o"
|
|
|
+ text="挂号后,号源仅就诊当天有效,逾时失效!"
|
|
|
+ />
|
|
|
<van-grid direction="horizontal" :column-num="7">
|
|
|
<van-grid-item v-for="item in data.oneWeekText" :key="item" :text="'周' + item" />
|
|
|
</van-grid>
|
|
@@ -19,17 +18,11 @@
|
|
|
</van-grid-item>
|
|
|
</van-grid>
|
|
|
<div style="height: 5px"></div>
|
|
|
- <van-notice-bar
|
|
|
- v-show="data.doctorSources.length > 0"
|
|
|
- left-icon="warning-o"
|
|
|
- text="挂号后,号源仅就诊当天有效,逾时失效!"
|
|
|
- />
|
|
|
- <div style="height: 5px"></div>
|
|
|
<div v-for="(item, index) in data.doctorSources" :key="index">
|
|
|
<van-cell
|
|
|
center
|
|
|
- :title="item.doctorName"
|
|
|
- :label="item.chargeType"
|
|
|
+ :title="item.doctorName + ' | ' + item.chargeType"
|
|
|
+ :label="selectDate"
|
|
|
is-link
|
|
|
:to="'/doctorArrangement/' + data.dateSelected + '/' + deptCode + '/' + item.doctorCode"
|
|
|
>
|
|
@@ -45,8 +38,8 @@
|
|
|
<script>
|
|
|
import empty from '../../../assets/empty.png'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
-import { getDate, getOneWeekText, getNextSevenDate } from '../../../utils/date'
|
|
|
-import { onMounted, reactive } from 'vue'
|
|
|
+import { getOneWeekText, getNextSevenDate } from '../../../utils/date'
|
|
|
+import { onMounted, reactive, ref } from 'vue'
|
|
|
import { getSourcesByDate, getDoctorSources } from '../../../api/appointment'
|
|
|
import Cookies from 'js-cookie'
|
|
|
export default {
|
|
@@ -54,6 +47,7 @@ export default {
|
|
|
setup() {
|
|
|
const router = useRouter()
|
|
|
const deptCode = router.currentRoute.value.params.deptCode
|
|
|
+ const selectDate = ref('')
|
|
|
const data = reactive({
|
|
|
currentIndex: 0,
|
|
|
oneWeekText: getOneWeekText(),
|
|
@@ -72,9 +66,10 @@ export default {
|
|
|
return data.nextSevenDaySources[index].status === 1 ? 'green' : 'red'
|
|
|
}
|
|
|
const hasLeftNum = (val) => {
|
|
|
- return val > 0
|
|
|
- ? '<span style="font-size: 12px;color:green">有号</span>'
|
|
|
- : '<span style="font-size: 12px;color:red">无号</span>'
|
|
|
+ selectDate.value
|
|
|
+ const yes = '<span style="font-size: 12px;color:green">有号</span>'
|
|
|
+ const no = '<span style="font-size: 12px;color:red">无号</span>'
|
|
|
+ return val > 0 ? yes : no
|
|
|
}
|
|
|
const handleClickDate = (index, isFromMounted) => {
|
|
|
data.currentIndex = index
|
|
@@ -85,6 +80,7 @@ export default {
|
|
|
date: data.dateSelected,
|
|
|
deptCode: deptCode,
|
|
|
}
|
|
|
+ selectDate.value = param.date
|
|
|
getDoctorSources(param)
|
|
|
.then((res) => {
|
|
|
data.doctorSources = res
|
|
@@ -109,7 +105,7 @@ export default {
|
|
|
})
|
|
|
return {
|
|
|
empty,
|
|
|
- getDate,
|
|
|
+ selectDate,
|
|
|
deptCode,
|
|
|
getOneWeekText,
|
|
|
handleClickDate,
|