diff --git a/src/assets/site/dropdown_chose_ic.svg b/src/assets/site/dropdown_chose_ic.svg new file mode 100644 index 0000000..e3faa11 --- /dev/null +++ b/src/assets/site/dropdown_chose_ic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/HosInformation.vue b/src/views/HosInformation.vue index 3b369c5..b804137 100644 --- a/src/views/HosInformation.vue +++ b/src/views/HosInformation.vue @@ -9,23 +9,36 @@
-
- +
- - + + + +
+ + + +
+ 方便患者记忆,非必填 { + if(response.code == 0) { + this.hospitalRestaurants = response.data + }else{ + this.$message.error(response.msg); + } + }).catch(error => { + console.error(error, 'error') + }) + + var restaurants = this.restaurants; + var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants; + + clearTimeout(this.timeout); + this.timeout = setTimeout(() => { + cb(results); + }, 3000 * Math.random()); + }, + hosipitalFilter(keyword, options) { + if (!keyword) return options + return options.filter(item => { + // 自定义筛选逻辑 + return item.label.includes(keyword) || item.value.includes(keyword) + }) + }, random() { var randomNumber = Math.random(); return randomNumber }, provinceChange(e) { - console.log(e[0]) - }, - cityChange(e) { - console.log(e[0]) + this.options_city = [] + this.form.city = '' + this.getAreaData(e) }, - getAreaData(province = '') { - if (province != '') this.options_city = false + async getAreaData(province = '') { + if (province != '') this.options_city = [] this.$http('POST', '/api/admin/get_areas_data', { province: province, }).then(response => { @@ -550,6 +609,7 @@ export default { 'afternoon_worktime':response.data.afternoon_worktime.split('-') } + this.getAreaData(this.form.province) }).catch(error => { console.error(error, 'error') })