fix(系统设置): 操作日志的操作对象中没有UI测试模块
--bug=1018662 --user=李玉号 [系统设置]操作日志的操作对象中没有UI 测试模块 https://www.tapd.cn/55049933/s/1277873
This commit is contained in:
parent
933fbba450
commit
9e7dd36714
|
@ -144,6 +144,7 @@ import {getCurrentWsMembers} from "../../../api/user";
|
||||||
import {modifyUserByResourceId} from "metersphere-frontend/src/api/user";
|
import {modifyUserByResourceId} from "metersphere-frontend/src/api/user";
|
||||||
import {getOperatingLogPages} from "../../../api/log";
|
import {getOperatingLogPages} from "../../../api/log";
|
||||||
import {getProject} from "../../../api/project";
|
import {getProject} from "../../../api/project";
|
||||||
|
import {hasLicense} from "metersphere-frontend/src/utils/permission";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Log",
|
name: "Log",
|
||||||
|
@ -153,6 +154,26 @@ export default {
|
||||||
MsContainer
|
MsContainer
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
let getModules = function () {
|
||||||
|
let license = hasLicense();
|
||||||
|
let data = new PROJECTSYSLIST();
|
||||||
|
return data.filter(item => {
|
||||||
|
if (!item.license) {
|
||||||
|
if (item.children) {
|
||||||
|
item.children = item.children.filter(child => {
|
||||||
|
if (!child.license || (child.license && license)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
if (license) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
multiple: false,
|
multiple: false,
|
||||||
|
@ -172,7 +193,7 @@ export default {
|
||||||
LOG_TYPE: new LOG_TYPE(this),
|
LOG_TYPE: new LOG_TYPE(this),
|
||||||
LOG_TYPE_MAP: new LOG_TYPE_MAP(this),
|
LOG_TYPE_MAP: new LOG_TYPE_MAP(this),
|
||||||
LOG_MODULE_MAP: new LOG_MODULE_MAP(this),
|
LOG_MODULE_MAP: new LOG_MODULE_MAP(this),
|
||||||
sysList: new PROJECTSYSLIST(),
|
sysList: getModules(),
|
||||||
options: [],
|
options: [],
|
||||||
selectLoading: false,
|
selectLoading: false,
|
||||||
cardLoading: false
|
cardLoading: false
|
||||||
|
|
|
@ -102,6 +102,26 @@ export function LOG_MODULE_MAP(_this) {
|
||||||
|
|
||||||
export function PROJECTSYSLIST() {
|
export function PROJECTSYSLIST() {
|
||||||
let projectsysList = [
|
let projectsysList = [
|
||||||
|
{
|
||||||
|
label: i18n.t('commons.ui'), value: i18n.t('commons.ui'), license: true,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
label: i18n.t('ui.ui_element'),
|
||||||
|
value: [i18n.t('ui.ui_element'), 'UI_ELEMENT'],
|
||||||
|
leaf: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: i18n.t('ui.ui_automation'),
|
||||||
|
value: [i18n.t('ui.ui_automation'), 'UI_AUTOMATION'],
|
||||||
|
leaf: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: i18n.t('ui.report'),
|
||||||
|
value: [i18n.t('ui.report'), 'UI_AUTOMATION_REPORT'],
|
||||||
|
leaf: true
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: i18n.t('test_track.test_track'), value: i18n.t('test_track.test_track'), children: [
|
label: i18n.t('test_track.test_track'), value: i18n.t('test_track.test_track'), children: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -103,7 +103,28 @@ export function LOG_MODULE_MAP(_this) {
|
||||||
export function SYSLIST() {
|
export function SYSLIST() {
|
||||||
let sysList = [
|
let sysList = [
|
||||||
{
|
{
|
||||||
label: i18n.t('test_track.test_track'), value: i18n.t('test_track.test_track'), children: [
|
label: i18n.t('commons.ui'), value: i18n.t('commons.ui'), license: true,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
label: i18n.t('ui.ui_element'),
|
||||||
|
value: [i18n.t('ui.ui_element'), 'UI_ELEMENT'],
|
||||||
|
leaf: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: i18n.t('ui.ui_automation'),
|
||||||
|
value: [i18n.t('ui.ui_automation'), 'UI_AUTOMATION'],
|
||||||
|
leaf: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: i18n.t('ui.report'),
|
||||||
|
value: [i18n.t('ui.report'), 'UI_AUTOMATION_REPORT'],
|
||||||
|
leaf: true
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: i18n.t('test_track.test_track'), value: i18n.t('test_track.test_track'),
|
||||||
|
children: [
|
||||||
{
|
{
|
||||||
label: i18n.t('permission.project_track_case.name'),
|
label: i18n.t('permission.project_track_case.name'),
|
||||||
value: [i18n.t('permission.project_track_case.name'), 'TRACK_TEST_CASE'],
|
value: [i18n.t('permission.project_track_case.name'), 'TRACK_TEST_CASE'],
|
||||||
|
@ -260,6 +281,26 @@ export function SYSLIST() {
|
||||||
|
|
||||||
export function WORKSYSLIST() {
|
export function WORKSYSLIST() {
|
||||||
let worksysList = [
|
let worksysList = [
|
||||||
|
{
|
||||||
|
label: i18n.t('commons.ui'), value: i18n.t('commons.ui'), license: true,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
label: i18n.t('ui.ui_element'),
|
||||||
|
value: [i18n.t('ui.ui_element'), 'UI_ELEMENT'],
|
||||||
|
leaf: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: i18n.t('ui.ui_automation'),
|
||||||
|
value: [i18n.t('ui.ui_automation'), 'UI_AUTOMATION'],
|
||||||
|
leaf: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: i18n.t('ui.report'),
|
||||||
|
value: [i18n.t('ui.report'), 'UI_AUTOMATION_REPORT'],
|
||||||
|
leaf: true
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: i18n.t('test_track.test_track'), value: i18n.t('test_track.test_track'), children: [
|
label: i18n.t('test_track.test_track'), value: i18n.t('test_track.test_track'), children: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -160,6 +160,7 @@ import {getProjectById, getProjectsByWorkspaceId} from "../../../api/project";
|
||||||
import {getUserListByResourceUrl} from "../../../api/user";
|
import {getUserListByResourceUrl} from "../../../api/user";
|
||||||
import {modifyUserByResourceId} from "metersphere-frontend/src/api/user";
|
import {modifyUserByResourceId} from "metersphere-frontend/src/api/user";
|
||||||
import {getOperatingLogPages} from "../../../api/operating-log";
|
import {getOperatingLogPages} from "../../../api/operating-log";
|
||||||
|
import {hasLicense} from "metersphere-frontend/src/utils/permission";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "OperatingLog",
|
name: "OperatingLog",
|
||||||
|
@ -169,6 +170,26 @@ export default {
|
||||||
MsLogDetail
|
MsLogDetail
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
let getModules = function () {
|
||||||
|
let license = hasLicense();
|
||||||
|
let data = new WORKSYSLIST();
|
||||||
|
return data.filter(item => {
|
||||||
|
if (!item.license) {
|
||||||
|
if (item.children) {
|
||||||
|
item.children = item.children.filter(child => {
|
||||||
|
if (!child.license || (child.license && license)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
if (license) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
multiple: false,
|
multiple: false,
|
||||||
|
@ -189,7 +210,7 @@ export default {
|
||||||
LOG_TYPE: new LOG_TYPE(this),
|
LOG_TYPE: new LOG_TYPE(this),
|
||||||
LOG_TYPE_MAP: new LOG_TYPE_MAP(this),
|
LOG_TYPE_MAP: new LOG_TYPE_MAP(this),
|
||||||
LOG_MODULE_MAP: new LOG_MODULE_MAP(this),
|
LOG_MODULE_MAP: new LOG_MODULE_MAP(this),
|
||||||
sysList: new SYSLIST(),
|
sysList: getModules(),
|
||||||
loading: false,
|
loading: false,
|
||||||
options: [],
|
options: [],
|
||||||
selectLoading: false
|
selectLoading: false
|
||||||
|
@ -200,7 +221,6 @@ export default {
|
||||||
handler(toPath) {
|
handler(toPath) {
|
||||||
if (toPath === '/setting/operatingLog/workspace') {
|
if (toPath === '/setting/operatingLog/workspace') {
|
||||||
this.isSystem = false;
|
this.isSystem = false;
|
||||||
this.sysList = new WORKSYSLIST();
|
|
||||||
this.condition.workspaceId = getCurrentWorkspaceId();
|
this.condition.workspaceId = getCurrentWorkspaceId();
|
||||||
this.initProject();
|
this.initProject();
|
||||||
this.getMember('/user/ws/current/member/list');
|
this.getMember('/user/ws/current/member/list');
|
||||||
|
|
Loading…
Reference in New Issue