Quellcode durchsuchen

数据查看 模块更新

jiayufei vor 4 Jahren
Ursprung
Commit
c549d35b5f
1 geänderte Dateien mit 44 neuen und 27 gelöschten Zeilen
  1. 44 27
      src/views/modules/headline-view/headline-view.vue

+ 44 - 27
src/views/modules/headline-view/headline-view.vue

@@ -17,7 +17,7 @@
                         </div>
                         <div class="costInfo">
                             <div class="yesterdayInfo">
-                                <div style="margin-bottom:8px">上阶段花费</div>
+                                <div style="margin-bottom:8px">昨日花费</div>
                                 <div style="font-size:14px;font-weight:600">{{ yearCostReportList.lastCost || 0 }}</div>
                             </div>
                             <a-divider type="vertical"/>
@@ -26,7 +26,7 @@
                                     同比
                                     <a-tooltip >
                                         <template slot="title">
-                                            <span>截止此时与上一阶段的花费同比</span>
+                                            <span>截止此时今日与昨日的花费同比</span>
                                         </template>
                                         <a-icon type="question-circle" />
                                     </a-tooltip>
@@ -60,18 +60,10 @@
                                 </span>
                             </div>
                             <div class="yesterdayCost">
-                                <a-tooltip >
-                                    <template slot="title">
-                                    <span>
-                                        <!-- {{dateValue[0].format('YYYY-MM-DD') === dateValue[1].format('YYYY-MM-DD') ? moment(dateValue[0]).subtract(1,'days').format('YYYY-MM-DD') : dateStringShow}}
-                                        的{{item.title}} -->
-                                    </span>
-                                    </template>
-                                    <a-icon type="question-circle" />
-                                </a-tooltip>:
+                                <span>/ 昨日: </span>
                                 <span v-if="item.type === 'double'">{{ item.yesterday }}</span>
                                 <span v-else-if="item.type === 'string'">{{ item.yesterday }}</span>
-                                <span v-else-if="item.type === 'int'">{{ item.yesterday }}</span>
+                                <span v-else-if="item.type === 'int'">{{ item.yesterday !== 0 ? item.yesterday + '%' : 0 }}</span>
                             </div>
                             <span
                                 class="IndexName"
@@ -124,10 +116,9 @@
                         <span class="name">投放状态:</span>
                         <span>{{ topAccountMsg.accountMap && topAccountMsg.accountMap.accountStatus === 0 ? '投放中' : '未投放' }}</span>
                     </div>
-                    <div class="accountBodyRightInfoItem createNum" @click="gorejectCreativePage">
+                    <div class="accountBodyRightInfoItem createNum">
                         <span class="name">被拒创意数:</span>
                         <span>0</span>
-                        <a-icon type="right" style="font-size:12px;position:absolute;right:10px;top:16px"/>
                     </div>
                 </div>
             </div>
@@ -212,7 +203,7 @@
                                         <video :src="record.videoUrl" style="width:250px" controls></video>
                                     </template>
                                     <img v-if="text" :src="text" style="width:20px">
-                                    <img v-if="!text" src="@/assets/feishu.png" style="width:20px">
+                                    <img v-if="!text" src="@/assets/noImg.png" style="width:20px">
                                 </a-popover>
                             </div>
                         </span>
@@ -233,13 +224,19 @@
         <!-- 修改定向的modal -->
         <a-modal
             v-model="targetVisible"
-            title="修改定向"
+            title="修改定向"
             @ok="handleTargethandleOk"
             @cancel="handleTargethandleCancel"
         >
             <div class="linkBody">
                 <a-row>
                     <a-col :span="6">
+                        <div style="text-align:right">已优先定向:</div>
+                    </a-col>
+                    <a-col :span="16">DMP</a-col>
+                </a-row>
+                <a-row style="margin-top: 20px;">
+                    <a-col :span="6">
                         <div style="text-align:right">修改定向包:</div>
                     </a-col>
                     <a-col :span="16">
@@ -466,7 +463,7 @@ export default {
                     dataIndex: 'converRate',
                     key: 'converRate',
                     align: 'center',
-                    sorter: (a, b) => a.converRate - b.converRate
+                    sorter: (a, b) => a.converRate.split('%')[0] - b.converRate.split('%')[0]
                 },
                 {
                     title: '转化成本',
@@ -555,7 +552,7 @@ export default {
                     dataIndex: 'clickRate',
                     key: 'clickRate',
                     align: 'center',
-                    sorter: (a, b) => a.clickRate - b.clickRate
+                    sorter: (a, b) => a.clickRate.split('%')[0] - b.clickRate.split('%')[0]
                 },
                 {
                     title: '转化数',
@@ -569,7 +566,7 @@ export default {
                     dataIndex: 'convertRate',
                     key: 'convertRate',
                     align: 'center',
-                    sorter: (a, b) => a.convertRate - b.convertRate
+                    sorter: (a, b) => a.convertRate.split('%')[0] - b.convertRate.split('%')[0]
                 },
                 {
                     title: '转化成本',
@@ -588,8 +585,7 @@ export default {
                     dataIndex: 'materialUploadTime',
                     key: 'photoShow',
                     align: 'center',
-                    scopedSlots: {customRender: 'photoShow'},
-                    sorter: () => {}
+                    scopedSlots: {customRender: 'photoShow'}
                 }
             ],
             materialData: [],
@@ -706,8 +702,10 @@ export default {
             };
             getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/getReportPlanCost', paramsData).then(result => {
                 if (result.code === 0) {
-                    console.log(result.result, '计划列表数据');
-                    this.planData = result.result.list;
+                    this.planData = result.result.list.map(item => {
+                        item.converRate = item.converRate + '%';
+                        return item;
+                    });
                     this.planTotalAll = result.result.total;
                 }
                 else {
@@ -798,7 +796,11 @@ export default {
             };
             getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/selectMaterialDailyReport', paramsData).then(result => {
                 if (result.code === 0) {
-                    this.materialData = result.result.list;
+                    this.materialData = result.result.list.map(item => {
+                        item.clickRate = item.clickRate + '%';
+                        item.convertRate = item.convertRate + '%';
+                        return item;
+                    });
                     this.materTotalAll = result.result.total;
                 }
                 else {
@@ -884,8 +886,8 @@ export default {
                 account: {
                     accountId: this.topCostList.account.accountId
                 },
-                startTime: this.planRangePicker[0],
-                endTime: this.planRangePicker[1]
+                startTime: this.materialDate[0],
+                endTime: this.materialDate[1]
             };
             this.handleGetmaterialData(paramsData);
         },
@@ -995,7 +997,8 @@ export default {
                         });
                         let option = isType + '<br/>';
                         for (let i = 0, length = params.length; i < length; i++) {
-                            option += `<span style="width:8px;height:8px;border-radius:50%;background:${params[i].color};display:inline-block;position:relative;top:-2px;margin-right:5px"></span>` + ' ' + params[i].axisValue + specialIdentification + '  ' + params[i].data + '<br />';
+                            const showTime = specialIdentification === '时' ? params[i].seriesName : '';
+                            option += `<span style="width:8px;height:8px;border-radius:50%;background:${params[i].color};display:inline-block;position:relative;top:-2px;margin-right:5px"></span>` + showTime + ' ' + params[i].axisValue + specialIdentification + '  ' + params[i].data + '<br />';
                         }
                         return option;
                     }
@@ -1080,6 +1083,20 @@ export default {
                             color: '#3CC6A5',
                             borderWidth: 2,
                             borderColor: '#fff'
+                        },
+                        areaStyle: {
+                            color: {
+                                type: 'linear',
+                                x: 0,
+                                y: 0,
+                                x2: 0,
+                                y2: 1,
+                                colorStops: [{
+                                    offset: 0, color: '#3CC6A5' // 0% 处的颜色
+                                }, {
+                                    offset: 1, color: 'white' // 100% 处的颜色
+                                }]
+                            }
                         }
                     }
                 ]