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;
name: string;
children?: OrgsItem[];
leafNode: boolean;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -631,7 +631,11 @@
let name = '';
let yamlStr = '';
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) {
case 'role':
name = 'Role.yml';

View File

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