Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
3
3DWeb
Project
Project
Details
Activity
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
徐来柯
3DWeb
Commits
2c63bba1
Commit
2c63bba1
authored
Jan 07, 2022
by
徐来柯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update items
parent
804ecde1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
index.html
index.html
+5
-5
index.js
js/index.js
+17
-17
No files found.
index.html
View file @
2c63bba1
...
...
@@ -21,7 +21,7 @@
<div
class=
"item"
>
<div
class=
"item_header"
>
<img
class=
"item_img"
src=
"./imgs/title@2x.png"
alt=
""
>
<span
class=
"item_title"
>
文本标题
</span>
<span
class=
"item_title"
>
数值显示
</span>
</div>
<div
class=
"item_wrap item_val_wrap"
>
<div
class=
"item_wrap_content"
>
...
...
@@ -47,7 +47,7 @@
<div
class=
"item"
>
<div
class=
"item_header"
>
<img
class=
"item_img"
src=
"./imgs/title@2x.png"
alt=
""
>
<span
class=
"item_title"
>
文本标题
</span>
<span
class=
"item_title"
>
电机功率值
</span>
</div>
<div
class=
"item_wrap"
id=
"act_torque"
></div>
</div>
...
...
@@ -55,7 +55,7 @@
<div
class=
"item"
>
<div
class=
"item_header"
>
<img
class=
"item_img"
src=
"./imgs/title@2x.png"
alt=
""
>
<span
class=
"item_title"
>
文本标题
</span>
<span
class=
"item_title"
>
功率趋势
</span>
</div>
<div
class=
"item_wrap"
id=
"torque"
></div>
</div>
...
...
@@ -64,7 +64,7 @@
<div
class=
"item"
>
<div
class=
"item_header"
>
<img
class=
"item_img"
src=
"./imgs/title@2x.png"
alt=
""
>
<span
class=
"item_title"
>
文本标题
</span>
<span
class=
"item_title"
>
转矩趋势
</span>
</div>
<div
class=
"item_wrap"
id=
"right1"
></div>
</div>
...
...
@@ -72,7 +72,7 @@
<div
class=
"item"
>
<div
class=
"item_header"
>
<img
class=
"item_img"
src=
"./imgs/title@2x.png"
alt=
""
>
<span
class=
"item_title"
>
文本标题
</span>
<span
class=
"item_title"
>
电机转矩值
</span>
</div>
<div
class=
"item_wrap"
id=
"right2"
></div>
</div>
...
...
js/index.js
View file @
2c63bba1
...
...
@@ -110,7 +110,7 @@ function getProcess(){
success
:
function
(
res
)
{
let
data
=
[]
name
.
forEach
((
item
,
i
)
=>
{
data
.
push
(
res
.
data
[
i
].
Value
)
data
.
push
(
res
.
data
[
i
].
Value
?
res
.
data
[
i
].
Value
:
0
)
})
mycharts
.
setOption
({
yAxis
:
[
...
...
@@ -277,8 +277,8 @@ function getTorque(){
data1
.
push
(
res
.
data
[
0
].
Value
)
data2
.
push
(
res
.
data
[
1
].
Value
)
dataScatter
.
push
(
0
)
let
now
=
new
Date
();
xAxis
.
push
(
now
.
getHours
()
+
':'
+
now
.
getMinutes
()
+
':'
+
now
.
getSeconds
(
))
//
let now = new Date();
xAxis
.
push
(
/* now.getHours() + ':' + now.getMinutes() + ':' + now.getSeconds() */
dayjs
(
new
Date
()).
format
(
'HH:mm:ss'
))
mycharts
.
setOption
({
xAxis
:{
data
:
xAxis
...
...
@@ -564,7 +564,7 @@ function getRight3() {
let
str
=
``
alarmItem
=
res
.
data
alarmItem
.
forEach
((
item
,
index
)
=>
{
str
+=
`<div class="list list_red" onmouseover="showTips(event,
${
index
}
)" id="alarm
${
index
}
" >
str
+=
`<div class="list list_red"
title="
${
item
.
Info
}
"
onmouseover="showTips(event,
${
index
}
)" id="alarm
${
index
}
" >
<span>
${
item
.
Info
}
</span>
</div>`
})
...
...
@@ -573,16 +573,16 @@ function getRight3() {
});
}
function
showTips
(
e
,
index
)
{
let
tips
=
layer
.
tips
(
alarmItem
[
index
].
Info
,
'#'
+
e
.
currentTarget
.
id
,
{
tips
:
1
,
time
:
0
,
area
:
'auto'
,
maxWidth
:
500
,
skin
:
'table-tips'
,
});
//
function showTips(e, index) {
//
let tips = layer.tips(alarmItem[index].Info, '#' + e.currentTarget.id, {
//
tips: 1,
//
time: 0,
//
area: 'auto',
//
maxWidth: 500,
//
skin: 'table-tips',
//
});
e
.
currentTarget
.
onmouseleave
=
function
()
{
layer
.
closeAll
(
tips
);
}
}
\ No newline at end of file
// e.currentTarget.onmouseleave = function () {
// layer.close(tips);
// }
// }
\ No newline at end of file
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