|
|
@ -7,7 +7,8 @@ |
|
|
|
<div class="selectAllTable-wrap flex-between mt32"> |
|
|
|
<div class="left flex"> |
|
|
|
<div class="checkboxAll"> |
|
|
|
<el-checkbox @change="handleTotalCheckAllChange" v-model="allChecked" :indeterminate="isIndeterminate">全选</el-checkbox> |
|
|
|
<el-checkbox @change="handleTotalCheckAllChange" v-model="allChecked" |
|
|
|
:indeterminate="isIndeterminate">全选</el-checkbox> |
|
|
|
</div> |
|
|
|
<span class="totalCount">共{{ totalNum }}条,已选{{ selectNum }}条</span> |
|
|
|
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px', margin: '0 26px' }" |
|
|
@ -39,45 +40,44 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<GuipTable :tableData="item.list" style="width: 100%" :ref="(el) => setPopoverRef(index, el)" @selection-change="handleSelectionChange(index,$event)" |
|
|
|
:show-header="false" :loading="loading" > |
|
|
|
<GuipTable :tableData="item.departs" style="width: 100%" :ref="(el) => setPopoverRef(index, el)" |
|
|
|
@selection-change="handleSelectionChange(index, $event)" :show-header="false" |
|
|
|
:loading="loading"> |
|
|
|
<el-table-column type="selection" width="135"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="hos" label="出诊医院" min-width="295"> |
|
|
|
<el-table-column prop="depart_name" label="出诊医院" min-width="295"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="flex cell_render"> |
|
|
|
<span>{{ scope.row.hos[0] }}项</span> |
|
|
|
<span v-if="scope.row.hos.length">( 等{{ scope.row.hos.length }}个 )</span> |
|
|
|
<span>{{ scope.row.depart_name }}</span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="nums" label="项目个数" min-width="165"> |
|
|
|
<el-table-column prop="project_count" label="项目个数" min-width="135"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="flex cell_render"> |
|
|
|
<span>{{ scope.row.nums }}项</span> |
|
|
|
<span>{{ scope.row.project_count }}项</span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="group" label="组别" min-width="165"> |
|
|
|
<el-table-column prop="classify_count" label="组别" min-width="135"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="flex cell_render"> |
|
|
|
{{ scope.row.group }}分组 |
|
|
|
{{ scope.row.classify_count }}分组 |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="setMenu" label="套餐" min-width="165"> |
|
|
|
<el-table-column prop="classify_count" label="套餐" min-width="165"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="flex cell_render"> |
|
|
|
{{ scope.row.setMenu }}分组 |
|
|
|
{{ scope.row.classify_count }}分组 |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="time" label="时间" min-width="200"> </el-table-column> |
|
|
|
<el-table-column prop="create" label="时间" min-width="250"> </el-table-column> |
|
|
|
<el-table-column prop="stock" fixed="right" min-width="110"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<GuipSwitch :modelValue="scope.row.status" @change="onSwitchChange1(scope.row)"> |
|
|
|
</GuipSwitch> |
|
|
|
<GuipSwitch :modelValue="scope.row.status" active-value="1" inactive-value="0" @change="onSwitchChange1(scope.row)"></GuipSwitch> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" fixed="right" min-width="120px"> |
|
|
@ -106,6 +106,68 @@ import { mapState } from 'vuex'; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
list: { |
|
|
|
approver_phone: "18888888888", |
|
|
|
code: "en4b1v", |
|
|
|
create: "2025-05-19 16:20:58", |
|
|
|
desc: "擅长运用麦粒灸治疗疑难杂症,特别是恶性肿瘤的治疗,显著改善患者免疫状态。", |
|
|
|
detail: "北京中医药大学中医临床特聘专家,师从师怀堂和谢锡亮两大中医泰斗,从事针灸临床50余年,善治免疫系统及其它病症如:各种肿瘤癌症,血小板减少或增多,白细胞减少,经常性感冒、支气管哮喘、过敏性紫癜、妇女尿失禁、夜尿增多,痤疮,急慢性肠炎、痛风、颈椎管狭窄、颈肩腰腿痛、疲劳综合征、失眠,及小儿夜啼、厌食和发育不良等症。", |
|
|
|
first_visit_audit: "1", |
|
|
|
id: "1", |
|
|
|
idcard: "510322197808271433", |
|
|
|
label: "", |
|
|
|
name: "张小琪", |
|
|
|
phone: "18888888888", |
|
|
|
uid: "46", |
|
|
|
departs: { |
|
|
|
1: [ |
|
|
|
{ |
|
|
|
classify_count: 3, |
|
|
|
create: "2025-05-29 16:37:28", |
|
|
|
depart_id: "1", |
|
|
|
depart_name: "中医科", |
|
|
|
doctor_id: "1", |
|
|
|
hid: "1", |
|
|
|
hispital_name: "武丽娜中医针灸", |
|
|
|
id: "1", |
|
|
|
is_fixed: "1", |
|
|
|
project_count: 24, |
|
|
|
status: "1", |
|
|
|
type: "0" |
|
|
|
} |
|
|
|
], |
|
|
|
2: [ |
|
|
|
{ |
|
|
|
classify_count: 3, |
|
|
|
create: "2025-05-29 16:37:28", |
|
|
|
depart_id: "12", |
|
|
|
depart_name: "中医科", |
|
|
|
doctor_id: "1", |
|
|
|
hid: "1", |
|
|
|
hispital_name: "武丽娜中医针灸", |
|
|
|
id: "1", |
|
|
|
is_fixed: "1", |
|
|
|
project_count: 24, |
|
|
|
status: "1", |
|
|
|
type: "0" |
|
|
|
}, |
|
|
|
{ |
|
|
|
classify_count: 3, |
|
|
|
create: "2025-05-29 16:37:28", |
|
|
|
depart_id: "11", |
|
|
|
depart_name: "中医科", |
|
|
|
doctor_id: "1", |
|
|
|
hid: "1", |
|
|
|
hispital_name: "武丽娜中医针灸", |
|
|
|
id: "1", |
|
|
|
is_fixed: "1", |
|
|
|
project_count: 24, |
|
|
|
status: "1", |
|
|
|
type: "0" |
|
|
|
}, |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
tableSelections: [],//已选中数据 |
|
|
|
tableData: [ |
|
|
|
{ |
|
|
@ -216,7 +278,6 @@ export default { |
|
|
|
}, |
|
|
|
created() { |
|
|
|
store.commit('SET_PAGENAME', '医生管理'); // 登录页面不显示侧边栏 |
|
|
|
this.calculateTotalNum() |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
store.commit('SET_CUSTOMIZE', false); |
|
|
@ -233,12 +294,19 @@ export default { |
|
|
|
methods: { |
|
|
|
// 初始化请求 |
|
|
|
getInitData() { |
|
|
|
// this.$store.dispatch('showLoading') |
|
|
|
this.$http('POST', '/api/admin/doctor_depart_list', { |
|
|
|
}).then(response => { |
|
|
|
if (response.code == 0) { |
|
|
|
this.doctorList = response.data |
|
|
|
this.$store.dispatch('hideLoading') |
|
|
|
if (response.code == 0 && Object.values(response.data).length > 0) { |
|
|
|
const list = Object.values(response.data).map(item => { |
|
|
|
return { |
|
|
|
...item, |
|
|
|
checked:false, |
|
|
|
departs: item.departs ? Object.values(item.departs).flat() : [] |
|
|
|
} |
|
|
|
}) |
|
|
|
this.doctorList = list |
|
|
|
console.log(list,this.doctorList,'this.doctorList===='); |
|
|
|
this.calculateTotalNum() |
|
|
|
} |
|
|
|
|
|
|
|
}).catch(error => { |
|
|
@ -252,7 +320,7 @@ export default { |
|
|
|
// 计算总条数 |
|
|
|
calculateTotalNum() { |
|
|
|
this.totalNum = this.doctorList.reduce((total, doctor) => { |
|
|
|
return total + (doctor.list ? doctor.list.length : 0); |
|
|
|
return total + (doctor.departs ? doctor.departs.length : 0); |
|
|
|
}, 0); |
|
|
|
}, |
|
|
|
handleClick(row) { |
|
|
@ -328,9 +396,10 @@ export default { |
|
|
|
}, |
|
|
|
batchOperate(type) { |
|
|
|
// this.tableSelections |
|
|
|
console.log(this.tableSelections,'this.tableSelections----'); |
|
|
|
if (type == '1') { |
|
|
|
// 禁用 |
|
|
|
this.getInitData() |
|
|
|
// this.getInitData() |
|
|
|
|
|
|
|
} else { |
|
|
|
// 启用 |
|
|
@ -396,8 +465,9 @@ export default { |
|
|
|
}, |
|
|
|
// 单个表格的选择变化 |
|
|
|
handleSelectionChange(index, selection) { |
|
|
|
console.log(index,selection,'====='); |
|
|
|
// 更新当前表格的选中状态 |
|
|
|
this.doctorList[index].checked = selection.length === this.doctorList[index].list.length; |
|
|
|
this.doctorList[index].checked = selection.length === this.doctorList[index].departs.length; |
|
|
|
this.tableSelections[index] = selection; |
|
|
|
|
|
|
|
// 更新全局状态 |
|
|
@ -515,6 +585,7 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-form-item { |
|
|
|
margin-bottom: 0 !important; |
|
|
|
} |
|
|
|