diff --git a/ruoyi-ui/src/api/business/warning/apiwarning.js b/ruoyi-ui/src/api/business/warning/apiwarning.js index ec53fdfe..d8ee9597 100644 --- a/ruoyi-ui/src/api/business/warning/apiwarning.js +++ b/ruoyi-ui/src/api/business/warning/apiwarning.js @@ -43,3 +43,12 @@ export function handleWarning(id) { method: 'put', }) } + + +// 清空预警记录信息 +export function clearAll() { + return request({ + url: '/warning/apiwarning/all', + method: 'delete', + }) +} diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index 52fbb9b3..de5ec376 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -10,7 +10,7 @@
- @@ -153,7 +153,7 @@ export default { var json = eval("(" + str + ")"); if (json.apiName !== undefined && json.warningMessage !== undefined) { let data = json.apiName + "-" + json.warningMessage; - this.visible = true + // this.visible = true return data } } diff --git a/ruoyi-ui/src/utils/socket-server.js b/ruoyi-ui/src/utils/socket-server.js index 2af4148a..432f21a2 100644 --- a/ruoyi-ui/src/utils/socket-server.js +++ b/ruoyi-ui/src/utils/socket-server.js @@ -39,7 +39,7 @@ export default class SocketService { return console.log("您的浏览器不支持WebSocket"); } //网关转发 - let wsUrl = 'ws://localhost:8080/warning/warning/api'; + let wsUrl = 'ws://localhost:8080/warning/webSocket/warning/api'; wsUrl += `/${store.getters.name}` this.ws = new WebSocket(wsUrl) diff --git a/ruoyi-ui/src/views/business/warning/apiwarning/index.vue b/ruoyi-ui/src/views/business/warning/apiwarning/index.vue index 081d4c47..87be68f0 100644 --- a/ruoyi-ui/src/views/business/warning/apiwarning/index.vue +++ b/ruoyi-ui/src/views/business/warning/apiwarning/index.vue @@ -28,6 +28,17 @@ >导出 + + 清空 + + @@ -73,7 +84,7 @@