refactor(接口测试): 导入TCP接口页面的下载模板位置优化

--bug=1014631 --user=王孝刚 【接口测试】-接口定义-导入TCP接口页面的下载模板位置优化
https://www.tapd.cn/55049933/s/1195195
This commit is contained in:
wxg0103 2022-07-05 17:16:09 +08:00 committed by f2c-ci-robot[bot]
parent 066dbd9144
commit 4a4856663d
2 changed files with 10 additions and 10 deletions

View File

@ -25,7 +25,7 @@
<ms-select-tree size="small" :data="moduleOptions" :defaultKey="formData.moduleId" @getValue="setModule" <ms-select-tree size="small" :data="moduleOptions" :defaultKey="formData.moduleId" @getValue="setModule"
:obj="moduleObj" clearable checkStrictly/> :obj="moduleObj" clearable checkStrictly/>
</el-form-item> </el-form-item>
<el-form-item v-if="!isHar" :label="$t('commons.import_mode')"> <el-form-item :label="$t('commons.import_mode')" prop="modeId">
<el-select size="small" v-model="formData.modeId" class="project-select" clearable> <el-select size="small" v-model="formData.modeId" class="project-select" clearable>
<el-option v-for="item in modeOptions" :key="item.id" :label="item.name" :value="item.id"/> <el-option v-for="item in modeOptions" :key="item.id" :label="item.name" :value="item.id"/>
</el-select> </el-select>
@ -173,7 +173,11 @@ export default {
moduleId: '', moduleId: '',
coverModule: false coverModule: false
}, },
rules: {}, rules: {
modeId: [
{required: true, message: this.$t('commons.please_select_import_mode'), trigger: 'change'},
],
},
currentModule: {}, currentModule: {},
fileList: [], fileList: [],
moduleObj: { moduleObj: {
@ -203,9 +207,6 @@ export default {
} }
}, },
computed: { computed: {
isHar() {
return this.selectedPlatformValue === 'Har';
},
projectId() { projectId() {
return getCurrentProjectID(); return getCurrentProjectID();
}, },

View File

@ -56,10 +56,9 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="showTemplate"> <el-form-item v-if="showTemplate">
<el-link type="primary" class="download-template" <el-button type="small" @click="downloadTemplate">
@click="downloadTemplate" {{ $t('test_track.case.import.download_template') }}
>{{ $t('test_track.case.import.download_template') }} </el-button>
</el-link>
</el-form-item> </el-form-item>
<el-form-item v-if="isSwagger2"> <el-form-item v-if="isSwagger2">
<el-switch <el-switch
@ -341,7 +340,7 @@ export default {
return this.selectedPlatformValue === 'Swagger2'; return this.selectedPlatformValue === 'Swagger2';
}, },
showImportModel() { showImportModel() {
return this.selectedPlatformValue !== 'Har' && this.selectedPlatformValue !== 'ESB'; return this.selectedPlatformValue !== 'ESB';
}, },
showTemplate() { showTemplate() {
return this.selectedPlatformValue === 'ESB'; return this.selectedPlatformValue === 'ESB';