diff --git a/public/favicon.ico b/public/favicon.ico
index e263760..8b5b410 100644
Binary files a/public/favicon.ico and b/public/favicon.ico differ
diff --git a/src/api/ems/record/recordAlarmData.js b/src/api/ems/record/recordAlarmData.js
index c1a6367..89e7dea 100644
--- a/src/api/ems/record/recordAlarmData.js
+++ b/src/api/ems/record/recordAlarmData.js
@@ -42,3 +42,11 @@ export function delRecordAlarmData(objId) {
method: 'delete'
})
}
+
+// 新增异常数据记录
+export function handleExceptions(objId) {
+ return request({
+ url: '/ems/record/recordAlarmData/handleExceptions/' + objId,
+ method: 'post'
+ })
+}
diff --git a/src/assets/logo/logo.png b/src/assets/logo/logo.png
index e263760..117cd32 100644
Binary files a/src/assets/logo/logo.png and b/src/assets/logo/logo.png differ
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 94733d5..2771ee4 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -1,26 +1,38 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -57,8 +125,41 @@ import Search from '@/components/HeaderSearch'
import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc'
import settings from '@/settings'
+import { handleExceptions, listRecordAlarmData } from '@/api/ems/record/recordAlarmData'
export default {
+ dicts: ['alarm_type', 'alarm_status'],
+ data() {
+ return {
+ poolNameList: [],
+ poolName: '',
+ alarmTitle: '异常处理',
+ alarmOpen: false,
+ alarmLoading: false,
+ alarmDataList: [],
+ alarmDataTotal: 0,
+ // 选中数组
+ objIds: [],
+ // 非单个禁用
+ single: true,
+ // 非多个禁用
+ multiple: true,
+ // 查询参数
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ alarmStatus: '1'
+ }
+ }
+ },
+ created() {
+ localStorage.setItem('this.alarmDataTotal', 0)
+ },
+ mounted() {
+ // 定时获取提示路由信息
+ this.getAlarmData()
+ // setInterval(() => this.getAlarmData(), 1000 * 60);
+ },
components: {
Breadcrumb,
TopNav,
@@ -93,6 +194,58 @@ export default {
}
},
methods: {
+ // 打开右下角异常
+ openAlarm() {
+ this.$notify({
+ title: '异常数据提示',
+ position: 'bottom-right',
+ message: this.$createElement(
+ 'div',
+ {
+ on: {
+ click: () => {
+ this.getAlarmData(true)
+ }
+ }
+ },
+ [this.$createElement('el-button', {}, ['点击查看'])]
+ )
+ })
+ },
+ /** 报警列表 */
+ getAlarmData(open) {
+ this.alarmOpen = open
+ this.alarmLoading = true
+ this.getAlarmDataList()
+ },
+ getAlarmDataList() {
+ listRecordAlarmData(this.queryParams).then((response) => {
+ this.alarmDataList = response.rows
+ this.alarmDataTotal = response.total
+ this.alarmLoading = false
+ if (localStorage.getItem('this.alarmDataTotal') != this.alarmDataTotal) {
+ localStorage.setItem('this.alarmDataTotal', this.alarmDataTotal)
+ this.openAlarm()
+ }
+ })
+ },
+ /** 跳转处理 */
+ jumpProcessing(row) {
+ if (this.objIds.length === 0) {
+ this.$modal.msgWarning('请勾选设备进行异常处理!')
+ return
+ }
+ handleExceptions(this.objIds).then(response => {
+ this.$modal.msgSuccess('处理成功')
+ this.alarmOpen = false
+ })
+ },
+ // 多选框选中数据
+ handleSelectionChangeAlarm(selection) {
+ this.objIds = selection.map((item) => item.objId)
+ this.single = selection.length !== 1
+ this.multiple = !selection.length
+ },
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
@@ -103,23 +256,41 @@ export default {
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
- if (!settings.casEnable){
- location.href = '/index';
+ if (!settings.casEnable) {
+ location.href = '/index'
}
})
- }).catch(() => {});
+ }).catch(() => {
+ })
}
}
}