diff --git a/src/layout/Sider.js b/src/layout/Sider.js
index 775729c..a571183 100644
--- a/src/layout/Sider.js
+++ b/src/layout/Sider.js
@@ -54,6 +54,7 @@ const Sider = (props) => {
};
/** 子菜单路由 */
const navToMenu = (menu) => {
+ console.log(menu.ID,'menu.ID')
props.history.push({ pathname: `/main/${menu.ID}` });
};
diff --git a/src/layout/sider.less b/src/layout/sider.less
index fe9c23d..a38b7f0 100644
--- a/src/layout/sider.less
+++ b/src/layout/sider.less
@@ -309,7 +309,7 @@
align-items: center;
cursor: pointer;
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.12);
- margin: 8px 0px;
+ margin: 6px 0px;
padding: 10px;
border-radius: 5px;
// justify-content: center;
diff --git a/src/routes/Home.js b/src/routes/Home.js
index e408c08..758bd08 100644
--- a/src/routes/Home.js
+++ b/src/routes/Home.js
@@ -30,7 +30,7 @@ import {
Table,
Button,
DatePicker,
- Select
+ Select,
} from "antd";
import styles from "./dashboard.css";
import "slick-carousel/slick/slick.css";
@@ -47,6 +47,22 @@ const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 14 },
};
+const AllTech = (props) => {
+ return (
+
@@ -169,8 +185,8 @@ class Home extends React.Component {
searchTodayVisible: false,
taskSelects: [],
tmpData: {},
- querySearch:{},
- currentpageIndex:'1',
+ querySearch: {},
+ currentpageIndex: "1",
visibleStartTime: [],
visibleEndTime: [],
completeName: [
@@ -225,6 +241,16 @@ class Home extends React.Component {
this.dangerChange();
this.getUser();
}
+ getSixMonth = (number, yearString = "", monthString = "") => {
+ let nowdate = new Date();
+ nowdate.setMonth(nowdate.getMonth() + number);
+ let y = nowdate.getFullYear();
+ let m = nowdate.getMonth() + 1;
+ // let d = nowdate.getDate();
+ let retrundate = y + yearString + m + monthString;
+
+ return retrundate;
+ };
showAll = (key) => {
const { tableData } = this.state;
@@ -580,20 +606,10 @@ class Home extends React.Component {
[23, 21, 43, 12, 15, 13, 15, 16, 17, 14, 19, 24],
[17, 20, 23, 42, 12, 17, 13, 15, 12, 17, 19, 34],
];
- let xData = [
- "2023年4月",
- "2023年5月",
- "2023年6月",
- "2023年7月",
- "2023年8月",
- "2023年9月",
- "2023年10月",
- "2023年11月",
- "2023年12月",
- "2024年1月",
- "2024年2月",
- "2024年3月",
- ];
+ let xData = [];
+ for (let i = 0; i < 12; i++) {
+ xData.unshift(this.getSixMonth(-i, "年", "月"));
+ }
for (let i = 0; i < data3.length; i++) {
series.push({
name: seriesName[i],
@@ -697,12 +713,13 @@ class Home extends React.Component {
["0", "1", "0", "3", "0", "1"],
["100.00", "92.31", "100.00", "76.92", "100.00", "92.86"],
];
- let xData = [
- ["2023-10", "2023-11", "2023-12", "2024-01", "2024-02", "2024-03"],
- ["2023-10", "2023-11", "2023-12", "2024-01", "2024-02", "2024-03"],
- ["2023-10", "2023-11", "2023-12", "2024-01", "2024-02", "2024-03"],
- ["2023-10", "2023-11", "2023-12", "2024-01", "2024-02", "2024-03"],
- ];
+ let date = new Date();
+ let year = date.getFullYear();
+ let month = date.getMonth() + 1;
+ let xData = [];
+ for (let i = 0; i < 6; i++) {
+ xData.unshift(this.getSixMonth(-i, "-", ""));
+ }
let dangerChanges = document.getElementById("dangerChange");
if (dangerChanges) {
let myChart = echarts.init(dangerChanges);
@@ -752,7 +769,7 @@ class Home extends React.Component {
},
xAxis: {
type: "category",
- data: xData[0],
+ data: xData,
axisLine: {
lineStyle: {
color: "#0c3b71",
@@ -966,7 +983,7 @@ class Home extends React.Component {
myChart.setOption({
title: [
{
- text: "93%",
+ text: "99%",
x: "center",
top: "40%",
textStyle: {
@@ -1012,7 +1029,7 @@ class Home extends React.Component {
hoverAnimation: false,
data: [
{
- value: 93,
+ value: 99,
name: "01",
itemStyle: {
normal: {
@@ -1040,7 +1057,7 @@ class Home extends React.Component {
},
{
name: "02",
- value: 7,
+ value: 1,
},
],
},
@@ -1063,24 +1080,27 @@ class Home extends React.Component {
let myChart = echarts.init(riskLevels);
myChart.setOption({
color: ["#c92a2a", "#ffa94d", "#ffe066", "#4285F4", "#fa8a89"],
- title: [{
- text: "52",
- x: "26%",
- y: "40%",
- textStyle: {
- fontSize: 26,
- fontWeight: "normal",
- color: ["#333"],
+ title: [
+ {
+ text: "52",
+ x: "26%",
+ y: "40%",
+ textStyle: {
+ fontSize: 26,
+ fontWeight: "normal",
+ color: ["#333"],
+ },
},
- },{
- text: "风险总数",
- x: "24%",
- y: "55%",
- textStyle: {
- color: "#666",
- fontSize: 12,
+ {
+ text: "风险总数",
+ x: "24%",
+ y: "55%",
+ textStyle: {
+ color: "#666",
+ fontSize: 12,
+ },
},
- }],
+ ],
tooltip: {
trigger: "item",
formatter: "{b}:({d}%)",
@@ -1230,7 +1250,7 @@ class Home extends React.Component {
{
querySearch,
},
- () => { }
+ () => {}
);
};
// 开始时间
@@ -1254,7 +1274,7 @@ class Home extends React.Component {
{
querySearch,
},
- () => { }
+ () => {}
);
};
// 结束时间
@@ -1317,46 +1337,46 @@ class Home extends React.Component {
>
@@ -1381,61 +1401,61 @@ class Home extends React.Component {
>
+
+
+
+
+
+
+
+
+
+
+
@@ -1465,7 +1485,7 @@ class Home extends React.Component {
}}
>
*/}