diff --git a/src/api/liswork/batchCheck/batchCheckApi.ts b/src/api/liswork/batchCheck/batchCheckApi.ts new file mode 100644 index 0000000..6807596 --- /dev/null +++ b/src/api/liswork/batchCheck/batchCheckApi.ts @@ -0,0 +1,29 @@ +// @ts-ignore +import request from "@/utils/request"; + +//获取批量审核列表数据 +export function queryBatchCheckListService(query: any) { + return request({ + url: "/batchCheck/query", + method: "post", + data: query, + }); +} + +//批量审核 +export function batchCheckService(data: any) { + return request({ + url: "/batchCheck/checkData", + method: "post", + data, + }); +} + +//取消批量审核 +export function cancelBatchCheckService(data: any) { + return request({ + url: "/batchCheck/unCheckData", + method: "post", + data, + }); +} diff --git a/src/hooks/lisData/dictData.ts b/src/hooks/lisData/dictData.ts index 10db473..10c2e2f 100644 --- a/src/hooks/lisData/dictData.ts +++ b/src/hooks/lisData/dictData.ts @@ -1,44 +1,47 @@ //仪器,字典数据自动格式化类 -import { DictData } from '@/types/index'; -import { getGroupInstrdList } from '@/api/liswork/work/LisWork'; +import { DictData } from "@/types/index"; +import { getGroupInstrdList } from "@/api/liswork/work/LisWork"; //@ts-ignore -import { comDict } from '@/utils/dict' +import { comDict } from "@/utils/dict"; const dictData = ref({}); const instrOptions = ref<{ yq: string; yqmc: string }[]>([]); export const getYqData = (data?: any) => { - // 避免重复请求 + // 避免重复请求 // if (instrOptions.value.length > 0) return; getGroupInstrdList(data).then((res: any) => { if (res.code == 0) { instrOptions.value = res.data.map((item: any) => ({ yq: item.yq.trim(), - yqmc: item.yqmc + yqmc: item.yqmc, })); } - }) + }); }; //'XMGL','ITEMCLASS', 'YQDL' export const getDictData = async (...args: string[]) => { const dictRefs = await comDict(...args); // 遍历传入的字典类型参数,动态处理赋值 - args.forEach(key => { + args.forEach((key) => { if (dictRefs[key] !== undefined) { dictData.value[key] = toRaw(dictRefs[key].value) || []; } }); -} +}; //字典数据格式化方法 export const formatDict = (v: string, dictType: string) => { if (v == undefined) return; - return dictData.value[dictType]?.find((item: any) => item.value == v.trim())?.label || v; -} + return ( + dictData.value[dictType]?.find((item: any) => item.value == v.trim()) + ?.label || v + ); +}; //仪器格式化方法 export const formatInstr = (v: string) => { return instrOptions.value.find((item: any) => item.yq == v.trim())?.yqmc || v; -} +}; -export { dictData, instrOptions } \ No newline at end of file +export { dictData, instrOptions }; diff --git a/src/utils/czUtil/lisUtil.ts b/src/utils/czUtil/lisUtil.ts index 64cb077..74f2b32 100644 --- a/src/utils/czUtil/lisUtil.ts +++ b/src/utils/czUtil/lisUtil.ts @@ -1,5 +1,21 @@ - - // export function getArrayMaxXh(tableList: Array) { // return tableList.length > 0 ? Math.max(...tableList.map((item:any) => item.xh || 0)) : 0; -// } \ No newline at end of file +// } + +//性别转换 +export function displayBRXB(brxb: string) { + if (brxb === "" || brxb === null || brxb === undefined) { + return ""; + } + return brxb === "1" ? "男" : "女"; +} + +//年龄转换 +export function displayBRNL(nl: string | number, nldw: string) { + if (nl === "" || nl === null || nl === undefined) { + return ""; + } + return ( + nl + (nldw === "1" ? "岁" : nldw === "2" ? "月" : nldw === "3" ? "天" : "") + ); +} diff --git a/src/views/liswork/batchCheck/index.vue b/src/views/liswork/batchCheck/index.vue index cd6b033..c79b85a 100644 --- a/src/views/liswork/batchCheck/index.vue +++ b/src/views/liswork/batchCheck/index.vue @@ -1,78 +1,127 @@ - +