fix(接口测试): 引用场景批量操作不统一问题

Signed-off-by: fit2-zhao <yong.zhao@fit2cloud.com>
This commit is contained in:
fit2-zhao 2023-06-30 17:50:34 +08:00 committed by 刘瑞斌
parent 18916a41ca
commit af5de2521d
3 changed files with 16 additions and 7 deletions

View File

@ -2403,10 +2403,19 @@ export default {
} }
}, },
getAllResourceIds() { getAllResourceIds() {
if (this.$refs.stepTree) { let resourceIds = [];
return this.$refs.stepTree.getCheckedKeys(); this.filterAllStep(this.scenarioDefinition, resourceIds);
return resourceIds;
},
filterAllStep(stepArray, resourceIds) {
if (stepArray) {
stepArray.forEach(item =>{
resourceIds.push(item.resourceId);
if(item.referenced !== 'REF' && item.hashTree){
this.filterAllStep(item.hashTree,resourceIds);
}
})
} }
return [];
}, },
getAllCheckedNodes() { getAllCheckedNodes() {
if (this.$refs.stepTree) { if (this.$refs.stepTree) {

View File

@ -27,7 +27,7 @@
</el-radio-group> </el-radio-group>
<div v-if="body.type == 'Form Data' || body.type == 'WWW_FORM'"> <div v-if="body.type == 'Form Data' || body.type == 'WWW_FORM'">
<el-row v-if="body.type == 'Form Data' || body.type == 'WWW_FORM'" class="ms-el-link"> <el-row v-if="body.type == 'Form Data' || body.type == 'WWW_FORM'" class="ms-el-link">
<el-link style="margin-right: 5px" @click="batchAdd"> {{ $t('commons.batch_add') }}</el-link> <el-link style="margin-right: 5px" @click="batchAdd" :disabled="isReadOnly"> {{ $t('commons.batch_add') }}</el-link>
<api-params-config <api-params-config
v-if="apiParamsConfigFields" v-if="apiParamsConfigFields"
@refresh="refreshApiParamsField" @refresh="refreshApiParamsField"

View File

@ -19,7 +19,7 @@
</span> </span>
</el-tooltip> </el-tooltip>
<el-row> <el-row>
<el-link class="ms-el-link" @click="batchAdd" style="color: var(--primary_color)"> <el-link class="ms-el-link" @click="batchAdd" :disabled="isReadOnly">
{{ $t('commons.batch_add') }} {{ $t('commons.batch_add') }}
</el-link> </el-link>
</el-row> </el-row>
@ -53,7 +53,7 @@
</span> </span>
</el-tooltip> </el-tooltip>
<el-row class="ms-el-link"> <el-row class="ms-el-link">
<el-link @click="batchAdd" style="margin-right: 5px; color: var(--primary_color)"> <el-link @click="batchAdd" style="margin-right: 5px;" :disabled="isReadOnly">
{{ $t('commons.batch_add') }} {{ $t('commons.batch_add') }}
</el-link> </el-link>
<api-params-config <api-params-config
@ -89,7 +89,7 @@
</span> </span>
</el-tooltip> </el-tooltip>
<el-row class="ms-el-link"> <el-row class="ms-el-link">
<el-link @click="batchAdd" style="margin-right: 5px; color: var(--primary_color)"> <el-link @click="batchAdd" style="margin-right: 5px" :disabled="isReadOnly">
{{ $t('commons.batch_add') }} {{ $t('commons.batch_add') }}
</el-link> </el-link>
<api-params-config <api-params-config