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 fe2f1698
authored
Mar 30, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加场景验证
1 parent
b3b79cbc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
35 deletions
src/components/d2-table/index.vue
src/views/customer/scenarioManagement/addScenario.vue
src/views/customer/scenarioManagement/index.vue
src/components/d2-table/index.vue
View file @
fe2f169
...
...
@@ -266,7 +266,7 @@ export default {
}
this
.
getListApi
(
params
).
then
(
res
=>
{
this
.
data
=
res
[
this
.
tableParams
.
listName
]
this
.
total
=
res
.
totalElements
this
.
total
=
res
.
total
||
res
.
total
Elements
this
.
loading
=
false
}).
catch
(()
=>
{
this
.
loading
=
false
...
...
src/views/customer/scenarioManagement/addScenario.vue
View file @
fe2f169
This diff is collapsed.
Click to expand it.
src/views/customer/scenarioManagement/index.vue
View file @
fe2f169
...
...
@@ -113,34 +113,35 @@ export default {
},
scenarioRuleForm
:
{
conditionRule
:
''
,
executeCycle
:
''
},
conditionList
:
[
{
key
:
parseInt
(
Math
.
random
()
*
1000
)
,
type
:
1
,
paramKey
:
''
,
paramValue
:
{
date
:
''
,
select
:
''
,
order
:
''
,
value
:
''
executeCycle
:
''
,
conditionList
:
[
{
key
:
parseInt
(
Math
.
random
()
*
1000
),
type
:
1
,
paramKey
:
''
,
paramValue
:
{
date
:
''
,
select
:
''
,
order
:
''
,
value
:
''
}
}
}
],
contentList
:
[
{
key
:
parseInt
(
Math
.
random
()
*
1000
)
,
type
:
2
,
paramKey
:
''
,
paramValue
:
{
msg
:
''
,
select
:
''
,
order
:
''
,
orderVal
:
''
],
contentList
:
[
{
key
:
parseInt
(
Math
.
random
()
*
1000
),
type
:
2
,
paramKey
:
''
,
paramValue
:
{
msg
:
''
,
select
:
''
,
order
:
''
,
orderVal
:
''
}
}
}
]
]
}
}
}
},
...
...
@@ -162,19 +163,21 @@ export default {
for
(
const
i
in
scenarioParams
.
basicForm
)
{
scenarioParams
.
basicForm
[
i
]
=
res
[
i
]
}
for
(
const
i
in
scenarioParams
.
scenarioRuleForm
)
{
if
(
i
===
'conditionRule'
)
scenarioParams
.
scenarioRuleForm
[
i
]
=
''
+
res
[
i
]
else
scenarioParams
.
scenarioRuleForm
[
i
]
=
res
[
i
]
}
scenarioParams
.
scenarioRuleForm
.
conditionRule
=
scenarioParams
.
scenarioRuleForm
[
'conditionRule'
]
=
''
+
res
[
'conditionRule'
]
scenarioParams
.
scenarioRuleForm
.
executeCycle
=
scenarioParams
.
scenarioRuleForm
[
'executeCycle'
]
=
res
[
'executeCycle'
]
// for (const i in scenarioParams.scenarioRuleForm) {
// if (i === 'conditionRule') scenarioParams.scenarioRuleForm[i] = '' + res[i]
// else scenarioParams.scenarioRuleForm[i] = res[i]
// }
scenarioParams
.
basicForm
.
id
=
res
.
id
const
templateList
=
res
.
templateList
scenarioParams
.
conditionList
=
[]
scenarioParams
.
contentList
=
[]
scenarioParams
.
scenarioRuleForm
.
conditionList
=
[]
scenarioParams
.
scenarioRuleForm
.
contentList
=
[]
if
(
templateList
.
length
!==
0
)
{
templateList
.
forEach
(
item
=>
{
item
.
paramValue
=
JSON
.
parse
(
item
.
paramValue
)
if
(
item
.
type
===
1
)
scenarioParams
.
conditionList
.
push
(
item
)
else
if
(
item
.
type
===
2
)
scenarioParams
.
contentList
.
push
(
item
)
if
(
item
.
type
===
1
)
scenarioParams
.
scenarioRuleForm
.
conditionList
.
push
(
item
)
else
if
(
item
.
type
===
2
)
scenarioParams
.
scenarioRuleForm
.
contentList
.
push
(
item
)
})
}
this
.
hideDialog
()
...
...
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