init
This commit is contained in:
@@ -0,0 +1,396 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.search-fixed {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.list-card > .van-cell-group {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 3px 16px;
|
||||
}
|
||||
|
||||
.list-card .van-cell__value {
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar :title="title" @click-left="pjaxReplace('/mobile/activity/unionActivity')" fixed left-arrow
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<!-- <van-dropdown-item v-model="pageForm.isMenWomen" @change="yearChange"
|
||||
:options="sexList"></van-dropdown-item>-->
|
||||
<van-dropdown-item v-model="pageForm.groupName" @change="yearChange"
|
||||
:options="groupList"></van-dropdown-item>
|
||||
<van-dropdown-item :options="eventList" @change="yearChange"
|
||||
v-model="pageForm.eventId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="yearChange"
|
||||
v-model="pageForm.isAudit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card">
|
||||
<van-cell-group inset>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/wbm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply==0&&o.applyWay.includes(1)"></image>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/qxbm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply>0&&o.applyWay.includes(1)"></image>
|
||||
<van-cell :border="false" title="项目名称">
|
||||
<span :style="{color:themeColor}" class="van-ellipsis"
|
||||
style="font-size: 16px;">
|
||||
{{o.allName}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">{{o.projectType==1?'单项':'团体'}}</van-cell>
|
||||
<van-cell :border="false" title="您报队伍">
|
||||
{{o.activityTeamName?o.activityTeamName:'暂无'}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="年龄限制" v-if="o.projectType==1">
|
||||
<span v-if="o.startAgeDate!=null">{{o.startAgeDate}}至{{o.endAgeDate}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="可报队数" v-if="o.projectType==2">
|
||||
{{o.restrictTotalTeam}}队
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="每队可报人数" v-if="o.applyUserModel===1">
|
||||
<span v-if="o.athletesMaxNum">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==1">{{o.athletesMaxNum*o.restrictTotalTeam}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==1">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==2">{{o.restrictGirlNum+o.restrictBoyNum}}人</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="成功报名人数">
|
||||
<span v-if="o.applyNum>0&&o.applyType!=3">{{o.applyNum}}人</span>
|
||||
<span v-else-if="o.totalApplyNum>0&&o.applyType==3">{{o.totalApplyNum}}人</span>
|
||||
<span v-else>0人</span>
|
||||
</van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-dialog @confirm="doActivityConfirm" show-cancel-button title="您确定要报名此活动吗?"
|
||||
v-model="activityDialog"
|
||||
@cancel="activityDialog = false" :before-close="onBeforeClose">
|
||||
<van-radio-group v-model="formData.teamId" v-if="projectType==2">
|
||||
<van-cell-group>
|
||||
<template v-for="i in teams">
|
||||
<van-cell :title="i.name" clickable>
|
||||
<template #right-icon>
|
||||
<van-radio :name="i.id"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</template>
|
||||
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
</van-dialog>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
teamId: null,
|
||||
teamName: null,
|
||||
activityId: "",
|
||||
eventId: ""
|
||||
},
|
||||
title: "",
|
||||
projectType: "",
|
||||
applyType: "",
|
||||
activityDialog: false,
|
||||
restrictBoyNum: "",
|
||||
restrictGirlNum: "",
|
||||
athletesMaxNum: "",
|
||||
events: [],
|
||||
eventList: [],
|
||||
groupList: [
|
||||
{text: '按组别', value: null},
|
||||
{text: '甲组', value: '甲组'},
|
||||
{text: '乙组', value: '乙组'},
|
||||
{text: '丙组', value: '丙组'},
|
||||
{text: '丁组', value: '丁组'},
|
||||
],
|
||||
sexList: [
|
||||
{text: '按性别', value: 1},
|
||||
{text: '男子', value: 2},
|
||||
{text: '女子', value: 3},
|
||||
{text: '团体', value: 4},
|
||||
],
|
||||
auditList: [
|
||||
{text: '全部', value: null},
|
||||
{text: '已报名', value: "true"},
|
||||
{text: '未报名', value: "false"},
|
||||
],
|
||||
teams: [],
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
isMenWomen: "1"
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onBeforeClose(action, done) {
|
||||
return done(false)
|
||||
},
|
||||
async doActivityConfirm() {
|
||||
if (this.formData.teamId == null && this.projectType == 2) {
|
||||
this.$toast("请选择报名的小队")
|
||||
return
|
||||
} else {
|
||||
const {data} = await $.post("/mobile/activity/Sports/list/getTeamUserData", {
|
||||
teamId: this.formData.teamId,
|
||||
activityId: this.formData.activityId,
|
||||
eventId: this.formData.eventId,
|
||||
applyType: this.applyType
|
||||
})
|
||||
const nv = data.filter(v => v.sex === '女')
|
||||
const nan = data.filter(v => v.sex === '男')
|
||||
let title = this.projectType === 1 ? "项目" : "小队"
|
||||
/* if (this.applyType !== 3) {
|
||||
if (this.isManGirlNum === false && "${@shiro.getPrincipalProperty('sex')}" == '男' && nan.length == (this.applyType === 1 ? (this.athletesMaxNum - this.restrictGirlNum) : this.restrictBoyNum)) {
|
||||
this.$toast("该" + title + "男运动员已报满!")
|
||||
return
|
||||
}
|
||||
if (this.isManGirlNum === false && "${@shiro.getPrincipalProperty('sex')}" == '女' && nv.length == (this.applyType === 1 ? (this.athletesMaxNum - this.restrictBoyNum) : this.restrictGirlNum)) {
|
||||
this.$toast("该" + title + "女运动员已报满!")
|
||||
return
|
||||
}
|
||||
}*/
|
||||
if (this.athletesMaxNum && (data.length >= this.athletesMaxNum)) {
|
||||
this.$toast("该" + title + "人员已报满!")
|
||||
return
|
||||
}
|
||||
if (this.formData.teamId != null) this.$set(this.formData, "teamName", this.teams.find(v => v.id == this.formData.teamId).name)
|
||||
await $.post("/mobile/activity/Sports/list/doActivity", this.formData)
|
||||
|
||||
await this.onRefresh()
|
||||
this.activityDialog = false
|
||||
}
|
||||
},
|
||||
async openActivity(o) {
|
||||
let {
|
||||
isManGirlNum,
|
||||
applyType,
|
||||
eventId,
|
||||
activityId,
|
||||
projectType,
|
||||
userApply,
|
||||
applyUserModel,
|
||||
unionLimit,
|
||||
activityGroupId,
|
||||
restrictRegNumber
|
||||
} = o
|
||||
this.projectType = projectType
|
||||
this.formData.activityId = activityId
|
||||
this.formData.eventId = eventId
|
||||
this.applyType = applyType
|
||||
this.isManGirlNum = isManGirlNum
|
||||
|
||||
const res = await $.get("/mobile/activity/Sports/list/getScopeUser", {activityGroupId: activityGroupId})
|
||||
if (res.data == 0) {
|
||||
this.$toast("您不在报名人员内!")
|
||||
return
|
||||
}
|
||||
if ("${@shiro.getPrincipalProperty('unit').getUnionid()}" == "") {
|
||||
this.$toast("您的工会信息有误,无法报名,请联系工会管理员!")
|
||||
return
|
||||
}
|
||||
|
||||
/*if ((isInterest && "${@shiro.hasRole('H04')}" === 'false') || (isInterest && "${@shiro.hasRole('sysadmin')}" === 'false')) {
|
||||
this.$toast("您所报的是趣味运动,请联系工会管理员报名!")
|
||||
return
|
||||
}*/
|
||||
if (userApply == 1) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定取消此次报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
await $.get("/platform/activity/apply/doDeleteApply", {
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
this.yearChange()
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
this.events = []
|
||||
const data = await $.get("/platform/activity/apply/getEvents", {activityId: activityId})
|
||||
this.events = data
|
||||
const {
|
||||
athletesMaxNum,
|
||||
startAgeDate,
|
||||
endAgeDate,
|
||||
isMenWomen,
|
||||
restrictBoyNum,
|
||||
restrictGirlNum
|
||||
} = this.events.find(v => v.id == eventId)
|
||||
if (isMenWomen) {
|
||||
this.restrictBoyNum = athletesMaxNum
|
||||
this.restrictGirlNum = athletesMaxNum
|
||||
} else {
|
||||
this.restrictBoyNum = restrictBoyNum ? restrictBoyNum : 0
|
||||
this.restrictGirlNum = restrictGirlNum ? restrictGirlNum : 0
|
||||
}
|
||||
this.athletesMaxNum = athletesMaxNum
|
||||
if (projectType == 1) {
|
||||
if (isMenWomen != null && isMenWomen === 1 && "${@shiro.getPrincipalProperty('sex')}" != '男') {
|
||||
this.$toast("此项目只能男性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen === 2 && "${@shiro.getPrincipalProperty('sex')}" != '女') {
|
||||
this.$toast("此项目只能女性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (restrictRegNumber > 0) {
|
||||
const {data} = await $.post("/platform/activity/apply/getActivityData", {activityId})
|
||||
const userApplyNum = data.filter(v => v.userId == "${@shiro.getPrincipalProperty('id')}").length
|
||||
if (userApplyNum >= restrictRegNumber) {
|
||||
this.$toast('单项项目,每人限报' + restrictRegNumber + '个!团体项目除外')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
const {data} = await $.post("/mobile/activity/Sports/list/getTeamUserData", {
|
||||
activityId: this.formData.activityId,
|
||||
applyType: applyType,
|
||||
eventId: eventId
|
||||
})
|
||||
|
||||
if (applyUserModel === 1) {
|
||||
if (athletesMaxNum != null) {
|
||||
if (data.length >= athletesMaxNum) {
|
||||
this.$toast("此项目报名人数已满!此项目只需报" + athletesMaxNum + "人")
|
||||
return
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
unionLimit = JSON.parse(unionLimit)
|
||||
const limit = unionLimit.find(v => v.id === "${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
this.athletesMaxNum = limit.limitCount
|
||||
if (data.length >= limit.limitCount) {
|
||||
this.$toast("此项目报名人数已满!此项目只需报" + limit.limitCount + "人")
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (startAgeDate != null) {
|
||||
const birthday = moment("${@shiro.getPrincipalProperty('birthday')}").valueOf()
|
||||
if (birthday < moment(startAgeDate).valueOf() || birthday > moment(endAgeDate).valueOf()) {
|
||||
this.$toast("您的年龄不在限制范围內!")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
if (isMenWomen != null && isMenWomen == 1 && "${@shiro.getPrincipalProperty('sex')}" != '男') {
|
||||
this.$toast("此项目只能男性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen == 2 && "${@shiro.getPrincipalProperty('sex')}" != '女') {
|
||||
this.$toast("此项目只能女性老师才能报名!")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (projectType == 2) {
|
||||
const {data} = await $.get("/platform/activity/apply/getActivityTeamId", {
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
this.teams = data
|
||||
if (data.length && data.length > 0) this.$set(this.formData, "teamId", data[0].id)
|
||||
|
||||
}
|
||||
this.activityDialog = true
|
||||
},
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
|
||||
const {data} = await $.get('/platform/activity/apply/pageData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
|
||||
}
|
||||
,
|
||||
},
|
||||
async created() {
|
||||
const id = GetQueryString('id')
|
||||
const applyType = GetQueryString('applyType')
|
||||
this.pageForm.activityId = id
|
||||
this.pageForm.applyType = applyType
|
||||
const data = await $.post("/platform/activity/apply/getEvents", {activityId: id})
|
||||
data.forEach(v => {
|
||||
this.eventList.push({value: v.eventId, text: v.allName})
|
||||
})
|
||||
this.eventList.unshift({value: null, text: "按项目"})
|
||||
this.$set(this.pageForm, "eventId", this.eventList[0].value)
|
||||
this.$set(this.pageForm, "isMenWomen", 1)
|
||||
this.$set(this.pageForm, "groupName", null)
|
||||
this.$set(this.pageForm, "isAudit", null)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,125 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.tag {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
background-color: #1867b0;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
top: 1px;
|
||||
border-radius: 6px;
|
||||
right: -8px;
|
||||
padding: 1px 7px;
|
||||
transform: rotate(17deg);
|
||||
/*z-index: 999;*/
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="活动列表" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
||||
@change="getActivityData"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isActivity" :options="activityList"
|
||||
@change="getActivityData"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id,o.applyEndTime,o.applyType)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="活动名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.NAME}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="活动地址">{{o.address}}</van-cell>
|
||||
<van-cell :border="false" title="报名时间">
|
||||
<span style="font-size: 12px">
|
||||
{{moment(o.applyStartTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="活动时间">
|
||||
<span style="font-size: 12px">
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="活动状态">
|
||||
<van-tag type="warning" v-if="moment(o.applyStartTime).valueOf() > moment().valueOf()">未开始</van-tag>
|
||||
<van-tag type="primary" v-else-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()">报名中</van-tag>
|
||||
<van-tag type="success" v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()">进行中</van-tag>
|
||||
<van-tag type="danger" v-else-if="moment().valueOf() > moment(o.endTime).valueOf()">活动结束</van-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
activityList: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '未开始', value: 5},
|
||||
{text: '报名中', value: 2},
|
||||
{text: '进行中', value: 4},
|
||||
{text: '已结束', value: 3},
|
||||
],
|
||||
pageForm: {
|
||||
year: '',
|
||||
isActivity: "1"
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
async getActivityData() {
|
||||
const {data} = await $.post("/platform/activity/apply/activityData", {
|
||||
year: this.pageForm.year,
|
||||
isActivity: this.pageForm.isActivity
|
||||
})
|
||||
this.tableData = data
|
||||
},
|
||||
openInfo(id, applyEndTime, applyType) {
|
||||
if (moment(applyEndTime).valueOf() < moment().valueOf()) {
|
||||
this.$toast("活动已结束,暂不能报名")
|
||||
return
|
||||
}
|
||||
window.location.href = '/mobile/activity/Sports/list/activityEventList?id=' + id + "&applyType=" + applyType
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
this.$set(this.pageForm, "isActivity", 1)
|
||||
await this.getActivityData()
|
||||
this.mLoading = false
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,150 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.list-card > .van-cell-group {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 3px 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="报名详情" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div style="margin: 20px auto 0 auto">
|
||||
<div v-for="o in tableData" class="list-card">
|
||||
<van-cell-group inset>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/ybm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply>0&&o.applyWay.includes(1)"></image>
|
||||
<van-cell :border="false" title="项目名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;"
|
||||
:style="{color:themeColor}">
|
||||
{{o.allName}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">{{o.projectType==1?'单项':'团体'}}</van-cell>
|
||||
<van-cell :border="false" title="年龄限制" v-if="o.projectType==1">
|
||||
<span v-if="o.startAgeDate!=null">{{o.startAgeDate}}至{{o.endAgeDate}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
|
||||
<van-cell :border="false" title="每队可报人数" v-if="o.applyUserModel===1">
|
||||
<span v-if="o.athletesMaxNum">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==1">{{o.athletesMaxNum*o.restrictTotalTeam}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==1">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==2">{{o.restrictGirlNum+o.restrictBoyNum}}人</span>
|
||||
<span v-else>暂无</span>
|
||||
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="已报名人数">
|
||||
<span v-if="o.applyNum>0&&o.applyType!=3">{{o.applyNum}}人</span>
|
||||
<span v-else-if="o.totalApplyNum>0&&o.applyType==3">{{o.totalApplyNum}}人</span>
|
||||
<span v-else>0人</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
projectInfo: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getActivityInfo() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/findOne', {id: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.o = resp.data
|
||||
this.$nextTick(() => {
|
||||
// document.getElementsByClassName('activity_img_back')[0].style.backgroundImage = "url(" + FILE_DOMAIN + this.o.cover + ")"
|
||||
})
|
||||
}
|
||||
},
|
||||
async getSchoolActivityProjectInfoByMine() {
|
||||
const resp = await $.get('/mobile/activity/myActivity/getSchoolActivityProjectInfoByMine', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.projectInfo = resp.data
|
||||
}
|
||||
},
|
||||
async getHasRegEventProject() {
|
||||
const resp = await $.get('/platform/activity/apply/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
}
|
||||
},
|
||||
async openActivity(o) {
|
||||
const {
|
||||
applyType,
|
||||
eventId,
|
||||
activityId,
|
||||
projectType,
|
||||
userApply,
|
||||
applyNum,
|
||||
name,
|
||||
activityGroupId,
|
||||
restrictRegNumber
|
||||
} = o
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定取消此次报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '取消中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.get("/platform/activity/apply/doDeleteApply", {
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('取消成功')
|
||||
this.getHasRegEventProject()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.$set(this.pageForm, 'isAudit', 'true')
|
||||
this.$set(this.pageForm, 'activityId', id)
|
||||
this.$set(this.pageForm, 'pageSize', 100)
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.getHasRegEventProject()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,551 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.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: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.in-sheet-card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.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 {
|
||||
max-height: 96%;
|
||||
height: 96%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.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: 86%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.no_content {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-action-sheet__content {
|
||||
height: 88%;
|
||||
}
|
||||
|
||||
.van-dialog__header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.van-dialog__confirm {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 6em;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
/*position: absolute;*/
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.van-cell__value--alone {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
title="场地预约审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入场地名称、场地地点进行查询"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<!--<van-dropdown-item v-model="pageForm.meetingTime" :options="meetingTimeList"
|
||||
@change="doSearch"></van-dropdown-item>-->
|
||||
<van-dropdown-item v-model="pageForm.typeId" :options="typeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished" :immediate-check="false"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
|
||||
<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: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.address}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{o.meetingtypename}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey"> 联系人:</span>{{o.unitname ? (o.unitname +
|
||||
'') : '' + '' + o.contact_person}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联系方式:</span>{{o.contact_phone}}</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<!--<div class="cus_overflow" style="line-height: 20px; width: 83%">
|
||||
<span style="color: grey">开放时段:</span>
|
||||
{{o.meetingdescription}}
|
||||
</div>-->
|
||||
<!--<span class="showMore" @click.stop="desc = o.meetingdescription; popupShow = true">查看更多</span>-->
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="getAuditList(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">已审{{o.audit}}
|
||||
</van-button>
|
||||
<van-button @click.stop="openView(o.id, o.modulename)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">未审{{o.no_audit}}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--弹出框-->
|
||||
<van-popup v-model:show="popupShow" class="cus_popup">
|
||||
<pre style="margin: 0; white-space: break-spaces">{{desc}}</pre>
|
||||
</van-popup>
|
||||
|
||||
<van-icon @click="popupShow = false" class="cus_icon" v-if="popupShow" name="close"></van-icon>
|
||||
|
||||
<!--审核人员-->
|
||||
<van-action-sheet v-model:show="userShow" :title="queryType === 'notAudit' ? '预约列表' : '预约列表'"
|
||||
class="userPopup" @close="popClose">
|
||||
<div :class="queryType == 'notAudit' ? 'content' : 'no_content'">
|
||||
<div v-if="queryType === 'notAudit'" style="text-align: right; width: 96%">
|
||||
<van-tag color="#1867b0" style="margin-right: 10px" @click="cancelAll" size="large" type="primary">
|
||||
取消选中
|
||||
</van-tag>
|
||||
<van-tag color="#1867b0" @click="allIn" size="large" type="primary">全选</van-tag>
|
||||
</div>
|
||||
<div class="van-doc-card in-sheet-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>
|
||||
</div>
|
||||
<div v-if="queryType === 'notAudit'">
|
||||
<span @click="checkAll(i)">全选</span>
|
||||
<span @click="toggleAll(i)" style="margin-left: 4px">反选</span>
|
||||
</div>
|
||||
</div>-->
|
||||
<div style="width: 90%">
|
||||
<div>
|
||||
<span style="display: inline-block; min-width: 40px; max-width: 76px">{{item.username}}</span>
|
||||
<span style="display: inline-block; width: 20px">{{item.sex}}</span>
|
||||
<span style="display: inline-block; width: 76px">{{item.loginname}}</span>
|
||||
<span class="unit">{{item.unitname}}</span>
|
||||
</div>
|
||||
<div style="width: 94%; display: flex">
|
||||
<div style="color: grey;">预约时间:</div>
|
||||
<div>
|
||||
<div v-for="(d,index) in item.concat_day.split(',')">{{getTime(item, d)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 94%;">
|
||||
<span style="color: grey">参加人员:</span><span>{{item.joinUser}}</span>
|
||||
</div>
|
||||
<div style="width: 94%;">
|
||||
<span style="color: grey">预约事由:</span><span>{{item.reserve_cause}}</span>
|
||||
</div>
|
||||
<div style="width: 94%;">
|
||||
<span style="color: grey">审核状态:</span><span>{{item.stateName}}</span>
|
||||
</div>
|
||||
<div v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')}"
|
||||
style="width: 94%;">
|
||||
<span style="color: grey">反馈意见:</span><span>{{item.back_option}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-checkbox-group v-model="result" ref="checkboxGroup">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
clickable class="cus_cell"
|
||||
:key="item.id"
|
||||
@click="toggle(i)">
|
||||
|
||||
<van-icon class="audit_icon" color="green"
|
||||
v-if="queryType === 'hasAudit' && item.auditState == true"
|
||||
name="passed"></van-icon>
|
||||
<van-icon class="audit_icon" color="grey"
|
||||
v-if="queryType === 'hasAudit' && item.auditState == false"
|
||||
name="close"></van-icon>
|
||||
<template #right-icon v-if="queryType === 'notAudit'">
|
||||
<van-checkbox :name="item.id" ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
<!--<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: space-evenly; position: fixed; bottom: 50px; width: 95%">
|
||||
<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>
|
||||
<div style="position: absolute; bottom: 20px; width: 100%;z-index: 9999">
|
||||
<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: center">
|
||||
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small"
|
||||
style="height: 38px;border-radius: 10px;margin-right: 20px">驳回
|
||||
</van-button>
|
||||
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small"
|
||||
style="height: 38px;border-radius: 10px">通过
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-action-sheet>
|
||||
|
||||
<!--审核弹框-->
|
||||
<van-dialog v-model:show="auditShow" @confirm="auditDo" title="温馨提示" show-cancel-button>
|
||||
<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
|
||||
v-model="reason"
|
||||
rows="2"
|
||||
label="审核意见:"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入审核意见"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const 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: {
|
||||
getTime(o, day) {
|
||||
const week = new Date(day).getDay()
|
||||
const arr = ['日', '一', '二', '三', '四', '五', '六']
|
||||
return moment(day).format('MM月DD日') + ' 周' + arr[week] + ' ' + o.start_time + '-' + o.end_time
|
||||
},
|
||||
async getAuditList(o) {
|
||||
this.queryType = 'hasAudit'
|
||||
const resp = await $.post('/mobile/activity/site/audit/getLeaveUser', {
|
||||
siteId: o.id,
|
||||
auditType: 'hasAudit',
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
if (this.userList.length === 0) {
|
||||
vant.Toast('暂无数据')
|
||||
return
|
||||
}
|
||||
this.userList.sort((a, b) => {
|
||||
return b.auditState - a.auditState
|
||||
})
|
||||
this.userShow = true
|
||||
}
|
||||
},
|
||||
cancelAll() {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false))
|
||||
},
|
||||
allIn() {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(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) {
|
||||
this.$refs.checkboxes[i].toggle();
|
||||
},
|
||||
async auditDo() {
|
||||
let idList = this.result
|
||||
if (this.type === 'all') {
|
||||
idList = this.userList.map(o => o.id)
|
||||
}
|
||||
const resp = await $.post('/mobile/activity/site/audit/audit', {
|
||||
ids: JSON.stringify(idList),
|
||||
auditOpinion: this.reason,
|
||||
isPass: this.auditType === 'pass'
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
vant.Toast('操作失败')
|
||||
}
|
||||
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/activity/site/audit/getLeaveUser', {
|
||||
siteId: 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/activity/site/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 siteTypeUtil.getAllType()
|
||||
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,377 @@
|
||||
<!--#
|
||||
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: 12px;
|
||||
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;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.pop {
|
||||
max-height: 70%;
|
||||
width: 90%;
|
||||
padding: 0px 10px 10px 10px;
|
||||
}
|
||||
|
||||
.pop h2 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pop h4 {
|
||||
line-height: 26px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
@click-left="pjaxReplace('/mobile/index')"
|
||||
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="typeList" @change="doSearch"
|
||||
v-model="pageForm.typeId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px;margin-bottom: 60px">
|
||||
<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)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.address}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{o.meetingtypename}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey"> 联系人:</span>{{(o.unitname
|
||||
? o.unitname :
|
||||
'') + ' ' + o.contact_person}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">联系方式:</span>{{o.contact_phone}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<!--<van-row>
|
||||
<van-col span="24"><span style="color: grey">已预约人数:</span>{{o.count}}</van-col>
|
||||
</van-row>-->
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">开放时间:</span><span
|
||||
v-if="o.workday === true">工作日</span>
|
||||
{{o.open_time}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
</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="pop" round v-model:show="show">
|
||||
<div style="text-align: center;padding: 10px 0; font-size: 20px">爱心母婴室管理规定</div>
|
||||
<div>一、基本原则</div>
|
||||
<div style="padding-left: 30px;">
|
||||
<p>1.使用对象:有哺乳需求的本校在职女教职工。</p>
|
||||
<p>2.开放时间:工作日8:00--17:30。</p>
|
||||
<p>3.使用制度:实行预约登记制。凡有哺乳需求的女教职工提前向校工会提出使用申请,经审核通过并开通权限后即可使用。</p>
|
||||
<p>4.日常管理:由校工会负责。</p>
|
||||
</div>
|
||||
|
||||
<div>二、管理人员</div>
|
||||
<div style="padding-left: 30px;">
|
||||
<p>1.负责爱心母婴室使用登记管理。</p>
|
||||
<p>2.定期保养设备,确保正常使用。</p>
|
||||
<p>3.保持室内整洁、卫生安全,做好保洁消毒记录。</p>
|
||||
<p>4.定期收集意见和建议,不断改进服务。</p>
|
||||
</div>
|
||||
<div>三、使用人员</div>
|
||||
<div style="padding-left: 30px;">
|
||||
<p>1.遵守学校安全管理制度和爱心母婴室管理规定。</p>
|
||||
<p>2.严禁吸烟,安全使用电器,爱护公物,损坏赔偿。</p>
|
||||
<p>3.保持室内卫生清洁,勿大声喧哗,不影响楼内工作秩序。</p>
|
||||
<p>4.妥善保管自带物品,冰存的母乳须贴上姓名标签并及时取走。</p>
|
||||
<p>5.不得擅自携他人入内,不做和哺乳无关事宜,使用完毕及时离开。</p>
|
||||
<p>6.欢迎在《爱心母婴室使用意见簿》上留下您宝贵的意见和建议。</p>
|
||||
</div>
|
||||
<br/>
|
||||
<p>联系人:曾钰媛梦 84894774、15850692181</p>
|
||||
|
||||
<van-button @click="toReserve" color="#246fb4" style="width: 100%" type="primary">已知晓并遵守
|
||||
</van-button>
|
||||
</van-popup>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/site/info')" icon="home-o"
|
||||
replace>场地预约
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/site/info/my')" icon="manager-o"
|
||||
replace>我的预约
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 0,
|
||||
list: ['a', 'b'],
|
||||
typeList: [],
|
||||
show: false,
|
||||
siteId: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(o) {
|
||||
this.siteId = o.id
|
||||
if (o.sexlimit === 1 || o.sexlimit === 2) {
|
||||
const sex = o.sexlimit === 1 ? '男' : '女'
|
||||
if ("${@shiro.getPrincipalProperty('sex')}" === sex) {
|
||||
location.href = '/mobile/activity/site/info/reserve?id=' + o.id
|
||||
} else {
|
||||
vant.Toast('抱歉,该场地仅限' + sex + '性会员预约')
|
||||
}
|
||||
} else {
|
||||
location.href = '/mobile/activity/site/info/reserve?id=' + o.id
|
||||
}
|
||||
},
|
||||
toReserve() {
|
||||
location.href = '/mobile/activity/site/info/reserve?id=' + this.siteId
|
||||
this.show = false
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/activity/site/info/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 siteTypeUtil.getAllType()
|
||||
this.typeList.unshift({text: '全部场地类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,450 @@
|
||||
<!--#
|
||||
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: 12px;
|
||||
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;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
@click-left="pjaxReplace('/mobile/index')"
|
||||
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 :title="pageForm.time" @open="" ref="item">
|
||||
<van-cell center title="查询全部">
|
||||
<template #right-icon>
|
||||
<van-switch active-color="#246fb4" size="24"
|
||||
v-model="pageForm.timeSwitch"></van-switch>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-datetime-picker :formatter="timeFormatter"
|
||||
cancel-button-text=" " confirm-button-text=" " title="选择年月"
|
||||
type="year-month"
|
||||
v-model="time"
|
||||
v-show="pageForm.timeSwitch === false"
|
||||
></van-datetime-picker>
|
||||
<div style="padding: 5px 16px;margin-top: 6px">
|
||||
<van-button @click="onConfirm" block color="#246fb4" round style="height: 36px"
|
||||
type="danger">
|
||||
确认
|
||||
</van-button>
|
||||
</div>
|
||||
</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;margin-bottom: 60px">
|
||||
<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: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.address}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{o.meetingtypename}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">预约天数:</span>
|
||||
<span>{{o.days}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">预约时间:</span>
|
||||
<span v-for="(item,index) in o.concat_day.split(',')">
|
||||
<div :style="index !== 0 ? 'text-indent: 5em' : ''">{{getTime(o, item)}}</div>
|
||||
</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核状态:</span>
|
||||
<span style="color: #e6a23c"
|
||||
v-if="[0].includes(o.stateaudittype)">{{o.statename}}</span>
|
||||
<span style="color: #67c23a" v-if="o.stateaudittype==3">{{o.statename}}</span>
|
||||
<span style="color: #f56c6c" v-if="o.stateaudittype==1">{{o.statename}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row v-if="o.stateaudittype == '1'">
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核意见:</span>
|
||||
<span>{{JSON.parse(o.auditlist).find(x => x.auditState === false).auditOption}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="rollback(o)" class="cus_button"
|
||||
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
|
||||
type="primary">撤销预约
|
||||
</van-button>
|
||||
<van-button @click.stop="backOption(o)" class="cus_button"
|
||||
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
|
||||
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-dialog @confirm="backDo" show-cancel-button title="反馈意见" v-model="show">
|
||||
<van-field
|
||||
autosize
|
||||
label="反馈意见:"
|
||||
maxlength="50"
|
||||
placeholder="请输入反馈意见"
|
||||
rows="4"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
v-model="option"
|
||||
></van-field>
|
||||
</van-dialog>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/site/info')" icon="home-o"
|
||||
replace>场地预约
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/site/info/my')" icon="manager-o"
|
||||
replace>我的预约
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 1,
|
||||
time: new Date(),
|
||||
option: '',
|
||||
show: false,
|
||||
list: ['a', 'b'],
|
||||
typeList: [],
|
||||
timeList: [],
|
||||
info: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onConfirm() {
|
||||
if (this.pageForm.timeSwitch === true) {
|
||||
this.timeList = [{text: '全部', value: '全部'}]
|
||||
} else {
|
||||
this.timeList = [{
|
||||
text: moment(this.time).format('YYYY-MM'),
|
||||
value: moment(this.time).format('YYYY-MM')
|
||||
}]
|
||||
}
|
||||
this.$set(this.pageForm, "time", this.timeList[0].value)
|
||||
this.$refs.item.toggle()
|
||||
this.doSearch()
|
||||
},
|
||||
timeFormatter(type, val) {
|
||||
if (type === 'year') {
|
||||
return val + `年`;
|
||||
}
|
||||
if (type === 'month') {
|
||||
return val + `月`;
|
||||
}
|
||||
return val;
|
||||
},
|
||||
async rollback(o) {
|
||||
const self = this
|
||||
const res = await $.post("/platform/activity/site/reserve/isCanRollBack", {id: o.id});
|
||||
if (res === true) {
|
||||
vant.Toast('此预约状态下不能进行撤回操作!')
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您是否要撤销此预约?',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/mobile/activity/site/info/rollback', {
|
||||
id: o.id
|
||||
})
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
self.doSearch()
|
||||
}
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
backOption(o) {
|
||||
this.info = o
|
||||
this.option = ''
|
||||
this.show = true
|
||||
},
|
||||
async backDo() {
|
||||
if (this.option === '') {
|
||||
vant.Toast('请填写反馈意见')
|
||||
return
|
||||
}
|
||||
const res = await $.post('/mobile/activity/site/info/backOption', {
|
||||
id: this.info.id,
|
||||
option: this.option
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
vant.Toast(res.msg)
|
||||
} else {
|
||||
vant.Toast('操作失败')
|
||||
}
|
||||
},
|
||||
getTime(o, day) {
|
||||
const week = new Date(day).getDay()
|
||||
const arr = ['日', '一', '二', '三', '四', '五', '六']
|
||||
return moment(day).format('MM月DD日') + ' 周' + arr[week] + ' ' + o.start_time + '-' + o.end_time
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/activity/site/info/myReserve', 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 siteTypeUtil.getAllType()
|
||||
this.typeList.unshift({text: '全部场地类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
//this.timeList.unshift({text: moment().format('YYYY-MM'), value: moment().format('YYYY-MM')})
|
||||
this.timeList = [{text: '全部', value: '全部'}]
|
||||
this.$set(this.pageForm, "time", this.timeList[0].value)
|
||||
this.$set(this.pageForm, "timeSwitch", true)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,454 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.my_calendar {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background-color: #0e78c5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.day {
|
||||
background-color: #14497e;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
padding: 5px 6px;
|
||||
line-height: 22px;
|
||||
border-radius: 4px;
|
||||
margin-right: 6px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.time {
|
||||
width: 45%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.num {
|
||||
width: 30%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.state {
|
||||
width: 80px;
|
||||
height: 36px;
|
||||
text-align: center;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 2px;
|
||||
color: #929292;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 10px 0px;
|
||||
background-color: white;
|
||||
width: 95%;
|
||||
margin: 0 auto;
|
||||
border-radius: 6px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
tr {
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.van-action-sheet__content {
|
||||
padding: 10px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 10px 0px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
|
||||
.top-calendar {
|
||||
height: 70px;
|
||||
max-height: 70px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #0e78c5;
|
||||
}
|
||||
|
||||
.calendar-left {
|
||||
width: calc(100% - 20px);
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
height: 90%;
|
||||
}
|
||||
|
||||
.calendar-left-day {
|
||||
min-width: 65px;
|
||||
height: 100%;
|
||||
margin: 0 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.left-day-active {
|
||||
background-color: #0000cc;
|
||||
}
|
||||
|
||||
.day-info-month {
|
||||
|
||||
}
|
||||
|
||||
.day-info-week {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.reserve_type .van-cell__title, .van-cell__value {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
.reserve_type {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.calendar-right {
|
||||
width: 30px;
|
||||
max-width: 30px;
|
||||
text-align: center;
|
||||
height: 60%;
|
||||
border-left: 1px solid #fff3f3;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.top_pop .van-popup {
|
||||
top: 46px;
|
||||
}
|
||||
|
||||
.van-action-sheet {
|
||||
max-height: 90%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
:title="site.name"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="top-calendar">
|
||||
<div class="calendar-left">
|
||||
<div class="calendar-left-day" :class="moment(item).unix() == selectDate.unix() ? 'left-day-active':''"
|
||||
@click="dayClick(item)"
|
||||
v-for="item in weekList">
|
||||
<div class="day-info-week">
|
||||
{{getWeekTextByDate(item)}}
|
||||
</div>
|
||||
<div class="day-info-month">
|
||||
{{moment(item).format('MM-DD')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="calendar-right">
|
||||
<van-icon size="16" color="white" name="arrow-down" @click="calendarVisible=true"></van-icon>
|
||||
<van-calendar class="top_pop" v-model="calendarVisible" color="#246fb4" position="top" @confirm="onConfirm"
|
||||
:default-date="selectDate.toDate()"
|
||||
:formatter="calendarFormatter"
|
||||
title="选择开始日期"></van-calendar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<table>
|
||||
<tr v-for="item in timeData">
|
||||
<td class="time">{{item.start_time + '-' + item.end_time}}</td>
|
||||
<td class="num">
|
||||
<span v-if="item.code !== -2">
|
||||
{{(item.limitNum - item.reserveNum) + '/' + item.limitNum}}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{0 + '/' + item.limitNum}}
|
||||
</span>
|
||||
</td>
|
||||
<td v-if="item.code !== 1" @click.stop="">
|
||||
<div class="state" :style="'background-color: ' + item.backColor + ';color:' +item.color">
|
||||
{{item.msg}}
|
||||
</div>
|
||||
</td>
|
||||
<td v-else @click.stop="chooseTime(item)">
|
||||
<div class="state"
|
||||
:style="'background-color: ' + item.backColor + ';color:' +item.color">
|
||||
<span v-if="!times.map(o => o.fullDay).includes(selectDate.format('YYYY-MM-DD') + ' ' + item.start_time + '-' + item.end_time)">{{item.msg}}</span>
|
||||
<span v-else>
|
||||
<van-icon name="passed" size="26" style="line-height: 36px;position: unset"></van-icon>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="position: fixed; bottom: 0; width: 100%">
|
||||
<van-button @click="reserve" type="primary" color="#246fb4" style="width: 100%">确定预约</van-button>
|
||||
</div>
|
||||
|
||||
<van-action-sheet v-model="show" title="确认预约信息">
|
||||
|
||||
<van-cell title="预约人">{{person}}</van-cell>
|
||||
<van-cell title="性别">${@shiro.getPrincipalProperty('sex')}</van-cell>
|
||||
<van-cell title="工号">${@shiro.getPrincipalProperty('loginname')}</van-cell>
|
||||
<van-cell title="所属单位">{{unit}}</van-cell>
|
||||
<van-cell title="联系电话">{{phone}}</van-cell>
|
||||
<van-cell title="预约时间">
|
||||
<div v-for="time in times">
|
||||
<van-tag closeable size="medium" type="primary" @close="close(time.fullDay)">
|
||||
{{time.fullDay}}
|
||||
</van-tag>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="预约地点">{{site.name}}</van-cell>
|
||||
<van-cell title="预约类型" class="reserve_type">
|
||||
<van-radio-group v-model="reserve_type" direction="horizontal">
|
||||
<van-radio :name="1">个人预约</van-radio>
|
||||
<van-radio :name="2">单位预约</van-radio>
|
||||
</van-radio-group>
|
||||
</van-cell>
|
||||
|
||||
<!--<van-field
|
||||
v-model="joinUser"
|
||||
rows="2"
|
||||
autosize
|
||||
label="参加人员"
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入参加人员"
|
||||
show-word-limit
|
||||
></van-field>-->
|
||||
<van-field
|
||||
v-model="message"
|
||||
rows="4"
|
||||
autosize
|
||||
label="预约事由"
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入预约事由"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
|
||||
<div style="margin: 20px 0px; display: flex; justify-content: space-between;padding: 0px 22px;">
|
||||
<van-button @click="message = '';show = false" color="#246fb4" style="width: 47%" size="small" plain
|
||||
type="info">关闭
|
||||
</van-button>
|
||||
<van-button @click="reserveDo" color="#246fb4" style="width: 47%" size="small" type="info">确认</van-button>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
moment.locale('zh_cn');
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
reserve_type: 1,
|
||||
person: "${@shiro.getPrincipalProperty('username')}",
|
||||
unit: "${@shiro.getPrincipalProperty('unit').getName()}",
|
||||
phone: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
message: '',
|
||||
show: false,
|
||||
site_id: '',
|
||||
site: {},
|
||||
timeData: [],
|
||||
times: [],
|
||||
weekList: [],
|
||||
joinUser: '',
|
||||
calendarVisible: false,
|
||||
selectDate: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getWeekTextByDate() {
|
||||
return (date) => {
|
||||
const weekNum = moment(date).day()
|
||||
switch (weekNum) {
|
||||
case 0:
|
||||
return '周日'
|
||||
case 1:
|
||||
return '周一'
|
||||
case 2:
|
||||
return '周二'
|
||||
case 3:
|
||||
return '周三'
|
||||
case 4:
|
||||
return '周四'
|
||||
case 5:
|
||||
return '周五'
|
||||
case 6:
|
||||
return '周六'
|
||||
}
|
||||
}
|
||||
},
|
||||
calendarFormatter() {
|
||||
return (day) => {
|
||||
// 休息日不能选择
|
||||
if(this.site.workday === true) {
|
||||
let week = day.date.getDay()
|
||||
if (week === 0 || week === 6) {
|
||||
day.type = 'disabled'
|
||||
}
|
||||
}
|
||||
return day
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close(f) {
|
||||
if (this.times.length === 1) {
|
||||
vant.Toast('必须保留一个时间段')
|
||||
return
|
||||
}
|
||||
const index = this.times.findIndex(v => v.fullDay === f)
|
||||
this.times.splice(index, 1)
|
||||
},
|
||||
onConfirm(date) {
|
||||
this.selectDate = moment(date)
|
||||
this.setWeekList(this.selectDate)
|
||||
this.calendarVisible = false
|
||||
},
|
||||
//这里要排除掉休息日
|
||||
setWeekList(startDate) {
|
||||
const wk = []
|
||||
wk.push(moment(startDate))
|
||||
let count = 1
|
||||
while (wk.length < 7) {
|
||||
const addDate = moment(startDate).add(count, 'd')
|
||||
//这里不是休息日才能加到数组里
|
||||
if (this.site.workday === false || (this.site.workday === true && addDate.day() !== 0 && addDate.day() !== 6)) {
|
||||
wk.push(addDate)
|
||||
}
|
||||
count++
|
||||
}
|
||||
this.weekList = wk
|
||||
},
|
||||
dayClick(date) {
|
||||
this.selectDate = date
|
||||
this.getReserve()
|
||||
},
|
||||
reserve() {
|
||||
if (this.times.length === 0) {
|
||||
vant.Toast('请选择要预约的时段')
|
||||
return
|
||||
}
|
||||
this.show = true
|
||||
},
|
||||
async reserveDo() {
|
||||
const resp = await $.post('/mobile/activity/site/info/reserveDo', {
|
||||
siteId: this.site_id,
|
||||
times: JSON.stringify(this.times),
|
||||
message: this.message,
|
||||
joinUser: this.joinUser,
|
||||
reserve_type: this.reserve_type
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast('预约成功')
|
||||
if (resp.code === 0) {
|
||||
this.show = false
|
||||
this.times = []
|
||||
this.message = null
|
||||
await this.getReserve()
|
||||
await this.onLoad()
|
||||
}
|
||||
} else {
|
||||
vant.Toast(resp.msg)
|
||||
}
|
||||
},
|
||||
chooseTime(item) {
|
||||
const cloneItem = clone(item)
|
||||
const map = this.times.map(o => o.fullDay)
|
||||
const index = map.indexOf(this.selectDate.format('YYYY-MM-DD') + ' ' + cloneItem.start_time + '-' + cloneItem.end_time)
|
||||
if (index > -1) {
|
||||
this.times.splice(index, 1)
|
||||
} else {
|
||||
cloneItem.day = this.selectDate.format('YYYY-MM-DD')
|
||||
cloneItem.fullDay = cloneItem.day + ' ' + cloneItem.start_time + '-' + cloneItem.end_time
|
||||
this.times.push(cloneItem)
|
||||
}
|
||||
},
|
||||
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
const resp = await $.post('/mobile/activity/site/info/getDetail', {id: this.site_id})
|
||||
if (resp.code === 0) {
|
||||
this.site = resp.data
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
async getReserve() {
|
||||
const resp = await $.post('/mobile/activity/site/info/getReserve', {
|
||||
siteId: this.site_id,
|
||||
day: moment(this.selectDate).format('YYYY-MM-DD'),
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.timeData = resp.data
|
||||
}
|
||||
},
|
||||
//获取最新的一个工作日设为当前时间
|
||||
getLatestWorkDay() {
|
||||
//1.首先判断今天是不是工作日
|
||||
const weekNum = moment().day()
|
||||
let selectDate = null
|
||||
if (weekNum === 0) {
|
||||
//周日
|
||||
selectDate = moment().add(1, 'd')
|
||||
} else if (weekNum === 6) {
|
||||
//周六
|
||||
selectDate = moment().add(2, 'd')
|
||||
} else {
|
||||
selectDate = moment()
|
||||
}
|
||||
return selectDate
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.site_id = getQueryString('id')
|
||||
this.selectDate = this.getLatestWorkDay()
|
||||
await this.onLoad()
|
||||
this.setWeekList(this.selectDate)
|
||||
await this.getReserve()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,78 @@
|
||||
<!--活动信息公用页面-->
|
||||
|
||||
<div class="activity_img_back">
|
||||
<van-image :src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover" width="100%"
|
||||
height="200"></van-image>
|
||||
</div>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-cell title="活动名称" :value="o.name"></van-cell>
|
||||
<van-cell title="活动地址" :value="o.address"></van-cell>
|
||||
<!-- <van-cell title="报名时间">
|
||||
<template #label>
|
||||
{{moment(o.applyStartTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="活动时间">
|
||||
<template #label>
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</template>
|
||||
</van-cell>-->
|
||||
<van-cell v-if="o.userNumberLimit!=null">
|
||||
<template #title>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
活动人数
|
||||
</span>
|
||||
<span v-else-if="o.userNumberLimit===2">
|
||||
本工会名额
|
||||
</span>
|
||||
</template>
|
||||
<template>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
<span style="color: orange">{{o.totalUserNumberLimit }}</span>人
|
||||
</span>
|
||||
<span v-else="o.userNumberLimit===2">
|
||||
<span style="color: orange">{{unionLimitNum }}</span>人
|
||||
</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="当前报名" v-if="o.signUpMethod!=null">
|
||||
<template>
|
||||
<span style="color: red">{{hasRegUserNum}}</span>人
|
||||
</template>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="负  责  人">-->
|
||||
<!-- <template>-->
|
||||
<!-- {{o.createUserName}}({{o.createUserMobile}})-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-cell>-->
|
||||
<van-cell title="报名方式" v-if="o.signUpMethod">
|
||||
<template>
|
||||
<span v-if="o.signUpMethod===1">个人报名</span>
|
||||
<span v-if="o.signUpMethod===2">分工会报名</span>
|
||||
<span v-if="o.signUpMethod===3">组队报名</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="组队人数" v-if="o.signUpMethod==3">
|
||||
<span style="color: red"> {{o.teamNum}}</span>人
|
||||
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="活动内容" v-if="o.projectTypeCode!=='50004'">
|
||||
<template #label>
|
||||
<span style="white-space: pre-line">
|
||||
{{o.activityContent}}
|
||||
</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="签到点位" v-if="o.needSign">
|
||||
<template #label>
|
||||
<div id="signMap" style="width: 100%;height: 300px"></div>
|
||||
<div style="margin-top: 10px;color: orange">
|
||||
活动开始后,请前往签到点位半径({{o.rangeMeter}})米内进行签到。
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
@@ -0,0 +1,130 @@
|
||||
const self_mixin = {
|
||||
data() {
|
||||
return {
|
||||
//已报名人数
|
||||
hasRegUserNum: 0,
|
||||
unionId: null,
|
||||
unionLimitNum: 0,
|
||||
isRegisterFull: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getActivityInfo() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/findOne', {id: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
resp.data.location = JSON.parse(resp.data.location)
|
||||
resp.data.unionUserNumberLimit = JSON.parse(resp.data.unionUserNumberLimit)
|
||||
this.o = resp.data
|
||||
this.unionId = "${@shiro.getPrincipalProperty('unit').getUnionid()}"
|
||||
if (!this.unionId) {
|
||||
this.$toast.fail('您的所属工会信息缺失,请联系管理员')
|
||||
return
|
||||
}
|
||||
if (this.o.userNumberLimit === 2) {
|
||||
const unionLimit = resp.data.unionUserNumberLimit.find(v => v.id === this.unionId)
|
||||
this.unionLimitNum = unionLimit.limitNum
|
||||
}
|
||||
await this.getHasRegUserNum()
|
||||
this.$nextTick(() => {
|
||||
// document.getElementsByClassName('activity_img_back')[0].style.backgroundImage = "url(" + FILE_DOMAIN + this.o.cover + ")"
|
||||
if (this.o.needSign) {
|
||||
this.initMap()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async getHasRegUserNum() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/getHasRegUserNum', {activityId: this.activityId})
|
||||
this.hasRegUserNum = resp.data
|
||||
if (this.o.signUpMethod === 1) {
|
||||
if (this.o.userNumberLimit === 1) {
|
||||
if (this.hasRegUserNum === this.o.totalUserNumberLimit) {
|
||||
this.isRegisterFull = true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
initMap() {
|
||||
let marker = null
|
||||
let circle = null
|
||||
this.$nextTick(() => {
|
||||
let map = new AMap.Map("signMap", {
|
||||
zoomEnable: true,
|
||||
dragEnable: false,
|
||||
resizeEnable: true,
|
||||
center: [114.402582, 30.521378],
|
||||
zoom: 16
|
||||
});
|
||||
|
||||
if (this.o.location && Array.isArray(this.o.location)) {
|
||||
const lng = parseFloat(this.o.location[0])
|
||||
const lat = parseFloat(this.o.location[1])
|
||||
marker = new AMap.Marker({
|
||||
position: [lng, lat],
|
||||
offset: new AMap.Pixel(-13, -30)
|
||||
})
|
||||
map.add(marker)
|
||||
// marker.setMap(map);
|
||||
// map.setZoomAndCenter(18, [lng, lat])
|
||||
|
||||
circle = new AMap.Circle({
|
||||
center: new AMap.LngLat(lng, lat), // 圆心位置
|
||||
radius: this.o.rangeMeter, //半径
|
||||
strokeColor: "#F33", //线颜色
|
||||
strokeOpacity: 1, //线透明度
|
||||
strokeWeight: 1, //线粗细度
|
||||
fillColor: "#ee2200", //填充颜色
|
||||
fillOpacity: 0.35 //填充透明度
|
||||
})
|
||||
map.add(circle)
|
||||
map.setFitView()
|
||||
}
|
||||
|
||||
if (window.location.pathname === '/mobile/activity/myActivity/goSign' && !this.isSign) {
|
||||
map.plugin('AMap.Geolocation', function () {
|
||||
geolocation = new AMap.Geolocation({
|
||||
enableHighAccuracy: true,//是否使用高精度定位,默认:true
|
||||
timeout: 10000, //超过10秒后停止定位,默认:无穷大
|
||||
maximumAge: 0, //定位结果缓存0毫秒,默认:0
|
||||
convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true
|
||||
showButton: true, //显示定位按钮,默认:true
|
||||
buttonPosition: 'LB', //定位按钮停靠位置,默认:'LB',左下角
|
||||
buttonOffset: new AMap.Pixel(10, 20),//定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
|
||||
showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true
|
||||
showCircle: false, //定位成功后用圆圈表示定位精度范围,默认:true
|
||||
panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true
|
||||
zoomToAccuracy: true //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
|
||||
});
|
||||
map.addControl(geolocation)
|
||||
|
||||
geolocation.getCurrentPosition()
|
||||
|
||||
AMap.event.addListener(geolocation, 'error', (err) => {
|
||||
alert(JSON.stringify(err))
|
||||
}); //返回定位出错信息
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
getMapDistance(paramObj) {
|
||||
let lng1 = paramObj.lng1
|
||||
let lat1 = paramObj.lat1
|
||||
|
||||
let lng2 = paramObj.lng2
|
||||
let lat2 = paramObj.lat2
|
||||
|
||||
let radLat1 = lat1 * Math.PI / 180.0;
|
||||
let radLat2 = lat2 * Math.PI / 180.0;
|
||||
let a = radLat1 - radLat2;
|
||||
let b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0;
|
||||
let s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
|
||||
Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
|
||||
s = s * 6378.137;// EARTH_RADIUS;
|
||||
s = Math.round(s * 10000) / 10000;
|
||||
s = s * 1000
|
||||
return s.toFixed(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.activity_card {
|
||||
padding: 15px;
|
||||
background: #fff;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .van-image, .activity_card .van-image img {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_name {
|
||||
line-height: 25px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom {
|
||||
line-height: 25px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .left {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: calc(100% - 80px);
|
||||
font-size: 12px;
|
||||
color: #c4bebe;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .right {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: 80px;
|
||||
max-width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder
|
||||
title="活动列表"></van-nav-bar>
|
||||
|
||||
<div style="margin: 10px auto 60px auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData"
|
||||
v-model="loading">
|
||||
<div @click="openReg(o)" class="list-card" v-for="o in tableData">
|
||||
|
||||
<div class="activity_card">
|
||||
<van-image
|
||||
:src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover"
|
||||
fit="cover"
|
||||
height="200"
|
||||
width="100%"
|
||||
></van-image>
|
||||
<div class="activity_content">
|
||||
<div class="activity_name van-ellipsis">
|
||||
<van-icon color="red" name="fire"></van-icon>
|
||||
<span style="margin-left: 10px;">{{o.name}}</span>
|
||||
</div>
|
||||
<div class="activity_bottom">
|
||||
<div class="left">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<span style="color: forestgreen"
|
||||
v-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()">
|
||||
报名中
|
||||
</span>
|
||||
<span style="color: #ee1919"
|
||||
v-else-if="moment(o.applyEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.startTime).valueOf()">
|
||||
报名结束
|
||||
</span>
|
||||
<span style="color: forestgreen"
|
||||
v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()">
|
||||
活动进行中
|
||||
</span>
|
||||
<span style="color: #ee1919"
|
||||
v-else-if="moment().valueOf() > moment(o.endTime).valueOf()">
|
||||
活动结束
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty class="custom-image" description="暂无数据" image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0">
|
||||
</van-empty>
|
||||
|
||||
<div>
|
||||
<van-tabbar :active-color="themeColor" v-model="tabBarIndex">
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/unionActivity')" icon="home-o">
|
||||
全部活动
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/myActivity')" icon="friends-o">
|
||||
我的活动
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: '/mobile/activity/myActivity',
|
||||
pageForm: {
|
||||
year: ''
|
||||
},
|
||||
tabBarIndex: 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/activity/myActivity/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
openReg(o) {
|
||||
// window.location.href = '/mobile/activity/unionActivity/goReg?id=' + o.id + '&signUpMethod=1'
|
||||
if (o.projectTypeCode === '50004') {
|
||||
pjaxReplace('/mobile/activity/myActivity/goMyProject?id=' + o.id)
|
||||
} else {
|
||||
pjaxReplace('/mobile/activity/unionActivity/goReg?id=' + o.id + '&signUpMethod=' + o.signUpMethod)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageForm.year = new Date().getFullYear()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,284 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.activity_card {
|
||||
padding: 15px;
|
||||
background: #fff;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .van-image, .activity_card .van-image img {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_name {
|
||||
line-height: 25px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom {
|
||||
line-height: 25px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .left {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: calc(100% - 80px);
|
||||
font-size: 12px;
|
||||
color: #c4bebe;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .right {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: 80px;
|
||||
max-width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder
|
||||
title="活动列表"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item :options="yearList" @change="formChange"
|
||||
v-model="pageForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="activityStatusList" @change="formChange"
|
||||
v-model="pageForm.activityStatus"></van-dropdown-item>
|
||||
<van-dropdown-item :options="activityLevelList" @change="formChange"
|
||||
v-model="pageForm.activityLevel"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 80px auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData"
|
||||
v-model="loading">
|
||||
<div @click="openReg(o)" class="list-card" v-for="o in tableData">
|
||||
|
||||
<div class="activity_card">
|
||||
<van-image
|
||||
:src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover"
|
||||
fit="cover"
|
||||
height="200"
|
||||
width="100%"
|
||||
></van-image>
|
||||
<div class="activity_content">
|
||||
<div class="activity_name van-ellipsis">
|
||||
<van-icon color="red" name="fire"></van-icon>
|
||||
<div style="margin-left: 10px;width: calc(100% - 26px);text-overflow: ellipsis;overflow: hidden;white-space: nowrap">
|
||||
{{o.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="activity_bottom">
|
||||
<div class="left" style="width: 100%">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
报名时间:{{o.applyStartTime}}至{{o.applyEndTime}}
|
||||
<!-- {{moment(o.activityStartTime).format('YYYY/MM/DD HH:mm')}} 至-->
|
||||
<!-- {{moment(o.activityEndTime).format('YYYY/MM/DD HH:mm')}}-->
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="right">-->
|
||||
<!-- <span v-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()"-->
|
||||
<!-- style="color: forestgreen">-->
|
||||
<!-- 报名中-->
|
||||
<!-- </span>-->
|
||||
<!-- <span v-else-if="moment(o.applyEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.startTime).valueOf()"-->
|
||||
<!-- style="color: #ee1919">-->
|
||||
<!-- 报名结束-->
|
||||
<!-- </span>-->
|
||||
<!-- <span v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()"-->
|
||||
<!-- style="color: forestgreen">-->
|
||||
<!-- 活动进行中-->
|
||||
<!-- </span>-->
|
||||
<!-- <span v-else-if="moment().valueOf() > moment(o.endTime).valueOf()"-->
|
||||
<!-- style="color: #ee1919">-->
|
||||
<!-- 活动结束-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
<div class="activity_bottom">
|
||||
<div class="left">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
活动时间:{{o.startTime}}
|
||||
<!-- {{moment(o.activityStartTime).format('YYYY/MM/DD HH:mm')}} 至-->
|
||||
<!-- {{moment(o.activityEndTime).format('YYYY/MM/DD HH:mm')}}-->
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="right">
|
||||
<span style="color: forestgreen"
|
||||
v-if="moment(o.applyStartTime).valueOf() > moment().valueOf()">
|
||||
未开始报名
|
||||
</span>
|
||||
<span style="color: forestgreen"
|
||||
v-else-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()">
|
||||
报名中
|
||||
</span>
|
||||
<span style="color: #ee1919"
|
||||
v-else-if="moment(o.applyEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.startTime).valueOf()">
|
||||
报名结束
|
||||
</span>
|
||||
<span style="color: forestgreen"
|
||||
v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()">
|
||||
活动进行中
|
||||
</span>
|
||||
<span style="color: #ee1919"
|
||||
v-else-if="moment().valueOf() > moment(o.endTime).valueOf()">
|
||||
活动结束
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="activity_content" style="font-size: 12px; color: #c4bebe;">-->
|
||||
<!-- <div class="left">-->
|
||||
<!-- <van-icon name="clock" size="1em"></van-icon>-->
|
||||
<!-- <span style="margin-left: 5px;">-->
|
||||
<!-- {{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至-->
|
||||
<!-- {{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty class="custom-image" description="暂无数据" image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0">
|
||||
</van-empty>
|
||||
|
||||
<div>
|
||||
<van-tabbar :active-color="themeColor" v-model="tabBarIndex">
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/unionActivity')" icon="home-o">
|
||||
全部活动
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/myActivity')" icon="friends-o">
|
||||
我的活动
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: '/mobile/activity/unionActivity/pageData',
|
||||
pageForm: {
|
||||
year: '',
|
||||
activityStatus: null
|
||||
},
|
||||
tabBarIndex: 0,
|
||||
activityLevelList: [],
|
||||
activityStatusList: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '未开始', value: 5},
|
||||
{text: '报名中', value: 2},
|
||||
{text: '进行中', value: 3},
|
||||
{text: '已结束', value: 4}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/activity/unionActivity/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
/* this.tableData.forEach(v => {
|
||||
if (v.cover) {
|
||||
const cover = JSON.parse(v.cover)
|
||||
v.cover = cover[0].filepath
|
||||
}
|
||||
|
||||
})*/
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
//跳转页面
|
||||
openReg(o) {
|
||||
if (moment(o.applyStartTime).valueOf() > moment().valueOf()) {
|
||||
this.$toast('活动未开始报名')
|
||||
return;
|
||||
}
|
||||
if (o.projectTypeCode === '50004') {
|
||||
pjaxReplace('/mobile/activity/Sports/list/activityEventList?id=' + o.id)
|
||||
} else {
|
||||
pjaxReplace('/mobile/activity/unionActivity/goReg?id=' + o.id + '&signUpMethod=' + o.signUpMethod)
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
this.$set(this.pageForm, "activityStatus", 1)
|
||||
this.$set(this.pageForm, "year", new Date().getFullYear())
|
||||
const {data} = await $.get("/platform/activity/basic/basic/settings/getActivityTwoLevelType", {code: 40000})
|
||||
this.activityLevelList = []
|
||||
this.activityLevelList.push({value: null, text: "全部类别"})
|
||||
data.forEach(v => {
|
||||
this.activityLevelList.push({value: v.code, text: v.name})
|
||||
})
|
||||
|
||||
this.$set(this.pageForm, "activityLevel", this.activityLevelList[0].value)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,110 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="签到" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px" v-if="o.needSign">
|
||||
<van-button
|
||||
:disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf() || isSign"
|
||||
@click="doSign()" style="border-radius: 10px" block type="info"
|
||||
:color="themeColor">
|
||||
{{isSign?'签到成功':'立即签到'}}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/activity/unionActivity/common/initMap.js"){}#-->
|
||||
</script>
|
||||
|
||||
<script>
|
||||
let geolocation = null
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
isSign: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getSignStatus() {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/isSign', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.isSign = resp.data
|
||||
}
|
||||
},
|
||||
async doSign() {
|
||||
geolocation.getCurrentPosition(async (status, result) => {
|
||||
if (status !== 'complete') {
|
||||
this.$toast.fail('定位失败!')
|
||||
return
|
||||
}
|
||||
console.log(status)
|
||||
console.log(result)
|
||||
const lat = result.position.lat
|
||||
const lng = result.position.lng
|
||||
const params = {
|
||||
lat1: lat, lng1: lng, lat2: this.o.location[1], lng2: this.o.location[0]
|
||||
}
|
||||
const distance = this.getMapDistance(params)
|
||||
console.log(distance)
|
||||
console.log(this.o.rangeMeter)
|
||||
if (distance > this.o.rangeMeter) {
|
||||
this.$toast('距离活动打卡点还有' + distance + '米')
|
||||
return
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要签到吗?',
|
||||
})
|
||||
const loading = this.$toast.loading({
|
||||
message: '签到中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/singleSignUp', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
await this.getSignStatus()
|
||||
loading.close()
|
||||
this.$toast.success(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.getSignStatus()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,170 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
/*height: 200px;*/
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/activity/unionActivity')" fixed left-arrow
|
||||
placeholder
|
||||
title="个人报名"></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button :color="themeColor" @click="doSave()"
|
||||
block style="border-radius: 10px"
|
||||
type="info"
|
||||
v-if="!isRegister && !isRegisterFull">
|
||||
立即报名
|
||||
</van-button>
|
||||
<van-button :color="themeColor" @click="doSave()"
|
||||
block disabled
|
||||
style="border-radius: 10px"
|
||||
type="info"
|
||||
v-else-if="!isRegister && isRegisterFull">
|
||||
名额已满
|
||||
</van-button>
|
||||
<van-button @click="doCancel"
|
||||
block
|
||||
color="red" style="border-radius: 10px" type="info"
|
||||
v-else-if="isRegister && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
取消报名
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="isRegister && moment().valueOf() < moment(o.endTime).valueOf() && moment().valueOf() > moment(o.startTime).valueOf()">
|
||||
<van-button
|
||||
:color="themeColor"
|
||||
:disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf() || isSign"
|
||||
@click="doSign()" block style="border-radius: 10px"
|
||||
type="info">
|
||||
{{isSign?'签到成功':'立即签到'}}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
tagCloseable: true,
|
||||
isRegister: false,
|
||||
isSign: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async isRegisterForMe() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/isRegisterForMe', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.isRegister = resp.data
|
||||
}
|
||||
},
|
||||
async doSave() {
|
||||
let message = ''
|
||||
if (this.o.needSign) {
|
||||
message = '报名后若未参加,将有可能影响到其它活动的报名,同时活动开启了现场签到!'
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要报名吗?' + message,
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '报名中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
await this.getHasRegUserNum()
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleRegister', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.$toast.success(resp.msg)
|
||||
loading.close()
|
||||
pjaxReplace('/mobile/activity/unionActivity')
|
||||
}, 500)
|
||||
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async doCancel() {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要取消报名吗?',
|
||||
})
|
||||
const loading = this.$toast.loading({
|
||||
message: '取消中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleCancelRegister', {activityId: this.activityId})
|
||||
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.$toast.success(resp.msg)
|
||||
loading.close()
|
||||
pjaxReplace('/mobile/activity/unionActivity')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async getSignStatus() {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/isSign', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.isSign = resp.data
|
||||
}
|
||||
},
|
||||
async doSign() {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要签到吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/singleSignUp', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
await this.getSignStatus()
|
||||
this.$toast.success(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.isRegisterForMe()
|
||||
this.getSignStatus()
|
||||
if (moment(this.o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() > moment(this.o.applyEndTime).valueOf()) {
|
||||
this.$toast.fail("不在活动范围内")
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,383 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.regCell .van-cell__label .van-tag {
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.userActionPopup {
|
||||
height: 80%;
|
||||
}
|
||||
|
||||
.userActionPopup .van-cell__value {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.userActionPopup .addBtn {
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.userActionPopup .van-action-sheet__item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.userActionPopup .userSelSuccess {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.van-search__action {
|
||||
background-color: #edf0ff
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar :title="title" @click-left="history.back()" fixed left-arrow
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
|
||||
<van-cell-group class="mt5" inset>
|
||||
<van-cell class="regCell" title="报名人员">
|
||||
<template #label>
|
||||
<div>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
本活动限制总报名人数:({{o.totalUserNumberLimit}})人
|
||||
</span>
|
||||
<span v-else-if="o.userNumberLimit===2">
|
||||
当前分工会报名限额 <span style="color: orange">({{o.limitUnion.limitNum}})人</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="mt5" v-loading="tagCloseable">
|
||||
<div v-if="registerList && registerList.length>0">
|
||||
<template v-for="item in registerList">
|
||||
<van-tag :closeable="tagCloseable" :color="themeColor"
|
||||
@close="removeRegUser(item)"
|
||||
size="medium"
|
||||
type="primary">
|
||||
{{item.userName}}
|
||||
</van-tag>
|
||||
</template>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div style="text-align: center;margin-top: 20px;">
|
||||
无报名人员
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt5" style="text-align: right"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button :color="themeColor" @click="openUserActionSheet" size="mini"
|
||||
type="info" v-if="tagCloseable">选择报名人员
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-action-sheet class="userActionPopup" title="选择报名人员" v-model="userActionSheet">
|
||||
<van-search @search="onSearchUser" placeholder="请输入姓名搜索" show-action
|
||||
v-model="searchKey">
|
||||
<template #action>
|
||||
<div @click="onSearchUser(searchKey)">搜索</div>
|
||||
</template>
|
||||
|
||||
</van-search>
|
||||
|
||||
<!-- <div class="van-hairline--bottom">-->
|
||||
<!-- 点击列表中的人员添加到活动人员中-->
|
||||
<!-- </div>-->
|
||||
<template v-if="searchLoading">
|
||||
<van-loading size="24px" vertical>搜索中...</van-loading>
|
||||
</template>
|
||||
|
||||
<div class="van-action-sheet__content mt5"
|
||||
v-else-if="searchUserList && searchUserList.length>0">
|
||||
|
||||
<template>
|
||||
<template v-for="item in searchUserList"
|
||||
v-if="!registerList.map(v=>v.id).includes(item.id)">
|
||||
<button @click="searchUserAdd(item)"
|
||||
class="van-action-sheet__item van-hairline--bottom">
|
||||
<span class="van-action-sheet__name">{{item.userName}}({{item.loginName}})</span>
|
||||
</button>
|
||||
</template>
|
||||
<!--<van-empty description="没有更多了" style="position:absolute;height: 70%"
|
||||
v-else></van-empty>-->
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<van-empty description="暂无数据" style="position:absolute;height: 70%"
|
||||
v-else-if="searchUserList.length===0"></van-empty>
|
||||
</van-action-sheet>
|
||||
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button :color="themeColor" @click="doSave()" block style="border-radius: 10px"
|
||||
type="info"
|
||||
v-if="tagCloseable">
|
||||
提 交
|
||||
</van-button>
|
||||
<template v-else="!tagCloseable">
|
||||
<van-button :color="themeColor" @click="tagCloseable = true"
|
||||
block style="border-radius: 10px"
|
||||
type="info">
|
||||
修 改
|
||||
</van-button>
|
||||
<van-button
|
||||
@click="doCancel"
|
||||
block color="red" style="border-radius: 10px;margin-top: 10px"
|
||||
type="info">
|
||||
取消报名
|
||||
</van-button>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <div style="margin: 20px 20px 10px 20px" v-if="tagCloseable">-->
|
||||
<!-- <van-button-->
|
||||
<!-- :disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf()"-->
|
||||
<!-- @click="doSign()" style="border-radius: 10px" block type="info"-->
|
||||
<!-- :color="themeColor">-->
|
||||
<!-- 立即签到-->
|
||||
<!-- </van-button>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/activity/unionActivity/common/initMap.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
data() {
|
||||
return {
|
||||
title: "",
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
activityId: '',
|
||||
o: {},
|
||||
registerList: [],
|
||||
addRegisterList: [],
|
||||
userActionSheet: false,
|
||||
searchKey: '',
|
||||
searchUserList: [],
|
||||
tagCloseable: true,
|
||||
searchLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doCancel() {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要取消报名吗?',
|
||||
})
|
||||
const loading = this.$toast.loading({
|
||||
message: '取消中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleCancelRegister', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
loading.close()
|
||||
this.$toast.success(resp.msg)
|
||||
setTimeout(() => {
|
||||
window.history.back()
|
||||
}, 400)
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async getRegisterUser() {
|
||||
const resp = await $.get('/mobile/activity/myActivity/selectRegisterList', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
if (this.o.signUpMethod === 3) {
|
||||
this.registerList = resp.data.filter(v => v.applyUserId === this.userId)
|
||||
} else {
|
||||
this.registerList = resp.data
|
||||
}
|
||||
this.addRegisterList = resp.data
|
||||
if (this.registerList.length > 0) {
|
||||
this.tagCloseable = false
|
||||
}
|
||||
}
|
||||
},
|
||||
openUserActionSheet() {
|
||||
this.searchKey = ''
|
||||
this.searchUserList = []
|
||||
this.userActionSheet = true
|
||||
},
|
||||
async onSearchUser(val) {
|
||||
if (!val) {
|
||||
this.$toast.fail("请输入搜索条件")
|
||||
return
|
||||
}
|
||||
this.searchLoading = true
|
||||
const resp = await $.get('/mobile/activity/unionActivity/searchNoRegisterUser', {
|
||||
activityId: this.activityId,
|
||||
searchKey: val
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.searchLoading = false
|
||||
this.searchUserList = resp.data.list
|
||||
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
searchUserAdd(item) {
|
||||
const {id, userName} = item
|
||||
this.registerList.push({id, userName})
|
||||
this.$toast.success("添加成功")
|
||||
},
|
||||
async removeRegUser(item) {
|
||||
if (this.userId === item.id) {
|
||||
this.$toast.fail("自己不能删除")
|
||||
return
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要移除吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const index = this.registerList.findIndex(v => v.id === item.id)
|
||||
this.registerList.splice(index, 1)
|
||||
}
|
||||
},
|
||||
//保存
|
||||
async doSave() {
|
||||
if (this.registerList.length === 0) {
|
||||
this.$toast('请添加报名人员后再提交!')
|
||||
return
|
||||
}
|
||||
if (this.o.signUpMethod === 3) {
|
||||
if (this.registerList.length !== this.o.teamNum) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '此活动是双人报名模式您需要报名' + this.o.teamNum + '人!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
if (!this.registerList.map(v => v.id).includes(this.userId)) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '此活动是组队模式请您找' + this.o.teamNum + '朋友一起报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
// await this.getRegisterUser()
|
||||
const resp = await $.get('/mobile/activity/myActivity/selectRegisterList', {activityId: this.activityId})
|
||||
this.addRegisterList = resp.data
|
||||
let arr = []
|
||||
if (this.addRegisterList && this.addRegisterList.length > 0) {
|
||||
this.addRegisterList.forEach(v => {
|
||||
this.registerList.forEach(r => {
|
||||
if (v.id === r.id && v.applyUserId !== this.userId) {
|
||||
arr.push(r.userName)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
if (arr && arr.length > 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '【' + arr.toString() + '】已成功报名您无需再报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
/* if (this.addRegisterList.map(v => v.id).includes(this.userId)) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '您已报名无需再报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}*/
|
||||
|
||||
}
|
||||
let message = ''
|
||||
if (this.o.needSign) {
|
||||
message = '此活动开启了签到,需要您活动当天前往签到点位核实活动报名人员后进行签到!'
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: message + '您确认要报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '报名中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const params = {
|
||||
activityId: this.activityId,
|
||||
personIds: JSON.stringify(this.registerList.map(v => v.id))
|
||||
}
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSaveUnionRegister', params)
|
||||
|
||||
if (resp.code === 0) {
|
||||
await this.getRegisterUser()
|
||||
await this.getHasRegUserNum()
|
||||
setTimeout(() => {
|
||||
loading.close()
|
||||
this.$toast.success(resp.msg)
|
||||
}, 1000)
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
loading.close()
|
||||
this.$toast.fail(resp.msg)
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
await this.getActivityInfo()
|
||||
await this.getRegisterUser()
|
||||
if (this.o.signUpMethod === 3 && this.registerList.length === 0) {
|
||||
this.registerList.push({id: this.userId, userName: this.userName})
|
||||
}
|
||||
this.title = (this.o.signUpMethod === 2 ? '分工会报名' : '组队报名')
|
||||
if (moment(this.o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() > moment(this.o.applyEndTime).valueOf()) {
|
||||
this.$toast.fail("不在活动范围内")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user