修复用例编排“提取”和“校验”填写不能保存的bug以及优化拖曳排序逻辑、后端拼接url逻辑
This commit is contained in:
@@ -293,6 +293,22 @@ export default {
|
||||
})
|
||||
}
|
||||
}
|
||||
if (flag === "assignment") {
|
||||
if (e && this.form.assignment.length === scope.$index + 1) {
|
||||
this.form.assignment.push({
|
||||
key: "",
|
||||
value: ""
|
||||
})
|
||||
}
|
||||
}
|
||||
if (flag === "assertion") {
|
||||
if (e && this.form.assertion.length === scope.$index + 1) {
|
||||
this.form.assertion.push({
|
||||
key: "",
|
||||
value: ""
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
handleDelete(flag, scope) {
|
||||
if (flag === "header") {
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
<div>
|
||||
</div>
|
||||
<el-collapse v-model="activeName" accordion v-if="list && list.length">
|
||||
<draggable v-model="list" @end="onDragEnd">
|
||||
<draggable v-model="list" @end="onDragEnd" handle=".drag-handle">
|
||||
<el-collapse-item :name="index" v-for="(item, index) in list" :key="index" v-if="!item.parentId">
|
||||
<template slot="title">
|
||||
<el-button size="mini" plain type="warning" icon="el-icon-rank" circle style="margin-right: 12px"/>
|
||||
<el-tag effect="plain" style="width: 70px;text-align: center;margin-right: 12px;">{{ dict.type.step_type.findLast(t => t.value == item.type).label }}</el-tag>
|
||||
<el-tag v-if="item.name" effect="plain" style="width: 240px;text-align: center;margin-right: 12px;" type="info">{{ item.name }}</el-tag>
|
||||
<el-tag v-if="item.datasourceId" effect="plain" style="width: 240px;text-align: center;margin-right: 12px;" type="info">{{ datasourceList.findLast(t => t.id === item.datasourceId).name }}</el-tag>
|
||||
<el-tag v-if="item.requestUrl" effect="plain" style="text-align: center;margin-right: 12px;" type="success">{{ item.requestUrl }}</el-tag>
|
||||
<el-tag effect="plain" style="text-align: center;margin-right: 12px;">{{ index + 1 }}</el-tag>
|
||||
<el-button size="mini" plain type="warning" icon="el-icon-rank" circle style="margin-right: 12px" class="drag-handle"/>
|
||||
<el-tag effect="plain" style="width: 70px;text-align: center;margin-right: 12px;" class="drag-handle">{{ dict.type.step_type.findLast(t => t.value == item.type).label }}</el-tag>
|
||||
<el-tag v-if="item.name" effect="plain" style="width: 240px;text-align: center;margin-right: 12px;" type="info" class="drag-handle">{{ item.name }}</el-tag>
|
||||
<el-tag v-if="item.datasourceId" effect="plain" style="width: 240px;text-align: center;margin-right: 12px;" type="info" class="drag-handle">{{ datasourceList.findLast(t => t.id === item.datasourceId).name }}</el-tag>
|
||||
<el-tag v-if="item.requestUrl" effect="plain" style="text-align: center;margin-right: 12px;" type="success" class="drag-handle">{{ item.requestUrl }}</el-tag>
|
||||
<el-tag effect="plain" style="text-align: center;margin-right: 12px;" class="drag-handle">{{ index + 1 }}</el-tag>
|
||||
</template>
|
||||
<el-button size="mini" type="text" @click="handleDel(index)" style="float: right">删除</el-button>
|
||||
<page1 v-if="item.type == 1" :form="item" :hosts="hosts"/>
|
||||
|
||||
Reference in New Issue
Block a user