Эх сурвалжийг харах

特殊、异常分类统计图表修改

zhongxiaoyu 2 жил өмнө
parent
commit
766fee075b

+ 10 - 4
public/config.js

@@ -153,6 +153,12 @@ window.DATACONTENT_ID = {
   passengerImportantClassificationByArea: 1202, // 旅客分类要客统计-分公司
   abnormalBaggageClassificationByOther: 1205, // 异常行李分类统计
   abnormalBaggageClassificationByArea: 1206, // 异常行李分类统计-分公司
+  compensationClassificationAll: 1834, // 赔偿金额分类统计-全部
+  compensationClassificationByAirline: 1835, // 赔偿金额分类统计-航线
+  compensationBaggageClassificationAll: 1836, // 赔偿行李分类统计-全部
+  compensationBaggageClassificationByAirline: 1837, // 赔偿行李分类统计-航线
+  abnormalBaggageClassificationAll: 1838, // 异常行李分类统计-全部
+  abnormalBaggageClassificationByAirline: 1839, // 异常行李分类统计-航线
   nodeRange: 1801, // 节点查询范围
   nodeAirline: 1802, // 节点航线下拉
   nodeAirport: 1803, // 节点航站下拉
@@ -161,8 +167,8 @@ window.DATACONTENT_ID = {
   nodeOut: 1804, // 节点统计雷达图-离港
   nodeExportAirline: 1805, // 节点统计导出-航线
   nodeExportAirport: 1805, // 节点统计导出-航站
-  nodeAxisDesc: 90, // 节点统计指示器名称解释
-};
+  nodeAxisDesc: 90 // 节点统计指示器名称解释
+}
 
 window.SERVICE_ID = {
   /***-----账号管理------***/
@@ -188,5 +194,5 @@ window.SERVICE_ID = {
   sysServiceEditBoxId: 4, //系统设置-服务管理-编辑服务-部署机器-多选框
   sysQueryTabId: 5, //系统设置-查询模板-表格-增删改
   sysServiceAddXyId: 10, //系统设置-服务管理-新增服务-新增数据源-提交
-  sysDataTabId: 9, //系统设置-数据结构-数据项-表格-增删改
-};
+  sysDataTabId: 9 //系统设置-数据结构-数据项-表格-增删改
+}

+ 34 - 14
src/views/statisticsCharts/components/commonPieStatisticsCharts.vue

@@ -52,6 +52,9 @@ export default {
     pieTitle: {
       type: String,
       default: '总件数'
+    },
+    onlyAirline: {
+      type: Boolean
     }
   },
   data() {
@@ -323,24 +326,38 @@ export default {
 
       let id
       let params = []
-      if (formData.range === '基地分公司') {
-        id = this.querySettings.byArea
-        params = [formData.interval, formData.area, formData.inOrOut, formData.dateTime[0], formData.dateTime[1]]
+
+      if (this.onlyAirline) {
+        if (formData.range === '航线') {
+          id = this.querySettings.byAirline
+          params = [formData.airline, formData.dateTime[0], formData.dateTime[1]]
+        } else {
+          id = this.querySettings.all
+          params = [formData.dateTime[0], formData.dateTime[1]]
+        }
       } else {
-        id = this.querySettings.byOther
-        params = [formData.interval, formData.range, formData.inOrOut, formData.dateTime[0], formData.dateTime[1]]
-        if (formData.airline.length) {
-          params.splice(2, 0, formData.airline)
-        } else if (formData.airport.length) {
-          params.splice(2, 0, formData.airport)
-        } else if (formData.terminal !== '') {
-          params.splice(2, 0, formData.terminal)
+        if (formData.range === '基地分公司') {
+          id = this.querySettings.byArea
+          params = [formData.interval, formData.area, formData.inOrOut, formData.dateTime[0], formData.dateTime[1]]
         } else {
-          params.splice(2, 0, '全部')
+          id = this.querySettings.byOther
+          params = [formData.interval, formData.range, formData.inOrOut, formData.dateTime[0], formData.dateTime[1]]
+          if (formData.airline.length) {
+            params.splice(2, 0, formData.airline)
+          } else if (formData.airport.length) {
+            params.splice(2, 0, formData.airport)
+          } else if (formData.terminal !== '') {
+            params.splice(2, 0, formData.terminal)
+          } else {
+            params.splice(2, 0, '全部')
+          }
         }
       }
       this.params = params
-      if (params[2] instanceof Array) {
+      if (params[0] instanceof Array) {
+        const paramsList = params[0].map(param => [param, ...params.slice(1)])
+        this.getMultipleChartsData(id, paramsList)
+      } else if (params[2] instanceof Array) {
         const paramsList = params[2].map(param => [...params.slice(0, 2), param, ...params.slice(3)])
         this.getMultipleChartsData(id, paramsList)
       } else {
@@ -551,7 +568,10 @@ export default {
 }
 </script>
 
-<style lang="scss" scoped>
+<style
+  lang="scss"
+  scoped
+>
 .statistics-chart {
   width: 100%;
 }

+ 0 - 0
src/views/statisticsCharts/mixins/pieForm.js → src/views/statisticsCharts/mixins/onlyAirline.js


+ 9 - 6
src/views/statisticsCharts/views/special/abnormalBaggageClassificationStatisticsCharts.vue

@@ -4,25 +4,28 @@
     :query-settings="querySettings"
     :custom-form-items="customFormItems"
     :categories="categories"
+    only-airline
   />
 </template>
 
 <script>
 import CommonPieStatisticsCharts from '../../components/commonPieStatisticsCharts.vue'
-import noTerminal from '../../mixins/noTerminal'
+import onlyAirline from '../../mixins/onlyAirline'
 
 export default {
   name: 'AbnormalBaggageClassificationStatisticsCharts',
   components: { CommonPieStatisticsCharts },
-  mixins: [noTerminal],
+  mixins: [onlyAirline],
 
   data() {
     return {
       querySettings: {
-        byArea: DATACONTENT_ID.abnormalBaggageClassificationByArea,
-        byOther: DATACONTENT_ID.abnormalBaggageClassificationByOther,
-        categoryKey: '异常类型',
-        seriesKey: '异常行李量'
+        // byArea: DATACONTENT_ID.abnormalBaggageClassificationByArea,
+        // byOther: DATACONTENT_ID.abnormalBaggageClassificationByOther,
+        all: DATACONTENT_ID.abnormalBaggageClassificationAll,
+        byAirline: DATACONTENT_ID.abnormalBaggageClassificationByAirline,
+        categoryKey: 'RECTYPE',
+        seriesKey: 'nums'
       },
       categories: ['少收', '多收', '破损']
     }

+ 10 - 7
src/views/statisticsCharts/views/special/compensationBaggageClassificationStatisticsCharts.vue

@@ -4,27 +4,30 @@
     :query-settings="querySettings"
     :custom-form-items="customFormItems"
     :categories="categories"
+    only-airline
   />
 </template>
 
 <script>
 import CommonPieStatisticsCharts from '../../components/commonPieStatisticsCharts.vue'
-import noTerminal from '../../mixins/noTerminal'
+import onlyAirline from '../../mixins/onlyAirline'
 
 export default {
   name: 'CompensationClassificationStatisticsCharts',
   components: { CommonPieStatisticsCharts },
-  mixins: [noTerminal],
+  mixins: [onlyAirline],
 
   data() {
     return {
       querySettings: {
-        byArea: DATACONTENT_ID.compensationClassificationByArea,
-        byOther: DATACONTENT_ID.compensationClassificationByOther,
-        categoryKey: '赔偿类型',
-        seriesKey: '赔偿行李量'
+        // byArea: DATACONTENT_ID.compensationClassificationByArea,
+        // byOther: DATACONTENT_ID.compensationClassificationByOther,
+        all: DATACONTENT_ID.compensationBaggageClassificationAll,
+        byAirline: DATACONTENT_ID.compensationBaggageClassificationByAirline,
+        categoryKey: 'costType',
+        seriesKey: 'nums'
       },
-      categories: ['F', 'D', 'A', 'X', 'G']
+      categories: ['F', 'D', 'A', 'X', 'G'],
     }
   }
 }

+ 10 - 7
src/views/statisticsCharts/views/special/compensationClassificationStatisticsCharts.vue

@@ -5,27 +5,30 @@
     :custom-form-items="customFormItems"
     :categories="categories"
     pie-title="总金额"
+    only-airline
   />
 </template>
 
 <script>
 import CommonPieStatisticsCharts from '../../components/commonPieStatisticsCharts.vue'
-import pieForm from '../../mixins/pieForm'
+import onlyAirline from '../../mixins/onlyAirline'
 
 export default {
   name: 'CompensationClassificationStatisticsCharts',
   components: { CommonPieStatisticsCharts },
-  mixins: [pieForm],
+  mixins: [onlyAirline],
 
   data() {
     return {
       querySettings: {
-        byArea: DATACONTENT_ID.compensationClassificationByArea,
-        byOther: DATACONTENT_ID.compensationClassificationByOther,
-        categoryKey: '赔偿类型',
-        seriesKey: '赔偿金额'
+        // byArea: DATACONTENT_ID.compensationClassificationByArea,
+        // byOther: DATACONTENT_ID.compensationClassificationByOther,
+        all: DATACONTENT_ID.compensationClassificationAll,
+        byAirline: DATACONTENT_ID.compensationClassificationByAirline,
+        categoryKey: 'costType',
+        seriesKey: 'amount'
       },
-      categories: ['F', 'D', 'A', 'X', 'G']
+      categories: ['F', 'D', 'A', 'X', 'G'],
     }
   }
 }