This commit is contained in:
luyuan 2020-10-29 10:11:19 +08:00
parent ac4b1b4ea9
commit 3de931e747
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -5,7 +5,7 @@
<img src="" alt="" />
上一周
</div>
2020年10
{{week.year}}{{week.yue}}
<a-button type="primary" class="button" @click="navto()"> 月日历 </a-button>
<div @click="zhou++">
下一周
@ -46,7 +46,7 @@
</div>
<div v-for="i in 7" :key="i">
<div class="day">
<div class="next" v-if="week.date[i -1].list[item - 1].title != ''">
<div :class="zhuangtai(week.date[i -1].list[item - 1].zhuangtai)" v-if="week.date[i -1].list[item - 1].title != ''">
<div class="one-line-hide" style="max-width: 1.5rem">
{{week.date[i -1].list[item - 1].title}}
</div>
@ -234,6 +234,7 @@ export default defineComponent({
week.value.date[j].list[gethour(res[i].dateline)].num = res[i].livetime
week.value.date[j].list[gethour(res[i].dateline)].title = res[i].title
week.value.date[j].list[gethour(res[i].dateline)].time = gettime(res[i].dateline, res[i].livetime)
week.value.date[j].list[gethour(res[i].dateline)].zhuangtai = res[i].livestatus
}
}
}
@ -248,13 +249,27 @@ export default defineComponent({
console.log(week.value);
getdates(userid)
});
function zhuangtai(index: number){
switch (index) {
case 0:
return 'next'
case 1:
return 'ing'
case 2:
return 'old'
default:
return 'old'
}
}
function navto(){
router.push("/regime/date")
}
return {
zhou,
week,
navto
navto,
zhuangtai
};
},
});