修复医院
This commit is contained in:
parent
36f8bbd652
commit
b96c4f55b7
@ -189,9 +189,9 @@
|
|||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item field="hospital.hospital_name" label="医院名称:">
|
<a-form-item field="hospital.hospital_name" label="医院名称:">
|
||||||
<a-space direction="vertical" size="large">
|
<a-space direction="vertical" size="large">
|
||||||
<a-select :options="hospitalData" allow-search placeholder="请选择所在医院" v-model="modalForm.hospital.hospital_name" :loading="loading" @search="handleHospitalList" >
|
<a-select allow-search placeholder="请选择所在医院" v-model="modalForm.hospital.hospital_name" :loading="loading" @change="changeHospital" @search="handleHospitalList" >
|
||||||
<!-- <a-option v-for="item in hospitalData" :key="item.hospital_id" :value="item.hospital_id"
|
<a-option v-for="item in hospitalData" :key="item.hospital_id" :value="item.hospital_id"
|
||||||
:label="item.hospital_name"></a-option> -->
|
:label="item.hospital_name"></a-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-space>
|
</a-space>
|
||||||
<!-- <a-input v-model="modalForm.hospital.hospital_name" placeholder="请输入医院名称" /> -->
|
<!-- <a-input v-model="modalForm.hospital.hospital_name" placeholder="请输入医院名称" /> -->
|
||||||
@ -1052,6 +1052,9 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const hospitalData = ref([]);
|
const hospitalData = ref([]);
|
||||||
|
const changeHospital=(value)=>{
|
||||||
|
modalForm.hospital_id=value;
|
||||||
|
}
|
||||||
//获取医院列表
|
//获取医院列表
|
||||||
const handleHospitalList = (value) => {
|
const handleHospitalList = (value) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
@ -1060,11 +1063,8 @@
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
const { data, code, message } = res;
|
const { data, code, message } = res;
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
let name =data.map((item)=>{
|
|
||||||
return item.hospital_name
|
hospitalData.value =data;
|
||||||
})
|
|
||||||
console.log(name)
|
|
||||||
hospitalData.value =reactive(name);
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
} else {
|
} else {
|
||||||
proxy.$notification.error(message);
|
proxy.$notification.error(message);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user