Commit 81e67119 authored by 单奇雲's avatar 单奇雲

1.修复预案文件包含 . 的文件查看功能 2.修改领导架构属性新增bug 3.新增3维预案全屏功能

parent 0dc1f69b
...@@ -29,8 +29,11 @@ class Upload extends Component { ...@@ -29,8 +29,11 @@ class Upload extends Component {
const fileArry = []; const fileArry = [];
for (let i = 0; i < event.target.files.length; i++ ){ for (let i = 0; i < event.target.files.length; i++ ){
let obj = {}; let obj = {};
obj.name = event.target.files[i].name.split('.')[0]; let fileName = event.target.files[i].name;
obj.type = `.${event.target.files[i].name.split('.')[1]}`; obj.name = fileName.substring(0,fileName.lastIndexOf("."));
obj.type = fileName.substring(fileName.lastIndexOf("."),fileName.length);
// obj.name = event.target.files[i].name.split('.')[0];
// obj.type = `.${event.target.files[i].name.split('.')[1]}`;
obj.file = event.target.files[i]; obj.file = event.target.files[i];
obj.key = fileList.length + i; obj.key = fileList.length + i;
fileArry.push(obj); fileArry.push(obj);
......
...@@ -39,16 +39,16 @@ class CusVizLib extends Component { ...@@ -39,16 +39,16 @@ class CusVizLib extends Component {
onItemClick = (itemKey, data) => { onItemClick = (itemKey, data) => {
if (itemKey === 'preview') { if (itemKey === 'preview') {
// if(data.publishState == 1){ if(data.publishState == 1){
let path = { let path = {
pathname: pageUrl.planDrill, pathname: pageUrl.planDrill,
state: { appId: data.id,isPublish: !!data.publishState } state: { appId: data.id,isPublish: !!data.publishState }
}; };
ls.write(eventTopics.plan_drill_appId,data.id) ls.write(eventTopics.plan_drill_appId,data.id)
browserHistory.push(path); browserHistory.push(path);
// }else{ }else{
// message.danger('预案未发布!!!'); message.danger('预案未发布!!!');
// } }
} }
if (itemKey === 'textImport') { if (itemKey === 'textImport') {
this.setState({ appId: data.id, visible: true }); this.setState({ appId: data.id, visible: true });
......
...@@ -121,8 +121,7 @@ class LeaderStructModel extends Component { ...@@ -121,8 +121,7 @@ class LeaderStructModel extends Component {
let { form } = this.state; let { form } = this.state;
form.nodeid = node.id; form.nodeid = node.id;
form.nodekey = node.key; form.nodekey = node.key;
// this.nodeDetailEdit(form); form.nodeDetail = typeof(form.nodeDetail)=='string' ? form.nodeDetail : JSON.stringify(form.nodeDetail);
form.nodeDetail = JSON.stringify(form.nodeDetail);
this.props.saveTopography(form); this.props.saveTopography(form);
} else { } else {
return false; return false;
......
...@@ -4,7 +4,7 @@ import { Modal, Button, message, AmosAlert } from 'amos-framework'; ...@@ -4,7 +4,7 @@ import { Modal, Button, message, AmosAlert } from 'amos-framework';
import BizIcon from './../../../common/icon/BizIcon'; import BizIcon from './../../../common/icon/BizIcon';
import ToolBar from './ToolBar'; import ToolBar from './ToolBar';
import go from 'amos-gojs'; import go from 'amos-gojs';
import { queryTopographyAction, queryTopographyByTypeAction, updateTopographyAction, nodeDetailTopoAction, deleteTopoAction } from './../../../../services/preControlService'; import { queryTopographyByTypeAction, updateTopographyAction, nodeDetailTopoAction, deleteTopoAction } from './../../../../services/preControlService';
import LeaderStructModel from './LeaderStructModel'; import LeaderStructModel from './LeaderStructModel';
import LeaderStructRightGrid from './LeaderStructRightGrid'; import LeaderStructRightGrid from './LeaderStructRightGrid';
...@@ -42,10 +42,6 @@ class LeaderStruct extends Component { ...@@ -42,10 +42,6 @@ class LeaderStruct extends Component {
} }
fetchData = () => { fetchData = () => {
// queryTopographyAction(this.state.type, appId).then(res =>{
// this.setState({nodeData: res.nodeData , linkData: res.linkData })
// this.renderCanvas();
// });
queryTopographyByTypeAction(this.state.type).then(res =>{ queryTopographyByTypeAction(this.state.type).then(res =>{
this.setState({nodeData: res.nodeData , linkData: res.linkData }) this.setState({nodeData: res.nodeData , linkData: res.linkData })
this.renderCanvas(); this.renderCanvas();
...@@ -139,7 +135,7 @@ class LeaderStruct extends Component { ...@@ -139,7 +135,7 @@ class LeaderStruct extends Component {
renderDetail = () => { renderDetail = () => {
let { nodeAttrs } = this.state; let { nodeAttrs } = this.state;
let detailData = nodeAttrs != undefined && nodeAttrs.nodeDetail ? JSON.parse(nodeAttrs.nodeDetail) : [{name:'无',value:'无'}]; let detailData = (nodeAttrs != undefined && nodeAttrs.nodeDetail) ? JSON.parse(nodeAttrs.nodeDetail) : [{name:'无',value:'无'}];
return (<div id="toolTipDIV" className="tooltip-content" style={{ position: 'absolute', zIndex: 1000 ,display: 'none'}}> return (<div id="toolTipDIV" className="tooltip-content" style={{ position: 'absolute', zIndex: 1000 ,display: 'none'}}>
{detailData && detailData.map(item => { {detailData && detailData.map(item => {
return (<div key={item.name} className="tooltip-item"> return (<div key={item.name} className="tooltip-item">
...@@ -331,7 +327,7 @@ class LeaderStruct extends Component { ...@@ -331,7 +327,7 @@ class LeaderStruct extends Component {
getFooter = () => { getFooter = () => {
const { toolBarFlag } = this.state; const { toolBarFlag } = this.state;
if (toolBarFlag === 'edit') { if (toolBarFlag === 'edit') {
return (<div><Button type="minor" onClick={() => this.cancel()}>取消</Button><Button onClick={() => this.onOk()}>确定</Button></div> ); return (<div><Button type="minor" onClick={() => this.cancel()}>取消</Button><Button onClick={() => this.onOk()}>确定</Button></div> );
} }
} }
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { deepCopy } from 'amos-tool'; import { deepCopy } from 'amos-tool';
import A3DDesigner, { r3d, Connect, DESIGNER_CONSTS,EVENT_CONSTS } from 'amos-3d/lib/designer'; import A3DDesigner, { r3d, Connect, DESIGNER_CONSTS,EVENT_CONSTS } from 'amos-3d/lib/designer';
import { A3DUtil } from 'amos-3d/lib/threeTools'; import { A3DUtil } from 'amos-3d/lib/threeTools';
import WorkerObjContent from 'amos-3d/lib/worker/WorkerObjContent'; import WorkerObjContent from 'amos-3d/lib/worker/WorkerObjContent';
import { BaseObjHelper } from 'base-r3d/lib/factory'; import { BaseObjHelper } from 'base-r3d/lib/factory';
...@@ -173,8 +173,6 @@ class StageActuator extends Component { ...@@ -173,8 +173,6 @@ class StageActuator extends Component {
} }
//展开任务列表 //展开任务列表
PubSub.publish(eventTopics.plan_task_list,true); PubSub.publish(eventTopics.plan_task_list,true);
//收起预案树
// PubSub.publish(eventTopics.plan_tree_view,false);
} }
playTargetAnimate = (anim, e) => { playTargetAnimate = (anim, e) => {
...@@ -244,6 +242,7 @@ class StageActuator extends Component { ...@@ -244,6 +242,7 @@ class StageActuator extends Component {
this.sceneFactory = sceneFactory; this.sceneFactory = sceneFactory;
this.cameraFactory = cameraFactory; this.cameraFactory = cameraFactory;
this.rendererFactory = stagePilot.rendererFactory; this.rendererFactory = stagePilot.rendererFactory;
this.stagePilot = stagePilot;
this.r3d = r3d; this.r3d = r3d;
// 设置 UI // 设置 UI
// this.objAnchorHelper = new ObjAnchorHelper({ // this.objAnchorHelper = new ObjAnchorHelper({
...@@ -386,6 +385,12 @@ class StageActuator extends Component { ...@@ -386,6 +385,12 @@ class StageActuator extends Component {
} }
//model end //model end
// 触发全屏
full = () =>{
console.log(this.stagePilot.stageHelper);
this.stagePilot.stageHelper.fullscreen();
}
render() { render() {
const { ativeAnimate, modal, playing, modelModal,startAsyncLoad } = this.state; const { ativeAnimate, modal, playing, modelModal,startAsyncLoad } = this.state;
const { graphConf, baseObjs, dimension, asyncModels,animations } = this.props; const { graphConf, baseObjs, dimension, asyncModels,animations } = this.props;
...@@ -429,6 +434,7 @@ class StageActuator extends Component { ...@@ -429,6 +434,7 @@ class StageActuator extends Component {
playPrev={this.playPrev} playPrev={this.playPrev}
playNext={this.playNext} playNext={this.playNext}
playStop={this.playStop} playStop={this.playStop}
full={this.full}
ativeAnimate={ativeAnimate} ativeAnimate={ativeAnimate}
animations={animations} animations={animations}
playTargetAnimate={this.playTargetAnimate} playTargetAnimate={this.playTargetAnimate}
......
...@@ -32,27 +32,36 @@ class PlayMenuBar extends Component { ...@@ -32,27 +32,36 @@ class PlayMenuBar extends Component {
}; };
} }
componentDidMount(){ componentDidMount () {
// this.tabsPubsub = PubSub.subscribe(eventTopics.plan_task_list,function(topic,message){ window.addEventListener('resize',this.checkFull);
// this.setState({ taskTabsShow: message }) this.checkFull();
// }.bind(this));
}
componentWillUnmount(){
// PubSub.unsubscribe(this.tabsPubsub);
} }
componentWillUnmount() {
window.removeEventListener('resize',this.checkFull);
}
onSelectChange = () => { onSelectChange = () => {
} }
checkFull = () => {
var isFull = document.webkitIsFullScreen;
if(isFull === undefined) isFull = false;
this.setState({quanpingActive:isFull});
}
onButtonClick = (value) => { onButtonClick = (value) => {
const { quanpingActive } = this.state;
if(value == 'tulie'){ if(value == 'tulie'){
this.setState({tulieActive: !this.state.tulieActive}) this.setState({tulieActive: !this.state.tulieActive})
}else if(value == 'zimu'){ }else if(value == 'zimu'){
this.setState({zimuActive: !this.state.zimuActive}) this.setState({zimuActive: !this.state.zimuActive})
}else if(value == 'quanping'){ }else if(value == 'quanping'){
this.setState({quanpingActive: !this.state.quanpingActive}) if(!quanpingActive){
this.props.full();
this.setState({quanpingActive: !this.state.quanpingActive})
}
} }
} }
......
...@@ -26,20 +26,21 @@ class play extends Component { ...@@ -26,20 +26,21 @@ class play extends Component {
return ( return (
<div className='pubview-play'> <div className='pubview-play'>
<PlayerControl <PlayerControl
playAll={this.props.playAll} playAll={this.props.playAll}
playPrev={this.props.playPrev} playPrev={this.props.playPrev}
playNext={this.props.playNext} playNext={this.props.playNext}
playStop={this.props.playStop} playStop={this.props.playStop}
playing={this.props.playing} playing={this.props.playing}
/> />
<PlayProgress <PlayProgress
ativeAnimate={this.props.ativeAnimate} ativeAnimate={this.props.ativeAnimate}
animations={this.props.animations} animations={this.props.animations}
playTargetAnimate={this.props.playTargetAnimate} playTargetAnimate={this.props.playTargetAnimate}
/> />
<PlayMenuBar <PlayMenuBar
ativeAnimate={this.props.ativeAnimate} full={this.props.full}
animations={this.props.animations} ativeAnimate={this.props.ativeAnimate}
animations={this.props.animations}
/> />
</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