refactor(测试跟踪): 优化测试跟踪首页列表空数据展示问题
--story=1010425 --user=宋昌昌 【测试跟踪】测试跟踪首页交互升级 https://www.tapd.cn/55049933/s/1296708
This commit is contained in:
parent
a8b2d280a9
commit
25abb66db0
|
@ -6,9 +6,18 @@
|
|||
<el-tag v-if="value === 'Underway'" class="status-label underway">
|
||||
{{ $t('test_track.plan.plan_status_running') }}
|
||||
</el-tag>
|
||||
<el-tag v-if="value === 'Finished'" class="status-label finished">
|
||||
{{ $t('test_track.plan.plan_status_finished') }}
|
||||
</el-tag>
|
||||
<el-tag v-if="value === 'Completed'" class="status-label completed">
|
||||
{{ $t('test_track.plan.plan_status_completed') }}
|
||||
</el-tag>
|
||||
<el-tag v-if="value === 'Trash'" class="status-label trash">
|
||||
{{ $t('test_track.plan.plan_status_trash') }}
|
||||
</el-tag>
|
||||
<el-tag v-if="value === 'Archived'" class="status-label archived">
|
||||
{{ $t('test_track.plan.plan_status_archived') }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
|
@ -49,4 +58,19 @@ export default {
|
|||
background-color: rgba(31, 35, 41, 0.1);
|
||||
color: #646A73;
|
||||
}
|
||||
|
||||
.finished {
|
||||
background-color: rgba(0, 214, 185, 0.2);
|
||||
color: #078372;
|
||||
}
|
||||
|
||||
.trash {
|
||||
background-color: rgba(245, 74, 69, 0.2);
|
||||
color: #D83931;
|
||||
}
|
||||
|
||||
.archived {
|
||||
background-color: rgba(255, 136, 0, 0.2);
|
||||
color: #DE7802;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -354,7 +354,7 @@ export default {
|
|||
case_count: "Statistics of the number of use cases",
|
||||
relevance_case: "Related Case",
|
||||
case_maintenance: "Use case person responsible distribution",
|
||||
bug_count: "Statistics of remaining defects",
|
||||
bug_count: "Statistics of test plan remaining defects",
|
||||
case_review: "Use case review",
|
||||
review_rate: "Reviewed",
|
||||
coverage: "Coverage",
|
||||
|
|
|
@ -357,7 +357,7 @@ export default {
|
|||
case_count: "用例数量统计",
|
||||
relevance_case: "关联用例数量统计",
|
||||
case_maintenance: "用例责任人分布",
|
||||
bug_count: "遗留缺陷统计",
|
||||
bug_count: "测试计划遗留缺陷统计",
|
||||
case_review: "用例评审",
|
||||
review_rate: "评审率",
|
||||
coverage: "覆盖率",
|
||||
|
|
|
@ -357,7 +357,7 @@ export default {
|
|||
case_count: "用例數量統計",
|
||||
relevance_case: "關聯用例數量統計",
|
||||
case_maintenance: "用例責任人分佈",
|
||||
bug_count: "遺留缺陷統計",
|
||||
bug_count: "測試計劃遺留缺陷統計",
|
||||
case_review: "用例評審",
|
||||
review_rate: "評審率",
|
||||
coverage: "覆蓋率",
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
<bug-count-chart :bug-data="bugData" ref="countChart" @redirectPage="redirectPage"/>
|
||||
</div>
|
||||
<div class="addition-info">
|
||||
<el-row :gutter="16" style="margin: 0">
|
||||
<el-col :span="12" style="padding-left: 0">
|
||||
<el-row :gutter="24" style="margin: 0">
|
||||
<el-col :span="24" style="padding-left: 0">
|
||||
<hover-card
|
||||
:title="$t('home.bug_dashboard.un_closed_range')"
|
||||
:main-info="bugData.unClosedRage"
|
||||
|
@ -54,42 +54,6 @@
|
|||
</template>
|
||||
</hover-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" style="padding-left: 0">
|
||||
<hover-card
|
||||
:title="$t('home.bug_dashboard.un_closed_bug_case_range')"
|
||||
:main-info="bugData.bugCaseRage"
|
||||
:tool-tip="unClosedBugCaseRangeToolTip"
|
||||
>
|
||||
<!--遗留缺陷、所有缺陷-->
|
||||
<template v-slot:mouseOut>
|
||||
<div style="margin:16px 0px 0px 16px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span class="addition-info-title">
|
||||
{{ $t('home.bug_dashboard.un_closed_count') }}
|
||||
</span>
|
||||
<div class="common-amount">
|
||||
<el-link class="addition-info-num">
|
||||
{{ formatAmount(bugData.bugUnclosedCount) }}
|
||||
</el-link>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span class="addition-info-title">
|
||||
{{ $t('home.bug_dashboard.case_count') }}
|
||||
</span>
|
||||
<div class="common-amount">
|
||||
<el-link class="addition-info-num">
|
||||
{{ formatAmount(bugData.caseTotalCount) }}
|
||||
</el-link>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
</hover-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
import MsChart from "metersphere-frontend/src/components/chart/MsChart";
|
||||
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
||||
import {getTrackCaseBar} from "@/api/track";
|
||||
import {useStore} from "@/store";
|
||||
|
||||
|
||||
export default {
|
||||
name: "CaseMaintenance",
|
||||
|
@ -67,7 +65,6 @@ export default {
|
|||
});
|
||||
let yAxis1 = data.filter(d => d.groupName === 'FUNCTIONCASE').map(d => [d.xAxis, d.yAxis]);
|
||||
let yAxis2 = data.filter(d => d.groupName === 'RELEVANCECASE').map(d => [d.xAxis, d.yAxis]);
|
||||
let store = useStore();
|
||||
let option = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
|
@ -77,7 +74,10 @@ export default {
|
|||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: xAxis
|
||||
data: xAxis,
|
||||
axisTick:{
|
||||
show:false // 不显示坐标轴刻度线
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
|
@ -89,9 +89,12 @@ export default {
|
|||
}
|
||||
},
|
||||
legend: {
|
||||
data: [this.$t('test_track.home.function_case_count'), this.$t('test_track.home.relevance_case_count')],
|
||||
orient: 'vertical',
|
||||
right: '80',
|
||||
itemWidth: 8,
|
||||
itemHeight: 8,
|
||||
data: [{icon: 'rect', name: this.$t('test_track.home.function_case_count')}, {icon: 'rect', name: this.$t('test_track.home.relevance_case_count')}],
|
||||
orient: 'horizontal',
|
||||
left: '30',
|
||||
top: '10'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
|
@ -100,7 +103,8 @@ export default {
|
|||
type: 'bar',
|
||||
barWidth: 16,
|
||||
itemStyle: {
|
||||
color: '#783887'
|
||||
color: '#AA4FBF',
|
||||
barBorderRadius: [2, 2, 0, 0]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -108,7 +112,10 @@ export default {
|
|||
data: yAxis2,
|
||||
type: 'bar',
|
||||
barWidth: 16,
|
||||
color: '#F9CB2E'
|
||||
itemStyle: {
|
||||
color: '#F9CB2E',
|
||||
barBorderRadius: [2, 2, 0, 0]
|
||||
}
|
||||
}]
|
||||
};
|
||||
this.caseOption = option;
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
</div>
|
||||
<div v-show="!loadError">
|
||||
<el-table :data="tableData" class="adjust-table table-content"
|
||||
:header-cell-style="{backgroundColor: '#F5F6F7'}" height="224px">
|
||||
<el-table-column prop="sortIndex" :label="$t('home.case.index')" fixed show-overflow-tooltip/>
|
||||
<el-table-column prop="caseName" :label="$t('home.case.case_name')" fixed>
|
||||
:header-cell-style="{backgroundColor: '#F5F6F7'}" max-height="224px">
|
||||
<el-table-column prop="sortIndex" :label="$t('home.case.index')" show-overflow-tooltip/>
|
||||
<el-table-column prop="caseName" :label="$t('home.case.case_name')">
|
||||
<template v-slot:default="{row}">
|
||||
<el-link type="info" @click="redirect(row.caseType,row.id)"
|
||||
:disabled="(row.caseType === 'apiCase' && apiCaseReadOnly) || (row.caseType === 'scenario' && apiScenarioReadOnly) ||
|
||||
|
@ -25,27 +25,27 @@
|
|||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="caseType"
|
||||
column-key="caseType"
|
||||
:label="$t('home.case.case_type')"
|
||||
fixed
|
||||
show-overflow-tooltip>
|
||||
<el-table-column prop="caseType" :label="$t('home.case.case_type')" show-overflow-tooltip column-key="caseType">
|
||||
<template v-slot:default="scope">
|
||||
<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')">
|
||||
<template v-slot:default="{row}">
|
||||
<div>
|
||||
<el-link type="info" @click="redirect('testPlanEdit',row.testPlanId)">
|
||||
{{ row.testPlan }}
|
||||
</el-link>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="failureTimes" :label="$t('home.case.failure_times')"
|
||||
fixed show-overflow-tooltip/>
|
||||
<el-table-column prop="failureTimes" :label="$t('home.case.failure_times')" show-overflow-tooltip/>
|
||||
<template #empty>
|
||||
<div
|
||||
style="width: 100%;height: 144px;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"
|
||||
:total="total"/>
|
||||
|
@ -60,14 +60,12 @@ import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
|||
import {homeTestPlanFailureCaseGet} from "@/api/remote/api/api-home";
|
||||
import {hasPermission} from "@/business/utils/sdk-utils";
|
||||
import HomePagination from "@/business/home/components/pagination/HomePagination";
|
||||
import BasicCaseTypeLabel from "@/business/home/components/table/BasicCaseTypeLabel";
|
||||
import BasicCaseTypeLabel from "metersphere-frontend/src/components/BasicCaseTypeLabel";
|
||||
|
||||
export default {
|
||||
name: "MsFailureTestCaseList",
|
||||
|
||||
components: {
|
||||
MsTag, HomePagination, BasicCaseTypeLabel
|
||||
},
|
||||
components: { MsTag, HomePagination, BasicCaseTypeLabel },
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
@ -122,15 +120,12 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
activated() {
|
||||
this.search();
|
||||
this.testCaseReadOnly = !hasPermission('PROJECT_TRACK_CASE:READ');
|
||||
this.apiCaseReadOnly = !hasPermission('PROJECT_API_DEFINITION:READ');
|
||||
this.apiScenarioReadOnly = !hasPermission('PROJECT_API_SCENARIO:READ');
|
||||
this.loadCaseReadOnly = !hasPermission('PROJECT_PERFORMANCE_TEST:READ');
|
||||
},
|
||||
activated() {
|
||||
this.search();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
</span>
|
||||
|
||||
<div class="btn-group">
|
||||
<ms-table-button icon="" :class="!showMyCreator ? 'hover' : 'reviewedBtn'" :content="$t('test_track.review.reviewed_by_me')" @click="searchMyCreator" style="border-color: #FFFFFF"/>
|
||||
<ms-table-button icon="" :class="showMyCreator ? 'hover' : 'createBtn'" :content="$t('test_track.review.my_create')" @click="searchMyCreator" style="border-color: #FFFFFF; margin-left: 3px"/>
|
||||
<ms-table-button icon="" :class="!showMyCreator ? 'hover' : 'reviewedBtn'" :content="$t('test_track.review.reviewed_by_me')" @click="searchMyCreator('false')" style="border-color: #FFFFFF"/>
|
||||
<ms-table-button icon="" :class="showMyCreator ? 'hover' : 'createBtn'" :content="$t('test_track.review.my_create')" @click="searchMyCreator('true')" style="border-color: #FFFFFF; margin-left: 3px"/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-loading="loading" element-loading-background="#FFFFFF">
|
||||
|
@ -18,48 +18,33 @@
|
|||
<span class="addition-info-title" style="color: #646A73">{{ $t("home.dashboard.public.load_error") }}</span>
|
||||
</div>
|
||||
<div v-show="!loadError">
|
||||
<el-table
|
||||
class="adjust-table"
|
||||
:data="tableData"
|
||||
@row-click="intoPlan"
|
||||
:header-cell-style="{backgroundColor: '#F5F6F7'}"
|
||||
v-loading="loading" height="224px">
|
||||
<el-table-column type="index" fixed :label="$t('home.table.index')" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
fixed
|
||||
:label="$t('commons.name')"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
:label="$t('test_track.plan.plan_status')">
|
||||
<el-table class="adjust-table" :data="tableData" @row-click="intoPlan"
|
||||
:header-cell-style="{backgroundColor: '#F5F6F7'}" max-height="224px">
|
||||
<el-table-column type="index" :label="$t('home.table.index')" show-overflow-tooltip />
|
||||
<el-table-column prop="name" :label="$t('commons.name')" show-overflow-tooltip />
|
||||
<el-table-column prop="status" :label="$t('test_track.plan.plan_status')">
|
||||
<template v-slot:default="scope">
|
||||
<basic-status-label :value="scope.row.status"></basic-status-label>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="creator"
|
||||
fixed
|
||||
:label="$t('test_track.review.creator')"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="reviewerName"
|
||||
fixed
|
||||
:label="$t('test_track.review.reviewer')"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('test_track.review.result_distribution')">
|
||||
<el-table-column prop="creator" :label="$t('test_track.review.creator')" show-overflow-tooltip />
|
||||
<el-table-column prop="reviewerName" :label="$t('test_track.review.reviewer')" show-overflow-tooltip />
|
||||
<el-table-column :label="$t('test_track.review.result_distribution')" show-overflow-tooltip>
|
||||
<template v-slot:default="scope">
|
||||
<el-tooltip :content="getResultTip(scope.row.total,scope.row.reviewed,scope.row.pass)"
|
||||
<el-tooltip :content="getResultTip(scope.row.total, scope.row.reviewed, scope.row.pass)"
|
||||
placement="top" :enterable="false" class="item" effect="dark">
|
||||
<yan-progress :total="scope.row.total" :done="scope.row.reviewed" :modify="scope.row.pass" :tip="tip"/>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<template #empty>
|
||||
<div
|
||||
style="width: 100%;height: 144px;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"
|
||||
:total="total"/>
|
||||
|
@ -75,12 +60,11 @@ import MsTableButton from "metersphere-frontend/src/components/MsTableButton";
|
|||
import {getCurrentProjectID, getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token";
|
||||
import {getRelateTestCaseReview} from "@/api/test-review";
|
||||
import HomePagination from "@/business/home/components/pagination/HomePagination";
|
||||
import BasicStatusLabel from "@/business/home/components/table/BasicStatusLabel";
|
||||
import BasicStatus from "@/business/home/components/table/BasicStatusLabel";
|
||||
import BasicStatusLabel from "metersphere-frontend/src/components/BasicStatusLabel";
|
||||
|
||||
export default {
|
||||
name: "ReviewList",
|
||||
components: {BasicStatus, MsTableOperator, HomeBaseComponent, MsTableButton, HomePagination, BasicStatusLabel},
|
||||
components: {MsTableOperator, HomeBaseComponent, MsTableButton, HomePagination, BasicStatusLabel},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
|
@ -97,7 +81,7 @@ export default {
|
|||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
activated() {
|
||||
this.search();
|
||||
},
|
||||
methods: {
|
||||
|
@ -122,8 +106,12 @@ export default {
|
|||
intoPlan(row) {
|
||||
this.$router.push('/track/review/view/' + row.id);
|
||||
},
|
||||
searchMyCreator() {
|
||||
this.showMyCreator = !this.showMyCreator;
|
||||
searchMyCreator(data) {
|
||||
if (data === 'true') {
|
||||
this.showMyCreator = true
|
||||
} else {
|
||||
this.showMyCreator = false
|
||||
}
|
||||
this.search();
|
||||
},
|
||||
getResultTip(total, reviewed, pass) {
|
||||
|
@ -157,17 +145,20 @@ export default {
|
|||
background: rgba(120, 56, 135, 0.1);
|
||||
border-radius: 4px;
|
||||
color: #783887;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.reviewedBtn.el-button--mini.is-plain:hover {
|
||||
background: rgba(120, 56, 135, 0.1);
|
||||
border-radius: 4px;
|
||||
color: #783887;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.createBtn.el-button--mini.is-plain:hover {
|
||||
background: rgba(120, 56, 135, 0.1);
|
||||
border-radius: 4px;
|
||||
color: #783887;
|
||||
font-weight: 400;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
:enable-selection="false"
|
||||
:condition="condition"
|
||||
:data="tableData"
|
||||
:header-cell-style="{backgroundColor: '#F5F6F7'}"
|
||||
@refresh="search" height="224px">
|
||||
<el-table-column prop="index" :label="$t('home.table.index')" fixed show-overflow-tooltip/>
|
||||
<el-table-column prop="name" :label="$t('commons.name')" fixed>
|
||||
:header-cell-style="{ backgroundColor: '#F5F6F7' }"
|
||||
@refresh="search" max-height="224px">
|
||||
<el-table-column type="index" :label="$t('home.table.index')" show-overflow-tooltip/>
|
||||
<el-table-column prop="name" :label="$t('commons.name')">
|
||||
<template v-slot:default="{row}">
|
||||
<!-- 若为只读用户不可点击之后跳转-->
|
||||
<span v-if="isReadOnly">
|
||||
|
@ -31,16 +31,13 @@
|
|||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<ms-table-column
|
||||
prop="taskType"
|
||||
:filters="typeFilters"
|
||||
:label="$t('home.table.task_type')" fixed>
|
||||
<ms-table-column prop="taskType" :label="$t('home.table.task_type')" :filters="typeFilters">
|
||||
<template v-slot:default="scope">
|
||||
<basic-task-type-label :value="scope.row.taskGroup"></basic-task-type-label>
|
||||
</template>
|
||||
</ms-table-column>
|
||||
<el-table-column prop="rule" :label="$t('home.table.run_rule')" fixed show-overflow-tooltip/>
|
||||
<el-table-column fixed :label="$t('home.table.task_status')">
|
||||
<el-table-column prop="rule" :label="$t('home.table.run_rule')" show-overflow-tooltip/>
|
||||
<el-table-column :label="$t('home.table.task_status')">
|
||||
<template v-slot:default="scope">
|
||||
<div>
|
||||
<el-switch
|
||||
|
@ -52,18 +49,25 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed :label="$t('home.table.next_execution_time')">
|
||||
<el-table-column :label="$t('home.table.next_execution_time')">
|
||||
<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')"
|
||||
fixed show-overflow-tooltip/>
|
||||
<el-table-column fixed :label="$t('home.table.update_time')">
|
||||
<el-table-column prop="creator" :label="$t('home.table.create_user')" show-overflow-tooltip/>
|
||||
<el-table-column :label="$t('home.table.update_time')">
|
||||
<template v-slot:default="scope">
|
||||
<span>{{ scope.row.updateTime | datetimeFormat }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #empty>
|
||||
<div
|
||||
style="width: 100%;height: 144px;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"
|
||||
:total="total"/>
|
||||
|
@ -80,7 +84,7 @@ import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColu
|
|||
import {getTrackRunningTask} from "@/api/track";
|
||||
import {updatePlanSchedule} from "@/api/remote/plan/test-plan";
|
||||
import HomePagination from "@/business/home/components/pagination/HomePagination";
|
||||
import BasicTaskTypeLabel from "@/business/home/components/table/BasicTaskTypeLabel";
|
||||
import BasicTaskTypeLabel from "metersphere-frontend/src/components/BasicTaskTypeLabel";
|
||||
|
||||
export default {
|
||||
name: "MsRunningTaskList",
|
||||
|
@ -172,10 +176,6 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.search();
|
||||
},
|
||||
activated() {
|
||||
this.search();
|
||||
},
|
||||
|
|
|
@ -1,114 +0,0 @@
|
|||
<template>
|
||||
<div class="main-info-card">
|
||||
<div style="margin:16px">
|
||||
<span class="main-info-card-title">
|
||||
{{ title }}
|
||||
</span>
|
||||
<div style="margin-top: 4px;height: 40px">
|
||||
<span v-if="isExecuteInfo" class="addition-num">{{ countData.executedTimesInWeek }}</span>
|
||||
<span v-else class="main-num">{{ countData.total }}</span>
|
||||
</div>
|
||||
<div style="margin-top: 32px">
|
||||
<div v-if="isExecuteInfo">
|
||||
<span class="main-info-card-title">{{ $t("home.dashboard.public.executed_times") }}</span>
|
||||
<div class="common-amount">
|
||||
<span class="addition-num">
|
||||
{{ countData.executedTimes }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span class="main-info-card-title">{{ $t("home.dashboard.public.this_week") }}</span>
|
||||
<div class="common-amount">
|
||||
<el-button class="common-amount-button" @click="redirect('createdInWeek')">
|
||||
<span type="num" class="addition-num">
|
||||
+{{ countData.createdInWeek }}
|
||||
</span>
|
||||
<img class="main-info-card-right" src="/assets/figma/icon_right_outlined.svg" alt="">
|
||||
</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span class="main-info-card-title">{{ $t("home.dashboard.public.fake_error") }}</span>
|
||||
<div class="common-amount">
|
||||
<el-button class="common-amount-button" @click="redirect('fakeError')">
|
||||
<span class="addition-num">
|
||||
{{ countData.fakeErrorCount }}
|
||||
</span>
|
||||
<img class="main-info-card-right" src="/assets/figma/icon_right_outlined.svg" alt="">
|
||||
</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "MainInfoCard",
|
||||
props: {
|
||||
title: String,
|
||||
isExecuteInfo: Boolean,
|
||||
countData: Object,
|
||||
redirectPageName: String,
|
||||
redirectDataType: String,
|
||||
},
|
||||
methods: {
|
||||
redirect(seletDataType) {
|
||||
this.$emit('redirectPage', this.redirectPageName, this.redirectDataType, seletDataType, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.main-info-card {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.addition-num {
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.main-num {
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.common-amount-button {
|
||||
padding: 0 4px 0 4px;
|
||||
border: 0;
|
||||
margin: 0 -4px 0 -8px;
|
||||
}
|
||||
|
||||
.common-amount-button :deep(.addition-num) {
|
||||
margin: 0 -4px 0 4px;
|
||||
}
|
||||
|
||||
.main-info-card-right {
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
.common-amount-button:focus img {
|
||||
transform: translateY(-999999px);
|
||||
filter: drop-shadow(#783887 0px 999999px);
|
||||
}
|
||||
|
||||
.common-amount-button:hover img {
|
||||
transform: translateY(-999999px);
|
||||
filter: drop-shadow(#783887 0px 999999px);
|
||||
}
|
||||
|
||||
</style>
|
|
@ -119,7 +119,7 @@ export default {
|
|||
let protocolData = [{value: 0}];
|
||||
let colorArr = ['#DEE0E3'];
|
||||
if (this.getTotal() > 0) {
|
||||
colorArr = ['#AA4FBF', '#FFD131', '#10CECE', '#4261F6',]
|
||||
colorArr = ['#F76964', '#FFD131', '#AA4FBF', '#10CECE']
|
||||
protocolData = [
|
||||
{value: this.trackData.p0CaseCountNumber, name: 'P0'},
|
||||
{value: this.trackData.p1CaseCountNumber, name: 'P1'},
|
||||
|
@ -212,7 +212,7 @@ export default {
|
|||
width: 8px;
|
||||
margin-right: 8px;
|
||||
display: inline-block;
|
||||
background-color: #AA4FBF;
|
||||
background-color: #F76964;
|
||||
}
|
||||
|
||||
.ms-point-p1 {
|
||||
|
@ -228,7 +228,7 @@ export default {
|
|||
width: 8px;
|
||||
margin-right: 8px;
|
||||
display: inline-block;
|
||||
background-color: #10CECE;
|
||||
background-color: #AA4FBF;
|
||||
}
|
||||
|
||||
.ms-point-p3 {
|
||||
|
@ -236,6 +236,6 @@ export default {
|
|||
width: 8px;
|
||||
margin-right: 8px;
|
||||
display: inline-block;
|
||||
background-color: #4261F6;
|
||||
background-color: #14E1C6;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
<template>
|
||||
<span>
|
||||
<el-tag v-if="value === 'Prepare'" class="status-label prepare">
|
||||
{{ $t('test_track.plan.plan_status_prepare') }}
|
||||
</el-tag>
|
||||
<el-tag v-if="value === 'Underway'" class="status-label underway">
|
||||
{{ $t('test_track.plan.plan_status_running') }}
|
||||
</el-tag>
|
||||
<el-tag v-if="value === 'Finished'" class="status-label finished">
|
||||
{{ $t('test_track.plan.plan_status_finished') }}
|
||||
</el-tag>
|
||||
<el-tag v-if="value === 'Completed'" class="status-label completed">
|
||||
{{ $t('test_track.plan.plan_status_completed') }}
|
||||
</el-tag>
|
||||
<el-tag v-if="value === 'Trash'" class="status-label trash">
|
||||
{{ $t('test_track.plan.plan_status_trash') }}
|
||||
</el-tag>
|
||||
<el-tag v-if="value === 'Archived'" class="status-label archived">
|
||||
{{ $t('test_track.plan.plan_status_archived') }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "BasicStatus",
|
||||
components: {},
|
||||
props: {
|
||||
value: {
|
||||
type: String
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.status-label {
|
||||
height: 24px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
padding: 1px 6px;
|
||||
border-radius: 2px;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.completed {
|
||||
background-color: rgba(52, 199, 36, 0.2);
|
||||
color: #34C724;
|
||||
}
|
||||
|
||||
.underway {
|
||||
background-color: rgba(120, 56, 135, 0.2);
|
||||
color: #783887;
|
||||
}
|
||||
|
||||
.prepare {
|
||||
background-color: rgba(31, 35, 41, 0.1);
|
||||
color: #646A73;
|
||||
}
|
||||
|
||||
.finished {
|
||||
background-color: rgba(0, 214, 185, 0.2);
|
||||
color: #078372;
|
||||
}
|
||||
|
||||
.trash {
|
||||
background-color: rgba(245, 74, 69, 0.2);
|
||||
color: #D83931;
|
||||
}
|
||||
|
||||
.archived {
|
||||
background-color: rgba(255, 136, 0, 0.2);
|
||||
color: #DE7802;
|
||||
}
|
||||
</style>
|
|
@ -31,6 +31,7 @@ const message = {
|
|||
public: {
|
||||
this_week: "This week ",
|
||||
load_error: "Loading failure",
|
||||
no_data: "No data",
|
||||
},
|
||||
case_finished_review_pass_tip: "Reviewed cases/All reviewed cases *100%"
|
||||
},
|
||||
|
|
|
@ -31,6 +31,7 @@ const message = {
|
|||
public: {
|
||||
this_week: "本周",
|
||||
load_error: "加载失败",
|
||||
no_data: "暂无数据",
|
||||
},
|
||||
case_finished_review_pass_tip: "已评审通过的案例/所有完成评审的案例*100%"
|
||||
},
|
||||
|
|
|
@ -31,6 +31,7 @@ const message = {
|
|||
public: {
|
||||
this_week: "本週",
|
||||
load_error: "加載失敗",
|
||||
no_data: "暫無數據",
|
||||
},
|
||||
case_finished_review_pass_tip: "已評審通過的案例/所有完成評審的案例*100%"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue