Commit 77f6c1a1 authored by youjie's avatar youjie

no message

parent a8ecec17
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<el-row style="padding: 15px 0px 0 0"> <el-row style="padding: 15px 0px 0 0">
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="$t('system.table_company')"> <el-form-item :label="$t('system.table_company')">
<template v-if="activeName==1">
<el-select <el-select
filterable filterable
v-model="msg.OutBranchId" v-model="msg.OutBranchId"
...@@ -27,11 +28,32 @@ ...@@ -27,11 +28,32 @@
:key="item.Id" :key="item.Id"
></el-option> ></el-option>
</el-select> </el-select>
</template>
<div v-if="activeName==2">
<el-select
filterable
multiple
v-model="msg.OutBranchIdList"
@change="getChange"
>
<el-option
:value="-1"
:label="$t('pub.unlimitedSel')"
></el-option>
<el-option
v-for="item in CompanyList"
:label="item.BName"
:value="item.Id"
:key="item.Id"
></el-option>
</el-select>
</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="$t('fnc.bweibi')"> <el-form-item :label="$t('fnc.bweibi')">
<el-select :disabled="coinGetShow" filterable v-model="msg.StandardCurrencyId" class @change="getChange"> <el-select :disabled="coinGetShow" filterable v-model="msg.StandardCurrencyId" @change="getStatement">
<el-option :value="-1" :label="$t('pub.unlimitedSel')"></el-option> <el-option :value="-1" :label="$t('pub.unlimitedSel')"></el-option>
<el-option <el-option
v-for="item in coinGetList" v-for="item in coinGetList"
...@@ -136,12 +158,12 @@ ...@@ -136,12 +158,12 @@
<template v-if="activeName=='2'"> <template v-if="activeName=='2'">
<div style="display: flex;flex-direction: row;flex-wrap: wrap;"> <div style="display: flex;flex-direction: row;flex-wrap: wrap;">
<twoIncomeChange :msgData="msg" :StatisticalData="StatisticalData"></twoIncomeChange> <twoIncomeChange :msgData="msg" :StatisticalData="StatisticalData"></twoIncomeChange>
<twoIncomeShare :msgData="msg" :StatisticalData="StatisticalData"></twoIncomeShare> <twoChangeProportion :msgData="msg" :StatisticalData="StatisticalData"></twoChangeProportion>
<!-- <twoChangeProportion :msgData="msg" :StatisticalData="StatisticalData"></twoChangeProportion> --> <!-- <twoIncomeShare :msgData="msg" :StatisticalData="StatisticalData"></twoIncomeShare> -->
</div> </div>
<div style="display: flex;flex-direction: row;flex-wrap: wrap;"> <div style="display: flex;flex-direction: row;flex-wrap: wrap;">
<twoWoolRateColumnar :msgData="msg" :StatisticalData="StatisticalData"></twoWoolRateColumnar> <twoWoolRateColumnar :msgData="msg" :StatisticalData="StatisticalData"></twoWoolRateColumnar>
<!-- <twoActualRateColumnar :msgData="msg" :StatisticalData="StatisticalData"></twoActualRateColumnar> --> <twoActualRateColumnar :msgData="msg" :StatisticalData="StatisticalData"></twoActualRateColumnar>
</div> </div>
<div style="display: flex;flex-direction: row;flex-wrap: wrap;"> <div style="display: flex;flex-direction: row;flex-wrap: wrap;">
<!-- <twoWoolRateChange :msgData="msg" :StatisticalData="StatisticalData"></twoWoolRateChange> --> <!-- <twoWoolRateChange :msgData="msg" :StatisticalData="StatisticalData"></twoWoolRateChange> -->
...@@ -191,6 +213,8 @@ export default { ...@@ -191,6 +213,8 @@ export default {
startDate: '', startDate: '',
endDate: '', endDate: '',
OutBranchId: -1, OutBranchId: -1,
OutBranchIdList: [0],
StandardBranchIds: '0',
StandardCurrencyId:0, StandardCurrencyId:0,
LineId: 0, LineId: 0,
Type: '1', Type: '1',
...@@ -250,6 +274,7 @@ export default { ...@@ -250,6 +274,7 @@ export default {
}, },
methods: { methods: {
getChange(val){ getChange(val){
if(this.msg.Type!='2'){
if(this.msg.OutBranchId == -1){ if(this.msg.OutBranchId == -1){
this.coinGetShow = false this.coinGetShow = false
this.msg.StandardCurrencyId = val>-1?val:this.coinGetList[0].ID this.msg.StandardCurrencyId = val>-1?val:this.coinGetList[0].ID
...@@ -257,6 +282,21 @@ export default { ...@@ -257,6 +282,21 @@ export default {
this.coinGetShow = true this.coinGetShow = true
this.msg.StandardCurrencyId = -1 this.msg.StandardCurrencyId = -1
} }
}else{
if(this.msg.OutBranchIdList[this.msg.OutBranchIdList.length-1]==-1){
this.msg.OutBranchIdList = [-1]
}else{
this.msg.OutBranchIdList = this.msg.OutBranchIdList.filter(x=>{return x!=-1})
}
if(this.msg.OutBranchIdList.indexOf('-1')!=-1) {
this.coinGetShow = false
this.msg.StandardCurrencyId = 1
}else {
this.msg.StandardCurrencyId = -1
this.coinGetShow = true
}
}
this.getStatement(); this.getStatement();
}, },
financeinfo_post_GetList(){ // 获取币种 financeinfo_post_GetList(){ // 获取币种
...@@ -282,6 +322,7 @@ export default { ...@@ -282,6 +322,7 @@ export default {
this.msg.LineIdList = this.msg.LineIdList.filter(x=>{return x}) this.msg.LineIdList = this.msg.LineIdList.filter(x=>{return x})
} }
this.msg.LineIdStr = this.msg.LineIdList.join(',') this.msg.LineIdStr = this.msg.LineIdList.join(',')
if(this.msg.Type==2) this.msg.StandardBranchIds = this.msg.OutBranchIdList.join(',')
this.loading = true this.loading = true
let url ='financestatistics_post_GetDataAnalysisStat' let url ='financestatistics_post_GetDataAnalysisStat'
// if(this.activeName=='2'){ url = ''} // if(this.activeName=='2'){ url = ''}
...@@ -304,7 +345,26 @@ export default { ...@@ -304,7 +345,26 @@ export default {
handleClick(e){ handleClick(e){
this.activeName = e._props.name this.activeName = e._props.name
this.msg.Type = this.activeName this.msg.Type = this.activeName
if(this.msg.Type==2) {
this.msg.LineIdList = [0],
this.msg.LineIdStr = '0'
this.msg.IsLastData = 2
this.msg.OutBranchIdList = [0]
this.msg.StandardBranchIds = '0'
this.coinGetShow = true
this.msg.StandardCurrencyId = -1
}else {
this.msg.LineIdList = [14]
this.msg.LineIdStr = '14'
this.msg.IsLastData = 1
this.msg.OutBranchId = -1
this.msg.OutBranchIdList = [0]
this.msg.StandardBranchIds = '0'
this.coinGetShow = false
this.msg.StandardCurrencyId = 1
}
this.getStatement() this.getStatement()
this.$forceUpdate()
}, },
getDateTime(){ getDateTime(){
if(this.dateTime&&this.dateTime.length>0){ if(this.dateTime&&this.dateTime.length>0){
......
...@@ -2,24 +2,6 @@ ...@@ -2,24 +2,6 @@
<div style="margin-bottom: 20px; "> <div style="margin-bottom: 20px; ">
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<h3 class="text-center" style="margin-bottom: 5px;">公司统计</h3> <h3 class="text-center" style="margin-bottom: 5px;">公司统计</h3>
<div class="corporatioBox">
<div>
<span>收入:</span>
<span></span>
</div>
<div>
<span>毛利:</span>
<span></span>
</div>
<div>
<span>营业利润:</span>
<span></span>
</div>
<div>
<span>净利润:</span>
<span></span>
</div>
</div>
</div> </div>
<el-table <el-table
......
...@@ -68,12 +68,21 @@ export default { ...@@ -68,12 +68,21 @@ export default {
name: this.CurrentMonth, name: this.CurrentMonth,
type: 'pie', type: 'pie',
radius: '50%', radius: '50%',
data: [], // 绑定实时数据数组
emphasis: {
itemStyle: { itemStyle: {
shadowBlur: 5, shadowBlur: 10,
shadowOffsetX: 0, shadowOffsetX: 1,
shadowColor: 'rgba(0, 0, 0, 0.5)' shadowColor: 'rgba(0, 0, 0, 0.5)'
},
// label: {
// show: false,
// position: 'center'
// },
data: [], // 绑定实时数据数组
emphasis: {
label: {
show: false,
fontSize: '14',
fontWeight: 'bold'
} }
} }
}] }]
......
<template> <template>
<div class="echartsBox"> <div class="echartsBox">
<div class="titleBox row"> <div class="titleBox row">
<h3>月度实际利润变化趋势图(柱状图)</h3> <h3>公司净利润变化趋势图</h3>
<div style="margin-left: 20px;"> <div style="margin-left: 20px;">
...@@ -20,8 +20,7 @@ export default { ...@@ -20,8 +20,7 @@ export default {
data() { data() {
return { return {
MonthList: [],//月份列表 MonthList: [],//月份列表
LineAnalysisData: [],//各线路统计 BranchAnalysisData: [],
CostAnalysisData: [],//各成本统计
colorList:['#089bab','#FFA171','#72b8ff','#ff9cc6','#7b78ff','#28cc90','#ee8fff','#5cf2ff','#ff9a00','#4fc4f7','#738eff','#b0edff', colorList:['#089bab','#FFA171','#72b8ff','#ff9cc6','#7b78ff','#28cc90','#ee8fff','#5cf2ff','#ff9a00','#4fc4f7','#738eff','#b0edff',
'rgba(228,57,57,.9)','rgba(248,126,46,1)','rgba(252,196,34,.7)','#3DD948','#39CAE4','rgba(44,49,241,.6)','rgba(122,57,228,.5)','#E65FC1','#D0B478','#BABABA', 'rgba(228,57,57,.9)','rgba(248,126,46,1)','rgba(252,196,34,.7)','#3DD948','#39CAE4','rgba(44,49,241,.6)','rgba(122,57,228,.5)','#E65FC1','#D0B478','#BABABA',
'rgba(228,57,57,.7)','rgba(247,154,44,.7)','rgba(255,246,11,.7)','rgba(61,217,72,.7)','rgba(57,202,228,.7)','rgba(44,49,241,.7)','rgba(122,57,228,.7)'], 'rgba(228,57,57,.7)','rgba(247,154,44,.7)','rgba(255,246,11,.7)','rgba(61,217,72,.7)','rgba(57,202,228,.7)','rgba(44,49,241,.7)','rgba(122,57,228,.7)'],
...@@ -37,8 +36,7 @@ export default { ...@@ -37,8 +36,7 @@ export default {
StatisticalData:{ StatisticalData:{
handler(n,o){ handler(n,o){
this.MonthList = n.MonthList//月份列表 this.MonthList = n.MonthList//月份列表
this.LineAnalysisData = n.LineAnalysisData//各线路统计 this.BranchAnalysisData = n.BranchAnalysisData//各成本统计
this.CostAnalysisData = n.CostAnalysisData//各成本统计
this.getEchart() this.getEchart()
}, },
...@@ -59,30 +57,30 @@ export default { ...@@ -59,30 +57,30 @@ export default {
let titles = [] let titles = []
let Stocklegend = {} let Stocklegend = {}
let Newobj = {} let Newobj = {}
this.LineAnalysisData.forEach((x,indexs)=>{ this.BranchAnalysisData.forEach((x,indexs)=>{
let Name = `${x.Name}` let Name = `${x.Name}`
titles.push(Name) titles.push(Name)
let obj = { let obj = {
name: Name, name: Name,
type: 'bar', type: 'line',
showSymbol: true,
smooth: true,
symbolSize: 5,
label: { label: {
show: true, show: true,
position: 'top', // 在顶部显示 position: 'top', // 在顶部显示
formatter: '{c}w' // 格式化金额,{c} 代表数据值 formatter: '{c}w' // 格式化金额,{c} 代表数据值
}, },
itemStyle:{ data: x.DetailList.map(y=>{return (y.JLR/10000).toFixed(2)}) // 绑定实时数据数组
barBorderRadius: 5,
},
barWidth: 30,
data: x.DetailList.map(y=>{return (y.Profit/10000).toFixed(2)}) // 绑定实时数据数组
} }
datas.push(obj) datas.push(obj)
if(indexs>10){ if(indexs>6){
let name=x.Name; let name=x.Name;
Newobj[name]=false; Newobj[name]=false;
} }
Stocklegend=Newobj; Stocklegend=Newobj;
}) })
let chartDom = document.getElementById('ActualMyEchartC','light'); let chartDom = document.getElementById('ActualMyEchartC','light');
let myChart = this.$echarts.init(chartDom); let myChart = this.$echarts.init(chartDom);
let option let option
...@@ -139,7 +137,7 @@ export default { ...@@ -139,7 +137,7 @@ export default {
color: "#969696" color: "#969696"
}, },
formatter: '{value}w', formatter: '{value}w',
margin: 50 // 标签距离y轴的距离为20 margin: 20 // 标签距离y轴的距离为20
}, },
splitLine:{ splitLine:{
show:true, show:true,
......
<template> <template>
<div class="echartsBox"> <div class="echartsBox">
<div class="titleBox text-center row"> <div class="titleBox text-center row">
<h3>各费用项变化趋势图</h3> <h3>公司毛利变化趋势图</h3>
<div style="margin-left: 20px;"> <div style="margin-left: 20px;">
...@@ -20,12 +20,6 @@ export default { ...@@ -20,12 +20,6 @@ export default {
data() { data() {
return { return {
MonthList: [],//月份列表 MonthList: [],//月份列表
JapanAllData: [],
JapanXBData: [],
JapanSPData: [],
MaoLiAnalysisData: [],
SJLLAnalysisData: [],
RoomAnalysisData: [],
CostAnalysisData: [], CostAnalysisData: [],
colorList:['#089bab','#FFA171','#72b8ff','#ff9cc6','#7b78ff','#28cc90','#ee8fff','#5cf2ff','#ff9a00','#4fc4f7','#738eff','#b0edff', colorList:['#089bab','#FFA171','#72b8ff','#ff9cc6','#7b78ff','#28cc90','#ee8fff','#5cf2ff','#ff9a00','#4fc4f7','#738eff','#b0edff',
'rgba(228,57,57,.9)','rgba(248,126,46,1)','rgba(252,196,34,.7)','#3DD948','#39CAE4','rgba(44,49,241,.6)','rgba(122,57,228,.5)','#E65FC1','#D0B478','#BABABA', 'rgba(228,57,57,.9)','rgba(248,126,46,1)','rgba(252,196,34,.7)','#3DD948','#39CAE4','rgba(44,49,241,.6)','rgba(122,57,228,.5)','#E65FC1','#D0B478','#BABABA',
...@@ -59,13 +53,7 @@ export default { ...@@ -59,13 +53,7 @@ export default {
StatisticalData:{ StatisticalData:{
handler(n,o){ handler(n,o){
this.MonthList = n.MonthList//月份列表 this.MonthList = n.MonthList//月份列表
this.JapanAllData = n.JapanAllData this.BranchAnalysisData = n.BranchAnalysisData//各线路统计
this.JapanXBData = n.JapanXBData
this.JapanSPData = n.JapanSPData
this.MaoLiAnalysisData = n.MaoLiAnalysisData
this.SJLLAnalysisData = n.SJLLAnalysisData
this.RoomAnalysisData = n.RoomAnalysisData
this.CostAnalysisData = n.CostAnalysisData
this.getEchart() this.getEchart()
}, },
deep: true, deep: true,
...@@ -81,73 +69,46 @@ export default { ...@@ -81,73 +69,46 @@ export default {
location.reload() location.reload()
}, },
getEchart(){ getEchart(){
this.inCostDatas()
let that = this
let titles = this.incomeTitles.map(x=>{return x.Name})
let datas = [] let datas = []
let titles = []
let Stocklegend = {} let Stocklegend = {}
let Newobj={}; let Newobj = {}
for(let index=0;index<this.incomeTitles.length;index++){ this.BranchAnalysisData.forEach((x,indexs)=>{
for(let i=0;i<this.MonthList.length;i++){ let Name = `${x.Name}`
let filter = this.CostAnalysisData.filter(z=>{return z.Month==this.MonthList[i]}) titles.push(Name)
if(filter){ let obj = {
this.CostDatas.forEach((x,indexs)=>{ name: Name,
if(indexs==0){ type: 'line',
x.name = '机票' showSymbol: true,
this.CostAnalysisData.forEach(z=>{ smooth: true,
x.data.push((z['JiPiao']/10000).toFixed(2)) symbolSize: 5,
}) label: {
}else if(indexs==1){ show: true,
x.name = '房费' position: 'top', // 在顶部显示
this.CostAnalysisData.forEach(z=>{ formatter: '{c}w' // 格式化金额,{c} 代表数据值
x.data.push((z['RoomFee']/10000).toFixed(2)) },
}) data: x.DetailList.map(y=>{return (y.MaoLi/10000).toFixed(2)}) // 绑定实时数据数组
}else if(indexs==2){
x.name = '车费'
this.CostAnalysisData.forEach(z=>{
x.data.push((z['CarFee']/10000).toFixed(2))
})
}else if(indexs==3){
x.name = '餐费'
this.CostAnalysisData.forEach(z=>{
x.data.push((z['MealFee']/10000).toFixed(2))
})
}else if(indexs==4){
x.name = '门票'
this.CostAnalysisData.forEach(z=>{
x.data.push((z['TicketFee']/10000).toFixed(2))
})
}else if(indexs==5){
x.name = '签证'
this.CostAnalysisData.forEach(z=>{
x.data.push((z['VisaFee']/10000).toFixed(2))
})
}
// if(indexs>4){
// let name=x.name;
// Newobj[name]=false;
// }
// Stocklegend=Newobj;
})
}
} }
datas.push(obj)
if(indexs>6){
let name=x.Name;
Newobj[name]=false;
} }
datas = this.CostDatas Stocklegend=Newobj;
let chartDom = document.getElementById('PropMyEchart'); })
let chartDom = document.getElementById('PropMyEchart','light');
let myChart = this.$echarts.init(chartDom); let myChart = this.$echarts.init(chartDom);
let option; let option
option = { option = {
color:that.colorList, color:this.colorList,
legend: { legend: {
x:'left', x:'left',
y:'bottom', y:'bottom',
type:'scroll', type:'scroll',
icon: "circle", icon: "circle",
padding: [5, 30, 20, 30] , padding: [5, 30, 20, 30] ,
type:'scroll',
data: titles, data: titles,
selected: Stocklegend // selected: Stocklegend
}, },
grid: { grid: {
left: 15, // 默认10%,给24就挺合适的。 left: 15, // 默认10%,给24就挺合适的。
...@@ -156,24 +117,13 @@ export default { ...@@ -156,24 +117,13 @@ export default {
bottom: 70, // 默认60 bottom: 70, // 默认60
containLabel: true containLabel: true
}, },
tooltip : { xAxis: {
trigger: 'axis',
axisPointer: {
lineStyle: {
type: 'dashed',
color: "#ddd"
}
}
},
xAxis : [
{
type: 'category', type: 'category',
boundaryGap: false, boundaryGap: false,
nameTextStyle: { nameTextStyle: {
fontWeight: 600, fontWeight: 600,
fontSize: 18 fontSize: 18
}, },
data:this.MonthList,
axisLine: { axisLine: {
lineStyle: { lineStyle: {
// 设置x轴颜色 // 设置x轴颜色
...@@ -185,9 +135,8 @@ export default { ...@@ -185,9 +135,8 @@ export default {
color: "#333333" color: "#333333"
} }
}, },
data: this.MonthList
} },
],
yAxis : [ yAxis : [
{ {
type : 'value', type : 'value',
...@@ -202,7 +151,8 @@ export default { ...@@ -202,7 +151,8 @@ export default {
textStyle: { textStyle: {
color: "#969696" color: "#969696"
}, },
formatter: '{value}w' formatter: '{value}w',
margin: 20 // 标签距离y轴的距离为20
}, },
splitLine:{ splitLine:{
show:true, show:true,
...@@ -213,6 +163,15 @@ export default { ...@@ -213,6 +163,15 @@ export default {
} }
} }
], ],
tooltip: {
trigger: 'axis',
axisPointer: {
lineStyle: {
type: 'dashed',
color: "#ddd"
}
},
},
dataZoom: [ dataZoom: [
{ {
type: 'inside', type: 'inside',
...@@ -220,16 +179,12 @@ export default { ...@@ -220,16 +179,12 @@ export default {
} }
], ],
series:datas series:datas
};
myChart.setOption(option,true)
},
inCostDatas() {
this.CostDatas = []
for(let i=0;i<7;i++){
this.CostDatas.push(JSON.parse(JSON.stringify(this.CostDataObj)))
} }
myChart.setOption(option,true)
}, },
} }
} }
</script> </script>
......
<template> <template>
<div class="echartsBox"> <div class="echartsBox">
<div class="titleBox row"> <div class="titleBox row">
<h3>月度收入变化趋势图</h3> <h3>公司收入变化趋势图</h3>
<div style="margin-left: 20px;"> <div style="margin-left: 20px;">
...@@ -20,8 +20,7 @@ export default { ...@@ -20,8 +20,7 @@ export default {
data() { data() {
return { return {
MonthList: [],//月份列表 MonthList: [],//月份列表
LineAnalysisData: [],//各线路统计 BranchAnalysisData: [],//各线路统计
CostAnalysisData: [],//各成本统计
colorList:['#089bab','#FFA171','#72b8ff','#ff9cc6','#7b78ff','#28cc90','#ee8fff','#5cf2ff','#ff9a00','#4fc4f7','#738eff','#b0edff', colorList:['#089bab','#FFA171','#72b8ff','#ff9cc6','#7b78ff','#28cc90','#ee8fff','#5cf2ff','#ff9a00','#4fc4f7','#738eff','#b0edff',
'rgba(228,57,57,.9)','rgba(248,126,46,1)','rgba(252,196,34,.7)','#3DD948','#39CAE4','rgba(44,49,241,.6)','rgba(122,57,228,.5)','#E65FC1','#D0B478','#BABABA', 'rgba(228,57,57,.9)','rgba(248,126,46,1)','rgba(252,196,34,.7)','#3DD948','#39CAE4','rgba(44,49,241,.6)','rgba(122,57,228,.5)','#E65FC1','#D0B478','#BABABA',
'rgba(228,57,57,.7)','rgba(247,154,44,.7)','rgba(255,246,11,.7)','rgba(61,217,72,.7)','rgba(57,202,228,.7)','rgba(44,49,241,.7)','rgba(122,57,228,.7)'], 'rgba(228,57,57,.7)','rgba(247,154,44,.7)','rgba(255,246,11,.7)','rgba(61,217,72,.7)','rgba(57,202,228,.7)','rgba(44,49,241,.7)','rgba(122,57,228,.7)'],
...@@ -37,9 +36,7 @@ export default { ...@@ -37,9 +36,7 @@ export default {
StatisticalData:{ StatisticalData:{
handler(n,o){ handler(n,o){
this.MonthList = n.MonthList//月份列表 this.MonthList = n.MonthList//月份列表
this.LineAnalysisData = n.LineAnalysisData//各线路统计 this.BranchAnalysisData = n.BranchAnalysisData//各线路统计
this.CostAnalysisData = n.CostAnalysisData//各成本统计
this.getEchart() this.getEchart()
}, },
deep: true, deep: true,
...@@ -59,7 +56,7 @@ export default { ...@@ -59,7 +56,7 @@ export default {
let titles = [] let titles = []
let Stocklegend = {} let Stocklegend = {}
let Newobj = {} let Newobj = {}
this.LineAnalysisData.forEach((x,indexs)=>{ this.BranchAnalysisData.forEach((x,indexs)=>{
let Name = `${x.Name}` let Name = `${x.Name}`
titles.push(Name) titles.push(Name)
let obj = { let obj = {
...@@ -76,7 +73,7 @@ export default { ...@@ -76,7 +73,7 @@ export default {
data: x.DetailList.map(y=>{return (y.Income/10000).toFixed(2)}) // 绑定实时数据数组 data: x.DetailList.map(y=>{return (y.Income/10000).toFixed(2)}) // 绑定实时数据数组
} }
datas.push(obj) datas.push(obj)
if(indexs>10){ if(indexs>6){
let name=x.Name; let name=x.Name;
Newobj[name]=false; Newobj[name]=false;
} }
...@@ -94,7 +91,7 @@ export default { ...@@ -94,7 +91,7 @@ export default {
icon: "circle", icon: "circle",
padding: [5, 30, 20, 30] , padding: [5, 30, 20, 30] ,
data: titles, data: titles,
selected: Stocklegend // selected: Stocklegend
}, },
grid: { grid: {
left: 15, // 默认10%,给24就挺合适的。 left: 15, // 默认10%,给24就挺合适的。
......
<template> <template>
<div class="echartsBox"> <div class="echartsBox">
<div class="titleBox row"> <div class="titleBox row">
<h3>月度毛利变化趋势图(柱状图)</h3> <h3>公司营业利润变化趋势图</h3>
<div style="margin-left: 20px;"> <div style="margin-left: 20px;">
...@@ -20,8 +20,7 @@ export default { ...@@ -20,8 +20,7 @@ export default {
data() { data() {
return { return {
MonthList: [],//月份列表 MonthList: [],//月份列表
LineAnalysisData: [],//各线路统计 CostAnalysisData: [],
CostAnalysisData: [],//各成本统计
colorList:['#089bab','#FFA171','#72b8ff','#ff9cc6','#7b78ff','#28cc90','#ee8fff','#5cf2ff','#ff9a00','#4fc4f7','#738eff','#b0edff', colorList:['#089bab','#FFA171','#72b8ff','#ff9cc6','#7b78ff','#28cc90','#ee8fff','#5cf2ff','#ff9a00','#4fc4f7','#738eff','#b0edff',
'rgba(228,57,57,.9)','rgba(248,126,46,1)','rgba(252,196,34,.7)','#3DD948','#39CAE4','rgba(44,49,241,.6)','rgba(122,57,228,.5)','#E65FC1','#D0B478','#BABABA', 'rgba(228,57,57,.9)','rgba(248,126,46,1)','rgba(252,196,34,.7)','#3DD948','#39CAE4','rgba(44,49,241,.6)','rgba(122,57,228,.5)','#E65FC1','#D0B478','#BABABA',
'rgba(228,57,57,.7)','rgba(247,154,44,.7)','rgba(255,246,11,.7)','rgba(61,217,72,.7)','rgba(57,202,228,.7)','rgba(44,49,241,.7)','rgba(122,57,228,.7)'], 'rgba(228,57,57,.7)','rgba(247,154,44,.7)','rgba(255,246,11,.7)','rgba(61,217,72,.7)','rgba(57,202,228,.7)','rgba(44,49,241,.7)','rgba(122,57,228,.7)'],
...@@ -37,8 +36,7 @@ export default { ...@@ -37,8 +36,7 @@ export default {
StatisticalData:{ StatisticalData:{
handler(n,o){ handler(n,o){
this.MonthList = n.MonthList//月份列表 this.MonthList = n.MonthList//月份列表
this.LineAnalysisData = n.LineAnalysisData//各线路统计 this.BranchAnalysisData = n.BranchAnalysisData//各线路统计
this.CostAnalysisData = n.CostAnalysisData//各成本统计
this.getEchart() this.getEchart()
}, },
...@@ -59,25 +57,24 @@ export default { ...@@ -59,25 +57,24 @@ export default {
let titles = [] let titles = []
let Stocklegend = {} let Stocklegend = {}
let Newobj = {} let Newobj = {}
this.LineAnalysisData.forEach((x,indexs)=>{ this.BranchAnalysisData.forEach((x,indexs)=>{
let Name = `${x.Name}` let Name = `${x.Name}`
titles.push(Name) titles.push(Name)
let obj = { let obj = {
name: Name, name: Name,
type: 'bar', type: 'line',
showSymbol: true,
smooth: true,
symbolSize: 5,
label: { label: {
show: true, show: true,
position: 'top', // 在顶部显示 position: 'top', // 在顶部显示
formatter: '{c}w' // 格式化金额,{c} 代表数据值 formatter: '{c}w' // 格式化金额,{c} 代表数据值
}, },
itemStyle:{ data: x.DetailList.map(y=>{return (y.FinalProfit/10000).toFixed(2)}) // 绑定实时数据数组
barBorderRadius: 5,
},
barWidth: 30,
data: x.DetailList.map(y=>{return (y.MaoLi/10000).toFixed(2)}) // 绑定实时数据数组
} }
datas.push(obj) datas.push(obj)
if(indexs>10){ if(indexs>6){
let name=x.Name; let name=x.Name;
Newobj[name]=false; Newobj[name]=false;
} }
...@@ -139,7 +136,7 @@ export default { ...@@ -139,7 +136,7 @@ export default {
color: "#969696" color: "#969696"
}, },
formatter: '{value}w', formatter: '{value}w',
margin: 50 // 标签距离y轴的距离为20 margin: 20 // 标签距离y轴的距离为20
}, },
splitLine:{ splitLine:{
show:true, show:true,
......
...@@ -141,7 +141,8 @@ export default { ...@@ -141,7 +141,8 @@ export default {
LineId: 0, LineId: 0,
Type: '1', Type: '1',
DataType:'-1', DataType:'-1',
LossType:'0' LossType:'0',
IsLastData:0,
}, },
dateTime: [], dateTime: [],
CompanyList: [], CompanyList: [],
...@@ -218,6 +219,8 @@ export default { ...@@ -218,6 +219,8 @@ export default {
}) })
}, },
getStatement(){ getStatement(){
if(this.msg.Type==2) this.msg.IsLastData = 2
else this.msg.IsLastData = 0
this.loading = true this.loading = true
this.apipost( this.apipost(
"financestatistics_post_GetDataAnalysisStat", "financestatistics_post_GetDataAnalysisStat",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment