diff --git a/src/api/home-high-formwork.js b/src/api/home-high-formwork.js new file mode 100644 index 0000000..8e95180 --- /dev/null +++ b/src/api/home-high-formwork.js @@ -0,0 +1,33 @@ +import request from '@/utils/request' + +// 高支模监测 ---- 设备列表接口 左一 +export function getModelListAPI(data) { + return request({ + url: '/smart-site/screen/devModel/getModelList', + method: 'post', + data, + }) +} +// 高支模监测 ---- 获取高支模分组 +export function getModeGroupAPI() { + return request({ + url: '/smart-site/screen/devModel/getModeGroup', + method: 'post', + }) +} +// 高支模监测 ---- 设备统计接口 右二 +export function getDevStatisticsAPI(data) { + return request({ + url: '/smart-site/screen/devModel/getDevStatistics', + method: 'post', + data, + }) +} +// 高支模监测 ---- 报警信息接口 右三 +export function getWarnInfoAPI(data) { + return request({ + url: '/smart-site/screen/devModel/getWarnInfo', + method: 'post', + data, + }) +} diff --git a/src/api/project-overview.js b/src/api/project-overview.js new file mode 100644 index 0000000..bbaa004 --- /dev/null +++ b/src/api/project-overview.js @@ -0,0 +1,23 @@ +import request from '@/utils/request' + +// 项目全览 ---- 环境监测接口 右一 +export function getEnvironmentalDetectionAPI() { + return request({ + url: '/smart-site/projectOverview/environmentalDetection', + method: 'get', + }) +} +// 项目全览 ---- 感知设备接口 右二 +export function getTtSysUserCheckListAPI() { + return request({ + url: '/smart-site/projectOverview/getTtSysUserCheckList', + method: 'get', + }) +} +// 项目全览 ---- 报警信息接口 右三 +export function getDeviceAlarmListAPI() { + return request({ + url: '/smart-site/projectOverview/deviceAlarmList', + method: 'get', + }) +} diff --git a/src/components/EmptyModel/index.vue b/src/components/EmptyModel/index.vue new file mode 100644 index 0000000..dc1a8fa --- /dev/null +++ b/src/components/EmptyModel/index.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/src/utils/request.js b/src/utils/request.js index 4895a2d..126c6d8 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -97,7 +97,8 @@ service.interceptors.response.use( // 未设置状态码则默认成功状态 const code = res.data.code || 200 // 获取错误信息 - const msg = errorCode[code] || res.data.msg || errorCode['default'] + const msg = + errorCode[code] || res.data.msg || res.msg || errorCode['default'] // 二进制数据则直接返回 if ( res.request.responseType === 'blob' || diff --git a/src/views/home-high-formwork/components/left-one-model.vue b/src/views/home-high-formwork/components/left-one-model.vue index 1caef77..7a62195 100644 --- a/src/views/home-high-formwork/components/left-one-model.vue +++ b/src/views/home-high-formwork/components/left-one-model.vue @@ -2,28 +2,38 @@
-
-
- - - {{ item.name }} - - - {{ item.code }} - +
+
+
+ + + {{ item.devName }} + + + {{ item.devCode }} + +
+ +
+ +
@@ -36,19 +46,43 @@ @@ -62,7 +96,50 @@ export default { font-size: 12px; transform: translateY(10px); + // .device-item { + // display: flex; + // flex-direction: column; + // align-items: center; + // justify-content: center; + + // img { + // width: 30px; + // height: 30px; + // } + // } + + .scroll-container { + flex: 1; // 占据剩余空间 + overflow-y: auto; // 垂直滚动 + scrollbar-width: thin; // Firefox滚动条样式 + scrollbar-color: rgba(255, 255, 255, 0.3) transparent; // Firefox滚动条颜色 + z-index: 9; + padding: 0 12px; + display: flex; + align-items: flex-start; + flex-wrap: wrap; + color: #fff; + font-size: 12px; + + /* Webkit浏览器滚动条样式 */ + &::-webkit-scrollbar { + width: 6px; + } + &::-webkit-scrollbar-thumb { + background: rgba(255, 255, 255, 0.3); + border-radius: 3px; + } + &::-webkit-scrollbar-track { + background: transparent; + } + } + + // transform: translateY(10px); + .device-item { + width: calc((100% - 20px) / 4); + margin-right: 4px; + margin-bottom: 8px; display: flex; flex-direction: column; align-items: center; @@ -73,6 +150,10 @@ export default { height: 30px; } } + + & .device-item:nth-child(6n) { + margin-right: 0; + } } .case { diff --git a/src/views/home-high-formwork/components/right-one-model.vue b/src/views/home-high-formwork/components/right-one-model.vue index 1133dc8..94023fd 100644 --- a/src/views/home-high-formwork/components/right-one-model.vue +++ b/src/views/home-high-formwork/components/right-one-model.vue @@ -10,7 +10,7 @@ />
设备总数 - 9999 + {{ allNum || 0 }}
@@ -20,7 +20,7 @@ />
设备在线率 - 50% + {{ onLineRate || 0 }}%
@@ -30,10 +30,47 @@ diff --git a/src/views/home-high-formwork/components/right-three-model.vue b/src/views/home-high-formwork/components/right-three-model.vue new file mode 100644 index 0000000..23ed843 --- /dev/null +++ b/src/views/home-high-formwork/components/right-three-model.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/src/views/home-high-formwork/components/right-two-model.vue b/src/views/home-high-formwork/components/right-two-model.vue index b10f9a7..eab3a79 100644 --- a/src/views/home-high-formwork/components/right-two-model.vue +++ b/src/views/home-high-formwork/components/right-two-model.vue @@ -11,257 +11,20 @@ @@ -308,4 +107,28 @@ export default { align-items: center; justify-content: center; } + +::v-deep .colorBlue { + color: #6aaef3 !important; + font-size: 14px !important; +} + +::v-deep.colorRed { + color: #ff5534; + font-size: 12px !important; +} + +::v-deep .time-box { + font-family: 'DS-TITle'; + display: block; + flex: 1; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +::v-deep .dv-scroll-board .rows .ceil { + width: auto !important; + min-width: 80px; /* 最小宽度 */ +} diff --git a/src/views/home-high-formwork/index.vue b/src/views/home-high-formwork/index.vue index 521cb80..f12e02d 100644 --- a/src/views/home-high-formwork/index.vue +++ b/src/views/home-high-formwork/index.vue @@ -2,13 +2,13 @@
- +
- +
@@ -17,11 +17,14 @@
- +
+
+ +
@@ -35,6 +38,7 @@ import CenterThreeModel from './components/center-three-model.vue' // 中3 import RightOneModel from './components/right-one-model.vue' // 右1 import RightTwoModel from './components/right-two-model.vue' // 右2 +import RightThreeModel from './components/right-three-model.vue' // 右2 export default { components: { LeftOneModel, @@ -44,6 +48,17 @@ export default { CenterThreeModel, RightOneModel, RightTwoModel, + RightThreeModel, + }, + data() { + return { + queryId: null, + } + }, + methods: { + handleQueryById(id) { + this.queryId = id + }, }, } @@ -69,7 +84,7 @@ export default { } .env-3 { grid-column: 9 / 12; - grid-row: 1 / 4; + grid-row: 1 / 5; } .env-4 { grid-column: 1 / 4; @@ -81,11 +96,15 @@ export default { } .env-6 { grid-column: 9 / 12; - grid-row: 4 / 13; + grid-row: 5 / 8; } .env-7 { grid-column: 4 / 9; grid-row: 9/ 13; } + .env-8 { + grid-column: 9 / 12; + grid-row: 8/ 13; + } } diff --git a/src/views/home-overview/components/right-one-model.vue b/src/views/home-overview/components/right-one-model.vue index a55a459..29decca 100644 --- a/src/views/home-overview/components/right-one-model.vue +++ b/src/views/home-overview/components/right-one-model.vue @@ -13,8 +13,8 @@
- 50 - % + {{ item.count }} + {{ item.unit }}
{{ item.title }} @@ -28,6 +28,7 @@ @@ -104,6 +134,7 @@ export default { .count { margin: 14px 0 6px 0; + font-family: 'DS-TITle'; & span:first-child { font-size: 18px; font-weight: bold; diff --git a/src/views/home-overview/components/right-three-model.vue b/src/views/home-overview/components/right-three-model.vue index a017b49..ddcf413 100644 --- a/src/views/home-overview/components/right-three-model.vue +++ b/src/views/home-overview/components/right-three-model.vue @@ -11,77 +11,57 @@ @@ -116,4 +96,28 @@ export default { align-items: center; justify-content: center; } + +::v-deep .colorBlue { + color: #6aaef3 !important; + font-size: 14px !important; +} + +::v-deep.colorRed { + color: #ff5534; + font-size: 12px !important; +} + +::v-deep .time-box { + font-family: 'DS-TITle'; + display: block; + flex: 1; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +::v-deep .dv-scroll-board .rows .ceil { + width: auto !important; + min-width: 80px; /* 最小宽度 */ +} diff --git a/src/views/home-overview/components/right-two-model.vue b/src/views/home-overview/components/right-two-model.vue index b51dec6..f5f7610 100644 --- a/src/views/home-overview/components/right-two-model.vue +++ b/src/views/home-overview/components/right-two-model.vue @@ -5,24 +5,27 @@
感知设备总数
-
999
+
{{ totalQuantity }}
-
感知设备总数
-
999
+
设备总在线数
+
{{ onlineQuantity }}
-
感知设备总数
-
999
+
设备异常总数
+
{{ totalExceptionCount }}
-
感知设备总数
-
999
+
设备报警次数
+
{{ deviceAlarms }}
设备在线率
-
99%
+
+ {{ deviceOnLineRatio }} + % +
@@ -32,8 +35,69 @@ @@ -66,6 +130,7 @@ export default { margin-top: 6px; font-size: 18px; font-weight: bold; + font-family: 'DS-TITle'; } } diff --git a/vue.config.js b/vue.config.js index 1edf2ae..3925de4 100644 --- a/vue.config.js +++ b/vue.config.js @@ -24,7 +24,7 @@ module.exports = { open: true, proxy: { [process.env.VUE_APP_BASE_API]: { - target: 'http://192.168.0.60:38080', + target: 'http://192.168.0.60:38080', // 赵福海 changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '',