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