提交 1fb54ea2 authored 作者: huhuiqing's avatar huhuiqing

Merge branch 'master' of http://8.140.26.4:10003/caijian/risk-monitor into dev_hhq

...@@ -1646,6 +1646,7 @@ ...@@ -1646,6 +1646,7 @@
"resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz", "resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz",
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==", "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@types/lodash": "*" "@types/lodash": "*"
} }
...@@ -1762,6 +1763,7 @@ ...@@ -1762,6 +1763,7 @@
"resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.5.21.tgz", "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.5.21.tgz",
"integrity": "sha512-SXlyk6I5eUGBd2v8Ie7tF6ADHE9kCR6mBEuPyH1nUZ0h6Xx6nZI29i12sJKQmzbDyr2tUHMhhTt51Z6blbkTTQ==", "integrity": "sha512-SXlyk6I5eUGBd2v8Ie7tF6ADHE9kCR6mBEuPyH1nUZ0h6Xx6nZI29i12sJKQmzbDyr2tUHMhhTt51Z6blbkTTQ==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@babel/parser": "^7.28.3", "@babel/parser": "^7.28.3",
"@vue/compiler-core": "3.5.21", "@vue/compiler-core": "3.5.21",
...@@ -2501,6 +2503,7 @@ ...@@ -2501,6 +2503,7 @@
"resolved": "https://registry.npmmirror.com/cytoscape/-/cytoscape-3.33.1.tgz", "resolved": "https://registry.npmmirror.com/cytoscape/-/cytoscape-3.33.1.tgz",
"integrity": "sha512-iJc4TwyANnOGR1OmWhsS9ayRS3s+XQ185FmuHObThD+5AeJCakAAbWv8KimMTt08xCCLNgneQwFp+JRJOr9qGQ==", "integrity": "sha512-iJc4TwyANnOGR1OmWhsS9ayRS3s+XQ185FmuHObThD+5AeJCakAAbWv8KimMTt08xCCLNgneQwFp+JRJOr9qGQ==",
"license": "MIT", "license": "MIT",
"peer": true,
"engines": { "engines": {
"node": ">=0.10" "node": ">=0.10"
} }
...@@ -2898,6 +2901,7 @@ ...@@ -2898,6 +2901,7 @@
"resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz",
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
"license": "ISC", "license": "ISC",
"peer": true,
"engines": { "engines": {
"node": ">=12" "node": ">=12"
} }
...@@ -3155,6 +3159,7 @@ ...@@ -3155,6 +3159,7 @@
"resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.6.0.tgz", "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.6.0.tgz",
"integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==", "integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==",
"license": "Apache-2.0", "license": "Apache-2.0",
"peer": true,
"dependencies": { "dependencies": {
"tslib": "2.3.0", "tslib": "2.3.0",
"zrender": "5.6.1" "zrender": "5.6.1"
...@@ -4388,13 +4393,15 @@ ...@@ -4388,13 +4393,15 @@
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"license": "MIT" "license": "MIT",
"peer": true
}, },
"node_modules/lodash-es": { "node_modules/lodash-es": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz", "resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
"license": "MIT" "license": "MIT",
"peer": true
}, },
"node_modules/lodash-unified": { "node_modules/lodash-unified": {
"version": "1.0.3", "version": "1.0.3",
...@@ -4442,6 +4449,7 @@ ...@@ -4442,6 +4449,7 @@
"resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-14.1.0.tgz", "resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-14.1.0.tgz",
"integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"argparse": "^2.0.1", "argparse": "^2.0.1",
"entities": "^4.4.0", "entities": "^4.4.0",
...@@ -5701,6 +5709,7 @@ ...@@ -5701,6 +5709,7 @@
"integrity": "sha512-BgLRGy7tNS9H66aIMASq1qSYbAAJV6Z6WR4QYTvj5FgF15rZ/ympT1uixHXwzbZUBDbkvqUI1KR0fH1FhMaQ9w==", "integrity": "sha512-BgLRGy7tNS9H66aIMASq1qSYbAAJV6Z6WR4QYTvj5FgF15rZ/ympT1uixHXwzbZUBDbkvqUI1KR0fH1FhMaQ9w==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@types/estree": "1.0.8" "@types/estree": "1.0.8"
}, },
...@@ -6634,6 +6643,7 @@ ...@@ -6634,6 +6643,7 @@
"integrity": "sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==", "integrity": "sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"esbuild": "^0.21.3", "esbuild": "^0.21.3",
"postcss": "^8.4.43", "postcss": "^8.4.43",
...@@ -6693,6 +6703,7 @@ ...@@ -6693,6 +6703,7 @@
"resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.21.tgz", "resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.21.tgz",
"integrity": "sha512-xxf9rum9KtOdwdRkiApWL+9hZEMWE90FHh8yS1+KJAiWYh+iGWV1FquPjoO9VUHQ+VIhsCXNNyZ5Sf4++RVZBA==", "integrity": "sha512-xxf9rum9KtOdwdRkiApWL+9hZEMWE90FHh8yS1+KJAiWYh+iGWV1FquPjoO9VUHQ+VIhsCXNNyZ5Sf4++RVZBA==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@vue/compiler-dom": "3.5.21", "@vue/compiler-dom": "3.5.21",
"@vue/compiler-sfc": "3.5.21", "@vue/compiler-sfc": "3.5.21",
......
...@@ -926,8 +926,10 @@ const initRightDonut = async () => { ...@@ -926,8 +926,10 @@ const initRightDonut = async () => {
for (let i = 0; i < res.data.length; i++) { for (let i = 0; i < res.data.length; i++) {
let item = { let item = {
name: res.data[i].country, name: res.data[i].country,
value: res.data[i].amount,
x: Math.random() * 10, x: Math.random() * 10,
y: Math.random() * 10, y: Math.random() * 10,
symbolSize: res.data[i].amount * 9,
// 节点颜色 // 节点颜色
itemStyle: { itemStyle: {
color: `rgba(${Math.floor(Math.random() * 256)}, ${Math.floor(Math.random() * 256)}, ${Math.floor( color: `rgba(${Math.floor(Math.random() * 256)}, ${Math.floor(Math.random() * 256)}, ${Math.floor(
...@@ -937,8 +939,10 @@ const initRightDonut = async () => { ...@@ -937,8 +939,10 @@ const initRightDonut = async () => {
}; };
let item1 = { let item1 = {
name: res.data[i].relationCountry, name: res.data[i].relationCountry,
value: res.data[i].amount,
x: Math.random() * 10, x: Math.random() * 10,
y: Math.random() * 10 y: Math.random() * 10,
symbolSize: res.data[i].amount * 9,
}; };
// 先判断data中是否包含上述数据 // 先判断data中是否包含上述数据
...@@ -977,7 +981,21 @@ const initRightDonut = async () => { ...@@ -977,7 +981,21 @@ const initRightDonut = async () => {
title: { title: {
// text: 'Basic Graph' // text: 'Basic Graph'
}, },
tooltip: {}, tooltip: {
trigger: 'item', // 针对Graph的节点/边触发(必配,否则弹框不生效)
triggerOn: 'click',
formatter: function (params) {
// params.data 是当前点击节点的完整数据对象
const { name, value } = params.data;
// 返回HTML字符串,自由拼接展示内容(支持换行、标签、样式)
return `
<div style="text-align: center;">
<span style="font-size:16px; font-weight: bold; margin-bottom:8px;">${name}</span>
<span>:${value || 0}</span>
</div>
`;
}
},
animationDurationUpdate: 1500, animationDurationUpdate: 1500,
animationEasingUpdate: "quinticInOut", animationEasingUpdate: "quinticInOut",
dataZoom: [ dataZoom: [
...@@ -997,7 +1015,7 @@ const initRightDonut = async () => { ...@@ -997,7 +1015,7 @@ const initRightDonut = async () => {
show: true show: true
}, },
edgeSymbol: ["circle", ""], edgeSymbol: ["circle", ""],
edgeSymbolSize: [4, 10], edgeSymbolSize: [4, 40],
edgeLabel: { edgeLabel: {
fontSize: 20 fontSize: 20
}, },
...@@ -1012,6 +1030,24 @@ const initRightDonut = async () => { ...@@ -1012,6 +1030,24 @@ const initRightDonut = async () => {
} }
] ]
}; };
// const option = {
// center: ["40%", "25%"],
// backgroundColor: "transparent",
// animation: true,
// series: [
// {
// type: "graph",
// layout: "none",
// roam: false,
// label: { show: true, position: "inside", color: "#fff", fontWeight: 700 },
// data: data,
// links: links,
// edgeSymbol: ["none", "none"],
// lineStyle: { color: "rgba(207,223,255,0.7)", width: 3 },
// emphasis: { focus: "adjacency" }
// }
// ]
// };
rightChart.setOption(option); rightChart.setOption(option);
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论