提交 930030ce 编写于 作者: 张敬贤's avatar 张敬贤

add

上级 c0f5c6bb
import { router } from '@pica-cli/vue-cli-plugin-pica-cli-plugin/auto'; import { router } from '@pica-cli/vue-cli-plugin-pica-cli-plugin/auto';
import Index from '@/views/index.vue'; import Index from '@/views/index.vue';
import {toggleSkeletonRouter} from 'mn-template/plugins/toggleSkeleton.js'; import { toggleSkeletonRouter } from 'mn-template/plugins/toggleSkeleton.js';
import handleAllRouter from '../public_uat'; import handleAllRouter from '../public_uat';
const routerConfig = [ const routerConfig = [
{ {
path: '/', path: '/',
name: 'Index', name: 'Index',
component: Index component: Index,
},
{
path: '/entrance',
name: 'entrance',
component: Index,
},
{
path: '/result',
name: 'result',
component: () => import('@/views/result/index.vue'),
},
{
path: '/result-risk',
name: 'resultRisk',
component: () => import('@/views/result/risk.vue'),
},
{
path: '/appoint',
name: 'appoint',
component: () => import('@/views/appoint/index.vue'),
}, },
{ {
path: '*', path: '*',
redirect: process.env.VUE_APP_BASE_ROUTE redirect: process.env.VUE_APP_BASE_ROUTE,
} },
]; ];
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
......
<template>
<div class="insurance-detection-appoint">
<img
class="bg-img"
src=""
>
<div class="wrap">
<div class="title-1">
检测预约
</div>
<div class="title-2">
及时接受检测结果检测报告
</div>
<div class="choose-section">
<div class="item">
<div class="input-key required">
检测项目
</div>
<div class="input-value">
{{ dectionForm.detectName }}
</div>
</div>
<div class="item height60">
<div class="input-key required">
检测地点
</div>
<div class="input-value" />
</div>
<div
class="item"
@click="choose('province')"
>
<div class="input-key">
省市区
</div>
<input
v-model="selectPicker.label"
disabled
class="input-value"
placeholder-style="color:#999999;font-weight:300"
placeholder="请选择检省市区"
>
<!-- <u-icon
class="right"
style="margin-left: 8rpx"
name="arrow-right"
color="#999999"
size="22"
/> -->
</div>
<div
class="item"
@click="choose('place')"
>
<div class="input-key">
检测地点
</div>
<input
v-model="dectionForm.place"
disabled
class="input-value"
placeholder-style="color:#999999;font-weight:300"
placeholder="请选择检测机构"
>
<!-- <u-icon
class="right"
style="margin-left: 8rpx"
name="arrow-right"
color="#999999"
size="22"
/> -->
</div>
<div
class="item"
@click="choose('time')"
>
<div class="input-key required">
预约时间
</div>
<input
v-model="dectionForm.time"
disabled
class="input-value"
placeholder-style="color:#999999;font-weight:300"
placeholder="请选择检测时间"
>
<!-- <u-icon
class="right"
style="margin-left: 8rpx"
name="arrow-right"
color="#999999"
size="22"
/> -->
</div>
</div>
</div>
<div
class="sub-btn"
:class="checkValue && isSelf ? '' : 'disabled'"
@click="submit"
>
提交
</div>
<!-- <u-popup
v-model="reportShow"
mode="bottom"
:height="popType == 'place' ? '80%' : '700'"
closeable
border-radius="20"
>
<div class="content">
<div class="title-wrap">
<div class="title">
{{ popType == "place" ? "选择检测地点" : "预约时间" }}
</div>
<div
v-if="popType == 'place'"
class="search"
>
<input
v-model="searchPlace"
class="search-input"
placeholder-style="color:#999999;font-weight:300"
placeholder="请输入检测地点"
@input="inputChange"
>
<div @click="cancelSearch">
取消
</div>
</div>
</div>
<scroll-div
v-if="popType == 'place'"
class="pop-wrap"
:scroll-y="false"
style="height: 100%; padding-top: 140rpx"
:show-scrollbar="false"
:enhanced="true"
>
<div
v-for="(info, index) in placeList"
v-if="placeList.length > 0"
:key="index"
:class="dectionForm.hospitalId === info.hospitalId ? 'hospitalActive' : ''"
class="tab-list"
@click="chooseHospital(info)"
>
<div class="list-1">
{{ info.hospitalName }}
</div>
<div class="list-2">
{{ info.hospitalAddress }}
</div>
<image
v-if="dectionForm.hospitalId === info.hospitalId"
class="hospitalActive-icon"
src="https://files.yunqueyi.com/image/png/common/2022081612011851.png"
/>
</div>
<div
v-if="placeList.length == 0"
class="no-content"
>
<div class="no-content-img">
<image src="https://files.yunqueyi.com/image/png/common/20221226163921746.png" />
</div>
<div class="mt40">
暂未搜索到相关检测点
</div>
</div>
</scroll-div>
<div
v-else
class="date-wrap"
>
<scroll-div
class="left"
:scroll-y="true"
:show-scrollbar="false"
:enhanced="true"
>
<div
v-for="item in timsArray"
:key="item"
class="date-item"
:class="item === dectionForm.currentDate ? 'date-item-active' : ''"
@click="chooseDate(item)"
>
{{ item }}
</div>
</scroll-div>
<div class="right">
<div
class="right-item"
:class="dectionForm.timeBucket === timeBucket['am'] ? 'right-item-active' : ''"
@click="chooseTime('am')"
>
上午
</div>
<div
class="right-item"
:class="dectionForm.timeBucket === timeBucket['pm'] ? 'right-item-active' : ''"
@click="chooseTime('pm')"
>
下午
</div>
</div>
</div>
</div>
</u-popup> -->
<!-- <pickAddressModel
v-if="isShowAddress"
:default-pick="selectPicker"
:need-town="false"
:sp-equity-code="spEquityCode"
@onConfirm="onConfirm"
@onCancel="onCancel"
/> -->
</div>
</template>
<script>
// import { getMeixinHospitalList, appointment, throttle, getDetailByUnionId } from './api';
// import pickAddressModel from '@/components/pick-address-model/modal.vue';
// let that;
export default {
components: {
// pickAddressModel,
},
data() {
return {
dectionForm: {
detectName: '',
place: '',
time: '',
currentDate: '',
timeBucket: '',
hospitalId: '',
goodsId: '',
},
reportShow: false,
placeList: [],
popType: '',
timsArray: [],
timeBucket: {
am: '上午',
pm: '下午',
},
provinceList: [],
showProvinces: false,
searchPlace: '',
selectPicker: {
value: [],
label: '',
},
isShowAddress: false,
isSelf: false,
spEquityCode: '',
};
},
computed: {
checkValue() {
return (
this.dectionForm.hospitalId !== '' &&
this.dectionForm.time !== '' &&
this.dectionForm.currentDate !== '' &&
this.dectionForm.timeBucket !== ''
);
},
},
mounted() {},
methods: {
choose() {},
submit() {},
chooseHospital() {},
getMeixinHospitalList() {},
chooseDate() {},
chooseTime() {},
getTimes() {
this.timsArray = [];
const current = new Date().getTime();
const ss = 24 * 60 * 60 * 1000;
for (let i = 5; i < 35; i++) {
var addTime = i * ss + current;
var myDate = new Date(addTime);
var year = myDate.getFullYear();
var month = myDate.getMonth() + 1;
var date = myDate.getDate();
var timeStr =
year + '-' + this.plusZero(month) + '-' + this.plusZero(date);
this.timsArray.push(timeStr);
}
},
plusZero(num) {
return num > 9 ? num + '' : '0' + num;
},
inputChange() {},
cancelSearch() {},
selectAddress() {},
onConfirm() {},
onCancel() {},
getDetailByUnionId() {},
},
};
</script>
<style lang="scss" scoped>
.insurance-detection-appoint {
width: 100%;
box-sizing: border-box;
color: #ffffff;
background: url('https://files.yunqueyi.com/image/png/common/20221213160647748.png')
no-repeat top left;
background-size: 100% 281px;
.bg-img {
width: 100%;
height: 281px;
position: absolute;
top: 0;
z-index: -1;
}
.wrap {
padding: 0 12px;
}
.title-1 {
font-size: 20px;
margin-top: 23px;
font-style: oblique;
font-weight: 600;
}
.title-2 {
margin-top: 4rpx;
font-size: 24rpx;
}
.choose-section {
padding: 0 12px;
background: #ffffff;
border-top-left-radius: 22px;
border-top-right-radius: 22px;
margin-top: 15px;
.item {
color: #212121;
font-size: 14px;
display: flex;
height: 60px;
align-items: center;
position: relative;
.input-key {
font-weight: 300;
margin-left: 10px;
}
.input-value {
margin-left: 18px;
font-weight: 500;
overflow: visible;
}
.right {
position: absolute;
right: 10px;
top: 25px;
}
}
.height60 {
height: 30px;
}
.required {
position: relative;
}
.required::after {
position: absolute;
content: '*';
display: block;
left: -10px;
top: 0;
text-align: center;
color: rgba(255, 56, 56, 1);
}
}
// .sub-btn {
// background: #00bda5;
// font-size:16px;
// color: #ffffff;
// font-weight: 600;
// width: 90%;
// height: 40px;
// line-height: 40px;
// border-radius: 40px;
// margin: 0 auto;
// position: absolute;
// top: 922rpx;
// left: 5%;
// text-align: center;
// }
.content {
color: #02120f;
height: 350px;
overflow: hidden;
.title-wrap {
font-size: 18px;
font-weight: 500;
text-align: center;
padding-top: 18px;
position: fixed;
width: 100%;
left: 0;
background: #ffffff;
z-index: 1;
margin: 0 auto;
.search {
display: flex;
align-items: center;
justify-content: space-evenly;
}
.search-input {
width: 303px;
height: 35px;
background: #f5f6f8;
border-radius: 13px;
text-align: left;
padding-left: 20px;
}
.title {
font-size: 18px;
font-weight: 500;
}
}
}
.pop-wrap {
width: calc(100% - 64rpx);
padding: 0 16px;
.tab-list {
position: relative;
border-bottom: 0.5px solid #e7e8e9;
height: 64px;
.hospitalActive-icon {
position: absolute;
width: 17px;
height: 17px;
top: 14px;
right: 0;
}
.list-1 {
font-weight: 500;
color: #212121;
font-size: 15px;
margin-top: 14px;
}
.list-2 {
font-size: 12px;
font-weight: 400;
color: #999999;
margin-top: 2px;
}
}
.hospitalActive {
}
}
.date-wrap {
height: 100%;
padding-top: 58px;
display: flex;
.left {
min-height: 100vh;
overflow: scroll;
width: 130px;
padding-bottom: 50px;
background: #f5f6f8;
.date-item {
height: 38px;
background: #f5f6f8;
line-height: 38px;
font-size: 16px;
font-weight: 500;
color: #02120f;
text-align: center;
}
.date-item-active {
color: #00bda5;
background: #ffffff;
}
}
.right {
position: absolute;
top: 58px;
left: 130px;
width: calc(100% - 260rpx);
.right-item {
padding-left: 22px;
width: 100%;
height: 41px;
font-size: 16px;
font-weight: 400;
color: #666666;
line-height: 82rpx;
}
.right-item-active {
color: #00bda5;
}
}
.date-item {
height: 38px;
}
}
.disabled {
background: #d9d9d9 !important;
}
.no-content {
font-size: 36rpx;
font-weight: 500;
color: #02120f;
.no-content-img {
width: 310rpx;
height: 171rpx;
margin: 0 auto;
margin-top: 169rpx;
image {
width: 100%;
height: 100%;
}
}
.mt40 {
margin-top: 40rpx;
width: 100%;
text-align: center;
font-size: 36rpx;
}
}
}
</style>
<style>
.mpvue-picker-div-show {
color: #000000;
}
</style>
<template>
<div class="insurance-research-result">
<div class="icon-item">
<img
src="https://files.yunqueyi.com/image/png/common/20221213135338128.png"
>
</div>
<div class="font-big">
提交成功
</div>
<div class="font-normal">
{{
evaluationInfo.detectionScoreFlag == 1
? '结果计算中...'
: '您的结果将于次日以短信形式推送,烦请留意!'
}}
</div>
<div class="custom-style">
{{ evaluationInfo.detectionScoreFlag == 1 ? '查看结果' : '完成' }}
</div>
<pica-guide-app
:open-web-app="true"
:open-web-app-config="openWebAppConfig"
:is-need-wx-config="false"
/>
</div>
</template>
<script>
// import {evaluationResults, getDetailByUnionId} from '@/api/home.js';
const { VUE_APP_ENV } = process.env;
export default {
data() {
return {
openWebAppConfig: {
content:
'<script' +
' type=text/wxtag-template><style>.btn {position:absolute; top: 0; left: 0; width:100%; height: 100%;}</style> <div class="btn"></div></' +
'script>', // 标签内容
username: 'gh_e92f58174364', // 小程序唯一username 1.gh_80d54796f2d5 云鹊助手 2. gh_e92f58174364 云鹊健康
path: 'pagesUserCenter/insurance/insurance-risk-result', // 打开页面
envVersion: VUE_APP_ENV != 'testing' ? 'release' : 'trial', // release 生产
extraData: '',
},
extraData_MX: {},
evaluationInfo: {},
};
},
created() {
// const data = JSON.parse(localStorage.getItem('extraData_MX'));
// const questionInfo_MX = JSON.parse(localStorage.getItem('questionInfo_MX'));
// const d = {userId: questionInfo_MX.patientId, ...data};
// this.openWebAppConfig.extraData = JSON.stringify(d);
// this.extraData_MX = d;
// this.evaluationResults(data.orderNo);
// const {referer} = this.$route.query;
// console.log('--referer', referer, d);
// if(referer) {
// window.location.href = window.location.origin + window.location.pathname;
// }
},
methods: {
// evaluationResults(id) {
// evaluationResults(id).then(res => {
// console.log('evaluationResults', res);
// if (res.code === '000000') {
// console.log('evaluationResults', res);
// this.evaluationInfo = res.data;
// }
// });
// const questionInfo_MX = JSON.parse(localStorage.getItem('questionInfo_MX'));
// getDetailByUnionId(questionInfo_MX.patientId).then( res => {
// if (res.code === '000000') {
// const { status, detectionServiceRecord} = res.data;
// const data = JSON.parse(localStorage.getItem('extraData_MX'));
// const d = {userId: questionInfo_MX.patientId, detectionDetailID:detectionServiceRecord.id, ...data};
// this.openWebAppConfig.extraData = JSON.stringify(d);
// if(status == 0) {
// console.log('111');
// }
// if(status == 1 || status == 5) {
// this.openWebAppConfig.path = 'pagesUserCenter/insurance/insurance-detection-detail';
// }
// if(status == 2 || status == 3 || status == 4) {
// this.openWebAppConfig.path = 'pages/health/detection-detail/index';
// }
// }
// console.log('--this.openWebAppConfig', this.openWebAppConfig);
// });
// },
},
};
</script>
<style lang="scss" scoped>
.insurance-research-result {
width: 100%;
height: 100vh;
background: #ffffff;
box-sizing: border-box;
padding: 20px 16px;
color: #676869;
text-align: center;
.icon-item {
width: 57px;
height: 65px;
margin: 0 auto;
margin-top: 83px;
image {
width: 100%;
height: 100%;
}
}
.font-big {
margin-top: 22px;
font-size: 20px;
font-weight: 700;
color: #02120f;
}
.font-normal {
margin-top: 12px;
font-size: 15px;
font-weight: 400;
color: #666666;
}
.custom-style {
width: 350px;
height: 40px;
background: #00bda5;
font-size: 16px;
color: #ffffff;
font-weight: 600;
line-height: 40px;
border-radius: 40px;
border: none;
margin-top: 148px;
}
}
</style>
<template>
<div class="insurance-risk-result">
<div class="icon-item">
<img
:src="
!needDetect
? 'https://files.yunqueyi.com/image/png/common/20221213144514273.png'
: 'https://files.yunqueyi.com/image/png/common/20221213144810625.png'
"
>
</div>
<div
class="font-big"
:class="needDetect && 'green'"
>
{{ !needDetect ? '建议领用' : '暂无需领用' }}
</div>
<div class="font-normal">
{{
!needDetect
? '参照本次评估结果,建议您接受防癌早筛检测。坚持良好生活方式,定期接受体检,关注个人健康'
: '参照本次评估结果,建议您可暂不进行防癌早筛检测。坚持良好生活方式,定期接受体检,关注个人健康。'
}}
</div>
<div
v-if="!needDetect"
class="advise"
>
<div class="fs">
建议您进行以下防癌筛查:
</div>
<div class="ad-fs">
{{ result.detectName || '' }}
</div>
</div>
<div
v-if="!needDetect"
class="progress"
>
<img
src="https://files.yunqueyi.com/image/png/common/20221226103307358.png"
>
</div>
<div
v-if="!needDetect"
class="custom-style"
@click="toAppoint"
>
{{ statusMap(detailInfo.status) || '免费预约检测' }}
</div>
<div class="tips">
注:该问卷评估结果仅供填写人自行参考。
</div>
</div>
</template>
<script>
export default {
data() {
return {
needDetect: false,
result: {},
detailInfo: {},
isLoading: true,
};
},
mounted() {
console.log(11223);
},
methods: {
statusMap(status) {
const m = {
0: '免费预约检测',
4: '免费预约检测',
5: '免费预约检测',
1: '查看详情',
2: '查看详情',
3: '查看详情',
};
return m[status];
},
},
};
</script>
<style lang="scss" scoped>
.insurance-risk-result {
width: 100%;
height: 100vh;
box-sizing: border-box;
padding: 20px 16px;
color: #676869;
text-align: center;
.icon-item {
width: 50px;
height: 60px;
margin: 0 auto;
margin-top: 45px;
img {
width: 100%;
height: 100%;
}
}
.font-big {
margin-top: 8px;
font-size: 25px;
font-weight: 500;
color: #ef8337;
}
.green {
color: #179082;
}
.font-normal {
margin-top: 15px;
font-size: 15px;
font-weight: 400;
color: #666666;
}
.advise {
height: 78px;
background: #fffbf9;
border-radius: 11px;
border: 1px solid #fbe0ce;
padding: 15px;
text-align: center;
margin: 10 auto;
}
.fs {
font-size: 12px;
font-weight: 400;
color: #999999;
}
.ad-fs {
font-size: 18px;
font-weight: 500;
color: #ef8337;
}
.custom-style {
background: #00bda5;
font-size: 16px;
color: #ffffff;
font-weight: 600;
width: 90%;
height: 40px;
line-height: 40px;
border-radius: 40px;
//position: absolute;
//bottom: 120px;
margin: 0 auto;
margin-top: 150px;
}
.tips {
font-size: 13px;
font-weight: 300;
color: #212121;
//bottom: 60px;
//position: absolute;
margin: 0 auto;
text-align: center;
width: 100%;
margin-top: 38px;
}
.progress {
margin-top: 24px;
height: 168px;
width: 100%;
image {
width: 100%;
height: 100%;
}
}
}
.loadingShow {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
width: 100vw;
position: absolute;
top: 0;
left: 0;
background: rgba($color: #000000, $alpha: 0.3);
}
</style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册