-
-
离线分析
+
+
+
+
+
+ 离线设备
+ {{ total }}
+ 个
+
+
+
+
+
-
-
- 离线设备
- 12
- 个
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/deviceStatics/components/deviceCountByType.vue b/src/views/deviceStatics/components/deviceCountByType.vue
index 11b3b5e..7564d6e 100644
--- a/src/views/deviceStatics/components/deviceCountByType.vue
+++ b/src/views/deviceStatics/components/deviceCountByType.vue
@@ -1,132 +1,82 @@
-
-
-
-
-
+
+
+
+
+
+
+ 设备总数
+ {{ allDevice }}
+ 个
+
+
-
-
-
-
- 设备总数
- 123
- 个
-
-
-
-
-
-
- 低电量设备总数
- 123
- 个
-
-
-
+
+
+
+ 低电量设备总数
+ {{ lowPowerDevice }}
+ 个
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/src/views/deviceStatics/components/listdeviceOffline.vue b/src/views/deviceStatics/components/listdeviceOffline.vue
deleted file mode 100644
index 8ea7861..0000000
--- a/src/views/deviceStatics/components/listdeviceOffline.vue
+++ /dev/null
@@ -1,219 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
-
-
-
-
- 导出
-
-
-
-
-
-
-
- {{ scope.row[column.value] }}
-
-
-
-
-
- 详情
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/deviceStatics/deviceStatics.vue b/src/views/deviceStatics/deviceStatics.vue
index 2071584..db612b6 100644
--- a/src/views/deviceStatics/deviceStatics.vue
+++ b/src/views/deviceStatics/deviceStatics.vue
@@ -1,12 +1,15 @@
+
@@ -15,14 +18,36 @@
import deviceCountByType from './components/deviceCountByType'
import deviceCountByDept from './components/deviceCountByDept'
import deviceCountByOffline from './components/deviceCountByOffline'
-import listDeviceOffline from './components/listdeviceOffline'
+import { getDeviceType } from '@/api/device/device'
export default {
name: 'DeviceStatics',
components: {
deviceCountByType,
deviceCountByDept,
- deviceCountByOffline,
- listDeviceOffline
+ deviceCountByOffline
+ },
+ data() {
+ return {
+ deviceTypeList: [] // 设备类型列表
+ }
+ },
+ created() {
+ this.fetchDeviceType()
+ },
+ methods: {
+ // 获取设备类型
+ fetchDeviceType() {
+ getDeviceType(this.listQuery).then(response => {
+ this.deviceTypeList = []
+ // 过滤掉该单位不支持的设备类型
+ const deviceTypes = this.$store.getters.deviceTypes
+ for (const deviceType of response.data) {
+ if (deviceTypes.indexOf(deviceType.value) !== -1) {
+ this.deviceTypeList.push(deviceType)
+ }
+ }
+ })
+ }
}
}
@@ -36,7 +61,8 @@
width: 40%;
}
.ChartBoxRight{
- width: 60%;
+ flex:1;
+ margin-left: 10px;
}
diff --git a/src/views/staticCharts/DeviceCountByDeptBar.vue b/src/views/staticCharts/DeviceCountByDeptBar.vue
new file mode 100644
index 0000000..dd99ba4
--- /dev/null
+++ b/src/views/staticCharts/DeviceCountByDeptBar.vue
@@ -0,0 +1,94 @@
+
+
+
+
+
+
diff --git a/src/views/staticCharts/DeviceCountByOnlinePie.vue b/src/views/staticCharts/DeviceCountByOnlinePie.vue
new file mode 100644
index 0000000..2500a97
--- /dev/null
+++ b/src/views/staticCharts/DeviceCountByOnlinePie.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
diff --git a/src/views/staticCharts/DeviceCountByTypeBar.vue b/src/views/staticCharts/DeviceCountByTypeBar.vue
new file mode 100644
index 0000000..27f4e9f
--- /dev/null
+++ b/src/views/staticCharts/DeviceCountByTypeBar.vue
@@ -0,0 +1,72 @@
+
+
+
+
+
+
diff --git a/src/views/staticCharts/DeviceOfflineByTypeBar.vue b/src/views/staticCharts/DeviceOfflineByTypeBar.vue
new file mode 100644
index 0000000..7916461
--- /dev/null
+++ b/src/views/staticCharts/DeviceOfflineByTypeBar.vue
@@ -0,0 +1,76 @@
+
+
+
+
+
+
diff --git a/src/api/alarm/deviceStatics.js b/src/api/alarm/deviceStatics.js
index 943603d..7afcd4f 100644
--- a/src/api/alarm/deviceStatics.js
+++ b/src/api/alarm/deviceStatics.js
@@ -12,15 +12,6 @@
})
}
-// 井下各类报警排名
-export function alarmStaticsByContent(params) {
- return request({
- url: 'statics/alarmStaticsByContent',
- method: 'get',
- params
- })
-}
-
// 报警设备查询
export function getDeviceAlarmList(params) {
return request({
diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js
index d6b7a72..bbe9263 100644
--- a/src/api/data/dataStatics.js
+++ b/src/api/data/dataStatics.js
@@ -46,6 +46,15 @@
})
}
+// 根据设备类型统计设备数量
+export function deviceOfflineByType(params) {
+ return request({
+ url: '/statics/deviceStaticsByStatusAndType',
+ method: 'get',
+ params
+ })
+}
+
// 离线设备数量
export function deviceStaticsByOnline(params) {
return request({
@@ -126,3 +135,11 @@
})
}
+// 井下各类报警排名
+export function alarmStaticsByContent(params) {
+ return request({
+ url: '/statics/alarmStaticsByContent',
+ method: 'get',
+ params
+ })
+}
diff --git a/src/api/device/device.js b/src/api/device/device.js
index ca7d72b..131110c 100644
--- a/src/api/device/device.js
+++ b/src/api/device/device.js
@@ -83,3 +83,12 @@
responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob
})
}
+
+// 设备查询
+export function getOfflineDeviceList(params) {
+ return request({
+ url: '/device/offline-list-page',
+ method: 'get',
+ params
+ })
+}
diff --git a/src/views/alarmStatics/alarmStatics.vue b/src/views/alarmStatics/alarmStatics.vue
index da6c393..22c8798 100644
--- a/src/views/alarmStatics/alarmStatics.vue
+++ b/src/views/alarmStatics/alarmStatics.vue
@@ -7,14 +7,10 @@
-
-
-
+
-
-
-
+
diff --git a/src/views/alarmStatics/components/alarmHistoryByType.vue b/src/views/alarmStatics/components/alarmHistoryByType.vue
index 7e137ea..4f1b656 100644
--- a/src/views/alarmStatics/components/alarmHistoryByType.vue
+++ b/src/views/alarmStatics/components/alarmHistoryByType.vue
@@ -1,124 +1,63 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row[column.value] }}
-
-
-
-
-
- 详情
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 详情
+
-
-
-
-
-
-
+
+
+
+
+
diff --git a/src/views/alarmStatics/components/alarmStaticsByDept.vue b/src/views/alarmStatics/components/alarmStaticsByDept.vue
index 8279df6..20ecd02 100644
--- a/src/views/alarmStatics/components/alarmStaticsByDept.vue
+++ b/src/views/alarmStatics/components/alarmStaticsByDept.vue
@@ -1,43 +1,35 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/src/views/deviceStatics/components/deviceCountByOffline.vue b/src/views/deviceStatics/components/deviceCountByOffline.vue
index ba81bec..bc03334 100644
--- a/src/views/deviceStatics/components/deviceCountByOffline.vue
+++ b/src/views/deviceStatics/components/deviceCountByOffline.vue
@@ -1,49 +1,79 @@
-
-
-
-
-
-
-
离线分析
+
+
+
+
+
+ 离线设备
+ {{ total }}
+ 个
+
+
+
+
+
-
-
- 离线设备
- 12
- 个
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/deviceStatics/components/deviceCountByType.vue b/src/views/deviceStatics/components/deviceCountByType.vue
index 11b3b5e..7564d6e 100644
--- a/src/views/deviceStatics/components/deviceCountByType.vue
+++ b/src/views/deviceStatics/components/deviceCountByType.vue
@@ -1,132 +1,82 @@
-
-
-
-
-
+
+
+
+
+
+
+ 设备总数
+ {{ allDevice }}
+ 个
+
+
-
-
-
-
- 设备总数
- 123
- 个
-
-
-
-
-
-
- 低电量设备总数
- 123
- 个
-
-
-
+
+
+
+ 低电量设备总数
+ {{ lowPowerDevice }}
+ 个
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/src/views/deviceStatics/components/listdeviceOffline.vue b/src/views/deviceStatics/components/listdeviceOffline.vue
deleted file mode 100644
index 8ea7861..0000000
--- a/src/views/deviceStatics/components/listdeviceOffline.vue
+++ /dev/null
@@ -1,219 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
-
-
-
-
- 导出
-
-
-
-
-
-
-
- {{ scope.row[column.value] }}
-
-
-
-
-
- 详情
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/deviceStatics/deviceStatics.vue b/src/views/deviceStatics/deviceStatics.vue
index 2071584..db612b6 100644
--- a/src/views/deviceStatics/deviceStatics.vue
+++ b/src/views/deviceStatics/deviceStatics.vue
@@ -1,12 +1,15 @@
+
@@ -15,14 +18,36 @@
import deviceCountByType from './components/deviceCountByType'
import deviceCountByDept from './components/deviceCountByDept'
import deviceCountByOffline from './components/deviceCountByOffline'
-import listDeviceOffline from './components/listdeviceOffline'
+import { getDeviceType } from '@/api/device/device'
export default {
name: 'DeviceStatics',
components: {
deviceCountByType,
deviceCountByDept,
- deviceCountByOffline,
- listDeviceOffline
+ deviceCountByOffline
+ },
+ data() {
+ return {
+ deviceTypeList: [] // 设备类型列表
+ }
+ },
+ created() {
+ this.fetchDeviceType()
+ },
+ methods: {
+ // 获取设备类型
+ fetchDeviceType() {
+ getDeviceType(this.listQuery).then(response => {
+ this.deviceTypeList = []
+ // 过滤掉该单位不支持的设备类型
+ const deviceTypes = this.$store.getters.deviceTypes
+ for (const deviceType of response.data) {
+ if (deviceTypes.indexOf(deviceType.value) !== -1) {
+ this.deviceTypeList.push(deviceType)
+ }
+ }
+ })
+ }
}
}
@@ -36,7 +61,8 @@
width: 40%;
}
.ChartBoxRight{
- width: 60%;
+ flex:1;
+ margin-left: 10px;
}
diff --git a/src/views/staticCharts/DeviceCountByDeptBar.vue b/src/views/staticCharts/DeviceCountByDeptBar.vue
new file mode 100644
index 0000000..dd99ba4
--- /dev/null
+++ b/src/views/staticCharts/DeviceCountByDeptBar.vue
@@ -0,0 +1,94 @@
+
+
+
+
+
+
diff --git a/src/views/staticCharts/DeviceCountByOnlinePie.vue b/src/views/staticCharts/DeviceCountByOnlinePie.vue
new file mode 100644
index 0000000..2500a97
--- /dev/null
+++ b/src/views/staticCharts/DeviceCountByOnlinePie.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
diff --git a/src/views/staticCharts/DeviceCountByTypeBar.vue b/src/views/staticCharts/DeviceCountByTypeBar.vue
new file mode 100644
index 0000000..27f4e9f
--- /dev/null
+++ b/src/views/staticCharts/DeviceCountByTypeBar.vue
@@ -0,0 +1,72 @@
+
+
+
+
+
+
diff --git a/src/views/staticCharts/DeviceOfflineByTypeBar.vue b/src/views/staticCharts/DeviceOfflineByTypeBar.vue
new file mode 100644
index 0000000..7916461
--- /dev/null
+++ b/src/views/staticCharts/DeviceOfflineByTypeBar.vue
@@ -0,0 +1,76 @@
+
+
+
+
+
+
diff --git a/src/views/system/dept/listDept.vue b/src/views/system/dept/listDept.vue
index 7856f61..6be2015 100644
--- a/src/views/system/dept/listDept.vue
+++ b/src/views/system/dept/listDept.vue
@@ -88,7 +88,7 @@
// 删除
del(row) {
this.$confirm(
- '确定要删除' + row.simplename + '吗?',
+ '确定要删除' + row.simpleName + '吗?',
'确认删除',
{
confirmButtonText: '确定',