配置: 默认首页切换到 /iot/home,下线旧 Dashboard 与设备分布地图
- preferences.ts: 覆盖框架默认的 defaultHomePath: '/analytics' 为 '/iot/home', 登录后直接进入 IoT 概览页。 - router/routes/modules/dashboard.ts: 删除 Dashboard/Workspace/Analytics 路由 (不再作为菜单项暴露),仅保留 Profile。 - views/iot/home/index.vue: 移除 DeviceMapCard(依赖的后端 /admin-api/iot/device/location-list 接口尚未就绪,避免无效请求)。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,8 @@ export const overridesPreferences = defineOverridesPreferences({
|
|||||||
accessMode: 'backend',
|
accessMode: 'backend',
|
||||||
name: import.meta.env.VITE_APP_TITLE,
|
name: import.meta.env.VITE_APP_TITLE,
|
||||||
enableRefreshToken: true,
|
enableRefreshToken: true,
|
||||||
|
/** 首页路径:默认跳转到 IoT 首页(覆盖框架默认的 /analytics) */
|
||||||
|
defaultHomePath: '/iot/home',
|
||||||
},
|
},
|
||||||
footer: {
|
footer: {
|
||||||
/** 默认关闭 footer 页脚,因为有一定遮挡 */
|
/** 默认关闭 footer 页脚,因为有一定遮挡 */
|
||||||
|
|||||||
@@ -2,37 +2,8 @@ import type { RouteRecordRaw } from 'vue-router';
|
|||||||
|
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
|
|
||||||
|
// 首页已改为 /iot/home(见 preferences.ts),原 Dashboard/Workspace/Analytics 路由已下线
|
||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
{
|
|
||||||
meta: {
|
|
||||||
icon: 'lucide:layout-dashboard',
|
|
||||||
order: -1,
|
|
||||||
title: $t('page.dashboard.title'),
|
|
||||||
},
|
|
||||||
name: 'Dashboard',
|
|
||||||
path: '/dashboard',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: 'Workspace',
|
|
||||||
path: '/workspace',
|
|
||||||
component: () => import('#/views/dashboard/workspace/index.vue'),
|
|
||||||
meta: {
|
|
||||||
icon: 'carbon:workspace',
|
|
||||||
title: $t('page.dashboard.workspace'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Analytics',
|
|
||||||
path: '/analytics',
|
|
||||||
component: () => import('#/views/dashboard/analytics/index.vue'),
|
|
||||||
meta: {
|
|
||||||
affixTab: true,
|
|
||||||
icon: 'lucide:area-chart',
|
|
||||||
title: $t('page.dashboard.analytics'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'Profile',
|
name: 'Profile',
|
||||||
path: '/profile',
|
path: '/profile',
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { getStatisticsSummary } from '#/api/iot/statistics';
|
|||||||
|
|
||||||
import { defaultStatsData } from './data';
|
import { defaultStatsData } from './data';
|
||||||
import DeviceCountCard from './modules/device-count-card.vue';
|
import DeviceCountCard from './modules/device-count-card.vue';
|
||||||
import DeviceMapCard from './modules/device-map-card.vue';
|
|
||||||
import DeviceStateCountCard from './modules/device-state-count-card.vue';
|
import DeviceStateCountCard from './modules/device-state-count-card.vue';
|
||||||
import MessageTrendCard from './modules/message-trend-card.vue';
|
import MessageTrendCard from './modules/message-trend-card.vue';
|
||||||
|
|
||||||
@@ -103,12 +102,5 @@ onMounted(() => {
|
|||||||
<MessageTrendCard />
|
<MessageTrendCard />
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<!-- 第四行:设备分布地图 -->
|
|
||||||
<Row :gutter="16">
|
|
||||||
<Col :span="24">
|
|
||||||
<DeviceMapCard />
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user