Commit bcb56af6 authored by zhengjiangtao's avatar zhengjiangtao

更改自建系统样式

parent 024c1a16
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
width: calc(100% - 800px); width: calc(100% - 800px);
height: 100%; height: 100%;
.paslogy-content { .paslogy-content {
// display: flex; // display: flex;
...@@ -211,20 +211,20 @@ ...@@ -211,20 +211,20 @@
opacity: 1; opacity: 1;
margin-right: 42px; margin-right: 42px;
opacity:1; opacity:1;
} }
} }
.net-topo-content { .net-topo-content {
height: calc(100% - 42px); height: calc(100% - 42px);
.topology-net { .topology-net {
canvas { canvas {
outline: none; outline: none;
} }
.tooltip-content { .tooltip-content {
width: 200px; width: 200px;
background: #345fa6; background: #345fa6;
...@@ -232,18 +232,18 @@ ...@@ -232,18 +232,18 @@
opacity: 1; opacity: 1;
border-radius: 7px; border-radius: 7px;
padding: 22px 24px; padding: 22px 24px;
.tooltip-item { .tooltip-item {
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
font-size: 13px; font-size: 13px;
font-weight: bold; font-weight: bold;
color: white; color: white;
.item-name { .item-name {
display: inline-block; display: inline-block;
} }
.item-value { .item-value {
display: inline-block; display: inline-block;
padding-left: 10px; padding-left: 10px;
...@@ -305,7 +305,7 @@ ...@@ -305,7 +305,7 @@
.right-content { .right-content {
height: 100%; height: 100%;
.devive-title { .devive-title {
height: 40px; height: 40px;
...@@ -325,45 +325,46 @@ ...@@ -325,45 +325,46 @@
.ant-table-wrapper { .ant-table-wrapper {
padding: 10px; padding: 10px;
width: 500px; width: 500px;
.ant-spin-nested-loading { .ant-spin-nested-loading {
border: 1px solid $core-border-color; border: 1px solid $core-border-color;
border-bottom: 0; border-bottom: 0;
} }
} }
.ant-table { .ant-table {
border-radius: 0; border-radius: 0;
} }
.table-bar { .table-bar {
.ant-table-pagination { .ant-table-pagination {
float: right; float: right;
display: inline; display: inline;
width: 100%;
} }
} }
.ant-table-title { .ant-table-title {
display: none; display: none;
} }
.ant-table-content { .ant-table-content {
border-color: $core-border-color; border-color: $core-border-color;
.ant-table-header { .ant-table-header {
& table { & table {
// margin-right: -17px; // margin-right: -17px;
border: $core-border-color; border: $core-border-color;
} }
} }
.ant-table-body { .ant-table-body {
& table { & table {
border: $core-border-color; border: $core-border-color;
} }
} }
} }
.ant-table-thead { .ant-table-thead {
tr { tr {
th { th {
...@@ -373,7 +374,7 @@ ...@@ -373,7 +374,7 @@
} }
} }
} }
.ant-table-body { .ant-table-body {
tr { tr {
td { td {
...@@ -383,16 +384,16 @@ ...@@ -383,16 +384,16 @@
} }
} }
} }
.ant-table-placeholder { .ant-table-placeholder {
color: $biz-table-font-color; color: $biz-table-font-color;
background: $content-color;//rgba(40, 40, 40, 1); background: $content-color;//rgba(40, 40, 40, 1);
} }
.highlight-row { .highlight-row {
background: #ecf6fd; background: #ecf6fd;
} }
.ant-pagination-item { .ant-pagination-item {
height: 25px; height: 25px;
min-width: 25px; min-width: 25px;
...@@ -400,16 +401,16 @@ ...@@ -400,16 +401,16 @@
line-height: 25px; line-height: 25px;
background: $core-border-color;//#333; background: $core-border-color;//#333;
border-radius: 6px; border-radius: 6px;
a { a {
color: $biz-table-font-color; color: $biz-table-font-color;
} }
} }
.ant-pagination-total-text { .ant-pagination-total-text {
color: $biz-table-font-color; color: $biz-table-font-color;
} }
.ant-pagination-prev { .ant-pagination-prev {
height: 25px; height: 25px;
min-width: 25px; min-width: 25px;
...@@ -417,14 +418,14 @@ ...@@ -417,14 +418,14 @@
line-height: 25px; line-height: 25px;
background: $core-border-color;//#333; background: $core-border-color;//#333;
border-radius: 6px; border-radius: 6px;
::after { ::after {
height: 25px; height: 25px;
line-height: 25px; line-height: 25px;
color: $biz-table-font-color; color: $biz-table-font-color;
} }
} }
.ant-pagination-item-active { .ant-pagination-item-active {
height: 25px; height: 25px;
min-width: 25px; min-width: 25px;
...@@ -432,12 +433,12 @@ ...@@ -432,12 +433,12 @@
line-height: 25px; line-height: 25px;
background: $core-color;//#151515; background: $core-color;//#151515;
border-radius: 6px; border-radius: 6px;
a { a {
color: white; color: white;
} }
} }
.ant-pagination-next { .ant-pagination-next {
height: 25px; height: 25px;
min-width: 25px; min-width: 25px;
...@@ -445,23 +446,25 @@ ...@@ -445,23 +446,25 @@
line-height: 25px; line-height: 25px;
background: $core-border-color;//#333; background: $core-border-color;//#333;
border-radius: 6px; border-radius: 6px;
::after { ::after {
height: 25px; height: 25px;
line-height: 25px; line-height: 25px;
color: $biz-table-font-color; color: $biz-table-font-color;
} }
} }
.ant-pagination-options { .ant-pagination-options {
margin-top: 5px; margin-top: -12%;
margin-left: 88%;
.ant-select-selection { .ant-select-selection {
height: 25px; height: 25px;
color: $biz-table-font-color; color: $biz-table-font-color;
background: $biz-title-color; background: $biz-title-color;
border-color: $core-border-color; border-color: $core-border-color;
.ant-select-arrow { .ant-select-arrow {
color: $biz-table-font-color; color: $biz-table-font-color;
} }
...@@ -474,5 +477,5 @@ ...@@ -474,5 +477,5 @@
display: none; display: none;
} }
} }
...@@ -11,7 +11,7 @@ import AmosGridTable from './../../component/table/table/AmosGridTable'; ...@@ -11,7 +11,7 @@ import AmosGridTable from './../../component/table/table/AmosGridTable';
import SysWsURL from './../../../consts/wsUrlConsts'; import SysWsURL from './../../../consts/wsUrlConsts';
import { getTypeBySystem } from './../../bank/financialCityLan/conf'; import { getTypeBySystem } from './../../bank/financialCityLan/conf';
const checkListColumns = (self) => { const checkListColumns = self => {
return [ return [
{ {
title: '时间', title: '时间',
...@@ -26,9 +26,10 @@ const checkListColumns = (self) => { ...@@ -26,9 +26,10 @@ const checkListColumns = (self) => {
} else { } else {
font.innerText = text; font.innerText = text;
} }
return <div dangerouslySetInnerHTML={{ __html: font.outerHTML }} ></div> return <div dangerouslySetInnerHTML={{ __html: font.outerHTML }}></div>;
} }
}, { },
{
title: '设备名称', title: '设备名称',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
...@@ -41,9 +42,10 @@ const checkListColumns = (self) => { ...@@ -41,9 +42,10 @@ const checkListColumns = (self) => {
} else { } else {
font.innerText = text; font.innerText = text;
} }
return <div dangerouslySetInnerHTML={{ __html: font.outerHTML }} ></div> return <div dangerouslySetInnerHTML={{ __html: font.outerHTML }}></div>;
} }
}, { },
{
title: 'ping结果', title: 'ping结果',
dataIndex: 'deviceStatus', dataIndex: 'deviceStatus',
key: 'deviceStatus', key: 'deviceStatus',
...@@ -61,20 +63,18 @@ const checkListColumns = (self) => { ...@@ -61,20 +63,18 @@ const checkListColumns = (self) => {
font.style.color = 'red'; font.style.color = 'red';
p.append(font); p.append(font);
} }
return <div dangerouslySetInnerHTML={{ __html: p.outerHTML }} ></div> return <div dangerouslySetInnerHTML={{ __html: p.outerHTML }}></div>;
} }
} }
]; ];
}; };
//偏移 //偏移
const offsetHeight = 110; const offsetHeight = 110;
const defaultHeight = 450; const defaultHeight = 450;
const type = getTypeBySystem('SelfSupport'); const type = getTypeBySystem('SelfSupport');
class SelfSupport extends Component { class SelfSupport extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.pageConfig = { this.pageConfig = {
...@@ -112,16 +112,14 @@ class SelfSupport extends Component { ...@@ -112,16 +112,14 @@ class SelfSupport extends Component {
this.updateTopologyData = {}; this.updateTopologyData = {};
this.mapView = true; this.mapView = true;
} }
componentWillMount() { componentWillMount() {}
}
// 数据初始化 // 数据初始化
// eslint-disable-next-line react/sort-comp // eslint-disable-next-line react/sort-comp
initData = () => { initData = () => {
let expandedKeysData = []; let expandedKeysData = [];
getTopoTreeByTypeAction(type).then(data => { getTopoTreeByTypeAction(type).then(data => {
if(data.length > 0){ if (data.length > 0) {
data.map(item => { data.map(item => {
expandedKeysData.push(item.id); expandedKeysData.push(item.id);
}); });
...@@ -142,9 +140,8 @@ class SelfSupport extends Component { ...@@ -142,9 +140,8 @@ class SelfSupport extends Component {
pHeight: this.getPanelHeight() pHeight: this.getPanelHeight()
}); });
} }
}); });
} };
componentDidMount() { componentDidMount() {
this.initData(); this.initData();
...@@ -156,11 +153,9 @@ class SelfSupport extends Component { ...@@ -156,11 +153,9 @@ class SelfSupport extends Component {
return (tableLocation !== undefined ? tableLocation.height - offsetHeight : defaultHeight) - 30; return (tableLocation !== undefined ? tableLocation.height - offsetHeight : defaultHeight) - 30;
}; };
// 拓扑图数据初始化 // 拓扑图数据初始化
initTopologyData = (id, value = '') => { initTopologyData = (id, value = '') => {
getNodesByTypeAndTreeIdAction(type,id).then(data => { getNodesByTypeAndTreeIdAction(type, id).then(data => {
if (value === 'refresh') { if (value === 'refresh') {
message.success('拓扑图刷新成功!'); message.success('拓扑图刷新成功!');
} }
...@@ -171,25 +166,22 @@ class SelfSupport extends Component { ...@@ -171,25 +166,22 @@ class SelfSupport extends Component {
}); });
}); });
let tatableDataXianshi =this.state.tableDataXianshi; let tatableDataXianshi = this.state.tableDataXianshi;
if(true === tatableDataXianshi){ if (true === tatableDataXianshi) {
getDeivceListAction(0, 10, null).then(data => { getDeivceListAction(0, 10, null).then(data => {
// console.log('表格刷新成功!'); // console.log('表格刷新成功!');
this.setState({ tableData: data.content, totalCount: data.totalElements }); this.setState({ tableData: data.content, totalCount: data.totalElements });
}); });
} }
};
}
/** /**
* 获取表格所选则的行数据 * 获取表格所选则的行数据
*/ */
getSelectedRows = (selectedRows, selectedRowKeys) => { getSelectedRows = (selectedRows, selectedRowKeys) => {
this.setState({ selectedRows, selectedRowKeys }); this.setState({ selectedRows, selectedRowKeys });
}; };
// 树选择 // 树选择
onSelect = (selectedKeys, e) => { onSelect = (selectedKeys, e) => {
if (selectedKeys.length && !e.node.props.parent) { if (selectedKeys.length && !e.node.props.parent) {
...@@ -199,45 +191,42 @@ class SelfSupport extends Component { ...@@ -199,45 +191,42 @@ class SelfSupport extends Component {
selectedKeys selectedKeys
}); });
} }
} };
// 树展开 // 树展开
onExpand = (expandedKeys) => { onExpand = expandedKeys => {
this.setState({ this.setState({
expandedKeys, expandedKeys,
autoExpandParent: false autoExpandParent: false
}); });
}; };
queryEquipPage = () => { queryEquipPage = () => {
let tableDataXianshi = this.state.tableDataXianshi; let tableDataXianshi = this.state.tableDataXianshi;
if (true === tableDataXianshi ){ if (true === tableDataXianshi) {
let pageConfig = this.pageConfig; let pageConfig = this.pageConfig;
let pageNumber = pageConfig.pageNumber - 1; let pageNumber = pageConfig.pageNumber - 1;
let pageSize = pageConfig.pageSize; let pageSize = pageConfig.pageSize;
getDeivceListAction(pageNumber, pageSize, null).then(data => { getDeivceListAction(pageNumber, pageSize, null).then(data => {
this.setState({ tableData: data.content, totalCount: data.totalElements }); this.setState({ tableData: data.content, totalCount: data.totalElements });
}); });
} else { } else {
this.setState({ tableData:[], totalCount: 0 }); this.setState({ tableData: [], totalCount: 0 });
} }
};
}
// 选择节点 // 选择节点
nodeSelectionChanged = (e) => { nodeSelectionChanged = e => {
// console.log('e',e); // console.log('e',e);
if (e.isSelected) { } if (e.isSelected) {
} }
};
// 节点数据改变 // 节点数据改变
nodeChange = (e) => { nodeChange = e => {
// console.log(e.model.toJson()); // console.log(e.model.toJson());
this.updateTopologyData = JSON.parse(e.model.toJson()); this.updateTopologyData = JSON.parse(e.model.toJson());
} };
// 保存节点数据 // 保存节点数据
saveTopologyData = () => { saveTopologyData = () => {
...@@ -248,14 +237,14 @@ class SelfSupport extends Component { ...@@ -248,14 +237,14 @@ class SelfSupport extends Component {
nodeData: nodeDataArray, nodeData: nodeDataArray,
linkData: linkDataArray linkData: linkDataArray
}; };
saveNodesByTypeUrlAction(type,params).then(data => { saveNodesByTypeUrlAction(type, params).then(data => {
message.success('拓扑图保存成功!'); message.success('拓扑图保存成功!');
}); });
} };
/** /**
* 分页设置参数 * 分页设置参数
*/ */
setPageConfig = ({ pageSize, current }) => { setPageConfig = ({ pageSize, current }) => {
if (pageSize !== undefined) { if (pageSize !== undefined) {
this.pageConfig.pageSize = pageSize; this.pageConfig.pageSize = pageSize;
...@@ -265,8 +254,8 @@ class SelfSupport extends Component { ...@@ -265,8 +254,8 @@ class SelfSupport extends Component {
}; };
/** /**
* 获取表格刷新方法 * 获取表格刷新方法
*/ */
reload = r => { reload = r => {
this.setState( this.setState(
{ {
...@@ -283,10 +272,10 @@ class SelfSupport extends Component { ...@@ -283,10 +272,10 @@ class SelfSupport extends Component {
refreshTopologyData = () => { refreshTopologyData = () => {
const { selectedKeys } = this.state; const { selectedKeys } = this.state;
this.initTopologyData(selectedKeys[0], 'refresh'); this.initTopologyData(selectedKeys[0], 'refresh');
} };
// 视图切换 // 视图切换
toggleView = (value) => { toggleView = value => {
if (value === 'left') { if (value === 'left') {
this.setState({ this.setState({
isTreeDisplay: true, isTreeDisplay: true,
...@@ -304,14 +293,13 @@ class SelfSupport extends Component { ...@@ -304,14 +293,13 @@ class SelfSupport extends Component {
//拓扑图刷新 //拓扑图刷新
const { selectedKeys } = this.state; const { selectedKeys } = this.state;
this.initTopologyData(selectedKeys[0], ''); this.initTopologyData(selectedKeys[0], '');
} };
//webSocket 接收消息 //webSocket 接收消息
handleData = (data) => { handleData = data => {
const { selectedKeys } = this.state; const { selectedKeys } = this.state;
this.initTopologyData(selectedKeys[0], ''); this.initTopologyData(selectedKeys[0], '');
} };
render() { render() {
const { treeData, selectedKeys, expandedKeys, isTreeDisplay, totalCount, selectedRowKeys, pagination, isChecked } = this.state; const { treeData, selectedKeys, expandedKeys, isTreeDisplay, totalCount, selectedRowKeys, pagination, isChecked } = this.state;
...@@ -331,13 +319,7 @@ class SelfSupport extends Component { ...@@ -331,13 +319,7 @@ class SelfSupport extends Component {
console.log(topologyData); console.log(topologyData);
return ( return (
<div className="self-wrapper"> <div className="self-wrapper">
<AmosWebSocket <AmosWebSocket ref={node => (this.aws = node)} url={SysWsURL.selfURI} onMessage={this.handleData} reconnect debug />
ref={node => this.aws = node}
url={SysWsURL.selfURI}
onMessage={this.handleData}
reconnect
debug
/>
<div className="self-header"> <div className="self-header">
<div className="self-view"> <div className="self-view">
<div className={classnames('left-view', { 'left-active-view': activeView === 'left' })}> <div className={classnames('left-view', { 'left-active-view': activeView === 'left' })}>
...@@ -357,27 +339,20 @@ class SelfSupport extends Component { ...@@ -357,27 +339,20 @@ class SelfSupport extends Component {
</div> </div>
</div> </div>
<div className="self-content"> <div className="self-content">
{<div className={classnames({ 'left-content': isTreeDisplay, 'left-content-close': !isTreeDisplay })} > {
<div className={classnames({ 'left-content': isTreeDisplay, 'left-content-close': !isTreeDisplay })}>
<TreeComponent <TreeComponent
treeData={treeData} treeData={treeData}
//treeData={moniTreeData} //treeData={moniTreeData}
selectedKeys={selectedKeys} selectedKeys={selectedKeys}
expandedKeys={expandedKeys} expandedKeys={expandedKeys}
// onSelect={this.onSelect} // onSelect={this.onSelect}
onExpand={this.onExpand} onExpand={this.onExpand}
/> />
</div>} </div>
}
<div className={`middle-content ${isTreeDisplay && isTableDisplay ? '' : 'only-middle'}`}> <div className={`middle-content ${isTreeDisplay && isTableDisplay ? '' : 'only-middle'}`}>
<div className="paslogy-content"> <div className="paslogy-content">
<div className="middle-content-div">
<div className="content-left">
<div className="box">西安中心</div>
</div>
<div className="content-right">
<div className="box">咸阳中心</div>
</div>
</div>
<div className="net-topo-content"> <div className="net-topo-content">
<TopologyComponent <TopologyComponent
topologyData={topologyData} topologyData={topologyData}
...@@ -389,13 +364,9 @@ class SelfSupport extends Component { ...@@ -389,13 +364,9 @@ class SelfSupport extends Component {
</div> </div>
</div> </div>
<div className={classnames({ 'right-content': isTableDisplay, 'right-content-close': !isTableDisplay })}> <div className={classnames({ 'right-content': isTableDisplay, 'right-content-close': !isTableDisplay })}>
<div className="devive-title"> <div className="devive-title">日志</div>
日志 <div className="device-lists" ref={node => (this.tableNode = node)}>
</div>
<div className="device-lists" ref={node => this.tableNode = node}>
<AmosGridTable <AmosGridTable
columns={checkListColumns(this)} columns={checkListColumns(this)}
callBack={this.reload} callBack={this.reload}
...@@ -421,8 +392,6 @@ class SelfSupport extends Component { ...@@ -421,8 +392,6 @@ class SelfSupport extends Component {
} }
} }
SelfSupport.propTypes = { SelfSupport.propTypes = {};
};
export default SelfSupport; export default SelfSupport;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment