345 lines
9.2 KiB
HTML
345 lines
9.2 KiB
HTML
<!--#
|
|
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: 14px;
|
|
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
|
|
title="场地预约"
|
|
left-arrow
|
|
placeholder
|
|
fixed
|
|
@click-left="history.go(-1)"
|
|
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.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)">
|
|
|
|
<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>
|
|
<div style="color: #1867b0;">
|
|
{{o.meetingtypename}}
|
|
</div>
|
|
</div>
|
|
|
|
<van-divider></van-divider>
|
|
|
|
<div style="margin-top: 10px">
|
|
<div>
|
|
<span>场地地址:</span>
|
|
<span>{{o.address}}</span>
|
|
</div>
|
|
<div>
|
|
<span> 联系人:</span>
|
|
<span>{{o.contact_person}}</span>
|
|
</div>
|
|
<div>
|
|
<span>联系方式:</span>
|
|
<span>{{o.contact_phone}}</span>
|
|
</div>
|
|
<div>
|
|
<span>面向对象:</span>
|
|
<span v-if="o.reservetarget == 1">分工会</span>
|
|
<span v-if="o.reservetarget == 2">个人</span>
|
|
<span v-if="o.reservetarget == 3">集体</span>
|
|
</div>
|
|
<div>
|
|
<span>场地介绍:</span>
|
|
<span @click.stop="viewIntroduce(o)" style="color: #0e5996; text-decoration: underline;">点我查看</span>
|
|
</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 round v-model:show="show" class="pop">
|
|
<div style="text-align: center; margin: 10px; font-size: 18px">场地介绍</div>
|
|
<div v-html="viewData.introduce"></div>
|
|
<van-button color="#246fb4" @click="show = false" type="primary" style="width: 100%">关闭</van-button>
|
|
</van-popup>
|
|
</div>
|
|
|
|
<script>
|
|
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
|
const siteTypeUtil = new typeUtil()
|
|
const vue = new Vue({
|
|
el: '#app',
|
|
mixins: [mobileMixins],
|
|
data() {
|
|
return {
|
|
list: ['a', 'b'],
|
|
typeList: [],
|
|
show: false,
|
|
siteId: '',
|
|
viewData: {},
|
|
}
|
|
},
|
|
methods: {
|
|
viewIntroduce(o) {
|
|
this.viewData = o
|
|
this.show = true
|
|
},
|
|
openView(o) {
|
|
if(o.reservetarget === 1 && "${@shiro.hasAnyRoles('gh01', 'H04')}" === 'false' && "${@shiro.hasRole('sysadmin')}" === 'false') {
|
|
vant.Toast('该场地只能分工会主席预约')
|
|
return
|
|
}
|
|
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
|
|
}
|
|
},
|
|
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>
|
|
|
|
<!--#
|
|
}
|
|
#-->
|