Files
zhgh_hhu/target/classes/views/mobile/meeting/myMeeting.html
T
2026-09-20 15:46:34 +08:00

639 lines
24 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.van-index-bar__sidebar {
display: none;
}
.van-doc-card {
margin: 14px;
padding: 12px 12px 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 13px;
position: relative;
}
.van-divider {
margin: 6px 0 6px 0px;
border-color: lightgray;
}
.van-button--small {
border-top-right-radius: 16px;
border-bottom-left-radius: 16px;
height: 26px;
}
.van-col {
line-height: 20px;
}
.title_span {
font-size: 16px;
font-weight: bold;
position: absolute;
left: -1px;
top: 11px;
color: #1867b0;
}
.title {
font-size: 13px;
font-weight: bold;
flex: 1;
overflow: hidden;
white-space: nowrap;
}
.cus_overflow {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.showMore {
color: #1867b0;
}
.cus_popup {
width: 70%;
height: 50%;
/*border-radius: 10px;*/
padding: 10px 14px;
font-size: 15px;
/*background-color: #E5E7E9;
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
}
.cus_icon {
z-index: 10000;
color: white;
font-size: 35px;
position: fixed;
top: 81%;
left: 44%;
}
.van-dropdown-menu__item {
flex: auto;
}
.leave_pop {
height: 80%;
background-color: #f6f7f9;
}
.content {
height: 82%;
overflow: auto;
}
.van-field__label {
width: 4.6em;
}
.checkDiv {
font-size: 33px;
color: #1867b0;
position: absolute;
right: 4px;
top: 30px;
}
.auditState {
position: absolute;
right: -10px;
top: -3px;
border-radius: 4px;
padding: 1px 8px;
border: 1px #1867b0 solid;
background: #1867b0;
opacity: 0.6;
color: white;
transform: skewY(5deg);
}
.van-field--min-height .van-field__control {
min-height: auto;
font-size: 13px;
}
.border_div {
width: 33px;
height: 33px;
border: 1px lightgrey solid;
border-radius: 14px;
position: absolute;
right: 4px;
top: 28px;
}
.custom-image1 {
height: 50% !important;
}
</style>
<div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading>
<!--top栏-->
<van-nav-bar
@click-left="history.go(-1)"
fixed
left-arrow
placeholder
safe-area-inset-top
title="我的会议"
></van-nav-bar>
<!--筛选框-->
<div class="search-fixed">
<van-search
@search="doSearch"
maxlength="10"
placeholder="请输入会议名称、会议地点进行查询"
shape="round"
v-model="pageForm.searchKeyWord"
>
</van-search>
<van-dropdown-menu>
<van-dropdown-item :options="meetingList" @change="doSearch"
v-model="pageForm.tabNameIndex"></van-dropdown-item>
<van-dropdown-item :options="meetingTimeList" @change="doSearch"
v-model="pageForm.meetingTime"></van-dropdown-item>
<van-dropdown-item :options="typeList" @change="doSearch"
v-model="pageForm.typeId"></van-dropdown-item>
</van-dropdown-menu>
</div>
<!--列表-->
<div style="margin-top: 116px">
<van-list
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false"
@load="onLoad"
v-model="loading"
>
<div class="van-doc-card" v-for="o in tableData">
<div @click="openView(o.id)">
<div style="display: flex; justify-content: space-between">
<div style="width: 74%">
<div class="van-ellipsis title">
<span class="title_span">|</span>
<span>{{o.meetingName}}</span>
</div>
</div>
<div style="color: #1867b0; white-space: nowrap;">
{{o.meetingTypeName}}
</div>
</div>
<div style="margin-top: 10px">
<van-row>
<span style="color: grey">会议地点:</span>
{{o.location}}
</van-row>
</div>
<div style="margin-top: 10px">
<van-row>
<span style="color: grey">会议时间:</span>
{{o.startTime}}
<!--<van-col span="12"><span style="color: grey">结束时间:</span></van-col>-->
</van-row>
<van-row>
<!--<van-col span="12">{{o.endTime}}</van-col>-->
</van-row>
</div>
<div style="display: flex; justify-content: space-between; margin-top: 8px">
<div class="cus_overflow" style="line-height: 20px; width: 83%">
<span style="color: grey">会议描述:</span>
{{o.meetingDescription}}
</div>
<span @click.stop="popupShow = true; clickRow = o"
class="showMore">查看更多</span>
</div>
<van-divider></van-divider>
<div style="display: flex; justify-content: flex-end">
<!--<div style="display: flex; align-items: center">
<span style="color: grey">审核状态:</span>
<span :style="'color: ' + o.stateColor">{{o.stateName}}</span>
</div>-->
<div>
<!--<van-button @click="needLeave(o)" v-if="o.isCanLeave === null && o.isJoin === null"
type="primary" size="small" color="#1867b0" style="margin-right: 8px">我要请假</van-button>
<van-button v-if="o.isJoin === false" size="small" disabled color="grey" style="margin-right: 8px">已请假</van-button>
<van-button type="primary" v-if="o.isJoin !== false" size="small" color="#1867b0">我要签到</van-button>
<van-button v-if="o.isJoin === true" size="small" disabled color="grey">已签到</van-button>-->
<van-button
:disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false"
@click="needLeave(o, true, true)"
color="#1867b0" size="small" style="margin-right: 8px"
v-if="${@shiro.hasRole('jdhdbt01')||@shiro.hasRole('H04')}"
type="primary">替他人请假
</van-button>
<van-button
:disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false"
@click="needLeave(o, false, false)"
color="#1867b0" size="small" style="margin-right: 8px"
type="primary">查看请假状态
</van-button>
<van-button
:disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false"
@click="needLeave(o, true, false)"
color="#1867b0" size="small" style="margin-right: 8px"
type="primary">我要请假
</van-button>
</div>
</div>
</div>
</div>
</van-list>
<van-empty
class="custom-image"
description="暂无数据"
image="/none.svg"
v-if="mLoading==false&&tableData.length==0"
></van-empty>
</div>
<!--弹出框-->
<van-popup class="cus_popup" v-model:show="popupShow">
<pre style="margin: 0; white-space: break-spaces; line-height: 28px">{{clickRow.meetingDescription}}</pre>
</van-popup>
<van-icon @click="popupShow = false" class="cus_icon" name="close" v-if="popupShow"></van-icon>
<!--请假弹框-->
<van-action-sheet class="leave_pop" title="会议信息" v-model="leaveShow">
<div v-if="flag === true"
style="padding: 0px 0px 10px 0px; text-align: center; font-size: 14px; color: #646566">
请<span style="color: red">点击选择</span>请假时间段,填写请假原因
</div>
<div class="content">
<van-field
v-if="helpLeave"
v-model="needLeaveUser.userName"
label="请假人"
readonly=""
@click="helpUserShow = true"
placeholder="请点击选择请假人"
input-align="right"
></van-field>
<div v-if="timeList.length > 0" class="van-doc-card" v-for="(item, index) in timeList">
<div>
<div>
<span style="color: grey">会议名称:</span>
<span>{{item.timePeriodName}}</span>
</div>
</div>
<div @click="leaveClick(item, index)"
style="display: flex; justify-content: space-between">
<div>
<div>
<span style="color: grey">会议时间:</span>
<span>{{moment(item.startTime).format('YYYY-MM-DD HH:mm')}}</span>
</div>
<!--<div><span style="color: grey">结束时间:</span>{{moment(item.endTime).format('YYYY-MM-DD HH:mm')}}</div>-->
</div>
<div>
<div v-if="flag === true" class="border_div"></div>
<van-icon v-if="flag === true" :class="'checkDiv checkDiv' + index"
name="success" style="display: none;"></van-icon>
<span class="auditState"
v-if="item.isJoin === false">{{item.stateName}}</span>
</div>
</div>
<div v-if="item.isJoin === false">
<div>
<span style="color: grey">审核状态:</span>
<span>{{item.stateName}}</span>
</div>
</div>
<div>
<span style="float: left; color: grey">请假原因:</span>
<van-field :disabled="item.isJoin === false" placeholder="请输入请假原因" rows="1"
style="font-size: 12px; padding: 0; width: 70%; line-height: 20px; margin-left: 69px"
type="textarea" autosize
v-model="item.leaveReason"></van-field>
</div>
<div v-if="flag === false && item.stateCode === clickRow.firstState && item.stateAuditType !== 1"
style="text-align: right">
<van-button @click.stop="cancelLeave(item)" border color="#1867b0" size="small">
取消请假
</van-button>
</div>
<div v-if="flag === false && item.stateAuditType === 1" style="text-align: right">
<van-button @click.stop="refreshApply(item)" border color="#1867b0"
size="small">重新申请
</van-button>
</div>
</div>
</div>
<div v-if="flag === true">
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 20px; width: 100%">
<van-button @click="leaveShow = false" color="lightgrey" size="small"
style="width: 40%; border-radius: revert; height: 38px">取消
</van-button>
<van-button @click="leave" color="#1867b0" size="small"
style="width: 40%; border-radius: revert; height: 38px">确定
</van-button>
</div>
</div>
</van-action-sheet>
<van-popup position="bottom" round v-model="helpUserShow" :style="{ height: '70%' }" closeable class="sign_pop">
<van-search v-model="searchResult" show-action style="padding: 10px;margin-top: 45px" placeholder="请输入工号或姓名搜索"
@input="delaySearch">
</van-search>
<van-cell-group v-if="userList && userList.length > 0">
<div>
<van-checkbox-group style="text-align: center">
<van-cell-group>
<van-cell v-for="(item, index) in userList" :key="item.index" clickable
:title="item.name"
@click="toResult(item.loginname)">
</van-cell>
</van-cell-group>
</van-checkbox-group>
</div>
</van-cell-group>
<van-empty
v-else
class="custom-image1"
image="/none.svg"
description="暂无数据"
></van-empty>
</van-popup>
</div>
<script>
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
const meetUtil = new meetingUtil()
const vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
searchResult: '',
userList: [],
helpUserShow: false,
needLeaveUser: {
userName: '',
userId: '',
},
helpLeave: false,
timeList: [],
checked: [],
checkboxRefs: [],
leaveReason: '',
leaveShow: false,
popupShow: false,
tabNameIndex: 0,
clickRow: {},
meetingList: [{text: '全部', value: '0'}, {text: '我参与的', value: '1'}, {
text: '我请假的',
value: '2'
}],
typeList: [],
meetingTimeList: [{text: '全部时间', value: null}, {
text: '即将开始',
value: 0
}, {text: '已结束', value: 1}],
flag: true,
}
},
methods: {
async delaySearch(query) {
if (query) {
const data = await this.searchUser(query)
data.forEach(v => {
v.name = v.username + '(' + v.loginname + ')'
return v
})
this.userList = data
}
},
async searchUser(query) {
const res = await $.post('/mobile/meeting/mine/searchUser', {query: query, meetId: this.clickRow.id})
return res.data
},
toResult(loginname) {
this.timeList = []
const data = this.userList.find(o => o.loginname === loginname)
this.$set(this.needLeaveUser, 'userName', data.username)
this.$set(this.needLeaveUser, 'userId', data.id)
this.helpUserShow = false
this.findTimeList(this.clickRow)
},
refreshApply(o) {
vant.Dialog.confirm({
title: '温馨提示',
message: '您确定要重新申请吗?',
}).then(async () => {
await this.needLeave(this.clickRow, true, false)
this.timeList.forEach((re, index) => {
if (re.stateAuditType === 1) {
re.isJoin = null
re.stateCode = null
re.leaveReason = null
$('.checkDiv' + index).css('display', 'none')
this.checked = this.checked.filter(function (item, index) {
return item.id !== re.id
})
}
})
}).catch(() => {
})
},
cancelLeave(o) {
vant.Dialog.confirm({
title: '温馨提示',
message: '您确定要取消请假吗?',
}).then(async () => {
const res = await $.post('/mobile/meeting/mine/cancelLeave', {id: o.id})
if (res.code === 0) {
vant.Toast('操作成功')
this.doSearch()
this.leaveShow = false
}
}).catch(() => {
})
},
leaveClick(item, index) {
if (item.isJoin === false) {
return
}
const isExist = this.checked.some(o => o.tpuId === item.tpuId)
if (!isExist) {
$('.checkDiv' + index).css('display', '')
this.checked.push(item)
} else {
$('.checkDiv' + index).css('display', 'none')
this.checked = this.checked.filter(o => o.tpuId !== item.tpuId)
}
},
toggle(item, index) {
if (item.auditIdList === null) {
this.$refs.checkboxes[index].toggle();
}
},
openView(id) {
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.onLoad()
},
async onLoad() {
this.loading = true
$.post('/mobile/meeting/mine/pageData', this.pageForm).then(res => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) {
this.finished = true
} else {
this.pageForm.pageNumber++
}
}
this.loading = false
})
},
async needLeave(o, flag, helpLeave) {
this.flag = flag
this.clickRow = o
this.helpLeave = helpLeave
this.timeList = []
this.needLeaveUser = {
userName: '',
userId: '',
}
if (moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false) {
vant.Toast('抱歉,已过请假截止时间');
return
}
this.leaveReason = ''
this.checked = []
if(helpLeave) {
this.leaveShow = true
} else {
await this.findTimeList(o)
}
},
async findTimeList(o) {
const res = await $.post('/mobile/meeting/mine/findMyMeetPeriod', {
meetingId: o.id,
helpLeave: this.helpLeave,
userId: this.needLeaveUser.userId
})
if (res.code === 0) {
this.timeList = res.data
if (this.timeList.length === 0) {
vant.Toast('暂无可请假的会议');
return
}
this.leaveShow = true
this.$nextTick(function () {
this.timeList.forEach((re, index) => {
if (re.isJoin === false) {
this.checked.push(re)
$('.checkDiv' + index).css('display', '')
}
})
})
return
}
vant.Toast('系统错误,请联系管理员');
},
async leave() {
if (this.checked.length === 0) {
vant.Toast('请选择请假时间段');
return
}
const array = this.timeList.find(o => o.stateCode === null || o.stateCode < this.clickRow.firstState)
if (array === undefined) {
vant.Toast('所有请假均已处于审核阶段');
return
}
const paramArray = []
let valid = false
for (const item of this.checked) {
if (item.leaveReason === '' || item.leaveReason === undefined) {
vant.Toast('请填写请假原因');
valid = true
return
}
if (!item.stateCode) {
paramArray.push(
{
id: item.tpuId,
meetingId: this.clickRow.id,
leaveReason: item.leaveReason
}
)
}
}
if (paramArray.length === 0) {
vant.Toast('请选择请假时间段');
return
}
if (valid) {
return
}
if(this.helpLeave) {
const confirm = await vant.Dialog.confirm({
title: '提示',
message: '您确定要替' + this.needLeaveUser.userName + '请假吗?',
})
if (confirm !== 'confirm') {
return
}
}
const resp = await $.post('/mobile/meeting/mine/askForLeave', {
meetingId: this.clickRow.id,
data: JSON.stringify(paramArray),
helpLeave: this.helpLeave
})
if (resp.code === 0) {
vant.Toast('操作成功');
this.doSearch()
this.leaveShow = false
}
$('.checkDiv').css('display', 'none')
}
},
async created() {
this.typeList = await meetUtil.getAllMeetingType()
this.typeList.unshift({'text': '全部会议类型'})
if (this.typeList && this.typeList.length > 0) {
this.$set(this.pageForm, "typeId", this.typeList[0].value)
}
this.$set(this.pageForm, "tabNameIndex", this.meetingList[0].value)
this.$set(this.pageForm, "meetingTime", this.meetingTimeList[1].value)
this.onLoad()
}
})
</script>
<!--#
}
#-->