Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
乳
乳山瑞博-大屏
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
xinzhedeai
乳山瑞博-大屏
Commits
fc90dac9
Commit
fc90dac9
authored
Apr 11, 2025
by
forevertyler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:大屏
parent
d2b1994c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
240 additions
and
167 deletions
+240
-167
.env.development
.env.development
+1
-1
.env.production
.env.production
+6
-0
settings.js
config/settings.js
+1
-0
dist.zip
dist.zip
+0
-0
newApi.js
src/api/newApi.js
+9
-0
index.vue
src/views/Screen/index.vue
+223
-166
No files found.
.env.development
View file @
fc90dac9
...
@@ -4,7 +4,7 @@ ENV = 'development'
...
@@ -4,7 +4,7 @@ ENV = 'development'
VUE_APP_LOCAL_PORT = '8059'
VUE_APP_LOCAL_PORT = '8059'
VUE_APP_WS_API = 'ws://localhost:8000'
VUE_APP_WS_API = 'ws://localhost:8000'
VUE_APP_BASE_API = 'http://192.168.2.15:8059'
VUE_APP_BASE_API = 'http://192.168.2.15:8059'
# VUE_APP_LOCAL_API = 'http://192.168.3.60:12113'
VUE_APP_LOCAL_API = 'http://192.168.2.37:9015'
VUE_APP_LOCAL_API = 'http://192.168.2.37:9015'
VUE_APP_D3Tileset = 'http://192.168.2.15:8080/Apps/assets/media/rushanruibo'
VUE_APP_D3Tileset = 'http://192.168.2.15:8080/Apps/assets/media/rushanruibo'
...
...
.env.production
View file @
fc90dac9
...
@@ -5,8 +5,14 @@ ENV = 'production'
...
@@ -5,8 +5,14 @@ ENV = 'production'
# 如果接口是 http 形式, wss 需要改为 ws
# 如果接口是 http 形式, wss 需要改为 ws
# ------------------------
# ------------------------
# VUE_APP_BASE_API = 'http://192.168.3.60:12113'
# VUE_APP_LOCAL_API = 'http://192.168.3.60:12112'
# VUE_APP_D3Tileset = 'http://192.168.3.60:12113/3dtile'
VUE_APP_BASE_API = 'http://192.168.10.11:5003'
VUE_APP_BASE_API = 'http://192.168.10.11:5003'
VUE_APP_LOCAL_API = 'http://192.168.10.11:9005'
VUE_APP_LOCAL_API = 'http://192.168.10.11:9005'
VUE_APP_D3Tileset = 'http://192.168.10.11:5003/3dtile'
VUE_APP_D3Tileset = 'http://192.168.10.11:5003/3dtile'
VUE_APP_SYS_PORT = '8060'
VUE_APP_SYS_PORT = '8060'
#VUE_APP_liveQing = 'http://192.168.10.11:5003'
#VUE_APP_liveQing = 'http://192.168.10.11:5003'
config/settings.js
View file @
fc90dac9
var
ServiceURL
=
'
http://192.168.10.11:9005
'
;
var
ServiceURL
=
'
http://192.168.10.11:9005
'
;
// var ServiceURL = 'http://192.168.3.60:12112';
// var ServiceURL = 'http://192.168.2.37:9005';
// var ServiceURL = 'http://192.168.2.37:9005';
window
.
VUE_APP_API
=
{
ServiceURL
:
ServiceURL
}
window
.
VUE_APP_API
=
{
ServiceURL
:
ServiceURL
}
dist.zip
deleted
100644 → 0
View file @
d2b1994c
File deleted
src/api/newApi.js
0 → 100644
View file @
fc90dac9
import
request
from
'
@/utils/request
'
export
function
percarcount
(
params
)
{
return
request
({
url
:
'
tab/datascreen/percarcount
'
,
method
:
'
get
'
,
params
})
}
src/views/Screen/index.vue
View file @
fc90dac9
...
@@ -377,10 +377,11 @@ import { CoordTransform } from '@/assets/js/CoordTransform.js';
...
@@ -377,10 +377,11 @@ import { CoordTransform } from '@/assets/js/CoordTransform.js';
import
{
getToken
,
setToken
,
removeToken
}
from
'
@/utils/auth
'
;
import
{
getToken
,
setToken
,
removeToken
}
from
'
@/utils/auth
'
;
import
{
encrypt
}
from
'
@/utils/rsaEncrypt
'
;
import
{
encrypt
}
from
'
@/utils/rsaEncrypt
'
;
import
{
openAlarm
,
closeAlarm
}
from
'
@/api/alarmEquCtrl.js
'
;
import
{
openAlarm
,
closeAlarm
}
from
'
@/api/alarmEquCtrl.js
'
;
import
{
percarcount
}
from
'
@/api/newApi
'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
timerRef
:
null
,
navActive
:
null
,
navActive
:
null
,
view0
:{
view0
:{
//产量总览
//产量总览
...
@@ -457,6 +458,7 @@ export default {
...
@@ -457,6 +458,7 @@ export default {
finishNum
:
706
,
finishNum
:
706
,
monitorNum
:
40
,
monitorNum
:
40
,
areaSwitchFalg
:
false
,
areaSwitchFalg
:
false
,
percarcountList
:[],
personnelList
:[
personnelList
:[
{
{
longitude
:
121.70710830038986
,
longitude
:
121.70710830038986
,
...
@@ -481,6 +483,8 @@ export default {
...
@@ -481,6 +483,8 @@ export default {
mounted
()
{
mounted
()
{
var
that
=
this
;
var
that
=
this
;
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
setRefreshTimer
();
this
.
getPerCardCount
()
var
views
=
that
.
$el
.
querySelectorAll
(
"
#b0_>div
"
);
var
views
=
that
.
$el
.
querySelectorAll
(
"
#b0_>div
"
);
var
a0a_
=
that
.
$el
.
querySelector
(
"
#a0a_
"
);
var
a0a_
=
that
.
$el
.
querySelector
(
"
#a0a_
"
);
...
@@ -678,6 +682,28 @@ export default {
...
@@ -678,6 +682,28 @@ export default {
},
},
methods
:
{
methods
:
{
setRefreshTimer
()
{
// 设置定时器,30分钟后刷新页面
this
.
timer
=
setTimeout
(()
=>
{
this
.
refreshPage
();
},
30
*
60
*
1000
);
},
clearRefreshTimer
()
{
// 清除定时器
if
(
this
.
timer
)
{
clearTimeout
(
this
.
timer
);
this
.
timer
=
null
;
}
},
refreshPage
()
{
// 刷新页面
window
.
location
.
reload
();
},
getPerCardCount
(){
percarcount
().
then
(
res
=>
{
this
.
percarcountList
=
res
.
body
})
},
showPersonInfo
(
description
)
{
showPersonInfo
(
description
)
{
// 使用 Cesium 的 InfoBox 显示信息
// 使用 Cesium 的 InfoBox 显示信息
this
.
viewer
.
selectedEntity
=
this
.
viewer
.
entities
.
add
({
this
.
viewer
.
selectedEntity
=
this
.
viewer
.
entities
.
add
({
...
@@ -688,6 +714,7 @@ export default {
...
@@ -688,6 +714,7 @@ export default {
this
.
viewer
.
infoBox
.
frame
.
contentDocument
.
write
(
description
);
this
.
viewer
.
infoBox
.
frame
.
contentDocument
.
write
(
description
);
this
.
viewer
.
infoBox
.
frame
.
contentDocument
.
close
();
this
.
viewer
.
infoBox
.
frame
.
contentDocument
.
close
();
this
.
viewer
.
infoBox
.
viewModel
.
showInfo
=
true
;
this
.
viewer
.
infoBox
.
viewModel
.
showInfo
=
true
;
this
.
viewer
.
scene
.
globe
.
depthTestAgainstTerrain
=
true
;
},
},
module0
(
m
,
t
,
f
,
dmIndex
,
view
){
// 数据总览
module0
(
m
,
t
,
f
,
dmIndex
,
view
){
// 数据总览
// console.log(m,t,f,dmIndex,'数据总览')
// console.log(m,t,f,dmIndex,'数据总览')
...
@@ -898,68 +925,84 @@ export default {
...
@@ -898,68 +925,84 @@ export default {
let
currentBatch
=
0
;
let
currentBatch
=
0
;
const
batchMap
=
{};
const
batchMap
=
{};
// 创建
人员定位
卡模型
// 创建
定位人员
卡模型
m
.
createPersonModel
=
function
()
{
m
.
createPersonModel
=
function
()
{
// 保存interval ID以便后续清除
// 保存interval ID以便后续清除
if
(
!
m
.
personModelInterval
)
{
if
(
!
m
.
personModelInterval
)
{
m
.
personModelInterval
=
setInterval
(()
=>
{
m
.
personModelInterval
=
setInterval
(()
=>
{
currentBatch
++
;
// 每次定时器触发,生成新的批次号
currentBatch
++
;
// 每次定时器触发,生成新的批次号
// console.log(m.bgEntities, '(m.bgEntities)');
// 清除旧实体(只清除当前批次的实体)
// 清除旧实体(只清除当前批次的实体)
if
(
m
.
bgEntities
)
{
if
(
m
.
bgEntities
)
{
for
(
let
key
in
m
.
bgEntities
)
{
for
(
let
key
in
m
.
bgEntities
)
{
console
.
log
(
isNaN
(
parseFloat
(
key
)),
'
key
'
)
if
(
m
.
bgEntities
.
hasOwnProperty
(
key
))
{
if
(
m
.
bgEntities
.
hasOwnProperty
(
key
))
{
const
entity
=
m
.
bgEntities
[
key
];
const
entity
=
m
.
bgEntities
[
key
];
// 检查实体是否属于当前批次
// 检查实体是否属于当前批次
if
(
entity
.
batch
===
currentBatch
-
1
)
{
// if (entity.batch === currentBatch - 1) {
self
.
viewer
.
entities
.
remove
(
entity
);
// 检查 entity.info 是否包含 perName
delete
m
.
bgEntities
[
key
];
// if (entity.info && Object.keys(entity.info).includes('perName'))
}
if
(
isNaN
(
parseFloat
(
key
)))
{
self
.
viewer
.
entities
.
remove
(
entity
);
console
.
log
(
m
.
bgEntities
,
m
.
bgEntities
[
key
],
'
(mEntities.bg)
'
);
delete
m
.
bgEntities
[
key
];
}
// }
}
}
}
}
}
}
m
.
personCardList
().
then
(
function
(
list
)
{
m
.
personCardList
().
then
(
function
(
list
)
{
// console.log(list, 'list');
// console.log(list, 'list');
let
perList
=
list
;
// 使用全部人员数据
let
perList
=
list
;
// 使用全部人员数据
// let perList = [{lng:'121.70710830038986',lat:'36.854636402927986',hight:20,perName:'aaa',},{lng:'121.70710830038986',lat:'36.853636402927986',hight:30,perName:'bbb',}]
// 创建新实体
// 创建新实体
for
(
let
item
of
perList
)
{
for
(
let
item
of
perList
)
{
let
lng
=
Number
(
item
.
lng
);
let
lng
=
Number
(
item
.
lng
);
let
lat
=
Number
(
item
.
lat
);
let
lat
=
Number
(
item
.
lat
);
let
height
=
Number
(
item
.
hight
);
let
height
=
Number
(
item
.
hight
);
let
position
=
Cesium
.
Cartesian3
.
fromDegrees
(
lng
,
lat
,
height
);
let
position
=
Cesium
.
Cartesian3
.
fromDegrees
(
lng
,
lat
,
height
);
console
.
log
(
position
,
'
position
'
)
let
url
=
"
/static/images/poi-marker-default.png
"
;
let
url
=
"
/static/images/poi-marker-default.png
"
;
let
entity
=
self
.
viewer
.
entities
.
add
({
let
entity
=
self
.
viewer
.
entities
.
add
({
position
:
position
,
position
:
position
,
label
:
{
// fixedFrame: fixedFrame,
text
:
item
.
perName
,
label
:
{
font
:
'
normal 28px sans-serif
'
,
text
:
item
.
perName
,
scale
:
0.5
,
font
:
'
normal 28px sans-serif
'
,
color
:
Cesium
.
Color
.
WHITE
,
scale
:
0.5
,
showBackground
:
true
,
color
:
Cesium
.
Color
.
WHITE
,
horizontalOrigin
:
Cesium
.
HorizontalOrigin
.
CENTER
,
showBackground
:
true
,
verticalOrigin
:
Cesium
.
VerticalOrigin
.
BOTTOM
,
horizontalOrigin
:
Cesium
.
HorizontalOrigin
.
CENTER
,
distanceDisplayCondition
:
new
Cesium
.
DistanceDisplayCondition
(
10.0
,
8000.0
),
verticalOrigin
:
Cesium
.
VerticalOrigin
.
BOTTOM
,
disableDepthTestDistance
:
2500.0
,
distanceDisplayCondition
:
new
Cesium
.
DistanceDisplayCondition
(
1.0
,
8000.0
),
heightReference
:
Cesium
.
HeightReference
.
CLAMP_TO_GROUND
,
// disableDepthTestDistance: 2500.0,
pixelOffset
:
new
Cesium
.
Cartesian2
(
0
,
-
35
),
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
fillColor
:
Cesium
.
Color
.
WHITE
,
pixelOffset
:
new
Cesium
.
Cartesian2
(
0
,
-
35
),
backgroundColor
:
new
Cesium
.
Color
(
0.0
,
0.486
,
0.650
,
0.8
),
fillColor
:
Cesium
.
Color
.
WHITE
,
},
backgroundColor
:
new
Cesium
.
Color
(
0.0
,
0.486
,
0.650
,
0.8
),
billboard
:
{
disableDepthTestDistance
:
5
,
image
:
url
,
heightReference
:
Cesium
.
HeightReference
.
CLAMP_TO_GROUND
scale
:
0.5
,
},
heightReference
:
Cesium
.
HeightReference
.
CLAMP_TO_GROUND
,
billboard
:
{
distanceDisplayCondition
:
new
Cesium
.
DistanceDisplayCondition
(
10.0
,
8000.0
),
image
:
url
,
horizontalOrigin
:
Cesium
.
HorizontalOrigin
.
CENTER
,
scale
:
0.5
,
verticalOrigin
:
Cesium
.
VerticalOrigin
.
BOTTOM
,
heightReference
:
Cesium
.
HeightReference
.
CLAMP_TO_GROUND
,
},
disableDepthTestDistance
:
5
,
description
:
`<div><h4>
${
item
.
perName
}
</h4></div>`
,
distanceDisplayCondition
:
new
Cesium
.
DistanceDisplayCondition
(
1.0
,
8000.0
),
horizontalOrigin
:
Cesium
.
HorizontalOrigin
.
CENTER
,
verticalOrigin
:
Cesium
.
VerticalOrigin
.
BOTTOM
,
},
description
:
`<div><h4>
${
item
.
perName
}
</h4></div>`
,
fixedFrame
:
Cesium
.
Transforms
.
eastNorthUpToFixedFrame
(
position
),
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
});
});
entity
.
info
=
item
;
entity
.
info
=
item
;
// 添加 info 属性
entity
.
batch
=
currentBatch
;
// 标记当前批次
entity
.
batch
=
currentBatch
;
// 标记当前批次
m
.
bgEntities
[
item
.
perName
]
=
entity
;
// 存储新实体
m
.
bgEntities
[
item
.
perName
]
=
entity
;
// 存储新实体
}
}
...
@@ -1277,10 +1320,13 @@ export default {
...
@@ -1277,10 +1320,13 @@ export default {
// 人员
// 人员
m
.
percarCount
=
function
(){
m
.
percarCount
=
function
(){
reqApi
.
common
.
requstEdge
(
'
get
'
,
'
/tab/datascreen/percarcount
'
,
{
time
:
'
week
'
}
).
then
((
res
)
=>
{
reqApi
.
common
.
requstEdge
(
'
get
'
,
'
/tab/datascreen/percarcount
'
,
).
then
((
res
)
=>
{
var
body
=
res
.
body
||
{};
var
body
=
res
.
body
||
{};
console
.
log
(
body
,
'
??????
'
)
var
xData
=
body
.
xData
;
var
yData
=
body
.
yData
;
var
colors
=
[
Highchart
.
getRandomColor
(
0
),
Highchart
.
getRandomColor
(
2
),
"
#38f1f3
"
];
var
colors
=
[
Highchart
.
getRandomColor
(
0
),
Highchart
.
getRandomColor
(
2
),
"
#38f1f3
"
];
var
series
=
Highchart
.
formatSeriesList
(
body
.
lists
,
{
value
:
'
values.person
'
,
categoriesKye
:
'
dateUnit
'
,
colors
:
colors
,
serie
:{
name
:
'
人员统计
'
}});
//
var series = Highchart.formatSeriesList(body.lists, {value:'values.person', categoriesKye:'dateUnit', colors:colors, serie:{name:'人员统计'}});
var
options2
=
{
var
options2
=
{
chartConfig
:{
chartConfig
:{
...
@@ -1306,7 +1352,7 @@ export default {
...
@@ -1306,7 +1352,7 @@ export default {
},
},
xAxis
:
{
xAxis
:
{
// categories: series.categories,
// categories: series.categories,
categories
:
[
'
2025-02-15
'
,
'
2025-02-16
'
,
'
2025-02-17
'
,
'
2025-02-18
'
,
'
2025-02-19
'
,
'
2025-02-20
'
,
'
2025-02-21
'
,
'
2025-02-22
'
,
'
2025-02-23
'
,
'
2025-02-24
'
,
'
2025-02-25
'
,
'
2025-02-26
'
,
'
2025-02-27
'
,]
,
categories
:
xData
,
},
},
yAxis
:
{
yAxis
:
{
title
:
{
title
:
{
...
@@ -1318,7 +1364,7 @@ export default {
...
@@ -1318,7 +1364,7 @@ export default {
},
},
series
:
[
series
:
[
{
{
data
:
[
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
,
16
]
data
:
yData
}
}
],
],
},
},
...
@@ -1330,138 +1376,146 @@ export default {
...
@@ -1330,138 +1376,146 @@ export default {
};
};
// 报警弹窗-可变形
// 报警弹窗-可变形
m
.
createAlarmView
=
function
(){
m
.
createAlarmView
=
function
()
{
let
that
=
this
;
let
that
=
this
;
var
checkHtml
=
''
;
var
checkHtml
=
''
;
var
list
=
[{
areaCode
:
1
,
name
:
'
1111
'
}];
var
list
=
[{
areaCode
:
1
,
name
:
'
1111
'
}];
for
(
var
item
of
list
)
{
for
(
var
item
of
list
)
{
checkHtml
+=
'
<div><input type="checkbox" data-type="list" value="
'
+
item
.
areaCode
+
'
"/>
'
+
item
.
name
+
'
dfgdfg</div>
'
;
checkHtml
+=
'
<div><input type="checkbox" data-type="list" value="
'
+
item
.
areaCode
+
'
"/>
'
+
item
.
name
+
'
dfgdfg</div>
'
;
};
};
return
qf
.
UI
.
popWindow
({
return
qf
.
UI
.
popWindow
({
name
:
'
morphView1
'
,
name
:
'
morphView1
'
,
container
:
self
.
$el
,
// id || Element对象
container
:
self
.
$el
,
// id || Element对象
className
:
'
morph1
'
,
className
:
'
morph1
'
,
html
:
'
<div class="morphView"></div>
'
,
html
:
'
<div class="morphView"></div>
'
,
show
:
false
,
show
:
false
,
onload
:
function
(
o
)
{
onload
:
function
(
o
)
{
var
el
=
o
.
el
,
wrap
=
o
.
Wrap
,
morphView
=
wrap
.
firstElementChild
;
var
el
=
o
.
el
,
wrap
=
o
.
Wrap
,
morphView
=
wrap
.
firstElementChild
;
o
.
setStyle
(
wrap
,
{
o
.
setStyle
(
wrap
,
{
bottom
:
'
0.3rem
'
,
left
:
'
50%
'
,
height
:
0
,
width
:
0
,
zIndex
:
1
,
bottom
:
'
0.3rem
'
,
left
:
'
50%
'
,
height
:
0
,
width
:
0
,
zIndex
:
1
,
transformOrigin
:
'
0px 0px
'
,
transformOrigin
:
'
0px 0px
'
,
justifyContent
:
'
center
'
,
justifyContent
:
'
center
'
,
});
});
// 数据绑定
// 数据绑定
Object
.
defineProperty
(
o
,
'
shrink
'
,
{
Object
.
defineProperty
(
o
,
'
shrink
'
,
{
set
:
function
(
f
){
set
:
function
(
f
)
{
if
(
f
){
if
(
f
)
{
morphView
.
classList
.
add
(
'
f-prepare
'
);
morphView
.
classList
.
add
(
'
f-prepare
'
);
morphView
.
classList
.
add
(
'
f-shrink
'
);
morphView
.
classList
.
add
(
'
f-shrink
'
);
morphView
.
classList
.
remove
(
'
f-anim-revert
'
);
morphView
.
classList
.
remove
(
'
f-anim-revert
'
);
}
else
{
}
else
{
morphView
.
classList
.
add
(
'
f-anim-revert
'
);
morphView
.
classList
.
add
(
'
f-anim-revert
'
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
morphView
.
classList
.
remove
(
'
f-shrink
'
);
morphView
.
classList
.
remove
(
'
f-shrink
'
);
morphView
.
classList
.
remove
(
'
f-prepare
'
);
morphView
.
classList
.
remove
(
'
f-prepare
'
);
},
200
);
},
200
);
};
};
}
}
});
});
//
<
input
type
=
"
checkbox
"
value
=
"
0
"
checked
/>
全选
<
/div
>
//
<
input
type
=
"
checkbox
"
value
=
"
0
"
checked
/>
全选
<
/div
>
el
.
innerHTML
=
`
el
.
innerHTML
=
`
<div class="content">
<div class="content">
<div class="fixed">
<div class="fixed">
<dl class="scrolling4"></dl>
<dl class="scrolling4"></dl>
</div>
</div>
<i class="el-icon-circle-close"></i>
<i class="el-icon-circle-close"></i>
</div>
</div>
<div class="el-icon-bell"></div>
<div class="el-icon-bell"></div>
`
;
`
;
var
content
=
el
.
firstElementChild
;
var
content
=
el
.
firstElementChild
;
o
.
scroll
=
content
.
firstElementChild
.
firstElementChild
;
o
.
scroll
=
content
.
firstElementChild
.
firstElementChild
;
const
optBtnWrapper
=
document
.
createElement
(
'
div
'
);
const
optBtnWrapper
=
document
.
createElement
(
'
div
'
);
optBtnWrapper
.
className
=
'
optBtnWrapper
'
;
optBtnWrapper
.
className
=
'
optBtnWrapper
'
;
const
startAlarmBtn
=
document
.
createElement
(
'
a
'
);
const
startAlarmBtn
=
document
.
createElement
(
'
a
'
);
startAlarmBtn
.
className
=
'
button alarm
'
;
startAlarmBtn
.
className
=
'
button alarm
'
;
startAlarmBtn
.
id
=
'
startAlarmBtn
'
;
startAlarmBtn
.
id
=
'
startAlarmBtn
'
;
startAlarmBtn
.
innerHTML
=
'
开始
'
;
startAlarmBtn
.
innerHTML
=
'
开始
'
;
const
stopAlarmBtn
=
document
.
createElement
(
'
a
'
);
const
stopAlarmBtn
=
document
.
createElement
(
'
a
'
);
stopAlarmBtn
.
className
=
'
button stop
'
;
stopAlarmBtn
.
className
=
'
button stop
'
;
stopAlarmBtn
.
id
=
'
stopAlarmBtn
'
;
stopAlarmBtn
.
id
=
'
stopAlarmBtn
'
;
stopAlarmBtn
.
innerHTML
=
'
停止
'
;
stopAlarmBtn
.
innerHTML
=
'
停止
'
;
el
.
appendChild
(
optBtnWrapper
);
el
.
appendChild
(
optBtnWrapper
);
optBtnWrapper
.
appendChild
(
startAlarmBtn
);
optBtnWrapper
.
appendChild
(
startAlarmBtn
);
optBtnWrapper
.
appendChild
(
stopAlarmBtn
);
optBtnWrapper
.
appendChild
(
stopAlarmBtn
);
o
.
updateList
=
function
(
list
)
{
o
.
updateList
=
function
(
list
){
var
dds
=
''
;
var
dds
=
''
;
for
(
var
item
of
list
)
{
for
(
var
item
of
list
){
var
state
=
item
.
state
===
1
?
'
报警中
'
:
'
已处理
'
;
var
state
=
item
.
state
===
1
?
'
报警中
'
:
'
已处理
'
;
dds
+=
'
<dd><span>
'
+
item
.
name
+
'
</span><span class="red">
'
+
state
+
'
</span><span>
'
+
item
.
time
+
'
</span></dd>
'
;
dds
+=
'
<dd><span>
'
+
item
.
name
+
'
</span><span class="red">
'
+
state
+
'
</span><span>
'
+
item
.
time
+
'
</span></dd>
'
;
}
};
return
o
.
scroll
.
innerHTML
=
dds
,
o
.
scroll
return
o
.
scroll
.
innerHTML
=
dds
,
o
.
scroll
;
};
};
// 事件
// 事件
wrap
.
onclick
=
function
(
e
){
wrap
.
onclick
=
function
(
e
)
{
var
tag
=
e
.
target
||
e
.
srcElement
;
var
tag
=
e
.
target
||
e
.
srcElement
;
if
(
tag
.
className
===
'
el-icon-circle-close
'
){
if
(
tag
.
className
===
'
el-icon-circle-close
'
)
{
o
.
shrink
=
true
;
o
.
shrink
=
true
;
}
else
if
(
tag
.
className
===
'
el-icon-bell
'
){
optBtnWrapper
.
style
.
opacity
=
'
0
'
;
o
.
shrink
=
false
;
}
else
if
(
tag
.
className
===
'
el-icon-bell
'
)
{
};
o
.
shrink
=
false
;
};
optBtnWrapper
.
style
.
opacity
=
'
1
'
;
startAlarmBtn
.
addEventListener
(
'
click
'
,
()
=>
{
};
openAlarm
().
then
(
res
=>
{
};
res
.
body
===
200
?
new
qf
.
UI
.
Notify
({
startAlarmBtn
.
addEventListener
(
'
click
'
,
()
=>
{
position
:
'
top
'
,
openAlarm
().
then
(
res
=>
{
zIndex
:
2050
,
res
.
body
===
200
?
new
qf
.
UI
.
Notify
({
type
:
'
success
'
,
position
:
'
top
'
,
duration
:
3000
,
zIndex
:
2050
,
autoOpen
:
true
,
type
:
'
success
'
,
message
:
res
.
body
,
duration
:
3000
,
}):
new
qf
.
UI
.
Notify
({
autoOpen
:
true
,
position
:
'
top
'
,
message
:
res
.
body
,
zIndex
:
2050
,
})
:
new
qf
.
UI
.
Notify
({
type
:
'
warning
'
,
position
:
'
top
'
,
duration
:
3000
,
zIndex
:
2050
,
autoOpen
:
true
,
type
:
'
warning
'
,
message
:
res
.
body
,
duration
:
3000
,
})
autoOpen
:
true
,
})
message
:
res
.
body
,
});
})
stopAlarmBtn
.
addEventListener
(
'
click
'
,
()
=>
{
})
closeAlarm
().
then
(
res
=>
{
});
res
.
body
===
200
?
new
qf
.
UI
.
Notify
({
stopAlarmBtn
.
addEventListener
(
'
click
'
,
()
=>
{
position
:
'
top
'
,
closeAlarm
().
then
(
res
=>
{
zIndex
:
2050
,
res
.
body
===
200
?
new
qf
.
UI
.
Notify
({
type
:
'
success
'
,
position
:
'
top
'
,
duration
:
3000
,
zIndex
:
2050
,
autoOpen
:
true
,
type
:
'
success
'
,
message
:
res
.
body
,
duration
:
3000
,
}):
new
qf
.
UI
.
Notify
({
autoOpen
:
true
,
position
:
'
top
'
,
message
:
res
.
body
,
zIndex
:
2050
,
})
:
new
qf
.
UI
.
Notify
({
type
:
'
warning
'
,
position
:
'
top
'
,
duration
:
3000
,
zIndex
:
2050
,
autoOpen
:
true
,
type
:
'
warning
'
,
message
:
res
.
body
,
duration
:
3000
,
})
autoOpen
:
true
,
})
message
:
res
.
body
,
});
})
},
})
});
});
// 初次加载时触发 el-icon-circle-close 点击事件
const
closeIcon
=
el
.
querySelector
(
'
.el-icon-circle-close
'
);
if
(
closeIcon
)
{
closeIcon
.
click
();
}
},
});
// 打开 filter
// 打开 filter
//
t.morphView1.open();
//
t.morphView1.open();
};
};
// unload
// unload
...
@@ -2374,6 +2428,9 @@ export default {
...
@@ -2374,6 +2428,9 @@ export default {
});
});
},
},
},
},
beforeDestroy
()
{
this
.
clearRefreshTimer
();
},
}
}
</
script
>
</
script
>
...
...
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