Commit 8a089c53 authored by danfuman's avatar danfuman

修改

parent 655e5864
......@@ -212,7 +212,7 @@
pageSize:10,
recordlist:[],
timeList:['今日','近三天','近七天','自定义'],
datatype:0,
datatype:'',
defaultValue:new Date(),
pickerValue: [],
params:{
......@@ -301,88 +301,120 @@
self.myChart1.resize()
}, 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 = {
legend: {
show: false,
x:'center',
y:'bottom',
padding:[10,0,10,0],
itemWidth: 24,
itemHeight: 10,
textStyle:{
borderRadius:30,
this.option ={
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
}
},
yAxis: {
xAxis: {
type: 'category',
inverse: true, // 反向坐标
data: data.map(item => item.companyName),
axisLine: {
show: false,
},
axisTick: {
show: false,
axisLabel: { //坐标轴刻度标签的相关设置
margin: 15, //刻度标签与轴线之间的距离
color:"#666666"
},
axisTick: false, //坐标轴刻度
axisPointer: {
label: {
show: true,
margin: 30
type: 'shadow'
},
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,
textStyle: {
align: 'left',
{
type: 'value',
axisLabel: { //坐标轴刻度标签的相关设置
color:"#666666"
},
formatter: function (value,index) {
if (value.length > 15) {
value=`${value.slice(0, 15)}...`
}
return value
name: '单位:万元',
nameLocation: 'end',
nameTextStyle: {
padding: [0, 0, 0, 100], // 四个数字分别为上右下左与原位置距离
color: '#666666',
},
},
},
xAxis: {
type: 'value',
axisLabel: { //坐标轴刻度标签的相关设置
// color:"#666666"
},
name: '单位/万元',
// nameLocation: 'start',
nameLocation: 'end',
nameTextStyle: {
padding: [0, 0, 0, 0], // 四个数字分别为上右下左与原位置距离
// color: '#666666',
},
},
splitLine: {
show: true,
lineStyle: {
type: 'dashed',
color: ['#FFFFFF']
}
}
}
],
grid: {
left: '22%',
top: 60,
right: 80,
bottom: 60,
},
tooltip: {
show: true,
// backgroundColor: 'rgba(0,0,0,.7)',
borderWidth: 0,
// textStyle: {
// color: '#fff',
// },
top:30,
left:80,
right:90,
bottom:30,
},
series: {
name:'合同总额',
data: data.map(item => item.totalAmount),
barGap: 0,
type: 'bar',
itemStyle:{
color: '#92C9FF',
barBorderRadius:[0, 20, 20, 0]
series: [
{
name:'合作金额(万元)',
smooth: false, //平滑
type:"line",
symbolSize: 6,
yAxisIndex: 1,
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)
},
......
......@@ -1350,7 +1350,7 @@ export default {
if(this.activeName === 'second'){
this.getBigBidPage()
}
this.jump()
// this.jump()
}
},
......@@ -1380,18 +1380,6 @@ export default {
});
},
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 distance = document.documentElement.scrollTop || document.body.scrollTop
// 平滑滚动,时长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