Merge branch 'main' into multi-tenant

This commit is contained in:
TsMask
2024-06-06 11:06:23 +08:00
11 changed files with 43 additions and 47 deletions

View File

@@ -16,24 +16,24 @@
"@antv/g6": "~4.8.24", "@antv/g6": "~4.8.24",
"@codemirror/lang-javascript": "^6.2.1", "@codemirror/lang-javascript": "^6.2.1",
"@codemirror/lang-yaml": "^6.1.1", "@codemirror/lang-yaml": "^6.1.1",
"@codemirror/merge": "^6.6.1", "@codemirror/merge": "^6.6.2",
"@codemirror/theme-one-dark": "^6.1.2", "@codemirror/theme-one-dark": "^6.1.2",
"@tato30/vue-pdf": "^1.9.6", "@tato30/vue-pdf": "~1.9.7",
"@vueuse/core": "~10.9.0", "@vueuse/core": "~10.10.0",
"@xterm/xterm": "^5.5.0", "@xterm/xterm": "^5.5.0",
"@xterm/addon-fit": "^0.10.0", "@xterm/addon-fit": "^0.10.0",
"ant-design-vue": "^3.2.20", "ant-design-vue": "^3.2.20",
"antdv-pro-layout": "^3.2.6", "antdv-pro-layout": "~3.3.5",
"codemirror": "^6.0.1", "codemirror": "^6.0.1",
"dayjs": "^1.11.11", "dayjs": "^1.11.11",
"echarts": "~5.5.0", "echarts": "~5.5.0",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"intl-tel-input": "~22.0.2", "intl-tel-input": "~23.0.10",
"js-base64": "^3.7.7", "js-base64": "^3.7.7",
"js-cookie": "^3.0.5", "js-cookie": "^3.0.5",
"localforage": "^1.10.0", "localforage": "^1.10.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"p-queue": "^8.0.1", "p-queue": "~8.0.1",
"pinia": "^2.1.7", "pinia": "^2.1.7",
"vue": "~3.3.13", "vue": "~3.3.13",
"vue-i18n": "^9.13.1", "vue-i18n": "^9.13.1",
@@ -46,12 +46,12 @@
"@types/js-cookie": "^3.0.6", "@types/js-cookie": "^3.0.6",
"@types/node": "^18.0.0", "@types/node": "^18.0.0",
"@types/nprogress": "^0.2.3", "@types/nprogress": "^0.2.3",
"@vitejs/plugin-vue": "^5.0.4", "@vitejs/plugin-vue": "^5.0.5",
"less": "^4.2.0", "less": "^4.2.0",
"typescript": "~5.4.5", "typescript": "~5.4.5",
"unplugin-vue-components": "~0.26.0", "unplugin-vue-components": "~0.26.0",
"vite": "~5.2.10", "vite": "~5.2.12",
"vite-plugin-compression": "~0.5.1", "vite-plugin-compression": "~0.5.1",
"vue-tsc": "~1.8.27" "vue-tsc": "~2.0.19"
} }
} }

View File

@@ -11,8 +11,8 @@ import useAppStore from '@/store/modules/app';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
const { t, currentLocale } = useI18n(); const { t, currentLocale } = useI18n();
const appStore = useAppStore(); const appStore = useAppStore();
dayjs.extend(advancedFormat) dayjs.extend(advancedFormat);
dayjs.locale('zh-cn'); // 默认中文 dayjs.locale('zh-cn'); // 默认中文
usePrimaryColor(); // 载入用户自定义主题色 usePrimaryColor(); // 载入用户自定义主题色
@@ -52,10 +52,11 @@ console.info(
</ConfigProvider> </ConfigProvider>
</template> </template>
<style> <style lang="css">
#app { #app {
height: 100%; height: 100%;
} }
body .ant-pro-basicLayout { body .ant-pro-basicLayout {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -63,10 +64,6 @@ body .ant-pro-basicLayout {
min-height: 100vh; min-height: 100vh;
} }
.ant-pro-sider {
z-index: 20;
}
.slide-left-enter-active, .slide-left-enter-active,
.slide-left-leave-active, .slide-left-leave-active,
.slide-right-enter-active, .slide-right-enter-active,

View File

@@ -757,6 +757,7 @@ export default {
licensePathTip: "Please upload license file", licensePathTip: "Please upload license file",
upload: 'Upload', upload: 'Upload',
uploadBatch: "Upload License", uploadBatch: "Upload License",
uploadChangeOk: 'Network Element renewed license successfully and is being calibrated in the background!',
uploadChangeFail: "Some network elements failed to update the license, please check whether the service terminal environment is available!", uploadChangeFail: "Some network elements failed to update the license, please check whether the service terminal environment is available!",
}, },
neConfPara5G: { neConfPara5G: {

View File

@@ -757,6 +757,7 @@ export default {
licensePathTip: "请上传许可证文件", licensePathTip: "请上传许可证文件",
upload: '上传', upload: '上传',
uploadBatch: "上传许可证", uploadBatch: "上传许可证",
uploadChangeOk: '网元更新许可证成功,正在后台校验!',
uploadChangeFail: "部分网元更新许可证失败,请检查服务终端环境是否可用!", uploadChangeFail: "部分网元更新许可证失败,请检查服务终端环境是否可用!",
}, },
neConfPara5G: { neConfPara5G: {

View File

@@ -4,7 +4,7 @@ import {
WaterMark, WaterMark,
getMenuData, getMenuData,
clearMenuItem, clearMenuItem,
MenuDataItem, type MenuDataItem,
} from 'antdv-pro-layout'; } from 'antdv-pro-layout';
import RightContent from './components/RightContent.vue'; import RightContent from './components/RightContent.vue';
import Tabs from './components/Tabs.vue'; import Tabs from './components/Tabs.vue';
@@ -224,11 +224,9 @@ onUnmounted(() => {
v-model:selectedKeys="layoutState.selectedKeys" v-model:selectedKeys="layoutState.selectedKeys"
v-model:openKeys="layoutState.openKeys" v-model:openKeys="layoutState.openKeys"
:menu-data="menuData" :menu-data="menuData"
:breadcrumb="{ routes: breadcrumb } as any" :breadcrumb="{ routes: breadcrumb } as any"
disable-content-margin
v-bind="proConfig" v-bind="proConfig"
:iconfont-url="scriptUrl" :iconfont-url="scriptUrl"
:sider-width="208"
:locale="(fnLocale as any)" :locale="(fnLocale as any)"
> >
<!--插槽-菜单头--> <!--插槽-菜单头-->
@@ -265,7 +263,7 @@ onUnmounted(() => {
<template #headerContentRender></template> <template #headerContentRender></template>
<!--插槽-顶部右侧--> <!--插槽-顶部右侧-->
<template #rightContentRender> <template #headerContentRightRender>
<RightContent /> <RightContent />
</template> </template>
@@ -360,7 +358,7 @@ onUnmounted(() => {
z-index: 16; z-index: 16;
margin: 0px; margin: 0px;
width: auto; width: auto;
margin-top: 52px; margin-top: 32px;
&-fixed { &-fixed {
position: fixed; position: fixed;
bottom: 0; bottom: 0;

View File

@@ -65,12 +65,13 @@ function fnChangeLocale(e: any) {
<template> <template>
<a-space :size="12" align="center"> <a-space :size="12" align="center">
<a-button type="text" @click="fnClickAlarm"> <a-button type="text" style="color: inherit" @click="fnClickAlarm">
<template #icon> <template #icon>
<a-badge <a-badge
:count="useAlarmStore().activeAlarmTotal" :count="useAlarmStore().activeAlarmTotal"
:overflow-count="99" :overflow-count="99"
status="warning" status="warning"
style="color: inherit"
> >
<BellOutlined /> <BellOutlined />
</a-badge> </a-badge>
@@ -79,7 +80,7 @@ function fnChangeLocale(e: any) {
<a-tooltip placement="bottom" v-if="false"> <a-tooltip placement="bottom" v-if="false">
<template #title>{{ t('loayouts.rightContent.lock') }}</template> <template #title>{{ t('loayouts.rightContent.lock') }}</template>
<a-button type="text" @click="fnClickLock"> <a-button type="text" style="color: inherit" @click="fnClickLock">
<template #icon> <template #icon>
<LockOutlined /> <LockOutlined />
</template> </template>
@@ -88,7 +89,7 @@ function fnChangeLocale(e: any) {
<a-tooltip placement="bottom"> <a-tooltip placement="bottom">
<template #title>{{ t('loayouts.rightContent.helpDoc') }}</template> <template #title>{{ t('loayouts.rightContent.helpDoc') }}</template>
<a-button type="text" @click="fnClickHelpDoc()"> <a-button type="text" style="color: inherit" @click="fnClickHelpDoc()">
<template #icon> <template #icon>
<QuestionCircleOutlined /> <QuestionCircleOutlined />
</template> </template>
@@ -97,7 +98,7 @@ function fnChangeLocale(e: any) {
<a-tooltip placement="bottom"> <a-tooltip placement="bottom">
<template #title>{{ t('loayouts.rightContent.fullscreen') }}</template> <template #title>{{ t('loayouts.rightContent.fullscreen') }}</template>
<a-button type="text" @click="toggle"> <a-button type="text" style="color: inherit" @click="toggle">
<template #icon> <template #icon>
<FullscreenExitOutlined v-if="isFullscreen" /> <FullscreenExitOutlined v-if="isFullscreen" />
<FullscreenOutlined v-else /> <FullscreenOutlined v-else />

View File

@@ -10,10 +10,10 @@ type LayoutStore = {
proConfig: { proConfig: {
/**导航布局 */ /**导航布局 */
layout: 'side' | 'top' | 'mix'; layout: 'side' | 'top' | 'mix';
/**导航菜单主题色 */ /**全局主题色,需要导入样式文件 */
navTheme: 'dark' | 'light'; theme: 'dark' | 'light';
/**顶部导航主题仅导航布局为mix时生效 */ /**菜单导航主题 */
headerTheme: 'dark' | 'light'; menuTheme: 'dark' | 'light';
/**固定顶部栏 */ /**固定顶部栏 */
fixedHeader: boolean; fixedHeader: boolean;
/**固定菜单栏 */ /**固定菜单栏 */
@@ -41,8 +41,8 @@ const proConfigLocal: LayoutStore['proConfig'] = localGetJSON(
CACHE_LOCAL_PROCONFIG CACHE_LOCAL_PROCONFIG
) || { ) || {
layout: 'mix', layout: 'mix',
headerTheme: 'light', theme: 'light',
navTheme: 'light', menuTheme: 'light',
fixSiderbar: true, fixSiderbar: true,
fixedHeader: true, fixedHeader: true,
splitMenus: true, splitMenus: true,
@@ -53,8 +53,8 @@ const useLayoutStore = defineStore('layout', {
visible: false, visible: false,
proConfig: { proConfig: {
layout: proConfigLocal.layout, layout: proConfigLocal.layout,
navTheme: proConfigLocal.navTheme, theme: proConfigLocal.theme,
headerTheme: proConfigLocal.headerTheme, menuTheme: proConfigLocal.menuTheme,
fixedHeader: Boolean(proConfigLocal.fixedHeader), fixedHeader: Boolean(proConfigLocal.fixedHeader),
fixSiderbar: Boolean(proConfigLocal.fixSiderbar), fixSiderbar: Boolean(proConfigLocal.fixSiderbar),
splitMenus: Boolean(proConfigLocal.splitMenus), splitMenus: Boolean(proConfigLocal.splitMenus),
@@ -77,10 +77,6 @@ const useLayoutStore = defineStore('layout', {
/**修改布局设置 */ /**修改布局设置 */
changeConf(key: string, value: boolean | string | number | undefined) { changeConf(key: string, value: boolean | string | number | undefined) {
if (Reflect.has(this.proConfig, key)) { if (Reflect.has(this.proConfig, key)) {
// 同时修改mix混合菜单的导航主题
if (key === 'navTheme') {
Reflect.set(this.proConfig, 'headerTheme', value);
}
Reflect.set(this.proConfig, key, value); Reflect.set(this.proConfig, key, value);
localSetJSON(CACHE_LOCAL_PROCONFIG, this.proConfig); localSetJSON(CACHE_LOCAL_PROCONFIG, this.proConfig);
} }

View File

@@ -72,9 +72,9 @@ function fnColorChange(e: Event) {
<a-switch <a-switch
:checked-children="t('common.switch.open')" :checked-children="t('common.switch.open')"
:un-checked-children="t('common.switch.shut')" :un-checked-children="t('common.switch.shut')"
:checked="proConfig.navTheme === 'dark'" :checked="proConfig.menuTheme === 'dark'"
@change=" @change="
(checked:any) => changeConf('navTheme', checked ? 'dark' : 'light') (checked:any) => changeConf('menuTheme', checked ? 'dark' : 'light')
" "
></a-switch> ></a-switch>
</template> </template>

View File

@@ -342,7 +342,7 @@ onBeforeUnmount(() => {
</script> </script>
<template> <template>
<PageContainer :breadcrumb="false"> <PageContainer :breadcrumb="{}">
<div> <div>
<a-drawer :visible="visible" @close="closeDrawer" :width="700"> <a-drawer :visible="visible" @close="closeDrawer" :width="700">
<a-descriptions bordered :column="1" :label-style="{ width: '160px' }"> <a-descriptions bordered :column="1" :label-style="{ width: '160px' }">

View File

@@ -97,6 +97,12 @@ async function fnModalOk() {
]), ]),
duration: 4.5, duration: 4.5,
}); });
} else {
notification.success({
message: modalState.title,
description: t('views.ne.neLicense.uploadChangeOk'),
duration: 4.5,
});
} }
// 结束 // 结束

View File

@@ -208,11 +208,7 @@ onMounted(() => {
</a-form> </a-form>
</div> </div>
<GlobalFooter <GlobalFooter class="footer" :links="[]" :copyright="appStore.copyright" />
class="footer"
:links="false"
:copyright="appStore.copyright"
/>
</div> </div>
</template> </template>