Commit 9ea13f0e authored by danfuman's avatar danfuman

修改

parent a3f35339
......@@ -207,11 +207,7 @@
hzqkList:[],
creditLevel:[],
chartDom: '',
myChart: '',
option: '',
chartDom1: '',
myChart1: '',
option1: '',
pageNum:1,
pageSize:10,
recordlist:[],
......@@ -234,19 +230,7 @@
this.getFollowList()
},
mounted(){
this.$nextTick(()=>{
this.chartDom = document.getElementById("hzqk-echarts")
this.myChart = echarts.init(this.chartDom)
this.chartDom1 = document.getElementById("zxpj-echarts")
this.myChart1 = echarts.init(this.chartDom1)
})
window.addEventListener("resize", this.resizeEcharts);
},
beforeDestroy(){
window.removeEventListener("resize", this. resizeEcharts);
},
activated() {
this.resizeEcharts()
},
methods: {
getData(){
......@@ -285,7 +269,6 @@
pageNum:this.pageNum,//页码
pageSize:this.pageSize,
}
console.log(this.params)
if(this.params.startTime){
param.startTime=this.params.startTime
}
......@@ -302,13 +285,6 @@
})
})
},
resizeEcharts (){
const self = this
setTimeout(function(){ //图表跟随页面大小变化宽度
self.myChart.resize()
self.myChart1.resize()
}, 10)
},
initChart(list){
let data=[]
if(list.length > 10){
......@@ -318,8 +294,10 @@
}else {
data=list
}
this.$nextTick(()=>{
let myChart = echarts.init(document.getElementById("hzqk-echarts"))
//业主单位合作情况
this.option ={
let option ={
tooltip: {
trigger: 'axis',
axisPointer: {
......@@ -424,11 +402,17 @@
}
]
}
this.option && this.myChart.setOption(this.option)
myChart.setOption(option);
window.addEventListener("resize", function () {
myChart.resize();//图表跟随页面大小变化宽度
});
})
},
initChart1(data){
this.$nextTick(()=>{
let myChart = echarts.init(document.getElementById("zxpj-echarts"))
//客户资信评级
this.option1 = {
let option = {
tooltip: {
trigger: 'axis',
axisPointer: {
......@@ -473,12 +457,18 @@
return '客户数量 '+value
}
},
itemStyle:{
normal: {
barBorderRadius: [9, 9, 0, 0],
color: '#165DFF'
}
itemStyle: {
normal:{
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: '#56A5FF'
}, {
offset: 1,
color: '#1B8EFF'
}]),
barBorderRadius:[20,20, 0, 0]
}
},
}
],
......@@ -489,7 +479,11 @@
},
}
}
this.option1 && this.myChart1.setOption(this.option1)
myChart.setOption(option);
window.addEventListener("resize", function () {
myChart.resize();//图表跟随页面大小变化宽度
});
})
},
handleCurrentChange(val) {
this.pageNum=1;
......
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