fix: 录入数据测试问题修复。
This commit is contained in:
@@ -184,8 +184,36 @@ function dictStr(val, arr) {
|
||||
return str
|
||||
}
|
||||
function getData() {
|
||||
// 就医类型
|
||||
getDicts('doctor_type').then(res => {
|
||||
|
||||
// 药品来源
|
||||
|
||||
if(form.value.id!=null){
|
||||
getDoctorRecord(form.value.id).then(res => {
|
||||
listPerson(queryPersonParams.value).then((response) => {
|
||||
personList.value = [response.rows]
|
||||
if(response.rows.length>0){
|
||||
form.value.personName= response.rows[0].name
|
||||
form.value.personId = response.rows[0].id
|
||||
queryHealthRecordParams.value.personId=res.data.personId
|
||||
listHealthRecord(queryHealthRecordParams.value).then((response) => {
|
||||
healthRecordList.value = [response.rows]
|
||||
if(response.rows.length>0){
|
||||
form.value.healthRecordName= response.rows[0].name
|
||||
form.value.healthRecordId = response.rows[0].id
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
form.value = res.data
|
||||
// 就医类型
|
||||
getDicts('doctor_type').then(result => {
|
||||
form.value.typeName=dictStr(form.value.type, result.data)
|
||||
})
|
||||
})
|
||||
|
||||
}else{
|
||||
// 就医类型
|
||||
getDicts('doctor_type').then(res => {
|
||||
typeList.value =[res.data]
|
||||
})
|
||||
listPerson(queryPersonParams.value).then((response) => {
|
||||
@@ -203,16 +231,7 @@ function getData() {
|
||||
})
|
||||
}
|
||||
})
|
||||
// 药品来源
|
||||
|
||||
if(form.value.id!=null){
|
||||
getDoctorRecord(form.value.id).then(res => {
|
||||
form.value = res.data
|
||||
})
|
||||
// 就医类型
|
||||
getDicts('doctor_type').then(result => {
|
||||
form.value.typeName=dictStr(form.value.type, result.data)
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user