Commit ec5406ba authored by 单奇雲's avatar 单奇雲

整理代码

parent f9dd2a4c
...@@ -105,7 +105,7 @@ class TaskTopo extends Component { ...@@ -105,7 +105,7 @@ class TaskTopo extends Component {
// 选择节点 // 选择节点
nodeSelectionChanged = (node) => { nodeSelectionChanged = (node) => {
if(node.isSelected){ if(node.isSelected){
console.log(node.data,'selected'); // console.log(node.data,'selected');
if(node.type.name == "Link"){// 设置主任务连线样式 if(node.type.name == "Link"){// 设置主任务连线样式
let fromNode = this.diagram.model.findNodeDataForKey(node.data.from); let fromNode = this.diagram.model.findNodeDataForKey(node.data.from);
......
...@@ -11,6 +11,8 @@ import formatUrl from 'amos-processor/lib/utils/urlFormat'; ...@@ -11,6 +11,8 @@ import formatUrl from 'amos-processor/lib/utils/urlFormat';
import { FasSerUrl } from 'CONSTS/urlConsts'; import { FasSerUrl } from 'CONSTS/urlConsts';
import _amosTool from 'amos-tool'; import _amosTool from 'amos-tool';
import TaskTopo from './../taskTopo';
const sidePaneStyle = { const sidePaneStyle = {
planDrill: { planDrill: {
...@@ -34,6 +36,18 @@ const sidePaneStyle = { ...@@ -34,6 +36,18 @@ const sidePaneStyle = {
borderRightColor: 'rgba(234, 234, 234, 1)', borderRightColor: 'rgba(234, 234, 234, 1)',
overflow: 'auto' overflow: 'auto'
} }
},
taskTopo: {
right: 0,
top: 82,
bottom: 0,
style: {
backgroundColor: 'rgba(255, 255, 255, 1)',
borderRightWidth: '1px',
borderRightStyle: 'solid',
borderRightColor: 'rgba(234, 234, 234, 1)',
overflow: 'auto'
}
} }
}; };
...@@ -53,7 +67,9 @@ class PublishView extends Component { ...@@ -53,7 +67,9 @@ class PublishView extends Component {
animateDelay: 0, animateDelay: 0,
rightClickNodeTreeItem: null, rightClickNodeTreeItem: null,
node: {}, node: {},
shareVisible: false shareVisible: false,
topoVidible: false
}; };
} }
...@@ -95,6 +111,10 @@ class PublishView extends Component { ...@@ -95,6 +111,10 @@ class PublishView extends Component {
return <PlanTreeView activeKey={activeKey} onTreeSelect={this.onTreeSelect} onRightClick={this.onRightClick} onRightCancel={this._handleClick}/>; return <PlanTreeView activeKey={activeKey} onTreeSelect={this.onTreeSelect} onRightClick={this.onRightClick} onRightCancel={this._handleClick}/>;
} }
getTaskTopo = () => {
return <TaskTopo appId={74}/>
}
handleChange = (activeKey) => { handleChange = (activeKey) => {
const { params } = this.state; const { params } = this.state;
let $path = {}; let $path = {};
...@@ -121,6 +141,10 @@ class PublishView extends Component { ...@@ -121,6 +141,10 @@ class PublishView extends Component {
case 'onOff': case 'onOff':
this.setState({ visible: !this.state.visible }); this.setState({ visible: !this.state.visible });
break; break;
case 'taskTopo':
this.setState({ activeKey,topoVidible: !this.state.topoVidible});
default: default:
break; break;
} }
...@@ -143,7 +167,6 @@ class PublishView extends Component { ...@@ -143,7 +167,6 @@ class PublishView extends Component {
onRightClick = e => { onRightClick = e => {
let { activeKey } = this.state; let { activeKey } = this.state;
if( activeKey === 'textPlan' && e.node.props.type === 'textNode'){//文本预案添加发布,导出功能 并为文本 if( activeKey === 'textPlan' && e.node.props.type === 'textNode'){//文本预案添加发布,导出功能 并为文本
console.log("asdfasdfasdf")
this.setState({ this.setState({
rightClickNodeTreeItem: { rightClickNodeTreeItem: {
pageX: e.event.pageX, pageX: e.event.pageX,
...@@ -254,39 +277,13 @@ class PublishView extends Component { ...@@ -254,39 +277,13 @@ class PublishView extends Component {
} }
render() { render() {
const { activeKey,visible,animateDelay,shareVisible } = this.state; const { activeKey,visible,animateDelay,shareVisible, topoVidible } = this.state;
const animateProps = { const animateProps = {
transitionAppear: true transitionAppear: true
}; };
return ( return (
<div className='publish-view-root'> <div style={{height:'100%'}}>
<div className='publish-view-content'> {this.getTaskTopo()}
<div className='publish-view-header'>
{this.renderButton(activeKey)}
</div>
<SidePane
className='publish-view-side'
animateName="fade-left"
animateProps={animateProps}
animateDelay={animateDelay}
visible={visible}
{...sidePaneStyle[activeKey]}
>
{activeKey && this.getSidePaneContent(activeKey)}
</SidePane>
{this.props.children}
</div>
{this.getNodeTreeRightClickMenu()}
<Modal
header="链接分享"
visible={shareVisible}
destroyContent
// onOk={this.onOk}
onCancel={this.cancel}
content={visible && this.getShareContent()}
noDefaultFooter
/>
</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