|
@ -1,6 +1,5 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="min-width pagePadding " style="background: #F5F7FA;"> |
|
|
<div class="min-width pagePadding " style="background: #F5F7FA;"> |
|
|
<p class="pageTitle bold mb24">基础信息</p> |
|
|
|
|
|
<div class="doctor-list-wrap "> |
|
|
<div class="doctor-list-wrap "> |
|
|
<p class="pageTitle">医生列表</p> |
|
|
<p class="pageTitle">医生列表</p> |
|
|
<el-form> |
|
|
<el-form> |
|
@ -12,9 +11,9 @@ |
|
|
</div> |
|
|
</div> |
|
|
<span class="totalCount">共{{ totalNum }}条,已选{{ selectNum }}条</span> |
|
|
<span class="totalCount">共{{ totalNum }}条,已选{{ selectNum }}条</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('1')">批量禁用</GuipButton> |
|
|
@click="batchOperate('0')">批量禁用</GuipButton> |
|
|
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px' }" |
|
|
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px' }" |
|
|
@click="batchOperate('2')"> |
|
|
@click="batchOperate('1')"> |
|
|
批量启用</GuipButton> |
|
|
批量启用</GuipButton> |
|
|
</div> |
|
|
</div> |
|
|
<div class="right flex"> |
|
|
<div class="right flex"> |
|
@ -25,21 +24,22 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="tableList mt32" v-for="(item, index) in doctorList" :key="index"> |
|
|
<div class="tableList mt32" v-for="(item, index) in doctorList" :key="index"> |
|
|
|
|
|
|
|
|
<div class="top flex-between mb24"> |
|
|
<div class="top flex-between mb24"> |
|
|
<div class="left left1 flex"> |
|
|
<div class="left left1 flex"> |
|
|
<el-checkbox @change="handleCheckAllChange(index)" v-model="item.checked"></el-checkbox> |
|
|
<el-checkbox @change="handleCheckAllChange(index)" v-model="item.checked"></el-checkbox> |
|
|
<el-avatar :src="item.avatar"></el-avatar> |
|
|
<el-avatar :src="item.avator" v-if="item.avator"></el-avatar> |
|
|
<span class="name">{{ item.name }}</span> |
|
|
<span class="name">{{ item.name }}</span> |
|
|
<span>{{ item.phone }}</span> |
|
|
<span>{{ item.phone }}</span> |
|
|
<GuipSwitch :modelValue="Boolean(item.status)" @change="onSwitchChange(item, index)"> |
|
|
<GuipSwitch :modelValue="Boolean(Number(item.status))" @change="onSwitchChange(item, index)"> |
|
|
</GuipSwitch> |
|
|
</GuipSwitch> |
|
|
<GuipButton type="text" @click="editDoctor(item, index)">编辑</GuipButton> |
|
|
<GuipButton type="text" @click="editDoctor(item, index)">编辑</GuipButton> |
|
|
</div> |
|
|
</div> |
|
|
<div class="right"> |
|
|
<div class="right"> |
|
|
<GuipButton type="system" size="form" @click="addHospital(item)">添加医院</GuipButton> |
|
|
<GuipButton type="system" size="form" @click="addHospital(item)">添加医院</GuipButton> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<GuipTable :tableData="item.departs" style="width: 100%" :ref="(el) => setPopoverRef(index, el)" |
|
|
<GuipTable :tableData="item.departs" style="width: 100%" :ref="(el) => setPopoverRef(index, el)" |
|
|
@selection-change="handleSelectionChange(index, $event)" :show-header="false" |
|
|
@selection-change="handleSelectionChange(index, $event)" :show-header="false" |
|
|
:loading="loading"> |
|
|
:loading="loading"> |
|
@ -48,7 +48,7 @@ |
|
|
<el-table-column prop="depart_name" label="出诊医院" min-width="295"> |
|
|
<el-table-column prop="depart_name" label="出诊医院" min-width="295"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div class="flex cell_render"> |
|
|
<div class="flex cell_render"> |
|
|
<span>{{ scope.row.depart_name }}</span> |
|
|
<span>{{ scope.row.hispital_name }} {{ scope.row.depart_name }}</span> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
@ -70,7 +70,7 @@ |
|
|
<el-table-column prop="classify_count" label="套餐" min-width="165"> |
|
|
<el-table-column prop="classify_count" label="套餐" min-width="165"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div class="flex cell_render"> |
|
|
<div class="flex cell_render"> |
|
|
{{ scope.row.classify_count }}分组 |
|
|
{{ scope.row.package_count }}套餐 |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
@ -183,87 +183,7 @@ export default { |
|
|
selectNum: 0, |
|
|
selectNum: 0, |
|
|
doctorName: '', |
|
|
doctorName: '', |
|
|
isIndeterminate: false, |
|
|
isIndeterminate: false, |
|
|
doctorList: [ |
|
|
doctorList: false, |
|
|
{ |
|
|
|
|
|
id: 10, |
|
|
|
|
|
checked: false, |
|
|
|
|
|
name: '一二', |
|
|
|
|
|
idcard: '532524198711223615', |
|
|
|
|
|
desc: '就哈哈哈哈,嗷跳舞', |
|
|
|
|
|
detail: '拉开是金德拉克撒娇了大数据连接拉萨。。。', |
|
|
|
|
|
tag: '专业', |
|
|
|
|
|
phone: '17785748373', |
|
|
|
|
|
avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', |
|
|
|
|
|
status: 0, |
|
|
|
|
|
list: [ |
|
|
|
|
|
{ |
|
|
|
|
|
hos: [ |
|
|
|
|
|
'第三人民医院 针灸科', |
|
|
|
|
|
'第一人民医院 中医科', |
|
|
|
|
|
], |
|
|
|
|
|
time: '2054 - 10 - 03', |
|
|
|
|
|
status: true, |
|
|
|
|
|
group: '2', |
|
|
|
|
|
setMenu: '4', |
|
|
|
|
|
nums: '88', |
|
|
|
|
|
checked: false, |
|
|
|
|
|
}, |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 10, |
|
|
|
|
|
checked: false, |
|
|
|
|
|
name: '一二', |
|
|
|
|
|
idcard: '532524198711223615', |
|
|
|
|
|
desc: '就哈哈哈哈,嗷跳舞', |
|
|
|
|
|
detail: '拉开是金德拉克撒娇了大数据连接拉萨。。。', |
|
|
|
|
|
tag: '专业', |
|
|
|
|
|
phone: '17785748373', |
|
|
|
|
|
avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', |
|
|
|
|
|
status: 1, |
|
|
|
|
|
list: [ |
|
|
|
|
|
{ |
|
|
|
|
|
hos: [ |
|
|
|
|
|
'第三人民医院 针灸科', |
|
|
|
|
|
'第一人民医院 中医科', |
|
|
|
|
|
], |
|
|
|
|
|
time: '2054 - 10 - 03', |
|
|
|
|
|
status: true, |
|
|
|
|
|
group: '2', |
|
|
|
|
|
setMenu: '4', |
|
|
|
|
|
nums: '88', |
|
|
|
|
|
checked: false, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
hos: [ |
|
|
|
|
|
'第三人民医院 针灸科', |
|
|
|
|
|
'第一人民医院 中医科', |
|
|
|
|
|
], |
|
|
|
|
|
time: '2054 - 10 - 03', |
|
|
|
|
|
status: true, |
|
|
|
|
|
group: '2', |
|
|
|
|
|
setMenu: '4', |
|
|
|
|
|
nums: '88', |
|
|
|
|
|
checked: false, |
|
|
|
|
|
}, |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: 10, |
|
|
|
|
|
checked: false, |
|
|
|
|
|
name: '一二', |
|
|
|
|
|
idcard: '532524198711223615', |
|
|
|
|
|
desc: '就哈哈哈哈,嗷跳舞', |
|
|
|
|
|
detail: '拉开是金德拉克撒娇了大数据连接拉萨。。。', |
|
|
|
|
|
tag: '专业', |
|
|
|
|
|
phone: '17785748373', |
|
|
|
|
|
avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', |
|
|
|
|
|
status: 1, |
|
|
|
|
|
list: [ |
|
|
|
|
|
|
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
allChecked: false, |
|
|
allChecked: false, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -284,10 +204,6 @@ export default { |
|
|
store.commit('SET_SLIDER_MENU', 'menuData'); |
|
|
store.commit('SET_SLIDER_MENU', 'menuData'); |
|
|
this.getInitData() |
|
|
this.getInitData() |
|
|
}, |
|
|
}, |
|
|
render() { |
|
|
|
|
|
console.log("组件重新渲染"); |
|
|
|
|
|
return 'a'; |
|
|
|
|
|
}, |
|
|
|
|
|
computed: { |
|
|
computed: { |
|
|
...mapState(['menuData']) // 从Vuex映射showSidebar状态到组件的计算属性中 |
|
|
...mapState(['menuData']) // 从Vuex映射showSidebar状态到组件的计算属性中 |
|
|
}, |
|
|
}, |
|
@ -295,8 +211,9 @@ export default { |
|
|
// 初始化请求 |
|
|
// 初始化请求 |
|
|
getInitData() { |
|
|
getInitData() { |
|
|
this.$http('POST', '/api/admin/doctor_depart_list', { |
|
|
this.$http('POST', '/api/admin/doctor_depart_list', { |
|
|
|
|
|
name: this.doctorName |
|
|
}).then(response => { |
|
|
}).then(response => { |
|
|
if (response.code == 0 && Object.values(response.data).length > 0) { |
|
|
if (response.code == 0) { |
|
|
const list = Object.values(response.data).map(item => { |
|
|
const list = Object.values(response.data).map(item => { |
|
|
return { |
|
|
return { |
|
|
...item, |
|
|
...item, |
|
@ -305,10 +222,8 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
this.doctorList = list |
|
|
this.doctorList = list |
|
|
console.log(list,this.doctorList,'this.doctorList===='); |
|
|
|
|
|
this.calculateTotalNum() |
|
|
this.calculateTotalNum() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
console.error(error, 'error') |
|
|
console.error(error, 'error') |
|
|
}) |
|
|
}) |
|
@ -394,40 +309,75 @@ export default { |
|
|
}, |
|
|
}, |
|
|
onSwitchChange1(row) { |
|
|
onSwitchChange1(row) { |
|
|
console.log(row, '------flag'); |
|
|
console.log(row, '------flag'); |
|
|
row.status = !row.status; |
|
|
row.status = row.status == 0 ? 1 : 0; |
|
|
|
|
|
this.$http('POST', '/api/admin/depart_mutil_option', { |
|
|
|
|
|
depart_index_ids:row.id, |
|
|
|
|
|
status:row.status |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
if (response.code == 0) { |
|
|
|
|
|
this.$message.success(response.msg); |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.error(response.msg); |
|
|
|
|
|
} |
|
|
|
|
|
this.getInitData() |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error(error, 'error') |
|
|
|
|
|
this.$message.error('操作失败'); |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.$set(this.doctorList, row) |
|
|
this.$set(this.doctorList, row) |
|
|
}, |
|
|
}, |
|
|
batchOperate(type) { |
|
|
batchOperate(status) { |
|
|
// this.tableSelections |
|
|
|
|
|
console.log(this.tableSelections,'this.tableSelections----'); |
|
|
console.log(this.tableSelections,'this.tableSelections----'); |
|
|
if (type == '1') { |
|
|
if(!this.tableSelections || this.tableSelections.length <= 0) { |
|
|
// 禁用 |
|
|
this.$message.error('未选择要'+(status == '0' ? '禁用':'启用')+'的科室') |
|
|
// this.getInitData() |
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} else { |
|
|
var tableSelections = this.tableSelections.flat() |
|
|
// 启用 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var depart_index_ids = ''; |
|
|
|
|
|
for(var i=0; i< tableSelections.length;i++) { |
|
|
|
|
|
if(!depart_index_ids) { |
|
|
|
|
|
depart_index_ids = tableSelections[i].id |
|
|
|
|
|
continue; |
|
|
} |
|
|
} |
|
|
|
|
|
depart_index_ids += ','+tableSelections[i].id |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.$http('POST', '/api/admin/depart_mutil_option', { |
|
|
|
|
|
depart_index_ids:depart_index_ids, |
|
|
|
|
|
status:status |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
if (response.code == 0) { |
|
|
|
|
|
this.$message.success(response.msg); |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.error(response.msg); |
|
|
|
|
|
} |
|
|
|
|
|
location.reload() |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error(error, 'error') |
|
|
|
|
|
this.$message.error('操作失败'); |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
onSwitchChange(item, index) { |
|
|
onSwitchChange(item, index) { |
|
|
item.status = item.status == 0 ? 1 : 0; |
|
|
item.status = item.status == 0 ? 1 : 0; |
|
|
console.log(index, item, '===='); |
|
|
console.log(index, item, '===='); |
|
|
this.$set(this.doctorList, item) |
|
|
this.$set(this.doctorList, item) |
|
|
// let depart_ids = '' |
|
|
|
|
|
|
|
|
this.$http('POST', '/api/admin/set_doctor_status', { |
|
|
// 更新医生启用状态 |
|
|
doctor_id:item.id, |
|
|
// this.$http('POST', '/api/admin/depart_mutil_option', { |
|
|
status:item.status |
|
|
// doctor_id:item.id, |
|
|
}).then(response => { |
|
|
// depart_ids:'', |
|
|
if (response.code == 0) { |
|
|
// status:'' |
|
|
this.$message.success(response.msg); |
|
|
// }).then(response => { |
|
|
}else{ |
|
|
// if (response.code == 0) { |
|
|
this.$message.error(response.msg); |
|
|
// this.doctorList = response.data |
|
|
} |
|
|
// } |
|
|
}).catch(error => { |
|
|
|
|
|
console.error(error, 'error') |
|
|
// }).catch(error => { |
|
|
this.$message.error('操作失败'); |
|
|
// console.error(error, 'error') |
|
|
}) |
|
|
// }) |
|
|
|
|
|
}, |
|
|
}, |
|
|
addDoctor() { |
|
|
addDoctor() { |
|
|
this.$router.push({ |
|
|
this.$router.push({ |
|
|