|
@ -47,13 +47,13 @@ |
|
|
</div> |
|
|
</div> |
|
|
</GuipFormItem> |
|
|
</GuipFormItem> |
|
|
<GuipFormItem column="column" class="mb24" label="使用功能"> |
|
|
<GuipFormItem column="column" class="mb24" label="使用功能"> |
|
|
<el-checkbox-group slot="formDom" v-model="form.type" @change="validateSelection" class="checkboxGroup"> |
|
|
<!-- <el-checkbox-group slot="formDom" v-model="form.type" @change="validateSelection" class="checkboxGroup"> |
|
|
<div class="flex"> |
|
|
<div class="flex"> |
|
|
<el-checkbox :label="2" >医生名片(基础功能不可取消)</el-checkbox> |
|
|
<el-checkbox :label="2" >医生名片(基础功能不可取消)</el-checkbox> |
|
|
<el-checkbox :label="0">患者预约</el-checkbox> |
|
|
<el-checkbox :label="0">患者预约</el-checkbox> |
|
|
</div> |
|
|
</div> |
|
|
<el-checkbox :label="1">项目计数</el-checkbox> |
|
|
<el-checkbox :label="1">项目计数</el-checkbox> |
|
|
</el-checkbox-group> |
|
|
</el-checkbox-group> --> |
|
|
</GuipFormItem> |
|
|
</GuipFormItem> |
|
|
<GuipFormItem column="column" class="" label="就诊提醒"> |
|
|
<GuipFormItem column="column" class="" label="就诊提醒"> |
|
|
<div slot="formRight" class="desc">就诊前的注意事项,非必填</div> |
|
|
<div slot="formRight" class="desc">就诊前的注意事项,非必填</div> |
|
@ -90,9 +90,9 @@ |
|
|
<div class="flex-right"> |
|
|
<div class="flex-right"> |
|
|
<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" |
|
|
:options="options_weekPlan" @change="weekChange()" :label="day.name" placeholder="休息"> |
|
|
:options="options_weekPlan" @change="weekChange()" :label="day.name" placeholder="休息"> |
|
|
</GuipSelect> --> |
|
|
</GuipSelect> |
|
|
</div> |
|
|
</div> |
|
|
</GuipFormItem> |
|
|
</GuipFormItem> |
|
|
</div> |
|
|
</div> |
|
@ -141,8 +141,8 @@ |
|
|
<div class=" mb32 flex-between"> |
|
|
<div class=" mb32 flex-between"> |
|
|
<span class="littleTitle">项目列表</span> |
|
|
<span class="littleTitle">项目列表</span> |
|
|
<div class="flex-between" style="gap:10px"> |
|
|
<div class="flex-between" style="gap:10px"> |
|
|
<GuipButton size="table" type="ignore">新增分组</GuipButton> |
|
|
<GuipButton size="table" type="ignore" @click="addNewGroup">新增分组</GuipButton> |
|
|
<GuipButton size="table" type="primary">新增项目</GuipButton> |
|
|
<GuipButton size="table" type="primary" @click="addNewProject">新增项目</GuipButton> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="selectAllTable-wrap flex-between mt32"> |
|
|
<div class="selectAllTable-wrap flex-between mt32"> |
|
@ -153,16 +153,17 @@ |
|
|
</div> |
|
|
</div> |
|
|
<span class="totalCount">共{{ projectList.length }}条,已选{{ selectedCount }}条</span> |
|
|
<span class="totalCount">共{{ projectList.length }}条,已选{{ 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('1','project')">批量禁用</GuipButton> |
|
|
@click="batchOperate(0,'project')">批量禁用</GuipButton> |
|
|
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px' }" |
|
|
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px' }" |
|
|
@click="batchOperate('2','project')"> |
|
|
@click="batchOperate(1,'project')"> |
|
|
批量启用</GuipButton> |
|
|
批量启用</GuipButton> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<div class="flex-between mb32 mt32"> |
|
|
<div class="flex-between mb32 mt32"> |
|
|
<div class="tabProject scroll-container"> |
|
|
<div class="tabProject scroll-container" v-if="Object.values(projectTagData).length > 0"> |
|
|
<div class="overTab scroll-list"> |
|
|
<div class="overTab scroll-list"> |
|
|
|
|
|
<div :class="['tab-item point', projectSearchId == 'all'? 'active' : '']" @click="selectTag('all')">全部分类</div> |
|
|
<div :class="['tab-item point', projectSearchId == item.id ? 'active' : '']" @click="selectTag(item)" |
|
|
<div :class="['tab-item point', projectSearchId == item.id ? 'active' : '']" @click="selectTag(item)" |
|
|
v-for="item in projectTagData" :key="item.name">{{ item.name }}</div> |
|
|
v-for="item in projectTagData" :key="item.name">{{ item.name }}</div> |
|
|
</div> |
|
|
</div> |
|
@ -175,16 +176,26 @@ |
|
|
</GuipInput> |
|
|
</GuipInput> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<GuipTable :tableData="projectList" style="width: 100%" ref="multipleTable" |
|
|
<GuipTable :tableData="projectList" :key="tableKey" style="width: 100%" ref="multipleTable" |
|
|
@selection-change="handleSelectionChange" :loading="loading"> |
|
|
@selection-change="handleSelectionChange" :loading="loading" max-height="600px"> |
|
|
<el-table-column type="selection" label="选择" width="80"></el-table-column> |
|
|
<el-table-column type="selection" label="选择" width="80"></el-table-column> |
|
|
<el-table-column prop="name" label="项目名称" min-width="225"></el-table-column> |
|
|
<el-table-column prop="name" label="项目名称" min-width="185"></el-table-column> |
|
|
<el-table-column prop="price" label="项目价格" min-width="125"></el-table-column> |
|
|
<el-table-column prop="price" label="项目价格" min-width="155"> |
|
|
<el-table-column prop="group" label="分组" min-width="125"></el-table-column> |
|
|
<template slot-scope="scope"> |
|
|
<el-table-column prop="time" label="添加时间" min-width="225"></el-table-column> |
|
|
<GuipInput width="90%" v-model="scope.row.price" @change="changePrice(scope.row)" /> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="classify_id" label="分组" min-width="155"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<GuipSelect width="90%" v-model="scope.row.classify_id" |
|
|
|
|
|
@change="changeClassify(scope.row)" prop="classify_id" :options="projectTagData" |
|
|
|
|
|
valueKey="id" labelKey="name" /> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="create_time" label="添加时间" min-width="225"></el-table-column> |
|
|
<el-table-column prop="status" label="状态" min-width="125"> |
|
|
<el-table-column prop="status" label="状态" min-width="125"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<GuipSwitch :modelValue="scope.row.status" @change="onSwitchChange1(scope.row)"> |
|
|
<GuipSwitch :modelValue="scope.row.status" active-value="1" inactive-value="0" @change="onSwitchChange1(scope.row)"> |
|
|
</GuipSwitch> |
|
|
</GuipSwitch> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
@ -218,30 +229,34 @@ |
|
|
</div> |
|
|
</div> |
|
|
<span class="totalCount">共{{ courseList.length }}条,已选{{ selectedCount }}条</span> |
|
|
<span class="totalCount">共{{ courseList.length }}条,已选{{ 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('1','group')">批量禁用</GuipButton> |
|
|
@click="batchOperate(0,'group')">批量禁用</GuipButton> |
|
|
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px' }" |
|
|
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px' }" |
|
|
@click="batchOperate('2','group')"> |
|
|
@click="batchOperate(1,'group')"> |
|
|
批量启用</GuipButton> |
|
|
批量启用</GuipButton> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<GuipTable :tableData="courseList" style="width: 100%" ref="multipleTable1" |
|
|
<GuipTable :tableData="courseList" style="width: 100%" ref="multipleTable1" max-height="600px" |
|
|
@selection-change="handleSelectionChange1" :loading="loading1"> |
|
|
@selection-change="handleSelectionChange1" :loading="loading1" :key="tableKey1" > |
|
|
<el-table-column type="selection" label="选择" width="80"></el-table-column> |
|
|
<el-table-column type="selection" label="选择" width="80"></el-table-column> |
|
|
<el-table-column prop="name" label="项目名称" min-width="225"></el-table-column> |
|
|
<el-table-column prop="name" label="套餐名称" min-width="225"></el-table-column> |
|
|
<el-table-column prop="price" label="项目价格" min-width="125"></el-table-column> |
|
|
<el-table-column prop="price" label="套餐价格" min-width="125"></el-table-column> |
|
|
<el-table-column prop="group" label="分组" min-width="125"></el-table-column> |
|
|
<el-table-column prop="group" label="套餐内容" min-width="125"> |
|
|
<el-table-column prop="time" label="添加时间" min-width="225"></el-table-column> |
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ scope.row.project_classify_num }}项,共{{ scope.row.project_num_count }}次 |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="create_time" label="添加时间" min-width="225"></el-table-column> |
|
|
<el-table-column prop="status" label="状态" min-width="125"> |
|
|
<el-table-column prop="status" label="状态" min-width="125"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<GuipSwitch :modelValue="scope.row.status" @change="onSwitchChange2(scope.row)"> |
|
|
<GuipSwitch :modelValue="scope.row.status" active-value="1" inactive-value="0" @change="onSwitchChange2(scope.row)"> |
|
|
</GuipSwitch> |
|
|
</GuipSwitch> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="操作" fixed="right" min-width="100px"> |
|
|
<el-table-column label="操作" fixed="right" min-width="100px"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div class="flex"> |
|
|
<div class="flex"> |
|
|
<el-button type="text" @click="handleClick(scope.row)">编辑</el-button> |
|
|
<el-button type="text" @click="handleClick1(scope.row)">编辑</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
@ -253,7 +268,7 @@ |
|
|
</el-form> |
|
|
</el-form> |
|
|
</div> |
|
|
</div> |
|
|
<GuipDialog :dialogVisible="dialogVisible" :title="dialogTitle" :show-close-button="true" width="762" |
|
|
<GuipDialog :dialogVisible="dialogVisible" :title="dialogTitle" :show-close-button="true" width="762" |
|
|
type="center" :show-cancel-button="true" @confirm="handleConfirm" @cancel="handleCancel" |
|
|
:show-cancel-button="true" @confirm="handleConfirm" @cancel="handleCancel" |
|
|
@close="handleClose" @dialogVisibleChange="dialogVisibleChange"> |
|
|
@close="handleClose" @dialogVisibleChange="dialogVisibleChange"> |
|
|
<BatchProject v-if="dialogType == '1'" :projectTagData="projectTagData" @getproTag="getProTagData" /> |
|
|
<BatchProject v-if="dialogType == '1'" :projectTagData="projectTagData" @getproTag="getProTagData" /> |
|
|
</GuipDialog> |
|
|
</GuipDialog> |
|
@ -282,6 +297,7 @@ 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 { mapState } from 'vuex'; |
|
|
import { mapState } from 'vuex'; |
|
|
|
|
|
import { Object } from 'core-js'; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
// 站点设置 |
|
|
// 站点设置 |
|
@ -304,6 +320,8 @@ export default { |
|
|
return { |
|
|
return { |
|
|
doctorId: '', |
|
|
doctorId: '', |
|
|
dialogType: '1', |
|
|
dialogType: '1', |
|
|
|
|
|
tableKey:Date.now(), |
|
|
|
|
|
tableKey1:Date.now(), |
|
|
dialogVisible: false, |
|
|
dialogVisible: false, |
|
|
dialogVisible1: false, |
|
|
dialogVisible1: false, |
|
|
form1: { |
|
|
form1: { |
|
@ -321,7 +339,7 @@ export default { |
|
|
selectedRows1: [],//已选中数据 |
|
|
selectedRows1: [],//已选中数据 |
|
|
isIndeterminate: false, |
|
|
isIndeterminate: false, |
|
|
isIndeterminate1: false, |
|
|
isIndeterminate1: false, |
|
|
projectSearchId: '', |
|
|
projectSearchId: 'all', |
|
|
projectSearchName: '', |
|
|
projectSearchName: '', |
|
|
projectList: [ |
|
|
projectList: [ |
|
|
{ |
|
|
{ |
|
@ -354,65 +372,9 @@ export default { |
|
|
name: '全部分类', |
|
|
name: '全部分类', |
|
|
id: '0' |
|
|
id: '0' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
name: '针灸1', |
|
|
|
|
|
id: '1' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '针灸2', |
|
|
|
|
|
id: '11' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '针灸3', |
|
|
|
|
|
id: '12' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '针灸4', |
|
|
|
|
|
id: '13' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '针灸12', |
|
|
|
|
|
id: '21' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '针灸22', |
|
|
|
|
|
id: '211' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '针灸32', |
|
|
|
|
|
id: '212' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '针灸42', |
|
|
|
|
|
id: '213' |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
courseList: [ |
|
|
|
|
|
{ |
|
|
|
|
|
name: '针灸', |
|
|
|
|
|
price: '88', |
|
|
|
|
|
group: '针灸1', |
|
|
|
|
|
time: '2077 - 12 - 20', |
|
|
|
|
|
status: true, |
|
|
|
|
|
id: '1' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '拔罐', |
|
|
|
|
|
price: '188', |
|
|
|
|
|
group: '针灸2', |
|
|
|
|
|
time: '2077 - 12 - 20', |
|
|
|
|
|
status: true, |
|
|
|
|
|
id: '2' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '火刺', |
|
|
|
|
|
price: '55', |
|
|
|
|
|
group: '针灸1', |
|
|
|
|
|
time: '2077 - 12 - 20', |
|
|
|
|
|
status: true, |
|
|
|
|
|
id: '3' |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
], |
|
|
|
|
|
courseList: [], |
|
|
selectAll: false, |
|
|
selectAll: false, |
|
|
selectAll1: false, |
|
|
selectAll1: false, |
|
|
numSettingForm: { |
|
|
numSettingForm: { |
|
@ -552,7 +514,10 @@ export default { |
|
|
// 请求医生信息 |
|
|
// 请求医生信息 |
|
|
this.depart_id = depart_id; |
|
|
this.depart_id = depart_id; |
|
|
this.doctor_id = doctor_id; |
|
|
this.doctor_id = doctor_id; |
|
|
// this.fetchDoctorData() |
|
|
this.fetchDoctorData() |
|
|
|
|
|
this.fetchPackData() |
|
|
|
|
|
this.fetchProjectData() |
|
|
|
|
|
this.geHosAdress() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
@ -562,6 +527,10 @@ export default { |
|
|
...mapState(['hosMenuData']) // 从Vuex映射showSidebar状态到组件的计算属性中 |
|
|
...mapState(['hosMenuData']) // 从Vuex映射showSidebar状态到组件的计算属性中 |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
random() { |
|
|
|
|
|
var randomNumber = Math.random(); |
|
|
|
|
|
return randomNumber |
|
|
|
|
|
}, |
|
|
fetchDoctorData() { |
|
|
fetchDoctorData() { |
|
|
this.$http('POST', '/api/admin/get_depart_info', { |
|
|
this.$http('POST', '/api/admin/get_depart_info', { |
|
|
depart_id: this.depart_id, |
|
|
depart_id: this.depart_id, |
|
@ -577,6 +546,54 @@ export default { |
|
|
console.error(error, 'error') |
|
|
console.error(error, 'error') |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 疗程套餐 |
|
|
|
|
|
fetchPackData() { |
|
|
|
|
|
this.$http('POST', '/api/admin/get_project_packagelist', { |
|
|
|
|
|
depart_id: this.depart_id, |
|
|
|
|
|
doctor_id: this.doctor_id |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
if(response.code == 0){ |
|
|
|
|
|
this.loading1 = false |
|
|
|
|
|
this.$nextTick(()=>{ |
|
|
|
|
|
this.courseList = response.data.list; |
|
|
|
|
|
this.tableKey1 = Date.now(); // 强制重新渲染表格 |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error(error, 'error') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 项目列表 |
|
|
|
|
|
fetchProjectData() { |
|
|
|
|
|
this.$http('POST', '/api/admin/get_project_list', { |
|
|
|
|
|
depart_id: this.depart_id, |
|
|
|
|
|
doctor_id: this.doctor_id |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
if(response.code == 0){ |
|
|
|
|
|
this.loading = false |
|
|
|
|
|
this.$nextTick(()=>{ |
|
|
|
|
|
this.projectTagData = response.data.classify;//项目分类 |
|
|
|
|
|
this.projectList = Object.values(response.data.list);//项目列表 |
|
|
|
|
|
this.tableKey = Date.now(); // 强制重新渲染表格 |
|
|
|
|
|
// this.$set('projectList',Object.values(response.data.list)) |
|
|
|
|
|
// this.$set('projectTagData',response.data.classify) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error(error, 'error') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
geHosAdress() { |
|
|
|
|
|
this.$http('POST', '/api/admin/search_hoispital', { |
|
|
|
|
|
keyword: this.doctor_id, |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
console.log(response.data,'===data'); |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error(error, 'error') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
validateSelection(val) { |
|
|
validateSelection(val) { |
|
|
// 防止取消选中医生名片 |
|
|
// 防止取消选中医生名片 |
|
|
if (!val.includes(2)) { |
|
|
if (!val.includes(2)) { |
|
@ -587,21 +604,24 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
selectTag(item) { |
|
|
selectTag(item) { |
|
|
|
|
|
if(item == 'all'){ |
|
|
|
|
|
this.projectSearchId = 'all'; |
|
|
|
|
|
}else{ |
|
|
this.projectSearchId = item.id; |
|
|
this.projectSearchId = item.id; |
|
|
|
|
|
} |
|
|
// 筛选逻辑 |
|
|
// 筛选逻辑 |
|
|
this.getFilterProject() |
|
|
// this.getFilterProject() |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
getFilterProject(){ |
|
|
getFilterProject(){ |
|
|
// 接口需要更改 |
|
|
// 接口需要更改 |
|
|
this.$http('POST', '/supernew/ajax_get_type_batch_list', { |
|
|
this.$http('POST', '/supernew/ajax_get_type_batch_list', { |
|
|
// 项目筛选 |
|
|
// 项目筛选 |
|
|
projectid:this.projectSearchId, |
|
|
projectid:this.projectSearchId == 'all' ? '' : this.projectSearchId, |
|
|
// 项目名称搜索 |
|
|
// 项目名称搜索 |
|
|
projectSearchName:this.projectSearchName |
|
|
projectSearchName:this.projectSearchName |
|
|
}).then(response => { |
|
|
}).then(response => { |
|
|
this.projectTagData = response.data |
|
|
this.projectTagData = response.data; |
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
console.error(error, 'error') |
|
|
console.error(error, 'error') |
|
|
}) |
|
|
}) |
|
@ -616,8 +636,40 @@ export default { |
|
|
console.error(error, 'error') |
|
|
console.error(error, 'error') |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 修改项目价格 |
|
|
|
|
|
changePrice(row) { |
|
|
|
|
|
if (row.sort) { |
|
|
|
|
|
this.editorProjectInfo({ price: row.price, project_id: row.id }) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
// 修改分类 |
|
|
|
|
|
changeClassify(row) { |
|
|
|
|
|
if (row.sort) { |
|
|
|
|
|
this.editorProjectInfo({ classify_id: row.classify_id, project_id: row.id }) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
editorProjectInfo(props) { |
|
|
|
|
|
this.$http('POST', '/api/admin/edit_project', { |
|
|
|
|
|
...props, |
|
|
|
|
|
depart_id: this.depart_id, |
|
|
|
|
|
doctor_id: this.doctor_id, |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
if (response.code == 0) { |
|
|
|
|
|
this.$Message.success('修改成功') |
|
|
|
|
|
this.getInitData() |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error(error, 'error') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
addNewSetMenu() { |
|
|
addNewSetMenu() { |
|
|
this.$router.push('/addNewTreatment') |
|
|
this.$router.push(`/addNewTreatment?doctor_id=${this.doctor_id}&depart_id${this.depart_id}`) |
|
|
|
|
|
}, |
|
|
|
|
|
addNewGroup(){ |
|
|
|
|
|
this.dialogVisible1 = true |
|
|
|
|
|
}, |
|
|
|
|
|
addNewProject(){ |
|
|
|
|
|
this.dialogVisible = true |
|
|
}, |
|
|
}, |
|
|
handleClose() { |
|
|
handleClose() { |
|
|
this.$Message.info('弹框已关闭'); |
|
|
this.$Message.info('弹框已关闭'); |
|
@ -669,7 +721,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
handleClick1(row) { |
|
|
handleClick1(row) { |
|
|
console.log(row); |
|
|
console.log(row); |
|
|
this.$router.push(`/addNewTreatment?id=${row.id}`) |
|
|
this.$router.push(`/addNewTreatment?package_id=${row.id}&doctor_id=${this.doctor_id}&depart_id=${this.depart_id}`) |
|
|
// 跳转编辑页面 |
|
|
// 跳转编辑页面 |
|
|
}, |
|
|
}, |
|
|
handleClick(row) { |
|
|
handleClick(row) { |
|
@ -725,7 +777,8 @@ export default { |
|
|
|
|
|
|
|
|
// 处理选择变化 |
|
|
// 处理选择变化 |
|
|
handleSelectionChange1(rows) { |
|
|
handleSelectionChange1(rows) { |
|
|
this.selectedRows = rows; |
|
|
console.log(rows,'1====='); |
|
|
|
|
|
this.selectedRows1 = rows; |
|
|
// 更新全选按钮状态 |
|
|
// 更新全选按钮状态 |
|
|
const allSelected = rows.length === this.courseList.length; |
|
|
const allSelected = rows.length === this.courseList.length; |
|
|
const noneSelected = rows.length === 0; |
|
|
const noneSelected = rows.length === 0; |
|
@ -735,23 +788,67 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 批量操作 |
|
|
// 批量操作 |
|
|
batchOperate(type,name) { |
|
|
batchOperate(type,name) { |
|
|
if (type == '1') { |
|
|
// 默认疗程 启用、禁用 |
|
|
|
|
|
let url= '/api/admin/project_package_mutil_option'; |
|
|
|
|
|
let props = { |
|
|
|
|
|
status:type, |
|
|
|
|
|
depart_id:this.depart_id, |
|
|
|
|
|
doctor_id:this.doctor_id |
|
|
|
|
|
} |
|
|
|
|
|
let str = [] |
|
|
// 禁用 |
|
|
// 禁用 |
|
|
if(name == 'project'){ |
|
|
if(name == 'project'){ |
|
|
// 修改项目列表 |
|
|
// 修改项目列表 |
|
|
|
|
|
url='/api/admin/project_mutil_option'; |
|
|
|
|
|
// selectedRows |
|
|
|
|
|
console.log(this.selectedRows,'----09999888'); |
|
|
|
|
|
this.selectedRows.forEach(item=>{ |
|
|
|
|
|
if(item.status != type){ |
|
|
|
|
|
str.push(item.id) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
if(str.length == 0){ |
|
|
|
|
|
this.$message.error('请重新选择!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
props.project_ids = str.join(',') |
|
|
}else{ |
|
|
}else{ |
|
|
// 修改疗程套餐 |
|
|
// 修改疗程套餐 |
|
|
|
|
|
// selectedRows1 |
|
|
|
|
|
this.selectedRows1.forEach(item=>{ |
|
|
|
|
|
if(item.status != type){ |
|
|
|
|
|
str.push(item.id) |
|
|
} |
|
|
} |
|
|
|
|
|
}) |
|
|
} else { |
|
|
if(str.length == 0){ |
|
|
// 启用 |
|
|
this.$message.error('请重新选择!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
props.package_ids = str.join(',') |
|
|
|
|
|
} |
|
|
|
|
|
// console.log(url,props); |
|
|
|
|
|
this.changePackData(url,props,name) |
|
|
|
|
|
}, |
|
|
|
|
|
// |
|
|
|
|
|
changePackData(url,params,name) { |
|
|
|
|
|
this.$http('POST',url , { |
|
|
|
|
|
...params |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
if(response.code == 0){ |
|
|
|
|
|
this.$Message.success('操作成功') |
|
|
if(name == 'project'){ |
|
|
if(name == 'project'){ |
|
|
// 修改项目列表 |
|
|
this.loading = true; |
|
|
|
|
|
this.selectedRows=[] |
|
|
|
|
|
this.fetchProjectData() |
|
|
}else{ |
|
|
}else{ |
|
|
// 修改疗程套餐 |
|
|
this.loading1 = true; |
|
|
|
|
|
this.selectedRows1=[]; |
|
|
|
|
|
this.fetchPackData() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error(error, 'error') |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
ChangeTime(type) { |
|
|
ChangeTime(type) { |
|
|
|
|
|
|
|
|