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"
|
:content="itemName"
|
||||||
style="margin-left: 0px; margin-right: 2px"
|
style="margin-left: 0px; margin-right: 2px"
|
||||||
/>
|
/>
|
||||||
<span />
|
<span/>
|
||||||
</template>
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
|
@ -229,12 +229,12 @@
|
||||||
:total="page.total"
|
:total="page.total"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<test-case-preview ref="testCasePreview" :loading="rowCaseResult.loading" />
|
<test-case-preview ref="testCasePreview" :loading="rowCaseResult.loading"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { TEST_CASE_LIST } from "metersphere-frontend/src/utils/constants";
|
import {TEST_CASE_LIST} from "metersphere-frontend/src/utils/constants";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getCustomFieldFilter,
|
getCustomFieldFilter,
|
||||||
|
@ -247,39 +247,31 @@ import {
|
||||||
parseCustomFilesForList,
|
parseCustomFilesForList,
|
||||||
} from "metersphere-frontend/src/utils/tableUtils";
|
} from "metersphere-frontend/src/utils/tableUtils";
|
||||||
import HeaderLabelOperate from "metersphere-frontend/src/components/head/HeaderLabelOperate";
|
import HeaderLabelOperate from "metersphere-frontend/src/components/head/HeaderLabelOperate";
|
||||||
import {
|
import {getCurrentProjectID, getCurrentUserId,} from "metersphere-frontend/src/utils/token";
|
||||||
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 MsTable from "metersphere-frontend/src/components/table/MsTable";
|
||||||
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
|
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
|
||||||
import { SYSTEM_FIELD_NAME_MAP } from "metersphere-frontend/src/utils/table-constants";
|
import {SYSTEM_FIELD_NAME_MAP} from "metersphere-frontend/src/utils/table-constants";
|
||||||
import {
|
import {editTestCaseOrder, getTestCaseListById, getTestCaseStep, testCaseList,} from "@/api/test-case";
|
||||||
editTestCaseOrder,
|
|
||||||
getTestCaseListById,
|
|
||||||
getTestCaseStep,
|
|
||||||
testCaseList,
|
|
||||||
} from "@/api/test-case";
|
|
||||||
import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination";
|
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 PriorityTableItem from "@/business/module/track/PriorityTableItem";
|
||||||
import StatusTableItem from "@/business/module/track/StatusTableItem";
|
import StatusTableItem from "@/business/module/track/StatusTableItem";
|
||||||
import MsTag from "metersphere-frontend/src/components/MsTag";
|
import MsTag from "metersphere-frontend/src/components/MsTag";
|
||||||
import { hasLicense } from "metersphere-frontend/src/utils/permission";
|
import {hasLicense} from "metersphere-frontend/src/utils/permission";
|
||||||
import { getProject } from "@/api/project";
|
import {getProject} from "@/api/project";
|
||||||
import { getProjectVersions } from "metersphere-frontend/src/api/version";
|
import {getProjectVersions} from "metersphere-frontend/src/api/version";
|
||||||
import useStore, { useApiStore } from "@/store";
|
import useStore, {useApiStore} from "@/store";
|
||||||
import { getTestTemplate } from "metersphere-frontend/src/api/custom-field-template";
|
import {getTestTemplate} from "metersphere-frontend/src/api/custom-field-template";
|
||||||
import { getAdvSearchCustomField } from "metersphere-frontend/src/components/search/custom-component";
|
import {getAdvSearchCustomField} from "metersphere-frontend/src/components/search/custom-component";
|
||||||
import TestCaseReviewStatusTableItem from "@/business/othermodule/track/TestCaseReviewStatusTableItem";
|
import TestCaseReviewStatusTableItem from "@/business/othermodule/track/TestCaseReviewStatusTableItem";
|
||||||
import TestPlanCaseStatusTableItem from "@/business/othermodule/track/TestPlanCaseStatusTableItem";
|
import TestPlanCaseStatusTableItem from "@/business/othermodule/track/TestPlanCaseStatusTableItem";
|
||||||
import TestCasePreview from "@/business/othermodule/track/TestCasePreview";
|
import TestCasePreview from "@/business/othermodule/track/TestCasePreview";
|
||||||
import { parseTag } from "metersphere-frontend/src/utils";
|
import {parseTag} from "metersphere-frontend/src/utils";
|
||||||
import { getCustomFieldValueForTrack } from "@/business/component/js/table-head-util";
|
import {getCustomFieldValueForTrack} from "@/business/component/js/table-head-util";
|
||||||
import {getTestCaseNodes} from "@/api/test-case-node";
|
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 {
|
export default {
|
||||||
name: "TableList",
|
name: "TableList",
|
||||||
|
@ -313,18 +305,18 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
versionFilters: [],
|
versionFilters: [],
|
||||||
statusFilters: [
|
statusFilters: [
|
||||||
{ text: this.$t("test_track.case.status_prepare"), value: "Prepare" },
|
{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_running"), value: "Underway"},
|
||||||
{
|
{
|
||||||
text: this.$t("test_track.case.status_finished"),
|
text: this.$t("test_track.case.status_finished"),
|
||||||
value: "Completed",
|
value: "Completed",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
priorityFilters: [
|
priorityFilters: [
|
||||||
{ text: "P0", value: "P0" },
|
{text: "P0", value: "P0"},
|
||||||
{ text: "P1", value: "P1" },
|
{text: "P1", value: "P1"},
|
||||||
{ text: "P2", value: "P2" },
|
{text: "P2", value: "P2"},
|
||||||
{ text: "P3", value: "P3" },
|
{text: "P3", value: "P3"},
|
||||||
],
|
],
|
||||||
typeArr: [],
|
typeArr: [],
|
||||||
valueArr: {},
|
valueArr: {},
|
||||||
|
@ -407,7 +399,7 @@ export default {
|
||||||
delete this.condition.userId;
|
delete this.condition.userId;
|
||||||
}
|
}
|
||||||
this.condition.combine = {
|
this.condition.combine = {
|
||||||
followPeople: { operator: "current user", value: "current user" },
|
followPeople: {operator: "current user", value: "current user"},
|
||||||
};
|
};
|
||||||
} else if (this.isCreation) {
|
} else if (this.isCreation) {
|
||||||
if (this.condition.filters) {
|
if (this.condition.filters) {
|
||||||
|
@ -422,7 +414,7 @@ export default {
|
||||||
if (this.condition.filters) {
|
if (this.condition.filters) {
|
||||||
this.condition.filters.status = ["Trash"];
|
this.condition.filters.status = ["Trash"];
|
||||||
} else {
|
} else {
|
||||||
this.condition.filters = { status: ["Trash"] };
|
this.condition.filters = {status: ["Trash"]};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.condition.versionId = this.currentVersion;
|
this.condition.versionId = this.currentVersion;
|
||||||
|
@ -454,7 +446,7 @@ export default {
|
||||||
if (this.condition.filters) {
|
if (this.condition.filters) {
|
||||||
this.condition.filters.status = [];
|
this.condition.filters.status = [];
|
||||||
} else {
|
} else {
|
||||||
this.condition.filters = { status: [] };
|
this.condition.filters = {status: []};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
initCondition(this.condition, false);
|
initCondition(this.condition, false);
|
||||||
|
@ -469,7 +461,7 @@ export default {
|
||||||
if (this.condition.filters) {
|
if (this.condition.filters) {
|
||||||
this.condition.filters.status = ["Trash"];
|
this.condition.filters.status = ["Trash"];
|
||||||
} else {
|
} else {
|
||||||
this.condition.filters = { status: ["Trash"] };
|
this.condition.filters = {status: ["Trash"]};
|
||||||
}
|
}
|
||||||
this.condition.moduleIds = [];
|
this.condition.moduleIds = [];
|
||||||
initCondition(this.condition, false);
|
initCondition(this.condition, false);
|
||||||
|
@ -478,7 +470,7 @@ export default {
|
||||||
if (this.condition.filters) {
|
if (this.condition.filters) {
|
||||||
this.condition.filters.status = [];
|
this.condition.filters.status = [];
|
||||||
} else {
|
} else {
|
||||||
this.condition.filters = { status: [] };
|
this.condition.filters = {status: []};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -712,7 +704,7 @@ export default {
|
||||||
this.$emit("setCondition", this.condition);
|
this.$emit("setCondition", this.condition);
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
testCaseList(
|
testCaseList(
|
||||||
{ pageNum: this.page.currentPage, pageSize: this.page.pageSize },
|
{pageNum: this.page.currentPage, pageSize: this.page.pageSize},
|
||||||
this.condition
|
this.condition
|
||||||
).then((response) => {
|
).then((response) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -763,6 +755,7 @@ export default {
|
||||||
this.rowCaseResult.loading = true;
|
this.rowCaseResult.loading = true;
|
||||||
|
|
||||||
getTestCaseStep(id).then((response) => {
|
getTestCaseStep(id).then((response) => {
|
||||||
|
this.rowCaseResult.loading = false;
|
||||||
this.rowCase = response.data;
|
this.rowCase = response.data;
|
||||||
this.rowCase.steps = JSON.parse(this.rowCase.steps);
|
this.rowCase.steps = JSON.parse(this.rowCase.steps);
|
||||||
if (!this.rowCase.steps || this.rowCase.length < 1) {
|
if (!this.rowCase.steps || this.rowCase.length < 1) {
|
||||||
|
@ -784,7 +777,7 @@ export default {
|
||||||
if (hasLicense()) {
|
if (hasLicense()) {
|
||||||
getProjectVersions(getCurrentProjectID()).then((response) => {
|
getProjectVersions(getCurrentProjectID()).then((response) => {
|
||||||
this.versionFilters = response.data.map((u) => {
|
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