diff --git a/src/api/home/operation/alarm.ts b/src/api/home/operation/alarm.ts
new file mode 100644
index 0000000..2723ec8
--- /dev/null
+++ b/src/api/home/operation/alarm.ts
@@ -0,0 +1,41 @@
+/**
+ * 设备当前报警
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getDeviceCurrentListPage(data: any) {
+ return request({
+ url: `/maintenance/alarmRecords/listPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+// 查看
+export function deviceAlarmView(id: any) {
+ return request({
+ url: '/maintenance/alarmRecords/deviceAlarmView',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
+// 挂起
+export function pendingDeviceAlarm(data: any) {
+ return request({
+ url: '/maintenance/alarmRecords/suspend',
+ method: 'post',
+ data,
+ })
+}
+// 批量删除
+export function batchRemoveRow(ids: any) {
+ return request({
+ url: '/maintenance/alarmRecords/batchDelete',
+ method: 'post',
+ data: {
+ ids,
+ },
+ })
+}
diff --git a/src/api/home/operation/alarm.ts b/src/api/home/operation/alarm.ts
new file mode 100644
index 0000000..2723ec8
--- /dev/null
+++ b/src/api/home/operation/alarm.ts
@@ -0,0 +1,41 @@
+/**
+ * 设备当前报警
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getDeviceCurrentListPage(data: any) {
+ return request({
+ url: `/maintenance/alarmRecords/listPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+// 查看
+export function deviceAlarmView(id: any) {
+ return request({
+ url: '/maintenance/alarmRecords/deviceAlarmView',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
+// 挂起
+export function pendingDeviceAlarm(data: any) {
+ return request({
+ url: '/maintenance/alarmRecords/suspend',
+ method: 'post',
+ data,
+ })
+}
+// 批量删除
+export function batchRemoveRow(ids: any) {
+ return request({
+ url: '/maintenance/alarmRecords/batchDelete',
+ method: 'post',
+ data: {
+ ids,
+ },
+ })
+}
diff --git a/src/api/home/operation/history.ts b/src/api/home/operation/history.ts
new file mode 100644
index 0000000..a26ad3f
--- /dev/null
+++ b/src/api/home/operation/history.ts
@@ -0,0 +1,14 @@
+/**
+ * 设备历史报警
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getDeviceHistoryListPage(data: any) {
+ return request({
+ url: `/maintenance/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/home/operation/alarm.ts b/src/api/home/operation/alarm.ts
new file mode 100644
index 0000000..2723ec8
--- /dev/null
+++ b/src/api/home/operation/alarm.ts
@@ -0,0 +1,41 @@
+/**
+ * 设备当前报警
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getDeviceCurrentListPage(data: any) {
+ return request({
+ url: `/maintenance/alarmRecords/listPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+// 查看
+export function deviceAlarmView(id: any) {
+ return request({
+ url: '/maintenance/alarmRecords/deviceAlarmView',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
+// 挂起
+export function pendingDeviceAlarm(data: any) {
+ return request({
+ url: '/maintenance/alarmRecords/suspend',
+ method: 'post',
+ data,
+ })
+}
+// 批量删除
+export function batchRemoveRow(ids: any) {
+ return request({
+ url: '/maintenance/alarmRecords/batchDelete',
+ method: 'post',
+ data: {
+ ids,
+ },
+ })
+}
diff --git a/src/api/home/operation/history.ts b/src/api/home/operation/history.ts
new file mode 100644
index 0000000..a26ad3f
--- /dev/null
+++ b/src/api/home/operation/history.ts
@@ -0,0 +1,14 @@
+/**
+ * 设备历史报警
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getDeviceHistoryListPage(data: any) {
+ return request({
+ url: `/maintenance/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index ed722fb..6f58857 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -355,6 +355,19 @@
},
},
{
+ path: 'alarm/detail',
+ component: () => import('@/views/home/operation/alarm/components/detail.vue'),
+ name: 'operationAlarmDetail',
+ meta: {
+ title: '设备报警详情',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/operation/alarm',
+ auth: '/operation/alarm',
+ },
+ },
+ {
path: 'history',
component: () => import('@/views/home/operation/history/index.vue'),
name: 'operationHistory',
@@ -368,6 +381,19 @@
},
},
{
+ path: 'history/detail',
+ component: () => import('@/views/home/operation/alarm/components/detail.vue'),
+ name: 'operationHistoryDetail',
+ meta: {
+ title: '历史设备报警',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/operation/history',
+ auth: '/operation/history',
+ },
+ },
+ {
path: 'trajectory',
component: () => import('@/views/home/operation/trajectory/index.vue'),
name: 'operationTrajectory',
diff --git a/src/api/home/operation/alarm.ts b/src/api/home/operation/alarm.ts
new file mode 100644
index 0000000..2723ec8
--- /dev/null
+++ b/src/api/home/operation/alarm.ts
@@ -0,0 +1,41 @@
+/**
+ * 设备当前报警
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getDeviceCurrentListPage(data: any) {
+ return request({
+ url: `/maintenance/alarmRecords/listPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+// 查看
+export function deviceAlarmView(id: any) {
+ return request({
+ url: '/maintenance/alarmRecords/deviceAlarmView',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
+// 挂起
+export function pendingDeviceAlarm(data: any) {
+ return request({
+ url: '/maintenance/alarmRecords/suspend',
+ method: 'post',
+ data,
+ })
+}
+// 批量删除
+export function batchRemoveRow(ids: any) {
+ return request({
+ url: '/maintenance/alarmRecords/batchDelete',
+ method: 'post',
+ data: {
+ ids,
+ },
+ })
+}
diff --git a/src/api/home/operation/history.ts b/src/api/home/operation/history.ts
new file mode 100644
index 0000000..a26ad3f
--- /dev/null
+++ b/src/api/home/operation/history.ts
@@ -0,0 +1,14 @@
+/**
+ * 设备历史报警
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getDeviceHistoryListPage(data: any) {
+ return request({
+ url: `/maintenance/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index ed722fb..6f58857 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -355,6 +355,19 @@
},
},
{
+ path: 'alarm/detail',
+ component: () => import('@/views/home/operation/alarm/components/detail.vue'),
+ name: 'operationAlarmDetail',
+ meta: {
+ title: '设备报警详情',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/operation/alarm',
+ auth: '/operation/alarm',
+ },
+ },
+ {
path: 'history',
component: () => import('@/views/home/operation/history/index.vue'),
name: 'operationHistory',
@@ -368,6 +381,19 @@
},
},
{
+ path: 'history/detail',
+ component: () => import('@/views/home/operation/alarm/components/detail.vue'),
+ name: 'operationHistoryDetail',
+ meta: {
+ title: '历史设备报警',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/operation/history',
+ auth: '/operation/history',
+ },
+ },
+ {
path: 'trajectory',
component: () => import('@/views/home/operation/trajectory/index.vue'),
name: 'operationTrajectory',
diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue
index 7ac6332..30aa05e 100644
--- a/src/views/home/alarm/current/components/detailInfoDialog.vue
+++ b/src/views/home/alarm/current/components/detailInfoDialog.vue
@@ -9,6 +9,7 @@
import monitorDataDialog from './monitorDataDialog.vue'
import processDialog from './processDialog.vue'
import { detailAlarm } from '@/api/home/alarm/current'
+import { deviceAlarmView } from '@/api/home/operation/alarm'
import { toHumpObject } from '@/utils/String'
const dialogFormVisible = ref(false)
const overlay = ref()
@@ -32,15 +33,20 @@
processContent: '',
processStatus: '',
id: '',
+ type: '',
})
+const type = ref('')
const initDialog = (e: any) => {
console.log(e, '信息窗体接收的数据')
overlay.value = e.overlay
infoWindow.value = e.infoWindow
dialogFormVisible.value = true
- info.value = e.info
- detailAlarm(e.info.id).then((res) => {
+ type.value = e.type
+ info.value = e.info;
+
+ (type.value === 'data' ? detailAlarm : deviceAlarmView)(e.info.id).then((res) => {
info.value = toHumpObject(res.data) as any
+ console.log(info.value, 'info.value')
})
}
@@ -53,13 +59,26 @@
const $router = useRouter()
const moreData = () => {
$router.push({
- name: 'AlarmCurrentDetail',
+ name: type.value === 'data' ? 'AlarmCurrentDetail' : 'operationAlarmDetail',
query: {
id: info.value.id,
row: JSON.stringify(info.value),
},
})
}
+// 设备详情
+const goDevice = () => {
+ $router.push({
+ path: '/manage/detail',
+ query: {
+ id: info.value.ledgerId,
+ row: JSON.stringify({
+ ...info.value,
+ id: info.value.ledgerId,
+ }),
+ },
+ })
+}
// 提醒责任人
const remindRef = ref()
const remind = () => {
@@ -68,13 +87,18 @@
// 挂起
const pendingRef = ref()
const pending = () => {
- pendingRef.value.initDialog(info.value)
+ pendingRef.value.initDialog({ ...info.value, type: type.value })
}
// 查看流程
const processRef = ref()
const viewProcess = () => {
processRef.value.initDialog(info.value)
}
+// 报警处置
+const handlerRef = ref()
+const handler = () => {
+ handlerRef.value.initDialog(info.value)
+}
defineExpose({ initDialog, close })
@@ -94,7 +118,13 @@
>>更多
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
@@ -376,4 +408,11 @@
.select {
width: 192px !important;
}
+
+.spread-circle {
+ width: 25px;
+ height: 25px;
+ border-radius: 50%;
+ background: url("@/assets/images/spread.gif") no-repeat center center / cover;
+}
diff --git a/src/api/home/operation/alarm.ts b/src/api/home/operation/alarm.ts
new file mode 100644
index 0000000..2723ec8
--- /dev/null
+++ b/src/api/home/operation/alarm.ts
@@ -0,0 +1,41 @@
+/**
+ * 设备当前报警
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getDeviceCurrentListPage(data: any) {
+ return request({
+ url: `/maintenance/alarmRecords/listPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+// 查看
+export function deviceAlarmView(id: any) {
+ return request({
+ url: '/maintenance/alarmRecords/deviceAlarmView',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
+// 挂起
+export function pendingDeviceAlarm(data: any) {
+ return request({
+ url: '/maintenance/alarmRecords/suspend',
+ method: 'post',
+ data,
+ })
+}
+// 批量删除
+export function batchRemoveRow(ids: any) {
+ return request({
+ url: '/maintenance/alarmRecords/batchDelete',
+ method: 'post',
+ data: {
+ ids,
+ },
+ })
+}
diff --git a/src/api/home/operation/history.ts b/src/api/home/operation/history.ts
new file mode 100644
index 0000000..a26ad3f
--- /dev/null
+++ b/src/api/home/operation/history.ts
@@ -0,0 +1,14 @@
+/**
+ * 设备历史报警
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getDeviceHistoryListPage(data: any) {
+ return request({
+ url: `/maintenance/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index ed722fb..6f58857 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -355,6 +355,19 @@
},
},
{
+ path: 'alarm/detail',
+ component: () => import('@/views/home/operation/alarm/components/detail.vue'),
+ name: 'operationAlarmDetail',
+ meta: {
+ title: '设备报警详情',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/operation/alarm',
+ auth: '/operation/alarm',
+ },
+ },
+ {
path: 'history',
component: () => import('@/views/home/operation/history/index.vue'),
name: 'operationHistory',
@@ -368,6 +381,19 @@
},
},
{
+ path: 'history/detail',
+ component: () => import('@/views/home/operation/alarm/components/detail.vue'),
+ name: 'operationHistoryDetail',
+ meta: {
+ title: '历史设备报警',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/operation/history',
+ auth: '/operation/history',
+ },
+ },
+ {
path: 'trajectory',
component: () => import('@/views/home/operation/trajectory/index.vue'),
name: 'operationTrajectory',
diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue
index 7ac6332..30aa05e 100644
--- a/src/views/home/alarm/current/components/detailInfoDialog.vue
+++ b/src/views/home/alarm/current/components/detailInfoDialog.vue
@@ -9,6 +9,7 @@
import monitorDataDialog from './monitorDataDialog.vue'
import processDialog from './processDialog.vue'
import { detailAlarm } from '@/api/home/alarm/current'
+import { deviceAlarmView } from '@/api/home/operation/alarm'
import { toHumpObject } from '@/utils/String'
const dialogFormVisible = ref(false)
const overlay = ref()
@@ -32,15 +33,20 @@
processContent: '',
processStatus: '',
id: '',
+ type: '',
})
+const type = ref('')
const initDialog = (e: any) => {
console.log(e, '信息窗体接收的数据')
overlay.value = e.overlay
infoWindow.value = e.infoWindow
dialogFormVisible.value = true
- info.value = e.info
- detailAlarm(e.info.id).then((res) => {
+ type.value = e.type
+ info.value = e.info;
+
+ (type.value === 'data' ? detailAlarm : deviceAlarmView)(e.info.id).then((res) => {
info.value = toHumpObject(res.data) as any
+ console.log(info.value, 'info.value')
})
}
@@ -53,13 +59,26 @@
const $router = useRouter()
const moreData = () => {
$router.push({
- name: 'AlarmCurrentDetail',
+ name: type.value === 'data' ? 'AlarmCurrentDetail' : 'operationAlarmDetail',
query: {
id: info.value.id,
row: JSON.stringify(info.value),
},
})
}
+// 设备详情
+const goDevice = () => {
+ $router.push({
+ path: '/manage/detail',
+ query: {
+ id: info.value.ledgerId,
+ row: JSON.stringify({
+ ...info.value,
+ id: info.value.ledgerId,
+ }),
+ },
+ })
+}
// 提醒责任人
const remindRef = ref()
const remind = () => {
@@ -68,13 +87,18 @@
// 挂起
const pendingRef = ref()
const pending = () => {
- pendingRef.value.initDialog(info.value)
+ pendingRef.value.initDialog({ ...info.value, type: type.value })
}
// 查看流程
const processRef = ref()
const viewProcess = () => {
processRef.value.initDialog(info.value)
}
+// 报警处置
+const handlerRef = ref()
+const handler = () => {
+ handlerRef.value.initDialog(info.value)
+}
defineExpose({ initDialog, close })
@@ -94,7 +118,13 @@
>>更多
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
@@ -376,4 +408,11 @@
.select {
width: 192px !important;
}
+
+.spread-circle {
+ width: 25px;
+ height: 25px;
+ border-radius: 50%;
+ background: url("@/assets/images/spread.gif") no-repeat center center / cover;
+}
diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue
index bc9ae81..b01f27c 100644
--- a/src/views/home/operation/history/index.vue
+++ b/src/views/home/operation/history/index.vue
@@ -4,22 +4,32 @@
Date: 2023-06-28
-->
@@ -77,25 +153,37 @@
-
+
+
+
-
+
+
+
-
+
+
+
-
+
+
+
-
+
-
-
-
-
+
@@ -139,7 +227,7 @@
-
+
查看
diff --git a/src/api/home/operation/alarm.ts b/src/api/home/operation/alarm.ts
new file mode 100644
index 0000000..2723ec8
--- /dev/null
+++ b/src/api/home/operation/alarm.ts
@@ -0,0 +1,41 @@
+/**
+ * 设备当前报警
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getDeviceCurrentListPage(data: any) {
+ return request({
+ url: `/maintenance/alarmRecords/listPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+// 查看
+export function deviceAlarmView(id: any) {
+ return request({
+ url: '/maintenance/alarmRecords/deviceAlarmView',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
+// 挂起
+export function pendingDeviceAlarm(data: any) {
+ return request({
+ url: '/maintenance/alarmRecords/suspend',
+ method: 'post',
+ data,
+ })
+}
+// 批量删除
+export function batchRemoveRow(ids: any) {
+ return request({
+ url: '/maintenance/alarmRecords/batchDelete',
+ method: 'post',
+ data: {
+ ids,
+ },
+ })
+}
diff --git a/src/api/home/operation/history.ts b/src/api/home/operation/history.ts
new file mode 100644
index 0000000..a26ad3f
--- /dev/null
+++ b/src/api/home/operation/history.ts
@@ -0,0 +1,14 @@
+/**
+ * 设备历史报警
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getDeviceHistoryListPage(data: any) {
+ return request({
+ url: `/maintenance/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index ed722fb..6f58857 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -355,6 +355,19 @@
},
},
{
+ path: 'alarm/detail',
+ component: () => import('@/views/home/operation/alarm/components/detail.vue'),
+ name: 'operationAlarmDetail',
+ meta: {
+ title: '设备报警详情',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/operation/alarm',
+ auth: '/operation/alarm',
+ },
+ },
+ {
path: 'history',
component: () => import('@/views/home/operation/history/index.vue'),
name: 'operationHistory',
@@ -368,6 +381,19 @@
},
},
{
+ path: 'history/detail',
+ component: () => import('@/views/home/operation/alarm/components/detail.vue'),
+ name: 'operationHistoryDetail',
+ meta: {
+ title: '历史设备报警',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/operation/history',
+ auth: '/operation/history',
+ },
+ },
+ {
path: 'trajectory',
component: () => import('@/views/home/operation/trajectory/index.vue'),
name: 'operationTrajectory',
diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue
index 7ac6332..30aa05e 100644
--- a/src/views/home/alarm/current/components/detailInfoDialog.vue
+++ b/src/views/home/alarm/current/components/detailInfoDialog.vue
@@ -9,6 +9,7 @@
import monitorDataDialog from './monitorDataDialog.vue'
import processDialog from './processDialog.vue'
import { detailAlarm } from '@/api/home/alarm/current'
+import { deviceAlarmView } from '@/api/home/operation/alarm'
import { toHumpObject } from '@/utils/String'
const dialogFormVisible = ref(false)
const overlay = ref()
@@ -32,15 +33,20 @@
processContent: '',
processStatus: '',
id: '',
+ type: '',
})
+const type = ref('')
const initDialog = (e: any) => {
console.log(e, '信息窗体接收的数据')
overlay.value = e.overlay
infoWindow.value = e.infoWindow
dialogFormVisible.value = true
- info.value = e.info
- detailAlarm(e.info.id).then((res) => {
+ type.value = e.type
+ info.value = e.info;
+
+ (type.value === 'data' ? detailAlarm : deviceAlarmView)(e.info.id).then((res) => {
info.value = toHumpObject(res.data) as any
+ console.log(info.value, 'info.value')
})
}
@@ -53,13 +59,26 @@
const $router = useRouter()
const moreData = () => {
$router.push({
- name: 'AlarmCurrentDetail',
+ name: type.value === 'data' ? 'AlarmCurrentDetail' : 'operationAlarmDetail',
query: {
id: info.value.id,
row: JSON.stringify(info.value),
},
})
}
+// 设备详情
+const goDevice = () => {
+ $router.push({
+ path: '/manage/detail',
+ query: {
+ id: info.value.ledgerId,
+ row: JSON.stringify({
+ ...info.value,
+ id: info.value.ledgerId,
+ }),
+ },
+ })
+}
// 提醒责任人
const remindRef = ref()
const remind = () => {
@@ -68,13 +87,18 @@
// 挂起
const pendingRef = ref()
const pending = () => {
- pendingRef.value.initDialog(info.value)
+ pendingRef.value.initDialog({ ...info.value, type: type.value })
}
// 查看流程
const processRef = ref()
const viewProcess = () => {
processRef.value.initDialog(info.value)
}
+// 报警处置
+const handlerRef = ref()
+const handler = () => {
+ handlerRef.value.initDialog(info.value)
+}
defineExpose({ initDialog, close })
@@ -94,7 +118,13 @@
>>更多
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
@@ -376,4 +408,11 @@
.select {
width: 192px !important;
}
+
+.spread-circle {
+ width: 25px;
+ height: 25px;
+ border-radius: 50%;
+ background: url("@/assets/images/spread.gif") no-repeat center center / cover;
+}
diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue
index bc9ae81..b01f27c 100644
--- a/src/views/home/operation/history/index.vue
+++ b/src/views/home/operation/history/index.vue
@@ -4,22 +4,32 @@
Date: 2023-06-28
-->
@@ -77,25 +153,37 @@
-
+
+
+
-
+
+
+
-
+
+
+
-
+
+
+
-
+
-
-
-
-
+
@@ -139,7 +227,7 @@
-
+
查看
diff --git a/src/views/home/rule/agreement/index.vue b/src/views/home/rule/agreement/index.vue
index 2e6c2a5..fd41cd3 100644
--- a/src/views/home/rule/agreement/index.vue
+++ b/src/views/home/rule/agreement/index.vue
@@ -73,7 +73,7 @@
// 删除
const removeRow = (row: any) => {
ElMessageBox.confirm(
- `确定要删除${row.protocolName}吗?`,
+ '确定要删除该数据吗?',
'确认操作',
{
confirmButtonText: '确定',
diff --git a/src/api/home/operation/alarm.ts b/src/api/home/operation/alarm.ts
new file mode 100644
index 0000000..2723ec8
--- /dev/null
+++ b/src/api/home/operation/alarm.ts
@@ -0,0 +1,41 @@
+/**
+ * 设备当前报警
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getDeviceCurrentListPage(data: any) {
+ return request({
+ url: `/maintenance/alarmRecords/listPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+// 查看
+export function deviceAlarmView(id: any) {
+ return request({
+ url: '/maintenance/alarmRecords/deviceAlarmView',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
+// 挂起
+export function pendingDeviceAlarm(data: any) {
+ return request({
+ url: '/maintenance/alarmRecords/suspend',
+ method: 'post',
+ data,
+ })
+}
+// 批量删除
+export function batchRemoveRow(ids: any) {
+ return request({
+ url: '/maintenance/alarmRecords/batchDelete',
+ method: 'post',
+ data: {
+ ids,
+ },
+ })
+}
diff --git a/src/api/home/operation/history.ts b/src/api/home/operation/history.ts
new file mode 100644
index 0000000..a26ad3f
--- /dev/null
+++ b/src/api/home/operation/history.ts
@@ -0,0 +1,14 @@
+/**
+ * 设备历史报警
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getDeviceHistoryListPage(data: any) {
+ return request({
+ url: `/maintenance/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index ed722fb..6f58857 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -355,6 +355,19 @@
},
},
{
+ path: 'alarm/detail',
+ component: () => import('@/views/home/operation/alarm/components/detail.vue'),
+ name: 'operationAlarmDetail',
+ meta: {
+ title: '设备报警详情',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/operation/alarm',
+ auth: '/operation/alarm',
+ },
+ },
+ {
path: 'history',
component: () => import('@/views/home/operation/history/index.vue'),
name: 'operationHistory',
@@ -368,6 +381,19 @@
},
},
{
+ path: 'history/detail',
+ component: () => import('@/views/home/operation/alarm/components/detail.vue'),
+ name: 'operationHistoryDetail',
+ meta: {
+ title: '历史设备报警',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/operation/history',
+ auth: '/operation/history',
+ },
+ },
+ {
path: 'trajectory',
component: () => import('@/views/home/operation/trajectory/index.vue'),
name: 'operationTrajectory',
diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue
index 7ac6332..30aa05e 100644
--- a/src/views/home/alarm/current/components/detailInfoDialog.vue
+++ b/src/views/home/alarm/current/components/detailInfoDialog.vue
@@ -9,6 +9,7 @@
import monitorDataDialog from './monitorDataDialog.vue'
import processDialog from './processDialog.vue'
import { detailAlarm } from '@/api/home/alarm/current'
+import { deviceAlarmView } from '@/api/home/operation/alarm'
import { toHumpObject } from '@/utils/String'
const dialogFormVisible = ref(false)
const overlay = ref()
@@ -32,15 +33,20 @@
processContent: '',
processStatus: '',
id: '',
+ type: '',
})
+const type = ref('')
const initDialog = (e: any) => {
console.log(e, '信息窗体接收的数据')
overlay.value = e.overlay
infoWindow.value = e.infoWindow
dialogFormVisible.value = true
- info.value = e.info
- detailAlarm(e.info.id).then((res) => {
+ type.value = e.type
+ info.value = e.info;
+
+ (type.value === 'data' ? detailAlarm : deviceAlarmView)(e.info.id).then((res) => {
info.value = toHumpObject(res.data) as any
+ console.log(info.value, 'info.value')
})
}
@@ -53,13 +59,26 @@
const $router = useRouter()
const moreData = () => {
$router.push({
- name: 'AlarmCurrentDetail',
+ name: type.value === 'data' ? 'AlarmCurrentDetail' : 'operationAlarmDetail',
query: {
id: info.value.id,
row: JSON.stringify(info.value),
},
})
}
+// 设备详情
+const goDevice = () => {
+ $router.push({
+ path: '/manage/detail',
+ query: {
+ id: info.value.ledgerId,
+ row: JSON.stringify({
+ ...info.value,
+ id: info.value.ledgerId,
+ }),
+ },
+ })
+}
// 提醒责任人
const remindRef = ref()
const remind = () => {
@@ -68,13 +87,18 @@
// 挂起
const pendingRef = ref()
const pending = () => {
- pendingRef.value.initDialog(info.value)
+ pendingRef.value.initDialog({ ...info.value, type: type.value })
}
// 查看流程
const processRef = ref()
const viewProcess = () => {
processRef.value.initDialog(info.value)
}
+// 报警处置
+const handlerRef = ref()
+const handler = () => {
+ handlerRef.value.initDialog(info.value)
+}
defineExpose({ initDialog, close })
@@ -94,7 +118,13 @@
>>更多
-
+
+ 设备编号:
+
+ {{ info.devcode }}
+
+
+
报警类别:
{{ info.alarmCategory }}
@@ -106,7 +136,13 @@
{{ info.alarmMsg }}
-
+
+ 设备类型:
+
+ {{ info.devTypeName }}
+
+
+
报警设备:
{{ info.devcode }}
{{ info.confirmContent }}
-
+
流程图
@@ -176,9 +212,12 @@
@@ -376,4 +408,11 @@
.select {
width: 192px !important;
}
+
+.spread-circle {
+ width: 25px;
+ height: 25px;
+ border-radius: 50%;
+ background: url("@/assets/images/spread.gif") no-repeat center center / cover;
+}
diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue
index bc9ae81..b01f27c 100644
--- a/src/views/home/operation/history/index.vue
+++ b/src/views/home/operation/history/index.vue
@@ -4,22 +4,32 @@
Date: 2023-06-28
-->
@@ -77,25 +153,37 @@
-
+
+
+
-
+
+
+
-
+
+
+
-
+
+
+
-
+
-
-
-
-
+
@@ -139,7 +227,7 @@
-
+
查看
diff --git a/src/views/home/rule/agreement/index.vue b/src/views/home/rule/agreement/index.vue
index 2e6c2a5..fd41cd3 100644
--- a/src/views/home/rule/agreement/index.vue
+++ b/src/views/home/rule/agreement/index.vue
@@ -73,7 +73,7 @@
// 删除
const removeRow = (row: any) => {
ElMessageBox.confirm(
- `确定要删除${row.protocolName}吗?`,
+ '确定要删除该数据吗?',
'确认操作',
{
confirmButtonText: '确定',
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index 6b79e30..caf1557 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -50,9 +50,10 @@
alarmThreshold: '', // 报警阈值
}
}
-
+const isFisrst = ref(true)
// 初始化对话框
const initDialog = (dialogStatusValue: string, row: any) => {
+ isFisrst.value = true
dialogStatus.value = dialogStatusValue
dialogFormVisible.value = true
if (dialogStatus.value === 'create') { // 如果是新增,清除验证
@@ -67,6 +68,10 @@
...JSON.parse(JSON.stringify(row)),
}
}
+
+ setTimeout(() => {
+ isFisrst.value = false
+ }, 200)
}
defineExpose({
initDialog,
@@ -207,7 +212,6 @@
// 监听报警判断方式 获取报警事件下拉
watch(() => dataForm.value.alarmJudgeMethod, (newVal) => {
if (newVal) {
- dataForm.value.alarmThreshold = ''
if (newVal === '0' && dataForm.value.productId) {
fetchAlarmEvent(dataForm.value.productId)
}
@@ -227,7 +231,9 @@
alarmEventList.value = []
}
if (newVal) {
- dataForm.value.alarmThreshold = ''
+ if (!isFisrst.value) {
+ dataForm.value.alarmThreshold = ''
+ }
}
}, {
deep: true,