Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zanhuangyingji
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
yaqizhang
zanhuangyingji
Commits
1d717671
Commit
1d717671
authored
Apr 07, 2022
by
yaqizhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
样式修改
parent
1f2cd4b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
+25
-17
utils.js
ioc_frontweb/js/utils.js
+25
-17
No files found.
ioc_frontweb/js/utils.js
View file @
1d717671
...
...
@@ -370,10 +370,14 @@ function createLineChartday(options) {
markPoint
:
{
symbol
:
'image://../ioc_frontweb/images/gr.svg'
,
//url替换成你的图片地址
symbolSize
:
15
,
//图片大小
symbolOffset
:[
0
,
'-50%'
],
//图片相对于柱形图x,y轴偏移量,注意要往上移y要是负的
data
:[{
coord
:[
0
,
40
]
//需要展示图片的柱型索引,y轴的value
}],
// symbolOffset:[0,'-50%'],//图片相对于柱形图x,y轴偏移量,注意要往上移y要是负的
data
:
options
.
seriesData
.
map
((
item
,
index
)
=>
{
return
{
value
:
item
+
""
,
xAxis
:
index
,
yAxis
:
item
,
}
}),
label
:{
show
:
false
,
//顶部默认会展示y轴的值,可以设置false,不展示
}
...
...
@@ -448,10 +452,14 @@ function createLineChartmouth(options) {
markPoint
:
{
symbol
:
'image://../ioc_frontweb/images/gr.svg'
,
//url替换成你的图片地址
symbolSize
:
15
,
//图片大小
symbolOffset
:[
0
,
'-50%'
],
//图片相对于柱形图x,y轴偏移量,注意要往上移y要是负的
data
:[{
coord
:[
0
,
40
]
//需要展示图片的柱型索引,y轴的value
}],
// symbolOffset:[0,'-50%'],//图片相对于柱形图x,y轴偏移量,注意要往上移y要是负的
data
:
options
.
seriesData
.
map
((
item
,
index
)
=>
{
return
{
value
:
item
+
""
,
xAxis
:
index
,
yAxis
:
item
,
}
}),
label
:{
show
:
false
,
//顶部默认会展示y轴的值,可以设置false,不展示
}
...
...
@@ -1020,7 +1028,7 @@ function createDeviceNumLineChartmouth(eleId) {
var
opts
=
{
url
:
apis
.
getDeviceReportDatasNum
,
success
:
function
(
res
)
{
console
.
log
(
"
2222222
"
,
res
.
data
)
console
.
log
(
"
3333333
"
,
res
.
data
)
if
(
res
.
code
===
0
)
{
var
options
=
{
eleId
:
eleId
,
...
...
@@ -1158,6 +1166,12 @@ function renderAlarmList(obj) {
var
tmpHtml
=
'<ul>'
;
var
pageData
=
obj
.
pageData
;
for
(
var
i
in
pageData
)
{
let
color
;
if
(
pageData
[
i
].
handledStatus
==
"已消除"
){
color
=
"#64FEFF"
}
else
if
(
pageData
[
i
].
handledStatus
==
"未消除"
){
color
=
"#E827B2"
}
tmpHtml
+=
`<li class="
${
i
%
2
==
0
?
'odd'
:
''
}
" title="
${
pageData
[
i
].
deviceNo
}
-
${
pageData
[
i
].
unitName
}
-
${
new
Date
(
pageData
[
i
].
alarmTime
,
)}
">
...
...
@@ -1167,21 +1181,15 @@ function renderAlarmList(obj) {
<div style="width: 25%; overflow: hidden;">
${
new
Date
(
pageData
[
i
].
alarmTime
).
toLocaleString
(
'zh-CN'
,
{
hour12
:
false
,
})}
</div>
<div class="xc" style="width: 15%; overflow: hidden;">
${
pageData
[
i
].
handledStatus
}
</div>
<div class="xc" style="width: 15%; overflow: hidden;
color:
${
color
}
">
${
pageData
[
i
].
handledStatus
}
</div>
</li>`
;
}
tmpHtml
+=
'</ul>'
;
$
(
'.listContent'
).
html
(
tmpHtml
);
$
(
'.listContent'
).
FontScroll
({
time
:
2000
,
num
:
1
});
var
xc
=
document
.
getElementsByClassName
(
"xc"
)
if
(
xc
===
"已消除"
){
return
{
'color'
:
'#64FEFF'
};
}
else
if
(
xc
===
"未消除"
){
return
{
'color'
:
'#E827B2'
};
}
}
else
{
layLayer
.
alert
(
'暂无数据'
);
}
...
...
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