fix(工作台): 用例描述预览loading关闭
--bug=1028390 --user=宋昌昌 【工作台】我的待办/我的关注/我创建的-功能用例-底部换页多切换几次页面-点击用例描述预览-一直加载中转圈 https://www.tapd.cn/55049933/s/1403786
This commit is contained in:
parent
7534a5c1ec
commit
2da3939157
|
@ -163,7 +163,7 @@
|
|||
:content="itemName"
|
||||
style="margin-left: 0px; margin-right: 2px"
|
||||
/>
|
||||
<span />
|
||||
<span/>
|
||||
</template>
|
||||
</ms-table-column>
|
||||
|
||||
|
@ -229,12 +229,12 @@
|
|||
:total="page.total"
|
||||
/>
|
||||
|
||||
<test-case-preview ref="testCasePreview" :loading="rowCaseResult.loading" />
|
||||
<test-case-preview ref="testCasePreview" :loading="rowCaseResult.loading"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { TEST_CASE_LIST } from "metersphere-frontend/src/utils/constants";
|
||||
import {TEST_CASE_LIST} from "metersphere-frontend/src/utils/constants";
|
||||
|
||||
import {
|
||||
getCustomFieldFilter,
|
||||
|
@ -247,39 +247,31 @@ import {
|
|||
parseCustomFilesForList,
|
||||
} from "metersphere-frontend/src/utils/tableUtils";
|
||||
import HeaderLabelOperate from "metersphere-frontend/src/components/head/HeaderLabelOperate";
|
||||
import {
|
||||
getCurrentProjectID,
|
||||
getCurrentUserId,
|
||||
} from "metersphere-frontend/src/utils/token";
|
||||
import {getCurrentProjectID, getCurrentUserId,} from "metersphere-frontend/src/utils/token";
|
||||
|
||||
import { getProjectMember, getProjectMemberUserFilter } from "@/api/user";
|
||||
import {getProjectMember, getProjectMemberUserFilter} from "@/api/user";
|
||||
import MsTable from "metersphere-frontend/src/components/table/MsTable";
|
||||
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
|
||||
import { SYSTEM_FIELD_NAME_MAP } from "metersphere-frontend/src/utils/table-constants";
|
||||
import {
|
||||
editTestCaseOrder,
|
||||
getTestCaseListById,
|
||||
getTestCaseStep,
|
||||
testCaseList,
|
||||
} from "@/api/test-case";
|
||||
import {SYSTEM_FIELD_NAME_MAP} from "metersphere-frontend/src/utils/table-constants";
|
||||
import {editTestCaseOrder, getTestCaseListById, getTestCaseStep, testCaseList,} from "@/api/test-case";
|
||||
import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination";
|
||||
import { TEST_CASE_CONFIGS } from "metersphere-frontend/src/components/search/search-components";
|
||||
import {TEST_CASE_CONFIGS} from "metersphere-frontend/src/components/search/search-components";
|
||||
import PriorityTableItem from "@/business/module/track/PriorityTableItem";
|
||||
import StatusTableItem from "@/business/module/track/StatusTableItem";
|
||||
import MsTag from "metersphere-frontend/src/components/MsTag";
|
||||
import { hasLicense } from "metersphere-frontend/src/utils/permission";
|
||||
import { getProject } from "@/api/project";
|
||||
import { getProjectVersions } from "metersphere-frontend/src/api/version";
|
||||
import useStore, { useApiStore } from "@/store";
|
||||
import { getTestTemplate } from "metersphere-frontend/src/api/custom-field-template";
|
||||
import { getAdvSearchCustomField } from "metersphere-frontend/src/components/search/custom-component";
|
||||
import {hasLicense} from "metersphere-frontend/src/utils/permission";
|
||||
import {getProject} from "@/api/project";
|
||||
import {getProjectVersions} from "metersphere-frontend/src/api/version";
|
||||
import useStore, {useApiStore} from "@/store";
|
||||
import {getTestTemplate} from "metersphere-frontend/src/api/custom-field-template";
|
||||
import {getAdvSearchCustomField} from "metersphere-frontend/src/components/search/custom-component";
|
||||
import TestCaseReviewStatusTableItem from "@/business/othermodule/track/TestCaseReviewStatusTableItem";
|
||||
import TestPlanCaseStatusTableItem from "@/business/othermodule/track/TestPlanCaseStatusTableItem";
|
||||
import TestCasePreview from "@/business/othermodule/track/TestCasePreview";
|
||||
import { parseTag } from "metersphere-frontend/src/utils";
|
||||
import { getCustomFieldValueForTrack } from "@/business/component/js/table-head-util";
|
||||
import {parseTag} from "metersphere-frontend/src/utils";
|
||||
import {getCustomFieldValueForTrack} from "@/business/component/js/table-head-util";
|
||||
import {getTestCaseNodes} from "@/api/test-case-node";
|
||||
import {buildTree, buildNodePath} from "metersphere-frontend/src/model/NodeTree";
|
||||
import {buildNodePath, buildTree} from "metersphere-frontend/src/model/NodeTree";
|
||||
|
||||
export default {
|
||||
name: "TableList",
|
||||
|
@ -313,18 +305,18 @@ export default {
|
|||
loading: false,
|
||||
versionFilters: [],
|
||||
statusFilters: [
|
||||
{ text: this.$t("test_track.case.status_prepare"), value: "Prepare" },
|
||||
{ text: this.$t("test_track.case.status_running"), value: "Underway" },
|
||||
{text: this.$t("test_track.case.status_prepare"), value: "Prepare"},
|
||||
{text: this.$t("test_track.case.status_running"), value: "Underway"},
|
||||
{
|
||||
text: this.$t("test_track.case.status_finished"),
|
||||
value: "Completed",
|
||||
},
|
||||
],
|
||||
priorityFilters: [
|
||||
{ text: "P0", value: "P0" },
|
||||
{ text: "P1", value: "P1" },
|
||||
{ text: "P2", value: "P2" },
|
||||
{ text: "P3", value: "P3" },
|
||||
{text: "P0", value: "P0"},
|
||||
{text: "P1", value: "P1"},
|
||||
{text: "P2", value: "P2"},
|
||||
{text: "P3", value: "P3"},
|
||||
],
|
||||
typeArr: [],
|
||||
valueArr: {},
|
||||
|
@ -407,7 +399,7 @@ export default {
|
|||
delete this.condition.userId;
|
||||
}
|
||||
this.condition.combine = {
|
||||
followPeople: { operator: "current user", value: "current user" },
|
||||
followPeople: {operator: "current user", value: "current user"},
|
||||
};
|
||||
} else if (this.isCreation) {
|
||||
if (this.condition.filters) {
|
||||
|
@ -422,7 +414,7 @@ export default {
|
|||
if (this.condition.filters) {
|
||||
this.condition.filters.status = ["Trash"];
|
||||
} else {
|
||||
this.condition.filters = { status: ["Trash"] };
|
||||
this.condition.filters = {status: ["Trash"]};
|
||||
}
|
||||
}
|
||||
this.condition.versionId = this.currentVersion;
|
||||
|
@ -454,7 +446,7 @@ export default {
|
|||
if (this.condition.filters) {
|
||||
this.condition.filters.status = [];
|
||||
} else {
|
||||
this.condition.filters = { status: [] };
|
||||
this.condition.filters = {status: []};
|
||||
}
|
||||
}
|
||||
initCondition(this.condition, false);
|
||||
|
@ -469,7 +461,7 @@ export default {
|
|||
if (this.condition.filters) {
|
||||
this.condition.filters.status = ["Trash"];
|
||||
} else {
|
||||
this.condition.filters = { status: ["Trash"] };
|
||||
this.condition.filters = {status: ["Trash"]};
|
||||
}
|
||||
this.condition.moduleIds = [];
|
||||
initCondition(this.condition, false);
|
||||
|
@ -478,7 +470,7 @@ export default {
|
|||
if (this.condition.filters) {
|
||||
this.condition.filters.status = [];
|
||||
} else {
|
||||
this.condition.filters = { status: [] };
|
||||
this.condition.filters = {status: []};
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -712,7 +704,7 @@ export default {
|
|||
this.$emit("setCondition", this.condition);
|
||||
this.loading = true;
|
||||
testCaseList(
|
||||
{ pageNum: this.page.currentPage, pageSize: this.page.pageSize },
|
||||
{pageNum: this.page.currentPage, pageSize: this.page.pageSize},
|
||||
this.condition
|
||||
).then((response) => {
|
||||
this.loading = false;
|
||||
|
@ -763,6 +755,7 @@ export default {
|
|||
this.rowCaseResult.loading = true;
|
||||
|
||||
getTestCaseStep(id).then((response) => {
|
||||
this.rowCaseResult.loading = false;
|
||||
this.rowCase = response.data;
|
||||
this.rowCase.steps = JSON.parse(this.rowCase.steps);
|
||||
if (!this.rowCase.steps || this.rowCase.length < 1) {
|
||||
|
@ -784,7 +777,7 @@ export default {
|
|||
if (hasLicense()) {
|
||||
getProjectVersions(getCurrentProjectID()).then((response) => {
|
||||
this.versionFilters = response.data.map((u) => {
|
||||
return { text: u.name, value: u.id };
|
||||
return {text: u.name, value: u.id};
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue