Commit 6b8ff550 authored by 晓彤's avatar 晓彤

修改数据结构

parent c377f5f2
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="danger" icon="el-icon-delete" @click="PreActiveDelete(scope.$index)" style="height:40px">删除</el-button> <el-button size="mini" type="danger" icon="el-icon-delete" @click="PreActionDelete(scope.$index)" style="height:40px">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -352,7 +352,9 @@ export default { ...@@ -352,7 +352,9 @@ export default {
parameters: '', parameters: '',
extract: '', extract: '',
validate: '', validate: '',
sceneId: '' sceneId: '',
preAction: ''
// 前置条件 // 前置条件
// preAction: [] // preAction: []
}, },
...@@ -381,18 +383,6 @@ export default { ...@@ -381,18 +383,6 @@ export default {
requestParamsList: [], requestParamsList: [],
responseList: [], responseList: [],
assertionList: [], assertionList: [],
caseForm: {
sceneId: '',
interfaceId: '',
name: '',
headers: '',
parameters: '',
extract: '',
validate: '',
sequence: '',
caseId: '',
newInterfaceId: ''
},
newIndex: 0, newIndex: 0,
newCaseIndex: 0, newCaseIndex: 0,
// 保存传递的参数 // 保存传递的参数
...@@ -537,7 +527,7 @@ export default { ...@@ -537,7 +527,7 @@ export default {
// 编辑场景用例 // 编辑场景用例
editeSceneFrom(row) { editeSceneFrom(row) {
console.log('6666', row) // console.log('6666', row)
this.editDialogVisible = true this.editDialogVisible = true
this.sceneCaseForm.sequence = row.sequence this.sceneCaseForm.sequence = row.sequence
this.sceneCaseForm.interfaceId = row.interfaceId this.sceneCaseForm.interfaceId = row.interfaceId
...@@ -573,7 +563,9 @@ export default { ...@@ -573,7 +563,9 @@ export default {
// 返回断言 // 返回断言
this.assertionList = JSON.parse(row.validate) this.assertionList = JSON.parse(row.validate)
// 前置条件 // 前置条件
this.preActionList = JSON.parse(row.preAction) if (row.preAction.length !== 0) {
this.preActionList = JSON.parse(row.preAction)
}
}, },
// 保存场景用例方法 // 保存场景用例方法
addSceneCaseFrom() { addSceneCaseFrom() {
...@@ -743,7 +735,7 @@ export default { ...@@ -743,7 +735,7 @@ export default {
}) })
}, },
// 删除前置条件 // 删除前置条件
PreActiveDelete(index) { PreActionDelete(index) {
this.preActionList.splice(index, 1) this.preActionList.splice(index, 1)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment