Przeglądaj źródła

数据查看 逻辑调整

jiayufei 4 lat temu
rodzic
commit
49bc5b4d42

+ 2 - 2
src/views/modules/account-config/account-config-server.js

@@ -3,7 +3,7 @@
  * @author jiayufei
  */
 
-export const urlAcount = 'http://118.24.244.213:8080'; // 线上
+// export const urlAcount = 'http://118.24.244.213:8080'; // 线上
 // export const urlAcount = 'http://apipre.tjyourong.com.cn'; // 预生产
-// export const urlAcount = 'http://192.168.1.43:8080'; // 子安
+export const urlAcount = 'http://192.168.1.43:8080'; // 子安
 // export const urlAcount = 'http://139.186.165.84:8080'; // 测试

+ 2 - 2
src/views/modules/headline-view/headline-view-server.js

@@ -3,8 +3,8 @@
  * @author jiayufei
  */
 
-export const urlAcount = 'http://118.24.244.213:8080'; // 线上
+// export const urlAcount = 'http://118.24.244.213:8080'; // 线上
 // export const urlAcount = 'http://apipre.tjyourong.com.cn'; // 预生产
-// export const urlAcount = 'http://192.168.1.43:8080'; // 子安
+export const urlAcount = 'http://192.168.1.43:8080'; // 子安
 // export const urlAcount = 'http://139.186.165.84:8080'; // 测试
 // export const urlAcount = 'http://192.168.1.8:8080'; // 学超

+ 42 - 26
src/views/modules/headline-view/headline-view.vue

@@ -23,7 +23,7 @@
                             <a-divider type="vertical"/>
                             <div class="tongbi">
                                 <div style="margin-bottom:8px">
-                                    
+                                    
                                     <a-tooltip >
                                         <template slot="title">
                                             <span>截止此时与上一阶段的花费同比</span>
@@ -403,68 +403,77 @@ export default {
                     dataIndex: 'adName',
                     key: 'adName',
                     align: 'center',
-                    width: 120,
-                    ellipsis: true
+                    width: 120
                 },
                 {
                     title: '花费',
                     dataIndex: 'cost',
                     key: 'cost',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.cost - b.cost
                 },
                 {
                     title: '出价',
-                    dataIndex: 'bid',
-                    key: 'bid',
-                    align: 'center'
+                    dataIndex: 'cpaBid',
+                    key: 'cpaBid',
+                    align: 'center',
+                    sorter: (a, b) => a.cpaBid - b.cpaBid
                 },
                 {
                     title: '展示数',
                     dataIndex: 'showNum',
                     key: 'showNum',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.showNum - b.showNum
                 },
                 {
                     title: '平均千次展现费用',
                     dataIndex: 'averageShow',
                     key: 'averageShow',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.averageShow - b.averageShow
                 },
                 {
                     title: '点击数',
                     dataIndex: 'click',
                     key: 'click',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.click - b.click
                 },
                 {
                     title: '平均点击单价',
                     dataIndex: 'averageClick',
                     key: 'averageClick',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.averageClick - b.averageClick
                 },
                 {
                     title: '点击率',
                     dataIndex: 'clickRate',
                     key: 'clickRate',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.clickRate.split('%')[0] - b.clickRate.split('%')[0]
                 },
                 {
                     title: '转化数',
                     dataIndex: 'convertNum',
                     key: 'convertNum',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.convertNum - b.convertNum
                 },
                 {
                     title: '转化率',
                     dataIndex: 'converRate',
                     key: 'converRate',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.converRate - b.converRate
                 },
                 {
                     title: '转化成本',
                     dataIndex: 'conver',
                     key: 'conver',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.conver - b.conver
                 },
                 {
                     title: '环比',
@@ -511,49 +520,56 @@ export default {
                     title: '花费',
                     dataIndex: 'cost',
                     align: 'center',
-                    sorter: () => {}
+                    sorter: (a, b) => a.cost - b.cost
                 },
                 {
                     title: '展示数',
                     dataIndex: 'showMaterial',
                     key: 'showMaterial',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.showMaterial - b.showMaterial
                 },
                 {
                     title: '平均千次展现费用',
                     dataIndex: 'costPerThousandShow',
                     key: 'costPerThousandShow',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.costPerThousandShow - b.costPerThousandShow
                 },
                 {
                     title: '点击数',
                     dataIndex: 'click',
                     key: 'click',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.click - b.click
                 },
                 {
-                    title: '平均店家单价',
+                    title: '平均点击单价',
                     dataIndex: 'costPerClick',
                     key: 'costPerClick',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.costPerClick - b.costPerClick
                 },
                 {
                     title: '点击率',
                     dataIndex: 'clickRate',
                     key: 'clickRate',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.clickRate - b.clickRate
                 },
                 {
                     title: '转化数',
                     dataIndex: 'convertMaterial',
                     key: 'convertMaterial',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.convertMaterial - b.convertMaterial
                 },
                 {
                     title: '转化率',
                     dataIndex: 'convertRate',
                     key: 'convertRate',
-                    align: 'center'
+                    align: 'center',
+                    sorter: (a, b) => a.convertRate - b.convertRate
                 },
                 {
                     title: '转化成本',
@@ -940,6 +956,7 @@ export default {
         },
         // 默认echarts
         initAccountIndexEchart(data, type) {
+            const LastX = data.lastMap.costList.map(item => item.time);
             const todayX = data.nowMap.costList.map(item => item.time);
             let specialIdentification = '';
             if (todayX.length && todayX[0].indexOf('-') !== -1) {
@@ -1068,7 +1085,7 @@ export default {
                 ]
             };
             option.xAxis[0].data = todayX;
-            option.xAxis[1].data = todayX;
+            option.xAxis[1].data = LastX;
             option.series[0].data = tadayShowY;
             option.series[1].data = yestodayShowY;
             return option;
@@ -1241,7 +1258,6 @@ export default {
                 this.newDataSortType = 'DESC';
                 this.newDataSortCode = 'charge';
             }
-            this.getLaunchData();
         },
         // 素材点击排序功能
         materialChange(pagination, filters, sorter) {