fix(测试跟踪): 修复测试计划用例列表缓存搜索框内容问题
--bug=1020389 --user=宋昌昌 【测试跟踪】-计划内用例列表搜索内容在不同测试计划间仍保留,影响用户体验 https://www.tapd.cn/55049933/s/1307454
This commit is contained in:
parent
8ee6eddc25
commit
436a2a3b1c
|
@ -6,7 +6,17 @@ export const TEST_CASE_STATUS_MAP = {
|
||||||
'Trash': i18n.t('test_track.plan.plan_status_trash')
|
'Trash': i18n.t('test_track.plan.plan_status_trash')
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DASHBOARD_CHART_COLOR = [
|
export const CASE_DASHBOARD_CHART_COLOR = [
|
||||||
|
'#F76964', '#FFD131', '#AA4FBF', '#10CECE',
|
||||||
|
'#4E83FD', '#935AF6', '#50CEFB', '#FFA53D',
|
||||||
|
'#62D256'
|
||||||
|
];
|
||||||
|
|
||||||
|
export const RELEVANCE_CASE_DASHBOARD_CHART_COLOR = [
|
||||||
|
'#AA4FBF', '#FFD131', '#14E1C6'
|
||||||
|
];
|
||||||
|
|
||||||
|
export const DEFAULT_DASHBOARD_CHART_COLOR = [
|
||||||
'#AA4FBF', '#FFD131', '#10CECE', '#4E83FD',
|
'#AA4FBF', '#FFD131', '#10CECE', '#4E83FD',
|
||||||
'#935AF6', '#50CEFB', '#FFA53D', '#62D256',
|
'#935AF6', '#50CEFB', '#FFA53D', '#62D256',
|
||||||
];
|
];
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-show="!loadError">
|
<div v-show="!loadError">
|
||||||
<div class="main-info">
|
<div class="main-info">
|
||||||
<count-chart :chart-data="bugData.chartData" :main-title="chartMainTitle"
|
<count-chart :chart-data="bugData.chartData" :main-title="chartMainTitle" :color-constant="DEFAULT_DASHBOARD_CHART_COLOR"
|
||||||
:week-count="bugData.thisWeekCount" :chart-sub-link="chartRedirectLink" ref="countChart" @redirectPage="redirectPage"/>
|
:week-count="bugData.thisWeekCount" :chart-sub-link="chartRedirectLink" ref="countChart" @redirectPage="redirectPage"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="addition-info">
|
<div class="addition-info">
|
||||||
|
@ -69,6 +69,7 @@ import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
||||||
import {getTrackBugCount} from "@/api/track";
|
import {getTrackBugCount} from "@/api/track";
|
||||||
import {formatNumber} from "@/api/track"
|
import {formatNumber} from "@/api/track"
|
||||||
import {getUUID} from "metersphere-frontend/src/utils";
|
import {getUUID} from "metersphere-frontend/src/utils";
|
||||||
|
import {DEFAULT_DASHBOARD_CHART_COLOR} from "@/business/constants/table-constants";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "BugCountCard",
|
name: "BugCountCard",
|
||||||
|
@ -81,6 +82,7 @@ export default {
|
||||||
unClosedBugCaseRangeToolTip: this.$t('home.bug_dashboard.un_closed_bug_case_range_tips'),
|
unClosedBugCaseRangeToolTip: this.$t('home.bug_dashboard.un_closed_bug_case_range_tips'),
|
||||||
chartMainTitle: this.$t("home.bug_dashboard.un_closed_bug_count"),
|
chartMainTitle: this.$t("home.bug_dashboard.un_closed_bug_count"),
|
||||||
chartRedirectLink: "/#/track/issue/" + getUUID() + "/" + getCurrentProjectID() + "/thisWeekUnClosedIssue",
|
chartRedirectLink: "/#/track/issue/" + getUUID() + "/" + getCurrentProjectID() + "/thisWeekUnClosedIssue",
|
||||||
|
DEFAULT_DASHBOARD_CHART_COLOR: DEFAULT_DASHBOARD_CHART_COLOR,
|
||||||
bugData: {
|
bugData: {
|
||||||
bugCaseRage:" 0%",
|
bugCaseRage:" 0%",
|
||||||
bugTotalCount: 0,
|
bugTotalCount: 0,
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-show="!loadError">
|
<div v-show="!loadError">
|
||||||
<div class="main-info">
|
<div class="main-info">
|
||||||
<count-chart :chart-data="trackData.chartData" :main-title="chartMainTitle"
|
<count-chart :chart-data="trackData.chartData" :main-title="chartMainTitle" :color-constant="CASE_DASHBOARD_CHART_COLOR"
|
||||||
:week-count="trackData.thisWeekAddedCount" :chart-sub-link="chartRedirectLink" ref="countChart" @redirectPage="redirectPage"/>
|
:week-count="trackData.thisWeekAddedCount" :chart-sub-link="chartRedirectLink" ref="countChart" @redirectPage="redirectPage"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="addition-info">
|
<div class="addition-info">
|
||||||
|
@ -105,6 +105,7 @@ import {getUUID} from "metersphere-frontend/src/utils";
|
||||||
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
||||||
import {getTrackCount} from "@/api/track";
|
import {getTrackCount} from "@/api/track";
|
||||||
import {formatNumber} from "@/api/track"
|
import {formatNumber} from "@/api/track"
|
||||||
|
import {CASE_DASHBOARD_CHART_COLOR} from "@/business/constants/table-constants";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CaseCountCard",
|
name: "CaseCountCard",
|
||||||
|
@ -117,6 +118,7 @@ export default {
|
||||||
caseFinishedReviewPassRageToolTip: this.$t('home.dashboard.case_finished_review_pass_tip'),
|
caseFinishedReviewPassRageToolTip: this.$t('home.dashboard.case_finished_review_pass_tip'),
|
||||||
chartMainTitle: this.$t("home.case_review_dashboard.case_count"),
|
chartMainTitle: this.$t("home.case_review_dashboard.case_count"),
|
||||||
chartRedirectLink: "/#/track/case/all/" + getUUID() + "/case/thisWeekCount",
|
chartRedirectLink: "/#/track/case/all/" + getUUID() + "/case/thisWeekCount",
|
||||||
|
CASE_DASHBOARD_CHART_COLOR: CASE_DASHBOARD_CHART_COLOR,
|
||||||
trackData: {
|
trackData: {
|
||||||
allCaseCountNumber: 0,
|
allCaseCountNumber: 0,
|
||||||
allRelevanceCaseCount: 0,
|
allRelevanceCaseCount: 0,
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-show="!loadError">
|
<div v-show="!loadError">
|
||||||
<div class="main-info">
|
<div class="main-info">
|
||||||
<count-chart :chart-data="relevanceData.chartData" :main-title="chartMainTitle"
|
<count-chart :chart-data="relevanceData.chartData" :main-title="chartMainTitle" :color-constant="RELEVANCE_CASE_DASHBOARD_CHART_COLOR"
|
||||||
:week-count="relevanceData.thisWeekAddedCount" :chart-sub-link="chartRedirectLink" ref="countChart" @redirectPage="redirectPage"/>
|
:week-count="relevanceData.thisWeekAddedCount" :chart-sub-link="chartRedirectLink" ref="countChart" @redirectPage="redirectPage"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="addition-info">
|
<div class="addition-info">
|
||||||
|
@ -69,6 +69,7 @@ import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
||||||
import {getTrackRelevanceCount} from "@/api/track";
|
import {getTrackRelevanceCount} from "@/api/track";
|
||||||
import {formatNumber} from "@/api/track"
|
import {formatNumber} from "@/api/track"
|
||||||
import {getUUID} from "metersphere-frontend/src/utils";
|
import {getUUID} from "metersphere-frontend/src/utils";
|
||||||
|
import {RELEVANCE_CASE_DASHBOARD_CHART_COLOR} from "@/business/constants/table-constants";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RelevanceCaseCard",
|
name: "RelevanceCaseCard",
|
||||||
|
@ -80,6 +81,7 @@ export default {
|
||||||
coverRangeToolTip: this.$t('api_test.home_page.formula.testplan_coverage'),
|
coverRangeToolTip: this.$t('api_test.home_page.formula.testplan_coverage'),
|
||||||
chartMainTitle: this.$t("home.relevance_dashboard.relevance_case_count"),
|
chartMainTitle: this.$t("home.relevance_dashboard.relevance_case_count"),
|
||||||
chartRedirectLink: "/#/track/case/all/" + getUUID() + "/case/thisWeekRelevanceCount",
|
chartRedirectLink: "/#/track/case/all/" + getUUID() + "/case/thisWeekRelevanceCount",
|
||||||
|
RELEVANCE_CASE_DASHBOARD_CHART_COLOR: RELEVANCE_CASE_DASHBOARD_CHART_COLOR,
|
||||||
relevanceData: {
|
relevanceData: {
|
||||||
allCaseCountNumber: 0,
|
allCaseCountNumber: 0,
|
||||||
allRelevanceCaseCount: 0,
|
allRelevanceCaseCount: 0,
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
<script>
|
<script>
|
||||||
import MsChart from "metersphere-frontend/src/components/chart/MsChart";
|
import MsChart from "metersphere-frontend/src/components/chart/MsChart";
|
||||||
import {formatNumber} from "@/api/track";
|
import {formatNumber} from "@/api/track";
|
||||||
import {DASHBOARD_CHART_COLOR} from "@/business/constants/table-constants";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CountChart",
|
name: "CountChart",
|
||||||
|
@ -25,6 +24,7 @@ export default {
|
||||||
totalTime: Number,
|
totalTime: Number,
|
||||||
mainTitle: String,
|
mainTitle: String,
|
||||||
chartSubLink: String,
|
chartSubLink: String,
|
||||||
|
colorConstant: Array,
|
||||||
isExport: {
|
isExport: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
|
@ -97,7 +97,7 @@ export default {
|
||||||
colorArr.push("#DEE0E3");
|
colorArr.push("#DEE0E3");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
colorArr = DASHBOARD_CHART_COLOR.slice(0, size);
|
colorArr = this.colorConstant.slice(0, size);
|
||||||
}
|
}
|
||||||
return colorArr;
|
return colorArr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,6 +116,9 @@ export default {
|
||||||
this.clearSelectNode();
|
this.clearSelectNode();
|
||||||
this.initData();
|
this.initData();
|
||||||
this.openTestCaseEdit(this.$route.path);
|
this.openTestCaseEdit(this.$route.path);
|
||||||
|
if (this.condition.name) {
|
||||||
|
this.condition.name = undefined;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$route'(to, from) {
|
'$route'(to, from) {
|
||||||
|
|
Loading…
Reference in New Issue