Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
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
zhaochengxiang
szse
Commits
a24d28d4
Commit
a24d28d4
authored
May 23, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
行展开
parent
2ec9b0ad
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
8 deletions
+11
-8
EditModel.jsx
src/view/Manage/Model/Component/EditModel.jsx
+2
-0
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+6
-5
ModelTable.less
src/view/Manage/Model/Component/ModelTable.less
+1
-1
SubModelTable.jsx
src/view/Manage/Model/Component/SubModelTable.jsx
+0
-0
test-table.tsx
src/view/Manage/VirtualTable/test-table.tsx
+2
-2
No files found.
src/view/Manage/Model/Component/EditModel.jsx
View file @
a24d28d4
...
@@ -182,6 +182,7 @@ const EditModel = (props) => {
...
@@ -182,6 +182,7 @@ const EditModel = (props) => {
setActionData
({
...
actionData
,
...{
action
:
'detail'
,
modelerId
:
data
.
id
||
''
,
editable
:
data
?.
editable
||
false
,
stateId
:
data
?.
state
?.
id
||
''
}
});
setActionData
({
...
actionData
,
...{
action
:
'detail'
,
modelerId
:
data
.
id
||
''
,
editable
:
data
?.
editable
||
false
,
stateId
:
data
?.
state
?.
id
||
''
}
});
actionRef
.
current
=
'detail'
;
actionRef
.
current
=
'detail'
;
LocalStorage
.
set
(
'modelId'
,
data
.
id
||
''
);
LocalStorage
.
set
(
'modelChange'
,
!
(
LocalStorage
.
get
(
'modelChange'
)
||
false
));
LocalStorage
.
set
(
'modelChange'
,
!
(
LocalStorage
.
get
(
'modelChange'
)
||
false
));
},
},
error
:
()
=>
{
error
:
()
=>
{
...
@@ -199,6 +200,7 @@ const EditModel = (props) => {
...
@@ -199,6 +200,7 @@ const EditModel = (props) => {
setActionData
({
...
actionData
,
...{
action
:
(
_action
===
'flow'
)?
'flow'
:
'detail'
,
modelerId
:
data
.
id
||
''
,
stateId
:
data
?.
state
?.
id
||
''
,
permitCheckOut
:
data
?.
permitCheckOut
||
false
,
editable
:
data
?.
editable
||
false
}
});
setActionData
({
...
actionData
,
...{
action
:
(
_action
===
'flow'
)?
'flow'
:
'detail'
,
modelerId
:
data
.
id
||
''
,
stateId
:
data
?.
state
?.
id
||
''
,
permitCheckOut
:
data
?.
permitCheckOut
||
false
,
editable
:
data
?.
editable
||
false
}
});
actionRef
.
current
=
(
_action
===
'flow'
)?
'flow'
:
'detail'
;
actionRef
.
current
=
(
_action
===
'flow'
)?
'flow'
:
'detail'
;
LocalStorage
.
set
(
'modelId'
,
data
.
id
||
''
);
LocalStorage
.
set
(
'modelChange'
,
!
(
LocalStorage
.
get
(
'modelChange'
)
||
false
));
LocalStorage
.
set
(
'modelChange'
,
!
(
LocalStorage
.
get
(
'modelChange'
)
||
false
));
}
}
},
},
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
a24d28d4
...
@@ -7,11 +7,13 @@ import { Resizable } from 'react-resizable';
...
@@ -7,11 +7,13 @@ import { Resizable } from 'react-resizable';
import
{
useContextMenu
,
Menu
as
RcMenu
,
Item
as
RcItem
}
from
"react-contexify"
;
import
{
useContextMenu
,
Menu
as
RcMenu
,
Item
as
RcItem
}
from
"react-contexify"
;
import
ResizeObserver
from
'rc-resize-observer'
;
import
ResizeObserver
from
'rc-resize-observer'
;
import
{
MenuItem
,
SubMenu
}
from
'react-contextmenu'
;
import
{
MenuItem
,
SubMenu
}
from
'react-contextmenu'
;
import
LocalStorage
from
'local-storage'
;
import
DataGrid
from
'../../VirtualTable/test-table'
;
import
DataGrid
from
'../../VirtualTable/test-table'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
showMessage
,
getQueryParam
,
paginate
,
isSzseEnv
,
formatDate
,
getDataModelerRole
}
from
'../../../../util'
;
import
{
showMessage
,
getQueryParam
,
paginate
,
isSzseEnv
,
formatDate
,
getDataModelerRole
}
from
'../../../../util'
;
import
{
AnchorId
,
AnchorTimestamp
,
Action
,
CatalogId
,
ModelerId
,
DataModelerRoleReader
}
from
'../../../../util/constant'
;
import
{
AnchorId
,
AnchorTimestamp
,
Action
,
CatalogId
,
ModelerId
,
DataModelerRoleReader
}
from
'../../../../util/constant'
;
import
SubModelTable
from
"./SubModelTable"
;
// import Tag from "../../Tag";
// import Tag from "../../Tag";
import
'./ModelTable.less'
;
import
'./ModelTable.less'
;
...
@@ -239,13 +241,11 @@ const ModelTable = (props) => {
...
@@ -239,13 +241,11 @@ const ModelTable = (props) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
((
modelId
||
''
)
!==
''
)
{
window
?.
addEventListener
(
"storage"
,
modelEventChange
);
window
?.
addEventListener
(
"storage"
,
modelEventChange
);
return
()
=>
{
return
()
=>
{
window
?.
removeEventListener
(
"storage"
,
modelEventChange
);
window
?.
removeEventListener
(
"storage"
,
modelEventChange
);
}
}
}
//eslint-disable-next-line react-hooks/exhaustive-deps
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[])
},
[])
...
@@ -314,7 +314,7 @@ const ModelTable = (props) => {
...
@@ -314,7 +314,7 @@ const ModelTable = (props) => {
const
modelEventChange
=
(
e
)
=>
{
const
modelEventChange
=
(
e
)
=>
{
if
(
e
.
key
===
'modelChange'
)
{
if
(
e
.
key
===
'modelChange'
)
{
getCheckoutDataModel
(
);
subDataMap
.
delete
(
LocalStorage
.
get
(
'modelId'
)
);
}
}
}
}
...
@@ -483,10 +483,10 @@ const ModelTable = (props) => {
...
@@ -483,10 +483,10 @@ const ModelTable = (props) => {
return
(
return
(
<
div
style=
{
{
padding
:
10
}
}
>
<
div
style=
{
{
padding
:
10
}
}
>
<
ModelTable
<
Sub
ModelTable
modelId=
{
row
?.
checkedOutId
}
modelId=
{
row
?.
checkedOutId
}
modelPid=
{
row
?.
id
}
modelPid=
{
row
?.
id
}
globalSelectRows=
{
[...
subSelectedRowKeys
,
...
selectedRowKeys
]
}
checked=
{
subSelectedRowKeys
.
indexOf
(
row
?.
checkedOutId
)
!==-
1
}
dataMap=
{
subDataMap
}
dataMap=
{
subDataMap
}
onSubSelect=
{
onSubSelectChange
}
onSubSelect=
{
onSubSelectChange
}
onDataMapChange=
{
onSubDataMapChange
}
onDataMapChange=
{
onSubDataMapChange
}
...
@@ -593,6 +593,7 @@ const ModelTable = (props) => {
...
@@ -593,6 +593,7 @@ const ModelTable = (props) => {
columns=
{
columns
}
columns=
{
columns
}
rows=
{
modelId
?(
subData
||
[]):(
data
||
[])
}
rows=
{
modelId
?(
subData
||
[]):(
data
||
[])
}
rowHeight=
{
modelId
?
39
:
51
}
rowHeight=
{
modelId
?
39
:
51
}
expandedRowHeight=
{
100
}
rowExpandable=
{
(
row
)
=>
{
rowExpandable=
{
(
row
)
=>
{
return
row
?.
alreadyCheckedOut
;
return
row
?.
alreadyCheckedOut
;
}
}
}
}
...
...
src/view/Manage/Model/Component/ModelTable.less
View file @
a24d28d4
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
display: none;
display: none;
}
}
.yy-table-tbody
> tr:not(.yy-table-measure-row)>
td {
.yy-table-tbody
tr:not(.yy-table-measure-row)
td {
padding: 8px 8px !important;
padding: 8px 8px !important;
}
}
}
}
...
...
src/view/Manage/Model/Component/SubModelTable.jsx
0 → 100644
View file @
a24d28d4
This diff is collapsed.
Click to expand it.
src/view/Manage/VirtualTable/test-table.tsx
View file @
a24d28d4
...
@@ -203,7 +203,7 @@ function FC<Row extends RowData, SR, K extends React.Key = React.Key>(props: Dat
...
@@ -203,7 +203,7 @@ function FC<Row extends RowData, SR, K extends React.Key = React.Key>(props: Dat
}
}
return
columns
return
columns
},
[
columns
,
expandRow
,
_rows
,
checkable
,
checkAll
,
setCheckAll
])
},
[
columns
,
expandRow
,
checkable
])
// 取得选中
// 取得选中
const
getSelected
=
useCallback
(()
=>
{
const
getSelected
=
useCallback
(()
=>
{
...
@@ -266,7 +266,7 @@ function FC<Row extends RowData, SR, K extends React.Key = React.Key>(props: Dat
...
@@ -266,7 +266,7 @@ function FC<Row extends RowData, SR, K extends React.Key = React.Key>(props: Dat
sortColumns=
{
sortColumns
}
sortColumns=
{
sortColumns
}
onSortColumnsChange=
{
setSortColumns
}
onSortColumnsChange=
{
setSortColumns
}
selectedRows=
{
_selectedRows
}
selectedRows=
{
new
Set
(
selectedRows
||
[])
}
onSelectedRowsChange=
{
(
values
:
Set
<
any
>
)
=>
{
onSelectedRowsChange=
{
(
values
:
Set
<
any
>
)
=>
{
console
.
log
(
'values'
,
values
);
console
.
log
(
'values'
,
values
);
onSelectedRowsChange
&&
onSelectedRowsChange
(
Array
.
from
(
values
));
onSelectedRowsChange
&&
onSelectedRowsChange
(
Array
.
from
(
values
));
...
...
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