-
+
{{
appStore.projectList.length
@@ -79,9 +79,14 @@
margin: 0 auto 24px;
width: 100px;
height: 104px;
- background: url('@/assets/svg/config-work.svg');
background-size: cover;
}
+ .no-config-svg-bright {
+ background: url('@/assets/svg/config-work.svg');
+ }
+ .no-config-svg-dark {
+ background: url('@/assets/svg/config-work-dark.svg');
+ }
.no-card {
@apply flex h-full w-full flex-col items-center justify-center gap-4;
.no-card-svg-bright {
diff --git a/frontend/src/views/workbench/homePage/components/cardSettingDrawer.vue b/frontend/src/views/workbench/homePage/components/cardSettingDrawer.vue
index c7b3bf1816..90350a9072 100644
--- a/frontend/src/views/workbench/homePage/components/cardSettingDrawer.vue
+++ b/frontend/src/views/workbench/homePage/components/cardSettingDrawer.vue
@@ -145,7 +145,9 @@
key: item.value,
projectIds: defaultAllProjectType.includes(item.value) ? [] : [appStore.currentProjectId],
handleUsers: [],
- selectAll: !![WorkCardEnum.PROJECT_VIEW, WorkCardEnum.CREATE_BY_ME].includes(item.value),
+ selectAll: [WorkCardEnum.PROJECT_VIEW, WorkCardEnum.CREATE_BY_ME, WorkCardEnum.PROJECT_MEMBER_VIEW].includes(
+ item.value
+ ),
planId: '',
groupId: '',
};
diff --git a/frontend/src/views/workbench/homePage/components/overviewMember.vue b/frontend/src/views/workbench/homePage/components/overviewMember.vue
index d620e1b815..49bcb162bb 100644
--- a/frontend/src/views/workbench/homePage/components/overviewMember.vue
+++ b/frontend/src/views/workbench/homePage/components/overviewMember.vue
@@ -83,6 +83,10 @@
required: true,
});
+ const innerSelectAll = defineModel('selectAll', {
+ required: true,
+ });
+
const projectId = ref(innerProjectIds.value[0]);
const timeForm = inject[>(
@@ -142,10 +146,12 @@
await getMemberOptions();
if (setAll) {
innerHandleUsers.value = [...memberOptions.value.map((e) => e.value)];
+ innerSelectAll.value = true;
} else {
innerHandleUsers.value = innerHandleUsers.value.filter((id: string) =>
memberOptions.value.some((member) => member.value === id)
);
+ innerSelectAll.value = false;
}
}
await nextTick();
@@ -167,6 +173,7 @@
function popupVisibleChange(val: boolean) {
if (!val) {
nextTick(() => {
+ innerSelectAll.value = innerHandleUsers.value.length === memberOptions.value.length;
initOverViewMemberDetail();
emit('change');
});
@@ -209,12 +216,16 @@
watch(
() => props.refreshKey,
(refreshKey) => {
- handleProjectChange(!!refreshKey);
+ if (props.item.selectAll && !innerHandleUsers.value.length) {
+ handleProjectChange(false, innerSelectAll.value);
+ } else {
+ handleProjectChange(!!refreshKey);
+ }
}
);
onMounted(() => {
- handleProjectChange(false);
+ handleProjectChange(false, props.item.selectAll);
});
onBeforeUnmount(() => {
diff --git a/frontend/src/views/workbench/homePage/index.vue b/frontend/src/views/workbench/homePage/index.vue
index 306556b342..9c52531cf2 100644
--- a/frontend/src/views/workbench/homePage/index.vue
+++ b/frontend/src/views/workbench/homePage/index.vue
@@ -66,6 +66,7 @@
v-else-if="item.key === WorkCardEnum.PROJECT_MEMBER_VIEW"
v-model:projectIds="item.projectIds"
v-model:handleUsers="item.handleUsers"
+ v-model:selectAll="item.selectAll"
:item="item"
:refresh-key="refreshKey"
@change="changeHandler"
@@ -327,6 +328,7 @@
// 刷新
async function handleRefresh() {
+ appStore.initProjectList();
await initDefaultList();
refreshKey.value = Date.now();
}
]