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

Merge branch 'master' of http://120.26.64.82:10880/BFFE/dz2.1

zhaoke 1 жил өмнө
parent
commit
c56928c75f

+ 1 - 1
src/views/statisticsCharts/views/baggage/airlineStatisticsCharts.vue

@@ -122,7 +122,7 @@ export default {
           filterable: true,
           // clearable: true,
           width: '180px',
-          queryId: SERVICE_ID.AirlineIds,
+          queryId: 75,
           setKey: 'air_line',
           options: [],
         },

+ 28 - 3
src/views/statisticsCharts/views/baggage/hourStatisticsCharts.vue

@@ -9,13 +9,14 @@
 
 <script>
 import CommonBarStatisticsCharts from '../../components/newBarStatisticsCharts.vue'
+import { mapGetters } from 'vuex'
 export default {
   name: 'FlightStatisticsCharts',
   components: { CommonBarStatisticsCharts },
   data() {
     return {
       querySettings: {
-        serviceId: SERVICE_ID.LuggageHourId,
+        serviceid: '',
         seriesKey: 'bags',
         xAxisKey: 'dat',
       },
@@ -35,8 +36,8 @@ export default {
           // clearable: true,
           // multiple: true,
           // disabled: true,
-          queryId: SERVICE_ID.AirportIds,
-          setKey: 'code3',
+          queryId: 74,
+          setKey: 'IATACode',
           options: [],
         },
         {
@@ -70,5 +71,29 @@ export default {
       ],
     }
   },
+  computed: {
+    ...mapGetters(['authArrs']),
+  },
+  mounted() {
+    this.pageInit()
+  },
+  methods: {
+    //页面初始化
+    pageInit () {
+      //获取页面查询参数
+      const { query } = this.$route
+      this.pageQuery = query
+      //获取页面配置
+      const { pagecode, qid, auth_id } = this.$route.meta
+      //获取页面权限类型组件  pagetype 1模块  2页面  3按钮 4表格 5树形  6弹窗 
+      const pageAuths = this.authArrs
+      if (!pageAuths.length) return
+      //获取当前页面权限类型
+      const pageAuthArrs = pageAuths.filter(item => item['superiorid'] == auth_id)
+      if (!pageAuthArrs.length) return
+      // console.log(pageAuthArrs)
+      this.querySettings.serviceid = pageAuthArrs[0].serviceid
+    },
+  },
 }
 </script>

+ 32 - 11
src/views/statisticsCharts/views/nodeStatisticsCharts.vue

@@ -43,6 +43,9 @@ export default {
   components: { StatisticsHeader, Dialog },
   data () {
     return {
+      querySettings: {
+        serviceid: '',
+      },
       formData: {
         range: '',
         airline: '',
@@ -96,7 +99,7 @@ export default {
           filterable: true,
           clearable: true,
           // disabled: true,
-          queryId: SERVICE_ID.AirlineIds,
+          queryId: 75,
           setKey: 'air_line',
           options: [],
         },
@@ -108,8 +111,8 @@ export default {
           clearable: true,
           // multiple: true,
           // disabled: true,
-          queryId: SERVICE_ID.AirportIds,
-          setKey: 'code3',
+          queryId: 74,
+          setKey: 'IATACode',
           options: [],
         },
         {
@@ -244,6 +247,7 @@ export default {
   },
   computed: {
     ...mapGetters(['sidebar']),
+    ...mapGetters(['authArrs']),
     checkedTooltips () {
       return this.tooltips.filter(tooltip =>
         this.checkList.includes(tooltip.name)
@@ -293,8 +297,8 @@ export default {
     },
   },
   created () {
-    this.getTips()
-
+    // this.getTips()
+    this.pageInit()
     this.tooltips = this.nodeList.reduce((pre, curr) => {
       if (curr.label) {
         return [
@@ -361,6 +365,22 @@ export default {
     }
   },
   methods: {
+    pageInit () {
+      //获取页面查询参数
+      const { query } = this.$route
+      this.pageQuery = query
+      //获取页面配置
+      const { pagecode, qid, auth_id } = this.$route.meta
+      //获取页面权限类型组件  pagetype 1模块  2页面  3按钮 4表格 5树形  6弹窗 
+      const pageAuths = this.authArrs
+      if (!pageAuths.length) return
+      //获取当前页面权限类型
+      const pageAuthArrs = pageAuths.filter(item => item['superiorid'] == auth_id)
+      if (!pageAuthArrs.length) return
+      // console.log(pageAuthArrs)
+      this.querySettings.serviceid = pageAuthArrs[0].serviceid
+      // this.getTips(pageAuthArrs[0].serviceid)
+    },
     hideTips (params) {
       if (params.componentType === 'radar') {
         this.myChart._dom.children[1].style.opacity = 0
@@ -393,11 +413,11 @@ export default {
           break
       }
     },
-    async getTips () {
+    async getTips (serviceid) {
       try {
         const { code, returnData, message } = await TempQuery({
-          serviceId: SERVICE_ID.nodeAxisDesc,
-          dataContent: [],
+          serviceId: serviceid,
+          dataContent: [{filter: {1:1}}],
         })
         if (Number(code) === 0 && returnData?.length) {
           this.descriptions = JSON.parse(returnData[0].jieshi)
@@ -462,15 +482,16 @@ export default {
       // }
       // console.log(params)
       this.queryData = params
+      let filter = params[0]
       this.msgObj = { ...dataObj }
       try {
         this.echartsOptions.series[0].data = []
         this.tooltips.forEach(tooltip => (tooltip.ratio = '0%'))
         this.hasChartData = false
-
         const res = await TempQuery({
-          serviceId: SERVICE_ID.LuggageNodeId,
-          dataContent: params,
+          serviceid: this.querySettings.serviceid,
+          datacontent: [{filter}],
+          event: "0"
         })
         if (Number(res.code) === 0) {
           if (res.returnData.length) {