This commit is contained in:
@jyuhsin
2025-05-29 13:46:57 +08:00
parent 554a7b9b67
commit f976085cc0
7 changed files with 192 additions and 165 deletions
@@ -56,18 +56,21 @@ layout("/mobile/platform.html"){
}
.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;
width: 90% !important;
margin: 0 10px;
}
.submitButton .van-button {
@@ -316,10 +319,10 @@ layout("/mobile/platform.html"){
<template v-else>
<van-button v-if="moment().unix() <= moment(baseData.signUpEndTime).unix()" @click="join" class="join">我要报名
</van-button>
<van-button
<!--<van-button
v-if="moment().unix() <= moment(baseData.signUpEndTime).unix() && ${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
@click="helpJoin" class="join">替他人报名
</van-button>
</van-button>-->
<van-button v-if="moment().unix() > moment(baseData.signUpEndTime).unix()" class="join">报名结束</van-button>
</template>
</div>
@@ -359,7 +362,7 @@ layout("/mobile/platform.html"){
</div>
<!--床位信息-->
<div class="van-doc-card" style="margin-bottom: 16px">
<!--<div class="van-doc-card" style="margin-bottom: 16px">
<div></div>
<div class="van-card-header">
床位信息(一位教职工一间)
@@ -369,7 +372,7 @@ layout("/mobile/platform.html"){
label="房间" name="bedType"
placeholder="请选择房间" v-model="formData.bedInfo.bedType"
:rules="[{ required: true }]"></van-field>
<!--<van-field v-if="formData.bedInfo.bedType == '标准间'" @click="self = true; bedVisible = true"
&lt;!&ndash;<van-field v-if="formData.bedInfo.bedType == '标准间'" @click="self = true; bedVisible = true"
readonly is-link label="床位"
name="bedNum" placeholder="请选择床位" v-model="formData.bedInfo.bedNum"
:rules="[{ required: true }]"></van-field>
@@ -381,16 +384,16 @@ layout("/mobile/platform.html"){
<van-radio :name="false" shape="square">否</van-radio>
</van-radio-group>
</template>
</van-field>-->
<!--<van-field v-if="formData.bedInfo.bedType == '标准间' && formData.bedInfo.isSleepTogether == true"
</van-field>&ndash;&gt;
&lt;!&ndash;<van-field v-if="formData.bedInfo.bedType == '标准间' && formData.bedInfo.isSleepTogether == true"
label="意向拼房人" name="otherSleepUser" placeholder="若无拼房人,填写“无”即可"
v-model="formData.bedInfo.otherSleepUser"
:rules="[{ required: true }]"></van-field>-->
:rules="[{ required: true }]"></van-field>&ndash;&gt;
</div>
</div>
</div>-->
<!--随行人信息-->
<div class="van-doc-card" style="margin-bottom: 16px">
<!--<div class="van-doc-card" style="margin-bottom: 16px">
<div></div>
<div class="van-card-header"
style="display: flex; justify-content: space-between; align-items: center">
@@ -405,7 +408,7 @@ layout("/mobile/platform.html"){
<van-tab v-for="item, index in formData.companionList" :title="'随行人' + (index + 1)">
<van-field label="姓名" name="userName" placeholder="请填写姓名" v-model="item.userName"
:rules="[{ required: true }]"></van-field>
<!--<van-field label="工号" name="loginName" placeholder="若没有工号,请忽略此项" v-model="item.loginName"></van-field>-->
&lt;!&ndash;<van-field label="工号" name="loginName" placeholder="若没有工号,请忽略此项" v-model="item.loginName"></van-field>&ndash;&gt;
<van-field label="年龄" name="age" placeholder="请填写年龄" v-model="item.age" type="digit"
:rules="[{ required: true }]"></van-field>
<van-field :rules="[{ required: true, message: '请选择性别' }]" label="性别" name="validator">
@@ -459,7 +462,7 @@ layout("/mobile/platform.html"){
如有随行人出行,请添加随行人
</span>
</div>
</div>
</div>-->
<div v-if="fromUrlByMy != 'find'" class="submitButton">
<van-button class="join join_submit">提交报名</van-button>
</div>
@@ -533,15 +536,6 @@ layout("/mobile/platform.html"){
</van-cell-group>
</van-popup>
<div>
<van-tabbar v-model="tarBarActive">
<van-tabbar-item icon="home-o" replace url="/platform/mobile/theRapyRecuperation/index">疗休养报名
</van-tabbar-item>
<van-tabbar-item icon="manager-o" replace url="/platform/mobile/theRapyRecuperation/myRecuperation">我的疗休养
</van-tabbar-item>
</van-tabbar>
</div>
</div>
<script>
function getQueryString(name) {
@@ -97,7 +97,7 @@ layout("/mobile/platform.html"){
},
async created() {
this.chooseButton = await getEnumOptions('TheRapyRecuperationType')
this.chooseButton = this.chooseButton.filter(o => o.value !== 2 && o.value !== 3)
this.chooseButton = this.chooseButton.filter(o => o.value !== 2)
await this.getConfigData()
}
})
@@ -233,7 +233,7 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar @click-left="history.go(-1)" fixed left-arrow placeholder
<van-nav-bar @click-left="pageBack" fixed left-arrow placeholder
title="职工疗休养-线路介绍"></van-nav-bar>
</van-sticky>
@@ -321,9 +321,7 @@ layout("/mobile/platform.html"){
<!--底部报名按钮-->
<div class="footer" v-if="fromUrlByMy != 'edit'">
<template v-if="lineData.isNormal==0&&lineData.isNormalFalse>0">
<van-button @click="join"
class="join">我要报名
</van-button>
<van-button @click="join" class="join">我要报名</van-button>
</template>
<template v-else>
<van-button v-if="moment().unix() <= moment(lineData.changeEndTime).unix()" @click="join"
@@ -592,6 +590,10 @@ layout("/mobile/platform.html"){
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue?v=' + new Date().getTime()),
},
methods: {
pageBack(){
pjaxReplace('/platform/mobile/theRapyRecuperation/mobileLineListPage')
},
openRead() {
this.readVisible = true
this.$nextTick(() => {
@@ -788,6 +790,18 @@ layout("/mobile/platform.html"){
const resp = await $.get('/platform/theRapyRecuperation/TheRapyConfig/findOne')
this.configData = resp.data
},
handleClick(event, classArray = []) {
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
const index = classArray.indexOf(event.target.className)
if(index !== -1) {
vant.ImagePreview({
images: array,
startPosition: index,
closeable: true,
})
}
}
},
readPDFPicture(pdf) {
if(pdf != null) {
pdf.on("complete", function () {
@@ -800,19 +814,7 @@ layout("/mobile/platform.html"){
array.push(o.getAttribute('src'))
}
})
document.addEventListener('click', function (event) {
// 打印被点击的元素标签名和 class
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
const index = classArray.indexOf(event.target.className)
if(index !== -1) {
vant.ImagePreview({
images: array,
startPosition: index,
closeable: true,
})
}
}
})
document.addEventListener('click', (event) => this.handleClick(event, classArray))
})
}
},
@@ -839,19 +841,11 @@ layout("/mobile/platform.html"){
this.$nextTick(() => {
pdfh5 = new Pdfh5('#demo', {
pdfurl: href,
});
})
})
}catch (e) {
this.isPdf = true
document.addEventListener('click', function (event) {
// 打印被点击的元素标签名和 class
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
vant.ImagePreview({
images: [event.target.src],
closeable: true,
})
}
})
document.addEventListener('click', (event) => this.handleClick(event))
}
this.$nextTick(() => {
this.readPDFPicture(pdfh5)
@@ -862,6 +856,7 @@ layout("/mobile/platform.html"){
},
destroyed() {
window.removeEventListener('scroll', this.scrollToTop)
document.removeEventListener('click', (event) => this.handleClick(event))
},
})
</script>
@@ -128,12 +128,12 @@ layout("/mobile/platform.html"){
}
.sign_button .van-button {
width: 74px;
height: 28px;
width: 72px;
height: 26px;
color: white;
background: rgb(24, 103, 176);
border-color: rgb(24, 103, 176);
font-size: 12px;
font-size: 11px;
border-radius: 6px;
}
@@ -145,7 +145,7 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder title="疗休养线路"></van-nav-bar>
<van-nav-bar @click-left="pjaxReplace('/platform/mobile/theRapyRecuperation/index')" fixed left-arrow placeholder title="疗休养线路"></van-nav-bar>
</van-sticky>
<!--<van-dropdown-menu>
@@ -197,10 +197,10 @@ layout("/mobile/platform.html"){
<div @click.stop="clickLineRow(o)" class="list-card" v-for="o in tableData">
<div class="content">
<van-image
height="100"
height="92"
radius="8"
:src="CREATE_PREVIEW_URL(o.fileId)"
width="150">
width="130">
</van-image>
<div v-if="pageForm.theRapyRecuperationType != '2' && pageForm.theRapyRecuperationType != '3'"
class="content-right">
@@ -282,6 +282,12 @@ layout("/mobile/platform.html"){
</div>
</div>
<div v-if="pageForm.theRapyRecuperationType == '3'" style="text-align: right; padding-right: 10px; padding-bottom: 10px" class="sign_button">
<van-button @click.stop="openSignUser(o, 'baseManage')" size="mini"
type="info" color="#1867B0">查看人员</van-button>
</div>
<div v-if="pageForm.theRapyRecuperationType == '2'">
<van-row gutter="20">
<van-col @click="" span="12" style="border-right: 1px lightgrey solid"></van-col>
@@ -316,16 +322,18 @@ layout("/mobile/platform.html"){
<div class="van-action-sheet__subname">{{item.subname}}</div>
</div>
<div class="sign_button">
<van-button @click.stop="onSelect(item)" size="mini" type="info"
style="margin-right: 8px">
点击报名
</van-button>
</div>
<div style="margin-top: 4px">
<van-button @click.stop="openSignUser(item, 'line')" size="mini" type="info"
style="margin-right: 8px">
查看人员
</van-button>
<div>
<van-button @click.stop="onSelect(item)" size="mini" type="info"
style="margin-right: 8px">
点击报名
</van-button>
</div>
<div style="margin-top: 4px">
<van-button @click.stop="openSignUser(item, 'line')" size="mini" type="info"
style="margin-right: 8px">
查看人员
</van-button>
</div>
</div>
</div>
</button>
@@ -374,6 +382,10 @@ layout("/mobile/platform.html"){
},
async clickLineRow(o) {
this.clickRow = o
if(Number(this.pageForm.theRapyRecuperationType) === 3) {
await this.findOne(o)
return
}
const resp = await $.post('/platform/theRapyRecuperation/line/enroll/getSelectLineById',
{
lineId: o.lineId,
@@ -463,7 +475,7 @@ layout("/mobile/platform.html"){
pjaxReplace('/platform/mobile/theRapyRecuperation/lineInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType
+ '&takePartInUnionId=' + o.takePartInUnionId)
} else if (type === 3) {
pjaxReplace('/platform/mobile/theRapyRecuperation/baseInfo?id=' + o.usId + '&index=' + this.pageForm.theRapyRecuperationType)
pjaxReplace('/platform/mobile/theRapyRecuperation/baseInfo?id=' + o.id + '&index=' + this.pageForm.theRapyRecuperationType)
}
},
async getData() {