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
dab0abfd
Commit
dab0abfd
authored
Nov 22, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增规则库
parent
29511782
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
13 deletions
+32
-13
update-rule-template.jsx
...iew/Manage/ModelConfig/Component/update-rule-template.jsx
+29
-10
index.jsx
src/view/Manage/ModelConfig/index.jsx
+3
-3
No files found.
src/view/Manage/ModelConfig/Component/update-rule-template.jsx
View file @
dab0abfd
...
...
@@ -92,12 +92,7 @@ export default FC
export
const
Basic
=
React
.
forwardRef
(
function
({
item
},
ref
)
{
const
[
loadingCheckTypes
,
setLoadingCheckTypes
]
=
React
.
useState
(
false
)
const
[
checkTypes
,
setCheckTypes
]
=
React
.
useState
()
const
[
loadingCheckPropertyTypes
,
setLoadingCheckPrpertyTypes
]
=
React
.
useState
(
false
)
const
[
checkPropertyTypes
,
setCheckPropertyTypes
]
=
React
.
useState
()
const
[
loadingExpressionTypes
,
setLoadingExpressionTypes
]
=
React
.
useState
(
false
)
const
[
expressionTypes
,
setExpressionTypes
]
=
React
.
useState
()
const
[
loadingExpressions
,
setLoadingExpressions
]
=
React
.
useState
(
false
)
const
[
expressions
,
setExpressions
]
=
React
.
useState
()
const
[
checkTypeValue
,
setCheckTypeValue
]
=
React
.
useState
()
const
[
form
]
=
Form
.
useForm
()
...
...
@@ -126,7 +121,9 @@ export const Basic = React.forwardRef(function ({ item }, ref) {
}
const
onValuesChange
=
(
changedValues
,
allValues
)
=>
{
console
.
log
(
'all values'
,
allValues
)
if
(
changedValues
.
hasOwnProperty
(
'checkType'
))
{
setCheckTypeValue
(
changedValues
.
checkType
)
}
}
return
(
...
...
@@ -162,11 +159,28 @@ export const Basic = React.forwardRef(function ({ item }, ref) {
))
}
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
name=
'checkProperty'
label=
'检查规则'
rules=
{
[{
required
:
true
,
message
:
'请选择检查类型!'
}]
}
{
checkTypeValue
===
'single'
&&
<
Form
.
Item
name=
'checkProperty'
label=
'检查规则'
rules=
{
[{
required
:
true
,
message
:
'请选择检查规则!'
}]
}
>
<
CheckItem
/>
</
Form
.
Item
>
}
{
checkTypeValue
===
'preCheck'
&&
<
Form
.
Item
label=
'检查规则'
>
<
Form
.
Item
name=
'preCheckProperty'
label=
'满足条件'
rules=
{
[{
required
:
true
,
message
:
'请选择检查规则!'
}]
}
>
<
CheckItem
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'checkProperty'
label=
'检查内容'
rules=
{
[{
required
:
true
,
message
:
'请选择检查规则!'
}]
}
>
<
CheckItem
/>
</
Form
.
Item
>
</
Form
.
Item
>
}
</
Form
>
)
})
...
...
@@ -313,7 +327,11 @@ const CheckItem = ({ value, onChange }) => {
...
currentExpression
,
value
:
e
.
target
.
value
})
}
}
/>
}
{
(
currentExpression
?.
valueType
===
'List<String>'
)
&&
<
Input
/>
}
{
(
currentExpression
?.
valueType
===
'List<String>'
)
&&
<
Input
placeholder=
'枚举值用;隔开 如高;中;低'
onChange=
{
(
e
)
=>
{
setCurrentExpression
({
...
currentExpression
,
value
:
(
e
.
target
.
value
??
''
).
split
(
';'
)
})
}
}
/>
}
</
Space
>
)
}
\ No newline at end of file
src/view/Manage/ModelConfig/index.jsx
View file @
dab0abfd
...
...
@@ -59,10 +59,10 @@ const ModelConfig = () => {
<
TabPane
tab=
'规范配置'
key=
'3'
>
<
ConstraintDetail
/>
</
TabPane
>
{
/*
<TabPane tab='规则库管理' key='4'>
<
TabPane
tab=
'规则库管理'
key=
'4'
>
<
RuleTemplateCURD
/>
</TabPane>
*/
}
<
TabPane
tab=
'分区配置'
key=
'
4
'
>
</
TabPane
>
<
TabPane
tab=
'分区配置'
key=
'
5
'
>
<
PartitionCURD
/>
</
TabPane
>
</
Tabs
>
...
...
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