feat(系统设置): 日志系统范围展示&用户批量添加项目
This commit is contained in:
parent
a4fd54044d
commit
e2b713d0f1
|
@ -105,4 +105,5 @@ export interface OrgsItem {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
children?: OrgsItem[];
|
children?: OrgsItem[];
|
||||||
|
leafNode: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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: ['*'],
|
||||||
|
|
|
@ -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: ['*'],
|
||||||
|
|
|
@ -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: ['*'],
|
||||||
|
|
|
@ -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: ['*'],
|
||||||
|
|
|
@ -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: ['*'],
|
||||||
|
|
|
@ -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) }}
|
||||||
|
|
|
@ -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';
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue