Commit 3cb7850c authored by chenshouchao's avatar chenshouchao

feat: bug修改提交

parent d3ab1d6c
...@@ -67,7 +67,6 @@ const UpLoaderFile = observer((props: any) => { ...@@ -67,7 +67,6 @@ const UpLoaderFile = observer((props: any) => {
}; };
const repeatAndUploaderFileList = const repeatAndUploaderFileList =
getRepeatFileAndGetUploderFileList(acceptedFiles); getRepeatFileAndGetUploderFileList(acceptedFiles);
console.log(repeatAndUploaderFileList);
if (repeatAndUploaderFileList.repeatFileList.length > 0) { if (repeatAndUploaderFileList.repeatFileList.length > 0) {
message.error( message.error(
`“${repeatAndUploaderFileList.repeatFileList `“${repeatAndUploaderFileList.repeatFileList
...@@ -78,6 +77,12 @@ const UpLoaderFile = observer((props: any) => { ...@@ -78,6 +77,12 @@ const UpLoaderFile = observer((props: any) => {
// 插入新的文件列表 // 插入新的文件列表
const popLength = 10 - fileList.length; const popLength = 10 - fileList.length;
if (
fileList.length + repeatAndUploaderFileList.uploderFileList.length >
10
) {
message.error("最大支持同时上传10个文件");
}
let newFileList = [ let newFileList = [
...repeatAndUploaderFileList.uploderFileList.slice(0, popLength), ...repeatAndUploaderFileList.uploderFileList.slice(0, popLength),
...fileList, ...fileList,
......
...@@ -56,9 +56,8 @@ const ProjectData = observer(() => { ...@@ -56,9 +56,8 @@ const ProjectData = observer(() => {
const { currentProjectStore } = useStores(); const { currentProjectStore } = useStores();
const fileToken = toJS(currentProjectStore.currentProjectInfo.filetoken); const fileToken = toJS(currentProjectStore.currentProjectInfo.filetoken);
const projectId = toJS(currentProjectStore.currentProjectInfo.id); const projectId = toJS(currentProjectStore.currentProjectInfo.id);
if (!projectId || !fileToken) { console.log(fileToken);
return <NoProject />; console.log(projectId);
}
/** 路由信息 */ /** 路由信息 */
const location = useLocation(); const location = useLocation();
// 当前文件路径 // 当前文件路径
...@@ -144,9 +143,9 @@ const ProjectData = observer(() => { ...@@ -144,9 +143,9 @@ const ProjectData = observer(() => {
// 获取某路径下的数据集 // 获取某路径下的数据集
const getDataSetList = useCallback(() => { const getDataSetList = useCallback(() => {
if (keyWord && projectId) { if (keyWord) {
return; return;
} else { } else if (projectId) {
return getDataFindRun({ return getDataFindRun({
projectId: projectId as string, projectId: projectId as string,
path: path === "/" ? "/" : `${path}/`, path: path === "/" ? "/" : `${path}/`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment