Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -99,90 +99,89 @@ export const constantRoutes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
// 预约管理直接访问路由 - 兼容外部系统访问
|
||||
{
|
||||
path: '/reservationRecord2/appoinmentmanage',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: () => import('@/views/appoinmentmanage/clinicRoom/index.vue'),
|
||||
name: 'DirectClinicRoom',
|
||||
meta: { title: '门诊出诊医生诊室设置' }
|
||||
}
|
||||
]
|
||||
}
|
||||
// {
|
||||
// path: '/reservationRecord2/appoinmentmanage',
|
||||
// component: Layout,
|
||||
// hidden: true,
|
||||
// children: [
|
||||
// {
|
||||
// path: '',
|
||||
// component: () => import('@/views/appoinmentmanage/clinicRoom/index.vue'),
|
||||
// name: 'DirectClinicRoom',
|
||||
// meta: { title: '门诊出诊医生诊室设置' }
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
]
|
||||
|
||||
// 动态路由 - 基于用户权限动态加载的路由
|
||||
export const dynamicRoutes = [
|
||||
// 基础管理路由
|
||||
{
|
||||
path: '/basicmanage',
|
||||
component: Layout,
|
||||
redirect: '/basicmanage/invoice-management',
|
||||
name: 'BasicManage',
|
||||
meta: { title: '基础管理', icon: 'component' },
|
||||
children: [
|
||||
{
|
||||
path: 'invoice-management',
|
||||
component: () => import('@/views/basicmanage/InvoiceManagement/index.vue'),
|
||||
name: 'invoice-management',
|
||||
meta: { title: '发票管理' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/basicmanage',
|
||||
// component: Layout,
|
||||
// redirect: '/basicmanage/invoice-management',
|
||||
// name: 'BasicManage',
|
||||
// meta: { title: '基础管理', icon: 'component' },
|
||||
// children: [
|
||||
// {
|
||||
// path: 'invoice-management',
|
||||
// component: () => import('@/views/basicmanage/InvoiceManagement/index.vue'),
|
||||
// name: 'invoice-management',
|
||||
// meta: { title: '发票管理' }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// 兼容系统业务管理路径的发票管理路由
|
||||
{
|
||||
path: '/system/ywgz',
|
||||
component: Layout,
|
||||
redirect: '/system/ywgz/InvoiceManagement',
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'InvoiceManagement',
|
||||
component: () => import('@/views/basicmanage/InvoiceManagement/index.vue'),
|
||||
name: 'SystemInvoiceManagement',
|
||||
meta: { title: '发票管理' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/system/ywgz',
|
||||
// component: Layout,
|
||||
// redirect: '/system/ywgz/InvoiceManagement',
|
||||
// hidden: true,
|
||||
// children: [
|
||||
// {
|
||||
// path: 'InvoiceManagement',
|
||||
// component: () => import('@/views/basicmanage/InvoiceManagement/index.vue'),
|
||||
// name: 'SystemInvoiceManagement',
|
||||
// meta: { title: '发票管理' }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// 维护系统路由
|
||||
{
|
||||
path: '/maintainSystem',
|
||||
component: Layout,
|
||||
redirect: '/maintainSystem/chargeConfig',
|
||||
name: 'MaintainSystem',
|
||||
meta: { title: '维护系统', icon: 'system' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirect: 'chargeConfig',
|
||||
name: 'MaintainSystemIndex' // 添加名称以解决警告
|
||||
},
|
||||
{
|
||||
path: 'chargeConfig', // 收费配置路由
|
||||
component: () => import('@/views/maintainSystem/chargeConfig/index.vue'),
|
||||
name: 'ChargeConfig',
|
||||
meta: { title: '挂号收费系统参数维护', icon: 'config', permissions: ['maintainSystem:chargeConfig:list'] }
|
||||
},
|
||||
{
|
||||
path: 'Inspection', // 检验管理路由
|
||||
component: () => import('@/views/maintainSystem/Inspection/index.vue'),
|
||||
name: 'Inspection',
|
||||
meta: { title: '检验管理', icon: 'inspection' },
|
||||
children: [
|
||||
{
|
||||
path: 'PackageManagement', // 套餐管理路由
|
||||
component: () => import('@/views/maintainSystem/Inspection/PackageManagement.vue'),
|
||||
name: 'PackageManagement',
|
||||
meta: { title: '套餐管理' }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/maintainSystem',
|
||||
// component: Layout,
|
||||
// redirect: '/maintainSystem/chargeConfig',
|
||||
// name: 'MaintainSystem',
|
||||
// meta: { title: '维护系统', icon: 'system' },
|
||||
// children: [
|
||||
// {
|
||||
// path: '',
|
||||
// redirect: 'chargeConfig',
|
||||
// name: 'MaintainSystemIndex' // 添加名称以解决警告
|
||||
// },
|
||||
// {
|
||||
// path: 'chargeConfig', // 收费配置路由
|
||||
// component: () => import('@/views/maintainSystem/chargeConfig/index.vue'),
|
||||
// name: 'ChargeConfig',
|
||||
// meta: { title: '挂号收费系统参数维护', icon: 'config', permissions: ['maintainSystem:chargeConfig:list'] }
|
||||
// },
|
||||
// {
|
||||
// path: 'Inspection', // 检验管理路由
|
||||
// component: () => import('@/views/maintainSystem/Inspection/index.vue'),
|
||||
// name: 'Inspection',
|
||||
// meta: { title: '检验管理', icon: 'inspection' },
|
||||
// children: [
|
||||
// {
|
||||
// path: 'PackageManagement', // 套餐管理路由
|
||||
// component: () => import('@/views/maintainSystem/Inspection/PackageManagement.vue'),
|
||||
// name: 'PackageManagement',
|
||||
// meta: { title: '套餐管理' }
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// 系统管理路由
|
||||
// {
|
||||
// path: '/system',
|
||||
@@ -262,22 +261,22 @@ export const dynamicRoutes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
// 租户合同管理路由
|
||||
// {
|
||||
// path: '/system/tenant-contract',
|
||||
// component: Layout,
|
||||
// hidden: true,
|
||||
// permissions: ['*:*:*'],
|
||||
// children: [
|
||||
// {
|
||||
// path: 'set/:tenantId(\\d+)',
|
||||
// component: () => import('@/views/system/tenant/setContract'),
|
||||
// name: 'SetContract',
|
||||
// meta: { title: '合同管理', activeMenu: '/system/tenant' }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// // 用户角色分配路由
|
||||
//租户合同管理路由
|
||||
{
|
||||
path: '/system/tenant-contract',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['*:*:*'],
|
||||
children: [
|
||||
{
|
||||
path: 'set/:tenantId(\\d+)',
|
||||
component: () => import('@/views/system/tenant/setContract'),
|
||||
name: 'SetContract',
|
||||
meta: { title: '合同管理', activeMenu: '/system/tenant' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// 用户角色分配路由
|
||||
// {
|
||||
// path: '/system/user-auth',
|
||||
// component: Layout,
|
||||
|
||||
@@ -2,6 +2,22 @@
|
||||
<div class="app-container" v-loading="loading">
|
||||
<!-- 筛选区 -->
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" class="filter-form">
|
||||
<el-form-item label="卫生机构" prop="orgName">
|
||||
<el-select
|
||||
v-model="queryParams.orgName"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
:popper-append-to-body="false"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in tenantOptions"
|
||||
:key="item.id"
|
||||
:label="item.tenantName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊室名称" prop="roomName">
|
||||
<el-input
|
||||
v-model="queryParams.roomName"
|
||||
@@ -100,73 +116,88 @@
|
||||
:disabled="dialogType === 'view'"
|
||||
>
|
||||
<el-form-item label="科室名称" prop="department">
|
||||
<el-select
|
||||
v-model="form.department"
|
||||
placeholder="请选择科室"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
:disabled="dialogType === 'view'"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in departmentOptions"
|
||||
:key="item.deptId || item.id"
|
||||
:label="item.deptName || item.name"
|
||||
:value="item.deptName || item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊室名称" prop="roomName">
|
||||
<el-input
|
||||
v-model="form.roomName"
|
||||
placeholder="请输入诊室名称"
|
||||
maxlength="50"
|
||||
show-word-limit
|
||||
<el-select
|
||||
v-model="form.department"
|
||||
placeholder="请选择科室"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
:disabled="dialogType === 'view'"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in departmentOptions"
|
||||
:key="item.deptId || item.id"
|
||||
:label="item.deptName || item.name"
|
||||
:value="item.deptName || item.name"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊室楼号" prop="building">
|
||||
<el-input
|
||||
v-model="form.building"
|
||||
placeholder="请输入诊室楼号"
|
||||
maxlength="50"
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="卫生机构" prop="orgName">
|
||||
<el-select
|
||||
v-model="form.orgName"
|
||||
placeholder="请选择"
|
||||
style="width: 100%"
|
||||
:disabled="dialogType === 'view'"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in tenantOptions"
|
||||
:key="item.id"
|
||||
:label="item.tenantName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊室楼层" prop="floor">
|
||||
<el-input
|
||||
v-model="form.floor"
|
||||
placeholder="请输入诊室楼层"
|
||||
maxlength="10"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊室房间号" prop="roomNo">
|
||||
<el-input
|
||||
v-model="form.roomNo"
|
||||
placeholder="请输入诊室房间号"
|
||||
maxlength="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="停用状态" prop="isDisabled">
|
||||
<el-radio-group v-model="form.isDisabled">
|
||||
<el-radio :label="false">启用</el-radio>
|
||||
<el-radio :label="true">停用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remarks">
|
||||
<el-input
|
||||
v-model="form.remarks"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="请输入备注"
|
||||
maxlength="500"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="作废" prop="void">
|
||||
<el-radio-group v-model="form.void">
|
||||
<el-radio :label="false">否</el-radio>
|
||||
<el-radio :label="true">是</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊室名称" prop="roomName">
|
||||
<el-input
|
||||
v-model="form.roomName"
|
||||
placeholder="请输入诊室名称"
|
||||
maxlength="20"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊室楼号" prop="building">
|
||||
<el-input
|
||||
v-model="form.building"
|
||||
placeholder="请输入诊室楼号"
|
||||
maxlength="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊室楼层" prop="floor">
|
||||
<el-input
|
||||
v-model="form.floor"
|
||||
placeholder="请输入诊室楼层"
|
||||
maxlength="10"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊室房间号" prop="roomNo">
|
||||
<el-input
|
||||
v-model="form.roomNo"
|
||||
placeholder="请输入诊室房间号"
|
||||
maxlength="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="停用状态" prop="isDisabled">
|
||||
<el-radio-group v-model="form.isDisabled">
|
||||
<el-radio :label="false">启用</el-radio>
|
||||
<el-radio :label="true">停用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remarks">
|
||||
<el-input
|
||||
v-model="form.remarks"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="请输入备注"
|
||||
maxlength="500"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="作废" prop="void">
|
||||
<el-radio-group v-model="form.void">
|
||||
<el-radio :label="false">否</el-radio>
|
||||
<el-radio :label="true">是</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button v-if="dialogType !== 'view'" type="primary" @click="submitForm">确 定</el-button>
|
||||
@@ -186,7 +217,8 @@ import {
|
||||
addClinicRoom,
|
||||
updateClinicRoom,
|
||||
deleteClinicRoom,
|
||||
getDepartmentList
|
||||
getDepartmentList,
|
||||
getTenantList
|
||||
} from '@/api/appoinmentmanage/clinicRoom'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
@@ -201,10 +233,13 @@ const total = ref(0)
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
roomName: null
|
||||
roomName: null,
|
||||
orgName: null
|
||||
})
|
||||
// 科室选项
|
||||
const departmentOptions = ref([])
|
||||
// 租户选项
|
||||
const tenantOptions = ref([])
|
||||
// 弹窗相关
|
||||
const dialogVisible = ref(false)
|
||||
const dialogType = ref('') // add/edit/view
|
||||
@@ -220,16 +255,42 @@ const form = reactive({
|
||||
roomNo: '',
|
||||
isDisabled: false,
|
||||
remarks: '',
|
||||
void: false
|
||||
void: false,
|
||||
orgName: null
|
||||
})
|
||||
// 表单验证规则
|
||||
const rules = {
|
||||
roomName: [
|
||||
{ required: true, message: '诊室名称不能为空', trigger: 'blur' },
|
||||
{ max: 50, message: '诊室名称长度不能超过50个字符', trigger: 'blur' }
|
||||
{ max: 20, message: '诊室名称长度不能超过20个字符', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback()
|
||||
}
|
||||
if (!form.orgName) {
|
||||
return callback()
|
||||
}
|
||||
// 检查当前租户下是否已存在相同的诊室名称
|
||||
const isExist = clinicRoomList.value.some(item => {
|
||||
return item.roomName === value &&
|
||||
item.orgName === form.orgName &&
|
||||
item.id !== form.id
|
||||
})
|
||||
if (isExist) {
|
||||
callback(new Error('诊室名称已存在'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
department: [
|
||||
{ required: true, message: '科室名称不能为空', trigger: 'change' }
|
||||
],
|
||||
orgName: [
|
||||
{ required: true, message: '卫生机构不能为空', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -264,6 +325,7 @@ function handleQuery() {
|
||||
function resetQuery() {
|
||||
proxy.resetForm('queryRef')
|
||||
queryParams.roomName = null
|
||||
queryParams.orgName = null
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
@@ -273,6 +335,29 @@ function handleAdd() {
|
||||
dialogType.value = 'add'
|
||||
dialogTitle.value = '新增诊室'
|
||||
dialogVisible.value = true
|
||||
|
||||
// 为新增模式修改诊室名称验证规则:检查全局唯一性
|
||||
rules.roomName = [
|
||||
{ required: true, message: '诊室名称不能为空', trigger: 'blur' },
|
||||
{ max: 20, message: '诊室名称长度不能超过20个字符', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback()
|
||||
}
|
||||
// 新增时检查所有诊室名称是否已存在
|
||||
const isExist = clinicRoomList.value.some(item => {
|
||||
return item.roomName === value
|
||||
})
|
||||
if (isExist) {
|
||||
callback(new Error('诊室名称已存在'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// 编辑按钮操作
|
||||
@@ -286,6 +371,34 @@ function handleEdit(row) {
|
||||
dialogType.value = 'edit'
|
||||
dialogTitle.value = '编辑诊室'
|
||||
dialogVisible.value = true
|
||||
|
||||
// 为编辑模式修改诊室名称验证规则:检查同一租户下是否重复
|
||||
rules.roomName = [
|
||||
{ required: true, message: '诊室名称不能为空', trigger: 'blur' },
|
||||
{ max: 20, message: '诊室名称长度不能超过20个字符', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback()
|
||||
}
|
||||
if (!form.orgName) {
|
||||
return callback()
|
||||
}
|
||||
// 编辑时检查当前租户下是否已存在相同的诊室名称(排除当前记录)
|
||||
const isExist = clinicRoomList.value.some(item => {
|
||||
return item.roomName === value &&
|
||||
item.orgName === form.orgName &&
|
||||
item.id !== form.id
|
||||
})
|
||||
if (isExist) {
|
||||
callback(new Error('诊室名称已存在'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
} else {
|
||||
ElMessage.error(response.msg || '获取诊室详情失败')
|
||||
}
|
||||
@@ -307,6 +420,8 @@ function handleView(row) {
|
||||
dialogType.value = 'view'
|
||||
dialogTitle.value = '查看诊室详情'
|
||||
dialogVisible.value = true
|
||||
|
||||
// 查看模式不需要验证规则,因为表单是禁用的
|
||||
} else {
|
||||
ElMessage.error(response.msg || '获取诊室详情失败')
|
||||
}
|
||||
@@ -391,6 +506,7 @@ function resetForm() {
|
||||
form.isDisabled = false
|
||||
form.remarks = ''
|
||||
form.void = false
|
||||
form.orgName = null
|
||||
proxy.resetForm('formRef')
|
||||
}
|
||||
|
||||
@@ -418,9 +534,32 @@ function getDepartmentOptions() {
|
||||
})
|
||||
}
|
||||
|
||||
// 获取租户列表
|
||||
function getTenantOptions() {
|
||||
getTenantList()
|
||||
.then(response => {
|
||||
if (response.code === 200) {
|
||||
// 处理不同的响应格式
|
||||
if (response.data?.records && Array.isArray(response.data.records)) {
|
||||
tenantOptions.value = response.data.records
|
||||
} else if (Array.isArray(response.data)) {
|
||||
tenantOptions.value = response.data
|
||||
} else {
|
||||
tenantOptions.value = []
|
||||
}
|
||||
} else {
|
||||
console.warn('获取租户列表失败:', response.msg)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('获取租户列表失败:', error)
|
||||
})
|
||||
}
|
||||
|
||||
// 页面加载时初始化
|
||||
onMounted(() => {
|
||||
getDepartmentOptions()
|
||||
getTenantOptions()
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user