|
@@ -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%;
|
|
|
}
|