+
未完成
进行中
已完成
@@ -44,21 +44,21 @@
import { onMounted, ref } from 'vue';
/**
- * instanceId为查看流程进度使用
+ * businessKey为查看流程进度使用
* xml为仅预览流程图使用
*
- * default: instanceId是为了兼容以前的代码
+ * default: businessKey是为了兼容以前的代码
*/
const props = defineProps({
type: {
- type: String as PropType<'instanceId' | 'xml'>,
- default: 'instanceId',
+ type: String as PropType<'businessKey' | 'xml'>,
+ default: 'businessKey',
},
xml: {
type: String,
required: false,
},
- instanceId: {
+ businessKey: {
type: String,
required: false,
},
@@ -94,13 +94,13 @@
});
switch (props.type) {
- case 'instanceId':
- if (!props.instanceId) {
- console.error('instanceId为空 无法加载');
+ case 'businessKey':
+ if (!props.businessKey) {
+ console.error('businessKey为空 无法加载');
return;
}
// 获取resp
- const resp = await getHistoryList(props.instanceId);
+ const resp = await getHistoryList(props.businessKey);
bpmnXml.value = resp.xml;
taskList.value = resp.taskList;
@@ -159,6 +159,7 @@
开始时间:${data.startTime || ''}
结束时间:${data.endTime || ''}
审批耗时:${data.runDuration || ''}
+
流程版本:V${data.version || ''}.0
`,
});
}
diff --git a/src/components/SimpleMenu/src/components/Menu.vue b/src/components/SimpleMenu/src/components/Menu.vue
index 596fdef9172ffda6079ec5916ec794137964b25a..dae7a4ada37c51358a3441f0fd80499a2e14fd65 100644
--- a/src/components/SimpleMenu/src/components/Menu.vue
+++ b/src/components/SimpleMenu/src/components/Menu.vue
@@ -21,6 +21,8 @@
import { propTypes } from '@/utils/propTypes';
import { createSimpleRootMenuContext, type MenuEmitterEvents } from './useSimpleMenuContext';
import { mitt } from '@/utils/mitt';
+ // eslint-disable-next-line vue/no-dupe-keys
+ import { theme } from 'ant-design-vue';
defineOptions({ name: 'Menu' });
@@ -148,7 +150,47 @@
}
});
});
+ // https://www.antdv.com/components/config-provider-cn
+ const { token } = theme.useToken();
+
+ // #ffffff类型颜色转rgba
+ const getRgba = (color: string) => {
+ const rgba = color.replace(/^#/, '').match(/.{2}/g);
+ return rgba ? `rgba(${[...rgba].map((item) => parseInt(item, 16)).join(',')}, 0.1)` : '';
+ };
+
+ const fadePrimaryColor = computed(() => {
+ return getRgba(token.value.colorPrimary);
+ });
diff --git a/src/components/SimpleMenu/src/components/menu.less b/src/components/SimpleMenu/src/components/menu.less
index 6a63ef28f39704c5cdae4a908ddcf89941e4bd17..b3c839c67dca1f7965fc94ba94326e0c9f5e0621 100644
--- a/src/components/SimpleMenu/src/components/menu.less
+++ b/src/components/SimpleMenu/src/components/menu.less
@@ -219,7 +219,7 @@
&-active:not(.@{menu-prefix-cls}-submenu) {
z-index: 2;
background-color: fade(@primary-color, 10);
- color: @primary-color;
+ color: white;
.light-border();
}
diff --git a/src/layouts/default/setting/SettingDrawer.tsx b/src/layouts/default/setting/SettingDrawer.tsx
index 8f6ca0ffed479aed58e1ac52c7a7d9f9d234eddb..d01114775b8fab646d841876eed43c4ac7c11033 100644
--- a/src/layouts/default/setting/SettingDrawer.tsx
+++ b/src/layouts/default/setting/SettingDrawer.tsx
@@ -33,12 +33,12 @@ import {
mixSidebarTriggerOptions,
} from './enum';
-// import {
-// HEADER_PRESET_BG_COLOR_LIST,
-// SIDE_BAR_BG_COLOR_LIST,
-// APP_PRESET_COLOR_LIST,
-// } from '@/settings/designSetting';
-import { SIDE_BAR_BG_COLOR_LIST } from '@/settings/designSetting';
+import {
+ HEADER_PRESET_BG_COLOR_LIST,
+ SIDE_BAR_BG_COLOR_LIST,
+ APP_PRESET_COLOR_LIST,
+} from '@/settings/designSetting';
+import { ThemeEnum } from '@/enums/appEnum';
const { t } = useI18n();
@@ -56,7 +56,7 @@ export default defineComponent({
getGrayMode,
getLockTime,
getShowDarkModeToggle,
- // getThemeColor,
+ getThemeColor,
} = useRootSetting();
const { getOpenPageLoading, getBasicTransition, getEnableTransition, getOpenNProgress } =
@@ -86,7 +86,7 @@ export default defineComponent({
const {
getShowHeader,
getFixed: getHeaderFixed,
- // getHeaderBgColor,
+ getHeaderBgColor,
getShowSearch,
} = useHeaderSetting();
@@ -115,15 +115,15 @@ export default defineComponent({
);
}
- // function renderHeaderTheme() {
- // return (
- //
- // );
- // }
+ function renderHeaderTheme() {
+ return (
+
+ );
+ }
function renderSideBarTheme() {
return (
@@ -135,15 +135,15 @@ export default defineComponent({
);
}
- // function renderMainTheme() {
- // return (
- //
- // );
- // }
+ function renderMainTheme() {
+ return (
+
+ );
+ }
/**
* @description:
@@ -404,6 +404,9 @@ export default defineComponent({
);
}
+ const { getDarkMode } = useRootSetting();
+ const isDark = computed(() => getDarkMode.value === ThemeEnum.DARK);
+
return () => (
}
{() => t('layout.setting.navMode')}
{renderSidebar()}
- {/*
{() => t('layout.setting.sysTheme')}
+
{() => t('layout.setting.sysTheme')}
{renderMainTheme()}
-
{() => t('layout.setting.headerTheme')}
- {renderHeaderTheme()} */}
-
{() => t('layout.setting.sidebarTheme')}
- {renderSideBarTheme()}
+ {/* 深色模式下不显示顶栏和菜单修改颜色 否则样式会有问题(比如白背景 白字体) */}
+ {!isDark.value && (
+ <>
+
{() => t('layout.setting.headerTheme')}
+ {renderHeaderTheme()}
+
{() => t('layout.setting.sidebarTheme')}
+ {renderSideBarTheme()}
+ >
+ )}
{() => t('layout.setting.interfaceFunction')}
{renderFeatures()}
{() => t('layout.setting.interfaceDisplay')}
diff --git a/src/layouts/default/setting/components/ThemeColorPicker.vue b/src/layouts/default/setting/components/ThemeColorPicker.vue
index 1e971506214b24f4e2e0d6269f2fe5bafb3e86be..2e264568f6b26827e14ffd19f4391ba4b578039c 100644
--- a/src/layouts/default/setting/components/ThemeColorPicker.vue
+++ b/src/layouts/default/setting/components/ThemeColorPicker.vue
@@ -15,15 +15,26 @@
diff --git a/src/layouts/default/setting/handler.ts b/src/layouts/default/setting/handler.ts
index 8028cb2c7a0dafe7dca501a20f9ee6f56301fb1a..e6763a9b1e829352b611fc4894b006f6adbedcb9 100644
--- a/src/layouts/default/setting/handler.ts
+++ b/src/layouts/default/setting/handler.ts
@@ -9,6 +9,7 @@ import { ProjectConfig } from '#/config';
import { updateDarkTheme } from '@/logics/theme/dark';
import { useRootSetting } from '@/hooks/setting/useRootSetting';
import projectSetting from '@/settings/projectSetting';
+import { useThemeStore } from '@/store/modules/theme';
export function baseHandler(event: HandlerEnum, value: any) {
const appStore = useAppStore();
@@ -22,6 +23,7 @@ export function baseHandler(event: HandlerEnum, value: any) {
export function handler(event: HandlerEnum, value: any): DeepPartial