Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-carowner
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit cba23c6e
authored
Apr 14, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改场景内容第四个选项
1 parent
ff1dd588
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
src/views/customer/scenarioManagement/addScenario.vue
src/views/customer/scenarioManagement/addScenario.vue
View file @
cba23c6
...
...
@@ -553,10 +553,13 @@ export default {
contentList
.
forEach
(
item
=>
{
if
(
item
.
paramValue
.
select
)
{
item
.
paramValue
.
list
=
this
.
deviceContentList
.
find
(
i
=>
item
.
paramValue
.
select
==
i
.
id
).
contentList
getOrderValue
({
orderId
:
item
.
paramValue
.
orderId
}).
then
(
res
=>
{
const
val
=
res
.
length
===
0
?
null
:
res
item
.
paramValue
.
lastList
=
val
})
item
.
paramValue
.
orderType
=
item
.
paramValue
.
list
.
find
(
j
=>
item
.
paramValue
.
orderId
==
j
.
id
).
orderType
if
(
item
.
paramValue
.
orderType
==
2
)
{
getOrderValue
({
orderId
:
item
.
paramValue
.
orderId
}).
then
(
res
=>
{
const
val
=
res
.
length
===
0
?
null
:
res
item
.
paramValue
.
lastList
=
val
})
}
}
})
}
...
...
@@ -707,14 +710,14 @@ export default {
if
(
val
===
'2'
)
this
.
params
.
conditionList
=
[
_
.
cloneDeep
(
this
.
defalutConditionObj
)]
},
// 第一个下拉框change事件
selectChange
(
val
,
index
,
name
)
{
selectChange
(
e
,
index
,
name
)
{
if
(
name
===
'condition'
)
this
.
params
.
conditionList
[
index
].
paramValue
=
_
.
cloneDeep
(
this
.
defalutConditionObj
.
paramValue
)
else
if
(
name
===
'content'
)
this
.
params
.
contentList
[
index
].
paramValue
=
_
.
cloneDeep
(
this
.
defalutContentObj
.
paramValue
)
},
// 设备状态第二个下拉框
firstChange
(
val
,
index
,
name
)
{
firstChange
(
e
,
index
,
name
)
{
if
(
name
===
'condition'
)
{
const
arr
=
this
.
deviceConditionList
.
find
(
item
=>
item
.
id
===
val
).
conditionList
const
arr
=
this
.
deviceConditionList
.
find
(
item
=>
item
.
id
===
e
).
conditionList
const
value
=
this
.
params
.
conditionList
[
index
].
paramValue
value
.
list
=
arr
const
valueArr
=
[
'order'
,
'orderCondition'
,
'orderId'
,
'orderVal'
,
'value'
]
...
...
@@ -724,7 +727,7 @@ export default {
if
(
value
.
id
)
this
.
$set
(
value
,
'id'
,
null
)
if
(
value
.
noValue
)
value
.
noValue
=
false
}
else
{
const
arr
=
this
.
deviceContentList
.
find
(
item
=>
item
.
id
===
val
).
contentList
const
arr
=
this
.
deviceContentList
.
find
(
item
=>
item
.
id
===
e
).
contentList
const
value
=
this
.
params
.
contentList
[
index
].
paramValue
value
.
list
=
arr
const
valueArr
=
[
'order'
,
'valType'
,
'orderId'
,
'valueId'
,
'orderVal'
,
'value'
]
...
...
@@ -734,9 +737,10 @@ export default {
}
},
// 设备状态三个下拉框
secondChange
(
val
,
index
,
name
)
{
secondChange
(
e
,
index
,
name
)
{
console
.
log
(
e
)
if
(
name
===
'condition'
)
{
const
obj
=
this
.
params
.
conditionList
[
index
].
paramValue
.
list
.
find
(
item
=>
item
.
id
===
val
)
const
obj
=
this
.
params
.
conditionList
[
index
].
paramValue
.
list
.
find
(
item
=>
item
.
id
===
e
)
const
paramValue
=
this
.
params
.
conditionList
[
index
].
paramValue
paramValue
.
noValue
=
false
paramValue
.
order
=
obj
.
orderCode
...
...
@@ -744,12 +748,12 @@ export default {
if
(
obj
.
orderValue
)
paramValue
.
orderVal
=
obj
.
orderValue
else
paramValue
.
noValue
=
true
}
else
{
const
obj
=
this
.
params
.
contentList
[
index
].
paramValue
.
list
.
find
(
item
=>
item
.
id
===
val
)
const
obj
=
this
.
params
.
contentList
[
index
].
paramValue
.
list
.
find
(
item
=>
item
.
id
===
e
)
const
paramValue
=
this
.
params
.
contentList
[
index
].
paramValue
paramValue
.
valType
=
obj
.
orderValueType
paramValue
.
orderType
=
obj
.
orderType
const
id
=
obj
.
id
if
(
obj
.
orderType
==
=
'2'
)
{
if
(
obj
.
orderType
==
2
)
{
getOrderValue
({
orderId
:
id
}).
then
(
res
=>
{
const
val
=
res
.
length
===
0
?
null
:
res
this
.
$set
(
paramValue
,
'lastList'
,
val
)
...
...
@@ -757,8 +761,8 @@ export default {
}
}
},
lastChange
(
val
,
index
)
{
const
obj
=
this
.
params
.
contentList
[
index
].
paramValue
.
lastList
.
find
(
item
=>
item
.
id
===
val
)
lastChange
(
e
,
index
)
{
const
obj
=
this
.
params
.
contentList
[
index
].
paramValue
.
lastList
.
find
(
item
=>
item
.
id
===
e
)
const
paramValue
=
this
.
params
.
contentList
[
index
].
paramValue
paramValue
.
orderVal
=
obj
.
deviceStatusCode
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment