From eff22791d1ffdecadab3b68527a2798c98694b30 Mon Sep 17 00:00:00 2001 From: MO <448233645@qq.com> Date: Mon, 9 Oct 2023 17:09:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E6=B5=81=E7=A8=8B=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=85=83?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/accounting/flow.js | 10 ++ src/views/accounting/flow/index.vue | 200 ++++++++++++++++++++-------- 2 files changed, 155 insertions(+), 55 deletions(-) diff --git a/src/api/accounting/flow.js b/src/api/accounting/flow.js index 7d2ffcdf..df75d3a7 100644 --- a/src/api/accounting/flow.js +++ b/src/api/accounting/flow.js @@ -52,3 +52,13 @@ export function exportFlowExcel(query) { responseType: 'blob' }) } + +// 下载元数据 +export function downloadXml(query) { + return request({ + url: '/archives/flow/downloadXml', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/views/accounting/flow/index.vue b/src/views/accounting/flow/index.vue index 6968b097..8622518a 100644 --- a/src/views/accounting/flow/index.vue +++ b/src/views/accounting/flow/index.vue @@ -58,6 +58,17 @@ >导出 + + 下载元数据 + --> - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - 请选择字典生成 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -193,6 +246,7 @@ import { getFlow, getFlowPage, exportFlowExcel, + downloadXml, } from "@/api/accounting/flow"; export default { @@ -214,6 +268,7 @@ export default { title: "", // 是否显示弹出层 open: false, + open1: false, // 查询参数 queryParams: { pageNo: 1, @@ -236,6 +291,7 @@ export default { deptName: null, archiveId: null, archiveState: null, + inputPassword: null, }, // 表单参数 form: {}, @@ -257,11 +313,19 @@ export default { this.loading = false; }); }, + openLink(fileUrl) { + window.open(fileUrl); + }, /** 取消按钮 */ cancel() { this.open = false; this.reset(); }, + + /** 取消按钮 */ + cancel1() { + this.open1 = false; + }, /** 表单重置 */ reset() { this.form = { @@ -367,6 +431,32 @@ export default { }) .catch(() => {}); }, + //下载元数据 + handleDownloadData() { + this.open1 = true; + this.queryParams.inputPassword = null; + }, + submitForm1() { + this.$refs["queryForm"].validate((valid) => { + if (!valid) { + return; + } + // 处理查询参数 + let params = { ...this.queryParams }; + downloadXml(params) + .then((response) => { + console.log(response.size); + if (response.size == 39) { + this.$modal.msgError("密码错误"); + return false; + } else { + this.$download.excel(response, "审批流程元数据.xml"); + this.open1 = false; + } + }) + .catch(() => {}); + }); + }, }, };