Merge remote-tracking branch 'origin/main' into multi-tenant

This commit is contained in:
lai
2024-07-24 18:01:08 +08:00
15 changed files with 101 additions and 74 deletions

View File

@@ -176,6 +176,7 @@ function fnCheckAppNameOverflow() {
if (!text) return; if (!text) return;
if (text.offsetWidth > container.offsetWidth) { if (text.offsetWidth > container.offsetWidth) {
text.classList.add('app-name_scrollable'); text.classList.add('app-name_scrollable');
text.setAttribute('data-content', text.innerText);
} else { } else {
text.classList.remove('app-name_scrollable'); text.classList.remove('app-name_scrollable');
} }
@@ -342,11 +343,17 @@ onUnmounted(() => {
:href="appStore.officialUrl" :href="appStore.officialUrl"
target="_blank" target="_blank"
size="small" size="small"
v-perms:has="['system:setting:link']"
v-if="appStore.officialUrl !== '#'" v-if="appStore.officialUrl !== '#'"
> >
{{ t('loayouts.basic.officialUrl') }} {{ t('loayouts.basic.officialUrl') }}
</a-button> </a-button>
<a-button type="link" size="small" @click="fnClickHelpDoc()"> <a-button
type="link"
size="small"
v-perms:has="['system:setting:HelpDoc']"
@click="fnClickHelpDoc()"
>
{{ t('loayouts.basic.helpDoc') }} {{ t('loayouts.basic.helpDoc') }}
</a-button> </a-button>
</a-space> </a-space>
@@ -382,20 +389,26 @@ onUnmounted(() => {
// text-overflow: ellipsis; // text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
width: 148px; width: 148px;
> .app-name_scrollable {
&_scrollable { padding-right: 12px;
// padding-left: 100%;
display: inline-block; display: inline-block;
animation: scrollable-animation linear 6s infinite both; animation: scrollable-animation linear 6s infinite both;
} &::after {
content: attr(data-content);
@keyframes scrollable-animation { position: absolute;
0% { top: 0;
transform: translate3d(0, 0, 0); right: -100%;
transition: right 0.3s ease;
} }
100% { @keyframes scrollable-animation {
transform: translate3d(-100%, 0, 0); 0% {
transform: translateX(0);
}
100% {
transform: translateX(calc(-100% - 12px));
}
} }
} }
} }

View File

@@ -142,6 +142,7 @@ function fnChangeLocale(e: any) {
type="text" type="text"
style="color: inherit" style="color: inherit"
@click="fnClickHelpDoc()" @click="fnClickHelpDoc()"
v-perms:has="['system:setting:HelpDoc']"
v-roles:has="[TENANTADMIN_ROLE_KEY]" v-roles:has="[TENANTADMIN_ROLE_KEY]"
> >
<template #icon> <template #icon>

View File

@@ -672,10 +672,7 @@ onBeforeUnmount(() => {
:value="record.eventJSON.authCode" :value="record.eventJSON.authCode"
/> />
</span> </span>
<span <span v-if="record.eventType === 'detach'">
v-if="record.eventType === 'detach'"
:title="record.eventJSON.detachTime"
>
<span>{{ t('views.dashboard.ue.resultOk') }}</span> <span>{{ t('views.dashboard.ue.resultOk') }}</span>
</span> </span>
<span v-if="record.eventType === 'cm-state'"> <span v-if="record.eventType === 'cm-state'">
@@ -772,7 +769,7 @@ onBeforeUnmount(() => {
/> />
</span> </span>
<span v-if="record.eventType === 'detach'"> <span v-if="record.eventType === 'detach'">
{{ t('views.dashboard.ue.resultOK') }} {{ t('views.dashboard.ue.resultOk') }}
</span> </span>
<span v-if="record.eventType === 'cm-state'"> <span v-if="record.eventType === 'cm-state'">
<DictTag <DictTag

View File

@@ -690,7 +690,7 @@ onBeforeUnmount(() => {
:data-source="tableState.data" :data-source="tableState.data"
:size="tableState.size" :size="tableState.size"
:pagination="tablePagination" :pagination="tablePagination"
:scroll="{ x: tableColumns.length * 120, y: 'calc(100vh - 480px)' }" :scroll="{ x: tableColumns.length * 150, y: 'calc(100vh - 480px)' }"
:row-selection="{ :row-selection="{
type: 'checkbox', type: 'checkbox',
columnWidth: '48px', columnWidth: '48px',

View File

@@ -710,7 +710,7 @@ onBeforeUnmount(() => {
/> />
</span> </span>
<span v-if="record.eventType === 'detach'"> <span v-if="record.eventType === 'detach'">
{{ t('views.dashboard.ue.resultOK') }} {{ t('views.dashboard.ue.resultOk') }}
</span> </span>
<span v-if="record.eventType === 'cm-state'"> <span v-if="record.eventType === 'cm-state'">
<DictTag <DictTag

View File

@@ -237,10 +237,7 @@ function handleRanderChart(
function fnChangeData(data: any[], itemID: string) { function fnChangeData(data: any[], itemID: string) {
let info = data.find((item: any) => item.id === itemID); let info = data.find((item: any) => item.id === itemID);
if (!info) { if (!info || !info.neState.online) return;
return;
}
if (!info.neState.online) return;
// if (!info.neState.online) { // if (!info.neState.online) {
// info = data.find((item: any) => item.id === itemID); // info = data.find((item: any) => item.id === itemID);
// graphNodeClickID.value = itemID; // graphNodeClickID.value = itemID;

View File

@@ -159,14 +159,14 @@
/* 概览区域 衍生基站信息 */ /* 概览区域 衍生基站信息 */
.skim.base { .skim.base {
height: 20.6%; height: 12%;
} }
.skim.base .inner .data { .skim.base .inner .data {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
height: 45%; height: 75%;
} }
.skim.base .inner .data .item { .skim.base .inner .data .item {
display: flex; display: flex;
@@ -178,7 +178,7 @@
/* 用户行为 */ /* 用户行为 */
.userActivity { .userActivity {
/* min-height: 35.8rem; */ /* min-height: 35.8rem; */
height: 60%; height: 54.6%;
} }
.userActivity .inner .chart { .userActivity .inner .chart {
width: 100%; width: 100%;

View File

@@ -331,7 +331,7 @@ onBeforeUnmount(() => {
<div class="skim panel base"> <div class="skim panel base">
<div class="inner"> <div class="inner">
<h3> <h3>
<GlobalOutlined style="color: #68d8fe" />&nbsp;&nbsp; <GlobalOutlined style="color: #68d8fe" />&nbsp;&nbsp; 5G
{{ t('views.dashboard.overview.skim.baseTitle') }} {{ t('views.dashboard.overview.skim.baseTitle') }}
</h3> </h3>
<div class="data"> <div class="data">
@@ -363,6 +363,14 @@ onBeforeUnmount(() => {
<span>{{ t('views.dashboard.overview.skim.gnbUeNum') }}</span> <span>{{ t('views.dashboard.overview.skim.gnbUeNum') }}</span>
</div> </div>
</div> </div>
</div>
</div>
<div class="skim panel base">
<div class="inner">
<h3>
<GlobalOutlined style="color: #68d8fe" />&nbsp;&nbsp; 4G
{{ t('views.dashboard.overview.skim.baseTitle') }}
</h3>
<div class="data"> <div class="data">
<div <div
class="item toRouter" class="item toRouter"

View File

@@ -166,23 +166,6 @@ function fnClickHelpDoc(language?: string) {
<img :src="logoUrl" class="logo-brand" :alt="appStore.appName" /> <img :src="logoUrl" class="logo-brand" :alt="appStore.appName" />
</template> </template>
</div> </div>
<div class="header-right">
<a-space direction="horizontal" :size="8">
<a-button
type="link"
:href="appStore.officialUrl"
target="_blank"
size="small"
v-if="appStore.officialUrl !== '#'"
>
{{ t('loayouts.basic.officialUrl') }}
</a-button>
<a-button type="link" size="small" @click="fnClickHelpDoc()">
{{ t('loayouts.basic.helpDoc') }}
</a-button>
</a-space>
</div>
</header> </header>
<a-card :bordered="false" class="login-card"> <a-card :bordered="false" class="login-card">

View File

@@ -124,8 +124,8 @@ let modalState: ModalStateType = reactive({
addr: '', addr: '',
port: 22, port: 22,
user: 'omcuser', user: 'omcuser',
authMode: '2', authMode: '0',
password: '', password: 'a9tU53r',
privateKey: '', privateKey: '',
passPhrase: '', passPhrase: '',
remark: '', remark: '',

View File

@@ -283,10 +283,10 @@ function fnRecordDelete(id: string) {
message.success(t('common.operateOk'), 3); message.success(t('common.operateOk'), 3);
// 过滤掉删除的id // 过滤掉删除的id
tableState.data = tableState.data.filter(item => { tableState.data = tableState.data.filter(item => {
if (id.indexOf(',')) { if (id.indexOf(',') > -1) {
return !tableState.selectedRowKeys.includes(item.id); return !tableState.selectedRowKeys.includes(item.id);
} else { } else {
return item.id != id; return item.id !== id;
} }
}); });
// 刷新缓存 // 刷新缓存

View File

@@ -206,6 +206,7 @@ function fnCheckAppNameOverflow() {
if (!text) return; if (!text) return;
if (text.offsetWidth > container.offsetWidth) { if (text.offsetWidth > container.offsetWidth) {
text.classList.add('app-name_scrollable'); text.classList.add('app-name_scrollable');
text.setAttribute('data-content', text.innerText);
} else { } else {
text.classList.remove('app-name_scrollable'); text.classList.remove('app-name_scrollable');
} }
@@ -398,18 +399,25 @@ onMounted(() => {
font-size: 18px; font-size: 18px;
> .app-name_scrollable { > .app-name_scrollable {
// padding-left: 100%; padding-right: 12px;
display: inline-block; display: inline-block;
animation: scrollable-animation linear 6s infinite both; animation: scrollable-animation linear 6s infinite both;
} &::after {
content: attr(data-content);
@keyframes scrollable-animation { position: absolute;
0% { top: 0;
transform: translate3d(0, 0, 0); right: -100%;
transition: right 0.3s ease;
} }
100% { @keyframes scrollable-animation {
transform: translate3d(-100%, 0, 0); 0% {
transform: translateX(0);
}
100% {
transform: translateX(calc(-100% - 12px));
}
} }
} }
} }

View File

@@ -120,6 +120,7 @@ onMounted(() => {
<a-form-item> <a-form-item>
<a-select <a-select
v-model:value="state.language" v-model:value="state.language"
:disabled="!appStore.i18nOpen"
style="width: 100px" style="width: 100px"
size="small" size="small"
v-perms:has="['system:setting:i18n']" v-perms:has="['system:setting:i18n']"
@@ -168,6 +169,7 @@ onMounted(() => {
v-model:value="state.language" v-model:value="state.language"
style="width: 100px" style="width: 100px"
size="small" size="small"
:disabled="!appStore.i18nOpen"
v-perms:has="['system:setting:i18n']" v-perms:has="['system:setting:i18n']"
> >
<a-select-option <a-select-option

View File

@@ -184,12 +184,15 @@ watch(
/**检查系统名称是否超出范围进行滚动 */ /**检查系统名称是否超出范围进行滚动 */
function fnCheckAppNameOverflow() { function fnCheckAppNameOverflow() {
const container: HTMLDivElement | null = document.querySelector('.header-icon > .app-name'); const container: HTMLDivElement | null = document.querySelector(
'.header-icon > .app-name'
);
if (!container) return; if (!container) return;
const text: HTMLDivElement | null = container.querySelector('.marquee'); const text: HTMLDivElement | null = container.querySelector('.marquee');
if (!text) return; if (!text) return;
if (text.offsetWidth > container.offsetWidth) { if (text.offsetWidth > container.offsetWidth) {
text.classList.add('app-name_scrollable'); text.classList.add('app-name_scrollable');
text.setAttribute('data-content', text.innerText);
} else { } else {
text.classList.remove('app-name_scrollable'); text.classList.remove('app-name_scrollable');
} }
@@ -201,7 +204,7 @@ watch(
); );
onMounted(() => { onMounted(() => {
fnCheckAppNameOverflow() fnCheckAppNameOverflow();
Object.assign(state, { Object.assign(state, {
language: currentLocale.value, language: currentLocale.value,
filePath: '', filePath: '',
@@ -240,7 +243,11 @@ onMounted(() => {
</div> </div>
</a-form-item> </a-form-item>
<a-form-item v-perms:has="['system:setting:i18n']"> <a-form-item v-perms:has="['system:setting:i18n']">
<a-select v-model:value="state.language" style="width: 100px"> <a-select
v-model:value="state.language"
:disabled="!appStore.i18nOpen"
style="width: 100px"
>
<a-select-option <a-select-option
v-for="opt in optionsLocale" v-for="opt in optionsLocale"
:key="opt.value" :key="opt.value"
@@ -362,18 +369,25 @@ onMounted(() => {
font-size: 18px; font-size: 18px;
> .app-name_scrollable { > .app-name_scrollable {
// padding-left: 100%; padding-right: 12px;
display: inline-block; display: inline-block;
animation: scrollable-animation linear 6s infinite both; animation: scrollable-animation linear 6s infinite both;
} &::after {
content: attr(data-content);
@keyframes scrollable-animation { position: absolute;
0% { top: 0;
transform: translate3d(0, 0, 0); right: -100%;
transition: right 0.3s ease;
} }
100% { @keyframes scrollable-animation {
transform: translate3d(-100%, 0, 0); 0% {
transform: translateX(0);
}
100% {
transform: translateX(calc(-100% - 12px));
}
} }
} }
} }

View File

@@ -31,14 +31,18 @@ const { t } = useI18n();
{{ t('views.system.setting.sysLoginBg') }} {{ t('views.system.setting.sysLoginBg') }}
</a-divider> </a-divider>
<ChangeLogoBG></ChangeLogoBG> <ChangeLogoBG></ChangeLogoBG>
<a-divider orientation="left"> <div v-perms:has="['system:setting:HelpDoc']">
{{ t('views.system.setting.sysHelpDoc') }} <a-divider orientation="left">
</a-divider> {{ t('views.system.setting.sysHelpDoc') }}
<ChangeHelpDoc></ChangeHelpDoc> </a-divider>
<a-divider orientation="left"> <ChangeHelpDoc></ChangeHelpDoc>
{{ t('views.system.setting.sysOfficialUrl') }} </div>
</a-divider> <div v-perms:has="['system:setting:link']">
<ChangeOfficialUrl></ChangeOfficialUrl> <a-divider orientation="left">
{{ t('views.system.setting.sysOfficialUrl') }}
</a-divider>
<ChangeOfficialUrl></ChangeOfficialUrl>
</div>
<div v-perms:has="['system:setting:i18n']"> <div v-perms:has="['system:setting:i18n']">
<a-divider orientation="left"> <a-divider orientation="left">
{{ t('views.system.setting.i18n') }} {{ t('views.system.setting.i18n') }}