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
a0fa234c
Commit
a0fa234c
authored
Oct 25, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 应用环境列表增加根据时间排序
parent
73b94b72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
resourceCenter.ts
src/api/resourceCenter.ts
+1
-0
index.tsx
...ceCenter/UserResources/UserResourcesEnvironment/index.tsx
+10
-2
No files found.
src/api/resourceCenter.ts
View file @
a0fa234c
...
@@ -59,6 +59,7 @@ const getActorenvList = (params: {
...
@@ -59,6 +59,7 @@ const getActorenvList = (params: {
page
:
number
,
page
:
number
,
size
:
number
,
size
:
number
,
title
?:
string
,
title
?:
string
,
order
?:
string
,
})
=>
{
})
=>
{
return
request
({
return
request
({
url
:
Api
.
API_ACTORENV_LIST
,
url
:
Api
.
API_ACTORENV_LIST
,
...
...
src/views/ResourceCenter/UserResources/UserResourcesEnvironment/index.tsx
View file @
a0fa234c
...
@@ -5,7 +5,7 @@ import style from "./index.module.css";
...
@@ -5,7 +5,7 @@ import style from "./index.module.css";
import
SearchInput
from
"@/components/BusinessComponents/SearchInput"
;
import
SearchInput
from
"@/components/BusinessComponents/SearchInput"
;
import
MySelect
from
"@/components/mui/MySelect"
;
import
MySelect
from
"@/components/mui/MySelect"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
MyTable
from
"@/components/mui/MyTableNew"
;
import
MyTable
,
{
sortState
}
from
"@/components/mui/MyTableNew"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
{
getActorenvList
}
from
"@/api/resourceCenter"
;
import
{
getActorenvList
}
from
"@/api/resourceCenter"
;
import
Add
from
"@mui/icons-material/Add"
;
import
Add
from
"@mui/icons-material/Add"
;
...
@@ -28,6 +28,10 @@ const UserResourcesEnvironment = () => {
...
@@ -28,6 +28,10 @@ const UserResourcesEnvironment = () => {
const
[
id
,
setId
]
=
useState
(
""
);
const
[
id
,
setId
]
=
useState
(
""
);
const
[
deleteOpen
,
setDeleteOpen
]
=
useState
(
false
);
const
[
deleteOpen
,
setDeleteOpen
]
=
useState
(
false
);
const
[
totalElements
,
setTotalElements
]
=
useState
(
0
);
const
[
totalElements
,
setTotalElements
]
=
useState
(
0
);
const
[
sortState
,
setSortState
]
=
useState
<
sortState
>
({
field
:
"createdTime"
,
order
:
"DESC"
,
});
const
headCells
:
Array
<
any
>
=
[
const
headCells
:
Array
<
any
>
=
[
{
{
id
:
"title"
,
id
:
"title"
,
...
@@ -42,6 +46,7 @@ const UserResourcesEnvironment = () => {
...
@@ -42,6 +46,7 @@ const UserResourcesEnvironment = () => {
id
:
"createdTime"
,
id
:
"createdTime"
,
label
:
"创建时间"
,
label
:
"创建时间"
,
width
:
180
,
width
:
180
,
sort
:
true
,
},
},
{
{
id
:
"status"
,
id
:
"status"
,
...
@@ -73,9 +78,10 @@ const UserResourcesEnvironment = () => {
...
@@ -73,9 +78,10 @@ const UserResourcesEnvironment = () => {
size
,
size
,
title
,
title
,
type
:
type
===
"ALL"
?
""
:
type
,
type
:
type
===
"ALL"
?
""
:
type
,
order
:
sortState
.
order
||
"DESC"
,
});
});
}
}
},
[
getList
,
page
,
size
,
title
,
type
,
addOpen
,
deleteOpen
]);
},
[
getList
,
page
,
size
,
title
,
type
,
addOpen
,
deleteOpen
,
sortState
]);
const
renderType
=
(
item
:
any
)
=>
{
const
renderType
=
(
item
:
any
)
=>
{
if
(
item
.
type
===
"BATCH"
)
{
if
(
item
.
type
===
"BATCH"
)
{
...
@@ -256,6 +262,8 @@ const UserResourcesEnvironment = () => {
...
@@ -256,6 +262,8 @@ const UserResourcesEnvironment = () => {
paginationType=
"complex"
paginationType=
"complex"
totalElements=
{
totalElements
}
totalElements=
{
totalElements
}
loading=
{
loading
}
loading=
{
loading
}
sortState=
{
sortState
}
setSortState=
{
setSortState
}
></
MyTable
>
></
MyTable
>
</
div
>
</
div
>
{
addOpen
&&
<
AddEnvironment
setAddopen=
{
setAddopen
}
></
AddEnvironment
>
}
{
addOpen
&&
<
AddEnvironment
setAddopen=
{
setAddopen
}
></
AddEnvironment
>
}
...
...
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