diff --git a/readme.md b/readme.md index 0ad61db..484c49e 100644 --- a/readme.md +++ b/readme.md @@ -70,24 +70,62 @@ ### **常见项目结构模板(供对照)** ``` src/ -├── main.js # 入口文件 +├── main.js # 入口文件 +├── api/ # 接口请求 +│ └── system/ +│ └── atvApi.ts +│ └── fcrudApi.ts +│ └── fileApi.ts ├── router/ # 路由 -│ └── index.js -├── store/ # 状态管理(Vuex/Pinia) -│ ├── index.js -│ └── modules/ -├── views/ # 页面组件(路由级) -│ ├── Home.vue -│ └── list/ +│ └── backEnd.ts +│ └── index.ts +│ └── frontEnd.ts +│ └── router.ts +├── stores/ # 状态管理(Vuex/Pinia) +│ ├── interface/ +│ └── index.ts/ +├── views/ # 页面组件 +│ ├── atv #活动 +│ ├── common #公共组件 +│ ├── facade #门面 +│ ├── monitor #监控中心 +│ └── system #系统 ├── components/ # 公共组件 -│ ├── BaseTable.vue -│ └── SelectDict.vue +│ ├── auth 权限 +│ │ ├── auth.vue +│ │ ├── AuthAll.vue +│ │ └── Auths.vue +│ ├── cropper #头像剪裁 +│ │ └── index.vue +│ ├── editor #富文本编辑器 +│ │ └── index.vue +│ ├── iconSelect #图标选择 +│ │ └── index.vue +│ ├── sam #核心组件 +│ ├── svgIcon #svg图标 +│ └── noticeBar 通知栏 +│ └── index.vue +├── assets/ # 静态资源 +│ ├── images/ +│ ├── style/ +│ └── font/ ├── utils/ # 工具函数 -│ └── request.js # axios封装 -├── styles/ # 全局样式 -│ ├── variables.scss -│ └── reset.scss -└── layout/ # 全局布局 - └── AppLayout.vue +│ └── ajax/ +│ └── echarts/ +│ └── sam/ +│ └── *.ts +├── layout/ # 全局布局 +│ └── component/ +│ └── footer/ #底部 +│ └── lockScreen/ #锁屏 +│ └── logo/ #logo +│ └── main/ +│ └── navBars/ #导航栏 +│ └── navMenu/ #导航菜单 +│ └── routerView/ #路由视图 ``` +重要的文件 +G:\Projects\VueProject\SamATV\src\views\common +src/views/common/dashboard/big/index.vue dashboard仪表盘 +前端路由:G:\Projects\VueProject\SamATV\src\router\route.ts diff --git a/src/App.vue b/src/App.vue index 5262b0a..58282f7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -14,7 +14,7 @@ import { storeToRefs } from 'pinia'; import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes'; import { useThemeConfig } from '/@/stores/themeConfig'; import other from '/@/utils/other'; -import { Local, Session } from '/@/utils/storage'; +import { Local, Session } from '/@/utils/storage'; import setIntroduction from '/@/utils/setIconfont'; import LockScreen from '/@/layout/lockScreen/index.vue'; import Setings from '/@/layout/navBars/breadcrumb/setings.vue'; diff --git a/src/router/route.ts b/src/router/route.ts index 9853d9b..6ff36b3 100644 --- a/src/router/route.ts +++ b/src/router/route.ts @@ -19,7 +19,7 @@ export const dynamicRoutes: Array = [ path: '/home', name: 'home', component: () => import('/@/views/common/dashboard/atv/index.vue'), meta: { - title: 'message.router.home', + title: '首页', isLink: '', isHide: false, isKeepAlive: true, isAffix: true, isIframe: false, roles: ['admin', 'common'], icon: 'fa fa-home', @@ -33,7 +33,16 @@ export const dynamicRoutes: Array = [ path: '/big', name: 'grafana', component: () => import('/@/views/common/dashboard/big/index.vue'), meta: { - title: 'message.router.bigscreen', isIframe: false, isLink: '/big', + title: '数据监测', isIframe: false, isLink: '/big', + isHide: false, isKeepAlive: false, isAffix: false, + roles: ['admin'], icon: 'fa fa-window-restore' + }, + }, + { + path: '/line', name: 'line', + component: () => import('/@/views/common/dashboard/big/LineIndex.vue'), + meta: { + title: '具体传感器', isIframe: false, isLink: '/line', isHide: false, isKeepAlive: false, isAffix: false, roles: ['admin'], icon: 'fa fa-window-restore' }, @@ -42,7 +51,7 @@ export const dynamicRoutes: Array = [ path: '/set_config', name: 'config', component: () => import('/@/views/common/dashboard/config_page/index.vue'), meta: { - title: 'message.router.set_config', isIframe: false, isLink: '/set_config', + title: '配置管理', isIframe: false, isLink: '/set_config', isHide: false, isKeepAlive: false, isAffix: false, roles: ['admin'], icon: 'fa fa-window-restore' }, diff --git a/src/views/common/dashboard/big/LineIndex.vue b/src/views/common/dashboard/big/LineIndex.vue new file mode 100644 index 0000000..2a5c3a5 --- /dev/null +++ b/src/views/common/dashboard/big/LineIndex.vue @@ -0,0 +1,204 @@ + + + + + \ No newline at end of file diff --git a/src/views/common/dashboard/big/heatmap.vue b/src/views/common/dashboard/big/heatmap.vue new file mode 100644 index 0000000..bd834e2 --- /dev/null +++ b/src/views/common/dashboard/big/heatmap.vue @@ -0,0 +1,210 @@ + + + + + \ No newline at end of file diff --git a/src/views/common/dashboard/big/index.vue b/src/views/common/dashboard/big/index.vue index 9feaac0..0dee947 100644 --- a/src/views/common/dashboard/big/index.vue +++ b/src/views/common/dashboard/big/index.vue @@ -1,7 +1,30 @@ @@ -160,7 +176,9 @@ export default { display: flex; align-items: center; /* 垂直居中对齐 */ flex-wrap: wrap; /* 当屏幕宽度不足时自动换行 */ - margin-bottom: 20px; /* 和 iframe 的间距 */ + margin-top: 10px; /* 与顶部的间距 */ + margin-bottom: 10px; /* 和 iframe 的间距 */ + margin-left: 10px; width: 100%; justify-content: flex-start; } @@ -169,28 +187,4 @@ export default { margin-right: 10px; /* 按钮和输入框之间的间距 */ } -.iframe-container { - width: 100%; -} - -.iframe-row { - display: flex; - justify-content: space-between; - gap: 10px; /* 三个 iframe 之间的间距 */ - margin-top: 10px; -} - -.embedded-iframe { - border: 1px solid #ccc; -} - -.embedded-iframe.large { - width: 100%; /* 上方 iframe 占整行 */ - height: 400px; /* 高度根据需求调整 */ -} - -.embedded-iframe.small { - width: 32%; /* 下方三个 iframe 各占三分之一宽度 */ - height: 300px; /* 高度根据需求调整 */ -} - + \ No newline at end of file diff --git a/src/views/common/dashboard/big/lineChart.vue b/src/views/common/dashboard/big/lineChart.vue new file mode 100644 index 0000000..8d017f3 --- /dev/null +++ b/src/views/common/dashboard/big/lineChart.vue @@ -0,0 +1,225 @@ + + + + + \ No newline at end of file