|
@ -28,7 +28,9 @@ |
|
|
<!-- <u-button @click="$store.commit('setTheme', 'theme-test')">测试切换主题</u-button> --> |
|
|
<!-- <u-button @click="$store.commit('setTheme', 'theme-test')">测试切换主题</u-button> --> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<u-button style="position: fixed; bottom: 100px;" @click="changeModal">{{timeLineType === 1 ? '切换到任务模式' : '切换到时间轴模式'}}</u-button> |
|
|
<u-button style="position: fixed; bottom: 100px" @click="changeModal">{{ |
|
|
|
|
|
timeLineType === 1 ? '切换到任务模式' : '切换到时间轴模式' |
|
|
|
|
|
}}</u-button> |
|
|
</theme> |
|
|
</theme> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -94,10 +96,10 @@ watch([allTasks, remindData], () => { |
|
|
plugin.remindNum++; |
|
|
plugin.remindNum++; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
}) |
|
|
}); |
|
|
}) |
|
|
}); |
|
|
}) |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (item.task) { |
|
|
if (item.task) { |
|
@ -120,14 +122,13 @@ watch([allTasks, remindData], () => { |
|
|
plugin.remindNum++; |
|
|
plugin.remindNum++; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
}) |
|
|
}); |
|
|
}) |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
}); |
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
store.commit('task/setAllTasks', allTasks.value); |
|
|
store.commit('task/setAllTasks', allTasks.value); |
|
@ -151,13 +152,14 @@ watch(roleId, () => { |
|
|
|
|
|
|
|
|
store.commit('task/setTimeNode', Date.now()); |
|
|
store.commit('task/setTimeNode', Date.now()); |
|
|
|
|
|
|
|
|
let currRoleRealTasks = [], currRoleShowTasks = []; |
|
|
let currRoleRealTasks = []; |
|
|
|
|
|
let currRoleShowTasks = []; |
|
|
if (allTasks.value.length) { |
|
|
if (allTasks.value.length) { |
|
|
const index = visibleRoles.value.findIndex(role => role.id === roleId.value); |
|
|
const index = visibleRoles.value.findIndex(role => role.id === roleId.value); |
|
|
currRoleRealTasks = allTasks.value[index].realTasks || []; |
|
|
currRoleRealTasks = allTasks.value[index].realTasks || []; |
|
|
currRoleShowTasks = allTasks.value[index].task || []; |
|
|
currRoleShowTasks = allTasks.value[index].task || []; |
|
|
} |
|
|
} |
|
|
store.commit('task/setCurrRoleRealTasks', currRoleRealTasks); // 设置当前角色的真实任务数据 |
|
|
store.commit('task/setCurrRoleRealTasks', currRoleRealTasks); // 设置当前角色的真实任务数据 |
|
|
store.commit('task/setCurrRoleShowTasks', currRoleShowTasks); // 设置当前角色的真实任务数据 |
|
|
store.commit('task/setCurrRoleShowTasks', currRoleShowTasks); // 设置当前角色的真实任务数据 |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
@ -266,11 +268,12 @@ function tabsChange(e) { |
|
|
const index = visibleRoles.value.findIndex(role => role.id === id); |
|
|
const index = visibleRoles.value.findIndex(role => role.id === id); |
|
|
const arr = [...allTasks.value]; |
|
|
const arr = [...allTasks.value]; |
|
|
store.commit('task/updateTasks', arr[index].task || []); // 更新当前store中存储的显示任务数据为当前角色的 |
|
|
store.commit('task/updateTasks', arr[index].task || []); // 更新当前store中存储的显示任务数据为当前角色的 |
|
|
store.commit('task/updateRealTasks', arr[index].realTasks || []);// 更新当前store中存储的真实任务数据为当前角色的 |
|
|
store.commit('task/updateRealTasks', arr[index].realTasks || []); // 更新当前store中存储的真实任务数据为当前角色的 |
|
|
store.commit('task/setCurrRoleRealTasks', arr[index].realTasks || []); // 设置当前角色的真实任务数据 |
|
|
store.commit('task/setCurrRoleRealTasks', arr[index].realTasks || []); // 设置当前角色的真实任务数据 |
|
|
store.commit('task/setCurrRoleShowTasks', arr[index].task || []); // 设置当前角色的展示任务数据 |
|
|
store.commit('task/setCurrRoleShowTasks', arr[index].task || []); // 设置当前角色的展示任务数据 |
|
|
store.commit('task/setUpNextPage', arr[index].upNextPage || 1); // 设置当前角色的真实任务数据的向上查询页数 |
|
|
store.commit('task/setUpNextPage', arr[index].upNextPage || 1); // 设置当前角色的真实任务数据的向上查询页数 |
|
|
store.commit('task/setDownNextPage', arr[index].downNextPage || 1); // 设置当前角色的真实任务数据向下查询页数 |
|
|
store.commit('task/setDownNextPage', arr[index].downNextPage || 1); // 设置当前角色的真实任务数据向下查询页数 |
|
|
|
|
|
store.commit('socket/setCurrLocationTaskId', ''); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 设置自动滚动位置 |
|
|
// 设置自动滚动位置 |
|
@ -305,7 +308,7 @@ function changeModal() { |
|
|
store.commit('task/setUpNextPage', 1); |
|
|
store.commit('task/setUpNextPage', 1); |
|
|
store.commit('task/setDownNextPage', 1); |
|
|
store.commit('task/setDownNextPage', 1); |
|
|
store.commit('task/setTimeLineType', timeLineType.value === 1 ? 2 : 1); |
|
|
store.commit('task/setTimeLineType', timeLineType.value === 1 ? 2 : 1); |
|
|
let params = { pageNum: 1, taskId: currLocationTaskId.value }; |
|
|
const params = { pageNum: 1, taskId: currLocationTaskId.value }; |
|
|
getTasksHook.getTasks(params); |
|
|
getTasksHook.getTasks(params); |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|