修改报表格式
This commit is contained in:
@@ -88,6 +88,69 @@ export const constantRoutes = [
|
||||
|
||||
// 动态路由,基于用户权限动态去加载
|
||||
export const dynamicRoutes = [
|
||||
{
|
||||
path: '/system',
|
||||
component: Layout,
|
||||
redirect: '/system/user',
|
||||
name: 'System',
|
||||
meta: { title: '系统管理', icon: 'system' },
|
||||
children: [
|
||||
{
|
||||
path: 'user',
|
||||
component: () => import('@/views/system/user/index.vue'),
|
||||
name: 'User',
|
||||
meta: { title: '用户管理', icon: 'user', permissions: ['system:user:list'] }
|
||||
},
|
||||
{
|
||||
path: 'role',
|
||||
component: () => import('@/views/system/role/index.vue'),
|
||||
name: 'Role',
|
||||
meta: { title: '角色管理', icon: 'role', permissions: ['system:role:list'] }
|
||||
},
|
||||
{
|
||||
path: 'menu',
|
||||
component: () => import('@/views/system/menu/index.vue'),
|
||||
name: 'Menu',
|
||||
meta: { title: '菜单管理', icon: 'menu', permissions: ['system:menu:list'] }
|
||||
},
|
||||
{
|
||||
path: 'dept',
|
||||
component: () => import('@/views/system/dept/index.vue'),
|
||||
name: 'Dept',
|
||||
meta: { title: '部门管理', icon: 'dept', permissions: ['system:dept:list'] }
|
||||
},
|
||||
{
|
||||
path: 'post',
|
||||
component: () => import('@/views/system/post/index.vue'),
|
||||
name: 'Post',
|
||||
meta: { title: '岗位管理', icon: 'post', permissions: ['system:post:list'] }
|
||||
},
|
||||
{
|
||||
path: 'dict',
|
||||
component: () => import('@/views/system/dict/index.vue'),
|
||||
name: 'Dict',
|
||||
meta: { title: '字典管理', icon: 'dict', permissions: ['system:dict:list'] }
|
||||
},
|
||||
{
|
||||
path: 'config',
|
||||
component: () => import('@/views/system/config/index.vue'),
|
||||
name: 'Config',
|
||||
meta: { title: '参数配置', icon: 'config', permissions: ['system:config:list'] }
|
||||
},
|
||||
{
|
||||
path: 'notice',
|
||||
component: () => import('@/views/system/notice/index.vue'),
|
||||
name: 'Notice',
|
||||
meta: { title: '通知公告', icon: 'notice', permissions: ['system:notice:list'] }
|
||||
},
|
||||
{
|
||||
path: 'tenant',
|
||||
component: () => import('@/views/system/tenant/index.vue'),
|
||||
name: 'Tenant',
|
||||
meta: { title: '租户管理', icon: 'tenant', permissions: ['system:tenant:list'] }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/system/tenant-user',
|
||||
component: Layout,
|
||||
@@ -98,7 +161,7 @@ export const dynamicRoutes = [
|
||||
path: 'set/:tenantId(\\d+)',
|
||||
component: () => import('@/views/system/tenant/setUser'),
|
||||
name: 'SetUser',
|
||||
meta: { title: '所属用户', activeMenu: '/system/basicmanage/tenant' }
|
||||
meta: { title: '所属用户', activeMenu: '/system/tenant' }
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -112,7 +175,7 @@ export const dynamicRoutes = [
|
||||
path: 'set/:tenantId(\\d+)',
|
||||
component: () => import('@/views/system/tenant/setContract'),
|
||||
name: 'SetContract',
|
||||
meta: { title: '合同管理', activeMenu: '/system/basicmanage/tenant' }
|
||||
meta: { title: '合同管理', activeMenu: '/system/tenant' }
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -158,6 +221,48 @@ export const dynamicRoutes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/monitor',
|
||||
component: Layout,
|
||||
redirect: '/monitor/operlog',
|
||||
name: 'Monitor',
|
||||
meta: { title: '系统监控', icon: 'monitor' },
|
||||
children: [
|
||||
{
|
||||
path: 'operlog',
|
||||
component: () => import('@/views/monitor/operlog/index.vue'),
|
||||
name: 'Operlog',
|
||||
meta: { title: '操作日志', icon: 'operlog', permissions: ['monitor:operlog:list'] }
|
||||
},
|
||||
{
|
||||
path: 'logininfor',
|
||||
component: () => import('@/views/monitor/logininfor/index.vue'),
|
||||
name: 'Logininfor',
|
||||
meta: { title: '登录日志', icon: 'logininfor', permissions: ['monitor:logininfor:list'] }
|
||||
},
|
||||
{
|
||||
path: 'job',
|
||||
component: () => import('@/views/monitor/job/index.vue'),
|
||||
name: 'Job',
|
||||
meta: { title: '定时任务', icon: 'job', permissions: ['monitor:job:list'] }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/tool',
|
||||
component: Layout,
|
||||
redirect: '/tool/gen',
|
||||
name: 'Tool',
|
||||
meta: { title: '系统工具', icon: 'tool' },
|
||||
children: [
|
||||
{
|
||||
path: 'gen',
|
||||
component: () => import('@/views/tool/gen/index.vue'),
|
||||
name: 'Gen',
|
||||
meta: { title: '代码生成', icon: 'gen', permissions: ['tool:gen:list'] }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/monitor/job-log',
|
||||
component: Layout,
|
||||
|
||||
@@ -164,12 +164,15 @@
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
:span-method="arraySpanMethod"
|
||||
|
||||
border
|
||||
fit
|
||||
:default-sort="{ prop: 'chargeTime', order: 'descending' }"
|
||||
@header-click="handleHeaderClick"
|
||||
>
|
||||
<!-- :span-method="arraySpanMethod" -->
|
||||
<!-- :summary-method="getSummaries"
|
||||
show-summary 每页单独合计-->
|
||||
<el-table-column type="selection" width="50px" align="center" />
|
||||
<el-table-column type="selection" width="50px" align="center" resizable />
|
||||
<el-table-column
|
||||
label='门诊号'
|
||||
align="center"
|
||||
@@ -177,14 +180,16 @@
|
||||
prop="busNo"
|
||||
width="110px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
<el-table-column
|
||||
label="科室"
|
||||
align="center"
|
||||
key="departmentName"
|
||||
prop="departmentName"
|
||||
|
||||
min-width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
<el-table-column
|
||||
label="姓名"
|
||||
@@ -193,6 +198,7 @@
|
||||
prop="name"
|
||||
width="90px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保号"
|
||||
@@ -201,6 +207,7 @@
|
||||
prop="ybCode"
|
||||
width="190px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
@@ -208,8 +215,9 @@
|
||||
align="center"
|
||||
key="clinicalName"
|
||||
prop="clinicalName"
|
||||
|
||||
min-width="150px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保码"
|
||||
@@ -218,14 +226,16 @@
|
||||
prop="ybNo"
|
||||
width="220px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保类别"
|
||||
align="center"
|
||||
key="type_dictText"
|
||||
prop="type_dictText"
|
||||
|
||||
min-width="100px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
@@ -233,8 +243,9 @@
|
||||
align="center"
|
||||
key="issuerName"
|
||||
prop="issuerName"
|
||||
|
||||
min-width="100px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
<el-table-column
|
||||
|
||||
@@ -242,8 +253,9 @@
|
||||
align="center"
|
||||
key="payeeName"
|
||||
prop="payeeName"
|
||||
|
||||
min-width="100px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
@@ -252,46 +264,52 @@
|
||||
prop="totalVolume"
|
||||
width="135px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
<el-table-column
|
||||
label="数量"
|
||||
align="center"
|
||||
key="number"
|
||||
prop="number"
|
||||
|
||||
min-width="80px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
<el-table-column
|
||||
label="单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
|
||||
min-width="100px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
<el-table-column
|
||||
label="金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
|
||||
min-width="100px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保等级"
|
||||
align="center"
|
||||
key="chrgitmLv_enumText"
|
||||
prop="chrgitmLv_enumText"
|
||||
|
||||
min-width="100px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
<el-table-column
|
||||
label="收费时间"
|
||||
align="center"
|
||||
key="chargeTime"
|
||||
prop="chargeTime"
|
||||
|
||||
min-width="160px"
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.chargeTime) }}</span>
|
||||
@@ -697,6 +715,41 @@ function handleSelectionChange(selection) {
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
// 表头点击事件,用于实现更灵活的列操作
|
||||
function handleHeaderClick(column) {
|
||||
// 可以在这里添加额外的表头操作逻辑
|
||||
// 例如:根据列内容自动调整宽度
|
||||
if (column.property) {
|
||||
autoFitColumnWidth(column.property);
|
||||
}
|
||||
}
|
||||
|
||||
// 根据内容自动调整列宽
|
||||
function autoFitColumnWidth(property) {
|
||||
// 实际项目中可以根据需要实现更复杂的自动宽度计算逻辑
|
||||
// 这里提供一个简单的实现方式
|
||||
const table = document.querySelector('.el-table__body-wrapper table');
|
||||
if (table) {
|
||||
const rows = table.querySelectorAll('tbody tr');
|
||||
let maxWidth = 100; // 默认最小宽度
|
||||
|
||||
rows.forEach(row => {
|
||||
const cell = Array.from(row.cells).find((cell, index) => {
|
||||
const headerCell = table.querySelector(`thead th:nth-child(${index + 1})`);
|
||||
return headerCell && headerCell.dataset.property === property;
|
||||
});
|
||||
|
||||
if (cell) {
|
||||
const textWidth = cell.textContent.length * 8; // 粗略估算文本宽度
|
||||
maxWidth = Math.max(maxWidth, textWidth);
|
||||
}
|
||||
});
|
||||
|
||||
// 应用计算出的宽度(可以根据实际需要调整)
|
||||
// 注意:在实际Element Plus中,可能需要通过ref获取表格实例并调用API来设置列宽
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
|
||||
Reference in New Issue
Block a user