fix(测试跟踪): 测试跟踪首页空数据样式及缺陷同步时间问题

This commit is contained in:
song-cc-rock 2022-11-25 17:11:58 +08:00 committed by 刘瑞斌
parent 48da257b74
commit cbe5f741e1
4 changed files with 28 additions and 23 deletions

View File

@ -18,10 +18,11 @@
:label="$t('home.case.index')"
show-overflow-tooltip
width="100px"/>
<el-table-column
prop="caseName"
:label="$t('home.case.case_name')"
width="320px">
min-width="200px">
<template v-slot:default="{row}">
<el-link style="color: #783887; width: 100%;" :underline="false" type="info" @click="redirect(row.caseType,row.id)"
:disabled="(row.caseType === 'apiCase' && apiCaseReadOnly) || (row.caseType === 'scenario' && apiScenarioReadOnly) ||
@ -30,6 +31,7 @@
</el-link>
</template>
</el-table-column>
<el-table-column
prop="caseType"
:label="$t('home.case.case_type')"
@ -40,31 +42,34 @@
<basic-case-type-label :value="scope.row.caseType"></basic-case-type-label>
</template>
</el-table-column>
<el-table-column
prop="testPlan"
:label="$t('home.case.test_plan')"
min-width="200px">
width="300px">
<template v-slot:default="{row}">
<el-link style="color: #783887; width: 100%;" :underline="false" type="info" @click="redirect('testPlanEdit',row.testPlanId)" v-permission-disable="['PROJECT_TRACK_PLAN:READ']">
{{ row.testPlan }}
</el-link>
</template>
</el-table-column>
<el-table-column
prop="failureTimes"
:label="$t('home.case.failure_times')"
show-overflow-tooltip
min-width="500px"/>
width="350px"/>
<template #empty>
<div
style="width: 100%;height: 200px;display: flex;flex-direction: column;justify-content: center;align-items: center">
style="width: 100%;height: 238px;display: flex;flex-direction: column;justify-content: center;align-items: center">
<img style="height: 100px;width: 100px;margin-bottom: 8px"
src="/assets/figma/icon_none.svg"/>
<span class="addition-info-title">{{ $t("home.dashboard.public.no_data") }}</span>
</div>
</template>
</el-table>
<home-pagination :change="search" :current-page.sync="currentPage" :page-size.sync="pageSize" layout="prev, pager, next, sizes"
<home-pagination v-if="tableData.length > 0" :change="search" :current-page.sync="currentPage" :page-size.sync="pageSize" layout="prev, pager, next, sizes"
:total="total"/>
</div>
</div>

View File

@ -28,7 +28,7 @@
prop="name"
:label="$t('commons.name')"
show-overflow-tooltip
width="320px"/>
min-width="200px"/>
<el-table-column
prop="status"
:label="$t('test_track.plan.plan_status')"
@ -41,16 +41,16 @@
prop="creator"
:label="$t('test_track.review.creator')"
show-overflow-tooltip
min-width="200px"/>
width="150px"/>
<el-table-column
prop="reviewerName"
:label="$t('test_track.review.reviewer')"
show-overflow-tooltip
min-width="200px"/>
width="150px"/>
<el-table-column
:label="$t('test_track.review.result_distribution')"
show-overflow-tooltip
min-width="300px">
width="350px">
<template v-slot:default="scope">
<el-tooltip :content="getResultTip(scope.row.total, scope.row.reviewed, scope.row.pass)"
placement="top" :enterable="false" class="item" effect="dark">
@ -60,14 +60,14 @@
</el-table-column>
<template #empty>
<div
style="width: 100%;height: 200px;display: flex;flex-direction: column;justify-content: center;align-items: center">
style="width: 100%;height: 238px;display: flex;flex-direction: column;justify-content: center;align-items: center">
<img style="height: 100px;width: 100px;margin-bottom: 8px"
src="/assets/figma/icon_none.svg"/>
<span class="addition-info-title">{{ $t("home.dashboard.public.no_data") }}</span>
</div>
</template>
</el-table>
<home-pagination :change="search" :current-page.sync="currentPage" :page-size.sync="pageSize" layout="prev, pager, next, sizes"
<home-pagination v-if="tableData.length > 0" :change="search" :current-page.sync="currentPage" :page-size.sync="pageSize" layout="prev, pager, next, sizes"
:total="total"/>
</div>
</div>

View File

@ -22,7 +22,7 @@
<el-table-column
prop="name"
:label="$t('commons.name')"
width="320px">
min-width="200px">
<template v-slot:default="{row}">
<!-- 若为只读用户不可点击之后跳转-->
<span v-if="isReadOnly">
@ -42,19 +42,14 @@
<basic-task-type-label :value="scope.row.taskGroup"></basic-task-type-label>
</template>
</ms-table-column>
<el-table-column
prop="creator"
:label="$t('home.table.create_user')"
show-overflow-tooltip
min-width="200px"/>
<el-table-column
prop="rule"
:label="$t('home.table.run_rule')"
show-overflow-tooltip
min-width="200px"/>
width="150px"/>
<el-table-column
:label="$t('home.table.task_status')"
min-width="100px">
width="150px">
<template v-slot:default="scope">
<div>
<el-switch
@ -68,21 +63,26 @@
</el-table-column>
<el-table-column
:label="$t('home.table.next_execution_time')"
min-width="200px">
width="200px">
<template v-slot:default="scope">
<span>{{ scope.row.nextExecutionTime | datetimeFormat }}</span>
</template>
</el-table-column>
<el-table-column
prop="creator"
:label="$t('home.table.create_user')"
show-overflow-tooltip
width="150px"/>
<template #empty>
<div
style="width: 100%;height: 200px;display: flex;flex-direction: column;justify-content: center;align-items: center">
style="width: 100%;height: 238px;display: flex;flex-direction: column;justify-content: center;align-items: center">
<img style="height: 100px;width: 100px;margin-bottom: 8px"
src="/assets/figma/icon_none.svg"/>
<span class="addition-info-title">{{ $t("home.dashboard.public.no_data") }}</span>
</div>
</template>
</el-table>
<home-pagination :change="search" :current-page.sync="currentPage" :page-size.sync="pageSize" layout="prev, pager, next, sizes"
<home-pagination v-if="tableData.length > 0" :change="search" :current-page.sync="currentPage" :page-size.sync="pageSize" layout="prev, pager, next, sizes"
:total="total"/>
</div>
</div>

View File

@ -68,7 +68,7 @@ export default {
this.visible = true;
let syncTime = localStorage.getItem("ISSUE_SYNC_TIME");
if (syncTime) {
this.form.createTime = syncTime;
this.form.createTime = new Date(syncTime);
}
},
save() {