From 623fd6d9477f7e9c589705841a43f0b79942ec36 Mon Sep 17 00:00:00 2001 From: buaixuexideshitongxue <2936013465@qq.com> Date: Wed, 21 Oct 2026 15:35:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E4=B8=8B=E5=8F=91=E9=80=89=E6=8B=A9=E9=80=9A=E6=8A=A5=E6=9C=9F?= =?UTF-8?q?=E6=95=B0=E6=85=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/superviseReport/superviseReport.ts | 8 +++++ src/views/work/BatchDistribute.vue | 34 +++++++++++----------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/src/api/superviseReport/superviseReport.ts b/src/api/superviseReport/superviseReport.ts index 9e671ac..a8a6167 100644 --- a/src/api/superviseReport/superviseReport.ts +++ b/src/api/superviseReport/superviseReport.ts @@ -1,5 +1,13 @@ import request from "@/api/request"; +// 通报期数下拉选项,仅返回报告ID和名称 +export function getReportOptions(query) { + return request.get({ + url: '/supervise/report/options', + query + }); +} + /** * 获取数据 * */ diff --git a/src/views/work/BatchDistribute.vue b/src/views/work/BatchDistribute.vue index b2fa433..7c83f6a 100644 --- a/src/views/work/BatchDistribute.vue +++ b/src/views/work/BatchDistribute.vue @@ -210,6 +210,7 @@ clearable reserve-keyword @change="setReportNameFun(row)" + @visible-change="visible => visible && getReportListDataFun()" placeholder="请选择通报期数" :remote-method="getReportListDataFun" :loading="reportLoading" @@ -725,7 +726,7 @@ import { import feedback from "@/utils/feedback"; import useCatchStore from "@/stores/modules/catch"; import { BASE_PATH } from "@/api/request"; -import {getListData,getReportDetailFun} from "@/api/superviseReport/superviseReport"; +import {getReportOptions} from "@/api/superviseReport/superviseReport"; const catchStore = useCatchStore(); const dict = catchStore.getDicts([ @@ -907,32 +908,31 @@ watch(auditImportShow, (val) => { }); -const reportQuery = ref({ - current: 1, - size: 100, - departBranch:false -}) const reportList = ref([]); const reportLoading = ref(false); +let reportRequestId = 0; const getReportListDataFun = async (val=null)=>{ + const requestId = ++reportRequestId; reportLoading.value=true; try{ - if(val){ - reportQuery.value.reportName = val; - }else{ - reportQuery.value.reportName =null; + const res = await getReportOptions({reportName: val || undefined}); + if(requestId === reportRequestId){ + reportList.value=res; } - const res = await getListData(reportQuery.value); - reportList.value=res.records; - reportLoading.value=false; }catch (e){ - reportLoading.value=false; + if(requestId === reportRequestId){ + reportList.value=[]; + } + }finally{ + if(requestId === reportRequestId){ + reportLoading.value=false; + } } } -const setReportNameFun = async(row)=>{ - let res = await getReportDetailFun(row.reportId); - row.reportNumber=res?.reportName; +const setReportNameFun = (row)=>{ + const report = reportList.value.find(item => item.id === row.reportId); + row.reportNumber=report?.reportName || ""; }