commit
This commit is contained in:
@@ -3,6 +3,10 @@ layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
#app {
|
||||
font-family: 微软雅黑,serif;
|
||||
}
|
||||
|
||||
.container img {
|
||||
background-size: contain;
|
||||
width: 100%;
|
||||
@@ -11,13 +15,22 @@ layout("/mobile/platform.html"){
|
||||
display: block;
|
||||
}
|
||||
|
||||
.backTop {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.content {
|
||||
line-height: 26px;
|
||||
padding: 0px 20px 56px 20px;
|
||||
padding: 0px 10px 56px 10px;
|
||||
}
|
||||
|
||||
.pdf_div {
|
||||
padding-bottom: 70px;
|
||||
height: 800px;
|
||||
}
|
||||
|
||||
.title {
|
||||
@@ -179,10 +192,11 @@ layout("/mobile/platform.html"){
|
||||
.submitButton {
|
||||
background-color: white !important;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
/*height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
align-items: center;*/
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.submitButton .van-button {
|
||||
@@ -195,84 +209,133 @@ layout("/mobile/platform.html"){
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.van-tag {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.viewerContainer {
|
||||
overflow: unset !important;
|
||||
}
|
||||
|
||||
.sign_div {
|
||||
background-color: white;
|
||||
margin-bottom: 16px;
|
||||
padding: 18px;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
}
|
||||
.van-action-sheet {
|
||||
max-height: 90%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.go(-1)" fixed left-arrow placeholder title="职工疗休养-线路介绍"></van-nav-bar>
|
||||
<van-nav-bar @click-left="history.go(-1)" fixed left-arrow placeholder
|
||||
title="职工疗休养-线路介绍"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!--线路详情-->
|
||||
<van-skeleton title :loading="skeLoading" :row="12">
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<div class="title">
|
||||
<van-tag size="large" color="#1867b0" style="color: white;position: relative; top: -2px">
|
||||
{{lineData.lotName}}
|
||||
</van-tag>
|
||||
{{lineData.lineName}}
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<div>
|
||||
<span class="line_label">成团人数:</span>
|
||||
{{lineData.minimumGroupSize ? lineData.minimumGroupSize : 0}}人(最少)
|
||||
<template v-if="isLoad">
|
||||
<!--线路详情-->
|
||||
<van-skeleton title :loading="skeLoading" :row="12">
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<div class="title">
|
||||
<van-tag size="large" color="#1867b0" style="position: relative; top: -2px">
|
||||
{{lineData.lotName}}
|
||||
</van-tag>
|
||||
{{lineData.lineName}}
|
||||
</div>
|
||||
<div>
|
||||
<span>当前报名:</span>
|
||||
{{lineData.signUpUserNum + lineData.signUpUserFamilyNum + '(家属' + lineData.signUpUserFamilyNum +
|
||||
'人)'}}
|
||||
</div>
|
||||
<div>
|
||||
<span>报名时间:</span>
|
||||
{{moment(lineData.signUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(lineData.signUpEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<div>
|
||||
<span>出行时间:</span>
|
||||
{{moment(lineData.playStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(lineData.playEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<div>
|
||||
<span>旅 行 社:</span>
|
||||
{{lineData.travelAgencyName}}
|
||||
</div>
|
||||
<div>
|
||||
<span>联系方式:</span>
|
||||
{{lineData.contactMobileNumber}}
|
||||
<div style="margin-top: 10px">
|
||||
<div v-if="lineData.regionalNature == '省内'">
|
||||
<div>
|
||||
<span class="line_label">成团人数包括家属:</span>
|
||||
<label v-if="lineData.estimatedFamilyNumbers">{{lineData.estimatedFamilyNumbers}}人</label>
|
||||
<label v-else>不限制</label>
|
||||
</div>
|
||||
<div v-if="configData.familyInfo == 2">
|
||||
<span>当前报名:</span>
|
||||
{{lineData.signUpUserNum + lineData.signUpUserFamilyNum + '(家属' + lineData.signUpUserFamilyNum + '人)'}}
|
||||
</div>
|
||||
<div v-else>
|
||||
<span>当前报名:</span>
|
||||
{{lineData.signUpUserNum + lineData.familyNumber + '(家属' + lineData.familyNumber + '人)'}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<div>
|
||||
<span class="line_label">最多成团人数:</span>
|
||||
<label>{{configData.outsideQuota}}人</label>
|
||||
</div>
|
||||
<div v-if="configData.familyInfo == 2">
|
||||
<span>当前报名:</span>
|
||||
{{lineData.signUpUserNum + '(家属' + lineData.signUpUserFamilyNum + '人)'}}
|
||||
</div>
|
||||
<div v-else>
|
||||
<span>当前报名:</span>
|
||||
{{lineData.signUpUserNum + '(家属' + lineData.familyNumber + '人)'}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span>报名时间:</span>
|
||||
{{moment(lineData.signUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(lineData.signUpEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<div>
|
||||
<span>出行时间:</span>
|
||||
{{moment(lineData.playStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(lineData.playEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<div>
|
||||
<span>旅 行 社:</span>
|
||||
{{lineData.travelAgencyName}}
|
||||
</div>
|
||||
<div>
|
||||
<span>联系方式:</span>
|
||||
{{lineData.contactMobileNumber}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider :style="{ color: 'orange', fontSize: '12px' }">上下滑动翻页,单击查看,再单击返回</van-divider>
|
||||
<!--<div v-if="lineData.content" v-html="lineData.content" class="content"></div>
|
||||
<div v-else v-html="configData.notice" class="content"></div>-->
|
||||
<div v-if="isPdf" v-html="lineData.content" class="content"></div>
|
||||
<div v-else id="demo" class="pdf_div"></div>
|
||||
|
||||
<!--<van-empty
|
||||
v-else class="custom-image"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
description="暂无详细信息"
|
||||
></van-empty>-->
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<div v-if="lineData.content" v-html="lineData.content" class="content"></div>
|
||||
<div v-else v-html="configData.notice" class="content"></div>
|
||||
<!--<van-empty
|
||||
v-else class="custom-image"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
description="暂无详细信息"
|
||||
></van-empty>-->
|
||||
</van-skeleton>
|
||||
|
||||
<!--置顶图标-->
|
||||
<image v-if="btnFlag" @click="backTop" src="/assets/mobile/svg/therapyRecuperation/top.svg"
|
||||
class="top_icon"></image>
|
||||
|
||||
<!--底部报名按钮-->
|
||||
<div class="footer" v-if="fromUrlByMy != 'edit'">
|
||||
<template v-if="lineData.isNormal==0&&lineData.isNormalFalse>0">
|
||||
<van-button @click="join"
|
||||
class="join">我要报名
|
||||
</van-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-button v-if="moment().unix() <= moment(lineData.changeEndTime).unix()" @click="join"
|
||||
class="join">我要报名
|
||||
</van-button>
|
||||
<van-button v-if="moment().unix() > moment(lineData.changeEndTime).unix()" class="join">报名结束
|
||||
</van-button>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</van-skeleton>
|
||||
</template>
|
||||
|
||||
<!--置顶图标-->
|
||||
<image v-if="btnFlag" @click="backTop" src="/assets/mobile/svg/therapyRecuperation/top.svg"
|
||||
class="top_icon"></image>
|
||||
|
||||
<!--底部报名按钮-->
|
||||
<div class="footer" v-if="fromUrlByMy != 'edit'">
|
||||
<template v-if="lineData.isNormal==0&&lineData.isNormalFalse>0">
|
||||
<van-button @click="join"
|
||||
class="join">我要报名
|
||||
</van-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-button v-if="moment().unix() <= moment(lineData.signUpEndTime).unix()" @click="join"
|
||||
class="join">我要报名
|
||||
</van-button>
|
||||
<van-button v-if="moment().unix() > moment(lineData.signUpEndTime).unix()" class="join">报名结束</van-button>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<!--报名弹出框-->
|
||||
<van-popup v-model:show="joinPopup" position="right" class="joinPopup">
|
||||
<van-nav-bar @click-left="joinPopup = false" fixed left-arrow placeholder title="疗休养报名"></van-nav-bar>
|
||||
@@ -288,9 +351,9 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field label="姓名" readonly v-model="formData.userName"></van-field>
|
||||
<van-field label="工号" readonly v-model="formData.loginName"></van-field>
|
||||
<van-field label="身份证号" name="idCard" :rules="[{ required: true }]"
|
||||
placeholder="请填写身份证号" v-model="formData.idCard"></van-field>
|
||||
<van-field label="一卡通号" readonly v-model="formData.loginName"></van-field>
|
||||
<van-field label="身份证件" name="idCard" :rules="[{ required: true }]"
|
||||
placeholder="请填写身份证号、护照、台胞证等" v-model="formData.idCard"></van-field>
|
||||
<van-field label="手机号" name="mobile" :rules="[{ required: true }]"
|
||||
placeholder="请填写手机号" v-model="formData.mobile"></van-field>
|
||||
<van-field label="所属工会" readonly v-model="formData.unionName"></van-field>
|
||||
@@ -299,7 +362,7 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
|
||||
<!--床位信息-->
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div v-if="configData.bedInfo === true" class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
床位信息
|
||||
@@ -312,7 +375,8 @@ layout("/mobile/platform.html"){
|
||||
readonly is-link label="床位"
|
||||
name="bedNum" placeholder="请选择床位" v-model="formData.bedInfo.bedNum"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
<van-field v-if="formData.bedInfo.bedType == '标准间'" :rules="[{ validator, message: '请选择是否拼房' }]"
|
||||
<van-field v-if="formData.bedInfo.bedType == '标准间'"
|
||||
:rules="[{ validator, message: '请选择是否拼房' }]"
|
||||
label="是否拼房" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="formData.bedInfo.isSleepTogether">
|
||||
@@ -321,10 +385,11 @@ layout("/mobile/platform.html"){
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -334,71 +399,97 @@ layout("/mobile/platform.html"){
|
||||
<div class="van-card-header"
|
||||
style="display: flex; justify-content: space-between; align-items: center">
|
||||
<span style="float:left;">随行人信息</span>
|
||||
<div>
|
||||
<van-tag @click="delCompanion" size="large" type="primary" color="lightgrey">删除随行人</van-tag>
|
||||
<van-tag @click="addCompanion" size="large" type="primary" color="#1867b0">添加随行人</van-tag>
|
||||
<div v-if="configData.familyInfo === 2">
|
||||
<van-tag @click="delCompanion" size="large" type="primary" color="lightgrey">删除随行人
|
||||
</van-tag>
|
||||
<van-tag @click="addCompanion" size="large" type="primary" color="#1867b0">添加随行人
|
||||
</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length > 0" class="van-card-body">
|
||||
<van-tabs v-model="active" type="card" color="#0e78c5" animated>
|
||||
<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>-->
|
||||
<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">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.sex">
|
||||
<van-radio name="男" shape="square">男</van-radio>
|
||||
<van-radio name="女" shape="square">女</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="身份证号" name="idCard" placeholder="请填写身份证号"
|
||||
:rules="[{ required: true }]" type="digit"
|
||||
v-model="item.idCard"></van-field>
|
||||
<van-field label="手机号" name="mobile" placeholder="请填写手机号"
|
||||
:rules="[{ required: true }]" type="digit"
|
||||
v-model="item.mobile"></van-field>
|
||||
<van-field @click="companionVisible = true" readonly is-link label="与本人关系"
|
||||
name="relation"
|
||||
placeholder="随行人与本人关系" v-model="item.relation"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
<template v-if="configData.familyInfo === 2">
|
||||
<div v-if="formData.companionList.length > 0" class="van-card-body">
|
||||
<van-tabs v-model="active" type="card" color="#0e78c5" animated>
|
||||
<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>-->
|
||||
<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">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.sex">
|
||||
<van-radio name="男" shape="square">男</van-radio>
|
||||
<van-radio name="女" shape="square">女</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="身份证件" name="idCard" placeholder="请填写身份证号、护照、台胞证等"
|
||||
:rules="[{ required: true }]"
|
||||
v-model="item.idCard"></van-field>
|
||||
<van-field label="手机号" name="mobile" placeholder="请填写手机号"
|
||||
:rules="[{ required: true }]" type="digit"
|
||||
v-model="item.mobile"></van-field>
|
||||
<van-field @click="companionVisible = true" readonly is-link label="与本人关系"
|
||||
name="relation"
|
||||
placeholder="随行人与本人关系" v-model="item.relation"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
|
||||
<van-field @click="self = false; roomVisible = true" readonly is-link label="房间"
|
||||
name="bedType" placeholder="请选择房间"
|
||||
v-model="item.bedInfo.bedType"></van-field>
|
||||
<div style="font-size: 12px; color:orangered; padding-left: 16px; padding-bottom: 4px">
|
||||
提醒:如果跟报名人员同一房间,无须选择!
|
||||
</div>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间'" @click="self = false; bedVisible = true"
|
||||
readonly is-link label="床位"
|
||||
name="bedNum" placeholder="请选择床位" v-model="item.bedInfo.bedNum"></van-field>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间'"
|
||||
:rules="[{ validator, message: '请选择是否拼房' }]" label="是否拼房">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.bedInfo.isSleepTogether">
|
||||
<van-radio :name="true" shape="square">是</van-radio>
|
||||
<van-radio :name="false" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间' && item.bedInfo.isSleepTogether == true"
|
||||
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开"
|
||||
v-model="item.bedInfo.otherSleepUser"></van-field>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length == 0" class="companionList_empty_text">
|
||||
<span>
|
||||
如有随行人出行,请添加随行人
|
||||
<van-field @click="self = false; roomVisible = true" readonly is-link label="房间"
|
||||
name="bedType" placeholder="请选择房间"
|
||||
v-model="item.bedInfo.bedType"></van-field>
|
||||
<div style="font-size: 12px; color:orangered; padding-left: 16px; padding-bottom: 4px">
|
||||
提醒:如果跟报名人员同一房间,无须选择!
|
||||
</div>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间'"
|
||||
@click="self = false; bedVisible = true"
|
||||
readonly is-link label="床位"
|
||||
name="bedNum" placeholder="请选择床位"
|
||||
v-model="item.bedInfo.bedNum"></van-field>
|
||||
<van-field v-if="item.bedInfo.bedType == '标准间'"
|
||||
:rules="[{ validator, message: '请选择是否拼房' }]" label="是否拼房">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal"
|
||||
v-model="item.bedInfo.isSleepTogether">
|
||||
<van-radio :name="true" shape="square">是</van-radio>
|
||||
<van-radio :name="false" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field
|
||||
v-if="item.bedInfo.bedType == '标准间' && item.bedInfo.isSleepTogether == true"
|
||||
label="意向拼房人" name="otherSleepUser" placeholder="多个拼房人请用,隔开"
|
||||
v-model="item.bedInfo.otherSleepUser"></van-field>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length == 0" class="companionList_empty_text">
|
||||
<span>
|
||||
如有随行人出行,请添加随行人
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-field label="家属数量" name="familyNumber" placeholder="请填写家属数量" v-model="formData.familyNumber"
|
||||
type="digit" :rules="[{ required: true }]"></van-field>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="sign_div" v-if="formData.companionList.length > 0">
|
||||
<div style="display: flex">
|
||||
<van-checkbox v-model="hasRead" shape="square" @change="readChange" class="mr10"></van-checkbox>
|
||||
我已查看
|
||||
<span @click="openRead" style="color: #0e5996; text-decoration: underline">
|
||||
《{{configData.files[0].filename.replace(/\.[^/.]+$/, '')}}》
|
||||
</span>
|
||||
<van-tag @click="openRead" size="large" type="primary" color="#1867b0">查看</van-tag>
|
||||
</div>
|
||||
<mobile-sign v-if="hasRead" class="mt10" ref="signature" v-model="formData.sign" :is_value_base64="false"></mobile-sign>
|
||||
</div>
|
||||
|
||||
<div class="submitButton">
|
||||
<van-button class="join join_submit">提交报名</van-button>
|
||||
<van-button class="join join_submit" style="margin: 10px 0">提交报名</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
@@ -437,6 +528,14 @@ layout("/mobile/platform.html"){
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-action-sheet v-model="readVisible" title="请仔细阅读确认后签字">
|
||||
<van-divider :style="{ color: 'orange', fontSize: '12px' }">上下滑动翻页,单击查看,再单击返回</van-divider>
|
||||
<div id="readFile" style="height: 530px; overflow-y: auto"></div>
|
||||
<div class="submitButton">
|
||||
<van-button @click="onRead" class="join join_submit" style="margin: 10px 0">我已阅读确认</van-button>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
function getQueryString(name) {
|
||||
@@ -446,15 +545,21 @@ layout("/mobile/platform.html"){
|
||||
return null;
|
||||
}
|
||||
|
||||
let pdfh5 = null
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
readVisible: false,
|
||||
hasRead: false,
|
||||
clickRead: false,
|
||||
isPdf: false,
|
||||
isLoad: false,
|
||||
active: 0,
|
||||
roomColumns: ['大床房', '标准间'],
|
||||
bedColumns: ['1', '2'],
|
||||
companionColumns: ['亲属', '朋友'],
|
||||
companionColumns: ['配偶', '子女'],
|
||||
bedVisible: false,
|
||||
roomVisible: false,
|
||||
companionVisible: false,
|
||||
@@ -483,7 +588,32 @@ layout("/mobile/platform.html"){
|
||||
configData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
openRead() {
|
||||
this.readVisible = true
|
||||
this.$nextTick(() => {
|
||||
if(this.configData.files && this.configData.files.length > 0) {
|
||||
const pdf = new Pdfh5('#readFile', {
|
||||
pdfurl: CREATE_PREVIEW_URL(this.configData.files[0].id),
|
||||
})
|
||||
this.readPDFPicture(pdf)
|
||||
}
|
||||
})
|
||||
},
|
||||
onRead() {
|
||||
this.clickRead = true
|
||||
this.hasRead = true
|
||||
this.readVisible = false
|
||||
},
|
||||
readChange() {
|
||||
if(this.clickRead === false) {
|
||||
this.$toast('请先阅读携带家属须知')
|
||||
this.hasRead = false
|
||||
}
|
||||
},
|
||||
roomCancel() {
|
||||
if (!this.self) {
|
||||
this.formData.companionList[this.active].bedInfo.bedType = ''
|
||||
@@ -510,36 +640,51 @@ layout("/mobile/platform.html"){
|
||||
return value != null
|
||||
},
|
||||
async joinSubmit() {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const cloneData = clone(this.formData)
|
||||
cloneData.companionList.forEach((item, index) => {
|
||||
if (item.userName === '') {
|
||||
cloneData.companionList.splice(index, 1)
|
||||
if(this.formData.companionList.length > 0) {
|
||||
if(this.hasRead === false) {
|
||||
this.$toast('请先阅读携带家属须知')
|
||||
return
|
||||
}
|
||||
})
|
||||
const resp = await $.post('/platform/theRapyRecuperation/line/enroll/doSignUpForLine', {
|
||||
enroll: JSON.stringify(cloneData),
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (resp.code === 0) {
|
||||
toast.message = '提交成功'
|
||||
toast.type = 'success'
|
||||
} else {
|
||||
toast.message = resp.msg
|
||||
toast.type = 'fail'
|
||||
if(!this.formData.sign) {
|
||||
this.$toast('请签字')
|
||||
return
|
||||
}
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '确定要报名吗?',
|
||||
}).then(async () => {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const cloneData = clone(this.formData)
|
||||
cloneData.companionList.forEach((item, index) => {
|
||||
if (item.userName === '') {
|
||||
cloneData.companionList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
const resp = await $.post('/platform/theRapyRecuperation/line/enroll/doSignUpForLine', {
|
||||
enroll: JSON.stringify(cloneData),
|
||||
})
|
||||
setTimeout(() => {
|
||||
toast.clear()
|
||||
}, 500)
|
||||
if (resp.code === 0) {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index
|
||||
}
|
||||
}, 1000)
|
||||
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) {
|
||||
pjaxReplace('/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index)
|
||||
}
|
||||
}, 1000)
|
||||
})
|
||||
},
|
||||
addCompanion() {
|
||||
this.formData.companionList.push({userName: '', loginName: '', sex: '', relation: '', bedInfo: {}})
|
||||
@@ -557,19 +702,21 @@ layout("/mobile/platform.html"){
|
||||
}),
|
||||
})
|
||||
if (re.code !== 0) {
|
||||
if(re.msg === '您今年已报名,如要继续报名请进入我的疗休养,取消已选择') {
|
||||
if (re.msg === '您今年已报名,如要继续报名请进入我的疗休养,取消已选择') {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: re.msg,
|
||||
confirmButtonText: '跳转页面',
|
||||
}).then(() => {
|
||||
location.href = '/platform/mobile/theRapyRecuperation/myRecuperation?index=' + this.index
|
||||
}).catch(() => {});
|
||||
}).catch(() => {
|
||||
});
|
||||
} else {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: re.msg,
|
||||
}).then(() => {})
|
||||
}).then(() => {
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -641,6 +788,34 @@ layout("/mobile/platform.html"){
|
||||
const resp = await $.get('/platform/theRapyRecuperation/TheRapyConfig/findOne')
|
||||
this.configData = resp.data
|
||||
},
|
||||
readPDFPicture(pdf) {
|
||||
if(pdf != null) {
|
||||
pdf.on("complete", function () {
|
||||
const imgDoc = document.querySelectorAll('img')
|
||||
let array = []
|
||||
let classArray = []
|
||||
imgDoc.forEach(o => {
|
||||
if(o.getAttribute('class') !== 'top_icon') {
|
||||
classArray.push(o.getAttribute('class'))
|
||||
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,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = getQueryString('id') ? getQueryString('id') : ''
|
||||
@@ -653,16 +828,37 @@ layout("/mobile/platform.html"){
|
||||
if (this.enrollId) {
|
||||
await this.findSignUpInfoById()
|
||||
}
|
||||
this.getData()
|
||||
await this.getData()
|
||||
this.isLoad = true
|
||||
|
||||
try {
|
||||
const parser = new DOMParser();
|
||||
const doc = parser.parseFromString(this.lineData.content, 'text/html');
|
||||
const link = doc.querySelector('a');
|
||||
const href = link.getAttribute('href');
|
||||
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,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.readPDFPicture(pdfh5)
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('scroll', this.scrollToTop)
|
||||
document.addEventListener('click', function (event) {
|
||||
// 打印被点击的元素标签名和 class
|
||||
if (event.target.tagName === 'IMG' && event.target.className !== 'top_icon') {
|
||||
vant.ImagePreview([event.target.src])
|
||||
}
|
||||
})
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener('scroll', this.scrollToTop)
|
||||
|
||||
Reference in New Issue
Block a user