Commit d9dc514c authored by 张博's avatar 张博

jiejuechogntu

parents 8d5a96a1 3b84a5cf
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>IconFont Demo</title> <title>IconFont Demo</title>
<link rel="shortcut icon" href="https://gtms04.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico" type="image/x-icon"/> <link rel="shortcut icon" href="https://img.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico" type="image/x-icon"/>
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css"> <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
<link rel="stylesheet" href="demo.css"> <link rel="stylesheet" href="demo.css">
<link rel="stylesheet" href="iconfont.css"> <link rel="stylesheet" href="iconfont.css">
...@@ -31,6 +31,12 @@ ...@@ -31,6 +31,12 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon fasicon">&#xe60b;</span>
<div class="name">search-pane</div>
<div class="code-name">&amp;#xe60b;</div>
</li>
<li class="dib">
<span class="icon fasicon">&#xe60a;</span> <span class="icon fasicon">&#xe60a;</span>
<div class="name">任务列表</div> <div class="name">任务列表</div>
<div class="code-name">&amp;#xe60a;</div> <div class="code-name">&amp;#xe60a;</div>
...@@ -1179,6 +1185,15 @@ ...@@ -1179,6 +1185,15 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon fasicon fasicon-chaxun"></span>
<div class="name">
search-pane
</div>
<div class="code-name">.fasicon-chaxun
</div>
</li>
<li class="dib">
<span class="icon fasicon fasicon-renwuliebiao"></span> <span class="icon fasicon fasicon-renwuliebiao"></span>
<div class="name"> <div class="name">
任务列表 任务列表
...@@ -2856,6 +2871,14 @@ ...@@ -2856,6 +2871,14 @@
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#fasicon-chaxun"></use>
</svg>
<div class="name">search-pane</div>
<div class="code-name">#fasicon-chaxun</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#fasicon-renwuliebiao"></use> <use xlink:href="#fasicon-renwuliebiao"></use>
</svg> </svg>
<div class="name">任务列表</div> <div class="name">任务列表</div>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,6 +6,13 @@ ...@@ -6,6 +6,13 @@
"description": "", "description": "",
"glyphs": [ "glyphs": [
{ {
"icon_id": "14970084",
"name": "search-pane",
"font_class": "chaxun",
"unicode": "e60b",
"unicode_decimal": 58891
},
{
"icon_id": "13937674", "icon_id": "13937674",
"name": "任务列表", "name": "任务列表",
"font_class": "renwuliebiao", "font_class": "renwuliebiao",
......
...@@ -20,6 +20,9 @@ Created by iconfont ...@@ -20,6 +20,9 @@ Created by iconfont
/> />
<missing-glyph /> <missing-glyph />
<glyph glyph-name="chaxun" unicode="&#58891;" d="M819.8 141.9L703.1 258.6c12.4 17.2 22.9 35.8 31.2 55.5 14.5 34.5 21.8 71.1 21.8 108.8s-7.4 74.3-21.8 108.8c-14 33.3-34.1 63.2-59.6 88.9-25.5 25.6-55.2 45.8-88.5 60-34.5 14.5-70.9 21.9-108.4 21.9-37.6 0-74.1-7.4-108.4-22.1-33.1-14.1-62.9-34.2-88.5-60-25.6-25.8-45.7-55.7-59.6-88.9-14.5-34.5-21.8-71.1-21.8-108.8s7.4-74.3 21.8-108.8c14-33.3 34.1-63.2 59.6-88.9 25.5-25.6 55.2-45.8 88.5-60 34.3-14.6 70.7-22 108.4-22 37.5 0 74 7.4 108.4 22 19.9 8.5 38.8 19.2 56.1 31.9l116.5-116.5c8.4-8.4 19.5-12.6 30.5-12.6 11.1 0 22.1 4.2 30.6 12.6l0.1 0.1c16.7 17.2 16.6 44.7-0.2 61.4z m-138 280.9c0-113.2-91.5-205.2-204-205.2s-204 92.1-204 205.2S365.3 628 477.8 628s204-92.1 204-205.2z" horiz-adv-x="1024" />
<glyph glyph-name="renwuliebiao" unicode="&#58890;" d="M594.1248 22.784H483.9936V742.7584a52.5312 52.5312 0 0 0 55.04 50.7904 55.4496 55.4496 0 0 0 55.04-50.8416v-719.9232zM191.744 382.7712h559.0528a38.4512 38.4512 0 0 1 29.6448 12.6976l80.4864 93.184a33.2288 33.2288 0 0 1 0 46.592l-80.4864 88.9344a38.4512 38.4512 0 0 1-29.6448 12.6976H191.744a37.3248 37.3248 0 0 1-38.0928-33.8944V420.864a37.9392 37.9392 0 0 1 38.0928-38.0928M742.8096 344.6784L297.984 272.2304a60.2112 60.2112 0 0 1-25.6-8.448l-58.112-58.9312c-8.448-8.448-8.448-16.9472 4.2496-21.1968l71.9872-38.144a53.7088 53.7088 0 0 1 25.6-4.2496l452.4544 75.008c16.9472 4.2496 21.504 15.36 19.7632 33.536l-11.1616 71.424c0 20.48-17.5616 27.5968-34.5088 23.3472" horiz-adv-x="1024" /> <glyph glyph-name="renwuliebiao" unicode="&#58890;" d="M594.1248 22.784H483.9936V742.7584a52.5312 52.5312 0 0 0 55.04 50.7904 55.4496 55.4496 0 0 0 55.04-50.8416v-719.9232zM191.744 382.7712h559.0528a38.4512 38.4512 0 0 1 29.6448 12.6976l80.4864 93.184a33.2288 33.2288 0 0 1 0 46.592l-80.4864 88.9344a38.4512 38.4512 0 0 1-29.6448 12.6976H191.744a37.3248 37.3248 0 0 1-38.0928-33.8944V420.864a37.9392 37.9392 0 0 1 38.0928-38.0928M742.8096 344.6784L297.984 272.2304a60.2112 60.2112 0 0 1-25.6-8.448l-58.112-58.9312c-8.448-8.448-8.448-16.9472 4.2496-21.1968l71.9872-38.144a53.7088 53.7088 0 0 1 25.6-4.2496l452.4544 75.008c16.9472 4.2496 21.504 15.36 19.7632 33.536l-11.1616 71.424c0 20.48-17.5616 27.5968-34.5088 23.3472" horiz-adv-x="1024" />
......
...@@ -57,7 +57,8 @@ export default { ...@@ -57,7 +57,8 @@ export default {
play: require('../assets/convertor/3dview/datapanel/play.png'), play: require('../assets/convertor/3dview/datapanel/play.png'),
search: require('../assets/convertor/3dview/datapanel/search.png'), search: require('../assets/convertor/3dview/datapanel/search.png'),
smilingFace: require('../assets/convertor/3dview/datapanel/smilingFace.png'), smilingFace: require('../assets/convertor/3dview/datapanel/smilingFace.png'),
user: require('../assets/convertor/3dview/datapanel/user.png') user: require('../assets/convertor/3dview/datapanel/user.png'),
searchPane: require('../assets/convertor/3dview/actionbars/chaxun.png'),
}, },
markers: { markers: {
riskSource_0: require('../assets/convertor/3dview/markers/risk-0.png'), riskSource_0: require('../assets/convertor/3dview/markers/risk-0.png'),
......
...@@ -13,13 +13,11 @@ ...@@ -13,13 +13,11 @@
@import './actionbar.scss'; @import './actionbar.scss';
@import './moduleEdit.scss'; @import './moduleEdit.scss';
@import './searchpane.scss'; @import './searchpane.scss';
@import './reservePlan.scss';
@import './../assets/bizFont/iconfont.css'; @import './../assets/bizFont/iconfont.css';
@import './../assets/amosFont/iconfont.css'; @import './../assets/amosFont/iconfont.css';
.obj-loading-coms { .obj-loading-coms {
position: absolute; position: absolute;
top: 50%; top: 50%;
...@@ -133,5 +131,3 @@ ...@@ -133,5 +131,3 @@
border-image-slice: 50 50 50 50; border-image-slice: 50 50 50 50;
border-image-repeat: stretch; border-image-repeat: stretch;
} }
...@@ -40,13 +40,15 @@ ...@@ -40,13 +40,15 @@
// border-image:linear-gradient(90deg,rgba(50,217,239,0) 2%,rgba(50,217,239,0.49) 29%,rgba(50,217,239,0.73) 73%,rgba(50,217,239,0) 100%); // border-image:linear-gradient(90deg,rgba(50,217,239,0) 2%,rgba(50,217,239,0.49) 29%,rgba(50,217,239,0.73) 73%,rgba(50,217,239,0) 100%);
} }
} }
.quipBtn {
width: 169px; .quipBtn {
height: 44px; width: 169px;
background: url('/mods/components/3dviewConvertor/assets/convertor/moduleEdit/quip.png') no-repeat 100% 100%; height: 44px;
margin-top: 10px; margin-top: 10px;
margin-left: 70px; margin-left: 70px;
} cursor: pointer;
background: url('/mods/components/3dviewConvertor/assets/convertor/moduleEdit/quip.png') no-repeat 100% 100%;
}
} }
.bottomBox { .bottomBox {
position: absolute; position: absolute;
......
...@@ -365,53 +365,54 @@ ...@@ -365,53 +365,54 @@
} }
} }
.reserve-plan-root{ .reserve-plan-root {
height: 80px; height: 80px;
.operate-button-root + .operate-button-root { .operate-button-root + .operate-button-root {
padding-left: 35px; padding-left: 35px;
margin-left: 20px; margin-left: 20px;
} }
%operate-button-root-common { %operate-button-root-common {
display: flex; display: flex;
align-items: center; align-items: center;
width: 250px; width: 250px;
} }
.operate-button-display-root{
.operate-button-display-root {
justify-content: center; justify-content: center;
} }
.operate-button-root{ .operate-button-root {
width: 250px; width: 250px;
justify-content: center; justify-content: center;
.operate-button-left{ .operate-button-left {
img{ img {
// width: 20px !important; // width: 20px !important;
// height: 20px !important // height: 20px !important
} }
.operate-button-content{ .operate-button-content {
margin-left: 5px; margin-left: 5px;
font-weight: 500; font-weight: 500;
line-height: 15px; line-height: 15px;
width: 170px; width: 170px;
.button-name{ .button-name {
font-size: 14px !important font-size: 14px !important
} }
.button-desc{ .button-desc {
font-size: 8px !important font-size: 8px !important
} }
} }
} }
.operate-button-right{ .operate-button-right {
width: 77px; width: 77px;
.operate-button-button{ .operate-button-button {
margin-left: 10px; margin-left: 10px;
width: 70px; width: 70px;
height: 31px; height: 31px;
...@@ -434,7 +435,7 @@ ...@@ -434,7 +435,7 @@
.quit-btn { .quit-btn {
margin-top: 10px; margin-top: 10px;
img{ img {
width: 17px width: 17px
} }
} }
......
.step-cxt-root {
z-index: 9;
.drawer-content {
width: $content-width;
height: 100%;
// background: $content-bg;
// border-radius: 1rem 1rem 0 0;
background-image: url('../assets/convertor/3dview/prePlan/zhixingtanchuang.png');
background-repeat: no-repeat;
-moz-background-size: 100% 100%;
background-size: 100% 100%;
.drawer-content-header {
display: flex;
height: $content-header-height;
font-size: 1.25rem;
line-height: 1.8;
align-items: center;
justify-content: space-between;
text-align: center;
.drawer-content-header-title {
display: inline-block;
// height: $content-header-height;
width: 87px;
margin: 0 auto;
font-family: 'PingFangSC-Semibold';
font-size: 15px;
font-weight: 600;
line-height: 26px;
color: white;
span {
margin-left: 0.5rem;
}
}
.drawer-content-header-close {
width: $content-header-height;
height: $content-header-height;
text-align: center;
cursor: pointer;
i {
font-size: 1.7rem;
line-height: 1.5;
color: red;
}
}
}
.drawer-content-body {
height: calc(100% - 4.5rem);
min-height: 3rem;
overflow: auto;
color: white;
}
::-webkit-scrollbar {
/* 隐藏滚轮 */
display: none;
}
}
}
%operate-button-root-common {
display: flex;
align-items: center;
width: 400px;
height: 65px;
justify-content: space-between;
.operate-button-left {
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
img{
width: 30px;
height: 30px;
}
.operate-button-content {
margin-left: 15px;
font-family: 'PingFangSC-Semibold';
font-weight: 600;
line-height: 26px;
color: white;
.button-name {
font-size: 15px;
}
.button-desc {
font-size: 10px;
}
}
}
.operate-button-right {
width: 91px;
.operate-button-button {
width: 91px;
height: 35px;
padding: 0 1rem;
color: white;
background-repeat: no-repeat;
background-size: 100% 100%;
border-radius: 4px;
opacity: 1;
}
.amos-btn + .amos-btn {
margin-left: 0;
}
:nth-child(2) {
margin-top: 2px;
}
}
}
.operate-button-root {
@extend %operate-button-root-common;
}
.operate-button-root + .operate-button-root {
padding-left: 19px;
margin-left: 19px;
border-left: 2px solid #13b1d4;
}
.step-cxt-line-root {
display: flex;
align-items: center;
height: 63px;
margin: 10px 15px 0;
margin-top: 10px;
justify-content: space-between;
background: linear-gradient(180deg, rgba(9, 65, 124, 1) 0%, rgba(0, 0, 0, 0) 100%);
border: 1px solid rgba(255, 195, 0, 1);
.step-cxt-line-left {
display: flex;
padding-left: 20px;
align-items: center;
flex: 0 0 40%;
}
.step-cxt-line-content {
margin-left: 15px;
font-size: 15px;
}
.step-cxt-line-right {
padding-right: 20px;
.operate-button-button {
width: 91px;
height: 35px;
padding: 0 8px;
color: white;
background-repeat: no-repeat;
background-size: 100% 100%;
opacity: 1;
}
}
}
.reserve-plan-root {
@extend %plan-border-img;
display: flex;
height: 100px;
align-items: center;
justify-content: center;
border-image: url('../assets/convertor/3dview/prePlan/jiaohuqu-duan.png');
}
.operate-button-display-root {
@extend %operate-button-root-common;
.render-spinner-stick {
width: 21px;
background: #ffc000;
}
}
...@@ -94,12 +94,28 @@ ...@@ -94,12 +94,28 @@
float: left; float: left;
} }
.params-input{ .params-input-img{
float: left;
position: absolute;
width: 28px;
height: 28px;
right: 14px;
.params-input-img{ }
// .params-datePicker{
.ant-input{
background-color: #13428f;
border: none !important;
border-radius: 5px;
color: white;
} }
// }
.ant-calendar-picker-icon:after{
color: white;
}
::-webkit-input-placeholder {
color: white;
} }
} }
...@@ -108,7 +124,7 @@ ...@@ -108,7 +124,7 @@
} }
.search-pane-table{ // .search-pane-table{
.ant-table-title{ .ant-table-title{
display: none; display: none;
} }
...@@ -129,6 +145,13 @@ ...@@ -129,6 +145,13 @@
overflow: hidden !important; overflow: hidden !important;
} }
.ant-table-placeholder {
position: absolute;
width: 100%;
top: 55px;
border: none !important;
}
.ant-table-body { .ant-table-body {
color: white; color: white;
...@@ -153,6 +176,7 @@ ...@@ -153,6 +176,7 @@
} }
} }
} }
.ant-table-placeholder{ .ant-table-placeholder{
background:transparent!important; background:transparent!important;
color: white; color: white;
...@@ -193,6 +217,8 @@ ...@@ -193,6 +217,8 @@
background: rgba(39,85,162,1); background: rgba(39,85,162,1);
} }
} }
} }
...@@ -213,9 +239,15 @@ ...@@ -213,9 +239,15 @@
.ant-pagination-item{ .ant-pagination-item{
background-color: rgba(255,255,255,0.5); background-color: rgba(255,255,255,0.5);
} }
.ant-pagination-jump-prev {
background-color: rgba(255,255,255,0.5);
}
.ant-pagination-jump-next {
background-color: rgba(255,255,255,0.5);
}
.ant-pagination-item-active a, .ant-pagination-item-active:focus a, .ant-pagination-item-active:hover a { .ant-pagination-item-active a, .ant-pagination-item-active:focus a, .ant-pagination-item-active:hover a {
color: #fff; color: #fff;
} }
} }
} // }
} }
\ No newline at end of file
...@@ -3,34 +3,41 @@ ...@@ -3,34 +3,41 @@
// height: 100%; // height: 100%;
// width: 100%; // width: 100%;
.statistical-left { .statistical-left {
position: absolute; position: absolute;
height: 100%; height: 100%;
width: 350px; width: 350px;
float: left; float: left;
z-index: 1; z-index: 1;
color: white; color: white;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.equipStatusList {
padding-left: 97px;
padding-top: 10px;
flex-grow: 1;
overflow-y: auto;
.title-child{
width: 100%;
height: 55px;
//margin-top: 5px;
}
.title-date{
height: 20px;
font-size: 13px;
}
.title-text{
font-size: 15px;
}
}
.equipStatusList{
padding-left: 97px;
padding-top: 10px;
flex-grow: 1;
.title-child{ ::-webkit-scrollbar {
width: 100%; /* 隐藏滚轮 */
height: 55px; display: none;
//margin-top: 5px; }
}
.title-date{
height: 20px;
font-size: 13px;
}
.title-text{
font-size: 15px;
}
}
.safetyExecuteList{ .safetyExecuteList{
flex: 2; flex: 2;
...@@ -114,7 +121,6 @@ ...@@ -114,7 +121,6 @@
width: 90%; width: 90%;
span{ span{
position: absolute;
margin-top: 3px; margin-top: 3px;
font-size: 14px; font-size: 14px;
color: rgba(255,255,255,1); color: rgba(255,255,255,1);
...@@ -156,9 +162,7 @@ ...@@ -156,9 +162,7 @@
height: 100%; height: 100%;
margin-left: 30px; margin-left: 30px;
margin-right: 20px; margin-right: 20px;
&:hover{ cursor: pointer;
background-color: rgba(199,223,245,0.3);
}
.content-item { .content-item {
margin: 5px; margin: 5px;
...@@ -473,56 +477,65 @@ ...@@ -473,56 +477,65 @@
text-align: right; text-align: right;
margin-top: 5px; margin-top: 5px;
margin-right: 3px; margin-right: 3px;
float: right;
// margin-top: 5px;
// margin-right: 3px;
img{ img{
cursor: pointer; cursor: pointer;
} }
} }
.model-line{
float: left;
display: inline;
width: 32%;
height: 88%;
text-align: center;
padding-left: 35px;
margin-top: 5px;
margin-left: 10px;
overflow: auto;
.model-title{
height: 30px;
font-size:16px;
color:rgba(240,223,45,1);
padding-top: 10px;
}
.model-content{
.content-div{ &-body {
min-width: 80px; display: flex;
min-height: 120px; height: calc(100% - 50px);
text-align: left;
padding-top: 20px;
.title{ .model-line {
height: 30px; height: 88%;
font-size: 16px; margin-top: 5px;
color:rgba(240,223,45,1); text-align: center;
} flex: 1;
.next-title{
padding-left: 5px; &-img {
} height: 30px;
.rows{ }
padding-left: 15px;
font-size: 14px; .model-title {
color:rgba(255,255,255,1); height: 30px;
.row{ font-size: 16px;
display: inline-block; color:rgba(240,223,45,1);
height: 28px; }
.model-content {
height: calc(100% - 60px);
padding-left: 10px;
overflow: auto;
.content-div {
min-width: 80px;
min-height: 120px;
padding-top: 20px;
text-align: left;
.title {
height: 30px;
font-size: 16px;
color:rgba(240,223,45,1);
} }
.date{
padding-left: 25px; .next-title {
padding-left: 5px;
}
.rows {
padding-left: 15px;
font-size: 14px;
color:rgba(255,255,255,1);
.row {
display: inline-block;
height: 28px;
}
.date {
padding-left: 25px;
}
} }
} }
} }
......
...@@ -98,7 +98,7 @@ class LayerPool extends Component { ...@@ -98,7 +98,7 @@ class LayerPool extends Component {
let wsURL = AmosConfig.wsURI.securityBaseURI + 'plan'; let wsURL = AmosConfig.wsURI.securityBaseURI + 'plan';
return ( return (
<div className="layer-pool"> <div className="layer-pool">
<AmosWebSocket ref={node => this.aws = node} url={wsURL} onMessage={this.handleData} reconnect debug /> <AmosWebSocket ref={node => this.aws = node} url={wsURL} onMessage={this.handleData} reconnect debug />
<SidePane <SidePane
className={displayDetail ? 'precontrol-sidePlan-detail-display' : 'precontrol-sidePlan-detail'} className={displayDetail ? 'precontrol-sidePlan-detail-display' : 'precontrol-sidePlan-detail'}
left={false} left={false}
......
...@@ -91,6 +91,7 @@ class MaskContent extends Component { ...@@ -91,6 +91,7 @@ class MaskContent extends Component {
headerName, headerName,
errorAreaId errorAreaId
} = this.props; } = this.props;
alarmStarted && this.props.editModelChange(true);
const wsURL = completeToken(SysWsURL.rulews); const wsURL = completeToken(SysWsURL.rulews);
const controlAnimation = { const controlAnimation = {
animateName: 'zoom-comb-left', animateName: 'zoom-comb-left',
...@@ -121,13 +122,12 @@ class MaskContent extends Component { ...@@ -121,13 +122,12 @@ class MaskContent extends Component {
return ( return (
<div className="mask-content"> <div className="mask-content">
<AmosWebSocket ref={node => this.aws = node} url={wsURL} onMessage={this.handleData} reconnect debug /> <AmosWebSocket ref={node => this.aws = node} url={wsURL} onMessage={this.handleData} reconnect debug />
{ sideControlShow && <SideControl multiple={multiple} errorAreaId={errorAreaId} onItemClick={onItemClick} layerConfig={layerConfig} animationProps={controlAnimation} />} { !alarmStarted && sideControlShow && <SideControl multiple={multiple} errorAreaId={errorAreaId} onItemClick={onItemClick} layerConfig={layerConfig} animationProps={controlAnimation} />}
{/* <SideControl multiple={multiple} errorAreaId={errorAreaId} onItemClick={onItemClick} layerConfig={layerConfig} animationProps={controlAnimation} /> */} { !alarmStarted && sideControlShow && <DataPane animationProps={datapaneAnim} />}
{ sideControlShow && <DataPane animationProps={datapaneAnim} />} { !alarmStarted && <SearchPane visible={searchPaneVisible} changeSearchPaneVisible={() => this.changeSearchPaneVisible} />}
<SearchPane visible={searchPaneVisible} changeSearchPaneVisible={() => this.changeSearchPaneVisible}/>
<TopMsg alarmStart={alarmStart} /> <TopMsg alarmStart={alarmStart} />
{!isShowActionBar && <ModelHeader headerName={headerName} handleExceptModel={this.handleExceptModel} />} { !alarmStarted && !isShowActionBar && <ModelHeader animationProps={controlAnimation} headerName={headerName} handleExceptModel={this.handleExceptModel} />}
{isShowActionBar && <ActionBar activeAction={activeAction} onActionItemClick={(e) => this.actionBarClick(e)} animationProps={controlAnimation}/> } { !alarmStarted && isShowActionBar && <ActionBar activeAction={activeAction} onActionItemClick={(e) => this.actionBarClick(e)} animationProps={controlAnimation} /> }
{alarmStarted && <LayerPool animationProps={layerPoolAnimation} planStart={planStart} planQuit={planQuit} planStarted={planStarted} />} {alarmStarted && <LayerPool animationProps={layerPoolAnimation} planStart={planStart} planQuit={planQuit} planStarted={planStarted} />}
</div> </div>
); );
......
...@@ -200,6 +200,7 @@ class View3D extends Component { ...@@ -200,6 +200,7 @@ class View3D extends Component {
tirggerTransTopic(CONSTS.forward, { details: { type: 'prePlan', show: false }, dateTime: Date.now() }); tirggerTransTopic(CONSTS.forward, { details: { type: 'prePlan', show: false }, dateTime: Date.now() });
removeFireAlarm2(this); removeFireAlarm2(this);
this.cameraFactory.fitView(desigerHelperConfig.cameraEffect); this.cameraFactory.fitView(desigerHelperConfig.cameraEffect);
this.quitEditMode();
}; };
alarmStart = () => { alarmStart = () => {
...@@ -728,56 +729,55 @@ class View3D extends Component { ...@@ -728,56 +729,55 @@ class View3D extends Component {
} }
//选中区域变化 //选中区域变化
selectItemChange = (selectArea) => { selectItemChange = (selectArea) => {
this.state.selectArea = selectArea
this.setState({ this.setState({
selectArea: selectArea, selectArea,
showRightPanel: true showRightPanel: true
}) });
} }
//选中点变化 //选中点变化
selectPointChange = (selectPoints) => { selectPointChange = (selectPoints) => {
this.setState({ this.setState({
selectPoints: selectPoints, selectPoints,
showRightPanel: true showRightPanel: true
}) });
} }
getAreas = (treeData) => { getAreas = (treeData) => {
let { dragItem } = this.state; let { dragItem } = this.state;
// console.log(treeData) // console.log(treeData)
// let areas = []; // let areas = [];
if (treeData&&treeData.length>0) { if (treeData && treeData.length > 0) {
treeData.map((item) => { treeData.map((item) => {
if (item.isRegion && item.isBind) { if (item.isRegion && item.isBind) {
if (item.children&&item.children.length > 0) { if (item.children && item.children.length > 0) {
if (dragItem) { if (dragItem) {
if ( dragItem.parentId && dragItem.parentId == item.id) { if ( dragItem.parentId && dragItem.parentId == item.id) {
this.areas.push(<PolygonRegion {...this.areaStyles.normal} points={item.routePath?JSON.parse(item.routePath).routePath:''} onCreated={(e) => {this.onRegionCreated(e,item)}}/>) this.areas.push(<PolygonRegion {...this.areaStyles.normal} points={item.routePath ? JSON.parse(item.routePath).routePath : ''} onCreated={(e) => {this.onRegionCreated(e,item)}} />);
} else { } else {
this.areas.push(<PolygonRegion {...this.areaStyles.noDrop} points={item.routePath?JSON.parse(item.routePath).routePath:''} onCreated={(e) => {this.onRegionCreated(e,item)}} />) this.areas.push(<PolygonRegion {...this.areaStyles.noDrop} points={item.routePath ? JSON.parse(item.routePath).routePath : ''} onCreated={(e) => {this.onRegionCreated(e,item)}} />);
} }
{this.getAreas(item.children)} {this.getAreas(item.children)}
} else { } else {
this.areas.push(<PolygonRegion {...this.areaStyles.normal} points={item.routePath?JSON.parse(item.routePath).routePath:''} onCreated={(e) => {this.onRegionCreated(e,item)}} />) this.areas.push(<PolygonRegion {...this.areaStyles.normal} points={item.routePath ? JSON.parse(item.routePath).routePath : ''} onCreated={(e) => {this.onRegionCreated(e,item)}} />);
{this.getAreas(item.children)} {this.getAreas(item.children)}
} }
}else { } else {
if (dragItem) { if (dragItem) {
if ( dragItem&&dragItem.parentId && dragItem.parentId == item.id) { if ( dragItem && dragItem.parentId && dragItem.parentId === item.id) {
this.areas.push(<PolygonRegion {...this.areaStyles.normal} points={item.routePath?JSON.parse(item.routePath).routePath:''} onCreated={(e) => {this.onRegionCreated(e,item)}}/>) this.areas.push(<PolygonRegion {...this.areaStyles.normal} points={item.routePath ? JSON.parse(item.routePath).routePath : ''} onCreated={(e) => {this.onRegionCreated(e,item)}} />);
} else { } else {
this.areas.push(<PolygonRegion {...this.areaStyles.noDrop} points={item.routePath?JSON.parse(item.routePath).routePath:''} onCreated={(e) => {this.onRegionCreated(e,item)}} />) this.areas.push(<PolygonRegion {...this.areaStyles.noDrop} points={item.routePath ? JSON.parse(item.routePath).routePath : ''} onCreated={(e) => {this.onRegionCreated(e,item)}} />);
} }
} else { } else {
this.areas.push(<PolygonRegion {...this.areaStyles.normal} points={item.routePath?JSON.parse(item.routePath).routePath:''} onCreated={(e) => {this.onRegionCreated(e,item)}}/>) this.areas.push(<PolygonRegion {...this.areaStyles.normal} points={item.routePath ? JSON.parse(item.routePath).routePath : ''} onCreated={(e) => {this.onRegionCreated(e,item)}} />);
} }
} }
} else { } else {
if (item.children&&item.children.length > 0) { if (item.children && item.children.length > 0) {
{this.getAreas(item.children)} this.getAreas(item.children);
} }
} }
}); });
...@@ -788,17 +788,15 @@ class View3D extends Component { ...@@ -788,17 +788,15 @@ class View3D extends Component {
this.getAreas(this.state.treeData); this.getAreas(this.state.treeData);
return this.areas; return this.areas;
} }
onRegionCreated = (polygonRegion,item) => { onRegionCreated = (polygonRegion,item) => {
console.log(polygonRegion)
// console.log(polygonRegion.pointInPolygon)
this.polygonRegion[item.id] = polygonRegion; this.polygonRegion[item.id] = polygonRegion;
console.log(this.polygonRegion)
} }
//保存区域绑定 //保存区域绑定
saveAreaData = () => { saveAreaData = () => {
let { treeData, routePathData, pageType } = this.state; let { routePathData } = this.state;
let routePathParams = [];
//console.log(routePathData)
saveAreaDataAction(routePathData).then(d => { saveAreaDataAction(routePathData).then(d => {
message.success('保存成功!'); message.success('保存成功!');
this.a3dRef.changeDrawState(PEN_STATE.CLEARED);//清除当前路径 this.a3dRef.changeDrawState(PEN_STATE.CLEARED);//清除当前路径
...@@ -810,13 +808,14 @@ class View3D extends Component { ...@@ -810,13 +808,14 @@ class View3D extends Component {
//console.log(data); //console.log(data);
console.log(JSON.stringify(data)) console.log(JSON.stringify(data))
this.setState({ this.setState({
treeData:data || [] treeData: data || []
}) });
}); });
}, eer => { }, eer => {
message.error('保存失败!'); message.error('保存失败!');
}); });
} }
//保存点绑定 //保存点绑定
savePointData = () => { savePointData = () => {
let { markers ,pointTypeArr} = this.state; let { markers ,pointTypeArr} = this.state;
...@@ -828,7 +827,7 @@ class View3D extends Component { ...@@ -828,7 +827,7 @@ class View3D extends Component {
pointId: item[i].id, pointId: item[i].id,
pointType: item[i].type, pointType: item[i].type,
position3d: `${item[i].position.x},${item[i].position.y},${item[i].position.z}` position3d: `${item[i].position.x},${item[i].position.y},${item[i].position.z}`
}) });
} }
} }
savePointListAction(paramsArr).then(data => { savePointListAction(paramsArr).then(data => {
...@@ -870,20 +869,20 @@ class View3D extends Component { ...@@ -870,20 +869,20 @@ class View3D extends Component {
} }
//删除区域 //删除区域
deleteAreaBind = () => { deleteAreaBind = () => {
let { selectArea,routePathData } = this.state; let { selectArea } = this.state;
if (selectArea) { if (selectArea) {
let areaParams = []; let areaParams = [];
areaParams.push({ areaParams.push({
riskSourceId: selectArea.id, riskSourceId: selectArea.id,
routePath: '' routePath: ''
}) });
saveAreaDataAction(areaParams).then(d => { saveAreaDataAction(areaParams).then(d => {
message.success('删除成功!'); message.success('删除成功!');
getAreaTreeAction().then(data => { getAreaTreeAction().then(data => {
this.setState({ this.setState({
treeData:data || [] treeData: data || []
}) });
}); });
}, eer => { }, eer => {
message.error('删除失败!'); message.error('删除失败!');
...@@ -1023,6 +1022,7 @@ class View3D extends Component { ...@@ -1023,6 +1022,7 @@ class View3D extends Component {
this.getPointList(); this.getPointList();
} }
} }
simpleTipOk = () => { simpleTipOk = () => {
this.setState({ this.setState({
simpleTipVisible: false simpleTipVisible: false
...@@ -1226,13 +1226,13 @@ class View3D extends Component { ...@@ -1226,13 +1226,13 @@ class View3D extends Component {
const { markers } = this.state; const { markers } = this.state;
pointModelistAction(actionType).then(d =>{ pointModelistAction(actionType).then(d =>{
// if (markerType === 'fireResource') { // if (markerType === 'fireResource') {
markers['impEquipmentMode'] = d.filter(item => item.position != null); markers['impEquipmentMode'] = d.dataList.filter(item => item.position !== null);
// markers[markerType] = d; // markers[markerType] = d;
this.setState({ this.setState({
markers, markers,
markerType: "impEquipmentMode" markerType: "impEquipmentMode"
}); });
return; return;
}); });
} }
...@@ -1277,7 +1277,7 @@ class View3D extends Component { ...@@ -1277,7 +1277,7 @@ class View3D extends Component {
}; };
return exceptionAreas.map((area,index) =>{ return exceptionAreas.map((area,index) =>{
const { routePath: points = [] } = area.routePath; const { routePath: points = [] } = area.routePath;
return <PolygonRegion key={area.id} {...regionConf} points={points} onCreated={e=>this.onRectCreated(e,area,index)} />; return points.length > 0 && <PolygonRegion key={area.id} {...regionConf} points={points} onCreated={e=>this.onRectCreated(e,area,index)} />;
}); });
} }
...@@ -1329,7 +1329,7 @@ class View3D extends Component { ...@@ -1329,7 +1329,7 @@ class View3D extends Component {
headerName, headerName,
errorAreaId errorAreaId
} = this.state; } = this.state;
const { dimension, hiddenScreenSaver } = this.props; const { dimension, hiddenScreenSaver, editModelChange } = this.props;
const graphicProps = { const graphicProps = {
...dimension, ...dimension,
...desigerConf, ...desigerConf,
...@@ -1397,6 +1397,7 @@ class View3D extends Component { ...@@ -1397,6 +1397,7 @@ class View3D extends Component {
onActionItemClick={this.onActionItemClick} onActionItemClick={this.onActionItemClick}
errorAreaId={errorAreaId} errorAreaId={errorAreaId}
handleExceptModel={this.handleExceptModel} handleExceptModel={this.handleExceptModel}
editModelChange={editModelChange}
/> />
} }
modelContentProps={modelContentProps} modelContentProps={modelContentProps}
...@@ -1411,7 +1412,7 @@ class View3D extends Component { ...@@ -1411,7 +1412,7 @@ class View3D extends Component {
{editFlag && pageType === 'region' ? '' : <PointsPool markers={markers} updateMarker={this.updateMarker} planStarted={alarmStarted} stagePilot={this.stagePilot} />} {editFlag && pageType === 'region' ? '' : <PointsPool markers={markers} updateMarker={this.updateMarker} planStarted={alarmStarted} stagePilot={this.stagePilot} />}
{fireTruckRoute && <FatLine {...lineData.fatLineConf} linePath={JSON.parse(fireTruckRoute)} visible={showFireTruckRoute} />} {fireTruckRoute && <FatLine {...lineData.fatLineConf} linePath={JSON.parse(fireTruckRoute)} visible={showFireTruckRoute} />}
<FlameFire position={firePosition} width={10} height={20} depth={8} sliceSpacing={1} visible={planStarted} /> <FlameFire position={firePosition} width={10} height={20} depth={8} sliceSpacing={1} visible={planStarted} />
{this.renderAreas()} {editFlag && this.renderAreas()}
{this.renderPolygonRegion(exceptionAreas)} {this.renderPolygonRegion(exceptionAreas)}
{startLoadExceptionArea && <ExceptionArea markers={exceptionMarkers} handleExceptModel={this.handleExceptModel} />} {startLoadExceptionArea && <ExceptionArea markers={exceptionMarkers} handleExceptModel={this.handleExceptModel} />}
</A3DDesigner> </A3DDesigner>
......
...@@ -12,9 +12,9 @@ export default class ModelHeader extends Component { ...@@ -12,9 +12,9 @@ export default class ModelHeader extends Component {
} }
render() { render() {
const { headerName } = this.props; const { animationProps, headerName } = this.props;
return ( return (
<div className='ModuleEditPage'> <div className='ModuleEditPage' {...animationProps}>
<div className='topBox'> <div className='topBox'>
<span className='editTitle'> <span className='editTitle'>
<span className='titleText'>{headerName}</span> <span className='titleText'>{headerName}</span>
......
...@@ -84,7 +84,7 @@ export const actionBars = [ ...@@ -84,7 +84,7 @@ export const actionBars = [
{ key: 'burst-action', icon: 'burst', type: 'burst', singleClick: true, label: '分解' , showLabel: false }, { key: 'burst-action', icon: 'burst', type: 'burst', singleClick: true, label: '分解' , showLabel: false },
{ key: 'fitview-action', icon: 'fitview', type: 'fitview', singleClick: true, label: '初始视图' , showLabel: false }, { key: 'fitview-action', icon: 'fitview', type: 'fitview', singleClick: true, label: '初始视图' , showLabel: false },
{ key: 'edit-action', icon: 'editMode', type: 'editMode', singleClick: false, label: '编辑' , showLabel: true }, { key: 'edit-action', icon: 'editMode', type: 'editMode', singleClick: false, label: '编辑' , showLabel: true },
{ key: 'search-action', icon: 'editMode', type: 'search', singleClick: true, label: '检索' , showLabel: true } { key: 'search-action', icon: 'chaxun', type: 'search', singleClick: true, label: '检索' , showLabel: true }
]; ];
/** /**
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { utils, Store } from 'amos-tool'; import { utils } from 'amos-tool';
import { Markers } from 'amos-3d/lib/designer'; import { Markers } from 'amos-3d/lib/designer';
import { connect3D } from 'amos-3d/lib/designer'; import { connect3D } from 'amos-3d/lib/designer';
import { BaseObjHelper } from 'base-r3d/lib/factory'; import { BaseObjHelper } from 'base-r3d/lib/factory';
import { safetyIndexIconMapper } from './../../consts/imgStatic'; import { safetyIndexIconMapper } from './../../consts/imgStatic';
const lsTool = Store.lsTool;
const getIcon = (exceptionType) => { const getIcon = (exceptionType) => {
return safetyIndexIconMapper[exceptionType]; return safetyIndexIconMapper[exceptionType];
}; };
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { safetyIndexDetailAction } from './../../../services/panoramicService'; import { safetyIndexDetailAction } from './../../../services/panoramicService';
import moment from 'moment'; import moment from 'moment';
const format = 'YYYY-MM-dd';
export default class ModelContent extends Component { export default class ModelContent extends Component {
...@@ -14,18 +14,10 @@ export default class ModelContent extends Component { ...@@ -14,18 +14,10 @@ export default class ModelContent extends Component {
} }
componentDidMount(){ componentDidMount(){
let { type } = this.props; const { type } = this.props;
this.safetyIndexDetail(type); this.safetyIndexDetail(type);
} }
safetyIndexDetail = (type) => {
safetyIndexDetailAction(type).then(data => {
this.setState({
alarmData: data
});
});
}
/** /**
* 获取标题 * 获取标题
* *
...@@ -41,6 +33,14 @@ export default class ModelContent extends Component { ...@@ -41,6 +33,14 @@ export default class ModelContent extends Component {
return titleParams[v]; return titleParams[v];
} }
safetyIndexDetail = (type) => {
safetyIndexDetailAction(type).then(data => {
this.setState({
alarmData: data
});
});
}
formatData = (str) => { formatData = (str) => {
let date = str.split(' ')[0]; let date = str.split(' ')[0];
return date; return date;
...@@ -63,12 +63,12 @@ export default class ModelContent extends Component { ...@@ -63,12 +63,12 @@ export default class ModelContent extends Component {
render() { render() {
let { alarmData } = this.state; let { alarmData } = this.state;
let { type } = this.props; const { type } = this.props;
return ( return (
<div className='model-content'> <div className='model-content'>
{(alarmData || []).map(item => { {(alarmData || []).map(item => {
return ( return (
<div className='content-div'> <div key={item.typeCode} className='content-div'>
<div className='title'> <div className='title'>
<span>|</span> <span>|</span>
<span className='next-title'>{ type === 'risk' ? this.getTitle(item.typeCode) : item.typeName }</span> <span className='next-title'>{ type === 'risk' ? this.getTitle(item.typeCode) : item.typeName }</span>
...@@ -81,3 +81,7 @@ export default class ModelContent extends Component { ...@@ -81,3 +81,7 @@ export default class ModelContent extends Component {
); );
} }
} }
ModelContent.propTypes = {
type: PropTypes.string
};
...@@ -81,7 +81,8 @@ export default class SafetyExecuteList extends Component { ...@@ -81,7 +81,8 @@ export default class SafetyExecuteList extends Component {
datas.map((item, index) => { datas.map((item, index) => {
return ( return (
<div key={item.id} className="title-child"> <div key={item.id} className="title-child">
<span className="title-text" >{item.label}</span> <span className="title-text" >{item.label}</span>&nbsp;&nbsp;
<span className="title-text" >{item.changeDate}</span>
</div> </div>
); );
}) })
......
...@@ -35,59 +35,59 @@ export default class SafetyIndex extends Component { ...@@ -35,59 +35,59 @@ export default class SafetyIndex extends Component {
const { safetyIndexData } = this.state; const { safetyIndexData } = this.state;
return { return {
tooltip: { tooltip: {
show:false show: false
}, },
toolbox: { toolbox: {
show:false, show: false,
feature: { feature: {
mark: {show: false}, mark: { show: false },
restore: {show: false}, restore: { show: false },
saveAsImage: {show: false} saveAsImage: { show: false }
} }
}, },
series: [ series: [
{ {
name: '今日安全指数', name: '今日安全指数',
type: 'gauge', type: 'gauge',
center: ['10%', '48%'], // 默认全局居中 center: ['10%', '48%'], // 默认全局居中
radius: '60%', radius: '60%',
min: 0, min: 0,
max: 100, max: 100,
endAngle: 90, endAngle: 90,
startAngle:-90, startAngle: -90,
splitNumber: 3, splitNumber: 3,
axisLine: { // 坐标轴线 axisLine: { // 坐标轴线
show:false, show: false,
lineStyle: { // 属性lineStyle控制线条样式 lineStyle: { // 属性lineStyle控制线条样式
color: [ color: [
[0.5, 'red'], [0.5, 'red'],
[0.9, 'Orange'], [0.9, 'Orange'],
[0.95, 'Gold'], [0.95, 'Gold'],
[1, '#00C3FF'] [1, '#00C3FF']
], ],
width: 0, width: 0,
opacity : 0 opacity: 0
} }
}, },
axisLabel: { // 坐标轴小标记 axisLabel: { // 坐标轴小标记
show:false show: false
}, },
axisTick: { // 坐标轴小标记 axisTick: { // 坐标轴小标记
show:false show: false
}, },
splitLine: { // 分隔线 splitLine: { // 分隔线
show:false show: false
}, },
pointer: { pointer: {
width: 5 width: 5
}, },
title: { title: {
show:false show: false
}, },
detail: { detail: {
show:false show: false
}, },
data: [{value: safetyIndexData.safetyIndex, name: '今日安全指数'}] data: [{ value: safetyIndexData.safetyIndex, name: '今日安全指数' }]
} }
] ]
} }
...@@ -103,19 +103,21 @@ export default class SafetyIndex extends Component { ...@@ -103,19 +103,21 @@ export default class SafetyIndex extends Component {
return ( return (
<div className='warnModal'> <div className='warnModal'>
<div className='close'> <div className='close'>
<img src={panoramicIcon.model_close} onClick={() => this.modelOpen(false)}></img> <img src={panoramicIcon.model_close} alt='' onClick={() => this.modelOpen(false)} />
</div> </div>
{warnController.map(item => { <div className='warnModal-body'>
return ( {warnController.map(item => {
<div className='model-line'> return (
<div> <div key={item.key} className='model-line'>
<img src={getIcon(item.icon)}></img> <div className='model-line-img'>
<img src={getIcon(item.icon)} alt='' />
</div>
<div className='model-title'>{item.label}</div>
<ModelContent type={item.type} />
</div> </div>
<div className='model-title'>{item.label}</div> );
<ModelContent type={item.type} /> })}
</div> </div>
);
})}
</div> </div>
); );
} }
...@@ -130,21 +132,21 @@ export default class SafetyIndex extends Component { ...@@ -130,21 +132,21 @@ export default class SafetyIndex extends Component {
<div className='safetyIndex-content' onClick={() => this.modelOpen(true)}> <div className='safetyIndex-content' onClick={() => this.modelOpen(true)}>
<div>今日安全指数 </div> <div>今日安全指数 </div>
<div className='safetyIndex-content-row'> <div className='safetyIndex-content-row'>
<div className='number-large'>{safetyIndexData.safetyIndex}</div> <div className='number-large'>{safetyIndexData.safetyIndex}</div>
<span className='number-unit'>&nbsp;&nbsp; <span className='number-unit'>&nbsp;&nbsp;
<img src={panoramicIcon.safetyup} className="row-up" alt="up" /> <img src={panoramicIcon.safetyup} className="row-up" alt="up" />
</span> </span>
</div> </div>
{ {
[{name:'风险值上升',num:safetyIndexData.riskExceptionNum}, [{ name: '风险异常',num: safetyIndexData.riskExceptionNum },
{name:'巡检不合格',num:safetyIndexData.checkExceptionNum}, { name: '巡检异常',num: safetyIndexData.checkExceptionNum },
{name:'火灾报警',num:safetyIndexData.fireExceptionNum}].map((item,index)=> { name: '故障告警',num: safetyIndexData.fireExceptionNum }].map((item,index)=>
<div className="content-item">{item.name} {item.num}</div> <div key={item.name} className="content-item">{item.name} {item.num}</div>
) )
} }
</div> </div>
<ReactEcharts className='safetyIndex-content-chart' option={this.getOption()}/> <ReactEcharts className='safetyIndex-content-chart' option={this.getOption()} />
{ modelVisable && this.renderWarnContent()} { modelVisable && this.renderWarnContent()}
</div> </div>
); );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* 告警控制 * 告警控制
*/ */
export const warnController = [ export const warnController = [
{ key: 'fire', icon: 'model_fire', type: 'fire', label: '火灾告警' }, { key: 'equip', icon: 'model_fire', type: 'equip', label: '故障告警' },
{ key: 'risk', icon: 'model_risk', type: 'risk', label: '风险异常' }, { key: 'risk', icon: 'model_risk', type: 'risk', label: '风险异常' },
{ key: 'check', icon: 'model_patrol', type: 'check', label: '巡检异常' } { key: 'check', icon: 'model_patrol', type: 'check', label: '巡检异常' }
]; ];
......
...@@ -5,7 +5,10 @@ import Icon from 'amos-icon'; ...@@ -5,7 +5,10 @@ import Icon from 'amos-icon';
import ParamsHeader from './paramsHeader'; import ParamsHeader from './paramsHeader';
import AmosGridTable from './../common/tableComponent/table/AmosGridTable'; import AmosGridTable from './../common/tableComponent/table/AmosGridTable';
import { import {
searchAction searchAction,
msgAction,
exeRecordAction,
trajectoryAction
} from './../../services/3dService'; } from './../../services/3dService';
const { TabList, Tab, TabPanel } = Tabs; const { TabList, Tab, TabPanel } = Tabs;
...@@ -51,10 +54,36 @@ const getColumns = (self,retrieveType) => { ...@@ -51,10 +54,36 @@ const getColumns = (self,retrieveType) => {
} }
}; };
const getMsgColumns = () => {
return [
{title: '标题',dataIndex: 'title',key: 'title',width: '15%'},
{title: '类型',dataIndex: 'type',key: 'type',width: '15%'},
{title: '时间',dataIndex: 'timeStr',key: 'timeStr',width: '15%'},
{title: '内容',dataIndex: 'content',key: 'content',width: '55%'}
]
}
const getRecordColumns = () => {
return [
{title: '名称',dataIndex: 'equipment_Name',key: 'equipment_Name',width: '33%'},
{title: '时间',dataIndex: 'create_time',key: 'create_time',width: '33%'},
{title: '重点设备',dataIndex: 'equipment_Name',key: 'equipment_Name',width: '33%'}
]
}
const getTrajectoryColumns = () => {
return [
{title: '巡检人',dataIndex: 'userName',key: 'userName',width: '33%'},
{title: '时间',dataIndex: 'checkTime',key: 'checkTime',width: '33%'},
{title: '轨迹',dataIndex: 'traName',key: 'traName',width: '33%'}
]
}
const tabs = [ const tabs = [
{ id: '1', key: 'search', closable: false, title: '检索' }, { id: '1', key: 'search', closable: false, title: '检索' },
{ id: '2', key: 'message', closable: false, title: '消息' }, { id: '2', key: 'message', closable: false, title: '消息' },
{ id: '3', key: 'contingency', closable: false, title: '预案' }, { id: '3', key: 'record', closable: false, title: '预案' },
{ id: '4', key: 'trajectory', closable: false, title: '轨迹' },
]; ];
class SearchPane extends Component { class SearchPane extends Component {
...@@ -71,7 +100,10 @@ class SearchPane extends Component { ...@@ -71,7 +100,10 @@ class SearchPane extends Component {
dataList: [], dataList: [],
retrieveType: undefined, retrieveType: undefined,
totalCount: 0, totalCount: 0,
filter: [] filter: [],
msgDataList: [],
recordDataList: [],
trajectoryDataList: []
}; };
} }
...@@ -81,18 +113,17 @@ class SearchPane extends Component { ...@@ -81,18 +113,17 @@ class SearchPane extends Component {
this.fetchRetrieveData(); this.fetchRetrieveData();
} }
// onSearch = (page) => { paramsOnChange = (filter) => {
const {activeKey} = this.state;
// searchAction(inputText, dataLevel, orgCode, nodeState, protectObjName, routeName, type, page || 0, pageSize).then(d => { if(activeKey === 'search'){
// // 填充列表数据 this.setState({filter},this.fetchRetrieveData);
// this.listRef.setData(d, this); }else if(activeKey === 'message'){
// }); this.setState({filter},this.fetchMsgData);
// } }else if(activeKey === 'record'){
this.setState({filter},this.fetchRecordData);
retrieveOnChange = (filter) => { }else if(activeKey === 'trajectory'){
// const { pageSize } = this.state; this.setState({filter},this.fetchTrajectoryData);
this.setState({filter},this.fetchRetrieveData); }
} }
...@@ -112,13 +143,15 @@ class SearchPane extends Component { ...@@ -112,13 +143,15 @@ class SearchPane extends Component {
}; };
onTabClick = (value) =>{ onTabClick = (value) =>{
console.log(value) this.pageConfig.current = 0;
if(value === 'search'){ if(value === 'search'){
this.fetchRetrieveData(); this.fetchRetrieveData();
}else if(value === 'search'){ }else if(value === 'message'){
this.fetchMsgData();
}else{ }else if(value === 'record'){
this.fetchRecordData();
}else if(value === 'trajectory'){
this.fetchTrajectoryData()
} }
this.setState({ activeKey:value }); this.setState({ activeKey:value });
} }
...@@ -126,7 +159,38 @@ class SearchPane extends Component { ...@@ -126,7 +159,38 @@ class SearchPane extends Component {
getPanelHeight = () => { getPanelHeight = () => {
return 700; return 700;
}; };
//轨迹
fetchTrajectoryData = () => {
const { filter } = this.state;
trajectoryAction(filter, this.pageConfig.current, this.pageConfig.pageSize).then(d => {
this.setState({trajectoryDataList:d.content,totalCount: d.totalElements});
});
}
//预案
fetchRecordData = () => {
const { filter } = this.state;
exeRecordAction(filter, this.pageConfig.current, this.pageConfig.pageSize).then(d => {
this.setState({recordDataList:d.content,totalCount: d.totalElements});
});
}
//消息
fetchMsgData = () => {
const { filter } = this.state;
let searchParam = {};
( filter || [] ).forEach((item, i) => {
if (item.name === 'type') {
searchParam.category = item.value;
} else if (item.name === 'title') {
searchParam.title = item.value;
} else if (item.name === 'time') {
searchParam.time = item.value;
}
});
msgAction(searchParam, this.pageConfig.current, this.pageConfig.pageSize).then(d => {
this.setState({msgDataList:d.content,totalCount: d.totalElements});
});
}
//检索
fetchRetrieveData = ()=> { fetchRetrieveData = ()=> {
const { filter } = this.state; const { filter } = this.state;
let inputText = ''; let inputText = '';
...@@ -171,7 +235,7 @@ class SearchPane extends Component { ...@@ -171,7 +235,7 @@ class SearchPane extends Component {
}; };
render() { render() {
const { dataList,activeKey,retrieveType,totalCount } = this.state; const { dataList,activeKey,retrieveType,totalCount,msgDataList,recordDataList,trajectoryDataList } = this.state;
return ( return (
<div> <div>
{ this.props.visible && <div className="search-pane-bg"/> } { this.props.visible && <div className="search-pane-bg"/> }
...@@ -182,13 +246,14 @@ class SearchPane extends Component { ...@@ -182,13 +246,14 @@ class SearchPane extends Component {
<Tabs <Tabs
activeKey={activeKey} activeKey={activeKey}
onChange={(index, key) => this.onTabClick(key)} onChange={(index, key) => this.onTabClick(key)}
destroyContent
> >
<TabList> <TabList>
{tabs.map((item, i) => ( {tabs.map((item, i) => (
<Tab key={item.key} activeKey={item.key} closable={item.closable}>{item.title}</Tab>) <Tab key={item.key} activeKey={item.key} closable={item.closable}>{item.title}</Tab>)
)} )}
</TabList> </TabList>
<ParamsHeader retrieveOnChange={this.retrieveOnChange} retrieveType='search'/> <ParamsHeader paramsOnChange={this.paramsOnChange} activeKey={activeKey}/>
<TabPanel activeKey="search"> <TabPanel activeKey="search">
<div className="search-pane-table"> <div className="search-pane-table">
<AmosGridTable <AmosGridTable
...@@ -205,8 +270,45 @@ class SearchPane extends Component { ...@@ -205,8 +270,45 @@ class SearchPane extends Component {
/> />
</div> </div>
</TabPanel> </TabPanel>
<TabPanel activeKey="message">消息</TabPanel> <TabPanel activeKey="message">
<TabPanel activeKey="contingency">预案</TabPanel> <AmosGridTable
columns={getMsgColumns()}
getTableDataAction={()=>{}}
callBack={this.reload}
isPageable = {true}
setPageConfig={this.setPageConfig}
isChecked = {false}
dataList={msgDataList}
totals={totalCount}
getTableDataAction={this.fetchMsgData}
/>
</TabPanel>
<TabPanel activeKey="record">
<AmosGridTable
columns={getRecordColumns()}
getTableDataAction={()=>{}}
callBack={this.reload}
isPageable = {true}
setPageConfig={this.setPageConfig}
isChecked = {false}
dataList={recordDataList}
totals={totalCount}
getTableDataAction={this.fetchRecordData}
/>
</TabPanel>
<TabPanel activeKey="trajectory">
<AmosGridTable
columns={getTrajectoryColumns()}
getTableDataAction={()=>{}}
callBack={this.reload}
isPageable = {true}
setPageConfig={this.setPageConfig}
isChecked = {false}
dataList={trajectoryDataList}
totals={totalCount}
getTableDataAction={this.fetchTrajectoryData}
/>
</TabPanel>
</Tabs> </Tabs>
</SidePane>} </SidePane>}
</div> </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