@@ -38,7 +38,7 @@ | |||
"vuedraggable": "^2.24.3", | |||
"vuex": "3.6.0", | |||
"vuex-persistedstate": "^4.1.0", | |||
"vxe-table": "^3.8.6", | |||
"vxe-table": "~3.8.12", | |||
"xe-utils": "^3.5.27" | |||
}, | |||
"devDependencies": { | |||
@@ -54,7 +54,7 @@ | |||
"vuedraggable": "^2.24.3", | |||
"vuex": "3.6.0", | |||
"vuex-persistedstate": "^4.1.0", | |||
"vxe-table": "^3.8.6", | |||
"vxe-table": "~3.8.12", | |||
"xe-utils": "^3.5.27" | |||
}, | |||
"devDependencies": { | |||
@@ -0,0 +1,3 @@ | |||
@tailwind base; | |||
@tailwind components; | |||
@tailwind utilities; |
@@ -90,6 +90,7 @@ export default { | |||
width: 100%; | |||
& .sidebar-logo { | |||
display: inline-block; | |||
width: 32px; | |||
height: 32px; | |||
vertical-align: middle; | |||
@@ -4,8 +4,8 @@ import Cookies from "js-cookie"; | |||
import Element from "element-ui"; | |||
import "./assets/styles/element-variables.scss"; | |||
import VXETable from 'vxe-table' | |||
import 'vxe-table/lib/style.css' | |||
import VXETable from "vxe-table"; | |||
import "vxe-table/lib/style.css"; | |||
import "@/assets/styles/index.scss"; // global css | |||
import "@/assets/styles/ruoyi.scss"; // ruoyi css | |||
import App from "./App"; | |||
@@ -30,9 +30,10 @@ import Pagination from "@/components/Pagination"; | |||
// 字典标签组件 | |||
// 头部标签组件 | |||
import VueMeta from "vue-meta"; | |||
import '@/styles/vxeCommon.scss'; | |||
import '@/styles/public.scss'; | |||
import registComps from '@/plugins/registComps'; | |||
import "@/styles/vxeCommon.scss"; | |||
import "@/styles/public.scss"; | |||
import "@/assets/styles/tailwindcss.css"; | |||
import registComps from "@/plugins/registComps"; | |||
// 全局方法挂载 | |||
Vue.prototype.parseTime = parseTime; | |||
@@ -45,7 +46,7 @@ Vue.prototype.handleTree = handleTree; | |||
// 全局组件挂载 | |||
Vue.component("Pagination", Pagination); | |||
Vue.use(VXETable) | |||
Vue.use(VXETable); | |||
Vue.use(directive); | |||
Vue.use(plugins); | |||
Vue.use(registComps); | |||
@@ -47,8 +47,8 @@ | |||
<script> | |||
import Popup from "@/components/Popup"; | |||
import { checkDeptUse } from "@/api/userManage/account"; | |||
import { addDept, updateDept, getAllFirstDept } from '@/api/dictManage/dept' | |||
import { getAllHospital } from '@/api/dictManage/hosp' | |||
import { addDept, updateDept, getAllFirstDept } from "@/api/dictManage/dept"; | |||
import { getAllHospital } from "@/api/dictManage/hosp"; | |||
export default { | |||
components: { | |||
Popup, | |||
@@ -119,8 +119,8 @@ export default { | |||
}; | |||
}, | |||
open(params) { | |||
if(params && params.parentId === '0') { | |||
params.parentId = undefined | |||
if (params && params.parentId === "0") { | |||
params.parentId = undefined; | |||
} | |||
const defaultValue = {}; | |||
@@ -132,7 +132,7 @@ export default { | |||
defaultValue.wardName = params.wardName; | |||
} | |||
this.defaultValue = defaultValue; | |||
this.deptLevel = (params && params.parentId && params.parentId !== '0') ? 2 : 1; | |||
this.deptLevel = params && params.parentId && params.parentId !== "0" ? 2 : 1; | |||
this.$refs.popup.open(params); | |||
this.promise = {}; | |||
return new Promise((resolve, reject) => { | |||
@@ -172,7 +172,10 @@ export default { | |||
if (this.form.wardId !== this.defaultValue.wardId) { | |||
await checkDeptUse(this.form.id); | |||
} | |||
await updateDept({ ...this.form, parentId: this.form.parentId === '0' ? undefined : this.form.parentId }); | |||
await updateDept({ | |||
...this.form, | |||
parentId: this.form.parentId === "0" ? undefined : this.form.parentId, | |||
}); | |||
this.$message.success("修改成功"); | |||
} else { | |||
const res = await addDept(this.form); | |||
@@ -0,0 +1,225 @@ | |||
<template> | |||
<vxe-modal type="modal" v-bind="modalConfig" v-model="show" :title="showTitle"> | |||
<vxe-form ref="formRef" v-bind="formConfig" :data="formData" :rules="formRules"> | |||
<template #dept_f_d="{ data }"> | |||
<tree-dept | |||
v-model="data.deptId" | |||
clearable | |||
class="w-full" | |||
:options="deptOptions" | |||
:props="{ emitPath: false }" | |||
></tree-dept> | |||
</template> | |||
<template #a3_f_d="{ data }"> | |||
<div class="flex justify-center items-center"> | |||
<vxe-input | |||
v-model="data.min" | |||
class="flex-1" | |||
type="float" | |||
:min="0" | |||
:step="1" | |||
:digits="2" | |||
/> | |||
<span>——</span> | |||
<vxe-input | |||
v-model="data.max" | |||
class="flex-1" | |||
type="float" | |||
:min="0" | |||
:step="1" | |||
:digits="2" | |||
/> | |||
</div> | |||
</template> | |||
</vxe-form> | |||
<template #footer> | |||
<div class="flex justify-center"> | |||
<vxe-button>取 消</vxe-button> | |||
<vxe-button status="primary">确 认</vxe-button> | |||
</div> | |||
</template> | |||
</vxe-modal> | |||
</template> | |||
<script> | |||
import TreeDept from "@/components/TreeDept"; | |||
import { modalConfigMap } from "@/config/vxeModal"; | |||
import { requireReg } from "@/regular"; | |||
import { getTreeHospDept } from "@/api/index"; | |||
import { getAllHospital } from "@/api/dictManage/hosp"; | |||
import { to } from "await-to-js"; | |||
export default { | |||
name: "AddTherapeuticDialog", | |||
components: { | |||
TreeDept, | |||
}, | |||
props: { | |||
visible: { | |||
type: Boolean, | |||
default: false, | |||
}, | |||
initFormData: { | |||
type: Object, | |||
default: () => ({}), | |||
}, | |||
}, | |||
computed: { | |||
show: { | |||
get: function () { | |||
return this.visible; | |||
}, | |||
set: function (newValue) { | |||
this.$emit("update:visible", newValue); | |||
}, | |||
}, | |||
showTitle: function () { | |||
return this.formData.id ? "编辑治疗方案" : "新增治疗方案"; | |||
}, | |||
}, | |||
data() { | |||
const priceValidator = ({ data }) => { | |||
if (!data.min || !data.max) { | |||
return new Error("请输入价格范围"); | |||
} | |||
if (data.min > data.max) { | |||
return new Error("请输入正确的价格范围"); | |||
} | |||
}; | |||
return { | |||
modalConfig: { | |||
...modalConfigMap.get("default"), | |||
}, | |||
formConfig: { | |||
span: 24, | |||
titleAlign: "right", | |||
titleWidth: 120, | |||
titleColon: true, | |||
titleAsterisk: true, | |||
items: [ | |||
{ | |||
field: "wardId", | |||
title: "所属院区", | |||
itemRender: { | |||
name: "VxeSelect", | |||
props: { | |||
placeholder: "请选择", | |||
filterable: true, | |||
}, | |||
options: [], | |||
optionProps: { | |||
value: "id", | |||
label: "name", | |||
}, | |||
events: { | |||
change: this.onChangeWard, | |||
}, | |||
}, | |||
}, | |||
{ | |||
field: "deptId", | |||
title: "所属科室", | |||
slots: { | |||
default: "dept_f_d", | |||
}, | |||
}, | |||
{ | |||
field: "a1", | |||
title: "疾病诊断", | |||
itemRender: { | |||
name: "VxeSelect", | |||
props: { | |||
placeholder: "请选择", | |||
}, | |||
}, | |||
}, | |||
{ | |||
field: "a2", | |||
title: "治疗方案", | |||
itemRender: { | |||
name: "VxeInput", | |||
props: { | |||
placeholder: "请输入", | |||
}, | |||
}, | |||
}, | |||
{ | |||
field: "min", | |||
title: "价格区间", | |||
titleAsterisk: true, | |||
slots: { | |||
default: "a3_f_d", | |||
}, | |||
}, | |||
], | |||
}, | |||
formRules: { | |||
wardId: [requireReg("请选择所属院区")], | |||
deptId: [requireReg("请选择所属科室")], | |||
a1: [requireReg("请选择疾病诊断")], | |||
a2: [requireReg("请输入治疗方案")], | |||
min: [ | |||
requireReg("请输入价格范围"), | |||
{ | |||
validator: priceValidator, | |||
}, | |||
], | |||
}, | |||
formData: { | |||
wardId: null, | |||
deptId: null, | |||
a1: null, | |||
a2: null, | |||
min: null, | |||
max: null, | |||
}, | |||
deptOptions: [], | |||
}; | |||
}, | |||
methods: { | |||
init() { | |||
this.getWardOptions(); | |||
this.getDeptOptions(); | |||
}, | |||
// 获取院区下拉选项 | |||
async getWardOptions() { | |||
const [err, res] = await to(getAllHospital()); | |||
await this.$nextTick(); | |||
const formItem = this.$refs.formRef.getItems(); | |||
console.log("formItem=", formItem); | |||
if (err) { | |||
formItem[0].itemRender.options = []; | |||
return; | |||
} | |||
formItem[0].itemRender.options = res.data; | |||
}, | |||
onChangeWard({ data }) { | |||
data.deptId = null; | |||
this.deptOptions = []; | |||
this.getDeptOptions(data.wardId); | |||
}, | |||
// 获取科室下拉选项 | |||
async getDeptOptions(wardId) { | |||
const [err, res] = await to( | |||
getTreeHospDept({ | |||
wardId: wardId || undefined, | |||
}) | |||
); | |||
console.log("err=", err); | |||
if (err) { | |||
this.deptOptions = []; | |||
return; | |||
} | |||
this.deptOptions = res.data || []; | |||
}, | |||
}, | |||
created() { | |||
this.formData = { | |||
...this.formData, | |||
...this.initFormData, | |||
}; | |||
console.log("this.formData=", this.formData); | |||
}, | |||
mounted() { | |||
this.init(); | |||
}, | |||
}; | |||
</script> |
@@ -1,39 +1,329 @@ | |||
<template> | |||
<div class="app-container"> | |||
<vxe-grid ref="gridRef" v-bind="gridConfig"></vxe-grid> | |||
<vxe-grid ref="gridRef" v-bind="gridConfig"> | |||
<template #toolbar_button_d="{ $grid }"> | |||
<vxe-button status="success" icon="vxe-icon-add" class="mr-10" @click="onAdd"> | |||
新增治疗方案 | |||
</vxe-button> | |||
<vxe-button | |||
status="danger" | |||
icon="vxe-icon-delete" | |||
class="mr-10" | |||
:disabled=" | |||
!($grid && $grid.getCheckboxRecords && $grid.getCheckboxRecords(true).length > 0) | |||
" | |||
@click="onBatchDel" | |||
> | |||
批量删除 | |||
</vxe-button> | |||
<el-upload | |||
ref="upload" | |||
action="" | |||
accept=".xlsx, .csv" | |||
list-type="text" | |||
:multiple="false" | |||
:limit="1" | |||
:show-file-list="false" | |||
auto-upload | |||
> | |||
<vxe-button status="primary" icon="vxe-icon-upload" class="mr-10"> | |||
批量导入数据 | |||
</vxe-button> | |||
</el-upload> | |||
<a download="批量导入治疗方案模版.xlsx"> | |||
<vxe-button status="success" icon="vxe-icon-download" class="mr-10"> | |||
下载数据模板 | |||
</vxe-button> | |||
</a> | |||
</template> | |||
<template #dept_f_d="{ data }"> | |||
<tree-dept | |||
v-model="data.deptId" | |||
clearable | |||
class="w-240" | |||
:options="deptOptions" | |||
:props="{ emitPath: false }" | |||
></tree-dept> | |||
</template> | |||
<template #op_t_d="{ row }"> | |||
<vxe-button type="text" status="primary" @click="onEdit(row)">编辑</vxe-button> | |||
<vxe-button type="text" status="danger" @click="onDelete(row)">删除</vxe-button> | |||
</template> | |||
</vxe-grid> | |||
<add-therapeutic-dialog v-if="visible" :visible.sync="visible" /> | |||
</div> | |||
</template> | |||
<script> | |||
import AddTherapeuticDialog from "./components/AddTherapeuticDialog.vue"; | |||
import { commonGridConfig2 } from "@/config/vxeGrid"; | |||
import { getAllHospital } from "@/api/dictManage/hosp"; | |||
import TreeDept from "@/components/TreeDept"; | |||
import { getTreeHospDept } from "@/api/index"; | |||
import { to } from "await-to-js"; | |||
export default { | |||
name: "TherapeuticRegimen", | |||
components: { | |||
TreeDept, | |||
AddTherapeuticDialog, | |||
}, | |||
data() { | |||
return { | |||
gridConfig: { | |||
...commonGridConfig2, | |||
keepSource: true, | |||
formConfig: { | |||
data: {}, | |||
data: { | |||
wardId: null, | |||
}, | |||
titleColon: true, | |||
titleAlign: "right", | |||
titleWidth: 120, | |||
titleWidth: 80, | |||
items: [ | |||
{ | |||
field: "a", | |||
field: "wardId", | |||
title: "院区", | |||
itemRender: { | |||
name: "VxeSelect", | |||
props: { | |||
placeholder: "请选择院区", | |||
className: "w-240", | |||
clearable: true, | |||
filterable: true, | |||
}, | |||
options: [], | |||
optionProps: { | |||
value: "id", | |||
label: "name", | |||
}, | |||
events: { | |||
change: this.onChangeWard, | |||
}, | |||
}, | |||
}, | |||
{ | |||
field: "b", | |||
title: "科室", | |||
itemRender: {}, | |||
slots: { | |||
default: "dept_f_d", | |||
}, | |||
}, | |||
{ | |||
field: "c", | |||
title: "疾病诊断", | |||
itemRender: { | |||
name: "VxeInput", | |||
props: { | |||
placeholder: "请输入疾病诊断", | |||
className: "w-240", | |||
}, | |||
}, | |||
}, | |||
{ | |||
field: "d", | |||
title: "治疗方案", | |||
itemRender: { | |||
name: "VxeInput", | |||
props: { | |||
placeholder: "请输入治疗方案", | |||
className: "w-240", | |||
}, | |||
}, | |||
}, | |||
{ | |||
itemRender: { | |||
name: "VxeButtonGroup", | |||
options: [ | |||
{ type: "submit", content: "搜索", status: "primary" }, | |||
{ type: "reset", content: "重置" }, | |||
], | |||
}, | |||
}, | |||
], | |||
}, | |||
columns: [ | |||
{ | |||
type: "checkbox", | |||
width: 60, | |||
}, | |||
{ | |||
type: "seq", | |||
title: "序号", | |||
minWidth: 100, | |||
}, | |||
{ | |||
field: "a", | |||
title: "疾病诊断", | |||
minWidth: 200, | |||
}, | |||
{ | |||
field: "b", | |||
title: "治疗方案名称", | |||
minWidth: 200, | |||
}, | |||
{ | |||
field: "c", | |||
title: "价格", | |||
minWidth: 200, | |||
}, | |||
{ | |||
field: "d", | |||
title: "院区", | |||
minWidth: 200, | |||
}, | |||
{ | |||
field: "e", | |||
title: "一级科室", | |||
minWidth: 200, | |||
}, | |||
{ | |||
field: "f", | |||
title: "二级科室", | |||
minWidth: 200, | |||
}, | |||
{ | |||
field: "operation", | |||
title: "操作", | |||
width: 200, | |||
fixed: "right", | |||
slots: { | |||
default: "op_t_d", | |||
}, | |||
}, | |||
], | |||
checkboxConfig: { | |||
trigger: "cell", | |||
// reserve: true, | |||
}, | |||
rowConfig: { | |||
keyField: "id", | |||
isCurrent: true, | |||
isHover: true, | |||
}, | |||
proxyConfig: { | |||
form: true, | |||
response: { | |||
result: "data.list", | |||
total: "data.page.total", | |||
}, | |||
ajax: { | |||
query: ({ form, page }) => { | |||
console.log("form=", form); | |||
console.log("page=", page); | |||
const { currentPage: pageNum, pageSize } = page; | |||
console.log("pageNum=", pageNum); | |||
console.log("pageSize=", pageSize); | |||
return { | |||
data: { | |||
list: [{ a: "111" }], | |||
page: { | |||
total: 10, | |||
}, | |||
}, | |||
}; | |||
}, | |||
}, | |||
}, | |||
toolbarConfig: { | |||
slots: { | |||
buttons: "toolbar_button_d", | |||
}, | |||
}, | |||
}, | |||
deptOptions: [], | |||
visible: false, | |||
}; | |||
}, | |||
methods: {}, | |||
methods: { | |||
init() { | |||
this.getWardOptions(); | |||
this.getDeptOptions(); | |||
}, | |||
// 获取院区下拉选项 | |||
async getWardOptions() { | |||
const [err, res] = await to(getAllHospital()); | |||
await this.$nextTick(); | |||
const formItem = this.$refs.gridRef.getFormItems(0); | |||
console.log("formItem=", formItem); | |||
if (err) { | |||
formItem.itemRender.options = []; | |||
return; | |||
} | |||
formItem.itemRender.options = res.data; | |||
}, | |||
// 院区改变 | |||
onChangeWard({ data }) { | |||
data.deptId = null; | |||
this.deptOptions = []; | |||
this.getDeptOptions(data.wardId); | |||
}, | |||
// 获取科室选项 | |||
async getDeptOptions(wardId) { | |||
const [err, res] = await to( | |||
getTreeHospDept({ | |||
wardId: wardId || undefined, | |||
}) | |||
); | |||
console.log("err=", err); | |||
if (err) { | |||
this.deptOptions = []; | |||
return; | |||
} | |||
this.deptOptions = res.data || []; | |||
}, | |||
getTableList() { | |||
this.$nextTick(() => { | |||
this.$refs.gridRef.commitProxy("query"); | |||
}); | |||
}, | |||
onAdd() { | |||
this.visible = true; | |||
}, | |||
// 编辑 | |||
onEdit(row) { | |||
// const { id, deptId, name } = row; | |||
// this.initFormData = { id, deptId, name }; | |||
this.initFormData = { ...row }; | |||
this.visible = true; | |||
}, | |||
// 删除 | |||
onDelete(row) { | |||
this.$modal | |||
.confirm("是否确认删除?") | |||
.then(async () => { | |||
const [err, _] = await to( | |||
deleteComplexApi({ | |||
id: row.id, | |||
}) | |||
); | |||
if (err) { | |||
this.$message.success("操作失败"); | |||
this.getTableList(); | |||
return; | |||
} | |||
this.$message.success("操作成功"); | |||
this.getTableList(); | |||
}) | |||
.catch(() => {}); | |||
}, | |||
// 批量删除 | |||
onBatchDel() { | |||
this.$modal.confirm("是否确认批量删除?").then(async () => { | |||
await this.$nextTick(); | |||
const checkedData = this.$refs.gridRef.getCheckboxRecords(true); | |||
console.log("checkedData=", checkedData); | |||
// const labelIdList = checkedData.map((item) => item.id); | |||
// const [err, res] = await to(batchDeleteOperatorApi({ labelIdList })); | |||
// if (err) { | |||
// return; | |||
// } | |||
// this.$message.success("操作成功"); | |||
// this.getTableList(); | |||
}); | |||
}, | |||
}, | |||
mounted() { | |||
this.init(); | |||
}, | |||
}; | |||
</script> |
@@ -1,15 +1,16 @@ | |||
<template> | |||
<el-dialog :visible="visible" title="选择推荐医生" center width="80%" :before-close="onBeforeClose"> | |||
<el-dialog | |||
:visible="visible" | |||
title="选择推荐医生" | |||
center | |||
width="80%" | |||
:before-close="onBeforeClose" | |||
> | |||
<el-form size="small" :inline="true"> | |||
<el-form-item label="院区"> | |||
<el-select v-model="formParams.wardId" filterable clearable @change="onChangeWardId"> | |||
<el-option label="全部" value=""></el-option> | |||
<el-option | |||
v-for="item in wardList" | |||
:key="item.id" | |||
:label="item.name" | |||
:value="item.id" | |||
/> | |||
<el-option v-for="item in wardList" :key="item.id" :label="item.name" :value="item.id" /> | |||
</el-select> | |||
</el-form-item> | |||
<el-form-item label="科室"> | |||
@@ -32,17 +33,37 @@ | |||
/> | |||
</el-form-item> | |||
<el-form-item> | |||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearch" :disabled="loading">搜索</el-button> | |||
<el-button icon="el-icon-refresh" size="mini" @click="handleReset" :disabled="loading">重置</el-button> | |||
<el-button | |||
type="primary" | |||
icon="el-icon-search" | |||
size="mini" | |||
@click="handleSearch" | |||
:disabled="loading" | |||
> | |||
搜索 | |||
</el-button> | |||
<el-button icon="el-icon-refresh" size="mini" @click="handleReset" :disabled="loading"> | |||
重置 | |||
</el-button> | |||
</el-form-item> | |||
</el-form> | |||
<el-table v-loading="loading" :data="tableData" border> | |||
<el-table-column align="center" label="院区" prop="wardName" :show-overflow-tooltip="true" /> | |||
<el-table-column align="center" label="科室" prop="deptName" :show-overflow-tooltip="true" /> | |||
<el-table-column align="center" label="医生姓名" prop="doctorName" :show-overflow-tooltip="true" /> | |||
<el-table-column | |||
align="center" | |||
label="医生姓名" | |||
prop="doctorName" | |||
:show-overflow-tooltip="true" | |||
/> | |||
<el-table-column align="center" width="55px"> | |||
<template slot-scope="{row}"> | |||
<el-radio v-model="selectDoctorId" :label="row.id" :disabled="isDisableCheck(row.id)" @input="(val) => onCheckDoctor(val,row)"> | |||
<template slot-scope="{ row }"> | |||
<el-radio | |||
v-model="selectDoctorId" | |||
:label="row.id" | |||
:disabled="isDisableCheck(row.id)" | |||
@input="(val) => onCheckDoctor(val, row)" | |||
> | |||
<span></span> | |||
</el-radio> | |||
</template> | |||
@@ -62,15 +83,15 @@ | |||
</template> | |||
<script> | |||
import { TableMixin } from '@/mixins/tableMixin' | |||
import { getTreeHospDept } from "@/api/index"; | |||
import { staffPageList, } from '@/api/userManage/staff' | |||
import { TableMixin } from "@/mixins/tableMixin"; | |||
import { getTreeHospDept } from "@/api/index"; | |||
import { staffPageList } from "@/api/userManage/staff"; | |||
import { getAllHospital } from "@/api/dictManage/hosp"; | |||
import TreeDept from "@/components/TreeDept"; | |||
export default { | |||
name: "SelectRecommend", | |||
components: { | |||
TreeDept | |||
TreeDept, | |||
}, | |||
mixins: [TableMixin], | |||
props: ["list"], | |||
@@ -79,85 +100,85 @@ export default { | |||
visible: false, | |||
apiMethod: staffPageList, | |||
formParams: { | |||
wardId: '', | |||
deptId: '', | |||
userName: '' | |||
wardId: "", | |||
deptId: "", | |||
userName: "", | |||
}, | |||
wardList: [], | |||
deptList: [], | |||
selectDoctorId: null, | |||
selectDoctor: null | |||
selectDoctor: null, | |||
}; | |||
}, | |||
methods: { | |||
async openDialog(doctor) { | |||
this.handleReset() | |||
this.handleReset(); | |||
this.visible = true; | |||
}, | |||
async loadWardList() { | |||
const res = await getAllHospital() | |||
this.wardList = res.data || [] | |||
const res = await getAllHospital(); | |||
this.wardList = res.data || []; | |||
}, | |||
isDisableCheck(id) { | |||
return this.list.findIndex(item => item.doctorId === id) >= 0 | |||
return this.list.findIndex((item) => item.doctorId === id) >= 0; | |||
}, | |||
async getDeptList() { | |||
const res = await getTreeHospDept({ | |||
wardId: this.formParams.wardId || undefined | |||
}) | |||
this.deptList = res.data || [] | |||
wardId: this.formParams.wardId || undefined, | |||
}); | |||
this.deptList = res.data || []; | |||
}, | |||
onChangeWardId() { | |||
this.formParams.deptId = '' | |||
this.getDeptList() | |||
this.formParams.deptId = ""; | |||
this.getDeptList(); | |||
}, | |||
onCheckDoctor(val, row) { | |||
console.log('val=', val, row) | |||
this.selectDoctor = row | |||
console.log("val=", val, row); | |||
this.selectDoctor = row; | |||
}, | |||
async loadOptions() { | |||
await this.loadWardList() | |||
await this.getDeptList() | |||
await this.loadWardList(); | |||
await this.getDeptList(); | |||
}, | |||
paramsCallback() { | |||
const { wardId, deptId, userName } = this.formParams | |||
const { wardId, deptId, userName } = this.formParams; | |||
const params = { | |||
...this.pageable, | |||
wardId, | |||
deptId, | |||
userName | |||
} | |||
return params | |||
userName, | |||
}; | |||
return params; | |||
}, | |||
handleSearch() { | |||
this.selectDoctorId = null | |||
this.selectDoctor = null | |||
this.onSearch() | |||
this.selectDoctorId = null; | |||
this.selectDoctor = null; | |||
this.onSearch(); | |||
}, | |||
handleReset() { | |||
this.pageable.pageNum = 1 | |||
this.pageable.pageNum = 1; | |||
this.formParams = { | |||
wardId: '', | |||
deptId: '', | |||
userName: '' | |||
} | |||
this.selectDoctorId = null | |||
this.selectDoctor = null | |||
this.onSearch() | |||
wardId: "", | |||
deptId: "", | |||
userName: "", | |||
}; | |||
this.selectDoctorId = null; | |||
this.selectDoctor = null; | |||
this.onSearch(); | |||
}, | |||
onBeforeClose(done) { | |||
this.visible = false | |||
done() | |||
this.visible = false; | |||
done(); | |||
}, | |||
onSubmit() { | |||
console.log('点击确定') | |||
this.visible = false | |||
this.$emit('onOk', this.selectDoctor) | |||
} | |||
console.log("点击确定"); | |||
this.visible = false; | |||
this.$emit("onOk", this.selectDoctor); | |||
}, | |||
}, | |||
mounted() { | |||
this.loadOptions() | |||
console.log("this.props", this.list) | |||
} | |||
this.loadOptions(); | |||
console.log("this.props", this.list); | |||
}, | |||
}; | |||
</script> |