Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bkunyun
Commits
586eca40
Commit
586eca40
authored
Jul 15, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化代码
parent
72b0a30f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
index.tsx
src/components/BusinessComponents/FileSelect/index.tsx
+6
-8
index.tsx
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
+4
-4
No files found.
src/components/BusinessComponents/FileSelect/index.tsx
View file @
586eca40
...
@@ -6,9 +6,6 @@ import { observer } from "mobx-react-lite";
...
@@ -6,9 +6,6 @@ import { observer } from "mobx-react-lite";
import
{
toJS
}
from
"mobx"
;
import
{
toJS
}
from
"mobx"
;
import
CloudEController
from
"@/api/fileserver/CloudEController"
;
import
CloudEController
from
"@/api/fileserver/CloudEController"
;
import
{
getDataFind
,
getDataFileSearch
}
from
"@/api/project_api"
;
import
{
getDataFind
,
getDataFileSearch
}
from
"@/api/project_api"
;
import
MyTreeView
from
"@/components/mui/MyTreeView"
;
import
classNames
from
"classnames"
;
import
bigFolderIcon
from
"@/assets/project/bigFolderIcon.svg"
;
import
Table
from
"@/components/Material.Ui/Table"
;
import
Table
from
"@/components/Material.Ui/Table"
;
import
noFile
from
"@/assets/project/noFile.svg"
;
import
noFile
from
"@/assets/project/noFile.svg"
;
import
folderIcon
from
"@/assets/project/folderIcon.svg"
;
import
folderIcon
from
"@/assets/project/folderIcon.svg"
;
...
@@ -20,14 +17,15 @@ import useMyRequest from "@/hooks/useMyRequest";
...
@@ -20,14 +17,15 @@ import useMyRequest from "@/hooks/useMyRequest";
import
{
storageUnitFromB
}
from
"@/utils/util"
;
import
{
storageUnitFromB
}
from
"@/utils/util"
;
import
classnames
from
"classnames"
;
import
classnames
from
"classnames"
;
import
{
useMessage
}
from
"@/components/MySnackbar"
;
import
{
useMessage
}
from
"@/components/MySnackbar"
;
import
_
from
"lodash"
;
import
moment
from
"moment"
;
import
moment
from
"moment"
;
export
type
FileSelectType
=
"file"
|
"dataset"
|
"path"
;
// file 文件选择 dataset数据集选择 path文件夹选择
type
FileSelectProps
=
{
type
FileSelectProps
=
{
open
:
boolean
;
open
:
boolean
;
onConfirm
:
any
;
onConfirm
:
any
;
onClose
:
any
;
onClose
:
any
;
type
?:
"file"
|
"dataset"
|
"path"
;
// file 文件选择 dataset数据集选择 path文件夹选择
type
?:
FileSelectType
;
// file 文件选择 dataset数据集选择 path文件夹选择
};
};
const
FileSelect
=
observer
((
props
:
FileSelectProps
)
=>
{
const
FileSelect
=
observer
((
props
:
FileSelectProps
)
=>
{
...
@@ -259,13 +257,13 @@ const FileSelect = observer((props: FileSelectProps) => {
...
@@ -259,13 +257,13 @@ const FileSelect = observer((props: FileSelectProps) => {
// table配置
// table配置
const
versionsHeadCells
=
[
const
versionsHeadCells
=
[
{
id
:
"name"
,
numeric
:
false
,
label
:
"名称"
,
width
:
"
3
0%"
},
{
id
:
"name"
,
numeric
:
false
,
label
:
"名称"
,
width
:
"
5
0%"
},
{
id
:
"size"
,
numeric
:
false
,
label
:
"大小"
,
width
:
"
20
%"
,
sort
:
true
},
{
id
:
"size"
,
numeric
:
false
,
label
:
"大小"
,
width
:
"
15
%"
,
sort
:
true
},
{
{
id
:
"mtime"
,
id
:
"mtime"
,
numeric
:
false
,
numeric
:
false
,
label
:
"创建时间"
,
label
:
"创建时间"
,
width
:
"
3
0%"
,
width
:
"
2
0%"
,
sort
:
true
,
sort
:
true
,
},
},
];
];
...
...
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
View file @
586eca40
...
@@ -4,7 +4,9 @@ import MyInput from "@/components/mui/MyInput";
...
@@ -4,7 +4,9 @@ import MyInput from "@/components/mui/MyInput";
import
Tooltip
from
"@mui/material/Tooltip"
;
import
Tooltip
from
"@mui/material/Tooltip"
;
import
classnames
from
"classnames"
;
import
classnames
from
"classnames"
;
import
{
useState
,
useMemo
,
useImperativeHandle
}
from
"react"
;
import
{
useState
,
useMemo
,
useImperativeHandle
}
from
"react"
;
import
FileSelect
from
"@/components/BusinessComponents/FileSelect"
;
import
FileSelect
,
{
FileSelectType
,
}
from
"@/components/BusinessComponents/FileSelect"
;
import
moment
from
"moment"
;
import
moment
from
"moment"
;
import
MySelect
,
{
optionsTransform
}
from
"../components/MySelect"
;
import
MySelect
,
{
optionsTransform
}
from
"../components/MySelect"
;
import
MyCheckBox
from
"@/components/mui/MyCheckBox"
;
import
MyCheckBox
from
"@/components/mui/MyCheckBox"
;
...
@@ -26,9 +28,7 @@ type ConfigFormProps = {
...
@@ -26,9 +28,7 @@ type ConfigFormProps = {
const
ConfigForm
=
(
props
:
ConfigFormProps
)
=>
{
const
ConfigForm
=
(
props
:
ConfigFormProps
)
=>
{
const
{
templateConfigInfo
,
setParameter
,
setSelectedBatchNodeId
}
=
props
;
const
{
templateConfigInfo
,
setParameter
,
setSelectedBatchNodeId
}
=
props
;
const
[
name
,
setName
]
=
useState
<
string
>
(
""
);
// 任务名称
const
[
name
,
setName
]
=
useState
<
string
>
(
""
);
// 任务名称
const
[
fileSelectType
,
setFileSelectType
]
=
useState
<
const
[
fileSelectType
,
setFileSelectType
]
=
useState
<
FileSelectType
>
(
"path"
);
"path"
|
"dataset"
|
"file"
>
(
"path"
);
const
[
nameHelp
,
setNameHelp
]
=
useState
({
const
[
nameHelp
,
setNameHelp
]
=
useState
({
error
:
false
,
error
:
false
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment