Commit 9c3c23f1 authored by 万伟's avatar 万伟

Merge branch 'developer' of http://172.16.10.76/station/station-elec-manage-view into developer

parents 2ba129e8 db3fa24f
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
"amos-build": "^3.x", "amos-build": "^3.x",
"amos-core": "^2.0.27", "amos-core": "^2.0.27",
"amos-framework": "^1.0.35", "amos-framework": "^1.0.35",
"amos-pluggable": "^1.0.6",
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"eslint-config-ray": "^1.0.25", "eslint-config-ray": "^1.0.25",
"mockjs": "^1.0.1-beta3", "mockjs": "^1.0.1-beta3",
......
import * as endConf from 'amos-processor/lib/config/endconf';
import formatUrl from 'amos-processor/lib/utils/urlFormat';
import { Store } from 'amos-tool';
import SysConsts from 'amos-processor/lib/config/consts';
const lsTool = Store.lsTool;
const completePrefix = endConf.completePrefix;
const AmosConfig = endConf.AmosConfig;
const baseURI = AmosConfig.wsURI.baseURI;
const view3dURI = AmosConfig.wsURI.view3dURI;
const getToken = () => {
return lsTool.read(SysConsts.token);
};
export default {
rulews: completePrefix(view3dURI, 'rule.ws?token={token}'),
view3dws: completePrefix(view3dURI, 'view3d.ws?token={token}'),
viewIndexws: completePrefix(baseURI, '3dViewMessage')
};
export const completeToken = (url) => {
const token = getToken();
const result = formatUrl(url, { token });
return result;
};
...@@ -9,6 +9,11 @@ const AsyncSituation = props => <AsyncLoader load={import('../view/biz/duty/situ ...@@ -9,6 +9,11 @@ const AsyncSituation = props => <AsyncLoader load={import('../view/biz/duty/situ
const AsyncRegulate = props => <AsyncLoader load={import('../view/monitor/regulate')} componentProps={props} />; const AsyncRegulate = props => <AsyncLoader load={import('../view/monitor/regulate')} componentProps={props} />;
const AsyncBills = props => <AsyncLoader load={import('../view/biz/regulate/bills')} componentProps={props} />; const AsyncBills = props => <AsyncLoader load={import('../view/biz/regulate/bills')} componentProps={props} />;
const AsyncRootBizView = props => <AsyncLoader load={import('./../view/biz/index')} componentProps={props} />; const AsyncRootBizView = props => <AsyncLoader load={import('./../view/biz/index')} componentProps={props} />;
const AsyncSafetyTraining = props => <AsyncLoader load={import('../view/monitor/safetyManage/index')} componentProps={props} />;
const AsyncDaliyTraining = props => <AsyncLoader load={import('../view/monitor/dailyTrain/index')} componentProps={props} />;
const AsyncEquipmentMaintain = props => <AsyncLoader load={import('../view/monitor/equipmentMaintain/index')} componentProps={props} />;
const AsyncSafetyInspection = props => <AsyncLoader load={import('../view/monitor/safetyInspection/index')} componentProps={props} />;
// const AsyncRegionList = props => <AsyncLoader load={import('./../view/common/region/index')} componentProps={props} />; // const AsyncRegionList = props => <AsyncLoader load={import('./../view/common/region/index')} componentProps={props} />;
const Routes = { const Routes = {
...@@ -16,11 +21,19 @@ const Routes = { ...@@ -16,11 +21,19 @@ const Routes = {
duty: AsyncDuty, duty: AsyncDuty,
situation: AsyncSituation, situation: AsyncSituation,
regulate: AsyncRegulate, regulate: AsyncRegulate,
bills: AsyncBills bills: AsyncBills,
safetyTraining: AsyncSafetyTraining,
dailyTrain:AsyncDaliyTraining,
equipmentMaintain:AsyncEquipmentMaintain,
safetyInspection:AsyncSafetyInspection
}; };
export const businessRouts = [ export const businessRouts = [
{ path: 'situation',group: 'biz',component: AsyncSituation, childRoutes: [] }, { path: 'situation',group: 'biz',component: AsyncSituation, childRoutes: [] },
{ path: 'bills',group: 'biz',component: AsyncBills, childRoutes: [] } { path: 'safetyTraining',group: 'biz',component: AsyncSafetyTraining, childRoutes: [] },
{ path: 'bills',group: 'biz',component: AsyncBills, childRoutes: [] },
{ path: 'dailyTrain',group: 'biz',component: AsyncDaliyTraining, childRoutes: [] },
{ path: 'equipmentMaintain',group: 'biz',component: AsyncEquipmentMaintain, childRoutes: [] },
{ path: 'safetyInspection',group: 'biz',component: AsyncSafetyInspection, childRoutes: [] }
]; ];
const pageCompontent = key => { const pageCompontent = key => {
return Routes[key] || AsyncEmptyPage; return Routes[key] || AsyncEmptyPage;
......
...@@ -6,17 +6,29 @@ import Regulate from '../view/monitor/regulate'; ...@@ -6,17 +6,29 @@ import Regulate from '../view/monitor/regulate';
import Bills from '../view/biz/regulate/bills'; import Bills from '../view/biz/regulate/bills';
import RootBizView from './../view/biz/index'; import RootBizView from './../view/biz/index';
import EmptyPage from './../view/common/emptyPage/EmptyPage'; import EmptyPage from './../view/common/emptyPage/EmptyPage';
import SafetyTraining from './../view/monitor/safetyManage/index';
import DaliyTraining from './../view/monitor/dailyTrain/index';
import EquipmentMaintain from './../view/monitor/equipmentMaintain/index';
import SafetyInspection from './../view/monitor/safetyInspection/index';
const Routes = { const Routes = {
main: RootView, main: RootView,
duty: Duty, duty: Duty,
situation: Situation, situation: Situation,
regulate: Regulate, regulate: Regulate,
bills: Bills bills: Bills,
safetyTraining:SafetyTraining,
dailyTrain:DaliyTraining,
equipmentMaintain:EquipmentMaintain,
safetyInspection:SafetyInspection
}; };
export const businessRouts = [ export const businessRouts = [
{ path: 'situation',group: 'biz',component: Situation, childRoutes: [] }, { path: 'situation',group: 'biz',component: Situation, childRoutes: [] },
{ path: 'bills',group: 'biz',component: Bills, childRoutes: [] } { path: 'bills',group: 'biz',component: Bills, childRoutes: [] },
{ path: 'safetyTraining',group: 'biz',component: SafetyTraining, childRoutes: [] },
{ path: 'dailyTrain',group: 'biz',component: DaliyTraining, childRoutes: [] },
{ path: 'equipmentMaintain',group: 'biz',component: EquipmentMaintain, childRoutes: [] },
{ path: 'safetyInspection',group: 'biz',component: SafetyInspection, childRoutes: [] }
]; ];
const pageCompontent = key => { const pageCompontent = key => {
return Routes[key] || EmptyPage; return Routes[key] || EmptyPage;
......
...@@ -733,98 +733,98 @@ a { ...@@ -733,98 +733,98 @@ a {
} }
} }
*, // *,
*::before, // *::before,
*::after { // *::after {
padding: 0; // padding: 0;
margin: 0; // margin: 0;
box-sizing: inherit; // box-sizing: inherit;
} // }
.amos-modal-container { // .amos-modal-container {
// width: 50% !important; // // width: 50% !important;
position: relative; // position: relative;
left: 0 !important; // left: 0 !important;
margin: 0 auto; // margin: 0 auto;
background: rgba(12, 73, 126, 1); // background: rgba(12, 73, 126, 1);
box-shadow: none; // box-shadow: none;
.ant-select-selection--single { // .ant-select-selection--single {
height: 36px; // height: 36px;
} // }
.ant-input { // .ant-input {
height: 36px; // height: 36px;
} // }
} // }
.amos-modal-close { // .amos-modal-close {
color: #ec0000 !important; // color: #ec0000 !important;
} // }
.amos-modal-close-x { // .amos-modal-close-x {
width: 0.56rem; // width: 0.56rem;
height: 0.56rem; // height: 0.56rem;
font-size: 0.24rem !important; // font-size: 0.24rem !important;
line-height: 0.56rem; // line-height: 0.56rem;
} // }
.amos-modal-content { // .amos-modal-content {
max-height: 4.2rem; // max-height: 4.2rem;
padding: 0.2rem; // padding: 0.2rem;
color: #fff; // color: #fff;
font-size: 0.16rem; // font-size: 0.16rem;
} // }
.amos-modal-header { // .amos-modal-header {
padding: 0.12rem 0.24rem; // padding: 0.12rem 0.24rem;
color: #fff; // color: #fff;
border: none; // border: none;
height: 0.56rem; // height: 0.56rem;
background: linear-gradient(180deg,rgba(154,203,251,0.24) 0%,rgba(225,238,255,0.36) 54%,rgba(157,183,223,0.1) 54%,rgba(63,117,209,0) 100%); // background: linear-gradient(180deg,rgba(154,203,251,0.24) 0%,rgba(225,238,255,0.36) 54%,rgba(157,183,223,0.1) 54%,rgba(63,117,209,0) 100%);
box-shadow: inset 0px 0px 18px 0px rgba(111,194,226,0.67); // box-shadow: inset 0px 0px 18px 0px rgba(111,194,226,0.67);
border-radius: 4px 4px 0px 0px; // border-radius: 4px 4px 0px 0px;
.amos-modal-title { // .amos-modal-title {
color: #307fdd; // color: #307fdd;
text-align: center; // text-align: center;
} // }
} // }
.amos-modal-footer { // .amos-modal-footer {
padding: 0 0.12rem; // padding: 0 0.12rem;
color: #307fdd; // color: #307fdd;
// background: rgba(7, 17, 35, 0.9) !important; // // background: rgba(7, 17, 35, 0.9) !important;
// border: 1px solid #1274cf; // // border: 1px solid #1274cf;
font-size: 0.16rem; // font-size: 0.16rem;
border: none; // border: none;
.detail-footer { // .detail-footer {
padding: 0.12rem 0; // padding: 0.12rem 0;
border-top: 1px solid #6FC2E2; // border-top: 1px solid #6FC2E2;
} // }
.amos-btn { // .amos-btn {
height: 0.336rem; // height: 0.336rem;
padding: 0 0.216rem; // padding: 0 0.216rem;
margin-left: 0.096rem; // margin-left: 0.096rem;
i[class*='icon'] { // i[class*='icon'] {
margin-right: 0.036rem; // margin-right: 0.036rem;
} // }
} // }
} // }
.ant-calendar-picker-input { // .ant-calendar-picker-input {
color: #5cc1e3; // color: #5cc1e3;
background: #061f3b; // background: #061f3b;
border: 0px; // border: 0px;
} // }
.amos-modal-wrap { // .amos-modal-wrap {
.select-scroll-wrapper { // .select-scroll-wrapper {
display: inline-flex !important; // display: inline-flex !important;
// width: 130px !important; // // width: 130px !important;
// margin-left: 10px; // // margin-left: 10px;
} // }
} // }
.ant-table { .ant-table {
width: 100%; width: 100%;
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
height: pxToRem(42px); height: pxToRem(42px);
width: pxToRem(176.16px); width: pxToRem(176.16px);
padding-top: pxToRem(6px); padding-top: pxToRem(6px);
display: contents;
} }
.amos-nav-item { .amos-nav-item {
......
.class-Situation{
// background-image: url('../../assets/dailyDuties/bg.png');
// background-repeat: no-repeat;
// background-size: cover;
// background-attachment: fixed;
// top:0;
// left:0;
// right:0;
// bottom: 0;
// background-color: #110C30;
// position: relative;
// height: 100%;
// width:100%;
}
.daily-duties-content{ .daily-duties-content{
position:absolute; position:absolute;
left:0; left:0;
top:68px; top:pxToRem(68px);
right:0; right:0;
bottom:0; //left,top,right,bottom都为0,充满真个页面 bottom:0; //left,top,right,bottom都为0,充满真个页面
overflow-y:auto; overflow-y:auto;
...@@ -24,21 +10,21 @@ ...@@ -24,21 +10,21 @@
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
.common-margin{ .common-margin{
margin-top: 19px; margin-top: pxToRem(19px);
} }
.daily-title{ .daily-title{
font-size:20px ; font-size:pxToRem(20px);
color: #ffffff; color: #ffffff;
} }
.daily-title-content{ .daily-title-content{
width:257px; width:pxToRem(257px);
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
} }
.top-ten-content{ .top-ten-content{
padding:30px 30px; padding:pxToRem(30px) pxToRem(30px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
...@@ -49,8 +35,8 @@ ...@@ -49,8 +35,8 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.top-ten-item-middle{ .top-ten-item-middle{
width:208px; width:pxToRem(208px);
height: 16px; height: pxToRem(16px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
...@@ -60,7 +46,7 @@ ...@@ -60,7 +46,7 @@
} }
} }
.top-ten-item-bottom{ .top-ten-item-bottom{
width:36px; width:pxToRem(36px);
display: flex; display: flex;
flex-direction:row; flex-direction:row;
justify-content: flex-end; justify-content: flex-end;
...@@ -74,27 +60,27 @@ ...@@ -74,27 +60,27 @@
.safety-rate-view{ .safety-rate-view{
background-image: url('../../assets/dailyDuties/leftTop.png'); background-image: url('../../assets/dailyDuties/leftTop.png');
background-repeat: no-repeat; background-repeat: no-repeat;
width:412px; width:pxToRem(412px);
height:469px; height:pxToRem(469px);
} }
.growth-statistics-view{ .growth-statistics-view{
background-image: url('../../assets/dailyDuties/leftBottom.png'); background-image: url('../../assets/dailyDuties/leftBottom.png');
background-repeat: no-repeat; background-repeat: no-repeat;
width:411px; width:pxToRem(411px);
height:474px; height:pxToRem(474px);
.growth-content{ .growth-content{
padding:30px 24px; padding:pxToRem(30px) pxToRem(24px);
height: 100%; height: 100%;
.growth-item-header{ .growth-item-header{
font-size: 20px; font-size: pxToRem(20px);
color: #52EDF2; color: #52EDF2;
} }
.growth-item-text{ .growth-item-text{
font-size: 20px; font-size: pxToRem(20px);
color: #ffffff; color: #ffffff;
} }
.growth-item-datatext{ .growth-item-datatext{
font-size: 20px; font-size: pxToRem(20px);
color: #00CACE; color: #00CACE;
} }
.growth-item{ .growth-item{
...@@ -102,10 +88,10 @@ ...@@ -102,10 +88,10 @@
flex-direction: row; flex-direction: row;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
height:42px; height:pxToRem(42px);
width: 362px; width: pxToRem(362px);
background-color:#1C6264 ; background-color:#1C6264 ;
margin-top:5px ; margin-top:pxToRem(5px);
} }
.growth-item:hover{ .growth-item:hover{
background-color:#00B9FF ; background-color:#00B9FF ;
...@@ -116,10 +102,10 @@ ...@@ -116,10 +102,10 @@
.class-Situation .daily-duties-middle{ .class-Situation .daily-duties-middle{
height: 100%; height: 100%;
margin-left: 19px; margin-left: pxToRem(19px);
margin-right: 19px; margin-right: pxToRem(19px);
.statistics-title{ .statistics-title{
font-size: 32px; font-size: pxToRem(32px);
color: #00EEE8; color: #00EEE8;
} }
.statistics-title-content{ .statistics-title-content{
...@@ -131,27 +117,27 @@ ...@@ -131,27 +117,27 @@
.statistics-view{ .statistics-view{
background-image: url('../../assets/dailyDuties/middleTop.png'); background-image: url('../../assets/dailyDuties/middleTop.png');
background-repeat: no-repeat; background-repeat: no-repeat;
width:999px; width:pxToRem(999px);
height:615px; height:pxToRem(615px);
position: relative; position: relative;
.statistics-banner{ .statistics-banner{
position: absolute; position: absolute;
left:95px; left:pxToRem(95px);
right: 95px; right: pxToRem(95px);
top:68px; top:pxToRem(68px);
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
z-index: 2; z-index: 2;
.statistics-banner-content{ .statistics-banner-content{
height: 100px; height: pxToRem(100px);
width:380px; width:pxToRem(380px);
background-color:rgba(28, 98, 100, 0.5) ; background-color:rgba(28, 98, 100, 0.5) ;
border-radius: 5px; border-radius: pxToRem(5px);
.statistics-banner-item{ .statistics-banner-item{
height: 100px; height: pxToRem(100px);
margin-left: 32px; margin-left: pxToRem(32px);
margin-right: 32px; margin-right: pxToRem(32px);
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
...@@ -160,10 +146,10 @@ ...@@ -160,10 +146,10 @@
text-align: center; text-align: center;
.statistics-text-number{ .statistics-text-number{
font-weight: bold; font-weight: bold;
font-size: 35px; font-size: pxToRem(35px);
color:#00EEE8 ; color:#00EEE8 ;
letter-spacing:5px; letter-spacing:pxToRem(5px);
height: 44px; height: pxToRem(44px);
display: flex; display: flex;
flex-direction:row; flex-direction:row;
justify-content: flex-start; justify-content: flex-start;
...@@ -171,13 +157,13 @@ ...@@ -171,13 +157,13 @@
} }
span{ span{
font-weight: bold; font-weight: bold;
font-size: 20px; font-size: pxToRem(20px);
color:#FF0000 ; color:#FF0000 ;
letter-spacing:5px; letter-spacing:pxToRem(5px);
padding-top: 9px; padding-top: pxToRem(9px);
} }
p{ p{
font-size: 14px; font-size: pxToRem(14px);
color:#FFF ; color:#FFF ;
} }
} }
...@@ -188,22 +174,22 @@ ...@@ -188,22 +174,22 @@
.risk-trend-view{ .risk-trend-view{
background-image: url('../../assets/dailyDuties/middleBottom.png'); background-image: url('../../assets/dailyDuties/middleBottom.png');
background-repeat: no-repeat; background-repeat: no-repeat;
width:1002px; width:pxToRem(1002px);
height:325px; height:pxToRem(325px);
position: relative; position: relative;
.buttongroup-style{ .buttongroup-style{
position: absolute; position: absolute;
right:50px; right:pxToRem(50px);
top:56px; top:pxToRem(56px);
z-index:2 ; z-index:2 ;
.button-style{ .button-style{
border-width: 1px; border-width: pxToRem(1px);
border-color: #45FEFE; border-color: #45FEFE;
width:80px width:pxToRem(80px);
} }
} }
.risk-trend-content{ .risk-trend-content{
padding:20px; padding:pxToRem(20px);
width:100%; width:100%;
height: 100%; height: 100%;
} }
...@@ -214,29 +200,29 @@ ...@@ -214,29 +200,29 @@
.risk-failure-view{ .risk-failure-view{
background-image: url('../../assets/dailyDuties/leftTop.png'); background-image: url('../../assets/dailyDuties/leftTop.png');
background-repeat: no-repeat; background-repeat: no-repeat;
width:412px; width:pxToRem(412px);
height:469px; height:pxToRem(469px);
} }
.recent-statistics-view{ .recent-statistics-view{
background-image: url('../../assets/dailyDuties/rightBottom.png'); background-image: url('../../assets/dailyDuties/rightBottom.png');
background-repeat: no-repeat; background-repeat: no-repeat;
width:411px; width:pxToRem(411px);
height:474px; height:pxToRem(474px);
position: relative; position: relative;
.buttongroup-style{ .buttongroup-style{
position: absolute; position: absolute;
right:50px; right:pxToRem(50px);
top:56px; top:pxToRem(56px);
z-index:2 ; z-index:2 ;
.button-style{ .button-style{
border-width: 1px; border-width: pxToRem(1px);
border-color: #45FEFE; border-color: #45FEFE;
width:80px width:pxToRem(80px)
} }
} }
.recent-statistics-content{ .recent-statistics-content{
padding:20px; padding:pxToRem(20px);
width:100%; width:100%;
height: 100%; height: 100%;
} }
......
...@@ -3,3 +3,21 @@ ...@@ -3,3 +3,21 @@
//@import './panelframe.scss'; //@import './panelframe.scss';
@import './monitor/index.scss'; @import './monitor/index.scss';
@import './biz/index.scss'; @import './biz/index.scss';
// 导入amos-antd
@import '~amos-antd/dist/amosantd.css';
// 导入amos-framework
@import '~amos-framework/dist/amosframework.css';
// 导入amos-pro
@import '~amos-pro/dist/amospro.css';
@import '~ray-progress/assets/progress.css';
//安全培训
@import './monitor/safetyTrain.scss';
@import './monitor/table.scss';
//日常训练
@import './monitor/dailyTrain.scss';
//器材保养equipmentMaintain
@import './monitor/equipmentMaintain.scss';
//安全巡检 safetyInspection
@import './monitor/safetyInspection.scss';
.dailyTrain-safety{
position: absolute;
height: 100%;
width: 100%;
background-image: url('/src/assets/safetyManage/bjt.png');
background-repeat: no-repeat;
.dailyTrain-safty-content {
height: 100%;
.dailyTrain-top{
height: 2%;
width: 100%;
}
.dailyTrain-bottom{
height: 93%;
width:100%;
position: relative;
.dailyTrain-bottom-left {
height: 98%;
width: 47%;
position: absolute;
left: 2.6%;
border:2px solid rgba(0,185,255,0.3);
.dailyTrain-bottom-left-content {
height: 100%;
.one-div {
height: 9%;
// border:2px solid blue;
width: 100%;
display: flex;
background: #222b51 !important;
.search-one {
height: 100%;
width: 30%;
position: relative;
text-align: center;
/* vertical-align: middle; */
top: 29%;
.search-one-button{
background-image: url('/src/assets/safetyManage/sousuo.png');
background-repeat: no-repeat !important;
right: 26%;
height: 20px;
position: relative;
width: 20px;
/* margin-top: 10%; */
margin-top: -1%;
float: right;
/* padding-left: 8%; */
top: 11%;
}
.search-one-input{
width: 100%;
.ant-input-affix-wrapper .ant-input-suffix{
position: absolute;
padding-right: 24px;
top: 50%;
transform: translateY(-50%);
line-height: 0;
color: rgba(0, 0, 0, 0.65);
}
.ant-input-affix-wrapper {
padding: 0;
margin: 0;
font-family: "Helvetica Neue For Number", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px;
font-variant: tabular-nums;
line-height: 1.5;
color: rgba(0, 0, 0, 0.65);
list-style: none;
box-sizing: border-box;
position: relative;
display: inline-block;
width: 50;
padding-left: 24px;
padding-right: 24px;
}
.ant-input-search {
.anticon-search {
&::before {
position: relative;
display: inline-block;
background: url('/src/assets/safetyManage/sousuo.png') no-repeat;
width: 20px;
height: 20px;
background-size: 100% 100%;
top: 0px;
content: '' !important;
}
}
}
.ant-input {
// width: 10.7rem;
height: 30px;
// position: relative;
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
// line-height:50px;
color:rgba(225,231,232,1);
-webkit-text-stroke:1 rgba(0,0,0,0.00);
text-stroke:1 rgba(0,0,0,0.00);
opacity:1;
background: rgba(0,185,255,0.3) !important;
border-radius: 17px;
left: 34%;
.anticon:before {
margin-top: 1px;
}
border-color:rgba(0,185,255,0.3)
}
}
}
.search-two {
height: 100%;
width: 30%;
// border:2px solid red;
left: 2%;
position: relative;
top: 29%;
.amos-popover-trigger {
border-color:rgba(0,185,255,0.3);
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
// line-height:50px;
color:rgba(225,231,232,1);
-webkit-text-stroke:1 rgba(0,0,0,0.00);
text-stroke:1 rgba(0,0,0,0.00);
opacity:1;
width: 74%;
}
.aficon-down:before {
position: relative;
display: inline-block;
background: url('/src/assets/safetyManage/xiangxia.png') no-repeat;
width: 20px;
height: 20px;
background-size: 100% 100%;
top: 4px;
content: '' !important;
}
.search-select-style {
background:rgba(0,185,255,0.3);
opacity:1;
border-radius:17px;
background:rgba(0,185,255,0.3);
}
}
.search-three {
position: relative;
height: 100%;
width: 41%;
top: 29%;
margin-left: -3%;
.ant-calendar-picker-input{
background-color: rgba(0,185,255,0.3);
border-color:rgba(0,185,255,0.3)
}
.ant-input {
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
// line-height:50px;
color:rgba(225,231,232,1);
-webkit-text-stroke:1 rgba(0,0,0,0.00);
text-stroke:1 rgba(0,0,0,0.00);
border-radius: 17px;
width: 102%;
}
.ant-calendar-picker-icon:after {
position: relative;
display: inline-block;
background: url('/src/assets/safetyManage/rjd.png') no-repeat;
background-size: 100% 100%;
width: 18px;
height: 20px;
bottom: 4px;
right: -2px;
content: '' !important;
}
.three-font {
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
line-height: 23px;
color:rgba(255,255,255,1);
}
.ant-calendar-picker-icon{
// background-image: url('/src/assets/safetyManage/sousuo.png');
// background-repeat: no-repeat !important;
border-color:rgba(0,185,255,0.3)
}
}
}
.two-div {
height: 91%;
// border:2px solid green;
}
}
}
.dailyTrain-bottom-right {
height: 98%;
width: 47%;
left: 51%;
border:2px solid rgba(0,185,255,0.3);
position: absolute;
.dailyTrain-bottom-right-content {
height: 100%;
.one-div {
height: 9%;
// border:2px solid blue;
width: 100%;
display: flex;
background: #222b51 !important;
.content-font-wenzi {
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
// line-height:50px;
color:rgba(225,231,232,1);
display: inline-block;
margin-top: 4%;
margin-left: 4%;
}
}
.two-div {
height: 91%;
// border:2px solid green;
.ant-table-content {
height: 100%;
//滚动条特殊调整
.ant-table-body {
// max-height: 500px !important ;
overflow-y: scroll !important;
background:transparent!important;
table {
width: 300px;
border-color: transparent !important;
td {
border-color: transparent !important;
}
}
}
}
}
}
}
}
}
}
\ No newline at end of file
.equipmentMaintain-safety{
position: absolute;
height: 100%;
width: 100%;
background-image: url('/src/assets/safetyManage/bjt.png');
background-repeat: no-repeat;
.equipmentMaintain-safty-content {
height: 100%;
.equipmentMaintain-top{
height: 2%;
width: 100%;
}
.equipmentMaintain-bottom{
height: 93%;
width:100%;
position: relative;
.equipmentMaintain-bottom-left {
height: 98%;
width: 47%;
position: absolute;
left: 2.6%;
border:2px solid rgba(0,185,255,0.3);
.equipmentMaintain-bottom-left-content {
height: 100%;
.one-div {
height: 9%;
// border:2px solid blue;
width: 100%;
display: flex;
background: #222b51 !important;
.search-one {
height: 100%;
width: 30%;
position: relative;
text-align: center;
/* vertical-align: middle; */
top: 29%;
left: 34%;
.search-one-button{
background-image: url('/src/assets/safetyManage/sousuo.png');
background-repeat: no-repeat !important;
right: 26%;
height: 20px;
position: relative;
width: 20px;
/* margin-top: 10%; */
margin-top: -1%;
float: right;
/* padding-left: 8%; */
top: 11%;
}
.search-one-input{
width: 100%;
.ant-input-affix-wrapper .ant-input-suffix{
position: absolute;
padding-right: 24px;
top: 50%;
transform: translateY(-50%);
line-height: 0;
color: rgba(0, 0, 0, 0.65);
}
.ant-input-affix-wrapper {
padding: 0;
margin: 0;
font-family: "Helvetica Neue For Number", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px;
font-variant: tabular-nums;
line-height: 1.5;
color: rgba(0, 0, 0, 0.65);
list-style: none;
box-sizing: border-box;
position: relative;
display: inline-block;
width: 50;
padding-left: 24px;
padding-right: 24px;
}
.ant-input-search {
.anticon-search {
&::before {
position: relative;
display: inline-block;
background: url('/src/assets/safetyManage/sousuo.png') no-repeat;
width: 20px;
height: 20px;
background-size: 100% 100%;
top: 0px;
content: '' !important;
}
}
}
.ant-input {
// width: 10.7rem;
height: 30px;
// position: relative;
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
// line-height:50px;
color:rgba(225,231,232,1);
-webkit-text-stroke:1 rgba(0,0,0,0.00);
text-stroke:1 rgba(0,0,0,0.00);
opacity:1;
background: rgba(0,185,255,0.3) !important;
border-radius: 17px;
left: 34%;
.anticon:before {
margin-top: 1px;
}
border-color:rgba(0,185,255,0.3)
}
}
}
.search-two {
height: 100%;
width: 30%;
// border:2px solid red;
left: 2%;
position: relative;
top: 29%;
.amos-popover-trigger {
border-color:rgba(0,185,255,0.3);
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
// line-height:50px;
color:rgba(225,231,232,1);
-webkit-text-stroke:1 rgba(0,0,0,0.00);
text-stroke:1 rgba(0,0,0,0.00);
opacity:1;
width: 74%;
}
.aficon-down:before {
position: relative;
display: inline-block;
background: url('/src/assets/safetyManage/xiangxia.png') no-repeat;
width: 20px;
height: 20px;
background-size: 100% 100%;
top: 4px;
content: '' !important;
}
.search-select-style {
background:rgba(0,185,255,0.3);
opacity:1;
border-radius:17px;
background:rgba(0,185,255,0.3);
}
}
.search-three {
position: relative;
height: 100%;
width: 41%;
top: 29%;
margin-left: -3%;
.ant-calendar-picker-input{
background-color: rgba(0,185,255,0.3);
border-color:rgba(0,185,255,0.3)
}
.ant-input {
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
// line-height:50px;
color:rgba(225,231,232,1);
-webkit-text-stroke:1 rgba(0,0,0,0.00);
text-stroke:1 rgba(0,0,0,0.00);
border-radius: 17px;
width: 102%;
}
.ant-calendar-picker-icon:after {
position: relative;
display: inline-block;
background: url('/src/assets/safetyManage/rjd.png') no-repeat;
background-size: 100% 100%;
width: 18px;
height: 20px;
bottom: 4px;
right: -2px;
content: '' !important;
}
.three-font {
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
line-height: 23px;
color:rgba(255,255,255,1);
}
.ant-calendar-picker-icon{
// background-image: url('/src/assets/safetyManage/sousuo.png');
// background-repeat: no-repeat !important;
border-color:rgba(0,185,255,0.3)
}
}
}
.two-div {
height: 91%;
// border:2px solid green;
}
}
}
.equipmentMaintain-bottom-right {
height: 98%;
width: 47%;
left: 51%;
border:2px solid rgba(0,185,255,0.3);
position: absolute;
.equipmentMaintain-bottom-right-content {
height: 100%;
.one-div {
height: 9%;
// border:2px solid blue;
width: 100%;
display: flex;
background: #222b51 !important;
.content-font-wenzi {
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
// line-height:50px;
color:rgba(225,231,232,1);
display: inline-block;
margin-top: 4%;
margin-left: 4%;
}
}
.two-div {
height: 91%;
// border:2px solid green;
.ant-table-content {
height: 100%;
//滚动条特殊调整
.ant-table-body {
// max-height: 500px !important ;
overflow-y: scroll !important;
background:transparent!important;
table {
width: 300px;
border-color: transparent !important;
td {
border-color: transparent !important;
}
}
}
}
}
}
}
}
}
}
\ No newline at end of file
// .statistical {
// position: absolute;
// height: 100%;
// width: 100%;
.yi{
color:#48E0FF;
}
.er{
color:#F1F10C;
}
.san{
color:#FF8000;
}
.si{
color:#FC2F1E;
}
.ant-calendar {
width: 180px !important;
background-color:#0E7FB4 !important;
}
.souh{
height: 100%;
width: 100%;
// .ant-pagination.mini .ant-pagination-options {
// margin-left: 8px;
// display: none;
// }
.ant-table-pagination {
float:none;
text-align: center !important;
}
.ant-table-thead > tr.ant-table-row-hover > td, .ant-table-tbody > tr.ant-table-row-hover > td, .ant-table-thead > tr:hover > td, .ant-table-tbody > tr:hover > td {
background: rgb(176, 204, 240);
}
.inputxqtable{
height: 90%;
width: 100%;
border:1px solid rgba(23,186,252,1);
.ant-pagination-prev, .ant-pagination-next {
background-color: rgba(23,186,252,1);
}
.ant-table-middle .ant-table-thead > tr > th:not(.ant-table-selection-column), .ant-table-middle .ant-table-tbody > tr:nth-child(even){
background-color: #0E7FB4;
}
::-webkit-scrollbar{
width:4px;
background-color: #0e487c;
}
::-webkit-scrollbar-thumb{
background-color: #4facfa;
}
.ant-table-header{
margin-bottom: -1% !important;
}
.ant-table-content{
max-height: 100% !important;
}
.ant-table-body{
max-height: 340px !important;
overflow-y: auto !important;
}
.ant-table-tbody > tr > td {
border: 0px solid #e9e9e9;
}
.table, td, tr, th {
font-size: 15px;
}
.ant-table-fixed-header > .ant-table-content > .ant-table-scroll > .ant-table-body {
font-size:15px !important;;
font-family:Microsoft YaHei UI !important;;
font-weight:400 !important;;
line-height:14px !important;;
color:rgba(255,255,255,1) !important;;
background: #265673!important;
}
.ant-table table {
text-align: center !important;
}
.ant-table-pagination {
font-size:12px;
font-family:Microsoft YaHei UI;
font-weight:400;
line-height:14px;
color:rgba(255,255,255,1);
}
.ant-select-sm .ant-select-selection__rendered {
line-height: 21px !important;
font-size: 12px;
font-family: Microsoft YaHei UI;
color: rgba(255,255,255,1);
}
.ant-select-selection {
background-color: rgba(23,186,252,1);
}
.ant-table-thead > tr > th{
text-align: center;
background:#265673;
border: 0px solid #265673;
font-size:15px;
font-family:Microsoft YaHei;
color:rgba(255,255,255,1);
}
.ant-table-fixed-header .ant-table-scroll .ant-table-header {
overflow: hidden;
}
.ant-table-bordered .ant-table-header > table, .ant-table-bordered .ant-table-body > table, .ant-table-bordered .ant-table-fixed-left table, .ant-table-bordered .ant-table-fixed-right table {
border: 0px solid #e9e9e9;
}
// .ant-table-middle .ant-table-thead > tr > th:not(.ant-table-selection-column), .ant-table-middle .ant-table-tbody > tr > td {
// padding: 16px 8px;
// }
.ant-table-placeholder {
background: #265673;
}
.ant-table-wrapper{
height: 100%
}
.ant-spin-nested-loading{
height: 100%
}
.ant-spin-container{
height: 100%
}
.ant-.ant-spin-container {
height: 100%
}
.ant-table{
height: 87%
}
}
.sou{
height: 10%;
}
}
.amos-popover-content {
background: rgba(3, 111, 199, 0.842)!important;
border:1px solid rgba(240,242,243,1)!important;
}
.inputxq{
float: left;
width: 24%;
.amos-std-form.amos-std-form-right .amos-std-form-label {
font-family: Microsoft YaHei;
font-weight: 400;
line-height: 26px;
color: rgba(240,242,243,1);
}
.ant-input {
color: rgba(240,242,243,1);
font-family: Microsoft YaHei;
font-weight: 400;
line-height: 26px;
}
.amos-select-title {
color: rgba(240,242,243,1);
font-family: Microsoft YaHei;
font-weight: 400;
line-height: 32px;
}
.amos-select-dropdown {
background-color:rgba(0,185,255,0.3);
opacity:1;
border-radius: 17px;
border: 0 solid #e8e8e8;
line-height: 32px;
}
.amos-std-form-content{
width: 100%;
}
.ant-calendar-picker{
width: 100% !important;
}
.amos-std-form-label {
width: 4em;
}
.ant-input{
background-color:rgba(0,185,255,0.3);
opacity:1;
border-radius: 17px;
border: 0 solid #e8e8e8;
}
}
.inputxq3{
margin-left: 15%;
float: left;
width: 24%;
.amos-std-form-content{
width: 100%;
}
.amos-search{
width: 80%;
}
.amos-search-inner{
background-color:rgba(0,185,255,0.3);
opacity:1;
border-radius: 17px;
height: 34px;
}
.amos-search-inner{
color: rgba(240,242,243,1);
font-family: Microsoft YaHei;
font-weight: 400;
line-height: 26px;
}
}
.inputxq1{
margin-left: 2%;
float: left;
width: 24%;
.amos-std-form-content{
width: 100%;
}
.amos-search{
width: 80%;
}
.amos-search-inner{
background-color:rgba(0,185,255,0.3);
opacity:1;
border-radius: 17px;
height: 34px;
}
.amos-search-inner{
color: rgba(240,242,243,1);
font-family: Microsoft YaHei;
font-weight: 400;
line-height: 26px;
}
}
.risk-model-model99{
.amos-modal-container{
background: rgba(14, 127, 180, 0.29);
height: 70%;
}
.amos-modal-content{
padding: 0.5em;
height: 100%;
}
.amos-modal-header{
background: rgba(14, 127, 180, 0.29);
padding: 0.3em 0.3em;
border-bottom: 0px solid #e5e5e5;
.amos-modal-title{
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
margin-left: 10px;
height: 100%;
line-height:20px;
color:rgba(255,255,255,1);
-webkit-text-stroke:1 rgba(0,0,0,0.00);
opacity:1;
}
}
.amos-modal-close-x{
width: 100%;
height: 100%;
font-size: 20px;
font-style: normal;
line-height: 24px;
margin-right: 13px;
margin-top: 4px;
background-color:rgba(252, 47, 30, 1) ;
}
}
.statistical-left {
position: absolute;
height: 86.2%;
width: 18.7%;
float: left;
margin-left: 1.9%;
z-index: 1;
top: 8.51%;
.AlarmControl{
margin-top: 10%;
height: 29.9%;
width: 100%;
background-image: url('/src/assets/homePage/3120.png');
background-repeat: no-repeat;
background-size: 100% 100%;
-moz-background-size: 100% 100%;
.AlarmControl_1{
height: 10%;
width: 100%;
// border:1px solid rgba(23,186,252,1);
.AlarmControl_1_1{
width:50%;
margin-left: 9.4%;
height:100px;
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
line-height:24px;
color:rgba(255,255,255,1);
text-shadow:0px 0px 4px rgba(9,35,61,1);
opacity:1;
}
}
.AlarmControl_2{
height: 90%;
width: 100%;
.AlarmControl_2_1{
width:9%;
float: right;
height:14%;
//border:1px solid rgba(23,186,252,1);
}
.AlarmControl_2_2{
width:100%;
float: right;
height:87%;
// border:1px solid rgba(23,186,252,1);
.AlarmControl_2_2_1{
width:50%;
float: right;
height:100%;
// border:1px solid rgba(23,186,252,1);
.AlarmControl8{
margin-top:32% ;
}
.AlarmControl2{
width:100%;
float: right;
height:20%;
// border:1px solid rgba(23,186,252,1);
.AlarmControl2_2{
float: right;
margin-top:5% ;
width:10px;
height:10px;
background:rgba(243,12,12,1);
border-radius:50%;
opacity:1;
}
.AlarmControl2_3{
float: right;
margin-top:5% ;
width:10px;
height:10px;
background:rgba(219,121,23,1);
border-radius:50%;
opacity:1;
}
.AlarmControl2_4{
float: right;
margin-top:5% ;
width:10px;
height:10px;
background:rgba(209,209,52,1);
border-radius:50%;
opacity:1;
}
.AlarmControl2_1{
height: 100%;
width: 90%;
float: right;
// border:1px solid rgba(23,186,252,1);
.AlarmControl2_12{
float: left;
margin-left: 2%;
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
line-height:20px;
color:rgba(255,255,255,1);
opacity:1;
}
.AlarmControl2_13{
float: left;
margin-left: 2%;
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
line-height:20px;
color:rgba(255,255,255,1);
opacity:1;
}
.AlarmControl2_12{
float: left;
margin-left: 2%;
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
line-height:20px;
color:rgba(255,255,255,1);
opacity:1;
}
.AlarmControl2_13{
float: left;
margin-left: 2%;
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
line-height:20px;
color:rgba(255,255,255,1);
opacity:1;
}
}
}
}
.AlarmControl_2_2_2{
width:50%;
float: right;
height:100%;
//borderborder:1px solid rgba(23,186,252,1);
}
}
}
}
.DangerControl{
margin-top: 10%;
height: 29.9%;
width: 100%;
background-image: url('/src/assets/homePage/3120.png');
background-repeat: no-repeat;
background-size: 100% 100%;
-moz-background-size: 100% 100%;
.DangerControl_1{
height: 10%;
width: 100%;
// border:1px solid rgba(23,186,252,1);
.DangerControl_1_1{
width:50%;
margin-left: 9.4%;
height:100px;
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
line-height:24px;
color:rgba(255,255,255,1);
text-shadow:0px 0px 4px rgba(9,35,61,1);
opacity:1;
}
}
.DangerControl_2{
height: 90%;
width: 100%;
.DangerControl_2_1{
width:9%;
float: right;
height:14%;
// border:1px solid rgba(23,186,252,1);
}
.DangerControl_2_2{
width:100%;
float: right;
height:87%;
//border:1px solid rgba(23,186,252,1);
.DangerControl_2_2_1{
width:50%;
float: right;
height:100%;
// border:1px solid rgba(23,186,252,1);
.AlarmControl8{
margin-top:20% ;
}
.AlarmControl2{
width:100%;
float: right;
height:20%;
// border:1px solid rgba(23,186,252,1);
.AlarmControl2_2{
float: right;
margin-top:5% ;
width:10px;
height:10px;
background:rgba(243,12,12,1);
border-radius:50%;
opacity:1;
}
.AlarmControl2_3{
float: right;
margin-top:5% ;
width:10px;
height:10px;
background:rgba(255,214,0,1);
border-radius:50%;
opacity:1;
}
.AlarmControl2_4{
float: right;
margin-top:5% ;
width:10px;
height:10px;
background:rgba(0,255,238,1);
border-radius:50%;
opacity:1;
}
.AlarmControl2_5{
float: right;
margin-top:5% ;
width:10px;
height:10px;
background:rgba(0,255,238,1);
border-radius:50%;
opacity:1;
}
.AlarmControl2_1{
height: 100%;
width: 90%;
float: right;
// border:1px solid rgba(23,186,252,1);
.AlarmControl2_12{
float: left;
margin-left: 1%;
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
line-height:20px;
color:rgba(255,255,255,1);
opacity:1;
}
.AlarmControl2_13{
float: left;
margin-left: 1%;
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
line-height:20px;
color:rgba(255,255,255,1);
opacity:1;
}
.AlarmControl2_12{
float: left;
margin-left: 1%;
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
line-height:20px;
color:rgba(255,255,255,1);
opacity:1;
}
.AlarmControl2_13{
float: left;
margin-left: 1%;
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
line-height:20px;
color:rgba(255,255,255,1);
opacity:1;
}
}
}
}
.DangerControl_2_2_2{
width:50%;
float: right;
height:100%;
//border:1px solid rgba(23,186,252,1);
}
}
}
}
.RiskControl {
height: 32.6%;
width: 100%;
background-image: url('/src/assets/homePage/3119.png');
background-repeat: no-repeat;
background-size: 100% 100%;
-moz-background-size: 100% 100%;
.RiskControl_1{
height: 10%;
width: 100%;
// border:1px solid rgba(23,186,252,1);
.RiskControl_1_1{
width:50%;
margin-left: 9.4%;
height:100px;
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
line-height:24px;
color:rgba(255,255,255,1);
text-shadow:0px 0px 4px rgba(9,35,61,1);
opacity:1;
}
}
.RiskControl_2{
height: 64%;
width: 100%;
.RiskControl_2_1{
width:9%;
float: right;
height:18%;
//border:1px solid rgba(23,186,252,1);
}
.RiskControl_2_2{
width:100%;
float: right;
height:82%;
// border:1px solid rgba(23,186,252,1);
.RiskControl_2_2_1{
width:50%;
float: right;
height:100%;
// border:1px solid rgba(23,186,252,1);
.RiskControl_2_2_19{
margin-left: 30%;
margin-top: 2%;
height:40%;
.shi{
color:rgba(243,12,12,1);
font-size:22px;
}
.shi1{
color:rgba(243,12,12,1);
}
.shou{
color:rgba(0,255,238,1);
font-size:22px;
}
.shou1{
color:rgba(0,255,238,1);
}
}
}
.RiskControl_2_2_2{
width:50%;
float: right;
height:100%;
// border:1px solid rgba(23,186,252,1);
}
}
// border:1px solid rgba(23,186,252,1);
}
.RiskControl_3{
height: 26%;
width: 100%;
// border:1px solid rgba(23,186,252,1);
.RiskControl_3_1{
height: 40%;
width: 50%;
float: right;
//border:1px solid rgba(23,186,252,1);
.RiskControl_3_1_1{
height: 100%;
width: 90%;
float: right;
// border:1px solid rgba(23,186,252,1);
.RiskControl_3_1_8{
float: left;
margin-left: 8%;
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
line-height:20px;
color:rgba(255,255,255,1);
opacity:1;
}
}
.RiskControl_3_1_17{
height: 100%;
width: 60%;
float: right;
// border:1px solid rgba(23,186,252,1);
.RiskControl_3_1_8{
float: left;
margin-left: 8%;
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
line-height:20px;
color:rgba(255,255,255,1);
opacity:1;
}
}
.RiskControl_3_1_2{
float: right;
margin-top:5% ;
width:10px;
height:10px;
background:rgba(219,121,23,1);
border-radius:50%;
opacity:1;
}
.RiskControl_3_1_3{
float: right;
margin-top:5% ;
width:10px;
height:10px;
background:rgba(243,12,12,1);
border-radius:50%;
opacity:1;
}
.RiskControl_3_1_4{
float: right;
margin-top:5% ;
width:10px;
height:10px;
background:rgba(12,3,185,1);
border-radius:50%;
opacity:1;
}
.RiskControl_3_1_5{
float: right;
margin-top:5% ;
width:10px;
height:10px;
background:rgba(209,209,52,1);
border-radius:50%;
opacity:1;
}
}
}
}
}
.statistical-right {
position: absolute;
height: 86.2%;
width: 18.7%;
float: right;
margin-right: 1.9%;
z-index: 1;
top: 8.51%;
right: 0;
.AllSafety {
height: 25.9%;
width: 100%;
.all-safety-font {
height: 11%;
width: 100%;
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
line-height:24px;
color:rgba(255,255,255,1);
text-shadow:0px 0px 4px rgba(9,35,61,1);
opacity:1;
padding-left: 17px;
}
.all-safety-content {
background-image: url('/src/assets/homePage/ztxf.png');
background-repeat: no-repeat !important;
height: 100%;
width: 100%;
background-size: 100% 100%;
-moz-background-size: 100% 100%;
.div-echars{
margin-left: 17px;
height: 200px !important;
width: 82%!important;
background-position:60px 14px!important
}
.jiantou {
color:rgb(255,255,0)
}
.content-detail {
height: 100%;
width: 100%;
display: flex;
.all-safety-left{
height: 89%;
width: 53%;
}
.all-safety-right{
height: 89%;
width: 47%;
text-align: center;
.all-safety-right-one {
height: 13%;
width: 100%;
text-align: center;
margin-top: 17%;
line-height: 20px;
position: relative;
.right-one-font {
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(247,13,14,1);
line-height:26px;
}
}
.all-safety-right-two {
height: 13%;
width: 45%;
background:linear-gradient(90deg,rgba(82,237,242,0.1) 0%,rgba(28,98,100,0.31) 100%);
box-shadow:0px 3px 6px rgba(0,0,0,0.16);
opacity:1;
border-radius: 6px;
position: relative;
left: 31%;
top: 7%;
.right-two-font {
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
line-height: 23px;
color:rgba(255,255,255,1);
opacity:1;
}
}
.all-safety-right-three {
height: 20%;
width: 100%;
text-align: center;
margin-top: 12%;
.right-three-font {
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(4,252,253,1);
line-height:26px;
}
}
.all-safety-right-four {
height: 13%;
width: 45%;
background:linear-gradient(90deg,rgba(82,237,242,0.1) 0%,rgba(28,98,100,0.31) 100%);
box-shadow:0px 3px 6px rgba(0,0,0,0.16);
opacity:1;
border-radius: 6px;
position: relative;
left: 31%;
.right-four-font {
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
line-height:23px;
color:rgba(255,255,255,1);
opacity:1;
}
}
}
}
}
}
.FireSafety {
margin-top: 10%;
height: 34%;
width: 100%;
.fire-safety-content {
background-image: url('/src/assets/homePage/xfsl.png');
background-repeat: no-repeat !important;
height: 100%;
width: 100%;
background-size: 100% 100%;
-moz-background-size: 100% 100%;
.fire-safety-font {
height: 11%;
width: 100%;
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
line-height:24px;
color:rgba(255,255,255,1);
text-shadow:0px 0px 4px rgba(9,35,61,1);
opacity:1;
padding-left: 17px;
}
//应急预案
.titleIcon-yjya {
background: url('/src/assets/homePage/txl.png') center center / 100% 100% no-repeat;
display: inline-block;
height: 20px;
width: 20px;
vertical-align: middle;
margin-top: -4px;
}
//安全培训
.titleIcon-aqpx {
background: url('/src/assets/homePage/aqpx.png') center center / 100% 100% no-repeat;
display: inline-block;
height: 16px;
width: 19px;
vertical-align: middle;
margin-top: -4px;
}
//安全巡检
.titleIcon-aqxj {
background: url('/src/assets/homePage/aqxj.png') center center / 100% 100% no-repeat;
display: inline-block;
height: 19.5px;
width: 17.5px;
vertical-align: middle;
margin-top: -4px;
margin-left: 3px;
}
//日常训练
.titleIcon-rcxl {
background: url('/src/assets/homePage/rcxl.png') center center / 100% 100% no-repeat;
display: inline-block;
height: 18.67px;
width: 19px;
vertical-align: middle;
margin-top: -4px;
}
//器材保养
.titleIcon-qcby {
background: url('/src/assets/homePage/qcby.png') center center / 100% 100% no-repeat;
display: inline-block;
height: 17.32px;
width: 15px;
vertical-align: middle;
margin-top: -4px;
margin-left: 4px;
}
.fire-safety-wenzi {
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
line-height:26px;
color:rgba(255,255,255,1);
opacity:1;
display: inline-block;
margin-left: 6px;
}
}
.fire-safety-tongji {
width: 84%;
height: 12.3%;
background:linear-gradient(90deg,rgba(82,237,242,0.1) 0%,rgba(28,98,100,0.31) 100%);
box-shadow:0px 3px 6px rgba(0,0,0,0.16);
opacity:1;
margin-left: 7%;
margin-top: 3%;
padding-left: 6px;
.content-tongji {
width: 100%;
.left-div {
display: inline-block;
}
.right-font {
display: inline-block;
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
line-height:26px;
color:rgba(255,255,255,1);
opacity:1;
float: right;
margin-right: 10px;
}
}
}
}
.FireStrength {
margin-top: 10%;
height: 34%;
width: 100%;
.strength-safety-font {
height: 11%;
width: 100%;
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
line-height:24px;
color:rgba(255,255,255,1);
text-shadow:0px 0px 4px rgba(9,35,61,1);
opacity:1;
padding-left: 17px;
}
.strength-safety-content {
background-image: url('/src/assets/homePage/xfsl.png');
background-repeat: no-repeat !important;
height: 100%;
width: 100%;
background-size: 100% 100%;
-moz-background-size: 100% 100%;
.strength-safety-content-box
{
display: flex;
height: 89%;
width: 100%;
.item{
margin-top: 2%;
padding: 7px;
font-size: 15px;
color: white;
width:260px;
height:35px;
background:linear-gradient(90deg,rgba(82,237,242,0.1) 0%,rgba(28,98,100,0.31) 100%);
box-shadow:0px 3px 6px rgba(0,0,0,0.16);
opacity:1;
.item-img-div
{
width: 20px;
float: left;
margin-right: 5%;
}
.item-value
{
float: right;
margin-right: 5%;
}
}
}
}
}
}
//}
@import './duty.scss'; @import './duty.scss';
@import './map.scss'; @import './map.scss';
@import './homePage.scss';
.view-root { .view-root {
height: 100%; height: 100%;
background: url('/src/assets/bg/bg.png') no-repeat; background: url('/src/assets/bg/bg.png') no-repeat;
......
.safetyInspection-safety{
position: absolute;
height: 100%;
width: 100%;
background-image: url('/src/assets/safetyManage/bjt.png');
background-repeat: no-repeat;
.safetyInspection-safty-content {
height: 100%;
.safetyInspection-top{
height: 2%;
width: 100%;
}
.safetyInspection-bottom{
height: 93%;
width:100%;
position: relative;
.safetyInspection-bottom-left {
height: 98%;
width: 94%;
position: absolute;
left: 2.6%;
border:2px solid rgba(0,185,255,0.3);
.safetyInspection-bottom-left-content {
height: 100%;
.one-div {
height: 9%;
// border:2px solid blue;
width: 100%;
display: flex;
background: #222b51 !important;
.search-one {
height: 100%;
width: 30%;
position: relative;
text-align: center;
/* vertical-align: middle; */
top: 29%;
left: 41%;
.search-one-input{
width: 59%;
.ant-input-affix-wrapper .ant-input-suffix{
position: absolute;
padding-right: 24px;
top: 50%;
transform: translateY(-50%);
line-height: 0;
color: rgba(0, 0, 0, 0.65);
}
.ant-input-affix-wrapper {
padding: 0;
margin: 0;
font-family: "Helvetica Neue For Number", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px;
font-variant: tabular-nums;
line-height: 1.5;
color: rgba(0, 0, 0, 0.65);
list-style: none;
box-sizing: border-box;
position: relative;
display: inline-block;
width: 50;
padding-left: 24px;
padding-right: 24px;
}
.ant-input-search {
.anticon-search {
&::before {
position: relative;
display: inline-block;
background: url('/src/assets/safetyManage/sousuo.png') no-repeat;
width: 20px;
height: 20px;
background-size: 100% 100%;
top: 0px;
content: '' !important;
}
}
}
.ant-input {
// width: 10.7rem;
height: 30px;
// position: relative;
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
// line-height:50px;
color:rgba(225,231,232,1);
-webkit-text-stroke:1 rgba(0,0,0,0.00);
text-stroke:1 rgba(0,0,0,0.00);
opacity:1;
background: rgba(0,185,255,0.3) !important;
border-radius: 17px;
left: 34%;
.anticon:before {
margin-top: 1px;
}
border-color:rgba(0,185,255,0.3)
}
}
}
}
.two-div {
height: 91%;
// border:2px solid green;
}
}
}
}
}
}
\ No newline at end of file
.fire-safety{
position: absolute;
height: 100%;
width: 100%;
// background: url('/src/assets/bg/bg.png') no-repeat;
background-image: url('/src/assets/safetyManage/bjt.png');
background-repeat: no-repeat;
.fire-safty-content {
height: 100%;
.fire-top{
height: 2%;;
width: 100%;
}
.fire-bottom{
height: 93%;
width:100%;
position: relative;
.fire-bottom-left {
height: 98%;
width: 47%;
position: absolute;
left: 2.6%;
border:2px solid rgba(0,185,255,0.3);
.fire-bottom-left-content {
height: 100%;
.one-div {
height: 9%;
// border:2px solid blue;
width: 100%;
display: flex;
background: #222b51 !important;
.search-one {
height: 100%;
width: 30%;
position: relative;
text-align: center;
/* vertical-align: middle; */
top: 29%;
.search-one-button{
background-image: url('/src/assets/safetyManage/sousuo.png');
background-repeat: no-repeat !important;
right: 26%;
height: 20px;
position: relative;
width: 20px;
/* margin-top: 10%; */
margin-top: -1%;
float: right;
/* padding-left: 8%; */
top: 11%;
}
.search-one-input{
width: 100%;
.ant-input-affix-wrapper .ant-input-suffix{
position: absolute;
padding-right: 24px;
top: 50%;
transform: translateY(-50%);
line-height: 0;
color: rgba(0, 0, 0, 0.65);
}
.ant-input-affix-wrapper {
padding: 0;
margin: 0;
font-family: "Helvetica Neue For Number", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px;
font-variant: tabular-nums;
line-height: 1.5;
color: rgba(0, 0, 0, 0.65);
list-style: none;
box-sizing: border-box;
position: relative;
display: inline-block;
width: 50;
padding-left: 24px;
padding-right: 24px;
}
.ant-input-search {
.anticon-search {
&::before {
position: relative;
display: inline-block;
background: url('/src/assets/safetyManage/sousuo.png') no-repeat;
width: 20px;
height: 20px;
background-size: 100% 100%;
top: 0px;
content: '' !important;
}
}
}
.ant-input {
// width: 10.7rem;
height: 30px;
// position: relative;
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
// line-height:50px;
color:rgba(225,231,232,1);
-webkit-text-stroke:1 rgba(0,0,0,0.00);
text-stroke:1 rgba(0,0,0,0.00);
opacity:1;
background: rgba(0,185,255,0.3) !important;
border-radius: 17px;
left: 34%;
.anticon:before {
margin-top: 1px;
}
border-color:rgba(0,185,255,0.3)
}
}
}
.search-two {
height: 100%;
width: 30%;
// border:2px solid red;
left: 2%;
position: relative;
top: 29%;
.amos-popover-trigger {
border-color:rgba(0,185,255,0.3);
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
// line-height:50px;
color:rgba(225,231,232,1);
-webkit-text-stroke:1 rgba(0,0,0,0.00);
text-stroke:1 rgba(0,0,0,0.00);
opacity:1;
width: 74%;
}
.aficon-down:before {
position: relative;
display: inline-block;
background: url('/src/assets/safetyManage/xiangxia.png') no-repeat;
width: 20px;
height: 20px;
background-size: 100% 100%;
top: 4px;
content: '' !important;
}
.search-select-style {
background:rgba(0,185,255,0.3);
opacity:1;
border-radius:17px;
background:rgba(0,185,255,0.3);
}
}
.search-three {
position: relative;
height: 100%;
width: 41%;
top: 29%;
margin-left: -3%;
.ant-calendar-picker-input{
background-color: rgba(0,185,255,0.3);
border-color:rgba(0,185,255,0.3)
}
.ant-input {
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
// line-height:50px;
color:rgba(225,231,232,1);
-webkit-text-stroke:1 rgba(0,0,0,0.00);
text-stroke:1 rgba(0,0,0,0.00);
border-radius: 17px;
width: 102%;
}
.ant-calendar-picker-icon:after {
position: relative;
display: inline-block;
background: url('/src/assets/safetyManage/rjd.png') no-repeat;
background-size: 100% 100%;
width: 18px;
height: 20px;
bottom: 4px;
right: -2px;
content: '' !important;
}
.three-font {
font-size:15px;
font-family:Microsoft YaHei;
font-weight:400;
line-height: 23px;
color:rgba(255,255,255,1);
}
.ant-calendar-picker-icon{
// background-image: url('/src/assets/safetyManage/sousuo.png');
// background-repeat: no-repeat !important;
border-color:rgba(0,185,255,0.3)
}
}
}
.two-div {
height: 91%;
// border:2px solid green;
}
}
}
.fire-bottom-right {
height: 98%;
width: 47%;
left: 51%;
border:2px solid rgba(0,185,255,0.3);
position: absolute;
.fire-bottom-right-content {
height: 100%;
.one-div {
height: 9%;
// border:2px solid blue;
width: 100%;
display: flex;
background: #222b51 !important;
.content-font-wenzi {
font-size:10px;
font-family:Microsoft YaHei;
font-weight:bold;
// line-height:50px;
color:rgba(225,231,232,1);
display: inline-block;
margin-top: 4%;
margin-left: 4%;
}
}
.two-div {
height: 91%;
// border:2px solid green;
.ant-table-content {
height: 100%;
//滚动条特殊调整
.ant-table-body {
// max-height: 500px !important ;
overflow-y: scroll !important;
background:transparent!important;
table {
width: 300px;
border-color: transparent !important;
td {
border-color: transparent !important;
}
}
}
}
}
}
}
}
}
}
\ No newline at end of file
.table-styles {
height: 100%;
.ant-table-content {
height: 100%;
.ant-table-body {
// max-height: 500px !important ;
overflow-y: auto !important;
background:transparent!important;
table {
width: 300px;
border-color: transparent !important;
td {
border-color: transparent !important;
}
}
}
}
.ant-table {
background:linear-gradient(180deg,rgba(17,12,48,1) 0%,rgba(0,0,0,0.19) 100%);
border-radius: 0px 0px 0 0;
}
.ant-pagination.mini .ant-pagination-total-text {
height: 20px;
line-height: 20px;
}
//表格正文居中
.ant-table-content .ant-table-body table td {
border-color: transparent !important;
text-align: center;
}
.ant-table-fixed-header .ant-table-scroll .ant-table-header{
overflow: hidden;
}
.ant-pagination.mini .ant-pagination-total-text {
font-size:13px;
font-family:Microsoft YaHei UI;
font-weight:400;
line-height: 19px;
color:rgba(255,255,255,1);
float: right
}
//修改表头文字、背景颜色
.ant-table-thead > tr >th{
color: white;
background: #3d466b !important;
//background: #222b51 !important;
border-color: transparent !important;
text-align: center;
}
//鼠标悬浮行背景色修改
table tbody tr:hover>td {
background-color:#00B9FF !important;
}
.ant-table-content {
.ant-table-scroll .ant-table-header {
margin-bottom: 3px !important;
// padding-bottom: 0px !important;
margin-top: -2px !important;
margin-left: -2px !important;
margin-right: -2px !important
}
//背景色奇数和偶数
.back-02 {
background:transparent!important;
opacity:1;
}
.back-01 {
background:rgba(14,127,180,0.29);
}
}
.ant-pagination {
left: 39%;
position: absolute;
.ant-pagination-options {
.select-scroll-wrapper {
margin: 0;
}
}
.ant-pagination-total-text {
color: white;
}
.ant-pagination-prev {
background: url('/src/assets/safetyManage/zuo.png') no-repeat;
a {
&::after {
color:rgba(0,185,255,0.3)
}
}
}
.ant-pagination-next {
background: url('/src/assets/safetyManage/you.png') no-repeat;
background-size: 100% 100%;
a {
&::after {
color:rgba(0,185,255,0.3)
}
}
}
//分页颜色调整
.ant-pagination-item-active {
background-color: #5FFFFD !important;
border-color: #5FFFFD !important;
}
.ant-pagination-item {
border: 0;
margin: 0;
min-width: 20px;
height: 20px;
line-height: 20px;
background-color: #00B9FF !important;
}
.ant-pagination-jump-next {
&::after {
color: white;
}
}
}
.ant-pagination.mini .ant-pagination-options {
margin-left: 8px;
display: none;
}
//滚动条样式
.ant-table-body{
&::-webkit-scrollbar {
height: 5px;
}
&::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background-image: url('/src/assets/safetyManage/hengxian.png');
background-repeat: no-repeat;
background-size: 100% 100%;
}
&::-webkit-scrollbar-track {
-webkit-box-shadow: 0;
border-radius: 0;
background-image: url('/src/assets/safetyManage/gdt.png');
background-repeat: no-repeat;
background-size: 100% 100%;
}
&::-webkit-scrollbar-button {
background-image: url('/src/assets/safetyManage/shang.png');
background-repeat: no-repeat;
background-size: 100% 100%;
}
}
}
import React, { Component } from 'react';
import ReactEcharts from 'amos-viz/lib/echarts';
import { Table } from 'amos-antd';
import AmosGridTable from './../safetyManage/AmosGridTable';
import { Input, Button } from 'amos-antd';
import { DatePicker } from 'amos-antd';
import moment from 'moment';
import dt2react from 'dt2react';
const dateFormatList = ['DD/MM/YYYY', 'DD/MM/YY'];
const { RangePicker } = DatePicker;
const dateFormat = 'YYYY/MM/DD';
const monthFormat = 'YYYY/MM';
import { Select } from 'amos-framework';
const Option = Select.Option;
const Search = Input.Search;
const columns = [
{
title: '序号',
dataIndex: 'key',
width: '10%',
align: 'center', // 设置文本居中的属性
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '换流站名称',
width: '20%',
dataIndex: 'name',
render: val => <span style={{color:"yellow"}}>{val}</span>,
},
{
title: '科目数',
width: '10%',
dataIndex: 'kemu',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '次数',
width: '10%',
dataIndex: 'cishu',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '参加人员',
width: '10%',
dataIndex: 'cjry',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '人员达标率',
width: '20%',
dataIndex: 'rydbl',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '最近培训时间',
width: '20%',
dataIndex: 'date',
render: val => <span style={{color:"white"}}>{val}</span>,
}
];
const data = [
{
key: '1',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '2',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '3',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '4',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '5',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '6',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '7',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '8',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '9',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '10',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '11',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '12',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '13',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '14',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '15',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '16',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '17',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '18',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '19',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '20',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '21',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '22',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '23',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '225',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '25',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '26',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '27',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '28',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '29',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
}
];
const selectdata = [
{ id: 0, name: '消防理论知识培训' },
{ id: 1, name: '消防技能培训' },
{ id: 3, name: '设备器材维护管理' },
{ id: 4, name: '火灾隐患管理' },
{ id: 5, name: '用火用电管理' }
];
//偏移
const offsetHeight = 110;
const defaultHeight = 450;
/**
* 日常训练左侧
*/
class DailyTrainyLeft extends Component {
constructor(props) {
super(props);
this.pageConfig = {
current: 1,
pageSize: 14
};
this.state = {
data: [],
loading: false,
equimentId:null,
pagination: true,
isChecked: false,
selectedRows: [],
selectedRowKeys: [],
dataList: [],
newDataList:[],
totalCount:0,
searchParam:'',
fname:'',
current: 1,
pageSize: 10,
total: 0,
tableHeight:450
};
}
componentDidMount() {
const { pagination } = this.state;
debugger
var box1=document.getElementById("dailyTrain-bottom-left");
var box2=document.getElementById("one-div");
if(box1 && box2){ //此处在加一层判断,更加严密,如果box存在的情况下获取
console.log(box1.offsetHeight);
console.log(box2.offsetHeight);
this.setState({
tableHeight:(box1.offsetHeight-box2.offsetHeight)
})
}
}
onChange = (value, item) =>{
debugger
console.log(value, item);
}
onTimeChange= (value, dateString)=> {
console.log('Selected Time: ', value);
console.log('Formatted Selected Time: ', dateString);
}
onOk=(value) =>{
console.log('onOk: ', value);
}
onChangeSelect = (value, item) =>{
console.log(value, item);
}
reload = r => {
this.setState(
{
reload: () => {
r();
this.setState({ selectedRows: [], selectedRowKeys: [] });
}
},
r()
);
};
getAcitonData = () =>{
this.setState({
data:data
})
}
/**
* 分页设置参数
*/
setPageConfig = ({ pageSize, current }) => {
if (pageSize !== undefined) {
this.pageConfig.pageSize = pageSize;
}
if (current !== undefined) {
this.pageConfig.pageNumber = current;
}
};
/**
* 获取表格所选则的行数据
*/
getSelectedRows = (selectedRows, selectedRowKeys) => {
this.setState({ selectedRows, selectedRowKeys });
let { riskSourceId, equipmentId, callBack } = this.props;
// callBack(selectedRowKeys,riskSourceId,equipmentId);
};
searchData =()=>{
let name = this.state.fname;
alert(name)
}
onChange = (e,value) =>{
this.setState({ fname: value });
}
getPanelHeight = () => {
//计算表格高度
var box1=document.getElementById("dailyTrain-bottom-left");
if(box1){ //此处在加一层判断,更加严密,如果box存在的情况下获取
return box1.offsetHeight * 0.91
}
};
SearchChange = (value) => {
alert(value)
}
rowClassName = (record, index) => {
let className = index % 2 ? 'back-01': 'back-02';
return className
}
render() {
let defaultPageConfig = this.pageConfig;
const { current, pageSize, total } = this.state;
let { pagination, isChecked, fname,data,totalCount,selectedRowKeys } = this.state;
return (
<div className="dailyTrain-bottom-left" id="dailyTrain-bottom-left">
<div className="dailyTrain-bottom-left-content">
<div className="one-div" id="one-div">
<div className="search-one">
{/* <div className="search-one-button" onClick={this.searchData} /> */}
<div className="search-one-input">
<Search placeholder="搜索" onSearch={this.SearchChange} />
</div>
</div>
<div className="search-two" >
<Select className="search-select-style"
data={selectdata}
renderOption={item => <Option value={item.id}>{item.name}</Option>}
defaultOption={<Option>请选择</Option>}
onChange={this.onChangeSelect}
/>
</div>
<div className="search-three">
<span className="three-font">日期:&nbsp;&nbsp;</span>
<DatePicker
placeholder="年-月-日"
showTime
onChange={this.onTimeChange}
style={{width:'37%'}}
onOk={this.onOk} />
{/* <DatePicker defaultValue={moment('2015/01/01', dateFormat)} format={dateFormat} /> */}
&nbsp;&nbsp;<font style={{color:'#5FFFFD'}}></font>&nbsp;&nbsp;
<DatePicker
placeholder="年-月-日"
showTime
onChange={this.onTimeChange}
style={{width:'37%'}}
onOk={this.onOk} />
</div>
</div>
<div className="two-div">
<AmosGridTable
columns={columns}
dataList={data}
isPageable={pagination}
totals={totalCount}
callBack={this.reload}
selectedRowKeys={selectedRowKeys}
getSelectedRows={this.getSelectedRows}
getTableDataAction={this.getAcitonData}
isChecked={isChecked}
setPageConfig={this.setPageConfig}
defaultPageConfig={defaultPageConfig}
getPanelHeight={this.getPanelHeight}
rowClassName={this.rowClassName}
/>
</div>
</div>
</div>
);
}
}
DailyTrainyLeft.propTypes = {
};
export default DailyTrainyLeft;
import React, { Component } from 'react';
import ReactEcharts from 'amos-viz/lib/echarts';
import { Table } from 'amos-antd';
import AmosGridTable from './../safetyManage/AmosGridTable';
import { Input, Button } from 'amos-antd';
import { DatePicker } from 'amos-antd';
import moment from 'moment';
import dt2react from 'dt2react';
const dateFormatList = ['DD/MM/YYYY', 'DD/MM/YY'];
const { RangePicker } = DatePicker;
const dateFormat = 'YYYY/MM/DD';
const monthFormat = 'YYYY/MM';
import { Select } from 'amos-framework';
const Option = Select.Option;
const Search = Input.Search;
const columns = [
{
title: '序号',
dataIndex: 'key',
width: '10%',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '训练科目',
width: '15%',
dataIndex: 'xlkm',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '训练内容',
width: '15%',
dataIndex: 'xlnr',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '训练时间',
width: '20%',
dataIndex: 'xlsj',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '参加人数',
width: '10%',
dataIndex: 'cjrs',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '达标条件',
width: '20%',
dataIndex: 'dbtj',
render: val => <span style={{color:"green"}}>{val}</span>,
},
{
title: '达标率%',
width: '20%',
dataIndex: 'dbl',
render: val => <span style={{color:"white"}}>{val}</span>,
}
];
const data = [
{
key: '1',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '2',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '3',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '4',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '5',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '6',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '7',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '8',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '9',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '10',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '11',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '12',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '13',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '14',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '15',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '16',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '17',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '18',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '19',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '20',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '21',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '22',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '23',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '225',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '25',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '26',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '27',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '28',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
},
{
key: '29',
xlkm: '消防技能培训',
xlnr: "1500米长跑",
xlsj:'2019-01-01',
cjrs: 4,
dbtj:'队列整齐',
dbl:"60%"
}
];
const selectdata = [
{ id: 0, name: '消防理论知识培训' },
{ id: 1, name: '消防技能培训' },
{ id: 3, name: '设备器材维护管理' },
{ id: 4, name: '火灾隐患管理' },
{ id: 5, name: '用火用电管理' }
];
//偏移
const offsetHeight = 110;
const defaultHeight = 450;
/**
* 日常训练右侧
*/
class DailyTrainRight extends Component {
constructor(props) {
super(props);
this.pageConfig = {
current: 1,
pageSize: 10
};
this.state = {
data: [],
loading: false,
equimentId:null,
pagination: true,
isChecked: false,
selectedRows: [],
selectedRowKeys: [],
dataList: [],
newDataList:[],
totalCount:0,
searchParam:'',
fname:'',
current: 1,
pageSize: 10,
total: 0,
tableHeight:450
};
}
componentDidMount() {
const { pagination } = this.state;
debugger
var box1=document.getElementById("dailyTrain-bottom-left");
var box2=document.getElementById("one-div");
if(box1 && box2){ //此处在加一层判断,更加严密,如果box存在的情况下获取
console.log(box1.offsetHeight);
console.log(box2.offsetHeight);
this.setState({
tableHeight:(box1.offsetHeight-box2.offsetHeight)
})
}
}
onChange = (value, item) =>{
debugger
console.log(value, item);
}
onTimeChange= (value, dateString)=> {
console.log('Selected Time: ', value);
console.log('Formatted Selected Time: ', dateString);
}
onOk=(value) =>{
console.log('onOk: ', value);
}
onChangeSelect = (value, item) =>{
console.log(value, item);
}
reload = r => {
this.setState(
{
reload: () => {
r();
this.setState({ selectedRows: [], selectedRowKeys: [] });
}
},
r()
);
};
getAcitonData = () =>{
this.setState({
data:data
})
}
/**
* 分页设置参数
*/
setPageConfig = ({ pageSize, current }) => {
if (pageSize !== undefined) {
this.pageConfig.pageSize = pageSize;
}
if (current !== undefined) {
this.pageConfig.pageNumber = current;
}
};
/**
* 获取表格所选则的行数据
*/
getSelectedRows = (selectedRows, selectedRowKeys) => {
this.setState({ selectedRows, selectedRowKeys });
let { riskSourceId, equipmentId, callBack } = this.props;
// callBack(selectedRowKeys,riskSourceId,equipmentId);
};
searchData =()=>{
let name = this.state.fname;
alert(name)
}
onChange = (e,value) =>{
this.setState({ fname: value });
}
getPanelHeight = () => {
// //计算表格高度
// var box1=document.getElementById("dailyTrain-bottom-right");
// if(box1){ //此处在加一层判断,更加严密,如果box存在的情况下获取
// return box1.offsetHeight * 0.91;
// }
return 300
};
SearchChange = (value) => {
alert(value)
}
rowClassName = (record, index) => {
let className = index % 2 ? 'back-01': 'back-02';
return className
}
render() {
let defaultPageConfig = this.pageConfig;
const { current, pageSize, total } = this.state;
let { pagination, isChecked, fname,data,totalCount,selectedRowKeys } = this.state;
return (
<div className="dailyTrain-bottom-right" id="dailyTrain-bottom-right">
<div className="dailyTrain-bottom-right-content">
<div className="one-div">
<div className=" content-font-wenzi"> 中州换流站</div>
</div>
<div className="two-div">
<AmosGridTable
columns={columns}
dataList={data}
isPageable={pagination}
totals={totalCount}
callBack={this.reload}
selectedRowKeys={selectedRowKeys}
getSelectedRows={this.getSelectedRows}
getTableDataAction={this.getAcitonData}
isChecked={isChecked}
setPageConfig={this.setPageConfig}
defaultPageConfig={defaultPageConfig}
getPanelHeight={this.getPanelHeight}
rowClassName={this.rowClassName}
/>
</div>
</div>
</div>
);
}
}
DailyTrainRight.propTypes = {
};
export default DailyTrainRight;
import React, { Component } from 'react';
import DailyTrainyLeft from './DailyTrainLeft';
import DailyTrainRight from './DailyTrainRight';
/**
* 日常训练模块
*/
export default class DailyTrain extends Component {
render() {
return (
<div className="dailyTrain-safety">
<div className="dailyTrain-safty-content">
<div className="dailyTrain-top"></div>
<div className="dailyTrain-bottom">
<DailyTrainyLeft />
<DailyTrainRight />
</div>
</div>
</div>
);
}
}
...@@ -30,7 +30,6 @@ class Duty extends Component { ...@@ -30,7 +30,6 @@ class Duty extends Component {
render() { render() {
return ( return (
<div className="duty-root"> <div className="duty-root">
日常值守
</div> </div>
); );
} }
......
import React, { Component } from 'react';
import ReactEcharts from 'amos-viz/lib/echarts';
import { Table } from 'amos-antd';
import AmosGridTable from './../safetyManage/AmosGridTable';
import { Input, Button } from 'amos-antd';
import { DatePicker } from 'amos-antd';
import moment from 'moment';
import dt2react from 'dt2react';
const dateFormatList = ['DD/MM/YYYY', 'DD/MM/YY'];
const { RangePicker } = DatePicker;
const dateFormat = 'YYYY/MM/DD';
const monthFormat = 'YYYY/MM';
import { Select } from 'amos-framework';
const Option = Select.Option;
const Search = Input.Search;
const columns = [
{
title: '序号',
dataIndex: 'key',
width: '10%',
align: 'center', // 设置文本居中的属性
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '换流站名称',
width: '20%',
dataIndex: 'name',
render: val => <span style={{color:"yellow"}}>{val}</span>,
},
{
title: '装备类型',
width: '10%',
dataIndex: 'zblx',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '累计保养',
width: '10%',
dataIndex: 'ljby',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '保养中',
width: '10%',
dataIndex: 'byz',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '逾期保养',
width: '20%',
dataIndex: 'yqby',
render: val => <span style={{color:"red"}}>{val}</span>,
},
{
title: '逾期占比',
width: '20%',
dataIndex: 'yqzb',
render: val => <span style={{color:"red"}}>{val}</span>,
}
];
const data = [
{
key: '1',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '2',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '3',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '4',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '5',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '6',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '7',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '8',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '9',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '10',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '11',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '12',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '13',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '14',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '15',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '16',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '17',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '18',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '19',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '20',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '21',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '22',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '23',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '225',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '25',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '26',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '27',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '28',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
},
{
key: '29',
name: '复龙换流站',
zblx: 9,
ljby:170,
byz: 100,
yqby:20,
yqzb:'16.7%'
}
];
const selectdata = [
{ id: 0, name: '消防理论知识培训' },
{ id: 1, name: '消防技能培训' },
{ id: 3, name: '设备器材维护管理' },
{ id: 4, name: '火灾隐患管理' },
{ id: 5, name: '用火用电管理' }
];
//偏移
const offsetHeight = 110;
const defaultHeight = 450;
/**
* 器材保养左侧
*/
class EquipmentMaintainLeft extends Component {
constructor(props) {
super(props);
this.pageConfig = {
current: 1,
pageSize: 14
};
this.state = {
data: [],
loading: false,
equimentId:null,
pagination: true,
isChecked: false,
selectedRows: [],
selectedRowKeys: [],
dataList: [],
newDataList:[],
totalCount:0,
searchParam:'',
fname:'',
current: 1,
pageSize: 10,
total: 0,
tableHeight:450
};
}
componentDidMount() {
const { pagination } = this.state;
debugger
var box1=document.getElementById("equipmentMaintain-bottom-left");
var box2=document.getElementById("one-div");
if(box1 && box2){ //此处在加一层判断,更加严密,如果box存在的情况下获取
console.log(box1.offsetHeight);
console.log(box2.offsetHeight);
this.setState({
tableHeight:(box1.offsetHeight-box2.offsetHeight)
})
}
}
onChange = (value, item) =>{
debugger
console.log(value, item);
}
onTimeChange= (value, dateString)=> {
console.log('Selected Time: ', value);
console.log('Formatted Selected Time: ', dateString);
}
onOk=(value) =>{
console.log('onOk: ', value);
}
onChangeSelect = (value, item) =>{
console.log(value, item);
}
reload = r => {
this.setState(
{
reload: () => {
r();
this.setState({ selectedRows: [], selectedRowKeys: [] });
}
},
r()
);
};
getAcitonData = () =>{
this.setState({
data:data
})
}
/**
* 分页设置参数
*/
setPageConfig = ({ pageSize, current }) => {
if (pageSize !== undefined) {
this.pageConfig.pageSize = pageSize;
}
if (current !== undefined) {
this.pageConfig.pageNumber = current;
}
};
/**
* 获取表格所选则的行数据
*/
getSelectedRows = (selectedRows, selectedRowKeys) => {
this.setState({ selectedRows, selectedRowKeys });
let { riskSourceId, equipmentId, callBack } = this.props;
// callBack(selectedRowKeys,riskSourceId,equipmentId);
};
searchData =()=>{
let name = this.state.fname;
alert(name)
}
onChange = (e,value) =>{
this.setState({ fname: value });
}
getPanelHeight = () => {
//计算表格高度
var box1=document.getElementById("equipmentMaintain-bottom-left");
if(box1){ //此处在加一层判断,更加严密,如果box存在的情况下获取
return box1.offsetHeight * 0.91
}
};
SearchChange = (value) => {
alert(value)
}
rowClassName = (record, index) => {
let className = index % 2 ? 'back-01': 'back-02';
return className
}
render() {
let defaultPageConfig = this.pageConfig;
const { current, pageSize, total } = this.state;
let { pagination, isChecked, fname,data,totalCount,selectedRowKeys } = this.state;
return (
<div className="equipmentMaintain-bottom-left" id="equipmentMaintain-bottom-left">
<div className="equipmentMaintain-bottom-left-content">
<div className="one-div" id="one-div">
<div className="search-one">
{/* <div className="search-one-button" onClick={this.searchData} /> */}
<div className="search-one-input">
<Search placeholder="搜索" onSearch={this.SearchChange} />
</div>
</div>
</div>
<div className="two-div">
<AmosGridTable
columns={columns}
dataList={data}
isPageable={pagination}
totals={totalCount}
callBack={this.reload}
selectedRowKeys={selectedRowKeys}
getSelectedRows={this.getSelectedRows}
getTableDataAction={this.getAcitonData}
isChecked={isChecked}
setPageConfig={this.setPageConfig}
defaultPageConfig={defaultPageConfig}
getPanelHeight={this.getPanelHeight}
rowClassName={this.rowClassName}
/>
</div>
</div>
</div>
);
}
}
EquipmentMaintainLeft.propTypes = {
};
export default EquipmentMaintainLeft;
import React, { Component } from 'react';
import ReactEcharts from 'amos-viz/lib/echarts';
import { Table } from 'amos-antd';
import AmosGridTable from './../safetyManage/AmosGridTable';
import { Input, Button } from 'amos-antd';
import { DatePicker } from 'amos-antd';
import moment from 'moment';
import dt2react from 'dt2react';
const dateFormatList = ['DD/MM/YYYY', 'DD/MM/YY'];
const { RangePicker } = DatePicker;
const dateFormat = 'YYYY/MM/DD';
const monthFormat = 'YYYY/MM';
import { Select } from 'amos-framework';
const Option = Select.Option;
const Search = Input.Search;
const columns = [
{
title: '序号',
dataIndex: 'key',
width: '10%',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '装备名称',
width: '20%',
dataIndex: 'zbmc',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '装备分类',
width: '20%',
dataIndex: 'zbfl',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '计量单位',
width: '20%',
dataIndex: 'jldw',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '保养周期',
width: '20%',
dataIndex: 'byzq',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '逾期数量',
width: '10%',
dataIndex: 'dbtj',
render: val => <span style={{color:"red"}}>{val}</span>,
}
];
const data = [
{
key: '1',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '2',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '3',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '4',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '5',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '6',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '7',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '8',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '9',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '10',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '11',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '12',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '13',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '14',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '15',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '16',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '17',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '18',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '19',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '20',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '21',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '22',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '23',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '225',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '25',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '26',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '27',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '28',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
},
{
key: '29',
zbmc: '灭火防护服',
zbfl: "个人防护类",
jldw:'个',
byzq: '6月',
dbtj:12,
}
];
const selectdata = [
{ id: 0, name: '消防理论知识培训' },
{ id: 1, name: '消防技能培训' },
{ id: 3, name: '设备器材维护管理' },
{ id: 4, name: '火灾隐患管理' },
{ id: 5, name: '用火用电管理' }
];
//偏移
const offsetHeight = 110;
const defaultHeight = 450;
/**
* 器材保养右侧
*/
class EquipmentMaintainRight extends Component {
constructor(props) {
super(props);
this.pageConfig = {
current: 1,
pageSize: 10
};
this.state = {
data: [],
loading: false,
equimentId:null,
pagination: true,
isChecked: false,
selectedRows: [],
selectedRowKeys: [],
dataList: [],
newDataList:[],
totalCount:0,
searchParam:'',
fname:'',
current: 1,
pageSize: 10,
total: 0,
tableHeight:450
};
}
componentDidMount() {
const { pagination } = this.state;
debugger
var box1=document.getElementById("equipmentMaintain-bottom-left");
var box2=document.getElementById("one-div");
if(box1 && box2){ //此处在加一层判断,更加严密,如果box存在的情况下获取
console.log(box1.offsetHeight);
console.log(box2.offsetHeight);
this.setState({
tableHeight:(box1.offsetHeight-box2.offsetHeight)
})
}
}
onChange = (value, item) =>{
debugger
console.log(value, item);
}
onTimeChange= (value, dateString)=> {
console.log('Selected Time: ', value);
console.log('Formatted Selected Time: ', dateString);
}
onOk=(value) =>{
console.log('onOk: ', value);
}
onChangeSelect = (value, item) =>{
console.log(value, item);
}
reload = r => {
this.setState(
{
reload: () => {
r();
this.setState({ selectedRows: [], selectedRowKeys: [] });
}
},
r()
);
};
getAcitonData = () =>{
this.setState({
data:data
})
}
/**
* 分页设置参数
*/
setPageConfig = ({ pageSize, current }) => {
if (pageSize !== undefined) {
this.pageConfig.pageSize = pageSize;
}
if (current !== undefined) {
this.pageConfig.pageNumber = current;
}
};
/**
* 获取表格所选则的行数据
*/
getSelectedRows = (selectedRows, selectedRowKeys) => {
this.setState({ selectedRows, selectedRowKeys });
let { riskSourceId, equipmentId, callBack } = this.props;
// callBack(selectedRowKeys,riskSourceId,equipmentId);
};
searchData =()=>{
let name = this.state.fname;
alert(name)
}
onChange = (e,value) =>{
this.setState({ fname: value });
}
getPanelHeight = () => {
// //计算表格高度
// var box1=document.getElementById("equipmentMaintain-bottom-right");
// if(box1){ //此处在加一层判断,更加严密,如果box存在的情况下获取
// return box1.offsetHeight * 0.91;
// }
return 300
};
SearchChange = (value) => {
alert(value)
}
rowClassName = (record, index) => {
let className = index % 2 ? 'back-01': 'back-02';
return className
}
render() {
let defaultPageConfig = this.pageConfig;
const { current, pageSize, total } = this.state;
let { pagination, isChecked, fname,data,totalCount,selectedRowKeys } = this.state;
return (
<div className="equipmentMaintain-bottom-right" id="equipmentMaintain-bottom-right">
<div className="equipmentMaintain-bottom-right-content">
<div className="one-div">
<div className=" content-font-wenzi"> 中州换流站</div>
</div>
<div className="two-div">
<AmosGridTable
columns={columns}
dataList={data}
isPageable={pagination}
totals={totalCount}
callBack={this.reload}
selectedRowKeys={selectedRowKeys}
getSelectedRows={this.getSelectedRows}
getTableDataAction={this.getAcitonData}
isChecked={isChecked}
setPageConfig={this.setPageConfig}
defaultPageConfig={defaultPageConfig}
getPanelHeight={this.getPanelHeight}
rowClassName={this.rowClassName}
/>
</div>
</div>
</div>
);
}
}
EquipmentMaintainRight.propTypes = {
};
export default EquipmentMaintainRight;
import React, { Component } from 'react';
import EquipmentMaintainLeft from './EquipmentMaintainLeft';
import EquipmentMaintainRight from './EquipmentMaintainRight';
/**
* 器材保养模块
*/
export default class EquipmentMaintainTrain extends Component {
render() {
return (
<div className="equipmentMaintain-safety">
<div className="equipmentMaintain-safty-content">
<div className="equipmentMaintain-top"></div>
<div className="equipmentMaintain-bottom">
<EquipmentMaintainLeft />
<EquipmentMaintainRight />
</div>
</div>
</div>
);
}
}
import React, { Component } from 'react';
import { Tabs } from 'amos-antd';
const { TabPane} = Tabs;
/**
* 消防实力统计详情
*/
class FireStrengthDetail extends Component {
constructor(props) {
super(props);
this.state = {
data: {}
};
}
componentDidMount() {
}
render() {
return (
<div className="fire-strength-detail">
<Tabs defaultactivekey="1" type="card">
<TabPane tab="Tab 1" key="1">
Content of Tab Pane 1
</TabPane>
<TabPane tab="Tab 2" key="2">
Content of Tab Pane 2
</TabPane>
<TabPane tab="Tab 3" key="3">
Content of Tab Pane 3
</TabPane>
</Tabs>
</div>
);
}
}
FireStrengthDetail.propTypes = {
};
export default FireStrengthDetail;
...@@ -5,6 +5,14 @@ import { Store } from 'amos-tool'; ...@@ -5,6 +5,14 @@ import { Store } from 'amos-tool';
import Header from './../main/header'; import Header from './../main/header';
import loadScripts from 'dt2react/lib/utils/loadScripts'; import loadScripts from 'dt2react/lib/utils/loadScripts';
import { outMap } from './../../consts/urlConsts'; import { outMap } from './../../consts/urlConsts';
import { Modal, Select } from 'amos-framework';
import RiskControlTable from './../monitor/statistical/RiskControlTable';
import DangerControlTable from './../monitor/statistical/DangerControlTable';
import AlarmControlTable from './../monitor/statistical/AlarmControlTable';
import CenterLevelLeft from './../monitor/statistical/indexLeft';
import CenterLevelRight from './../monitor/statistical/indexRight';
const lsTool = Store.lsTool; const lsTool = Store.lsTool;
...@@ -21,7 +29,11 @@ class RootView extends Component { ...@@ -21,7 +29,11 @@ class RootView extends Component {
submenu: [], submenu: [],
extendSystem: [], extendSystem: [],
loadAmap: false, loadAmap: false,
BasicMap: null BasicMap: null,
visible1: false,
visible2: false,
visible3: false,
flag:false,
}; };
} }
...@@ -72,7 +84,63 @@ class RootView extends Component { ...@@ -72,7 +84,63 @@ class RootView extends Component {
componentWillUnmount() { componentWillUnmount() {
} }
cancel = () => {
this.setState({
visible1: false,
visible2: false,
visible3: false,
flag:true,
});
}
getContext = (type) => {
const { flag } = this.state;
if(type==='1'){
return <RiskControlTable refresh={flag}/>;
}else if(type==='2'){
return <DangerControlTable refresh={flag} />;
}else if(type==='3'){
return <AlarmControlTable refresh={flag} />;
}
};
ondetails = (type) => {
if(type==='1'){
this.setState({
visible1: true
});
}else if(type==='2'){
this.setState({
visible2: true
});
}else{
this.setState({
visible3: true
});
}
};
render() { render() {
const { visible1,visible2,visible3,flag } = this.state;
let type1="1";
let type2="2";
let type3="3";
const { children } = this.props; const { children } = this.props;
let BasicMap = this.state.BasicMap; let BasicMap = this.state.BasicMap;
return ( return (
...@@ -84,6 +152,49 @@ class RootView extends Component { ...@@ -84,6 +152,49 @@ class RootView extends Component {
{children} {children}
{ this.state.loadAmap && <BasicMap />} { this.state.loadAmap && <BasicMap />}
</div> </div>
<CenterLevelLeft ondetails={ this.ondetails } />
<CenterLevelRight />
<Modal
header="风险管控情况"
visible={visible1}
className="risk-model-model99"
width={'50%'}
noDefaultFooter
content={ this.getContext(type1)}
onCancel={ this.cancel}
destroyOnClose={true}
/>
<Modal
header="隐患管控情况"
visible={visible2}
className="risk-model-model99"
width={'50%'}
noDefaultFooter
content={ this.getContext(type2)}
onCancel={ this.cancel }
destroyOnClose={true}
/>
<Modal
header="告警管控情况"
visible={visible3}
className="risk-model-model99"
width={'50%'}
noDefaultFooter
content={this.getContext(type3)}
onCancel={ this.cancel}
destroyOnClose={true}
/>
</div> </div>
); );
} }
......
import React, { Component } from 'react';
import ReactEcharts from 'amos-viz/lib/echarts';
import { Table } from 'amos-antd';
import AmosGridTable from './../safetyManage/AmosGridTable';
import { Input, Button } from 'amos-antd';
import { DatePicker } from 'amos-antd';
import moment from 'moment';
import dt2react from 'dt2react';
const dateFormatList = ['DD/MM/YYYY', 'DD/MM/YY'];
const { RangePicker } = DatePicker;
const dateFormat = 'YYYY/MM/DD';
const monthFormat = 'YYYY/MM';
import { Select } from 'amos-framework';
const Option = Select.Option;
const Search = Input.Search;
const columns = [
{
title: '序号',
dataIndex: 'key',
width: '10%',
align: 'center', // 设置文本居中的属性
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '换流站名称',
width: '20%',
dataIndex: 'name',
render: val => <span style={{color:"yellow"}}>{val}</span>,
},
{
title: '日巡检计划',
width: '15%',
dataIndex: 'rxjjh',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '月巡检计划',
width: '15%',
dataIndex: 'yxjjh',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '季度巡检计划',
width: '15%',
dataIndex: 'jdxjjh',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '发现隐患数',
width: '10%',
dataIndex: 'fxyhs',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '处理隐患数',
width: '15%',
dataIndex: 'clyhs',
render: val => <span style={{color:"white"}}>{val}</span>,
}
];
const data = [
{
key: '1',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '2',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '3',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '4',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '5',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '6',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '7',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '8',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '9',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '10',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '11',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '12',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '13',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '14',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '15',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '16',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '17',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '18',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '19',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '20',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '21',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '22',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '23',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '225',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '25',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '26',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '27',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '28',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
},
{
key: '29',
name: '复龙换流站',
rxjjh: 170,
yxjjh:100,
jdxjjh:270,
fxyhs: 3,
clyhs:7,
}
];
const selectdata = [
{ id: 0, name: '消防理论知识培训' },
{ id: 1, name: '消防技能培训' },
{ id: 3, name: '设备器材维护管理' },
{ id: 4, name: '火灾隐患管理' },
{ id: 5, name: '用火用电管理' }
];
//偏移
const offsetHeight = 110;
const defaultHeight = 450;
/**
* 安全巡检
*/
class SafetyInspectionLeft extends Component {
constructor(props) {
super(props);
this.pageConfig = {
current: 1,
pageSize: 14
};
this.state = {
data: [],
loading: false,
equimentId:null,
pagination: true,
isChecked: false,
selectedRows: [],
selectedRowKeys: [],
dataList: [],
newDataList:[],
totalCount:0,
searchParam:'',
fname:'',
current: 1,
pageSize: 10,
total: 0,
tableHeight:450
};
}
componentDidMount() {
const { pagination } = this.state;
debugger
var box1=document.getElementById("safetyInspection-bottom-left");
var box2=document.getElementById("one-div");
if(box1 && box2){ //此处在加一层判断,更加严密,如果box存在的情况下获取
console.log(box1.offsetHeight);
console.log(box2.offsetHeight);
this.setState({
tableHeight:(box1.offsetHeight-box2.offsetHeight)
})
}
}
onChange = (value, item) =>{
debugger
console.log(value, item);
}
onTimeChange= (value, dateString)=> {
console.log('Selected Time: ', value);
console.log('Formatted Selected Time: ', dateString);
}
onOk=(value) =>{
console.log('onOk: ', value);
}
onChangeSelect = (value, item) =>{
console.log(value, item);
}
reload = r => {
this.setState(
{
reload: () => {
r();
this.setState({ selectedRows: [], selectedRowKeys: [] });
}
},
r()
);
};
getAcitonData = () =>{
this.setState({
data:data
})
}
/**
* 分页设置参数
*/
setPageConfig = ({ pageSize, current }) => {
if (pageSize !== undefined) {
this.pageConfig.pageSize = pageSize;
}
if (current !== undefined) {
this.pageConfig.pageNumber = current;
}
};
/**
* 获取表格所选则的行数据
*/
getSelectedRows = (selectedRows, selectedRowKeys) => {
this.setState({ selectedRows, selectedRowKeys });
let { riskSourceId, equipmentId, callBack } = this.props;
// callBack(selectedRowKeys,riskSourceId,equipmentId);
};
searchData =()=>{
let name = this.state.fname;
alert(name)
}
onChange = (e,value) =>{
this.setState({ fname: value });
}
getPanelHeight = () => {
//计算表格高度
var box1=document.getElementById("safetyInspection-bottom-left");
if(box1){ //此处在加一层判断,更加严密,如果box存在的情况下获取
return box1.offsetHeight * 0.91
}
};
SearchChange = (value) => {
alert(value)
}
rowClassName = (record, index) => {
let className = index % 2 ? 'back-01': 'back-02';
return className
}
render() {
let defaultPageConfig = this.pageConfig;
const { current, pageSize, total } = this.state;
let { pagination, isChecked, fname,data,totalCount,selectedRowKeys } = this.state;
return (
<div className="safetyInspection-bottom-left" id="safetyInspection-bottom-left">
<div className="safetyInspection-bottom-left-content">
<div className="one-div" id="one-div">
<div className="search-one">
{/* <div className="search-one-button" onClick={this.searchData} /> */}
<div className="search-one-input">
<Search placeholder="搜索" onSearch={this.SearchChange} />
</div>
</div>
</div>
<div className="two-div">
<AmosGridTable
columns={columns}
dataList={data}
isPageable={pagination}
totals={totalCount}
callBack={this.reload}
selectedRowKeys={selectedRowKeys}
getSelectedRows={this.getSelectedRows}
getTableDataAction={this.getAcitonData}
isChecked={isChecked}
setPageConfig={this.setPageConfig}
defaultPageConfig={defaultPageConfig}
getPanelHeight={this.getPanelHeight}
rowClassName={this.rowClassName}
/>
</div>
</div>
</div>
);
}
}
SafetyInspectionLeft.propTypes = {
};
export default SafetyInspectionLeft;
import React, { Component } from 'react';
import SafetyInspectionLeft from './SafetyInspectionLeft';
/**
* 安全巡检模块
*/
export default class SafetyInspection extends Component {
render() {
return (
<div className="safetyInspection-safety">
<div className="safetyInspection-safty-content">
<div className="safetyInspection-top"></div>
<div className="safetyInspection-bottom">
<SafetyInspectionLeft />
</div>
</div>
</div>
);
}
}
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Table } from 'amos-antd';
import { Log } from 'amos-tool';
/**
* 基础信息表格组件
* @class AmosGridTable
* @extends {Component}
*/
class AmosGridTable extends Component {
constructor(props) {
super(props);
this.state = {
selectedRowKeys: [],//表格选择的行key值集合
selectedRows: [],//表格选择的行数据集合
loading: false,//页面是否加载中,默认false
dataList: [],//表格数据集合
size: 'middle',//表格大小
current: props.defaultPageConfig ? props.defaultPageConfig.current : 1,//当前页初始索引0
pageSize: props.defaultPageConfig ? props.defaultPageConfig.pageSize : 10,//当前页数据量
filter: {},//表格过滤条件
totals: 1,//所有数据总和
showFilter: true,
otherFilter: props.otherFilter,
maxHeight: 450
};
}
/**
* 初始获取表格数据
*/
componentDidMount() {
this.props.callBack(this.reload);
this.getHeightOffset();
window.addEventListener('resize', this.onWindowResize);
}
componentWillReceiveProps(nextProps) {
if (nextProps.url !== this.props.url){
this.reload();
}
if (nextProps.otherFilter && nextProps.otherFilter !== this.props.otherFilter){
this.setState({ otherFilter: nextProps.otherFilter }, this.reload);
}
}
componentWillUnmount() {
window.removeEventListener('resize', this.onWindowResize);
}
onWindowResize = (e) => {
this.getHeightOffset();
}
/**
* 获取复选框选择的数据,并进行回调
*/
onSelectChange = (selectedRowKeys,selectedRows) => {
this.setState({
selectedRowKeys,
selectedRows
},this.props.getSelectedRows(selectedRows,selectedRowKeys));
}
/**
* 设置页面数据大小事件
*/
onSizeChange = (current, pageSize) => {
let { setPageConfig } = this.props;
setPageConfig && setPageConfig({ current, pageSize });
this.setState({ current, pageSize },this.reload);
}
/**
* 设置当前页事件
*/
onPaginationChange = (current) => {
let { setPageConfig } = this.props;
setPageConfig && setPageConfig({ current });
this.setState({ current },this.reload);
}
/**
* 获取表格所有的外部按钮封装成数组
*/
getbtns = () => {
let btns = [];
return <div key={`btntool`} className='amos-grid-oper-btn'>{this.props.operBtns}</div>;
}
/**
* 获取表格数据的筛选条件,通过回调获得的,并通过该条件进行表格刷新获取
*/
changeFilters = (obj) => {
let newobj = obj;
let res = {};
let list = Object.keys(newobj);
list.map(e=>{
let varName = newobj[e];
if (varName && varName !== ''){
res[e] = varName;
if (e === 'enabled'){
res[e] = varName === '启用';
}
}
});
this.setState({ filter: res },this.reload);
}
openFilter = () => {
let showFilter = this.state.showFilter;
this.setState({ showFilter: !showFilter });
}
/**
* 获取表格数据(刷新)
*/
reload = () => {
let { current,pageSize,filter,otherFilter } = this.state;
this.props.getTableDataAction({ current: current - 1, pageSize },JSON.stringify(filter),otherFilter);
this.getHeightOffset();
}
/**
* 获取表格内部按钮
*/
addOperateCol =(text,record) =>{
const { operateCol } = this.props;
let operBtns = operateCol(text,record);
return (<div className='operation-buttons'>{operBtns}</div>);
}
showTotal = (total) => {
return `共 ${total} 条`;
}
generateRowkey = (record, index) => {
// return record.id ? record.id : UUID.uuidFast();
return record.key ? record.key : record.id ? record.id : index + (this.state.current - 1) * this.state.pageSize;
// return index + (this.state.current - 1) * this.state.pageSize;
}
getHeightOffset = () => {
let { getPanelHeight } = this.props;
let height = getPanelHeight === undefined ? 450 : getPanelHeight();
height && this.setState({ maxHeight: height });
}
isVisableSearch(columns){
let list = columns;
let res = false;
list.map((e)=>{
if (e.query){
res = true;
return true;
}
});
return res;
}
render() {
const { loading, selectedRowKeys,size,maxHeight } = this.state;
let { columns, isChecked, operateCol, isTreeTable, isPageable, pagination, dataList, totals,rowClassName, onRowClick, onRowDoubleClick } = this.props;
//设置复选框参数
let rowSelection = {
selectedRowKeys: this.props.selectedRowKeys || selectedRowKeys,
onChange: this.onSelectChange
};
//设置是否添加复选框
rowSelection = isChecked ? rowSelection : undefined;
//如果表格各行存在内部按钮,将各个按钮添加到表格列模型中
if (operateCol){
columns[columns.length - 1].render = (text,record) => this.addOperateCol(text,record);
}
let tepmPage = Object.assign({
size: 'small',
total: totals,
current: this.state.current,
pageSize: this.state.pageSize,
onShowSizeChange: this.onSizeChange,
onChange: this.onPaginationChange,
showSizeChanger: true,
showTotal: this.showTotal
}, pagination);
let _tempPagination = isPageable === false ? false :tepmPage;
let bordered = true;
// 当为true 或 undefined时则分页
let _pagination = isPageable === false ? false : _tempPagination;
let divStyle = this.state.showFilter ? 'other-table-bar' : 'table-bar';
let display = this.state.showFilter ? 'block' : 'none';
let searchStyle = { display };
return (
<div className="table-styles">
{ onRowClick ?
<Table
rowKey={isTreeTable ? 'key' : this.generateRowkey}
loading={loading}
rowSelection={rowSelection}
columns={columns}
dataSource={dataList}
pagination={_pagination}
size={size}
bordered={bordered}
scroll={{ y: maxHeight }}
rowClassName={rowClassName}
onRowClick={onRowClick}
/> :
<Table
rowKey={isTreeTable ? 'key' : this.generateRowkey}
loading={loading}
rowSelection={rowSelection}
columns={columns}
dataSource={dataList}
pagination={_pagination}
size={size}
bordered={bordered}
scroll={{ y: maxHeight }}
rowClassName={rowClassName}
onRowDoubleClick={onRowDoubleClick}
/>
}
</div>
);
}
}
AmosGridTable.propTypes = {
url: PropTypes.string,//请求表格数据的url不带参数的
columns: PropTypes.array,//表格列模型
getSelectedRows: PropTypes.func,//获取选择的行数据,用于各个具体的表格回调获取数据。
operBtns: PropTypes.array,//表格外部操作按钮,如'新增','编辑'等
isChecked: PropTypes.bool,//表格是否包含复选框
operateCol: PropTypes.func,//表格内部操作按钮,如'查看详情'等
callBack: PropTypes.func,//获取表格刷新方法,用于各个具体的表格回调获取,方便各种操作后进行表格刷新。
otherFilter: PropTypes.string,//其他查询条件
dataList: PropTypes.array,
getTableDataAction: PropTypes.func,
selectedRowKeys: PropTypes.array,
totals: PropTypes.number,
pagination: PropTypes.any, // 分页props, false时无分页
isPageable: PropTypes.bool, // 是否分页: true 分页, false 不分页, 当为undefined时默认有分页
isTreeTable: PropTypes.bool, // 是否是treeTable 默认非
rowClassName: PropTypes.func,
setPageConfig: PropTypes.func, //把分页参数给父类
defaultPageConfig: PropTypes.object, //父类默认分页参数
getPanelHeight: PropTypes.func
};
AmosGridTable.defaultProps = {
operBtns: [],
dataList: [],
totals: 1,
columns: [],
isChecked: true,
isTreeTable: false,
otherFilter: ''
};
export default AmosGridTable;
import React, { Component } from 'react';
import ReactEcharts from 'amos-viz/lib/echarts';
import { Table } from 'amos-antd';
import AmosGridTable from './AmosGridTable';
import { Input, Button } from 'amos-antd';
import { DatePicker } from 'amos-antd';
import moment from 'moment';
import dt2react from 'dt2react';
const dateFormatList = ['DD/MM/YYYY', 'DD/MM/YY'];
const { RangePicker } = DatePicker;
const dateFormat = 'YYYY/MM/DD';
const monthFormat = 'YYYY/MM';
import { Select } from 'amos-framework';
const Option = Select.Option;
const Search = Input.Search;
const columns = [
{
title: '序号',
dataIndex: 'key',
width: '10%',
align: 'center', // 设置文本居中的属性
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '换流站名称',
width: '20%',
dataIndex: 'name',
render: val => <span style={{color:"yellow"}}>{val}</span>,
},
{
title: '科目数',
width: '10%',
dataIndex: 'kemu',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '次数',
width: '10%',
dataIndex: 'cishu',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '参加人员',
width: '10%',
dataIndex: 'cjry',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '人员达标率',
width: '20%',
dataIndex: 'rydbl',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '最近培训时间',
width: '20%',
dataIndex: 'date',
render: val => <span style={{color:"white"}}>{val}</span>,
}
];
const data = [
{
key: '1',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '2',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '3',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '4',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '5',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '6',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '7',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '8',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '9',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '10',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '11',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '12',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '13',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '14',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '15',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '16',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '17',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '18',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '19',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '20',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '21',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '22',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '23',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '225',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '25',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '26',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '27',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '28',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
},
{
key: '29',
name: '复龙换流站',
kemu: 3,
cishu:4,
cjry: 5,
rydbl:'50%',
date:"2019-01-01"
}
];
const selectdata = [
{ id: 0, name: '消防理论知识培训' },
{ id: 1, name: '消防技能培训' },
{ id: 3, name: '设备器材维护管理' },
{ id: 4, name: '火灾隐患管理' },
{ id: 5, name: '用火用电管理' }
];
//偏移
const offsetHeight = 110;
const defaultHeight = 450;
/**
* 安全培训左侧
*/
class SafteyLeft extends Component {
constructor(props) {
super(props);
this.pageConfig = {
current: 1,
pageSize: 14
};
this.state = {
data: [],
loading: false,
equimentId:null,
pagination: true,
isChecked: false,
selectedRows: [],
selectedRowKeys: [],
dataList: [],
newDataList:[],
totalCount:0,
searchParam:'',
fname:'',
current: 1,
pageSize: 10,
total: 0,
tableHeight:450
};
}
componentDidMount() {
const { pagination } = this.state;
debugger
var box1=document.getElementById("fire-bottom-left");
var box2=document.getElementById("one-div");
if(box1 && box2){ //此处在加一层判断,更加严密,如果box存在的情况下获取
console.log(box1.offsetHeight);
console.log(box2.offsetHeight);
this.setState({
tableHeight:(box1.offsetHeight-box2.offsetHeight)
})
}
}
onChange = (value, item) =>{
debugger
console.log(value, item);
}
onTimeChange= (value, dateString)=> {
console.log('Selected Time: ', value);
console.log('Formatted Selected Time: ', dateString);
}
onOk=(value) =>{
console.log('onOk: ', value);
}
onChangeSelect = (value, item) =>{
console.log(value, item);
}
reload = r => {
this.setState(
{
reload: () => {
r();
this.setState({ selectedRows: [], selectedRowKeys: [] });
}
},
r()
);
};
getAcitonData = () =>{
this.setState({
data:data
})
}
/**
* 分页设置参数
*/
setPageConfig = ({ pageSize, current }) => {
if (pageSize !== undefined) {
this.pageConfig.pageSize = pageSize;
}
if (current !== undefined) {
this.pageConfig.pageNumber = current;
}
};
/**
* 获取表格所选则的行数据
*/
getSelectedRows = (selectedRows, selectedRowKeys) => {
this.setState({ selectedRows, selectedRowKeys });
let { riskSourceId, equipmentId, callBack } = this.props;
// callBack(selectedRowKeys,riskSourceId,equipmentId);
};
searchData =()=>{
let name = this.state.fname;
alert(name)
}
onChange = (e,value) =>{
this.setState({ fname: value });
}
getPanelHeight = () => {
//计算表格高度
var box1=document.getElementById("fire-bottom-left");
if(box1){ //此处在加一层判断,更加严密,如果box存在的情况下获取
return box1.offsetHeight * 0.91
}
};
SearchChange = (value) => {
alert(value)
}
rowClassName = (record, index) => {
let className = index % 2 ? 'back-01': 'back-02';
return className
}
render() {
let defaultPageConfig = this.pageConfig;
const { current, pageSize, total } = this.state;
let { pagination, isChecked, fname,data,totalCount,selectedRowKeys } = this.state;
return (
<div className="fire-bottom-left" id="fire-bottom-left">
<div className="fire-bottom-left-content">
<div className="one-div" id="one-div">
<div className="search-one">
{/* <div className="search-one-button" onClick={this.searchData} /> */}
<div className="search-one-input">
<Search placeholder="搜索" onSearch={this.SearchChange} />
</div>
</div>
<div className="search-two" >
<Select className="search-select-style"
data={selectdata}
renderOption={item => <Option value={item.id}>{item.name}</Option>}
defaultOption={<Option>请选择</Option>}
onChange={this.onChangeSelect}
/>
</div>
<div className="search-three">
<span className="three-font">日期:&nbsp;&nbsp;</span>
<DatePicker
placeholder="年-月-日"
showTime
onChange={this.onTimeChange}
style={{width:'37%'}}
onOk={this.onOk} />
{/* <DatePicker defaultValue={moment('2015/01/01', dateFormat)} format={dateFormat} /> */}
&nbsp;&nbsp;<font style={{color:'#5FFFFD'}}></font>&nbsp;&nbsp;
<DatePicker
placeholder="年-月-日"
showTime
onChange={this.onTimeChange}
style={{width:'37%'}}
onOk={this.onOk} />
</div>
</div>
<div className="two-div">
<AmosGridTable
columns={columns}
dataList={data}
isPageable={pagination}
totals={totalCount}
callBack={this.reload}
selectedRowKeys={selectedRowKeys}
getSelectedRows={this.getSelectedRows}
getTableDataAction={this.getAcitonData}
isChecked={isChecked}
setPageConfig={this.setPageConfig}
defaultPageConfig={defaultPageConfig}
getPanelHeight={this.getPanelHeight}
rowClassName={this.rowClassName}
/>
</div>
</div>
</div>
);
}
}
SafteyLeft.propTypes = {
};
export default SafteyLeft;
import React, { Component } from 'react';
import ReactEcharts from 'amos-viz/lib/echarts';
import { Table } from 'amos-antd';
import AmosGridTable from './AmosGridTable';
import { Input, Button } from 'amos-antd';
import { DatePicker } from 'amos-antd';
import moment from 'moment';
import dt2react from 'dt2react';
const dateFormatList = ['DD/MM/YYYY', 'DD/MM/YY'];
const { RangePicker } = DatePicker;
const dateFormat = 'YYYY/MM/DD';
const monthFormat = 'YYYY/MM';
import { Select } from 'amos-framework';
const Option = Select.Option;
const Search = Input.Search;
const columns = [
{
title: '序号',
dataIndex: 'key',
width: '10%',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '科目名称',
width: '15%',
dataIndex: 'kmmc',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '培训时间',
width: '15%',
dataIndex: 'pxsj',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '参加人数',
width: '10%',
dataIndex: 'cjrs',
render: val => <span style={{color:"white"}}>{val}</span>,
},
{
title: '0-60',
width: '10%',
dataIndex: '0-60',
render: val => <span style={{color:"red"}}>{val}</span>,
},
{
title: '61-85',
width: '10%',
dataIndex: '61-85',
render: val => <span style={{color:"yellow"}}>{val}</span>,
},
{
title: '86-100',
width: '10%',
dataIndex: '86-100',
render: val => <span style={{color:"green"}}>{val}</span>,
}
,
{
title: '达标率%',
width: '10%',
dataIndex: 'dbl',
render: val => <span style={{color:"white"}}>{val}</span>,
}
];
const data = [
{
key: '1',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '2',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '3',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '4',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '5',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '6',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '7',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '8',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '9',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '10',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '11',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '12',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '13',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '14',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '15',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '16',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '17',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '18',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '19',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '20',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '21',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '22',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '23',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '225',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '25',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '26',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '27',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '28',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
},
{
key: '29',
kmmc: '消防技能培训',
pxsj: "2019-01-01",
cjrs:10,
"0-60": 4,
'61-85':'3',
'86-100':"3",
dbl:"60%"
}
];
const selectdata = [
{ id: 0, name: '消防理论知识培训' },
{ id: 1, name: '消防技能培训' },
{ id: 3, name: '设备器材维护管理' },
{ id: 4, name: '火灾隐患管理' },
{ id: 5, name: '用火用电管理' }
];
//偏移
const offsetHeight = 110;
const defaultHeight = 450;
/**
* 安全培训右侧
*/
class SafteyRight extends Component {
constructor(props) {
super(props);
this.pageConfig = {
current: 1,
pageSize: 10
};
this.state = {
data: [],
loading: false,
equimentId:null,
pagination: true,
isChecked: false,
selectedRows: [],
selectedRowKeys: [],
dataList: [],
newDataList:[],
totalCount:0,
searchParam:'',
fname:'',
current: 1,
pageSize: 10,
total: 0,
tableHeight:450
};
}
componentDidMount() {
const { pagination } = this.state;
debugger
var box1=document.getElementById("fire-bottom-left");
var box2=document.getElementById("one-div");
if(box1 && box2){ //此处在加一层判断,更加严密,如果box存在的情况下获取
console.log(box1.offsetHeight);
console.log(box2.offsetHeight);
this.setState({
tableHeight:(box1.offsetHeight-box2.offsetHeight)
})
}
}
onChange = (value, item) =>{
debugger
console.log(value, item);
}
onTimeChange= (value, dateString)=> {
console.log('Selected Time: ', value);
console.log('Formatted Selected Time: ', dateString);
}
onOk=(value) =>{
console.log('onOk: ', value);
}
onChangeSelect = (value, item) =>{
console.log(value, item);
}
reload = r => {
this.setState(
{
reload: () => {
r();
this.setState({ selectedRows: [], selectedRowKeys: [] });
}
},
r()
);
};
getAcitonData = () =>{
this.setState({
data:data
})
}
/**
* 分页设置参数
*/
setPageConfig = ({ pageSize, current }) => {
if (pageSize !== undefined) {
this.pageConfig.pageSize = pageSize;
}
if (current !== undefined) {
this.pageConfig.pageNumber = current;
}
};
/**
* 获取表格所选则的行数据
*/
getSelectedRows = (selectedRows, selectedRowKeys) => {
this.setState({ selectedRows, selectedRowKeys });
let { riskSourceId, equipmentId, callBack } = this.props;
// callBack(selectedRowKeys,riskSourceId,equipmentId);
};
searchData =()=>{
let name = this.state.fname;
alert(name)
}
onChange = (e,value) =>{
this.setState({ fname: value });
}
getPanelHeight = () => {
// //计算表格高度
// var box1=document.getElementById("fire-bottom-right");
// if(box1){ //此处在加一层判断,更加严密,如果box存在的情况下获取
// return box1.offsetHeight * 0.91;
// }
return 300
};
SearchChange = (value) => {
alert(value)
}
rowClassName = (record, index) => {
let className = index % 2 ? 'back-01': 'back-02';
return className
}
render() {
let defaultPageConfig = this.pageConfig;
const { current, pageSize, total } = this.state;
let { pagination, isChecked, fname,data,totalCount,selectedRowKeys } = this.state;
return (
<div className="fire-bottom-right" id="fire-bottom-right">
<div className="fire-bottom-right-content">
<div className="one-div">
<div className=" content-font-wenzi"> 中州换流站</div>
</div>
<div className="two-div">
<AmosGridTable
columns={columns}
dataList={data}
isPageable={pagination}
totals={totalCount}
callBack={this.reload}
selectedRowKeys={selectedRowKeys}
getSelectedRows={this.getSelectedRows}
getTableDataAction={this.getAcitonData}
isChecked={isChecked}
setPageConfig={this.setPageConfig}
defaultPageConfig={defaultPageConfig}
getPanelHeight={this.getPanelHeight}
rowClassName={this.rowClassName}
/>
</div>
</div>
</div>
);
}
}
SafteyRight.propTypes = {
};
export default SafteyRight;
import React, { Component } from 'react';
import SafteyLeft from './SafteyLeft';
import SafteyRight from './SafteyRight';
/**
* 中心级2侧模块
*/
export default class Safety extends Component {
render() {
return (
<div className="fire-safety">
<div className="fire-safty-content">
<div className="fire-top"></div>
<div className="fire-bottom">
<SafteyLeft />
<SafteyRight />
</div>
</div>
</div>
);
}
}
import React, { Component } from 'react';
import ReactEcharts from 'amos-viz/lib/echarts';
/**
* 告警管控
*/
export default class AlarmControl extends Component {
constructor(props) {
super(props);
this.state = {
seriesData:[],
hj:0,
gz:0,
xj:0
};
}
componentDidMount(){
let dates=[
{value:3, name:'火警告警'},
{value:31, name:'故障告警'},
{value:10, name:'巡检告警'},
];
if(dates){
this.setState({ seriesData: dates,hj:dates[0].value,gz:dates[1].value,xj:dates[2].value});
}
}
ondetails = (type) => {
this.props.ondetails("3");
};
//获取告警管控数据
getOptionsx = () => {
const { seriesData } = this.state;
return {
color:['rgba(243, 12, 12, 1)','rgba(219, 121, 23, 1)','rgba(209, 209, 52, 1)'],
series: [
{
name: "",
type: "pie",
radius: ["0%", "55%"],
center: ["50%", "50%"],
label: {
show: false
},
itemStyle: {
normal: {
color: 'rgba(24,219,159,0.1)'
},
},
hoverAnimation: false,
data: [100]
},
{
name:'检查点',
type:'pie',
radius: ['60%', '72%'],
center: ['50%', '50%'],
avoidLabelOverlap: false,
label: {
normal: {
show: true,
position: 'center',
formatter: function(param) {
let total = 0;
seriesData.forEach(e => {
total += e.value;
})
var view = '{val|' +total + '}\n{name|' + '告警总数' + '}';
return view;
},
textStyle: {
rich: {
name: {
fontSize: 12,
fontFamily:'Microsoft YaHei',
color:'rgba(255,255,255,1)',
},
val: {
fontSize: 20,
fontWeight: 'bold',
fontFamily:'Microsoft YaHei',
color: 'rgba(255,255,255,1)',
}
}
}
},
},
labelLine: {
normal: {
show: false
}
},
data:seriesData
}
]
};
}
render() {
const { hj,gz,xj } = this.state;
return (
<div className="AlarmControl">
<div className="AlarmControl_1">
<div className="AlarmControl_1_1"><span>告警管控情况</span></div>
</div>
<div className="AlarmControl_2">
<div className="AlarmControl_2_1" onClick={this.ondetails}> </div>
<div className="AlarmControl_2_2">
<div className="AlarmControl_2_2_1">
<div className="AlarmControl8">
<div className="AlarmControl2">
<div className="AlarmControl2_1">
<div className="AlarmControl2_12"> 火警告警:</div>
<div className="AlarmControl2_13">{hj}</div>
</div>
<div className="AlarmControl2_2"></div>
</div>
<div className="AlarmControl2">
<div className="AlarmControl2_1">
<div className="AlarmControl2_12">故障告警:</div>
<div className="AlarmControl2_13">{gz}</div>
</div>
<div className="AlarmControl2_3"></div>
</div>
<div className="AlarmControl2">
<div className="AlarmControl2_1" >
<div className="AlarmControl2_12">巡检告警:</div>
<div className="AlarmControl2_13">{xj}</div>
</div>
<div className="AlarmControl2_4"></div>
</div>
</div>
</div>
<div className="AlarmControl_2_2_2">
<ReactEcharts option = { this.getOptionsx() } />
</div>
</div>
</div>
</div>
);
}
}
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Form, Input, Select, Radio,StdForm ,Search,Icon,AmosAlert} from 'amos-framework';
import { TreeSelect, DatePicker } from 'amos-antd';
import moment from 'moment';
import InputTable from './InputTable';
import { SingleTable } from 'amos-pro';
const FormItem = Form.Item;
const tableList1 = [
{ name: '复龙换流站1', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站2', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站3', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站4', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站5', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' }
];
const tableList2 = [
{ name: '复龙换流站1', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站2', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站3', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站4', sex: '10', age: 10,age1: 30, address: '10' } ,
{ name: '复龙换流站5', sex: '10', age: 10,age1: 30, address: '10' } ,
];
const data = [
{ id: 0, name: '失控' },
{ id: 1, name: '受控' }
];
const checkInputColumns = (_this) => {
return [
{
title: '换流站',
dataIndex: 'name',
key: 'name',
width: '10%',
query: true,
},
{
title: '火警告警',
dataIndex: 'sex',
key: 'sex',
width: '9%',
query: true,
required: true, //是否是默认显示的
// render: (text,record) => {
// return <p className="yi">{text}</p> ;
// }
},
{
title: '故障报警',
dataIndex: 'age',
key: 'age',
width: '10%',
query: true,
required: true, //是否是默认显示的
// render: (text,record) => {
// return <p className="er">{text}</p> ;
// }
},
{
title: '巡检告警',
dataIndex: 'address',
key: 'address',
width: '10%',
query: true,
required: true, //是否是默认显示的
// render: (text,record) => {
// return <p className="san">{text}</p> ;
// }
},
// {
// title: '四级',
// dataIndex: 'id',
// key: 'id',
// query: true,
// required: true, //是否是默认显示的
// width: '10%',
// render: (text,record) => {
// return <p className="si">{text}</p> ;
// }
// },
{
title: '小计',
dataIndex: 'age1',
key: 'age1',
query: true,
st: 'text', //搜索的类型
width: '10%'
}
];
};
/**
* 风险管控详情
*/
class AlarmControlTable extends Component {
constructor(props) {
super(props);
this.state = {
dataList: [], //表格数据集合
size: 'small', //表格大小
current: props.defaultPageConfig ? props.defaultPageConfig.current : 1, //当前页初始索引0
pageSize: props.defaultPageConfig ? props.defaultPageConfig.pageSize : 2, //当前页数据量
totals: 0, //所有数据总和
reload() {},
maxHeight: 650,
name:"",
startTime: moment().format('YYYY-MM-DD'),
endTime: moment().add(1, "years").format('YYYY-MM-DD'),
};
}
componentWillMount = () => {
this.setState({ dataList:tableList1});
this.setState({ totals:13});
};
componentDidMount = () => {
};
componentWillReceiveProps = (nextProps) => {
}
/**
* 获取表格刷新方法
*/
reload = r => {
this.setState(
{
reload: () => {
r();
}
},
r()
);
};
//搜索
onIconClick1 = () => {
this.setState({ dataList:tableList2});
this.setState({ totals:5});
}
componentWillReceiveProps = (nextProps) => {
debugger
if (nextProps.refresh){
this.setState({ name:"" });
this.setState({ startTime: moment().format('YYYY-MM-DD')});
this.setState({ endTime:moment().add(1, "years").format('YYYY-MM-DD') });
}
}
fillCheckInputTable = param => {
};
onChange1 = (e, value) => {
this.setState({ name:value });
}
onChange = (key, value) => {
debugger
if(key==='name'){
this.setState({ name:value });
}else if(key==='startTime'){
this.setState({ startTime: moment(value).format('YYYY-MM-DD')});
}else{
this.setState({ endTime: moment(value).format('YYYY-MM-DD') });
}
}
render() {
const { dataList,totals ,name,endTime,startTime} = this.state;
return (
<div className="souh" >
<div className="sou">
<div className="inputxq3">
<StdForm >
<Search value={name} className="input_item_select" icon={<Icon icon='search' onClick={ this.onIconClick1} />} onChange={ this.onChange1} />
</StdForm>
</div>
<div className="inputxq">
<StdForm label="日期">
<DatePicker
format="YYYY-MM-DD"
value={moment(startTime)}
className="input_item_select"
onChange={(value2) => { this.onChange('startTime', value2); }}
allowClear={false}
/>
</StdForm>
</div>
<div className="inputxq">
<StdForm label="至">
<DatePicker
format="YYYY-MM-DD"
value={moment(endTime)}
className="input_item_select"
onChange={(value3) => { this.onChange('endTime', value3); }}
allowClear={false}
/>
</StdForm>
</div>
</div>
<div className="inputxqtable">
<InputTable
columns={checkInputColumns(this)}
callBack={this.reload}
dataSource={dataList}
totals={totals}
getTableDataAction={this.fillCheckInputTable}
/>
</div>
</div>
);
}
}
export default AlarmControlTable;
import React, { Component } from 'react';
import ReactEcharts from 'amos-viz/lib/echarts';
import echarts from 'echarts/lib/echarts';
//import { AllSafetyAction } from './../../../services/centerLevelService';
/**
* 总体消防安全情况
*/
const option = {
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b}: {c} ({d}%)"
},
// color: ['#00CACE', '#F70D0E'],
color: ['#F70D0E', '#00CACE'],
graphic: [{ //环形图中间添加文字
type: 'text', //通过不同top值可以设置上下显示
left: 'center',
top: '30%',
style: {
text: '80', //'80' + '\n' + '总数'
textAlign: 'center',
fill: "rgba(255,255,255,1)", //文字的颜色
width: 30,
height: 30,
fontSize: 25,
fontFamily: "Microsoft YaHei",
fontWeight:"bold"
}
},
{ //环形图中间添加文字
type: 'text', //通过不同top值可以设置上下显示
left: 'center',
top: '45%',
style: {
text: '站点',
textAlign: 'center',
fill: "rgba(255,255,255,1)", //文字的颜色
width: 24,
height: 16,
fontSize: 12,
fontFamily: "Microsoft YaHei",
fontWeight:400
}
}],
series: [
{
name: '总体消防安全情况',
type: 'pie',
radius: ['65%', '80%'],
center: ['50%', '40%'],
avoidLabelOverlap: false,
// hoverAnimation: false, //是否突出
labelLine: {
normal: {
show: false
}
},
data: [
{
value: 40,
name: "不合格",
},
{
value: 60,
name: '正常',
}
]
},
{
name: "中间的背景",
type: "pie",
radius: ["0%", "60%"],
center: ["50%", "40%"],
label: {
show: false
},
itemStyle: {
normal: {
color: 'rgba(24,219,159,0.1)'
},
},
//隐藏多余文字提示
label: {
show: false
},
labelLine: {
show: false
},
tooltip: {
show: false
},
// hoverAnimation: false,
data: [100]
}
]
};
class AllSafety extends Component {
constructor(props) {
super(props);
this.state = {
data: {}
};
}
componentDidMount() {
}
getOptionsx = () => {
return option;
}
render() {
return (
<div className="AllSafety">
<div className="all-safety-content">
<div className="all-safety-font">总体消防安全情况</div>
<div className="content-detail">
<div className="all-safety-left">
<ReactEcharts option={this.getOptionsx()} className="div-echars" />
</div>
<div className="all-safety-right">
<div className="all-safety-right-one">
<div className="right-one-font">1</div>
</div>
<div className="all-safety-right-two">
<div className="right-two-font"><span className="jiantou">&darr;</span>-1</div>
</div>
<div className="all-safety-right-three">
<div className="right-three-font">1</div>
</div>
<div className="all-safety-right-four">
<div className="right-four-font"><span className="jiantou">&uarr;</span>+1</div>
</div>
</div>
</div>
</div>
{/* <ReactEcharts option={this.getOptionsx(map)} className='echart-week' /> */}
</div>
);
}
}
AllSafety.propTypes = {
};
export default AllSafety;
import React, { Component } from 'react';
import imgStatic from './../../../consts/imgStatic';
import ReactEcharts from 'amos-viz/lib/echarts';
const centerLevelIcon = imgStatic.centerLevelIcon;
/**
* 隐患管控
*/
export default class DangerControl extends Component {
constructor(props) {
super(props);
this.state = {
seriesData: [],
yq:0,
sw:0,
zl:0,
jd:'0%'
};
}
componentDidMount(){
let dates={jd:'20%',
seriesData: [
{value:35, name:'逾期未治理'},
{value:10, name:'尚未治理'},
{value:4, name:'治理验收'},
]};
if(dates){
this.setState({ seriesData: dates.seriesData,jd:dates.jd,yq:dates.seriesData[0].value,sw:dates.seriesData[1].value,zl:dates.seriesData[2].value});
}
}
ondetails = (type) => {
this.props.ondetails("2");
};
getOptionsx = () => {
const { seriesData} = this.state;
return {
color:['rgba(254, 0, 0, 1)','rgba(255, 214, 0, 1)','rgba(0, 255, 238, 1)'],
series: [
{
name: "",
type: "pie",
radius: ["0%", "55%"],
center: ["50%", "50%"],
label: {
show: false
},
itemStyle: {
normal: {
color: 'rgba(24,219,159,0.1)'
},
},
hoverAnimation: false,
data: [100]
},
{
name:'检查点',
type:'pie',
radius: ['60%', '72%'],
center: ['50%', '50%'],
avoidLabelOverlap: false,
label: {
normal: {
show: true,
position: 'center',
formatter: function(param) {
let total = 0;
seriesData.forEach(e => {
total += e.value;
})
var view = '{val|' +total + '}\n{name|' + '隐患总数' + '}';
return view;
},
textStyle: {
rich: {
name: {
fontSize: 12,
fontFamily:'Microsoft YaHei',
color:'rgba(255,255,255,1)',
},
val: {
fontSize: 20,
fontWeight: 'bold',
fontFamily:'Microsoft YaHei',
color: 'rgba(255,255,255,1)',
}
}
}
},
},
labelLine: {
normal: {
show: false
}
},
data:seriesData
}
]
};
}
render() {
const { yq,sw,zl,jd} = this.state;
return (
<div className='DangerControl'>
<div className="DangerControl_1">
<div className="DangerControl_1_1"><span>隐患管控情况</span></div>
</div>
<div className="DangerControl_2">
<div className="DangerControl_2_1" onClick={this.ondetails}></div>
<div className="DangerControl_2_2">
<div className="DangerControl_2_2_1">
<div className="AlarmControl8">
<div className="AlarmControl2">
<div className="AlarmControl2_1">
<div className="AlarmControl2_12"> 逾期未治理:</div>
<div className="AlarmControl2_13">{yq}</div>
</div>
<div className="AlarmControl2_2"></div>
</div>
<div className="AlarmControl2">
<div className="AlarmControl2_1">
<div className="AlarmControl2_12">尚未治理:</div>
<div className="AlarmControl2_13">{sw}</div>
</div>
<div className="AlarmControl2_3"></div>
</div>
<div className="AlarmControl2">
<div className="AlarmControl2_1">
<div className="AlarmControl2_12">治理验收:</div>
<div className="AlarmControl2_13">{zl}</div>
</div>
<div className="AlarmControl2_4"></div>
</div>
<div className="AlarmControl2">
<div className="AlarmControl2_1">
<div className="AlarmControl2_12">治理进度:</div>
<div className="AlarmControl2_13">{jd}</div>
</div>
<div className="AlarmControl2_6"></div>
</div>
</div>
</div>
<div className="DangerControl_2_2_2">
<ReactEcharts option = { this.getOptionsx() } />
</div>
</div>
</div>
</div>
);
}
}
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Form, Input, Select, Radio,StdForm ,Search,Icon,AmosAlert} from 'amos-framework';
import { TreeSelect, DatePicker } from 'amos-antd';
import moment from 'moment';
import InputTable from './InputTable';
import { SingleTable } from 'amos-pro';
const FormItem = Form.Item;
const Option = Select.Option;
const tableList1 = [
{ id: '1', name: '复龙换流站1', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站2', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站3', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站4', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站5', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' }
];
const tableList2 = [
{ id: '1', name: '复龙换流站1', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站2', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站3', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站4', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站5', sex: '10', age: 10,age1: 30, address: '10' } ,
];
const data = [
{ id: 1, name: '严重' },
{ id: 2, name: '一般' }
];
const checkInputColumns = (_this) => {
return [
{
title: '换流站',
dataIndex: 'name',
key: 'name',
width: '10%',
query: true,
},
{
title: '已治理',
dataIndex: 'sex',
key: 'sex',
width: '9%',
query: true,
required: true, //是否是默认显示的
// render: (text,record) => {
// return <p className="yi">{text}</p> ;
// }
},
{
title: '未治理',
dataIndex: 'age',
key: 'age',
width: '10%',
query: true,
required: true, //是否是默认显示的
// render: (text,record) => {
// return <p className="er">{text}</p> ;
// }
},
{
title: '逾期未治理',
dataIndex: 'address',
key: 'address',
width: '10%',
query: true,
required: true, //是否是默认显示的
// render: (text,record) => {
// return <p className="san">{text}</p> ;
// }
},
{
title: '治理验收',
dataIndex: 'id',
key: 'id',
query: true,
required: true, //是否是默认显示的
width: '10%',
// render: (text,record) => {
// return <p className="si">{text}</p> ;
// }
},
{
title: '小计',
dataIndex: 'age1',
key: 'age1',
query: true,
st: 'text', //搜索的类型
width: '10%'
}
];
};
/**
* 风险管控详情
*/
class DangerControlTable extends Component {
constructor(props) {
super(props);
this.state = {
dataList: [], //表格数据集合
size: 'small', //表格大小
current: props.defaultPageConfig ? props.defaultPageConfig.current : 1, //当前页初始索引0
pageSize: props.defaultPageConfig ? props.defaultPageConfig.pageSize : 2, //当前页数据量
totals: 0, //所有数据总和
reload() {},
maxHeight: 650,
name:"",
startTime: moment().format('YYYY-MM-DD'),
endTime: moment().add(1, "years").format('YYYY-MM-DD'),
grade:""
};
}
componentWillMount = () => {
this.setState({ dataList:tableList1});
this.setState({ totals:13});
};
componentDidMount = () => {
};
componentWillReceiveProps = (nextProps) => {
}
/**
* 获取表格刷新方法
*/
reload = r => {
this.setState(
{
reload: () => {
r();
}
},
r()
);
};
//搜索
onIconClick1 = () => {
this.setState({ dataList:tableList2});
this.setState({ totals:5});
}
componentWillReceiveProps = (nextProps) => {
debugger
if (nextProps.refresh){
this.setState({ name:"" });
this.setState({ startTime: moment().format('YYYY-MM-DD')});
this.setState({ endTime:moment().add(1, "years").format('YYYY-MM-DD') });
this.setState({ grade: "" });
}
}
fillCheckInputTable = param => {
};
onChange1 = (e, value) => {
this.setState({ name:value });
}
onChange = (key, value) => {
if(key==='name'){
this.setState({ name:value });
}else if(key==='startTime'){
this.setState({ startTime: moment(value).format('YYYY-MM-DD')});
}else if(key==='endTime'){
this.setState({ endTime: moment(value).format('YYYY-MM-DD') });
}else{
this.setState({ grade: value });
}
}
render() {
const { dataList,totals ,name,grade,endTime,startTime} = this.state;
return (
<div className="souh" >
<div className="sou">
<div className="inputxq1">
<StdForm >
<Search value={name} className="input_item_select" icon={<Icon icon='search' onClick={ this.onIconClick1} />} onChange={ this.onChange1} />
</StdForm>
</div>
<div className="inputxq">
<StdForm >
<Select
data={data}
value={grade}
renderOption={item => <Option value={item.id}>{item.name}</Option>}
onChange={(value4) => { this.onChange('grade', value4); }}
/>
</StdForm>
</div>
<div className="inputxq">
<StdForm label="日期">
<DatePicker
format="YYYY-MM-DD"
value={moment(startTime)}
className="input_item_select"
onChange={(value2) => { this.onChange('startTime', value2); }}
allowClear={false}
/>
</StdForm>
</div>
<div className="inputxq">
<StdForm label="至">
<DatePicker
value={moment(endTime)}
format="YYYY-MM-DD"
className="input_item_select"
onChange={(value3) => { this.onChange('endTime', value3); }}
allowClear={false}
/>
</StdForm>
</div>
</div>
<div className="inputxqtable">
<InputTable
columns={checkInputColumns(this)}
callBack={this.reload}
dataSource={dataList}
totals={totals}
getTableDataAction={this.fillCheckInputTable}
/>
</div>
</div>
);
}
}
export default DangerControlTable;
import React, { Component } from 'react';
/**
* 消防安全管理
*/
class FireSafety extends Component {
constructor(props) {
super(props);
this.state = {
data: []
};
}
componentDidMount() {
}
// handleData = (data) => {
// let map = new Map();
// if (data && data.length > 0) {
// data.map(item => {
// map.set(item.name, item.value);
// })
// }
// return map;
// }
render() {
return (
<div className="FireSafety">
<div className="fire-safety-content">
<div className="fire-safety-font">消防安全管理(累计)</div>
<div className="fire-safety-tongji">
<div className="content-tongji">
<div className="left-div">
<span className='titleIcon-yjya'></span>
</div>
<span className='fire-safety-wenzi'>应急预案</span>
<span className="right-font">100</span>
</div>
</div>
<div className="fire-safety-tongji">
<div className="content-tongji">
<div className="left-div">
<span className='titleIcon-aqpx' ></span>
</div>
<span className='fire-safety-wenzi'>安全培训</span>
<span className="right-font">123</span>
</div>
</div>
<div className="fire-safety-tongji">
<div className="content-tongji">
<div className="left-div">
<span className='titleIcon-rcxl' ></span>
</div>
<span className='fire-safety-wenzi'>日常训练</span>
<span className="right-font">100</span>
</div>
</div>
<div className="fire-safety-tongji">
<div className="content-tongji">
<div className="left-div">
<span className='titleIcon-qcby'></span>
</div>
<span className='fire-safety-wenzi'>器材保养</span>
<span className="right-font">14445</span>
</div>
</div>
<div className="fire-safety-tongji">
<div className="content-tongji">
<div className="left-div">
<span className='titleIcon-aqxj' ></span>
</div>
<span className='fire-safety-wenzi'>安全巡检</span>
<span className="right-font">800</span>
</div>
</div>
{/**分割线 */}
</div>
</div>
);
}
}
FireSafety.propTypes = {
};
export default FireSafety;
import React, { Component } from 'react';
import { Modal } from 'amos-framework';
import FireStrengthDetail from'./../firestrength/FireStrengthDetail';
/**
* 消防实力统计
*/
class FireStrength extends Component {
constructor(props) {
super(props);
this.state = {
data: {}
};
}
componentDidMount() {
}
onClick=()=>
{
alert(123);
}
render() {
return (
<div className="FireStrength">
<FireStrengthDetail />
<div className="strength-safety-content">
<div className="strength-safety-font">消防实力情况(累计) </div>
<div className="strength-safety-content-box">
<div style={{margin:'auto'}}>
<div className="item" style={{marginTop:"0%"}} onClick={this.onClick} >
<div className="item-content"> <div className="item-img-div"><img className="item-img"src='mods/components/centerLevel/assets/centerLevel/xfsl/zzxfd.png'/></div><span>驻站消防队:</span><span className="item-value">18</span> </div>
</div>
<div className="item">
<div className="item-content"> <div className="item-img-div"><img className="item-img"src='mods/components/centerLevel/assets/centerLevel/xfsl/zzxfy.png'/></div><span>驻站消防员:</span><span className="item-value">300</span> </div>
</div>
<div className="item">
<div className="item-content"> <div className="item-img-div"><img className="item-img"src='mods/components/centerLevel/assets/centerLevel/xfsl/znzs.png'/></div><span>站内值守:</span><span className="item-value">200</span> </div>
</div>
<div className="item">
<div className="item-content"> <div className="item-img-div"><img className="item-img"src='mods/components/centerLevel/assets/centerLevel/xfsl/xfc.png'/></div><span>消防车:</span><span className="item-value">50</span> </div>
</div>
<div className="item">
<div className="item-content"> <div className="item-img-div"> <img className="item-img"src='mods/components/centerLevel/assets/centerLevel/xfsl/xfqc.png'/></div><span>消防器材:</span><span className="item-value">20000</span> </div>
</div>
</div>
</div>
</div>
<Modal
width={1000}
height={1000}
content={<FireStrengthDetail/>}
visible={false}
></Modal>
</div>
);
}
}
FireStrength.propTypes = {
};
export default FireStrength;
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Table } from 'amos-antd';
/**
* 巡检记录详情
*/
class InputTable extends Component {
constructor(props) {
super(props);
this.pageConfig = {
current: props.outterPageConfig ? props.outterPageConfig.current : 1,
pageSize: props.outterPageConfig ? props.outterPageConfig.pageSize : 10
};
this.state = {
loading: false,//页面是否加载中,默认false
dataList: [],//表格数据集合
size: 'middle',//表格大小
current: props.defaultPageConfig ? props.defaultPageConfig.current : 1,//当前页初始索引0
pageSize: props.defaultPageConfig ? props.defaultPageConfig.pageSize : 10,//当前页数据量
totals: 1,//所有数据总和
maxHeight: 250
};
}
/**
* 初始获取表格数据
*/
componentDidMount() {
this.props.callBack(this.reload);
this.getHeightOffset();
window.addEventListener('resize', this.onWindowResize);
}
componentWillUnmount() {
window.removeEventListener('resize', this.onWindowResize);
}
onWindowResize = (e) => {
this.getHeightOffset();
}
/**
* 设置页面数据大小事件
*/
onSizeChange = (current, pageSize) => {
let { setPageConfig } = this.props;
setPageConfig && setPageConfig({ current, pageSize });
this.setState({ current, pageSize },this.reload);
}
/**
* 设置当前页事件
*/
onPaginationChange = (current) => {
let { setPageConfig } = this.props;
setPageConfig && setPageConfig({ current });
this.setState({ current },this.reload);
}
setPageConfig = ({ pageSize,current }) => {
if (pageSize !== undefined) {
this.pageConfig.pageSize = pageSize;
}
if (current !== undefined) {
this.pageConfig.current = current;
}
}
/**
* 获取表格数据(刷新)
*/
reload = () => {
let { current,pageSize } = this.state;
// this.props.getTableDataAction({ current: current - 1, pageSize });
// this.getHeightOffset();
}
showTotal = (total) => {
return `共 ${total} 条`;
}
generateRowkey = (record, index) => {
return record.id ? record.id : index + (this.state.current - 1) * this.state.pageSize;
}
getHeightOffset = () => {
let { getPanelHeight } = this.props;
let height = getPanelHeight === undefined ? '850' : getPanelHeight();
height && this.setState({ maxHeight: height });
}
render() {
let { size, loading, maxHeight } = this.state;
let { columns, dataSource, totals, pagination } = this.props;
let defaultPageConfig = this.pageConfig;
let rowKey = this.generateRowkey;
let _tempPagination = pagination === false ? false : pagination || {
size: 'small',
total: totals,
current: this.state.current,
pageSize: this.state.pageSize,
onShowSizeChange: this.onSizeChange,
onChange: this.onPaginationChange,
showSizeChanger: true,
showTotal: this.showTotal
};
let bordered = true;
// 当为true 或 undefined时则分页
let _pagination = _tempPagination;
return (
<Table
setPageConfig={this.setPageConfig}
loading={loading}
rowKey={rowKey}
columns={columns}
dataSource={dataSource}
bordered={bordered}
pagination={_pagination}
scroll={{ y: maxHeight }}
size={size}
defaultPageConfig={defaultPageConfig}
/>
);
}
}
InputTable.propTypes = {
columns: PropTypes.array,
dataSource: PropTypes.array,
bordered: PropTypes.bool,
pagination: PropTypes.bool,
rowKey: PropTypes.number,
totals: PropTypes.number,
setPageConfig: PropTypes.func, //把分页参数给父类
getTableDataAction: PropTypes.func,
getPanelHeight: PropTypes.func,
callBack: PropTypes.fuc
};
export default InputTable;
import React, { Component } from 'react';
import { RiskControlDetailAction } from './../../../services/centerLevelService';
import moment from 'moment';
const format = 'YYYY-MM-dd';
export default class ModelContent extends Component {
constructor(props) {
super(props);
this.state = {
alarmData: []
};
}
componentDidMount(){
let { type } = this.props;
this.RiskControlDetail(type);
}
RiskControlDetail = (type) => {
RiskControlDetailAction(type).then(data => {
this.setState({
alarmData: data
});
});
}
/**
* 获取标题
*
* @memberof ModelContent
*/
getTitle = (v) => {
const titleParams = {
1: '一级风险点', //一级风险点
2: '二级风险点', //二级风险点
3: '三级风险点', //三级风险点
4: '四级风险点' //四级风险点
};
return titleParams[v];
}
formatData = (str) => {
let date = str.split(' ')[0];
return date;
}
renderContent = (content) =>{
return (
<div className='rows'>
{(content || []).map(itemA => {
return (
<div className='row'>
<span>{itemA.name}</span>
<span className='date'>{this.formatData(itemA.changeDate)}</span>
</div>
);
})}
</div>
);
}
render() {
let { alarmData } = this.state;
let { type } = this.props;
return (
<div className='model-content'>
{(alarmData || []).map(item => {
return (
<div className='content-div'>
<div className='title'>
<span>|</span>
<span className='next-title'>{ type === 'risk' ? this.getTitle(item.typeCode) : item.typeName }</span>
</div>
{this.renderContent(item.content)}
</div>
);
})}
</div>
);
}
}
import React, { Component } from 'react';
import ReactEcharts from 'amos-viz/lib/echarts';
/**
* 风险管控
*/
export default class RiskControl extends Component {
constructor(props) {
super(props);
this.state = {
seriesData:[],
shikong:0,
shoukongx:'0%',
shikongx:'0%',
shoukong:0,
yiji:0,
erji:0,
sanji:0,
siji:0
};
}
componentDidMount() {
let dates={
seriesData:[
{value:3, name:'受控'},
{value:7, name:'失控'},
],
yiji:10,
erji:20,
sanji:30,
siji:40,
shoukongx:'30%',
shikongx:'70%'
};
if(dates){
this.setState({ seriesData: dates.seriesData,
yiji:dates.yiji,
erji:dates.erji,
sanji:dates.sanji,
siji:dates.siji,
shoukongx:dates.shoukongx,
shikongx:dates.shikongx,
shoukong:dates.seriesData[0].value,shikong:dates.seriesData[1].value});
}
}
ondetails = (type) => {
this.props.ondetails("1");
};
getOptionsx = () => {
const { seriesData } = this.state;
return {
color:['rgba(0, 202, 206, 1)','rgba(254, 0, 0, 1)'],
series: [
{
name: "",
type: "pie",
radius: ["0%", "65%"],
center: ["50%", "50%"],
label: {
show: false
},
itemStyle: {
normal: {
color: 'rgba(24,219,159,0.1)'
},
},
hoverAnimation: false,
data: [100]
},
{
name:'检查点',
type:'pie',
radius: ['70%', '85%'],
center: ['50%', '50%'],
avoidLabelOverlap: false,
label: {
normal: {
show: true,
position: 'center',
formatter: function(param) {
let total = 0;
seriesData.forEach(e => {
total += e.value;
})
var view = '{val|' +total + '}\n{name|' + '风险总数' + '}';
return view;
},
textStyle: {
rich: {
name: {
fontSize: 12,
fontFamily:'Microsoft YaHei',
color:'rgba(255,255,255,1)',
},
val: {
fontSize: 20,
fontWeight: 'bold',
fontFamily:'Microsoft YaHei',
color: 'rgba(0,255,238,1)',
}
}
}
},
},
labelLine: {
normal: {
show: false
}
},
data:seriesData
}
]
};
}
render() {
const { shikong,shoukong,shikongx,shoukongx,yiji,erji,sanji,siji} = this.state;
return (
<div className="RiskControl">
<div className="RiskControl_1">
<div className="RiskControl_1_1"><span>风险管控情况</span></div>
</div>
<div className="RiskControl_2">
<div className="RiskControl_2_1" onClick={this.ondetails}></div>
<div className="RiskControl_2_2">
<div className="RiskControl_2_2_1">
<div className="RiskControl_2_2_19">
<div className="RiskControl_2_2_191 shi">{shikongx}</div>
<div className="RiskControl_2_2_192 shi1">失控:{shikong}</div>
</div>
<div className="RiskControl_2_2_19">
<div className="RiskControl_2_2_191 shou">{shoukongx}</div>
<div className="RiskControl_2_2_192 shou1">受控:{shoukong}</div>
</div>
</div>
<div className="RiskControl_2_2_2">
<ReactEcharts option = { this.getOptionsx() } />
</div>
</div>
</div>
<div className="RiskControl_3">
<div className="RiskControl_3_1">
<div className="RiskControl_3_1_1">
<div className="RiskControl_3_1_8">二级:</div>
<div className="RiskControl_3_1_8">{erji}</div>
</div>
<div className="RiskControl_3_1_2"></div>
</div>
<div className="RiskControl_3_1">
<div className="RiskControl_3_1_17">
<div className="RiskControl_3_1_8"> 一级:</div>
<div className="RiskControl_3_1_8">{yiji}</div>
</div>
<div className="RiskControl_3_1_3"></div>
</div>
<div className="RiskControl_3_1">
<div className="RiskControl_3_1_1">
<div className="RiskControl_3_1_8">四级:</div>
<div className="RiskControl_3_1_8">{siji}</div>
</div>
<div className="RiskControl_3_1_4"></div>
</div>
<div className="RiskControl_3_1">
<div className="RiskControl_3_1_17">
<div className="RiskControl_3_1_8">三级:</div>
<div className="RiskControl_3_1_8">{sanji}</div>
</div>
<div className="RiskControl_3_1_5"></div>
</div>
</div>
</div>
);
}
}
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Form, Input, Select, Radio,StdForm ,Search,Icon,AmosAlert} from 'amos-framework';
import { TreeSelect, DatePicker } from 'amos-antd';
import moment from 'moment';
import InputTable from './InputTable';
import { SingleTable } from 'amos-pro';
const FormItem = Form.Item;
const Option = Select.Option;
const tableList1 = [
{ id: '1', name: '复龙换流站1', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站2', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站3', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站4', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站5', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站', sex: '10', age: 10,age1: 30, address: '10' }
];
const tableList2 = [
{ id: '1', name: '复龙换流站1', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站2', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站3', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站4', sex: '10', age: 10,age1: 30, address: '10' } ,
{ id: '1', name: '复龙换流站5', sex: '10', age: 10,age1: 30, address: '10' } ,
];
const data = [
{ id: "1", name: '失控' },
{ id: "2", name: '受控' }
];
const checkInputColumns = (_this) => {
return [
{
title: '换流站',
dataIndex: 'name',
key: 'name',
width: '10%',
query: true,
},
{
title: '一级',
dataIndex: 'sex',
key: 'sex',
width: '9%',
query: true,
required: true, //是否是默认显示的
render: (text,record) => {
return <p className="yi">{text}</p> ;
}
},
{
title: '二级',
dataIndex: 'age',
key: 'age',
width: '10%',
query: true,
required: true, //是否是默认显示的
render: (text,record) => {
return <p className="er">{text}</p> ;
}
},
{
title: '三级',
dataIndex: 'address',
key: 'address',
width: '10%',
query: true,
required: true, //是否是默认显示的
render: (text,record) => {
return <p className="san">{text}</p> ;
}
},
{
title: '四级',
dataIndex: 'id',
key: 'id',
query: true,
required: true, //是否是默认显示的
width: '10%',
render: (text,record) => {
return <p className="si">{text}</p> ;
}
},
{
title: '小计',
dataIndex: 'age1',
key: 'age1',
query: true,
st: 'text', //搜索的类型
width: '10%'
}
];
};
/**
* 风险管控详情
*/
class RiskControlTable extends Component {
constructor(props) {
super(props);
this.state = {
dataList: [], //表格数据集合
size: 'small', //表格大小
current: props.defaultPageConfig ? props.defaultPageConfig.current : 1, //当前页初始索引0
pageSize: props.defaultPageConfig ? props.defaultPageConfig.pageSize : 2, //当前页数据量
totals: 0, //所有数据总和
reload() {},
maxHeight: 650,
name:"",
startTime: moment().format('YYYY-MM-DD'),
endTime: moment().add(1, "years").format('YYYY-MM-DD'),
grade:""
};
}
componentWillMount = () => {
this.setState({ dataList:tableList1});
this.setState({ totals:13});
};
componentDidMount = () => {
};
componentWillReceiveProps = (nextProps) => {
debugger
if (nextProps.refresh){
this.setState({ name:"" });
this.setState({ startTime: moment().format('YYYY-MM-DD')});
this.setState({ endTime:moment().add(1, "years").format('YYYY-MM-DD') });
this.setState({ grade: "" });
}
}
/**
* 获取表格刷新方法
*/
reload = r => {
this.setState(
{
reload: () => {
r();
}
},
r()
);
};
//搜索
onIconClick1 = () => {
this.setState({ dataList:tableList2});
this.setState({ totals:5});
}
fillCheckInputTable = param => {
};
onChange1 = (e, value) => {
debugger
this.setState({ name:value });
}
onChange = (key, value) => {
debugger
if(key==='startTime'){
this.setState({ startTime: moment(value).format('YYYY-MM-DD')});
}else if(key==='endTime'){
this.setState({ endTime: moment(value).format('YYYY-MM-DD') });
}else{
this.setState({ grade: value });
}
}
// renderEndTime(type) {
// debugger
// const { endTime,startTime} = this.state;
// if(type==="1"&&startTime===""){
// return <DatePicker
// format="YYYY-MM-DD"
// className="input_item_select"
// onChange={ e => this.onChange('startTime', e) }
// /> ;
// }else if(type==="1"&&startTime!=""){
// return <DatePicker
// format="YYYY-MM-DD"
// value={moment(startTime)}
// className="input_item_select"
// onChange={ e => this.onChange('startTime', e) }
// /> ;
// }
// if(type==="2"&&endTime===""){
// return <DatePicker
// format="YYYY-MM-DD"
// className="input_item_select"
// onChange={ e => this.onChange('endTime', e) }
// /> ;
// }else if(type==="2"&&endTime!=""){
// return ;
// }
// }
render() {
const { dataList,totals ,name,grade,endTime,startTime} = this.state;
debugger
return (
<div className="souh" >
<div className="sou">
<div className="inputxq1">
<StdForm >
<Search value={name} className="input_item_select" icon={<Icon icon='search' onClick={ this.onIconClick1} />} onChange={ this.onChange1} />
</StdForm>
</div>
<div className="inputxq">
<StdForm >
<Select
data={data}
value={grade}
renderOption={item => <Option value={item.id}>{item.name}</Option>}
onChange={(value4) => { this.onChange('grade', value4); }}
/>
</StdForm>
</div>
<div className="inputxq">
<StdForm label="日期">
<DatePicker
format="YYYY-MM-DD"
className="input_item_select"
value={moment(startTime)}
onChange={ e => this.onChange('startTime', e) }
allowClear={false}
/>
</StdForm>
</div>
<div className="inputxq">
<StdForm label="至">
<DatePicker
value={moment(endTime)}
format="YYYY-MM-DD"
className="input_item_select"
onChange={ e => this.onChange('endTime', e)}
allowClear={false}
/>
</StdForm>
</div>
</div>
<div className="inputxqtable">
<InputTable
columns={checkInputColumns(this)}
callBack={this.reload}
dataSource={dataList}
totals={totals}
getTableDataAction={this.fillCheckInputTable}
/>
</div>
</div>
);
}
}
export default RiskControlTable;
/**
* 告警控制
*/
export const warnController = [
{ key: 'fire', icon: 'model_fire', type: 'fire', label: '火灾告警' },
{ key: 'risk', icon: 'model_risk', type: 'risk', label: '风险异常' },
{ key: 'check', icon: 'model_patrol', type: 'check', label: '巡检异常' }
];
/**
* 安全执行控制
*/
export const warnTypes = [
{ key: 'warn', icon: 'select_warn', unIcon: 'unselect_warn', type: 'warn', label: '巡检异常' },
{ key: 'fire', icon: 'select_fire', unIcon: 'unselect_fire', type: 'fire', label: '火灾告警' },
{ key: 'risk', icon: 'select_risk', unIcon: 'unselect_risk', type: 'risk', label: '风险异常' },
{ key: 'check', icon: 'select_check', unIcon: 'unselect_check', type: 'check', label: '巡检异常' }
];
import React, { Component } from 'react';
import AlarmControl from './AlarmControl';
import DangerControl from './DangerControl';
import RiskControl from './RiskControl';
import AllSafety from './AllSafety';
import FireSafety from './FireSafety';
import FireStrength from './FireStrength';
import AmosWebSocket from 'amos-websocket';
import SysWsURL, { completeToken } from './../../../consts/wsUrlConsts';
import { Modal, Select } from 'amos-framework';
/**
* 中心级2侧模块
*/
export default class Statistical extends Component {
constructor(props) {
super(props);
this.state = {
visible: true
};
}
handleData = (data = {}) => {
console.log('ws data:', data);
data = JSON.parse(JSON.stringify(data));
console.log(data);
let refreshType = data.refreshType;
let content = data.content;
switch (refreshType){
case 'today_safety_index':
console.log('今日安全指数刷新~~~~~~~~~~~~~~~~~~~~');
this.RiskControl.getRiskControl();
break;
case 'fire_safety':
console.log('消防安全执行刷新~~~~~~~~~~~~~~~~~~~~');
this.safetyExecute.DangerControl();
break;
case 'monitor_data':
console.log('设备状态检测数据刷新~~~~~~~~~~~~~~~~~~~~');
this.equipStatus.AlarmControl();
break;
case 'error_status':
console.log('异常区域刷新~~~~~~~~~~~~~~~~~~~~');
break;
case 'week_safety_index':
console.log('一周安全指数趋势刷新~~~~~~~~~~~~~~~~~~~~');
this.AllSafety.AllSafetyData();
break;
case 'today_check_status':
console.log('今日巡检情况刷新~~~~~~~~~~~~~~~~~~~~');
this.FireSafety.FireSafetyData();
break;
case 'today_duty':
this.FireStrength.FireStrengthData();
console.log('今日值班刷新~~~~~~~~~~~~~~~~~~~~');
break;
case 'all':
console.log('首页刷新~~~~~~~~~~~~~~~~~~~~');
this.RiskControl.getRiskControl();
this.safetyExecute.DangerControl();
this.equipStatus.AlarmControl();
this.AllSafety.AllSafetyData();
this.FireSafety.FireSafetyData();
this.FireStrength.FireStrengthData();
break;
default:
console.log(refreshType,':类型不支持');
}
}
cancel = () => {
this.setState({
visible: false
});
}
render() {
const { visible } = this.state;
const wsURL = completeToken(SysWsURL.viewIndexws);
return (
<div className="statistical">
<AmosWebSocket ref={node => this.aws = node} url={wsURL} onMessage={this.handleData} reconnect debug />
<div className="statistical-left">
<RiskControl ref={node => this.RiskControl = node} />
<DangerControl ref={node => this.safetyExecute = node} />
<AlarmControl ref={node => this.equipStatus = node} />
</div>
<div className="statistical-right">
<AllSafety ref={node => this.AllSafety = node} />
<FireSafety ref={node => this.FireSafety = node} />
<FireStrength ref={node => this.FireStrength = node} />
</div>
</div>
);
}
}
import React, { Component } from 'react';
import AlarmControl from './AlarmControl';
import DangerControl from './DangerControl';
import RiskControl from './RiskControl';
import AmosWebSocket from 'amos-websocket';
import SysWsURL, { completeToken } from './../../../consts/wsUrlConsts';
/**
* 全景监控统计
*/
export default class StatisticalLeft extends Component {
constructor(props) {
super(props);
this.state = {
};
}
ondetails = (type) => {
this.props.ondetails(type);
};
componentWillMount = () => {
};
componentWillReceiveProps = (nextProps) => {
}
handleData = (data = {}) => {
console.log('ws data:', data);
data = JSON.parse(JSON.stringify(data));
console.log(data);
let refreshType = data.refreshType;
let content = data.content;
switch (refreshType){
case 'today_safety_index':
console.log('今日安全指数刷新~~~~~~~~~~~~~~~~~~~~');
this.RiskControl.getRiskControl();
break;
case 'fire_safety':
console.log('消防安全执行刷新~~~~~~~~~~~~~~~~~~~~');
this.safetyExecute.DangerControl();
break;
case 'monitor_data':
console.log('设备状态检测数据刷新~~~~~~~~~~~~~~~~~~~~');
this.equipStatus.AlarmControl();
break;
case 'error_status':
console.log('异常区域刷新~~~~~~~~~~~~~~~~~~~~');
break;
case 'all':
console.log('首页左侧刷新~~~~~~~~~~~~~~~~~~~~');
this.RiskControl.getRiskControl();
this.safetyExecute.DangerControl();
this.equipStatus.AlarmControl();
break;
default:
console.log(refreshType,':类型不支持');
}
}
render() {
const wsURL = completeToken(SysWsURL.viewIndexws);
const { flag } = this.state;
return (
<div className="statistical-left">
<AmosWebSocket ref={node => this.aws = node} url={wsURL} onMessage={this.handleData} reconnect debug />
<RiskControl ondetails={this.ondetails} />
<DangerControl ondetails={this.ondetails} />
<AlarmControl ondetails={this.ondetails} />
</div>
);
}
}
import React, { Component } from 'react';
import AllSafety from './AllSafety';
import FireSafety from './FireSafety';
import FireStrength from './FireStrength';
import AmosWebSocket from 'amos-websocket';
import SysWsURL, { completeToken } from '../../../consts/wsUrlConsts';
/**
* 全景监控统计
*/
export default class StatisticalRight extends Component {
handleData = (data = {}) => {
console.log('ws data:', data);
data = JSON.parse(JSON.stringify(data));
console.log(data);
let refreshType = data.refreshType;
let content = data.content;
switch (refreshType){
case 'error_status':
console.log('异常区域刷新~~~~~~~~~~~~~~~~~~~~');
break;
case 'week_safety_index':
console.log('一周安全指数趋势刷新~~~~~~~~~~~~~~~~~~~~');
this.AllSafety.AllSafetyData();
break;
case 'today_check_status':
console.log('今日巡检情况刷新~~~~~~~~~~~~~~~~~~~~');
this.FireSafety.FireSafetyData();
break;
case 'today_duty':
this.FireStrength.FireStrengthData();
console.log('今日值班刷新~~~~~~~~~~~~~~~~~~~~');
break;
case 'all':
console.log('首页右侧刷新~~~~~~~~~~~~~~~~~~~~');
this.AllSafety.AllSafetyData();
this.FireSafety.FireSafetyData();
this.FireStrength.FireStrengthData();
break;
default:
console.log(refreshType,':类型不支持');
}
}
render() {
const wsURL = completeToken(SysWsURL.viewIndexws);
return (
<div className="statistical-right">
<AmosWebSocket ref={node => this.aws = node} url={wsURL} onMessage={this.handleData} reconnect debug />
<AllSafety ref={node => this.AllSafety = node} />
<FireSafety ref={node => this.FireSafety = node} />
<FireStrength ref={node => this.FireStrength = node} />
</div>
);
}
}
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