fix(全局): bug 修复
This commit is contained in:
parent
38eac2826a
commit
c50b7ead9c
|
@ -120,7 +120,7 @@
|
||||||
(visible) => {
|
(visible) => {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
initModuleOptions();
|
initModuleOptions();
|
||||||
saveFileForm.value.name = props.savingFile?.name || '';
|
saveFileForm.value.name = props.savingFile?.name?.split('.').shift() || '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -153,7 +153,7 @@
|
||||||
local: true,
|
local: true,
|
||||||
moduleId: saveFileForm.value.moduleId,
|
moduleId: saveFileForm.value.moduleId,
|
||||||
fileName: saveFileForm.value.name,
|
fileName: saveFileForm.value.name,
|
||||||
originalName: props.savingFile.name || '',
|
originalName: props.savingFile.name || props.savingFile.fileName || '',
|
||||||
});
|
});
|
||||||
emit('finish', res, `${saveFileForm.value.name}.${props.savingFile.name?.split('.').pop()}`);
|
emit('finish', res, `${saveFileForm.value.name}.${props.savingFile.name?.split('.').pop()}`);
|
||||||
Message.success(t('ms.add.attachment.saveAsSuccess'));
|
Message.success(t('ms.add.attachment.saveAsSuccess'));
|
||||||
|
|
|
@ -858,10 +858,10 @@
|
||||||
parent.rowSpan = parent.rowSpan ? parent.rowSpan + 1 : 2;
|
parent.rowSpan = parent.rowSpan ? parent.rowSpan + 1 : 2;
|
||||||
} else {
|
} else {
|
||||||
// 找到第一个子节点
|
// 找到第一个子节点
|
||||||
const fisrtChildNode = findFirstByGroupId(condition.value.documentAssertion.jsonAssertion, record.groupId);
|
const firstChildNode = findFirstByGroupId(condition.value.documentAssertion.jsonAssertion, record.groupId);
|
||||||
if (fisrtChildNode) {
|
if (firstChildNode) {
|
||||||
fisrtChildNode.rowSpan = fisrtChildNode.rowSpan
|
firstChildNode.rowSpan = firstChildNode.rowSpan
|
||||||
? fisrtChildNode.rowSpan + 1
|
? firstChildNode.rowSpan + 1
|
||||||
: countNodesByGroupId(condition.value.documentAssertion.jsonAssertion, record.groupId) + 1;
|
: countNodesByGroupId(condition.value.documentAssertion.jsonAssertion, record.groupId) + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
import useLicenseStore from '@/store/modules/setting/license';
|
import useLicenseStore from '@/store/modules/setting/license';
|
||||||
import { openWindow, regexUrl } from '@/utils';
|
import { openWindow, regexUrl } from '@/utils';
|
||||||
import { scrollIntoView } from '@/utils/dom';
|
import { scrollIntoView } from '@/utils/dom';
|
||||||
import { getFisrtRouterNameByCurrentRoute } from '@/utils/permission';
|
import { getFirstRouterNameByCurrentRoute } from '@/utils/permission';
|
||||||
import { listenerRouteChange } from '@/utils/route-listener';
|
import { listenerRouteChange } from '@/utils/route-listener';
|
||||||
|
|
||||||
import { ProjectManagementRouteEnum, SettingRouteEnum } from '@/enums/routeEnum';
|
import { ProjectManagementRouteEnum, SettingRouteEnum } from '@/enums/routeEnum';
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
}
|
}
|
||||||
if (item.meta?.hideChildrenInMenu) {
|
if (item.meta?.hideChildrenInMenu) {
|
||||||
// 顶级菜单路由跳转到该菜单下有权限的第一个顶部子菜单
|
// 顶级菜单路由跳转到该菜单下有权限的第一个顶部子菜单
|
||||||
const childName = getFisrtRouterNameByCurrentRoute(item.name as string);
|
const childName = getFirstRouterNameByCurrentRoute(item.name as string);
|
||||||
router.push({
|
router.push({
|
||||||
name: childName,
|
name: childName,
|
||||||
});
|
});
|
||||||
|
|
|
@ -20,6 +20,10 @@ export default function useMenuTree() {
|
||||||
if (!_routes) return null;
|
if (!_routes) return null;
|
||||||
|
|
||||||
const collector = _routes.map((element) => {
|
const collector = _routes.map((element) => {
|
||||||
|
if (element.meta?.hideInMenu === true) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// 权限校验不通过
|
// 权限校验不通过
|
||||||
if (!permission.accessRouter(element)) {
|
if (!permission.accessRouter(element)) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -41,7 +45,7 @@ export default function useMenuTree() {
|
||||||
element.children = subItem as RouteRecordRaw[];
|
element.children = subItem as RouteRecordRaw[];
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
// the else logic
|
|
||||||
if (layer > 1) {
|
if (layer > 1) {
|
||||||
element.children = subItem as RouteRecordRaw[];
|
element.children = subItem as RouteRecordRaw[];
|
||||||
return element;
|
return element;
|
||||||
|
|
|
@ -15,6 +15,7 @@ export interface ModuleCount {
|
||||||
export interface FileItem {
|
export interface FileItem {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
|
originalName: string; // 原文件名
|
||||||
fileType: string; // 文件类型
|
fileType: string; // 文件类型
|
||||||
tags: string[]; // 标签
|
tags: string[]; // 标签
|
||||||
description: string;
|
description: string;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { ApiTestRouteEnum, SettingRouteEnum } from '@/enums/routeEnum';
|
import { ApiTestRouteEnum } from '@/enums/routeEnum';
|
||||||
|
|
||||||
import { DEFAULT_LAYOUT } from '../base';
|
import { DEFAULT_LAYOUT } from '../base';
|
||||||
import type { AppRouteRecordRaw } from '../types';
|
import type { AppRouteRecordRaw } from '../types';
|
||||||
|
|
|
@ -138,7 +138,7 @@ export function findRouteByName(name: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 找到当前路由下 第一个由权限的子路由
|
// 找到当前路由下 第一个由权限的子路由
|
||||||
export function getFisrtRouterNameByCurrentRoute(parentName: string) {
|
export function getFirstRouterNameByCurrentRoute(parentName: string) {
|
||||||
const currentRoute = findRouteByName(parentName);
|
const currentRoute = findRouteByName(parentName);
|
||||||
if (currentRoute) {
|
if (currentRoute) {
|
||||||
const hasAuthChildrenRouter = currentRoute.children.find((item) => hasAnyPermission(item.meta?.roles || []));
|
const hasAuthChildrenRouter = currentRoute.children.find((item) => hasAnyPermission(item.meta?.roles || []));
|
||||||
|
|
|
@ -990,12 +990,16 @@
|
||||||
});
|
});
|
||||||
const saveModalFormRef = ref<FormInstance>();
|
const saveModalFormRef = ref<FormInstance>();
|
||||||
const saveLoading = ref(false);
|
const saveLoading = ref(false);
|
||||||
const selectTree = computed(() =>
|
const selectTree = computed(() => {
|
||||||
filterTree(cloneDeep(props.moduleTree || []), (e) => {
|
if (saveModalVisible.value || (!props.isCase && props.isDefinition && saveModalVisible.value)) {
|
||||||
|
// 调试模式打开保存弹窗,或者是接口定义模式下打开保存弹窗才进行计算,避免大数据量导致进入时就计算卡顿 TODO:worker线程处理计算任务
|
||||||
|
return filterTree(cloneDeep(props.moduleTree || []), (e) => {
|
||||||
e.draggable = false;
|
e.draggable = false;
|
||||||
return e.type === 'MODULE';
|
return e.type === 'MODULE';
|
||||||
})
|
});
|
||||||
);
|
}
|
||||||
|
return [];
|
||||||
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => saveModalVisible.value,
|
() => saveModalVisible.value,
|
||||||
|
|
|
@ -100,9 +100,9 @@
|
||||||
const managementRef = ref<InstanceType<typeof management>>();
|
const managementRef = ref<InstanceType<typeof management>>();
|
||||||
|
|
||||||
function handleModuleInit(tree: ModuleTreeNode[], _protocol: string, pathMap: Record<string, any>) {
|
function handleModuleInit(tree: ModuleTreeNode[], _protocol: string, pathMap: Record<string, any>) {
|
||||||
folderTree.value = tree;
|
// folderTree.value = tree;
|
||||||
protocol.value = _protocol;
|
protocol.value = _protocol;
|
||||||
folderTreePathMap.value = pathMap;
|
// folderTreePathMap.value = pathMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
function newApi() {
|
function newApi() {
|
||||||
|
|
|
@ -317,13 +317,7 @@
|
||||||
import useUserStore from '@/store/modules/user';
|
import useUserStore from '@/store/modules/user';
|
||||||
import { hasAnyPermission } from '@/utils/permission';
|
import { hasAnyPermission } from '@/utils/permission';
|
||||||
|
|
||||||
import {
|
import { ReviewCaseItem, ReviewItem, ReviewPassRule, ReviewResult } from '@/models/caseManagement/caseReview';
|
||||||
ReviewCaseItem,
|
|
||||||
ReviewItem,
|
|
||||||
ReviewPassRule,
|
|
||||||
ReviewResult,
|
|
||||||
ReviewStatus,
|
|
||||||
} from '@/models/caseManagement/caseReview';
|
|
||||||
import { BatchApiParams, ModuleTreeNode } from '@/models/common';
|
import { BatchApiParams, ModuleTreeNode } from '@/models/common';
|
||||||
import { CaseManagementRouteEnum } from '@/enums/routeEnum';
|
import { CaseManagementRouteEnum } from '@/enums/routeEnum';
|
||||||
import { TableKeyEnum } from '@/enums/tableEnum';
|
import { TableKeyEnum } from '@/enums/tableEnum';
|
||||||
|
|
|
@ -562,6 +562,11 @@
|
||||||
value: detail.name,
|
value: detail.name,
|
||||||
key: 'name',
|
key: 'name',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: t('project.fileManagement.originName'),
|
||||||
|
value: detail.originalName,
|
||||||
|
key: 'originalName',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: t('project.fileManagement.desc'),
|
label: t('project.fileManagement.desc'),
|
||||||
value: detail.description,
|
value: detail.description,
|
||||||
|
|
|
@ -71,7 +71,8 @@ export default {
|
||||||
'project.fileManagement.cancelTipContent':
|
'project.fileManagement.cancelTipContent':
|
||||||
'After cancellation, files that have not been successfully uploaded will not be saved, so please operate with caution!',
|
'After cancellation, files that have not been successfully uploaded will not be saved, so please operate with caution!',
|
||||||
'project.fileManagement.cancelConfirm': 'Cancel upload',
|
'project.fileManagement.cancelConfirm': 'Cancel upload',
|
||||||
'project.fileManagement.name': 'File name',
|
'project.fileManagement.name': 'File alias',
|
||||||
|
'project.fileManagement.originName': 'File original name',
|
||||||
'project.fileManagement.type': 'Format',
|
'project.fileManagement.type': 'Format',
|
||||||
'project.fileManagement.fileNamePlaceholder': 'Please enter the file name and press Enter to save',
|
'project.fileManagement.fileNamePlaceholder': 'Please enter the file name and press Enter to save',
|
||||||
'project.fileManagement.desc': 'Description',
|
'project.fileManagement.desc': 'Description',
|
||||||
|
|
|
@ -67,7 +67,8 @@ export default {
|
||||||
'project.fileManagement.cancelTipTitle': '确认取消正在上传的文件吗?',
|
'project.fileManagement.cancelTipTitle': '确认取消正在上传的文件吗?',
|
||||||
'project.fileManagement.cancelTipContent': '取消后,未上传成功的文件不会被保存,请谨慎操作!',
|
'project.fileManagement.cancelTipContent': '取消后,未上传成功的文件不会被保存,请谨慎操作!',
|
||||||
'project.fileManagement.cancelConfirm': '取消上传',
|
'project.fileManagement.cancelConfirm': '取消上传',
|
||||||
'project.fileManagement.name': '文件名称',
|
'project.fileManagement.name': '文件别名',
|
||||||
|
'project.fileManagement.originName': '文件原名',
|
||||||
'project.fileManagement.fileNamePlaceholder': '请输入文件名称,按回车键保存',
|
'project.fileManagement.fileNamePlaceholder': '请输入文件名称,按回车键保存',
|
||||||
'project.fileManagement.desc': '文件描述',
|
'project.fileManagement.desc': '文件描述',
|
||||||
'project.fileManagement.updateDesc': '更新描述',
|
'project.fileManagement.updateDesc': '更新描述',
|
||||||
|
|
Loading…
Reference in New Issue