-
-
离线分析
+
+
+
+
+
+ 离线设备
+ {{ total }}
+ 个
+
+
+
+
+
-
-
- 离线设备
- 12
- 个
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/deviceStatics/components/deviceCountByType.vue b/src/views/deviceStatics/components/deviceCountByType.vue
index 11b3b5e..f062c1f 100644
--- a/src/views/deviceStatics/components/deviceCountByType.vue
+++ b/src/views/deviceStatics/components/deviceCountByType.vue
@@ -1,132 +1,64 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
-
- 设备总数
- 123
- 个
-
-
-
-
-
-
- 低电量设备总数
- 123
- 个
-
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
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/AlarmStaticsByType.vue b/src/views/staticCharts/AlarmStaticsByType.vue
new file mode 100644
index 0000000..930cd91
--- /dev/null
+++ b/src/views/staticCharts/AlarmStaticsByType.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
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: '确定',
diff --git a/src/views/wellManage/detailWell.vue b/src/views/wellManage/detailWell.vue
index 6db57b1..82c3334 100644
--- a/src/views/wellManage/detailWell.vue
+++ b/src/views/wellManage/detailWell.vue
@@ -126,7 +126,6 @@
},
computed: {
areaName() {
- debugger
if (this.wellForm.quName) {
return this.wellForm.quName + this.wellForm.areaName
} else {
diff --git a/src/api/alarm/deviceStatics.js b/src/api/alarm/deviceStatics.js
index 943603d..c375ac5 100644
--- a/src/api/alarm/deviceStatics.js
+++ b/src/api/alarm/deviceStatics.js
@@ -3,24 +3,6 @@
*/
import request from '@/utils/request'
-// 报警情况统计
-export function deviceStaticsByDept(params) {
- return request({
- url: 'statics/alarmStaticsByStatus',
- method: 'get',
- params
- })
-}
-
-// 井下各类报警排名
-export function alarmStaticsByContent(params) {
- return request({
- url: 'statics/alarmStaticsByContent',
- method: 'get',
- params
- })
-}
-
// 报警设备查询
export function getDeviceAlarmList(params) {
return request({
diff --git a/src/api/data/data.js b/src/api/data/data.js
index 9d23a3e..d87e74a 100644
--- a/src/api/data/data.js
+++ b/src/api/data/data.js
@@ -366,3 +366,31 @@
responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob
})
}
+
+// 硫化氢数据查询,不分页
+export function getH2SDataSingle(params) {
+ return request({
+ url: 'h2s/list',
+ method: 'get',
+ params
+ })
+}
+
+// 硫化氢数据查询
+export function getH2SData(params) {
+ return request({
+ url: 'h2s/list-page',
+ method: 'get',
+ params
+ })
+}
+// 批量导出硫化氢数据
+export function batchExportH2SData(params) {
+ return request({
+ url: 'h2s/export',
+ method: 'get',
+ timeout: 120000,
+ params,
+ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob
+ })
+}
diff --git a/src/api/data/dataStatics.js b/src/api/data/dataStatics.js
index d6b7a72..56a1ea4 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,20 @@
})
}
+// 井下各类报警排名
+export function alarmStaticsByContent(params) {
+ return request({
+ url: '/statics/alarmStaticsByContent',
+ method: 'get',
+ params
+ })
+}
+
+// 报警的井排名
+export function alarmWellRank(params) {
+ return request({
+ url: '/statics/alarmWellListPage',
+ method: 'get',
+ params
+ })
+}
diff --git a/src/api/device/device.js b/src/api/device/device.js
index 43b8535..e48db8d 100644
--- a/src/api/device/device.js
+++ b/src/api/device/device.js
@@ -91,3 +91,12 @@
responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob
})
}
+
+// 设备查询
+export function getOfflineDeviceList(params) {
+ return request({
+ url: '/device/offline-list-page',
+ method: 'get',
+ params
+ })
+}
diff --git a/src/api/device/deviceTypeDetail.js b/src/api/device/deviceTypeDetail.js
index c3d1c6f..a45921d 100644
--- a/src/api/device/deviceTypeDetail.js
+++ b/src/api/device/deviceTypeDetail.js
@@ -91,3 +91,11 @@
params
})
}
+// 硫化氢终端查询
+export function H2SdataList(params) {
+ return request({
+ url: 'H2Sdata/listSimple',
+ method: 'get',
+ params
+ })
+}
diff --git a/src/components/BigData/Card/simpleCard.vue b/src/components/BigData/Card/simpleCard.vue
new file mode 100644
index 0000000..320d591
--- /dev/null
+++ b/src/components/BigData/Card/simpleCard.vue
@@ -0,0 +1,48 @@
+
+
+
+ {{ title }}
+ {{ context }}
+ {{ unit }}
+
+
+
+
+
+
+
diff --git a/src/components/BigData/TimeButtons.vue b/src/components/BigData/TimeButtons.vue
new file mode 100644
index 0000000..347bdae
--- /dev/null
+++ b/src/components/BigData/TimeButtons.vue
@@ -0,0 +1,97 @@
+
+
+
+ {{ btn.label }}
+
+
+
+
+
+
+
diff --git a/src/utils/dateutils.js b/src/utils/dateutils.js
index ece1818..ae7ae6d 100644
--- a/src/utils/dateutils.js
+++ b/src/utils/dateutils.js
@@ -20,10 +20,44 @@
ct_month.setTime(ct_month.getTime() - 3600 * 1000 * 24 * 7)
return ct_month
}
-export function getLastMonth() { // 默认显示上个月
- const ct_month = new Date()
- ct_month.setTime(ct_month.getTime() - 3600 * 1000 * 24 * 30)
- return ct_month
+/**
+ * 获取近n天日期
+ * @param n
+ * @returns {Date}
+ */
+export function getRecentDay(n = 3) {
+ const datenow = new Date()
+ datenow.setDate(datenow.getDate() - n) // 获取n天前的日期
+ return datenow
+}
+
+/**
+ * 获取近n月日期
+ * @param n
+ * @returns {Date}
+ */
+export function getRecentMonthDate(n = 3) {
+ const datenow = new Date()
+ datenow.setMonth(datenow.getMonth() - n)
+ return datenow
+}
+/**
+ * 获取上个月
+ * @returns {Date}
+ */
+export function getLastMonth() {
+ const nowdays = new Date()
+ let year = nowdays.getFullYear()
+ let month = nowdays.getMonth()
+ if (month === 0) {
+ month = 12
+ year = year - 1
+ }
+ if (month < 10) {
+ month = '0' + month
+ }
+ const date = nowdays.getDate()
+ return new Date(year, month, date)
}
export function formatDate(date, fmt) {
@@ -55,12 +89,55 @@
}
/**
- * 获取上周日志范围
+ * 获取近1周日期范围
* @returns {*[]}
*/
-export function getSearchLastWeekTime() { // 默认7天内
+export function getSearchLastWeekTime() {
const startTime = getLastWeek().Format('yyyy-MM-dd hh:mm:ss')
const endTime = getToday('yyyy-MM-dd hh:mm:ss')
return [startTime, endTime]
}
+/**
+ * 获取近1月日期范围
+ * @returns {*[]}
+ */
+export function getSearchLastMonthTime() {
+ const today = new Date()
+ const startTime = getRecentMonthDate(1).Format('yyyy-MM-dd hh:mm:ss')
+ const endTime = getToday('yyyy-MM-dd hh:mm:ss')
+ return [startTime, endTime]
+}
+/**
+ * 获取近3月日期范围
+ * @returns {*[]}
+ */
+export function getSearch3MonthTime() {
+ const datenow = new Date()
+ datenow.setMonth(datenow.getMonth() - 3)
+ const startTime = datenow.Format('yyyy-MM-dd hh:mm:ss')
+ const endTime = getToday('yyyy-MM-dd hh:mm:ss')
+ return [startTime, endTime]
+}
+/**
+ * 获取近3月日期范围
+ * @returns {*[]}
+ */
+export function getSearch6MonthTime() {
+ const datenow = new Date()
+ datenow.setMonth(datenow.getMonth() - 6)
+ const startTime = datenow.Format('yyyy-MM-dd hh:mm:ss')
+ const endTime = getToday('yyyy-MM-dd hh:mm:ss')
+ return [startTime, endTime]
+}
+/**
+ * 获取近1年日期范围
+ * @returns {*[]}
+ */
+export function getSearch1YearTime() {
+ const datenow = new Date()
+ datenow.setFullYear(datenow.getFullYear() - 1)
+ const startTime = datenow.Format('yyyy-MM-dd hh:mm:ss')
+ const endTime = getToday('yyyy-MM-dd hh:mm:ss')
+ return [startTime, endTime]
+}
diff --git a/src/views/alarmStatics/alarmStatics.vue b/src/views/alarmStatics/alarmStatics.vue
index da6c393..baf8cba 100644
--- a/src/views/alarmStatics/alarmStatics.vue
+++ b/src/views/alarmStatics/alarmStatics.vue
@@ -1,35 +1,56 @@
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
-
-
-
+
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/alarmStaticsByContent.vue b/src/views/alarmStatics/components/alarmStaticsByContent.vue
new file mode 100644
index 0000000..e539087
--- /dev/null
+++ b/src/views/alarmStatics/components/alarmStaticsByContent.vue
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/alarmStatics/components/alarmStaticsByDept.vue b/src/views/alarmStatics/components/alarmStaticsByDept.vue
index 8279df6..d8b1ff7 100644
--- a/src/views/alarmStatics/components/alarmStaticsByDept.vue
+++ b/src/views/alarmStatics/components/alarmStaticsByDept.vue
@@ -1,78 +1,47 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
+
-
-
diff --git a/src/views/alarmStatics/components/alarmWellRank.vue b/src/views/alarmStatics/components/alarmWellRank.vue
new file mode 100644
index 0000000..dd4953c
--- /dev/null
+++ b/src/views/alarmStatics/components/alarmWellRank.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/dashboard/components/AlarmByDays.vue b/src/views/dashboard/components/AlarmByDays.vue
index 6b839d3..bd8228e 100644
--- a/src/views/dashboard/components/AlarmByDays.vue
+++ b/src/views/dashboard/components/AlarmByDays.vue
@@ -1,5 +1,5 @@
-
+
+
+
diff --git a/src/views/dataManage/deviceData/listHarmfulData.vue b/src/views/dataManage/deviceData/listHarmfulData.vue
index c29cb2e..92702af 100644
--- a/src/views/dataManage/deviceData/listHarmfulData.vue
+++ b/src/views/dataManage/deviceData/listHarmfulData.vue
@@ -95,7 +95,7 @@
{ text: 'CH4浓度(%VOL)', value: 'CH4', align: 'center' },
{ text: 'H2S浓度(ppm)', value: 'H2S', align: 'center' },
{ text: 'O2浓度(ppm)', value: 'O2', align: 'center' },
- { text: '液位开关', value: 'switch', align: 'center' },
+ { text: '液位开关', value: 'liquidSwitch', align: 'center' },
// {
// text: '状态描述',
// value: 'descn',
diff --git a/src/views/dataManage/deviceData/listHydrantData.vue b/src/views/dataManage/deviceData/listHydrantData.vue
index f968760..a69f185 100644
--- a/src/views/dataManage/deviceData/listHydrantData.vue
+++ b/src/views/dataManage/deviceData/listHydrantData.vue
@@ -111,6 +111,8 @@
if (params && params.deviceType === this.type && params.devcode) {
this.listQuery.keywords = params.devcode
this.fetchData()
+ } else {
+ this.fetchData()
}
}
},
@@ -130,7 +132,7 @@
// 全屏加载动画
const loading = this.$loading({
lock: true,
- text: '数据处理中,请稍后...',
+ text: '下载中,请稍后...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
diff --git a/src/views/dataView/components/alarmAnalysis.vue b/src/views/dataView/components/alarmAnalysis.vue
new file mode 100644
index 0000000..baf803a
--- /dev/null
+++ b/src/views/dataView/components/alarmAnalysis.vue
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/dataView/components/alarmView.vue b/src/views/dataView/components/alarmView.vue
deleted file mode 100644
index e13f811..0000000
--- a/src/views/dataView/components/alarmView.vue
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/dataView/components/deviceCountView.vue b/src/views/dataView/components/deviceCountView.vue
index b657e8d..1f1f3ab 100644
--- a/src/views/dataView/components/deviceCountView.vue
+++ b/src/views/dataView/components/deviceCountView.vue
@@ -1,36 +1,24 @@
-
+
diff --git a/src/views/deviceManage/components/listDigData.vue b/src/views/deviceManage/components/listDigData.vue
index 7fb41b9..1467b49 100644
--- a/src/views/deviceManage/components/listDigData.vue
+++ b/src/views/deviceManage/components/listDigData.vue
@@ -1,123 +1,142 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/deviceManage/components/listGasData.vue b/src/views/deviceManage/components/listGasData.vue
index 6e2afc3..0cdbb7d 100644
--- a/src/views/deviceManage/components/listGasData.vue
+++ b/src/views/deviceManage/components/listGasData.vue
@@ -1,102 +1,94 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/deviceManage/components/listH2SData.vue b/src/views/deviceManage/components/listH2SData.vue
new file mode 100644
index 0000000..c02db0a
--- /dev/null
+++ b/src/views/deviceManage/components/listH2SData.vue
@@ -0,0 +1,155 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/deviceManage/components/listHarmfulData.vue b/src/views/deviceManage/components/listHarmfulData.vue
index 540e216..b726952 100644
--- a/src/views/deviceManage/components/listHarmfulData.vue
+++ b/src/views/deviceManage/components/listHarmfulData.vue
@@ -1,118 +1,98 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/deviceManage/components/listHydrantData.vue b/src/views/deviceManage/components/listHydrantData.vue
index 3525c1d..8ba6cee 100644
--- a/src/views/deviceManage/components/listHydrantData.vue
+++ b/src/views/deviceManage/components/listHydrantData.vue
@@ -1,139 +1,142 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/views/deviceManage/components/listLiquidData.vue b/src/views/deviceManage/components/listLiquidData.vue
index c821bd7..3b77db0 100644
--- a/src/views/deviceManage/components/listLiquidData.vue
+++ b/src/views/deviceManage/components/listLiquidData.vue
@@ -1,102 +1,94 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/deviceManage/components/listLiquidGasData.vue b/src/views/deviceManage/components/listLiquidGasData.vue
index 8902be4..178d9f1 100644
--- a/src/views/deviceManage/components/listLiquidGasData.vue
+++ b/src/views/deviceManage/components/listLiquidGasData.vue
@@ -1,215 +1,203 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+