From 776d17833be4f62408060fd89d265ffe879aff6f Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 15 Sep 2020 10:32:44 +0800 Subject: [PATCH] =?UTF-8?q?style(XPack):=20=E4=BF=AE=E5=A4=8D=20=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V20__add_license.sql | 6 ------ .../business/components/settings/SettingMenu.vue | 14 +++++++++++--- .../track/case/components/TestCaseImport.vue | 2 +- frontend/src/i18n/en-US.js | 6 +++++- frontend/src/i18n/zh-CN.js | 6 +++++- frontend/src/i18n/zh-TW.js | 4 +++- 6 files changed, 25 insertions(+), 13 deletions(-) diff --git a/backend/src/main/resources/db/migration/V20__add_license.sql b/backend/src/main/resources/db/migration/V20__add_license.sql index ce2ba2daa5..56345d9064 100644 --- a/backend/src/main/resources/db/migration/V20__add_license.sql +++ b/backend/src/main/resources/db/migration/V20__add_license.sql @@ -2,12 +2,6 @@ CREATE TABLE `license` ( `id` varchar(50) NOT NULL COMMENT 'ID', `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', - `corporation` varchar(500) NOT NULL COMMENT 'corporation ', - `expired` varchar(255) NOT NULL COMMENT 'expired ', - `product` varchar(500) DEFAULT NULL COMMENT 'product name', - `edition` varchar(255) COMMENT 'edition ', - `license_version` varchar(255) NOT NULL COMMENT 'licenseVersion', - `license_count` INT COMMENT 'license_count', `license_code` longtext DEFAULT NULL COMMENT 'license_code', PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; \ No newline at end of file diff --git a/frontend/src/business/components/settings/SettingMenu.vue b/frontend/src/business/components/settings/SettingMenu.vue index 3caee2bf3d..89ba6525f3 100644 --- a/frontend/src/business/components/settings/SettingMenu.vue +++ b/frontend/src/business/components/settings/SettingMenu.vue @@ -51,6 +51,7 @@ export default { name: "MsSettingMenu", data() { + let valid = false; let getMenus = function (group) { let menus = []; Setting.children.forEach(child => { @@ -58,7 +59,10 @@ let menu = {index: Setting.path + "/" + child.path} menu.title = child.meta.title; menu.roles = child.meta.roles; - menu.valid = child.meta.valid; + if (child.meta.valid != undefined && child.meta.valid === true) { + menu.valid = child.meta.valid; + valid = true; + } menus.push(menu); } }) @@ -69,12 +73,15 @@ organizations: getMenus('organization'), workspaces: getMenus('workspace'), persons: getMenus('person'), + isValid: valid, isCurrentOrganizationAdmin: false, isCurrentWorkspaceUser: false, } }, mounted() { - //this.valid(); + if (this.isValid === true) { + this.valid(); + } this.isCurrentOrganizationAdmin = checkoutCurrentOrganization(); this.isCurrentWorkspaceUser = checkoutCurrentWorkspace(); }, @@ -83,7 +90,7 @@ let _this = this; this.result = this.$get("/license/valid", response => { let data = response.data; - if (data === undefined || data != true) { + if (data === undefined || data === null || data.status != "valid") { this.systems.forEach(item => { if (item.valid != undefined && item.valid === true) { _this.systems.splice(this.systems.indexOf(item), 1); @@ -115,6 +122,7 @@