|
|
@ -134,7 +134,7 @@ export default { |
|
|
|
this.destroy() |
|
|
|
}, |
|
|
|
created() { |
|
|
|
// this.getLibBookTotal() |
|
|
|
this.getLibBookTotal() |
|
|
|
this.getReadRanking() |
|
|
|
this.getLendingTotal() |
|
|
|
}, |
|
|
@ -515,71 +515,53 @@ export default { |
|
|
|
|
|
|
|
this.seriesData = series |
|
|
|
const initOption = { |
|
|
|
// {a}<br/> |
|
|
|
// 提示框 |
|
|
|
tooltip: { |
|
|
|
trigger: 'item', |
|
|
|
triggerOn: 'click', |
|
|
|
showContent: true, // 是否显示提示框浮层 |
|
|
|
alwaysShowContent: true, // 是否一直显示提示框内容 |
|
|
|
// hideDelay: 100, // 浮层隐藏的延迟 |
|
|
|
enterable: 'mousemove|click', |
|
|
|
padding: [0, 0, 0, 0], |
|
|
|
backgroundColor: null, |
|
|
|
position: function(point, params, dom, rect, size) { |
|
|
|
return [point[0] + 14, point[1] - 164] |
|
|
|
}, |
|
|
|
formatter: (params, ticket, callback) => { |
|
|
|
if (params.seriesType === 'effectScatter') { |
|
|
|
const addressLine = params.data.place ? `<div class='place'>地址:${params.data.place}</div>` : '' |
|
|
|
return `<div class='tooltip-main' > |
|
|
|
baseOption: { |
|
|
|
// 提示框 |
|
|
|
tooltip: { |
|
|
|
trigger: 'item', |
|
|
|
triggerOn: 'click', |
|
|
|
showContent: true, // 是否显示提示框浮层 |
|
|
|
alwaysShowContent: true, // 是否一直显示提示框内容 |
|
|
|
// hideDelay: 100, // 浮层隐藏的延迟 |
|
|
|
enterable: 'mousemove|click', |
|
|
|
padding: [0, 0, 0, 0], |
|
|
|
backgroundColor: null, |
|
|
|
position: function(point, params, dom, rect, size) { |
|
|
|
return [point[0] + 14, point[1] - 164] |
|
|
|
}, |
|
|
|
formatter: (params, ticket, callback) => { |
|
|
|
if (params.seriesType === 'effectScatter') { |
|
|
|
const addressLine = params.data.place ? `<div class='place'>地址:${params.data.place}</div>` : '' |
|
|
|
return `<div class='tooltip-main' > |
|
|
|
<div class='tooltip-line'></div> |
|
|
|
<div class='tooltip-content'> |
|
|
|
<div class='title'>${params.data.name}</div> |
|
|
|
${addressLine} |
|
|
|
</div> |
|
|
|
</div>` |
|
|
|
} else if (params.seriesType === 'lines') { |
|
|
|
return ( |
|
|
|
params.data.fromName + |
|
|
|
} else if (params.seriesType === 'lines') { |
|
|
|
return ( |
|
|
|
params.data.fromName + |
|
|
|
'>' + |
|
|
|
params.data.toName + |
|
|
|
'<br />' + |
|
|
|
params.data.value |
|
|
|
) |
|
|
|
} else { |
|
|
|
return params.name |
|
|
|
) |
|
|
|
} else { |
|
|
|
return params.name |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 设置geo坐标系 |
|
|
|
geo: [ |
|
|
|
{ |
|
|
|
map: 'qiyang', |
|
|
|
aspectScale: 1, |
|
|
|
zoom: 1.1, |
|
|
|
top: '6%', // 距离顶部的位置,每层向下一个百分比 |
|
|
|
left: '11%', |
|
|
|
roam: false, // 是否开启平游或缩放 |
|
|
|
z: 6, // 可以看成是css的z-index,数字越大图层越高,我这里设置了5个,然后页面有点卡,根据实际需要来添加,3个其实就能看出效果了 |
|
|
|
itemStyle: { |
|
|
|
areaColor: { |
|
|
|
type: 'linear', |
|
|
|
x: 0, |
|
|
|
y: 0, |
|
|
|
x2: 1, |
|
|
|
y2: 1, |
|
|
|
colorStops: [{ |
|
|
|
offset: 0, color: 'rgba(0,0,0,.1)' |
|
|
|
}, { |
|
|
|
offset: 0.8, color: 'rgba(59,143,248,.6)' |
|
|
|
}], |
|
|
|
global: false |
|
|
|
}, |
|
|
|
borderColor: '#9ffcff', |
|
|
|
borderWidth: 1 |
|
|
|
}, |
|
|
|
emphasis: { |
|
|
|
}, |
|
|
|
// 设置geo坐标系 |
|
|
|
geo: [ |
|
|
|
{ |
|
|
|
map: 'qiyang', |
|
|
|
aspectScale: 1, |
|
|
|
zoom: 1.1, |
|
|
|
top: '6%', // 距离顶部的位置,每层向下一个百分比 |
|
|
|
left: '11%', |
|
|
|
roam: false, // 是否开启平游或缩放 |
|
|
|
z: 6, // 可以看成是css的z-index,数字越大图层越高,我这里设置了5个,然后页面有点卡,根据实际需要来添加,3个其实就能看出效果了 |
|
|
|
itemStyle: { |
|
|
|
areaColor: { |
|
|
|
type: 'linear', |
|
|
@ -593,160 +575,193 @@ export default { |
|
|
|
offset: 0.8, color: 'rgba(59,143,248,.6)' |
|
|
|
}], |
|
|
|
global: false |
|
|
|
} // 鼠标移上去时区域的颜色 |
|
|
|
} |
|
|
|
}, |
|
|
|
label: { |
|
|
|
}, |
|
|
|
borderColor: '#9ffcff', |
|
|
|
borderWidth: 1 |
|
|
|
}, |
|
|
|
emphasis: { |
|
|
|
show: false, |
|
|
|
color: '#fff' |
|
|
|
itemStyle: { |
|
|
|
areaColor: { |
|
|
|
type: 'linear', |
|
|
|
x: 0, |
|
|
|
y: 0, |
|
|
|
x2: 1, |
|
|
|
y2: 1, |
|
|
|
colorStops: [{ |
|
|
|
offset: 0, color: 'rgba(0,0,0,.1)' |
|
|
|
}, { |
|
|
|
offset: 0.8, color: 'rgba(59,143,248,.6)' |
|
|
|
}], |
|
|
|
global: false |
|
|
|
} // 鼠标移上去时区域的颜色 |
|
|
|
} |
|
|
|
}, |
|
|
|
label: { |
|
|
|
emphasis: { |
|
|
|
show: false, |
|
|
|
color: '#fff' |
|
|
|
} |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
show: true |
|
|
|
} |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
show: true |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
map: 'qiyang', |
|
|
|
aspectScale: 1, |
|
|
|
zoom: 1.1, |
|
|
|
top: '6%', // 距离顶部的位置,每层向下一个百分比 |
|
|
|
left: '11%', |
|
|
|
roam: false, // 是否开启平游或缩放 |
|
|
|
z: 5, // 可以看成是css的z-index,数字越大图层越高,我这里设置了5个,然后页面有点卡,根据实际需要来添加,3个其实就能看出效果了 |
|
|
|
itemStyle: { |
|
|
|
areaColor: { |
|
|
|
type: 'pattern', |
|
|
|
image: mapImg, |
|
|
|
repeat: 'repeat' |
|
|
|
}, // 每个图层的背景色,根据需要来调,由亮变暗,下面的几个颜色也一样 |
|
|
|
borderColor: '#9ffcff', |
|
|
|
borderWidth: 3, |
|
|
|
shadowColor: '#4cd4eb', |
|
|
|
shadowOffsetX: 0, |
|
|
|
shadowOffsetY: 0, |
|
|
|
shadowBlur: 0, |
|
|
|
emphasis: { // 地图悬停高亮样式 |
|
|
|
{ |
|
|
|
map: 'qiyang', |
|
|
|
aspectScale: 1, |
|
|
|
zoom: 1.1, |
|
|
|
top: '6%', // 距离顶部的位置,每层向下一个百分比 |
|
|
|
left: '11%', |
|
|
|
roam: false, // 是否开启平游或缩放 |
|
|
|
z: 5, // 可以看成是css的z-index,数字越大图层越高,我这里设置了5个,然后页面有点卡,根据实际需要来添加,3个其实就能看出效果了 |
|
|
|
itemStyle: { |
|
|
|
areaColor: { |
|
|
|
type: 'pattern', |
|
|
|
image: mapImg, |
|
|
|
repeat: 'repeat' |
|
|
|
}, // 每个图层的背景色,根据需要来调,由亮变暗,下面的几个颜色也一样 |
|
|
|
borderColor: '#9ffcff', |
|
|
|
borderWidth: 3, |
|
|
|
shadowColor: '#4cd4eb', |
|
|
|
shadowOffsetX: 0, |
|
|
|
shadowOffsetY: 0, |
|
|
|
shadowBlur: 0, |
|
|
|
emphasis: { // 地图悬停高亮样式 |
|
|
|
areaColor: { |
|
|
|
type: 'pattern', |
|
|
|
image: mapImg, |
|
|
|
repeat: 'repeat' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
emphasis: { |
|
|
|
disabled: true, |
|
|
|
areaColor: '#01215c' |
|
|
|
}, |
|
|
|
label: { |
|
|
|
}, |
|
|
|
emphasis: { |
|
|
|
show: false, |
|
|
|
color: '#fff' |
|
|
|
disabled: true, |
|
|
|
areaColor: '#01215c' |
|
|
|
}, |
|
|
|
label: { |
|
|
|
emphasis: { |
|
|
|
show: false, |
|
|
|
color: '#fff' |
|
|
|
} |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
show: false |
|
|
|
} |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
show: false |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
map: 'qiyang', |
|
|
|
aspectScale: 1, |
|
|
|
zoom: 1.1, |
|
|
|
top: '7%', // 根据自己需要来设置 |
|
|
|
left: '10%', |
|
|
|
roam: false, // 是否开启平游或缩放 |
|
|
|
z: 4, // 变小,也就是被压在下面 |
|
|
|
itemStyle: { |
|
|
|
areaColor: '#05498f', // 记得改颜色 |
|
|
|
borderColor: '#0296cf', |
|
|
|
borderWidth: 2, |
|
|
|
shadowColor: '#0296cf', |
|
|
|
shadowOffsetX: 0, |
|
|
|
shadowOffsetY: 0, |
|
|
|
shadowBlur: 0, |
|
|
|
emphasis: { // 地图悬停高亮样式 |
|
|
|
disabled: true, |
|
|
|
areaColor: '#05498f' |
|
|
|
{ |
|
|
|
map: 'qiyang', |
|
|
|
aspectScale: 1, |
|
|
|
zoom: 1.1, |
|
|
|
top: '7%', // 根据自己需要来设置 |
|
|
|
left: '10%', |
|
|
|
roam: false, // 是否开启平游或缩放 |
|
|
|
z: 4, // 变小,也就是被压在下面 |
|
|
|
itemStyle: { |
|
|
|
areaColor: '#05498f', // 记得改颜色 |
|
|
|
borderColor: '#0296cf', |
|
|
|
borderWidth: 2, |
|
|
|
shadowColor: '#0296cf', |
|
|
|
shadowOffsetX: 0, |
|
|
|
shadowOffsetY: 0, |
|
|
|
shadowBlur: 0, |
|
|
|
emphasis: { // 地图悬停高亮样式 |
|
|
|
disabled: true, |
|
|
|
areaColor: '#05498f' |
|
|
|
} |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
show: false |
|
|
|
} |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
show: false |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
map: 'qiyang', |
|
|
|
aspectScale: 1, |
|
|
|
zoom: 1.1, |
|
|
|
top: '9%', // 根据自己需要来设置 |
|
|
|
left: '9%', |
|
|
|
roam: false, |
|
|
|
z: 3, // 变小,也就是被压在下面 |
|
|
|
itemStyle: { |
|
|
|
areaColor: 'rgba(3,106,183,.5)', // 记得改颜色 |
|
|
|
borderColor: '#025792', |
|
|
|
borderWidth: 2, |
|
|
|
shadowColor: '#025792', |
|
|
|
shadowOffsetX: 0, |
|
|
|
shadowOffsetY: 0, |
|
|
|
shadowBlur: 0, |
|
|
|
emphasis: { // 地图悬停高亮样式 |
|
|
|
areaColor: 'rgba(3,106,183,.5)' |
|
|
|
{ |
|
|
|
map: 'qiyang', |
|
|
|
aspectScale: 1, |
|
|
|
zoom: 1.1, |
|
|
|
top: '9%', // 根据自己需要来设置 |
|
|
|
left: '9%', |
|
|
|
roam: false, |
|
|
|
z: 3, // 变小,也就是被压在下面 |
|
|
|
itemStyle: { |
|
|
|
areaColor: 'rgba(3,106,183,.5)', // 记得改颜色 |
|
|
|
borderColor: '#025792', |
|
|
|
borderWidth: 2, |
|
|
|
shadowColor: '#025792', |
|
|
|
shadowOffsetX: 0, |
|
|
|
shadowOffsetY: 0, |
|
|
|
shadowBlur: 0, |
|
|
|
emphasis: { // 地图悬停高亮样式 |
|
|
|
areaColor: 'rgba(3,106,183,.5)' |
|
|
|
} |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
show: false |
|
|
|
} |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
show: false |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
map: 'qiyang', |
|
|
|
aspectScale: 1, |
|
|
|
zoom: 1.1, |
|
|
|
top: '11%', // 根据自己需要来设置 |
|
|
|
left: '8%', |
|
|
|
roam: false, |
|
|
|
z: 2, // 变小,也就是被压在下面 |
|
|
|
itemStyle: { |
|
|
|
areaColor: 'rgba(3,106,183,.2)', // 记得改颜色 |
|
|
|
borderColor: '#195175', |
|
|
|
borderWidth: 1, |
|
|
|
shadowColor: '#0f4c74', |
|
|
|
shadowOffsetX: 0, |
|
|
|
shadowOffsetY: 4, |
|
|
|
shadowBlur: 10, |
|
|
|
emphasis: { // 地图悬停高亮样式 |
|
|
|
areaColor: 'rgba(3,106,183,.2)' |
|
|
|
{ |
|
|
|
map: 'qiyang', |
|
|
|
aspectScale: 1, |
|
|
|
zoom: 1.1, |
|
|
|
top: '11%', // 根据自己需要来设置 |
|
|
|
left: '8%', |
|
|
|
roam: false, |
|
|
|
z: 2, // 变小,也就是被压在下面 |
|
|
|
itemStyle: { |
|
|
|
areaColor: 'rgba(3,106,183,.2)', // 记得改颜色 |
|
|
|
borderColor: '#195175', |
|
|
|
borderWidth: 1, |
|
|
|
shadowColor: '#0f4c74', |
|
|
|
shadowOffsetX: 0, |
|
|
|
shadowOffsetY: 4, |
|
|
|
shadowBlur: 10, |
|
|
|
emphasis: { // 地图悬停高亮样式 |
|
|
|
areaColor: 'rgba(3,106,183,.2)' |
|
|
|
} |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
show: false |
|
|
|
} |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
show: false |
|
|
|
{ |
|
|
|
map: 'qiyang', |
|
|
|
aspectScale: 1, |
|
|
|
zoom: 1.1, |
|
|
|
top: '12%', // 根据自己需要来设置 |
|
|
|
left: '10%', |
|
|
|
roam: false, |
|
|
|
z: 1, // 变小,也就是被压在下面 |
|
|
|
itemStyle: { |
|
|
|
areaColor: 'rgba(0,0,0,.6)', // 记得改颜色 |
|
|
|
borderColor: 'rgba(0,0,0,.6)', |
|
|
|
borderWidth: 2, |
|
|
|
shadowColor: 'rgba(0,0,0,.6)', |
|
|
|
shadowOffsetX: 0, |
|
|
|
shadowOffsetY: 4, |
|
|
|
shadowBlur: 10, |
|
|
|
emphasis: { // 地图悬停高亮样式 |
|
|
|
areaColor: 'rgba(0,0,0,.6)' |
|
|
|
} |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
show: false |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
], |
|
|
|
series: series |
|
|
|
}, |
|
|
|
media: [ |
|
|
|
{ |
|
|
|
map: 'qiyang', |
|
|
|
aspectScale: 1, |
|
|
|
zoom: 1.1, |
|
|
|
top: '12%', // 根据自己需要来设置 |
|
|
|
left: '10%', |
|
|
|
roam: false, |
|
|
|
z: 1, // 变小,也就是被压在下面 |
|
|
|
itemStyle: { |
|
|
|
areaColor: 'rgba(0,0,0,.6)', // 记得改颜色 |
|
|
|
borderColor: 'rgba(0,0,0,.6)', |
|
|
|
borderWidth: 2, |
|
|
|
shadowColor: 'rgba(0,0,0,.6)', |
|
|
|
shadowOffsetX: 0, |
|
|
|
shadowOffsetY: 4, |
|
|
|
shadowBlur: 10, |
|
|
|
emphasis: { // 地图悬停高亮样式 |
|
|
|
areaColor: 'rgba(0,0,0,.6)' |
|
|
|
} |
|
|
|
query: { |
|
|
|
maxWidth: 666 |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
show: false |
|
|
|
option: { |
|
|
|
tooltip: { |
|
|
|
position: function(point, params, dom, rect, size) { |
|
|
|
return [point[0] + 10, point[1] - 122] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
series: series |
|
|
|
] |
|
|
|
} |
|
|
|
setTimeout(() => { |
|
|
|
this.myChart.setOption(initOption) |
|
|
|