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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
src/views/customer/scenarioManagement/addScenario.vue
src/views/customer/scenarioManagement/addScenario.vue
View file @
cba23c6
...
@@ -553,11 +553,14 @@ export default {
...
@@ -553,11 +553,14 @@ export default {
contentList
.
forEach
(
item
=>
{
contentList
.
forEach
(
item
=>
{
if
(
item
.
paramValue
.
select
)
{
if
(
item
.
paramValue
.
select
)
{
item
.
paramValue
.
list
=
this
.
deviceContentList
.
find
(
i
=>
item
.
paramValue
.
select
==
i
.
id
).
contentList
item
.
paramValue
.
list
=
this
.
deviceContentList
.
find
(
i
=>
item
.
paramValue
.
select
==
i
.
id
).
contentList
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
=>
{
getOrderValue
({
orderId
:
item
.
paramValue
.
orderId
}).
then
(
res
=>
{
const
val
=
res
.
length
===
0
?
null
:
res
const
val
=
res
.
length
===
0
?
null
:
res
item
.
paramValue
.
lastList
=
val
item
.
paramValue
.
lastList
=
val
})
})
}
}
}
})
})
}
}
if
(
!
val
)
{
if
(
!
val
)
{
...
@@ -707,14 +710,14 @@ export default {
...
@@ -707,14 +710,14 @@ export default {
if
(
val
===
'2'
)
this
.
params
.
conditionList
=
[
_
.
cloneDeep
(
this
.
defalutConditionObj
)]
if
(
val
===
'2'
)
this
.
params
.
conditionList
=
[
_
.
cloneDeep
(
this
.
defalutConditionObj
)]
},
},
// 第一个下拉框change事件
// 第一个下拉框change事件
selectChange
(
val
,
index
,
name
)
{
selectChange
(
e
,
index
,
name
)
{
if
(
name
===
'condition'
)
this
.
params
.
conditionList
[
index
].
paramValue
=
_
.
cloneDeep
(
this
.
defalutConditionObj
.
paramValue
)
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
)
else
if
(
name
===
'content'
)
this
.
params
.
contentList
[
index
].
paramValue
=
_
.
cloneDeep
(
this
.
defalutContentObj
.
paramValue
)
},
},
// 设备状态第二个下拉框
// 设备状态第二个下拉框
firstChange
(
val
,
index
,
name
)
{
firstChange
(
e
,
index
,
name
)
{
if
(
name
===
'condition'
)
{
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
const
value
=
this
.
params
.
conditionList
[
index
].
paramValue
value
.
list
=
arr
value
.
list
=
arr
const
valueArr
=
[
'order'
,
'orderCondition'
,
'orderId'
,
'orderVal'
,
'value'
]
const
valueArr
=
[
'order'
,
'orderCondition'
,
'orderId'
,
'orderVal'
,
'value'
]
...
@@ -724,7 +727,7 @@ export default {
...
@@ -724,7 +727,7 @@ export default {
if
(
value
.
id
)
this
.
$set
(
value
,
'id'
,
null
)
if
(
value
.
id
)
this
.
$set
(
value
,
'id'
,
null
)
if
(
value
.
noValue
)
value
.
noValue
=
false
if
(
value
.
noValue
)
value
.
noValue
=
false
}
else
{
}
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
const
value
=
this
.
params
.
contentList
[
index
].
paramValue
value
.
list
=
arr
value
.
list
=
arr
const
valueArr
=
[
'order'
,
'valType'
,
'orderId'
,
'valueId'
,
'orderVal'
,
'value'
]
const
valueArr
=
[
'order'
,
'valType'
,
'orderId'
,
'valueId'
,
'orderVal'
,
'value'
]
...
@@ -734,9 +737,10 @@ export default {
...
@@ -734,9 +737,10 @@ export default {
}
}
},
},
// 设备状态三个下拉框
// 设备状态三个下拉框
secondChange
(
val
,
index
,
name
)
{
secondChange
(
e
,
index
,
name
)
{
console
.
log
(
e
)
if
(
name
===
'condition'
)
{
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
const
paramValue
=
this
.
params
.
conditionList
[
index
].
paramValue
paramValue
.
noValue
=
false
paramValue
.
noValue
=
false
paramValue
.
order
=
obj
.
orderCode
paramValue
.
order
=
obj
.
orderCode
...
@@ -744,12 +748,12 @@ export default {
...
@@ -744,12 +748,12 @@ export default {
if
(
obj
.
orderValue
)
paramValue
.
orderVal
=
obj
.
orderValue
if
(
obj
.
orderValue
)
paramValue
.
orderVal
=
obj
.
orderValue
else
paramValue
.
noValue
=
true
else
paramValue
.
noValue
=
true
}
else
{
}
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
const
paramValue
=
this
.
params
.
contentList
[
index
].
paramValue
paramValue
.
valType
=
obj
.
orderValueType
paramValue
.
valType
=
obj
.
orderValueType
paramValue
.
orderType
=
obj
.
orderType
paramValue
.
orderType
=
obj
.
orderType
const
id
=
obj
.
id
const
id
=
obj
.
id
if
(
obj
.
orderType
==
=
'2'
)
{
if
(
obj
.
orderType
==
2
)
{
getOrderValue
({
orderId
:
id
}).
then
(
res
=>
{
getOrderValue
({
orderId
:
id
}).
then
(
res
=>
{
const
val
=
res
.
length
===
0
?
null
:
res
const
val
=
res
.
length
===
0
?
null
:
res
this
.
$set
(
paramValue
,
'lastList'
,
val
)
this
.
$set
(
paramValue
,
'lastList'
,
val
)
...
@@ -757,8 +761,8 @@ export default {
...
@@ -757,8 +761,8 @@ export default {
}
}
}
}
},
},
lastChange
(
val
,
index
)
{
lastChange
(
e
,
index
)
{
const
obj
=
this
.
params
.
contentList
[
index
].
paramValue
.
lastList
.
find
(
item
=>
item
.
id
===
val
)
const
obj
=
this
.
params
.
contentList
[
index
].
paramValue
.
lastList
.
find
(
item
=>
item
.
id
===
e
)
const
paramValue
=
this
.
params
.
contentList
[
index
].
paramValue
const
paramValue
=
this
.
params
.
contentList
[
index
].
paramValue
paramValue
.
orderVal
=
obj
.
deviceStatusCode
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