fix: 添加 doctorreport 路由并修复 inspection/report 组件错误

- 添加 /inspection 路由组,包含 7 个子路由
- 添加 /doctorreport 快捷访问路由指向检查报告页面
- 修复 inspection/report/index.vue 组件错误:
  - 添加缺失的 getCurrentInstance 和 toRefs 导入
  - 修复 resetQuery 函数中未定义的 dateRange 引用
  - 清理未使用的 cancel 函数

修复后用户可通过 /doctorreport 或 /inspection/report 访问检查报告页面
This commit is contained in:
2026-03-09 23:26:49 +08:00
parent 6aff10e240
commit f515b90c43
2 changed files with 83 additions and 14 deletions

View File

@@ -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>