diff --git a/api-test/frontend/package.json b/api-test/frontend/package.json index 4d07b74428..0b155de161 100644 --- a/api-test/frontend/package.json +++ b/api-test/frontend/package.json @@ -17,6 +17,7 @@ "@fortawesome/free-regular-svg-icons": "^5.12.0", "@fortawesome/free-solid-svg-icons": "^5.12.0", "@fortawesome/vue-fontawesome": "^0.1.9", + "@ba1q1/vue-easy-tree": "^1.0.4", "axios": "^0.27.2", "diffable-html": "^4.0.0", "echarts": "^5.0.2", diff --git a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue index 17ba6b3f02..3425f44f9b 100644 --- a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue +++ b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue @@ -270,13 +270,16 @@ - - -
- +
+ - +
+ + + + @@ -566,7 +574,6 @@ import { buttons, setComponent } from './menu/Menu'; import { parseEnvironment } from '@/business/environment/model/EnvironmentModel'; import { ELEMENT_TYPE, STEP, TYPE_TO_C } from './Setting'; import { KeyValue } from '@/business/definition/model/ApiTestModel'; - import { getCurrentProjectID, getCurrentUser } from 'metersphere-frontend/src/utils/token'; import { getUUID, objToStrMap, strMapToObj } from 'metersphere-frontend/src/utils'; import { hasLicense, hasPermissions } from 'metersphere-frontend/src/utils/permission'; diff --git a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue index 22a5529e72..18c0f493d4 100644 --- a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue +++ b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue @@ -62,6 +62,7 @@ !loading && !request.testing && request.debug && + request.requestResult && request.requestResult[0] && request.requestResult[0].responseResult && request.requestResult[0].status === 'FAKE_ERROR' @@ -71,15 +72,16 @@ - {{ request.requestResult[0].success && reqSuccess ? 'Success' : 'Error' }} + {{ request.requestResult && request.requestResult[0].success && reqSuccess ? 'Success' : 'Error' }} diff --git a/api-test/frontend/src/main.js b/api-test/frontend/src/main.js index 3af11cf8c0..33cf607dae 100644 --- a/api-test/frontend/src/main.js +++ b/api-test/frontend/src/main.js @@ -21,6 +21,7 @@ import VuePapaParse from 'vue-papa-parse'; import VueShepherd from 'vue-shepherd'; // 新手引导 import 'metersphere-frontend/src/assets/shepherd/shepherd-theme.css'; import { gotoCancel, gotoNext } from "metersphere-frontend/src/utils"; +import VueEasyTree from "@ba1q1/vue-easy-tree"; Vue.config.productionTip = false; @@ -44,6 +45,7 @@ Vue.use(VueFab); // Vue.use(formCreate); Vue.use(VuePapaParse); Vue.use(VueShepherd); +Vue.use(VueEasyTree); Vue.prototype.gotoCancel = gotoCancel; Vue.prototype.gotoNext = gotoNext;