|
|
|
@ -76,13 +76,22 @@ const getnmrList = async () => {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
nmrIndex.value = yytjInfo.value.nmrIndex;
|
|
|
|
nmrIndex.value = yytjInfo.value.nmrIndex;
|
|
|
|
console.log(yytjInfo.value.nmr_list[nmrIndex.value]);
|
|
|
|
if (nmrIndex.value == -1) {
|
|
|
|
|
|
|
|
// 选择医生
|
|
|
|
|
|
|
|
if (yytjInfo.value.doctor_date) {
|
|
|
|
|
|
|
|
currentDate.value = yytjInfo.value.doctor_date;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
clickDoctor(1);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// 选择体检时间和核磁时间
|
|
|
|
xmmcClick(yytjInfo.value.nmr_list[nmrIndex.value], nmrIndex.value);
|
|
|
|
xmmcClick(yytjInfo.value.nmr_list[nmrIndex.value], nmrIndex.value);
|
|
|
|
|
|
|
|
}
|
|
|
|
uni.hideLoading();
|
|
|
|
uni.hideLoading();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const moreTime = async (m, status) => {
|
|
|
|
const moreTime = async (m, status) => {
|
|
|
|
|
|
|
|
uni.showLoading({ title: "加载中" });
|
|
|
|
isClickDoctor.value = status;
|
|
|
|
isClickDoctor.value = status;
|
|
|
|
// 日历
|
|
|
|
// 日历
|
|
|
|
const [year, month, day] = currentDate.value.split("-");
|
|
|
|
const [year, month, day] = currentDate.value.split("-");
|
|
|
|
@ -128,6 +137,7 @@ const moreTime = async (m, status) => {
|
|
|
|
console.log(rlArr);
|
|
|
|
console.log(rlArr);
|
|
|
|
rl_list.value = rlArr;
|
|
|
|
rl_list.value = rlArr;
|
|
|
|
calendarShow.value = true;
|
|
|
|
calendarShow.value = true;
|
|
|
|
|
|
|
|
uni.hideLoading();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@ -196,7 +206,7 @@ const getTjTimeList = async (val) => {
|
|
|
|
|
|
|
|
|
|
|
|
time_list.value.forEach((item) => {
|
|
|
|
time_list.value.forEach((item) => {
|
|
|
|
console.log(item.date);
|
|
|
|
console.log(item.date);
|
|
|
|
item.newTime = item.time.slice(0, 5);
|
|
|
|
item.newTime = item?.time.slice(0, 5);
|
|
|
|
item.date = currentDate.value;
|
|
|
|
item.date = currentDate.value;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
date_list.value.forEach((item) => {
|
|
|
|
date_list.value.forEach((item) => {
|
|
|
|
@ -232,11 +242,36 @@ const changerl = (e) => {
|
|
|
|
uni.navigateTo({
|
|
|
|
uni.navigateTo({
|
|
|
|
url: `/pages/main/selectDoctor/selectDoctor?date=${e.fulldate}`,
|
|
|
|
url: `/pages/main/selectDoctor/selectDoctor?date=${e.fulldate}`,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (date_list.value[3]?.date == e.fulldate) {
|
|
|
|
if (date_list.value[3]?.date == e.fulldate) {
|
|
|
|
calendarShow.value = false;
|
|
|
|
calendarShow.value = false;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
|
|
nmrIndex.value == yytjInfo.value.nmr_list.length - 1 &&
|
|
|
|
|
|
|
|
yytjInfo.value.doctor_date
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
console.log("切换体检时间");
|
|
|
|
|
|
|
|
uni.showModal({
|
|
|
|
|
|
|
|
title: "提示",
|
|
|
|
|
|
|
|
content: "已选择医生,切换日期将重新选择医生,是否继续",
|
|
|
|
|
|
|
|
showCancel: true,
|
|
|
|
|
|
|
|
success: ({ confirm }) => {
|
|
|
|
|
|
|
|
if (confirm) {
|
|
|
|
|
|
|
|
currentDate.value = e.fulldate;
|
|
|
|
|
|
|
|
time.value = "";
|
|
|
|
|
|
|
|
timeIndex.value = null;
|
|
|
|
|
|
|
|
yytjInfo.value.nmr_list[nmrIndex.value].time = "";
|
|
|
|
|
|
|
|
yytjInfo.value.nmr_list[nmrIndex.value].id = "";
|
|
|
|
|
|
|
|
yytjInfo.value.doctor_name = ""; // 每次切换都清空医生
|
|
|
|
|
|
|
|
getTjTimeList(yytjInfo.value.nmr_list[nmrIndex.value]);
|
|
|
|
|
|
|
|
calendarShow.value = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
// uni.showLoading({
|
|
|
|
// uni.showLoading({
|
|
|
|
// title: "加载中",
|
|
|
|
// title: "加载中",
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
@ -263,6 +298,42 @@ const getCurrentClick = (item, i) => {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i != 3) {
|
|
|
|
if (i != 3) {
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
|
|
nmrIndex.value == yytjInfo.value.nmr_list.length - 1 &&
|
|
|
|
|
|
|
|
yytjInfo.value.doctor_date
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
console.log("切换体检时间");
|
|
|
|
|
|
|
|
uni.showModal({
|
|
|
|
|
|
|
|
title: "提示",
|
|
|
|
|
|
|
|
content: "已选择医生,切换日期将重新选择医生,是否继续",
|
|
|
|
|
|
|
|
showCancel: true,
|
|
|
|
|
|
|
|
success: ({ confirm }) => {
|
|
|
|
|
|
|
|
console.log(confirm);
|
|
|
|
|
|
|
|
if (confirm) {
|
|
|
|
|
|
|
|
if (yytjInfo.value.nmr_list.length > 1 && nmrIndex.value == 0) {
|
|
|
|
|
|
|
|
yytjInfo.value.nmr_list = yytjInfo.value.nmr_list.map((val) => {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
...val,
|
|
|
|
|
|
|
|
time: "",
|
|
|
|
|
|
|
|
id: "",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
time.value = "";
|
|
|
|
|
|
|
|
timeIndex.value = null;
|
|
|
|
|
|
|
|
yytjInfo.value.nmr_list[nmrIndex.value].time = "";
|
|
|
|
|
|
|
|
yytjInfo.value.nmr_list[nmrIndex.value].id = "";
|
|
|
|
|
|
|
|
yytjInfo.value.doctor_name = ""; // 每次切换都清空医生
|
|
|
|
|
|
|
|
yytjInfo.value.doctor_date = ""; // 每次切换都清空医生
|
|
|
|
|
|
|
|
$store.setYytjInfo(yytjInfo.value);
|
|
|
|
|
|
|
|
status.value = 0;
|
|
|
|
|
|
|
|
currentDate.value = item.date;
|
|
|
|
|
|
|
|
getTjTimeList(item); //带着选中的日期重新选择
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
if (yytjInfo.value.nmr_list.length > 1 && nmrIndex.value == 0) {
|
|
|
|
if (yytjInfo.value.nmr_list.length > 1 && nmrIndex.value == 0) {
|
|
|
|
yytjInfo.value.nmr_list = yytjInfo.value.nmr_list.map((val) => {
|
|
|
|
yytjInfo.value.nmr_list = yytjInfo.value.nmr_list.map((val) => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
@ -305,14 +376,16 @@ const xmmcClick = (val, index, status) => {
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|
yytjInfo.value.nmr_list.length > 1 &&
|
|
|
|
yytjInfo.value.nmr_list.length > 1 &&
|
|
|
|
index != 0 &&
|
|
|
|
index != 0 &&
|
|
|
|
yytjInfo.value.nmr_list[0].time == ""
|
|
|
|
yytjInfo.value.nmr_list[0]?.time == ""
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
uni.$lu.toast("请先选择" + yytjInfo.value.nmr_list[0].name + "时间");
|
|
|
|
uni.$lu.toast("请先选择" + yytjInfo.value.nmr_list[0]?.name + "时间");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
nmrIndex.value = index;
|
|
|
|
nmrIndex.value = index;
|
|
|
|
time.value = "";
|
|
|
|
time.value = "";
|
|
|
|
timeIndex.value = null;
|
|
|
|
timeIndex.value = null;
|
|
|
|
|
|
|
|
isClickDoctor.value = 0;
|
|
|
|
|
|
|
|
calendarShow.value = false;
|
|
|
|
if (val.time) {
|
|
|
|
if (val.time) {
|
|
|
|
currentDate.value = val.time.split(" ")[0];
|
|
|
|
currentDate.value = val.time.split(" ")[0];
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
@ -331,23 +404,29 @@ const xmmcClick = (val, index, status) => {
|
|
|
|
getTjTimeList(val);
|
|
|
|
getTjTimeList(val);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const clickDoctor = () => {
|
|
|
|
const clickDoctor = (s) => {
|
|
|
|
//选择医生
|
|
|
|
//选择医生
|
|
|
|
|
|
|
|
console.log(yytjInfo.value.nmr_list[0]?.time);
|
|
|
|
|
|
|
|
console.log(yytjInfo.value.nmr_list[0]?.name);
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|
yytjInfo.value.nmr_list.length > 1 &&
|
|
|
|
yytjInfo.value.nmr_list.length > 1 &&
|
|
|
|
yytjInfo.value.nmr_list[0].time == ""
|
|
|
|
yytjInfo.value.nmr_list[0]?.time == ""
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
uni.$lu.toast("请先选择" + yytjInfo.value.nmr_list[0].name + "时间");
|
|
|
|
uni.$lu.toast("请先选择" + yytjInfo.value.nmr_list[0]?.name + "时间");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (yytjInfo.value.nmr_list[yytjInfo.value.nmr_list.length - 1].time == "") {
|
|
|
|
// if (yytjInfo.value.nmr_list[yytjInfo.value.nmr_list.length - 1]?.time == "") {
|
|
|
|
nmrIndex.value = yytjInfo.value.nmr_list?.length - 1;
|
|
|
|
// nmrIndex.value = yytjInfo.value.nmr_list?.length - 1;
|
|
|
|
|
|
|
|
nmrIndex.value = -1;
|
|
|
|
moreTime(null, 1);
|
|
|
|
moreTime(null, 1);
|
|
|
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
if (s) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
status.value = 0;
|
|
|
|
status.value = 0;
|
|
|
|
let date =
|
|
|
|
let date =
|
|
|
|
yytjInfo.value.nmr_list[yytjInfo.value.nmr_list.length - 1].time?.split(
|
|
|
|
yytjInfo.value.nmr_list[yytjInfo.value.nmr_list.length - 1]?.time?.split(
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
)[0];
|
|
|
|
)[0];
|
|
|
|
yytjInfo.value.doctor_date = date;
|
|
|
|
yytjInfo.value.doctor_date = date;
|
|
|
|
@ -460,7 +539,7 @@ onShow(() => {
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<view class="flex items-center grow">
|
|
|
|
<view class="flex items-center grow">
|
|
|
|
<text class="text-#707070 text-24rpx">您好,</text>
|
|
|
|
<text class="text-#707070 text-24rpx">您好,</text>
|
|
|
|
<text class="text-#0E0E0E text-32rpx">{{ groupInfo.name }}</text>
|
|
|
|
<text class="text-#0E0E0E text-32rpx">{{ groupInfo?.name }}</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="text-24rpx mt-40rpx">
|
|
|
|
<view class="text-24rpx mt-40rpx">
|
|
|
|
@ -536,18 +615,17 @@ onShow(() => {
|
|
|
|
@monthSwitch="monthSwitch"
|
|
|
|
@monthSwitch="monthSwitch"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<template v-else>
|
|
|
|
|
|
|
|
<view
|
|
|
|
<view
|
|
|
|
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
|
|
|
|
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
|
|
|
|
class="p-16rpx pb-20rpx pt-30rpx rounded-15rpx bg-#fff mt-15rpx"
|
|
|
|
class="p-16rpx pb-20rpx pt-30rpx rounded-15rpx bg-#fff mt-15rpx"
|
|
|
|
v-if="date_list"
|
|
|
|
v-if="date_list && !calendarShow"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<view class="">
|
|
|
|
<view class="">
|
|
|
|
<view
|
|
|
|
<view
|
|
|
|
class="text-30rpx text-#0E0E0E pb-34rpx font-500"
|
|
|
|
class="text-30rpx text-#0E0E0E pb-34rpx font-500"
|
|
|
|
v-if="yytjInfo.nmr_list[nmrIndex].name"
|
|
|
|
v-if="yytjInfo.nmr_list[nmrIndex]?.name"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{{ yytjInfo.nmr_list[nmrIndex].name }}
|
|
|
|
{{ yytjInfo.nmr_list[nmrIndex]?.name }}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="flex mb-30rpx items-center">
|
|
|
|
<view class="flex mb-30rpx items-center">
|
|
|
|
<view
|
|
|
|
<view
|
|
|
|
@ -583,11 +661,7 @@ onShow(() => {
|
|
|
|
class="flex-1 col center text-#239EA3 text-20rpx bs b-#E7E7E7 b-l-1 h-80rpx"
|
|
|
|
class="flex-1 col center text-#239EA3 text-20rpx bs b-#E7E7E7 b-l-1 h-80rpx"
|
|
|
|
@click="moreTime(null, 0)"
|
|
|
|
@click="moreTime(null, 0)"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<uni-icons
|
|
|
|
<uni-icons type="calendar" size="30" color="#239EA3"></uni-icons>
|
|
|
|
type="calendar"
|
|
|
|
|
|
|
|
size="30"
|
|
|
|
|
|
|
|
color="#239EA3"
|
|
|
|
|
|
|
|
></uni-icons>
|
|
|
|
|
|
|
|
<text>更多</text>
|
|
|
|
<text>更多</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
@ -645,7 +719,8 @@ onShow(() => {
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view
|
|
|
|
<view
|
|
|
|
class="p-20rpx pl-10rpx pr-10rpx rounded-15rpx between"
|
|
|
|
class="p-20rpx pl-10rpx pr-10rpx rounded-15rpx between"
|
|
|
|
@click="clickDoctor"
|
|
|
|
:class="nmrIndex == -1 ? 'acitvetc' : ''"
|
|
|
|
|
|
|
|
@click="clickDoctor()"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<text>体检医生</text>
|
|
|
|
<text>体检医生</text>
|
|
|
|
<text class="ml-10rpx text-#0E0E0E center">
|
|
|
|
<text class="ml-10rpx text-#0E0E0E center">
|
|
|
|
@ -664,7 +739,6 @@ onShow(() => {
|
|
|
|
确定
|
|
|
|
确定
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|