Files
2026-09-20 15:46:34 +08:00

386 lines
12 KiB
HTML

<!--#
layout("/mobile/platform.html"){
#-->
<style>
[v-cloak] {
display: none !important;
}
#app {
max-height: 100vh;
opacity: 0;
}
.header {
height: 400px;
max-height: 400px;
background-color: white
}
.body {
background-color: white;
margin-top: 6px;
height: calc(100vh - (400px + 6px + 26px + 70px));
max-height: calc(100vh - (400px + 6px + 26px + 70px));
padding: 10px;
}
.footer {
background-color: white;
margin-top: 6px;
width: 100%;
height: 70px;
display: flex;
align-items: center;
}
.meeting_info {
height: 200px;
width: 86%;
margin: 0 auto;
transform: translateY(-60%);
background-color: white;
box-shadow: 0 8px 12px #ebedf0;
padding: 10px 10px;
border-radius: 10px;
}
.header .text {
color: white;
text-align: center;
letter-spacing: 3px;
line-height: 40px;
}
.meeting_info .meeting_name {
text-align: center;
font-weight: bold;
}
.meeting_info .meeting_address {
text-align: center;
color: grey;
font-size: 14px;
}
.van-button--block {
margin: 0 auto;
width: 170px;
}
.tag {
color: #1867b0;
font-weight: bold;
font-size: 20px;
margin-right: 6px;
}
.span_text {
color: grey;
font-size: 14px;
}
.van-col {
font-size: 14px;
}
.van-col span {
color: grey;
font-size: 14px;
}
.icon {
width: 6.4em;
height: 6.4em;
display: inline-block;
vertical-align: middle;
font-size: 10px;
-webkit-mask-size: 100%;
-webkit-mask-position: 50% 50%;
background-color: currentColor;
}
.icon_ok {
-webkit-mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-1.177-7.86l-2.765-2.767L7%2012.431l3.119%203.121a1%201%200%20001.414%200l5.952-5.95-1.062-1.062-5.6%205.6z%22%2F%3E%3C%2Fsvg%3E);
color: #07c160;
}
.icon_no {
-webkit-mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-.763-15.864l.11%207.596h1.305l.11-7.596h-1.525zm.759%2010.967c.512%200%20.902-.383.902-.882%200-.5-.39-.882-.902-.882a.878.878%200%2000-.896.882c0%20.499.396.882.896.882z%22%2F%3E%3C%2Fsvg%3E);
color: #fa5151;
}
.weui-msg__text-area {
margin-bottom: 32px;
padding: 0 32px;
-webkit-box-flex: 1;
line-height: 1.6;
}
.weui-msg__text-area .weui-msg__title {
margin-bottom: 16px;
font-weight: 500;
font-size: 22px;
color: rgba(0, 0, 0, 0.9);
}
.weui-msg__desc {
font-size: 17px;
font-weight: 400;
color: rgba(0, 0, 0, 0.9);
margin-bottom: 16px;
}
.meeting_index {
width: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
background-color: lightgrey;
color: white;
font-size: 20px;
font-weight: bold;
}
.meeting_peri {
width: 90%;
line-height: 19px;
margin-left: 10px
}
.meeting_primary {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
padding-right: 10px;
}
.weui-btn_primary:not(.weui-btn_disabled):visited {
color: #fff;
}
.weui-btn_primary {
background-color: #1867b0;
}
.weui-btn {
position: relative;
display: block;
width: 184px;
margin-left: auto;
margin-right: auto;
padding: 8px 24px;
box-sizing: border-box;
font-weight: 700;
font-size: 17px;
text-align: center;
text-decoration: none;
color: #fff;
line-height: 1.88235294;
border-radius: 8px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.body .van-cell {
padding: 0;
}
.body .van-field__control--custom {
justify-content: flex-end;
}
.body .van-field__label {
min-width: 170px;
}
</style>
<div id="app">
<div v-if="isCanAudit">
<div class="header">
<div style="height: 300px; background-color: #1867b0; border-radius: 0 0 16% 16%;">
<div class="text">会议通知</div>
</div>
<div class="meeting_info">
<div class="meeting_name">{{meetingInfo.meetingName}}</div>
<div class="meeting_address">{{meetingInfo.location}}</div>
<div style="position: relative; top: 55px">
<van-row>
<van-col span="24"><span>会议类型:</span>{{typeName}}</van-col>
</van-row>
<div style="position: relative; top: 30px">
<van-row>
<van-col span="24">
<span style="color: grey; font-size: 14px;">会议时间:</span>
{{moment(meetingInfo.startTime).format('YYYY-MM-DD HH:mm')}}
</van-col>
</van-row>
<van-row>
<van-col span="24">
<span style="color: grey; font-size: 14px;">结束时间:</span>
{{moment(meetingInfo.endTime).format('YYYY-MM-DD HH:mm')}}
</van-col>
</van-row>
</div>
</div>
</div>
</div>
<div class="body">
<div><span class="tag">|</span>会议名称</div>
<div style="overflow-y: auto; height: 100%; font-size: 13px;margin-top: 16px">
<div class="meeting_primary" v-for="(item,index) in meetingInfo.meetingTimePeriods">
<van-field name="checkbox">
<template #label>
<div class="meeting_peri">
<div>{{item.timePeriodName}}</div>
<div>{{moment(item.startTime).format('YYYY-MM-DD HH:mm')}}</div>
</div>
</template>
<template #input>
<van-radio-group v-model="item.isJoinByMsg" direction="horizontal">
<van-radio :name="true">参加</van-radio>
<van-radio :name="false">不参加</van-radio>
</van-radio-group>
</template>
</van-field>
</div>
</div>
</div>
<div class="footer">
<van-button @click="submit" block color="#1867b0" round type="primary">
提交
</van-button>
</div>
</div>
<div style="text-align: center; padding-top: calc(100% - 50%)" v-cloak v-else>
<div style="margin-bottom: 32px;">
<span :class="isIncorrect === true ? 'icon icon_ok' : 'icon icon_no'"></span>
</div>
<div class="weui-msg__text-area">
<h2 class="weui-msg__title">{{isIncorrect === true ? '操作成功' : '温馨提示'}}</h2>
<p class=".weui-msg__desc">{{incorrectMag}}</p>
</div>
<p style="margin-top: 190px">
<span @click="back" class="weui-btn weui-btn_primary" role="button">点击返回</span>
</p>
</div>
<van-dialog v-model="notJoinShow" title="提示" show-cancel-button :before-close="onBeforeClose">
<van-field
v-model="notJoinReason"
rows="2"
autosize
label="不参加原因"
type="textarea"
maxlength="100"
placeholder="请输入不参加原因"
show-word-limit
></van-field>
</van-dialog>
</div>
<script>
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
const meetUtil = new meetingUtil()
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return decodeURI(r[2]);
return null;
}
const vue = new Vue({
el: '#app',
data() {
return {
notJoinShow: false,
notJoinReason: '',
meetingInfo: {},
isCanAudit: true,
incorrectMag: '',
meetingId: '',
mtpId: '',
isIncorrect: true,
typeName: '',
}
},
methods: {
async pageData() {
const res = await $.post('/mobile/meeting/notify/getMeetingInfo', {
meetingId: this.meetingId,
})
if (res.code === 0) {
this.meetingInfo = res.data
const typeList = await meetUtil.getAllMeetingType()
const type = typeList.find(o => o.id === this.meetingInfo.typeId)
this.typeName = type !== undefined ? type.meetingTypeName : ''
} else {
this.isCanAudit = false
this.incorrectMag = res.msg
this.isIncorrect = false
}
$('#app').css('opacity', '1')
},
async submit() {
for (let item of this.meetingInfo.meetingTimePeriods) {
if(item.isJoinByMsg === null || item.isJoinByMsg === undefined) {
this.$modal.msg('请选择是否参加')
return
}
}
const join = this.meetingInfo.meetingTimePeriods.filter(o => o.isJoinByMsg === false)
if(join.length > 0) {
this.notJoinShow = true
} else {
const confirm = await vant.Dialog.confirm({
title: '提示',
message: '您确认要参加吗?',
})
if (confirm === "confirm") {
await this.joinDo()
}
}
},
async onBeforeClose(action, done) {
if (action === "confirm") {
if (this.notJoinReason) {
await this.joinDo()
} else {
this.$modal.msg('请填写不参加原因')
return done(false)
}
} else {
done(true)
}
},
async joinDo() {
const resp = await $.post('/mobile/meeting/notify/joinDo', {
notJoinReason: this.notJoinReason,
data: JSON.stringify(this.meetingInfo.meetingTimePeriods),
meetingId: this.meetingInfo.id
})
this.isIncorrect = resp.code === 0
this.isCanAudit = false
this.incorrectMag = resp.msg
this.notJoinShow = false
},
async readDo() {
await $.post('/mobile/meeting/notify/readDo', {meetingId: this.meetingInfo.id})
},
back() {
const str = this.incorrectMag === '你不是当前会议人员' ? 'http://' + window.location.host : '/mobile/meeting/notify?meetingId=' + this.meetingId + '&mtpId=' + this.mtpId
location.href = str
},
},
async created() {
this.meetingId = getQueryString('meetingId')
await this.pageData()
await this.readDo()
}
})
</script>
<!--#
}
#-->