Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
hnsd
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
liubinyu
hnsd
Commits
1f479bbe
Commit
1f479bbe
authored
4 years ago
by
liubinyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加电厂选择页,如果没有获取到socket数据,弹出提示
parent
511d789f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
Factory.vue
src/views/Factory.vue
+9
-5
No files found.
src/views/Factory.vue
View file @
1f479bbe
...
...
@@ -12,8 +12,8 @@
<!-- 关闭 -->
<transition
name=
"list"
>
<div
v-if=
"!factoryItem"
class=
"factory-block factory-list"
>
<div
class=
"factory-item"
v-for=
"fac of factoryList"
>
<div
class=
"factory-name"
@
mouseover=
"showFactory(fac)"
>
{{
fac
.
plantName
}}
</div>
<div
class=
"factory-item"
v-for=
"fac of factoryList"
:key=
"fac.plantId"
@
mouseover=
"showFactory(fac)"
@
click=
"goPage(fac)"
>
<div
class=
"factory-name"
>
{{
fac
.
plantName
}}
</div>
</div>
</div>
</transition>
...
...
@@ -24,7 +24,7 @@
<div
class=
"y-line"
:style=
"
{height: (factoryItem.plantDevices.length > 11 ? 10 * 4.75 + 'rem' : (factoryItem.plantDevices.length - 1) * 4.75 + 'rem')}">
</div>
<div
class=
"crew-list"
>
<div
class=
"crew-item"
v-for=
"(dev,i) of factoryItem.plantDevices.slice(0,11)"
:class=
"dev.runstate ? 'crew-item-run' : 'crew-item-stop'"
:style=
"
{'align-self': i % 2 !== 1 ? 'flex-start' : 'flex-end'}">
:style=
"
{'align-self': i % 2 !== 1 ? 'flex-start' : 'flex-end'}"
:key="dev.deviceId"
>
<span>
{{
dev
.
deviceName
}}
</span>
<span>
{{
dev
.
runstate
?
'运行'
:
'停机'
}}
</span>
<div
class=
"x-line"
:class=
"i % 2 !== 1 ? 'x-line-s' : 'x-line-l'"
>
...
...
@@ -34,7 +34,7 @@
</div>
<div
class=
"crew-list crew-list2"
v-if=
"factoryItem.plantDevices.length > 11"
>
<div
class=
"crew-item"
v-for=
"(dev,i) in factoryItem.plantDevices.slice(11)"
:class=
"dev.runstate ? 'crew-item-run' : 'crew-item-stop'"
:style=
"
{'align-self': i % 2 !== 1 ? 'flex-start' : 'flex-end'}">
:style=
"
{'align-self': i % 2 !== 1 ? 'flex-start' : 'flex-end'}"
:key="dev.deviceId"
>
<span>
{{
dev
.
deviceName
}}
</span>
<span>
{{
dev
.
runstate
?
'运行'
:
'停机'
}}
</span>
<div
class=
"x-line x-line-m"
></div>
...
...
@@ -156,7 +156,10 @@
},
// 展开电厂
showFactory
(
item
)
{
if
(
!
this
.
socketData
)
return
;
if
(
!
this
.
socketData
)
{
this
.
$message
.
error
(
'暂未获取到机组数据,请稍后重试!'
);
return
;
}
this
.
factoryItem
=
item
;
this
.
initData
();
// 加上延迟,因为有动画
...
...
@@ -347,6 +350,7 @@
align-items
:
center
;
// justify-content: center;
position
:
relative
;
cursor
:
pointer
;
}
.arrow
{
...
...
This diff is collapsed.
Click to expand it.
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