From fb4a88a412e2fc7d956156a0ee5fb253ab3671d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com> Date: Wed, 24 Aug 2022 09:36:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sunVillage_info/list_finance_detail.vue | 36 +++++++++--------- .../sunVillage_info/list_finance_edit.vue | 4 +- .../sunVillage_info/list_issues_detail.vue | 38 ++++++++++--------- .../sunVillage_info/list_issues_edit.vue | 4 +- .../sunVillage_info/list_tourists_detail.vue | 37 +++++++++--------- .../sunVillage_info/list_tourists_edit.vue | 4 +- 6 files changed, 63 insertions(+), 60 deletions(-) diff --git a/src/views/sunVillage_info/list_finance_detail.vue b/src/views/sunVillage_info/list_finance_detail.vue index aef70bcb..4e89151f 100644 --- a/src/views/sunVillage_info/list_finance_detail.vue +++ b/src/views/sunVillage_info/list_finance_detail.vue @@ -113,27 +113,25 @@ methods: { getDetail(id){ financePublicDetail(this.queryParams).then((res) => { - res.data.openFile = res.data.openFile.split(',') - res.data.openFile.map(rr=>{ - let name = rr.substr(27,rr.length); - let type = ''; - if (name.indexOf('.doc') > -1){ - type = 'word'; - }else if(name.indexOf('.xls') > -1){ - type = 'excel'; - } - this.openFileList.push({name:name,type:type}) - }) - if (res.data.openPic!=''){ - this.openPic = res.data.openPic.split(',') - this.openPic2 = res.data.openPic.split(',') - this.openPic.map((rrr,i)=>{ - this.openPic[i] = {url:'/api'+rrr} + if (res.data.openFile !='' && res.data.openFile != null && res.data.openFile != undefined){ + res.data.openFile = res.data.openFile.split(',') + res.data.openFile.map(rr=>{ + let name = rr.substr(27,rr.length); + let type = ''; + if (name.indexOf('.doc') > -1){ + type = 'word'; + }else if(name.indexOf('.xls') > -1){ + type = 'excel'; + } + this.openFileList.push({name:name,type:type}) + }) + } + if (res.data.openPic !='' && res.data.openPic != null && res.data.openPic != undefined){ + res.data.openPic = res.data.openPic.split(',') + res.data.openPic.map((rrr,i)=>{ + this.openPic.push({url:'/api'+rrr}) }) } - // res.data.openPic.map((rrr,i)=>{ - // this.openPic.push({url:this.$store.getters.baseRoutingUrl+rrr}) - // }) this.form = res.data; }) diff --git a/src/views/sunVillage_info/list_finance_edit.vue b/src/views/sunVillage_info/list_finance_edit.vue index c0df8ebe..9afc831b 100644 --- a/src/views/sunVillage_info/list_finance_edit.vue +++ b/src/views/sunVillage_info/list_finance_edit.vue @@ -139,7 +139,7 @@ getDetail(id){ financePublicDetail(this.queryParams).then((res) => { var that = this ; - if (res.data.openFile!=''){ + if (res.data.openFile!='' && res.data.openFile != null && res.data.openFile != undefined){ this.openFile = res.data.openFile.split(',') this.openFile2 = res.data.openFile.split(',') this.openFile.map((rr,i)=>{ @@ -153,7 +153,7 @@ this.openFile[i] = {name:name,type:type} }) } - if (res.data.openPic!=''){ + if (res.data.openPic!='' && res.data.openPic != null && res.data.openPic != undefined){ this.openPic = res.data.openPic.split(',') this.openPic2 = res.data.openPic.split(',') this.openPic.map((rrr,i)=>{ diff --git a/src/views/sunVillage_info/list_issues_detail.vue b/src/views/sunVillage_info/list_issues_detail.vue index 374585a1..4bb19d49 100644 --- a/src/views/sunVillage_info/list_issues_detail.vue +++ b/src/views/sunVillage_info/list_issues_detail.vue @@ -30,7 +30,7 @@ - + - +