|
|
|
@ -13,6 +13,7 @@ const $store = useStore();
|
|
|
|
let dqDate = ref("");
|
|
|
|
let dqDate = ref("");
|
|
|
|
let yytjInfo = ref({}); // 预约信息
|
|
|
|
let yytjInfo = ref({}); // 预约信息
|
|
|
|
let user_person=ref({});
|
|
|
|
let user_person=ref({});
|
|
|
|
|
|
|
|
let zhou_firstday=ref('');
|
|
|
|
const $props = defineProps({
|
|
|
|
const $props = defineProps({
|
|
|
|
date: {
|
|
|
|
date: {
|
|
|
|
type: String,
|
|
|
|
type: String,
|
|
|
|
@ -24,7 +25,6 @@ const $props = defineProps({
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const mountedAction = () => {
|
|
|
|
const mountedAction = () => {
|
|
|
|
uni.showLoading({
|
|
|
|
uni.showLoading({
|
|
|
|
title: "加载中",
|
|
|
|
title: "加载中",
|
|
|
|
@ -44,7 +44,7 @@ const mountedAction = () => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const doctor_list = ref(false);
|
|
|
|
const doctor_list = ref(false);
|
|
|
|
|
|
|
|
const week7=ref([])
|
|
|
|
const getdoctorList = async () => {
|
|
|
|
const getdoctorList = async () => {
|
|
|
|
let c_type=$store.getCheckupTypeId()
|
|
|
|
let c_type=$store.getCheckupTypeId()
|
|
|
|
// 获取 体检报告列表
|
|
|
|
// 获取 体检报告列表
|
|
|
|
@ -53,12 +53,17 @@ const getdoctorList = async () => {
|
|
|
|
date: dqDate.value,
|
|
|
|
date: dqDate.value,
|
|
|
|
month:$props.month,
|
|
|
|
month:$props.month,
|
|
|
|
person_id:user_person.value.person_id,
|
|
|
|
person_id:user_person.value.person_id,
|
|
|
|
checkup_type:c_type.id
|
|
|
|
checkup_type:c_type.id,
|
|
|
|
|
|
|
|
zhou_firstday:zhou_firstday.value
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
|
|
|
title: "加载中",
|
|
|
|
|
|
|
|
});
|
|
|
|
const response = await $api("DoctorGetList", obj);
|
|
|
|
const response = await $api("DoctorGetList", obj);
|
|
|
|
$response(response, () => {
|
|
|
|
$response(response, () => {
|
|
|
|
console.log(response, "response");
|
|
|
|
console.log(response, "response");
|
|
|
|
doctor_list.value = response.data.list;
|
|
|
|
doctor_list.value = response.data.list;
|
|
|
|
|
|
|
|
week7.value=response.data.week7
|
|
|
|
uni.hideLoading();
|
|
|
|
uni.hideLoading();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -86,8 +91,60 @@ const clickDoctor = (item) => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
let selectedDate=ref("");
|
|
|
|
|
|
|
|
const selectDateFunc=(date)=>{
|
|
|
|
|
|
|
|
selectedDate.value=date
|
|
|
|
|
|
|
|
dqDate.value=date
|
|
|
|
|
|
|
|
getdoctorList()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let YueLiRef=ref(null);
|
|
|
|
|
|
|
|
//点击打开日历
|
|
|
|
|
|
|
|
const ClickMore=()=>{
|
|
|
|
|
|
|
|
YueLiRef.value.open()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const getToday = () => {
|
|
|
|
|
|
|
|
var today = new Date();
|
|
|
|
|
|
|
|
var year = today.getFullYear();
|
|
|
|
|
|
|
|
var month = (today.getMonth() + 1).toString().padStart(2, "0");
|
|
|
|
|
|
|
|
var day = today.getDate().toString().padStart(2, "0");
|
|
|
|
|
|
|
|
return year + "-" + month + "-" + day;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
zhou_firstday.value=getToday()
|
|
|
|
|
|
|
|
let MonthList=ref([]);
|
|
|
|
|
|
|
|
const moreTime = async (m, status) => {
|
|
|
|
|
|
|
|
const [year, month, day] = currentDate.value.split("-");
|
|
|
|
|
|
|
|
let dqmonth = m || `${year}-${month}`; //年 月份
|
|
|
|
|
|
|
|
let obj = {};
|
|
|
|
|
|
|
|
let methods = "";
|
|
|
|
|
|
|
|
getdoctorList(`${year}-${month}`)
|
|
|
|
|
|
|
|
calendarShow.value = true;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const monthSwitch = (givenDate) => {
|
|
|
|
|
|
|
|
const currentYear = new Date().getFullYear();
|
|
|
|
|
|
|
|
const currentMonth = new Date().getMonth() + 1;
|
|
|
|
|
|
|
|
// 获取当前日期
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
|
|
givenDate.year < currentYear ||
|
|
|
|
|
|
|
|
(givenDate.year === currentYear && givenDate.month < currentMonth)
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
// uni.$lu.toast("不能选择过去时间");
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
let str = `${givenDate.year}-${givenDate.month}`;
|
|
|
|
|
|
|
|
moreTime(str, 0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
//日历点击日期
|
|
|
|
|
|
|
|
const RiLiDateFunc=(e)=>{
|
|
|
|
|
|
|
|
console.log(e)
|
|
|
|
|
|
|
|
dqDate.value=e.fulldate
|
|
|
|
|
|
|
|
zhou_firstday.value=e.fulldate
|
|
|
|
|
|
|
|
getdoctorList()
|
|
|
|
|
|
|
|
}
|
|
|
|
onShow(() => {
|
|
|
|
onShow(() => {
|
|
|
|
|
|
|
|
selectedDate.value=''
|
|
|
|
|
|
|
|
dqDate.value=''
|
|
|
|
console.log($props.month);
|
|
|
|
console.log($props.month);
|
|
|
|
if (!!config_ref.value) {
|
|
|
|
if (!!config_ref.value) {
|
|
|
|
mountedAction();
|
|
|
|
mountedAction();
|
|
|
|
@ -107,6 +164,21 @@ onShow(() => {
|
|
|
|
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="pb-80rpx pt-30rpx rounded-15rpx bg-#fff"
|
|
|
|
class="pb-80rpx pt-30rpx rounded-15rpx bg-#fff"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
<view class="zhou" v-if="week7.length>1">
|
|
|
|
|
|
|
|
<view class="day" v-for="(item,index) in week7">
|
|
|
|
|
|
|
|
<view :class="item.date==selectedDate?'day_top selected':'day_top'" @click="selectDateFunc(item.date)">
|
|
|
|
|
|
|
|
<view>{{item.date.split('-').slice(1).join('/')}}</view>
|
|
|
|
|
|
|
|
<view class="zhou_title">{{ item.xingqi.replace('星期', '周').replace('日', '天')}}</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="xian_k">
|
|
|
|
|
|
|
|
<view class="xian"></view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="rili_icon" @click="ClickMore()">
|
|
|
|
|
|
|
|
<uni-icons type="calendar" style="font-size: 50rpx;" color="#239EA3"></uni-icons>
|
|
|
|
|
|
|
|
<text>更多</text>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
<view v-if="doctor_list.length>0">
|
|
|
|
<view v-if="doctor_list.length>0">
|
|
|
|
<view v-for="(item, index) in doctor_list" :key="index" class="p-10rpx">
|
|
|
|
<view v-for="(item, index) in doctor_list" :key="index" class="p-10rpx">
|
|
|
|
<view class="flex flex-row text-#8B8B8B text-23rpx">
|
|
|
|
<view class="flex flex-row text-#8B8B8B text-23rpx">
|
|
|
|
@ -143,6 +215,77 @@ onShow(() => {
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<uni-calendar ref="YueLiRef" :selected="MonthList" :startDate="getToday()" :insert="false"
|
|
|
|
|
|
|
|
@confirm="RiLiDateFunc" @monthSwitch="monthSwitch" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<style scoped></style>
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
.zhou {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
padding: 0rpx 20rpx 20rpx 20rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.day {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
font-size: 25rpx;
|
|
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
|
|
color: #131313;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.day_top {
|
|
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
margin-top: 10rpx;
|
|
|
|
|
|
|
|
padding: 10rpx;
|
|
|
|
|
|
|
|
border-radius: 16rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.selected {
|
|
|
|
|
|
|
|
background-color: #239EA3;
|
|
|
|
|
|
|
|
color: #fff !important;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.zhou_title {
|
|
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
|
|
margin-top: 6rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.yu {
|
|
|
|
|
|
|
|
background-color: #EFEFEF;
|
|
|
|
|
|
|
|
margin-top: 8rpx;
|
|
|
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
|
|
|
padding: 2rpx 8rpx;
|
|
|
|
|
|
|
|
font-size: 22rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.xian_k {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.xian {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
height: 70rpx;
|
|
|
|
|
|
|
|
border-left: 1px solid #d8d8d8;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.rili_icon {
|
|
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
color: #239EA3;
|
|
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|