xbx #92

Merged
theluyuan merged 4 commits from xbx into master 2020-10-29 10:13:48 +08:00
Showing only changes of commit 3de931e747 - Show all commits

View File

@ -5,7 +5,7 @@
<img src="" alt="" /> <img src="" alt="" />
上一周 上一周
</div> </div>
2020年10 {{week.year}}{{week.yue}}
<a-button type="primary" class="button" @click="navto()"> 月日历 </a-button> <a-button type="primary" class="button" @click="navto()"> 月日历 </a-button>
<div @click="zhou++"> <div @click="zhou++">
下一周 下一周
@ -46,7 +46,7 @@
</div> </div>
<div v-for="i in 7" :key="i"> <div v-for="i in 7" :key="i">
<div class="day"> <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"> <div class="one-line-hide" style="max-width: 1.5rem">
{{week.date[i -1].list[item - 1].title}} {{week.date[i -1].list[item - 1].title}}
</div> </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)].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)].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)].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); console.log(week.value);
getdates(userid) 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(){ function navto(){
router.push("/regime/date") router.push("/regime/date")
} }
return { return {
zhou, zhou,
week, week,
navto navto,
zhuangtai
}; };
}, },
}); });