338 lines
11 KiB
HTML
338 lines
11 KiB
HTML
<!--#
|
|
layout("/mobile/platform.html"){
|
|
#-->
|
|
<style>
|
|
|
|
.van-doc-card {
|
|
margin: 10px;
|
|
padding: 12px 12px 12px 12px;
|
|
background-color: #fff;
|
|
border-radius: 6px;
|
|
box-shadow: 0 8px 12px #ebedf0;
|
|
line-height: 20px;
|
|
position: relative;
|
|
}
|
|
|
|
.list-card {
|
|
position: relative;
|
|
margin: 10px;
|
|
background-color: #fff;
|
|
border-radius: 6px;
|
|
box-shadow: 0 8px 12px #ebedf0;
|
|
width: auto;
|
|
}
|
|
|
|
.list-card > .content {
|
|
padding: 16px 10px;
|
|
display: flex;
|
|
max-height: 100px;
|
|
}
|
|
|
|
.content-right {
|
|
width: calc(100% - 150px);
|
|
max-width: calc(100% - 150px);
|
|
padding-left: 15px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.cr-title {
|
|
/*max-height: 40px;*/
|
|
line-height: 20px;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.van-grid-item__content {
|
|
padding: 0;
|
|
}
|
|
|
|
.choose_button .button_text {
|
|
font-size: 14px;
|
|
margin-top: 6px;
|
|
}
|
|
|
|
.concat, .mobile, .union {
|
|
font-size: 13px;
|
|
line-height: 18px;
|
|
width: 100%;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.van-tag {
|
|
padding: 2px 7px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.footer {
|
|
background-color: white;
|
|
position: fixed;
|
|
bottom: 0;
|
|
width: 100%;
|
|
height: 60px;
|
|
display: flex;
|
|
justify-content: space-evenly;
|
|
align-items: center;
|
|
left: 0;
|
|
}
|
|
|
|
.footer .van-button {
|
|
height: 34px;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.active {
|
|
background-color: #1867b0;
|
|
color: white;
|
|
}
|
|
|
|
.no_active {
|
|
background-color: #e7e9f0;
|
|
color: #69707a;
|
|
}
|
|
|
|
.van-list {
|
|
padding-bottom: 10px;
|
|
}
|
|
|
|
.van-row {
|
|
text-align: center;
|
|
color: #1867b0;
|
|
font-weight: bold;
|
|
padding: 0px 0px 10px 0px;
|
|
font-family: cursive;
|
|
}
|
|
|
|
.van-col {
|
|
line-height: 24px;
|
|
}
|
|
|
|
.desc_info div {
|
|
font-size: 12px;
|
|
}
|
|
|
|
</style>
|
|
|
|
<div id="app" v-cloak>
|
|
<van-sticky>
|
|
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="疗休养线路"></van-nav-bar>
|
|
</van-sticky>
|
|
|
|
<!--按钮导航-->
|
|
<div class="choose_button van-doc-card">
|
|
<van-grid :column-num="3" :border="false">
|
|
<van-grid-item @click="pageForm.theRapyRecuperationType = item.value; getData()" v-for="item in chooseButton">
|
|
<van-image width="46" height="46" :src="item.imgUrl"></van-image>
|
|
<div :style="pageForm.theRapyRecuperationType == item.value ? 'color: #1867b0; font-weight: bold' : 'color: black; font-weight: normal'"
|
|
class="button_text">{{item.label}}</div>
|
|
</van-grid-item>
|
|
</van-grid>
|
|
</div>
|
|
|
|
<van-list
|
|
:finished="finished"
|
|
:immediate-check="true"
|
|
@load="onLoad"
|
|
finished-text="没有更多了"
|
|
v-model="loading">
|
|
<div @click="findOne(o)" class="list-card" v-for="o in tableData">
|
|
<div class="content">
|
|
<van-image
|
|
height="100"
|
|
radius="8"
|
|
:src="APP_DOMAIN + '/file_server/fileStreamPreview?id=' + o.fileId"
|
|
width="150">
|
|
</van-image>
|
|
<div v-if="pageForm.theRapyRecuperationType != '2'" class="content-right">
|
|
<div class="cr-title">
|
|
<span>{{o.lineName}}</span>
|
|
<div>
|
|
<van-tag color="#1867b0">{{moment(o.playEndTime).diff(moment(o.playStartTime), 'day')}}日</van-tag>
|
|
<van-tag color="#1867b0">{{o.createMode === 2 && o.signUpMode === 2 ? '校工会' : o.usUnionName}}</van-tag>
|
|
</div>
|
|
</div>
|
|
<div class="desc_info">
|
|
<!--<div class="union">
|
|
<span>组织形式:</span>{{o.createMode === 2 && o.signUpMode === 2 ? '校工会' : o.usUnionName}}
|
|
</div>-->
|
|
<div class="concat">
|
|
<span>已报人数:</span>{{o.signUpUserNum + o.signUpUserFamilyNum + '(家属' + o.signUpUserFamilyNum + '人)'}}
|
|
</div>
|
|
<div class="mobile">
|
|
<span>联系方式:</span>{{o.contactMobileNumber}}
|
|
</div>
|
|
<div class="mobile">
|
|
<span>旅 行 社:</span>{{o.travelAgencyName}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="pageForm.theRapyRecuperationType == '2'" class="content-right">
|
|
<div class="cr-title">
|
|
<span>{{o.travelAgencyName}}</span>
|
|
</div>
|
|
<div>
|
|
|
|
<div class="concat">
|
|
<span>联系人:</span>{{o.contact}}
|
|
</div>
|
|
<div class="mobile">
|
|
<span>联系电话:</span>{{o.contactMobileNumber}}
|
|
</div>
|
|
<!--<div class="mobile">
|
|
<span>邮箱:</span>{{o.email}}
|
|
</div>-->
|
|
<div class="union" style="margin-top: 0">
|
|
<span>官网:</span><span style="color: #0e5996"
|
|
@click.stop="window.open(o.officialWebsite.indexOf('http') !== -1 ? o.officialWebsite : 'https://' + o.officialWebsite)">{{o.officialWebsite}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div v-if="pageForm.theRapyRecuperationType == '2'">
|
|
<van-row gutter="20">
|
|
<van-col @click="" span="12" style="border-right: 1px lightgrey solid"></van-col>
|
|
<van-col span="12">
|
|
<van-button @click="join(o)" plain round size="mini" type="info">我要报名</van-button>
|
|
</van-col>
|
|
</van-row>
|
|
</div>
|
|
</div>
|
|
</van-list>
|
|
|
|
<div v-if="['0', '1', 0 , 1].includes(pageForm.theRapyRecuperationType)" class="footer">
|
|
<van-button @click="pageForm.lineUnionType = 2; unionPop = true" :class="pageForm.lineUnionType == 2 ? 'active' : 'no_active'">其他工会线路</van-button>
|
|
<van-button @click="pageForm.lineUnionType = 1; getData()" :class="pageForm.lineUnionType == 1 ? 'active' : 'no_active'">本工会线路</van-button>
|
|
</div>
|
|
|
|
<van-popup position="bottom" round v-model:show="unionPop">
|
|
<van-picker
|
|
title="选择分工会" show-toolbar
|
|
:columns="unionColumns"
|
|
@confirm="onConfirm"
|
|
@cancel="unionPop = false"
|
|
></van-picker>
|
|
</van-popup>
|
|
</div>
|
|
<script>
|
|
|
|
function getQueryString(name) {
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
|
var r = window.location.search.substr(1).match(reg);
|
|
if (r != null) return decodeURI(r[2]);
|
|
return null;
|
|
}
|
|
|
|
const vue = new Vue({
|
|
el: '#app',
|
|
mixins: [mobileMixins],
|
|
data() {
|
|
return {
|
|
unionColumns: [],
|
|
unionPop: false,
|
|
chooseButton: [],
|
|
pageForm: {
|
|
theRapyRecuperationType: 0,
|
|
lineUnionType: 1,
|
|
unionId: "${@shiro.getPrincipalProperty('union').getId()}",
|
|
},
|
|
loading: false,
|
|
finished: false,
|
|
refreshing: false,
|
|
lineData: {},
|
|
}
|
|
},
|
|
methods: {
|
|
async join(o) {
|
|
const re = await $.post('/platform/theRapyRecuperation/line/enroll/validSignUpInfo', {
|
|
enroll: JSON.stringify({
|
|
takePartInTravelAgencyId: o.id,
|
|
}),
|
|
})
|
|
if(re.code !== 0) {
|
|
vant.Toast(re.msg)
|
|
return
|
|
}
|
|
const toast = vant.Toast.loading({
|
|
duration: 0,
|
|
forbidClick: true,
|
|
overlay: true,
|
|
message: '努力提交中',
|
|
})
|
|
const sendData = {
|
|
takePartInTravelAgencyId: o.id,
|
|
}
|
|
const resp = await $.post('/platform/theRapyRecuperation/line/enroll/doSignUpForTravelAgency', {
|
|
enroll: JSON.stringify(sendData),
|
|
})
|
|
setTimeout(() => {
|
|
if(resp.code === 0) {
|
|
toast.message = '提交成功'
|
|
toast.type = 'success'
|
|
} else {
|
|
toast.message = resp.msg
|
|
toast.type = 'fail'
|
|
}
|
|
setTimeout(() => {
|
|
toast.clear()
|
|
}, 500)
|
|
if(resp.code === 0) {
|
|
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.pageForm.theRapyRecuperationType
|
|
}
|
|
}, 1000)
|
|
},
|
|
onConfirm(value, index) {
|
|
this.pageForm.unionId = value.value
|
|
this.getData()
|
|
this.unionPop = false
|
|
},
|
|
async findOne(o) {
|
|
if(this.pageForm.theRapyRecuperationType != '2') {
|
|
location.href = '/platform/mobile/theRapyRecuperation/lineInfo?id=' + o.id + '&index=' + this.pageForm.theRapyRecuperationType
|
|
+ '&takePartInUnionId=' + o.takePartInUnionId
|
|
}
|
|
},
|
|
getData() {
|
|
this.loading = true
|
|
if(this.pageForm.lineUnionType === 1) {
|
|
this.pageForm.unionId = "${@shiro.getPrincipalProperty('union').getId()}"
|
|
}
|
|
this.pageForm.pageNumber = 1
|
|
this.tableData = []
|
|
this.onLoad()
|
|
},
|
|
async onLoad() {
|
|
const res = await $.post('/platform/theRapyRecuperation/line/enroll/pageData', this.pageForm)
|
|
|
|
if (res.code === 0 && res.data) {
|
|
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.pageForm.theRapyRecuperationType = getQueryString('index')
|
|
this.chooseButton = await getEnumOptions('TheRapyRecuperationType')
|
|
const unions = await getUnions(null)
|
|
unions.forEach(item => {
|
|
this.unionColumns.push({text: item.unionname, value: item.id})
|
|
})
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<!--#
|
|
}
|
|
#--> |