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

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

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