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',
y:'bottom',
padding:[10,0,10,0],
itemWidth: 24,
itemHeight: 10,
textStyle:{
borderRadius:30,
}
},
yAxis: {
type: 'category',
inverse: true, // 反向坐标
data: data.map(item => item.companyName),
axisLine: {
show: false,
},
axisTick: {
show: false,
},
axisPointer: { axisPointer: {
label: { type: 'cross'
show: true,
margin: 30
} }
}, },
axisLabel: { xAxis: {
margin: 200, type: 'category',
textStyle: { axisLabel: { //坐标轴刻度标签的相关设置
align: 'left', margin: 15, //刻度标签与轴线之间的距离
}, color:"#666666"
formatter: function (value,index) {
if (value.length > 15) {
value=`${value.slice(0, 15)}...`
}
return value
}, },
axisTick: false, //坐标轴刻度
axisPointer: {
type: 'shadow'
}, },
data: data.map(item => item.companyName),
}, },
xAxis: { yAxis: [
{
type: 'value', type: 'value',
axisLabel: { //坐标轴刻度标签的相关设置 axisLabel: { //坐标轴刻度标签的相关设置
// color:"#666666" color:"#666666"
}, },
name: '单位/万元', name: '单位:次',
// nameLocation: 'start',
nameLocation: 'end', nameLocation: 'end',
nameTextStyle: { nameTextStyle: {
padding: [0, 0, 0, 0], // 四个数字分别为上右下左与原位置距离 padding: [0, 10, 0, -60], // 四个数字分别为上右下左与原位置距离
// color: '#666666', color: '#666666',
}
}, },
{
type: 'value',
axisLabel: { //坐标轴刻度标签的相关设置
color:"#666666"
}, },
name: '单位:万元',
nameLocation: 'end',
nameTextStyle: {
padding: [0, 0, 0, 100], // 四个数字分别为上右下左与原位置距离
color: '#666666',
},
splitLine: {
show: true,
lineStyle: {
type: 'dashed',
color: ['#FFFFFF']
}
}
}
],
grid: { grid: {
left: '22%', top:30,
top: 60, left:80,
right: 80, right:90,
bottom: 60, bottom:30,
}, },
series: [
{
name:'合作金额(万元)',
smooth: false, //平滑
type:"line",
symbolSize: 6,
yAxisIndex: 1,
tooltip: { tooltip: {
show: true, valueFormatter: function (value) {
// backgroundColor: 'rgba(0,0,0,.7)', return value + '万元'
borderWidth: 0, }
// textStyle: { },
// color: '#fff', itemStyle: {
// }, normal:{
}, color: '#67B3FD',
series: { lineStyle: {
name:'合同总额', width:3
data: data.map(item => item.totalAmount), },
barGap: 0, }
},
data:data.map(item => item.totalAmount),
},
{
name:'合作次数(次)',
type: 'bar', type: 'bar',
itemStyle:{ barWidth: 20,
color: '#92C9FF', tooltip: {
barBorderRadius:[0, 20, 20, 0] valueFormatter: function (value) {
return value + '次';
}
}, },
barWidth: 8, 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