|
@ -9,23 +9,36 @@ |
|
|
<GuipFormItem column="column" class="mb24" label="出诊医院省市" :required="true"> |
|
|
<GuipFormItem column="column" class="mb24" label="出诊医院省市" :required="true"> |
|
|
<div class="flex-between" slot="formDom"> |
|
|
<div class="flex-between" slot="formDom"> |
|
|
<div class="short-width"> |
|
|
<div class="short-width"> |
|
|
<GuipSelect width="100%" v-model="form.province" multiple :options="options_province" |
|
|
<GuipSelect width="100%" v-model="form.province" :options="options_province" |
|
|
placeholder="选择省份" @change="provinceChange"> |
|
|
placeholder="选择省份" @change="provinceChange"> |
|
|
</GuipSelect> |
|
|
</GuipSelect> |
|
|
</div> |
|
|
</div> |
|
|
<div class="short-width"> |
|
|
<div class="short-width"> |
|
|
<GuipSelect width="100%" v-model="form.city" multiple :options="options_city" |
|
|
<GuipSelect width="100%" v-model="form.city" :options="options_city" |
|
|
placeholder="选择城市" @change="cityChange"> |
|
|
placeholder="选择城市"> |
|
|
</GuipSelect> |
|
|
</GuipSelect> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</GuipFormItem> |
|
|
</GuipFormItem> |
|
|
<GuipFormItem column="column" class="mb24" label="出诊医院名称" :required="true"> |
|
|
<GuipFormItem column="column" class="mb24" label="出诊医院名称" :required="true" style="margin-bottom: 0px;"> |
|
|
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.company_name" |
|
|
<!-- <GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.company_name" |
|
|
prop="company_name" placeholder="请输入"> |
|
|
prop="company_name" placeholder="请输入"> |
|
|
<img src="@/assets/input_search_ic.svg" slot="suffix" @click="handleClear" /> |
|
|
<img src="@/assets/input_search_ic.svg" slot="suffix" @click="handleClear" /> |
|
|
</GuipInput> |
|
|
</GuipInput> --> |
|
|
|
|
|
<!-- <GuipSelectFilter :options="hosipitalList"></GuipSelectFilter> --> |
|
|
</GuipFormItem> |
|
|
</GuipFormItem> |
|
|
|
|
|
|
|
|
|
|
|
<div class="mb24" style="margin-top:-24px;"> |
|
|
|
|
|
<el-autocomplete |
|
|
|
|
|
v-model="state" |
|
|
|
|
|
:fetch-suggestions="queryHospital" |
|
|
|
|
|
placeholder="请输入医院名称或地址" |
|
|
|
|
|
@select="handleSelect" |
|
|
|
|
|
></el-autocomplete> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <GuipSelectFilter v-model="hospitalName" :options="hosipitalList" :searchable="true" placeholder="请选择" :filter-method="hosipitalFilter" search-placeholder="搜索..." /> --> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<GuipFormItem column="column" class="mb24" label="医院简称"> |
|
|
<GuipFormItem column="column" class="mb24" label="医院简称"> |
|
|
<span slot="formRight" class="desc">方便患者记忆,非必填</span> |
|
|
<span slot="formRight" class="desc">方便患者记忆,非必填</span> |
|
|
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.h_name" |
|
|
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.h_name" |
|
@ -296,6 +309,8 @@ import GuipSelect from '@/components/GuipSelect.vue'; |
|
|
import GuipSwitch from '@/components/GuipSwitch.vue'; |
|
|
import GuipSwitch from '@/components/GuipSwitch.vue'; |
|
|
import GuipTable from '@/components/GuipTable.vue'; |
|
|
import GuipTable from '@/components/GuipTable.vue'; |
|
|
import GuipDialog from '@/components/GuipDialog.vue'; |
|
|
import GuipDialog from '@/components/GuipDialog.vue'; |
|
|
|
|
|
import GuipSelectFilter from '@/components/GuipSelectFilter.vue'; |
|
|
|
|
|
|
|
|
import { mapState } from 'vuex'; |
|
|
import { mapState } from 'vuex'; |
|
|
import { Object } from 'core-js'; |
|
|
import { Object } from 'core-js'; |
|
|
|
|
|
|
|
@ -315,6 +330,7 @@ export default { |
|
|
GuipSelect, |
|
|
GuipSelect, |
|
|
GuipTextarea, |
|
|
GuipTextarea, |
|
|
GroupFormBtns, |
|
|
GroupFormBtns, |
|
|
|
|
|
GuipSelectFilter, |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -322,6 +338,7 @@ export default { |
|
|
dialogType: '1', |
|
|
dialogType: '1', |
|
|
tableKey:Date.now(), |
|
|
tableKey:Date.now(), |
|
|
tableKey1:Date.now(), |
|
|
tableKey1:Date.now(), |
|
|
|
|
|
hospitalName:'', |
|
|
dialogVisible: false, |
|
|
dialogVisible: false, |
|
|
dialogVisible1: false, |
|
|
dialogVisible1: false, |
|
|
form1: { |
|
|
form1: { |
|
@ -341,6 +358,11 @@ export default { |
|
|
isIndeterminate1: false, |
|
|
isIndeterminate1: false, |
|
|
projectSearchId: 'all', |
|
|
projectSearchId: 'all', |
|
|
projectSearchName: '', |
|
|
projectSearchName: '', |
|
|
|
|
|
|
|
|
|
|
|
hospitalRestaurants: [], |
|
|
|
|
|
hospitalSearchState: '', |
|
|
|
|
|
hospitalSearchTimeout: null, |
|
|
|
|
|
|
|
|
projectList: [ |
|
|
projectList: [ |
|
|
{ |
|
|
{ |
|
|
name: '针灸', |
|
|
name: '针灸', |
|
@ -397,8 +419,8 @@ export default { |
|
|
{ required: true, message: '请输入', trigger: 'blur' } |
|
|
{ required: true, message: '请输入', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
}, |
|
|
}, |
|
|
options_province: false, |
|
|
options_province: [], |
|
|
options_city:false, |
|
|
options_city:[], |
|
|
weekPlan: { |
|
|
weekPlan: { |
|
|
'周一': '', |
|
|
'周一': '', |
|
|
'周二': '', |
|
|
'周二': '', |
|
@ -488,25 +510,33 @@ export default { |
|
|
{ required: true, message: '请输入站点简称', trigger: 'blur' } |
|
|
{ required: true, message: '请输入站点简称', trigger: 'blur' } |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// hosipitalList:[] |
|
|
|
|
|
|
|
|
|
|
|
hosipitalList: [ |
|
|
|
|
|
{ label: '选项1', value: '1' }, |
|
|
|
|
|
{ label: '选项2', value: '2' }, |
|
|
|
|
|
{ label: '选项3', value: '3' }, |
|
|
|
|
|
// 更多选项... |
|
|
|
|
|
], |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created(){ |
|
|
created(){ |
|
|
store.commit('SET_CUSTOMIZE', true); |
|
|
store.commit('SET_CUSTOMIZE', true); |
|
|
store.commit('SET_SLIDER_MENU','hosMenuData'); |
|
|
store.commit('SET_SLIDER_MENU','hosMenuData'); |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
async mounted() { |
|
|
const { depart_id, doctor_id } = this.$route.query; // 获取 doctorId 参数 |
|
|
const { depart_id, doctor_id } = this.$route.query; // 获取 doctorId 参数 |
|
|
if (doctor_id && depart_id) { |
|
|
if (doctor_id && depart_id) { |
|
|
// 请求医生信息 |
|
|
// 请求医生信息 |
|
|
this.depart_id = depart_id; |
|
|
this.depart_id = depart_id; |
|
|
this.doctor_id = doctor_id; |
|
|
this.doctor_id = doctor_id; |
|
|
|
|
|
await this.getAreaData() |
|
|
this.fetchDoctorData() |
|
|
this.fetchDoctorData() |
|
|
this.fetchPackData() |
|
|
this.fetchPackData() |
|
|
this.fetchProjectData() |
|
|
this.fetchProjectData() |
|
|
this.geHosAdress() |
|
|
this.geHosAdress() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.getAreaData() |
|
|
|
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
selectedCount() { |
|
|
selectedCount() { |
|
@ -515,18 +545,47 @@ export default { |
|
|
...mapState(['hosMenuData']) // 从Vuex映射showSidebar状态到组件的计算属性中 |
|
|
...mapState(['hosMenuData']) // 从Vuex映射showSidebar状态到组件的计算属性中 |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
queryHospital(queryString, cb) { |
|
|
|
|
|
this.$http('POST', '/api/admin/search_hoispital', { |
|
|
|
|
|
keyword: queryString, |
|
|
|
|
|
province: this.form.province, |
|
|
|
|
|
city: this.form.city, |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
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() { |
|
|
random() { |
|
|
var randomNumber = Math.random(); |
|
|
var randomNumber = Math.random(); |
|
|
return randomNumber |
|
|
return randomNumber |
|
|
}, |
|
|
}, |
|
|
provinceChange(e) { |
|
|
provinceChange(e) { |
|
|
console.log(e[0]) |
|
|
this.options_city = [] |
|
|
}, |
|
|
this.form.city = '' |
|
|
cityChange(e) { |
|
|
this.getAreaData(e) |
|
|
console.log(e[0]) |
|
|
|
|
|
}, |
|
|
}, |
|
|
getAreaData(province = '') { |
|
|
async getAreaData(province = '') { |
|
|
if (province != '') this.options_city = false |
|
|
if (province != '') this.options_city = [] |
|
|
this.$http('POST', '/api/admin/get_areas_data', { |
|
|
this.$http('POST', '/api/admin/get_areas_data', { |
|
|
province: province, |
|
|
province: province, |
|
|
}).then(response => { |
|
|
}).then(response => { |
|
@ -550,6 +609,7 @@ export default { |
|
|
'afternoon_worktime':response.data.afternoon_worktime.split('-') |
|
|
'afternoon_worktime':response.data.afternoon_worktime.split('-') |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.getAreaData(this.form.province) |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
console.error(error, 'error') |
|
|
console.error(error, 'error') |
|
|
}) |
|
|
}) |
|
|