Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kanban-nanjing-11
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
caolun
kanban-nanjing-11
Commits
081278b7
Commit
081278b7
authored
Jun 13, 2024
by
lc0527
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工控屏
parent
7b4bef87
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
10 deletions
+32
-10
index1.html
index1.html
+6
-0
page1.js
js/page1.js
+4
-4
page1.html
page1.html
+12
-4
page3.html
page3.html
+10
-2
No files found.
index1.html
View file @
081278b7
...
...
@@ -207,6 +207,12 @@
// 生产工位websocket
// 初始化
const
ws
=
new
WebSocket
(
'
ws://127.0.0.1:10001/order/ulocScreen/
'
+
codeDianshi
);
//站点id传给凿检屏
var
_siteId
=
{
type
:
'
siteId
'
,
siteId
:
codeDianshi
}
iframe3
.
postMessage
(
JSON
.
stringify
(
_siteId
),
'
*
'
);
//监听是否连接成功
ws
.
onopen
=
function
()
{
wsState
=
ws
.
readyState
...
...
js/page1.js
View file @
081278b7
...
...
@@ -16,9 +16,9 @@ function RightTableInit(list=[]){
$
(
'
#tableIndex
'
).
append
(
groups
[
0
].
map
((
o
,
i
)
=>
`
<li>
<span>
${
o
.
text1
}
</span>
<span>
${
o
.
key
}
</span>
<span>
<span>
${
o
.
text2
}
</span>
<span>
${
o
.
value
}
</span>
<span>台</span>
</span>
</li>
...
...
@@ -45,9 +45,9 @@ function RightTableInit(list=[]){
$
(
'
#tableIndex
'
).
append
(
_obj
.
map
((
o
,
i
)
=>
`
<li>
<span>
${
o
.
text1
}
</span>
<span>
${
o
.
key
}
</span>
<span>
<span>
${
o
.
text2
}
</span>
<span>
${
o
.
value
}
</span>
<span>台</span>
</span>
</li>
...
...
page1.html
View file @
081278b7
...
...
@@ -242,13 +242,12 @@
}
if
(
_data
.
message
.
result
){
if
(
_data
.
message
.
result
.
ALL
){
if
(
_data
.
message
.
All
){
$
(
"
#output-title
"
).
html
(
"
当前总产量
"
);
$
(
"
#output-sum
"
).
html
(
_data
.
message
.
result
.
ALL
);
$
(
"
#output-sum
"
).
html
(
_data
.
message
.
All
.
ALL
);
$
(
"
#output-text
"
).
html
(
"
台
"
);
}
RightTableInit
(
_data
.
message
.
result
);
RightTableInit
(
Object
.
entries
(
_data
.
message
.
result
).
map
(
o
=>
Object
.
assign
({},{
key
:
o
[
0
],
value
:
o
[
1
]}))
);
}
else
{
isNull
(
'
is-null-text-6
'
);
}
...
...
@@ -261,6 +260,15 @@
$
(
"
#msgShowWindow
"
).
addClass
(
"
error
"
);
}
}
if
(
_data
.
type
===
'
warningMag
'
){
if
(
_data
.
message
)
{
//TODO 异常报警信息
let
warningMsg
=
_data
.
message
;
$
(
"
#msgShowWindow
"
).
text
(
warningMsg
);
$
(
"
#msgShowWindow
"
).
addClass
(
"
error
"
);
}
}
if
(
_data
.
type
==
'
broadcast
'
){
if
(
_data
.
message
){
$
(
"
#broadcastShowWindow
"
).
text
(
_data
.
message
);
...
...
page3.html
View file @
081278b7
...
...
@@ -101,7 +101,10 @@
<script>
$
(
document
).
ready
(
function
()
{
let
siteId
=
null
;
window
.
addEventListener
(
'
message
'
,
function
(
event
=
{})
{
const
_data
=
JSON
.
parse
(
(
event
.
data
||
"
{}
"
)
)
console
.
log
(
_data
);
...
...
@@ -133,6 +136,11 @@
$
(
"
#broadcastShowWindow
"
).
text
(
_data
.
message
);
}
}
if
(
_data
.
type
===
'
siteId
'
){
if
(
_data
.
siteId
){
siteId
=
_data
.
siteId
;
}
}
},
false
);
// 初始时关闭提示
closeAlert
();
...
...
@@ -145,14 +153,14 @@
var
upButton
=
document
.
getElementById
(
"
span-botton-up
"
);
upButton
.
addEventListener
(
"
click
"
,
function
()
{
nextOrUpButton
(
"
1194167820541632512
"
,
'
2
'
);
nextOrUpButton
(
siteId
,
'
2
'
);
});
var
nextButton
=
document
.
getElementById
(
"
span-botton-next
"
);
// 添加点击事件处理逻辑
nextButton
.
addEventListener
(
"
click
"
,
function
()
{
nextOrUpButton
(
"
1194167820541632512
"
,
'
1
'
);
nextOrUpButton
(
siteId
,
'
1
'
);
});
...
...
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