Commit d9dc514c authored by 张博's avatar 张博

jiejuechogntu

parents 8d5a96a1 3b84a5cf
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<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="demo.css">
<link rel="stylesheet" href="iconfont.css">
......@@ -31,6 +31,12 @@
<ul class="icon_lists dib-box">
<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>
<div class="name">任务列表</div>
<div class="code-name">&amp;#xe60a;</div>
......@@ -1179,6 +1185,15 @@
<ul class="icon_lists dib-box">
<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>
<div class="name">
任务列表
......@@ -2856,6 +2871,14 @@
<li class="dib">
<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>
</svg>
<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 @@
"description": "",
"glyphs": [
{
"icon_id": "14970084",
"name": "search-pane",
"font_class": "chaxun",
"unicode": "e60b",
"unicode_decimal": 58891
},
{
"icon_id": "13937674",
"name": "任务列表",
"font_class": "renwuliebiao",
......
......@@ -20,6 +20,9 @@ Created by iconfont
/>
<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" />
......
......@@ -57,7 +57,8 @@ export default {
play: require('../assets/convertor/3dview/datapanel/play.png'),
search: require('../assets/convertor/3dview/datapanel/search.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: {
riskSource_0: require('../assets/convertor/3dview/markers/risk-0.png'),
......
......@@ -13,13 +13,11 @@
@import './actionbar.scss';
@import './moduleEdit.scss';
@import './searchpane.scss';
@import './reservePlan.scss';
@import './../assets/bizFont/iconfont.css';
@import './../assets/amosFont/iconfont.css';
.obj-loading-coms {
position: absolute;
top: 50%;
......@@ -133,5 +131,3 @@
border-image-slice: 50 50 50 50;
border-image-repeat: stretch;
}
......@@ -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%);
}
}
.quipBtn {
width: 169px;
height: 44px;
background: url('/mods/components/3dviewConvertor/assets/convertor/moduleEdit/quip.png') no-repeat 100% 100%;
margin-top: 10px;
margin-left: 70px;
}
.quipBtn {
width: 169px;
height: 44px;
margin-top: 10px;
margin-left: 70px;
cursor: pointer;
background: url('/mods/components/3dviewConvertor/assets/convertor/moduleEdit/quip.png') no-repeat 100% 100%;
}
}
.bottomBox {
position: absolute;
......
......@@ -365,53 +365,54 @@
}
}
.reserve-plan-root{
.reserve-plan-root {
height: 80px;
.operate-button-root + .operate-button-root {
padding-left: 35px;
margin-left: 20px;
}
}
%operate-button-root-common {
display: flex;
align-items: center;
width: 250px;
}
.operate-button-display-root{
.operate-button-display-root {
justify-content: center;
}
.operate-button-root{
.operate-button-root {
width: 250px;
justify-content: center;
.operate-button-left{
.operate-button-left {
img{
img {
// width: 20px !important;
// height: 20px !important
}
.operate-button-content{
.operate-button-content {
margin-left: 5px;
font-weight: 500;
line-height: 15px;
width: 170px;
.button-name{
.button-name {
font-size: 14px !important
}
.button-desc{
.button-desc {
font-size: 8px !important
}
}
}
.operate-button-right{
.operate-button-right {
width: 77px;
.operate-button-button{
.operate-button-button {
margin-left: 10px;
width: 70px;
height: 31px;
......@@ -434,7 +435,7 @@
.quit-btn {
margin-top: 10px;
img{
img {
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 @@
float: left;
}
.params-input{
float: left;
.params-input-img{
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 @@
}
.search-pane-table{
// .search-pane-table{
.ant-table-title{
display: none;
}
......@@ -129,6 +145,13 @@
overflow: hidden !important;
}
.ant-table-placeholder {
position: absolute;
width: 100%;
top: 55px;
border: none !important;
}
.ant-table-body {
color: white;
......@@ -153,6 +176,7 @@
}
}
}
.ant-table-placeholder{
background:transparent!important;
color: white;
......@@ -193,6 +217,8 @@
background: rgba(39,85,162,1);
}
}
}
......@@ -213,9 +239,15 @@
.ant-pagination-item{
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 {
color: #fff;
}
}
}
// }
}
\ No newline at end of file
......@@ -3,34 +3,41 @@
// height: 100%;
// width: 100%;
.statistical-left {
position: absolute;
height: 100%;
width: 350px;
float: left;
z-index: 1;
color: white;
display: flex;
flex-direction: column;
.statistical-left {
position: absolute;
height: 100%;
width: 350px;
float: left;
z-index: 1;
color: white;
display: flex;
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{
width: 100%;
height: 55px;
//margin-top: 5px;
}
.title-date{
height: 20px;
font-size: 13px;
}
.title-text{
font-size: 15px;
}
}
::-webkit-scrollbar {
/* 隐藏滚轮 */
display: none;
}
.safetyExecuteList{
flex: 2;
......@@ -114,7 +121,6 @@
width: 90%;
span{
position: absolute;
margin-top: 3px;
font-size: 14px;
color: rgba(255,255,255,1);
......@@ -156,9 +162,7 @@
height: 100%;
margin-left: 30px;
margin-right: 20px;
&:hover{
background-color: rgba(199,223,245,0.3);
}
cursor: pointer;
.content-item {
margin: 5px;
......@@ -473,56 +477,65 @@
text-align: right;
margin-top: 5px;
margin-right: 3px;
float: right;
// margin-top: 5px;
// margin-right: 3px;
img{
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{
min-width: 80px;
min-height: 120px;
text-align: left;
padding-top: 20px;
&-body {
display: flex;
height: calc(100% - 50px);
.title{
height: 30px;
font-size: 16px;
color:rgba(240,223,45,1);
}
.next-title{
padding-left: 5px;
}
.rows{
padding-left: 15px;
font-size: 14px;
color:rgba(255,255,255,1);
.row{
display: inline-block;
height: 28px;
.model-line {
height: 88%;
margin-top: 5px;
text-align: center;
flex: 1;
&-img {
height: 30px;
}
.model-title {
height: 30px;
font-size: 16px;
color:rgba(240,223,45,1);
}
.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 {
let wsURL = AmosConfig.wsURI.securityBaseURI + 'plan';
return (
<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
className={displayDetail ? 'precontrol-sidePlan-detail-display' : 'precontrol-sidePlan-detail'}
left={false}
......
......@@ -91,6 +91,7 @@ class MaskContent extends Component {
headerName,
errorAreaId
} = this.props;
alarmStarted && this.props.editModelChange(true);
const wsURL = completeToken(SysWsURL.rulews);
const controlAnimation = {
animateName: 'zoom-comb-left',
......@@ -121,13 +122,12 @@ class MaskContent extends Component {
return (
<div className="mask-content">
<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} />}
{/* <SideControl multiple={multiple} errorAreaId={errorAreaId} onItemClick={onItemClick} layerConfig={layerConfig} animationProps={controlAnimation} /> */}
{ sideControlShow && <DataPane animationProps={datapaneAnim} />}
<SearchPane visible={searchPaneVisible} changeSearchPaneVisible={() => this.changeSearchPaneVisible}/>
{ !alarmStarted && sideControlShow && <SideControl multiple={multiple} errorAreaId={errorAreaId} onItemClick={onItemClick} layerConfig={layerConfig} animationProps={controlAnimation} />}
{ !alarmStarted && sideControlShow && <DataPane animationProps={datapaneAnim} />}
{ !alarmStarted && <SearchPane visible={searchPaneVisible} changeSearchPaneVisible={() => this.changeSearchPaneVisible} />}
<TopMsg alarmStart={alarmStart} />
{!isShowActionBar && <ModelHeader headerName={headerName} handleExceptModel={this.handleExceptModel} />}
{isShowActionBar && <ActionBar activeAction={activeAction} onActionItemClick={(e) => this.actionBarClick(e)} animationProps={controlAnimation}/> }
{ !alarmStarted && !isShowActionBar && <ModelHeader animationProps={controlAnimation} headerName={headerName} handleExceptModel={this.handleExceptModel} />}
{ !alarmStarted && isShowActionBar && <ActionBar activeAction={activeAction} onActionItemClick={(e) => this.actionBarClick(e)} animationProps={controlAnimation} /> }
{alarmStarted && <LayerPool animationProps={layerPoolAnimation} planStart={planStart} planQuit={planQuit} planStarted={planStarted} />}
</div>
);
......
......@@ -200,6 +200,7 @@ class View3D extends Component {
tirggerTransTopic(CONSTS.forward, { details: { type: 'prePlan', show: false }, dateTime: Date.now() });
removeFireAlarm2(this);
this.cameraFactory.fitView(desigerHelperConfig.cameraEffect);
this.quitEditMode();
};
alarmStart = () => {
......@@ -728,56 +729,55 @@ class View3D extends Component {
}
//选中区域变化
selectItemChange = (selectArea) => {
this.state.selectArea = selectArea
this.setState({
selectArea: selectArea,
selectArea,
showRightPanel: true
})
});
}
//选中点变化
selectPointChange = (selectPoints) => {
this.setState({
selectPoints: selectPoints,
selectPoints,
showRightPanel: true
})
});
}
getAreas = (treeData) => {
let { dragItem } = this.state;
// console.log(treeData)
// let areas = [];
if (treeData&&treeData.length>0) {
if (treeData && treeData.length > 0) {
treeData.map((item) => {
if (item.isRegion && item.isBind) {
if (item.children&&item.children.length > 0) {
if (item.children && item.children.length > 0) {
if (dragItem) {
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 {
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)}
} 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)}
}
}else {
} else {
if (dragItem) {
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)}}/>)
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)}} />);
} 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 {
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 {
if (item.children&&item.children.length > 0) {
{this.getAreas(item.children)}
if (item.children && item.children.length > 0) {
this.getAreas(item.children);
}
}
});
......@@ -788,17 +788,15 @@ class View3D extends Component {
this.getAreas(this.state.treeData);
return this.areas;
}
onRegionCreated = (polygonRegion,item) => {
console.log(polygonRegion)
// console.log(polygonRegion.pointInPolygon)
this.polygonRegion[item.id] = polygonRegion;
console.log(this.polygonRegion)
}
//保存区域绑定
saveAreaData = () => {
let { treeData, routePathData, pageType } = this.state;
let routePathParams = [];
//console.log(routePathData)
let { routePathData } = this.state;
saveAreaDataAction(routePathData).then(d => {
message.success('保存成功!');
this.a3dRef.changeDrawState(PEN_STATE.CLEARED);//清除当前路径
......@@ -810,13 +808,14 @@ class View3D extends Component {
//console.log(data);
console.log(JSON.stringify(data))
this.setState({
treeData:data || []
})
treeData: data || []
});
});
}, eer => {
message.error('保存失败!');
});
}
//保存点绑定
savePointData = () => {
let { markers ,pointTypeArr} = this.state;
......@@ -828,7 +827,7 @@ class View3D extends Component {
pointId: item[i].id,
pointType: item[i].type,
position3d: `${item[i].position.x},${item[i].position.y},${item[i].position.z}`
})
});
}
}
savePointListAction(paramsArr).then(data => {
......@@ -870,20 +869,20 @@ class View3D extends Component {
}
//删除区域
deleteAreaBind = () => {
let { selectArea,routePathData } = this.state;
let { selectArea } = this.state;
if (selectArea) {
let areaParams = [];
areaParams.push({
riskSourceId: selectArea.id,
riskSourceId: selectArea.id,
routePath: ''
})
});
saveAreaDataAction(areaParams).then(d => {
message.success('删除成功!');
getAreaTreeAction().then(data => {
this.setState({
treeData:data || []
})
treeData: data || []
});
});
}, eer => {
message.error('删除失败!');
......@@ -1023,6 +1022,7 @@ class View3D extends Component {
this.getPointList();
}
}
simpleTipOk = () => {
this.setState({
simpleTipVisible: false
......@@ -1226,13 +1226,13 @@ class View3D extends Component {
const { markers } = this.state;
pointModelistAction(actionType).then(d =>{
// if (markerType === 'fireResource') {
markers['impEquipmentMode'] = d.filter(item => item.position != null);
// markers[markerType] = d;
this.setState({
markers,
markerType: "impEquipmentMode"
});
return;
markers['impEquipmentMode'] = d.dataList.filter(item => item.position !== null);
// markers[markerType] = d;
this.setState({
markers,
markerType: "impEquipmentMode"
});
return;
});
}
......@@ -1277,7 +1277,7 @@ class View3D extends Component {
};
return exceptionAreas.map((area,index) =>{
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 {
headerName,
errorAreaId
} = this.state;
const { dimension, hiddenScreenSaver } = this.props;
const { dimension, hiddenScreenSaver, editModelChange } = this.props;
const graphicProps = {
...dimension,
...desigerConf,
......@@ -1397,6 +1397,7 @@ class View3D extends Component {
onActionItemClick={this.onActionItemClick}
errorAreaId={errorAreaId}
handleExceptModel={this.handleExceptModel}
editModelChange={editModelChange}
/>
}
modelContentProps={modelContentProps}
......@@ -1411,7 +1412,7 @@ class View3D extends Component {
{editFlag && pageType === 'region' ? '' : <PointsPool markers={markers} updateMarker={this.updateMarker} planStarted={alarmStarted} stagePilot={this.stagePilot} />}
{fireTruckRoute && <FatLine {...lineData.fatLineConf} linePath={JSON.parse(fireTruckRoute)} visible={showFireTruckRoute} />}
<FlameFire position={firePosition} width={10} height={20} depth={8} sliceSpacing={1} visible={planStarted} />
{this.renderAreas()}
{editFlag && this.renderAreas()}
{this.renderPolygonRegion(exceptionAreas)}
{startLoadExceptionArea && <ExceptionArea markers={exceptionMarkers} handleExceptModel={this.handleExceptModel} />}
</A3DDesigner>
......
......@@ -12,9 +12,9 @@ export default class ModelHeader extends Component {
}
render() {
const { headerName } = this.props;
const { animationProps, headerName } = this.props;
return (
<div className='ModuleEditPage'>
<div className='ModuleEditPage' {...animationProps}>
<div className='topBox'>
<span className='editTitle'>
<span className='titleText'>{headerName}</span>
......
......@@ -84,7 +84,7 @@ export const actionBars = [
{ 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: '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 PropTypes from 'prop-types';
import { utils, Store } from 'amos-tool';
import { utils } from 'amos-tool';
import { Markers } from 'amos-3d/lib/designer';
import { connect3D } from 'amos-3d/lib/designer';
import { BaseObjHelper } from 'base-r3d/lib/factory';
import { safetyIndexIconMapper } from './../../consts/imgStatic';
const lsTool = Store.lsTool;
const getIcon = (exceptionType) => {
return safetyIndexIconMapper[exceptionType];
};
......
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { safetyIndexDetailAction } from './../../../services/panoramicService';
import moment from 'moment';
const format = 'YYYY-MM-dd';
export default class ModelContent extends Component {
......@@ -14,18 +14,10 @@ export default class ModelContent extends Component {
}
componentDidMount(){
let { type } = this.props;
const { type } = this.props;
this.safetyIndexDetail(type);
}
safetyIndexDetail = (type) => {
safetyIndexDetailAction(type).then(data => {
this.setState({
alarmData: data
});
});
}
/**
* 获取标题
*
......@@ -41,6 +33,14 @@ export default class ModelContent extends Component {
return titleParams[v];
}
safetyIndexDetail = (type) => {
safetyIndexDetailAction(type).then(data => {
this.setState({
alarmData: data
});
});
}
formatData = (str) => {
let date = str.split(' ')[0];
return date;
......@@ -63,12 +63,12 @@ export default class ModelContent extends Component {
render() {
let { alarmData } = this.state;
let { type } = this.props;
const { type } = this.props;
return (
<div className='model-content'>
{(alarmData || []).map(item => {
return (
<div className='content-div'>
<div key={item.typeCode} className='content-div'>
<div className='title'>
<span>|</span>
<span className='next-title'>{ type === 'risk' ? this.getTitle(item.typeCode) : item.typeName }</span>
......@@ -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 {
datas.map((item, index) => {
return (
<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>
);
})
......
......@@ -35,59 +35,59 @@ export default class SafetyIndex extends Component {
const { safetyIndexData } = this.state;
return {
tooltip: {
show:false
show: false
},
toolbox: {
show:false,
feature: {
mark: {show: false},
restore: {show: false},
saveAsImage: {show: false}
}
show: false,
feature: {
mark: { show: false },
restore: { show: false },
saveAsImage: { show: false }
}
},
series: [
{
name: '今日安全指数',
type: 'gauge',
center: ['10%', '48%'], // 默认全局居中
radius: '60%',
min: 0,
max: 100,
endAngle: 90,
startAngle:-90,
splitNumber: 3,
axisLine: { // 坐标轴线
show:false,
lineStyle: { // 属性lineStyle控制线条样式
color: [
[0.5, 'red'],
[0.9, 'Orange'],
[0.95, 'Gold'],
[1, '#00C3FF']
],
width: 0,
opacity : 0
}
},
axisLabel: { // 坐标轴小标记
show:false
},
axisTick: { // 坐标轴小标记
show:false
},
splitLine: { // 分隔线
show:false
},
pointer: {
width: 5
},
title: {
show:false
},
detail: {
show:false
},
data: [{value: safetyIndexData.safetyIndex, name: '今日安全指数'}]
{
name: '今日安全指数',
type: 'gauge',
center: ['10%', '48%'], // 默认全局居中
radius: '60%',
min: 0,
max: 100,
endAngle: 90,
startAngle: -90,
splitNumber: 3,
axisLine: { // 坐标轴线
show: false,
lineStyle: { // 属性lineStyle控制线条样式
color: [
[0.5, 'red'],
[0.9, 'Orange'],
[0.95, 'Gold'],
[1, '#00C3FF']
],
width: 0,
opacity: 0
}
},
axisLabel: { // 坐标轴小标记
show: false
},
axisTick: { // 坐标轴小标记
show: false
},
splitLine: { // 分隔线
show: false
},
pointer: {
width: 5
},
title: {
show: false
},
detail: {
show: false
},
data: [{ value: safetyIndexData.safetyIndex, name: '今日安全指数' }]
}
]
}
......@@ -103,19 +103,21 @@ export default class SafetyIndex extends Component {
return (
<div className='warnModal'>
<div className='close'>
<img src={panoramicIcon.model_close} onClick={() => this.modelOpen(false)}></img>
<img src={panoramicIcon.model_close} alt='' onClick={() => this.modelOpen(false)} />
</div>
{warnController.map(item => {
return (
<div className='model-line'>
<div>
<img src={getIcon(item.icon)}></img>
<div className='warnModal-body'>
{warnController.map(item => {
return (
<div key={item.key} className='model-line'>
<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 className='model-title'>{item.label}</div>
<ModelContent type={item.type} />
</div>
);
})}
);
})}
</div>
</div>
);
}
......@@ -130,21 +132,21 @@ export default class SafetyIndex extends Component {
<div className='safetyIndex-content' onClick={() => this.modelOpen(true)}>
<div>今日安全指数 </div>
<div className='safetyIndex-content-row'>
<div className='number-large'>{safetyIndexData.safetyIndex}</div>
<span className='number-unit'>&nbsp;&nbsp;
<img src={panoramicIcon.safetyup} className="row-up" alt="up" />
</span>
<div className='number-large'>{safetyIndexData.safetyIndex}</div>
<span className='number-unit'>&nbsp;&nbsp;
<img src={panoramicIcon.safetyup} className="row-up" alt="up" />
</span>
</div>
{
[{name:'风险值上升',num:safetyIndexData.riskExceptionNum},
{name:'巡检不合格',num:safetyIndexData.checkExceptionNum},
{name:'火灾报警',num:safetyIndexData.fireExceptionNum}].map((item,index)=>
<div className="content-item">{item.name} {item.num}</div>
[{ name: '风险异常',num: safetyIndexData.riskExceptionNum },
{ name: '巡检异常',num: safetyIndexData.checkExceptionNum },
{ name: '故障告警',num: safetyIndexData.fireExceptionNum }].map((item,index)=>
<div key={item.name} className="content-item">{item.name} {item.num}</div>
)
}
</div>
<ReactEcharts className='safetyIndex-content-chart' option={this.getOption()}/>
{ modelVisable && this.renderWarnContent()}
</div>
<ReactEcharts className='safetyIndex-content-chart' option={this.getOption()} />
{ modelVisable && this.renderWarnContent()}
</div>
);
}
......
......@@ -2,7 +2,7 @@
* 告警控制
*/
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: 'check', icon: 'model_patrol', type: 'check', label: '巡检异常' }
];
......
......@@ -5,7 +5,10 @@ import Icon from 'amos-icon';
import ParamsHeader from './paramsHeader';
import AmosGridTable from './../common/tableComponent/table/AmosGridTable';
import {
searchAction
searchAction,
msgAction,
exeRecordAction,
trajectoryAction
} from './../../services/3dService';
const { TabList, Tab, TabPanel } = Tabs;
......@@ -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 = [
{ id: '1', key: 'search', 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 {
......@@ -71,7 +100,10 @@ class SearchPane extends Component {
dataList: [],
retrieveType: undefined,
totalCount: 0,
filter: []
filter: [],
msgDataList: [],
recordDataList: [],
trajectoryDataList: []
};
}
......@@ -81,18 +113,17 @@ class SearchPane extends Component {
this.fetchRetrieveData();
}
// onSearch = (page) => {
// searchAction(inputText, dataLevel, orgCode, nodeState, protectObjName, routeName, type, page || 0, pageSize).then(d => {
// // 填充列表数据
// this.listRef.setData(d, this);
// });
// }
retrieveOnChange = (filter) => {
// const { pageSize } = this.state;
this.setState({filter},this.fetchRetrieveData);
paramsOnChange = (filter) => {
const {activeKey} = this.state;
if(activeKey === 'search'){
this.setState({filter},this.fetchRetrieveData);
}else if(activeKey === 'message'){
this.setState({filter},this.fetchMsgData);
}else if(activeKey === 'record'){
this.setState({filter},this.fetchRecordData);
}else if(activeKey === 'trajectory'){
this.setState({filter},this.fetchTrajectoryData);
}
}
......@@ -112,13 +143,15 @@ class SearchPane extends Component {
};
onTabClick = (value) =>{
console.log(value)
this.pageConfig.current = 0;
if(value === 'search'){
this.fetchRetrieveData();
}else if(value === 'search'){
}else{
}else if(value === 'message'){
this.fetchMsgData();
}else if(value === 'record'){
this.fetchRecordData();
}else if(value === 'trajectory'){
this.fetchTrajectoryData()
}
this.setState({ activeKey:value });
}
......@@ -126,7 +159,38 @@ class SearchPane extends Component {
getPanelHeight = () => {
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 = ()=> {
const { filter } = this.state;
let inputText = '';
......@@ -171,7 +235,7 @@ class SearchPane extends Component {
};
render() {
const { dataList,activeKey,retrieveType,totalCount } = this.state;
const { dataList,activeKey,retrieveType,totalCount,msgDataList,recordDataList,trajectoryDataList } = this.state;
return (
<div>
{ this.props.visible && <div className="search-pane-bg"/> }
......@@ -182,13 +246,14 @@ class SearchPane extends Component {
<Tabs
activeKey={activeKey}
onChange={(index, key) => this.onTabClick(key)}
destroyContent
>
<TabList>
{tabs.map((item, i) => (
<Tab key={item.key} activeKey={item.key} closable={item.closable}>{item.title}</Tab>)
)}
</TabList>
<ParamsHeader retrieveOnChange={this.retrieveOnChange} retrieveType='search'/>
<ParamsHeader paramsOnChange={this.paramsOnChange} activeKey={activeKey}/>
<TabPanel activeKey="search">
<div className="search-pane-table">
<AmosGridTable
......@@ -205,8 +270,45 @@ class SearchPane extends Component {
/>
</div>
</TabPanel>
<TabPanel activeKey="message">消息</TabPanel>
<TabPanel activeKey="contingency">预案</TabPanel>
<TabPanel activeKey="message">
<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>
</SidePane>}
</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