fix(测试跟踪): 修复table高度

This commit is contained in:
Captain.B 2021-05-26 18:07:20 +08:00 committed by 刘瑞斌
parent adff3b26f0
commit 3cf57c48fa
2 changed files with 87 additions and 71 deletions

View File

@ -22,11 +22,11 @@
{{ $t('test_track.plan.test_plan') }}
</el-menu-item>
<el-menu-item :index="'/track/issue'">
<el-menu-item :index="'/track/issue'" popper-class="submenu">
{{ $t("缺陷管理") }}
</el-menu-item>
<el-menu-item :index="'/track/testPlan/reportList'">
<el-menu-item :index="'/track/testPlan/reportList'" popper-class="submenu">
{{ $t("commons.report") }}
</el-menu-item>
</el-menu>
@ -84,7 +84,7 @@ export default {
}
},
pathName: '',
}
};
},
watch: {
'$route': {
@ -130,7 +130,7 @@ export default {
},
beforeDestroy() {
}
}
};
</script>

View File

@ -1,81 +1,82 @@
<template>
<el-main>
<el-card>
<ms-container>
<ms-main-container>
<el-card class="table-card">
<template v-slot:header>
<ms-table-header :condition.sync="page.condition" @search="getIssues" @create="handleCreate"
:create-tip="$t('test_track.issue.create_issue')" :title="$t('test_track.issue.issue_list')"
:tip="$t('issue.search_name')" :have-search="false"/>
</template>
<template v-slot:header>
<ms-table-header :condition.sync="page.condition" @search="getIssues" @create="handleCreate"
:create-tip="$t('test_track.issue.create_issue')" :title="$t('test_track.issue.issue_list')"
:tip="$t('issue.search_name')" :have-search="false"/>
</template>
<ms-table
v-loading="page.result.loading"
:data="page.data"
:condition="page.condition"
:total="page.total"
:page-size.sync="page.pageSize"
:operators="operators"
:show-select-all="false"
:screen-height="screenHeight"
@handlePageChange="getIssues"
@refresh="getIssues">
<ms-table
v-loading="page.result.loading"
:data="page.data"
:condition="page.condition"
:total="page.total"
:page-size.sync="page.pageSize"
:operators="operators"
:show-select-all="false"
:screen-height="screenHeight"
@handlePageChange="getIssues"
@refresh="getIssues">
<ms-table-column
:label="$t('test_track.issue.id')"
prop="id" v-if="false">
</ms-table-column>
<ms-table-column
:label="$t('test_track.issue.id')"
prop="num">
</ms-table-column>
<ms-table-column
:label="$t('test_track.issue.id')"
prop="id" v-if="false">
</ms-table-column>
<ms-table-column
:label="$t('test_track.issue.id')"
prop="num">
</ms-table-column>
<ms-table-column
:label="$t('test_track.issue.title')"
prop="title">
</ms-table-column>
<ms-table-column
:label="$t('test_track.issue.title')"
prop="title">
</ms-table-column>
<ms-table-column
:label="$t('test_track.issue.status')"
prop="status">
<template v-slot="scope">
<span>{{ issueStatusMap[scope.row.status] ? issueStatusMap[scope.row.status] : scope.row.status }}</span>
</template>
</ms-table-column>
<ms-table-column
:label="$t('test_track.issue.status')"
prop="status">
<template v-slot="scope">
<span>{{ issueStatusMap[scope.row.status] ? issueStatusMap[scope.row.status] : scope.row.status }}</span>
</template>
</ms-table-column>
<ms-table-column
:label="$t('test_track.issue.platform')"
prop="platform">
</ms-table-column>
<ms-table-column
:label="$t('test_track.issue.platform')"
prop="platform">
</ms-table-column>
<ms-table-column
:label="$t('custom_field.issue_creator')"
prop="creatorName">
</ms-table-column>
<ms-table-column
:label="$t('custom_field.issue_creator')"
prop="creatorName">
</ms-table-column>
<ms-table-column
:label="$t('test_track.issue.issue_resource')"
prop="resourceName">
<template v-slot="scope">
<el-link v-if="scope.row.resourceName" @click="$router.push('/track/plan/view/' + scope.row.resourceId)">
{{scope.row.resourceName}}
</el-link>
<span v-else>
<ms-table-column
:label="$t('test_track.issue.issue_resource')"
prop="resourceName">
<template v-slot="scope">
<el-link v-if="scope.row.resourceName" @click="$router.push('/track/plan/view/' + scope.row.resourceId)">
{{ scope.row.resourceName }}
</el-link>
<span v-else>
--
</span>
</template>
</ms-table-column>
</template>
</ms-table-column>
<issue-description-table-item/>
<issue-description-table-item/>
</ms-table>
</ms-table>
<ms-table-pagination :change="getIssues" :current-page.sync="page.currentPage" :page-size.sync="page.pageSize" :total="page.total"/>
<ms-table-pagination :change="getIssues" :current-page.sync="page.currentPage" :page-size.sync="page.pageSize"
:total="page.total"/>
<issue-edit @refresh="getIssues" ref="issueEdit"/>
</el-card>
</el-main>
<issue-edit @refresh="getIssues" ref="issueEdit"/>
</el-card>
</ms-main-container>
</ms-container>
</template>
<script>
@ -87,7 +88,8 @@ import MsTablePagination from "@/business/components/common/pagination/TablePagi
import {
CUSTOM_FIELD_SCENE_OPTION,
CUSTOM_FIELD_TYPE_OPTION,
FIELD_TYPE_MAP, ISSUE_STATUS_MAP,
FIELD_TYPE_MAP,
ISSUE_STATUS_MAP,
SYSTEM_FIELD_NAME_MAP
} from "@/common/js/table-constants";
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
@ -95,17 +97,23 @@ import IssueDescriptionTableItem from "@/business/components/track/issue/IssueDe
import IssueEdit from "@/business/components/track/issue/IssueEdit";
import {getIssues} from "@/network/Issue";
import {getPageInfo} from "@/common/js/tableUtils";
import MsContainer from "@/business/components/common/components/MsContainer";
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
export default {
name: "CustomFieldList",
components: {
MsMainContainer,
MsContainer,
IssueEdit,
IssueDescriptionTableItem,
MsTableHeader,
MsTablePagination, MsTableButton, MsTableOperators, MsTableColumn, MsTable},
MsTablePagination, MsTableButton, MsTableOperators, MsTableColumn, MsTable
},
data() {
return {
page: getPageInfo(),
screenHeight: 'calc(100vh - 310px)',
screenHeight: 'calc(100vh - 290px)',
operators: [
{
tip: this.$t('commons.edit'), icon: "el-icon-edit",
@ -165,7 +173,7 @@ export default {
this.$refs.issueEdit.open(copyData);
},
handleDelete(data) {
this.page.result = this.$get('issues/delete/' + data.id, () => {
this.page.result = this.$get('issues/delete/' + data.id, () => {
this.$success(this.$t('commons.delete_success'));
this.getIssues();
});
@ -181,5 +189,13 @@ export default {
</script>
<style scoped>
.table-page {
padding-top: 20px;
margin-right: -9px;
float: right;
}
.el-table {
cursor: pointer;
}
</style>