diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/rule/alarm.ts b/src/api/home/rule/alarm.ts
index f2041d0..30ef3ad 100644
--- a/src/api/home/rule/alarm.ts
+++ b/src/api/home/rule/alarm.ts
@@ -11,6 +11,16 @@
data,
})
}
+// 获取事件下拉
+export function getEventList(id: any) {
+ return request({
+ url: '/system/alarmRule/alarmEventList',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
// 停用或者启用
export function switchStatus(data: any) {
return request({
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/rule/alarm.ts b/src/api/home/rule/alarm.ts
index f2041d0..30ef3ad 100644
--- a/src/api/home/rule/alarm.ts
+++ b/src/api/home/rule/alarm.ts
@@ -11,6 +11,16 @@
data,
})
}
+// 获取事件下拉
+export function getEventList(id: any) {
+ return request({
+ url: '/system/alarmRule/alarmEventList',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
// 停用或者启用
export function switchStatus(data: any) {
return request({
diff --git "a/src/assets/icons/\344\272\272\345\221\230-0.svg" "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
new file mode 100644
index 0000000..e7a716d
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/rule/alarm.ts b/src/api/home/rule/alarm.ts
index f2041d0..30ef3ad 100644
--- a/src/api/home/rule/alarm.ts
+++ b/src/api/home/rule/alarm.ts
@@ -11,6 +11,16 @@
data,
})
}
+// 获取事件下拉
+export function getEventList(id: any) {
+ return request({
+ url: '/system/alarmRule/alarmEventList',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
// 停用或者启用
export function switchStatus(data: any) {
return request({
diff --git "a/src/assets/icons/\344\272\272\345\221\230-0.svg" "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
new file mode 100644
index 0000000..e7a716d
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\344\272\272\345\221\230-1.svg" "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
new file mode 100644
index 0000000..ade2836
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/rule/alarm.ts b/src/api/home/rule/alarm.ts
index f2041d0..30ef3ad 100644
--- a/src/api/home/rule/alarm.ts
+++ b/src/api/home/rule/alarm.ts
@@ -11,6 +11,16 @@
data,
})
}
+// 获取事件下拉
+export function getEventList(id: any) {
+ return request({
+ url: '/system/alarmRule/alarmEventList',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
// 停用或者启用
export function switchStatus(data: any) {
return request({
diff --git "a/src/assets/icons/\344\272\272\345\221\230-0.svg" "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
new file mode 100644
index 0000000..e7a716d
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\344\272\272\345\221\230-1.svg" "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
new file mode 100644
index 0000000..ade2836
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\345\274\200\345\247\213.svg" "b/src/assets/icons/\345\274\200\345\247\213.svg"
new file mode 100644
index 0000000..282b030
--- /dev/null
+++ "b/src/assets/icons/\345\274\200\345\247\213.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/rule/alarm.ts b/src/api/home/rule/alarm.ts
index f2041d0..30ef3ad 100644
--- a/src/api/home/rule/alarm.ts
+++ b/src/api/home/rule/alarm.ts
@@ -11,6 +11,16 @@
data,
})
}
+// 获取事件下拉
+export function getEventList(id: any) {
+ return request({
+ url: '/system/alarmRule/alarmEventList',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
// 停用或者启用
export function switchStatus(data: any) {
return request({
diff --git "a/src/assets/icons/\344\272\272\345\221\230-0.svg" "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
new file mode 100644
index 0000000..e7a716d
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\344\272\272\345\221\230-1.svg" "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
new file mode 100644
index 0000000..ade2836
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\345\274\200\345\247\213.svg" "b/src/assets/icons/\345\274\200\345\247\213.svg"
new file mode 100644
index 0000000..282b030
--- /dev/null
+++ "b/src/assets/icons/\345\274\200\345\247\213.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\346\214\202\350\265\267.svg" "b/src/assets/icons/\346\214\202\350\265\267.svg"
new file mode 100644
index 0000000..458a2c9
--- /dev/null
+++ "b/src/assets/icons/\346\214\202\350\265\267.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/rule/alarm.ts b/src/api/home/rule/alarm.ts
index f2041d0..30ef3ad 100644
--- a/src/api/home/rule/alarm.ts
+++ b/src/api/home/rule/alarm.ts
@@ -11,6 +11,16 @@
data,
})
}
+// 获取事件下拉
+export function getEventList(id: any) {
+ return request({
+ url: '/system/alarmRule/alarmEventList',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
// 停用或者启用
export function switchStatus(data: any) {
return request({
diff --git "a/src/assets/icons/\344\272\272\345\221\230-0.svg" "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
new file mode 100644
index 0000000..e7a716d
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\344\272\272\345\221\230-1.svg" "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
new file mode 100644
index 0000000..ade2836
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\345\274\200\345\247\213.svg" "b/src/assets/icons/\345\274\200\345\247\213.svg"
new file mode 100644
index 0000000..282b030
--- /dev/null
+++ "b/src/assets/icons/\345\274\200\345\247\213.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\346\214\202\350\265\267.svg" "b/src/assets/icons/\346\214\202\350\265\267.svg"
new file mode 100644
index 0000000..458a2c9
--- /dev/null
+++ "b/src/assets/icons/\346\214\202\350\265\267.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\347\273\223\346\235\237.svg" "b/src/assets/icons/\347\273\223\346\235\237.svg"
new file mode 100644
index 0000000..ea70979
--- /dev/null
+++ "b/src/assets/icons/\347\273\223\346\235\237.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/rule/alarm.ts b/src/api/home/rule/alarm.ts
index f2041d0..30ef3ad 100644
--- a/src/api/home/rule/alarm.ts
+++ b/src/api/home/rule/alarm.ts
@@ -11,6 +11,16 @@
data,
})
}
+// 获取事件下拉
+export function getEventList(id: any) {
+ return request({
+ url: '/system/alarmRule/alarmEventList',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
// 停用或者启用
export function switchStatus(data: any) {
return request({
diff --git "a/src/assets/icons/\344\272\272\345\221\230-0.svg" "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
new file mode 100644
index 0000000..e7a716d
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\344\272\272\345\221\230-1.svg" "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
new file mode 100644
index 0000000..ade2836
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\345\274\200\345\247\213.svg" "b/src/assets/icons/\345\274\200\345\247\213.svg"
new file mode 100644
index 0000000..282b030
--- /dev/null
+++ "b/src/assets/icons/\345\274\200\345\247\213.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\346\214\202\350\265\267.svg" "b/src/assets/icons/\346\214\202\350\265\267.svg"
new file mode 100644
index 0000000..458a2c9
--- /dev/null
+++ "b/src/assets/icons/\346\214\202\350\265\267.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\347\273\223\346\235\237.svg" "b/src/assets/icons/\347\273\223\346\235\237.svg"
new file mode 100644
index 0000000..ea70979
--- /dev/null
+++ "b/src/assets/icons/\347\273\223\346\235\237.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-0.svg" "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
new file mode 100644
index 0000000..4e2ab40
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/rule/alarm.ts b/src/api/home/rule/alarm.ts
index f2041d0..30ef3ad 100644
--- a/src/api/home/rule/alarm.ts
+++ b/src/api/home/rule/alarm.ts
@@ -11,6 +11,16 @@
data,
})
}
+// 获取事件下拉
+export function getEventList(id: any) {
+ return request({
+ url: '/system/alarmRule/alarmEventList',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
// 停用或者启用
export function switchStatus(data: any) {
return request({
diff --git "a/src/assets/icons/\344\272\272\345\221\230-0.svg" "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
new file mode 100644
index 0000000..e7a716d
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\344\272\272\345\221\230-1.svg" "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
new file mode 100644
index 0000000..ade2836
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\345\274\200\345\247\213.svg" "b/src/assets/icons/\345\274\200\345\247\213.svg"
new file mode 100644
index 0000000..282b030
--- /dev/null
+++ "b/src/assets/icons/\345\274\200\345\247\213.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\346\214\202\350\265\267.svg" "b/src/assets/icons/\346\214\202\350\265\267.svg"
new file mode 100644
index 0000000..458a2c9
--- /dev/null
+++ "b/src/assets/icons/\346\214\202\350\265\267.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\347\273\223\346\235\237.svg" "b/src/assets/icons/\347\273\223\346\235\237.svg"
new file mode 100644
index 0000000..ea70979
--- /dev/null
+++ "b/src/assets/icons/\347\273\223\346\235\237.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-0.svg" "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
new file mode 100644
index 0000000..4e2ab40
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-1.svg" "b/src/assets/icons/\350\256\276\345\244\207-1.svg"
new file mode 100644
index 0000000..ccb306e
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/rule/alarm.ts b/src/api/home/rule/alarm.ts
index f2041d0..30ef3ad 100644
--- a/src/api/home/rule/alarm.ts
+++ b/src/api/home/rule/alarm.ts
@@ -11,6 +11,16 @@
data,
})
}
+// 获取事件下拉
+export function getEventList(id: any) {
+ return request({
+ url: '/system/alarmRule/alarmEventList',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
// 停用或者启用
export function switchStatus(data: any) {
return request({
diff --git "a/src/assets/icons/\344\272\272\345\221\230-0.svg" "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
new file mode 100644
index 0000000..e7a716d
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\344\272\272\345\221\230-1.svg" "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
new file mode 100644
index 0000000..ade2836
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\345\274\200\345\247\213.svg" "b/src/assets/icons/\345\274\200\345\247\213.svg"
new file mode 100644
index 0000000..282b030
--- /dev/null
+++ "b/src/assets/icons/\345\274\200\345\247\213.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\346\214\202\350\265\267.svg" "b/src/assets/icons/\346\214\202\350\265\267.svg"
new file mode 100644
index 0000000..458a2c9
--- /dev/null
+++ "b/src/assets/icons/\346\214\202\350\265\267.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\347\273\223\346\235\237.svg" "b/src/assets/icons/\347\273\223\346\235\237.svg"
new file mode 100644
index 0000000..ea70979
--- /dev/null
+++ "b/src/assets/icons/\347\273\223\346\235\237.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-0.svg" "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
new file mode 100644
index 0000000..4e2ab40
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-1.svg" "b/src/assets/icons/\350\256\276\345\244\207-1.svg"
new file mode 100644
index 0000000..ccb306e
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue
index 3baff06..2733161 100644
--- a/src/components/Echart/LineChart.vue
+++ b/src/components/Echart/LineChart.vue
@@ -30,7 +30,7 @@
default: () => {
return {
top: 50,
- left: 10,
+ left: 20,
right: 20,
bottom: 10,
containLabel: true, // 是否包含坐标轴的刻度标签
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/rule/alarm.ts b/src/api/home/rule/alarm.ts
index f2041d0..30ef3ad 100644
--- a/src/api/home/rule/alarm.ts
+++ b/src/api/home/rule/alarm.ts
@@ -11,6 +11,16 @@
data,
})
}
+// 获取事件下拉
+export function getEventList(id: any) {
+ return request({
+ url: '/system/alarmRule/alarmEventList',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
// 停用或者启用
export function switchStatus(data: any) {
return request({
diff --git "a/src/assets/icons/\344\272\272\345\221\230-0.svg" "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
new file mode 100644
index 0000000..e7a716d
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\344\272\272\345\221\230-1.svg" "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
new file mode 100644
index 0000000..ade2836
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\345\274\200\345\247\213.svg" "b/src/assets/icons/\345\274\200\345\247\213.svg"
new file mode 100644
index 0000000..282b030
--- /dev/null
+++ "b/src/assets/icons/\345\274\200\345\247\213.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\346\214\202\350\265\267.svg" "b/src/assets/icons/\346\214\202\350\265\267.svg"
new file mode 100644
index 0000000..458a2c9
--- /dev/null
+++ "b/src/assets/icons/\346\214\202\350\265\267.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\347\273\223\346\235\237.svg" "b/src/assets/icons/\347\273\223\346\235\237.svg"
new file mode 100644
index 0000000..ea70979
--- /dev/null
+++ "b/src/assets/icons/\347\273\223\346\235\237.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-0.svg" "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
new file mode 100644
index 0000000..4e2ab40
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-1.svg" "b/src/assets/icons/\350\256\276\345\244\207-1.svg"
new file mode 100644
index 0000000..ccb306e
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue
index 3baff06..2733161 100644
--- a/src/components/Echart/LineChart.vue
+++ b/src/components/Echart/LineChart.vue
@@ -30,7 +30,7 @@
default: () => {
return {
top: 50,
- left: 10,
+ left: 20,
right: 20,
bottom: 10,
containLabel: true, // 是否包含坐标轴的刻度标签
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index b6634ef..9b058fa 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -68,6 +68,19 @@
},
},
{
+ path: '/current/detail',
+ component: () => import('@/views/home/alarm/current/components/detail.vue'),
+ name: 'AlarmCurrentDetail',
+ meta: {
+ title: '报警详情',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/alarm/current',
+ auth: '/alarm/current',
+ },
+ },
+ {
path: 'history',
component: () => import('@/views/home/alarm/history/index.vue'),
name: 'AlarmHistory',
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/rule/alarm.ts b/src/api/home/rule/alarm.ts
index f2041d0..30ef3ad 100644
--- a/src/api/home/rule/alarm.ts
+++ b/src/api/home/rule/alarm.ts
@@ -11,6 +11,16 @@
data,
})
}
+// 获取事件下拉
+export function getEventList(id: any) {
+ return request({
+ url: '/system/alarmRule/alarmEventList',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
// 停用或者启用
export function switchStatus(data: any) {
return request({
diff --git "a/src/assets/icons/\344\272\272\345\221\230-0.svg" "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
new file mode 100644
index 0000000..e7a716d
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\344\272\272\345\221\230-1.svg" "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
new file mode 100644
index 0000000..ade2836
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\345\274\200\345\247\213.svg" "b/src/assets/icons/\345\274\200\345\247\213.svg"
new file mode 100644
index 0000000..282b030
--- /dev/null
+++ "b/src/assets/icons/\345\274\200\345\247\213.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\346\214\202\350\265\267.svg" "b/src/assets/icons/\346\214\202\350\265\267.svg"
new file mode 100644
index 0000000..458a2c9
--- /dev/null
+++ "b/src/assets/icons/\346\214\202\350\265\267.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\347\273\223\346\235\237.svg" "b/src/assets/icons/\347\273\223\346\235\237.svg"
new file mode 100644
index 0000000..ea70979
--- /dev/null
+++ "b/src/assets/icons/\347\273\223\346\235\237.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-0.svg" "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
new file mode 100644
index 0000000..4e2ab40
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-1.svg" "b/src/assets/icons/\350\256\276\345\244\207-1.svg"
new file mode 100644
index 0000000..ccb306e
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue
index 3baff06..2733161 100644
--- a/src/components/Echart/LineChart.vue
+++ b/src/components/Echart/LineChart.vue
@@ -30,7 +30,7 @@
default: () => {
return {
top: 50,
- left: 10,
+ left: 20,
right: 20,
bottom: 10,
containLabel: true, // 是否包含坐标轴的刻度标签
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index b6634ef..9b058fa 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -68,6 +68,19 @@
},
},
{
+ path: '/current/detail',
+ component: () => import('@/views/home/alarm/current/components/detail.vue'),
+ name: 'AlarmCurrentDetail',
+ meta: {
+ title: '报警详情',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/alarm/current',
+ auth: '/alarm/current',
+ },
+ },
+ {
path: 'history',
component: () => import('@/views/home/alarm/history/index.vue'),
name: 'AlarmHistory',
diff --git a/src/utils/Array.ts b/src/utils/Array.ts
new file mode 100644
index 0000000..7defbb6
--- /dev/null
+++ b/src/utils/Array.ts
@@ -0,0 +1,62 @@
+import _ from 'lodash'
+// 常见数组操作
+
+// 两个数组求交集
+export const intersectionArray = (list1: any[], list2: any[]) => {
+ return list1.filter(v => list2.includes(v))
+}
+// 差集 -- 常用于 表格中多选删除
+export const differenceArray = (list1: any[], list2: any[]) => {
+ return list1.filter(v => !list2.includes(v))
+}
+// 补集
+export const complementaryArray = (list1: any[], list2: any[]) => {
+ return list1.filter((v) => { return !(list2.includes(v)) })
+ .concat(list2.filter((v) => { return !(list1.includes(v)) }))
+}
+// 并集
+export const unionArray = (list1: any[], list2: any[]) => {
+ return list1.concat(list2.filter((v) => { return !(list1.includes(v)) }))
+}
+// 一维数组去重
+export const uniqueArray = (list: any) => {
+ return [...new Set(list)]
+}
+// 二维数组根据 某一属性 去重
+export const uniqueMultiArray = (list: any, attribute: string) => {
+ const res = new Map()
+ return list.filter((a: any) => !res.has(a[attribute]) && res.set(a[attribute], 1))
+}
+// 一维数组或对象拷贝
+export const cloneArray = (data: any) => {
+ return JSON.parse(JSON.stringify(data))
+}
+// 多维数组或对象深拷贝
+export const deepClone = (data: any) => {
+ return _.cloneDeep(data)
+}
+// 数组操作-下拉框操作(已经选择的数据不能再选)
+/**
+ * @param list 下拉框初始数据(所有)
+ * @param list1 已经选择的数据
+ * @param current 当前数据 可为空
+ * @param attribute 属性(即绑定在 list1哪个属性上)
+ */
+export const setSelectList = (list: any[], list1: any[], current: string, attribute: string, attribute2 = 'value') => {
+ const select = [...new Set(list1.map((item: any) => item[attribute]))].filter((item: string) => item !== current)
+ return list.filter((item) => { return !select.includes(item[attribute2]) })
+}
+// 几个数组的交集
+export function intersectionManyArray(...arrays) {
+ // 获取第一个数组作为初始交集
+ let intersection = arrays.shift()
+
+ // 遍历剩余的数组
+ while (arrays.length) {
+ // 过滤当前交集,只保留那些也在当前数组中的元素
+ intersection = intersection.filter(item => arrays[0].includes(item))
+ // 移动到下一个数组
+ arrays.shift()
+ }
+ return intersection
+}
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/rule/alarm.ts b/src/api/home/rule/alarm.ts
index f2041d0..30ef3ad 100644
--- a/src/api/home/rule/alarm.ts
+++ b/src/api/home/rule/alarm.ts
@@ -11,6 +11,16 @@
data,
})
}
+// 获取事件下拉
+export function getEventList(id: any) {
+ return request({
+ url: '/system/alarmRule/alarmEventList',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
// 停用或者启用
export function switchStatus(data: any) {
return request({
diff --git "a/src/assets/icons/\344\272\272\345\221\230-0.svg" "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
new file mode 100644
index 0000000..e7a716d
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\344\272\272\345\221\230-1.svg" "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
new file mode 100644
index 0000000..ade2836
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\345\274\200\345\247\213.svg" "b/src/assets/icons/\345\274\200\345\247\213.svg"
new file mode 100644
index 0000000..282b030
--- /dev/null
+++ "b/src/assets/icons/\345\274\200\345\247\213.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\346\214\202\350\265\267.svg" "b/src/assets/icons/\346\214\202\350\265\267.svg"
new file mode 100644
index 0000000..458a2c9
--- /dev/null
+++ "b/src/assets/icons/\346\214\202\350\265\267.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\347\273\223\346\235\237.svg" "b/src/assets/icons/\347\273\223\346\235\237.svg"
new file mode 100644
index 0000000..ea70979
--- /dev/null
+++ "b/src/assets/icons/\347\273\223\346\235\237.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-0.svg" "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
new file mode 100644
index 0000000..4e2ab40
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-1.svg" "b/src/assets/icons/\350\256\276\345\244\207-1.svg"
new file mode 100644
index 0000000..ccb306e
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue
index 3baff06..2733161 100644
--- a/src/components/Echart/LineChart.vue
+++ b/src/components/Echart/LineChart.vue
@@ -30,7 +30,7 @@
default: () => {
return {
top: 50,
- left: 10,
+ left: 20,
right: 20,
bottom: 10,
containLabel: true, // 是否包含坐标轴的刻度标签
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index b6634ef..9b058fa 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -68,6 +68,19 @@
},
},
{
+ path: '/current/detail',
+ component: () => import('@/views/home/alarm/current/components/detail.vue'),
+ name: 'AlarmCurrentDetail',
+ meta: {
+ title: '报警详情',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/alarm/current',
+ auth: '/alarm/current',
+ },
+ },
+ {
path: 'history',
component: () => import('@/views/home/alarm/history/index.vue'),
name: 'AlarmHistory',
diff --git a/src/utils/Array.ts b/src/utils/Array.ts
new file mode 100644
index 0000000..7defbb6
--- /dev/null
+++ b/src/utils/Array.ts
@@ -0,0 +1,62 @@
+import _ from 'lodash'
+// 常见数组操作
+
+// 两个数组求交集
+export const intersectionArray = (list1: any[], list2: any[]) => {
+ return list1.filter(v => list2.includes(v))
+}
+// 差集 -- 常用于 表格中多选删除
+export const differenceArray = (list1: any[], list2: any[]) => {
+ return list1.filter(v => !list2.includes(v))
+}
+// 补集
+export const complementaryArray = (list1: any[], list2: any[]) => {
+ return list1.filter((v) => { return !(list2.includes(v)) })
+ .concat(list2.filter((v) => { return !(list1.includes(v)) }))
+}
+// 并集
+export const unionArray = (list1: any[], list2: any[]) => {
+ return list1.concat(list2.filter((v) => { return !(list1.includes(v)) }))
+}
+// 一维数组去重
+export const uniqueArray = (list: any) => {
+ return [...new Set(list)]
+}
+// 二维数组根据 某一属性 去重
+export const uniqueMultiArray = (list: any, attribute: string) => {
+ const res = new Map()
+ return list.filter((a: any) => !res.has(a[attribute]) && res.set(a[attribute], 1))
+}
+// 一维数组或对象拷贝
+export const cloneArray = (data: any) => {
+ return JSON.parse(JSON.stringify(data))
+}
+// 多维数组或对象深拷贝
+export const deepClone = (data: any) => {
+ return _.cloneDeep(data)
+}
+// 数组操作-下拉框操作(已经选择的数据不能再选)
+/**
+ * @param list 下拉框初始数据(所有)
+ * @param list1 已经选择的数据
+ * @param current 当前数据 可为空
+ * @param attribute 属性(即绑定在 list1哪个属性上)
+ */
+export const setSelectList = (list: any[], list1: any[], current: string, attribute: string, attribute2 = 'value') => {
+ const select = [...new Set(list1.map((item: any) => item[attribute]))].filter((item: string) => item !== current)
+ return list.filter((item) => { return !select.includes(item[attribute2]) })
+}
+// 几个数组的交集
+export function intersectionManyArray(...arrays) {
+ // 获取第一个数组作为初始交集
+ let intersection = arrays.shift()
+
+ // 遍历剩余的数组
+ while (arrays.length) {
+ // 过滤当前交集,只保留那些也在当前数组中的元素
+ intersection = intersection.filter(item => arrays[0].includes(item))
+ // 移动到下一个数组
+ arrays.shift()
+ }
+ return intersection
+}
diff --git a/src/utils/String.ts b/src/utils/String.ts
new file mode 100644
index 0000000..5f0c954
--- /dev/null
+++ b/src/utils/String.ts
@@ -0,0 +1,32 @@
+// 字符串操作方法
+
+// 将 ALARM_CODE -> alarmCode
+export function toHump(name: string) {
+ const str = name.toLowerCase()
+ return str.replace(/\_(\w)/g, (all, letter) => {
+ return letter.toUpperCase()
+ })
+}
+// js判断字母是否大写
+export function isUpperCase(char: string) {
+ return /^[A-Z]+$/.test(char)
+}
+
+// 将对象中所有属性转为驼峰
+export function toHumpObject(data: any) {
+ const result = {} as { [key: string]: string }
+ for (const i in data) {
+ if (isUpperCase(i[0])) {
+ if (i.includes('_')) {
+ result[toHump(i)] = data[i]
+ }
+ else {
+ result[i.toLowerCase()] = data[i]
+ }
+ }
+ else {
+ result[i] = data[i]
+ }
+ }
+ return result
+}
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/rule/alarm.ts b/src/api/home/rule/alarm.ts
index f2041d0..30ef3ad 100644
--- a/src/api/home/rule/alarm.ts
+++ b/src/api/home/rule/alarm.ts
@@ -11,6 +11,16 @@
data,
})
}
+// 获取事件下拉
+export function getEventList(id: any) {
+ return request({
+ url: '/system/alarmRule/alarmEventList',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
// 停用或者启用
export function switchStatus(data: any) {
return request({
diff --git "a/src/assets/icons/\344\272\272\345\221\230-0.svg" "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
new file mode 100644
index 0000000..e7a716d
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\344\272\272\345\221\230-1.svg" "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
new file mode 100644
index 0000000..ade2836
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\345\274\200\345\247\213.svg" "b/src/assets/icons/\345\274\200\345\247\213.svg"
new file mode 100644
index 0000000..282b030
--- /dev/null
+++ "b/src/assets/icons/\345\274\200\345\247\213.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\346\214\202\350\265\267.svg" "b/src/assets/icons/\346\214\202\350\265\267.svg"
new file mode 100644
index 0000000..458a2c9
--- /dev/null
+++ "b/src/assets/icons/\346\214\202\350\265\267.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\347\273\223\346\235\237.svg" "b/src/assets/icons/\347\273\223\346\235\237.svg"
new file mode 100644
index 0000000..ea70979
--- /dev/null
+++ "b/src/assets/icons/\347\273\223\346\235\237.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-0.svg" "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
new file mode 100644
index 0000000..4e2ab40
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-1.svg" "b/src/assets/icons/\350\256\276\345\244\207-1.svg"
new file mode 100644
index 0000000..ccb306e
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue
index 3baff06..2733161 100644
--- a/src/components/Echart/LineChart.vue
+++ b/src/components/Echart/LineChart.vue
@@ -30,7 +30,7 @@
default: () => {
return {
top: 50,
- left: 10,
+ left: 20,
right: 20,
bottom: 10,
containLabel: true, // 是否包含坐标轴的刻度标签
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index b6634ef..9b058fa 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -68,6 +68,19 @@
},
},
{
+ path: '/current/detail',
+ component: () => import('@/views/home/alarm/current/components/detail.vue'),
+ name: 'AlarmCurrentDetail',
+ meta: {
+ title: '报警详情',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/alarm/current',
+ auth: '/alarm/current',
+ },
+ },
+ {
path: 'history',
component: () => import('@/views/home/alarm/history/index.vue'),
name: 'AlarmHistory',
diff --git a/src/utils/Array.ts b/src/utils/Array.ts
new file mode 100644
index 0000000..7defbb6
--- /dev/null
+++ b/src/utils/Array.ts
@@ -0,0 +1,62 @@
+import _ from 'lodash'
+// 常见数组操作
+
+// 两个数组求交集
+export const intersectionArray = (list1: any[], list2: any[]) => {
+ return list1.filter(v => list2.includes(v))
+}
+// 差集 -- 常用于 表格中多选删除
+export const differenceArray = (list1: any[], list2: any[]) => {
+ return list1.filter(v => !list2.includes(v))
+}
+// 补集
+export const complementaryArray = (list1: any[], list2: any[]) => {
+ return list1.filter((v) => { return !(list2.includes(v)) })
+ .concat(list2.filter((v) => { return !(list1.includes(v)) }))
+}
+// 并集
+export const unionArray = (list1: any[], list2: any[]) => {
+ return list1.concat(list2.filter((v) => { return !(list1.includes(v)) }))
+}
+// 一维数组去重
+export const uniqueArray = (list: any) => {
+ return [...new Set(list)]
+}
+// 二维数组根据 某一属性 去重
+export const uniqueMultiArray = (list: any, attribute: string) => {
+ const res = new Map()
+ return list.filter((a: any) => !res.has(a[attribute]) && res.set(a[attribute], 1))
+}
+// 一维数组或对象拷贝
+export const cloneArray = (data: any) => {
+ return JSON.parse(JSON.stringify(data))
+}
+// 多维数组或对象深拷贝
+export const deepClone = (data: any) => {
+ return _.cloneDeep(data)
+}
+// 数组操作-下拉框操作(已经选择的数据不能再选)
+/**
+ * @param list 下拉框初始数据(所有)
+ * @param list1 已经选择的数据
+ * @param current 当前数据 可为空
+ * @param attribute 属性(即绑定在 list1哪个属性上)
+ */
+export const setSelectList = (list: any[], list1: any[], current: string, attribute: string, attribute2 = 'value') => {
+ const select = [...new Set(list1.map((item: any) => item[attribute]))].filter((item: string) => item !== current)
+ return list.filter((item) => { return !select.includes(item[attribute2]) })
+}
+// 几个数组的交集
+export function intersectionManyArray(...arrays) {
+ // 获取第一个数组作为初始交集
+ let intersection = arrays.shift()
+
+ // 遍历剩余的数组
+ while (arrays.length) {
+ // 过滤当前交集,只保留那些也在当前数组中的元素
+ intersection = intersection.filter(item => arrays[0].includes(item))
+ // 移动到下一个数组
+ arrays.shift()
+ }
+ return intersection
+}
diff --git a/src/utils/String.ts b/src/utils/String.ts
new file mode 100644
index 0000000..5f0c954
--- /dev/null
+++ b/src/utils/String.ts
@@ -0,0 +1,32 @@
+// 字符串操作方法
+
+// 将 ALARM_CODE -> alarmCode
+export function toHump(name: string) {
+ const str = name.toLowerCase()
+ return str.replace(/\_(\w)/g, (all, letter) => {
+ return letter.toUpperCase()
+ })
+}
+// js判断字母是否大写
+export function isUpperCase(char: string) {
+ return /^[A-Z]+$/.test(char)
+}
+
+// 将对象中所有属性转为驼峰
+export function toHumpObject(data: any) {
+ const result = {} as { [key: string]: string }
+ for (const i in data) {
+ if (isUpperCase(i[0])) {
+ if (i.includes('_')) {
+ result[toHump(i)] = data[i]
+ }
+ else {
+ result[i.toLowerCase()] = data[i]
+ }
+ }
+ else {
+ result[i] = data[i]
+ }
+ }
+ return result
+}
diff --git a/src/utils/dayjs.ts b/src/utils/dayjs.ts
index 37bf2f2..bc8a4b1 100644
--- a/src/utils/dayjs.ts
+++ b/src/utils/dayjs.ts
@@ -1,6 +1,32 @@
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
+import duration from 'dayjs/plugin/duration'
dayjs.locale('zh-cn')
export default dayjs
+
+dayjs.extend(duration)
+// 计算日期差异并返回格式化字符串
+export function getDateDiff(startDateString: string, endDateString: string) {
+ // 创建起始日期和结束日期对象
+ const startDate = dayjs(startDateString, 'YYYY-MM-DD HH:mm:ss')
+ const endDate = dayjs(endDateString, 'YYYY-MM-DD HH:mm:ss')
+
+ // 计算日期差异
+ const diff = endDate.diff(startDate)
+
+ // 提取差异的时间单位
+ const duration = dayjs.duration(diff)
+ console.log(duration, 'duration')
+ const years = duration.years()
+ const months = duration.months()
+ const days = duration.days()
+ const hours = duration.hours()
+ const minutes = duration.minutes()
+ const seconds = duration.seconds()
+ // 格式化为字符串
+ const formattedDiff = `${years > 0 ? years : ''}${years > 0 ? '年' : ''}${months > 0 ? months : ''}${months > 0 ? '个月' : ''}${days > 0 ? days : ''}${days > 0 ? '天' : ''}${hours > 0 ? hours : ''}${hours > 0 ? '小时' : ''}${minutes > 0 ? minutes : ''}${minutes > 0 ? '分' : ''}${seconds > 0 ? seconds : ''}${seconds > 0 ? '秒' : ''}`
+ console.log(formattedDiff, 'formattedDiff')
+ return formattedDiff
+}
diff --git a/src/api/home/alarm/current.ts b/src/api/home/alarm/current.ts
index c78804a..ec20f64 100644
--- a/src/api/home/alarm/current.ts
+++ b/src/api/home/alarm/current.ts
@@ -47,3 +47,13 @@
data,
})
}
+// 流程节点
+export function alarmProcessNode(id: any) {
+ return request({
+ url: '/system/alarmRecords/nodeDetail',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
diff --git a/src/api/home/alarm/history.ts b/src/api/home/alarm/history.ts
new file mode 100644
index 0000000..5f55e82
--- /dev/null
+++ b/src/api/home/alarm/history.ts
@@ -0,0 +1,13 @@
+/**
+ * 历史报警接口
+ */
+import request from '@/api/index'
+
+// 基础列表
+export function getHistoryAlarmListPage(data: any) {
+ return request({
+ url: `/system/alarmRecords/historyListPage?limit=${data.limit}&offset=${data.offset}`,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/home/rule/alarm.ts b/src/api/home/rule/alarm.ts
index f2041d0..30ef3ad 100644
--- a/src/api/home/rule/alarm.ts
+++ b/src/api/home/rule/alarm.ts
@@ -11,6 +11,16 @@
data,
})
}
+// 获取事件下拉
+export function getEventList(id: any) {
+ return request({
+ url: '/system/alarmRule/alarmEventList',
+ method: 'post',
+ data: {
+ id,
+ },
+ })
+}
// 停用或者启用
export function switchStatus(data: any) {
return request({
diff --git "a/src/assets/icons/\344\272\272\345\221\230-0.svg" "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
new file mode 100644
index 0000000..e7a716d
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\344\272\272\345\221\230-1.svg" "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
new file mode 100644
index 0000000..ade2836
--- /dev/null
+++ "b/src/assets/icons/\344\272\272\345\221\230-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\345\274\200\345\247\213.svg" "b/src/assets/icons/\345\274\200\345\247\213.svg"
new file mode 100644
index 0000000..282b030
--- /dev/null
+++ "b/src/assets/icons/\345\274\200\345\247\213.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\346\214\202\350\265\267.svg" "b/src/assets/icons/\346\214\202\350\265\267.svg"
new file mode 100644
index 0000000..458a2c9
--- /dev/null
+++ "b/src/assets/icons/\346\214\202\350\265\267.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\347\273\223\346\235\237.svg" "b/src/assets/icons/\347\273\223\346\235\237.svg"
new file mode 100644
index 0000000..ea70979
--- /dev/null
+++ "b/src/assets/icons/\347\273\223\346\235\237.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-0.svg" "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
new file mode 100644
index 0000000..4e2ab40
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-0.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/src/assets/icons/\350\256\276\345\244\207-1.svg" "b/src/assets/icons/\350\256\276\345\244\207-1.svg"
new file mode 100644
index 0000000..ccb306e
--- /dev/null
+++ "b/src/assets/icons/\350\256\276\345\244\207-1.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue
index 3baff06..2733161 100644
--- a/src/components/Echart/LineChart.vue
+++ b/src/components/Echart/LineChart.vue
@@ -30,7 +30,7 @@
default: () => {
return {
top: 50,
- left: 10,
+ left: 20,
right: 20,
bottom: 10,
containLabel: true, // 是否包含坐标轴的刻度标签
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index b6634ef..9b058fa 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -68,6 +68,19 @@
},
},
{
+ path: '/current/detail',
+ component: () => import('@/views/home/alarm/current/components/detail.vue'),
+ name: 'AlarmCurrentDetail',
+ meta: {
+ title: '报警详情',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/alarm/current',
+ auth: '/alarm/current',
+ },
+ },
+ {
path: 'history',
component: () => import('@/views/home/alarm/history/index.vue'),
name: 'AlarmHistory',
diff --git a/src/utils/Array.ts b/src/utils/Array.ts
new file mode 100644
index 0000000..7defbb6
--- /dev/null
+++ b/src/utils/Array.ts
@@ -0,0 +1,62 @@
+import _ from 'lodash'
+// 常见数组操作
+
+// 两个数组求交集
+export const intersectionArray = (list1: any[], list2: any[]) => {
+ return list1.filter(v => list2.includes(v))
+}
+// 差集 -- 常用于 表格中多选删除
+export const differenceArray = (list1: any[], list2: any[]) => {
+ return list1.filter(v => !list2.includes(v))
+}
+// 补集
+export const complementaryArray = (list1: any[], list2: any[]) => {
+ return list1.filter((v) => { return !(list2.includes(v)) })
+ .concat(list2.filter((v) => { return !(list1.includes(v)) }))
+}
+// 并集
+export const unionArray = (list1: any[], list2: any[]) => {
+ return list1.concat(list2.filter((v) => { return !(list1.includes(v)) }))
+}
+// 一维数组去重
+export const uniqueArray = (list: any) => {
+ return [...new Set(list)]
+}
+// 二维数组根据 某一属性 去重
+export const uniqueMultiArray = (list: any, attribute: string) => {
+ const res = new Map()
+ return list.filter((a: any) => !res.has(a[attribute]) && res.set(a[attribute], 1))
+}
+// 一维数组或对象拷贝
+export const cloneArray = (data: any) => {
+ return JSON.parse(JSON.stringify(data))
+}
+// 多维数组或对象深拷贝
+export const deepClone = (data: any) => {
+ return _.cloneDeep(data)
+}
+// 数组操作-下拉框操作(已经选择的数据不能再选)
+/**
+ * @param list 下拉框初始数据(所有)
+ * @param list1 已经选择的数据
+ * @param current 当前数据 可为空
+ * @param attribute 属性(即绑定在 list1哪个属性上)
+ */
+export const setSelectList = (list: any[], list1: any[], current: string, attribute: string, attribute2 = 'value') => {
+ const select = [...new Set(list1.map((item: any) => item[attribute]))].filter((item: string) => item !== current)
+ return list.filter((item) => { return !select.includes(item[attribute2]) })
+}
+// 几个数组的交集
+export function intersectionManyArray(...arrays) {
+ // 获取第一个数组作为初始交集
+ let intersection = arrays.shift()
+
+ // 遍历剩余的数组
+ while (arrays.length) {
+ // 过滤当前交集,只保留那些也在当前数组中的元素
+ intersection = intersection.filter(item => arrays[0].includes(item))
+ // 移动到下一个数组
+ arrays.shift()
+ }
+ return intersection
+}
diff --git a/src/utils/String.ts b/src/utils/String.ts
new file mode 100644
index 0000000..5f0c954
--- /dev/null
+++ b/src/utils/String.ts
@@ -0,0 +1,32 @@
+// 字符串操作方法
+
+// 将 ALARM_CODE -> alarmCode
+export function toHump(name: string) {
+ const str = name.toLowerCase()
+ return str.replace(/\_(\w)/g, (all, letter) => {
+ return letter.toUpperCase()
+ })
+}
+// js判断字母是否大写
+export function isUpperCase(char: string) {
+ return /^[A-Z]+$/.test(char)
+}
+
+// 将对象中所有属性转为驼峰
+export function toHumpObject(data: any) {
+ const result = {} as { [key: string]: string }
+ for (const i in data) {
+ if (isUpperCase(i[0])) {
+ if (i.includes('_')) {
+ result[toHump(i)] = data[i]
+ }
+ else {
+ result[i.toLowerCase()] = data[i]
+ }
+ }
+ else {
+ result[i] = data[i]
+ }
+ }
+ return result
+}
diff --git a/src/utils/dayjs.ts b/src/utils/dayjs.ts
index 37bf2f2..bc8a4b1 100644
--- a/src/utils/dayjs.ts
+++ b/src/utils/dayjs.ts
@@ -1,6 +1,32 @@
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
+import duration from 'dayjs/plugin/duration'
dayjs.locale('zh-cn')
export default dayjs
+
+dayjs.extend(duration)
+// 计算日期差异并返回格式化字符串
+export function getDateDiff(startDateString: string, endDateString: string) {
+ // 创建起始日期和结束日期对象
+ const startDate = dayjs(startDateString, 'YYYY-MM-DD HH:mm:ss')
+ const endDate = dayjs(endDateString, 'YYYY-MM-DD HH:mm:ss')
+
+ // 计算日期差异
+ const diff = endDate.diff(startDate)
+
+ // 提取差异的时间单位
+ const duration = dayjs.duration(diff)
+ console.log(duration, 'duration')
+ const years = duration.years()
+ const months = duration.months()
+ const days = duration.days()
+ const hours = duration.hours()
+ const minutes = duration.minutes()
+ const seconds = duration.seconds()
+ // 格式化为字符串
+ const formattedDiff = `${years > 0 ? years : ''}${years > 0 ? '年' : ''}${months > 0 ? months : ''}${months > 0 ? '个月' : ''}${days > 0 ? days : ''}${days > 0 ? '天' : ''}${hours > 0 ? hours : ''}${hours > 0 ? '小时' : ''}${minutes > 0 ? minutes : ''}${minutes > 0 ? '分' : ''}${seconds > 0 ? seconds : ''}${seconds > 0 ? '秒' : ''}`
+ console.log(formattedDiff, 'formattedDiff')
+ return formattedDiff
+}
diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue
new file mode 100644
index 0000000..4fb61d3
--- /dev/null
+++ b/src/views/home/alarm/current/components/detail.vue
@@ -0,0 +1,215 @@
+
+
+
+
+
+