Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
super-hive-web
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
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SuperHive
front-end
super-hive-web
Commits
c0b6f9e4
Commit
c0b6f9e4
authored
Aug 14, 2020
by
huangcb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into huangcb
parents
cf1ad84e
91bd626c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
12 deletions
+28
-12
index.vue
src/views/device-alarm/alarm-show/index.vue
+18
-12
index.vue
src/views/equipment-management/device-instance/index.vue
+10
-0
No files found.
src/views/device-alarm/alarm-show/index.vue
View file @
c0b6f9e4
...
@@ -7,8 +7,9 @@
...
@@ -7,8 +7,9 @@
label-width=
"80px"
label-width=
"80px"
inline
inline
>
>
<el-form-item
label=
"设备类型:"
prop=
"deviceType"
>
<el-form-item
label=
"设备类型:"
>
<el-select
v-model=
"form.deviceType"
@
change=
"onDeviceTypeChange"
>
<el-select
v-model=
"form.deviceType"
@
change=
"onDeviceTypeChange"
>
<el-option
label=
"全部"
:value=
"null"
/>
<el-option
<el-option
v-for=
"(deviceType, index) in deviceTypeList"
v-for=
"(deviceType, index) in deviceTypeList"
:key=
"index"
:key=
"index"
...
@@ -19,6 +20,7 @@
...
@@ -19,6 +20,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"设备实例:"
prop=
"deviceInstance"
>
<el-form-item
label=
"设备实例:"
prop=
"deviceInstance"
>
<el-select
v-model=
"form.deviceInstance"
placeholder=
"请选择"
>
<el-select
v-model=
"form.deviceInstance"
placeholder=
"请选择"
>
<el-option
label=
"全部"
:value=
"null"
/>
<el-option
<el-option
v-for=
"(deviceInstance, index) in deviceInstanceList"
v-for=
"(deviceInstance, index) in deviceInstanceList"
:key=
"index"
:key=
"index"
...
@@ -27,12 +29,6 @@
...
@@ -27,12 +29,6 @@
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"设备名称:"
prop=
"deviceName"
>
<el-input
v-model=
"form.deviceName"
/>
</el-form-item>
<el-form-item
<el-form-item
label=
"告警等级:"
label=
"告警等级:"
prop=
"alarmLevel"
prop=
"alarmLevel"
...
@@ -43,7 +39,7 @@
...
@@ -43,7 +39,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"getTableData"
>
查询
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"getTableData
(1)
"
>
查询
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetForm"
>
重置
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetForm"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -216,20 +212,30 @@ export default {
...
@@ -216,20 +212,30 @@ export default {
}
}
}
}
},
},
watch
:
{
'
form.deviceType
'
(
val
)
{
if
(
!
val
)
{
this
.
form
.
deviceInstance
=
null
this
.
deviceInstanceList
=
[]
}
}
},
created
()
{
created
()
{
const
{
deviceTypeId
,
deviceInstanceId
}
=
this
.
$route
.
query
const
{
deviceTypeId
,
deviceInstanceId
}
=
this
.
$route
.
query
getAllDeviceModel
()
getAllDeviceModel
()
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
deviceTypeList
=
res
.
data
this
.
deviceTypeList
=
res
.
data
this
.
form
.
deviceType
=
deviceTypeId
||
this
.
deviceTypeList
.
length
?
this
.
deviceTypeList
[
0
].
id
:
null
this
.
form
.
deviceType
=
deviceTypeId
||
null
})
.
then
(
_
=>
{
return
this
.
form
.
deviceType
?
getAllInstanceByDeviceTypeId
({
deviceTypeId
:
this
.
form
.
deviceType
})
:
{
data
:
[]
}
})
})
.
then
(
_
=>
getAllInstanceByDeviceTypeId
({
deviceTypeId
:
this
.
form
.
deviceType
}))
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
deviceInstanceList
=
res
.
data
this
.
deviceInstanceList
=
res
.
data
this
.
form
.
deviceInstance
=
deviceInstanceId
||
this
.
deviceInstanceList
.
length
?
this
.
deviceInstanceList
[
0
].
id
:
null
this
.
form
.
deviceInstance
=
deviceInstanceId
||
null
})
})
.
then
(
_
=>
this
.
getTableData
(
1
))
.
then
(
_
=>
this
.
getTableData
(
1
))
.
catch
(
_
=>
{}
)
.
catch
(
e
=>
console
.
error
(
e
)
)
},
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
...
...
src/views/equipment-management/device-instance/index.vue
View file @
c0b6f9e4
...
@@ -7,6 +7,16 @@
...
@@ -7,6 +7,16 @@
label-width=
"80px"
label-width=
"80px"
inline
inline
>
>
<el-form-item
label=
"设备类型:"
>
<el-select
v-model=
"searchForm.deviceTypeId"
>
<el-option
v-for=
"(deviceType, index) in deviceTypeList"
:key=
"index"
:label=
"deviceType.name"
:value=
"deviceType.id"
/>
</el-select>
</el-form-item>
<el-form-item
<el-form-item
label=
"设备类型:"
label=
"设备类型:"
prop=
"deviceTypeId"
prop=
"deviceTypeId"
...
...
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