fix: 添加 doctorreport 路由并修复 inspection/report 组件错误
- 添加 /inspection 路由组,包含 7 个子路由 - 添加 /doctorreport 快捷访问路由指向检查报告页面 - 修复 inspection/report/index.vue 组件错误: - 添加缺失的 getCurrentInstance 和 toRefs 导入 - 修复 resetQuery 函数中未定义的 dateRange 引用 - 清理未使用的 cancel 函数 修复后用户可通过 /doctorreport 或 /inspection/report 访问检查报告页面
This commit is contained in:
@@ -249,6 +249,12 @@ export const dynamicRoutes = [
|
||||
component: () => import('@/views/doctorstation/pendingEmr.vue'),
|
||||
name: 'PendingEmr',
|
||||
meta: { title: '待写病历', icon: 'document', permissions: ['doctorstation:pending-emr:view'] }
|
||||
},
|
||||
{
|
||||
path: 'my-card-management',
|
||||
component: () => import('@/views/doctorstation/mycardmanagement/index.vue'),
|
||||
name: 'MyCardManagement',
|
||||
meta: { title: '医生个人报卡管理', icon: 'document', permissions: ['doctorstation:my-card-management:view'] }
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -347,6 +353,71 @@ export const dynamicRoutes = [
|
||||
meta: { title: '日结结算单管理', icon: 'document' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/inspection',
|
||||
component: Layout,
|
||||
redirect: '/inspection/report',
|
||||
name: 'Inspection',
|
||||
meta: { title: '检查管理', icon: 'inspection' },
|
||||
children: [
|
||||
{
|
||||
path: 'report',
|
||||
component: () => import('@/views/inspection/report/index.vue'),
|
||||
name: 'Report',
|
||||
meta: { title: '检查报告', icon: 'document' }
|
||||
},
|
||||
{
|
||||
path: 'sampleType',
|
||||
component: () => import('@/views/inspection/sampleType/index.vue'),
|
||||
name: 'SampleType',
|
||||
meta: { title: '样本类型', icon: 'sample' }
|
||||
},
|
||||
{
|
||||
path: 'observation',
|
||||
component: () => import('@/views/inspection/observation/index.vue'),
|
||||
name: 'Observation',
|
||||
meta: { title: '观测记录', icon: 'observation' }
|
||||
},
|
||||
{
|
||||
path: 'lisconfig',
|
||||
component: () => import('@/views/inspection/lisconfig/index.vue'),
|
||||
name: 'LisConfig',
|
||||
meta: { title: 'LIS 配置', icon: 'setting' }
|
||||
},
|
||||
{
|
||||
path: 'instrument',
|
||||
component: () => import('@/views/inspection/instrument/index.vue'),
|
||||
name: 'Instrument',
|
||||
meta: { title: '仪器管理', icon: 'instrument' }
|
||||
},
|
||||
{
|
||||
path: 'groupRec',
|
||||
component: () => import('@/views/inspection/groupRec/index.vue'),
|
||||
name: 'GroupRec',
|
||||
meta: { title: '组合记录', icon: 'group' }
|
||||
},
|
||||
{
|
||||
path: 'sampleCollection',
|
||||
component: () => import('@/views/inspection/sampleCollection/index.vue'),
|
||||
name: 'SampleCollection',
|
||||
meta: { title: '样本采集', icon: 'collection' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// 医生报告页面 - 快捷访问路径
|
||||
{
|
||||
path: '/doctorreport',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: () => import('@/views/inspection/report/index.vue'),
|
||||
name: 'DoctorReport',
|
||||
meta: { title: '医生报告', activeMenu: '/inspection/report' }
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
<script setup name="Config">
|
||||
import {reportList, reports} from "./components/report.js";
|
||||
import {formatDateStr} from "@/utils/index.js";
|
||||
import { getCurrentInstance, toRefs } from 'vue';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
@@ -187,30 +188,27 @@ function getList() {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
authoredTime.value = [
|
||||
formatDateStr(new Date(new Date().setDate(new Date().getDate() - 3)), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
];
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
/** 表单重置 */
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
dateRange.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
function printReport(row) {
|
||||
reports(row.id).then( response => {
|
||||
|
||||
// TODO: 处理报告打印逻辑
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user