From d3aece767827001fe980207b4151808cd16814d5 Mon Sep 17 00:00:00 2001 From: zhouwenxuan <1175765986@qq.com> Date: 星期二, 20 六月 2023 17:15:41 +0800 Subject: [PATCH] 文件预览 --- pages/tabBar/notice/detail.vue | 10 ++-------- pages/tabBar/notice/notice.vue | 4 ++-- pages/tabBar/response/response.vue | 1 + 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/pages/tabBar/notice/detail.vue b/pages/tabBar/notice/detail.vue index 08871d0..922e911 100644 --- a/pages/tabBar/notice/detail.vue +++ b/pages/tabBar/notice/detail.vue @@ -113,8 +113,6 @@ item.attachementName = this.detailData.attachment[index].attachmentName; }) } - - } this.detailData.disaster = test.disasterType == 1 ? '地震': test.disasterType == 2 ? '洪涝' : test.disasterType == 3 ? '气象' : test.disasterType == 4 ? '泥石流': test.disasterType == 5 ? '水旱': '森林草原火灾'; }, @@ -153,14 +151,10 @@ }else { fileUrl = VUE_APP_BASE_URL + item.attachement; } - console.log("urlllllllllllll",fileUrl) + console.log("urlllllllll",fileUrl) uni.downloadFile({ url: fileUrl, - header: { - - // 'tk':uni.getStorageSync('tk'), - // 'uid': uni.getStorageSync('uid'), - }, + header: {}, success:function(res){ console.log("下载res",res); var filePath = res.tempFilePath; diff --git a/pages/tabBar/notice/notice.vue b/pages/tabBar/notice/notice.vue index 8faed0d..6686912 100644 --- a/pages/tabBar/notice/notice.vue +++ b/pages/tabBar/notice/notice.vue @@ -45,7 +45,7 @@ <u-button @click="toDetail(item)"v-if="item.buttonContent == '已叫应'" size="mini" style="margin-bottom: 10px;background-color:rgb(17, 204, 33);color: white;"> {{item.buttonContent}} </u-button> - <u-button v-else-if="item.buttonContent == '未叫应'" type="error" size="mini" style="margin-bottom: 10px;" @click="openDialog(item)"> + <u-button v-else-if="item.buttonContent == '待叫应'" type="error" size="mini" style="margin-bottom: 10px;" @click="openDialog(item)"> {{item.buttonContent}} </u-button> <u-button @click="toDetail(item)" v-else type="error" size="mini" style="margin-bottom: 10px;"> @@ -154,7 +154,7 @@ }, methods: { getNoticeList() { - this.data.searchParams.readStatus = this.isReadOnly ? 0 : null; + this.data.searchParams.readStatus = this.isReadOnly ? 0 : null; this.data.searchParams.emergType = this.checked ? 1 : 2; this.data.searchParams.warningLevel = this.selectedSaleAnalysis =='red' ? 1 : this.selectedSaleAnalysis =='orange' ? 2: this.selectedSaleAnalysis =='yellow'? 3 : 4; getNotice(this.data).then(res => { diff --git a/pages/tabBar/response/response.vue b/pages/tabBar/response/response.vue index d7bc11e..8730a72 100644 --- a/pages/tabBar/response/response.vue +++ b/pages/tabBar/response/response.vue @@ -81,6 +81,7 @@ toDetail(item) { console.log("de",item) getDetail({id: item.id}).then(res => { + console.log("response",res) if(res.code == 100) { uni.navigateTo({ url: `/pages/tabBar/notice/detail?data=` + encodeURIComponent(JSON.stringify(res.data)) -- Gitblit v1.9.2