From d3d552c692bec78bde734bcfab50ab269001540e Mon Sep 17 00:00:00 2001 From: sunzehua Date: Wed, 31 Jul 2024 09:38:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/taskmanage/components/pdf.vue | 17 +++++++++-------- src/views/taskmanage/index.vue | 6 +++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/views/taskmanage/components/pdf.vue b/src/views/taskmanage/components/pdf.vue index 90388f65..f4be29af 100644 --- a/src/views/taskmanage/components/pdf.vue +++ b/src/views/taskmanage/components/pdf.vue @@ -59,7 +59,7 @@ function init() { pdfLoad.value = true DownloadFileByBC(data).then(res => { if (res.type === 'application/json') { - const reader = new FileReader() + const reader = new FileReader() as any reader.readAsText(res, 'utf-8') reader.onload = () => { const _res = JSON.parse(reader.result) @@ -69,13 +69,14 @@ function init() { pdfRes.value = res var contentDisposition = res.headers['content-disposition'] var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*') - var result = patt.exec(contentDisposition) - var filename = result[1] - var reg = /^["](.*)["]$/g - pdfName.value = decodeURI(filename.replace(reg, '$1')) - if (res.data.size > 150) { - pdfUrl.value = window.URL.createObjectURL(new Blob([res.data], { type: 'application/pdf;charset=utf-8' })) - } + var result = patt.exec(contentDisposition) as any + console.log(patt,result,contentDisposition,res) + // var filename = result[1] + // var reg = /^["](.*)["]$/g + // pdfName.value = decodeURI(filename.replace(reg, '$1')) + // if (res.data.size > 150) { + // pdfUrl.value = window.URL.createObjectURL(new Blob([res.data], { type: 'application/pdf;charset=utf-8' })) + // } } pdfLoad.value = false }) diff --git a/src/views/taskmanage/index.vue b/src/views/taskmanage/index.vue index ddf601ad..005bd9fa 100644 --- a/src/views/taskmanage/index.vue +++ b/src/views/taskmanage/index.vue @@ -505,9 +505,6 @@ const [registerTable, { reload, setLoading, getForm, getSelectRows, setProps }] }) }, beforeFetch: (p) => { - if (activeNextKey.value) { - p['status'] = activeNextKey.value - } if (taskType.value) { p['task_TYPE'] = taskType.value } @@ -533,6 +530,9 @@ const [registerTable, { reload, setLoading, getForm, getSelectRows, setProps }] if (activeTopKey.value) { data.otherQueryCondition.taskCategory = activeTopKey.value } + if (activeNextKey.value) { + data.otherQueryCondition.status = activeNextKey.value + } if (taskType.value) { data.otherQueryCondition.taskType = taskType.value }