Commit fe2f1698 by 胡悦

添加场景验证

1 parent b3b79cbc
......@@ -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.totalElements
this.loading = false
}).catch(() => {
this.loading = false
......
......@@ -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()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!