Merge branch 'main' of http://192.168.2.166:3180/OMC/ems_frontend_vue3
This commit is contained in:
@@ -323,6 +323,7 @@ export default {
|
||||
mac:'NE MAC address',
|
||||
macTip:'Able to locate the physical address (MAC) of the network element',
|
||||
port:'Port',
|
||||
portTip:'Maximum range 0~65535',
|
||||
pvflag:'PV Flag',
|
||||
pnf:'Physical Network Element',
|
||||
vnf:'Virtual Network Element',
|
||||
|
||||
@@ -323,6 +323,7 @@ export default {
|
||||
mac:'网元物理地址',
|
||||
macTip:'能够定位网元的物理地址(MAC)',
|
||||
port:'端口',
|
||||
portTip:'最大范围0~65535',
|
||||
pvflag:'网元虚拟化标识',
|
||||
pnf:'物理网元',
|
||||
vnf:'虚拟网元',
|
||||
|
||||
@@ -118,8 +118,9 @@ const router = createRouter({
|
||||
/**全局路由-后置守卫 */
|
||||
router.afterEach((to, from, failure) => {
|
||||
NProgress.done();
|
||||
const title = to.meta?.title
|
||||
// 设置标题
|
||||
if (to.meta?.title) {
|
||||
if (!failure && title) {
|
||||
useAppStore().setTitle(to.meta.title);
|
||||
}
|
||||
});
|
||||
@@ -132,7 +133,7 @@ router.beforeEach((to, from, next) => {
|
||||
NProgress.start();
|
||||
const token = getToken();
|
||||
// 获取系统配置信息
|
||||
const appStore = useAppStore();
|
||||
const appStore =useAppStore()
|
||||
if (!appStore.loginBackground) {
|
||||
appStore.fnSysConf();
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ const useAppStore = defineStore('app', {
|
||||
actions: {
|
||||
/**设置网页标题 */
|
||||
setTitle(title?: string) {
|
||||
if (title) {
|
||||
if (title && title.indexOf('router.') === -1) {
|
||||
document.title = `${title} - ${this.appName}`;
|
||||
} else {
|
||||
document.title = this.appName;
|
||||
|
||||
@@ -6,7 +6,11 @@ import { reactive, ref, onMounted } from 'vue';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { useRoute } from 'vue-router';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const appStore = useAppStore();
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**加载状态 */
|
||||
@@ -71,7 +75,19 @@ function fnGetProfile() {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 国际化翻译转换
|
||||
*/
|
||||
function fnLocale() {
|
||||
let title = route.meta.title as string;
|
||||
if (title.indexOf('router.') !== -1) {
|
||||
title = t(title);
|
||||
}
|
||||
appStore.setTitle(title);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fnLocale();
|
||||
// 获取信息
|
||||
fnGetProfile();
|
||||
});
|
||||
|
||||
@@ -1,14 +1,36 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { onActivated, ref } from 'vue';
|
||||
import { PageContainer } from '@ant-design-vue/pro-layout';
|
||||
import BaseInfo from './components/base-info.vue';
|
||||
import ResetPasswd from './components/reset-passwd.vue';
|
||||
import StyleLayout from './components/style-layout.vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const appStore = useAppStore();
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**Tab标签激活 */
|
||||
let activeKey = ref<string>('base-info');
|
||||
|
||||
/**
|
||||
* 国际化翻译转换
|
||||
*/
|
||||
function fnLocale() {
|
||||
let title = route.meta.title as string;
|
||||
if (title.indexOf('router.') !== -1) {
|
||||
title = t(title);
|
||||
}
|
||||
appStore.setTitle(title);
|
||||
}
|
||||
|
||||
onActivated(() => {
|
||||
// 调用时机为首次挂载
|
||||
// 以及每次从缓存中被重新插入时
|
||||
fnLocale();
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -18,10 +40,16 @@ let activeKey = ref<string>('base-info');
|
||||
<a-tab-pane key="base-info" :tab="t('views.account.settings.baseInfo')">
|
||||
<BaseInfo></BaseInfo>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="reset-passwd" :tab="t('views.account.settings.resetPasswd')">
|
||||
<a-tab-pane
|
||||
key="reset-passwd"
|
||||
:tab="t('views.account.settings.resetPasswd')"
|
||||
>
|
||||
<ResetPasswd></ResetPasswd>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="style-layout" :tab="t('views.account.settings.styleLayout')">
|
||||
<a-tab-pane
|
||||
key="style-layout"
|
||||
:tab="t('views.account.settings.styleLayout')"
|
||||
>
|
||||
<StyleLayout></StyleLayout>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
|
||||
@@ -1383,18 +1383,17 @@ onMounted(() => {
|
||||
</a-select>
|
||||
</div>
|
||||
|
||||
<template v-if="item.array">
|
||||
<template v-else-if="item.array">
|
||||
<span v-if="arrayState.newIndex === -1">-</span>
|
||||
<a-button
|
||||
type="link"
|
||||
type="default"
|
||||
size="small"
|
||||
@click.prevent="arrayChildExpand(data.key, item)"
|
||||
v-else
|
||||
>
|
||||
<template #icon><BarsOutlined /></template>
|
||||
{{
|
||||
arrayState.newIndex === -1
|
||||
? '-'
|
||||
: t(
|
||||
'views.configManage.configParamForm.arrayMore'
|
||||
)
|
||||
t('views.configManage.configParamForm.arrayMore')
|
||||
}}
|
||||
</a-button>
|
||||
<!--特殊字段拓展显示-->
|
||||
@@ -1414,6 +1413,7 @@ onMounted(() => {
|
||||
#extra
|
||||
v-if="
|
||||
Array.isArray(item.array) &&
|
||||
arrayChildState.loc.startsWith(data.key) &&
|
||||
item.display === arrayChildState.title
|
||||
"
|
||||
>
|
||||
@@ -1613,19 +1613,25 @@ onMounted(() => {
|
||||
</a-select>
|
||||
</div>
|
||||
|
||||
<template v-else-if="item.array">
|
||||
<span v-if="arrayChildState.newIndex === -1">
|
||||
-
|
||||
</span>
|
||||
<a-button
|
||||
type="link"
|
||||
type="default"
|
||||
size="small"
|
||||
v-else-if="item.array"
|
||||
v-else
|
||||
>
|
||||
<template #icon>
|
||||
<BarsOutlined />
|
||||
</template>
|
||||
{{
|
||||
arrayChildState.newIndex === -1
|
||||
? '-'
|
||||
: t(
|
||||
t(
|
||||
'views.configManage.configParamForm.arrayMore'
|
||||
)
|
||||
}}
|
||||
</a-button>
|
||||
</template>
|
||||
|
||||
<div v-else>
|
||||
{{ `${item.value || ' '}` }}
|
||||
|
||||
@@ -119,7 +119,6 @@ function fnActiveConfigNode(key: string | number) {
|
||||
});
|
||||
arrayState.columns = columns;
|
||||
|
||||
arrayState.collapseActiveKey = [];
|
||||
arrayEditClose();
|
||||
}
|
||||
} else {
|
||||
@@ -273,8 +272,6 @@ function listEditOk() {
|
||||
|
||||
/**多列列表状态类型 */
|
||||
type ArrayStateType = {
|
||||
/**面板激活项 */
|
||||
collapseActiveKey: string[];
|
||||
/**紧凑型 */
|
||||
size: SizeType;
|
||||
/**多列嵌套记录字段 */
|
||||
@@ -288,26 +285,16 @@ type ArrayStateType = {
|
||||
data: Record<string, any>[];
|
||||
/**多列记录规则 */
|
||||
dataRule: Record<string, any>;
|
||||
/**新增行记录Index 编辑-1/新增>=0 */
|
||||
newIndex: number;
|
||||
/**编辑行Key值 */
|
||||
editKey: number | string;
|
||||
/**编辑行记录 */
|
||||
editRecord: Record<string, any>;
|
||||
};
|
||||
|
||||
/**多列列表状态 */
|
||||
let arrayState: ArrayStateType = reactive({
|
||||
collapseActiveKey: [],
|
||||
size: 'middle',
|
||||
columns: [],
|
||||
columnsData: [],
|
||||
arrayChildExpandKeys: [],
|
||||
data: [],
|
||||
dataRule: {},
|
||||
newIndex: -2,
|
||||
editKey: -1,
|
||||
editRecord: {},
|
||||
});
|
||||
|
||||
/**多列表编辑 */
|
||||
@@ -504,8 +491,6 @@ type ArrayChildStateType = {
|
||||
title: string;
|
||||
/**层级index */
|
||||
loc: string;
|
||||
/**面板激活项 */
|
||||
collapseActiveKey: string[];
|
||||
/**紧凑型 */
|
||||
size: SizeType;
|
||||
/**多列嵌套记录字段 */
|
||||
@@ -517,27 +502,17 @@ type ArrayChildStateType = {
|
||||
data: Record<string, any>[];
|
||||
/**多列嵌套记录规则 */
|
||||
dataRule: Record<string, any>;
|
||||
/**新增嵌套行记录Index 编辑-1/新增>=0 */
|
||||
newIndex: number;
|
||||
/**编辑嵌套行Key值 */
|
||||
editKey: number | string;
|
||||
/**编辑嵌套行记录 */
|
||||
editRecord: Record<string, any>;
|
||||
};
|
||||
|
||||
/**表格状态 */
|
||||
let arrayChildState: ArrayChildStateType = reactive({
|
||||
title: '',
|
||||
loc: '',
|
||||
collapseActiveKey: [],
|
||||
size: 'middle',
|
||||
columns: [],
|
||||
columnsData: [],
|
||||
data: [],
|
||||
dataRule: {},
|
||||
newIndex: -2,
|
||||
editKey: -1,
|
||||
editRecord: {},
|
||||
});
|
||||
|
||||
/**多列表展开嵌套行 */
|
||||
@@ -625,11 +600,8 @@ function arrayChildExpand(
|
||||
arrayState.arrayChildExpandKeys = [indexRow];
|
||||
|
||||
arrayChildState.loc = `${loc}/${from['name']}`;
|
||||
arrayChildState.newIndex = -3;
|
||||
// 设置展开列表标题
|
||||
arrayChildState.title = `${from['display']}`;
|
||||
// 关闭默认展开
|
||||
arrayChildState.collapseActiveKey = [];
|
||||
}
|
||||
|
||||
/**多列表展开嵌套行 */
|
||||
@@ -1357,12 +1329,13 @@ onMounted(() => {
|
||||
<div class="editable-cell">
|
||||
<template v-if="text.array">
|
||||
<a-button
|
||||
type="link"
|
||||
type="default"
|
||||
size="small"
|
||||
@click.prevent="
|
||||
arrayChildExpand(record['index'], text)
|
||||
"
|
||||
>
|
||||
<template #icon><BarsOutlined /></template>
|
||||
{{
|
||||
t('views.configManage.configParamForm.arrayMore')
|
||||
}}
|
||||
@@ -1437,11 +1410,16 @@ onMounted(() => {
|
||||
{{ text.comment }}
|
||||
</template>
|
||||
<div class="editable-cell">
|
||||
<a-button type="link" size="small" v-if="text.array">
|
||||
<template v-if="text.array">
|
||||
<a-button type="default" size="small">
|
||||
<template #icon><BarsOutlined /></template>
|
||||
{{
|
||||
t('views.configManage.configParamForm.arrayMore')
|
||||
t(
|
||||
'views.configManage.configParamForm.arrayMore'
|
||||
)
|
||||
}}
|
||||
</a-button>
|
||||
</template>
|
||||
|
||||
<div v-else>
|
||||
{{ `${text.value || ' '}` }}
|
||||
|
||||
@@ -904,7 +904,10 @@ onMounted(() => {
|
||||
<pause-outlined />
|
||||
{{ t('views.configManage.neManage.stop') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="reload" v-if="!['OMC','PCF','IMS'].includes(record.neType)">
|
||||
<a-menu-item
|
||||
key="reload"
|
||||
v-if="!['OMC', 'PCF', 'IMS'].includes(record.neType)"
|
||||
>
|
||||
<SyncOutlined />
|
||||
{{ t('views.configManage.neManage.reload') }}
|
||||
</a-menu-item>
|
||||
@@ -1030,7 +1033,9 @@ onMounted(() => {
|
||||
<a-input v-model:value="modalState.from.port" allow-clear>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title> <div>最大范围0~65535</div> </template>
|
||||
<template #title>
|
||||
<div>{{ t('views.configManage.neManage.portTip') }}</div>
|
||||
</template>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
@@ -12,7 +12,12 @@ import * as echarts from 'echarts/core';
|
||||
import { TitleComponent, LegendComponent } from 'echarts/components';
|
||||
import { PieChart } from 'echarts/charts';
|
||||
import { LabelLayout } from 'echarts/features';
|
||||
import { useRoute } from 'vue-router';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
const appStore = useAppStore();
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
echarts.use([
|
||||
TooltipComponent,
|
||||
GaugeChart,
|
||||
@@ -370,7 +375,20 @@ function rowClick(record: any, index: any) {
|
||||
};
|
||||
}
|
||||
let timer: any;
|
||||
|
||||
/**
|
||||
* 国际化翻译转换
|
||||
*/
|
||||
function fnLocale( ) {
|
||||
let title = route.meta.title as string;
|
||||
if (title.indexOf('router.') !== -1) {
|
||||
title = t(title);
|
||||
}
|
||||
appStore.setTitle(title);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fnLocale()
|
||||
fnGetList();
|
||||
timer = setInterval(fnGetList, 10000); // 每隔10秒执行一次
|
||||
});
|
||||
|
||||
@@ -104,17 +104,17 @@ let tableColumns: ColumnsType = [
|
||||
{
|
||||
title: t('views.system.config.configName'),
|
||||
dataIndex: 'configName',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('views.system.config.configKey'),
|
||||
dataIndex: 'configKey',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('views.system.config.configValue'),
|
||||
dataIndex: 'configValue',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('views.system.config.configType'),
|
||||
|
||||
@@ -96,7 +96,7 @@ let tableColumns: ColumnsType = [
|
||||
{
|
||||
title: t('views.system.menu.menuName'),
|
||||
dataIndex: 'menuName',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('views.system.menu.menuId'),
|
||||
@@ -117,12 +117,12 @@ let tableColumns: ColumnsType = [
|
||||
{
|
||||
title: t('views.system.menu.perId'),
|
||||
dataIndex: 'perms',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('views.system.menu.formLoc'),
|
||||
dataIndex: 'component',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('views.system.menu.status'),
|
||||
@@ -687,7 +687,10 @@ onMounted(() => {
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip v-if="record.menuType !== MENU_TYPE_BUTTON">
|
||||
<a-tooltip
|
||||
placement="topLeft"
|
||||
v-if="record.menuType !== MENU_TYPE_BUTTON"
|
||||
>
|
||||
<template #title>{{ t('views.system.menu.addSon') }}</template>
|
||||
<a-button
|
||||
type="link"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import { Modal, message } from 'ant-design-vue/lib';
|
||||
import { FileType } from 'ant-design-vue/lib/upload/interface';
|
||||
import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
||||
import IconFont from '@/components/IconFont/index.vue';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
@@ -175,7 +176,10 @@ onMounted(() => {
|
||||
{{ appStore.appName }}
|
||||
</h1>
|
||||
</div>
|
||||
<div class="header-menu">Menu</div>
|
||||
<div class="header-menu">
|
||||
<IconFont type="icon-pcduan" style="margin-right: 10px"></IconFont>
|
||||
{{ t('router.index') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a-form layout="vertical" v-if="state.edite">
|
||||
@@ -291,7 +295,7 @@ onMounted(() => {
|
||||
|
||||
&-menu {
|
||||
width: 90px;
|
||||
line-height: 45px;
|
||||
line-height: 40px;
|
||||
color: #ffffff;
|
||||
align-self: center;
|
||||
text-align: center;
|
||||
|
||||
Reference in New Issue
Block a user