From 37e3db7b6fd8858ccfc6e5eb8dd9fb4fad561bd2 Mon Sep 17 00:00:00 2001 From: fuguobin Date: Thu, 14 Mar 2024 16:01:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=90=88=E5=B9=B6=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 +- pnpm-lock.yaml | 52 + src/api/monitoring/table/index.js | 296 ++++ src/main.js | 3 +- src/plugins/bus.js | 2 + src/router/index.js | 10 + src/styles/index.scss | 6 +- src/utils/index.js | 109 ++ src/utils/request.js | 6 - src/views/monitoring/data-monitor/index.vue | 105 +- .../equipment/components/header.vue | 472 +++++++ .../monitoring/equipment/components/main.vue | 440 ++++++ .../monitoring/equipment/components/menu.vue | 314 +++++ src/views/monitoring/equipment/index.scss | 766 ++++++++++ src/views/monitoring/equipment/index.vue | 67 + src/views/monitoring/graph/index.scss | 300 ++++ src/views/monitoring/graph/index.vue | 1228 +++++++++++++++++ .../station/components/bar - 副本.vue | 162 --- .../station/components/boxPlot - 副本.vue | 154 --- .../station/components/table - 副本.vue | 142 -- .../monitoring/station/components/table.vue | 2 +- src/views/system/menu/index.vue | 715 ++++++---- vite/plugins/auto-import.js | 14 +- vite/plugins/index.js | 22 +- 24 files changed, 4505 insertions(+), 885 deletions(-) create mode 100644 src/api/monitoring/table/index.js create mode 100644 src/plugins/bus.js create mode 100644 src/views/monitoring/equipment/components/header.vue create mode 100644 src/views/monitoring/equipment/components/main.vue create mode 100644 src/views/monitoring/equipment/components/menu.vue create mode 100644 src/views/monitoring/equipment/index.scss create mode 100644 src/views/monitoring/equipment/index.vue create mode 100644 src/views/monitoring/graph/index.scss create mode 100644 src/views/monitoring/graph/index.vue delete mode 100644 src/views/monitoring/station/components/bar - 副本.vue delete mode 100644 src/views/monitoring/station/components/boxPlot - 副本.vue delete mode 100644 src/views/monitoring/station/components/table - 副本.vue diff --git a/package.json b/package.json index 6b24583..916438e 100644 --- a/package.json +++ b/package.json @@ -55,9 +55,9 @@ "xe-utils": "^3.5.14" }, "devDependencies": { + "@types/crypto-js": "^4.2.1", "@typescript-eslint/eslint-plugin": "^5.19.0", "@typescript-eslint/parser": "^5.19.0", - "@types/crypto-js": "^4.2.1", "@vicons/antd": "^0.12.0", "@vicons/ionicons5": "^0.12.0", "@vicons/tabler": "^0.12.0", @@ -67,6 +67,7 @@ "sass": "1.56.1", "typescript": "^4.7.4", "unplugin-auto-import": "^0.11.5", + "unplugin-vue-components": "^0.26.0", "vite": "^3.2.3", "vite-plugin-compression": "0.5.1", "vite-plugin-svg-icons": "2.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f8a3365..1f5ef03 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -157,6 +157,9 @@ devDependencies: unplugin-auto-import: specifier: ^0.11.5 version: 0.11.5(@vueuse/core@9.5.0) + unplugin-vue-components: + specifier: ^0.26.0 + version: 0.26.0(vue@3.2.45) vite: specifier: ^3.2.3 version: 3.2.8(sass@1.56.1) @@ -976,6 +979,12 @@ packages: concat-map: 0.0.1 dev: true + /brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true + /braces@2.3.2: resolution: {integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==} engines: {node: '>=0.10.0'} @@ -2430,6 +2439,13 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /magic-string@0.30.8: + resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /map-cache@0.2.2: resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==} engines: {node: '>=0.10.0'} @@ -2521,6 +2537,13 @@ packages: brace-expansion: 1.1.11 dev: true + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true @@ -3383,6 +3406,35 @@ packages: - rollup dev: true + /unplugin-vue-components@0.26.0(vue@3.2.45): + resolution: {integrity: sha512-s7IdPDlnOvPamjunVxw8kNgKNK8A5KM1YpK5j/p97jEKTjlPNrA0nZBiSfAKKlK1gWZuyWXlKL5dk3EDw874LQ==} + engines: {node: '>=14'} + peerDependencies: + '@babel/parser': ^7.15.8 + '@nuxt/kit': ^3.2.2 + vue: 2 || 3 + peerDependenciesMeta: + '@babel/parser': + optional: true + '@nuxt/kit': + optional: true + dependencies: + '@antfu/utils': 0.7.7 + '@rollup/pluginutils': 5.1.0 + chokidar: 3.6.0 + debug: 4.3.4 + fast-glob: 3.3.2 + local-pkg: 0.4.3 + magic-string: 0.30.8 + minimatch: 9.0.3 + resolve: 1.22.8 + unplugin: 1.9.0 + vue: 3.2.45 + transitivePeerDependencies: + - rollup + - supports-color + dev: true + /unplugin@1.9.0: resolution: {integrity: sha512-14PslvMY3gNbXnQtNIRB566Q057L5Fe7f5LDEamxVi0QQVxoz5hrveBwwZLcKyHtZ09ysmipxRRj5Lv+BGz2Iw==} engines: {node: '>=14.0.0'} diff --git a/src/api/monitoring/table/index.js b/src/api/monitoring/table/index.js new file mode 100644 index 0000000..f2b6433 --- /dev/null +++ b/src/api/monitoring/table/index.js @@ -0,0 +1,296 @@ +import request from "@/utils/request"; + +/** + * 获取左侧菜单 + */ +export function getMenu() { + return request({ + url: "/bi/opt/getMenu", + method: "get", + }); +} + +/** + * 获取热源信息 + */ +export function getStationInfo() { + return request({ + url: "/bi/opt/getStationInfo", + method: "get", + }); +} + +/** + * 获取表格header + */ +export function getTableHeader() { + return request({ + // url: '/bi/opt/getTableHeader', + url: "/dc/data/monitor/table/header", + method: "get", + }); +} + +// /** +// * 获取表格数据 +// * +// * @param id +// */ +// export function getTableData(params): AxiosPromise { +// return request({ +// url: '/bi/opt/getTableData/' + params, +// method: 'get' +// }); +// } + +/** + * 获取表格数据 + * + * @param data + */ +export function getTableData(data) { + return request({ + // url: '/bi/opt/getTableDataPage', + url: "/dc/data/monitor/table/data", + method: "post", + data: data, + }); +} + +/** + * 获取供暖办表格header + */ +export function getMockTableHeader() { + return request({ + // url: '/bi/opt/getTableHeader', + url: "/dc/mock/data/monitor/table/header", + method: "get", + }); +} + +/** + * 获取供暖办表格数据 + * + * @param data + */ +export function getMockTableData(data) { + return request({ + // url: '/bi/opt/mock/getTableDataPage', + url: "/dc/mock/data/monitor/table/data", + method: "post", + data: data, + }); +} + +/** + * 配置项修改 + * + * @param data + */ +export function editConfig(data) { + return request({ + url: "/dc/dcUserMonitorConfig/A", + method: "post", + data: data, + }); +} + +/** + * 获取底部面板信息 + */ +export function getTableFooter(params) { + return request({ + url: "/bi/opt/getTableFooter/" + params, + method: "get", + }); +} +/** 发送控制参数 */ +export function sendCtrl(data) { + return request({ + url: "/bi/opt/device/ctrl", + method: "post", + data: data, + }); +} + +/** + * 获取报表统计 + * + * @param queryParams + */ +export function dcBusiDayReport(queryParams) { + return request({ + url: "/dc/dcBusiDayReport/list", + method: "get", + params: queryParams, + }); +} + +/** + * 获取报警列表 + * + * @param data + */ +export function getWarList(data) { + return request({ + url: "/dc/dcBusiAlertJob/list/vo", + method: "post", + data: data, + }); +} + +/** + * 获取报警列表确认 + * + * @param params id + */ +export function process(id) { + return request({ + url: "/dc/dcBusiAlertJob/process/" + id, + method: "post", + }); +} + +/** + * 关闭报警 + * + * @param data + */ +export function setAlarm(data) { + return request({ + url: "/dc/dcBusiAlertJob/alertSwith", + method: "post", + data: data, + }); +} + +/** + * 获取左侧菜单 + */ +export function getMenuData() { + return request({ + url: "/bi/configuration/getMenuData", + method: "get", + }); +} + +/** + * 获取用户部门 + */ +export function getDept() { + return request({ + url: "/bi/configuration/getMenu", + method: "get", + }); +} + +/** + * 获取设备列表 + * + * @param params 部门Id + */ +export function getDeviceList(params) { + return request({ + url: "/bi/configuration/getDeviceListByDept/" + params, + method: "get", + }); +} + +/** + * 获取设备列表 + * + * @param params 设备Id + */ +export function getViewInfo(params) { + return request({ + url: "/bi/configuration/getViewInfoById/" + params, + method: "get", + }); +} + +/** + * 获取图表详情设备筛选项 + */ +export function getDevices(params) { + return request({ + // url: '/dc/dcDeviceEcharts/getDevices/' + params, + url: "/dc/data/monitor/asset/list/" + params, + method: "get", + }); +} +/** + * 获取图表详情设备筛选项 + */ +export function getAllDevices() { + return request({ + url: "/dc/dcDeviceEcharts/getAllDevices", + method: "get", + }); +} +/** + * 获取图表详情参数集 + */ +export function getClass() { + return request({ + url: "/dc/dcDeviceEcharts/getParamSet", + method: "get", + }); +} +/** + * 获取图表详情参数筛选项 + */ +export function getParams() { + return request({ + url: "/dc/dcDeviceEcharts/getParams", + method: "get", + }); +} +/** + * 获取图表详情分区筛选项 + */ +export function getPortions() { + return request({ + url: "/dc/dcDeviceEcharts/getPortions", + method: "get", + }); +} +/** + * 获取折线图数据 + * + * @param data + */ +export function getDeviceInfos(data) { + return request({ + // url: '/dc/dcDeviceEcharts/getDeviceInfos', + url: "/dc/data/monitor/history/data", + method: "post", + data: data, + }); +} + +/** + * 获取轮询折线图数据 + * + * @param data + */ +export function getDeviceInfosPolling(data) { + return request({ + // url: '/dc/dcDeviceEcharts/device/realtime/data', + url: "/dc/data/monitor/realtime/data", + method: "post", + data: data, + }); +} + +/** + * 天气数据图表 + * + * @param data + */ +export function weatherHoursList(data) { + return request({ + url: "/dc/dcDeviceEcharts/weatherHoursList", + method: "post", + data: data, + }); +} diff --git a/src/main.js b/src/main.js index 977bb00..b1ad295 100644 --- a/src/main.js +++ b/src/main.js @@ -3,6 +3,7 @@ import { createApp } from "vue"; import Cookies from "js-cookie"; import ElementPlus from "element-plus"; +import naive from "naive-ui"; import locale from "element-plus/lib/locale/lang/zh-cn"; // 中文语言 import { useTable } from "./plugins/vxe-table"; @@ -107,6 +108,6 @@ app.use(ElementPlus, { // 支持 large、default、small size: Cookies.get("size") || "default", }); - +app.use(naive); app.use(useTable); app.mount("#app"); diff --git a/src/plugins/bus.js b/src/plugins/bus.js new file mode 100644 index 0000000..1a13398 --- /dev/null +++ b/src/plugins/bus.js @@ -0,0 +1,2 @@ +import mitt from 'mitt' +export default mitt() \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 26a57db..3aa0e59 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -47,11 +47,21 @@ export const constantRoutes = [ component: () => import("@/views/register"), hidden: true, }, + { + path: "/monitoring/equipment", + component: () => import("@/views/monitoring/equipment/index"), + hidden: true, + }, { path: "/monitoring/station", component: () => import("@/views/monitoring/station/index"), hidden: true, }, + { + path: "/monitoring/graph", + component: () => import("@/views/monitoring/graph/index"), + hidden: true, + }, { path: "/index1", component: () => import("@/views/index1"), diff --git a/src/styles/index.scss b/src/styles/index.scss index 354571c..926c7d3 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -184,9 +184,9 @@ } } -.el-overlay { - z-index: 99999 !important; -} +// .el-overlay { +// z-index: 99999 !important; +// } .el-notification { border: none !important; diff --git a/src/utils/index.js b/src/utils/index.js index 544403d..3c0465d 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -421,6 +421,90 @@ export function throttle(handler, wait) { } }; } +/** + * 数组对象根据字段去重 + * @param {array} arr 要去重的数组 + * @param {string} key 根据去重的字段名 + */ +export function uniqueArrayObject(arr = [], key = "id") { + if (arr.length === 0) return; + let list = []; + const map = {}; + arr.forEach((item) => { + if (!map[item[key]]) { + map[item[key]] = item; + } + }); + list = Object.values(map); + return list; +} + +/** + * 获取数组对象最后一个层级的数据 + * @param {array} data 数组 + */ +export function getLastLevelNode(data) { + if (data.length === 0) { + return null; // 数组为空,返回null或自定义默认值 + } + + const lastItem = data[data.length - 1]; // 获取数组的最后一个元素 + + if (lastItem.children && lastItem.children.length > 0) { + return getLastLevelNode(lastItem.children); // 继续递归调用 + } + + return lastItem; // 返回最后一个层级 +} + +/** + * 获取数组对象第一个节点最后一个层级的数据 + * @param {array} data 数组 + */ +export function getFirstNodeLastLevel(data) { + if (data.length === 0) { + return null; // 数组为空,返回null或自定义默认值 + } + + const firstNode = data[0]; + + if (firstNode.children && firstNode.children.length > 0) { + return getFirstNodeLastLevel(firstNode.children); + } + + return firstNode; // 返回第一个节点的最后一个层级的数据 +} + +/** + * 获取数组对象第一个节点最后一个层级的数据 + * @param {array} obj1 数组1 + * @param {array} obj2 数组2 + */ +export function isEqual(obj1, obj2) { + // 判断两个对象的类型是否相同 + if (typeof obj1 !== typeof obj2) { + return false; + } + // 如果是基本类型数据,则直接比较它们的值 + if (typeof obj1 !== "object") { + return obj1 === obj2; + } + // 获取obj1和obj2的属性名称 + const obj1Keys = Object.keys(obj1); + const obj2Keys = Object.keys(obj2); + // 如果两个对象的属性数量不同,则它们不相等 + if (obj1Keys.length !== obj2Keys.length) { + return false; + } + // 递归比较obj1和obj2的属性和值 + for (let key of obj1Keys) { + if (!isEqual(obj1[key], obj2[key])) { + return false; + } + } + // 如果所有属性和值都相等,则两个对象相等 + return true; +} /** * 值之间的过度 * @param {number} num 需要过度的数值 @@ -471,3 +555,28 @@ export function getUrlRouter() { var hrefarr = args[1].split("/")[1].split("?"); return hrefarr; } + +/** + * 计算当前之后一段时间 + * @param {Date} currentTime 当前时间 + * @param {string} type 类型:1:日,2:时,3:分,4:秒,5:月,6:年 + */ +export const endTime = (currentTime, type) => { + const today = new Date(currentTime); + switch (type) { + case "1": + return new Date(today.getTime() + 24 * 60 * 60 * 1000); + case "2": + return new Date(today.getTime() + 60 * 60 * 1000); + case "3": + return new Date(today.getTime() + 60 * 1000); + case "4": + return new Date(today.getTime() + 1000); + case "5": + return new Date(today.getTime() + 30 * 24 * 60 * 60 * 1000); + case "6": + return new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000); + default: + return today; + } +}; diff --git a/src/utils/request.js b/src/utils/request.js index 0bbf79b..3888e51 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -69,12 +69,6 @@ service.interceptors.request.use( const s_data = sessionObj.data; // 请求数据 const s_time = sessionObj.time; // 请求时间 const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交 - console.log( - "s_data:", - s_data === requestObj.data && requestObj.time - s_time - ); - console.log("interval:", interval); - console.log("s_url:", s_url === requestObj.url); if ( s_data === requestObj.data && requestObj.time - s_time < interval && diff --git a/src/views/monitoring/data-monitor/index.vue b/src/views/monitoring/data-monitor/index.vue index d6b577d..4ac7061 100644 --- a/src/views/monitoring/data-monitor/index.vue +++ b/src/views/monitoring/data-monitor/index.vue @@ -1,108 +1,7 @@ - + diff --git a/src/views/monitoring/equipment/components/header.vue b/src/views/monitoring/equipment/components/header.vue new file mode 100644 index 0000000..4fcd2a7 --- /dev/null +++ b/src/views/monitoring/equipment/components/header.vue @@ -0,0 +1,472 @@ + + + + diff --git a/src/views/monitoring/equipment/components/main.vue b/src/views/monitoring/equipment/components/main.vue new file mode 100644 index 0000000..8cc7b31 --- /dev/null +++ b/src/views/monitoring/equipment/components/main.vue @@ -0,0 +1,440 @@ + + diff --git a/src/views/monitoring/equipment/components/menu.vue b/src/views/monitoring/equipment/components/menu.vue new file mode 100644 index 0000000..faa6e49 --- /dev/null +++ b/src/views/monitoring/equipment/components/menu.vue @@ -0,0 +1,314 @@ + + + + diff --git a/src/views/monitoring/equipment/index.scss b/src/views/monitoring/equipment/index.scss new file mode 100644 index 0000000..fec055d --- /dev/null +++ b/src/views/monitoring/equipment/index.scss @@ -0,0 +1,766 @@ +@import url('@/assets/fonts/font.css'); +.devicemanage { + position: relative; + width: 100%; + height: 100vh; + background: url(@/assets/images/screen.png); + // background-color: var(--tableBg); + background-size: 100% 100%; + // background-color: rgba(0, 0, 0, 0.3); + // background-blend-mode: multiply; + padding: 0 25px; + overflow: hidden; + + .layout { + display: flex; + + .sidebar { + width: 12%; + height: calc(100vh - 95px - 30px); //屏幕高度-头部header高度-底部高度 + flex-shrink: 0; + border: 1px solid #0d55b0; + padding: 10px 0; + // box-shadow: inset 0px 0px 10px 0px rgb(36, 90, 12); + margin-right: 1vw; + position: relative; + overflow: hidden; + transition: width 0.28s; + background-color: rgba(2, 8, 46, 0.8); + + // .menu { + // text-align: center; + + // :deep(.n-submenu) { + // --n-item-color-hover: auto; + + // .n-menu-item { + // .n-menu-item-content { + // padding: 0 !important; + + // .n-ellipsis { + // font-family: 'AlibabaPuHuiTiBold'; + // padding: 0 15px; + // } + // } + + // .n-menu-item-content-header { + // font-size: 2.4rem; + // color: #B1E3FF; + // } + // } + + // .n-submenu-children { + // .n-menu-item-content-header { + // font-size: 1.8rem; + // } + + // .n-menu-item-content--selected { + // .n-menu-item-content-header { + // color: #fff; + + // .n-ellipsis { + // position: relative; + + // span { + // padding: 0 10px; + // } + + // span::before { + // content: ''; + // position: absolute; + // left: 0; + // top: 0.7rem; + // width: 1.8rem; + // height: 1.8rem; + // background: url(../../../assets/images/taps.png) no-repeat; + // background-size: cover; + // } + // } + // } + // } + + // .n-menu-item-content--selected::before { + // background: -webkit-linear-gradient(left, #1fc7ff29 0%, #1177e700 100%); + // left: 0; + // right: 0; + // } + + // .n-menu-item-content--selected::after { + // content: ''; + // position: absolute; + // bottom: 0; + // width: 100%; + // height: 2px; + // background: -webkit-linear-gradient(left, #1fc7ff29 0%, #1177e700 100%); + // } + // } + + // .n-base-icon { + // color: #84e0f7; + // right: 10px; + // } + // } + // } + } + + .sidebar::after { + content: ''; + position: absolute; + bottom: 0; + width: 100%; + height: 18rem; + background: url(@/assets/images/menu_bg.png) no-repeat; + background-size: 100% 100%; + } + + .main { + width: 87%; + border: 2px solid #1e60a6; + box-shadow: inset 0px 0px 10px 0px rgb(36, 90, 124); + background-color: rgba(2, 8, 46, 0.8); + + :deep(.devicePrt) { + .deviceImg { + position: relative; + + .deviceImg { + width: 100%; + } + + .card { + position: absolute; + display: inline-block; + color: #87e8de; + font-size: 1.4rem; + padding: 10px 20px; + border-radius: 10px; + background: rgba(255, 255, 255, 0.1); + backdrop-filter: blur(10px); + border: 1px solid rgba(255, 255, 255, 0.1); + box-shadow: 0 0 80px rgba(0, 0, 0, 0.25); + z-index: 99; + overflow: hidden; + + .dataInfo { + span { + display: inline-block; + padding: 5px 0; + } + } + + .dataFlex { + display: flex; + + .flexItem { + margin-right: 15px; + } + + .flexItem:last-child { + margin-right: 0; + } + } + } + // .card.card_a{ + // .dataInfo{ + // span{ + // display: inline-block; + // } + // } + // } + // .switch { + // position: absolute; + // z-index: 99; + // cursor: pointer; + // overflow: hidden; + // } + + // .dataInfo { + // position: absolute; + // display: inline-block; + // color: #87e8de; + // padding: 10px; + // font-size: 16px; + // // border: 2px solid #39c33c; + // z-index: 99; + + // span { + // display: block; + // } + // } + } + + .deviceImgA { + .card_a { + top: 50%; + left: 1%; + } + + .card_b { + top: 18%; + left: 1%; + } + + .card_c { + top: 35%; + right: 1%; + } + + .card_f { + top: 35%; + right: 17%; + } + // .switch_a { + // width: 35px; + // height: 60px; + // background: red; + // top: 23%; + // left: 16.5%; + // } + // .switch_b { + // width: 40px; + // height: 65px; + // background: red; + // top: 59%; + // left: 15.5%; + // } + } + + .deviceImgB { + .card_a { + top: 42%; + left: 2%; + } + + .card_b { + top: 8%; + left: 2%; + } + + .card_c { + top: 16%; + right: 2%; + } + + .card_d { + top: 52%; + right: 2%; + } + + .card_f { + top: 30%; + right: 18%; + } + } + + .deviceImgC { + .card_a { + top: 6%; + left: 4%; + } + + .card_b { + top: 40%; + left: 1%; + } + + // .card_g { + // top: 60%; + // left: 5%; + // } + + // .card_h { + // top: 80%; + // left: 5%; + // } + + .card_c { + top: 2%; + right: 2%; + } + + .card_d { + top: 35%; + right: 2%; + } + + .card_e { + top: 68%; + right: 2%; + } + + .card_f { + top: 36%; + right: 18%; + } + } + + // .deviceImgA { + // .dataInfo0 { + // top: 7%; + // left: 6%; + // } + + // .dataInfo1 { + // top: 35%; + // left: 9%; + // } + + // .dataInfo2 { + // top: 0%; + // left: 18%; + // } + + // .dataInfo3 { + // top: 0%; + // left: 25%; + // } + + // .dataInfo4 { + // top: 15%; + // left: 17.5%; + // } + + // .dataInfo5 { + // top: 26%; + // left: 17.5%; + // } + + // .dataInfo6 { + // top: 0%; + // right: 20%; + // } + + // .dataInfo7 { + // top: 10%; + // right: 20%; + // } + // } + // .deviceImgB { + // .dataInfo0 { + // top: 23%; + // left: 10.5%; + // } + + // .dataInfo1 { + // top: 55%; + // left: 12%; + // } + + // .dataInfo2 { + // top: 0%; + // left: 23%; + // } + + // .dataInfo3 { + // top: 0%; + // left: 30%; + // } + + // .dataInfo4 { + // top: 10%; + // left: 23%; + // } + + // .dataInfo5 { + // top: 20%; + // left: 23%; + // } + + // .dataInfo6 { + // top: 0%; + // right: 36%; + // } + + // .dataInfo7 { + // top: 10%; + // right: 36%; + // } + // .dataInfo8 { + // top: 26%; + // right: 31%; + // } + + // .dataInfo9 { + // top: 36%; + // right: 31%; + // } + // } + // .deviceImgC { + // .dataInfo0 { + // bottom: 38%; + // left: 8.5%; + // } + + // .dataInfo1 { + // bottom: 1%; + // left: 11%; + // } + + // .dataInfo2 { + // top: 0%; + // left: 23%; + // } + + // .dataInfo3 { + // top: 0%; + // left: 30%; + // } + + // .dataInfo4 { + // top: 10%; + // left: 23%; + // } + + // .dataInfo5 { + // top: 20%; + // left: 23%; + // } + + // .dataInfo6 { + // top: 0%; + // right: 36%; + // } + + // .dataInfo7 { + // top: 0%; + // right: 29%; + // } + // .dataInfo8 { + // top: 22%; + // right: 36%; + // } + + // .dataInfo9 { + // top: 22%; + // right: 29%; + // } + // .dataInfo10 { + // top: 47%; + // right: 36%; + // } + + // .dataInfo11 { + // top: 47%; + // right: 29%; + // } + // } + + .devicInfo { + color: #b1e3ff; + padding: 0 3rem; + font-family: 'AlibabaPuHuiTiRegular'; + + .title { + display: flex; + align-items: center; + font-size: 20px; + background: url(@/assets/images/info_bg.png) no-repeat center; + background-size: 100% 100%; + + i { + display: block; + width: 6px; + height: 50px; + background: linear-gradient(270deg, #679fff 0%, rgba(17, 119, 231, 0.698) 100%); + border-radius: 0px 0px 0px 0px; + margin-right: 18px; + } + } + + .infoPanel { + display: flex; + justify-content: space-between; + margin-top: 15px; + + .item { + width: 49%; + height: calc(100vh - 150px - 53rem); + padding: 15px 0; + background: -webkit-linear-gradient(top, #052266 0%, #011341 100%); + overflow: auto; + + .collapse { + .colItem { + .n-collapse-item__header-main { + font-size: 18px; + color: #1fb1ff; + padding: 0 22px; + + .n-collapse-item-arrow { + margin-right: 10px; + + img { + width: 18px; + height: 16px; + } + } + } + + .n-collapse-item__content-wrapper { + .n-collapse-item__content-inner { + padding-top: 10px; + + .content { + display: flex; + flex-wrap: wrap; + padding: 0 15px; + font-size: 16px; + color: #c15757; + line-height: 30px; + + span { + display: flex; + align-items: center; + flex: 0 0 calc(100% / 2); + i { + font-style: normal; + display: flex; + align-items: center; + .n-input-number { + display: flex; + align-items: center; + } + } + .switch { + font-size: 13px; + } + } + + span:nth-child(even) { + color: #41a5d7; + } + } + + // .content.pump { + // span { + // flex: auto; + // } + // } + } + } + } + + .colItem.n-collapse-item--active { + .n-collapse-item-arrow { + transform: none; + } + } + + .colItem:not(:first-child) { + border-top: none; + } + + .colItem:not(:first-child)::before { + display: block; + content: ''; + width: 100%; + height: 1px; + background: linear-gradient( + 90deg, + rgba(31, 225, 255, 0) 0%, + rgba(189, 220, 255, 0.94) 50%, + rgba(31, 225, 255, 0) 97% + ); + } + } + } + } + + // .l_green { + // color: #39c33c; + // } + + // .l_blue { + // color: #41a5d7; + // } + + // .orange { + // color: #c15757; + // } + + // .title { + // font-size: 16px; + // } + + // .valves { + // display: flex; + // align-items: center; + // flex-shrink: 0; + // width: 40%; + + // .title { + // writing-mode: vertical-rl; + // // transform: rotate(180deg); + // } + + // .info { + // .select { + // font-weight: 800; + + // .n-button { + // margin-right: 5px; + // background: linear-gradient(#3370cb, #162f68, #162f68); + // } + // } + + // .table { + // border: 1px solid #39c33c; + // border-radius: 3px; + // margin: 10px 0 10px 20px; + + // .item { + // display: flex; + // align-items: center; + // padding: 10px 20px; + // line-height: 26px; + // border-bottom: 1px solid #39c33c; + + // .lable { + // font-size: 16px; + // flex-shrink: 0; + // } + + // .parameters { + // display: flex; + // flex-wrap: wrap; + + // .name { + // color: #c15757; + // margin-left: 15px; + // } + + // .name:nth-child(even) { + // color: #41a5d7; + // } + + // .n-radio__label { + // color: #41a5d7; + // } + // } + // } + + // .item:last-child { + // border-bottom: none; + // } + // } + + // .switch { + // display: flex; + + // span { + // display: flex; + // align-items: center; + // margin-right: 5px; + // } + // } + // } + // } + + // .pump { + // width: 55%; + // padding: 5px 10px; + // border: 1px solid #39c33c; + + // .item { + // line-height: 28px; + + // .info { + // display: flex; + // flex-wrap: wrap; + + // .name { + // color: #c15757; + // margin-left: 15px; + // } + + // .name:nth-child(even) { + // color: #41a5d7; + // } + // } + // } + // } + } + + .tips { + font-size: 1.6rem; + font-family: 'AlibabaPuHuiTiRegular'; + text-align: center; + color: #b1e3ff; + margin-top: 40vh; + } + } + } + + /*滚动条整体部分*/ + .tableGrid ::-webkit-scrollbar { + width: 8px; + height: 8px; + } + + /*滚动条的轨道*/ + .tableGrid ::-webkit-scrollbar-track { + background-color: transparent; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; + } + + /*滚动条里面的小方块,能向上向下移动*/ + .tableGrid ::-webkit-scrollbar-thumb { + background-color: rgb(147, 147, 153, 0.5); + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; + } + + .tableGrid ::-webkit-scrollbar-thumb:hover { + background-color: #a8a8a8; + } + + .tableGrid :-webkit-scrollbar-thumb:active { + background-color: #787878; + } + + /*边角,即两个滚动条的交汇处*/ + .tableGrid ::-webkit-scrollbar-corner { + background-color: transparent; + } + } + .copyright { + height: 25px; + line-height: 25px; + text-align: center; + color: #9ca3af; + font-family: Arial; + font-size: 12px; + letter-spacing: 1px; + margin-top: 5px; + } +} + +.dark { + .devicemanage { + background-color: rgba(29, 30, 31, 0.8); + background-blend-mode: multiply; + + .layout { + .sidebar { + background-color: rgba(29, 30, 31, 0.8); + } + + .main { + background-color: rgba(29, 30, 31, 0.8); + + .devicePrt { + :deep(.devicInfo) { + .infoPanel { + .item { + background: -webkit-linear-gradient(top, rgba(29, 30, 31, 0.8) 0%, rgba(28, 32, 37, 0.8) 100%); + } + } + } + } + } + } + } +} diff --git a/src/views/monitoring/equipment/index.vue b/src/views/monitoring/equipment/index.vue new file mode 100644 index 0000000..97c8599 --- /dev/null +++ b/src/views/monitoring/equipment/index.vue @@ -0,0 +1,67 @@ + + + diff --git a/src/views/monitoring/graph/index.scss b/src/views/monitoring/graph/index.scss new file mode 100644 index 0000000..666c3d4 --- /dev/null +++ b/src/views/monitoring/graph/index.scss @@ -0,0 +1,300 @@ +@import url('@/assets/fonts/font.css'); +.details { + padding: 15px 15px 0 15px; + .search { + position: relative; + margin-bottom: 15px; + overflow: visible; + :deep(.el-card__header) { + padding: 10px; + } + :deep(.el-card__body) { + padding: 0 20px; + } + .cardHeader { + display: flex; + justify-content: center; + align-items: center; + line-height: 25px; + position: relative; + span { + font-size: 24px; + font-family: 'PangMenZhengDaoBiao'; + color: var(--el-menu-active-color); + } + .tooltips { + position: absolute; + top: -5px; + right: 10px; + width: 36px; + height: 36px; + border-radius: 0px 0px 0px 0px; + opacity: 1; + } + } + .searchForm { + .item { + margin: 20px 0; + .searchCheckbox { + margin-right: 30px; + } + } + .formBtn { + margin: 20px; + } + } + .searchTips { + position: absolute; + bottom: 0; + right: 30px; + cursor: pointer; + } + .searchTips.isShow { + bottom: -15px; + } + + .searchTips.isHide::after { + content: '隐藏'; + position: absolute; + top: -130%; + left: 50%; + transform: translateX(-50%); + width: 40px; + height: fit-content; + background-color: var(--el-menu-active-color); + padding: 4px 8px; + border-radius: 5px; + transition: 0.2s linear; + transition-delay: 0.2s; + color: white; + // text-transform: uppercase; + font-size: 12px; + opacity: 0; + // visibility: hidden; + } + + .searchTips.isShow::after { + content: '显示'; + position: absolute; + top: -130%; + left: 50%; + transform: translateX(-50%); + width: 40px; + height: fit-content; + background-color: var(--el-menu-active-color); + padding: 4px 8px; + border-radius: 5px; + transition: 0.2s linear; + transition-delay: 0.2s; + color: white; + // text-transform: uppercase; + font-size: 12px; + opacity: 0; + // visibility: hidden; + } + + .icon { + transform: scale(1.2); + transition: 0.2s linear; + } + + .searchTips:hover > .icon { + transform: scale(1.5); + } + + .searchTips:hover > .icon path { + fill: var(--el-menu-active-color); + } + + .searchTips:hover::after { + visibility: visible; + opacity: 1; + top: -160%; + } + } + .echart { + :deep(.el-card__body) { + display: flex; + padding: 15px; + .sidebar { + width: 200px; + border: 1px solid #e8eaec; + height: calc(100vh - 150px - 30px - 40px - 2px); + + h3 { + height: 25px; + line-height: 25px; + margin: 15px 0; + font-size: 22px; + font-family: 'PangMenZhengDaoBiao'; + color: var(--el-menu-active-color); + text-align: center; + } + .deviceMenu { + height: calc(100vh - 150px - 30px - 40px - 55px - 4px); + border-right: none; + overflow: auto; + .el-menu-item { + display: block; + width: 100%; + height: 45px; + line-height: 45px; + padding: 0 20px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + .iconfont { + margin-right: 6px; + } + } + .el-menu-item.weather { + .icon-weather { + font-size: 16px; + color: var(--el-menu-active-color); + } + span { + font-size: 16px; + color: var(--el-menu-active-color); + } + } + } + + .paramList { + // height: calc(100vh - 150px - 7.5rem); + padding: 20px 10px; + overflow: auto; + .item { + font-size: 14px; + padding: 10px 0; + line-height: 30px; + border-bottom: 1px dashed #cacaca; + .name { + display: flex; + align-items: center; + i { + width: 12px; + height: 12px; + border-radius: 10px; + margin-right: 5px; + } + } + } + } + + /*滚动条整体部分*/ + .deviceMenu::-webkit-scrollbar, + .paramList::-webkit-scrollbar { + width: 5px; + height: 8px; + } + + /*滚动条的轨道*/ + .deviceMenu::-webkit-scrollbar-track, + .paramList::-webkit-scrollbar-track { + background-color: transparent; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; + } + + /*滚动条里面的小方块,能向上向下移动*/ + .deviceMenu::-webkit-scrollbar-thumb, + .paramList::-webkit-scrollbar-thumb { + background-color: rgb(147, 147, 153, 0.5); + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; + } + + .deviceMenu::-webkit-scrollbar-thumb:hover, + .paramList::-webkit-scrollbar-thumb:hover { + background-color: #a8a8a8; + } + + .deviceMenu:-webkit-scrollbar-thumb:active, + .paramList:-webkit-scrollbar-thumb:active { + background-color: #787878; + } + + /*边角,即两个滚动条的交汇处*/ + .deviceMenu::-webkit-scrollbar-corner, + .paramList::-webkit-scrollbar-corner { + background-color: transparent; + } + } + .comparisonInfo { + flex: 1; + margin: 0 15px; + .stackedLine { + width: 100%; + height: calc(100vh - 150px - 30px - 40px - 2px); + line-height: calc(100vh - 150px - 30px - 40px - 2px); + font-size: 1.4rem; + text-align: center; + color: #606266; + } + } + } + } + .echart.echartHide { + :deep(.el-card__body) { + .sidebar { + height: calc(100vh - 78px - 30px - 40px - 2px); + .deviceMenu { + height: calc(100vh - 78px - 30px - 40px - 55px - 4px); + } + } + .comparisonInfo { + .stackedLine { + height: calc(100vh - 78px - 30px - 40px - 2px); + line-height: calc(100vh - 78px - 30px - 40px - 2px); + } + } + } + } + + .copyright { + height: 40px; + line-height: 40px; + text-align: center; + color: #9ca3af; + font-family: Arial; + font-size: 12px; + letter-spacing: 1px; + } +} +/** pc **/ +@media only screen and (min-width: 768px) and (max-width: 1680px) { + .echart { + :deep(.el-card__body) { + .sidebar { + height: calc(100vh - 222px - 30px - 40px - 2px) !important; + .deviceMenu { + height: calc(100vh - 222px - 30px - 40px - 55px - 4px) !important; + } + } + .comparisonInfo { + .stackedLine { + height: calc(100vh - 222px - 30px - 40px - 2px) !important; + line-height: calc(100vh - 222px - 30px - 40px - 2px) !important; + } + } + } + } + .echart.echartHide { + :deep(.el-card__body) { + .sidebar { + height: calc(100vh - 78px - 30px - 40px - 2px) !important; + .deviceMenu { + height: calc(100vh - 78px - 30px - 40px - 55px - 4px) !important; + } + } + .comparisonInfo { + .stackedLine { + height: calc(100vh - 78px - 30px - 40px - 2px) !important; + line-height: calc(100vh - 78px - 30px - 40px - 2px) !important; + } + } + } + } +} diff --git a/src/views/monitoring/graph/index.vue b/src/views/monitoring/graph/index.vue new file mode 100644 index 0000000..20b4f4d --- /dev/null +++ b/src/views/monitoring/graph/index.vue @@ -0,0 +1,1228 @@ + + + diff --git a/src/views/monitoring/station/components/bar - 副本.vue b/src/views/monitoring/station/components/bar - 副本.vue deleted file mode 100644 index 67a40d4..0000000 --- a/src/views/monitoring/station/components/bar - 副本.vue +++ /dev/null @@ -1,162 +0,0 @@ - - - diff --git a/src/views/monitoring/station/components/boxPlot - 副本.vue b/src/views/monitoring/station/components/boxPlot - 副本.vue deleted file mode 100644 index 811fa4e..0000000 --- a/src/views/monitoring/station/components/boxPlot - 副本.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - diff --git a/src/views/monitoring/station/components/table - 副本.vue b/src/views/monitoring/station/components/table - 副本.vue deleted file mode 100644 index c0ad83d..0000000 --- a/src/views/monitoring/station/components/table - 副本.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - diff --git a/src/views/monitoring/station/components/table.vue b/src/views/monitoring/station/components/table.vue index 7223aaa..349cce0 100644 --- a/src/views/monitoring/station/components/table.vue +++ b/src/views/monitoring/station/components/table.vue @@ -119,7 +119,7 @@ const handlePageChange = ({ currentPage, pageSize }) => { tablePage.pageSize = pageSize; sessionStorageIns.setUseStorage("currentPage", currentPage); sessionStorageIns.setUseStorage("pageSize", pageSize); - tableDatas(); + // tableDatas(); }; function tableHeader() { diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index a07e5b7..185327d 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -1,289 +1,408 @@