提交 88c41e59 编写于 作者: 史文彬's avatar 史文彬

fix: 修复问题

上级 63aff1f5
......@@ -6,12 +6,12 @@
:header-info="headerInfo"
/>
<div class="wrap">
<!-- <div class="title-1">
<div class="title-1">
检测预约
</div>
<div class="title-2">
及时接受检测结果检测报告
</div> -->
</div>
<div class="choose-section">
<van-form
ref="dectionForm"
......@@ -23,14 +23,13 @@
required
>
<template #input>
<span style="font-weight:600">{{ dectionForm.detectName }}</span>
<span style="font-weight: 600">{{ dectionForm.detectName }}</span>
</template>
</van-field>
<van-field
label="受检人信息"
required
disabled
class="appoint-form-title"
/>
<van-field
......@@ -40,14 +39,17 @@
clearable
class="appoint-form-items"
placeholder="请输入受检人姓名"
:rules="[{ required: true, message: '请输入受检人姓名' },{
pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9]+$/,
message: '请输入正确格式',
},
{
pattern: /^.{2,20}$/,
message: '受检人姓名请填写2-20位',
},]"
:rules="[
{ required: true, message: '请输入受检人姓名' },
{
pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9]+$/,
message: '请输入正确格式',
},
{
pattern: /^.{2,20}$/,
message: '受检人姓名请填写2-20位',
},
]"
/>
<van-field
v-model="dectionForm.beneficiaryPhone"
......@@ -56,11 +58,13 @@
label="手机号"
clearable
placeholder="请输入受检人手机号"
:rules="[{ required: true, message: '请输入受检人手机号' },
{
pattern: /^([1][3,4,5,6,7,8,9])\d{9}$/,
message: '手机号格式填写有误',
},]"
:rules="[
{ required: true, message: '请输入受检人手机号' },
{
pattern: /^([1][3,4,5,6,7,8,9])\d{9}$/,
message: '手机号格式填写有误',
},
]"
/>
<van-field
v-model="dectionForm.beneficiaryIdNum"
......@@ -69,11 +73,13 @@
clearable
label="身份证号"
placeholder="请输入受检人真实身份证号"
:rules="[{ required: true, message: '请输入受检人真实身份证号' },
{
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
message: '身份证号格式填写有误',
},]"
:rules="[
{ required: true, message: '请输入受检人真实身份证号' },
{
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
message: '身份证号格式填写有误',
},
]"
/>
<van-field
label="检测地点"
......@@ -135,7 +141,6 @@
label="预约时间"
required
right-icon="arrow"
@click="showPopup('showSelectTime')"
>
<template #input>
......@@ -160,15 +165,15 @@
block
type="info"
:disabled="!canSubmit"
class="appoint-form-submit "
:class="canSubmit ? 'appoint-form-submit-active':''"
class="appoint-form-submit"
:class="canSubmit ? 'appoint-form-submit-active' : ''"
@click="appointment"
>
提交
</van-button>
<div class="appoint-tel">
客服电话:<a
style="font-weight:600"
style="font-weight: 600"
href="tel:400-006-5252"
>400-021-8282</a>
<div class="serve-time">
......@@ -199,18 +204,21 @@
@confirm="confirm"
@close="closePopup"
/>
<div
id="container"
/>
<div id="container" />
</div>
</template>
<script>
import {getDetectionName, getOrderInfo, appointment, getHospitalList} from '@/api/appoint';
import {
getDetectionName,
getOrderInfo,
appointment,
getHospitalList,
} from '@/api/appoint';
import SelectHospital from '@/components/selectHospital/index.vue';
import SelectTime from '@/components/selectTime/index.vue';
import PickArea from '@/components/pickArea/index.vue';
import { getJumpPageStatus, getButtonStatus} from '@/api/question';
import { getJumpPageStatus, getButtonStatus } from '@/api/question';
import storejs from 'storejs';
import dayjs from 'dayjs';
import AMapLoader from '@amap/amap-jsapi-loader';
......@@ -218,11 +226,11 @@ export default {
components: {
SelectHospital,
SelectTime,
PickArea
PickArea,
},
data() {
return {
picaWechat:window._picaWechat,
picaWechat: window._picaWechat,
headerInfo: {
title: '检测服务',
isBlack: true,
......@@ -230,21 +238,21 @@ export default {
style: 'backgroundColor:#ffffff;zIndex:100;',
background: '',
},
dectionData:{},
dectionData: {},
dectionForm: {
detectName: '',
beneficiaryIdNum:'',
beneficiaryIdNum: '',
beneficiaryName: '',
appointmentTime: '',
currentDate: '',
timeBucket: '',
beneficiaryPhone: '',
hospitalName:'',
hospitalName: '',
goodsId: '',
},
showAreaLabel:'',
showselectHospital:false,
showArea:false,
showAreaLabel: '',
showselectHospital: false,
showArea: false,
reportShow: false,
placeList: [],
popType: '',
......@@ -260,14 +268,14 @@ export default {
value: [],
label: '',
},
geolocation:null,
geolocation: null,
isShowAddress: false,
showSelectTime:false,
showSelectTime: false,
isSelf: false,
spEquityCode: '',
position: {
latitude: '',
longitude:''
longitude: '',
},
locationAreaCode: [],
hospitalId: '',
......@@ -275,7 +283,7 @@ export default {
yunOrderNo: '',
externalData: {
latitude: '',
longitude:'',
longitude: '',
provinceId: '',
countyId: '',
cityId: '',
......@@ -310,14 +318,14 @@ export default {
this.projectEquityNo = projectEquityNo;
console.log('yunOrderNo', yunOrderNo);
const data = {
yunOrderNo,
projectEquityNo:'',
externalOrderNo:'',
};
yunOrderNo,
projectEquityNo: '',
externalOrderNo: '',
};
this.$sendBuriedData({
action: 'ACTION_WEB_AFTER',
component_tag: '7802852#0#0#预约',
web_data:{yunOrderNo: yunOrderNo},
web_data: { yunOrderNo: yunOrderNo },
});
this.getDetectionName(yunOrderNo);
this.getOrderInfo(yunOrderNo);
......@@ -328,7 +336,7 @@ export default {
methods: {
// 判断 库存
getJumpPageStatus(data) {
getJumpPageStatus(data).then(res => {
getJumpPageStatus(data).then((res) => {
if (res.code == '000000') {
this.stock = res.data.stock;
this.isDisabled = !this.stock;
......@@ -344,10 +352,10 @@ export default {
initMap() {
const that = this;
AMapLoader.load({
key:'c6636583d8d2991af64c9f7253e1a25b', // 申请好的Web端开发者Key,首次调用 load 时必填
plugins:[''], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
key: 'c6636583d8d2991af64c9f7253e1a25b', // 申请好的Web端开发者Key,首次调用 load 时必填
plugins: [''], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
}).then((AMap) => {
AMap.plugin('AMap.Geolocation', function() {
AMap.plugin('AMap.Geolocation', function () {
var geolocation = new AMap.Geolocation({
// 是否使用高精度定位,默认:true
enableHighAccuracy: true,
......@@ -358,12 +366,15 @@ export default {
// 定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
zoomToAccuracy: true,
// 定位按钮的排放位置, RB表示右下
buttonPosition: 'RB'
buttonPosition: 'RB',
});
geolocation.getCurrentPosition((status, result) => {
console.log('geolocationgeolocation,', status, result.position);
if (result.position) {
const position = { ...result.position, addr: result.formattedAddress };
const position = {
...result.position,
addr: result.formattedAddress,
};
that.position.latitude = result.position.lat || '';
that.position.longitude = result.position.lng || '';
storejs.set('geolocation', position);
......@@ -371,9 +382,7 @@ export default {
storejs.remove('geolocation');
}
that.initHospitalList();
});
});
});
},
......@@ -388,30 +397,40 @@ export default {
const data = {
projectEquityNo: this.projectEquityNo,
latitude: this.position.latitude,
longitude:this.position.longitude,
longitude: this.position.longitude,
};
this.getHospitalList(data);
}
},
// 根据坐标获取最近的机构id
getHospitalList(data) {
getHospitalList(data).then(res => {
const { provinceId, countyId, cityId, hospitalName, hospitalId } = res.data.data[0];
console.log('getHospitalListposition', res.data.data[0], provinceId, countyId, cityId, hospitalName, hospitalId);
getHospitalList(data).then((res) => {
const { provinceId, countyId, cityId, hospitalName, hospitalId } =
res.data.data[0];
console.log(
'getHospitalListposition',
res.data.data[0],
provinceId,
countyId,
cityId,
hospitalName,
hospitalId
);
this.locationAreaCode = [provinceId, cityId, countyId];
this.dectionForm.hospitalName = hospitalName;
this.hospitalId = hospitalId;
this.externalData = {
latitude: this.position.latitude,
longitude:this.position.longitude,
provinceId, countyId, cityId
longitude: this.position.longitude,
provinceId,
countyId,
cityId,
};
});
},
// 目前是配置一个检测信息,可能会拓展,所以返回的是一个list
getDetectionName(yunOrderNo) {
getDetectionName(yunOrderNo).then(res => {
getDetectionName(yunOrderNo).then((res) => {
if (res.code === '000000' && res.data) {
const dectionData = res.data[0] || {};
console.log('getDetectionName', dectionData);
......@@ -419,30 +438,42 @@ export default {
this.dectionForm.detectName = dectionData.detectionName;
this.dectionForm.goodsId = dectionData.goodsId;
this.$store.dispatch('home/setInsuranceInfo', dectionData);
}
});
},
// 获取订单信息
getOrderInfo(yunOrderNo) {
getOrderInfo(yunOrderNo).then(res => {
getOrderInfo(yunOrderNo).then((res) => {
console.log('getOrderInfo', res);
this.dectionForm.beneficiaryName = res.data.beneficiaryName;
this.dectionForm.beneficiaryPhone = res.data.beneficiaryPhone;
this.dectionForm.beneficiaryIdNum = res.data.beneficiaryIdNum;
this.isDisabled = (this.dectionForm.beneficiaryName != '' && this.dectionForm.beneficiaryPhone != '' && this.dectionForm.beneficiaryIdNum != '') && (this.dectionForm.beneficiaryName && this.dectionForm.beneficiaryPhone && this.dectionForm.beneficiaryIdNum );
this.isDisabled =
this.dectionForm.beneficiaryName != '' &&
this.dectionForm.beneficiaryPhone != '' &&
this.dectionForm.beneficiaryIdNum != '' &&
this.dectionForm.beneficiaryName &&
this.dectionForm.beneficiaryPhone &&
this.dectionForm.beneficiaryIdNum;
this.$store.dispatch('home/setOrderInfo', res.data);
});
},
selectTimes(times) {
console.log(times);
const {value, currentItemChoosed} = times;
const { value, currentItemChoosed } = times;
this.dectionForm.appointmentTime = value;
this.closePopup('showSelectTime');
// appointmentTimeShadow
const m = (Number(dayjs(currentItemChoosed.appointmentDate).month()) + 1) + '月' + (Number(dayjs(currentItemChoosed.appointmentDate).date())) + '日';
this.appointmentTimeShadow = m + ' ' + currentItemChoosed[currentItemChoosed.timeBucket + 'TimeContent'];
const m =
Number(dayjs(currentItemChoosed.appointmentDate).month()) +
1 +
'月' +
Number(dayjs(currentItemChoosed.appointmentDate).date()) +
'日';
this.appointmentTimeShadow =
m +
' ' +
currentItemChoosed[currentItemChoosed.timeBucket + 'TimeContent'];
},
getTimes() {
this.timsArray = [];
......@@ -467,7 +498,6 @@ export default {
if (this.stock) {
this[name] = true;
}
},
closePopup(name) {
this[name] = false;
......@@ -476,76 +506,78 @@ export default {
this.$sendBuriedData({
action: 'ACTION_WEB_CLICK',
component_tag: '7802852#0#0#预约提交',
web_data:{yunOrderNo: this.yunOrderNo},
web_data: { yunOrderNo: this.yunOrderNo },
});
this.$refs.dectionForm.validate().then(result => {
console.log('this.dectionForm', result);
const data = {
appointmentTime: this.dectionForm.appointmentTime,
goodsId: this.dectionForm.goodsId,
hospitalId: this.hospitalId,
hospitalName: this.dectionForm.hospitalName,
patientIdNo: this.dectionForm.beneficiaryIdNum,
patientMobile: this.dectionForm.beneficiaryPhone,
patientName: this.dectionForm.beneficiaryName,
yunOrderNo: this.yunOrderNo,
longitude: this.position.longitude || '',
latitude: this.position.latitude || '',
};
appointment(data).then(res => {
if (res.code === '000000') {
const l = window.location.origin;
const hr = l + `/pica-insurance/appoint-details?yunOrderNo=${this.yunOrderNo}&projectEquityNo=${this.projectEquityNo}`;
window.location.href = hr;
// this.$router.push({
// path: '/appoint-details',
// query: {
// yunOrderNo: this.yunOrderNo,
// projectEquityNo:this.projectEquityNo
// }
// });
} else {
res.message && this.$toast(res.message);
}
this.$refs.dectionForm
.validate()
.then((result) => {
console.log('this.dectionForm', result);
const data = {
appointmentTime: this.dectionForm.appointmentTime,
goodsId: this.dectionForm.goodsId,
hospitalId: this.hospitalId,
hospitalName: this.dectionForm.hospitalName,
patientIdNo: this.dectionForm.beneficiaryIdNum,
patientMobile: this.dectionForm.beneficiaryPhone,
patientName: this.dectionForm.beneficiaryName,
yunOrderNo: this.yunOrderNo,
longitude: this.position.longitude || '',
latitude: this.position.latitude || '',
};
appointment(data).then((res) => {
if (res.code === '000000') {
const l = window.location.origin;
const hr =
l +
`/pica-insurance/appoint-details?yunOrderNo=${this.yunOrderNo}&projectEquityNo=${this.projectEquityNo}`;
window.location.href = hr;
// this.$router.push({
// path: '/appoint-details',
// query: {
// yunOrderNo: this.yunOrderNo,
// projectEquityNo:this.projectEquityNo
// }
// });
} else {
res.message && this.$toast(res.message);
}
});
})
.catch((err) => {
console.log(err);
});
}).catch(err => {
console.log(err);
});
},
// 获取按钮状态
getButtonStatus(yunOrderNo) {
getButtonStatus(yunOrderNo).then(res => {
getButtonStatus(yunOrderNo).then((res) => {
console.log(res);
this.$loading.hide();
this.buttonStatus = res.data.buttonStatus;
this.buttonText = res.data.statusDesc;
!this.buttonStatus && this.$dialog.alert({
message: this.buttonText,
confirmButtonColor:'#00bda5'
});
!this.buttonStatus &&
this.$dialog.alert({
message: this.buttonText,
confirmButtonColor: '#00bda5',
});
});
},
confirm(values) {
console.log('confirm', values);
if (values) {
console.log('confirm1', values);
this.showAreaLabel = values.map(ele => ele.name).join('');
this.showAreaLabel = values.map((ele) => ele.name).join('');
this.externalData.provinceId = values[0].id;
this.externalData.countyId = values[2].id;
this.externalData.cityId = values[1].id;
console.log('confirm1', this.externalData);
this.showArea = false;
}
},
selectHospital({hospitalId, hospitalName}) {
selectHospital({ hospitalId, hospitalName }) {
this.hospitalId = hospitalId;
this.dectionForm.hospitalName = hospitalName;
this.showselectHospital = false;
},
showAreaFn() {
if (this.stock) {
......@@ -556,7 +588,7 @@ export default {
console.log('cleanHospitalId');
this.hospitalId = '';
this.dectionForm.hospitalName = '';
}
},
},
};
</script>
......@@ -568,7 +600,7 @@ export default {
overflow: auto;
box-sizing: border-box;
color: #ffffff;
background: #F3FCFF;
background: #f3fcff;
.bg-img {
width: 100%;
......@@ -591,15 +623,15 @@ export default {
margin-top: 2px;
font-size: 12px;
}
.appoint-form-title{
.appoint-form-title {
font-size: 14px;
font-family: PingFang SC;
font-family: PingFang SC;
font-weight: 400;
color: #212121;
padding-top:22px ;
padding-top: 22px;
padding-bottom: 0;
line-height: 20px
line-height: 20px;
}
.choose-section {
......@@ -607,10 +639,10 @@ export default {
background: #ffffff;
border-radius: 11px;
margin-top: 15px;
/deep/ .van-field__label{
/deep/ .van-field__label {
color: #212121;
}
/deep/ .van-field__control:disabled{
/deep/ .van-field__control:disabled {
color: #323233;
-webkit-text-fill-color: #323233;
}
......@@ -652,30 +684,29 @@ export default {
color: rgba(255, 56, 56, 1);
}
}
.appoint-form-items{
.appoint-form-items {
// font-weight: 600;
/deep/ .van-field__label{
/deep/ .van-field__label {
color: #999999;
}
/deep/ .van-field__control{
/deep/ .van-field__control {
font-weight: 600;
}
/deep/ .van-field__control::placeholder{
/deep/ .van-field__control::placeholder {
font-weight: 450;
}
.appoint-form-placeholder{
.appoint-form-placeholder {
font-weight: 450;
}
}
.appoint-form-value{
font-weight: 600;
}
.appoint-form-placeholder{
.appoint-form-value {
font-weight: 600;
}
.appoint-form-placeholder {
color: #999999;
}
.appoint-form-title::after{
.appoint-form-title::after {
display: none;
}
// .sub-btn {
......@@ -809,19 +840,19 @@ export default {
// /deep/ .van-field__control::placeholder{
// color: #999999;
// }
.appoint-form-submit{
.appoint-form-submit {
margin-top: 30px;
height: 40px;
font-weight: 600;
background: #D9D9D9;
background: #d9d9d9;
border-radius: 20px;
border: 1px solid #D9D9D9;
border: 1px solid #d9d9d9;
}
.appoint-form-submit-active{
background: #00BDA5;
border: 1px solid #00BDA5;
.appoint-form-submit-active {
background: #00bda5;
border: 1px solid #00bda5;
}
.appoint-tel{
.appoint-tel {
margin-top: 25px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
......@@ -829,7 +860,7 @@ export default {
color: #666666;
line-height: 22px;
text-align: center;
.serve-time{
.serve-time {
display: flex;
align-items: center;
justify-content: center;
......@@ -839,11 +870,11 @@ export default {
font-weight: 400;
color: #999999;
line-height: 18px;
span{
span {
width: 1px;
height: 12px;
margin: 0 12px;
background: #BBBBBB;
background: #bbbbbb;
}
}
}
......@@ -883,9 +914,9 @@ export default {
.mpvue-picker-div-show {
color: #000000;
}
#container{
#container {
display: none;
padding:0px;
padding: 0px;
margin: 0px;
width: 100%;
height: 800px;
......
......@@ -18,7 +18,7 @@
alt=""
>
{{ !expireFlag ? statusMap(detailInfo.status):'已过期' }}
{{ !expireFlag ? statusMap(detailInfo.status) : '已过期' }}
</div>
<div class="detail-top insurance-detection">
<div class="detection-title">
......@@ -33,13 +33,13 @@
<div class="detail-top-info">
<div class="detail-top-address">
<div class="detail-top-address-name">
{{ detailInfo.hospitalName || "--" }}
{{ detailInfo.hospitalName || '--' }}
</div>
<div class="detail-top-address-info">
检验科/检验室/采血室
</div>
<div class="detail-top-address-info">
{{ detailInfo.hospitalAddress || "--" }}
{{ detailInfo.hospitalAddress || '--' }}
</div>
<div
......@@ -61,7 +61,9 @@
alt=""
>
<div
v-if="detailInfo.hospitalRemarks && detailInfo.hospitalRemarks !== ''"
v-if="
detailInfo.hospitalRemarks && detailInfo.hospitalRemarks !== ''
"
class="detail-top-hospitalInfo"
>
<img
......@@ -118,7 +120,7 @@
参保人:
</div>
<div class="value">
{{ detailInfo.patientName || "--" }}
{{ detailInfo.patientName || '--' }}
</div>
</div>
<div class="detail-bottom-item">
......@@ -126,17 +128,15 @@
检测名称:
</div>
<div class="value">
{{ detailInfo.detectName || "--" }}
{{ detailInfo.detectName || '--' }}
</div>
</div>
<div class="detail-bottom-item">
<div class="title">
检测编号:
</div>
<div
class="value"
>
{{ detailInfo.recordNo || "--" }}
<div class="value">
{{ detailInfo.recordNo || '--' }}
<img
class="value-copy"
src="https://files.yunqueyi.com/image/png/common/20230301110919111.png"
......@@ -151,10 +151,21 @@
</text> -->
</div>
</div>
<div
v-if="detailInfo.helpDetectionFlag == 1"
class="detail-bottom-item"
>
<div class="title">
采集方式:
</div>
<div class="value">
现场检测
</div>
</div>
</div>
<div class="appoint-detail-tel">
客服电话:<a
style="font-weight:600"
style="font-weight: 600"
href="tel:400-021-8282"
>400-021-8282</a>
<div class="serve-time">
......@@ -165,12 +176,13 @@
v-if="!expireFlag"
class="detail-btn-bottom"
>
<div
class="detail-btn-bottom-tips"
>
<div class="detail-btn-bottom-tips">
<van-icon name="warning-o" />
请按时前往预约地点,并绑定{{ insuranceInfo && insuranceInfo.detectionKind == 0 ? '采样码' : '条形码' }}
请按时前往预约地点,并绑定{{
insuranceInfo && insuranceInfo.detectionKind == 0
? '采样码'
: '条形码'
}}
</div>
<div
class="detail-btn btn-empty reAppoint"
......@@ -182,7 +194,11 @@
class="detail-btn"
@click="bindingCode"
>
绑定{{ insuranceInfo && insuranceInfo.detectionKind == 0 ? '采样码' : '条形码' }}
绑定{{
insuranceInfo && insuranceInfo.detectionKind == 0
? '采样码'
: '条形码'
}}
</div>
</div>
<div
......@@ -209,14 +225,18 @@
</template>
<script>
import {getDetailByYunOrderNo, getDetectionName, getDetailtxt} from '@/api/appoint';
import {
getDetailByYunOrderNo,
getDetectionName,
getDetailtxt,
} from '@/api/appoint';
import storejs from 'storejs';
import AMapLoader from '@amap/amap-jsapi-loader';
import { mapGetters } from 'vuex';
export default {
data() {
return {
picaWechat:window._picaWechat,
picaWechat: window._picaWechat,
headerInfo: {
title: '预约详情',
isBlack: true,
......@@ -224,19 +244,23 @@ export default {
style: 'backgroundColor:#ffffff;zIndex:100;',
background: '',
},
actions: [{ name: '高德地图', value:1 }, { name: '腾讯地图', value:2 }, { name: '百度地图', value:3}],
actions: [
{ name: '高德地图', value: 1 },
{ name: '腾讯地图', value: 2 },
{ name: '百度地图', value: 3 },
],
detailInfo: {},
showSsheet:false,
showSsheet: false,
yunOrderNo: '',
projectEquityNo: '',
expireFlag:false,
expireFlag: false,
query: {},
isUnderLine:false,
insuranceText:{},
qrcodeUrl:'',
verificationCode:'',
intervalId:null,
status:'',
isUnderLine: false,
insuranceText: {},
qrcodeUrl: '',
verificationCode: '',
intervalId: null,
status: '',
};
},
computed: {
......@@ -244,12 +268,12 @@ export default {
},
created() {
this.dataRefreh();
},
this.dataRefreh();
},
mounted() {
this.$loading.show();
const { yunOrderNo, projectEquityNo} = this.$route.query;
const { yunOrderNo, projectEquityNo } = this.$route.query;
this.yunOrderNo = yunOrderNo;
this.projectEquityNo = projectEquityNo;
console.log('yunOrderNo', yunOrderNo);
......@@ -259,24 +283,23 @@ export default {
this.$sendBuriedData({
action: 'ACTION_WEB_AFTER',
component_tag: '7802855#0#0#预约详情',
web_data:{yunOrderNo: yunOrderNo},
web_data: { yunOrderNo: yunOrderNo },
});
},
destroyed() {
this.clear();
this.clear();
},
methods: {
// 定时刷新数据函数
dataRefreh() {
// 计时器正在进行中,退出函数
if (this.intervalId != null) {
dataRefreh() {
// 计时器正在进行中,退出函数
if (this.intervalId != null) {
return;
}
}
// 计时器为空,操作
this.intervalId = setInterval(() => {
this.intervalId = setInterval(() => {
this.dataRefreh();
this.getDetailByYunOrderNo(this.yunOrderNo);
}, 3000);
......@@ -284,43 +307,53 @@ export default {
// 停止定时器
clear() {
clearInterval(this.intervalId);// 清除计时器
clearInterval(this.intervalId); // 清除计时器
this.intervalId = null; // 设置为null
},
getDetailByYunOrderNo(yunOrderNo) {
console.log('appointDetail-yunOrderNo', yunOrderNo);
const that = this;
getDetailByYunOrderNo(yunOrderNo).then(res => {
if(res.code == '000000') {
getDetailByYunOrderNo(yunOrderNo).then((res) => {
if (res.code == '000000') {
console.log('appointDetail-orderInfo', res);
const {expireFlag, qrCodeUrl, verificationCode, status, detectionKind, detectionServiceRecordId, sampleCode, externalOrderNo, projectEquityNo} = res.data;
const {
expireFlag,
qrCodeUrl,
verificationCode,
status,
detectionKind,
detectionServiceRecordId,
sampleCode,
externalOrderNo,
projectEquityNo,
} = res.data;
this.detailInfo = res.data;
this.expireFlag = expireFlag || '';
this.isUnderLine = res.data.detectionCategory == 2;
this.qrcodeUrl = qrCodeUrl;
this.verificationCode = verificationCode;
if(window._miniprogram) {
if(status != '0202') {
if (window._miniprogram) {
if (status != '0202') {
let url;
if(detectionKind == 1) {
if (detectionKind == 1) {
url = `/pagesInsurance/sz-insurance/quick-detection-confirm-success?detectionRecordId=${detectionServiceRecordId}&projectEquityNo=${that.projectEquityNo}&yunOrderNo=${that.yunOrderNo}`;
}
if(detectionKind == 0) {
if (detectionKind == 0) {
url = `/pages/health/detection-confirm-success/index?detectionRecordId=${detectionServiceRecordId}&yunOrderNo=${that.yunOrderNo}&code=${sampleCode}`;
}
this.clear();
this.$rocNative.WXInstance.miniProgram.redirectTo({url});
this.$rocNative.WXInstance.miniProgram.redirectTo({ url });
}
}else{
if(status != '0202') {
} else {
if (status != '0202') {
this.clear();
this.$router.push({
path: `/home?externalOrderNo=${externalOrderNo}&projectEquityNo=${projectEquityNo}`,
});
}
}
}else{
} else {
this.$toast(res.message || '操作失败');
}
this.$loading.hide();
......@@ -328,10 +361,10 @@ export default {
},
initMap() {
AMapLoader.load({
key:'c6636583d8d2991af64c9f7253e1a25b', // 申请好的Web端开发者Key,首次调用 load 时必填
plugins:[''], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
key: 'c6636583d8d2991af64c9f7253e1a25b', // 申请好的Web端开发者Key,首次调用 load 时必填
plugins: [''], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
}).then((AMap) => {
AMap.plugin('AMap.Geolocation', function() {
AMap.plugin('AMap.Geolocation', function () {
var geolocation = new AMap.Geolocation({
// 是否使用高精度定位,默认:true
enableHighAccuracy: true,
......@@ -342,19 +375,20 @@ export default {
// 定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
zoomToAccuracy: true,
// 定位按钮的排放位置, RB表示右下
buttonPosition: 'RB'
buttonPosition: 'RB',
});
geolocation.getCurrentPosition((status, result) => {
console.log('geolocationgeolocation,', status, result);
if (result.position) {
const position = { ...result.position, addr: result.formattedAddress };
const position = {
...result.position,
addr: result.formattedAddress,
};
storejs.set('geolocation', position);
} else {
storejs.remove('geolocation');
}
});
});
});
},
......@@ -363,24 +397,23 @@ export default {
this.$sendBuriedData({
action: 'ACTION_WEB_CLICK',
component_tag: '7802855#0#0#重新预约',
web_data:{yunOrderNo: this.yunOrderNo},
web_data: { yunOrderNo: this.yunOrderNo },
});
const {detectionKind} = this.insuranceInfo;
const { detectionKind } = this.insuranceInfo;
console.log('detectionKind--', detectionKind);
if (window._miniprogram) {
this.$rocNative.WXInstance.miniProgram.navigateTo({
url:`/pagesInsurance/sz-insurance/screeningAppoint?yunOrderNo=${that.yunOrderNo}&projectEquityNo=${this.projectEquityNo}`
});
}else{
this.$router.push({
path: '/appoint',
query: {
projectEquityNo:this.projectEquityNo,
yunOrderNo:this.yunOrderNo
}
});
}
if (window._miniprogram) {
this.$rocNative.WXInstance.miniProgram.navigateTo({
url: `/pagesInsurance/sz-insurance/screeningAppoint?yunOrderNo=${that.yunOrderNo}&projectEquityNo=${this.projectEquityNo}`,
});
} else {
this.$router.push({
path: '/appoint',
query: {
projectEquityNo: this.projectEquityNo,
yunOrderNo: this.yunOrderNo,
},
});
}
},
selectItem(item) {
console.log('--$rocNative', this.$rocNative);
......@@ -396,8 +429,8 @@ export default {
// https://uri.amap.com/navigation
switch (item.value) {
case 1:
// navigation?from=116.478346,39.997361,startpoint&to=116.3246,39.966577,endpoint&via=116.402796,39.936915,midwaypoint&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0
// https://lbs.amap.com/api/uri-api/guide/mobile-web/point api地址
// navigation?from=116.478346,39.997361,startpoint&to=116.3246,39.966577,endpoint&via=116.402796,39.936915,midwaypoint&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0
// https://lbs.amap.com/api/uri-api/guide/mobile-web/point api地址
url = `https://uri.amap.com/navigation?from=${geolocation.lng},${geolocation.lat},${geolocation.addr}&to=${longitude},${latitude},${hospitalName}&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`;
break;
case 2:
......@@ -407,7 +440,22 @@ export default {
break;
case 3:
// https://lbsyun.baidu.com/index.php?title=uri/api/web
url = 'http://api.map.baidu.com/direction?origin=latlng:' + geolocation.lat + ',' + geolocation.lng + '|name:' + geolocation.addr + '&destination=latlng:' + latitude + ',' + longitude + '|name:' + hospitalName + '&region=' + geolocation.city + '&mode=driving&output=html&src=webapp.baidu.openAPIdemo&coord_type=gcj02';
url =
'http://api.map.baidu.com/direction?origin=latlng:' +
geolocation.lat +
',' +
geolocation.lng +
'|name:' +
geolocation.addr +
'&destination=latlng:' +
latitude +
',' +
longitude +
'|name:' +
hospitalName +
'&region=' +
geolocation.city +
'&mode=driving&output=html&src=webapp.baidu.openAPIdemo&coord_type=gcj02';
break;
default:
url = `https://uri.amap.com/navigation?from=${geolocation.lng},${geolocation.lat},${geolocation.addr}&to=${longitude},${latitude},${hospitalName}&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0`;
......@@ -417,26 +465,51 @@ export default {
console.log(item);
switch (item.value) {
case 1:
// https://lbs.amap.com/api/uri-api/guide/mobile-web/point api地址
url = 'https://uri.amap.com/marker?&name=' + hospitalName + '&position=' + longitude + ',' + latitude + '&callnative=1';
// https://lbs.amap.com/api/uri-api/guide/mobile-web/point api地址
url =
'https://uri.amap.com/marker?&name=' +
hospitalName +
'&position=' +
longitude +
',' +
latitude +
'&callnative=1';
break;
case 2:
// https://lbs.qq.com/webApi/uriV1/uriGuide/uriWebMarker api地址
url = 'https://apis.map.qq.com/uri/v1/geocoder?coord=' + latitude + ',' + longitude + '&referer=DJ6BZ-AU6E2-XMJUH-CZVD6-T2WQV-27F3S';
url =
'https://apis.map.qq.com/uri/v1/geocoder?coord=' +
latitude +
',' +
longitude +
'&referer=DJ6BZ-AU6E2-XMJUH-CZVD6-T2WQV-27F3S';
break;
case 3:
// https://lbsyun.baidu.com/index.php?title=uri/api/web api地址
url = 'http://api.map.baidu.com/marker?location=' + latitude + ',' + longitude + '&title=' + hospitalName + '&coord_type=gcj02&output=html&src=webapp.baidu.openAPIdemo';
url =
'http://api.map.baidu.com/marker?location=' +
latitude +
',' +
longitude +
'&title=' +
hospitalName +
'&coord_type=gcj02&output=html&src=webapp.baidu.openAPIdemo';
break;
default:
url = 'https://uri.amap.com/marker?&name=' + hospitalName + '&position=' + longitude + ',' + latitude + '&callnative=1';
url =
'https://uri.amap.com/marker?&name=' +
hospitalName +
'&position=' +
longitude +
',' +
latitude +
'&callnative=1';
break;
}
}
console.log('geolocation', url);
// window.open(url);
window.location.href = url;
},
bindingCode() {
const { pprotocolType, detectionServiceRecordId } = this.detailInfo;
......@@ -444,12 +517,12 @@ export default {
this.$sendBuriedData({
action: 'ACTION_WEB_CLICK',
component_tag: '7802855#0#0#去绑定',
web_data:{yunOrderNo: this.yunOrderNo},
web_data: { yunOrderNo: this.yunOrderNo },
});
if (window._miniprogram) {
const {detectionKind} = this.insuranceInfo;
const { detectionKind } = this.insuranceInfo;
this.$rocNative.WXInstance.miniProgram.navigateTo({
url:`/pages/health/binding-code/index?yunOrderNo=${this.yunOrderNo}&projectEquityNo=${this.projectEquityNo}&detectionRecordId=${detectionServiceRecordId}&pprotocolType=${pprotocolType}&channelSource=insurance_channel&detectionKind=${detectionKind}`
url: `/pages/health/binding-code/index?yunOrderNo=${this.yunOrderNo}&projectEquityNo=${this.projectEquityNo}&detectionRecordId=${detectionServiceRecordId}&pprotocolType=${pprotocolType}&channelSource=insurance_channel&detectionKind=${detectionKind}`,
});
} else {
this.$router.push({
......@@ -457,8 +530,8 @@ export default {
query: {
pprotocolType,
detectionRecordId: detectionServiceRecordId,
yunOrderNo:this.yunOrderNo
}
yunOrderNo: this.yunOrderNo,
},
});
}
},
......@@ -475,7 +548,6 @@ export default {
}
this.initMap();
this.showSsheet = true;
},
// 复制快递单号
copyNum() {
......@@ -492,7 +564,7 @@ export default {
console.log('已复制的内容:', copyText);
},
getDetectionName(yunOrderNo) {
getDetectionName(yunOrderNo).then(res => {
getDetectionName(yunOrderNo).then((res) => {
if (res.code === '000000' && res.data) {
const dectionData = res.data[0] || {};
this.$store.dispatch('home/setInsuranceInfo', dectionData);
......@@ -537,12 +609,12 @@ export default {
getDetailtxt() {
const o = {
yunOrderNo: this.yunOrderNo,
pageType: 1
pageType: 1,
};
getDetailtxt(o).then(res => {
getDetailtxt(o).then((res) => {
this.insuranceText = res.data;
});
}
},
},
};
</script>
......@@ -553,24 +625,23 @@ export default {
width: 100%;
box-sizing: border-box;
background: #f5f6f8;
background: linear-gradient(180deg, #00BDA5 0%, #20C5B0 125px, #F5F6F8 257px);
background: linear-gradient(180deg, #00bda5 0%, #20c5b0 125px, #f5f6f8 257px);
padding: 20px 12px 160px;
overflow: auto;
.detail-status{
.detail-status {
display: flex;
justify-content: center;
align-items: center;
font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
color: #ffffff;
line-height: 28px;
img{
img {
width: 24px;
height: 24px;
margin-right: 6px;
}
}
.detail-top {
......@@ -580,7 +651,7 @@ export default {
margin-bottom: 10px;
}
.detail-qrcode-content{
.detail-qrcode-content {
padding: 20px 0;
border-radius: 11px;
background: #fff;
......@@ -590,10 +661,10 @@ export default {
justify-content: center;
margin-bottom: 10px;
.cancel-code{
.cancel-code {
width: 165px;
height: 31px;
background: #F9FAFB;
background: #f9fafb;
border-radius: 15px;
font-size: 14px;
color: #666666;
......@@ -602,7 +673,7 @@ export default {
margin: 2px 0 4.5px 0;
}
.tips{
.tips {
width: 210px;
height: 50px;
font-size: 18px;
......@@ -614,7 +685,7 @@ export default {
}
.detail-top-info {
background: #F9FAFB;
background: #f9fafb;
border-radius: 11px;
padding-bottom: 10px;
.detail-top-img {
......@@ -625,7 +696,7 @@ export default {
height: 6px;
margin-bottom: 10px;
}
.detail-top-hospitalInfo{
.detail-top-hospitalInfo {
position: relative;
display: flex;
padding-left: 27px;
......@@ -636,7 +707,7 @@ export default {
line-height: 19px;
align-items: center;
img{
img {
position: absolute;
left: 12px;
top: 1px;
......@@ -674,7 +745,7 @@ export default {
position: relative;
padding: 15px 52px 6px 12px;
.detail-top-address-name {
height:21px;
height: 21px;
width: 257px;
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
......@@ -717,7 +788,7 @@ export default {
border-radius: 15px;
padding: 15px 15px 1px 15px;
margin-bottom: 10px;
.detail-bottom-title{
.detail-bottom-title {
height: 25px;
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
......@@ -769,7 +840,8 @@ export default {
color: #212121;
line-height: 21px;
margin-bottom: 18px;
background: url('https://files.yunqueyi.com/image/png/common/20230301094652399.png') no-repeat center center;
background: url('https://files.yunqueyi.com/image/png/common/20230301094652399.png')
no-repeat center center;
background-size: 213px 4px;
}
.tip-grey {
......@@ -782,16 +854,15 @@ export default {
line-height: 18px;
margin-bottom: 10px;
}
.tip-grey-dot{
.tip-grey-dot {
position: absolute;
width: 4px;
height: 4px;
background: #FF720C;
background: #ff720c;
opacity: 0.5;
border-radius: 50%;
left: 0;
top: 7px;
}
}
}
......@@ -821,90 +892,90 @@ export default {
right: 16px;
}
}
.insurance-detection{
background: #FFFFFF;
border-radius: 11px;
padding: 20px 15px;
margin-top: 22px;
.detection-title{
height: 18px;
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 18px;
text-align: center;
margin-bottom: 1px;
}
.detection-time{
height: 30px;
font-size: 21px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #212121;
line-height: 30px;
text-align: center;
margin-bottom: 15px ;
}
.mb5{
margin-bottom: 5px ;
}
}
.appoint-detail-tel{
margin-top: 25px;
font-size: 14px;
.insurance-detection {
background: #ffffff;
border-radius: 11px;
padding: 20px 15px;
margin-top: 22px;
.detection-title {
height: 18px;
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 22px;
line-height: 18px;
text-align: center;
.serve-time{
display: flex;
align-items: center;
justify-content: center;
height: 18px;
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 18px;
span{
width: 1px;
height: 12px;
margin: 0 12px;
background: #BBBBBB;
}
}
margin-bottom: 1px;
}
.detail-btn-bottom{
position: fixed;
background: #fff;
left: 0;
width: calc(100vw - 24px);
bottom: 0;
padding:5px 12px 5px 12px ;
.detection-time {
height: 30px;
font-size: 21px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #212121;
line-height: 30px;
text-align: center;
margin-bottom: 15px;
}
.mb5 {
margin-bottom: 5px;
}
}
.appoint-detail-tel {
margin-top: 25px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 22px;
text-align: center;
.serve-time {
display: flex;
padding-bottom: calc(5px + env(safe-area-inset-bottom) / 2);
.detail-btn-bottom-tips{
position: absolute;
padding: 6px 0;
left: 0;
top: -30px;
width: 100vw;
height: 18px;
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FF720C;
line-height: 18px;
background: #FFFBE7;
text-align: center;
}
.reAppoint{
width: 155px;
margin-right:11px ;
border: 1px solid #C0C0C0;
color: #212121;
align-items: center;
justify-content: center;
height: 18px;
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 18px;
span {
width: 1px;
height: 12px;
margin: 0 12px;
background: #bbbbbb;
}
}
}
.detail-btn-bottom {
position: fixed;
background: #fff;
left: 0;
width: calc(100vw - 24px);
bottom: 0;
padding: 5px 12px 5px 12px;
display: flex;
padding-bottom: calc(5px + env(safe-area-inset-bottom) / 2);
.detail-btn-bottom-tips {
position: absolute;
padding: 6px 0;
left: 0;
top: -30px;
width: 100vw;
height: 18px;
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ff720c;
line-height: 18px;
background: #fffbe7;
text-align: center;
}
.reAppoint {
width: 155px;
margin-right: 11px;
border: 1px solid #c0c0c0;
color: #212121;
}
}
</style>
......@@ -16,6 +16,8 @@
<van-datetime-picker
type="date"
title="选择年月日"
:value="currentDate"
:min-date="minDate"
:max-date="maxDate"
@confirm="handleConfirm"
@cancel="visible = false"
......@@ -37,6 +39,7 @@ export default {
return {
visible: false,
currentDate: new Date(),
minDate: new Date(1900, 0, 1),
maxDate: new Date(),
};
},
......@@ -56,6 +59,7 @@ export default {
</script>
<style scoped>
.pica-date-picker {
width: 100%;
.van-cell {
padding: 3px 0;
}
......
......@@ -58,6 +58,7 @@
:rules="rules"
/>
<van-field
v-if="dectionForm.idType != 1"
class="appoint-form-items"
required
label="参保人性别"
......@@ -178,14 +179,22 @@
<van-popup
v-model="showCardTypeVisible"
position="bottom"
:style="{ height: '230px' }"
:style="{ height: '280px' }"
>
<van-cell
v-for="(item, index) in cardTypes"
:key="index"
:title="item.value"
style="display: flex; align-items: center"
@click="handleChooseCardType(item)"
/>
>
<template #right-icon>
<van-icon
v-if="dectionForm.idType == item.no"
name="success"
/>
</template>
</van-cell>
</van-popup>
</div>
</template>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册