Commit 8d5a96a1 authored by 张博's avatar 张博

风险点,风险区域

parent af248adc
.ModuleEditPage {
position: relative;
height: 100%;
::-webkit-scrollbar { /* 血槽宽度 */
width:5px;
height: 5px;
background-color: rgba(10, 53, 62, 1);
border-radius: 5px;
}
::-webkit-scrollbar-thumb { /* 拖动条 */
border-radius: 5px;
background-color: rgba(255, 255, 255, 0.4);
}
::-webkit-scrollbar-track { /* 背景槽 */
background-color:rgba(17, 44, 88, 0.2);
}
.topBox {
position: absolute;
top: 34px;
......@@ -158,6 +171,7 @@
height: 100%;
padding: 32px 0;
.rightContainer {
position: relative;
width: 100%;
height: 100%;
background-color: rgba(10, 53, 62, 0.68);
......@@ -165,7 +179,8 @@
padding: 12px;
color: #fff;
.basic-demo{
height: calc(100% - 48px);
height: calc(100% - 53px);
overflow-y: auto;
}
.amos-form-item-label {
color: #fff;
......@@ -207,8 +222,11 @@
}
}
.bottomBtns {
position: absolute;
bottom:15px;
padding-top: 15px;
text-align: center;
left:50%;
margin-left: -100px;
.sureBtn {
width: 100px;
height: 33px;
......
......@@ -209,6 +209,7 @@ class View3D extends Component {
};
componentWillUnmount() {
if (this.timer) {
clearTimeout(this.timer);
}
......@@ -530,12 +531,11 @@ class View3D extends Component {
let { markers } = this.state
getPointListAction().then(data => {
// console.log(data);
for (let i = 0; i < data.length;i++)
console.log(JSON.stringify(data))
for (let i = 0; i < data.length;i++){
markers[data[i].type].push(data[i])
this.setState({
markers
})
}
this.setState({markers})
})
}
startDrow = (areaItem) => {
......@@ -798,11 +798,17 @@ class View3D extends Component {
saveAreaData = () => {
let { treeData, routePathData, pageType } = this.state;
let routePathParams = [];
console.log(routePathData)
//console.log(routePathData)
saveAreaDataAction(routePathData).then(d => {
message.success('保存成功!');
this.a3dRef.changeDrawState(PEN_STATE.CLEARED);//清除当前路径
// 结束绘制
this.setState({
drawing: false
});
getAreaTreeAction().then(data => {
console.log(data);
//console.log(data);
console.log(JSON.stringify(data))
this.setState({
treeData:data || []
})
......@@ -813,7 +819,7 @@ class View3D extends Component {
}
//保存点绑定
savePointData = () => {
let { markers } = this.state;
let { markers ,pointTypeArr} = this.state;
let paramsArr = [];
for ( let key in markers ){
let item = markers[key];
......@@ -826,23 +832,39 @@ class View3D extends Component {
}
}
savePointListAction(paramsArr).then(data => {
console.log(data);
getPointTreeAction(pointTypeArr[0].code || '').then(data => {
this.setState({
pointType: pointTypeArr[0].code || '',
treeData: data || [],
pageType: 'point',
showRightPanel: false
});
});
})
}
// 删除点绑定
deletePointBind = () => {
let { selectPoints } = this.state;
let { selectPoints ,pointTypeArr,markers} = this.state;
if (selectPoints) {
let pointParams = [];
pointParams.push({
pointId: selectPoints.id,
pointType: selectPoints.type,
position3d: `${selectPoints.position.x},${selectPoints.position.y},${selectPoints.position.z}`
position3d: ``
})
savePointListAction(pointParams).then(data => {
console.log(data);
getPointTreeAction(pointTypeArr[0].code || '').then(data => {
this.getPointList()
this.setState({
pointType: pointTypeArr[0].code || '',
treeData: data || [],
pageType: 'point',
showRightPanel: false
});
});
})
}
}
......@@ -856,9 +878,9 @@ class View3D extends Component {
routePath: ''
})
saveAreaDataAction(areaParams).then(d => {
message.success('删除成功!');
getAreaTreeAction().then(data => {
console.log(data);
this.setState({
treeData:data || []
})
......@@ -885,7 +907,6 @@ class View3D extends Component {
});
} else {
getPointTreeAction(pointTypeArr[0].code || '').then(data => {
console.log(data);
this.setState({
pointType: pointTypeArr[0].code || '',
treeData: data || [],
......@@ -896,8 +917,11 @@ class View3D extends Component {
}
}
pointTypeChange = (pointType) => {
this.setState({
pointType,
treeData:[]
});
getPointTreeAction(pointType).then(data => {
console.log(data);
this.setState({
pointType,
treeData: data || []
......@@ -963,7 +987,7 @@ class View3D extends Component {
levelStr: 'level_2'
};
markers.riskSource.push(addPointParam);
console.log(markers);
this.setState({
markers
});
......@@ -1234,9 +1258,9 @@ class View3D extends Component {
}
getExceptionAreasList = () => {
exceptionRegionListAction().then(data=>{
this.setState({ exceptionAreas: data });
});
// exceptionRegionListAction().then(data=>{
// this.setState({ exceptionAreas: data });
// });
}
initExceptionAreasData = ()=>{
......@@ -1271,6 +1295,7 @@ class View3D extends Component {
} else if (type === 'out_except_model'){
this.props.editModelChange(false);//显示全景统计
this.setState({
treeData:[],
sideControlShow: false, //隐藏耳朵
isShowActionBar: true, //显示工具栏
startLoadExceptionArea: true, //显示marker,
......
......@@ -43,7 +43,7 @@ class RightEditPointPanel extends Component {
}
componentWillReceiveProps(nextProps) {
let {detailData}=this.props
let {detailData}=nextProps
getPointTreeDetailAction(detailData.id,detailData.type).then(data => {
console.log(data);
this.setState({
......@@ -95,7 +95,6 @@ class RightEditPointPanel extends Component {
render() {
let { rules, form,pointTypeArr,pointType ,detailData} = this.state;
let { pageType } = this.props;
const formItemLayout = {
labelCol: {
xs: { span: 28 },
......@@ -106,10 +105,9 @@ class RightEditPointPanel extends Component {
return (
<div className="rightEditPanel">
<div className='rightContainer'>
<Form className="basic-demo" ref={component => this.form = component} model={form} rules={rules}>
<Form className="basic-demo" ref={component => this.form = component} model={form} rules={rules}>
<div className='topForm'>
<div className='rightTitle'>
<div className='rightTitle'>
<img src='/mods/components/3dviewConvertor/assets/convertor/moduleEdit/rightModalTitleIcon.png'/>
<span className='titleText'>风险点信息</span>
</div>
......@@ -198,7 +196,10 @@ class RightEditPointPanel extends Component {
</div>
</div>
</div>
<div className='bottomBtns'>
</Form>
<div className='bottomBtns'>
<Button
className='sureBtn'
onClick={() => {
......@@ -210,9 +211,8 @@ class RightEditPointPanel extends Component {
// this.props.save()
}} ></Button>
</div>
</Form>
</div>
</div>
);
}
......
......@@ -27,7 +27,7 @@ class RightEditRegionPanel extends Component {
}
componentDidMount() {
console.log(JSON.stringify(this.props.detailData))
console.log(JSON.stringify(this.props.detailData))
// getAreaTreeDetailAction().then(data => {
// console.log(data);
// this.setState({
......@@ -76,7 +76,7 @@ console.log(JSON.stringify(this.props.detailData))
handleSubmit = (e) => {
// e.preventDefault();
this.form.validate((valid, dataValues, errors) => {
alert(JSON.stringify(dataValues))
console.log('返回内容:', dataValues, valid, errors);
if (valid) {
//AmosAlert.success('结果', JSON.stringify(dataValues));
......@@ -156,7 +156,7 @@ console.log(JSON.stringify(this.props.detailData))
<div className='msgItem'>
<div className='itemLabel'>三维坐标</div>
<div className='position'>
<div className='positionItem'>
{/* <div className='positionItem'>
<FormItem label="长" field="positionX" {...formItemLayout}>
<Input value={detailData.ue4Location && detailData.ue4Location[0]} />
</FormItem>
......@@ -165,10 +165,11 @@ console.log(JSON.stringify(this.props.detailData))
<FormItem label="宽" field="positionY" {...formItemLayout}>
<Input value={detailData.ue4Location && detailData.ue4Location[1]} />
</FormItem>
</div>
</div> */}
<div className='positionItem'>
<FormItem label="高" field="positionZ" {...formItemLayout}>
<Input value={detailData.ue4Location && detailData.ue4Location[2]} />
<Input defaultValue={0} onChange={(e) => this.onChange('positionZ', e)}/>
{/* <Input value={detailData.ue4Location && detailData.ue4Location[2]} /> */}
</FormItem>
</div>
</div>
......@@ -177,16 +178,20 @@ console.log(JSON.stringify(this.props.detailData))
</div>
</div>
<div className='bottomBtns'>
<Button
className='sureBtn'
onClick={() => {
this.handleSubmit()
}} ></Button>
<Button
className='cancelBtn'
onClick={() => {
// this.props.save()
}} ></Button>
</div>
</Form>
......
This diff is collapsed.
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