feat(系统设置): 日志系统范围展示&用户批量添加项目
This commit is contained in:
parent
a4fd54044d
commit
e2b713d0f1
|
@ -105,4 +105,5 @@ export interface OrgsItem {
|
|||
id: string;
|
||||
name: string;
|
||||
children?: OrgsItem[];
|
||||
leafNode: boolean;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ const ApiTest: AppRouteRecordRaw = {
|
|||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'ApiTestIndex',
|
||||
name: 'apiTestIndex',
|
||||
component: () => import('@/views/api-test/index.vue'),
|
||||
meta: {
|
||||
roles: ['*'],
|
||||
|
|
|
@ -17,7 +17,7 @@ const BugManagement: AppRouteRecordRaw = {
|
|||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'BugManagementIndex',
|
||||
name: 'bugManagementIndex',
|
||||
component: () => import('@/views/bug-management/index.vue'),
|
||||
meta: {
|
||||
roles: ['*'],
|
||||
|
|
|
@ -17,7 +17,7 @@ const FeatureTest: AppRouteRecordRaw = {
|
|||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'FeatureTestIndex',
|
||||
name: 'featureTestIndex',
|
||||
component: () => import('@/views/feature-test/index.vue'),
|
||||
meta: {
|
||||
roles: ['*'],
|
||||
|
|
|
@ -17,7 +17,7 @@ const UiTest: AppRouteRecordRaw = {
|
|||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'UiTestIndex',
|
||||
name: 'uiTestIndex',
|
||||
component: () => import('@/views/ui-test/index.vue'),
|
||||
meta: {
|
||||
roles: ['*'],
|
||||
|
|
|
@ -17,7 +17,7 @@ const Workbench: AppRouteRecordRaw = {
|
|||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'WorkbenchIndex',
|
||||
name: 'workbenchIndex',
|
||||
component: () => import('@/views/workbench/index.vue'),
|
||||
meta: {
|
||||
roles: ['*'],
|
||||
|
|
|
@ -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) }}
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue