|
@@ -20,7 +20,8 @@
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="国交数据统计" name="second">
|
|
|
<div class="canvas-box">
|
|
|
- <div id="grossmarginss" style="width: 50%;height:400px;"></div>
|
|
|
+ <div id="grossmarginss" style="width: 100%;height:400px;"></div>
|
|
|
+ <div id="Airticketcitybox" style="width: 100%;height:400px;"></div>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="会务数据统计" name="third">会务数据统计</el-tab-pane>
|
|
@@ -41,6 +42,7 @@ export default {
|
|
|
Grossprofit:[],
|
|
|
costing:[],
|
|
|
Airticketnum:[],
|
|
|
+ Airticketcity:[],
|
|
|
aaa:[
|
|
|
['product', '去年销售额', '今年销售额'],
|
|
|
['1月', 43.3, 85.8],
|
|
@@ -77,6 +79,12 @@ export default {
|
|
|
methods: {
|
|
|
handleClick(tab, event) {
|
|
|
console.log(this.activeName);
|
|
|
+ if(this.activeName=='first'){
|
|
|
+ this.StatisticsYOY()
|
|
|
+ }
|
|
|
+ if(this.activeName=='second'){
|
|
|
+ this.StatisticsAirTicket()
|
|
|
+ }
|
|
|
// console.log(tab, event);
|
|
|
},
|
|
|
//处理时间
|
|
@@ -85,8 +93,66 @@ export default {
|
|
|
var y=date.getFullYear();
|
|
|
return y
|
|
|
},
|
|
|
+ groupstatisone(){
|
|
|
+ var grossmarginss = echarts.init(document.getElementById('grossmarginss'));
|
|
|
+ grossmarginss.setOption({
|
|
|
+ title:{
|
|
|
+ text: '预订机票数量',
|
|
|
+ },
|
|
|
+ legend: {},
|
|
|
+ tooltip: {
|
|
|
+ formatter:function(params){
|
|
|
+ var html="该月总次数:"+params.data[1]+"次<br/>";
|
|
|
+ for(let i=0;i<params.data[2].length;i++){
|
|
|
+ html += '团组:'+params.data[2][i].groupName+' '+'预订机票次数:' +params.data[2][i].quantity+"<br/>";
|
|
|
+ }
|
|
|
+ return html
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ dataset: {
|
|
|
+ source: this.Airticketnum
|
|
|
+ },
|
|
|
+ xAxis: { type: 'category' },
|
|
|
+ yAxis: {
|
|
|
+ name: '机票数量',
|
|
|
+ },
|
|
|
+ color:['#2e83d4'],
|
|
|
+ // Declare several bar series, each will be mapped
|
|
|
+ // to a column of dataset.source by default.
|
|
|
+ series: [{ type: 'bar' }]
|
|
|
+ });
|
|
|
+ var Airticketcitybox = echarts.init(document.getElementById('Airticketcitybox'));
|
|
|
+ Airticketcitybox.setOption({
|
|
|
+ title:{
|
|
|
+ text: '机票到达地数量',
|
|
|
+ },
|
|
|
+ legend: {},
|
|
|
+ tooltip: {
|
|
|
+ formatter:function(params){
|
|
|
+ console.log(params.data);
|
|
|
+ var html="该月总次数:"+params.data[1]+"次<br/>";
|
|
|
+ for(let i=0;i<params.data[2].length;i++){
|
|
|
+ html += '城市:'+params.data[2][i].city+' '+'到到此城市次数:' +params.data[2][i].quantity+"<br/>";
|
|
|
+ }
|
|
|
+ return html
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ dataset: {
|
|
|
+ source: this.Airticketcity
|
|
|
+ },
|
|
|
+ xAxis: { type: 'category' },
|
|
|
+ yAxis: {
|
|
|
+ name: '到达次数',
|
|
|
+ },
|
|
|
+ color:['#2e83d4'],
|
|
|
+ // Declare several bar series, each will be mapped
|
|
|
+ // to a column of dataset.source by default.
|
|
|
+ series: [{ type: 'bar' }]
|
|
|
+ });
|
|
|
+ },
|
|
|
statisone(){
|
|
|
- console.log(this.businessincome,this.Grossprofit,this.costing);
|
|
|
var myChart = echarts.init(document.getElementById('statisticallyone'));
|
|
|
myChart.setOption({
|
|
|
title:{
|
|
@@ -126,11 +192,11 @@ export default {
|
|
|
},
|
|
|
legend: {},
|
|
|
tooltip: {
|
|
|
- formatter:function(params){
|
|
|
- console.log(params);
|
|
|
- // var html = params.data[0]+'毛利率'+"<br/>"+ params.data[1]+"%";
|
|
|
- // return html
|
|
|
- }
|
|
|
+ // formatter:function(params){
|
|
|
+ // console.log(params);
|
|
|
+ // var html = params.data[0]+'毛利率'+"<br/>"+ params.data[1]+"%";
|
|
|
+ // return html
|
|
|
+ // }
|
|
|
|
|
|
},
|
|
|
dataset: {
|
|
@@ -148,9 +214,9 @@ export default {
|
|
|
},
|
|
|
//年change
|
|
|
yearchange(){
|
|
|
- this.businessincome=[];
|
|
|
- this.Grossprofit=[];
|
|
|
- this.costing=[];
|
|
|
+ // this.businessincome=[];
|
|
|
+ // this.Grossprofit=[];
|
|
|
+ // this.costing=[];
|
|
|
this.StatisticsYOY()
|
|
|
},
|
|
|
//获取营业额、成本支出、毛利润数据
|
|
@@ -168,6 +234,9 @@ export default {
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
if(res.data.code==200){
|
|
|
+ that.businessincome=[];
|
|
|
+ that.Grossprofit=[];
|
|
|
+ that.costing=[];
|
|
|
//营业额
|
|
|
that.businessincome.push(['product', '前一年该月营业额', '本年该月营业额']);
|
|
|
for(let i=0;i<res.data.data.salesYOYData.length;i++){
|
|
@@ -207,13 +276,20 @@ export default {
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
if(res.data.code==200){
|
|
|
+ that.Airticketnum=[];
|
|
|
+ that.Airticketcity=[];
|
|
|
var datainfo=res.data.data;
|
|
|
//机票数
|
|
|
that.Airticketnum.push(['product','本年机票数量']);
|
|
|
for(let i=0;i<datainfo.airTicketNumData.length;i++){
|
|
|
- that.Airticketnum.push([datainfo.airTicketNumData[i].month+'月',datainfo.airTicketNumData[i].quantity]);
|
|
|
+ that.Airticketnum.push([datainfo.airTicketNumData[i].month+'月',datainfo.airTicketNumData[i].quantity,datainfo.airTicketNumData[i].aitTicketInfos]);
|
|
|
+ }
|
|
|
+ //机票到达地
|
|
|
+ that.Airticketcity.push(['product','本年机票到达地']);
|
|
|
+ for(let i=0;i<datainfo.airTicketAreaData.length;i++){
|
|
|
+ that.Airticketcity.push([datainfo.airTicketAreaData[i].month+'月',datainfo.airTicketAreaData[i].quantity,datainfo.airTicketAreaData[i].cityData]);
|
|
|
}
|
|
|
- console.log(that.Airticketnum);
|
|
|
+ that.groupstatisone()
|
|
|
}else{
|
|
|
that.$message({
|
|
|
message: res.data.msg,
|
|
@@ -224,7 +300,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
mounted(){
|
|
|
- this.StatisticsYOY();
|
|
|
+ // this.StatisticsYOY();
|
|
|
this.StatisticsAirTicket();
|
|
|
}
|
|
|
}
|