|
@@ -1,7 +1,12 @@
|
|
|
<template>
|
|
|
<div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="statstics-wrapper">
|
|
|
<div ref="headerWrapper" class="statstics-header">
|
|
|
- <StatisticsHeader title="扫描节点与位置分析" :items="formItems" :data="formData" with-setting @getFormData="getFormData" @export="exportHandler" @setting="settingHandler" />
|
|
|
+ <PublicPageHeader class="TablePage_header" :page-title="dataTitle ? dataTitle : pageTitle">
|
|
|
+ <template slot="d_foot">
|
|
|
+ <SimpleQuery v-if="simpleQueryFlag" :selectOptions="advancedQueryValue" :simple-query-item="simpleQueryItem" @queryValue="queryValue" @changeSelect="changeSelect"/>
|
|
|
+ </template>
|
|
|
+ </PublicPageHeader>
|
|
|
+ <!-- <StatisticsHeader title="扫描节点与位置分析" :items="formItems" :data="formData" with-setting @getFormData="getFormData" @export="exportHandler" @setting="settingHandler" /> -->
|
|
|
</div>
|
|
|
<div class="statstics-content">
|
|
|
<div ref="myChart" class="node-statistics-chart" :style="{ height: chartHeight }" />
|
|
@@ -31,6 +36,8 @@
|
|
|
|
|
|
<script>
|
|
|
import StatisticsHeader from '../components/statisticsHeader.vue'
|
|
|
+import PublicPageHeader from '@/components/PublicPageHeader'
|
|
|
+import SimpleQuery from '@/components/SimpleQuery'
|
|
|
import Dialog from '@/layout/components/Dialog'
|
|
|
import { TempQuery } from '@/api/temp'
|
|
|
import { mapGetters } from 'vuex'
|
|
@@ -40,7 +47,13 @@ import FileSaver from 'file-saver'
|
|
|
|
|
|
export default {
|
|
|
name: 'FlightStatisticsCharts',
|
|
|
- components: { StatisticsHeader, Dialog },
|
|
|
+ components: { StatisticsHeader, Dialog, PublicPageHeader, SimpleQuery },
|
|
|
+ props: {
|
|
|
+ dataTitle: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
+ },
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
querySettings: {
|
|
@@ -242,7 +255,21 @@ export default {
|
|
|
descriptions: {},
|
|
|
loading: false,
|
|
|
msgDatas: [],
|
|
|
- msgObj: {}
|
|
|
+ msgObj: {},
|
|
|
+ pageAuthtablesList: {
|
|
|
+ authArrs: [],
|
|
|
+ pageAuthtables:[]
|
|
|
+ },
|
|
|
+ pageQuery: {},
|
|
|
+ tableBtns: [], //表格按钮权限
|
|
|
+ pageTitle: '', //页面名称
|
|
|
+ pageServiceId: null, //表格serviceid
|
|
|
+ selected: 0, //是否勾选
|
|
|
+ triggerserviceid: null, //勾选后查询的serviceid
|
|
|
+ defaultfilter: { 1: 1 }, //默认查询参数
|
|
|
+ simpleQueryItem: [], //简易查询表单数据项
|
|
|
+ advancedQueryValue: [], //高级查询缓存值
|
|
|
+ simpleQueryFlag: false, //是否开启了简易查询
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -273,17 +300,17 @@ export default {
|
|
|
},
|
|
|
deep: true,
|
|
|
},
|
|
|
- checkedSeriesData: {
|
|
|
- handler (arr) {
|
|
|
- this.echartsOptions.series[0].data = [
|
|
|
- {
|
|
|
- name: this.queryData[2],
|
|
|
- value: arr,
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- deep: true,
|
|
|
- },
|
|
|
+ // checkedSeriesData: {
|
|
|
+ // handler (arr) {
|
|
|
+ // this.echartsOptions.series[0].data = [
|
|
|
+ // {
|
|
|
+ // name: this.queryData[2],
|
|
|
+ // value: arr,
|
|
|
+ // },
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ // deep: true,
|
|
|
+ // },
|
|
|
// 监听数据变化 重绘图形
|
|
|
echartsOptions: {
|
|
|
handler (obj) {
|
|
@@ -373,13 +400,83 @@ export default {
|
|
|
const { pagecode, qid, auth_id } = this.$route.meta
|
|
|
//获取页面权限类型组件 pagetype 1模块 2页面 3按钮 4表格 5树形 6弹窗
|
|
|
const pageAuths = this.authArrs
|
|
|
+ this.pageAuthtablesList.authArrs = pageAuths
|
|
|
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)
|
|
|
+ //获取图表权限
|
|
|
+ const pageAuthtables = pageAuthArrs.filter(item => item.pagetype == 'chart')
|
|
|
+ this.pageAuthtablesList.pageAuthtables = pageAuthtables
|
|
|
+ if (pageAuthtables?.length)
|
|
|
+ this.getPageTableSetting(pageAuths,pageAuthtables)
|
|
|
+ },
|
|
|
+ //根据页面table设置数据
|
|
|
+ getPageTableSetting (pageAuths, pageAuthtables) {
|
|
|
+ const authTableObj = pageAuthtables[0]
|
|
|
+ //获取当前页面table的配置
|
|
|
+ const { pagename, pageconfigurationid, serviceid, pagecode, userpermissionsid, defaultfilter, selected, triggerserviceid } = authTableObj
|
|
|
+ this.pageTitle = pagename
|
|
|
+ const currPageBtns = pageAuths.filter(item => item['superiorid'] == pageconfigurationid && item.pagetype == 'button')
|
|
|
+ if (currPageBtns?.length) this.tableBtns.push(...currPageBtns)
|
|
|
+ const tableColumnArrs = pageAuths.filter(item => item['superiorid'] == pageconfigurationid && item['pagetype'] == 'column')
|
|
|
+ this.getColumnData(tableColumnArrs)
|
|
|
+ },
|
|
|
+ //获取表头数据
|
|
|
+ getColumnData (columnArrs = []) {
|
|
|
+ const returnData = [...columnArrs]
|
|
|
+ const simpleQueryItem = _.cloneDeep(returnData).filter((item) => item.easysearch && item.isfiltercolumn)
|
|
|
+ if (simpleQueryItem?.length) {
|
|
|
+ this.simpleQueryFlag = true
|
|
|
+ simpleQueryItem.forEach((element,index) => {
|
|
|
+ if (index !== 0) {
|
|
|
+ element.disabled = true
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.simpleQueryItem = simpleQueryItem
|
|
|
+ }
|
|
|
+ console.log(simpleQueryItem)
|
|
|
+ },
|
|
|
+ //简易查询-确定
|
|
|
+ queryValue (dataRules) {
|
|
|
+ const arr = [...dataRules]
|
|
|
+ if (arr && arr.length) {
|
|
|
+ arr.forEach(item => {
|
|
|
+ item.value = typeof item.value == 'string' ? item.value.replace(/\s*/g, "") : item.value
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.defaultfilter = arr.length ? arr : { 1: 1 }
|
|
|
+ let params = {}
|
|
|
+ this.defaultfilter.forEach(element => {
|
|
|
+ params[element.column] = element.value
|
|
|
+ });
|
|
|
+ this.queryChartsData(params)
|
|
|
+ },
|
|
|
+ changeSelect(data){
|
|
|
+ console.log(data)
|
|
|
+ if (data == '航线') {
|
|
|
+ this.simpleQueryItem.forEach((element,index) => {
|
|
|
+ if (element.pagename === '航线选择') {
|
|
|
+ element.disabled = false
|
|
|
+ } else if (index === 0) {
|
|
|
+ element.disabled = false
|
|
|
+ } else {
|
|
|
+ element.disabled = true
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else if (data == '航站') {
|
|
|
+ this.simpleQueryItem.forEach((element,index) => {
|
|
|
+ if (element.pagename !== '航线选择') {
|
|
|
+ element.disabled = false
|
|
|
+ } else if (index === 0) {
|
|
|
+ element.disabled = false
|
|
|
+ } else {
|
|
|
+ element.disabled = true
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
hideTips (params) {
|
|
|
if (params.componentType === 'radar') {
|
|
@@ -458,21 +555,21 @@ export default {
|
|
|
// this.$message.warning('请先选择统计时间范围')
|
|
|
// return
|
|
|
// }
|
|
|
- if (data.airline) {
|
|
|
- data.airport = null
|
|
|
- data.inOrOut = null
|
|
|
- }
|
|
|
- if (data.airport || data.inOrOut) {
|
|
|
- data.airline = null
|
|
|
- }
|
|
|
- const dataObj = {
|
|
|
- air_line: data.airline,
|
|
|
- airport: data.airport,
|
|
|
- io_type: data.inOrOut,
|
|
|
- fd1: data.dateTime[0],
|
|
|
- fd2: data.dateTime[1],
|
|
|
- }
|
|
|
- params.push(dataObj)
|
|
|
+ // if (data.airline) {
|
|
|
+ // data.airport = null
|
|
|
+ // data.inOrOut = null
|
|
|
+ // }
|
|
|
+ // if (data.airport || data.inOrOut) {
|
|
|
+ // data.airline = null
|
|
|
+ // }
|
|
|
+ // const dataObj = {
|
|
|
+ // air_line: data.airline,
|
|
|
+ // airport: data.airport,
|
|
|
+ // io_type: data.inOrOut,
|
|
|
+ // fd1: data.dateTime[0],
|
|
|
+ // fd2: data.dateTime[1],
|
|
|
+ // }
|
|
|
+ // params.push(dataObj)
|
|
|
// if (data.range === '航线') {
|
|
|
// params.splice(1, 0, data.airline)
|
|
|
// } else if (data.range === '航站') {
|
|
@@ -481,9 +578,9 @@ export default {
|
|
|
// params.splice(1, 0, '全部')
|
|
|
// }
|
|
|
// console.log(params)
|
|
|
- this.queryData = params
|
|
|
- let filter = params[0]
|
|
|
- this.msgObj = { ...dataObj }
|
|
|
+ // this.queryData = params
|
|
|
+ let filter = data
|
|
|
+ // this.msgObj = { ...dataObj }
|
|
|
try {
|
|
|
this.echartsOptions.series[0].data = []
|
|
|
this.tooltips.forEach(tooltip => (tooltip.ratio = '0%'))
|
|
@@ -751,6 +848,7 @@ export default {
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.statstics-wrapper {
|
|
|
+ padding: 24px;
|
|
|
.statstics-content {
|
|
|
background-color: #fff;
|
|
|
position: relative;
|