Commit 8f361d08 authored by shanqiyun's avatar shanqiyun

任务列表重置功能

parent a9eba571
...@@ -140,6 +140,7 @@ class StageActuator extends Component { ...@@ -140,6 +140,7 @@ class StageActuator extends Component {
if(type === 'reset'){ if(type === 'reset'){
this.a3dRef && this.a3dRef.playAll(); this.a3dRef && this.a3dRef.playAll();
this.setState({ currentIndex: 0, ativeAnimate: animations[0].animateKey}); this.setState({ currentIndex: 0, ativeAnimate: animations[0].animateKey});
this.taskTabs.resetTaskTabs();
}else{ }else{
this.a3dRef && this.a3dRef.changePlayState('start'); this.a3dRef && this.a3dRef.changePlayState('start');
} }
......
...@@ -73,6 +73,16 @@ class taskTabs extends Component { ...@@ -73,6 +73,16 @@ class taskTabs extends Component {
this.setState({ tabs }); this.setState({ tabs });
} }
resetTaskTabs = () => {
let { tabs } = this.state;
tabs.forEach(t => {
t.models.forEach(m => {
m.tasks = [];
});
});
this.setState({ tabs });
}
render() { render() {
const { tabs,taskTabsShow } = this.state; const { tabs,taskTabsShow } = this.state;
if(taskTabsShow){ if(taskTabsShow){
......
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