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
7c1a2023
Commit
7c1a2023
authored
Nov 30, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查看规范
parent
2471eca5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
150 additions
and
92 deletions
+150
-92
ImportActionHeader.jsx
src/view/Manage/Model/Component/ImportActionHeader.jsx
+36
-18
rule-list.jsx
src/view/Manage/ModelConfig/Component/rule-list.jsx
+59
-51
rule-readonly.jsx
src/view/Manage/ModelConfig/Component/rule-readonly.jsx
+29
-0
rule-tree.jsx
src/view/Manage/ModelConfig/Component/rule-tree.jsx
+24
-22
rule.jsx
src/view/Manage/ModelConfig/Component/rule.jsx
+2
-1
No files found.
src/view/Manage/Model/Component/ImportActionHeader.jsx
View file @
7c1a2023
...
@@ -5,6 +5,7 @@ import { Subject } from 'rxjs';
...
@@ -5,6 +5,7 @@ import { Subject } from 'rxjs';
import
{
highlightSearchContentByTerms
,
generateUUID
,
IsArr
}
from
'../../../../util'
;
import
{
highlightSearchContentByTerms
,
generateUUID
,
IsArr
}
from
'../../../../util'
;
import
{
dispatch
,
dispatchLatest
}
from
'../../../../model'
;
import
{
dispatch
,
dispatchLatest
}
from
'../../../../model'
;
import
Rule
from
'../../ModelConfig/Component/rule-readonly'
;
import
DebounceInput
from
'./DebounceInput'
;
import
DebounceInput
from
'./DebounceInput'
;
...
@@ -55,6 +56,9 @@ const ImportActionHeader = (props) => {
...
@@ -55,6 +56,9 @@ const ImportActionHeader = (props) => {
const
[
dataTypeList
,
setDataTypeList
]
=
useState
(
null
);
const
[
dataTypeList
,
setDataTypeList
]
=
useState
(
null
);
const
[
bindingLoadRangeList
,
setBindingLoadRangeList
]
=
useState
(
null
);
const
[
bindingLoadRangeList
,
setBindingLoadRangeList
]
=
useState
(
null
);
const
[
isCollapse
,
setCollapse
]
=
useState
(
true
)
const
[
isCollapse
,
setCollapse
]
=
useState
(
true
)
const
[
ruleParams
,
setRuleParams
]
=
useState
({
visible
:
false
})
useEffect
(()
=>
{
useEffect
(()
=>
{
getDataTypeList
();
getDataTypeList
();
...
@@ -330,7 +334,10 @@ const ImportActionHeader = (props) => {
...
@@ -330,7 +334,10 @@ const ImportActionHeader = (props) => {
>
>
<
ConstraintSelect
<
ConstraintSelect
constraints=
{
constraints
}
constraints=
{
constraints
}
onChange=
{
onConstraintChange
}
onChange=
{
onConstraintChange
}
onDetail=
{
()
=>
{
setRuleParams
({
visible
:
true
})
}
}
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
...
@@ -357,7 +364,9 @@ const ImportActionHeader = (props) => {
...
@@ -357,7 +364,9 @@ const ImportActionHeader = (props) => {
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
><
ItemTitle
name=
'remark'
cnName=
'数据内容'
validateReports=
{
validateReports
}
/></
div
>
}
>
{
highlightSearchContentByTerms
(
modelerData
.
remark
||
''
,
terms
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
><
ItemTitle
name=
'remark'
cnName=
'数据内容'
validateReports=
{
validateReports
}
/></
div
>
}
>
{
highlightSearchContentByTerms
(
modelerData
.
remark
||
''
,
terms
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
技术主键
</
div
>
}
>
{
highlightSearchContentByTerms
(
primaryDescription
||
''
,
terms
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
技术主键
</
div
>
}
>
{
highlightSearchContentByTerms
(
primaryDescription
||
''
,
terms
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
数据平台
</
div
>
}
>
{
highlightSearchContentByTerms
(
modelerData
.
dataResidence
||
''
,
terms
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
数据平台
</
div
>
}
>
{
highlightSearchContentByTerms
(
modelerData
.
dataResidence
||
''
,
terms
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
规范
</
div
>
}
>
{
modelerData
.
easyDataModelerModelingConstraint
?(
modelerData
.
easyDataModelerModelingConstraint
.
cnName
||
''
):
''
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
规范
</
div
>
}
>
{
modelerData
.
easyDataModelerModelingConstraint
?(
modelerData
.
easyDataModelerModelingConstraint
.
cnName
||
''
):
''
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
数据表类型
</
div
>
}
>
{
modelerData
.
tableType
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
数据表类型
</
div
>
}
>
{
modelerData
.
tableType
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Descriptions
>
)
)
...
@@ -479,29 +488,38 @@ const ImportActionHeader = (props) => {
...
@@ -479,29 +488,38 @@ const ImportActionHeader = (props) => {
}
}
</
React
.
Fragment
>
</
React
.
Fragment
>
}
}
<
Rule
{
...
ruleParams
}
onCancel=
{
()
=>
{
setRuleParams
({
visible
:
false
})
}
}
/>
</
div
>
</
div
>
)
)
}
}
export
default
ImportActionHeader
;
export
default
ImportActionHeader
;
const
ConstraintSelect
=
({
value
=
{},
constraints
=
[],
onChange
,
...
restProps
})
=>
{
const
ConstraintSelect
=
({
value
=
{},
constraints
=
[],
onChange
,
onDetail
,
...
restProps
})
=>
{
return
(
return
(
<
Select
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
,
justifyContent
:
'space-between'
}
}
>
onChange=
{
onChange
}
<
Select
value=
{
value
?.
id
}
onChange=
{
(
val
)
=>
{
onChange
?.(
val
)
}
}
placeholder=
'请选择规范'
value=
{
value
?.
id
}
{
...
restProps
}
placeholder=
'请选择规范'
>
style=
{
{
flex
:
1
}
}
{
{
...
restProps
}
(
constraints
||
[])
&&
constraints
.
map
((
constraint
,
index
)
=>
{
>
return
(
{
<
Option
key=
{
index
}
value=
{
constraint
.
id
}
>
{
constraint
.
cnName
||
''
}
</
Option
>
(
constraints
||
[])
&&
constraints
.
map
((
constraint
,
index
)
=>
{
);
return
(
})
<
Option
key=
{
index
}
value=
{
constraint
.
id
}
>
{
constraint
.
cnName
||
''
}
</
Option
>
}
);
</
Select
>
})
}
</
Select
>
<
Button
className=
'ml-3'
onClick=
{
()
=>
{
onDetail
?.()
}
}
>
查看
</
Button
>
</
div
>
)
)
}
}
...
...
src/view/Manage/ModelConfig/Component/rule-list.jsx
View file @
7c1a2023
...
@@ -21,7 +21,7 @@ const nodeItems = [
...
@@ -21,7 +21,7 @@ const nodeItems = [
]
]
const
FC
=
(
props
)
=>
{
const
FC
=
(
props
)
=>
{
const
{
node
}
=
props
const
{
node
,
readonly
}
=
props
const
[
args
,
setArgs
]
=
React
.
useState
(()
=>
({
const
[
args
,
setArgs
]
=
React
.
useState
(()
=>
({
statusId
:
undefined
,
statusId
:
undefined
,
alertTypeId
:
undefined
,
alertTypeId
:
undefined
,
...
@@ -127,7 +127,7 @@ const FC = (props) => {
...
@@ -127,7 +127,7 @@ const FC = (props) => {
{
{
title
:
'操作'
,
title
:
'操作'
,
key
:
'action'
,
key
:
'action'
,
width
:
200
,
width
:
readonly
?
80
:
200
,
render
:
(
text
,
record
)
=>
{
render
:
(
text
,
record
)
=>
{
return
(
return
(
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
...
@@ -148,39 +148,43 @@ const FC = (props) => {
...
@@ -148,39 +148,43 @@ const FC = (props) => {
>
>
规则详情
规则详情
</
PermissionButton
>
</
PermissionButton
>
<
div
style=
{
{
margin
:
'0 5px'
}
}
>
{
<
Divider
type=
'vertical'
/>
!
readonly
&&
<
React
.
Fragment
>
</
div
>
<
div
style=
{
{
margin
:
'0 5px'
}
}
>
<
PermissionButton
<
Divider
type=
'vertical'
/>
type=
'link'
</
div
>
size=
'small'
<
PermissionButton
onClick=
{
()
=>
{
type=
'link'
setUpdateRuleParams
({
size=
'small'
visible
:
true
,
onClick=
{
()
=>
{
item
:
record
,
setUpdateRuleParams
({
})
visible
:
true
,
}
}
item
:
record
,
style=
{
{
padding
:
0
}
}
})
// permissionKey='编辑'
}
}
// permissions={permissions}
style=
{
{
padding
:
0
}
}
defaultPermission=
{
true
}
// permissionKey='编辑'
>
// permissions=
{
permissions
}
编辑
defaultPermission=
{
true
}
</
PermissionButton
>
>
<
div
style=
{
{
margin
:
'0 5px'
}
}
>
编辑
<
Divider
type=
'vertical'
/>
</
PermissionButton
>
</
div
>
<
div
style=
{
{
margin
:
'0 5px'
}
}
>
<
PermissionButton
<
Divider
type=
'vertical'
/>
type=
'link'
</
div
>
size=
'small'
<
PermissionButton
onClick=
{
()
=>
{
onDeteteClick
(
record
);
}
}
type=
'link'
style=
{
{
padding
:
0
}
}
size=
'small'
// permissionKey='删除'
onClick=
{
()
=>
{
onDeteteClick
(
record
);
}
}
// permissions={permissions}
style=
{
{
padding
:
0
}
}
defaultPermission=
{
true
}
// permissionKey='删除'
>
// permissions=
{
permissions
}
删除
defaultPermission=
{
true
}
</
PermissionButton
>
>
删除
</
PermissionButton
>
</
React
.
Fragment
>
}
</
div
>
</
div
>
)
)
}
}
...
@@ -341,22 +345,26 @@ const FC = (props) => {
...
@@ -341,22 +345,26 @@ const FC = (props) => {
</div>
</div>
<div className='d-flex py-3' style={{ justifyContent: 'space-between', alignItems: 'center', borderBottom: '1px solid #EFEFEF' }}>
<div className='d-flex py-3' style={{ justifyContent: 'space-between', alignItems: 'center', borderBottom: '1px solid #EFEFEF' }}>
<Space>
<Space>
<PermissionButton
{
onClick={onAddClick}
!readonly && <PermissionButton
// permissionKey='新增'
onClick={onAddClick}
defaultPermission={true}
// permissionKey='新增'
>
defaultPermission={true}
新建
>
</PermissionButton>
新建
<PermissionButton
</PermissionButton>
onClick={onBatchDeteteClick}
}
// permissionKey='删除'
{
defaultPermission={true}
!readonly && <PermissionButton
disabled={(selectedRows??[]).length===0}
onClick={onBatchDeteteClick}
tip={(selectedRows??[]).length===0?'请先选择规则':''}
// permissionKey='删除'
>
defaultPermission={true}
删除
disabled={(selectedRows??[]).length===0}
</PermissionButton>
tip={(selectedRows??[]).length===0?'请先选择规则':''}
>
删除
</PermissionButton>
}
<PermissionButton
<PermissionButton
onClick={onExportClick}
onClick={onExportClick}
defaultPermission={true}
defaultPermission={true}
...
...
src/view/Manage/ModelConfig/Component/rule-readonly.jsx
0 → 100644
View file @
7c1a2023
import
React
from
"react"
import
{
Modal
}
from
"antd"
import
RuleCURD
from
'./rule'
const
FC
=
(
props
)
=>
{
const
{
visible
,
onCancel
}
=
props
const
close
=
()
=>
{
onCancel
?.()
}
return
(
<
Modal
visible=
{
visible
}
footer=
{
null
}
width=
'80%'
bodyStyle=
{
{
padding
:
'15px'
,
overflowX
:
'auto'
,
maxHeight
:
'80vh'
}
}
title=
'规范详情'
centered
destroyOnClose
onCancel=
{
()
=>
{
close
()
}
}
>
<
RuleCURD
readonly=
{
true
}
/>
</
Modal
>
)
}
export
default
FC
\ No newline at end of file
src/view/Manage/ModelConfig/Component/rule-tree.jsx
View file @
7c1a2023
...
@@ -11,7 +11,7 @@ import Version from './rule-catalog-version'
...
@@ -11,7 +11,7 @@ import Version from './rule-catalog-version'
import
{
showMessage
}
from
'../../../../util'
import
{
showMessage
}
from
'../../../../util'
const
FC
=
(
props
)
=>
{
const
FC
=
(
props
)
=>
{
const
{
onClick
}
=
props
const
{
onClick
,
readonly
}
=
props
const
[
loading
,
setLoading
]
=
React
.
useState
(
false
)
const
[
loading
,
setLoading
]
=
React
.
useState
(
false
)
const
[
data
,
setData
]
=
React
.
useState
()
const
[
data
,
setData
]
=
React
.
useState
()
const
[
selectedNode
,
setSelectedNode
]
=
React
.
useState
()
const
[
selectedNode
,
setSelectedNode
]
=
React
.
useState
()
...
@@ -165,26 +165,28 @@ const FC = (props) => {
...
@@ -165,26 +165,28 @@ const FC = (props) => {
return
(
return
(
<
div
>
<
div
>
<
div
className=
'px-3'
style=
{
{
{
display
:
'flex'
,
!
readonly
&&
<
div
className=
'px-3'
style=
{
{
width
:
'100%'
,
display
:
'flex'
,
height
:
40
,
width
:
'100%'
,
alignItems
:
'center'
,
height
:
40
,
borderBottom
:
'1px solid #EFEFEF'
,
alignItems
:
'center'
,
}
}
>
borderBottom
:
'1px solid #EFEFEF'
,
<
Space
>
}
}
>
<
PermissionButton
<
Space
>
defaultPermission=
{
true
}
<
PermissionButton
tip=
"新增目录"
defaultPermission=
{
true
}
type=
"text"
tip=
"新增目录"
icon=
{
<
PlusOutlined
/>
}
type=
"text"
onClick=
{
onAddClick
}
icon=
{
<
PlusOutlined
/>
}
/>
onClick=
{
onAddClick
}
<
Tooltip
title=
"刷新目录"
>
/>
<
Button
type=
"text"
icon=
{
<
ReloadOutlined
/>
}
onClick=
{
onRefreshClick
}
/>
<
Tooltip
title=
"刷新目录"
>
</
Tooltip
>
<
Button
type=
"text"
icon=
{
<
ReloadOutlined
/>
}
onClick=
{
onRefreshClick
}
/>
</
Space
>
</
Tooltip
>
</
div
>
</
Space
>
</
div
>
}
<
div
className=
'p-3'
>
<
div
className=
'p-3'
>
<
Spin
spinning=
{
loading
}
>
<
Spin
spinning=
{
loading
}
>
<
Tree
<
Tree
...
@@ -194,7 +196,7 @@ const FC = (props) => {
...
@@ -194,7 +196,7 @@ const FC = (props) => {
treeData=
{
treeData
}
treeData=
{
treeData
}
onSelect=
{
onTreeSelect
}
onSelect=
{
onTreeSelect
}
selectedKeys=
{
(
selectedNode
?.
id
)?[
selectedNode
?.
id
]:
undefined
}
selectedKeys=
{
(
selectedNode
?.
id
)?[
selectedNode
?.
id
]:
undefined
}
shouldRowContextMenu=
{
()
=>
true
}
shouldRowContextMenu=
{
()
=>
!
readonly
}
menuData=
{
[
menuData=
{
[
{
id
:
'edit'
,
title
:
'编辑目录'
},
{
id
:
'edit'
,
title
:
'编辑目录'
},
{
id
:
'up'
,
title
:
'上移目录'
},
{
id
:
'up'
,
title
:
'上移目录'
},
...
...
src/view/Manage/ModelConfig/Component/rule.jsx
View file @
7c1a2023
...
@@ -10,6 +10,7 @@ import Separate from '../../AssetManage/Component/Separate'
...
@@ -10,6 +10,7 @@ import Separate from '../../AssetManage/Component/Separate'
import
'../../AssetManage/index.less'
import
'../../AssetManage/index.less'
const
FC
=
(
props
)
=>
{
const
FC
=
(
props
)
=>
{
const
{
readonly
=
false
}
=
props
const
[
node
,
setNode
]
=
React
.
useState
()
const
[
node
,
setNode
]
=
React
.
useState
()
const
onTreeClick
=
(
value
)
=>
{
const
onTreeClick
=
(
value
)
=>
{
...
@@ -23,7 +24,7 @@ const FC = (props) => {
...
@@ -23,7 +24,7 @@ const FC = (props) => {
<
Tree
onClick=
{
onTreeClick
}
{
...
props
}
/>
<
Tree
onClick=
{
onTreeClick
}
{
...
props
}
/>
</
div
>
</
div
>
<
div
className=
'middle'
>
<
div
className=
'middle'
>
<
List
node=
{
node
}
/>
<
List
node=
{
node
}
{
...
props
}
/>
</
div
>
</
div
>
</
div
>
</
div
>
)
)
...
...
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