|
|
@ -29,7 +29,7 @@ export default { |
|
|
|
computed: { |
|
|
|
...mapState('user', ['user', 'token']), |
|
|
|
...mapState('role', ['visibleRoles', 'roleId']), |
|
|
|
...mapState('task', ['timeNode', 'timeUnit', 'tasks', 'regularTask', 'newProjectInfo']), |
|
|
|
...mapState('task', ['timeNode', 'timeUnit', 'tasks', 'regularTask', 'newProjectInfo', 'showSkeleton']), |
|
|
|
...mapState('project', ['project']), |
|
|
|
...mapGetters('task', ['timeGranularity']), |
|
|
|
...mapGetters('project', ['projectId']), |
|
|
@ -119,10 +119,17 @@ export default { |
|
|
|
async initPlanTasks() { |
|
|
|
this.setPrevPlaceholderTasks(); // 向上加载空数据 |
|
|
|
this.setNextPlaceholderTasks(); // 向下加载空数据 |
|
|
|
this.$nextTick(() => this.$refs.timeLine.setScrollPosition()); // 滚动到对应位置 |
|
|
|
|
|
|
|
// // this.$nextTick(() => this.$refs.timeLine.setScrollPosition()); // 滚动到对应位置 |
|
|
|
await this.getInitTasks(); // 获取初始数据 |
|
|
|
this.$nextTick(() => this.$refs.timeLine.setScrollPosition()); // 滚动到对应位置 |
|
|
|
|
|
|
|
// 滚动到对应位置 |
|
|
|
let timer = null; |
|
|
|
timer = setInterval(() => { |
|
|
|
if (!this.showSkeleton) { |
|
|
|
clearInterval(timer); |
|
|
|
this.$nextTick(() => this.$refs.timeLine.setScrollPosition()); |
|
|
|
} |
|
|
|
}, 1000); |
|
|
|
}, |
|
|
|
|
|
|
|
// 切换了 颗粒度 || 角色时候 获取初始定期任务 |
|
|
|