|
|
@ -141,7 +141,7 @@ export default { |
|
|
|
...mapActions('user', ['getToken']), |
|
|
|
...mapActions('task', ['getRegulars', 'getPermanent', 'getGlobal']), |
|
|
|
...mapMutations('user', ['setToken']), |
|
|
|
...mapMutations('project', ['setProject', 'setProjectName']), |
|
|
|
...mapMutations('project', ['setProject', 'setProjectName', 'setOpenFirstTask']), |
|
|
|
...mapMutations('role', ['setInvisibleRoles', 'setVisibleRoles', 'setRoleId']), |
|
|
|
...mapMutations('task', [ |
|
|
|
'setPermanents', |
|
|
@ -161,7 +161,6 @@ export default { |
|
|
|
async initPlanTasks() { |
|
|
|
this.setPrevPlaceholderTasks(); // 向上加载空数据 |
|
|
|
this.setNextPlaceholderTasks(); // 向下加载空数据 |
|
|
|
// // this.$nextTick(() => this.$refs.timeLine.setScrollPosition()); // 滚动到对应位置 |
|
|
|
await this.getInitTasks(); // 获取初始数据 |
|
|
|
|
|
|
|
// 滚动到对应位置 |
|
|
@ -170,6 +169,11 @@ export default { |
|
|
|
if (this.showScrollTo) { |
|
|
|
clearInterval(timer); |
|
|
|
this.$nextTick(() => this.$refs.timeLine.setScrollPosition()); |
|
|
|
|
|
|
|
// 判断是 腐蚀仪项目 自动打开第一个任务 |
|
|
|
if (this.project.name === '智能大气腐蚀检测平台') { |
|
|
|
this.setOpenFirstTask(true); |
|
|
|
} |
|
|
|
} |
|
|
|
}, 500); |
|
|
|
}, |
|
|
|