diff --git a/frontend/src/business/components/project/menu/appmanage/AppManage.vue b/frontend/src/business/components/project/menu/appmanage/AppManage.vue index a2db59c250..baaa1d2fa5 100644 --- a/frontend/src/business/components/project/menu/appmanage/AppManage.vue +++ b/frontend/src/business/components/project/menu/appmanage/AppManage.vue @@ -2,95 +2,92 @@
- - - - - {{ this.$t('commons.my_workstation') }} - - -
- - - {{ this.$t('commons.enable_settings') }} - - -
-
- {{ - this.$t('project.public') - }} - {{ this.$t('project.public_info') }} - - -
- {{ - this.$t('project.test_case_custom_id') - }} - {{ this.$t('project.test_case_custom_id_info') }} - -
-
-
-
-
- - - - - {{ this.$t('commons.enable_settings') }} - - -
- {{ - this.$t('project.repeatable') - }} - {{ this.$t('project.repeatable_info') }} - - - {{ this.$t('project.scenario_custom_id') }} - {{ this.$t('project.scenario_custom_id_info') }} - - - {{ 'TCP Mock Port' }} - - -
-
-
- - - {{ this.$t('commons.view_settings') }} - - -
- {{ - this.$t('api_test.definition.api_quick_button') - }} - + + + + {{ $t('commons.my_workstation') }} + + + + + {{ this.$t('commons.enable_settings') }} + + + + + + + + + + + + + + + + + {{ $t('commons.enable_settings') }} + + + + + + + + + + + + + + + + + {{ $t('commons.view_settings') }} + + + + + + + + + - {{ - this.$t('commons.performance') - }} - - - + + + {{ this.$t('commons.enable_settings') }} + + + +
@@ -105,16 +102,16 @@ import MsMainContainer from "@/business/components/common/components/MsMainConta import { getCurrentProjectID, - getCurrentUser, getCurrentUserId, getCurrentWorkspaceId, - getUUID, hasLicense, - hasPermission + hasLicense, } from "@/common/js/utils"; +import AppManageItem from "@/business/components/settings/common/AppManageItem"; export default { name: "appManage", components: { + AppManageItem, MsMainContainer, MsContainer }, @@ -122,34 +119,14 @@ export default { return { activeName: 'test_track', form: {}, - labelWidth: '400px', count: 0, isXpack: false, result: {} }; }, created() { - this.result = this.$get('/project/get/' + this.projectId, res => { - this.form = res.data; - this.count = 0 - }) - if (hasLicense()) { - this.isXpack = true; - } else { - this.isXpack = false; - } - - }, - watch: { - form: { - handler(val, oldVal) { - this.count++; - if (this.count > 1) { - this.submitForm(); - } - }, - deep: true - } + this.init(); + this.isXpack = !!hasLicense(); }, computed: { projectId() { @@ -157,48 +134,26 @@ export default { }, }, methods: { - handleClick() { - - }, - submitForm() { + chooseChange() { this.form.workspaceId = getCurrentWorkspaceId(); this.form.createUser = getCurrentUserId(); - this.form.id = getCurrentProjectID(); - this.result = this.$post("/project/update", this.form, () => { + this.form.id = this.projectId; + this.$post("/project/update", this.form, () => { this.$success(this.$t('commons.save_success')); + this.init(); + }, () => { + this.init(); }); }, - chengeMockTcpSwitch(value) { - if (value && this.form.mockTcpPort === 0) { - this.result = this.$get('/project/genTcpMockPort/' + this.form.id, res => { - let port = res.data; - this.form.mockTcpPort = port; - }) - } + init() { + this.result = this.$get('/project/get/' + this.projectId, res => { + this.form = res.data; + }) } - } }; diff --git a/frontend/src/business/components/settings/common/AppManageItem.vue b/frontend/src/business/components/settings/common/AppManageItem.vue new file mode 100644 index 0000000000..590bc57c80 --- /dev/null +++ b/frontend/src/business/components/settings/common/AppManageItem.vue @@ -0,0 +1,112 @@ + + + + +