diff --git a/frontend/src/views/workbench/components/caseReviewTable.vue b/frontend/src/views/workbench/components/caseReviewTable.vue
index 3b4b000b64..e907bf1236 100644
--- a/frontend/src/views/workbench/components/caseReviewTable.vue
+++ b/frontend/src/views/workbench/components/caseReviewTable.vue
@@ -87,12 +87,14 @@
const { openNewPage } = useOpenNewPage();
const reviewStatusOptions = computed(() => {
- return Object.keys(reviewStatusMap).map((key) => {
- return {
- value: key,
- label: t(reviewStatusMap[key as ReviewStatus].label),
- };
+ const keys = Object.keys(reviewStatusMap).filter((key) => {
+ return props.type !== 'my_todo' || key !== 'COMPLETED';
});
+
+ return keys.map((key) => ({
+ value: key,
+ label: t(reviewStatusMap[key as ReviewStatus].label),
+ }));
});
const columns: MsTableColumn = [
diff --git a/frontend/src/views/workbench/homePage/components/cardSettingDrawer.vue b/frontend/src/views/workbench/homePage/components/cardSettingDrawer.vue
index d4b276118c..2f1745c433 100644
--- a/frontend/src/views/workbench/homePage/components/cardSettingDrawer.vue
+++ b/frontend/src/views/workbench/homePage/components/cardSettingDrawer.vue
@@ -14,7 +14,7 @@
{{ t('workbench.homePage.exitEdit') }}
-
+
{{ t('common.save') }}
diff --git a/frontend/src/views/workbench/homePage/components/defectMemberBar.vue b/frontend/src/views/workbench/homePage/components/defectMemberBar.vue
index 4bfe301bd4..77e8118736 100644
--- a/frontend/src/views/workbench/homePage/components/defectMemberBar.vue
+++ b/frontend/src/views/workbench/homePage/components/defectMemberBar.vue
@@ -52,7 +52,7 @@
import type { OverViewOfProject, SelectedCardItem, TimeFormParams } from '@/models/workbench/homePage';
- import { commonColorConfig, getCommonBarOptions, handleNoDataDisplay } from '../utils';
+ import { getColorScheme, getCommonBarOptions, handleNoDataDisplay } from '../utils';
import type { SelectOptionData } from '@arco-design/web-vue';
const { t } = useI18n();
@@ -93,7 +93,10 @@
const defectStatusColor = ['#811FA3', '#FFA200', '#3370FF', '#F24F4F'];
function handleData(detail: OverViewOfProject) {
- options.value = getCommonBarOptions(detail.xaxis.length >= 7, [...defectStatusColor, ...commonColorConfig]);
+ options.value = getCommonBarOptions(detail.xaxis.length >= 7, [
+ ...defectStatusColor,
+ ...getColorScheme(detail.xaxis.length),
+ ]);
const { invisible, text } = handleNoDataDisplay(detail.xaxis, detail.projectCountList);
options.value.graphic.invisible = invisible;
options.value.graphic.style.text = text;
diff --git a/frontend/src/views/workbench/homePage/components/overview.vue b/frontend/src/views/workbench/homePage/components/overview.vue
index 226b07cfaf..7823a2701f 100644
--- a/frontend/src/views/workbench/homePage/components/overview.vue
+++ b/frontend/src/views/workbench/homePage/components/overview.vue
@@ -56,7 +56,7 @@
} from '@/models/workbench/homePage';
import { WorkCardEnum, WorkOverviewEnum } from '@/enums/workbenchEnum';
- import { commonColorConfig, getCommonBarOptions, handleNoDataDisplay } from '../utils';
+ import { getColorScheme, getCommonBarOptions, handleNoDataDisplay } from '../utils';
const { t } = useI18n();
@@ -108,7 +108,7 @@
});
cardModuleList.value = tempAxisData as ModuleCardItem[];
- options.value = getCommonBarOptions(hasRoom.value, commonColorConfig);
+ options.value = getCommonBarOptions(hasRoom.value, getColorScheme(detail.projectCountList.length));
const { invisible, text } = handleNoDataDisplay(detail.xaxis, detail.projectCountList);
options.value.graphic.invisible = invisible;
options.value.graphic.style.text = text;
diff --git a/frontend/src/views/workbench/homePage/components/overviewMember.vue b/frontend/src/views/workbench/homePage/components/overviewMember.vue
index ee6e43fb03..f2c8e2c3c7 100644
--- a/frontend/src/views/workbench/homePage/components/overviewMember.vue
+++ b/frontend/src/views/workbench/homePage/components/overviewMember.vue
@@ -57,7 +57,7 @@
import type { OverViewOfProject, SelectedCardItem, TimeFormParams } from '@/models/workbench/homePage';
- import { commonColorConfig, getCommonBarOptions, handleNoDataDisplay } from '../utils';
+ import { getColorScheme, getCommonBarOptions, handleNoDataDisplay } from '../utils';
const { t } = useI18n();
const appStore = useAppStore();
@@ -92,8 +92,9 @@
const memberOptions = ref<{ label: string; value: string }[]>([]);
const options = ref>({});
+ const color = ['#811FA3', '#FFCA59', '#00C261', '#FFA1FF', '#F9F871', '#3370FF', '#F24F4F'];
function handleData(detail: OverViewOfProject) {
- options.value = getCommonBarOptions(detail.xaxis.length >= 7, commonColorConfig);
+ options.value = getCommonBarOptions(detail.xaxis.length >= 7, color);
const { invisible, text } = handleNoDataDisplay(detail.xaxis, detail.projectCountList);
options.value.graphic.invisible = invisible;
options.value.graphic.style.text = text;
@@ -209,7 +210,6 @@
(val) => {
if (val) {
innerHandleUsers.value = val;
- initOverViewMemberDetail();
}
}
);
diff --git a/frontend/src/views/workbench/homePage/utils.ts b/frontend/src/views/workbench/homePage/utils.ts
index cd9de7da49..880d895367 100644
--- a/frontend/src/views/workbench/homePage/utils.ts
+++ b/frontend/src/views/workbench/homePage/utils.ts
@@ -9,37 +9,56 @@ import { WorkCardEnum } from '@/enums/workbenchEnum';
const { t } = useI18n();
// 通用颜色配置
-export const commonColorConfig = [
- '#783887',
- '#FFC14E',
- '#2DFCEF',
- '#811FA3',
- '#00D1FF',
- '#FFA53D',
- '#00C261',
- '#AA4FBF',
- '#FFA1FF',
- '#EE50A3',
- '#FF9964',
- '#FFCA59',
- '#F9F871',
- '#C3DD40',
- '#62D256',
- '#14E1C6',
- '#50CEFB',
- '#3370FF',
- '#2B5FD9',
- '#76F0FF',
- '#935AF6',
- '#DC9BFF',
- '#FFC75E',
- '#D34400',
- '#F4D0BF',
- '#FBD3E8',
- '#D9F457',
- '#0089D1',
- '#87F578',
-];
+const commonColorConfig: Record = {
+ 2: ['#783887', '#FFC14E'],
+ 4: ['#783887', '#FFC14E', '#2DFCEF', '#3370FF'],
+ 8: ['#783887', '#FFC14E', '#2DFCEF', '#3370FF', '#811FA3', '#00D1FF', '#FFA53D', '#00C261'],
+ 12: [
+ '#AA4FBF',
+ '#FFA1FF',
+ '#EE50A3',
+ '#FF9964',
+ '#FFCA59',
+ '#F9F871',
+ '#C3DD40',
+ '#62D256',
+ '#14E1C6',
+ '#50CEFB',
+ '#3370FF',
+ '#2B5FD9',
+ ],
+ 13: [
+ '#AA4FBF',
+ '#FFA1FF',
+ '#FFCA59',
+ '#F9F871',
+ '#14E1C6',
+ '#2DFCEF',
+ '#2B5FD9',
+ '#00D1FF',
+ '#935AF6',
+ '#DC9BFF',
+ '#FF9964',
+ '#FFC75E',
+ '#D34400',
+ '#F4D0BF',
+ '#EE50A3',
+ '#FBD3E8',
+ '#C3DD40',
+ '#D9F457',
+ '#0089D1',
+ '#62D256',
+ '#87F578',
+ ],
+};
+
+export function getColorScheme(dataLength: number): string[] {
+ if (dataLength <= 2) return commonColorConfig[2];
+ if (dataLength <= 4) return commonColorConfig[4];
+ if (dataLength <= 8) return commonColorConfig[8];
+ if (dataLength <= 12) return commonColorConfig[12];
+ return commonColorConfig[13];
+}
// 饼图颜色配置
export const colorMapConfig: Record = {
@@ -184,6 +203,27 @@ export function getCommonBarOptions(hasRoom: boolean, color: string[]): Record