Commit 9ea13f0e authored by danfuman's avatar danfuman

修改

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