|
@ -25,6 +25,7 @@ export default function useGetTasks() { |
|
|
const remindData = computed(() => store.state.socket.remindData); // 小红点
|
|
|
const remindData = computed(() => store.state.socket.remindData); // 小红点
|
|
|
|
|
|
|
|
|
const currRoleRealTasks = computed(() => store.state.task.currRoleRealTasks); // 当前角色的真实任务数据
|
|
|
const currRoleRealTasks = computed(() => store.state.task.currRoleRealTasks); // 当前角色的真实任务数据
|
|
|
|
|
|
const currRoleShowTasks = computed(() => store.state.task.currRoleShowTasks); // 当前角色的展示任务数据
|
|
|
const currLocationTaskId = computed(() => store.state.socket.currLocationTaskId); |
|
|
const currLocationTaskId = computed(() => store.state.socket.currLocationTaskId); |
|
|
|
|
|
|
|
|
// 初始化 定期任务
|
|
|
// 初始化 定期任务
|
|
@ -78,6 +79,7 @@ export default function useGetTasks() { |
|
|
const arr = [...allTasks.value]; |
|
|
const arr = [...allTasks.value]; |
|
|
arr[index].realTasks = [...realTasks.value]; |
|
|
arr[index].realTasks = [...realTasks.value]; |
|
|
store.commit('task/setAllTasks', arr); |
|
|
store.commit('task/setAllTasks', arr); |
|
|
|
|
|
store.commit('task/setCurrRoleShowTasks', arr[index].tasks); // 设置当前角色的展示任务数据
|
|
|
store.commit('task/setCurrRoleRealTasks', arr[index].realTasks); // 设置当前角色的真实任务数据
|
|
|
store.commit('task/setCurrRoleRealTasks', arr[index].realTasks); // 设置当前角色的真实任务数据
|
|
|
|
|
|
|
|
|
// 如果第一次渲染但没有空数据则加载空数据
|
|
|
// 如果第一次渲染但没有空数据则加载空数据
|
|
@ -113,6 +115,7 @@ export default function useGetTasks() { |
|
|
|
|
|
|
|
|
// 初始值
|
|
|
// 初始值
|
|
|
// 显示任务中没有真实任务数据
|
|
|
// 显示任务中没有真实任务数据
|
|
|
|
|
|
// let centerData = params.queryType === 1 ? realTasks.slice(0, params.pageSize) : realTasks.slice(realTasks.length - 1 - params.pageSize);
|
|
|
let centerData = realTasks.slice(0, params.pageSize); |
|
|
let centerData = realTasks.slice(0, params.pageSize); |
|
|
const firstDetailIndex = showTasks.findIndex(task => task.detailId); |
|
|
const firstDetailIndex = showTasks.findIndex(task => task.detailId); |
|
|
if (firstDetailIndex > -1) { |
|
|
if (firstDetailIndex > -1) { |
|
@ -223,9 +226,9 @@ export default function useGetTasks() { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (showTasks.length > 80) { |
|
|
// if (showTasks.length > 80) {
|
|
|
showTasks = params.queryType === 0 ? showTasks.slice(0, 80) : showTasks.slice(showTasks.length - 80); |
|
|
// showTasks = params.queryType === 0 ? showTasks.slice(0, 80) : showTasks.slice(showTasks.length - 80);
|
|
|
} |
|
|
// }
|
|
|
|
|
|
|
|
|
store.commit('task/clearTasks'); |
|
|
store.commit('task/clearTasks'); |
|
|
params.queryType === 0 ? store.commit('task/setUpTasks', showTasks) : store.commit('task/setDownTasks', showTasks); |
|
|
params.queryType === 0 ? store.commit('task/setUpTasks', showTasks) : store.commit('task/setDownTasks', showTasks); |
|
@ -306,6 +309,7 @@ export default function useGetTasks() { |
|
|
const arr = [...allTasks.value]; |
|
|
const arr = [...allTasks.value]; |
|
|
arr[index].task = [...newValue]; |
|
|
arr[index].task = [...newValue]; |
|
|
store.commit('task/setAllTasks', arr); |
|
|
store.commit('task/setAllTasks', arr); |
|
|
|
|
|
store.commit('task/setCurrRoleShowTasks', arr[index].tasks); // 设置当前角色的展示任务数据
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|