diff --git a/frontend/src/api/device/interface/report.ts b/frontend/src/api/device/interface/report.ts new file mode 100644 index 0000000..eb1b8bc --- /dev/null +++ b/frontend/src/api/device/interface/report.ts @@ -0,0 +1,38 @@ +import type { ReqPage, ResPage } from '@/api/interface' + +// 报告模版接口 +export namespace PqReport { + + /** + * 报告模版表格分页查询参数 + */ + export interface ReqReportParams extends ReqPage { + id: string; // 装置序号id 必填 + name?: string; // 设备名称 + createTime?: string; //创建时间 + } + + /** + * 报告模版新增、修改、根据id查询返回的对象 + */ + export interface ResReport { + id: string; //报告模板id + name: string;//报告模板名称 + version:string;//版本号 + basePath:string;//基础模板文件路径 + detailPath:string;//检测项模版文件路径 + desc:string;//描述信息 + enable:number;//状态:8-删除 1-激活 2-未激活 + createBy?: string| null; //创建用户 + createTime?: string| null; //创建时间 + updateBy?: string| null; //更新用户 + updateTime?: string| null; //更新时间 + } + + /** + * 报告模版表格查询分页返回的对象; + */ + export interface ResReportPage extends ResPage { + + } +} \ No newline at end of file diff --git a/frontend/src/layouts/components/Header/components/ThemeDialog.vue b/frontend/src/layouts/components/Header/components/ThemeDialog.vue index 8aec3e3..7d2d1be 100644 --- a/frontend/src/layouts/components/Header/components/ThemeDialog.vue +++ b/frontend/src/layouts/components/Header/components/ThemeDialog.vue @@ -22,6 +22,9 @@ import { on } from "events"; const dialogVisible = ref(false); const openDialog = () => { + // 修复:使用可选链和空值合并运算符确保不会出现 null 或 undefined + const storedColor = JSON.parse(localStorage.getItem('cn-global') ?? '{}').primary; + color.value = storedColor ?? '#526ADE'; // 默认值为 '#526ADE' dialogVisible.value = true; }; @@ -30,11 +33,12 @@ import { on } from "events"; dialogVisible.value = false; }; - onMounted(() => { - // 修复:使用可选链和空值合并运算符确保不会出现 null 或 undefined - const storedColor = JSON.parse(localStorage.getItem('cn-global') ?? '{}').primary; - color.value = storedColor ?? '#526ADE'; // 默认值为 '#526ADE' - }) + // onMounted(() => { + // // 修复:使用可选链和空值合并运算符确保不会出现 null 或 undefined + // const storedColor = JSON.parse(localStorage.getItem('cn-global') ?? '{}').primary; + // console.log('123',storedColor) + // color.value = storedColor ?? '#526ADE'; // 默认值为 '#526ADE' + // }) defineExpose({ openDialog }); diff --git a/frontend/src/views/system/template/components/reportPopup.vue b/frontend/src/views/system/template/components/reportPopup.vue new file mode 100644 index 0000000..e69de29 diff --git a/frontend/src/views/system/template/index.vue b/frontend/src/views/system/template/index.vue new file mode 100644 index 0000000..1f3791e --- /dev/null +++ b/frontend/src/views/system/template/index.vue @@ -0,0 +1,146 @@ + + + + \ No newline at end of file