refactor: i18n
This commit is contained in:
parent
b5fab0f8a6
commit
fabba9a364
|
@ -14,7 +14,7 @@
|
||||||
<el-option v-for="(type, index) in typeArr" :key="index" :value="type.id" :label="type.name"/>
|
<el-option v-for="(type, index) in typeArr" :key="index" :value="type.id" :label="type.name"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="更新后属性值为" prop="value">
|
<el-form-item :label="$t('test_track.case.updated_attr_value')" prop="value">
|
||||||
<el-select v-model="form.value" style="width: 80%" :filterable="filterable">
|
<el-select v-model="form.value" style="width: 80%" :filterable="filterable">
|
||||||
<el-option v-for="(option, index) in options" :key="index" :value="option.id" :label="option.name">
|
<el-option v-for="(option, index) in options" :key="index" :value="option.id" :label="option.name">
|
||||||
<div v-if="option.email">
|
<div v-if="option.email">
|
||||||
|
@ -47,7 +47,9 @@
|
||||||
valueArr: Object,
|
valueArr: Object,
|
||||||
dialogTitle: {
|
dialogTitle: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "批量操作"
|
default() {
|
||||||
|
return this.$t('test_track.case.batch_operate')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -56,8 +58,8 @@
|
||||||
form: {},
|
form: {},
|
||||||
size: 0,
|
size: 0,
|
||||||
rules: {
|
rules: {
|
||||||
type: {required: true, message: "请选择属性", trigger: ['blur','change']},
|
type: {required: true, message: this.$t('test_track.case.please_select_attr'), trigger: ['blur','change']},
|
||||||
value: {required: true, message: "请选择属性对应的值", trigger: ['blur','change']}
|
value: {required: true, message: this.$t('test_track.case.please_select_attr_value'), trigger: ['blur','change']}
|
||||||
},
|
},
|
||||||
options: [],
|
options: [],
|
||||||
filterable: false,
|
filterable: false,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-loading="result.loading">
|
<div v-loading="result.loading">
|
||||||
<el-dialog title="选择用例目录"
|
<el-dialog :title="this.$t('test_track.case.select_catalog')"
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
:before-close="close"
|
:before-close="close"
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
|
|
|
@ -121,7 +121,7 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<batch-edit ref="batchEdit" @batchEdit="batchEdit"
|
<batch-edit ref="batchEdit" @batchEdit="batchEdit"
|
||||||
:typeArr="typeArr" :value-arr="valueArr" dialog-title="批量编辑用例"/>
|
:typeArr="typeArr" :value-arr="valueArr" :dialog-title="$t('test_track.case.batch_edit_case')"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -193,18 +193,18 @@
|
||||||
showMore: false,
|
showMore: false,
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: '批量编辑用例', handleClick: this.handleBatchEdit
|
name: this.$t('test_track.case.batch_edit_case'), handleClick: this.handleBatchEdit
|
||||||
}, {
|
}, {
|
||||||
name: '批量移动用例', handleClick: this.handleBatchMove
|
name: this.$t('test_track.case.batch_move_case'), handleClick: this.handleBatchMove
|
||||||
}, {
|
}, {
|
||||||
name: '批量删除用例', handleClick: this.handleDeleteBatch
|
name: this.$t('test_track.case.batch_delete_case'), handleClick: this.handleDeleteBatch
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
typeArr: [
|
typeArr: [
|
||||||
{id: 'priority', name: '用例等级'},
|
{id: 'priority', name: this.$t('test_track.case.priority')},
|
||||||
{id: 'type', name: '类型'},
|
{id: 'type', name: this.$t('test_track.case.type')},
|
||||||
{id: 'method', name: '测试方式'},
|
{id: 'method', name: this.$t('test_track.case.method')},
|
||||||
{id: 'maintainer', name: '维护人'},
|
{id: 'maintainer', name: this.$t('test_track.case.maintainer')},
|
||||||
],
|
],
|
||||||
valueArr: {
|
valueArr: {
|
||||||
priority: [
|
priority: [
|
||||||
|
|
|
@ -181,7 +181,7 @@
|
||||||
:active-text="$t('test_track.plan_view.submit_issues')">
|
:active-text="$t('test_track.plan_view.submit_issues')">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
<el-tooltip class="item" effect="dark"
|
<el-tooltip class="item" effect="dark"
|
||||||
content="在系统设置-组织-服务集成中集成缺陷管理平台可以自动提交缺陷到指定缺陷管理平台"
|
:content="$t('test_track.issue.platform_tip')"
|
||||||
placement="right">
|
placement="right">
|
||||||
<i class="el-icon-info"/>
|
<i class="el-icon-info"/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
<el-col :span="20" :offset="1" class="issues-edit">
|
<el-col :span="20" :offset="1" class="issues-edit">
|
||||||
<el-input
|
<el-input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="请输入标题"
|
:placeholder="$t('test_track.issue.input_title')"
|
||||||
v-model="testCase.issues.title"
|
v-model="testCase.issues.title"
|
||||||
maxlength="100"
|
maxlength="100"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
|
@ -207,14 +207,14 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="20" :offset="1" class="issues-edit">
|
<el-col :span="20" :offset="1" class="issues-edit">
|
||||||
<el-table border class="adjust-table" :data="issues" style="width: 100%">
|
<el-table border class="adjust-table" :data="issues" style="width: 100%">
|
||||||
<el-table-column prop="id" label="缺陷ID" show-overflow-tooltip/>
|
<el-table-column prop="id" :label="$t('test_track.issue.id')" show-overflow-tooltip/>
|
||||||
<el-table-column prop="title" label="缺陷标题"/>
|
<el-table-column prop="title" :label="$t('test_track.issue.title')"/>
|
||||||
<el-table-column prop="description" label="缺陷描述" show-overflow-tooltip/>
|
<el-table-column prop="description" :label="$t('test_track.issue.description')" show-overflow-tooltip/>
|
||||||
<el-table-column prop="status" label="缺陷状态"/>
|
<el-table-column prop="status" :label="$t('test_track.issue.status')"/>
|
||||||
<el-table-column prop="platform" label="平台"/>
|
<el-table-column prop="platform" :label="$t('test_track.issue.platform')"/>
|
||||||
<el-table-column label="操作">
|
<el-table-column :label="$t('test_track.issue.operate')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-tooltip content="关闭缺陷"
|
<el-tooltip :content="$t('test_track.issue.close')"
|
||||||
placement="right">
|
placement="right">
|
||||||
<el-button type="danger" icon="el-icon-circle-close" size="mini"
|
<el-button type="danger" icon="el-icon-circle-close" size="mini"
|
||||||
circle v-if="scope.row.platform === 'Local'"
|
circle v-if="scope.row.platform === 'Local'"
|
||||||
|
@ -473,7 +473,7 @@
|
||||||
},
|
},
|
||||||
saveIssues() {
|
saveIssues() {
|
||||||
if (!this.testCase.issues.title || !this.testCase.issues.content) {
|
if (!this.testCase.issues.title || !this.testCase.issues.content) {
|
||||||
this.$warning("标题和描述必填");
|
this.$warning(this.$t('test_track.issue.title_description_required'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let param = {};
|
let param = {};
|
||||||
|
@ -494,7 +494,7 @@
|
||||||
closeIssue(row) {
|
closeIssue(row) {
|
||||||
this.result = this.$get("/issues/close/" + row.id, () => {
|
this.result = this.$get("/issues/close/" + row.id, () => {
|
||||||
this.getIssues(this.testCase.caseId);
|
this.getIssues(this.testCase.caseId);
|
||||||
this.$success("关闭成功");
|
this.$success(this.$t('test_track.issue.close_success'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="nodePath"
|
prop="nodePath"
|
||||||
label="缺陷"
|
:label="$t('test_track.issue.issue')"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-popover
|
<el-popover
|
||||||
|
@ -113,10 +113,10 @@
|
||||||
trigger="hover">
|
trigger="hover">
|
||||||
<el-table border class="adjust-table" :data="scope.row.issuesContent" style="width: 100%">
|
<el-table border class="adjust-table" :data="scope.row.issuesContent" style="width: 100%">
|
||||||
<!-- <el-table-column prop="id" label="缺陷ID" show-overflow-tooltip/>-->
|
<!-- <el-table-column prop="id" label="缺陷ID" show-overflow-tooltip/>-->
|
||||||
<el-table-column prop="title" label="缺陷标题"/>
|
<el-table-column prop="title" :label="$t('test_track.issue.title')"/>
|
||||||
<el-table-column prop="description" label="缺陷描述" show-overflow-tooltip/>
|
<el-table-column prop="description" :label="$t('test_track.issue.description')" show-overflow-tooltip/>
|
||||||
<!-- <el-table-column prop="status" label="缺陷状态"/>-->
|
<!-- <el-table-column prop="status" label="缺陷状态"/>-->
|
||||||
<el-table-column prop="platform" label="平台"/>
|
<el-table-column prop="platform" :label="$t('test_track.issue.platform')"/>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-button slot="reference" type="text">{{scope.row.issuesSize}}</el-button>
|
<el-button slot="reference" type="text">{{scope.row.issuesSize}}</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
@ -195,7 +195,7 @@
|
||||||
<test-case-report-view @refresh="initTableData" ref="testCaseReportView"/>
|
<test-case-report-view @refresh="initTableData" ref="testCaseReportView"/>
|
||||||
</el-card>
|
</el-card>
|
||||||
<batch-edit ref="batchEdit" @batchEdit="batchEdit"
|
<batch-edit ref="batchEdit" @batchEdit="batchEdit"
|
||||||
:type-arr="typeArr" :value-arr="valueArr" dialog-title="批量更改测试计划"/>
|
:type-arr="typeArr" :value-arr="valueArr" :dialog-title="$t('test_track.case.batch_edit_plan')"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -280,15 +280,15 @@
|
||||||
showMore: false,
|
showMore: false,
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: '批量更改测试计划', handleClick: this.handleBatchEdit
|
name: this.$t('test_track.case.batch_edit_plan'), handleClick: this.handleBatchEdit
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '批量取消用例关联', handleClick: this.handleDeleteBatch
|
name: this.$t('test_track.case.batch_unlink'), handleClick: this.handleDeleteBatch
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
typeArr: [
|
typeArr: [
|
||||||
{id: 'status', name: '执行结果'},
|
{id: 'status', name: this.$t('test_track.plan_view.execute_result')},
|
||||||
{id: 'executor', name: '执行人'},
|
{id: 'executor', name: this.$t('test_track.plan_view.executor')},
|
||||||
],
|
],
|
||||||
valueArr: {
|
valueArr: {
|
||||||
executor: [],
|
executor: [],
|
||||||
|
|
|
@ -587,6 +587,16 @@ export default {
|
||||||
relate_test_not_find: 'The associated test does not exist, please check the test case',
|
relate_test_not_find: 'The associated test does not exist, please check the test case',
|
||||||
batch_handle: 'Batch processing (select {0} item)',
|
batch_handle: 'Batch processing (select {0} item)',
|
||||||
batch_update: 'Update the attributes of {0} cases',
|
batch_update: 'Update the attributes of {0} cases',
|
||||||
|
select_catalog: 'Please select use case catalog',
|
||||||
|
updated_attr_value: 'The updated attribute value',
|
||||||
|
batch_operate: 'Batch operation',
|
||||||
|
please_select_attr: 'Please select attributes',
|
||||||
|
please_select_attr_value: 'Please select the value corresponding to the attribute',
|
||||||
|
batch_edit_plan: 'Batch change test plan',
|
||||||
|
batch_edit_case: 'Batch editing test cases',
|
||||||
|
batch_move_case: 'Batch move',
|
||||||
|
batch_delete_case: 'Batch delete',
|
||||||
|
batch_unlink: 'Batch Unlink',
|
||||||
import: {
|
import: {
|
||||||
import: "Import test case",
|
import: "Import test case",
|
||||||
case_import: "Import test case",
|
case_import: "Import test case",
|
||||||
|
@ -697,6 +707,20 @@ export default {
|
||||||
test_detail: "Test detail",
|
test_detail: "Test detail",
|
||||||
failure_case: "Failure case",
|
failure_case: "Failure case",
|
||||||
export_report: "Export Report"
|
export_report: "Export Report"
|
||||||
|
},
|
||||||
|
issue: {
|
||||||
|
issue: "Issue",
|
||||||
|
platform_tip: "Integrated defect management platform in the system setting-organization-service integration can automatically submit defects to the designated defect management platform",
|
||||||
|
input_title: "Please enter title",
|
||||||
|
id: "Issue ID",
|
||||||
|
title: "Issue Title",
|
||||||
|
description: "Issue Description",
|
||||||
|
status: "Issue Status",
|
||||||
|
platform: "Platform",
|
||||||
|
operate: "Operate",
|
||||||
|
close: "Close",
|
||||||
|
title_description_required: "Title and description are required",
|
||||||
|
close_success: "Closed successfully",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
test_resource_pool: {
|
test_resource_pool: {
|
||||||
|
|
|
@ -590,6 +590,16 @@ export default {
|
||||||
relate_test_not_find: '关联的测试不存在,请检查用例',
|
relate_test_not_find: '关联的测试不存在,请检查用例',
|
||||||
batch_handle: '批量处理 (选中{0}项)',
|
batch_handle: '批量处理 (选中{0}项)',
|
||||||
batch_update: '更新{0}个用例的属性',
|
batch_update: '更新{0}个用例的属性',
|
||||||
|
select_catalog: '请选择用例目录',
|
||||||
|
updated_attr_value: '更新后属性值为',
|
||||||
|
batch_operate: '批量操作',
|
||||||
|
please_select_attr: '请选择属性',
|
||||||
|
please_select_attr_value: '请选择属性对应的值',
|
||||||
|
batch_edit_plan: '批量更改测试计划',
|
||||||
|
batch_edit_case: '批量编辑用例',
|
||||||
|
batch_move_case: '批量移动用例',
|
||||||
|
batch_delete_case: '批量删除用例',
|
||||||
|
batch_unlink: '批量取消用例关联',
|
||||||
import: {
|
import: {
|
||||||
import: "导入用例",
|
import: "导入用例",
|
||||||
case_import: "导入测试用例",
|
case_import: "导入测试用例",
|
||||||
|
@ -700,6 +710,20 @@ export default {
|
||||||
test_detail: "测试详情",
|
test_detail: "测试详情",
|
||||||
failure_case: "失败用例",
|
failure_case: "失败用例",
|
||||||
export_report: "导出报告"
|
export_report: "导出报告"
|
||||||
|
},
|
||||||
|
issue: {
|
||||||
|
issue: "缺陷",
|
||||||
|
platform_tip: "在系统设置-组织-服务集成中集成缺陷管理平台可以自动提交缺陷到指定缺陷管理平台",
|
||||||
|
input_title: "请输入标题",
|
||||||
|
id: "缺陷ID",
|
||||||
|
title: "缺陷标题",
|
||||||
|
description: "缺陷描述",
|
||||||
|
status: "缺陷状态",
|
||||||
|
platform: "平台",
|
||||||
|
operate: "操作",
|
||||||
|
close: "关闭缺陷",
|
||||||
|
title_description_required: "标题和描述必填",
|
||||||
|
close_success: "关闭成功",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
test_resource_pool: {
|
test_resource_pool: {
|
||||||
|
|
|
@ -587,6 +587,16 @@ export default {
|
||||||
relate_test_not_find: '關聯的測試不存在,請檢查用例',
|
relate_test_not_find: '關聯的測試不存在,請檢查用例',
|
||||||
batch_handle: '批量處理 (選中{0}項)',
|
batch_handle: '批量處理 (選中{0}項)',
|
||||||
batch_update: '更新{0}個用例的屬性',
|
batch_update: '更新{0}個用例的屬性',
|
||||||
|
select_catalog: '請選擇用例目錄',
|
||||||
|
updated_attr_value: '更新後屬性值為',
|
||||||
|
batch_operate: '批量操作',
|
||||||
|
please_select_attr: '請選擇屬性',
|
||||||
|
please_select_attr_value: '請選擇屬性對應的值',
|
||||||
|
batch_edit_plan: '批量更改測試計劃',
|
||||||
|
batch_edit_case: '批量編輯用例',
|
||||||
|
batch_move_case: '批量移動用例',
|
||||||
|
batch_delete_case: '批量刪除用例',
|
||||||
|
batch_unlink: '批量取消用例關聯',
|
||||||
import: {
|
import: {
|
||||||
import: "導入用例",
|
import: "導入用例",
|
||||||
case_import: "導入測試用例",
|
case_import: "導入測試用例",
|
||||||
|
@ -697,6 +707,20 @@ export default {
|
||||||
test_detail: "測試詳情",
|
test_detail: "測試詳情",
|
||||||
failure_case: "失敗用例",
|
failure_case: "失敗用例",
|
||||||
export_report: "匯出報告"
|
export_report: "匯出報告"
|
||||||
|
},
|
||||||
|
issue: {
|
||||||
|
issue: "缺陷",
|
||||||
|
platform_tip: "在系統設置-組織-服務集成中集成缺陷管理平台可以自動提交缺陷到指定缺陷管理平台",
|
||||||
|
input_title: "請輸入標題",
|
||||||
|
id: "缺陷ID",
|
||||||
|
title: "缺陷標題",
|
||||||
|
description: "缺陷描述",
|
||||||
|
status: "缺陷狀態",
|
||||||
|
platform: "平台",
|
||||||
|
operate: "操作",
|
||||||
|
close: "關閉缺陷",
|
||||||
|
title_description_required: "標題和描述必填",
|
||||||
|
close_success: "關閉成功",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
test_resource_pool: {
|
test_resource_pool: {
|
||||||
|
|
Loading…
Reference in New Issue