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

fix

上级 a9d1a3f9
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</div> </div>
<div class="select-hospital-list"> <div class="select-hospital-list">
<van-list <van-list
v-if="list.length >0" v-if="list && list.length >0"
v-model="loading" v-model="loading"
:finished="finished" :finished="finished"
finished-text="没有更多了" finished-text="没有更多了"
......
...@@ -144,9 +144,9 @@ ...@@ -144,9 +144,9 @@
round round
block block
type="info" type="info"
:disabled="!checkValue" :disabled="!canSubmit"
class="appoint-form-submit " class="appoint-form-submit "
:class="checkValue ? 'appoint-form-submit-active':''" :class="canSubmit ? 'appoint-form-submit-active':''"
@click="appointment" @click="appointment"
> >
提交 提交
...@@ -239,14 +239,31 @@ export default { ...@@ -239,14 +239,31 @@ export default {
}; };
}, },
computed: { computed: {
checkValue() { canSubmit() {
return true; // 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,
return (
this.dectionForm.appointmentTime &&
this.dectionForm.goodsId &&
this.dectionForm.hospitalName &&
this.hospitalId &&
this.dectionForm.beneficiaryIdNum &&
this.dectionForm.beneficiaryName &&
this.dectionForm.beneficiaryPhone &&
this.yunOrderNo
);
}, },
}, },
mounted() { mounted() {
setTimeout(() => {
this.locationAreaCode = [120, 120100000000, 120102000000];
}, 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;
...@@ -261,6 +278,14 @@ export default { ...@@ -261,6 +278,14 @@ export default {
// 高德地图导航只有在线上环境才能使用 // 高德地图导航只有在线上环境才能使用
initMap() { initMap() {
var that = this; var that = this;
// latitude: 70
// longitude: 50.2
const data = {
projectEquityNo: that.projectEquityNo,
latitude: 70,
longitude: 50.2,
};
that.getHospitalList(data);
AMapLoader.load({ AMapLoader.load({
key:'d22c1f112c97cb93b8d343b18420b98d', // 申请好的Web端开发者Key,首次调用 load 时必填 key:'d22c1f112c97cb93b8d343b18420b98d', // 申请好的Web端开发者Key,首次调用 load 时必填
version:'2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 version:'2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
...@@ -293,11 +318,16 @@ export default { ...@@ -293,11 +318,16 @@ export default {
}); });
}); });
}, },
// 根据坐标获取最近的机构id // 根据坐标获取最近的机构id
getHospitalList(data) { getHospitalList(data) {
getHospitalList(data).then(res => { getHospitalList(data).then(res => {
console.log(res); console.log('getHospitalList', res);
const {provinceId, countyId, cityId, hospitalName, hospitalId} = res.data.data[0];
this.locationAreaCode = [provinceId, cityId, countyId];
this.dectionForm.hospitalName = hospitalName;
this.hospitalId = hospitalId;
}); });
}, },
// 目前是配置一个检测信息,可能会拓展,所以返回的是一个list // 目前是配置一个检测信息,可能会拓展,所以返回的是一个list
...@@ -361,8 +391,8 @@ export default { ...@@ -361,8 +391,8 @@ export default {
const data = { const data = {
appointmentTime: this.dectionForm.appointmentTime, appointmentTime: this.dectionForm.appointmentTime,
goodsId: this.dectionForm.goodsId, goodsId: this.dectionForm.goodsId,
hospitalId: '12746', hospitalId: this.hospitalId,
hospitalName: '1111', hospitalName: this.dectionForm.hospitalName,
patientIdNo: this.dectionForm.beneficiaryIdNum, patientIdNo: this.dectionForm.beneficiaryIdNum,
patientMobile: this.dectionForm.beneficiaryPhone, patientMobile: this.dectionForm.beneficiaryPhone,
patientName: this.dectionForm.beneficiaryName, patientName: this.dectionForm.beneficiaryName,
......
...@@ -64,8 +64,8 @@ export default { ...@@ -64,8 +64,8 @@ export default {
result: {}, result: {},
detailInfo: {}, detailInfo: {},
isLoading: true, isLoading: true,
projectEquityNo: 'CX202302091000154321', projectEquityNo: '',
orderNo: '12746', orderNo: '',
yunOrderNo:'', yunOrderNo:'',
// 无问卷-0001 有问卷未填写-0101 已填写问卷未出结果-0102 已出结果无需领用-0401 已出结果未预约-0201 已预约未采样-0301 已预约已采样-0302 // 无问卷-0001 有问卷未填写-0101 已填写问卷未出结果-0102 已出结果无需领用-0401 已出结果未预约-0201 已预约未采样-0301 已预约已采样-0302
routerMap: { routerMap: {
...@@ -101,6 +101,7 @@ export default { ...@@ -101,6 +101,7 @@ export default {
}; };
return m[status]; return m[status];
}, },
// 获取跳转状态
getJumpPageStatus() { getJumpPageStatus() {
getJumpPageStatus(this.orderNo, this.projectEquityNo).then(res => { getJumpPageStatus(this.orderNo, this.projectEquityNo).then(res => {
// console.log('res', getJumpPageStatus); // console.log('res', getJumpPageStatus);
...@@ -108,10 +109,13 @@ export default { ...@@ -108,10 +109,13 @@ export default {
this.yunOrderNo = res.data.yunOrderNo; this.yunOrderNo = res.data.yunOrderNo;
this.query.yunOrderNo = res.data.yunOrderNo; this.query.yunOrderNo = res.data.yunOrderNo;
this.status = res.data.status; this.status = res.data.status;
this.needDetect = this.status === '0401';
this.getButtonStatus(res.data.yunOrderNo); this.getButtonStatus(res.data.yunOrderNo);
} }
}); });
}, },
// 去预约
toAppoint() { toAppoint() {
if (this.buttonStatus) { if (this.buttonStatus) {
const {projectEquityNo, orderNo, yunOrderNo} = this; const {projectEquityNo, orderNo, yunOrderNo} = this;
...@@ -121,6 +125,7 @@ export default { ...@@ -121,6 +125,7 @@ export default {
}); });
} }
}, },
// 获取按钮状态
getButtonStatus(yunOrderNo) { getButtonStatus(yunOrderNo) {
getButtonStatus(yunOrderNo).then(res => { getButtonStatus(yunOrderNo).then(res => {
console.log(res); console.log(res);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册