-
+
今日
-
+
本周
-
+
本月
-
-
+
+
+
+
+
-
+
搜索
@@ -61,14 +74,14 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
@@ -164,7 +173,7 @@
-
+
+
+
@@ -204,48 +216,23 @@
-
@@ -257,10 +244,12 @@
justify-content: space-around;
.top-left-container {
- width: 36%;
+ width: 100%;
+ display: flex;
+ justify-content: space-around;
.base {
- width: 100%;
+ width: 49.5%;
height: 120px;
.base-container {
@@ -384,6 +373,89 @@
width: 49.4%;
height: 255px;
}
+
+ .bench {
+ width: 22%;
+ height: 250px;
+
+ .bench-container {
+ display: flex;
+ justify-content: space-around;
+ flex-wrap: wrap;
+ align-items: center;
+
+ .bench-item {
+ width: 40%;
+ display: flex;
+ height: 40px;
+ margin-top: 15px;
+
+ &:hover {
+ border: 1px solid #ccc;
+ cursor: pointer;
+ box-shadow: 0 0 12px rgb(0 0 0 / 12%);
+ border-radius: 4px;
+ }
+
+ .img {
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+ }
+
+ .value {
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+ text-align: center;
+ width: 60%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+ }
+ }
+ }
+
+ .message {
+ width: 77%;
+ height: 250px;
+
+ .message-container {
+ .message-item {
+ height: 33px;
+ line-height: 33px;
+ display: flex;
+ justify-content: space-between;
+ padding: 0 10px;
+ width: 100%;
+
+ .left {
+ width: 75%;
+ display: flex;
+ align-items: center;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+
+ .content {
+ display: inline-block;
+ padding-left: 10px;
+ width: 65%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+
+ .time {
+ font-size: 16px;
+ color: #7c7777;
+ white-space: nowrap;
+ }
+ }
+ }
+ }
}
.bottom-container {
@@ -396,6 +468,10 @@
width: 49.4%;
height: 255px;
}
+
+ .error {
+ width: 99.5%;
+ }
}
.top {
diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue
index 4b16e06..abdf488 100644
--- a/src/views/home/device/count/components/bottom.vue
+++ b/src/views/home/device/count/components/bottom.vue
@@ -7,7 +7,8 @@
import { getDeviceTypeListPage } from '@/api/home/device/type'
import { getDictByCode } from '@/api/system/dict'
import { getDeptDevice, getOfflineDevice } from '@/api/home/device/count'
-// 设备分类统计数据
+// 管理单位设备统计
+const deptLoading = ref(true)
const xAxisData = ref([])
const data = ref([])
setTimeout(() => {
@@ -27,10 +28,14 @@
}, 1000)
// 获取数据
const fetchData = () => {
+ deptLoading.value = true
getDeptDevice().then((res) => {
+ deptLoading.value = false
// xAxisData.value = res.data.map((item: any) => item.name)
// data
// console.log(res.data, '222222222222222')
+ }).catch(() => {
+ deptLoading.value = false
})
}
fetchData()
@@ -61,6 +66,8 @@
total.value = res.data.total
list.value = res.data.rows
loadingTable.value = false
+ }).catch(() => {
+ loadingTable.value = false
})
}
fetchListData()
@@ -107,7 +114,7 @@
@@ -185,6 +194,9 @@
+
+
-
-
- 【{{ item.alarmTypeName }}】
- {{ item.alarmContent }}
+ 【{{ item.messageTypeDetail }}】
+ {{ item.messageContent }}
- {{ item.alarmTime }}
+ {{ item.ts }}
-
-
-
- 内容1111111111111
-
-
-
-
-
- 内容1111111111111
-
-
-
-
-
-
- 内容1111111111111
-
-
-
-
-
- 内容1111111111111
-
-
+
+
管理单位设备统计
-
+
{
+ runLoading.value = true
getDeviceRun().then((res) => {
res.data.forEach((element: any) => {
const index = runData.value.findIndex((item: any) => item.id === element.name)
@@ -64,7 +67,11 @@
runData.value[index].value = element.value
}
})
+ runLoading.value = false
+ }).catch(() => {
+ runLoading.value = false
})
+ reportLoading.value = true
getDeviceReport().then((res) => {
res.data.forEach((element: any) => {
const index = reportData.value.findIndex((item: any) => item.id === element.name)
@@ -72,6 +79,9 @@
reportData.value[index].value = element.value
}
})
+ reportLoading.value = false
+ }).catch(() => {
+ reportLoading.value = false
})
}
fetchData()
@@ -84,7 +94,7 @@
设备运行情况
-
+
@@ -106,7 +116,7 @@
数据上报情况
-
+
{{ item.name }}
diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts
new file mode 100644
index 0000000..25e1e4a
--- /dev/null
+++ b/src/api/home/dashboard/index.ts
@@ -0,0 +1,35 @@
+/**
+ * 首页接口
+ */
+import request from '@/api/index'
+
+// 基本概况
+export function getBase() {
+ return request({
+ url: '/homePage/apis/overall',
+ method: 'post',
+ })
+}
+
+// 设备运行情况
+export function getDeviceStatus() {
+ return request({
+ url: '/homePage/apis/deviceStatus',
+ method: 'post',
+ })
+}
+// 消息通知
+export function getMessage() {
+ return request({
+ url: '/homePage/apis/note',
+ method: 'post',
+ })
+}
+// 异常位置分析
+export function getErrorAnalyse(data: any) {
+ return request({
+ url: '/homePage/apis/alarmPosition',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue
index a4c32cf..b7da9cc 100644
--- a/src/views/home/alarm/count/components/locationAnalysis.vue
+++ b/src/views/home/alarm/count/components/locationAnalysis.vue
@@ -5,19 +5,41 @@
-->
@@ -25,35 +47,26 @@
diff --git a/src/views/home/dashboard/index.vue b/src/views/home/dashboard/index.vue
index a4b5f57..3d371ae 100644
--- a/src/views/home/dashboard/index.vue
+++ b/src/views/home/dashboard/index.vue
@@ -6,50 +6,60 @@
@@ -143,7 +152,7 @@
-
+
今日
-
+
本周
-
+
本月
-
-
+
+
+
+
+
-
+
搜索
@@ -61,14 +74,14 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
@@ -164,7 +173,7 @@
-
+
+
+
@@ -204,48 +216,23 @@
-
@@ -257,10 +244,12 @@
justify-content: space-around;
.top-left-container {
- width: 36%;
+ width: 100%;
+ display: flex;
+ justify-content: space-around;
.base {
- width: 100%;
+ width: 49.5%;
height: 120px;
.base-container {
@@ -384,6 +373,89 @@
width: 49.4%;
height: 255px;
}
+
+ .bench {
+ width: 22%;
+ height: 250px;
+
+ .bench-container {
+ display: flex;
+ justify-content: space-around;
+ flex-wrap: wrap;
+ align-items: center;
+
+ .bench-item {
+ width: 40%;
+ display: flex;
+ height: 40px;
+ margin-top: 15px;
+
+ &:hover {
+ border: 1px solid #ccc;
+ cursor: pointer;
+ box-shadow: 0 0 12px rgb(0 0 0 / 12%);
+ border-radius: 4px;
+ }
+
+ .img {
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+ }
+
+ .value {
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+ text-align: center;
+ width: 60%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+ }
+ }
+ }
+
+ .message {
+ width: 77%;
+ height: 250px;
+
+ .message-container {
+ .message-item {
+ height: 33px;
+ line-height: 33px;
+ display: flex;
+ justify-content: space-between;
+ padding: 0 10px;
+ width: 100%;
+
+ .left {
+ width: 75%;
+ display: flex;
+ align-items: center;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+
+ .content {
+ display: inline-block;
+ padding-left: 10px;
+ width: 65%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+
+ .time {
+ font-size: 16px;
+ color: #7c7777;
+ white-space: nowrap;
+ }
+ }
+ }
+ }
}
.bottom-container {
@@ -396,6 +468,10 @@
width: 49.4%;
height: 255px;
}
+
+ .error {
+ width: 99.5%;
+ }
}
.top {
diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue
index 4b16e06..abdf488 100644
--- a/src/views/home/device/count/components/bottom.vue
+++ b/src/views/home/device/count/components/bottom.vue
@@ -7,7 +7,8 @@
import { getDeviceTypeListPage } from '@/api/home/device/type'
import { getDictByCode } from '@/api/system/dict'
import { getDeptDevice, getOfflineDevice } from '@/api/home/device/count'
-// 设备分类统计数据
+// 管理单位设备统计
+const deptLoading = ref(true)
const xAxisData = ref([])
const data = ref([])
setTimeout(() => {
@@ -27,10 +28,14 @@
}, 1000)
// 获取数据
const fetchData = () => {
+ deptLoading.value = true
getDeptDevice().then((res) => {
+ deptLoading.value = false
// xAxisData.value = res.data.map((item: any) => item.name)
// data
// console.log(res.data, '222222222222222')
+ }).catch(() => {
+ deptLoading.value = false
})
}
fetchData()
@@ -61,6 +66,8 @@
total.value = res.data.total
list.value = res.data.rows
loadingTable.value = false
+ }).catch(() => {
+ loadingTable.value = false
})
}
fetchListData()
@@ -107,7 +114,7 @@
@@ -185,6 +194,9 @@
+
+
-
-
- 【{{ item.alarmTypeName }}】
- {{ item.alarmContent }}
+ 【{{ item.messageTypeDetail }}】
+ {{ item.messageContent }}
- {{ item.alarmTime }}
+ {{ item.ts }}
-
-
-
- 内容1111111111111
-
-
-
-
-
- 内容1111111111111
-
-
-
-
-
-
- 内容1111111111111
-
-
-
-
-
- 内容1111111111111
-
-
+
+
管理单位设备统计
-
+
{
+ runLoading.value = true
getDeviceRun().then((res) => {
res.data.forEach((element: any) => {
const index = runData.value.findIndex((item: any) => item.id === element.name)
@@ -64,7 +67,11 @@
runData.value[index].value = element.value
}
})
+ runLoading.value = false
+ }).catch(() => {
+ runLoading.value = false
})
+ reportLoading.value = true
getDeviceReport().then((res) => {
res.data.forEach((element: any) => {
const index = reportData.value.findIndex((item: any) => item.id === element.name)
@@ -72,6 +79,9 @@
reportData.value[index].value = element.value
}
})
+ reportLoading.value = false
+ }).catch(() => {
+ reportLoading.value = false
})
}
fetchData()
@@ -84,7 +94,7 @@
设备运行情况
-
+
@@ -106,7 +116,7 @@
数据上报情况
-
+
{{ item.name }}
diff --git a/src/views/home/device/count/components/middle.vue b/src/views/home/device/count/components/middle.vue
index f45a3a3..8967b40 100644
--- a/src/views/home/device/count/components/middle.vue
+++ b/src/views/home/device/count/components/middle.vue
@@ -6,9 +6,11 @@