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

Feature/zjx

上级 431fe904
...@@ -19,7 +19,9 @@ const loading = { ...@@ -19,7 +19,9 @@ const loading = {
instance.show = true; instance.show = true;
}, },
hide: () => { hide: () => {
instance.show = false; setTimeout(() => {
instance.show = false;
}, 300);
}, },
}; };
}, },
......
...@@ -81,8 +81,6 @@ export default { ...@@ -81,8 +81,6 @@ export default {
console.log('locationAreaCode', this.provinceList, provinceIndex); console.log('locationAreaCode', this.provinceList, provinceIndex);
const data = [this.provinceList[provinceIndex], this.cityList[cityIndex], this.countyList[countyIndex]]; const data = [this.provinceList[provinceIndex], this.cityList[cityIndex], this.countyList[countyIndex]];
this.$emit('confirm', data); this.$emit('confirm', data);
}else{
this.initData();
} }
}, },
...@@ -103,10 +101,12 @@ export default { ...@@ -103,10 +101,12 @@ export default {
// 初始化 省市县信息 // 初始化 省市县信息
async initData() { async initData() {
this.provinceList = await this.getProvinceList(); this.provinceList = await this.getProvinceList();
console.log('this.provinceList1', this.provinceList);
this.cityList = await this.getCityList(this.provinceList[0].id); this.cityList = await this.getCityList(this.provinceList[0].id);
this.countyList = await this.getCountyList(this.cityList[0].id); this.countyList = await this.getCountyList(this.cityList[0].id);
this.columns = [{ values: this.provinceList }, { values: this.cityList }, { values: this.countyList }]; this.columns = [{ values: this.provinceList }, { values: this.cityList }, { values: this.countyList }];
const data = [this.provinceList[0], this.cityList[0], this.countyList[0]]; const data = [this.provinceList[0], this.cityList[0], this.countyList[0]];
console.log('initData', data);
this.$emit('confirm', data); this.$emit('confirm', data);
}, },
// 获取省列表 // 获取省列表
...@@ -129,8 +129,12 @@ export default { ...@@ -129,8 +129,12 @@ export default {
}, },
// 获取省列表下市区 // 获取省列表下市区
getCityList(provinceId) { getCityList(provinceId) {
console.log('this.provinceList', provinceId);
if (!provinceId) {
return;
}
return new Promise((resolve, rejects) => { return new Promise((resolve, rejects) => {
getCityList({ provinceId, projectEquityNo:this.projectEquityNo }).then(res => { getCityList({ provinceId:provinceId, projectEquityNo:this.projectEquityNo }).then(res => {
this.hideLoading(); this.hideLoading();
const data = res.data.cityList.map(ele => { const data = res.data.cityList.map(ele => {
return { return {
...@@ -146,6 +150,9 @@ export default { ...@@ -146,6 +150,9 @@ export default {
}, },
// 获取市区县区 // 获取市区县区
getCountyList(cityId) { getCountyList(cityId) {
if (!cityId) {
return;
}
return new Promise((resolve, rejects) => { return new Promise((resolve, rejects) => {
this.hideLoading(); this.hideLoading();
getCountyList({ cityId, projectEquityNo:this.projectEquityNo}).then(res => { getCountyList({ cityId, projectEquityNo:this.projectEquityNo}).then(res => {
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
v-model="loading" v-model="loading"
:finished="finished" :finished="finished"
finished-text="没有更多了" finished-text="没有更多了"
@load="onLoad"
> >
<van-cell <van-cell
v-for="(item,index) in list" v-for="(item,index) in list"
...@@ -103,7 +102,7 @@ export default { ...@@ -103,7 +102,7 @@ export default {
hospitalName: '', hospitalName: '',
list: [], list: [],
loading: false, loading: false,
finished: false, finished: true,
pageNum: 0, pageNum: 0,
pageSize: 50, pageSize: 50,
searchValue: '', searchValue: '',
...@@ -115,12 +114,20 @@ export default { ...@@ -115,12 +114,20 @@ export default {
console.log('externalData', nv); console.log('externalData', nv);
this.getHospitalList(false); this.getHospitalList(false);
}, },
deep:true deep: true,
immediate:true
},
projectEquityNo: {
handler(nv) {
console.log('projectEquityNo', nv);
this.getHospitalList(false);
},
deep: true,
immediate:true
} }
}, },
mounted() { mounted() {
this.getHospitalList(false);
}, },
methods: { methods: {
highLight(name, value) { highLight(name, value) {
...@@ -144,14 +151,9 @@ export default { ...@@ -144,14 +151,9 @@ export default {
console.log(data); console.log(data);
getHospitalList(data).then(res => { getHospitalList(data).then(res => {
console.log('getHospitalList', res); console.log('getHospitalList', res);
if (isLoad) {
this.list = [...this.list, ...res.data.data]; this.list = res.data.data;
} else { this.finished = true;
this.list = res.data.data;
}
if (res.data.data.length < this.pageSize) {
this.finished = true;
}
this.loading = false; this.loading = false;
const hospitalIdIndex = this.list.findIndex(ele => ele.hospitalId === this.hospitalId); const hospitalIdIndex = this.list.findIndex(ele => ele.hospitalId === this.hospitalId);
console.log('hospitalIdIndex', hospitalIdIndex); console.log('hospitalIdIndex', hospitalIdIndex);
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<div <div
v-show="currentItem.amTimeBegin !='' && currentItem.amTimeEnd !=''" v-show="currentItem.amTimeBegin !='' && currentItem.amTimeEnd !=''"
class="text" class="text"
:class="selectTimeBucket === 'am' ?'selected':''" :class="selectTimeBucket === currentItem.amTimeBegin ?'selected':''"
@click="selectTimeB('am')" @click="selectTimeB('am')"
> >
{{ currentItem.amTimeContent }} {{ currentItem.amTimeContent }}
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<div <div
v-if="currentItem.pmTimeBegin !='' && currentItem.pmTimeEnd!=''" v-if="currentItem.pmTimeBegin !='' && currentItem.pmTimeEnd!=''"
class="text" class="text"
:class="selectTimeBucket === 'pm' ?'selected':''" :class="selectTimeBucket === currentItem.pmTimeBegin ?'selected':''"
@click="selectTimeB('pm')" @click="selectTimeB('pm')"
> >
{{ currentItem.pmTimeContent }} {{ currentItem.pmTimeContent }}
...@@ -150,6 +150,7 @@ export default { ...@@ -150,6 +150,7 @@ export default {
console.log(item); console.log(item);
this.selectTimes = selectTimes; this.selectTimes = selectTimes;
this.currentItem = item; this.currentItem = item;
this.selectTimeBucket = '';
this.selectItem(); this.selectItem();
}, },
selectTimeB(item) { selectTimeB(item) {
......
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
及时接受检测结果检测报告 及时接受检测结果检测报告
</div> </div>
<div class="choose-section"> <div class="choose-section">
<van-form @submit="onSubmit"> <van-form
ref="dectionForm"
validate-first
@submit="onSubmit"
>
<van-field <van-field
name="checkboxGroup" name="checkboxGroup"
label="检测项目" label="检测项目"
...@@ -74,13 +78,11 @@ ...@@ -74,13 +78,11 @@
class="appoint-form-title" class="appoint-form-title"
/> />
<van-field <van-field
v-model="username"
class="appoint-form-items" class="appoint-form-items"
label="省市区" label="省市区"
disabled disabled
right-icon="arrow" right-icon="arrow"
placeholder="请选择省市区" placeholder="请选择省市区"
:rules="[{ required: true, message: '请选择省市区' }]"
@click="showAreaFn" @click="showAreaFn"
> >
<template #input> <template #input>
...@@ -129,6 +131,7 @@ ...@@ -129,6 +131,7 @@
label="预约时间" label="预约时间"
required required
right-icon="arrow" right-icon="arrow"
@click="showPopup('showSelectTime')" @click="showPopup('showSelectTime')"
> >
<template #input> <template #input>
...@@ -291,7 +294,7 @@ export default { ...@@ -291,7 +294,7 @@ export default {
}, },
mounted() { mounted() {
this.$loading.show();
const { yunOrderNo, projectEquityNo } = this.$route.query; const { yunOrderNo, projectEquityNo } = this.$route.query;
this.yunOrderNo = yunOrderNo; this.yunOrderNo = yunOrderNo;
this.projectEquityNo = projectEquityNo; this.projectEquityNo = projectEquityNo;
...@@ -311,6 +314,7 @@ export default { ...@@ -311,6 +314,7 @@ export default {
// 高德地图导航只有在线上环境才能使用 // 高德地图导航只有在线上环境才能使用
initMap() { initMap() {
const result = store.get('geolocation'); const result = store.get('geolocation');
console.log('geolocation', result);
this.position.latitude = result.lat || ''; this.position.latitude = result.lat || '';
this.position.longitude = result.lng || ''; this.position.longitude = result.lng || '';
const data = { const data = {
...@@ -323,7 +327,7 @@ export default { ...@@ -323,7 +327,7 @@ export default {
// 根据坐标获取最近的机构id // 根据坐标获取最近的机构id
getHospitalList(data) { getHospitalList(data) {
getHospitalList(data).then(res => { getHospitalList(data).then(res => {
console.log('getHospitalList', res); console.log('getHospitalListposition', this.position);
const {provinceId, countyId, cityId, hospitalName, hospitalId} = res.data.data[0]; const {provinceId, countyId, cityId, hospitalName, hospitalId} = res.data.data[0];
this.locationAreaCode = [provinceId, cityId, countyId]; this.locationAreaCode = [provinceId, cityId, countyId];
this.dectionForm.hospitalName = hospitalName; this.dectionForm.hospitalName = hospitalName;
...@@ -344,6 +348,8 @@ export default { ...@@ -344,6 +348,8 @@ export default {
this.dectionForm.detectName = dectionData.detectionName; this.dectionForm.detectName = dectionData.detectionName;
this.dectionForm.goodsId = dectionData.goodsId; this.dectionForm.goodsId = dectionData.goodsId;
this.$store.dispatch('home/setInsuranceInfo', dectionData); this.$store.dispatch('home/setInsuranceInfo', dectionData);
this.$loading.hide();
} }
}); });
}, },
...@@ -356,6 +362,7 @@ export default { ...@@ -356,6 +362,7 @@ export default {
this.dectionForm.beneficiaryIdNum = res.data.beneficiaryIdNum; 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); this.$store.dispatch('home/setOrderInfo', res.data);
this.$loading.hide();
}); });
}, },
...@@ -392,34 +399,42 @@ export default { ...@@ -392,34 +399,42 @@ export default {
cancelSearch() {}, cancelSearch() {},
selectAddress() {}, selectAddress() {},
appointment() { appointment() {
console.log(this.dectionForm); this.$loading.show();
const data = { this.$refs.dectionForm.validate().then(result => {
appointmentTime: this.dectionForm.appointmentTime, console.log('this.dectionForm', result);
goodsId: this.dectionForm.goodsId, const data = {
hospitalId: this.hospitalId, appointmentTime: this.dectionForm.appointmentTime,
hospitalName: this.dectionForm.hospitalName, goodsId: this.dectionForm.goodsId,
patientIdNo: this.dectionForm.beneficiaryIdNum, hospitalId: this.hospitalId,
patientMobile: this.dectionForm.beneficiaryPhone, hospitalName: this.dectionForm.hospitalName,
patientName: this.dectionForm.beneficiaryName, patientIdNo: this.dectionForm.beneficiaryIdNum,
yunOrderNo:this.yunOrderNo, patientMobile: this.dectionForm.beneficiaryPhone,
}; patientName: this.dectionForm.beneficiaryName,
appointment(data).then(res => { yunOrderNo:this.yunOrderNo,
if (res.code === '000000') { };
this.$router.push({ appointment(data).then(res => {
path: '/appoint-details', this.$loading.hide();
query: { if (res.code === '000000') {
yunOrderNo: this.yunOrderNo, this.$router.push({
projectEquityNo:this.projectEquityNo path: '/appoint-details',
} query: {
}); yunOrderNo: this.yunOrderNo,
} projectEquityNo:this.projectEquityNo
}
});
}
});
}).catch(err => {
this.$loading.hide();
console.log(err);
}); });
}, },
getDetailByUnionId() { }, getDetailByUnionId() { },
confirm(values) { confirm(values) {
console.log('confirm', values); console.log('confirm', values);
if (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.provinceId = values[0].id;
this.externalData.countyId = values[2].id; this.externalData.countyId = values[2].id;
......
...@@ -138,7 +138,6 @@ ...@@ -138,7 +138,6 @@
<script> <script>
import {getDetailByYunOrderNo} from '@/api/appoint'; import {getDetailByYunOrderNo} from '@/api/appoint';
import { mapActions, mapGetters } from 'vuex';
import store from 'storejs'; import store from 'storejs';
export default { export default {
data() { data() {
...@@ -182,15 +181,8 @@ export default { ...@@ -182,15 +181,8 @@ export default {
}, },
}; };
}, },
computed: {
...mapGetters(['hasAccount']),
},
mounted() { mounted() {
// setTimeout(() => { this.$loading.show();
// this.locationAreaCode = [330, 330400000000, 330424000000];
// }, 3000);
const { yunOrderNo, projectEquityNo} = this.$route.query; const { yunOrderNo, projectEquityNo} = this.$route.query;
this.yunOrderNo = yunOrderNo; this.yunOrderNo = yunOrderNo;
this.projectEquityNo = projectEquityNo; this.projectEquityNo = projectEquityNo;
...@@ -198,17 +190,15 @@ export default { ...@@ -198,17 +190,15 @@ export default {
this.getDetailByYunOrderNo(yunOrderNo); this.getDetailByYunOrderNo(yunOrderNo);
}, },
methods: { methods: {
...mapActions(['setDetectionData', 'setAccountStatus', 'setPatientData', 'setRecordID']),
getDetailByYunOrderNo(yunOrderNo) { getDetailByYunOrderNo(yunOrderNo) {
getDetailByYunOrderNo(yunOrderNo).then(res => { getDetailByYunOrderNo(yunOrderNo).then(res => {
console.log(res); console.log(res);
this.detailInfo = res.data; this.detailInfo = res.data;
this.$loading.hide();
}); });
}, },
checkDetail() {
},
reAppoint() { reAppoint() {
this.$router.push({ this.$router.push({
path: '/appoint', path: '/appoint',
......
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
this.query = this.$route.query; this.query = this.$route.query;
this.projectEquityNo = projectEquityNo; this.projectEquityNo = projectEquityNo;
this.externalOrderNo = externalOrderNo; this.externalOrderNo = externalOrderNo;
this.$loading.show();
// get geolocation // get geolocation
// var that = this; // var that = this;
// var geolocation = new qq.maps.Geolocation(); // var geolocation = new qq.maps.Geolocation();
...@@ -62,7 +63,6 @@ export default { ...@@ -62,7 +63,6 @@ export default {
methods: { methods: {
// 高德地图导航只有在线上环境才能使用 // 高德地图导航只有在线上环境才能使用
initMap() { initMap() {
this.getJumpPageStatus();
// latitude: 70 // latitude: 70
// longitude: 50.2 // longitude: 50.2
// const data = { // const data = {
...@@ -71,6 +71,7 @@ export default { ...@@ -71,6 +71,7 @@ export default {
// longitude: 50.2, // longitude: 50.2,
// }; // };
// that.getHospitalList(data); // that.getHospitalList(data);
var that = this;
AMapLoader.load({ AMapLoader.load({
key:'009dd02e4fe0a1b5f895cd7b86b9e216', // 申请好的Web端开发者Key,首次调用 load 时必填 key:'009dd02e4fe0a1b5f895cd7b86b9e216', // 申请好的Web端开发者Key,首次调用 load 时必填
plugins:[''], // 需要使用的的插件列表,如比例尺'AMap.Scale'等 plugins:[''], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
...@@ -91,8 +92,9 @@ export default { ...@@ -91,8 +92,9 @@ export default {
geolocation.getCurrentPosition((status, result) => { geolocation.getCurrentPosition((status, result) => {
console.log('geolocation,', status, result); console.log('geolocation,', status, result);
if (geolocation.result) { if (geolocation.result) {
storejs.set('geolocation', geolocation.result); storejs.set('geolocation', geolocation.result.position);
} }
that.getJumpPageStatus();
}); });
...@@ -110,6 +112,7 @@ export default { ...@@ -110,6 +112,7 @@ export default {
this.dectionForm.detectName = dectionData.detectionName; this.dectionForm.detectName = dectionData.detectionName;
this.dectionForm.goodsId = dectionData.goodsId; this.dectionForm.goodsId = dectionData.goodsId;
this.$store.dispatch('home/setInsuranceInfo', dectionData); this.$store.dispatch('home/setInsuranceInfo', dectionData);
this.$loading.hide();
} }
}); });
}, },
...@@ -127,6 +130,7 @@ export default { ...@@ -127,6 +130,7 @@ export default {
// https://dev-sc.yunqueyi.com/tis/insurance/create/order // https://dev-sc.yunqueyi.com/tis/insurance/create/order
this.createOrder(data); this.createOrder(data);
} }
this.$loading.hide();
} }
}); });
}, },
...@@ -164,6 +168,7 @@ export default { ...@@ -164,6 +168,7 @@ export default {
createOrder(data).then(res => { createOrder(data).then(res => {
if (res.code == '000000') { if (res.code == '000000') {
this.checkStatus(res); this.checkStatus(res);
this.$loading.hide();
} }
}); });
}, },
......
...@@ -64,37 +64,9 @@ export default { ...@@ -64,37 +64,9 @@ export default {
}; };
}, },
created() { created() {
console.log('123123');
}, },
methods: { 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> </script>
......
...@@ -93,12 +93,13 @@ export default { ...@@ -93,12 +93,13 @@ export default {
mounted() { mounted() {
const { query } = this.$route; const { query } = this.$route;
this.$loading.show();
this.query = query; this.query = query;
this.needDetect = !(query.needDetect == '1'); this.needDetect = !(query.needDetect == '1');
console.log('query', this.needDetect); console.log('query', this.needDetect);
this.getButtonStatus(query.yunOrderNo); this.getButtonStatus(query.yunOrderNo);
this.getDetectionName(query.yunOrderNo); this.getDetectionName(query.yunOrderNo);
this.$loading.hide();
}, },
methods: { methods: {
statusMap(status) { statusMap(status) {
...@@ -120,6 +121,7 @@ export default { ...@@ -120,6 +121,7 @@ export default {
console.log('dectionData.detectionName', dectionData.detectionName); console.log('dectionData.detectionName', dectionData.detectionName);
this.detectionName = dectionData.detectionName; this.detectionName = dectionData.detectionName;
this.$store.dispatch('home/setInsuranceInfo', dectionData); this.$store.dispatch('home/setInsuranceInfo', dectionData);
this.$loading.hide();
} }
}); });
}, },
...@@ -139,6 +141,7 @@ export default { ...@@ -139,6 +141,7 @@ export default {
console.log(res); console.log(res);
this.buttonStatus = res.data.buttonStatus; this.buttonStatus = res.data.buttonStatus;
this.buttonText = res.data.statusDesc; this.buttonText = res.data.statusDesc;
this.$loading.hide();
}); });
} }
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册