From b357bc793ce98cc14d32db09d85a57d011186643 Mon Sep 17 00:00:00 2001 From: tingzi <2693633308@qq.com> Date: Mon, 5 May 2025 16:50:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=83=AD=E5=8A=9B=E5=9B=BEdashboard\big\he?= =?UTF-8?q?atmap.vue=20=E5=90=8E=E7=BB=AD=EF=BC=9Aheatmap=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=E6=9A=82=E6=97=B6=E7=94=A8=E7=94=9F=E6=88=90=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8F=AF=E8=A7=86=E5=8C=96=E5=90=8E=E9=9D=A2?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=94=B9=E6=88=90=E5=90=91=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 69 ++++-- src/App.vue | 2 +- src/views/common/dashboard/big/heatmap.vue | 210 ++++++++++++++++++ src/views/common/dashboard/big/index.vue | 238 +++++++++++---------- 4 files changed, 386 insertions(+), 133 deletions(-) create mode 100644 src/views/common/dashboard/big/heatmap.vue diff --git a/readme.md b/readme.md index 0ad61db..30820ab 100644 --- a/readme.md +++ b/readme.md @@ -70,24 +70,59 @@ ### **常见项目结构模板(供对照)** ``` 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/ #路由视图 ``` - +重要的文件 +src/views/common/dashboard/big/index.vue dashboard仪表盘 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/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..bd6a80c 100644 --- a/src/views/common/dashboard/big/index.vue +++ b/src/views/common/dashboard/big/index.vue @@ -1,7 +1,30 @@ + + + + + + + + + + + + + - - + + - + + + - 查询 - - - - - - - - - - + + + @@ -160,7 +190,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 +201,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 From 30520ffafa0b8d0c1ea5a6b94cd68fc4ea9d9f89 Mon Sep 17 00:00:00 2001 From: tingzi <2693633308@qq.com> Date: Tue, 6 May 2025 16:14:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8A=98=E7=BA=BF=E5=9B=BEdashboard\big\Li?= =?UTF-8?q?neIndex.vue=20=E6=8A=98=E7=BA=BF=E5=9B=BEdashboard\big\lineChar?= =?UTF-8?q?t.vue=20=E5=90=8E=E7=BB=AD=EF=BC=9AlineChart.vue=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=E6=9A=82=E6=97=B6=E7=94=A8=E7=94=9F=E6=88=90=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8F=AF=E8=A7=86=E5=8C=96=E5=90=8E=E9=9D=A2?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=94=B9=E6=88=90=E5=90=91=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E6=95=B0=E6=8D=AE=20=E8=BF=99=E9=87=8C?= =?UTF-8?q?=E6=8A=98=E7=BA=BF=E5=9B=BE=E6=96=B0=E5=8A=A0=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=89=80=E4=BB=A5=E5=BD=B1?= =?UTF-8?q?=E5=93=8D=E4=BA=86=E5=89=8D=E7=AB=AF=E8=B7=AF=E7=94=B1=20?= =?UTF-8?q?=E9=A1=BA=E4=BE=BF=E5=AE=8C=E5=96=84=E4=BA=86=E4=B8=80=E4=B8=8B?= =?UTF-8?q?index.vue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 3 + src/router/route.ts | 15 +- src/views/common/dashboard/big/LineIndex.vue | 204 +++++++++++++++++ src/views/common/dashboard/big/index.vue | 18 +- src/views/common/dashboard/big/lineChart.vue | 225 +++++++++++++++++++ 5 files changed, 446 insertions(+), 19 deletions(-) create mode 100644 src/views/common/dashboard/big/LineIndex.vue create mode 100644 src/views/common/dashboard/big/lineChart.vue diff --git a/readme.md b/readme.md index 30820ab..484c49e 100644 --- a/readme.md +++ b/readme.md @@ -125,4 +125,7 @@ src/ │ └── 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/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/index.vue b/src/views/common/dashboard/big/index.vue index bd6a80c..0dee947 100644 --- a/src/views/common/dashboard/big/index.vue +++ b/src/views/common/dashboard/big/index.vue @@ -61,7 +61,6 @@ placeholder="其他选项" @change="handleOtherChange" /> - @@ -72,12 +71,14 @@ :picType="typeValue" /> + + + \ No newline at end of file