|
@ -30,13 +30,18 @@ |
|
|
|
|
|
|
|
|
<div class="mb24" style="margin-top:-24px;"> |
|
|
<div class="mb24" style="margin-top:-24px;"> |
|
|
<el-autocomplete |
|
|
<el-autocomplete |
|
|
v-model="state" |
|
|
v-model="hospitalSearchState" |
|
|
:fetch-suggestions="queryHospital" |
|
|
:fetch-suggestions="queryHospital" |
|
|
placeholder="请输入医院名称或地址" |
|
|
placeholder="请输入医院名称或地址" |
|
|
@select="handleSelect" |
|
|
ref="hospitalAutocomplete" |
|
|
></el-autocomplete> |
|
|
@select="hospitalHandleSelect"> |
|
|
|
|
|
<template #append> |
|
|
<!-- <GuipSelectFilter v-model="hospitalName" :options="hosipitalList" :searchable="true" placeholder="请选择" :filter-method="hosipitalFilter" search-placeholder="搜索..." /> --> |
|
|
<el-button |
|
|
|
|
|
icon="el-icon-search" |
|
|
|
|
|
@click="handleSearch" |
|
|
|
|
|
style="padding: 12px;"></el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-autocomplete> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<GuipFormItem column="column" class="mb24" label="医院简称"> |
|
|
<GuipFormItem column="column" class="mb24" label="医院简称"> |
|
@ -100,7 +105,7 @@ |
|
|
</GuipFormItem> |
|
|
</GuipFormItem> |
|
|
</div> |
|
|
</div> |
|
|
<div class="flex-line"></div> |
|
|
<div class="flex-line"></div> |
|
|
<div class="flex-right"> |
|
|
<div class="flex-right" v-if="form.worktimes"> |
|
|
<GuipFormItem column="column" label="每周出诊安排" :required="true"> |
|
|
<GuipFormItem column="column" label="每周出诊安排" :required="true"> |
|
|
<div class="flex weekPlan" slot="formDom"> |
|
|
<div class="flex weekPlan" slot="formDom"> |
|
|
<GuipSelect v-for="day in weekDays" :key="day.id" v-model="form.worktimes[day.id].plan" |
|
|
<GuipSelect v-for="day in weekDays" :key="day.id" v-model="form.worktimes[day.id].plan" |
|
@ -164,7 +169,7 @@ |
|
|
<el-checkbox @change="handleSelectAllChange" v-model="selectAll" |
|
|
<el-checkbox @change="handleSelectAllChange" v-model="selectAll" |
|
|
:indeterminate="isIndeterminate">全选</el-checkbox> |
|
|
:indeterminate="isIndeterminate">全选</el-checkbox> |
|
|
</div> |
|
|
</div> |
|
|
<span class="totalCount">共{{ projectList.length }}条,已选{{ selectedCount }}条</span> |
|
|
<span class="totalCount">共{{ projectList.length }}条,已选8{{ selectedCount }}条</span> |
|
|
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px', margin: '0 26px' }" |
|
|
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px', margin: '0 26px' }" |
|
|
@click="batchOperate(0,'project')">批量禁用</GuipButton> |
|
|
@click="batchOperate(0,'project')">批量禁用</GuipButton> |
|
|
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px' }" |
|
|
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px' }" |
|
@ -309,7 +314,7 @@ 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 GuipSelectFilter from '@/components/GuipSelectFilter.vue'; |
|
|
|
|
|
|
|
|
import { mapState } from 'vuex'; |
|
|
import { mapState } from 'vuex'; |
|
|
import { Object } from 'core-js'; |
|
|
import { Object } from 'core-js'; |
|
@ -330,7 +335,7 @@ export default { |
|
|
GuipSelect, |
|
|
GuipSelect, |
|
|
GuipTextarea, |
|
|
GuipTextarea, |
|
|
GroupFormBtns, |
|
|
GroupFormBtns, |
|
|
GuipSelectFilter, |
|
|
// GuipSelectFilter, |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -361,7 +366,8 @@ export default { |
|
|
|
|
|
|
|
|
hospitalRestaurants: [], |
|
|
hospitalRestaurants: [], |
|
|
hospitalSearchState: '', |
|
|
hospitalSearchState: '', |
|
|
hospitalSearchTimeout: null, |
|
|
hospitalSearchFlag: false, |
|
|
|
|
|
hospitalSearchTimeout: false, |
|
|
|
|
|
|
|
|
projectList: [ |
|
|
projectList: [ |
|
|
{ |
|
|
{ |
|
@ -474,19 +480,19 @@ export default { |
|
|
province: '', |
|
|
province: '', |
|
|
city: '', |
|
|
city: '', |
|
|
depart_name: '', |
|
|
depart_name: '', |
|
|
address:"万柏林区 晋祠路一段56号凯旋门小区2幢4005", |
|
|
address:"", |
|
|
afternoon_worktime:"14:00-22:00", |
|
|
afternoon_worktime:"", |
|
|
depart_id:"1", |
|
|
depart_id:"1", |
|
|
h_name:"武丽娜中医针灸", |
|
|
h_name:"", |
|
|
h_pos:"37.850249,112.53111", |
|
|
h_pos:"", |
|
|
hid:"1", |
|
|
hid:"0", |
|
|
is_fixed:'1', |
|
|
is_fixed:'0', |
|
|
morning_worktime:"8:00-11:00", |
|
|
morning_worktime:"", |
|
|
notice:"周六上午门诊最后一轮扎针到10点50分,11点后到患者的,只开药,不扎针。\r\n初诊患者请先将挂号条交给医助、在门外静坐等待叫号\r\n为了节约大家排号时间,请全部挂号,按挂号顺序治疗\r\n针灸治疗单缴费完毕后请交还医助\r\n药费缴费完毕后交方给药房等待拿药(可办理快递)\r\n请准备一次性医用床单(可现场购买)和户外保温毯(推荐),户外保温毯购买链接:<a href=\"https://m.tb.cn/h.UJglv3C?tk=5KMnd9XFr3D\" target=\"_blank\">https://m.tb.cn/h.UJglv3C?tk=5KMnd9XFr3D</a>", |
|
|
notice:"", |
|
|
time_unit:"15", |
|
|
time_unit:"0", |
|
|
time_unit_num:"10", |
|
|
time_unit_num:"0", |
|
|
treat_expire:"365", |
|
|
treat_expire:"0", |
|
|
visit_day:"7" |
|
|
visit_day:"0" |
|
|
}, |
|
|
}, |
|
|
siteFormrules: { |
|
|
siteFormrules: { |
|
|
depart_name: [ |
|
|
depart_name: [ |
|
@ -545,35 +551,52 @@ export default { |
|
|
...mapState(['hosMenuData']) // 从Vuex映射showSidebar状态到组件的计算属性中 |
|
|
...mapState(['hosMenuData']) // 从Vuex映射showSidebar状态到组件的计算属性中 |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
handleSearch() { |
|
|
|
|
|
if(this.hospitalSearchFlag) return |
|
|
|
|
|
this.hospitalSearchFlag = true |
|
|
|
|
|
this.$refs.hospitalAutocomplete.$refs.suggestions.loading = true |
|
|
|
|
|
this.queryHospital(this.hospitalSearchState, (results) => { |
|
|
|
|
|
console.log(results) |
|
|
|
|
|
|
|
|
|
|
|
this.$refs.hospitalAutocomplete.$refs.suggestions.loading = false |
|
|
|
|
|
this.$refs.hospitalAutocomplete.hideLoading = true |
|
|
|
|
|
this.$refs.hospitalAutocomplete.$refs.suggestions.suggestions = results |
|
|
|
|
|
console.log(this.hospitalSearchState) |
|
|
|
|
|
this.$refs.hospitalAutocomplete.getData(this.hospitalSearchState) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
hospitalHandleSelect(item) { |
|
|
|
|
|
console.log(item); |
|
|
|
|
|
}, |
|
|
queryHospital(queryString, cb) { |
|
|
queryHospital(queryString, cb) { |
|
|
|
|
|
if(!this.hospitalSearchFlag) return; |
|
|
|
|
|
this.hospitalSearchTimeout = setTimeout(function(){ |
|
|
|
|
|
this.hospitalSearchFlag = false |
|
|
|
|
|
}.bind(this), 5000); |
|
|
|
|
|
|
|
|
this.$http('POST', '/api/admin/search_hoispital', { |
|
|
this.$http('POST', '/api/admin/search_hoispital', { |
|
|
keyword: queryString, |
|
|
keyword: queryString, |
|
|
province: this.form.province, |
|
|
province: this.form.province, |
|
|
city: this.form.city, |
|
|
city: this.form.city, |
|
|
}).then(response => { |
|
|
}).then(response => { |
|
|
if(response.code == 0) { |
|
|
this.hospitalSearchFlag = false |
|
|
this.hospitalRestaurants = response.data |
|
|
clearTimeout(this.hospitalSearchTimeout) |
|
|
}else{ |
|
|
if(response.code !== 0) { |
|
|
|
|
|
cb([]); |
|
|
this.$message.error(response.msg); |
|
|
this.$message.error(response.msg); |
|
|
|
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.hospitalRestaurants = Object.values(response.data) |
|
|
|
|
|
var restaurants = this.hospitalRestaurants; |
|
|
|
|
|
var results = queryString ? restaurants : []; |
|
|
|
|
|
cb(results); |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
|
|
|
this.hospitalSearchFlag = false |
|
|
|
|
|
clearTimeout(this.hospitalSearchTimeout) |
|
|
|
|
|
cb([]); |
|
|
console.error(error, '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(); |
|
@ -623,7 +646,7 @@ export default { |
|
|
if(response.code == 0){ |
|
|
if(response.code == 0){ |
|
|
this.loading1 = false |
|
|
this.loading1 = false |
|
|
this.$nextTick(()=>{ |
|
|
this.$nextTick(()=>{ |
|
|
this.courseList = response.data.list; |
|
|
this.courseList = response.data.list ? response.data.list : []; |
|
|
this.tableKey1 = Date.now(); // 强制重新渲染表格 |
|
|
this.tableKey1 = Date.now(); // 强制重新渲染表格 |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -987,6 +1010,7 @@ export default { |
|
|
console.log(data, '---'); |
|
|
console.log(data, '---'); |
|
|
}, |
|
|
}, |
|
|
updateHosInfo(props){ |
|
|
updateHosInfo(props){ |
|
|
|
|
|
console.log(props) |
|
|
this.$http('POST', '/api/admin/set_hospital_depart', { |
|
|
this.$http('POST', '/api/admin/set_hospital_depart', { |
|
|
...props |
|
|
...props |
|
|
}).then(response => { |
|
|
}).then(response => { |
|
@ -998,9 +1022,8 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
submitForm(form) { |
|
|
submitForm(form) { |
|
|
console.log(this.$refs[form], '-----'); |
|
|
|
|
|
this.$refs[form].validate((valid) => { |
|
|
this.$refs[form].validate((valid) => { |
|
|
console.log(this[form], '======formxinxi'); |
|
|
console.log(this[form], '======formxinxi8', '=============='+form); |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
alert('提交成功!'); |
|
|
alert('提交成功!'); |
|
|
let props = {} |
|
|
let props = {} |
|
|