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