Commit 63870d58 authored by 单奇雲's avatar 单奇雲

Merge branch 'developer' of http://172.16.10.76/station/amos-station-module-view into developer

parents 5e133a98 41de26cb
...@@ -183,11 +183,11 @@ impEquipmentMode_fireCar: require('../assets/convertor/3dview/markers/IeqMode-fi ...@@ -183,11 +183,11 @@ impEquipmentMode_fireCar: require('../assets/convertor/3dview/markers/IeqMode-fi
'shapan-dianlangoutu': require('../assets/convertor/3dview/prePlan/shapan-dianlangoutu.png'), 'shapan-dianlangoutu': require('../assets/convertor/3dview/prePlan/shapan-dianlangoutu.png'),
'jiaohuqu-yingjichuzhi': require('../assets/convertor/3dview/prePlan/jiaohuqu-yingjichuzhi.png'), 'jiaohuqu-yingjichuzhi': require('../assets/convertor/3dview/prePlan/jiaohuqu-yingjichuzhi.png'),
'jiaohuqu-dianlangou': require('../assets/convertor/3dview/prePlan/jiaohuqu-dianlangou.png'), 'jiaohuqu-dianlangou': require('../assets/convertor/3dview/prePlan/jiaohuqu-dianlangou.png'),
blue: '/src/assets/3dview/prePlan/jiaohuqu-2anniu-lan.png', blue: require('../assets/convertor/3dview/prePlan/jiaohuqu-2anniu-lan.png'),
yellow: '/src/assets/3dview/prePlan/jiaohuqu-2anniu-cheng.png', yellow: require('../assets/convertor/3dview/prePlan/jiaohuqu-2anniu-cheng.png'),
'blue-chang': '/src/assets/3dview/prePlan/jiaohuqu-2anniu-lan-chang.png', 'blue-chang': require('../assets/convertor/3dview/prePlan/jiaohuqu-2anniu-lan-chang.png'),
'yellow-chang': '/src/assets/3dview/prePlan/jiaohuqu-2anniu-cheng-chang.png', 'yellow-chang': require('../assets/convertor/3dview/prePlan/jiaohuqu-2anniu-cheng-chang.png'),
onlyOne: '/src/assets/3dview/prePlan/jiaohuqu-2anniu-cheng-chang.png' onlyOne: require('../assets/convertor/3dview/prePlan/jiaohuqu-2anniu-cheng-chang.png')
}, },
main: { main: {
user: require('../assets/convertor/main/user.png'), user: require('../assets/convertor/main/user.png'),
......
.ModuleEditPage { .ModuleEditPage {
position: relative; position: relative;
height: 100%; 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 { .topBox {
position: absolute; position: absolute;
top: 34px; top: 34px;
...@@ -160,6 +173,7 @@ ...@@ -160,6 +173,7 @@
height: 100%; height: 100%;
padding: 32px 0; padding: 32px 0;
.rightContainer { .rightContainer {
position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: rgba(10, 53, 62, 0.68); background-color: rgba(10, 53, 62, 0.68);
...@@ -167,7 +181,8 @@ ...@@ -167,7 +181,8 @@
padding: 12px; padding: 12px;
color: #fff; color: #fff;
.basic-demo{ .basic-demo{
height: calc(100% - 48px); height: calc(100% - 53px);
overflow-y: auto;
} }
.amos-form-item-label { .amos-form-item-label {
color: #fff; color: #fff;
...@@ -209,8 +224,11 @@ ...@@ -209,8 +224,11 @@
} }
} }
.bottomBtns { .bottomBtns {
position: absolute;
bottom:15px;
padding-top: 15px; padding-top: 15px;
text-align: center; left:50%;
margin-left: -100px;
.sureBtn { .sureBtn {
width: 100px; width: 100px;
height: 33px; height: 33px;
......
...@@ -181,7 +181,8 @@ class View3D extends Component { ...@@ -181,7 +181,8 @@ class View3D extends Component {
planStart = data => { planStart = data => {
this.setState( this.setState(
{ {
planStarted: true planStarted: true,
editFlag: false
}, },
() => { () => {
this.props.trigger(eventTopics.plan_start, { this.props.trigger(eventTopics.plan_start, {
...@@ -201,6 +202,7 @@ class View3D extends Component { ...@@ -201,6 +202,7 @@ class View3D extends Component {
removeFireAlarm2(this); removeFireAlarm2(this);
this.cameraFactory.fitView(desigerHelperConfig.cameraEffect); this.cameraFactory.fitView(desigerHelperConfig.cameraEffect);
this.quitEditMode(); this.quitEditMode();
this.handleExceptModel('out_except_model', '');
}; };
alarmStart = () => { alarmStart = () => {
...@@ -210,6 +212,7 @@ class View3D extends Component { ...@@ -210,6 +212,7 @@ class View3D extends Component {
}; };
componentWillUnmount() { componentWillUnmount() {
if (this.timer) { if (this.timer) {
clearTimeout(this.timer); clearTimeout(this.timer);
} }
...@@ -268,6 +271,7 @@ class View3D extends Component { ...@@ -268,6 +271,7 @@ class View3D extends Component {
this.setState({ fireEquipmentPosition }); this.setState({ fireEquipmentPosition });
} }
assembleTroubleView(this, data, this.state.markers); assembleTroubleView(this, data, this.state.markers);
this.handleExceptModel('out_except_model');
break; break;
case 'base3d.fromws.mapArea_action1-2': //镜头切换(旋转+推进) case 'base3d.fromws.mapArea_action1-2': //镜头切换(旋转+推进)
changeGoodView(this, data); changeGoodView(this, data);
...@@ -532,12 +536,11 @@ class View3D extends Component { ...@@ -532,12 +536,11 @@ class View3D extends Component {
let { markers } = this.state let { markers } = this.state
getPointListAction().then(data => { getPointListAction().then(data => {
// console.log(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]) markers[data[i].type].push(data[i])
this.setState({ }
markers this.setState({markers})
})
}) })
} }
startDrow = (areaItem) => { startDrow = (areaItem) => {
...@@ -800,8 +803,14 @@ class View3D extends Component { ...@@ -800,8 +803,14 @@ class View3D extends Component {
let { routePathData } = this.state; let { routePathData } = this.state;
saveAreaDataAction(routePathData).then(d => { saveAreaDataAction(routePathData).then(d => {
message.success('保存成功!'); message.success('保存成功!');
this.a3dRef.changeDrawState(PEN_STATE.CLEARED);//清除当前路径
// 结束绘制
this.setState({
drawing: false
});
getAreaTreeAction().then(data => { getAreaTreeAction().then(data => {
console.log(data); //console.log(data);
console.log(JSON.stringify(data))
this.setState({ this.setState({
treeData: data || [] treeData: data || []
}); });
...@@ -813,7 +822,7 @@ class View3D extends Component { ...@@ -813,7 +822,7 @@ class View3D extends Component {
//保存点绑定 //保存点绑定
savePointData = () => { savePointData = () => {
let { markers } = this.state; let { markers ,pointTypeArr} = this.state;
let paramsArr = []; let paramsArr = [];
for ( let key in markers ){ for ( let key in markers ){
let item = markers[key]; let item = markers[key];
...@@ -826,22 +835,40 @@ class View3D extends Component { ...@@ -826,22 +835,40 @@ class View3D extends Component {
} }
} }
savePointListAction(paramsArr).then(data => { 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 = () => { deletePointBind = () => {
let { selectPoints } = this.state; let { selectPoints ,pointTypeArr,markers} = this.state;
if (selectPoints) { if (selectPoints) {
let pointParams = []; let pointParams = [];
pointParams.push({ pointParams.push({
pointId: selectPoints.id, pointId: selectPoints.id,
pointType: selectPoints.type, pointType: selectPoints.type,
position3d: `${selectPoints.position.x},${selectPoints.position.y},${selectPoints.position.z}` position3d: ``
}); })
savePointListAction(pointParams).then(data => { 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
}); });
});
})
} }
} }
//删除区域 //删除区域
...@@ -854,9 +881,9 @@ class View3D extends Component { ...@@ -854,9 +881,9 @@ class View3D extends Component {
routePath: '' routePath: ''
}); });
saveAreaDataAction(areaParams).then(d => { saveAreaDataAction(areaParams).then(d => {
message.success('删除成功!'); message.success('删除成功!');
getAreaTreeAction().then(data => { getAreaTreeAction().then(data => {
console.log(data);
this.setState({ this.setState({
treeData: data || [] treeData: data || []
}); });
...@@ -883,7 +910,6 @@ class View3D extends Component { ...@@ -883,7 +910,6 @@ class View3D extends Component {
}); });
} else { } else {
getPointTreeAction(pointTypeArr[0].code || '').then(data => { getPointTreeAction(pointTypeArr[0].code || '').then(data => {
console.log(data);
this.setState({ this.setState({
pointType: pointTypeArr[0].code || '', pointType: pointTypeArr[0].code || '',
treeData: data || [], treeData: data || [],
...@@ -894,8 +920,11 @@ class View3D extends Component { ...@@ -894,8 +920,11 @@ class View3D extends Component {
} }
} }
pointTypeChange = (pointType) => { pointTypeChange = (pointType) => {
this.setState({
pointType,
treeData:[]
});
getPointTreeAction(pointType).then(data => { getPointTreeAction(pointType).then(data => {
console.log(data);
this.setState({ this.setState({
pointType, pointType,
treeData: data || [] treeData: data || []
...@@ -961,7 +990,7 @@ class View3D extends Component { ...@@ -961,7 +990,7 @@ class View3D extends Component {
levelStr: 'level_2' levelStr: 'level_2'
}; };
markers.riskSource.push(addPointParam); markers.riskSource.push(addPointParam);
console.log(markers);
this.setState({ this.setState({
markers markers
}); });
...@@ -1270,6 +1299,7 @@ class View3D extends Component { ...@@ -1270,6 +1299,7 @@ class View3D extends Component {
} else if (type === 'out_except_model'){ } else if (type === 'out_except_model'){
this.props.editModelChange(false);//显示全景统计 this.props.editModelChange(false);//显示全景统计
this.setState({ this.setState({
treeData:[],
sideControlShow: false, //隐藏耳朵 sideControlShow: false, //隐藏耳朵
isShowActionBar: true, //显示工具栏 isShowActionBar: true, //显示工具栏
startLoadExceptionArea: true, //显示marker, startLoadExceptionArea: true, //显示marker,
......
...@@ -43,7 +43,7 @@ class RightEditPointPanel extends Component { ...@@ -43,7 +43,7 @@ class RightEditPointPanel extends Component {
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
let {detailData}=this.props let {detailData}=nextProps
getPointTreeDetailAction(detailData.id,detailData.type).then(data => { getPointTreeDetailAction(detailData.id,detailData.type).then(data => {
console.log(data); console.log(data);
this.setState({ this.setState({
...@@ -95,7 +95,6 @@ class RightEditPointPanel extends Component { ...@@ -95,7 +95,6 @@ class RightEditPointPanel extends Component {
render() { render() {
let { rules, form,pointTypeArr,pointType ,detailData} = this.state; let { rules, form,pointTypeArr,pointType ,detailData} = this.state;
let { pageType } = this.props; let { pageType } = this.props;
const formItemLayout = { const formItemLayout = {
labelCol: { labelCol: {
xs: { span: 28 }, xs: { span: 28 },
...@@ -107,7 +106,6 @@ class RightEditPointPanel extends Component { ...@@ -107,7 +106,6 @@ class RightEditPointPanel extends Component {
<div className="rightEditPanel"> <div className="rightEditPanel">
<div className='rightContainer'> <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='topForm'>
<div className='rightTitle'> <div className='rightTitle'>
<img src='/mods/components/3dviewConvertor/assets/convertor/moduleEdit/rightModalTitleIcon.png'/> <img src='/mods/components/3dviewConvertor/assets/convertor/moduleEdit/rightModalTitleIcon.png'/>
...@@ -198,6 +196,9 @@ class RightEditPointPanel extends Component { ...@@ -198,6 +196,9 @@ class RightEditPointPanel extends Component {
</div> </div>
</div> </div>
</div> </div>
</Form>
<div className='bottomBtns'> <div className='bottomBtns'>
<Button <Button
className='sureBtn' className='sureBtn'
...@@ -210,9 +211,8 @@ class RightEditPointPanel extends Component { ...@@ -210,9 +211,8 @@ class RightEditPointPanel extends Component {
// this.props.save() // this.props.save()
}} ></Button> }} ></Button>
</div> </div>
</Form>
</div> </div>
</div> </div>
); );
} }
......
...@@ -27,7 +27,7 @@ class RightEditRegionPanel extends Component { ...@@ -27,7 +27,7 @@ class RightEditRegionPanel extends Component {
} }
componentDidMount() { componentDidMount() {
console.log(JSON.stringify(this.props.detailData)) console.log(JSON.stringify(this.props.detailData))
// getAreaTreeDetailAction().then(data => { // getAreaTreeDetailAction().then(data => {
// console.log(data); // console.log(data);
// this.setState({ // this.setState({
...@@ -76,7 +76,7 @@ console.log(JSON.stringify(this.props.detailData)) ...@@ -76,7 +76,7 @@ console.log(JSON.stringify(this.props.detailData))
handleSubmit = (e) => { handleSubmit = (e) => {
// e.preventDefault(); // e.preventDefault();
this.form.validate((valid, dataValues, errors) => { this.form.validate((valid, dataValues, errors) => {
alert(JSON.stringify(dataValues))
console.log('返回内容:', dataValues, valid, errors); console.log('返回内容:', dataValues, valid, errors);
if (valid) { if (valid) {
//AmosAlert.success('结果', JSON.stringify(dataValues)); //AmosAlert.success('结果', JSON.stringify(dataValues));
...@@ -156,7 +156,7 @@ console.log(JSON.stringify(this.props.detailData)) ...@@ -156,7 +156,7 @@ console.log(JSON.stringify(this.props.detailData))
<div className='msgItem'> <div className='msgItem'>
<div className='itemLabel'>三维坐标</div> <div className='itemLabel'>三维坐标</div>
<div className='position'> <div className='position'>
<div className='positionItem'> {/* <div className='positionItem'>
<FormItem label="长" field="positionX" {...formItemLayout}> <FormItem label="长" field="positionX" {...formItemLayout}>
<Input value={detailData.ue4Location && detailData.ue4Location[0]} /> <Input value={detailData.ue4Location && detailData.ue4Location[0]} />
</FormItem> </FormItem>
...@@ -165,10 +165,11 @@ console.log(JSON.stringify(this.props.detailData)) ...@@ -165,10 +165,11 @@ console.log(JSON.stringify(this.props.detailData))
<FormItem label="宽" field="positionY" {...formItemLayout}> <FormItem label="宽" field="positionY" {...formItemLayout}>
<Input value={detailData.ue4Location && detailData.ue4Location[1]} /> <Input value={detailData.ue4Location && detailData.ue4Location[1]} />
</FormItem> </FormItem>
</div> </div> */}
<div className='positionItem'> <div className='positionItem'>
<FormItem label="高" field="positionZ" {...formItemLayout}> <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> </FormItem>
</div> </div>
</div> </div>
...@@ -177,16 +178,20 @@ console.log(JSON.stringify(this.props.detailData)) ...@@ -177,16 +178,20 @@ console.log(JSON.stringify(this.props.detailData))
</div> </div>
</div> </div>
<div className='bottomBtns'> <div className='bottomBtns'>
<Button <Button
className='sureBtn' className='sureBtn'
onClick={() => { onClick={() => {
this.handleSubmit() this.handleSubmit()
}} ></Button> }} ></Button>
<Button <Button
className='cancelBtn' className='cancelBtn'
onClick={() => { onClick={() => {
// this.props.save() // this.props.save()
}} ></Button> }} ></Button>
</div> </div>
</Form> </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