Files
dvcp_v2_wxcp_app/src/apps/AppMeetingNotice/components/detail.vue

534 lines
13 KiB
Vue
Raw Normal View History

2021-11-19 09:27:00 +08:00
<template>
<div class="detail">
<template v-if="!list">
<div class="card">
<header>{{ detail.title }}</header>
<u-gap height="16"></u-gap>
2021-12-07 11:34:36 +08:00
<u-row v-if="detail.createUserId">
2021-12-06 11:05:51 +08:00
<!-- <u-avatar :src="$cdn + 'common/xzh.png'" v-if="false"></u-avatar>-->
<!-- <div class="u-avatar__img" v-else>{{ detail.userName && detail.userName.substr(-2) }}</div>-->
2021-12-08 10:01:09 +08:00
<AiOpenData type="userName" style="font-size: 30px;color: #343D65;" :openid="detail.createUserId"></AiOpenData>
2021-11-19 09:27:00 +08:00
</u-row>
<u-gap height="32"></u-gap>
<u-row>
<img :src="$cdn + 'common/meeting.png'" alt="">
<span :style="{color:color(detail.status)}">{{ $dict.getLabel('meetStatus', detail.status) }}</span>
</u-row>
<u-gap height="8"></u-gap>
<u-row>
<img :src="$cdn + 'common/date.png'" alt="">
<span>{{ detail.startTime && detail.startTime.substr(0, 16) }} {{ detail.endTime && detail.endTime.substr(0, 16) }}</span>
</u-row>
<u-gap height="8"></u-gap>
<u-row>
<img :src="$cdn + 'common/location.png'" alt="">
<span>{{ detail.address }}</span>
</u-row>
</div>
<div class="card">
<span>{{ detail.content }}</span>
</div>
<div class="card" v-if="detail.files && detail.files.length">
<div class="label">相关附件</div>
<div class="file" v-for="(item,index) in detail.files" @click="preFile(item)" :key="index">
<u-row justify="between">
<label class="left">
<img :src="$cdn + 'common/appendix.png'" alt="">
<span>{{ item.fileName }}.{{ item.postfix }}</span>
</label>
<span>{{ item.fileSizeStr }}</span>
</u-row>
</div>
</div>
<div class="card item-wrap">
<u-row justify="between">
<span>参会人</span>
<label class="right" @click="list=true">
查看全部<em>{{ detail.attendees && detail.attendees.length }}</em>
<div class="right-arrow"></div>
</label>
</u-row>
</div>
2021-12-03 18:42:32 +08:00
<div class="footer cancel" v-if="detail.status==1 && detail.createUserId == user.id" @click="handleCancel">取消会议
</div>
2021-11-19 09:27:00 +08:00
2021-12-03 10:10:53 +08:00
<template v-else>
<div class="footer" v-if="['1','2'].includes(detail.status) && ['0','3'].includes(detail.joinStatus)">
<div @click="updateStatus(0)">请假</div>
<div @click="toDo">待定</div>
<div @click="updateStatus(1)">确认会议</div>
</div>
2021-11-19 09:27:00 +08:00
2021-12-03 18:42:32 +08:00
<!-- <div class="footer" v-if="['1','2'].includes(detail.status) && detail.joinStatus!=0">-->
<!-- <label>{{ detail.joinStatus|transform }}</label>-->
<!-- <img :src="$cdn + tag(detail.joinStatus)" alt="">-->
<!-- </div>-->
2021-12-03 10:10:53 +08:00
</template>
2021-12-02 14:36:44 +08:00
2021-11-19 09:27:00 +08:00
</template>
<template v-else>
<div class="att-list">
<AiTopFixed>
<u-tabs :list="tabs" :current="current" height="96" :is-scroll="false" bar-width="192"
@change="change"></u-tabs>
</AiTopFixed>
<div v-for="(item,index) in detail.attendees && detail.attendees.filter(e=>e.joinStatus==current)" :key="index"
class="att-wrap">
<div class="left">
2021-12-07 11:13:07 +08:00
<u-avatar :src="item.avatar || (($cdn + 'common/xztx.png'))" size="74" mode="square" style="margin-right: 8px"></u-avatar>
<AiOpenData type="userName" :openid="item.name"></AiOpenData>
2021-11-19 09:27:00 +08:00
</div>
2021-12-03 18:42:32 +08:00
<!-- <img :src="$cdn + 'common/phone.png'" alt="" @click="call(item)">-->
2021-11-19 09:27:00 +08:00
</div>
</div>
</template>
2021-12-02 14:36:44 +08:00
<u-modal v-model="show" title="提示" show-cancel-button content='是否要取消该会议?' @confirm="onConfirm"></u-modal>
2021-12-01 09:52:38 +08:00
<AiBack/>
2021-11-19 09:27:00 +08:00
</div>
</template>
<script>
2021-11-19 11:28:04 +08:00
import AiBack from "../../../components/AiBack";
2021-12-03 18:42:32 +08:00
import {mapActions, mapState} from "vuex";
2021-11-19 11:28:04 +08:00
import AiTopFixed from "../../../components/AiTopFixed";
2021-12-07 09:31:17 +08:00
import AiOpenData from "../../../components/AiOpenData";
2021-11-19 11:28:04 +08:00
export default {
name: "detail",
2021-12-07 09:31:17 +08:00
components: {AiOpenData,AiBack, AiTopFixed},
2021-11-19 11:28:04 +08:00
props: {
params: {
type: [String, Number]
2021-11-19 09:27:00 +08:00
}
},
2021-11-19 11:28:04 +08:00
data() {
return {
detail: {},
list: false,
current: 0,
2021-12-03 18:42:32 +08:00
show: false,
2021-11-19 09:27:00 +08:00
}
},
2021-11-19 11:28:04 +08:00
computed: {
2021-12-02 14:36:44 +08:00
...mapState(["user"]),
2021-11-19 11:28:04 +08:00
tabs() {
return [
{name: this.count(0) + "人未确认"},
{name: this.count(1) + "人已确认"},
{name: this.count(2) + "人已请假"},
2021-12-01 09:58:32 +08:00
{name: this.count(3) + "人待定"},
2021-11-19 11:28:04 +08:00
]
},
2021-11-19 09:27:00 +08:00
},
2021-11-19 11:28:04 +08:00
methods: {
2021-12-03 18:42:32 +08:00
onConfirm() {
2021-12-02 14:36:44 +08:00
this.$http.post("/app/appmeetinginfo/cancel", null, {
params: {
meetingId: this.params,
}
}).then(res => {
if (res.code == 0) {
this.$u.toast("取消成功");
this.getDetail();
}
})
},
2021-12-03 18:42:32 +08:00
handleCancel() {
2021-12-02 14:36:44 +08:00
this.show = true;
},
2021-12-03 18:42:32 +08:00
toDo() {
2021-12-01 09:58:32 +08:00
this.$http.post("/app/appmeetinginfo/tobeConfirm", null, {
params: {
2021-12-01 17:34:07 +08:00
meetingId: this.params,
2021-12-01 09:58:32 +08:00
}
}).then(res => {
if (res.code == 0) {
this.$u.toast("会议待定");
2021-12-03 18:42:32 +08:00
setTimeout(_ => {
2021-12-01 09:58:32 +08:00
uni.navigateBack();
2021-12-03 18:42:32 +08:00
}, 800)
2021-12-01 09:58:32 +08:00
}
})
2021-12-01 09:38:39 +08:00
},
2021-11-19 11:28:04 +08:00
count(sta) {
return this.detail.attendees?.filter(e => e.joinStatus == sta)?.length;
},
change(index) {
this.current = index;
},
call(item) {
if (item.phone) {
uni.makePhoneCall({
phoneNumber: item.phone
});
2021-11-19 09:27:00 +08:00
}
2021-11-19 11:28:04 +08:00
},
...mapActions(['previewFile', 'injectJWeixin']),
preFile(e) {
if ([".jpg", ".png", ".gif"].includes(e.postfix.toLowerCase())) {
uni.previewImage({
current: e.url,
urls: [e.url]
})
} else {
this.previewFile({...e})
}
},
tag(status) {
return {
"1": "common/2confirmed2.png",
"2": "common/2absent2.png"
}[status]
},
updateStatus(status) {
this.$http.post(status == 0 ? "/app/appmeetinginfo/absent" : "/app/appmeetinginfo/confirm", null, {
params: {
2021-12-01 17:34:07 +08:00
meetingId: this.params,
2021-11-19 11:28:04 +08:00
reason: status == 0 ? "" : null
}
}).then(res => {
if (res.code == 0) {
this.$u.toast(status == 0 ? "请假成功" : "确认成功")
this.getDetail()
}
})
},
color(status) {
if (status == 1) {
return "#FF8822"
2021-11-19 09:27:00 +08:00
}
2021-11-19 11:28:04 +08:00
if (status == 2) {
return "#1365DD"
}
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
if (status == 3) {
return "#FF4466"
}
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
return "#343D65"
},
getDetail() {
this.$http.post("/app/appmeetinginfo/info-id", null, {
params: {id: this.params}
}).then(res => {
if (res && res.data) {
this.detail = res.data
}
})
}
},
created() {
this.getDetail();
2021-11-19 09:27:00 +08:00
},
2021-11-24 10:36:33 +08:00
mounted() {
document.title = "会议详情"
},
2021-11-19 11:28:04 +08:00
filters: {
transform(status) {
if (status == 1) {
return "已确认"
}
if (status == 2) {
return "已请假"
2021-11-19 09:27:00 +08:00
}
}
}
}
</script>
<style lang="scss" scoped>
2021-11-19 11:28:04 +08:00
.detail {
min-height: 100%;
background-color: #F5F5F5;
padding-bottom: 140px;
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
::v-deep .AiTopFixed {
margin-bottom: 16px;
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
.content {
padding: 0 !important;
}
2021-11-19 09:27:00 +08:00
}
2021-11-19 11:28:04 +08:00
.att-list {
min-height: 100%;
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
.att-wrap {
2021-11-19 09:27:00 +08:00
display: flex;
2021-11-19 11:28:04 +08:00
height: 112px;
2021-11-19 09:27:00 +08:00
align-items: center;
2021-11-19 11:28:04 +08:00
justify-content: space-between;
background-color: #ffffff;
box-sizing: border-box;
padding: 0 50px;
border-bottom: 1px solid #E4E5E6;
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
.left {
display: flex;
align-items: center;
&:after {
content: "";
position: absolute;
right: 0;
bottom: 0;
width: 622px;
height: 2px;
background-color: rgba(216, 221, 230, 0.5);
}
.name {
font-size: 30px;
font-weight: 600;
color: #333333;
}
2021-11-19 09:27:00 +08:00
}
2021-11-19 11:28:04 +08:00
& > img {
width: 48px;
height: 48px;
2021-11-19 09:27:00 +08:00
}
}
2021-11-19 11:28:04 +08:00
}
.card {
background-color: #FFFFFF;
margin-bottom: 8px;
box-sizing: border-box;
padding: 16px 32px;
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
header {
font-size: 40px;
font-weight: 600;
color: #333333;
line-height: 64px;
letter-spacing: 1px;
2021-11-19 09:27:00 +08:00
}
2021-11-19 11:28:04 +08:00
.u-row {
& > div {
border-radius: 50%;
text-align: center;
2021-12-06 11:05:51 +08:00
font-size: 30px;
2021-11-19 11:28:04 +08:00
display: flex;
align-items: center;
justify-content: center;
2021-12-06 11:05:51 +08:00
/*margin-left: 8px;*/
2021-11-19 11:28:04 +08:00
}
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
& > span {
font-size: 30px;
color: #343D65;
margin-left: 16px;
}
::v-deep .u-avatar__img {
width: 56px;
height: 56px;
vertical-align: middle;
2021-12-03 18:42:32 +08:00
color: #ffffff;
background-color: #2266FF;
2021-11-19 11:28:04 +08:00
}
img {
width: 48px;
height: 48px;
}
2021-11-19 09:27:00 +08:00
}
& > span {
2021-11-19 11:28:04 +08:00
font-size: 32px;
color: #333333;
line-height: 48px;
letter-spacing: 1px;
display: inline-block;
box-sizing: border-box;
padding: 16px 0;
2021-11-19 09:27:00 +08:00
}
2021-11-19 11:28:04 +08:00
.label {
height: 96px;
font-size: 32px;
color: #333333;
display: flex;
align-items: center;
margin-bottom: 16px;
2021-11-19 09:27:00 +08:00
}
2021-11-19 11:28:04 +08:00
.file {
height: 128px;
background: #FFFFFF;
border-radius: 8px;
border: 1px solid #CCCCCC;
box-sizing: border-box;
padding: 0 16px;
margin-bottom: 32px;
& > .u-row {
height: 100%;
.left {
width: 522px;
display: flex;
align-items: center;
& > img {
width: 96px;
height: 96px;
}
& > span {
font-size: 32px;
color: #333333;
display: inline-block;
line-height: 44px;
2021-12-08 09:24:20 +08:00
text-overflow: ellipsis;
overflow-x: hidden;
white-space: nowrap;
2021-11-19 11:28:04 +08:00
}
}
& > span {
font-size: 28px;
color: #999999;
}
}
2021-11-19 09:27:00 +08:00
}
2021-11-19 11:28:04 +08:00
.active {
background-color: #F3F6F9;
}
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
.name {
font-size: 32px;
font-weight: 400;
color: #333333;
}
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
.wrap {
height: 112px;
display: flex;
align-items: center;
position: relative;
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
&:after {
content: "";
position: absolute;
right: 0;
bottom: 0;
width: 622px;
height: 2px;
background-color: rgba(216, 221, 230, 0.5);
}
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
& > label {
width: 80px;
height: 80px;
border-radius: 50%;
background-color: #4E8EEE;
font-size: 28px;
font-weight: 600;
color: #FFFFFF;
2021-11-19 09:27:00 +08:00
display: flex;
align-items: center;
2021-11-19 11:28:04 +08:00
justify-content: center;
}
}
}
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
.item-wrap {
height: 112px;
padding: 0 32px;
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
.u-row {
height: 100%;
2021-11-19 09:27:00 +08:00
& > span {
2021-11-19 11:28:04 +08:00
font-size: 32px;
font-weight: 400;
color: #333333;
2021-11-19 09:27:00 +08:00
}
}
2021-11-19 11:28:04 +08:00
.right {
font-size: 28px;
color: #999999;
display: flex;
align-items: center;
em {
font-style: normal;
color: #1365DD;
}
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
.right-arrow {
width: 16px;
height: 16px;
border-top: 5px solid #CCCCCC;
border-right: 5px solid #CCCCCC;
transform: rotate(45deg);
}
}
2021-11-19 09:27:00 +08:00
}
2021-11-19 11:28:04 +08:00
.footer {
2021-11-19 09:27:00 +08:00
height: 112px;
2021-11-19 11:28:04 +08:00
width: 100%;
position: fixed;
left: 0;
bottom: 0;
background-color: #FFFFFF;
2021-11-19 09:27:00 +08:00
display: flex;
align-items: center;
2021-11-19 11:28:04 +08:00
justify-content: center;
2021-11-19 09:27:00 +08:00
2021-11-19 11:28:04 +08:00
& > div {
font-size: 36px;
color: #333333;
2021-11-19 09:27:00 +08:00
}
2021-12-03 18:42:32 +08:00
& > div:nth-child(1), & > div:nth-child(2) {
2021-12-01 09:38:39 +08:00
width: 135px;
2021-11-19 11:28:04 +08:00
height: 100%;
2021-11-19 09:27:00 +08:00
display: flex;
align-items: center;
justify-content: center;
}
2021-11-19 11:28:04 +08:00
& > div:last-child {
width: calc(100% - 270px);
height: 100%;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
background-color: #1365DD;
2021-11-19 09:27:00 +08:00
}
2021-11-19 11:28:04 +08:00
& > label {
font-size: 36px;
font-weight: 400;
color: #999999;
2021-11-19 09:27:00 +08:00
}
2021-11-19 11:28:04 +08:00
img {
width: 158px;
height: 104px;
position: absolute;
right: 0;
top: 0;
2021-11-19 09:27:00 +08:00
}
}
2021-12-02 14:36:44 +08:00
2021-12-03 18:42:32 +08:00
.cancel {
color: #ffffff;
2021-12-02 14:36:44 +08:00
font-size: 36px;
background-color: #005DFF
}
2021-11-19 09:27:00 +08:00
}
</style>