refactor: 代码优化
This commit is contained in:
parent
947ec17383
commit
c115ea22e5
|
@ -83,13 +83,14 @@ import MsTableHeader from "../../../common/components/MsTableHeader";
|
||||||
import MsContainer from "../../../common/components/MsContainer";
|
import MsContainer from "../../../common/components/MsContainer";
|
||||||
import MsMainContainer from "../../../common/components/MsMainContainer";
|
import MsMainContainer from "../../../common/components/MsMainContainer";
|
||||||
import MsApiReportStatus from "./ApiReportStatus";
|
import MsApiReportStatus from "./ApiReportStatus";
|
||||||
import {_filter, _sort, getCurrentProjectID} from "@/common/js/utils";
|
import {getCurrentProjectID} from "@/common/js/utils";
|
||||||
import MsTableOperatorButton from "../../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../../common/components/MsTableOperatorButton";
|
||||||
import ReportTriggerModeItem from "../../../common/tableItem/ReportTriggerModeItem";
|
import ReportTriggerModeItem from "../../../common/tableItem/ReportTriggerModeItem";
|
||||||
import {REPORT_CONFIGS} from "../../../common/components/search/search-components";
|
import {REPORT_CONFIGS} from "../../../common/components/search/search-components";
|
||||||
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
||||||
import ShowMoreBtn from "../../../track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "../../../track/case/components/ShowMoreBtn";
|
||||||
import MsApiReportDetail from "./ApiReportDetail";
|
import MsApiReportDetail from "./ApiReportDetail";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -155,7 +155,7 @@
|
||||||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||||
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
||||||
import MsTag from "../../../common/components/MsTag";
|
import MsTag from "../../../common/components/MsTag";
|
||||||
import {_filter, _sort, getCurrentProjectID, getUUID} from "@/common/js/utils";
|
import {getCurrentProjectID, getUUID} from "@/common/js/utils";
|
||||||
import MsApiReportDetail from "../report/ApiReportDetail";
|
import MsApiReportDetail from "../report/ApiReportDetail";
|
||||||
import MsTableMoreBtn from "./TableMoreBtn";
|
import MsTableMoreBtn from "./TableMoreBtn";
|
||||||
import MsScenarioExtendButtons from "@/business/components/api/automation/scenario/ScenarioExtendBtns";
|
import MsScenarioExtendButtons from "@/business/components/api/automation/scenario/ScenarioExtendBtns";
|
||||||
|
@ -169,6 +169,7 @@
|
||||||
import {WORKSPACE_ID} from "../../../../../common/js/constants";
|
import {WORKSPACE_ID} from "../../../../../common/js/constants";
|
||||||
import EnvironmentSelect from "../../definition/components/environment/EnvironmentSelect";
|
import EnvironmentSelect from "../../definition/components/environment/EnvironmentSelect";
|
||||||
import BatchMove from "../../../track/case/components/BatchMove";
|
import BatchMove from "../../../track/case/components/BatchMove";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsApiScenarioList",
|
name: "MsApiScenarioList",
|
||||||
|
|
|
@ -88,10 +88,9 @@ import {API_METHOD_COLOUR, CASE_PRIORITY} from "../../../definition/model/JsonDa
|
||||||
import {getCurrentProjectID} from "@/common/js/utils";
|
import {getCurrentProjectID} from "@/common/js/utils";
|
||||||
import ApiListContainer from "../../../definition/components/list/ApiListContainer";
|
import ApiListContainer from "../../../definition/components/list/ApiListContainer";
|
||||||
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
|
||||||
import {_filter, _sort} from "../../../../../../common/js/utils";
|
|
||||||
import {_handleSelect, _handleSelectAll} from "../../../../../../common/js/tableUtils";
|
|
||||||
import MsEnvironmentSelect from "../../../definition/components/case/MsEnvironmentSelect";
|
import MsEnvironmentSelect from "../../../definition/components/case/MsEnvironmentSelect";
|
||||||
import TableSelectCountBar from "./TableSelectCountBar";
|
import TableSelectCountBar from "./TableSelectCountBar";
|
||||||
|
import {_filter, _handleSelect, _handleSelectAll, _sort,} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RelevanceApiList",
|
name: "RelevanceApiList",
|
||||||
|
|
|
@ -77,10 +77,9 @@ import {API_METHOD_COLOUR, CASE_PRIORITY} from "../../../definition/model/JsonDa
|
||||||
import {getCurrentProjectID} from "@/common/js/utils";
|
import {getCurrentProjectID} from "@/common/js/utils";
|
||||||
import ApiListContainer from "../../../definition/components/list/ApiListContainer";
|
import ApiListContainer from "../../../definition/components/list/ApiListContainer";
|
||||||
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
|
||||||
import {_filter, _sort} from "../../../../../../common/js/utils";
|
|
||||||
import {_handleSelect, _handleSelectAll} from "../../../../../../common/js/tableUtils";
|
|
||||||
import MsEnvironmentSelect from "../../../definition/components/case/MsEnvironmentSelect";
|
import MsEnvironmentSelect from "../../../definition/components/case/MsEnvironmentSelect";
|
||||||
import TableSelectCountBar from "./TableSelectCountBar";
|
import TableSelectCountBar from "./TableSelectCountBar";
|
||||||
|
import {_filter, _handleSelect, _handleSelectAll, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RelevanceCaseList",
|
name: "RelevanceCaseList",
|
||||||
|
|
|
@ -142,13 +142,15 @@
|
||||||
import MsTableOperator from "../../../../common/components/MsTableOperator";
|
import MsTableOperator from "../../../../common/components/MsTableOperator";
|
||||||
import PlanStatusTableItem from "../../../../track/common/tableItems/plan/PlanStatusTableItem";
|
import PlanStatusTableItem from "../../../../track/common/tableItems/plan/PlanStatusTableItem";
|
||||||
import PlanStageTableItem from "../../../../track/common/tableItems/plan/PlanStageTableItem";
|
import PlanStageTableItem from "../../../../track/common/tableItems/plan/PlanStageTableItem";
|
||||||
import {_filter, _sort, checkoutTestManagerOrTestUser} from "@/common/js/utils";
|
import {checkoutTestManagerOrTestUser} from "@/common/js/utils";
|
||||||
import TestReportTemplateList from "../../../../track/plan/view/comonents/TestReportTemplateList";
|
import TestReportTemplateList from "../../../../track/plan/view/comonents/TestReportTemplateList";
|
||||||
import TestCaseReportView from "../../../../track/plan/view/comonents/report/TestCaseReportView";
|
import TestCaseReportView from "../../../../track/plan/view/comonents/report/TestCaseReportView";
|
||||||
import MsDeleteConfirm from "../../../../common/components/MsDeleteConfirm";
|
import MsDeleteConfirm from "../../../../common/components/MsDeleteConfirm";
|
||||||
import {TEST_PLAN_CONFIGS} from "../../../../common/components/search/search-components";
|
import {TEST_PLAN_CONFIGS} from "../../../../common/components/search/search-components";
|
||||||
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
||||||
import {getCurrentProjectID} from "../../../../../../common/js/utils";
|
import {getCurrentProjectID} from "../../../../../../common/js/utils";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanList",
|
name: "TestPlanList",
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
import MsEditRandom from "./EditRandom";
|
import MsEditRandom from "./EditRandom";
|
||||||
import MsEditListValue from "./EditListValue";
|
import MsEditListValue from "./EditListValue";
|
||||||
import MsEditCsv from "./EditCsv";
|
import MsEditCsv from "./EditCsv";
|
||||||
import {_filter, getUUID} from "@/common/js/utils";
|
import {getUUID} from "@/common/js/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsVariableList",
|
name: "MsVariableList",
|
||||||
|
|
|
@ -132,18 +132,16 @@ import {API_METHOD_COLOUR, CASE_PRIORITY, DUBBO_METHOD, REQ_METHOD, SQL_METHOD,
|
||||||
import {getBodyUploadFiles, getCurrentProjectID} from "@/common/js/utils";
|
import {getBodyUploadFiles, getCurrentProjectID} from "@/common/js/utils";
|
||||||
import ApiListContainer from "./ApiListContainer";
|
import ApiListContainer from "./ApiListContainer";
|
||||||
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
|
||||||
import {_filter, _sort} from "../../../../../../common/js/utils";
|
|
||||||
import {_handleSelect, _handleSelectAll} from "../../../../../../common/js/tableUtils";
|
|
||||||
import MsApiCaseTableExtendBtns from "../reference/ApiCaseTableExtendBtns";
|
import MsApiCaseTableExtendBtns from "../reference/ApiCaseTableExtendBtns";
|
||||||
import MsReferenceView from "../reference/ReferenceView";
|
import MsReferenceView from "../reference/ReferenceView";
|
||||||
import MsSetEnvironment from "@/business/components/api/definition/components/basis/SetEnvironment";
|
import MsSetEnvironment from "@/business/components/api/definition/components/basis/SetEnvironment";
|
||||||
import TestPlan from "@/business/components/api/definition/components/jmeter/components/test-plan";
|
import TestPlan from "@/business/components/api/definition/components/jmeter/components/test-plan";
|
||||||
import ThreadGroup from "@/business/components/api/definition/components/jmeter/components/thread-group";
|
import ThreadGroup from "@/business/components/api/definition/components/jmeter/components/thread-group";
|
||||||
import {parseEnvironment} from "@/business/components/api/test/model/EnvironmentModel";
|
import {parseEnvironment} from "@/business/components/api/test/model/EnvironmentModel";
|
||||||
// import MsTableSelectAll from "../../../../common/components/table/MsTableSelectAll";
|
|
||||||
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
||||||
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
||||||
import {API_CASE_CONFIGS} from "@/business/components/common/components/search/search-components";
|
import {API_CASE_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||||
|
import {_filter, _handleSelect, _handleSelectAll, _sort,} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ApiCaseSimpleList",
|
name: "ApiCaseSimpleList",
|
||||||
|
|
|
@ -187,8 +187,8 @@ import MsContainer from "../../../../common/components/MsContainer";
|
||||||
import MsBottomContainer from "../BottomContainer";
|
import MsBottomContainer from "../BottomContainer";
|
||||||
import ShowMoreBtn from "../../../../track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "../../../../track/case/components/ShowMoreBtn";
|
||||||
import MsBatchEdit from "../basis/BatchEdit";
|
import MsBatchEdit from "../basis/BatchEdit";
|
||||||
import {API_METHOD_COLOUR, API_STATUS, REQ_METHOD, TCP_METHOD, SQL_METHOD, DUBBO_METHOD} from "../../model/JsonData";
|
import {API_METHOD_COLOUR, API_STATUS, DUBBO_METHOD, REQ_METHOD, SQL_METHOD, TCP_METHOD} from "../../model/JsonData";
|
||||||
import {_filter, _sort, getCurrentProjectID} from "@/common/js/utils";
|
import {getCurrentProjectID} from "@/common/js/utils";
|
||||||
import {WORKSPACE_ID} from '@/common/js/constants';
|
import {WORKSPACE_ID} from '@/common/js/constants';
|
||||||
import ApiListContainer from "./ApiListContainer";
|
import ApiListContainer from "./ApiListContainer";
|
||||||
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
||||||
|
@ -197,6 +197,8 @@ import MsTableAdvSearchBar from "@/business/components/common/components/search/
|
||||||
import {API_DEFINITION_CONFIGS} from "@/business/components/common/components/search/search-components";
|
import {API_DEFINITION_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||||
import MsTipButton from "@/business/components/common/components/MsTipButton";
|
import MsTipButton from "@/business/components/common/components/MsTipButton";
|
||||||
import CaseBatchMove from "@/business/components/api/definition/components/basis/BatchMove";
|
import CaseBatchMove from "@/business/components/api/definition/components/basis/BatchMove";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ApiList",
|
name: "ApiList",
|
||||||
|
|
|
@ -63,12 +63,12 @@ import MsTableHeader from "../../common/components/MsTableHeader";
|
||||||
import MsContainer from "../../common/components/MsContainer";
|
import MsContainer from "../../common/components/MsContainer";
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import MsApiReportStatus from "./ApiReportStatus";
|
import MsApiReportStatus from "./ApiReportStatus";
|
||||||
import {_filter, _sort} from "@/common/js/utils";
|
|
||||||
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
||||||
import ReportTriggerModeItem from "../../common/tableItem/ReportTriggerModeItem";
|
import ReportTriggerModeItem from "../../common/tableItem/ReportTriggerModeItem";
|
||||||
import {REPORT_CONFIGS} from "../../common/components/search/search-components";
|
import {REPORT_CONFIGS} from "../../common/components/search/search-components";
|
||||||
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
||||||
import ShowMoreBtn from "../../track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "../../track/case/components/ShowMoreBtn";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -69,11 +69,11 @@
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import MsApiTestStatus from "./ApiTestStatus";
|
import MsApiTestStatus from "./ApiTestStatus";
|
||||||
import MsTableOperators from "../../common/components/MsTableOperators";
|
import MsTableOperators from "../../common/components/MsTableOperators";
|
||||||
import {_filter, _sort} from "@/common/js/utils";
|
|
||||||
import {TEST_CONFIGS} from "../../common/components/search/search-components";
|
import {TEST_CONFIGS} from "../../common/components/search/search-components";
|
||||||
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
||||||
import ApiCopyDialog from "./components/ApiCopyDialog";
|
import ApiCopyDialog from "./components/ApiCopyDialog";
|
||||||
import MsUpgrade from "./Upgrade";
|
import MsUpgrade from "./Upgrade";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -93,13 +93,15 @@ import MsTablePagination from "../../common/pagination/TablePagination";
|
||||||
import MsContainer from "../../common/components/MsContainer";
|
import MsContainer from "../../common/components/MsContainer";
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import MsPerformanceReportStatus from "./PerformanceReportStatus";
|
import MsPerformanceReportStatus from "./PerformanceReportStatus";
|
||||||
import {_filter, _sort, getCurrentProjectID} from "../../../../common/js/utils";
|
import {getCurrentProjectID} from "../../../../common/js/utils";
|
||||||
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
||||||
import ReportTriggerModeItem from "../../common/tableItem/ReportTriggerModeItem";
|
import ReportTriggerModeItem from "../../common/tableItem/ReportTriggerModeItem";
|
||||||
import {REPORT_CONFIGS} from "../../common/components/search/search-components";
|
import {REPORT_CONFIGS} from "../../common/components/search/search-components";
|
||||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||||
import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent";
|
import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent";
|
||||||
import ShowMoreBtn from "../../track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "../../track/case/components/ShowMoreBtn";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PerformanceTestReport",
|
name: "PerformanceTestReport",
|
||||||
|
|
|
@ -89,11 +89,12 @@ import MsContainer from "../../common/components/MsContainer";
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import MsPerformanceTestStatus from "./PerformanceTestStatus";
|
import MsPerformanceTestStatus from "./PerformanceTestStatus";
|
||||||
import MsTableOperators from "../../common/components/MsTableOperators";
|
import MsTableOperators from "../../common/components/MsTableOperators";
|
||||||
import {_filter, _sort, getCurrentProjectID} from "@/common/js/utils";
|
import {getCurrentProjectID} from "@/common/js/utils";
|
||||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||||
import {TEST_CONFIGS} from "../../common/components/search/search-components";
|
import {TEST_CONFIGS} from "../../common/components/search/search-components";
|
||||||
import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent";
|
import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent";
|
||||||
import {WORKSPACE_ID} from "@/common/js/constants";
|
import {WORKSPACE_ID} from "@/common/js/constants";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||||
import MsTableOperator from "../../common/components/MsTableOperator";
|
import MsTableOperator from "../../common/components/MsTableOperator";
|
||||||
import MsDialogFooter from "../../common/components/MsDialogFooter";
|
import MsDialogFooter from "../../common/components/MsDialogFooter";
|
||||||
import {_sort, getCurrentProjectID, getCurrentUser, listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
import {getCurrentProjectID, getCurrentUser, listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
||||||
import MsContainer from "../../common/components/MsContainer";
|
import MsContainer from "../../common/components/MsContainer";
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import MsDeleteConfirm from "../../common/components/MsDeleteConfirm";
|
import MsDeleteConfirm from "../../common/components/MsDeleteConfirm";
|
||||||
|
@ -108,6 +108,8 @@
|
||||||
import {PROJECT_ID} from "@/common/js/constants";
|
import {PROJECT_ID} from "@/common/js/constants";
|
||||||
import MsJarConfig from "../../api/test/components/jar/JarConfig";
|
import MsJarConfig from "../../api/test/components/jar/JarConfig";
|
||||||
import MsTableButton from "../../common/components/MsTableButton";
|
import MsTableButton from "../../common/components/MsTableButton";
|
||||||
|
import {_sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsProject",
|
name: "MsProject",
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -187,7 +187,6 @@ import MethodTableItem from "../../common/tableItems/planview/MethodTableItem";
|
||||||
import MsTableOperator from "../../../common/components/MsTableOperator";
|
import MsTableOperator from "../../../common/components/MsTableOperator";
|
||||||
import MsTableOperatorButton from "../../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../../common/components/MsTableOperatorButton";
|
||||||
import MsTableButton from "../../../common/components/MsTableButton";
|
import MsTableButton from "../../../common/components/MsTableButton";
|
||||||
import {_filter, _sort} from "@/common/js/utils";
|
|
||||||
import {TEST_CASE_CONFIGS} from "../../../common/components/search/search-components";
|
import {TEST_CASE_CONFIGS} from "../../../common/components/search/search-components";
|
||||||
import ShowMoreBtn from "./ShowMoreBtn";
|
import ShowMoreBtn from "./ShowMoreBtn";
|
||||||
import BatchEdit from "./BatchEdit";
|
import BatchEdit from "./BatchEdit";
|
||||||
|
@ -199,12 +198,14 @@ import ReviewStatus from "@/business/components/track/case/components/ReviewStat
|
||||||
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||||
import MsTag from "@/business/components/common/components/MsTag";
|
import MsTag from "@/business/components/common/components/MsTag";
|
||||||
import {
|
import {
|
||||||
|
_filter,
|
||||||
_handleSelect,
|
_handleSelect,
|
||||||
_handleSelectAll,
|
_handleSelectAll,
|
||||||
|
_sort,
|
||||||
getSelectDataCounts,
|
getSelectDataCounts,
|
||||||
setUnSelectIds,
|
setUnSelectIds,
|
||||||
toggleAllSelection
|
toggleAllSelection
|
||||||
} from "../../../../../common/js/tableUtils";
|
} from "@/common/js/tableUtils";
|
||||||
import BatchMove from "./BatchMove";
|
import BatchMove from "./BatchMove";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -158,7 +158,7 @@ import MsTableOperatorButton from "../../../common/components/MsTableOperatorBut
|
||||||
import MsTableOperator from "../../../common/components/MsTableOperator";
|
import MsTableOperator from "../../../common/components/MsTableOperator";
|
||||||
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
||||||
import PlanStageTableItem from "../../common/tableItems/plan/PlanStageTableItem";
|
import PlanStageTableItem from "../../common/tableItems/plan/PlanStageTableItem";
|
||||||
import {_filter, _sort, checkoutTestManagerOrTestUser} from "@/common/js/utils";
|
import {checkoutTestManagerOrTestUser} from "@/common/js/utils";
|
||||||
import TestReportTemplateList from "../view/comonents/TestReportTemplateList";
|
import TestReportTemplateList from "../view/comonents/TestReportTemplateList";
|
||||||
import TestCaseReportView from "../view/comonents/report/TestCaseReportView";
|
import TestCaseReportView from "../view/comonents/report/TestCaseReportView";
|
||||||
import MsDeleteConfirm from "../../../common/components/MsDeleteConfirm";
|
import MsDeleteConfirm from "../../../common/components/MsDeleteConfirm";
|
||||||
|
@ -166,6 +166,8 @@ import {TEST_PLAN_CONFIGS} from "../../../common/components/search/search-compon
|
||||||
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
||||||
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||||
import MsScheduleMaintain from "@/business/components/api/automation/schedule/ScheduleMaintain"
|
import MsScheduleMaintain from "@/business/components/api/automation/schedule/ScheduleMaintain"
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanList",
|
name: "TestPlanList",
|
||||||
|
|
|
@ -132,13 +132,15 @@ import {API_METHOD_COLOUR, CASE_PRIORITY, RESULT_MAP} from "../../../../../api/d
|
||||||
import {getCurrentProjectID} from "@/common/js/utils";
|
import {getCurrentProjectID} from "@/common/js/utils";
|
||||||
import ApiListContainer from "../../../../../api/definition/components/list/ApiListContainer";
|
import ApiListContainer from "../../../../../api/definition/components/list/ApiListContainer";
|
||||||
import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem";
|
||||||
import {_filter, _sort, getBodyUploadFiles, getUUID} from "../../../../../../../common/js/utils";
|
import {getBodyUploadFiles, getUUID} from "../../../../../../../common/js/utils";
|
||||||
import TestPlanCaseListHeader from "./TestPlanCaseListHeader";
|
import TestPlanCaseListHeader from "./TestPlanCaseListHeader";
|
||||||
import MsRun from "../../../../../api/definition/components/Run";
|
import MsRun from "../../../../../api/definition/components/Run";
|
||||||
import TestPlanApiCaseResult from "./TestPlanApiCaseResult";
|
import TestPlanApiCaseResult from "./TestPlanApiCaseResult";
|
||||||
import TestPlan from "../../../../../api/definition/components/jmeter/components/test-plan";
|
import TestPlan from "../../../../../api/definition/components/jmeter/components/test-plan";
|
||||||
import ThreadGroup from "../../../../../api/definition/components/jmeter/components/thread-group";
|
import ThreadGroup from "../../../../../api/definition/components/jmeter/components/thread-group";
|
||||||
import {WORKSPACE_ID} from "@/common/js/constants";
|
import {WORKSPACE_ID} from "@/common/js/constants";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanApiCaseList",
|
name: "TestPlanApiCaseList",
|
||||||
|
|
|
@ -250,21 +250,21 @@ import MsTableButton from '../../../../../common/components/MsTableButton';
|
||||||
import NodeBreadcrumb from '../../../../common/NodeBreadcrumb';
|
import NodeBreadcrumb from '../../../../common/NodeBreadcrumb';
|
||||||
|
|
||||||
import {ROLE_TEST_MANAGER, ROLE_TEST_USER, TokenKey, WORKSPACE_ID} from "@/common/js/constants";
|
import {ROLE_TEST_MANAGER, ROLE_TEST_USER, TokenKey, WORKSPACE_ID} from "@/common/js/constants";
|
||||||
import {_filter, _sort, checkoutTestManagerOrTestUser, hasRoles} from "@/common/js/utils";
|
import {checkoutTestManagerOrTestUser, hasRoles} from "@/common/js/utils";
|
||||||
import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem";
|
||||||
import StatusTableItem from "../../../../common/tableItems/planview/StatusTableItem";
|
import StatusTableItem from "../../../../common/tableItems/planview/StatusTableItem";
|
||||||
import TypeTableItem from "../../../../common/tableItems/planview/TypeTableItem";
|
import TypeTableItem from "../../../../common/tableItems/planview/TypeTableItem";
|
||||||
import MethodTableItem from "../../../../common/tableItems/planview/MethodTableItem";
|
import MethodTableItem from "../../../../common/tableItems/planview/MethodTableItem";
|
||||||
import MsTableOperator from "../../../../../common/components/MsTableOperator";
|
import MsTableOperator from "../../../../../common/components/MsTableOperator";
|
||||||
import MsTableOperatorButton from "../../../../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../../../../common/components/MsTableOperatorButton";
|
||||||
import TestReportTemplateList from "../TestReportTemplateList";
|
|
||||||
import TestCaseReportView from "../report/TestCaseReportView";
|
|
||||||
import {TEST_CASE_CONFIGS} from "../../../../../common/components/search/search-components";
|
import {TEST_CASE_CONFIGS} from "../../../../../common/components/search/search-components";
|
||||||
import ShowMoreBtn from "../../../../case/components/ShowMoreBtn";
|
import ShowMoreBtn from "../../../../case/components/ShowMoreBtn";
|
||||||
import BatchEdit from "../../../../case/components/BatchEdit";
|
import BatchEdit from "../../../../case/components/BatchEdit";
|
||||||
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
||||||
import {hub} from "@/business/components/track/plan/event-bus";
|
import {hub} from "@/business/components/track/plan/event-bus";
|
||||||
import MsTag from "@/business/components/common/components/MsTag";
|
import MsTag from "@/business/components/common/components/MsTag";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "FunctionalTestCaseList",
|
name: "FunctionalTestCaseList",
|
||||||
|
|
|
@ -79,7 +79,8 @@
|
||||||
import {TEST_CASE_CONFIGS} from "../../../../../common/components/search/search-components";
|
import {TEST_CASE_CONFIGS} from "../../../../../common/components/search/search-components";
|
||||||
import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
||||||
import TestCaseRelevanceBase from "../base/TestCaseRelevanceBase";
|
import TestCaseRelevanceBase from "../base/TestCaseRelevanceBase";
|
||||||
import {_filter} from "../../../../../../../common/js/utils";
|
import {_filter} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestCaseFunctionalRelevance",
|
name: "TestCaseFunctionalRelevance",
|
||||||
|
|
|
@ -115,11 +115,11 @@
|
||||||
import TestPlanLoadCaseListHeader
|
import TestPlanLoadCaseListHeader
|
||||||
from "@/business/components/track/plan/view/comonents/load/TestPlanLoadCaseListHeader";
|
from "@/business/components/track/plan/view/comonents/load/TestPlanLoadCaseListHeader";
|
||||||
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
||||||
import {_filter, _sort} from "@/common/js/utils";
|
|
||||||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||||
import MsPerformanceTestStatus from "@/business/components/performance/test/PerformanceTestStatus";
|
import MsPerformanceTestStatus from "@/business/components/performance/test/PerformanceTestStatus";
|
||||||
import MsTableOperatorButton from "@/business/components/common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "@/business/components/common/components/MsTableOperatorButton";
|
||||||
import LoadCaseReport from "@/business/components/track/plan/view/comonents/load/LoadCaseReport";
|
import LoadCaseReport from "@/business/components/track/plan/view/comonents/load/LoadCaseReport";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanLoadCaseList",
|
name: "TestPlanLoadCaseList",
|
||||||
|
|
|
@ -64,7 +64,7 @@ import MsTablePagination from '../../../../components/common/pagination/TablePag
|
||||||
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
||||||
import MsTableOperatorButton from "../../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../../common/components/MsTableOperatorButton";
|
||||||
import MsTableOperator from "../../../common/components/MsTableOperator";
|
import MsTableOperator from "../../../common/components/MsTableOperator";
|
||||||
import {_filter, _sort, checkoutTestManagerOrTestUser} from "@/common/js/utils";
|
import {checkoutTestManagerOrTestUser} from "@/common/js/utils";
|
||||||
import {TEST_PLAN_REPORT_CONFIGS} from "../../../common/components/search/search-components";
|
import {TEST_PLAN_REPORT_CONFIGS} from "../../../common/components/search/search-components";
|
||||||
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||||
import TestPlanReportView from "@/business/components/track/report/components/TestPlanReportView";
|
import TestPlanReportView from "@/business/components/track/report/components/TestPlanReportView";
|
||||||
|
@ -72,6 +72,8 @@ import ReportTriggerModeItem from "@/business/components/common/tableItem/Report
|
||||||
import MsTag from "@/business/components/common/components/MsTag";
|
import MsTag from "@/business/components/common/components/MsTag";
|
||||||
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
||||||
import MsTableSelectAll from "@/business/components/common/components/table/MsTableSelectAll";
|
import MsTableSelectAll from "@/business/components/common/components/table/MsTableSelectAll";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanReportList",
|
name: "TestPlanReportList",
|
||||||
|
|
|
@ -103,10 +103,11 @@
|
||||||
import MsTableHeader from "../../../../common/components/MsTableHeader";
|
import MsTableHeader from "../../../../common/components/MsTableHeader";
|
||||||
import SwitchProject from "../../../case/components/SwitchProject";
|
import SwitchProject from "../../../case/components/SwitchProject";
|
||||||
import {TEST_CASE_CONFIGS} from "../../../../common/components/search/search-components";
|
import {TEST_CASE_CONFIGS} from "../../../../common/components/search/search-components";
|
||||||
import {_filter} from "../../../../../../common/js/utils";
|
|
||||||
import ReviewStatus from "@/business/components/track/case/components/ReviewStatus";
|
import ReviewStatus from "@/business/components/track/case/components/ReviewStatus";
|
||||||
import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
||||||
import SelectMenu from "../../../common/SelectMenu";
|
import SelectMenu from "../../../common/SelectMenu";
|
||||||
|
import {_filter} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestReviewRelevance",
|
name: "TestReviewRelevance",
|
||||||
|
|
|
@ -169,11 +169,12 @@ import MsTableButton from "../../../../common/components/MsTableButton";
|
||||||
import ShowMoreBtn from "../../../case/components/ShowMoreBtn";
|
import ShowMoreBtn from "../../../case/components/ShowMoreBtn";
|
||||||
import BatchEdit from "../../../case/components/BatchEdit";
|
import BatchEdit from "../../../case/components/BatchEdit";
|
||||||
import MsTablePagination from '../../../../common/pagination/TablePagination';
|
import MsTablePagination from '../../../../common/pagination/TablePagination';
|
||||||
import {_filter, _sort, checkoutTestManagerOrTestUser, hasRoles} from "../../../../../../common/js/utils";
|
import {checkoutTestManagerOrTestUser, hasRoles} from "../../../../../../common/js/utils";
|
||||||
import {TEST_CASE_CONFIGS} from "../../../../common/components/search/search-components";
|
import {TEST_CASE_CONFIGS} from "../../../../common/components/search/search-components";
|
||||||
import {ROLE_TEST_MANAGER, ROLE_TEST_USER} from "../../../../../../common/js/constants";
|
import {ROLE_TEST_MANAGER, ROLE_TEST_USER} from "../../../../../../common/js/constants";
|
||||||
import TestReviewTestCaseEdit from "./TestReviewTestCaseEdit";
|
import TestReviewTestCaseEdit from "./TestReviewTestCaseEdit";
|
||||||
import ReviewStatus from "@/business/components/track/case/components/ReviewStatus";
|
import ReviewStatus from "@/business/components/track/case/components/ReviewStatus";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestReviewTestCaseList",
|
name: "TestReviewTestCaseList",
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import {humpToLine} from "@/common/js/utils";
|
||||||
|
|
||||||
export function _handleSelectAll(component, selection, tableData, selectRows) {
|
export function _handleSelectAll(component, selection, tableData, selectRows) {
|
||||||
if (selection.length > 0) {
|
if (selection.length > 0) {
|
||||||
|
@ -61,4 +62,45 @@ export function toggleAllSelection(table, tableData, selectRows) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//表格数据过滤
|
||||||
|
export function _filter(filters, condition) {
|
||||||
|
if (!condition.filters) {
|
||||||
|
condition.filters = {};
|
||||||
|
}
|
||||||
|
for (let filter in filters) {
|
||||||
|
if (filters.hasOwnProperty(filter)) {
|
||||||
|
if (filters[filter] && filters[filter].length > 0) {
|
||||||
|
condition.filters[humpToLine(filter)] = filters[filter];
|
||||||
|
} else {
|
||||||
|
condition.filters[humpToLine(filter)] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//表格数据排序
|
||||||
|
export function _sort(column, condition) {
|
||||||
|
column.prop = humpToLine(column.prop);
|
||||||
|
if (column.order === 'descending') {
|
||||||
|
column.order = 'desc';
|
||||||
|
} else {
|
||||||
|
column.order = 'asc';
|
||||||
|
}
|
||||||
|
if (!condition.orders) {
|
||||||
|
condition.orders = [];
|
||||||
|
}
|
||||||
|
let hasProp = false;
|
||||||
|
condition.orders.forEach(order => {
|
||||||
|
if (order.name === column.prop) {
|
||||||
|
order.type = column.order;
|
||||||
|
hasProp = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (!hasProp) {
|
||||||
|
condition.orders.push({name: column.prop, type: column.order});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
LicenseKey,
|
LicenseKey,
|
||||||
|
PROJECT_ID,
|
||||||
REFRESH_SESSION_USER_URL,
|
REFRESH_SESSION_USER_URL,
|
||||||
ROLE_ADMIN,
|
ROLE_ADMIN,
|
||||||
ROLE_ORG_ADMIN,
|
ROLE_ORG_ADMIN,
|
||||||
ROLE_TEST_MANAGER,
|
ROLE_TEST_MANAGER,
|
||||||
ROLE_TEST_USER,
|
ROLE_TEST_USER,
|
||||||
ROLE_TEST_VIEWER,
|
ROLE_TEST_VIEWER,
|
||||||
TokenKey,
|
TokenKey
|
||||||
PROJECT_ID
|
|
||||||
} from "./constants";
|
} from "./constants";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import {jsPDF} from "jspdf";
|
import {jsPDF} from "jspdf";
|
||||||
|
@ -138,45 +138,6 @@ export function humpToLine(name) {
|
||||||
return name.replace(/([A-Z])/g, "_$1").toLowerCase();
|
return name.replace(/([A-Z])/g, "_$1").toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
//表格数据过滤
|
|
||||||
export function _filter(filters, condition) {
|
|
||||||
if (!condition.filters) {
|
|
||||||
condition.filters = {};
|
|
||||||
}
|
|
||||||
for (let filter in filters) {
|
|
||||||
if (filters.hasOwnProperty(filter)) {
|
|
||||||
if (filters[filter] && filters[filter].length > 0) {
|
|
||||||
condition.filters[humpToLine(filter)] = filters[filter];
|
|
||||||
} else {
|
|
||||||
condition.filters[humpToLine(filter)] = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//表格数据排序
|
|
||||||
export function _sort(column, condition) {
|
|
||||||
column.prop = humpToLine(column.prop);
|
|
||||||
if (column.order === 'descending') {
|
|
||||||
column.order = 'desc';
|
|
||||||
} else {
|
|
||||||
column.order = 'asc';
|
|
||||||
}
|
|
||||||
if (!condition.orders) {
|
|
||||||
condition.orders = [];
|
|
||||||
}
|
|
||||||
let hasProp = false;
|
|
||||||
condition.orders.forEach(order => {
|
|
||||||
if (order.name === column.prop) {
|
|
||||||
order.type = column.order;
|
|
||||||
hasProp = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (!hasProp) {
|
|
||||||
condition.orders.push({name: column.prop, type: column.order});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function downloadFile(name, content) {
|
export function downloadFile(name, content) {
|
||||||
const blob = new Blob([content]);
|
const blob = new Blob([content]);
|
||||||
if ("download" in document.createElement("a")) {
|
if ("download" in document.createElement("a")) {
|
||||||
|
|
Loading…
Reference in New Issue