Commit 26ea3e40c5188112533546d68b3e43bb18044f23

Authored by 郭伟龙
1 parent fc761710
Exists in develop and in 1 other branch charge

feat:修改bug、增加文件查询接口

api/organize.js
@@ -49,6 +49,10 @@ export const getDevelopmentPlan = params => http.get('/insight/developmentPlan/' @@ -49,6 +49,10 @@ export const getDevelopmentPlan = params => http.get('/insight/developmentPlan/'
49 export const getTargetSuggestion = params => http.get('/insight/targetSuggestion/'+ params) 49 export const getTargetSuggestion = params => http.get('/insight/targetSuggestion/'+ params)
50 50
51 51
  52 +//根据uuid查询文件
  53 +export const getInsightFileList = uuid => http.get('/insight/insightFile/list?uuid='+ uuid)
  54 +
  55 +
52 56
53 57
54 58
pages/market/components/reportModule1.vue
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 <!-- <u-collapse-item name="3"> --> 54 <!-- <u-collapse-item name="3"> -->
55 <text class="slot-title">预算主体附件</text> 55 <text class="slot-title">预算主体附件</text>
56 <view class="attachmentCss" v-if="this.isShowUrl"> 56 <view class="attachmentCss" v-if="this.isShowUrl">
57 - <view class="flexCss" v-for="(item,index) in reportData.attachmentsUrl" :key="index"> 57 + <view class="flexCss" v-for="(item,index) in fileList" :key="index">
58 <view class="leftCss overflow-one-lines"> 58 <view class="leftCss overflow-one-lines">
59 <u-icon size="18" :name="calcIcon(item.extension)"></u-icon> 59 <u-icon size="18" :name="calcIcon(item.extension)"></u-icon>
60 <view class="textCss overflow-one-lines">{{item.fileName}}</view> 60 <view class="textCss overflow-one-lines">{{item.fileName}}</view>
@@ -71,6 +71,9 @@ @@ -71,6 +71,9 @@
71 </template> 71 </template>
72 72
73 <script> 73 <script>
  74 + import {
  75 + getInsightFileList
  76 + } from '@/api/organize.js'
74 export default { 77 export default {
75 components: {}, 78 components: {},
76 props: { 79 props: {
@@ -81,6 +84,7 @@ @@ -81,6 +84,7 @@
81 data() { 84 data() {
82 return { 85 return {
83 isShowUrl: false, 86 isShowUrl: false,
  87 + fileList:[],
84 } 88 }
85 }, 89 },
86 computed: { 90 computed: {
@@ -102,18 +106,20 @@ @@ -102,18 +106,20 @@
102 } 106 }
103 }, 107 },
104 init() { 108 init() {
105 - if (Array.isArray(this.reportData.attachmentsUrl)) {  
106 - this.isShowUrl = true 109 + if (this.reportData.attachmentsUrl == "") {
  110 + this.isShowUrl = false
107 }else{ 111 }else{
108 - this.reportData.attachmentsUrl = JSON.parse(this.reportData.attachmentsUrl);  
109 - if(this.reportData.attachmentsUrl.length && this.reportData.attachmentsUrl != '[]'){  
110 - this.isShowUrl = true  
111 - }else{  
112 - this.isShowUrl = false  
113 - } 112 + this.isShowUrl = true
114 } 113 }
  114 + let uuid = this.reportData.attachmentsUrl;
  115 + getInsightFileList(uuid).then(res=>{
  116 + if(res.code === 200){
  117 + this.fileList = res.rows
  118 + }
  119 + })
115 console.log('附件', JSON.parse(JSON.stringify(this.reportData.attachmentsUrl))); 120 console.log('附件', JSON.parse(JSON.stringify(this.reportData.attachmentsUrl)));
116 }, 121 },
  122 +
117 viewAttachments(urls) { 123 viewAttachments(urls) {
118 uni.getSystemInfo({ 124 uni.getSystemInfo({
119 success: function(res) { 125 success: function(res) {
pages/market/insight.vue
@@ -18,7 +18,8 @@ @@ -18,7 +18,8 @@
18 }" itemStyle="height:78rpx;" @click="tabChange1"> 18 }" itemStyle="height:78rpx;" @click="tabChange1">
19 <view slot="right" style="padding-left: 4px;padding-right: 10rpx;" @click="openFiscalYearChoice"> 19 <view slot="right" style="padding-left: 4px;padding-right: 10rpx;" @click="openFiscalYearChoice">
20 <view style="display:flex;"><u-icon name="/static/images/icon/time.png" size="18" bold></u-icon> 20 <view style="display:flex;"><u-icon name="/static/images/icon/time.png" size="18" bold></u-icon>
21 - <text style="padding-left:10rpx;" :style="fiscalYear!=''?'color:#339af0':''">{{fiscalYear?fiscalYear:'财年'}}</text> 21 + <text style="padding-left:10rpx;"
  22 + :style="fiscalYear!=''?'color:#339af0':''">{{fiscalYear?fiscalYear:'财年'}}</text>
22 </view> 23 </view>
23 </view> 24 </view>
24 </u-tabs> 25 </u-tabs>
@@ -40,9 +41,10 @@ @@ -40,9 +41,10 @@
40 <u-search placeholder="搜索感兴趣的内容" v-model="keyword" :show-action="false" borderColor="rgb(230, 230, 230)" 41 <u-search placeholder="搜索感兴趣的内容" v-model="keyword" :show-action="false" borderColor="rgb(230, 230, 230)"
41 height="74rpx" bgColor="#F5F6FA" @search="search" @clear="clearInit"></u-search> 42 height="74rpx" bgColor="#F5F6FA" @search="search" @clear="clearInit"></u-search>
42 </u-sticky> 43 </u-sticky>
43 - <view class="listBodyCss" :style="newList1.length || newList2.length ?{'background':'#f2f4f3'}:{'background':'#fff'}"> 44 + <view class="listBodyCss"
  45 + :style="newList1.length || newList2.length ?{'background':'#f2f4f3'}:{'background':'#fff'}">
44 <view class="" v-if="!current"> 46 <view class="" v-if="!current">
45 - <u-empty text="暂无报告" icon="/static/images/icon/nodata.png" v-if="newList1.length <= 0"></u-empty> 47 + <u-empty text="暂无报告" icon="/static/images/icon/nodata.png" v-if="newList1.length <= 0"></u-empty>
46 <view class="reportCss" v-for="(item,index) in newList1" :key="index"> 48 <view class="reportCss" v-for="(item,index) in newList1" :key="index">
47 <view class="topTitleCss"> 49 <view class="topTitleCss">
48 <view class="top1 overflow-one-lines"> {{item.reportName || ""}} </view> 50 <view class="top1 overflow-one-lines"> {{item.reportName || ""}} </view>
@@ -72,7 +74,13 @@ @@ -72,7 +74,13 @@
72 <view class="top1 overflow-one-lines" v-else-if="current2 === 2"> {{item.contactPerson || ""}} </view> 74 <view class="top1 overflow-one-lines" v-else-if="current2 === 2"> {{item.contactPerson || ""}} </view>
73 <view class="top2 overflow-one-lines"> 预算主体: {{item.budgetSubject || ""}}</view> 75 <view class="top2 overflow-one-lines"> 预算主体: {{item.budgetSubject || ""}}</view>
74 <view class="top2 overflow-one-lines"> 联系方式: {{item.phoneNumber || ""}}</view> 76 <view class="top2 overflow-one-lines"> 联系方式: {{item.phoneNumber || ""}}</view>
75 - <view class="top2 overflow-one-lines"> 详情地址: {{item.address || ""}}</view> 77 + <view class="top2 overflow-one-lines" v-if="current2 === 0">
  78 + 详情地址:{{ item.city + item.street + item.communityName + item.floor+ '楼' + item.houseNumber + '号'}}
  79 + </view>
  80 + <view class="top2 overflow-one-lines" v-else-if="current2 === 1">
  81 + 详情地址: {{ item.city + item.street + item.houseNumber + '号'}}
  82 + </view>
  83 + <view class="top2 overflow-one-lines" v-else-if="current2 === 2"> 详情地址: {{item.address}}</view>
76 </view> 84 </view>
77 </view> 85 </view>
78 <u-loadmore marginTop="50rpx" :status="status2" v-if="newList2.length > 0" /> 86 <u-loadmore marginTop="50rpx" :status="status2" v-if="newList2.length > 0" />
@@ -104,7 +112,7 @@ @@ -104,7 +112,7 @@
104 newList1: [], 112 newList1: [],
105 newList2: [], 113 newList2: [],
106 fiscalYearShow: false, 114 fiscalYearShow: false,
107 - yaerModal:"", 115 + yaerModal: "",
108 fiscalYear: "", 116 fiscalYear: "",
109 status1: "loadmore", 117 status1: "loadmore",
110 status2: "loadmore", 118 status2: "loadmore",
@@ -113,8 +121,8 @@ @@ -113,8 +121,8 @@
113 queryParameter: { 121 queryParameter: {
114 pageNum: 1, 122 pageNum: 1,
115 pageSize: 10, 123 pageSize: 10,
116 - roleId:this.$store.state.user.roleId,  
117 - entity:this.$store.state.user.entity, 124 + roleId: this.$store.state.user.roleId,
  125 + entity: this.$store.state.user.entity,
118 }, 126 },
119 tabList1: [{ 127 tabList1: [{
120 name: '全部' 128 name: '全部'
@@ -197,17 +205,16 @@ @@ -197,17 +205,16 @@
197 }, 205 },
198 updateList1() { 206 updateList1() {
199 let Params = {}; 207 let Params = {};
200 - if(this.keyword){ 208 + if (this.keyword) {
201 Params.reportName = this.keyword 209 Params.reportName = this.keyword
202 } 210 }
203 - if(this.current1 !== -1 && this.current1 !== 0)  
204 - {  
205 - Params.statusCode = this.current1 - 1; 211 + if (this.current1 !== -1 && this.current1 !== 0) {
  212 + Params.statusCode = this.current1 - 1;
206 } 213 }
207 - if(this.fiscalYear !== ""){ 214 + if (this.fiscalYear !== "") {
208 Params.fiscalYear = this.fiscalYear 215 Params.fiscalYear = this.fiscalYear
209 } 216 }
210 - console.log("市场摸底查询参数",Params); 217 + console.log("市场摸底查询参数", Params);
211 Params = { 218 Params = {
212 ...this.queryParameter, 219 ...this.queryParameter,
213 ...Params 220 ...Params
@@ -232,7 +239,10 @@ @@ -232,7 +239,10 @@
232 if (this.keyword) { 239 if (this.keyword) {
233 Params.householdName = this.keyword 240 Params.householdName = this.keyword
234 } 241 }
235 - getPoolResidentlist({...Params,...this.queryParameter}).then(res => { 242 + getPoolResidentlist({
  243 + ...Params,
  244 + ...this.queryParameter
  245 + }).then(res => {
236 // console.log(res); 246 // console.log(res);
237 if (res.code === 200) { 247 if (res.code === 200) {
238 if (this.queryParameter.pageSize > 1) { 248 if (this.queryParameter.pageSize > 1) {
@@ -247,7 +257,10 @@ @@ -247,7 +257,10 @@
247 if (this.keyword) { 257 if (this.keyword) {
248 Params.householdName = this.keyword 258 Params.householdName = this.keyword
249 } 259 }
250 - getPoolCommercelist({...Params,...this.queryParameter}).then(res => { 260 + getPoolCommercelist({
  261 + ...Params,
  262 + ...this.queryParameter
  263 + }).then(res => {
251 // console.log(res); 264 // console.log(res);
252 if (res.code === 200) { 265 if (res.code === 200) {
253 if (this.queryParameter.pageSize > 1) { 266 if (this.queryParameter.pageSize > 1) {
@@ -262,7 +275,10 @@ @@ -262,7 +275,10 @@
262 if (this.keyword) { 275 if (this.keyword) {
263 Params.contactPerson = this.keyword 276 Params.contactPerson = this.keyword
264 } 277 }
265 - getPoolIndustrylist({...Params,...this.queryParameter}).then(res => { 278 + getPoolIndustrylist({
  279 + ...Params,
  280 + ...this.queryParameter
  281 + }).then(res => {
266 // console.log(res); 282 // console.log(res);
267 if (res.code === 200) { 283 if (res.code === 200) {
268 if (this.queryParameter.pageSize > 1) { 284 if (this.queryParameter.pageSize > 1) {
@@ -293,7 +309,7 @@ @@ -293,7 +309,7 @@
293 this.queryParameter.pageNum = 1; 309 this.queryParameter.pageNum = 1;
294 this.queryParameter.pageSize = 10; 310 this.queryParameter.pageSize = 10;
295 }, 311 },
296 - clearInit(){ 312 + clearInit() {
297 this.keyword = "" 313 this.keyword = ""
298 this.search() 314 this.search()
299 }, 315 },
@@ -314,14 +330,14 @@ @@ -314,14 +330,14 @@
314 // this.fiscalYear = Number(new Date()); 330 // this.fiscalYear = Number(new Date());
315 }, 331 },
316 confirmYear() { 332 confirmYear() {
317 - setTimeout(()=>{ 333 + setTimeout(() => {
318 let year = this.$u.timeFormat(this.yaerModal, 'yyyy'); 334 let year = this.$u.timeFormat(this.yaerModal, 'yyyy');
319 this.fiscalYear = year; 335 this.fiscalYear = year;
320 this.fiscalYearShow = false; 336 this.fiscalYearShow = false;
321 console.log(this.fiscalYear); 337 console.log(this.fiscalYear);
322 this.resetQuery(); 338 this.resetQuery();
323 this.updateList1(); 339 this.updateList1();
324 - },0) 340 + }, 0)
325 // this.$nextTick(()=>{ 341 // this.$nextTick(()=>{
326 342
327 // }) 343 // })
@@ -347,7 +363,7 @@ @@ -347,7 +363,7 @@
347 url: `/pages/market/userDetails?type=${this.current2}&id=${item.id}` 363 url: `/pages/market/userDetails?type=${this.current2}&id=${item.id}`
348 }) 364 })
349 }, 365 },
350 - jumpReportDetails(id,fiscalYear) { 366 + jumpReportDetails(id, fiscalYear) {
351 uni.navigateTo({ 367 uni.navigateTo({
352 url: `/pages/market/reportDetails?reportNo=${id}&fiscalYear=${fiscalYear}` 368 url: `/pages/market/reportDetails?reportNo=${id}&fiscalYear=${fiscalYear}`
353 }) 369 })
@@ -401,7 +417,7 @@ @@ -401,7 +417,7 @@
401 bottom: 2px; 417 bottom: 2px;
402 left: 50%; 418 left: 50%;
403 transform: translateX(-50%); 419 transform: translateX(-50%);
404 - width:100%; 420 + width: 100%;
405 /* 图片宽度 */ 421 /* 图片宽度 */
406 height: 14rpx; 422 height: 14rpx;
407 /* 图片高度 */ 423 /* 图片高度 */
@@ -417,7 +433,7 @@ @@ -417,7 +433,7 @@
417 background: #fff; 433 background: #fff;
418 } 434 }
419 435
420 - /deep/.u-tabs__wrapper__nav__item{ 436 + /deep/.u-tabs__wrapper__nav__item {
421 padding: 0 5rpx; 437 padding: 0 5rpx;
422 } 438 }
423 439
@@ -435,7 +451,7 @@ @@ -435,7 +451,7 @@
435 min-height: 65vh; 451 min-height: 65vh;
436 } 452 }
437 453
438 - .u-empty{ 454 + .u-empty {
439 min-height: 50vh; 455 min-height: 50vh;
440 } 456 }
441 457
@@ -499,4 +515,4 @@ @@ -499,4 +515,4 @@
499 .u-empty { 515 .u-empty {
500 background: #fff !important; 516 background: #fff !important;
501 } 517 }
502 -</style> 518 -</style>
  519 +</style>
503 \ No newline at end of file 520 \ No newline at end of file
pages/market/reportDetails.vue
@@ -36,7 +36,8 @@ @@ -36,7 +36,8 @@
36 getNewBuildingInfo, 36 getNewBuildingInfo,
37 getNewBuildingItem, 37 getNewBuildingItem,
38 getDevelopmentPlan, 38 getDevelopmentPlan,
39 - getTargetSuggestion 39 + getTargetSuggestion,
  40 + getInsightFileList
40 } from '@/api/organize.js' 41 } from '@/api/organize.js'
41 import reportModule1 from "./components/reportModule1.vue" 42 import reportModule1 from "./components/reportModule1.vue"
42 import reportModule2 from "./components/reportModule2.vue" 43 import reportModule2 from "./components/reportModule2.vue"
pages/market/total.vue
@@ -99,7 +99,7 @@ @@ -99,7 +99,7 @@
99 computed: { 99 computed: {
100 100
101 }, 101 },
102 - onLoad() { 102 + onShow() {
103 this.initData() 103 this.initData()
104 }, 104 },
105 methods: { 105 methods: {
pages/market/userDetails.vue
@@ -268,7 +268,7 @@ @@ -268,7 +268,7 @@
268 <view class="rightCss overflow-one-lines"> {{allData.currentPrice || ""}} </view> 268 <view class="rightCss overflow-one-lines"> {{allData.currentPrice || ""}} </view>
269 </view> 269 </view>
270 <view class="flexCss"> 270 <view class="flexCss">
271 - <view class="leftCss overflow-one-lines"> 预计最大开口气量(最大日用气量) </view> 271 + <view class="leftCss"> 预计最大开口气量(最大日用气量) </view>
272 <view class="rightCss overflow-one-lines"> {{allData.predictMax || ""}} </view> 272 <view class="rightCss overflow-one-lines"> {{allData.predictMax || ""}} </view>
273 </view> 273 </view>
274 <view class="flexCss"> 274 <view class="flexCss">