修改样式

This commit is contained in:
chenjianxing 2020-04-10 12:00:15 +08:00
parent 7f4a0e98d2
commit b8296dbff9
5 changed files with 47 additions and 36 deletions

View File

@ -7,11 +7,7 @@
<el-row type="flex" justify="space-between" align="middle"> <el-row type="flex" justify="space-between" align="middle">
<el-col :span="5"> <el-col :span="5">
<span class="title">{{$t('test_track.test_case')}}</span> <span class="title">{{$t('test_track.test_case')}}</span>
</el-col> <ms-create-box :tips="$t('test_track.create')" :exec="testCaseCreate"/>
<el-col :span="2" :offset="10">
<el-button icon="el-icon-circle-plus-outline" size="small" round
@click="$emit('openTestCaseEditDialog')" >{{$t('commons.create')}}</el-button>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
@ -108,21 +104,24 @@
<script> <script>
import MsCreateBox from '../../../settings/CreateBox';
export default { export default {
name: "TestCaseList", name: "TestCaseList",
data() { components: {MsCreateBox},
return { data() {
result: {}, return {
deletePath: "/test/case/delete", result: {},
condition: "", deletePath: "/test/case/delete",
tableData: [], condition: "",
multipleSelection: [], tableData: [],
currentPage: 1, multipleSelection: [],
pageSize: 5, currentPage: 1,
total: 0, pageSize: 5,
loadingRequire: {project: true, testCase: true}, total: 0,
testId: null loadingRequire: {project: true, testCase: true},
} testId: null
}
}, },
props: { props: {
currentProject: { currentProject: {
@ -160,6 +159,9 @@
buildPagePath(path) { buildPagePath(path) {
return path + "/" + this.currentPage + "/" + this.pageSize; return path + "/" + this.currentPage + "/" + this.pageSize;
}, },
testCaseCreate() {
this.$emit('openTestCaseEditDialog');
},
handleSizeChange(size) { handleSizeChange(size) {
this.pageSize = size; this.pageSize = size;
this.initTableData(); this.initTableData();
@ -175,7 +177,7 @@
this.$emit('testCaseEdit', testCase); this.$emit('testCaseEdit', testCase);
}, },
handleDelete(testCase) { handleDelete(testCase) {
this.$alert(this.$t('load_test.delete_confirm') + testCase.name + "", '', { this.$alert(this.$t('test_track.case_delete_confirm') + testCase.name + "", '', {
confirmButtonText: this.$t('commons.confirm'), confirmButtonText: this.$t('commons.confirm'),
callback: (action) => { callback: (action) => {
if (action === 'confirm') { if (action === 'confirm') {

View File

@ -21,7 +21,7 @@
<el-submenu v-if="isCurrentWorkspaceUser" <el-submenu v-if="isCurrentWorkspaceUser"
index="6" popper-class="submenu" v-permission="['test_manager', 'test_user']"> index="6" popper-class="submenu" v-permission="['test_manager', 'test_user']">
<template v-slot:title>{{$t('test_track.test_case')}}</template> <template v-slot:title>{{$t('test_track.test_case')}}</template>
<ms-recent-list :options="testRecent"/> <ms-recent-list :options="caseRecent"/>
<el-divider/> <el-divider/>
<ms-show-all :index="'/track/case/all'"/> <ms-show-all :index="'/track/case/all'"/>
<el-menu-item :index="testCaseEditPath" class="blank_item"></el-menu-item> <el-menu-item :index="testCaseEditPath" class="blank_item"></el-menu-item>
@ -34,7 +34,7 @@
<el-divider/> <el-divider/>
<ms-show-all :index="'/track/plan/all'"/> <ms-show-all :index="'/track/plan/all'"/>
<el-menu-item :index="testPlanViewPath" class="blank_item"></el-menu-item> <el-menu-item :index="testPlanViewPath" class="blank_item"></el-menu-item>
<ms-create-button :index="'/track/plan/create'" :title="$t('project.create')"/> <ms-create-button :index="'/track/plan/create'" :title="$t('test_track.create_plan')"/>
</el-submenu> </el-submenu>
</el-menu> </el-menu>
</el-col> </el-col>
@ -69,8 +69,8 @@
return {name: 'testCase', params: {projectId: item.id, projectName: item.name}} return {name: 'testCase', params: {projectId: item.id, projectName: item.name}}
} }
}, },
testRecent: { caseRecent: {
title: this.$t('load_test.recent'), title: this.$t('test_track.recent_case'),
url: "/test/case/recent/5", url: "/test/case/recent/5",
index: function (item) { index: function (item) {
return '/track/case/edit/' + item.id; return '/track/case/edit/' + item.id;
@ -78,7 +78,7 @@
router: function (item) {} router: function (item) {}
}, },
planRecent: { planRecent: {
title: this.$t('report.recent'), title: this.$t('test_track.recent_plan'),
url: "/test/plan/recent/5", url: "/test/plan/recent/5",
index: function (item) { index: function (item) {
return '/track/plan/view/' + item.id; return '/track/plan/view/' + item.id;

View File

@ -8,14 +8,9 @@
<el-row type="flex" justify="space-between" align="middle"> <el-row type="flex" justify="space-between" align="middle">
<el-col :span="5"> <el-col :span="5">
<span class="title">{{$t('test_track.test_plan')}}</span> <span class="title">{{$t('test_track.test_plan')}}</span>
<ms-create-box :tips="$t('test_track.create_plan')" :exec="testPlanCreate"/>
</el-col> </el-col>
<el-col :span="2" :offset="10">
<el-button icon="el-icon-circle-plus-outline" size="small" round
@click="$emit('openTestPlanEditDialog')" >{{$t('commons.create')}}</el-button>
</el-col>
<el-col :span="5"> <el-col :span="5">
<span class="search"> <span class="search">
<el-input type="text" size="small" :placeholder="$t('load_test.search_by_name')" <el-input type="text" size="small" :placeholder="$t('load_test.search_by_name')"
@ -117,8 +112,11 @@
</template> </template>
<script> <script>
export default { import MsCreateBox from '../../../settings/CreateBox';
export default {
name: "TestPlanList", name: "TestPlanList",
components: {MsCreateBox},
data() { data() {
return { return {
result: {}, result: {},
@ -154,6 +152,9 @@
buildPagePath(path) { buildPagePath(path) {
return path + "/" + this.currentPage + "/" + this.pageSize; return path + "/" + this.currentPage + "/" + this.pageSize;
}, },
testPlanCreate() {
this.$emit('openTestPlanEditDialog');
},
handleSizeChange(size) { handleSizeChange(size) {
this.pageSize = size; this.pageSize = size;
this.initTableData(); this.initTableData();
@ -169,7 +170,7 @@
this.$emit('testPlanEdit', testPlan); this.$emit('testPlanEdit', testPlan);
}, },
handleDelete(testPlan) { handleDelete(testPlan) {
this.$alert(this.$t('load_test.delete_confirm') + testPlan.name + "", '', { this.$alert(this.$t('test_track.plan_delete_confirm') + testPlan.name + "", '', {
confirmButtonText: this.$t('commons.confirm'), confirmButtonText: this.$t('commons.confirm'),
callback: (action) => { callback: (action) => {
if (action === 'confirm') { if (action === 'confirm') {

View File

@ -228,7 +228,7 @@ export default {
'executor': 'executor', 'executor': 'executor',
'execute_result': 'Execute result', 'execute_result': 'Execute result',
'case_type': 'Case type', 'case_type': 'Case type',
'pass': 'Success', 'pass': 'Pass',
'failure': 'Failure', 'failure': 'Failure',
'blocking': 'Blocking', 'blocking': 'Blocking',
'skip': 'Skip', 'skip': 'Skip',
@ -239,6 +239,10 @@ export default {
'confirm_cancel_relevance': 'Confirm cancel relevance', 'confirm_cancel_relevance': 'Confirm cancel relevance',
'plan': 'Plan', 'plan': 'Plan',
'project': 'Project', 'project': 'Project',
'recent_plan': 'Recent plan',
'recent_case': 'Recent case',
'plan_delete_confirm': 'Confirm delete test plan: ',
'case_delete_confirm': 'Confirm delete test case: ',
}, },
test_resource_pool: { test_resource_pool: {
'type': 'type', 'type': 'type',

View File

@ -205,7 +205,7 @@ export default {
'add_submodule': '添加子模块', 'add_submodule': '添加子模块',
'add_module': '添加模块', 'add_module': '添加模块',
'module_name': '模块名称', 'module_name': '模块名称',
'create_plan': '建测试计划', 'create_plan': '建测试计划',
'plan_name': '计划名称', 'plan_name': '计划名称',
'plan_project': '所属项目', 'plan_project': '所属项目',
'plan_stage': '测试阶段', 'plan_stage': '测试阶段',
@ -228,7 +228,7 @@ export default {
'executor': '执行人', 'executor': '执行人',
'execute_result': '执行结果', 'execute_result': '执行结果',
'case_type': '用例类型', 'case_type': '用例类型',
'pass': '成功', 'pass': '通过',
'failure': '失败', 'failure': '失败',
'blocking': '阻塞', 'blocking': '阻塞',
'skip': '跳过', 'skip': '跳过',
@ -239,6 +239,10 @@ export default {
'confirm_cancel_relevance': '确认取消关联', 'confirm_cancel_relevance': '确认取消关联',
'plan': '计划', 'plan': '计划',
'project': '项目', 'project': '项目',
'recent_plan': '最近的计划',
'recent_case': '最近的用例',
'plan_delete_confirm': '确认删除测试计划: ',
'case_delete_confirm': '确认删除测试用例: ',
}, },
test_resource_pool: { test_resource_pool: {
'type': '类型', 'type': '类型',