Browse Source

feat: 数据看板 - 短剧数据趋势 - 曲线&汇总&列表 - 接口联调

zhengxy 2 years ago
parent
commit
129cd24c62

+ 3 - 0
project/src/assets/config/interface_api.js

@@ -288,6 +288,9 @@ var api = {
288 288
   dataBoard_short_adqCurve: "/api/shortPlayDataTrend/adqShortPlayDataTrendCurve", // 短剧数据趋势 - adq折线图
289 289
   dataBoard_short_mpCurve: "/api/shortPlayDataTrend/mpShortPlayDataTrendCurve", // 短剧数据趋势 - mp折线图
290 290
   dataBoard_short_allCurve: "/api/shortPlayDataTrend/shortPlayDataTrendCurve", // 短剧数据趋势 - 总表折线图
291
+  dataBoard_short_list: "/api/shortPlayDataTrend/shortPlayDataTrendListByAccount", // 短剧数据趋势 - 列表
292
+  dataBoard_short_curve: "/api/shortPlayDataTrend/shortPlayDataTrendCurveByAccount", // 短剧数据趋势 - 折线图
293
+  dataBoard_short_summary: "/api/shortPlayDataTrend/summaryOfShortDramaDataTrendsByAccount", // 短剧数据趋势 - 汇总
291 294
   dataBoard_loseUser_account: "/api/customerLossTrend/account", // 用户流失数据 - 列表
292 295
   dataBoard_loseUser_summary: "/api/customerLossTrend/summary", // 用户流失数据 - 汇总
293 296
   dataBoard_loseUser_curve: "/api/customerLossTrend/curve", // 用户流失数据 - 折线图

+ 64 - 25
project/src/components/dataBoard/shortDramaTrends.vue

@@ -26,11 +26,11 @@
26 26
           <label class="common-screen-label">收益截止日期</label>
27 27
           <el-date-picker v-model="filter.closing_date" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" size="small" style="width:150px" @change="onChangeClosingDate" />
28 28
         </div>
29
-        <!-- 推广类型 -->
30
-        <selfChannel style="margin-right: 30px;margin-left: -30px;" :reset="reset" title="推广类型" type="promotionType" labelWidth @channelDefine="onChangePromotionType" />
31 29
         <div class="flex">
30
+          <!-- 推广类型 -->
31
+          <selfChannel style="margin-right: 30px;margin-left: -30px;" :reset="reset" title="推广类型" type="promotionType" labelWidth @channelDefine="onChangePromotionType" />
32 32
           <!-- 回本率(范围) -->
33
-          <inputRange style="margin-right: 10px;" v-model="filter.costCover" label="回本率" />
33
+          <!-- <inputRange style="margin-right: 10px;" v-model="filter.costCover" label="回本率" /> -->
34 34
           <el-button size="mini" type="primary" plain @click="onClickSearch">确定</el-button>
35 35
           <el-button size="mini" plain @click="onClickReset">重置</el-button>
36 36
         </div>
@@ -313,20 +313,29 @@ export default {
313 313
           playlet_id: this.filter.playlet_id,
314 314
           closing_date: this.filter.closing_date,
315 315
           plat_order_type: this.filter.plat_order_type,
316
-          cost_cover_min: this.filter.costCover[0],
317
-          cost_cover_max: this.filter.costCover[1],
316
+          // cost_cover_min: this.filter.costCover[0],
317
+          // cost_cover_max: this.filter.costCover[1],
318 318
         }
319 319
         let url = ''
320 320
         let tableName = ''
321 321
 
322 322
         if (this.isADQ) { // adq 参数 & api
323
-          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_adqSummary}`
323
+          // 2023.01.10 接口更换 新增ad_type参数 区分adq||mp||总表
324
+          // url = `${this.URL.BASEURL}${this.URL.dataBoard_short_adqSummary}`
325
+          params.ad_type = 1
326
+          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_summary}`
324 327
           tableName = 'isADQ'
325 328
         } else if (this.isMP) { // mp 参数 & api
326
-          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_mpSummary}`
329
+          // 2023.01.10 接口更换 新增ad_type参数 区分adq||mp||总表
330
+          // url = `${this.URL.BASEURL}${this.URL.dataBoard_short_mpSummary}`
331
+          params.ad_type = 2
332
+          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_summary}`
327 333
           tableName = 'isMP'
328 334
         } else if (this.isSUM) { // 总表 参数 & api
329
-          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_allSummary}`
335
+          // 2023.01.10 接口更换 新增ad_type参数 区分adq||mp||总表
336
+          // url = `${this.URL.BASEURL}${this.URL.dataBoard_short_allSummary}`
337
+          params.ad_type = 0
338
+          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_summary}`
330 339
           tableName = 'isSUM'
331 340
         }
332 341
 
@@ -369,8 +378,8 @@ export default {
369 378
           playlet_id: this.filter.playlet_id,
370 379
           closing_date: this.filter.closing_date,
371 380
           plat_order_type: this.filter.plat_order_type,
372
-          cost_cover_min: this.filter.costCover[0],
373
-          cost_cover_max: this.filter.costCover[1],
381
+          // cost_cover_min: this.filter.costCover[0],
382
+          // cost_cover_max: this.filter.costCover[1],
374 383
           sort_field: this.filter.sort_field,
375 384
           sort_type: this.filter.sort_type,
376 385
         }
@@ -378,13 +387,22 @@ export default {
378 387
         let tableName = '' // 使表头key不同 => 更新视图
379 388
 
380 389
         if (this.isADQ) { // adq 参数 & api
381
-          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_adqList}`
390
+          // 2023.01.10 接口更换 新增ad_type参数 区分adq||mp||总表
391
+          // url = `${this.URL.BASEURL}${this.URL.dataBoard_short_adqList}`
392
+          params.ad_type = 1
393
+          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_list}`
382 394
           tableName = 'isADQ'
383 395
         } else if (this.isMP) { // mp 参数 & api
384
-          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_mpList}`
396
+          // 2023.01.10 接口更换 新增ad_type参数 区分adq||mp||总表
397
+          // url = `${this.URL.BASEURL}${this.URL.dataBoard_short_mpList}`
398
+          params.ad_type = 2
399
+          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_list}`
385 400
           tableName = 'isMP'
386 401
         } else if (this.isSUM) { // 总表 参数 & api
387
-          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_allList}`
402
+          // 2023.01.10 接口更换 新增ad_type参数 区分adq||mp||总表
403
+          // url = `${this.URL.BASEURL}${this.URL.dataBoard_short_allList}`
404
+          params.ad_type = 0
405
+          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_list}`
388 406
           tableName = 'isSUM'
389 407
         }
390 408
 
@@ -440,16 +458,25 @@ export default {
440 458
           playlet_id: this.filter.playlet_id,
441 459
           closing_date: this.filter.closing_date,
442 460
           plat_order_type: this.filter.plat_order_type,
443
-          cost_cover_min: this.filter.costCover[0],
444
-          cost_cover_max: this.filter.costCover[1],
461
+          // cost_cover_min: this.filter.costCover[0],
462
+          // cost_cover_max: this.filter.costCover[1],
445 463
         }
446 464
         let url = ''
447 465
 
448 466
         if (this.isADQ) { // adq 参数 & api
449
-          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_adqCurve}`
467
+          // 2023.01.10 接口更换 新增ad_type参数 区分adq||mp||总表
468
+          // url = `${this.URL.BASEURL}${this.URL.dataBoard_short_adqCurve}`
469
+          params.ad_type = 1
470
+          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_curve}`
450 471
         } else if (this.isMP) { // mp 参数 & api
451
-          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_mpCurve}`
472
+          // 2023.01.10 接口更换 新增ad_type参数 区分adq||mp||总表
473
+          // url = `${this.URL.BASEURL}${this.URL.dataBoard_short_mpCurve}`
474
+          params.ad_type = 2
475
+          url = `${this.URL.BASEURL}${this.URL.dataBoard_short_curve}`
452 476
         } else if (this.isSUM) { // 总表 参数 & api
477
+          // 2023.01.10 接口更换 新增ad_type参数 区分adq||mp||总表
478
+          // url = `${this.URL.BASEURL}${this.URL.dataBoard_short_allCurve}`
479
+          params.ad_type = 0
453 480
           url = `${this.URL.BASEURL}${this.URL.dataBoard_short_allCurve}`
454 481
         }
455 482
 
@@ -742,19 +769,31 @@ export default {
742 769
           playlet_id: this.filter.playlet_id,
743 770
           closing_date: this.filter.closing_date,
744 771
           plat_order_type: this.filter.plat_order_type,
745
-          cost_cover_min: this.filter.costCover[0],
746
-          cost_cover_max: this.filter.costCover[1],
772
+          // cost_cover_min: this.filter.costCover[0],
773
+          // cost_cover_max: this.filter.costCover[1],
747 774
         }
748 775
 
749 776
         if (this.isADQ) { // adq 参数 & api
750
-          url.summary = `${this.URL.BASEURL}${this.URL.dataBoard_short_adqSummary}`
751
-          url.detail = `${this.URL.BASEURL}${this.URL.dataBoard_short_adqList}`
777
+          // 2023.01.10 接口更换 新增ad_type参数 区分adq||mp||总表
778
+          // url.summary = `${this.URL.BASEURL}${this.URL.dataBoard_short_adqSummary}`
779
+          // url.detail = `${this.URL.BASEURL}${this.URL.dataBoard_short_adqList}`
780
+          params.ad_type = 1
781
+          url.summary = `${this.URL.BASEURL}${this.URL.dataBoard_short_summary}`
782
+          url.detail = `${this.URL.BASEURL}${this.URL.dataBoard_short_list}`
752 783
         } else if (this.isMP) { // mp 参数 & api
753
-          url.summary = `${this.URL.BASEURL}${this.URL.dataBoard_short_mpSummary}`
754
-          url.detail = `${this.URL.BASEURL}${this.URL.dataBoard_short_mpList}`
784
+          // 2023.01.10 接口更换 新增ad_type参数 区分adq||mp||总表
785
+          // url.summary = `${this.URL.BASEURL}${this.URL.dataBoard_short_mpSummary}`
786
+          // url.detail = `${this.URL.BASEURL}${this.URL.dataBoard_short_mpList}`
787
+          params.ad_type = 2
788
+          url.summary = `${this.URL.BASEURL}${this.URL.dataBoard_short_summary}`
789
+          url.detail = `${this.URL.BASEURL}${this.URL.dataBoard_short_list}`
755 790
         } else if (this.isSUM) { // 总表 参数 & api
756
-          url.summary = `${this.URL.BASEURL}${this.URL.dataBoard_short_allSummary}`
757
-          url.detail = `${this.URL.BASEURL}${this.URL.dataBoard_short_allList}`
791
+          // 2023.01.10 接口更换 新增ad_type参数 区分adq||mp||总表
792
+          // url.summary = `${this.URL.BASEURL}${this.URL.dataBoard_short_allSummary}`
793
+          // url.detail = `${this.URL.BASEURL}${this.URL.dataBoard_short_allList}`
794
+          params.ad_type = 0
795
+          url.summary = `${this.URL.BASEURL}${this.URL.dataBoard_short_summary}`
796
+          url.detail = `${this.URL.BASEURL}${this.URL.dataBoard_short_list}`
758 797
         }
759 798
 
760 799
         const [{ data: summaryRes = {} }, { data: detailRes = {} }] = await Promise.all([