From ea56d292ecb3972f242817ec7a52216aeed870c5 Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Fri, 22 Aug 2025 22:57:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=9B=E6=A0=87=E4=B8=80=E8=A7=88=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- src/api/tender/index.ts | 9 ++ src/utils/request.ts | 17 ++-- src/views/progress/progressCategory/index.vue | 12 ++- src/views/tender/bidd/index.vue | 8 +- src/views/tender/bidd/indexEdit.vue | 90 ++++++++++++------- 6 files changed, 93 insertions(+), 47 deletions(-) diff --git a/.env.development b/.env.development index 97d3ec6..7203b00 100644 --- a/.env.development +++ b/.env.development @@ -12,9 +12,9 @@ VITE_APP_ENV = 'development' # 罗成 # VITE_APP_BASE_API = 'http://192.168.110.213:8899' # 朱银 -# VITE_APP_BASE_API = 'http://192.168.110.149:8899' +VITE_APP_BASE_API = 'http://192.168.110.149:8899' #屈展航 -VITE_APP_BASE_API = 'http://192.168.110.210:8899' +# VITE_APP_BASE_API = 'http://192.168.110.210:8899' # VITE_APP_BASE_API = 'http://192.168.110.209:8899' # 无人机接口地址 diff --git a/src/api/tender/index.ts b/src/api/tender/index.ts index 4c367c5..fd5a8ec 100644 --- a/src/api/tender/index.ts +++ b/src/api/tender/index.ts @@ -113,3 +113,12 @@ export const getUnitList = (query: any): AxiosPromise => { params: query }); }; + +//获取审核状态 +export const getApproval = (id) => { + return request({ + url: '/tender/tenderPlanLimitList/getVersionDetail', + method: 'get', + params: { versions: id } + }); +}; diff --git a/src/utils/request.ts b/src/utils/request.ts index 266d4be..0ff507c 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -176,22 +176,26 @@ service.interceptors.response.use( } ); // 通用下载方法 -export function download(url: string, params: any, fileName: string, isHeader) { +export function download(url: string, params: any, fileName: string, isHeader?: boolean) { downloadLoadingInstance = ElLoading.service({ text: '正在下载数据,请稍候', background: 'rgba(0, 0, 0, 0.7)' }); // prettier-ignore - return service.post(url, params, { + let data={ transformRequest: [ (params: any) => { return tansParams(params); } ], - headers: isHeader?{}:{ 'Content-Type': 'application/x-www-form-urlencoded' }, + headers: isHeader?{'Content-Type': 'application/json'}:{ 'Content-Type': 'application/x-www-form-urlencoded' }, responseType: 'blob' - }).then(async (resp: any) => { + } + if (isHeader) delete data.transformRequest; + return service + .post(url, params, data as any) + .then(async (resp: any) => { const isLogin = blobValidate(resp); if (isLogin) { - console.log("🚀 ~ download ~ resp:", resp) + console.log('🚀 ~ download ~ resp:', resp); const blob = new Blob([resp]); FileSaver.saveAs(blob, fileName); } else { @@ -201,7 +205,8 @@ export function download(url: string, params: any, fileName: string, isHeader) { ElMessage.error(errMsg); } downloadLoadingInstance.close(); - }).catch((r: any) => { + }) + .catch((r: any) => { console.error(r); ElMessage.error('下载文件出现错误,请联系管理员!'); downloadLoadingInstance.close(); diff --git a/src/views/progress/progressCategory/index.vue b/src/views/progress/progressCategory/index.vue index 3af2da8..affd541 100644 --- a/src/views/progress/progressCategory/index.vue +++ b/src/views/progress/progressCategory/index.vue @@ -153,7 +153,6 @@ import { } from '@/api/progress/progressCategory'; import { ProgressCategoryVO, ProgressCategoryQuery, ProgressCategoryForm } from '@/api/progress/progressCategory/types'; import { useUserStoreHook } from '@/store/modules/user'; -import { download } from '@/utils/request'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { progress_unit_type, progress_work_type } = toRefs(proxy?.useDict('progress_unit_type', 'progress_work_type')); @@ -367,9 +366,14 @@ const handleUpdate = async (row: ProgressCategoryVO) => { const handleExport = async () => { const ids = treeRef.value.getCheckedNodes()[0].pathNodes[0].childrenData.map((item) => item.matrixId); - const res = await downloadProgressCategory({ ids }); - download('/progress/progressCategory/export', { ids }, '方阵.xlsx', true); - // window.open(res.data); + proxy?.download( + '/progress/progressCategory/export', + { + ids: ids + }, + `qualityInspection_${new Date().getTime()}.xlsx`, + true + ); }; /** 提交按钮 */ diff --git a/src/views/tender/bidd/index.vue b/src/views/tender/bidd/index.vue index e476fe7..b0a7cab 100644 --- a/src/views/tender/bidd/index.vue +++ b/src/views/tender/bidd/index.vue @@ -107,7 +107,7 @@ const queryForm = ref({ sheet: '' }); -const versionsData = ref({}); +const versionsData = ref({}); const activeTab = ref('2'); const sheets = ref([]); @@ -272,9 +272,11 @@ const handleSave = (row: any) => { /** 审核按钮操作 */ const handleAudit = async () => { - proxy?.$tab.openPage('/approval/tenderPlan/indexEdit', '审核招标一览', { + proxy?.$tab.openPage('/approval/tenderBidd/indexEdit', '审核招标一览', { id: queryForm.value.versions, - type: 'update' + type: 'update', + activeTab: activeTab.value, + status: versionsData.value.status }); }; diff --git a/src/views/tender/bidd/indexEdit.vue b/src/views/tender/bidd/indexEdit.vue index e92d56a..1a0b993 100644 --- a/src/views/tender/bidd/indexEdit.vue +++ b/src/views/tender/bidd/indexEdit.vue @@ -9,14 +9,14 @@ @handleApprovalRecord="handleApprovalRecord" :buttonLoading="buttonLoading" :id="form.id" - :status="form.auditStatus" + :status="form.status" :pageType="routeParams.type" />
-

施工产值

+

招标一览

@@ -24,18 +24,7 @@ - - - +