{"Message":"完善概览页面","MessageType":2,"Modules":[{"State":1,"Type":7,"Name":"Table/任务表"},{"State":1,"Type":1,"Name":"PCPage/项目标题"},{"State":1,"Type":1,"Name":"PCPage/任务列表"},{"State":1,"Type":1,"Name":"PCPage/任务-基本信息"},{"State":1,"Type":12,"Name":"CustomLibrary"},{"State":1,"Type":40,"Name":"Plugin"},{"State":1,"Type":15,"Name":"ServerCommand/新增工时"},{"State":1,"Type":1,"Name":"PCPage/新增任务"},{"State":1,"Type":15,"Name":"ServerCommand/新增任务"},{"State":1,"Type":1,"Name":"PCPage/项目概况"},{"State":1,"Type":1,"Name":"PCPage/项目成员统计"},{"State":1,"Type":1,"Name":"PCPage/项目概况-关键数据"},{"State":3,"Type":1,"Name":"PCPage/项目甘特图"}],"Version":"v1"}
This commit is contained in:
67
UserFile/echart.js
Normal file
67
UserFile/echart.js
Normal file
@@ -0,0 +1,67 @@
|
||||
// 改变页面图表样式
|
||||
let bgColor = "#fff";
|
||||
let color = ["#0090FF", "#ffc300", "#f64662", "#ec610a", "#00c9b1", "#6730ec"];
|
||||
|
||||
function hexToRgba(hex, opacity) {
|
||||
return (
|
||||
"rgba(" +
|
||||
parseInt("0x" + hex.slice(1, 3)) +
|
||||
"," +
|
||||
parseInt("0x" + hex.slice(3, 5)) +
|
||||
"," +
|
||||
parseInt("0x" + hex.slice(5, 7)) +
|
||||
"," +
|
||||
opacity +
|
||||
")"
|
||||
);
|
||||
}
|
||||
// 修改折线图样式
|
||||
Forguncy.Helper.preSetEchartOption = (op, page, chart) => {
|
||||
console.log(op);
|
||||
op.series = op.series.map((element, index) => {
|
||||
if (element.type == "line") {
|
||||
var s1 = {};
|
||||
s1.smooth = true;
|
||||
element.symbol = "emptyCircle";
|
||||
element.symbolSize = 8;
|
||||
s1.zlevel = 3;
|
||||
s1.showSymbol = false;
|
||||
s1.lineStyle = {
|
||||
normal: {
|
||||
color: color[index],
|
||||
shadowBlur: 5,
|
||||
shadowColor: hexToRgba(color[index], 0.1),
|
||||
shadowOffsetY: 6
|
||||
}
|
||||
};
|
||||
s1.areaStyle = {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: hexToRgba(color[index], 0.3)
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: hexToRgba(color[index], 0.1)
|
||||
}
|
||||
],
|
||||
false
|
||||
),
|
||||
shadowColor: hexToRgba(color[index], 0.1),
|
||||
shadowBlur: 10
|
||||
}
|
||||
};
|
||||
|
||||
element = { ...element, ...s1 };
|
||||
}
|
||||
return element;
|
||||
});
|
||||
|
||||
return op;
|
||||
};
|
||||
Reference in New Issue
Block a user