first commit

This commit is contained in:
2026-09-08 19:49:21 +08:00
commit ebffbab428
7320 changed files with 1477614 additions and 0 deletions
@@ -0,0 +1,504 @@
<!--#
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-radius: revert;
width: 40%;
height: 30px;
}
.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%;
}
.userPopup {
height: 80%;
background-color: #f6f7f9;
font-size: 14px;
}
.van-row div {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.firstName {
width: 45px;
background-color: lightgrey;
border-radius: 45px;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
color: white;
}
.content {
height: 84%;
overflow: auto;
}
.van-dialog__header {
padding-top: 8px;
}
.van-dialog__confirm {
color: #1867b0;
}
.van-field__label {
width: 5em;
}
.cus_cell {
padding: 4px 0px;
font-size: 12px;
}
.van-checkbox-group {
max-height: 260px;
overflow-y: auto;
margin-top: 6px;
}
.unit {
display: inline-block;
max-width: 160px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
position: absolute;
}
.cus_button {
border-top-right-radius: 16px;
border-bottom-left-radius: 16px;
height: 26px;
}
.audit_icon {
font-size: 24px;
position: absolute;
font-weight: bolder;
right: 0;
}
.van-dropdown-menu__item {
flex: auto;
}
</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="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, o.modulename)">
<div style="display: flex; justify-content: space-between">
<div style="width: 70%">
<div class="van-ellipsis title">
<span class="title_span">|</span>
<span>{{o.meetingname}}</span>
</div>
<div style="color: grey">{{o.location}}</div>
</div>
<div style="color: #1867b0;">
{{o.meetingtypename}}
</div>
</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="desc = o.meetingdescription; popupShow = true" class="showMore">查看更多</span>
</div>
<van-divider></van-divider>
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
<div>
<van-button @click.stop="getAuditList(o)" class="cus_button"
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
type="primary">已审{{o.audit}}
</van-button>
<van-button @click.stop="openView(o.id, o.modulename)" class="cus_button"
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
type="primary">未审{{o.no_audit}}
</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">{{desc}}</pre>
</van-popup>
<van-icon @click="popupShow = false" class="cus_icon" name="close" v-if="popupShow"></van-icon>
<!--审核人员-->
<van-action-sheet :title="queryType === 'notAudit' ? '请假人员列表' : '请假人员列表'" @close="popClose" class="userPopup"
v-model:show="userShow">
<div class="content">
<div class="van-doc-card" v-for="(item, i) in userList">
<div style="display: flex; justify-content: space-between">
<div style="width: 80%">
<!--<span>{{moment(item.startTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + moment(item.endTime).format('YYYY-MM-DD HH:mm')}}</span>-->
<span>{{'会议时间:' + moment(item.startTime).format('YYYY-MM-DD HH:mm')}}</span>
</div>
<div v-if="queryType === 'notAudit'">
<span @click="checkAll(i)">全选</span>
<span @click="toggleAll(i)" style="margin-left: 4px">反选</span>
</div>
</div>
<div style="margin-top: 4px">
<van-row>
<van-col span="24">
会议名称:
<van-tag size="medium" type="primary">{{item.timePeriodName}}</van-tag>
</van-col>
</van-row>
</div>
<van-checkbox-group ref="checkboxGroup" v-if="item.users !== null" v-model="result">
<van-cell-group>
<van-cell
:key="obj.id"
@click="toggle(i, index)" class="cus_cell"
clickable
v-for="(obj, index) in item.users">
<span style="display: inline-block; width: 40px">{{obj.username}}</span>
<span style="display: inline-block; width: 20px">{{obj.sex}}</span>
<span style="display: inline-block; width: 60px">{{obj.loginname}}</span>
<span class="unit">{{obj.unitname}}</span>
<van-icon class="audit_icon" color="green" name="passed"
v-if="queryType === 'hasAudit' && obj.auditState === true"></van-icon>
<van-icon class="audit_icon" color="grey" name="close"
v-if="queryType === 'hasAudit' && obj.auditState === false"></van-icon>
<template #right-icon v-if="queryType === 'notAudit'">
<van-checkbox :name="obj.id" ref="checkboxes"></van-checkbox>
</template>
</van-cell>
</van-cell-group>
</van-checkbox-group>
<div style="margin-top: 4px; text-align: center" v-else>暂无请假人员</div>
</div>
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 56px; width: 95%"
v-if="queryType === 'notAudit'">
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small" style="height: 38px">驳回
</van-button>
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small" style="height: 38px">通过
</van-button>
</div>
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 10px; width: 95%"
v-if="queryType === 'notAudit'">
<van-button @click="audit('all', 'reject')" color="#ff976a" size="small" style="height: 38px">一键全部驳回
</van-button>
<van-button @click="audit('all', 'pass')" color="#1867b0" size="small" style="height: 38px">一键全部通过
</van-button>
</div>
</div>
</van-action-sheet>
<!--审核弹框-->
<van-dialog @confirm="auditDo" show-cancel-button title="温馨提示" v-model:show="auditShow">
<div style="padding-top: 8px; text-align: center; font-size: 14px; color: #646566">{{str}}</div>
<van-divider style="margin: 12px 0 1px 0px;"></van-divider>
<van-field
autosize
label="审核意见:"
maxlength="50"
placeholder="请输入审核意见"
rows="2"
show-word-limit
type="textarea"
v-model="reason"
></van-field>
</van-dialog>
</div>
<script>
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
const meetUtil = new meetingUtil()
var vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
desc: '',
list: ['a', 'b'],
result: [],
reason: '',
auditShow: false,
popupShow: false,
userShow: false,
userList: [],
userClickList: [],
str: '',
type: '',
auditType: '',
queryType: '',
typeList: [],
meetingTimeList: [{text: '全部时间', value: null}, {text: '即将开始', value: 0}, {text: '已结束', value: 1}],
}
},
methods: {
async getAuditList(o) {
this.queryType = 'hasAudit'
const resp = await $.post('/mobile/meeting/audit/getLeaveUser', {
meetingId: o.id,
auditType: 'hasAudit',
})
if (resp.code === 0) {
this.userList = resp.data
this.userList.forEach(item => {
if (item.users && item.users.length > 1) {
item.users.sort((a, b) => {
return b.auditState - a.auditState
})
}
})
this.userShow = true
}
},
checkAll(i) {
this.$refs.checkboxGroup[i].children.forEach(item => item.toggle(true))
},
toggleAll(i) {
this.$refs.checkboxGroup[i].children.forEach(item => item.toggle())
},
toggle(i, index) {
if (i > 0) {
let length = 0
for (let m = 0; m < i; m++) {
length += this.userList[m].users.length
}
index = length + index
}
this.$refs.checkboxes[index].toggle();
},
async auditDo() {
let idList = this.result
if (this.type === 'all') {
this.userList.forEach(item => {
if (item.users !== null && item.users !== undefined) {
idList = idList.concat(item.users.map(o => o.id))
}
})
}
const resp = await $.post('/mobile/meeting/audit/audit', {
tpuIds: JSON.stringify(idList),
auditOpinion: this.reason,
isPass: this.auditType === 'pass'
})
if (resp.code === 0) {
this.doSearch()
}
vant.Toast(resp.msg)
this.userShow = false
},
audit(type, auditType) {
this.type = type
this.auditType = auditType
if (type === 'many' && this.result.length === 0) {
vant.Toast('请先选择人员')
return
}
this.str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择' : '您确定要一键全部审核吗?'
this.reason = auditType === 'pass' ? '同意' : '拒绝'
this.auditShow = true
},
async openView(id, modulename) {
this.queryType = 'notAudit'
this.userList = []
const resp = await $.post('/mobile/meeting/audit/getLeaveUser', {
meetingId: id,
moduleName: modulename,
auditType: 'canAudit',
})
if (resp.code === 0) {
this.userList = resp.data
this.userClickList = []
if (this.userList.length === 0) {
vant.Toast('暂无请假人员')
} else {
this.userShow = true
}
return
}
vant.Toast('系统错误,请联系管理员')
},
popClose() {
this.$nextTick(function () {
if (this.$refs.checkboxes !== undefined) {
this.$refs.checkboxes.forEach(item => item.toggle(false));
}
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.onLoad()
},
async onLoad() {
this.loading = true
$.post('/mobile/meeting/audit/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 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, "meetingTime", this.meetingTimeList[1].value)
this.onLoad()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,532 @@
<!--#
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;
}
</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, 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)"
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">
<div class="van-doc-card" v-for="(item, index) in timeList">
<div>
<div><span style="color: grey">会议名称:</span>{{item.timePeriodName}}</div>
</div>
<div @click="leaveClick(item, index)"
style="display: flex; justify-content: space-between">
<div>
<div>
<span style="color: grey">会议时间:</span>
{{moment(item.startTime).format('YYYY-MM-DD HH:mm')}}
</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>{{item.stateName}}</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"
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>
</div>
<script>
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
const meetUtil = new meetingUtil()
var vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
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: {
refreshApply(o) {
vant.Dialog.confirm({
title: '温馨提示',
message: '您确定要重新申请吗?',
}).then(async () => {
await this.needLeave(this.clickRow, true)
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) {
this.flag = flag
this.clickRow = o
if (moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false) {
vant.Toast('抱歉,已过请假截止时间');
return
}
this.leaveReason = ''
this.checked = []
const res = await $.post('/mobile/meeting/mine/findMyMeetPeriod', {meetingId: o.id})
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
this.checked.forEach(item => {
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
}
const resp = await $.post('/mobile/meeting/mine/askForLeave', {
meetingId: this.clickRow.id,
data: JSON.stringify(paramArray)
})
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>
<!--#
}
#-->
@@ -0,0 +1,320 @@
<!--#
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: 92%;
}
.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
}
.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);
}
</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">
<div :style="item.id === mtpId ? 'background-color: #43b26a; font-size: 15px' : ''"
class="meeting_index" v-if="item.id === mtpId">
当前
</div>
<div class="meeting_index" style="font-weight: normal" v-else>
{{index + 1}}
</div>
<div class="meeting_peri">
<div>{{item.timePeriodName}}</div>
<div>{{moment(item.startTime).format('YYYY-MM-DD HH:mm')}}</div>
</div>
</div>
</div>
</div>
<div class="footer">
<van-button :disabled="signInfo.isSignIn" @click="signIn" block color="#1867b0" round type="primary">
{{signInfo.isSignIn ? '您已签到' : '点击签到'}}
</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>
</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;
}
var vue = new Vue({
el: '#app',
data() {
return {
meetingInfo: {},
signInfo: {},
isCanAudit: true,
incorrectMag: '',
meetingId: '',
mtpId: '',
isIncorrect: true,
typeName: '',
}
},
methods: {
async pageData() {
const res = await $.get('/mobile/meeting/mine/getMeetingInfo', {
meetingId: this.meetingId,
mtpId: this.mtpId,
})
if (res.code === 0) {
this.meetingInfo = res.data.meetingInfo
this.signInfo = res.data.signInfo
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 signIn() {
const res = await $.post('/mobile/meeting/mine/signIn', {
mtpId: this.mtpId,
})
this.isIncorrect = res.code === 0
this.isCanAudit = false
this.incorrectMag = res.msg
},
back() {
const str = this.incorrectMag === '你不是当前会议人员' ? 'http://' + window.location.host : '/mobile/meeting/mine/go_sign?meetingId=' + this.meetingId + '&mtpId=' + this.mtpId
location.href = str
},
},
async created() {
this.meetingId = getQueryString('meetingId')
this.mtpId = getQueryString('mtpId')
await this.pageData()
}
})
</script>
<!--#
}
#-->