周日历跳转

This commit is contained in:
luyuan 2020-11-03 14:30:18 +08:00
parent 6f202a0ae5
commit f12be561c3
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -6,7 +6,7 @@
上一周
</div>
{{week.year}}{{week.yue}}
<a-button type="primary" class="button" @click="navto()"> 月日历 </a-button>
<a-button type="primary" class="button" @click="navto('/regime/date')"> 月日历 </a-button>
<div @click="zhou++">
下一周
<img src="../../static/images/right.png" alt="" />
@ -46,7 +46,7 @@
</div>
<div v-for="i in 7" :key="i" >
<div class="day">
<div :class="zhuangtai(week.date[i -1].list[item - 1].zhuangtai)" v-if="week.date[i -1].list[item - 1].title != ''" :style="{'top': (week.date[i -1].list[item - 1].start / 60 * 0.63) + 'rem', 'min-height': (week.date[i -1].list[item - 1].num / 60 * 0.63) + 'rem' }">
<div :class="zhuangtai(week.date[i -1].list[item - 1].zhuangtai)" v-if="week.date[i -1].list[item - 1].title != ''" :style="{'top': (week.date[i -1].list[item - 1].start / 60 * 0.63) + 'rem', 'min-height': (week.date[i -1].list[item - 1].num / 60 * 0.63) + 'rem' }" @click="tolive(week.date[i -1].list[item - 1])">
<div class="one-line-hide" style="max-width: 1.5rem">
{{week.date[i -1].list[item - 1].title}}
</div>
@ -189,6 +189,7 @@
justify-content: center;
font-size: 11px;
border-radius: 6px;
z-index: 999;
overflow: hidden;
> div:last-child {
font-size: 11px;
@ -276,6 +277,7 @@ export default defineComponent({
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
week.value.date[j].list[gethour(res[i].dateline)].zid = res[i].liveid
}
}
}
@ -315,8 +317,19 @@ export default defineComponent({
return 'old'
}
}
function navto(){
router.push("/regime/date")
function navto(url: string){
router.push(url)
}
function tolive(data: any){
let url = '';
console.log(data)
if(data.zhuangtai != 1){
url = '/regime/livedetail?id=' + data.zid
}else{
url = '/regime/liveing?id=' + data.zid
}
console.log(url)
router.push(url)
}
return {
zhou,
@ -325,7 +338,8 @@ export default defineComponent({
zhuangtai,
top,
times,
xs
xs,
tolive
};
},
});