|
@@ -10,12 +10,24 @@
|
|
|
placeholder="选择年">
|
|
|
</el-date-picker>
|
|
|
</div>
|
|
|
- <div class="canvas-box">
|
|
|
- <div id="statisticallyone" style="width: 100%;height:400px;"></div>
|
|
|
- <div id="grossmargins" style="width: 100%;height:400px;"></div>
|
|
|
- <div id="grossmargin" style="width: 100%;height:400px;"></div>
|
|
|
- <!-- <div id="grossmarginss" style="width: 50%;height:400px;"></div> -->
|
|
|
- </div>
|
|
|
+ <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
|
|
+ <el-tab-pane label="营业额、成本支出、毛利润" name="first">
|
|
|
+ <div class="canvas-box">
|
|
|
+ <div id="statisticallyone" style="width: 100%;height:400px;"></div>
|
|
|
+ <div id="grossmargins" style="width: 100%;height:400px;"></div>
|
|
|
+ <div id="grossmargin" style="width: 100%;height:400px;"></div>
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="国交数据统计" name="second">
|
|
|
+ <div class="canvas-box">
|
|
|
+ <div id="grossmarginss" style="width: 50%;height:400px;"></div>
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="会务数据统计" name="third">会务数据统计</el-tab-pane>
|
|
|
+ <el-tab-pane label="定时任务补偿" name="fourth">定时任务补偿</el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -28,6 +40,7 @@ export default {
|
|
|
businessincome:[],
|
|
|
Grossprofit:[],
|
|
|
costing:[],
|
|
|
+ Airticketnum:[],
|
|
|
aaa:[
|
|
|
['product', '去年销售额', '今年销售额'],
|
|
|
['1月', 43.3, 85.8],
|
|
@@ -58,9 +71,14 @@ export default {
|
|
|
['11月', 72.4,],
|
|
|
['12月', 72.4,],
|
|
|
],
|
|
|
+ activeName: 'second',
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleClick(tab, event) {
|
|
|
+ console.log(this.activeName);
|
|
|
+ // console.log(tab, event);
|
|
|
+ },
|
|
|
//处理时间
|
|
|
getdate(val){
|
|
|
var date=new Date(val);
|
|
@@ -108,10 +126,11 @@ export default {
|
|
|
},
|
|
|
legend: {},
|
|
|
tooltip: {
|
|
|
- // formatter:function(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: {
|
|
@@ -134,7 +153,7 @@ export default {
|
|
|
this.costing=[];
|
|
|
this.StatisticsYOY()
|
|
|
},
|
|
|
- //获取数据
|
|
|
+ //获取营业额、成本支出、毛利润数据
|
|
|
StatisticsYOY(){
|
|
|
var url = "/api/Statistics/StatisticsYOY"
|
|
|
var that = this
|
|
@@ -173,9 +192,40 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ //获取国交数据统计数据
|
|
|
+ StatisticsAirTicket(){
|
|
|
+ var url = "/api/Statistics/StatisticsAirTicket"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer '
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ year:that.getdate(that.year),
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if(res.data.code==200){
|
|
|
+ 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]);
|
|
|
+ }
|
|
|
+ console.log(that.Airticketnum);
|
|
|
+ }else{
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
},
|
|
|
mounted(){
|
|
|
this.StatisticsYOY();
|
|
|
+ this.StatisticsAirTicket();
|
|
|
}
|
|
|
}
|
|
|
</script>
|