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 MsMainContainer from "../../../common/components/MsMainContainer";
|
||||
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 ReportTriggerModeItem from "../../../common/tableItem/ReportTriggerModeItem";
|
||||
import {REPORT_CONFIGS} from "../../../common/components/search/search-components";
|
||||
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
||||
import ShowMoreBtn from "../../../track/case/components/ShowMoreBtn";
|
||||
import MsApiReportDetail from "./ApiReportDetail";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
|
@ -151,36 +151,37 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
||||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
||||
import MsTag from "../../../common/components/MsTag";
|
||||
import {_filter, _sort, getCurrentProjectID, getUUID} from "@/common/js/utils";
|
||||
import MsApiReportDetail from "../report/ApiReportDetail";
|
||||
import MsTableMoreBtn from "./TableMoreBtn";
|
||||
import MsScenarioExtendButtons from "@/business/components/api/automation/scenario/ScenarioExtendBtns";
|
||||
import MsTestPlanList from "./testplan/TestPlanList";
|
||||
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
||||
import {API_SCENARIO_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||
import MsTableOperatorButton from "@/business/components/common/components/MsTableOperatorButton";
|
||||
import PriorityTableItem from "../../../track/common/tableItems/planview/PriorityTableItem";
|
||||
import PlanStatusTableItem from "../../../track/common/tableItems/plan/PlanStatusTableItem";
|
||||
import BatchEdit from "../../../track/case/components/BatchEdit";
|
||||
import {WORKSPACE_ID} from "../../../../../common/js/constants";
|
||||
import EnvironmentSelect from "../../definition/components/environment/EnvironmentSelect";
|
||||
import BatchMove from "../../../track/case/components/BatchMove";
|
||||
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
||||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
||||
import MsTag from "../../../common/components/MsTag";
|
||||
import {getCurrentProjectID, getUUID} from "@/common/js/utils";
|
||||
import MsApiReportDetail from "../report/ApiReportDetail";
|
||||
import MsTableMoreBtn from "./TableMoreBtn";
|
||||
import MsScenarioExtendButtons from "@/business/components/api/automation/scenario/ScenarioExtendBtns";
|
||||
import MsTestPlanList from "./testplan/TestPlanList";
|
||||
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
||||
import {API_SCENARIO_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||
import MsTableOperatorButton from "@/business/components/common/components/MsTableOperatorButton";
|
||||
import PriorityTableItem from "../../../track/common/tableItems/planview/PriorityTableItem";
|
||||
import PlanStatusTableItem from "../../../track/common/tableItems/plan/PlanStatusTableItem";
|
||||
import BatchEdit from "../../../track/case/components/BatchEdit";
|
||||
import {WORKSPACE_ID} from "../../../../../common/js/constants";
|
||||
import EnvironmentSelect from "../../definition/components/environment/EnvironmentSelect";
|
||||
import BatchMove from "../../../track/case/components/BatchMove";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
name: "MsApiScenarioList",
|
||||
components: {
|
||||
BatchMove,
|
||||
EnvironmentSelect,
|
||||
BatchEdit,
|
||||
PlanStatusTableItem,
|
||||
PriorityTableItem,
|
||||
MsTableHeaderSelectPopover,
|
||||
MsTablePagination,
|
||||
MsTableMoreBtn,
|
||||
export default {
|
||||
name: "MsApiScenarioList",
|
||||
components: {
|
||||
BatchMove,
|
||||
EnvironmentSelect,
|
||||
BatchEdit,
|
||||
PlanStatusTableItem,
|
||||
PriorityTableItem,
|
||||
MsTableHeaderSelectPopover,
|
||||
MsTablePagination,
|
||||
MsTableMoreBtn,
|
||||
ShowMoreBtn,
|
||||
MsTableHeader,
|
||||
MsTag,
|
||||
|
|
|
@ -88,10 +88,9 @@ import {API_METHOD_COLOUR, CASE_PRIORITY} from "../../../definition/model/JsonDa
|
|||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import ApiListContainer from "../../../definition/components/list/ApiListContainer";
|
||||
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 TableSelectCountBar from "./TableSelectCountBar";
|
||||
import {_filter, _handleSelect, _handleSelectAll, _sort,} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
name: "RelevanceApiList",
|
||||
|
|
|
@ -77,10 +77,9 @@ import {API_METHOD_COLOUR, CASE_PRIORITY} from "../../../definition/model/JsonDa
|
|||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import ApiListContainer from "../../../definition/components/list/ApiListContainer";
|
||||
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 TableSelectCountBar from "./TableSelectCountBar";
|
||||
import {_filter, _handleSelect, _handleSelectAll, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
name: "RelevanceCaseList",
|
||||
|
|
|
@ -134,33 +134,35 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import MsCreateBox from '../../../../settings/CreateBox';
|
||||
import MsTablePagination from '../../../../../components/common/pagination/TablePagination';
|
||||
import MsTableHeader from "../../../../common/components/MsTableHeader";
|
||||
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
|
||||
import MsTableOperatorButton from "../../../../common/components/MsTableOperatorButton";
|
||||
import MsTableOperator from "../../../../common/components/MsTableOperator";
|
||||
import PlanStatusTableItem from "../../../../track/common/tableItems/plan/PlanStatusTableItem";
|
||||
import PlanStageTableItem from "../../../../track/common/tableItems/plan/PlanStageTableItem";
|
||||
import {_filter, _sort, checkoutTestManagerOrTestUser} from "@/common/js/utils";
|
||||
import TestReportTemplateList from "../../../../track/plan/view/comonents/TestReportTemplateList";
|
||||
import TestCaseReportView from "../../../../track/plan/view/comonents/report/TestCaseReportView";
|
||||
import MsDeleteConfirm from "../../../../common/components/MsDeleteConfirm";
|
||||
import {TEST_PLAN_CONFIGS} from "../../../../common/components/search/search-components";
|
||||
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
||||
import {getCurrentProjectID} from "../../../../../../common/js/utils";
|
||||
import MsCreateBox from '../../../../settings/CreateBox';
|
||||
import MsTablePagination from '../../../../../components/common/pagination/TablePagination';
|
||||
import MsTableHeader from "../../../../common/components/MsTableHeader";
|
||||
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
|
||||
import MsTableOperatorButton from "../../../../common/components/MsTableOperatorButton";
|
||||
import MsTableOperator from "../../../../common/components/MsTableOperator";
|
||||
import PlanStatusTableItem from "../../../../track/common/tableItems/plan/PlanStatusTableItem";
|
||||
import PlanStageTableItem from "../../../../track/common/tableItems/plan/PlanStageTableItem";
|
||||
import {checkoutTestManagerOrTestUser} from "@/common/js/utils";
|
||||
import TestReportTemplateList from "../../../../track/plan/view/comonents/TestReportTemplateList";
|
||||
import TestCaseReportView from "../../../../track/plan/view/comonents/report/TestCaseReportView";
|
||||
import MsDeleteConfirm from "../../../../common/components/MsDeleteConfirm";
|
||||
import {TEST_PLAN_CONFIGS} from "../../../../common/components/search/search-components";
|
||||
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
||||
import {getCurrentProjectID} from "../../../../../../common/js/utils";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
name: "TestPlanList",
|
||||
components: {
|
||||
MsDeleteConfirm,
|
||||
TestCaseReportView,
|
||||
TestReportTemplateList,
|
||||
PlanStageTableItem,
|
||||
PlanStatusTableItem,
|
||||
MsTableOperator, MsTableOperatorButton, MsDialogFooter, MsTableHeader, MsCreateBox, MsTablePagination
|
||||
},
|
||||
data() {
|
||||
|
||||
export default {
|
||||
name: "TestPlanList",
|
||||
components: {
|
||||
MsDeleteConfirm,
|
||||
TestCaseReportView,
|
||||
TestReportTemplateList,
|
||||
PlanStageTableItem,
|
||||
PlanStatusTableItem,
|
||||
MsTableOperator, MsTableOperatorButton, MsDialogFooter, MsTableHeader, MsCreateBox, MsTablePagination
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
result: {},
|
||||
selection: [],
|
||||
|
|
|
@ -58,27 +58,27 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import MsEditConstant from "./EditConstant";
|
||||
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
|
||||
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
||||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||
import MsEditCounter from "./EditCounter";
|
||||
import MsEditRandom from "./EditRandom";
|
||||
import MsEditListValue from "./EditListValue";
|
||||
import MsEditCsv from "./EditCsv";
|
||||
import {_filter, getUUID} from "@/common/js/utils";
|
||||
import MsEditConstant from "./EditConstant";
|
||||
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
|
||||
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
||||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||
import MsEditCounter from "./EditCounter";
|
||||
import MsEditRandom from "./EditRandom";
|
||||
import MsEditListValue from "./EditListValue";
|
||||
import MsEditCsv from "./EditCsv";
|
||||
import {getUUID} from "@/common/js/utils";
|
||||
|
||||
export default {
|
||||
name: "MsVariableList",
|
||||
components: {
|
||||
MsEditConstant,
|
||||
MsDialogFooter,
|
||||
MsTableHeader,
|
||||
MsTablePagination,
|
||||
MsEditCounter,
|
||||
MsEditRandom,
|
||||
MsEditListValue,
|
||||
MsEditCsv
|
||||
export default {
|
||||
name: "MsVariableList",
|
||||
components: {
|
||||
MsEditConstant,
|
||||
MsDialogFooter,
|
||||
MsTableHeader,
|
||||
MsTablePagination,
|
||||
MsEditCounter,
|
||||
MsEditRandom,
|
||||
MsEditListValue,
|
||||
MsEditCsv
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -132,18 +132,16 @@ import {API_METHOD_COLOUR, CASE_PRIORITY, DUBBO_METHOD, REQ_METHOD, SQL_METHOD,
|
|||
import {getBodyUploadFiles, getCurrentProjectID} from "@/common/js/utils";
|
||||
import ApiListContainer from "./ApiListContainer";
|
||||
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 MsReferenceView from "../reference/ReferenceView";
|
||||
import MsSetEnvironment from "@/business/components/api/definition/components/basis/SetEnvironment";
|
||||
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 {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 MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
||||
import {API_CASE_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||
import {_filter, _handleSelect, _handleSelectAll, _sort,} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
name: "ApiCaseSimpleList",
|
||||
|
|
|
@ -187,8 +187,8 @@ import MsContainer from "../../../../common/components/MsContainer";
|
|||
import MsBottomContainer from "../BottomContainer";
|
||||
import ShowMoreBtn from "../../../../track/case/components/ShowMoreBtn";
|
||||
import MsBatchEdit from "../basis/BatchEdit";
|
||||
import {API_METHOD_COLOUR, API_STATUS, REQ_METHOD, TCP_METHOD, SQL_METHOD, DUBBO_METHOD} from "../../model/JsonData";
|
||||
import {_filter, _sort, getCurrentProjectID} from "@/common/js/utils";
|
||||
import {API_METHOD_COLOUR, API_STATUS, DUBBO_METHOD, REQ_METHOD, SQL_METHOD, TCP_METHOD} from "../../model/JsonData";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import {WORKSPACE_ID} from '@/common/js/constants';
|
||||
import ApiListContainer from "./ApiListContainer";
|
||||
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 MsTipButton from "@/business/components/common/components/MsTipButton";
|
||||
import CaseBatchMove from "@/business/components/api/definition/components/basis/BatchMove";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
|
||||
export default {
|
||||
name: "ApiList",
|
||||
|
|
|
@ -63,12 +63,12 @@ import MsTableHeader from "../../common/components/MsTableHeader";
|
|||
import MsContainer from "../../common/components/MsContainer";
|
||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||
import MsApiReportStatus from "./ApiReportStatus";
|
||||
import {_filter, _sort} from "@/common/js/utils";
|
||||
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
||||
import ReportTriggerModeItem from "../../common/tableItem/ReportTriggerModeItem";
|
||||
import {REPORT_CONFIGS} from "../../common/components/search/search-components";
|
||||
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
||||
import ShowMoreBtn from "../../track/case/components/ShowMoreBtn";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
|
@ -61,31 +61,31 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import OneClickOperation from './OneClickOperation';
|
||||
import MsTablePagination from "../../common/pagination/TablePagination";
|
||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||
import MsTableOperator from "../../common/components/MsTableOperator";
|
||||
import MsContainer from "../../common/components/MsContainer";
|
||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||
import MsApiTestStatus from "./ApiTestStatus";
|
||||
import MsTableOperators from "../../common/components/MsTableOperators";
|
||||
import {_filter, _sort} from "@/common/js/utils";
|
||||
import {TEST_CONFIGS} from "../../common/components/search/search-components";
|
||||
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
||||
import ApiCopyDialog from "./components/ApiCopyDialog";
|
||||
import MsUpgrade from "./Upgrade";
|
||||
import OneClickOperation from './OneClickOperation';
|
||||
import MsTablePagination from "../../common/pagination/TablePagination";
|
||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||
import MsTableOperator from "../../common/components/MsTableOperator";
|
||||
import MsContainer from "../../common/components/MsContainer";
|
||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||
import MsApiTestStatus from "./ApiTestStatus";
|
||||
import MsTableOperators from "../../common/components/MsTableOperators";
|
||||
import {TEST_CONFIGS} from "../../common/components/search/search-components";
|
||||
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
||||
import ApiCopyDialog from "./components/ApiCopyDialog";
|
||||
import MsUpgrade from "./Upgrade";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ApiCopyDialog,
|
||||
OneClickOperation,
|
||||
MsTableOperators,
|
||||
MsApiTestStatus, MsMainContainer, MsContainer, MsTableHeader, MsTablePagination, MsTableOperator, MsUpgrade
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
result: {},
|
||||
condition: {
|
||||
export default {
|
||||
components: {
|
||||
ApiCopyDialog,
|
||||
OneClickOperation,
|
||||
MsTableOperators,
|
||||
MsApiTestStatus, MsMainContainer, MsContainer, MsTableHeader, MsTablePagination, MsTableOperator, MsUpgrade
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
result: {},
|
||||
condition: {
|
||||
components: TEST_CONFIGS
|
||||
},
|
||||
projectId: null,
|
||||
|
|
|
@ -93,13 +93,15 @@ import MsTablePagination from "../../common/pagination/TablePagination";
|
|||
import MsContainer from "../../common/components/MsContainer";
|
||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||
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 ReportTriggerModeItem from "../../common/tableItem/ReportTriggerModeItem";
|
||||
import {REPORT_CONFIGS} from "../../common/components/search/search-components";
|
||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||
import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent";
|
||||
import ShowMoreBtn from "../../track/case/components/ShowMoreBtn";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
|
||||
export default {
|
||||
name: "PerformanceTestReport",
|
||||
|
|
|
@ -89,11 +89,12 @@ import MsContainer from "../../common/components/MsContainer";
|
|||
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||
import MsPerformanceTestStatus from "./PerformanceTestStatus";
|
||||
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 {TEST_CONFIGS} from "../../common/components/search/search-components";
|
||||
import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent";
|
||||
import {WORKSPACE_ID} from "@/common/js/constants";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
|
@ -92,33 +92,35 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import MsCreateBox from "../CreateBox";
|
||||
import {Message} from "element-ui";
|
||||
import MsTablePagination from "../../common/pagination/TablePagination";
|
||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||
import MsTableOperator from "../../common/components/MsTableOperator";
|
||||
import MsDialogFooter from "../../common/components/MsDialogFooter";
|
||||
import {_sort, getCurrentProjectID, getCurrentUser, listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
||||
import MsContainer from "../../common/components/MsContainer";
|
||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||
import MsDeleteConfirm from "../../common/components/MsDeleteConfirm";
|
||||
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
||||
import ApiEnvironmentConfig from "../../api/test/components/ApiEnvironmentConfig";
|
||||
import TemplateComponent from "../../track/plan/view/comonents/report/TemplateComponent/TemplateComponent";
|
||||
import {PROJECT_ID} from "@/common/js/constants";
|
||||
import MsJarConfig from "../../api/test/components/jar/JarConfig";
|
||||
import MsTableButton from "../../common/components/MsTableButton";
|
||||
export default {
|
||||
name: "MsProject",
|
||||
components: {
|
||||
MsTableButton,
|
||||
MsJarConfig,
|
||||
TemplateComponent,
|
||||
ApiEnvironmentConfig,
|
||||
MsTableOperatorButton,
|
||||
MsDeleteConfirm,
|
||||
MsMainContainer,
|
||||
MsContainer, MsTableOperator, MsCreateBox, MsTablePagination, MsTableHeader, MsDialogFooter
|
||||
import MsCreateBox from "../CreateBox";
|
||||
import {Message} from "element-ui";
|
||||
import MsTablePagination from "../../common/pagination/TablePagination";
|
||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||
import MsTableOperator from "../../common/components/MsTableOperator";
|
||||
import MsDialogFooter from "../../common/components/MsDialogFooter";
|
||||
import {getCurrentProjectID, getCurrentUser, listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
||||
import MsContainer from "../../common/components/MsContainer";
|
||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||
import MsDeleteConfirm from "../../common/components/MsDeleteConfirm";
|
||||
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
||||
import ApiEnvironmentConfig from "../../api/test/components/ApiEnvironmentConfig";
|
||||
import TemplateComponent from "../../track/plan/view/comonents/report/TemplateComponent/TemplateComponent";
|
||||
import {PROJECT_ID} from "@/common/js/constants";
|
||||
import MsJarConfig from "../../api/test/components/jar/JarConfig";
|
||||
import MsTableButton from "../../common/components/MsTableButton";
|
||||
import {_sort} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
name: "MsProject",
|
||||
components: {
|
||||
MsTableButton,
|
||||
MsJarConfig,
|
||||
TemplateComponent,
|
||||
ApiEnvironmentConfig,
|
||||
MsTableOperatorButton,
|
||||
MsDeleteConfirm,
|
||||
MsMainContainer,
|
||||
MsContainer, MsTableOperator, MsCreateBox, MsTablePagination, MsTableHeader, MsDialogFooter
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -187,7 +187,6 @@ import MethodTableItem from "../../common/tableItems/planview/MethodTableItem";
|
|||
import MsTableOperator from "../../../common/components/MsTableOperator";
|
||||
import MsTableOperatorButton from "../../../common/components/MsTableOperatorButton";
|
||||
import MsTableButton from "../../../common/components/MsTableButton";
|
||||
import {_filter, _sort} from "@/common/js/utils";
|
||||
import {TEST_CASE_CONFIGS} from "../../../common/components/search/search-components";
|
||||
import ShowMoreBtn from "./ShowMoreBtn";
|
||||
import BatchEdit from "./BatchEdit";
|
||||
|
@ -199,12 +198,14 @@ import ReviewStatus from "@/business/components/track/case/components/ReviewStat
|
|||
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||
import MsTag from "@/business/components/common/components/MsTag";
|
||||
import {
|
||||
_filter,
|
||||
_handleSelect,
|
||||
_handleSelectAll,
|
||||
_sort,
|
||||
getSelectDataCounts,
|
||||
setUnSelectIds,
|
||||
toggleAllSelection
|
||||
} from "../../../../../common/js/tableUtils";
|
||||
} from "@/common/js/tableUtils";
|
||||
import BatchMove from "./BatchMove";
|
||||
|
||||
export default {
|
||||
|
|
|
@ -158,7 +158,7 @@ import MsTableOperatorButton from "../../../common/components/MsTableOperatorBut
|
|||
import MsTableOperator from "../../../common/components/MsTableOperator";
|
||||
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
||||
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 TestCaseReportView from "../view/comonents/report/TestCaseReportView";
|
||||
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 {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||
import MsScheduleMaintain from "@/business/components/api/automation/schedule/ScheduleMaintain"
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
|
||||
export default {
|
||||
name: "TestPlanList",
|
||||
|
|
|
@ -132,13 +132,15 @@ import {API_METHOD_COLOUR, CASE_PRIORITY, RESULT_MAP} from "../../../../../api/d
|
|||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import ApiListContainer from "../../../../../api/definition/components/list/ApiListContainer";
|
||||
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 MsRun from "../../../../../api/definition/components/Run";
|
||||
import TestPlanApiCaseResult from "./TestPlanApiCaseResult";
|
||||
import TestPlan from "../../../../../api/definition/components/jmeter/components/test-plan";
|
||||
import ThreadGroup from "../../../../../api/definition/components/jmeter/components/thread-group";
|
||||
import {WORKSPACE_ID} from "@/common/js/constants";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
|
||||
export default {
|
||||
name: "TestPlanApiCaseList",
|
||||
|
|
|
@ -250,21 +250,21 @@ import MsTableButton from '../../../../../common/components/MsTableButton';
|
|||
import NodeBreadcrumb from '../../../../common/NodeBreadcrumb';
|
||||
|
||||
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 StatusTableItem from "../../../../common/tableItems/planview/StatusTableItem";
|
||||
import TypeTableItem from "../../../../common/tableItems/planview/TypeTableItem";
|
||||
import MethodTableItem from "../../../../common/tableItems/planview/MethodTableItem";
|
||||
import MsTableOperator from "../../../../../common/components/MsTableOperator";
|
||||
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 ShowMoreBtn from "../../../../case/components/ShowMoreBtn";
|
||||
import BatchEdit from "../../../../case/components/BatchEdit";
|
||||
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
||||
import {hub} from "@/business/components/track/plan/event-bus";
|
||||
import MsTag from "@/business/components/common/components/MsTag";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
|
||||
export default {
|
||||
name: "FunctionalTestCaseList",
|
||||
|
|
|
@ -70,28 +70,29 @@
|
|||
|
||||
<script>
|
||||
|
||||
import NodeTree from '../../../../common/NodeTree';
|
||||
import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem";
|
||||
import TypeTableItem from "../../../../common/tableItems/planview/TypeTableItem";
|
||||
import MsTableSearchBar from "../../../../../common/components/MsTableSearchBar";
|
||||
import MsTableAdvSearchBar from "../../../../../common/components/search/MsTableAdvSearchBar";
|
||||
import MsTableHeader from "../../../../../common/components/MsTableHeader";
|
||||
import {TEST_CASE_CONFIGS} from "../../../../../common/components/search/search-components";
|
||||
import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
||||
import TestCaseRelevanceBase from "../base/TestCaseRelevanceBase";
|
||||
import {_filter} from "../../../../../../../common/js/utils";
|
||||
import NodeTree from '../../../../common/NodeTree';
|
||||
import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem";
|
||||
import TypeTableItem from "../../../../common/tableItems/planview/TypeTableItem";
|
||||
import MsTableSearchBar from "../../../../../common/components/MsTableSearchBar";
|
||||
import MsTableAdvSearchBar from "../../../../../common/components/search/MsTableAdvSearchBar";
|
||||
import MsTableHeader from "../../../../../common/components/MsTableHeader";
|
||||
import {TEST_CASE_CONFIGS} from "../../../../../common/components/search/search-components";
|
||||
import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
||||
import TestCaseRelevanceBase from "../base/TestCaseRelevanceBase";
|
||||
import {_filter} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
name: "TestCaseFunctionalRelevance",
|
||||
components: {
|
||||
TestCaseRelevanceBase,
|
||||
NodeTree,
|
||||
PriorityTableItem,
|
||||
TypeTableItem,
|
||||
MsTableSearchBar,
|
||||
MsTableAdvSearchBar,
|
||||
MsTableHeader,
|
||||
},
|
||||
|
||||
export default {
|
||||
name: "TestCaseFunctionalRelevance",
|
||||
components: {
|
||||
TestCaseRelevanceBase,
|
||||
NodeTree,
|
||||
PriorityTableItem,
|
||||
TypeTableItem,
|
||||
MsTableSearchBar,
|
||||
MsTableAdvSearchBar,
|
||||
MsTableHeader,
|
||||
},
|
||||
directives: {
|
||||
'el-table-infinite-scroll': elTableInfiniteScroll
|
||||
},
|
||||
|
|
|
@ -115,11 +115,11 @@
|
|||
import TestPlanLoadCaseListHeader
|
||||
from "@/business/components/track/plan/view/comonents/load/TestPlanLoadCaseListHeader";
|
||||
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 MsPerformanceTestStatus from "@/business/components/performance/test/PerformanceTestStatus";
|
||||
import MsTableOperatorButton from "@/business/components/common/components/MsTableOperatorButton";
|
||||
import LoadCaseReport from "@/business/components/track/plan/view/comonents/load/LoadCaseReport";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
name: "TestPlanLoadCaseList",
|
||||
|
|
|
@ -64,7 +64,7 @@ import MsTablePagination from '../../../../components/common/pagination/TablePag
|
|||
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
||||
import MsTableOperatorButton from "../../../common/components/MsTableOperatorButton";
|
||||
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 {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||
import TestPlanReportView from "@/business/components/track/report/components/TestPlanReportView";
|
||||
|
@ -72,14 +72,16 @@ import ReportTriggerModeItem from "@/business/components/common/tableItem/Report
|
|||
import MsTag from "@/business/components/common/components/MsTag";
|
||||
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
||||
import MsTableSelectAll from "@/business/components/common/components/table/MsTableSelectAll";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
|
||||
export default {
|
||||
name: "TestPlanReportList",
|
||||
components: {
|
||||
TestPlanReportView,
|
||||
MsTableOperator, MsTableOperatorButton, MsTableHeader, MsTablePagination,
|
||||
ReportTriggerModeItem,MsTag,
|
||||
ShowMoreBtn,MsTableSelectAll,
|
||||
ReportTriggerModeItem, MsTag,
|
||||
ShowMoreBtn, MsTableSelectAll,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -94,31 +94,32 @@
|
|||
|
||||
<script>
|
||||
|
||||
import NodeTree from "../../../common/NodeTree";
|
||||
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
|
||||
import PriorityTableItem from "../../../common/tableItems/planview/PriorityTableItem";
|
||||
import TypeTableItem from "../../../common/tableItems/planview/TypeTableItem";
|
||||
import MsTableSearchBar from "../../../../common/components/MsTableSearchBar";
|
||||
import MsTableAdvSearchBar from "../../../../common/components/search/MsTableAdvSearchBar";
|
||||
import MsTableHeader from "../../../../common/components/MsTableHeader";
|
||||
import SwitchProject from "../../../case/components/SwitchProject";
|
||||
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 elTableInfiniteScroll from 'el-table-infinite-scroll';
|
||||
import SelectMenu from "../../../common/SelectMenu";
|
||||
import NodeTree from "../../../common/NodeTree";
|
||||
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
|
||||
import PriorityTableItem from "../../../common/tableItems/planview/PriorityTableItem";
|
||||
import TypeTableItem from "../../../common/tableItems/planview/TypeTableItem";
|
||||
import MsTableSearchBar from "../../../../common/components/MsTableSearchBar";
|
||||
import MsTableAdvSearchBar from "../../../../common/components/search/MsTableAdvSearchBar";
|
||||
import MsTableHeader from "../../../../common/components/MsTableHeader";
|
||||
import SwitchProject from "../../../case/components/SwitchProject";
|
||||
import {TEST_CASE_CONFIGS} from "../../../../common/components/search/search-components";
|
||||
import ReviewStatus from "@/business/components/track/case/components/ReviewStatus";
|
||||
import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
||||
import SelectMenu from "../../../common/SelectMenu";
|
||||
import {_filter} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
name: "TestReviewRelevance",
|
||||
components: {
|
||||
SelectMenu,
|
||||
NodeTree,
|
||||
MsDialogFooter,
|
||||
PriorityTableItem,
|
||||
TypeTableItem,
|
||||
MsTableSearchBar,
|
||||
MsTableAdvSearchBar,
|
||||
MsTableHeader,
|
||||
|
||||
export default {
|
||||
name: "TestReviewRelevance",
|
||||
components: {
|
||||
SelectMenu,
|
||||
NodeTree,
|
||||
MsDialogFooter,
|
||||
PriorityTableItem,
|
||||
TypeTableItem,
|
||||
MsTableSearchBar,
|
||||
MsTableAdvSearchBar,
|
||||
MsTableHeader,
|
||||
SwitchProject,
|
||||
ReviewStatus
|
||||
|
||||
|
|
|
@ -169,11 +169,12 @@ import MsTableButton from "../../../../common/components/MsTableButton";
|
|||
import ShowMoreBtn from "../../../case/components/ShowMoreBtn";
|
||||
import BatchEdit from "../../../case/components/BatchEdit";
|
||||
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 {ROLE_TEST_MANAGER, ROLE_TEST_USER} from "../../../../../../common/js/constants";
|
||||
import TestReviewTestCaseEdit from "./TestReviewTestCaseEdit";
|
||||
import ReviewStatus from "@/business/components/track/case/components/ReviewStatus";
|
||||
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||
|
||||
export default {
|
||||
name: "TestReviewTestCaseList",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import {humpToLine} from "@/common/js/utils";
|
||||
|
||||
export function _handleSelectAll(component, selection, tableData, selectRows) {
|
||||
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 {
|
||||
LicenseKey,
|
||||
PROJECT_ID,
|
||||
REFRESH_SESSION_USER_URL,
|
||||
ROLE_ADMIN,
|
||||
ROLE_ORG_ADMIN,
|
||||
ROLE_TEST_MANAGER,
|
||||
ROLE_TEST_USER,
|
||||
ROLE_TEST_VIEWER,
|
||||
TokenKey,
|
||||
PROJECT_ID
|
||||
TokenKey
|
||||
} from "./constants";
|
||||
import axios from "axios";
|
||||
import {jsPDF} from "jspdf";
|
||||
|
@ -138,45 +138,6 @@ export function humpToLine(name) {
|
|||
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) {
|
||||
const blob = new Blob([content]);
|
||||
if ("download" in document.createElement("a")) {
|
||||
|
|
Loading…
Reference in New Issue