Merge branch 'main' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
78be4e00f2
|
@ -28,19 +28,13 @@
|
||||||
<span slot="title" class="ms-menu-item-title">{{ $t('commons.api') }}</span>
|
<span slot="title" class="ms-menu-item-title">{{ $t('commons.api') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item index="/ui" @click="active()" v-if="hasLicense() && check('ui')" onselectstart="return false"
|
<el-menu-item :index="getUiIndex()" @click="clickPlanMenu" v-if="check('ui')" onselectstart="return false"
|
||||||
v-permission="['PROJECT_UI_SCENARIO:READ','PROJECT_UI_REPORT:READ', 'PROJECT_UI_ELEMENT:READ']">
|
v-permission="['PROJECT_UI_SCENARIO:READ','PROJECT_UI_REPORT:READ', 'PROJECT_UI_ELEMENT:READ']">
|
||||||
<div>
|
<div>
|
||||||
<svg-icon iconClass="ui" class-name="ms-menu-img"/>
|
<svg-icon iconClass="ui" class-name="ms-menu-img"/>
|
||||||
<span slot="title" class="ms-menu-item-title">{{ $t('commons.ui') }}</span>
|
<span slot="title" class="ms-menu-item-title">{{ $t('commons.ui') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item v-if="!hasLicense()" @click="clickPlanMenu">
|
|
||||||
<div>
|
|
||||||
<svg-icon iconClass="ui" class-name="ms-menu-img"/>
|
|
||||||
<span slot="title" class="ms-menu-item-title">{{ $t('commons.ui') }}</span>
|
|
||||||
</div>
|
|
||||||
</el-menu-item>
|
|
||||||
<el-menu-item index="/performance" v-if="check('performance')"
|
<el-menu-item index="/performance" v-if="check('performance')"
|
||||||
onselectstart="return false"
|
onselectstart="return false"
|
||||||
v-permission="['PROJECT_PERFORMANCE_HOME:READ', 'PROJECT_PERFORMANCE_TEST:READ','PROJECT_PERFORMANCE_REPORT:READ']">
|
v-permission="['PROJECT_PERFORMANCE_HOME:READ', 'PROJECT_PERFORMANCE_TEST:READ','PROJECT_PERFORMANCE_REPORT:READ']">
|
||||||
|
@ -145,9 +139,18 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
check(key) {
|
check(key) {
|
||||||
|
if (key === 'ui' && !hasLicense()) {
|
||||||
|
return this.modules[key] === 'ENABLE';
|
||||||
|
}
|
||||||
let microApps = JSON.parse(sessionStorage.getItem("micro_apps"));
|
let microApps = JSON.parse(sessionStorage.getItem("micro_apps"));
|
||||||
return this.modules[key] === 'ENABLE' && microApps && microApps[key];
|
return this.modules[key] === 'ENABLE' && microApps && microApps[key];
|
||||||
},
|
},
|
||||||
|
getUiIndex() {
|
||||||
|
if (hasLicense()) {
|
||||||
|
return "ui";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
},
|
||||||
registerEvents() {
|
registerEvents() {
|
||||||
getModuleList()
|
getModuleList()
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
@ -164,6 +167,9 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
clickPlanMenu() {
|
clickPlanMenu() {
|
||||||
|
if (hasLicense()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
this.$message({
|
this.$message({
|
||||||
dangerouslyUseHTMLString: true,
|
dangerouslyUseHTMLString: true,
|
||||||
showClose: true,
|
showClose: true,
|
||||||
|
|
Loading…
Reference in New Issue