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

This commit is contained in:
zhongzm
2025-08-14 19:31:03 +08:00
6 changed files with 79 additions and 53 deletions

View File

@@ -5,7 +5,6 @@ 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 { hasRoles } from '@/plugins/auth-user';
import useAppStore from '@/store/modules/app';
import useI18n from '@/hooks/useI18n';
import useUserStore from '@/store/modules/user';
@@ -53,7 +52,7 @@ onActivated(() => {
<a-tab-pane
key="style-layout"
:tab="t('views.account.settings.styleLayout')"
v-if="hasRoles(['admin'])"
v-if="false"
>
<StyleLayout></StyleLayout>
</a-tab-pane>

View File

@@ -3,6 +3,7 @@ import Index from '@/views/index/tenantIndex.vue';
import { getConfigKey } from '@/api/system/config';
import {
defineAsyncComponent,
nextTick,
onMounted,
ref,
shallowRef,
@@ -11,8 +12,9 @@ import {
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useUserStore from '@/store/modules/user';
import useLayoutStore from '@/store/modules/layout';
import { useRouter } from 'vue-router';
const currentComponent = shallowRef<Component | null>(null);
const router = useRouter();
const spinning = ref<boolean>(false);
/**匹配views里面所有的.vue或.tsx文件 */
@@ -48,6 +50,15 @@ onMounted(() => {
useLayoutStore().changeConf('menuTheme', 'light');
useLayoutStore().changeConf('tabRender', false);
} else {
useLayoutStore().changeConf('layout', 'mix');
useLayoutStore().changeConf('menuTheme', 'light');
useLayoutStore().changeConf('tabRender', true);
// location.replace(location.origin);
router.replace({ name: 'Monitor_2087' }).finally(() => {
nextTick(() => location.reload());
});
return;
useLayoutStore().changeConf('layout', 'mix');
//获取当前系统设置的首页路径
spinning.value = true;

View File

@@ -1,28 +1,29 @@
<script setup lang="ts">
import { ref, onMounted, markRaw } from 'vue';
import { PageContainer } from 'antdv-pro-layout';
import useI18n from '@/hooks/useI18n';
import { onMounted } from 'vue';
import UPFTEST from './tenantUPF.vue';
import MODULE from './moduleInfo.vue';
import { upfFlowData } from '../dashboard/overview/hooks/useUPFTotalFlow';
onMounted(() => {});
</script>
<template>
<PageContainer>
<div style="background-color: #f7f8fc; padding: 20px">
<div>
<div class="container">
<MODULE />
</div>
<UPFTEST />
</PageContainer>
<div class="container">
<UPFTEST />
</div>
</div>
</template>
<style lang="less" scoped>
.cardClass {
height: 100%;
width: 100%;
border-radius: 10px;
.container {
background-color: #fff;
margin: 40px;
border-radius: 6px;
}
[data-theme='dark'] .container {
background-color: #141414;
}
</style>

View File

@@ -262,6 +262,8 @@ function fnGetInitData() {
}
})
.finally(() => {
// reSendUPF(selectRmUid.value);
// upfFlowParse({});
handleRanderChart();
});
}
@@ -302,29 +304,27 @@ onUnmounted(() => {
</script>
<template>
<div style="background-color: #f7f8fc; padding: 20px">
<a-card
:bordered="false"
class="cardClass"
v-show="upfFlowData.lineXTime.length"
<a-card
:bordered="false"
class="cardClass"
v-show="upfFlowData.lineXTime.length"
>
<template #title
><a href="#"
>{{ t('views.dashboard.overview.upfFlow.title') }}
</a></template
>
<template #title
><a href="#"
>{{ t('views.dashboard.overview.upfFlow.title') }}
</a></template
>
<template #extra>
<a-select
v-model:value="selectRmUid"
style="width: 120px"
@change="fnGetInitData"
:options="dropdownOptions"
/>
</template>
<template #extra>
<a-select
v-model:value="selectRmUid"
style="width: 120px"
@change="fnGetInitData"
:options="dropdownOptions"
/>
</template>
<div ref="upfFlow" style="padding: 24px" class="chart-container"></div>
</a-card>
</div>
<div ref="upfFlow" style="padding: 24px" class="chart-container"></div>
</a-card>
</template>
<style lang="less" scoped>