fix : 修改首页提示
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="17" :xl="17">
|
||||
<div class="top-left" id="topLeft">
|
||||
<el-card shadow="never">
|
||||
<div class="notice-title">早上好,小i提醒您<span>有<span>{{ taskTabList[0].num }}</span>个审批待立项</span></div>
|
||||
<div class="notice-title">{{getTimePeriod()}},提醒您<span>有<span>{{ taskTabList[0].num }}</span>个项目待立项</span></div>
|
||||
<el-row class="statistics">
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-for="(item,index) in taskTabList" :key="index">
|
||||
<div class="block" :style="{'background-image':'url('+getImgUrl(item.icon)+')'}"
|
||||
@@ -520,6 +520,25 @@ onMounted(async () => {
|
||||
helpDocList.value = await getArticleList(2)
|
||||
problemList.value = await getArticleList(3)
|
||||
})
|
||||
const getTimePeriod=()=>{
|
||||
// 获取当前日期和时间
|
||||
const now = new Date();
|
||||
// 获取当前小时数
|
||||
const hour = now.getHours();
|
||||
|
||||
// 根据小时数判断时间段
|
||||
if (hour >= 0 && hour < 6) {
|
||||
return '夜深了';
|
||||
} else if (hour >= 6 && hour < 12) {
|
||||
return '早上好';
|
||||
} else if (hour >= 12 && hour < 18) {
|
||||
return '中午好';
|
||||
} else if (hour >= 18 && hour < 22) {
|
||||
return '下午好';
|
||||
} else if (hour >= 22 && hour < 24) {
|
||||
return '晚上好';
|
||||
}
|
||||
}
|
||||
const handleTodoList = (type) => {
|
||||
if (type == 1) {
|
||||
router.push({
|
||||
|
||||
Reference in New Issue
Block a user