修改手机端兼容日历功能
This commit is contained in:
parent
98334cc2bb
commit
21cecfa1c6
|
@ -21,12 +21,15 @@ VITE_GLOB_API_URL=/jeecg-boot
|
|||
#后台接口全路径地址(必填)
|
||||
# VITE_GLOB_DOMAIN_URL=https://zxkccx.webvpn.nenu.edu.cn/jeecg-boot
|
||||
VITE_GLOB_DOMAIN_URL=https://smartedu.nenu.edu.cn/jeecg-boot
|
||||
# VITE_GLOB_DOMAIN_URL=https://xxhbtest2.nenu.edu.cn/jeecg-boot
|
||||
#VITE_GLOB_DOMAIN_URL=http://210.47.29.177
|
||||
# VITE_GLOB_DOMAIN_URL=https://kczxcs.nenu.edu.cn/jeecg-boot
|
||||
# VITE_GLOB_DOMAIN_URL=http://210.47.29.100/jeecg-boot
|
||||
|
||||
#RTC服务器地址
|
||||
# VITE_GLOB_RTC_SERVER = https://zxkccx.webvpn.nenu.edu.cn:8081
|
||||
VITE_GLOB_RTC_SERVER = https://smartedu.nenu.edu.cn:8081
|
||||
# VITE_GLOB_RTC_SERVER = https://xxhbtest2.nenu.edu.cn:8081
|
||||
|
||||
# 接口父路径前缀
|
||||
VITE_GLOB_API_URL_PREFIX=
|
||||
|
|
|
@ -2,11 +2,29 @@
|
|||
<a-alert :message="`当前时间: ${tday}`" />
|
||||
<a-calendar v-model:value="value" @panelChange="onPanelChange">
|
||||
<template #dateCellRender="{ current }">
|
||||
<ul class="events">
|
||||
<li v-for="item in getListData(current)" :key="item.content" @click="handleKecheng(item)">
|
||||
<a-badge status="success" :text="item.kcmc" />
|
||||
</li>
|
||||
</ul>
|
||||
<a-row>
|
||||
<a-col :xs="0" :md="24">
|
||||
<ul class="events" >
|
||||
<li v-for="item in getListData(current)" :key="item.content" @click="handleKecheng(item)" :title="item.kcmc+`-`+item.skjs">
|
||||
<a-badge status="success" :text="item.kcmc" />
|
||||
</li>
|
||||
</ul>
|
||||
</a-col>
|
||||
<a-col :xs="24" :md="0">
|
||||
<a-popover title="课程信息" v-if="getSfyk(current)">
|
||||
<template #content>
|
||||
<ul class="events" >
|
||||
<li v-for="item in getListData(current)" :key="item.content" @click="handleKecheng(item)" :title="item.kcmc+`-`+item.skjs">
|
||||
<a-badge status="success" :text="item.kcmc" />
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
<a-avatar style="background-color: #1d9b64;width:20px;height: 20px;line-height: 20px;">有</a-avatar>
|
||||
</a-popover>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
|
||||
</template>
|
||||
<!-- 去掉头部年月切换 -->
|
||||
<template #headerRender="{ current }">
|
||||
|
@ -32,6 +50,21 @@ const getListData = (value: Dayjs) => {
|
|||
return [];
|
||||
}
|
||||
};
|
||||
//判断是否有课
|
||||
const getSfyk = (value: Dayjs) => {
|
||||
//将当前日历循环到的日子格式化为yyyy-MM-dd
|
||||
const formattedDate = value.format('YYYY-MM-DD');
|
||||
if (formattedDate.substring(0, 7) == tday.value) {
|
||||
var listSfyk = studentKclist.value.filter(item => item.skrq === formattedDate)
|
||||
if(listSfyk.length>0){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const onPanelChange = (value: Dayjs) => {
|
||||
tday.value = dateFormat(value, "yyyy-MM");
|
||||
|
|
Loading…
Reference in New Issue