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

Merge branch 'feature/zjx' into 'develop'

Feature/zjx

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