Merge branch 'master' of https://github.com/metersphere/server
This commit is contained in:
commit
896fd7f9ce
|
@ -29,9 +29,10 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.defaultInitOptions = this.defaultInitOptions || {};
|
this.defaultInitOptions = this.defaultInitOptions || {};
|
||||||
// 默认渲染svg
|
// 默认渲染svg
|
||||||
if (!this.defaultInitOptions.renderer) {
|
// BUG: 渲染svg之后 图上的legend 太多会不显示
|
||||||
this.defaultInitOptions.renderer = 'svg';
|
// if (!this.defaultInitOptions.renderer) {
|
||||||
}
|
// this.defaultInitOptions.renderer = 'svg';
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -47,11 +47,14 @@
|
||||||
<script>
|
<script>
|
||||||
import {checkoutCurrentOrganization, checkoutCurrentWorkspace} from "@/common/js/utils";
|
import {checkoutCurrentOrganization, checkoutCurrentWorkspace} from "@/common/js/utils";
|
||||||
import Setting from "@/business/components/settings/router";
|
import Setting from "@/business/components/settings/router";
|
||||||
|
import {LicenseKey} from '@/common/js/constants';
|
||||||
|
|
||||||
|
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||||
|
const component = requireComponent.keys().length > 0 ? requireComponent("./license/LicenseMessage.vue") : null;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsSettingMenu",
|
name: "MsSettingMenu",
|
||||||
data() {
|
data() {
|
||||||
let valid = false;
|
|
||||||
let getMenus = function (group) {
|
let getMenus = function (group) {
|
||||||
let menus = [];
|
let menus = [];
|
||||||
Setting.children.forEach(child => {
|
Setting.children.forEach(child => {
|
||||||
|
@ -59,10 +62,7 @@
|
||||||
let menu = {index: Setting.path + "/" + child.path}
|
let menu = {index: Setting.path + "/" + child.path}
|
||||||
menu.title = child.meta.title;
|
menu.title = child.meta.title;
|
||||||
menu.roles = child.meta.roles;
|
menu.roles = child.meta.roles;
|
||||||
if (child.meta.valid != undefined && child.meta.valid === true) {
|
menu.valid = child.meta.valid;
|
||||||
menu.valid = child.meta.valid;
|
|
||||||
valid = true;
|
|
||||||
}
|
|
||||||
menus.push(menu);
|
menus.push(menu);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -77,7 +77,24 @@
|
||||||
isCurrentWorkspaceUser: false,
|
isCurrentWorkspaceUser: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
valid() {
|
||||||
|
Promise.all([component.default.valid(this)]).then(() => {
|
||||||
|
let license = localStorage.getItem(LicenseKey);
|
||||||
|
if (license != "valid") {
|
||||||
|
this.systems.forEach(item => {
|
||||||
|
if (item.valid === true) {
|
||||||
|
this.systems.splice(this.systems.indexOf(item), 1);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
if (component != null) {
|
||||||
|
this.valid();
|
||||||
|
}
|
||||||
this.isCurrentOrganizationAdmin = checkoutCurrentOrganization();
|
this.isCurrentOrganizationAdmin = checkoutCurrentOrganization();
|
||||||
this.isCurrentWorkspaceUser = checkoutCurrentWorkspace();
|
this.isCurrentWorkspaceUser = checkoutCurrentWorkspace();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue