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

fix

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