Commit af1c37cf authored by 张锡奇's avatar 张锡奇

commit

parent 41fb1d55
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
v.name=`${v.sCustomerName||''}\n${v.sCustomerNo||''}` v.name=`${v.sCustomerName||''}\n${v.sCustomerNo||''}`
return v return v
})||[]; })||[];
this.setChart(this.myChart1,this.pbcustomer) this.setChart(this.myChart1,this.pbcustomer,'pbcustomer')
}, },
async getPbsales(){ async getPbsales(){
let result= await this.request('getPbsales',{ let result= await this.request('getPbsales',{
...@@ -186,9 +186,10 @@ export default { ...@@ -186,9 +186,10 @@ export default {
v.name=`${v.sSalesName||''}\n${v.sSalesNo||''}` v.name=`${v.sSalesName||''}\n${v.sSalesNo||''}`
return v return v
})||[]; })||[];
this.setChart(this.myChart2,this.pbsales) this.setChart(this.myChart2,this.pbsales,'pbsales')
}, },
setChart(myChart,value){ setChart(myChart,value,id){
console.log(myChart)
let options = { let options = {
title:{ title:{
subtext:"长按查看详情", subtext:"长按查看详情",
...@@ -266,7 +267,9 @@ export default { ...@@ -266,7 +267,9 @@ export default {
} }
}, },
itemStyle:{ itemStyle:{
color:"#6B9BF7", normal:{
color:id == 'pbcustomer' ? '#708bf6' : '#00B2EE'
}
} }
} }
], ],
......
...@@ -243,8 +243,12 @@ export default { ...@@ -243,8 +243,12 @@ export default {
} }
}, },
barMaxWidth:40, barMaxWidth:40,
data:seriesData data:seriesData,
itemStyle:{
normal:{
color:id == 'myChart1' ? '#708bf6' : '#00B2EE'
}
}
} }
] ]
} }
......
...@@ -176,7 +176,12 @@ export default { ...@@ -176,7 +176,12 @@ export default {
name:'金额', name:'金额',
type:'bar', type:'bar',
data:id == 'myChart1' ? this.mmcolorsaletop.map(x => `${x.nAmount}`) : this.mmsaletop.map(x => `${x.nAmount}`), data:id == 'myChart1' ? this.mmcolorsaletop.map(x => `${x.nAmount}`) : this.mmsaletop.map(x => `${x.nAmount}`),
barMaxWidth:40 barMaxWidth:40,
itemStyle:{
normal:{
color:'#000000'
}
}
}, },
{ {
name:'数量', name:'数量',
......
...@@ -109,6 +109,7 @@ import searchComponent from '@/components/search' ...@@ -109,6 +109,7 @@ import searchComponent from '@/components/search'
import { Confirm } from 'vux' import { Confirm } from 'vux'
import { clearTimeout, setTimeout } from 'timers'; import { clearTimeout, setTimeout } from 'timers';
import { toUnicode } from 'punycode'; import { toUnicode } from 'punycode';
import echarts from 'echarts';
export default { export default {
name:"statistics", name:"statistics",
...@@ -390,6 +391,11 @@ export default { ...@@ -390,6 +391,11 @@ export default {
return `${val.data}万` return `${val.data}万`
} }
}, },
itemStyle:{
normal:{
color:'#708bf6'
}
}
} }
] ]
}) })
...@@ -466,12 +472,24 @@ export default { ...@@ -466,12 +472,24 @@ export default {
type:'bar', type:'bar',
data:data.value.map(v=>v.nAmount), data:data.value.map(v=>v.nAmount),
barWidth:32, barWidth:32,
color:new echarts.graphic.LinearGradient(0.5, 0, 0.5, 1, [{
offset: 0,
color: '#708bf6'
}, {
offset: 1,
color: '#00B2EE'
}])
}, },
{ {
name:'数量', name:'数量',
type:'line', type:'line',
yAxisIndex: 1, yAxisIndex: 1,
data:data.value.map(v=>v.nQty), data:data.value.map(v=>v.nQty),
itemStyle:{
normal:{
color:'#708bf6'
}
}
} }
], ],
dataZoom: [{ dataZoom: [{
......
...@@ -90,6 +90,10 @@ export const employees = { ...@@ -90,6 +90,10 @@ export const employees = {
offsetY: -2 offsetY: -2
} }
}); });
this.chart1.interval()
.position('sSalesName*nAmount')
.color('l(90) 0:#708bf6 1:#00B2EE'); // 定义柱状图渐变色
this.chart1.pluginGesture({ this.chart1.pluginGesture({
gesture: { gesture: {
press(data, event) { press(data, event) {
......
...@@ -61,6 +61,8 @@ export const orderAmount = { ...@@ -61,6 +61,8 @@ export const orderAmount = {
offsetY: -2 offsetY: -2
} }
}); });
this.chart3.line().position('sMonth*nAmount').color('#708bf6');
this.chart3.render(); this.chart3.render();
} }
} }
......
...@@ -61,6 +61,8 @@ export const receivable = { ...@@ -61,6 +61,8 @@ export const receivable = {
offsetY: -2 offsetY: -2
} }
}); });
this.chart2.line().position('sMonth*nPaydAmount').color('#708bf6');
this.chart2.render(); this.chart2.render();
} }
} }
......
...@@ -141,7 +141,7 @@ export default { ...@@ -141,7 +141,7 @@ export default {
} }
}, },
routerToDetail(item){ routerToDetail(item){
this.$router.push({name:'shopVersionFormLiabilitiesDetail',params:{iCustomerId:item.iIden}}) this.$router.push({name:'LiabilitiesDetail',params:{iCustomerId:item.iIden}})
} }
} }
} }
......
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