diff --git a/src/api/liswork/labItem/LabItem.ts b/src/api/liswork/labItem/LabItemApi.ts similarity index 100% rename from src/api/liswork/labItem/LabItem.ts rename to src/api/liswork/labItem/LabItemApi.ts diff --git a/src/api/liswork/xtwh/ReportSetting.ts b/src/api/liswork/xtwh/ReportSettingApi.ts similarity index 100% rename from src/api/liswork/xtwh/ReportSetting.ts rename to src/api/liswork/xtwh/ReportSettingApi.ts diff --git a/src/hooks/index.ts b/src/hooks/index.ts new file mode 100644 index 0000000..cb4a2c5 --- /dev/null +++ b/src/hooks/index.ts @@ -0,0 +1 @@ +export * from './lisData/dictData'; \ No newline at end of file diff --git a/src/hooks/lisData/dictData.ts b/src/hooks/lisData/dictData.ts index 375e16c..75483cc 100644 --- a/src/hooks/lisData/dictData.ts +++ b/src/hooks/lisData/dictData.ts @@ -21,20 +21,20 @@ export const getYqData = () => { //'XMGL','ITEMCLASS', 'YQDL' export const getDictData = async (...args: string[]) => { const dictRefs = await comDict(...args); - // 从 ref 中获取实际数据 - dictData.value = { - XMGL: toRaw(dictRefs.XMGL.value) || [], - ITEMCLASS: toRaw(dictRefs.ITEMCLASS.value) || [], - YQDL: toRaw(dictRefs.YQDL.value) || [] - }; + if(dictRefs.XMGL != undefined) dictData.value.XMGL = toRaw(dictRefs.XMGL.value) || [] + if(dictRefs.ITEMCLASS != undefined) dictData.value.ITEMCLASS = toRaw(dictRefs.ITEMCLASS.value) || [] + if(dictRefs.YQDL != undefined) dictData.value.YQDL = toRaw(dictRefs.YQDL.value) || [] } -// 格式化字典数据方法 -export const formatDict = async (v: string, dictType: string) => { - return dictData.value[dictType]?.find((item: any) => item.value == v.trim())?.label; +//字典数据格式化方法 +export const formatDict = (v: string, dictType: string) => { + if(v == undefined) return ; + return dictData.value[dictType]?.find((item: any) => item.value == v.trim())?.label; } //仪器格式化方法 export const formatInstr = (v: string) => { return instrOptions.value.find((item: any) => item.yq == v.trim())?.yqmc; -} \ No newline at end of file +} + +export {dictData} \ No newline at end of file diff --git a/src/hooks/lisData/index.ts b/src/hooks/lisData/index.ts deleted file mode 100644 index 779dcd0..0000000 --- a/src/hooks/lisData/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './dictData'; \ No newline at end of file diff --git a/src/types/Object.d.ts b/src/types/Object.d.ts new file mode 100644 index 0000000..5ef38a3 --- /dev/null +++ b/src/types/Object.d.ts @@ -0,0 +1,97 @@ +export interface LabReportInstr { + index?: number; //序号 + yq: string; //仪器 + xh: number; //序号 + bgdh: string; //报告单号 + yljg: string; //医疗机构 + type: string; //使用类型 + condition: string; //使用条件 + status?: string; //状态 +} + +export interface DictData { + XMGL?: Array; + ITEMCLASS?: Array; + YQDL?: Array; + xmlbList?: Array; + YQ?: Array; + [key: string]: any[] | undefined; // 添加索引签名以支持动态访问 +} + + +export class LabInstr { + yq: string; //仪器 + yqmc: string; //仪器名称 + yqdl: string; //仪器大类 +} + +export class XmInfoNew { + xmid: string; //项目ID + xmdh: string; //项目代号 + xmmc: string; //项目名称 + cksx: number;//参考值上限 + ckxx: number;//参考值下限 + dw: string; //单位 + dyckz: string; //对应参考值 + dyxh: number; //对应序号 + xmlb: string; //项目类别 + jsxm: string; //计算项目 + yqdl: string; //仪器大类 + val1: string; //备用1 + val2: string; //备用2 + val3: string; //备用3 + val4: string; //备用4 + val5: string; //备用5 + uflag: string; //是否无效 + cp_jgz?: string; + jgbz: string; + jgz: string; + xmgl: string; + mrz: string; + qccv: string; + xsbs: string; + whocode: string; + germflag: string; + yymc: string; + knowledge: string; + xsws: string; + dylx: string; + zhbdh: string; + bgdh: string; + jg: string; + zjf: string; + csff: string; + fzdyxh: number; + itemclass: string; + jsgs: string; + ygxb: string; + ygnl: string; + ygbb: string; + ygzq: string; + ygzd: string; + sjx: string; + xjx: string; + jgjg: string; + hlimt: string; + llimit: string; + redoxx: string; + redosx: string; +} + +// 定义菜单项的类型 +export interface ContextMenuItem { + // 菜单项类型:普通项或分隔线 + type?: 'item' | 'divider'; + // 菜单项显示文本 + label?: string; + // 菜单项唯一标识,用于事件处理 + action?: string; + // 是否为危险操作(如删除) + danger?: boolean; + // 是否禁用 + disabled?: boolean; + // 快捷键提示文本 + shortcut?: string; + // 菜单项的子级菜单项 + props?: Record; +} \ No newline at end of file diff --git a/src/views/liswork/labItem/index.vue b/src/views/liswork/labItem/index.vue index bc4a735..b20e6b0 100644 --- a/src/views/liswork/labItem/index.vue +++ b/src/views/liswork/labItem/index.vue @@ -6,14 +6,17 @@ - @@ -21,7 +24,8 @@ @change="getList"/> - @@ -78,7 +82,7 @@