tsg-web/src/views/sz/zzjgck/jgoption.js

137 lines
3.9 KiB
JavaScript
Raw Normal View History

2024-09-23 13:49:58 +08:00
export default function jgOption() {
return {
tooltip: {
trigger: "item",
triggerOn: "mousemove",
color: "#fff",
backgroundColor: "skyblue",
borderColor: "skyblue",
},
animationDurationUpdate: 1500,
animationEasingUpdate: "quinticInOut",
series: [
{
type: "tree",
symbolSize: 75,
symbol: "roundRect",
edgeShape: "polyline",
edgeForkPosition: "50%",
edgeSymbol: ["circle", "arrow"],
edgeSymbolSize: [4, 10],
edgeLabel: {
normal: {
textStyle: {
fontSize: 18,
},
},
},
initialTreeDepth: 2,
orient: "vertical",
itemStyle: {
color: "#FFC125",
borderColor: "#FFC125",
},
roam: true, // 可移动,可缩放
expandAndCollapse: true,
animationDuration: 550,
animationDurationUpdate: 750,
//线条的颜色
lineStyle: {
normal: {
opacity: 0.9,
color: "#93beff",
// type: "dashed",
width: 2,
},
},
label: {
show: true,
position: "inside",
textStyle: {
fontSize: 15,
color: "#fff",
},
},
leaves: {
label: {
position: "inside",
color: "#fff",
},
itemStyle: {
color: "#dfdfdf",
borderColor: "#dfdfdf",
},
},
data: [
{
name: "根节点",
url: "",
// 根节点样式设置
itemStyle: {
color: "#18a849",
borderColor: "#18a849",
},
children: [
{
name: "子节点1",
children: [
{
name: "叶子节点1",
itemStyle: {
color: "#5470C6",
borderColor: "#5470C6",
},
},
{
name: "叶子节点2",
itemStyle: {
color: "#5470C6",
borderColor: "#5470C6",
},
},
{
name: "叶子节点3",
itemStyle: {
color: "#5470C6",
borderColor: "#5470C6",
},
},
],
},
{
name: "子节点2",
children: [
{
name: "叶子节点4",
itemStyle: {
color: "#5470C6",
borderColor: "#5470C6",
},
},
{
name: "叶子节点5",
itemStyle: {
color: "#5470C6",
borderColor: "#5470C6",
},
},
{
name: "叶子节点6",
itemStyle: {
color: "#5470C6",
borderColor: "#5470C6",
},
},
],
},
],
},
],
},
],
};
}