|
@@ -98,7 +98,8 @@ export default {
|
|
hospitalName:'',
|
|
hospitalName:'',
|
|
hospitalNum:'',
|
|
hospitalNum:'',
|
|
hospitalList:[],
|
|
hospitalList:[],
|
|
- hospitalShow:false
|
|
|
|
|
|
+ hospitalShow:false,
|
|
|
|
+ son:false//有无子医院
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
@@ -110,11 +111,16 @@ export default {
|
|
this.name = type == 101?'身份证号':type == 102?'病历号':type == 104?'市民卡号':''
|
|
this.name = type == 101?'身份证号':type == 102?'病历号':type == 104?'市民卡号':''
|
|
this.value = value
|
|
this.value = value
|
|
this.patName = name
|
|
this.patName = name
|
|
- this.hospitalNum=sonHospitalCode
|
|
|
|
- this.hospitalName=sonHospitalName
|
|
|
|
|
|
+ if(sonHospitalCode&&sonHospitalName){
|
|
|
|
+ this.hospitalNum=sonHospitalCode
|
|
|
|
+ this.hospitalName=sonHospitalName
|
|
|
|
+ this.son = true
|
|
|
|
+ }else{
|
|
|
|
+ this.son = false
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.getSysConfig(code)
|
|
this.getSysConfig(code)
|
|
- this.getHospitalList(code)
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
watch:{
|
|
watch:{
|
|
value:{
|
|
value:{
|
|
@@ -139,7 +145,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
beforeRouteLeave(to, from, next){
|
|
beforeRouteLeave(to, from, next){
|
|
- if(JSON.stringify(to.params) == '{}'){
|
|
|
|
|
|
+ if(JSON.stringify(to.params) == '{}'&&JSON.stringify(to.query) == '{}'){
|
|
return
|
|
return
|
|
}
|
|
}
|
|
next();
|
|
next();
|
|
@@ -154,8 +160,10 @@ export default {
|
|
let tmpLis = result.data.juniorHospital;
|
|
let tmpLis = result.data.juniorHospital;
|
|
tmpLis.unshift(tmpMain)
|
|
tmpLis.unshift(tmpMain)
|
|
this.hospitalList = tmpLis
|
|
this.hospitalList = tmpLis
|
|
- this.hospitalName = tmpLis[0].hospitalName //默认第一个
|
|
|
|
- this.hospitalNum = tmpLis[0].hospitalCode
|
|
|
|
|
|
+ if(!this.son){
|
|
|
|
+ this.hospitalName = tmpLis[0].hospitalName //默认第一个
|
|
|
|
+ this.hospitalNum = tmpLis[0].hospitalCode
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
// this.defaultWaring(res.data.msg);
|
|
// this.defaultWaring(res.data.msg);
|
|
}
|
|
}
|
|
@@ -171,6 +179,12 @@ export default {
|
|
for(let i = 0;i < datas.length;i++){
|
|
for(let i = 0;i < datas.length;i++){
|
|
if(datas[i].code == 'junior_show'){
|
|
if(datas[i].code == 'junior_show'){
|
|
this.hospitalShow = +datas[i].value==1?true:false
|
|
this.hospitalShow = +datas[i].value==1?true:false
|
|
|
|
+ if(datas[i].value==1){
|
|
|
|
+ this.hospitalShow = true
|
|
|
|
+ this.getHospitalList(code)
|
|
|
|
+ }else{
|
|
|
|
+ this.hospitalShow = false
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
@@ -292,10 +306,11 @@ export default {
|
|
let params = {
|
|
let params = {
|
|
hospitalCode: msg.hospitalCode,
|
|
hospitalCode: msg.hospitalCode,
|
|
hospitalDeptCode: msg.hospitalDeptCode,
|
|
hospitalDeptCode: msg.hospitalDeptCode,
|
|
- doctorCode: msg.doctorCode,
|
|
|
|
- patientCode: msg.patientCode,
|
|
|
|
- recordId: msg.recordId,
|
|
|
|
- time:(new Date((msg.recordTime).replace(/\-/g, "/"))).getTime()
|
|
|
|
|
|
+ doctorCode: msg.doctorCode||'',
|
|
|
|
+ patientCode: msg.patientCode||'',
|
|
|
|
+ recordId: msg.recordId||'',
|
|
|
|
+ sonHospitalCode:msg.sonHospitalCode||'',
|
|
|
|
+ time:msg.recordTime&&(new Date((msg.recordTime).replace(/\-/g, "/"))).getTime()||''
|
|
};
|
|
};
|
|
localStorage.setItem('loginParam',JSON.stringify(params))//保存登陆信息,扫码进入删除该参数
|
|
localStorage.setItem('loginParam',JSON.stringify(params))//保存登陆信息,扫码进入删除该参数
|
|
this.$router.push({
|
|
this.$router.push({
|
|
@@ -316,7 +331,8 @@ export default {
|
|
// }else{
|
|
// }else{
|
|
// this.defaultWaring(res.data.msg);
|
|
// this.defaultWaring(res.data.msg);
|
|
// }
|
|
// }
|
|
- this.defaultWaring(res.data.msg);
|
|
|
|
|
|
+ this.allow = true
|
|
|
|
+ this.defaultWaring(res.data.msg||"网络异常请稍后重试");
|
|
clearTimeout(timer)
|
|
clearTimeout(timer)
|
|
}
|
|
}
|
|
}).catch(() => {
|
|
}).catch(() => {
|