feat : 接口自动化_显示ID
This commit is contained in:
parent
25f76e9b93
commit
5a903e99cb
|
@ -471,7 +471,6 @@ export default {
|
|||
change = change + 1;
|
||||
this.$store.state.scenarioMap.set(this.currentScenario.id, change);
|
||||
}
|
||||
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
|
@ -1380,7 +1379,7 @@ export default {
|
|||
this.onSampleError = obj.onSampleError;
|
||||
}
|
||||
this.dataProcessing(obj.hashTree);
|
||||
this.addNum(obj.hashTree);
|
||||
|
||||
this.scenarioDefinition = obj.hashTree;
|
||||
}
|
||||
}
|
||||
|
@ -1636,56 +1635,6 @@ export default {
|
|||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
addNum(hashTree){
|
||||
for (let i = 0; i < hashTree.length; i++) {
|
||||
let data = hashTree[i];
|
||||
if(!data.num){
|
||||
if(data.refType){
|
||||
if(data.refType==='API'){
|
||||
let promise = this.getApiDefinitionNumById(data.id);
|
||||
promise.then(result =>{
|
||||
this.$set(data,'num',result);
|
||||
});
|
||||
}else if(data.refType==='CASE'){
|
||||
let promise = this.getApiTestCaseNumById(data.id);
|
||||
promise.then(result =>{
|
||||
this.$set(data,'num',result);
|
||||
});
|
||||
}
|
||||
}else {
|
||||
let promise = this.getScenarioNumById(data.id);
|
||||
promise.then(result =>{
|
||||
this.$set(data,'num',result);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
getApiDefinitionNumById(id){
|
||||
return new Promise((resolve) => {
|
||||
let url = '/api/definition/get/'+id;
|
||||
this.$get(url, response => {
|
||||
resolve(response.data.num);
|
||||
});
|
||||
});
|
||||
},
|
||||
getApiTestCaseNumById(id){
|
||||
return new Promise((resolve) => {
|
||||
let url = '/api/testcase/findById/'+id;
|
||||
this.$get(url, response => {
|
||||
resolve(response.data.num);
|
||||
});
|
||||
});
|
||||
},
|
||||
getScenarioNumById(id){
|
||||
return new Promise((resolve) => {
|
||||
let url = '/api/automation/getApiScenario/'+id;
|
||||
this.$get(url, response => {
|
||||
resolve(response.data.num);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<div class="el-step__icon-inner">{{ data.index }}</div>
|
||||
</div>
|
||||
<el-tag class="ms-left-btn" size="small" :style="{'color': color, 'background-color': backgroundColor}">{{ title }}</el-tag>
|
||||
<el-tag size="mini" v-if="data.method && !data.pluginId">{{ getMethod() }}</el-tag>
|
||||
</slot>
|
||||
<slot name="behindHeaderLeft" v-if="!isMax"></slot>
|
||||
<span>
|
||||
|
@ -21,7 +22,6 @@
|
|||
<el-tooltip placement="top" :content="data.name">
|
||||
<span>{{ data.name }}</span>
|
||||
</el-tooltip>
|
||||
<el-tag size="mini" v-if="data.method && !data.pluginId">{{ getMethod() }}</el-tag>
|
||||
</span>
|
||||
</slot>
|
||||
|
||||
|
|
|
@ -608,7 +608,7 @@ export default {
|
|||
}
|
||||
|
||||
.ms-tag {
|
||||
margin-left: 0px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.ms-step-debug-code {
|
||||
|
|
Loading…
Reference in New Issue