From 70f5a1396ad7d0a9791dec3153a0a4e604ed00bd Mon Sep 17 00:00:00 2001 From: LGDHuaOPER Date: Mon, 21 Jan 2019 18:35:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(comp-opericon,=20comp-projectanalysis):=20?= =?UTF-8?q?=E6=9B=B2=E7=BA=BF=E9=80=89=E6=8B=A9=EF=BC=8C=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E3=80=81=E7=AE=A1=E7=90=86=E5=91=98=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加:工程分析主页面曲线选择功能;增加:个人账号、管理员下拉菜单选择 --- README.md | 1 + app/component/common/OperIcon.jsx | 34 ++++++++++- app/component/projectAnalysis/Index.jsx | 81 ++++++++++++++++++++++++- 3 files changed, 110 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f9421ba..88f55e0 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,7 @@ data_analysis-React - `2019/01/21` - 版本回退:删除V1.0.0,回退至`1d3ba909a7fcc10aeb404f5b872151c8457c7d37` - 新分支:V1.0.0 + - 增加:工程分析主页面曲线选择功能;增加:个人账号、管理员下拉菜单选择 ## 生产环境依赖或第三方库 - `antd` `3.12.1` diff --git a/app/component/common/OperIcon.jsx b/app/component/common/OperIcon.jsx index 1893a85..db8270e 100644 --- a/app/component/common/OperIcon.jsx +++ b/app/component/common/OperIcon.jsx @@ -1,10 +1,34 @@ import React from 'react'; -import { Icon, Row, Col, Divider, Input } from 'antd'; +import { Icon, Row, Col, Divider, Input, Menu, Dropdown } from 'antd'; import _ from 'lodash'; import myLifeCircle from '../../public/js/myLifeCircle'; import eventProxy from '../../public/js/eventProxy'; const Search = Input.Search; +const menu = ( + + + Admin + + } + > + + + 个人账号 + + + + + + + 管理员 + + + +); class OperIcon extends React.Component { /* @@ -74,7 +98,9 @@ class OperIcon extends React.Component { - + + + @@ -88,7 +114,9 @@ class OperIcon extends React.Component { return ( - + + + diff --git a/app/component/projectAnalysis/Index.jsx b/app/component/projectAnalysis/Index.jsx index 9d1ab37..70236f1 100644 --- a/app/component/projectAnalysis/Index.jsx +++ b/app/component/projectAnalysis/Index.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Breadcrumb } from 'antd'; +import { Breadcrumb, Collapse, List, Tag } from 'antd'; import _ from 'lodash'; import dayjs from 'dayjs'; // import relativeTime from 'dayjs/plugin/relativeTime'; @@ -13,6 +13,8 @@ import DataTable from '../dataTable/Index'; import '../../public/css/libs/react-split-pane.css'; import '../../public/css/projectAnalysis.pcss'; +const Panel = Collapse.Panel; + const routes = [ { path: 'index', @@ -30,6 +32,34 @@ const routes = [ const allTableData = _.cloneDeep(mockData.tableData); const allKeys = _.cloneDeep(mockData.allKeys); +const dataSource = { + DC: [ + { + title: 'ID-VD', + description: 'DC之ID-VD' + }, + { + title: 'ID-VG', + description: 'DC之ID-VG' + } + ], + RTP: [ + { + title: 'BTI', + description: 'RTP之BTI' + }, + { + title: 'HCI', + description: 'RTP之HCI' + } + ], + 'RF-S2P': [ + { + title: 'SP2', + description: 'RF-S2P之SP2' + } + ] +}; myLifeCircle.setBaseOptions({ 'getDerivedStateFromProps.componentLastProps': 'componentLastProps' @@ -53,7 +83,7 @@ class Index extends React.Component { quoteDataTable2: 'projectAnalysis2', outSplitPane: { defaultSize: 250, - minSize: 150, + minSize: 200, maxSize: 300 }, inSplitPane: { @@ -153,7 +183,52 @@ class Index extends React.Component { /> -
1
+
+ + + ( + 待开发]}> + {item.title}} + description={item.description} + /> + + )} + /> + + + ( + 待开发]}> + {item.title}} + description={item.description} + /> + + )} + /> + + + ( + 已开发]}> + {item.title}} + description={item.description} + /> + + )} + /> + + +