提交 4d7e508c authored 作者: pengxiaohui's avatar pengxiaohui

优化日程展示

上级 b68100ae
...@@ -366,7 +366,7 @@ export default { ...@@ -366,7 +366,7 @@ export default {
} }
.time-now{ .time-now{
width:calc(100% - 50px); width:calc(100% - 50px);
padding-left:50px; padding-left:48px;
position:absolute; position:absolute;
left:0; left:0;
top:10px; top:10px;
...@@ -424,6 +424,12 @@ export default { ...@@ -424,6 +424,12 @@ export default {
bottom:0; bottom:0;
z-index:8; z-index:8;
} }
.schedule ::v-deep.el-scrollbar__wrap{
overflow-x: auto;
}
.schedule ::v-deep.el-scrollbar__wrap::-webkit-scrollbar{
display: none;
}
.schedule ::v-deep.el-scrollbar__bar{ .schedule ::v-deep.el-scrollbar__bar{
z-index:9; z-index:9;
} }
......
<template> <template>
<div class="details" v-if="ev"> <div class="details" v-if="details">
<h5>会议详情</h5> <h5>会议详情</h5>
<p> <div class="details-item">
<i class="el-icon-tickets"></i>主题: <label>会议主题:</label>
<span>{{ev.subject}}</span> <p>{{details.subject}}</p>
</p> <span style="width:40px;color:#409eff" v-if="details.meeting_type === 1">(周期)</span>
<p> </div>
<i class="el-icon-star-off"></i>会议号: <div class="details-item">
<span>{{ev.meeting_code}}</span> <label>会议时间:</label>
</p> <span v-if="isSameDate">{{details.start_time | timeFormat('{m}月{d}日')}} {{details.end_time | timeFormat('周{a}')}} {{details.start_time | timeFormat}}-{{details.end_time | timeFormat}}</span>
<p>
<i class="el-icon-time"></i>时间:
<span v-if="isSameDate">{{ev.start_time | timeFormat('{m}月{d}日')}} {{ev.end_time | timeFormat('周{a}')}} {{ev.start_time | timeFormat}}-{{ev.end_time | timeFormat}}</span>
<template v-else> <template v-else>
<span v-if="isEndTimeZeroPoint">{{ev.start_time | timeFormat('{m}月{d}日 {h}:{i}')}} - 24:00</span> <span v-if="isEndTimeZeroPoint">{{details.start_time | timeFormat('{m}月{d}日 {h}:{i}')}} - 24:00</span>
<span v-else>{{ev.start_time | timeFormat('{m}月{d}日 {h}:{i}')}} - {{ev.end_time | timeFormat('{m}月{d}日 {h}:{i}')}}</span> <span v-else>{{details.start_time | timeFormat('{m}月{d}日 {h}:{i}')}} - {{details.end_time | timeFormat('{m}月{d}日 {h}:{i}')}}</span>
</template> </template>
</p> </div>
<p> <div class="details-item">
<i class="el-icon-user"></i>创建人 <label>会议号:</label>
<span>{{ev.sso_user.realname || ev.sso_user.username}}</span> <p>{{details.meeting_code}}</p>
</p> </div>
<div class="details-item" v-if="enableJoin">
<label>会议链接:</label>
<p class="link" @click="handleLink(details.join_url)">{{details.join_url}} <span>(点击进入会议)</span></p>
</div>
<div class="details-item" v-if="details.password && enableJoin">
<label>会议密码:</label>
<p>{{details.password}}</p>
</div>
<div class="details-item">
<label>创建人:</label>
<span>{{details.sso_user.realname || details.sso_user.username}}</span>
</div>
<div class="details-item" v-if="details.enable_live === 1 && enableJoin">
<label>直播链接:</label>
<p class="link" @click="handleLink(details.live_config.live_addr)">{{details.live_config.live_addr}} <span>(点击进入直播)</span></p>
</div>
<div class="details-item" v-if="details.enable_live === 1 && details.live_config.live_password && enableJoin">
<label>会议密码:</label>
<p>{{details.live_config.live_password}}</p>
</div>
<!-- <div class="details-item">
<label>主持人:</label>
<p><span v-for="(it, index) in details.hosts" :key="it.userid">{{index > 0 ? '、' : ''}}{{it.username}}</span></p>
</div> -->
</div> </div>
</template> </template>
<script> <script>
import { dateFormat } from '@/utils/dateAlgs' import { dateFormat, timeTrans } from '@/utils/dateAlgs'
export default { export default {
props: { props: {
data: { data: {
...@@ -40,18 +61,23 @@ export default { ...@@ -40,18 +61,23 @@ export default {
return {} return {}
}, },
computed: { computed: {
ev() { details() {
return this.data.ev return this.data.ev
}, },
isSameDate() { isSameDate() {
return dateFormat(this.ev.start_time, '{m}-{d}') === dateFormat(this.ev.end_time, '{m}-{d}') return dateFormat(this.details.start_time, '{m}-{d}') === dateFormat(this.details.end_time, '{m}-{d}')
}, },
isEndTimeZeroPoint() { isEndTimeZeroPoint() {
return dateFormat(this.ev.end_time, '{h}:{i}') === '00:00' return dateFormat(this.details.end_time, '{h}:{i}') === '00:00'
},
enableJoin() {
return this.details.status < 3 && timeTrans(this.details.end_time).getTime() > Date.now()
} }
}, },
created() { methods: {
// console.log(this.data) handleLink(url) {
window.open(url, '_blank');
}
} }
} }
</script> </script>
...@@ -62,15 +88,30 @@ h5{ ...@@ -62,15 +88,30 @@ h5{
color:#409eff; color:#409eff;
margin-bottom:10px; margin-bottom:10px;
} }
p{ .details-item{
display:flex; display:flex;
line-height:22px; line-height:22px;
margin-bottom:6px;
} }
p>i{ .details-item>label{
width:76px;
}
.details-item>label>i{
width:20px; width:20px;
padding-top:4px; padding-top:4px;
} }
p>span{ .details-item>p{
flex:1; max-width:calc(100% - 120px);
color: #4e4e4e;
}
.details-item>p.link{
max-width:calc(100% - 90px);
cursor:pointer;
}
.details-item>p.link:hover{
color:#AA1941;
}
.details-item>p.link span{
color:#409eff;
} }
</style> </style>
\ No newline at end of file
...@@ -165,7 +165,4 @@ export default { ...@@ -165,7 +165,4 @@ export default {
.schedule{ .schedule{
height:100%; height:100%;
} }
.day .schedule ::v-deep.el-scrollbar__wrap{
overflow-x: hidden;
}
</style> </style>
\ No newline at end of file
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</el-row> </el-row>
</div> </div>
<el-table :data="listData" style="width: 100%" height="calc(100% - 116px)" v-loading="loading"> <el-table :data="listData" style="width: 100%" height="calc(100% - 116px)" v-loading="loading">
<el-table-column prop="meeting_code" label="会议号" width="120"></el-table-column> <el-table-column prop="meeting_code" label="会议号" width="120" align="center"></el-table-column>
<el-table-column label="会议时间" min-width="220" align="center"> <el-table-column label="会议时间" min-width="220" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p style="color: #aeaeae"> <p style="color: #aeaeae">
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
listData: [], listData: [],
curPage: 1, curPage: 1,
pageSize: 20, pageSize: 20,
total: 200, total: 0,
loading: false loading: false
} }
}, },
......
...@@ -101,7 +101,7 @@ export function getCurHalfHourDate(type, date) { ...@@ -101,7 +101,7 @@ export function getCurHalfHourDate(type, date) {
return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, 0) return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, 0)
} }
/** /**
* 将日期转换为年月日整时 * 将日期转换为年月日0点整时
* @param {(Object|string|number)} date * @param {(Object|string|number)} date
* @returns {Date Object} * @returns {Date Object}
*/ */
...@@ -110,7 +110,7 @@ export function getYMDByDate(date) { ...@@ -110,7 +110,7 @@ export function getYMDByDate(date) {
return new Date(date.getFullYear(), date.getMonth(), date.getDate()) return new Date(date.getFullYear(), date.getMonth(), date.getDate())
} }
/** /**
* 将日期转换为年月日整时 * 将日期转换为年月日整时的时间戳
* @param {(Object|string|number)} date * @param {(Object|string|number)} date
* @returns {Date Object} * @returns {Date Object}
*/ */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论