From 94e44175c114bb91ff4fe67608d6131231b33fc4 Mon Sep 17 00:00:00 2001 From: xuyuanqing <392009588@qq.com> Date: Fri, 10 May 2024 11:03:48 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=B6=E5=86=9C-=E9=93=B6=E8=A1=8C=E8=BD=AC?= =?UTF-8?q?=E8=B4=A6=E7=94=B3=E8=AF=B7=E3=80=81=E5=A4=87=E4=BB=98=E9=87=91?= =?UTF-8?q?=E6=94=AF=E5=87=BA=E7=94=B3=E8=AF=B7=E6=B5=8B=E8=AF=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../paymentApproval/approvalApproval.vue | 48 ++++++++++++++++--- .../paymentApproval/approvalApproval11.vue | 48 ++++++++++++++++--- 2 files changed, 84 insertions(+), 12 deletions(-) diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalApproval.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalApproval.vue index 1cebe8a8..d6a61c1c 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalApproval.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalApproval.vue @@ -78,7 +78,17 @@

上传附件(收据)

- + + +

附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}

@@ -87,7 +97,17 @@

上传附件(发票)

- + + +

附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}

@@ -96,7 +116,17 @@

上传附件(其他)

- + + +

附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}

@@ -332,7 +362,9 @@ attachmentList(oData1).then(res => { res.rows.map(r => { let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL - this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) + let subIndex = r.fileName.lastIndexOf("."); + let ext = r.fileName.substring(subIndex + 1, r.fileName.length); + this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) }) }) let oData2= { @@ -344,7 +376,9 @@ attachmentList(oData2).then(res => { res.rows.map(r => { let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL - this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) + let subIndex = r.fileName.lastIndexOf("."); + let ext = r.fileName.substring(subIndex + 1, r.fileName.length); + this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) }) }) let oData3= { @@ -356,7 +390,9 @@ attachmentList(oData3).then(res => { res.rows.map(r => { let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL - this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) + let subIndex = r.fileName.lastIndexOf("."); + let ext = r.fileName.substring(subIndex + 1, r.fileName.length); + this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) }) }) }, diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalApproval11.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalApproval11.vue index 9b85da08..304c57dc 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalApproval11.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalApproval11.vue @@ -68,7 +68,17 @@

上传附件(收据)

- + + +

附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}

@@ -77,7 +87,17 @@

上传附件(发票)

- + + +

附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}

@@ -86,7 +106,17 @@

上传附件(其他)

- + + +

附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}

@@ -315,7 +345,9 @@ attachmentList(oData1).then(res => { res.rows.map(r => { let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL - this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) + let subIndex = r.fileName.lastIndexOf("."); + let ext = r.fileName.substring(subIndex + 1, r.fileName.length); + this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) }) }) let oData2= { @@ -327,7 +359,9 @@ attachmentList(oData2).then(res => { res.rows.map(r => { let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL - this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) + let subIndex = r.fileName.lastIndexOf("."); + let ext = r.fileName.substring(subIndex + 1, r.fileName.length); + this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) }) }) let oData3= { @@ -339,7 +373,9 @@ attachmentList(oData3).then(res => { res.rows.map(r => { let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL - this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) + let subIndex = r.fileName.lastIndexOf("."); + let ext = r.fileName.substring(subIndex + 1, r.fileName.length); + this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) }) }) },