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
819d0e07
Commit
819d0e07
authored
Sep 15, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 数据集查看器优化提测
parent
0683510d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
106 additions
and
209 deletions
+106
-209
CloudEController.ts
src/api/fileserver/CloudEController.ts
+37
-0
MyPopover.tsx
src/components/mui/MyPopover.tsx
+47
-34
index.module.css
...a/SeeDataset/components/DatasetCardTable/index.module.css
+1
-0
index.tsx
...jectData/SeeDataset/components/DatasetCardTable/index.tsx
+12
-3
index.tsx
.../ProjectData/SeeDataset/components/DatasetTable/index.tsx
+3
-0
index.module.css
src/views/Project/ProjectData/SeeDataset/index.module.css
+6
-9
index.tsx
src/views/Project/ProjectData/SeeDataset/index.tsx
+0
-0
indexCopy.module.css
...views/Project/ProjectData/SeeDataset/indexCopy.module.css
+0
-163
indexCopy.tsx
src/views/Project/ProjectData/SeeDataset/indexCopy.tsx
+0
-0
No files found.
src/api/fileserver/CloudEController.ts
View file @
819d0e07
...
@@ -30,6 +30,27 @@ type IGetDatasetItemsListParams = {
...
@@ -30,6 +30,27 @@ type IGetDatasetItemsListParams = {
sort
?:
string
;
// 排序
sort
?:
string
;
// 排序
}
}
export
type
IQuery
=
{
index
:
string
;
compare
:
">"
|
"<"
|
">="
|
"<="
|
"="
|
"≈"
;
query
:
string
;
};
type
IQuerylist
=
Array
<
IQuery
>
type
IGetDatasetItemsListNewParamstype
=
{
type
?:
string
;
projectId
:
string
;
token
:
string
;
filetoken
:
string
;
path
:
string
;
// 数据集路径
name
:
string
;
// 数据集名称
page
:
number
;
//
size
:
number
;
//
index
?:
string
;
// 选择的属性
sort
?:
string
;
// 排序
}
type
IGetDatasetSizeParams
=
{
type
IGetDatasetSizeParams
=
{
type
?:
string
;
// 产品id
type
?:
string
;
// 产品id
projectId
:
string
;
projectId
:
string
;
...
@@ -281,6 +302,22 @@ class CloudEController {
...
@@ -281,6 +302,22 @@ class CloudEController {
}
}
}
}
// 获取数据集里的数据列表(新 可支持高级搜索)
static
GetDatasetItemsListNew
(
params
:
IGetDatasetItemsListNewParamstype
,
querylist
:
IQuerylist
)
{
if
(
ApiUtils
.
getAuthorizationHeaders
(
headers
))
{
headers
[
"Cache-Control"
]
=
"no-cache"
;
let
url
=
getUrlThroughParams
(
params
,
[
'filetoken'
,
'path'
,
'token'
],
'?'
)
return
axios
.
post
(
`
${
APIOPTION
()}
:5003/find/dataset/new
${
url
}
`
,{
querylist
},
{
headers
:
headers
,
}
);
}
}
// 分子另存为
// 分子另存为
static
SaveDataset
(
params
:
ISaveDatasetParams
)
{
static
SaveDataset
(
params
:
ISaveDatasetParams
)
{
if
(
ApiUtils
.
getAuthorizationHeaders
(
headers
))
{
if
(
ApiUtils
.
getAuthorizationHeaders
(
headers
))
{
...
...
src/components/mui/MyPopover.tsx
View file @
819d0e07
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*/
*/
import
{
useRef
,
useEffect
,
useState
}
from
"react"
;
import
{
useRef
,
useEffect
,
useState
}
from
"react"
;
import
Popover
,
{
PopoverProps
}
from
"@mui/material/Popover"
;
import
Popover
,
{
PopoverProps
}
from
"@mui/material/Popover"
;
import
Typography
from
"@mui/material/Typography
"
;
import
{
ThemeProvider
,
createTheme
}
from
"@mui/material/styles
"
;
interface
IProps
extends
Omit
<
PopoverProps
,
"open"
>
{
interface
IProps
extends
Omit
<
PopoverProps
,
"open"
>
{
/** 触发行为 */
/** 触发行为 */
...
@@ -22,7 +22,18 @@ interface IProps extends Omit<PopoverProps, "open"> {
...
@@ -22,7 +22,18 @@ interface IProps extends Omit<PopoverProps, "open"> {
/** open 修改 */
/** open 修改 */
changeOpen
:
(
val
:
boolean
)
=>
void
;
changeOpen
:
(
val
:
boolean
)
=>
void
;
}
}
const
theme
=
createTheme
({
components
:
{
MuiPaper
:
{
styleOverrides
:
{
root
:
{
boxShadow
:
"0px 3px 10px 0px rgba(0,24,57,0.14)"
,
},
},
},
},
});
// .css-3bmhjh-MuiPaper-root-MuiPopover-paper
const
MyPopover
=
(
props
:
IProps
)
=>
{
const
MyPopover
=
(
props
:
IProps
)
=>
{
const
[
anchorEl
,
setAnchorEl
]
=
useState
<
any
|
null
>
(
null
);
const
[
anchorEl
,
setAnchorEl
]
=
useState
<
any
|
null
>
(
null
);
const
ref
=
useRef
(
null
);
const
ref
=
useRef
(
null
);
...
@@ -61,40 +72,42 @@ const MyPopover = (props: IProps) => {
...
@@ -61,40 +72,42 @@ const MyPopover = (props: IProps) => {
const
id
=
open
?
"simple-popover"
:
undefined
;
const
id
=
open
?
"simple-popover"
:
undefined
;
return
(
return
(
<
div
>
<
ThemeProvider
theme=
{
theme
}
>
<
Typography
<
div
>
ref=
{
ref
}
<
div
aria
-
owns=
{
id
}
ref=
{
ref
}
onClick=
{
trigger
===
"click"
?
handelClick
:
undefined
}
aria
-
owns=
{
id
}
onMouseEnter=
{
trigger
===
"hover"
?
handlePopoverOpen
:
undefined
}
onClick=
{
trigger
===
"click"
?
handelClick
:
undefined
}
onMouseLeave=
{
trigger
===
"hover"
?
handlePopoverClose
:
undefined
}
onMouseEnter=
{
trigger
===
"hover"
?
handlePopoverOpen
:
undefined
}
>
onMouseLeave=
{
trigger
===
"hover"
?
handlePopoverClose
:
undefined
}
{
children
}
>
</
Typography
>
{
children
}
<
Popover
</
div
>
id=
{
id
}
<
Popover
open=
{
open
}
id=
{
id
}
anchorEl=
{
anchorEl
}
open=
{
open
}
onClose=
{
handlePopoverClose
}
anchorEl=
{
anchorEl
}
sx=
{
{
onClose=
{
handlePopoverClose
}
pointerEvents
:
trigger
===
"hover"
?
"none"
:
undefined
,
sx=
{
{
}
}
pointerEvents
:
trigger
===
"hover"
?
"none"
:
undefined
,
anchorOrigin=
{
}
}
anchorOrigin
||
{
anchorOrigin=
{
vertical
:
"bottom"
,
anchorOrigin
||
{
horizontal
:
"center"
,
vertical
:
"bottom"
,
horizontal
:
"center"
,
}
}
}
}
transformOrigin=
{
transformOrigin=
{
transformOrigin
||
{
transformOrigin
||
{
vertical
:
"top"
,
vertical
:
"top
"
,
horizontal
:
"center
"
,
horizontal
:
"center"
,
}
}
}
}
>
>
{
content
}
<
Typography
sx=
{
{
p
:
1
}
}
>
{
content
}
</
Typography
>
<
/
Popover
>
</
Popover
>
</
div
>
</
div
>
</
ThemeProvider
>
);
);
};
};
...
...
src/views/Project/ProjectData/SeeDataset/components/DatasetCardTable/index.module.css
View file @
819d0e07
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
position
:
relative
;
}
}
.datasetLi
{
.datasetLi
{
flex
:
1
;
flex
:
1
;
...
...
src/views/Project/ProjectData/SeeDataset/components/DatasetCardTable/index.tsx
View file @
819d0e07
...
@@ -5,6 +5,7 @@ import MyTooltip from "@/components/mui/MyTooltip";
...
@@ -5,6 +5,7 @@ import MyTooltip from "@/components/mui/MyTooltip";
import
Checkbox
from
"@mui/material/Checkbox"
;
import
Checkbox
from
"@mui/material/Checkbox"
;
import
style
from
"./index.module.css"
;
import
style
from
"./index.module.css"
;
import
classNames
from
"classnames"
;
import
classNames
from
"classnames"
;
import
MyCircularProgress
from
"@/components/mui/MyCircularProgress"
;
import
NoData
from
"@/components/BusinessComponents/NoData"
;
import
NoData
from
"@/components/BusinessComponents/NoData"
;
type
IDatasetCardTableProps
=
{
type
IDatasetCardTableProps
=
{
...
@@ -13,11 +14,18 @@ type IDatasetCardTableProps = {
...
@@ -13,11 +14,18 @@ type IDatasetCardTableProps = {
showData
:
Array
<
string
>
;
showData
:
Array
<
string
>
;
selectItems
:
Array
<
string
>
;
selectItems
:
Array
<
string
>
;
setSelectItems
:
any
;
setSelectItems
:
any
;
loading
:
boolean
;
};
};
const
DatasetCardTable
=
(
props
:
IDatasetCardTableProps
)
=>
{
const
DatasetCardTable
=
(
props
:
IDatasetCardTableProps
)
=>
{
const
{
list
,
graphicDimension
,
showData
,
selectItems
,
setSelectItems
}
=
const
{
props
;
list
,
graphicDimension
,
showData
,
selectItems
,
setSelectItems
,
loading
,
}
=
props
;
// 选择/取消分子
// 选择/取消分子
const
handleSelectItem
=
(
id
:
string
)
=>
{
const
handleSelectItem
=
(
id
:
string
)
=>
{
...
@@ -34,7 +42,7 @@ const DatasetCardTable = (props: IDatasetCardTableProps) => {
...
@@ -34,7 +42,7 @@ const DatasetCardTable = (props: IDatasetCardTableProps) => {
// 空盒子用于布局
// 空盒子用于布局
const
nullBox
=
useMemo
(()
=>
{
const
nullBox
=
useMemo
(()
=>
{
if
(
list
.
length
>
4
)
{
if
(
list
.
length
>
4
)
{
let
nullBoxLength
=
8
-
list
.
length
;
let
nullBoxLength
=
Math
.
abs
(
8
-
list
.
length
)
;
return
new
Array
(
nullBoxLength
).
fill
(
""
);
return
new
Array
(
nullBoxLength
).
fill
(
""
);
}
else
{
}
else
{
return
[];
return
[];
...
@@ -46,6 +54,7 @@ const DatasetCardTable = (props: IDatasetCardTableProps) => {
...
@@ -46,6 +54,7 @@ const DatasetCardTable = (props: IDatasetCardTableProps) => {
{
list
.
length
!==
0
&&
(
{
list
.
length
!==
0
&&
(
<>
<>
<
div
className=
{
style
.
list
}
>
<
div
className=
{
style
.
list
}
>
<
MyCircularProgress
loading=
{
loading
}
/>
{
list
.
map
((
item
,
index
)
=>
{
{
list
.
map
((
item
,
index
)
=>
{
return
(
return
(
<
div
<
div
...
...
src/views/Project/ProjectData/SeeDataset/components/DatasetTable/index.tsx
View file @
819d0e07
...
@@ -9,6 +9,7 @@ type IDatasetTableProps = {
...
@@ -9,6 +9,7 @@ type IDatasetTableProps = {
setSelectItems
:
any
;
setSelectItems
:
any
;
sortState
:
sortState
;
sortState
:
sortState
;
setSortState
:
any
;
setSortState
:
any
;
loading
:
boolean
;
};
};
const
DatasetTable
=
(
props
:
IDatasetTableProps
)
=>
{
const
DatasetTable
=
(
props
:
IDatasetTableProps
)
=>
{
...
@@ -19,6 +20,7 @@ const DatasetTable = (props: IDatasetTableProps) => {
...
@@ -19,6 +20,7 @@ const DatasetTable = (props: IDatasetTableProps) => {
setSelectItems
,
setSelectItems
,
sortState
,
sortState
,
setSortState
,
setSortState
,
loading
,
}
=
props
;
}
=
props
;
const
headCells
=
useMemo
(()
=>
{
const
headCells
=
useMemo
(()
=>
{
let
width
=
let
width
=
...
@@ -45,6 +47,7 @@ const DatasetTable = (props: IDatasetTableProps) => {
...
@@ -45,6 +47,7 @@ const DatasetTable = (props: IDatasetTableProps) => {
setSelectItems=
{
setSelectItems
}
setSelectItems=
{
setSelectItems
}
sortState=
{
sortState
}
sortState=
{
sortState
}
setSortState=
{
setSortState
}
setSortState=
{
setSortState
}
loading=
{
loading
}
></
MyTable
>
></
MyTable
>
);
);
};
};
...
...
src/views/Project/ProjectData/SeeDataset/index.module.css
View file @
819d0e07
...
@@ -11,14 +11,14 @@
...
@@ -11,14 +11,14 @@
padding-bottom
:
64px
;
padding-bottom
:
64px
;
}
}
.top
{
.top
{
margin-bottom
:
20
px
;
margin-bottom
:
16
px
;
}
}
.title
{
.title
{
line-height
:
22px
;
line-height
:
22px
;
color
:
rgba
(
30
,
38
,
51
,
1
);
color
:
rgba
(
30
,
38
,
51
,
1
);
font-size
:
18px
;
font-size
:
18px
;
font-weight
:
600
;
font-weight
:
600
;
margin-bottom
:
20
px
;
margin-bottom
:
16
px
;
}
}
.screens
{
.screens
{
display
:
flex
;
display
:
flex
;
...
@@ -58,20 +58,17 @@
...
@@ -58,20 +58,17 @@
position
:
relative
;
position
:
relative
;
}
}
.searchBox
{
.searchBox
{
position
:
absolute
;
top
:
36px
;
right
:
0
;
width
:
662px
;
width
:
662px
;
box-shadow
:
0px
3px
10px
0px
rgba
(
0
,
24
,
57
,
0.14
);
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
4px
;
z-index
:
10
;
padding
:
20px
24px
24px
;
padding
:
20px
24px
24px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.
searchBox
img
{
.
deleteIcon
{
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.deleteIconDisabled
{
cursor
:
not-allowed
;
}
.searchTop
{
.searchTop
{
margin-bottom
:
12px
;
margin-bottom
:
12px
;
}
}
...
...
src/views/Project/ProjectData/SeeDataset/index.tsx
View file @
819d0e07
This diff is collapsed.
Click to expand it.
src/views/Project/ProjectData/SeeDataset/indexCopy.module.css
deleted
100644 → 0
View file @
0683510d
.datasetBox
{
padding
:
24px
32px
0
;
box-sizing
:
border-box
;
position
:
relative
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
flex-start
;
height
:
100%
;
}
.datasetBoxShowFoot
{
padding-bottom
:
64px
;
}
.top
{
margin-bottom
:
20px
;
}
.title
{
line-height
:
22px
;
color
:
rgba
(
30
,
38
,
51
,
1
);
font-size
:
18px
;
font-weight
:
600
;
margin-bottom
:
20px
;
}
.screens
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.screensLeft
{
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
}
.screensRight
{
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
}
.selectShowData
{
margin-left
:
24px
;
font-size
:
14px
;
color
:
rgba
(
19
,
112
,
255
,
1
);
}
.table
{
flex
:
1
;
overflow-y
:
overlay
;
display
:
flex
;
flex-direction
:
column
;
}
.list
{
flex
:
1
;
display
:
flex
;
justify-content
:
space-between
;
flex-wrap
:
wrap
;
}
.datasetLi
{
flex
:
1
;
min-width
:
20%
;
margin
:
0
16px
16px
0
;
border
:
1px
solid
rgba
(
235
,
237
,
240
,
1
);
border-radius
:
4px
;
min-height
:
275px
;
box-sizing
:
border-box
;
position
:
relative
;
cursor
:
pointer
;
}
.datasetLi
:nth-child
(
4n
)
{
margin-right
:
0
;
}
.datasetLi
:nth-last-child
(
1
)
{
margin-bottom
:
0
;
}
.datasetLi
:nth-last-child
(
2
)
{
margin-bottom
:
0
;
}
.datasetLi
:nth-last-child
(
3
)
{
margin-bottom
:
0
;
}
.datasetLi
:nth-last-child
(
4
)
{
margin-bottom
:
0
;
}
.datasetLiTop
{
height
:
55%
;
box-sizing
:
border-box
;
}
.datasetLiBottom
{
height
:
45%
;
box-sizing
:
border-box
;
background-color
:
RGBA
(
247
,
248
,
250
,
1
);
display
:
flex
;
flex-direction
:
column
;
}
.datasetLiTitle
{
height
:
38px
;
line-height
:
38px
;
color
:
rgba
(
19
,
112
,
255
,
1
);
font-size
:
14px
;
text-align
:
center
;
font-weight
:
600
;
width
:
100%
;
overflow
:
hidden
;
}
.datasetLiDataList
{
flex
:
1
;
overflow
:
overlay
;
}
.noDataList
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
color
:
rgba
(
138
,
144
,
153
,
1
);
font-size
:
14px
;
line-height
:
22px
;
}
.datasetLiDataLi
{
height
:
20px
;
line-height
:
20px
;
color
:
rgba
(
30
,
38
,
51
,
1
);
font-size
:
12px
;
padding
:
0
16px
;
display
:
flex
;
justify-content
:
space-between
;
}
.datasetLiDataLi
:nth-child
(
2n
)
{
background-color
:
rgba
(
235
,
237
,
240
,
1
);
}
.datasetLiDataLiKey
{
max-width
:
50%
;
white-space
:
nowrap
;
display
:
block
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.datasetLiDataLiValue
{
max-width
:
50%
;
white-space
:
nowrap
;
display
:
block
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.pagination
{
height
:
76px
;
min-height
:
76px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.foot
{
position
:
absolute
;
bottom
:
0
;
background-color
:
#fff
;
width
:
100%
;
box-sizing
:
border-box
;
height
:
64px
;
padding
:
0
32px
;
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
box-shadow
:
0px
-3px
10px
0px
rgba
(
0
,
24
,
57
,
0.04
);
}
.nullBox
{
visibility
:
hidden
;
}
src/views/Project/ProjectData/SeeDataset/indexCopy.tsx
deleted
100644 → 0
View file @
0683510d
This diff is collapsed.
Click to expand it.
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