feat(系统设置): 日志系统范围展示&用户批量添加项目

This commit is contained in:
baiqi 2023-08-24 18:10:46 +08:00 committed by 刘瑞斌
parent a4fd54044d
commit e2b713d0f1
9 changed files with 20 additions and 10 deletions

View File

@ -105,4 +105,5 @@ export interface OrgsItem {
id: string; id: string;
name: string; name: string;
children?: OrgsItem[]; children?: OrgsItem[];
leafNode: boolean;
} }

View File

@ -17,7 +17,7 @@ const ApiTest: AppRouteRecordRaw = {
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'ApiTestIndex', name: 'apiTestIndex',
component: () => import('@/views/api-test/index.vue'), component: () => import('@/views/api-test/index.vue'),
meta: { meta: {
roles: ['*'], roles: ['*'],

View File

@ -17,7 +17,7 @@ const BugManagement: AppRouteRecordRaw = {
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'BugManagementIndex', name: 'bugManagementIndex',
component: () => import('@/views/bug-management/index.vue'), component: () => import('@/views/bug-management/index.vue'),
meta: { meta: {
roles: ['*'], roles: ['*'],

View File

@ -17,7 +17,7 @@ const FeatureTest: AppRouteRecordRaw = {
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'FeatureTestIndex', name: 'featureTestIndex',
component: () => import('@/views/feature-test/index.vue'), component: () => import('@/views/feature-test/index.vue'),
meta: { meta: {
roles: ['*'], roles: ['*'],

View File

@ -17,7 +17,7 @@ const UiTest: AppRouteRecordRaw = {
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'UiTestIndex', name: 'uiTestIndex',
component: () => import('@/views/ui-test/index.vue'), component: () => import('@/views/ui-test/index.vue'),
meta: { meta: {
roles: ['*'], roles: ['*'],

View File

@ -17,7 +17,7 @@ const Workbench: AppRouteRecordRaw = {
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'WorkbenchIndex', name: 'workbenchIndex',
component: () => import('@/views/workbench/index.vue'), component: () => import('@/views/workbench/index.vue'),
meta: { meta: {
roles: ['*'], roles: ['*'],

View File

@ -76,7 +76,11 @@
</div> </div>
<ms-base-table v-bind="propsRes" no-disable sticky-header v-on="propsEvent"> <ms-base-table v-bind="propsRes" no-disable sticky-header v-on="propsEvent">
<template #range="{ record }"> <template #range="{ record }">
{{ `${record.organizationName}${record.projectName ? `/${record.projectName}` : ''}` }} {{
record.organizationId === 'SYSTEM'
? t('system.log.system')
: `${record.organizationName}${record.projectName ? `/${record.projectName}` : ''}`
}}
</template> </template>
<template #module="{ record }"> <template #module="{ record }">
{{ getModuleLocale(record.module) }} {{ getModuleLocale(record.module) }}

View File

@ -631,7 +631,11 @@
let name = ''; let name = '';
let yamlStr = ''; let yamlStr = '';
const { nameSpaces, deployName } = form.value.testResourceDTO; const { nameSpaces, deployName } = form.value.testResourceDTO;
const apiImage = `registry.cn-qingdao.aliyuncs.com/metersphere/node-controller:${appStore.version}`; // -xxx
const apiImage = `registry.cn-qingdao.aliyuncs.com/metersphere/node-controller:${appStore.version.substring(
0,
appStore.version.lastIndexOf('-')
)}`;
switch (type) { switch (type) {
case 'role': case 'role':
name = 'Role.yml'; name = 'Role.yml';

View File

@ -96,7 +96,7 @@
*/ */
const getTransferData = (_treeData: OrgsItem[], transferDataSource: TransferDataItem[]) => { const getTransferData = (_treeData: OrgsItem[], transferDataSource: TransferDataItem[]) => {
_treeData.forEach((item) => { _treeData.forEach((item) => {
if (item.children) getTransferData(item.children, transferDataSource); if (!item.leafNode && item.children) getTransferData(item.children, transferDataSource);
else transferDataSource.push({ label: item.name, value: item.id, disabled: false }); else transferDataSource.push({ label: item.name, value: item.id, disabled: false });
}); });
return transferDataSource; return transferDataSource;
@ -112,8 +112,9 @@
const treeDataSource: TreeDataItem[] = []; const treeDataSource: TreeDataItem[] = [];
_treeData.forEach((item) => { _treeData.forEach((item) => {
// push 穿 // push 穿
const allSelected = item.children?.every((child) => target.value.includes(child.id)); const allSelected =
if (!allSelected && (item.children || values.includes(item.id))) { target.value.length > 0 && !item.leafNode && item.children?.every((child) => target.value.includes(child.id));
if (!allSelected && !target.value.includes(item.id) && (item.children || values.includes(item.id))) {
treeDataSource.push({ treeDataSource.push({
title: item.name, title: item.name,
key: item.id, key: item.id,