From e86dda55021655fcd1f12bdcd9af685957dd6709 Mon Sep 17 00:00:00 2001 From: wyuu Date: Thu, 4 Dec 2025 18:13:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?wsw=E5=8E=86=E5=8F=B2=E5=AF=B9=E7=85=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/liswork/micro/index.ts | 8 + src/assets/styles/ruoyi.scss | 44 ++-- src/utils/request.js | 3 + .../liswork/components/history/index.vue | 30 ++- .../liswork/components/othersResult/index.vue | 4 + .../liswork/components/wswHistory/index.vue | 210 ++++++++++++++++++ src/views/liswork/micro/index.vue | 40 ++-- .../liswork/micro/labresult/zbReport.vue | 15 +- src/views/liswork/work/index.vue | 31 +-- 9 files changed, 324 insertions(+), 61 deletions(-) create mode 100644 src/views/liswork/components/wswHistory/index.vue diff --git a/src/api/liswork/micro/index.ts b/src/api/liswork/micro/index.ts index 0acd6c5..bc1ae45 100644 --- a/src/api/liswork/micro/index.ts +++ b/src/api/liswork/micro/index.ts @@ -19,6 +19,14 @@ export function wswsamplelistpage(query?: Object) { }) } // 获取微生物样本信息 +export function wswsampleinfo(query?: Object) { + return request({ + url: '/lisworkgerm/germsampleinfo', + method: 'get', + params: query + }) +} +// 获取微生物结果信息 export function sampleMedInfo(query?: Object) { return request({ url: '/lisworkgerm/getresultlist', diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss index 7e7c07d..c69d1db 100644 --- a/src/assets/styles/ruoyi.scss +++ b/src/assets/styles/ruoyi.scss @@ -5,67 +5,67 @@ /** 基础通用 **/ .pt5 { - padding-top: 5px; + padding-top: .3125rem; } .pr5 { - padding-right: 5px; + padding-right: .3125rem; } .pb5 { - padding-bottom: 5px; + padding-bottom: .3125rem; } .mt5 { - margin-top: 5px; + margin-top: .3125rem; } .mr5 { - margin-right: 5px; + margin-right: .3125rem; } .mb5 { - margin-bottom: 5px; + margin-bottom: .3125rem; } .mb8 { - margin-bottom: 8px; + margin-bottom: .5rem; } .ml5 { - margin-left: 5px; + margin-left: .3125rem; } .mt10 { - margin-top: 10px; + margin-top: .625rem; } .mr10 { - margin-right: 10px; + margin-right: .625rem; } .mb10 { - margin-bottom: 10px; + margin-bottom: .625rem; } .ml10 { - margin-left: 10px; + margin-left: .625rem; } .mt20 { - margin-top: 20px; + margin-top: 1.25rem; } .mr20 { - margin-right: 20px; + margin-right: 1.25rem; } .mb20 { - margin-bottom: 20px; + margin-bottom: 1.25rem; } .ml20 { - margin-left: 20px; + margin-left: 1.25rem; } .cp { @@ -213,8 +213,8 @@ .el-table__body-wrapper .el-table-column--selection>.cell { padding: 0 !important; - height: 30px; - line-height: 30px; + height: 1.875rem; + line-height: 1.875rem; } .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell { @@ -224,8 +224,8 @@ .cell.el-tooltip { padding: 0 !important; - height: 30px; - line-height: 30px; + height: 1.875rem; + line-height: 1.875rem; } .el-table-header-cell .cell { @@ -241,8 +241,8 @@ .el-table__cell { padding: 0 !important; - height: 30px; - line-height: 30px; + height: 1.875rem; + line-height: 1.875rem; } .el-checkbox { diff --git a/src/utils/request.js b/src/utils/request.js index 311bc7a..e37edb9 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -120,6 +120,9 @@ service.interceptors.response.use(res => { if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') { return res.data } + if (code == -1) { + return Promise.resolve(res.data) + } if (code === 401) { if (!isRelogin.show) { isRelogin.show = true; diff --git a/src/views/liswork/components/history/index.vue b/src/views/liswork/components/history/index.vue index eff959b..81a8e66 100644 --- a/src/views/liswork/components/history/index.vue +++ b/src/views/liswork/components/history/index.vue @@ -134,6 +134,9 @@ const formatHeader = (column: any, prefix: string) => { const getList = () => { historyInfo(queryParams.value).then((res: any) => { + tableData.value = [] + getEcharts(null) + if (!res.data) return const periods = ['first', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']; const dataMaps = new Map(); @@ -194,9 +197,12 @@ const getList = () => { return row; }); nextTick(() => { - tableRef.value.setCurrentRow(tableData.value[0]); - getEcharts(tableData.value[0]) + if (tableData.value.length) { + tableRef.value.setCurrentRow(tableData.value[0]); + getEcharts(tableData.value[0]) + } }) + // console.log('合并后的表格数据==>', tableData.value); }); }; @@ -217,9 +223,27 @@ const handleRowClick = (row: any) => { const myEcharts = ref() const getEcharts = (data: any) => { const periods = ['nine', 'eight', 'seven', 'six', 'five', 'four', 'three', 'two', 'one', 'first'] - if (!data) return + + if (!data) { + // 数据为空时清空图表 + if (myEcharts.value) { + const existingInstance = echarts.getInstanceByDom(myEcharts.value); + if (existingInstance) { + existingInstance.clear(); + } + } + return; + } const xData = periods.map(period => { return data[`${period}Date`] })?.filter(Boolean) //过滤掉空值 const yData = periods.map(period => { return data[`${period}Csjg`] })?.filter(Boolean) + // 先获取已有实例并销毁 + if (myEcharts.value) { + const existingInstance = echarts.getInstanceByDom(myEcharts.value); + if (existingInstance) { + echarts.dispose(existingInstance); + } + } + const Intance = echarts.init(myEcharts.value); diff --git a/src/views/liswork/components/othersResult/index.vue b/src/views/liswork/components/othersResult/index.vue index 6a002f9..bb28c2e 100644 --- a/src/views/liswork/components/othersResult/index.vue +++ b/src/views/liswork/components/othersResult/index.vue @@ -153,7 +153,10 @@ const formatHeader = (column: any, prefix: string) => { }; // 获取其他结果信息 const getOthersInfo = () => { + tableData.value = [] + tableDataDetail.value = [] otherinstr(queryParams.value).then((res: any) => { + if (!res.data) return tableData.value = res.data.map((item: any) => { return { ...item, @@ -185,6 +188,7 @@ const handleRowClick = (row: any) => { ybh: row.ybh } otherInstrDetail(data).then((res: any) => { + if (!res.data) return const periods = ['first', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']; const dataMaps = new Map(); diff --git a/src/views/liswork/components/wswHistory/index.vue b/src/views/liswork/components/wswHistory/index.vue new file mode 100644 index 0000000..a0dfb53 --- /dev/null +++ b/src/views/liswork/components/wswHistory/index.vue @@ -0,0 +1,210 @@ + + + + + \ No newline at end of file diff --git a/src/views/liswork/micro/index.vue b/src/views/liswork/micro/index.vue index 86fe029..3477757 100644 --- a/src/views/liswork/micro/index.vue +++ b/src/views/liswork/micro/index.vue @@ -159,7 +159,7 @@ import tabView from '@/components/tabViews/index.vue'; // @ts-ignore import iFrame from "@/components/iFrame/index.vue"; import LabPatList from './labpatlist.vue'; -import History from '../components/history/index.vue' +import History from '../components/wswHistory/index.vue' import OthersResult from '../components/othersResult/index.vue' import Reexamination from '../components/reexamination/index.vue' import Charge from '../components/charge/index.vue' @@ -176,8 +176,8 @@ import Pyj from './labresult/pyj.vue'; import Record from './labresult/record.vue'; // @ts-ignore import { comDict } from '@/utils/dict' -import { queryLabResults, loadDefault, queryLabPat, instrdconfig, delSample, getGroupInstrdList, checkuser, updateLabPat } from "@/api/liswork/work/LisWork"; -import { wswsamplelistpage, sampleMedInfo, changepatjyrq } from "@/api/liswork/micro/index"; +import { queryLabResults, loadDefault, instrdconfig, delSample, getGroupInstrdList, checkuser, updateLabPat } from "@/api/liswork/work/LisWork"; +import { wswsamplelistpage, sampleMedInfo, changepatjyrq, wswsampleinfo } from "@/api/liswork/micro/index"; import { getComDicts, queryComDictListService } from "@/api/liswork/dict/ComDict"; import { ElMessage, ElMessageBox } from "element-plus"; import BatchCode from '../work/components/batchCode.vue'; @@ -481,7 +481,7 @@ const fetchLabPat = () => { yq: labInfo.value.yq, ybh: labInfo.value.ybh } - queryLabPat(data).then((response: any) => { + wswsampleinfo(data).then((response: any) => { labPat.value = response.data; }) } @@ -506,19 +506,25 @@ const handleQuery = () => { // queryParams.value = { ...queryParams.value }; // 查找匹配的行 const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh); - const row = labPatList.value[matchedIndex] - if (matchedIndex !== -1) { - highlightRowIndex.value = matchedIndex; - // 等待DOM更新后滚动到目标行 - nextTick(() => { - labPatListRef.value.setCurrentRow(row); - }); - selectJob(row); - } else { - handleCreate() - highlightRowIndex.value = -1; - } + // 查询样本信息是否存在 + wswsampleinfo(queryParams.value).then((response: any) => { + if (response.data) { + if (matchedIndex !== -1) { + highlightRowIndex.value = matchedIndex; + // 等待DOM更新后滚动到目标行 + nextTick(() => { + if (activeTab.value == 'LabPatList') { + labPatListRef.value.setCurrentRow(response.data); + } + }); + } + selectJob(response.data); + } else { + handleCreate() + highlightRowIndex.value = -1; + } + }) } @@ -652,7 +658,7 @@ const changeStatus = (updatedPat: any, flag: boolean) => { yq: updatedPat.yq.trim(), ybh: updatedPat.ybh, } - queryLabPat(data).then((response: any) => { + wswsampleinfo(data).then((response: any) => { if (response.code == 0) { labPat.value = response.data; const index = labPatList.value.findIndex((item: any) => item.ybh == updatedPat.ybh); diff --git a/src/views/liswork/micro/labresult/zbReport.vue b/src/views/liswork/micro/labresult/zbReport.vue index 31ef8a5..88f9ce2 100644 --- a/src/views/liswork/micro/labresult/zbReport.vue +++ b/src/views/liswork/micro/labresult/zbReport.vue @@ -128,7 +128,7 @@ 评语模板 确定 + @click="handleTextarea">保存 清除 @@ -670,6 +670,8 @@ const mbStore = useCommonStore(); const tableData: any = ref([]) watch(labResutsData, (newVal: any) => { + console.log("🚀 ~ newVal:", newVal) + if (newVal.length) { tableData.value = newVal.map((item: any) => { return { @@ -688,7 +690,7 @@ watch(labResutsData, (newVal: any) => { ymselectedRows.value = [] } - if (props.labPat.jgbz != null && props.labPat.jgbz != 0 && props.labPat.jgbz != 'C') return; + if (labPat.value.jgbz == 2) return; // console.log('mbStore==>', mbStore.lxsrs); if (mbStore.lxsrs.length > 0) { mbStore.lxsrs.forEach((mbmc) => { @@ -714,7 +716,6 @@ watch(labResutsData, (newVal: any) => { const handleTextarea = () => { if (!rowInfo.value.xmdh) return - if (!textarea.value) return ElMessage.warning('请填写专家评语!') savetestResult({ ...rowInfo.value, textresult: textarea.value }).then((res: any) => { if (res.code == 0) { ElMessage.success('保存成功'); @@ -723,15 +724,16 @@ const handleTextarea = () => { }; const rowInfo: any = ref({}) const rowHandle = (row: any) => { + console.log('row==>', row); selectedRows.value = [row]; emitter.emitWithCache('refreshClinical', row); rowInfo.value = row textarea.value = row.textresult const data = { - ybh: labPat.value.ybh, - yq: labPat.value.yq, - jyrq: labPat.value.jyrq, + ybh: row.ybh, + yq: row.yq, + jyrq: row.jyrq, xmdh: row.xmdh } getresultmedList(data).then((res: any) => { @@ -1053,6 +1055,7 @@ const formatJgbz = (v: string) => { .el-radio { margin-right: .3125rem; + height: 1.875rem; :deep(.el-radio__label) { padding-left: 2px !important; diff --git a/src/views/liswork/work/index.vue b/src/views/liswork/work/index.vue index 9905d24..7bba2ab 100644 --- a/src/views/liswork/work/index.vue +++ b/src/views/liswork/work/index.vue @@ -399,22 +399,27 @@ const handleQuery = () => { return; } queryParams.value = { ...queryParams.value }; + + // 查找匹配的行 const matchedIndex = labPatList.value.findIndex((item: any) => item.ybh == queryParams.value.ybh); - const row = labPatList.value[matchedIndex] - - if (matchedIndex !== -1) { - highlightRowIndex.value = matchedIndex; - // 等待DOM更新后滚动到目标行 - nextTick(() => { - labPatListRef.value.setCurrentRow(row); - }); - selectJob(row); - } else { - handleCreate() - highlightRowIndex.value = -1; - } + // 查询样本信息是否存在 + queryLabPat(queryParams.value).then((response: any) => { + if (response.data) { + highlightRowIndex.value = matchedIndex; + // 等待DOM更新后滚动到目标行 + nextTick(() => { + if (activeTab.value == 'LabPatList') { + labPatListRef.value.setCurrentRow(response.data); + } + }); + selectJob(response.data); + } else { + handleCreate() + highlightRowIndex.value = -1; + } + }) } // 创建新样本 From c983532bc7085f4beb5482210caa83ea875243ce Mon Sep 17 00:00:00 2001 From: jiangs <373297395@qq.com> Date: Fri, 5 Dec 2025 17:44:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 + pnpm-lock.yaml | 24 +- src/api/liswork/labItem/LabItemApi.ts | 10 + src/hooks/lisData/dictData.ts | 4 + src/types/Object.d.ts | 4 + src/views/liswork/labItem/BatchInstrVs.vue | 130 +++++ src/views/liswork/labItem/index.vue | 322 ++++++++---- .../liswork/labItem/tab/CommonlyValues.vue | 102 ++-- src/views/liswork/labItem/tab/base/Basic.vue | 491 ++++++++++-------- .../labItem/tab/commonDescriptions.vue | 66 +-- .../labItem/tab/referenceValueDetails.vue | 238 ++++----- src/views/liswork/labItem/tab/useInstr.vue | 119 ++--- 12 files changed, 877 insertions(+), 635 deletions(-) create mode 100644 src/views/liswork/labItem/BatchInstrVs.vue diff --git a/package.json b/package.json index 00c114e..466dd6e 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "js-cookie": "3.0.5", "jsbarcode": "^3.12.1", "jsencrypt": "3.3.2", + "lodash": "^4.17.21", "mitt": "^3.0.1", "nprogress": "0.2.0", "pinia": "2.1.7", @@ -50,6 +51,7 @@ }, "devDependencies": { "@eslint/js": "^9.27.0", + "@types/lodash": "^4.17.21", "@types/vue": "^2.0.0", "@typescript-eslint/eslint-plugin": "^8.46.2", "@typescript-eslint/parser": "^8.46.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9b06f24..7d36d8c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -56,6 +56,9 @@ importers: jsencrypt: specifier: 3.3.2 version: 3.3.2 + lodash: + specifier: ^4.17.21 + version: 4.17.21 mitt: specifier: ^3.0.1 version: 3.0.1 @@ -77,6 +80,9 @@ importers: sortablejs: specifier: ^1.14.0 version: 1.14.0 + three: + specifier: ^0.181.2 + version: 0.181.2 vue: specifier: 3.5.23 version: 3.5.23(typescript@5.9.3) @@ -111,6 +117,9 @@ importers: '@eslint/js': specifier: ^9.27.0 version: 9.27.0 + '@types/lodash': + specifier: ^4.17.21 + version: 4.17.21 '@types/vue': specifier: ^2.0.0 version: 2.0.0(typescript@5.9.3) @@ -599,8 +608,8 @@ packages: '@types/lodash-es@4.17.12': resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==} - '@types/lodash@4.17.20': - resolution: {integrity: sha512-H3MHACvFUEiujabxhaI/ImO6gUrd8oOurg7LQtS7mbwIXA/cUqWrvBsaeJ23aZEPk1TAYkurjfMbSELfoCXlGA==} + '@types/lodash@4.17.21': + resolution: {integrity: sha512-FOvQ0YPD5NOfPgMzJihoT+Za5pdkDJWcbpuj1DjaKZIr/gxodQjY/uWEFlTNqW2ugXHUiL8lRQgw63dzKHZdeQ==} '@types/minimatch@3.0.5': resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==} @@ -2503,6 +2512,9 @@ packages: text-segmentation@1.0.3: resolution: {integrity: sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==} + three@0.181.2: + resolution: {integrity: sha512-k/CjiZ80bYss6Qs7/ex1TBlPD11whT9oKfT8oTGiHa34W4JRd1NiH/Tr1DbHWQ2/vMUypxksLnF2CfmlmM5XFQ==} + tiny-emitter@2.1.0: resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==} @@ -3113,9 +3125,9 @@ snapshots: '@types/lodash-es@4.17.12': dependencies: - '@types/lodash': 4.17.20 + '@types/lodash': 4.17.21 - '@types/lodash@4.17.20': {} + '@types/lodash@4.17.21': {} '@types/minimatch@3.0.5': {} @@ -3817,7 +3829,7 @@ snapshots: '@element-plus/icons-vue': 2.3.2(vue@3.5.23(typescript@5.9.3)) '@floating-ui/dom': 1.6.13 '@popperjs/core': '@sxzz/popperjs-es@2.11.7' - '@types/lodash': 4.17.20 + '@types/lodash': 4.17.21 '@types/lodash-es': 4.17.12 '@vueuse/core': 9.13.0(vue@3.5.23(typescript@5.9.3)) async-validator: 4.2.5 @@ -5355,6 +5367,8 @@ snapshots: dependencies: utrie: 1.0.2 + three@0.181.2: {} + tiny-emitter@2.1.0: {} to-object-path@0.3.0: diff --git a/src/api/liswork/labItem/LabItemApi.ts b/src/api/liswork/labItem/LabItemApi.ts index eface31..ead6931 100644 --- a/src/api/liswork/labItem/LabItemApi.ts +++ b/src/api/liswork/labItem/LabItemApi.ts @@ -103,4 +103,14 @@ export function deleteXmInfoVs(query:any){ method: 'delete', params: query }) +} + + +//删除检验项目 +export function deleteXmInfoService(query:any){ + return request({ + url: '/xminfo/del', + method: 'delete', + params: query + }) } \ No newline at end of file diff --git a/src/hooks/lisData/dictData.ts b/src/hooks/lisData/dictData.ts index 79890d6..ca34233 100644 --- a/src/hooks/lisData/dictData.ts +++ b/src/hooks/lisData/dictData.ts @@ -28,6 +28,10 @@ export const getDictData = async (...args: string[]) => { if(dictRefs.LF != undefined) dictData.value.LF = toRaw(dictRefs.LF.value) || [] if(dictRefs.BT != undefined) dictData.value.BT = toRaw(dictRefs.BT.value) || [] if(dictRefs.SLZQ != undefined) dictData.value.SLZQ = toRaw(dictRefs.SLZQ.value) || [] + if(dictRefs.UT != undefined) dictData.value.UT = toRaw(dictRefs.UT.value) || [] //单位 + if(dictRefs.MD != undefined) dictData.value.MD = toRaw(dictRefs.MD.value) || [] //测试方法 + if(dictRefs.ITEMCLASS != undefined) dictData.value.ITEMCLASS = toRaw(dictRefs.ITEMCLASS.value) || [] //细菌项目类别 + if(dictRefs.GBDM != undefined) dictData.value.GBDM = toRaw(dictRefs.GBDM.value) || [] //国标代码 } //字典数据格式化方法 diff --git a/src/types/Object.d.ts b/src/types/Object.d.ts index fa27f22..d498644 100644 --- a/src/types/Object.d.ts +++ b/src/types/Object.d.ts @@ -19,6 +19,10 @@ export interface DictData { LF?: Array; BT?: Array; SLZQ?: Array; + UT?: Array; + MD?: Array; + ITEMCLASS?: Array; + GBDM?: Array; [key: string]: any[] | undefined; // 添加索引签名以支持动态访问 } diff --git a/src/views/liswork/labItem/BatchInstrVs.vue b/src/views/liswork/labItem/BatchInstrVs.vue new file mode 100644 index 0000000..6426d94 --- /dev/null +++ b/src/views/liswork/labItem/BatchInstrVs.vue @@ -0,0 +1,130 @@ + + + + + diff --git a/src/views/liswork/labItem/index.vue b/src/views/liswork/labItem/index.vue index cd1f8b3..39a797b 100644 --- a/src/views/liswork/labItem/index.vue +++ b/src/views/liswork/labItem/index.vue @@ -2,35 +2,34 @@
- + - - - + + + - + - + - + - + + @change="getList" /> @@ -40,34 +39,36 @@ - + + 刷新 新增 删除 - 删除对应 + 批量项目对应 + 批量删除对应 保存 - - -