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

修改数据结构

parent c377f5f2
......@@ -135,7 +135,7 @@
</el-table-column>
<el-table-column label="操作">
<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>
</el-table-column>
</el-table>
......@@ -352,7 +352,9 @@ export default {
parameters: '',
extract: '',
validate: '',
sceneId: ''
sceneId: '',
preAction: ''
// 前置条件
// preAction: []
},
......@@ -381,18 +383,6 @@ export default {
requestParamsList: [],
responseList: [],
assertionList: [],
caseForm: {
sceneId: '',
interfaceId: '',
name: '',
headers: '',
parameters: '',
extract: '',
validate: '',
sequence: '',
caseId: '',
newInterfaceId: ''
},
newIndex: 0,
newCaseIndex: 0,
// 保存传递的参数
......@@ -537,7 +527,7 @@ export default {
// 编辑场景用例
editeSceneFrom(row) {
console.log('6666', row)
// console.log('6666', row)
this.editDialogVisible = true
this.sceneCaseForm.sequence = row.sequence
this.sceneCaseForm.interfaceId = row.interfaceId
......@@ -573,7 +563,9 @@ export default {
// 返回断言
this.assertionList = JSON.parse(row.validate)
// 前置条件
this.preActionList = JSON.parse(row.preAction)
if (row.preAction.length !== 0) {
this.preActionList = JSON.parse(row.preAction)
}
},
// 保存场景用例方法
addSceneCaseFrom() {
......@@ -743,7 +735,7 @@ export default {
})
},
// 删除前置条件
PreActiveDelete(index) {
PreActionDelete(index) {
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