对公告列表和逾期任务里面的数据进行私有视角的控制
This commit is contained in:
parent
9a55db9dc2
commit
b689c26f5c
|
|
@ -322,7 +322,19 @@ const calculateOverdueDays = (expireTime) => {
|
||||||
// 加载逾期任务列表
|
// 加载逾期任务列表
|
||||||
const loadOverdueTasks = async () => {
|
const loadOverdueTasks = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await getTaskList({ overdue: true,pageNum:1,pageSize:100, statusList: [1, 2] });
|
// 根据私有视角设置 ownerId 参数
|
||||||
|
const ownerId = currentUserId.value && privateView.value ? currentUserId.value : '';
|
||||||
|
const params = {
|
||||||
|
overdue: true,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 100,
|
||||||
|
statusList: [2]
|
||||||
|
};
|
||||||
|
if (ownerId) {
|
||||||
|
params.ownerId = ownerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
const res = await getTaskList(params);
|
||||||
console.log('逾期任务列表加载成功:', res);
|
console.log('逾期任务列表加载成功:', res);
|
||||||
|
|
||||||
// 根据实际返回的数据结构:{ total: 27, rows: [...], code: 200, msg: "查询成功" }
|
// 根据实际返回的数据结构:{ total: 27, rows: [...], code: 200, msg: "查询成功" }
|
||||||
|
|
@ -507,6 +519,11 @@ watch(filterSelf, () => {
|
||||||
loadDashboardData();
|
loadDashboardData();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 监听私有视角变化,自动刷新数据
|
||||||
|
watch(() => userStore.privateView, () => {
|
||||||
|
loadDashboardData();
|
||||||
|
});
|
||||||
|
|
||||||
// 跳转到任务列表页
|
// 跳转到任务列表页
|
||||||
const goToTaskList = (label) => {
|
const goToTaskList = (label) => {
|
||||||
// 将中文标签映射为状态参数
|
// 将中文标签映射为状态参数
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user