fix:国际化

This commit is contained in:
wenyann 2021-03-18 16:10:38 +08:00
parent e7d78334f1
commit e8fd3f1847
6 changed files with 44 additions and 14 deletions

View File

@ -377,7 +377,7 @@ public class TestCaseReviewService {
sqlSession.flushStatements(); sqlSession.flushStatements();
//同步添加关联的接口和测试用例 //同步添加关联的接口和测试用例
if(request.getChecked()){ /* if(request.getChecked()){
if (!testCaseIds.isEmpty()) { if (!testCaseIds.isEmpty()) {
testCaseIds.forEach(caseId -> { testCaseIds.forEach(caseId -> {
TestCaseWithBLOBs testDtail=testCaseMapper.selectByPrimaryKey(caseId); TestCaseWithBLOBs testDtail=testCaseMapper.selectByPrimaryKey(caseId);
@ -434,7 +434,7 @@ public class TestCaseReviewService {
}); });
} }
} }*/
TestCaseReview testCaseReview = testCaseReviewMapper.selectByPrimaryKey(request.getReviewId()); TestCaseReview testCaseReview = testCaseReviewMapper.selectByPrimaryKey(request.getReviewId());
if (StringUtils.equals(testCaseReview.getStatus(), TestCaseReviewStatus.Prepare.name()) if (StringUtils.equals(testCaseReview.getStatus(), TestCaseReviewStatus.Prepare.name())
|| StringUtils.equals(testCaseReview.getStatus(), TestCaseReviewStatus.Completed.name())) { || StringUtils.equals(testCaseReview.getStatus(), TestCaseReviewStatus.Completed.name())) {

View File

@ -1,6 +1,7 @@
<template> <template>
<el-dialog :close-on-click-modal="false" :title="$t('api_test.api_import.title')" width="30%" <el-dialog :close-on-click-modal="false" :title="$t('api_test.api_import.title')" width="30%"
:visible.sync="visible" class="api-import" v-loading="result.loading" @close="close"> :visible.sync="visible" class="api-import" v-loading="result.loading" @close="close"
:destroy-on-close="true">
<div class="header-bar"> <div class="header-bar">
<div>{{ $t('api_test.api_import.data_format') }}</div> <div>{{ $t('api_test.api_import.data_format') }}</div>
@ -23,12 +24,12 @@
<el-form :model="formData" :rules="rules" label-width="100px" v-loading="result.loading" ref="form"> <el-form :model="formData" :rules="rules" label-width="100px" v-loading="result.loading" ref="form">
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item :label="$t('commons.import_module')"> <el-form-item :label="$t('commons.import_module')" prop="moduleId">
<el-select size="small" v-model="formData.moduleId" class="project-select" clearable> <el-select size="small" v-model="formData.moduleId" class="project-select" clearable>
<el-option v-for="item in moduleOptions" :key="item.id" :label="item.path" :value="item.id"/> <el-option v-for="item in moduleOptions" :key="item.id" :label="item.path" :value="item.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="!isScenarioModel&&!isHar" :label="$t('commons.import_mode')"> <el-form-item v-if="!isScenarioModel&&!isHar" :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>
@ -167,7 +168,14 @@ export default {
modeId: this.$t('commons.not_cover'), modeId: this.$t('commons.not_cover'),
moduleId: '', moduleId: '',
}, },
rules: {}, rules: {
modeId: [
{required: true, message: this.$t('commons.please_select_import_mode'), trigger: 'change'},
],
moduleId: [
{required: true, message: this.$t('commons.please_select_import_module'), trigger: 'change'},
],
},
currentModule: {}, currentModule: {},
fileList: [] fileList: []
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<el-dialog title="表头显示字段" :visible.sync="dialogTableVisible" :append-to-body="true"> <el-dialog :title="$t('table.header_display_field')" :visible.sync="dialogTableVisible" :append-to-body="true">
<tree-transfer :title="['待选字段', '已选字段']" <tree-transfer :title="[$t('table.fields_to_be_selected'), $t('table.selected_fields')]"
:from_data='optionalFields' :from_data='optionalFields'
:draggable="true" :draggable="true"
:to_data='fieldSelected' :to_data='fieldSelected'

View File

@ -1,7 +1,9 @@
export default { export default {
commons: { commons: {
pass_rate:'Pass rate', please_select_import_mode: 'Please select import mode',
execution_times:'Execution times', please_select_import_module: 'Please select import module',
pass_rate: 'Pass rate',
execution_times: 'Execution times',
cover: 'Cover', cover: 'Cover',
not_cover: 'Not Cover', not_cover: 'Not Cover',
import: 'Import', import: 'Import',
@ -1608,5 +1610,10 @@ export default {
delete_prompt: 'This operation will delete the authentication source, do you want to continue? ', delete_prompt: 'This operation will delete the authentication source, do you want to continue? ',
title: 'Auth Source', title: 'Auth Source',
auth_name_valid: 'Name does not support special characters', auth_name_valid: 'Name does not support special characters',
},
table: {
header_display_field: 'Header display field',
fields_to_be_selected: 'Fields to be selected',
selected_fields: 'Selected fields'
} }
}; };

View File

@ -1,7 +1,9 @@
export default { export default {
commons: { commons: {
pass_rate:'通过率', please_select_import_mode: '请选择导入模式',
execution_times:'执行次数', please_select_import_module: '请选择导入模块',
pass_rate: '通过率',
execution_times: '执行次数',
cover: '覆盖', cover: '覆盖',
not_cover: '不覆盖', not_cover: '不覆盖',
import: '导入', import: '导入',
@ -1611,5 +1613,10 @@ export default {
delete_prompt: '此操作会删除认证源,是否继续?', delete_prompt: '此操作会删除认证源,是否继续?',
title: '认证设置', title: '认证设置',
auth_name_valid: '名称不支持特殊字符', auth_name_valid: '名称不支持特殊字符',
},
table: {
header_display_field: '表头显示字段',
fields_to_be_selected: '待选字段',
selected_fields: '已选字段'
} }
}; };

View File

@ -1,7 +1,9 @@
export default { export default {
commons: { commons: {
pass_rate:'通過率', please_select_import_mode: '請選擇導入模式',
execution_times:'執行次數', please_select_import_module: '請選擇導入模塊',
pass_rate: '通過率',
execution_times: '執行次數',
cover: '覆蓋', cover: '覆蓋',
not_cover: '不覆蓋', not_cover: '不覆蓋',
import: '導入', import: '導入',
@ -1609,5 +1611,11 @@ export default {
delete_prompt: '此操作會刪除認證源,是否繼續? ', delete_prompt: '此操作會刪除認證源,是否繼續? ',
title: '認證設置', title: '認證設置',
auth_name_valid: '名稱不支持特殊字符', auth_name_valid: '名稱不支持特殊字符',
},
table: {
header_display_field: '表頭顯示欄位',
fields_to_be_selected: '待選欄位',
selected_fields: '已選欄位'
} }
}; };