From 3acec796e54dc2f5e7d93e8ca72db7da9ec46f60 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期一, 28 四月 2025 17:33:56 +0800 Subject: [PATCH] 2025.04.28 --- src/views/HomeView.vue | 2 +- src/api/index.js | 4 ++-- src/assets/styles/layout.scss | 2 +- src/views/inspection/WorkStream.vue | 24 +++++++++++++----------- src/api/fysp/evaluateApi.js | 10 ++++++++++ 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/api/fysp/evaluateApi.js b/src/api/fysp/evaluateApi.js new file mode 100644 index 0000000..be71191 --- /dev/null +++ b/src/api/fysp/evaluateApi.js @@ -0,0 +1,10 @@ +import { $fysp } from '../index' + +export default { + /** + * 鑾峰彇鑷姩璇勪及鍘嗗彶璁板綍 + */ + fetchAutoEvaluation(param) { + return $fysp.post(`evaluation/auto/record`, param).then((res) => res.data) + } +} diff --git a/src/api/index.js b/src/api/index.js index fea72e0..40b98c6 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,13 +1,13 @@ import axios from 'axios' import { ElMessage } from 'element-plus' -const debug = true +const debug = false var IP = '47.100.191.150' var PORT = '9005' if (debug) { IP = '192.168.0.138' - PORT = '8082' + PORT = '8080' } let ws = `${IP}:${PORT}` diff --git a/src/assets/styles/layout.scss b/src/assets/styles/layout.scss index 91e786b..7c477fc 100644 --- a/src/assets/styles/layout.scss +++ b/src/assets/styles/layout.scss @@ -1,5 +1,5 @@ :root { - --fy-header-height: 40px; + --fy-header-height: 0px; --fy-body-height: calc(100vh - var(--fy-header-height)); } diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index ed6c588..9546f15 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1,5 +1,5 @@ <template> - <core-header></core-header> + <!-- <core-header></core-header> --> <div class="fy-body"> <router-view></router-view> </div> diff --git a/src/views/inspection/WorkStream.vue b/src/views/inspection/WorkStream.vue index 6408be8..1f71798 100644 --- a/src/views/inspection/WorkStream.vue +++ b/src/views/inspection/WorkStream.vue @@ -79,7 +79,9 @@ if (socket) { socket.close() } - socket = new WebSocket(`ws://192.168.0.138:8082/workstream`) + const url = 'ws://' + ws + '/workstream' + // socket = new WebSocket(`ws://192.168.0.138:8080/workstream`) + socket = new WebSocket(url) // 涓庢湇鍔″櫒寤虹珛杩炴帴锛氬彂閫佹秷鎭埌鏈嶅姟鍣� socket.onopen = () => { console.log('connect: ') @@ -110,16 +112,16 @@ } onMounted(() => { - handleLink() - // setInterval(() => { - // streams.push({ - // time: dayjs().format('YYYY-MM-DD HH:mm:ss'), - // user: users[parseInt(Math.random() * users.length)], - // obj: objs[parseInt(Math.random() * objs.length)], - // event: events[parseInt(Math.random() * events.length)] - // }) - // scrollToBottom() - // }, 10000) + // handleLink() + setInterval(() => { + streams.push({ + time: dayjs().format('YYYY-MM-DD HH:mm:ss'), + userName: users[parseInt(Math.random() * users.length)], + obj: objs[parseInt(Math.random() * objs.length)], + event: events[parseInt(Math.random() * events.length)] + }) + scrollToBottom() + }, 5000) }) onUnmounted(() => { socket.close() -- Gitblit v1.9.3