From 3eb9a9d9f1e1fff13b4878f13aff28decc1f4516 Mon Sep 17 00:00:00 2001 From: wyuu Date: Fri, 3 Jul 2026 18:03:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../batchCheckApi.ts => batch/index.ts} | 18 + src/api/liswork/xtwh/StatstemplateApi.ts | 65 +-- src/assets/styles/index.scss | 75 ++++ src/assets/styles/ruoyi.scss | 19 +- src/components/SelectTable/index.vue | 1 - src/hooks/lisData/dictData.ts | 33 +- src/views/checkCode/index.vue | 4 +- src/views/checkCode/report/index.vue | 4 +- src/views/lisquery/reportQuery/index.vue | 4 +- src/views/liswork/Issueorder/index.vue | 9 +- src/views/liswork/batchCheck/LabResult.vue | 2 +- src/views/liswork/batchCheck/LabResultMed.vue | 2 +- src/views/liswork/batchCheck/index.vue | 4 +- src/views/liswork/batchPrint/index.vue | 187 ++++---- src/views/liswork/components/charge/index.vue | 2 +- .../liswork/components/combination/index.vue | 2 +- .../liswork/components/history/index.vue | 2 +- .../liswork/components/othersResult/index.vue | 2 +- .../liswork/components/wswHistory/index.vue | 2 +- src/views/liswork/labItem/BatchInstrVs.vue | 2 +- src/views/liswork/labItem/index.vue | 2 +- .../liswork/labItem/tab/CommonlyValues.vue | 2 +- .../labItem/tab/base/child/CalcGuilde.vue | 2 +- .../labItem/tab/base/child/Condition.vue | 4 +- .../labItem/tab/commonDescriptions.vue | 2 +- src/views/liswork/labItem/tab/knowledge.vue | 2 +- .../labItem/tab/referenceValueDetails.vue | 2 +- src/views/liswork/labItem/tab/useInstr.vue | 2 +- src/views/liswork/micro/labpatlist.vue | 2 +- .../liswork/micro/labresult/cbReport.vue | 2 +- .../labresult/components/combinedDialog.vue | 2 +- .../labresult/components/commentDialog.vue | 2 +- src/views/liswork/micro/labresult/pyj.vue | 2 +- src/views/liswork/micro/labresult/record.vue | 2 +- .../liswork/micro/labresult/zbReport.vue | 2 +- .../liswork/qualityControl/westGard/index.vue | 4 +- .../liswork/reportConsolidation/index.vue | 194 +++++++++ .../liswork/work/components/dlDialog.vue | 2 +- .../liswork/work/components/mergeResults.vue | 2 +- src/views/liswork/work/labpatlist.vue | 2 +- src/views/liswork/work/labresult.vue | 2 +- src/views/liswork/xmKnowledge/Modify.vue | 2 +- src/views/liswork/xmKnowledge/TableData.vue | 2 +- src/views/liswork/xmKnowledge/index.vue | 2 +- src/views/liswork/xtwh/reportItem/index.vue | 25 +- src/views/liswork/xtwh/statstemplate/data.vue | 232 +++++----- src/views/liswork/xtwh/xmFeeInstr/index.vue | 2 +- src/views/liswork/xtwh/xmReqItemVs/index.vue | 2 +- src/views/qualityIndicators/index.vue | 12 +- src/views/regional/circulation/bbcx/index.vue | 2 +- src/views/regional/circulation/bbqs/index.vue | 2 +- src/views/regional/circulation/bbth/index.vue | 2 +- src/views/regional/circulation/sjdj/index.vue | 2 +- src/views/regional/circulation/zycy/index.vue | 2 +- .../inspectionReport/report/index.vue | 2 +- src/views/regional/statistics/bbtj/index.vue | 2 +- src/views/regional/statistics/fytj/index.vue | 2 +- .../statisticalAnalysis/report/index.vue | 401 ++++++++++++------ 58 files changed, 912 insertions(+), 461 deletions(-) rename src/api/liswork/{batchCheck/batchCheckApi.ts => batch/index.ts} (69%) create mode 100644 src/views/liswork/reportConsolidation/index.vue diff --git a/src/api/liswork/batchCheck/batchCheckApi.ts b/src/api/liswork/batch/index.ts similarity index 69% rename from src/api/liswork/batchCheck/batchCheckApi.ts rename to src/api/liswork/batch/index.ts index 91d27b0..43dade1 100644 --- a/src/api/liswork/batchCheck/batchCheckApi.ts +++ b/src/api/liswork/batch/index.ts @@ -36,3 +36,21 @@ export function queryBatchCheckDetailService(query: any) { params: query, }); } + + +// 批量打印查询 +export function queryBatchPrintService(query: any) { + return request({ + url: "/batchPrint/queryList", + method: "post", + data: query, + }); +} +// 批量打印数据 +export function batchPrintAll(query: any) { + return request({ + url: "/batchPrint/printAll", + method: "post", + data: query, + }); +} diff --git a/src/api/liswork/xtwh/StatstemplateApi.ts b/src/api/liswork/xtwh/StatstemplateApi.ts index 3a8a370..fac9ef5 100644 --- a/src/api/liswork/xtwh/StatstemplateApi.ts +++ b/src/api/liswork/xtwh/StatstemplateApi.ts @@ -3,44 +3,53 @@ import request from '@/utils/request' // 查询字典列表 -export function liststatstemp(params:any) { - return request({ - url: '/statstemp/list', - method: 'get', - params - }) +export function liststatstemp(params: any) { + return request({ + url: '/statstemp/list', + method: 'get', + params + }) +} +// 复制模板 +export function copyParameter(params: any) { + return request({ + url: '/statstemp/param/copyparameter', + method: 'get', + params + }) } // 查询字典详细 -export function getstatstemp(id:number) { - return request({ - url: `/statstemp/${id}`, - method: 'get' - }) +export function getstatstemp(id: number) { + return request({ + url: `/statstemp/${id}`, + method: 'get' + }) } // 新增字典 -export function addstatstemp(params:any) { - return request({ - url: '/statstemp', - method: 'post', - data:params - }) +export function addstatstemp(params: any) { + return request({ + url: '/statstemp', + method: 'post', + data: params + }) } // 修改字典 -export function updatestatstemp(params:any) { - return request({ - url: '/statstemp', - method: 'put', - data:params - }) +export function updatestatstemp(params: any) { + return request({ + url: '/statstemp', + method: 'put', + data: params + }) } // 删除字典 -export function delstatstemp(id:any) { - return request({ - url: `/statstemp/${id}`, - method: 'delete' - }) +export function delstatstemp(id: any) { + return request({ + url: `/statstemp/${id}`, + method: 'delete' + }) } + diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index d4113fc..b5c4cb6 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -394,4 +394,79 @@ aside { .el-form-item { margin-bottom: 10px; } +} + + +.bb_table { + .vxe-table.border--full { + border: 1px solid #ccc !important; + + .vxe-header--column, + .vxe-body--column, + .vxe-footer--column { + border-right: 1px solid #ccc !important; + border-bottom: 1px solid #ccc !important; + height: 30px; + line-height: 30px; + padding: 0 !important; + background-image: none !important; + } + + .vxe-footer--column { + border-bottom: none !important; + } + + + /* 表头最下方单元格强制底红线 */ + .vxe-header--row:last-of-type .vxe-header--column { + border-bottom: 1px solid #ccc !important; + } + + .vxe-body--row { + border-bottom: 1px solid #ccc !important; + } + + .vxe-footer--row.vxe-footer--row { + border-top: 1px solid #ccc !important; + } + + + + .vxe-header--row th { + height: 30px !important; + line-height: 30px; + padding: 0 !important; + } + + .vxe-body--row td { + height: 30px !important; + line-height: 30px; + padding: 0 !important; + } + + + .vxe-footer--row td { + height: 30px !important; + line-height: 30px; + font-size: 13px; + font-weight: 700; + padding: 0 !important; + } + + /* 清除最后一列重复竖线,避免双线重叠 */ + .vxe-header--col:last-child .vxe-header--column, + .vxe-body--col:last-child .vxe-body--column, + .vxe-footer--col:last-child .vxe-footer--column { + border-right: none !important; + } + } + + .vxe-table--render-default .vxe-table--footer-wrapper { + border-top: 1px solid #ccc !important; + } + + .vxe-table--header-wrapper { + border-bottom: 1px solid #ccc !important; + background-color: #eff6fa !important; + } } \ No newline at end of file diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss index a0cc618..8d0589a 100644 --- a/src/assets/styles/ruoyi.scss +++ b/src/assets/styles/ruoyi.scss @@ -340,16 +340,17 @@ - .vxe-table { - border: 1px solid #96B8D9 !important; - border-top: none !important; - /* 蓝色外边框 */ - border-radius: .5rem; - /* 可选:添加边框圆角 */ - overflow: hidden; - } + .mytable-style { + .vxe-table { + border: 1px solid #96B8D9 !important; + border-top: none !important; + /* 蓝色外边框 */ + border-radius: .5rem; + /* 可选:添加边框圆角 */ + overflow: hidden; + } .vxe-header--column { word-break: break-word; @@ -465,7 +466,7 @@ /** 表格布局 **/ .pagination-container { position: relative; - height: 25px; + height: 50px; margin-bottom: 10px; margin-top: 15px; padding: 10px 20px !important; diff --git a/src/components/SelectTable/index.vue b/src/components/SelectTable/index.vue index df428b5..f3dfea4 100644 --- a/src/components/SelectTable/index.vue +++ b/src/components/SelectTable/index.vue @@ -55,7 +55,6 @@ import { reactive, ref, onMounted, watch, nextTick, toRaw } from "vue"; import { getFirstLetter } from '@/utils/pinyin'; import { ElEmpty } from 'element-plus'; -// @ts-ignore import { comDict } from '@/utils/dict' import { getoptionselect } from '@/api/liswork/xtwh/localconfigApi' import { Emits, Props } from '@/types'; diff --git a/src/hooks/lisData/dictData.ts b/src/hooks/lisData/dictData.ts index 01c09d3..f7d60e2 100644 --- a/src/hooks/lisData/dictData.ts +++ b/src/hooks/lisData/dictData.ts @@ -1,7 +1,6 @@ //仪器,字典数据自动格式化类 import { DictData } from "@/types/index"; import { getGroupInstrdList } from "@/api/liswork/work/LisWork"; -//@ts-ignore import { comDict } from "@/utils/dict"; const dictData = ref({}); @@ -19,16 +18,30 @@ export const getYqData = (data?: any) => { } }); }; -//'XMGL','ITEMCLASS', 'YQDL' +// 正在请求中的字典标记,防止并发重复调用 +const pendingDict = new Set() + export const getDictData = async (...args: string[]) => { - const dictRefs = await comDict(...args); - // 遍历传入的字典类型参数,动态处理赋值 - args.forEach((key) => { - if (dictRefs[key] !== undefined) { - dictData.value[key] = toRaw(dictRefs[key].value) || []; - } - }); -}; + // 过滤:无缓存 且 当前没有正在请求 + const needReqKeys = args.filter(key => !(key in dictData.value) && !pendingDict.has(key)) + + if (needReqKeys.length === 0) return + + // 标记开始请求 + needReqKeys.forEach(k => pendingDict.add(k)) + + try { + const dictRefs = await comDict(...needReqKeys) + needReqKeys.forEach((key) => { + if (dictRefs[key] !== undefined) { + dictData.value[key] = toRaw(dictRefs[key].value) || [] + } + }) + } finally { + // 请求结束无论成功失败都清除标记 + needReqKeys.forEach(k => pendingDict.delete(k)) + } +} //字典数据格式化方法 export const formatDict = (v: string, dictType: string) => { diff --git a/src/views/checkCode/index.vue b/src/views/checkCode/index.vue index fb83b40..20451d9 100644 --- a/src/views/checkCode/index.vue +++ b/src/views/checkCode/index.vue @@ -167,8 +167,8 @@ import { ref, reactive, toRaw, computed, watch, nextTick, onMounted, } from 'vue'; import { HiprintPrinter } from '@/utils/hiprintPrinter'; import { classCom } from '@/utils/classCom'; -import CustomTable from '@/components/elTable/index.vue' -import CustomVxeTable from '@/components/vxeTable/index.vue' +import CustomTable from '@/components/ElTable/index.vue' +import CustomVxeTable from '@/components/VxeTable/index.vue' import { useRouter, useRoute } from 'vue-router' import { usePrintStore } from '@/store/modules/printStore' import { checkPrintService, downloadPrintSetup } from '@/utils/printHelper' diff --git a/src/views/checkCode/report/index.vue b/src/views/checkCode/report/index.vue index a966082..b39c0a9 100644 --- a/src/views/checkCode/report/index.vue +++ b/src/views/checkCode/report/index.vue @@ -189,8 +189,8 @@ + + \ No newline at end of file diff --git a/src/views/liswork/work/components/dlDialog.vue b/src/views/liswork/work/components/dlDialog.vue index 3091447..488dd8e 100644 --- a/src/views/liswork/work/components/dlDialog.vue +++ b/src/views/liswork/work/components/dlDialog.vue @@ -28,7 +28,7 @@ - + diff --git a/src/views/liswork/xtwh/statstemplate/data.vue b/src/views/liswork/xtwh/statstemplate/data.vue index 4b07170..6f85d56 100644 --- a/src/views/liswork/xtwh/statstemplate/data.vue +++ b/src/views/liswork/xtwh/statstemplate/data.vue @@ -3,52 +3,22 @@ - - + + - + - + - - + + @@ -71,45 +41,44 @@ 导出 + + 复制模版 +
- + - + - + - - - - + + @@ -133,29 +102,15 @@
- + - - + + @@ -168,17 +123,9 @@ - - + + @@ -190,11 +137,7 @@ - + {{ dict.label }} @@ -207,11 +150,7 @@ - + {{ dict.label }} @@ -229,6 +168,19 @@ + + + + + + + + + + @@ -239,20 +191,28 @@ import { getstatsparam, liststatsparam, updatestatsparam -} from "@/api/liswork/xtwh/statsparameterApi.ts"; +} from "@/api/liswork/xtwh/StatsparameterApi.ts"; +import { liststatstemp, copyParameter } from "@/api/liswork/xtwh/StatstemplateApi.ts"; +import { copy } from "clipboard"; const route = useRoute(); // ========== 基础变量声明(避免提前访问) ========== // 菜单名称 const menuname = ref("参数明细"); const statsCode = ref("1"); + +const copyOpen = ref(false); +const copyTemplate = ref(""); +const copyTemplateOptions = ref([]) + // 报表类别选项 const paramTypeOptions = ref([ - { label: "过滤参数", value: "0"}, - { label: "显示列", value: "1"}, - { label: "过滤+显示", value: "2"}, - { label: "汇总栏", value: "3"}, - { label: "子查询", value: "4"}, - { label: "逻辑条件", value: "5"} + { label: "过滤参数", value: "0" }, + { label: "显示列", value: "1" }, + { label: "过滤+显示", value: "2" }, + { label: "汇总栏", value: "3" }, + { label: "子查询", value: "4" }, + { label: "逻辑条件", value: "5" }, + { label: "计算列", value: "6" } ]); // 图表类型选项 @@ -275,10 +235,10 @@ const proxy = instance?.proxy || null; // 字典数据(空值保护) const sys_normal_disable = proxy?.useDict("sys_normal_disable")?.sys_normal_disable || []; -const sys_yes_no= proxy?.useDict("sys_yes_no")?.sys_yes_no || []; +const sys_yes_no = proxy?.useDict("sys_yes_no")?.sys_yes_no || []; // 表单数据 const form = ref({ - statsCode:statsCode.value, + statsCode: statsCode.value, paramId: undefined, paramCode: undefined, paramName: undefined, @@ -287,8 +247,8 @@ const form = ref({ paramType: paramTypeOptions.value[0]?.value || "", paramOptiontype: paramOptiontypeOptions.value[0]?.value || "", paramSql: "", // SQL语句(绑定到SqlEditor组件) - paramSequence:0, - paramHide:"", + paramSequence: 0, + paramHide: "", paramSort: 0, status: "0", remark: undefined @@ -342,9 +302,9 @@ function resetForm() { precondition: undefined, paramType: paramTypeOptions.value[0]?.value || "", paramOptiontype: paramOptiontypeOptions.value[0]?.value || "", - paramSequence:0, - paramHide:"", - statsCode:statsCode.value, + paramSequence: 0, + paramHide: "", + statsCode: statsCode.value, paramSql: "", paramSort: 0, status: "0", @@ -361,18 +321,23 @@ function getList() { loading.value = true; const params = queryParams.value || { pageNum: 1, pageSize: 30 }; liststatsparam(params) - .then(response => { - regdictList.value = response?.rows || []; - total.value = response?.total || 0; - }) - .catch(() => { - regdictList.value = []; - total.value = 0; - proxy && proxy.$modal.msgError("数据加载失败"); - }) - .finally(() => { - loading.value = false; - }); + .then(response => { + regdictList.value = response?.rows || []; + total.value = response?.total || 0; + }) + .catch(() => { + regdictList.value = []; + total.value = 0; + proxy && proxy.$modal.msgError("数据加载失败"); + }) + .finally(() => { + loading.value = false; + }); + + + liststatstemp().then(response => { + copyTemplateOptions.value = response?.rows || []; + }) } // 搜索 @@ -450,6 +415,21 @@ function handleExport() { }, `报表模板_${new Date().getTime()}.xlsx`); } +const copyTem = () => { + copyOpen.value = true; + copyTemplate.value = '' +} + +const copyTemplateSubmit = () => { + copyParameter({ statsCode: statsCode.value, statsCodeother: copyTemplate.value }).then(res => { + if (res.code == 200) { + getList() + proxy && proxy.$modal.msgSuccess("复制成功") + copyOpen.value = false + } + }) +} + // 提交表单 async function submitForm() { if (!proxy || !proxy.$refs || !proxy.$refs.statsparamRef) return; @@ -488,8 +468,8 @@ function cancel() { getTypes(route.query && route.query.statsCode); /** 查询字典类型详细 */ function getTypes(statsCode0) { - statsCode.value=statsCode0 - queryParams.value.statsCode =statsCode0; + statsCode.value = statsCode0 + queryParams.value.statsCode = statsCode0; getList(); } @@ -544,6 +524,10 @@ function getTypes(statsCode0) { .compact-form { --el-form-item-margin-bottom: 8px; line-height: 1.4; + + .el-form-item { + margin-bottom: 8px; + } } :deep(.compact-form .el-form-item__label) { diff --git a/src/views/liswork/xtwh/xmFeeInstr/index.vue b/src/views/liswork/xtwh/xmFeeInstr/index.vue index 6b4cbf3..e560391 100644 --- a/src/views/liswork/xtwh/xmFeeInstr/index.vue +++ b/src/views/liswork/xtwh/xmFeeInstr/index.vue @@ -34,7 +34,7 @@ -