浏览代码

完成修改

zhuxinbo 5 年之前
父节点
当前提交
5d7003aac6
共有 3 个文件被更改,包括 65 次插入41 次删除
  1. 28 20
      src/views/modules/Statistics/companyDetail.vue
  2. 35 19
      src/views/modules/Statistics/companyStatistics.vue
  3. 2 2
      vue.config.js

+ 28 - 20
src/views/modules/Statistics/companyDetail.vue

@@ -56,12 +56,6 @@ const columns = [
     align: 'center',
     width: 200
   },
-  //   {
-  //     title: '账户id',
-  //     dataIndex: 'accountId',
-  //     key: 'accountId',
-  //     align: 'center'
-  //   },
   {
     title: '快手id',
     dataIndex: 'kid',
@@ -84,87 +78,101 @@ const columns = [
     title: '有消费计划数',
     dataIndex: 'costCampaignCount',
     key: 'costCampaignCount',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.costCampaignCount - b.costCampaignCount
   },
   {
     title: '总余额',
     dataIndex: 'balance',
     key: 'balance',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.balance - b.balance
   },
   {
     title: '总消耗',
     dataIndex: 'cost',
     key: 'cost',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.cost - b.cost
   },
   {
     title: '现金消耗',
     dataIndex: 'xianjinCost',
     key: 'xianjinCost',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.xianjinCost - b.xianjinCost
   },
   {
     title: '后返消耗',
     dataIndex: 'fandianCost',
     key: 'fandianCost',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.fandianCost - b.fandianCost
   },
   {
     title: '框返消耗',
     dataIndex: 'kuangfanCost',
     key: 'kuangfanCost',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.kuangfanCost - b.kuangfanCost
   },
   {
     title: '激励账户消耗',
     dataIndex: 'jiliCost',
     key: 'jiliCost',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.jiliCost - b.jiliCost
   },
   {
     title: '信⽤账户消耗',
     dataIndex: 'xinyongCost',
     key: 'xinyongCost',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.xinyongCost - b.xinyongCostxinyongCost
   },
   {
     title: '封⾯曝光数',
     dataIndex: 'fengmianShowCount',
     key: 'fengmianShowCount',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.fengmianShowCount - b.fengmianShowCount
   },
   {
     title: '封⾯点击数',
     dataIndex: 'fengmianClickCount',
     key: 'fengmianClickCount',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.fengmianClickCount - b.fengmianClickCount
   },
   {
     title: '素材曝光数',
     dataIndex: 'sucaiShowCount',
     key: 'sucaiShowCount',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.sucaiShowCount - b.sucaiShowCount
   },
   {
     title: '行为数',
     dataIndex: 'convertCount',
     key: 'convertCount',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.convertCount - b.convertCount
   },
   {
     title: '封⾯点击率',
     dataIndex: 'fengmianClickRate',
     key: 'fengmianClickRate',
     scopedSlots: { customRender: 'fengmianClickRate' },
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.fengmianClickRate - b.fengmianClickRate
   },
   {
     title: '转化点击率',
     dataIndex: 'convertClickRate',
     key: 'convertClickRate',
     scopedSlots: { customRender: 'convertClickRate' },
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.convertClickRate - b.convertClickRate
   }
 ]
 export default {

+ 35 - 19
src/views/modules/Statistics/companyStatistics.vue

@@ -95,14 +95,18 @@ th div {
     <a-row :gutter="16">
       <a-col :span="24">
         <a-card :bordered="false" style="margin:10px 0">
-          <div>
+          <div style="box-sizing:border-box;">
             <h3>数据汇总</h3>
             <div
               v-for="(item, index) of allData"
               :key="index"
-              style="margin-right:20px;font-size:16px;word-wrap: break-word;word-break: normal;display:inline-block;width:20%"
+              style="font-size:16px;word-wrap: break-word;word-break: normal;display:inline-block;width:25%;"
             >
-              <span style="display:inline-block;width:100px;text-align-last: justify;">{{ item.label }}</span> :
+              <span
+                style="display:inline-block;width:120px;text-align-last: justify;font-family: Serif;font-weight:700"
+                >{{ item.label }}</span
+              >
+              :
               <span>{{ item.value }}</span>
             </div>
           </div>
@@ -159,87 +163,101 @@ const columns = [
     title: '有消费计划数',
     dataIndex: 'costCampaignCount',
     key: 'costCampaignCount',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.costCampaignCount - b.costCampaignCount
   },
   {
     title: '总余额',
     dataIndex: 'balance',
     key: 'balance',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.balance - b.balance
   },
   {
     title: '总消耗',
     dataIndex: 'cost',
     key: 'cost',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.cost - b.cost
   },
   {
     title: '现金消耗',
     dataIndex: 'xianjinCost',
     key: 'xianjinCost',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.xianjinCost - b.xianjinCost
   },
   {
     title: '后返消耗',
     dataIndex: 'fandianCost',
     key: 'fandianCost',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.fandianCost - b.fandianCost
   },
   {
     title: '框返消耗',
     dataIndex: 'kuangfanCost',
     key: 'kuangfanCost',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.kuangfanCost - b.kuangfanCost
   },
   {
     title: '激励账户消耗',
     dataIndex: 'jiliCost',
     key: 'jiliCost',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.jiliCost - b.jiliCost
   },
   {
     title: '信⽤账户消耗',
     dataIndex: 'xinyongCost',
     key: 'xinyongCost',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.xinyongCost - b.xinyongCostxinyongCost
   },
   {
     title: '封⾯曝光数',
     dataIndex: 'fengmianShowCount',
     key: 'fengmianShowCount',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.fengmianShowCount - b.fengmianShowCount
   },
   {
     title: '封⾯点击数',
     dataIndex: 'fengmianClickCount',
     key: 'fengmianClickCount',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.fengmianClickCount - b.fengmianClickCount
   },
   {
     title: '素材曝光数',
     dataIndex: 'sucaiShowCount',
     key: 'sucaiShowCount',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.sucaiShowCount - b.sucaiShowCount
   },
   {
     title: '行为数',
     dataIndex: 'convertCount',
     key: 'convertCount',
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.convertCount - b.convertCount
   },
   {
     title: '封⾯点击率',
     dataIndex: 'fengmianClickRate',
     key: 'fengmianClickRate',
     scopedSlots: { customRender: 'fengmianClickRate' },
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.fengmianClickRate - b.fengmianClickRate
   },
   {
     title: '转化点击率',
     dataIndex: 'convertClickRate',
     key: 'convertClickRate',
     scopedSlots: { customRender: 'convertClickRate' },
-    align: 'center'
+    align: 'center',
+    sorter: (a, b) => a.convertClickRate - b.convertClickRate
   },
   {
     title: '操作',
@@ -361,7 +379,6 @@ export default {
       this.loading = true
       var date = new Date()
       var params = {}
-      console.log(moment(date).format('YYYY-MM-DD'))
       switch (type) {
         case 1:
           params.startDate = moment(new Date()).format('YYYY-MM-DD')
@@ -414,7 +431,6 @@ export default {
         }
       })
       postAction('/report/kuaishouReportDailyAgentSum/companyReportSum', params).then(res => {
-        console.log(res)
         if (res.result) {
           this.allData = [
             { value: res.result.costCampaignCount, label: '有消费计划数' },

+ 2 - 2
vue.config.js

@@ -65,9 +65,9 @@ module.exports = {
        },*/
       '/jeecg-boot': {
         // target: 'http://39.97.120.42:8080', //请求本地 需要jeecg-boot后台项目  生产环境
-        // target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
+        target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.143:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
-        target: 'http://192.168.2.110:8080', //请求本地 需要jeecg-boot后台项目  英豪
+        // target: 'http://192.168.2.110:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目  孙震