chenjun 6 months ago
parent
commit
3c7e737aea
1 changed files with 81 additions and 73 deletions
  1. 81 73
      src/views/statisticalAnalysis/components/index.vue

+ 81 - 73
src/views/statisticalAnalysis/components/index.vue

@@ -5,7 +5,7 @@
   >
     <div class="statisticalAnalysisContent">
       <div class="flex">
-        <div class="manageTitle">统计分析</div>
+        <div class="manageTitle">国航本年统计概览</div>
         <div class="manageBtns">
           <el-switch
             v-model="value"
@@ -28,7 +28,7 @@
         <div class="content-list flex-wrap">
           <div class="content-list-box">
             <div class="content-list-box-bp">
-              <div class="content-list-box-bp-title">运输总量</div>
+              <div class="content-list-box-bp-title">全年运输总量</div>
               <div class="box-item">
                 <li
                   v-for="(item, index) in orderNum"
@@ -54,7 +54,7 @@
             <div class="content-list-box-bp">
               <div class="total-transportation-info">
                 <div class="flex">
-                  <div class="content-list-box-bp-title">运输量</div>
+                  <div class="content-list-box-bp-title">近6月运输量趋势</div>
                   <div class="total-transportation-info-icons">
                     <div class="total-transportation-info-icons-list">
                       <span class="icon1 icon"></span>
@@ -160,11 +160,11 @@
                         :class="'icon' + (index + 1)"
                         class="icon"
                       ></span>
-                      <span class="text">{{ item.name }}</span>
+                      <span class="text">{{ item.RECTYPE }}</span>
                     </div>
                     <div class="pie-data-list flex-wrap">
-                      <span class="text flex1">数量:{{ item.num }}</span>
-                      <span class="text flex1">占比:{{ item.pag }}%</span>
+                      <span class="text flex1">数量:{{ item.nums }}</span>
+                      <span class="text flex1">占比:{{ item.zhanbi }}%</span>
                     </div>
                   </div>
                 </div>
@@ -230,6 +230,8 @@ import PieCharts from '@/layout/components/Echarts/commonChartsPie.vue'
 import MapCharts from '@/layout/components/Echarts/commonChartsChinaMap.vue'
 import vueSeamlessScroll from 'vue-seamless-scroll'
 import { TempQuery } from '@/api/temp'
+import service from '@/utils/request-new';
+import { number } from 'echarts'
 const top = 0
 const bottom = 0
 export default {
@@ -248,26 +250,26 @@ export default {
       countEnterNum: '4567891',
       orderNum: ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'],
       statisticalData: [
-        {
-          id: 1,
-          src: require('../../../assets/analysis/ic_time_statistical.png'),
-          info: '28',
-          msg: '平均运输时间',
-          dw: 'min',
-          key: 'transportation',
-        },
-        {
-          id: 2,
-          src: require('../../../assets/analysis/ic_time_statistical.png'),
-          info: '28',
-          msg: '平均装机时间',
-          dw: 'min',
-          key: 'installation',
-        },
+        // {
+        //   id: 1,
+        //   src: require('../../../assets/analysis/ic_time_statistical.png'),
+        //   info: '28',
+        //   msg: '平均运输时间',
+        //   dw: 'min',
+        //   key: 'transportation',
+        // },
+        // {
+        //   id: 2,
+        //   src: require('../../../assets/analysis/ic_time_statistical.png'),
+        //   info: '28',
+        //   msg: '平均装机时间',
+        //   dw: 'min',
+        //   key: 'installation',
+        // },
         {
           id: 3,
           src: require('../../../assets/analysis/ic_luggage_statistical.png'),
-          info: '0.21',
+          info: '0',
           msg: '人均托运',
           dw: '件/人',
           key: 'avgbag',
@@ -275,7 +277,7 @@ export default {
         {
           id: 4,
           src: require('../../../assets/analysis/ic_change_statistical.png'),
-          info: '176',
+          info: '0',
           msg: '中转数',
           dw: '件',
           key: 'transnum',
@@ -303,12 +305,6 @@ export default {
           type: 'category',
           boundaryGap: true,
           data: [
-            '2021.12',
-            '2022.01',
-            '2022.02',
-            '2022.03',
-            '2022.04',
-            '2022.05',
           ],
           axisLine: {
             show: true,
@@ -344,7 +340,7 @@ export default {
             type: 'line',
             symbol: 'none',
             key: 'bagsnum',
-            data: [120, 132, 101, 134, 90, 230, 210],
+            data: [],
             areaStyle: {
               color: {
                 type: 'linear',
@@ -371,7 +367,7 @@ export default {
             type: 'line',
             symbol: 'none',
             key: 'passengers',
-            data: [220, 182, 191, 234, 290, 330, 310],
+            data: [],
             areaStyle: {
               color: {
                 type: 'linear',
@@ -595,20 +591,11 @@ export default {
       },
       baggageData: [
         {
-          name: '多收',
-          num: 33327,
-          pag: '40',
-        },
-        {
-          name: '少收',
-          num: 33327,
-          pag: '40',
-        },
-        {
-          name: '破损',
-          num: 33327,
-          pag: '40',
-        },
+          "RECTYPE": "少收",
+          "nums": 462,
+          "totalNums": 1519,
+          "zhanbi": "30.41"
+        }
       ],
       boxMap: {
         title: [
@@ -906,16 +893,6 @@ export default {
         ],
       },
       terminalData: [
-        {
-          name: 'PEK',
-          num: 200,
-          percentage: 10,
-        },
-        {
-          name: 'PEK',
-          num: 200,
-          percentage: 10,
-        },
       ],
       customColor: '#6EADE8',
     }
@@ -1102,9 +1079,11 @@ export default {
     // 获取运输总量
     async getOrderNum() {
       const { code, returnData } = await TempQuery({
-        id: SERVICE_ID.stOrderId,
-        dataContent: [],
+        serviceId: SERVICE_ID.stOrderId,
+        dataContent: {},
+        event:"0"
       })
+      console.log(code)
       if (code == 0) {
         const { listValues } = returnData
         this.countEnterNum = listValues[0]['bagsnum']
@@ -1115,17 +1094,24 @@ export default {
     // 获取运输总量-统计图
     async getOrderNumChart() {
       const { code, returnData } = await TempQuery({
-        id: SERVICE_ID.stOrderChartId,
+        serviceId: SERVICE_ID.stOrderChartId,
         dataContent: [],
+        event:"0",
+        page:1,
+        pageSize:6
       })
       if (code == 0) {
         const { listValues } = returnData
         const [mouth, bagsnum, passengers] = [[], [], []]
+        listValues.sort(function (a, b) {
+            return a.month > b.month ? 1 : -1
+        });
         listValues.forEach(item => {
           mouth.push(item.month)
           bagsnum.push(item.bagsnum)
           passengers.push(item.passengers)
         })
+
         this.totalOption.xAxis.data = mouth
         this.totalOption.series.map(item => {
           if (item.key == 'bagsnum') {
@@ -1139,17 +1125,18 @@ export default {
     // 获取统计数据
     async getStatistical() {
       const { code, returnData } = await TempQuery({
-        id: SERVICE_ID.stCalId,
+        serviceId: SERVICE_ID.stCalId,
         dataContent: [],
+        event:"0"
       })
       if (code == 0) {
         const { listValues } = returnData
         const { avgbag, transnum } = listValues[0]
         this.statisticalData.map(item => {
           if (item.key == 'avgbag') {
-            item.info = (avgbag ?? 0).toFixed(2)
+            item.info = (Number(avgbag) ?? 0).toFixed(2)
           } else if (item.key == 'transnum') {
-            item.info = transnum ?? 0
+            item.info = Number(transnum) ?? 0
           } else {
             item.info = '-'
           }
@@ -1163,8 +1150,12 @@ export default {
     // 获取航班数
     async getFignts() {
       const { code, returnData } = await TempQuery({
-        id: SERVICE_ID.stFigntsId,
+        serviceId: SERVICE_ID.stFigntsId,
         dataContent: [],
+        event:"0",
+        page:1,
+        pageSize:6
+
       })
       if (code == 0) {
         const { listValues } = returnData
@@ -1187,8 +1178,11 @@ export default {
     // 获取中转数
     async getSpeed() {
       const { code, returnData } = await TempQuery({
-        id: SERVICE_ID.stSpeedId,
+        serviceId: SERVICE_ID.stSpeedId,
         dataContent: [],
+        event:"0",
+        page:1,
+        pageSize:6
       })
       if (code == 0) {
         const { listValues } = returnData
@@ -1205,12 +1199,20 @@ export default {
     // 获取异常行李
     async getBaggage() {
       const { code, returnData } = await TempQuery({
-        id: SERVICE_ID.stBaggageId,
+        serviceId: SERVICE_ID.stBaggageId,
         dataContent: [],
+        event:"0"
       })
       const { listValues } = returnData
       if (code == 0 && listValues.length) {
         this.baggageData = listValues
+        let newObj = []
+        this.baggageData.map(item => {
+          newObj.push({
+            value: item.nums, key: item.RECTYPE, name: item.RECTYPE
+          })
+        })
+        this.pieOption.series[0].data = newObj
       } else {
         this.baggageData.map(item => {
           item.num = 0
@@ -1224,8 +1226,9 @@ export default {
     // 获取区域运输top
     async getMap() {
       const { code, returnData } = await TempQuery({
-        id: SERVICE_ID.stMapId,
+        serviceId: SERVICE_ID.stMapId,
         dataContent: [],
+        event:"0"
       })
       if (code == 0) {
         const { listValues } = returnData
@@ -1240,8 +1243,9 @@ export default {
     // 获取国内国际
     async getCountry() {
       const { code, returnData } = await TempQuery({
-        id: SERVICE_ID.stCountryId,
+        serviceId: SERVICE_ID.stCountryId,
         dataContent: [],
+        event:"0"
       })
       if (code == 0) {
         const { listValues } = returnData
@@ -1249,9 +1253,9 @@ export default {
         let int = null // 国际
         let dom = null // 国内
         listValues.map(item => {
-          if (item.ditype == 'INT') {
+          if (item.ditype == '国际') {
             int = item.bagsnum
-          } else if (item.ditype == 'DOM') {
+          } else if (item.ditype == '国内') {
             dom = item.bagsnum
           }
           total += Number(item.bagsnum)
@@ -1273,8 +1277,11 @@ export default {
     // 获取航站运输排行
     async getTerminalData() {
       const { code, returnData } = await TempQuery({
-        id: SERVICE_ID.stTerminalId,
+        serviceId: SERVICE_ID.stTerminalId,
         dataContent: [],
+        event:"0",
+        page:1,
+        pageSize:10
       })
       if (code == 0) {
         const { listValues } = returnData
@@ -1283,7 +1290,7 @@ export default {
           total += Number(item.bagsnum)
         })
         listValues.map(item => {
-          item.name = item.airport
+          item.name = item.outAirport
           item.num = item.bagsnum
           item.percentage = (item.bagsnum / total).toFixed(2) * 100
         })
@@ -1400,7 +1407,7 @@ export default {
         background-position: top left, top left, bottom right, bottom right;
         background-size: 10px 100%, 100% 10px;
         &-bp {
-          padding: 36px;
+          padding: 36px 14px;
           position: relative;
           height: 100%;
           border: 1px solid rgba($color: #fff, $alpha: 0.3);
@@ -1677,7 +1684,7 @@ export default {
       overflow: hidden;
     }
     &-list {
-      margin-top: 36px;
+      margin-top: 30px;
       .name {
         font-size: 14px;
         font-family: Helvetica;
@@ -1708,6 +1715,7 @@ export default {
     .manageTitle,
     .info-msg,
     .info-time-dw {
+      font-size: 20px !important;
       color: #333 !important;
     }
     .content-list-box {