Browse Source

2020.05.27

yinchengnuo 4 years ago
parent
commit
a73299ea73

+ 7 - 2
src/components/Charts/SignupLineChart.vue

@@ -82,7 +82,7 @@ export default {
           bottom: 8,
           containLabel: true
         },
-        color: ['#4C9ECD', '#D970D0'],
+        color: ['#4C9ECD', '#D970D0', '#5AC4B6'],
         tooltip: {
           trigger: 'axis',
           axisPointer: {
@@ -92,7 +92,7 @@ export default {
         legend: {
           top: 8,
           right: 8,
-          data: ['销售经理', '销售主管']
+          data: ['销售经理', '销售主管', '代理公司']
         },
         toolbox: {
           show: false
@@ -127,6 +127,11 @@ export default {
             name: '销售主管',
             type: this.type,
             data: this.chartData.tj
+          },
+          {
+            name: '代理公司',
+            type: this.type,
+            data: this.chartData.crown
           }
         ]
       })

+ 8 - 3
src/components/Charts/SignupLineChart1.vue

@@ -82,7 +82,7 @@ export default {
           bottom: 8,
           containLabel: true
         },
-        color: ['#4C9ECD', '#D970D0'],
+        color: ['#4C9ECD', '#D970D0', '#5AC4B6'],
         tooltip: {
           trigger: 'axis',
           axisPointer: {
@@ -91,8 +91,8 @@ export default {
         },
         legend: {
           top: 8,
-          right: 8,
-          data: ['销售经理', '销售主管']
+          right: 0,
+          data: ['销售经理', '销售主管', '代理公司']
         },
         toolbox: {
           show: false
@@ -127,6 +127,11 @@ export default {
             name: '销售主管',
             type: this.type,
             data: this.chartData.tj
+          },
+          {
+            name: '代理公司',
+            type: this.type,
+            data: this.chartData.crown
           }
         ],
         animation: true

+ 13 - 0
src/views/DataScreen1/index.vue

@@ -9,6 +9,8 @@
       <div class="total-item">{{ superNum }}</div>
       <div class="total-item">销售经理人数</div>
       <div class="total-item">{{ topNum }}</div>
+      <div class="total-item">代理公司人数</div>
+      <div class="total-item">{{ crownNum }}</div>
     </div>
     <div class="map">
       <div v-if="mapChartData.length > 0" id="china1" style="width:100%;height:100%;" />
@@ -117,6 +119,7 @@ export default {
       total: 0,
       topNum: 0,
       superNum: 0,
+      crownNum: 0,
       timer: null,
       opened: false,
       mapChartData: [],
@@ -160,6 +163,13 @@ export default {
           female: '/'
         },
         {
+          level: '代理公司',
+          num: this.superNum,
+          percent: (this.crownNum / this.total * 100).toFixed(2) + '%',
+          male: '/',
+          female: '/'
+        },
+        {
           level: '合计',
           num: this.total,
           percent: (this.total / this.total * 100).toFixed(2) + '%',
@@ -214,11 +224,13 @@ export default {
         this.lineChartData = {
           top: res.data.list1,
           tj: res.data.list2,
+          crown: res.data.list7,
           time: res.data.list3
         }
         if (!this.opened) {
           this.tabbleChartData = res.data.list.sort((a, b) => b.value - a.value)
         }
+        this.crownNum = res.data.crown
         this.topNum = res.data.top
         this.superNum = res.data.tj
         this.total = res.data.total
@@ -251,6 +263,7 @@ export default {
                   总报名人数:${params.value} <br />
                   销售主管报名人数:${this.mapChartData[params.dataIndex].tj} <br />
                   销售经理报名人数:${this.mapChartData[params.dataIndex].top} <br />
+                  代理公司报名人数:${this.mapChartData[params.dataIndex].crown} <br />
                 `
               }
             },

+ 27 - 12
src/views/DataScreen2/index.vue

@@ -7,11 +7,13 @@
         <div class="item">累计报名人数</div>
         <div class="item">销售主管人数</div>
         <div class="item">销售经理人数</div>
+        <div class="item">代理公司人数</div>
       </div>
       <div class="bot">
         <div class="item">{{ total }}</div>
         <div class="item">{{ superNum }}</div>
         <div class="item">{{ topNum }}</div>
+        <div class="item">{{ crownNum }}</div>
       </div>
     </div>
     <div class="map">
@@ -27,22 +29,24 @@
     </div>
     <div id="table-wrapper" class="table-wrapper">
       <el-table ref="table" :data="tabbleChartData" style="width: 100%" header-cell-class-name="fsdfasdfas" @expand-change="open">
-        <el-table-column label="排名" :width="width / 11 * 2" type="index" align="center" :index="index => index + 1" />
-        <el-table-column label="地区" :width="width / 11 * 2" prop="name" align="center" />
-        <el-table-column label="销售主管" :width="width / 11 * 2" prop="tj" align="center" />
-        <el-table-column label="销售经理" :width="width / 11 * 2" prop="top" align="center" />
-        <el-table-column label="合计" :width="width / 11 * 2" align="center">
+        <el-table-column label="排名" :width="width / 13 * 2" type="index" align="center" :index="index => index + 1" />
+        <el-table-column label="地区" :width="width / 13 * 2" prop="name" align="center" />
+        <el-table-column label="销售主管" :width="width / 13 * 2" prop="tj" align="center" />
+        <el-table-column label="销售经理" :width="width / 13 * 2" prop="top" align="center" />
+        <el-table-column label="代理公司" :width="width / 13 * 2" prop="crown" align="center" />
+        <el-table-column label="合计" :width="width / 13 * 2" align="center">
           <template slot-scope="scope">{{ scope.row.top + scope.row.tj }}</template>
         </el-table-column>
-        <el-table-column type="expand" :width="width / 11 * 1">
+        <el-table-column type="expand" :width="width / 13 * 1">
           <template slot-scope="props">
             <signup-line-chart1 v-if="props.row.chart" :chart-data="props.row.chart" />
             <el-table v-if="props.row.list" :data="props.row.list" border style="width: 100%">
-              <el-table-column label="排名" type="index" align="center" :width="(width - 16 ) / 5" :index="index => index + 1" />
-              <el-table-column label="城市" prop="name" align="center" :width="(width - 16 ) / 5" />
-              <el-table-column label="销售主管" prop="tj" align="center" :width="(width - 16 ) / 5" />
-              <el-table-column label="销售经理" prop="top" align="center" :width="(width - 16 ) / 5" />
-              <el-table-column label="合计" prop="value" align="center" :width="(width - 16 ) / 5" />
+              <el-table-column label="排名" type="index" align="center" :width="(width - 16 ) / 6" :index="index => index + 1" />
+              <el-table-column label="城市" prop="name" align="center" :width="(width - 16 ) / 6" />
+              <el-table-column label="销售主管" prop="tj" align="center" :width="(width - 16 ) / 6" />
+              <el-table-column label="销售经理" prop="top" align="center" :width="(width - 16 ) / 6" />
+              <el-table-column label="代理公司" prop="crown" align="center" :width="(width - 16 ) / 6" />
+              <el-table-column label="合计" prop="value" align="center" :width="(width - 16 ) / 6" />
             </el-table>
           </template>
         </el-table-column>
@@ -120,6 +124,7 @@ export default {
       width: document.body.offsetWidth,
       total: 0,
       topNum: 0,
+      crownNum: 0,
       superNum: 0,
       timer: null,
       opened: false,
@@ -164,6 +169,13 @@ export default {
           female: '/'
         },
         {
+          level: '代理公司',
+          num: this.superNum,
+          percent: (this.crownNum / this.total * 100).toFixed(2) + '%',
+          male: '/',
+          female: '/'
+        },
+        {
           level: '合计',
           num: this.total,
           percent: (this.total / this.total * 100).toFixed(2) + '%',
@@ -254,12 +266,14 @@ export default {
         this.lineChartData = {
           top: res.data.list1,
           tj: res.data.list2,
+          crown: res.data.list7,
           time: res.data.list3
         }
         if (!this.opened) {
           this.tabbleChartData = res.data.list.sort((a, b) => b.value - a.value)
         }
         this.topNum = res.data.top
+        this.crownNum = res.data.crown
         this.superNum = res.data.tj
         this.total = res.data.total
         res.data.list4.forEach(e => {
@@ -290,13 +304,14 @@ export default {
               formatter: params => {
                 this.$emit('renderDetail', params.dataIndex)
                 return `
-                  <div style="min-width: 123px; height: 60px; display:flex; align-items: center;">
+                  <div style="min-width: 123px; height: 75px; display:flex; align-items: center;">
                     <div id="TooltipInfo" style="flex: 1; height: 100%; font-size: 8px; line-height: 12px; padding-right: 6px; border-right: 0.4px solid #FFFFFF;">
                       <div>省份:${params.name}</div>
                       <div>排名:${params.dataIndex + 1}</div>
                       <div>总报名人数:${params.value}</div>
                       <div>销售主管报名人数:${this.mapChartData[params.dataIndex].tj}</div>
                       <div>销售经理报名人数:${this.mapChartData[params.dataIndex].top}</div>
+                      代理公司报名人数:${this.mapChartData[params.dataIndex].crown} <br />
                     </div>
                     <div id="TooltipDetail" style="height: 100%; line-height: 60px; margin-left: 8px;">详情 ></div>
                   </div>

+ 2 - 2
vue.config.js

@@ -19,8 +19,8 @@ module.exports = {
     },
     proxy: {
       [process.env.VUE_APP_BASE_API]: {
-        // target: 'https://api.admin.jiuweiyun.cn/api',
-        target: 'http://192.168.0.15:8016/api',
+        target: 'https://api.admin.jiuweiyun.cn/api',
+        // target: 'http://192.168.0.4:8090/api',
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''