fix (接口自动化): 部分嵌套组件较多页面改成懒加载
This commit is contained in:
parent
584c7aad83
commit
20d3562675
|
@ -97,23 +97,17 @@
|
|||
|
||||
<script>
|
||||
|
||||
import MsContainer from "@/business/components/common/components/MsContainer";
|
||||
import MsAsideContainer from "@/business/components/common/components/MsAsideContainer";
|
||||
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
|
||||
import MsApiScenarioList from "@/business/components/api/automation/scenario/ApiScenarioList";
|
||||
import {getCurrentProjectID, getCurrentUser, getUUID, hasPermission} from "@/common/js/utils";
|
||||
import MsApiScenarioModule from "@/business/components/api/automation/scenario/ApiScenarioModule";
|
||||
import MsEditApiScenario from "./scenario/EditApiScenario";
|
||||
|
||||
export default {
|
||||
name: "ApiAutomation",
|
||||
components: {
|
||||
MsApiScenarioModule,
|
||||
MsApiScenarioList,
|
||||
MsMainContainer,
|
||||
MsAsideContainer,
|
||||
MsContainer,
|
||||
MsEditApiScenario
|
||||
MsApiScenarioModule: () => import("@/business/components/api/automation/scenario/ApiScenarioModule"),
|
||||
MsApiScenarioList: () => import("@/business/components/api/automation/scenario/ApiScenarioList"),
|
||||
MsMainContainer: () => import("@/business/components/common/components/MsMainContainer"),
|
||||
MsAsideContainer: () => import("@/business/components/common/components/MsAsideContainer"),
|
||||
MsContainer: () => import("@/business/components/common/components/MsContainer"),
|
||||
MsEditApiScenario: () => import("./scenario/EditApiScenario")
|
||||
},
|
||||
comments: {},
|
||||
computed: {
|
||||
|
|
|
@ -229,63 +229,41 @@
|
|||
</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 {downloadFile, getCurrentProjectID, getUUID, objToStrMap, strMapToObj} from "@/common/js/utils";
|
||||
import SysnApiReportDetail from "../report/SysnApiReportDetail";
|
||||
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 {downloadFile, getCurrentProjectID, getUUID, strMapToObj} from "@/common/js/utils";
|
||||
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 {API_SCENARIO_LIST, PROJECT_NAME, WORKSPACE_ID} from "../../../../../common/js/constants";
|
||||
import EnvironmentSelect from "../../definition/components/environment/EnvironmentSelect";
|
||||
import BatchMove from "../../../track/case/components/BatchMove";
|
||||
import MsRunMode from "./common/RunMode";
|
||||
import MsTaskCenter from "../../../task/TaskCenter";
|
||||
import {API_SCENARIO_LIST} from "../../../../../common/js/constants";
|
||||
|
||||
import {
|
||||
getCustomTableHeader, getCustomTableWidth, getLastTableSortField, saveLastTableSortField
|
||||
} from "@/common/js/tableUtils";
|
||||
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
||||
import HeaderLabelOperate from "@/business/components/common/head/HeaderLabelOperate";
|
||||
import {API_SCENARIO_FILTERS} from "@/common/js/table-constants";
|
||||
import MsTableColumn from "@/business/components/common/components/table/MsTableColumn";
|
||||
import MsTable from "@/business/components/common/components/table/MsTable";
|
||||
import {scenario} from "@/business/components/track/plan/event-bus";
|
||||
|
||||
export default {
|
||||
name: "MsApiScenarioList",
|
||||
components: {
|
||||
MsTable,
|
||||
MsTableColumn,
|
||||
HeaderLabelOperate,
|
||||
HeaderCustom,
|
||||
BatchMove,
|
||||
EnvironmentSelect,
|
||||
BatchEdit,
|
||||
PlanStatusTableItem,
|
||||
PriorityTableItem,
|
||||
MsTableHeaderSelectPopover,
|
||||
MsTablePagination,
|
||||
MsTableMoreBtn,
|
||||
ShowMoreBtn,
|
||||
MsTableHeader,
|
||||
MsTag,
|
||||
MsApiReportDetail,
|
||||
SysnApiReportDetail,
|
||||
MsScenarioExtendButtons,
|
||||
MsTestPlanList,
|
||||
MsTableOperatorButton,
|
||||
MsRunMode,
|
||||
MsTaskCenter
|
||||
MsTable: () => import("@/business/components/common/components/table/MsTable"),
|
||||
MsTableColumn: () => import("@/business/components/common/components/table/MsTableColumn"),
|
||||
HeaderLabelOperate: () => import("@/business/components/common/head/HeaderLabelOperate"),
|
||||
HeaderCustom: () => import("@/business/components/common/head/HeaderCustom"),
|
||||
BatchMove: () => import("../../../track/case/components/BatchMove"),
|
||||
EnvironmentSelect: () => import("../../definition/components/environment/EnvironmentSelect"),
|
||||
BatchEdit: () => import("../../../track/case/components/BatchEdit"),
|
||||
PlanStatusTableItem: () => import("../../../track/common/tableItems/plan/PlanStatusTableItem"),
|
||||
PriorityTableItem: () => import("../../../track/common/tableItems/planview/PriorityTableItem"),
|
||||
MsTableHeaderSelectPopover: () => import("@/business/components/common/components/table/MsTableHeaderSelectPopover"),
|
||||
MsTablePagination: () => import("@/business/components/common/pagination/TablePagination"),
|
||||
MsTableMoreBtn: () => import("./TableMoreBtn"),
|
||||
ShowMoreBtn: () => import("@/business/components/track/case/components/ShowMoreBtn"),
|
||||
MsTableHeader: () => import("@/business/components/common/components/MsTableHeader"),
|
||||
MsTag: () => import("../../../common/components/MsTag"),
|
||||
MsApiReportDetail: () => import("../report/ApiReportDetail"),
|
||||
SysnApiReportDetail: () => import("../report/SysnApiReportDetail"),
|
||||
MsScenarioExtendButtons: () => import("@/business/components/api/automation/scenario/ScenarioExtendBtns"),
|
||||
MsTestPlanList: () => import("./testplan/TestPlanList"),
|
||||
MsTableOperatorButton: () => import("@/business/components/common/components/MsTableOperatorButton"),
|
||||
MsRunMode: () => import("./common/RunMode"),
|
||||
MsTaskCenter: () => import("../../../task/TaskCenter")
|
||||
},
|
||||
props: {
|
||||
referenced: {
|
||||
|
|
|
@ -326,7 +326,6 @@ import {API_STATUS, PRIORITY} from "../../definition/model/JsonData";
|
|||
import {buttons, setComponent} from './menu/Menu';
|
||||
import {parseEnvironment} from "../../definition/model/EnvironmentModel";
|
||||
import {ELEMENT_TYPE, ELEMENTS} from "./Setting";
|
||||
import MsApiCustomize from "./ApiCustomize";
|
||||
import {
|
||||
getUUID,
|
||||
objToStrMap,
|
||||
|
@ -335,25 +334,9 @@ import {
|
|||
getCurrentProjectID,
|
||||
handleCtrlREvent
|
||||
} from "@/common/js/utils";
|
||||
import ApiEnvironmentConfig from "@/business/components/api/test/components/ApiEnvironmentConfig";
|
||||
import MsInputTag from "./MsInputTag";
|
||||
import MsRun from "./DebugRun";
|
||||
import MsApiReportDetail from "../report/SysnApiReportDetail";
|
||||
import MsVariableList from "./variable/VariableList";
|
||||
import ApiImport from "../../definition/components/import/ApiImport";
|
||||
import "@/common/css/material-icons.css"
|
||||
import OutsideClick from "@/common/js/outside-click";
|
||||
import ScenarioApiRelevance from "./api/ApiRelevance";
|
||||
import ScenarioRelevance from "./api/ScenarioRelevance";
|
||||
import MsComponentConfig from "./component/ComponentConfig";
|
||||
import EnvPopover from "@/business/components/api/automation/scenario/EnvPopover";
|
||||
import MaximizeScenario from "./maximize/MaximizeScenario";
|
||||
import ScenarioHeader from "./maximize/ScenarioHeader";
|
||||
import MsDrawer from "../../../common/components/MsDrawer";
|
||||
import MsSelectTree from "../../../common/select-tree/SelectTree";
|
||||
import {saveScenario} from "@/business/components/api/automation/api-automation";
|
||||
import MsChangeHistory from "../../../history/ChangeHistory";
|
||||
import MsTaskCenter from "../../../task/TaskCenter";
|
||||
|
||||
let jsonPath = require('jsonpath');
|
||||
export default {
|
||||
|
@ -368,22 +351,23 @@ export default {
|
|||
}
|
||||
},
|
||||
components: {
|
||||
MsVariableList,
|
||||
ScenarioRelevance,
|
||||
ScenarioApiRelevance,
|
||||
ApiEnvironmentConfig,
|
||||
MsApiReportDetail,
|
||||
MsInputTag, MsRun,
|
||||
MsApiCustomize,
|
||||
ApiImport,
|
||||
MsComponentConfig,
|
||||
EnvPopover,
|
||||
MaximizeScenario,
|
||||
ScenarioHeader,
|
||||
MsDrawer,
|
||||
MsSelectTree,
|
||||
MsChangeHistory,
|
||||
MsTaskCenter
|
||||
MsVariableList: () => import("./variable/VariableList"),
|
||||
ScenarioRelevance: () => import("./api/ScenarioRelevance"),
|
||||
ScenarioApiRelevance: () => import("./api/ApiRelevance"),
|
||||
ApiEnvironmentConfig: () => import("@/business/components/api/test/components/ApiEnvironmentConfig"),
|
||||
MsApiReportDetail: () => import("../report/SysnApiReportDetail"),
|
||||
MsInputTag: () => import("./MsInputTag"),
|
||||
MsRun: () => import("./DebugRun"),
|
||||
MsApiCustomize: () => import("./ApiCustomize"),
|
||||
ApiImport: () => import("../../definition/components/import/ApiImport"),
|
||||
MsComponentConfig: () => import("./component/ComponentConfig"),
|
||||
EnvPopover: () => import("@/business/components/api/automation/scenario/EnvPopover"),
|
||||
MaximizeScenario: () => import("./maximize/MaximizeScenario"),
|
||||
ScenarioHeader: () => import("./maximize/ScenarioHeader"),
|
||||
MsDrawer: () => import("../../../common/components/MsDrawer"),
|
||||
MsSelectTree: () => import("../../../common/select-tree/SelectTree"),
|
||||
MsChangeHistory: () => import("../../../history/ChangeHistory"),
|
||||
MsTaskCenter: () => import("../../../task/TaskCenter")
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -150,26 +150,15 @@
|
|||
import {API_STATUS, PRIORITY} from "../../../definition/model/JsonData";
|
||||
import {parseEnvironment} from "../../../definition/model/EnvironmentModel";
|
||||
import {ELEMENT_TYPE, ELEMENTS} from "../Setting";
|
||||
import MsApiCustomize from "../ApiCustomize";
|
||||
import {getCurrentProjectID, getUUID, strMapToObj} from "@/common/js/utils";
|
||||
import ApiEnvironmentConfig from "@/business/components/api/test/components/ApiEnvironmentConfig";
|
||||
import MsInputTag from "../MsInputTag";
|
||||
import MsRun from "../DebugRun";
|
||||
import MsApiReportDetail from "../../report/ApiReportDetail";
|
||||
import MsVariableList from "../variable/VariableList";
|
||||
import ApiImport from "../../../definition/components/import/ApiImport";
|
||||
import "@/common/css/material-icons.css"
|
||||
import OutsideClick from "@/common/js/outside-click";
|
||||
import ScenarioApiRelevance from "../api/ApiRelevance";
|
||||
import ScenarioRelevance from "../api/ScenarioRelevance";
|
||||
import MsComponentConfig from "../component/ComponentConfig";
|
||||
import {handleCtrlSEvent} from "../../../../../../common/js/utils";
|
||||
import EnvPopover from "@/business/components/api/automation/scenario/EnvPopover";
|
||||
import {saveScenario} from "@/business/components/api/automation/api-automation";
|
||||
import {buttons, setComponent} from '../menu/Menu';
|
||||
import MsContainer from "../../../../common/components/MsContainer";
|
||||
import MsMainContainer from "../../../../common/components/MsMainContainer";
|
||||
import MsAsideContainer from "./MsLeftContainer";
|
||||
import {saveScenario} from "@/business/components/api/automation/api-automation";
|
||||
import {buttons, setComponent} from '../menu/Menu';
|
||||
|
||||
let jsonPath = require('jsonpath');
|
||||
export default {
|
||||
|
@ -190,19 +179,20 @@ export default {
|
|||
message: String,
|
||||
},
|
||||
components: {
|
||||
MsVariableList,
|
||||
ScenarioRelevance,
|
||||
ScenarioApiRelevance,
|
||||
ApiEnvironmentConfig,
|
||||
MsApiReportDetail,
|
||||
MsInputTag, MsRun,
|
||||
MsApiCustomize,
|
||||
ApiImport,
|
||||
MsComponentConfig,
|
||||
EnvPopover,
|
||||
MsContainer,
|
||||
MsMainContainer,
|
||||
MsAsideContainer
|
||||
MsAsideContainer,
|
||||
MsVariableList: () => import("../variable/VariableList"),
|
||||
ScenarioRelevance: () => import("../api/ScenarioRelevance"),
|
||||
ScenarioApiRelevance: () => import("../api/ApiRelevance"),
|
||||
ApiEnvironmentConfig: () => import("@/business/components/api/test/components/ApiEnvironmentConfig"),
|
||||
MsApiReportDetail: () => import("../../report/ApiReportDetail"),
|
||||
MsInputTag: () => import("../MsInputTag"),
|
||||
MsRun: () => import("../DebugRun"),
|
||||
MsApiCustomize: () => import("../ApiCustomize"),
|
||||
ApiImport: () => import("../../../definition/components/import/ApiImport"),
|
||||
MsComponentConfig: () => import("../component/ComponentConfig"),
|
||||
EnvPopover: () => import("@/business/components/api/automation/scenario/EnvPopover"),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue