Commit 8a089c53 authored by danfuman's avatar danfuman

修改

parent 655e5864
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
pageSize:10, pageSize:10,
recordlist:[], recordlist:[],
timeList:['今日','近三天','近七天','自定义'], timeList:['今日','近三天','近七天','自定义'],
datatype:0, datatype:'',
defaultValue:new Date(), defaultValue:new Date(),
pickerValue: [], pickerValue: [],
params:{ params:{
...@@ -301,88 +301,120 @@ ...@@ -301,88 +301,120 @@
self.myChart1.resize() self.myChart1.resize()
}, 10) }, 10)
}, },
initChart(data){ initChart(list){
let data=[]
if(list.length > 10){
for(var i=0;i<10;i++){
data.push(list[i])
}
}else {
data=list
}
//业主单位合作情况 //业主单位合作情况
this.option = { this.option ={
legend: { tooltip: {
show: false, trigger: 'axis',
x:'center', axisPointer: {
y:'bottom', type: 'cross'
padding:[10,0,10,0],
itemWidth: 24,
itemHeight: 10,
textStyle:{
borderRadius:30,
} }
}, },
yAxis: { xAxis: {
type: 'category', type: 'category',
inverse: true, // 反向坐标 axisLabel: { //坐标轴刻度标签的相关设置
data: data.map(item => item.companyName), margin: 15, //刻度标签与轴线之间的距离
axisLine: { color:"#666666"
show: false,
},
axisTick: {
show: false,
}, },
axisTick: false, //坐标轴刻度
axisPointer: { axisPointer: {
label: { type: 'shadow'
show: true, },
margin: 30 data: data.map(item => item.companyName),
},
yAxis: [
{
type: 'value',
axisLabel: { //坐标轴刻度标签的相关设置
color:"#666666"
},
name: '单位:次',
nameLocation: 'end',
nameTextStyle: {
padding: [0, 10, 0, -60], // 四个数字分别为上右下左与原位置距离
color: '#666666',
} }
}, },
axisLabel: { {
margin: 200, type: 'value',
textStyle: { axisLabel: { //坐标轴刻度标签的相关设置
align: 'left', color:"#666666"
}, },
formatter: function (value,index) { name: '单位:万元',
if (value.length > 15) { nameLocation: 'end',
value=`${value.slice(0, 15)}...` nameTextStyle: {
} padding: [0, 0, 0, 100], // 四个数字分别为上右下左与原位置距离
return value color: '#666666',
}, },
}, splitLine: {
}, show: true,
xAxis: { lineStyle: {
type: 'value', type: 'dashed',
axisLabel: { //坐标轴刻度标签的相关设置 color: ['#FFFFFF']
// color:"#666666" }
}, }
name: '单位/万元', }
// nameLocation: 'start', ],
nameLocation: 'end',
nameTextStyle: {
padding: [0, 0, 0, 0], // 四个数字分别为上右下左与原位置距离
// color: '#666666',
},
},
grid: { grid: {
left: '22%', top:30,
top: 60, left:80,
right: 80, right:90,
bottom: 60, bottom:30,
},
tooltip: {
show: true,
// backgroundColor: 'rgba(0,0,0,.7)',
borderWidth: 0,
// textStyle: {
// color: '#fff',
// },
}, },
series: { series: [
name:'合同总额', {
data: data.map(item => item.totalAmount), name:'合作金额(万元)',
barGap: 0, smooth: false, //平滑
type: 'bar', type:"line",
itemStyle:{ symbolSize: 6,
color: '#92C9FF', yAxisIndex: 1,
barBorderRadius:[0, 20, 20, 0] tooltip: {
valueFormatter: function (value) {
return value + '万元'
}
},
itemStyle: {
normal:{
color: '#67B3FD',
lineStyle: {
width:3
},
}
},
data:data.map(item => item.totalAmount),
}, },
barWidth: 8, {
}, name:'合作次数(次)',
type: 'bar',
barWidth: 20,
tooltip: {
valueFormatter: function (value) {
return value + '次';
}
},
itemStyle: {
normal:{
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: '#56A5FF'
}, {
offset: 1,
color: '#1B8EFF'
}]),
barBorderRadius:[20,20, 0, 0]
}
},
data:data.map(item => item.businessCount),
}
]
} }
this.option && this.myChart.setOption(this.option) this.option && this.myChart.setOption(this.option)
}, },
......
...@@ -1350,7 +1350,7 @@ export default { ...@@ -1350,7 +1350,7 @@ export default {
if(this.activeName === 'second'){ if(this.activeName === 'second'){
this.getBigBidPage() this.getBigBidPage()
} }
this.jump() // this.jump()
} }
}, },
...@@ -1380,18 +1380,6 @@ export default { ...@@ -1380,18 +1380,6 @@ export default {
}); });
}, },
jump() { jump() {
// 用 class="d_jump" 添加锚点
// var jump = document.querySelector('.data_list')
// if (!jump) {
// jump = document.querySelector('.bottom-toolbar')
// }
// if (!jump) {
// var jump = document.querySelector('.bg_corl_chaxun')
// }
// if (!jump) {
// return false
// }
let total = 500 let total = 500
let distance = document.documentElement.scrollTop || document.body.scrollTop let distance = document.documentElement.scrollTop || document.body.scrollTop
// 平滑滚动,时长500ms,每10ms一跳,共50跳 // 平滑滚动,时长500ms,每10ms一跳,共50跳
......
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