Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
AiQIDashboard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AiQIDashboard
Commits
46d5f76b
Commit
46d5f76b
authored
Jul 21, 2026
by
崔婷婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v2
parent
38039a32
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
615 additions
and
816 deletions
+615
-816
index.html
index.html
+1
-0
QcDashboard.vue
src/components/QcDashboard.vue
+86
-813
WorkstationPanel.vue
src/components/WorkstationPanel.vue
+523
-0
index.js
src/ws/index.js
+5
-3
No files found.
index.html
View file @
46d5f76b
...
...
@@ -3,6 +3,7 @@
<head>
<meta
charset=
"UTF-8"
/>
<link
rel=
"icon"
type=
"image/svg+xml"
href=
"/favicon.svg"
/>
<link
rel=
"alternate icon"
href=
"/favicon.svg"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<title>
工厂生产看板
</title>
</head>
...
...
src/components/QcDashboard.vue
View file @
46d5f76b
This diff is collapsed.
Click to expand it.
src/components/WorkstationPanel.vue
0 → 100644
View file @
46d5f76b
This diff is collapsed.
Click to expand it.
src/ws/index.js
View file @
46d5f76b
...
...
@@ -15,12 +15,13 @@
* VITE_WS_URL — WebSocket 地址,默认 ws://127.0.0.1:8080/ws
*/
const
WS_URL
=
import
.
meta
.
env
.
VITE_WS_URL
||
'ws://127.0.0.1:8080/ws'
const
RECONNECT_DELAY
=
2000
// 断线重连间隔(ms)
const
PING_INTERVAL
=
10000
// 心跳间隔(ms)
const
MAX_RECONNECTS
=
0
// 0 = 无限重连
export
function
connect
()
{
export
function
connect
(
url
)
{
const
wsUrl
=
url
||
import
.
meta
.
env
.
VITE_WS_URL
||
'ws://127.0.0.1:8080/ws'
const
handlers
=
{}
const
api
=
{
...
...
@@ -41,6 +42,7 @@ export function connect() {
},
close
()
{
clearInterval
(
pingTimer
)
clearTimeout
(
reconnectTimer
)
reconnectCount
=
-
1
// 阻止重连
if
(
socket
)
socket
.
close
()
},
...
...
@@ -57,7 +59,7 @@ export function connect() {
}
function
createSocket
()
{
socket
=
new
WebSocket
(
WS_URL
)
socket
=
new
WebSocket
(
wsUrl
)
socket
.
addEventListener
(
'open'
,
()
=>
{
reconnectCount
=
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment