Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
Project
Project
Details
Activity
Releases
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
wuhao
ems3.3
Commits
8d902bb1
Commit
8d902bb1
authored
Dec 02, 2022
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
bfdb22d0
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
612 additions
and
5 deletions
+612
-5
index.jsx
src/components/InitForm/Diyrule/index.jsx
+585
-0
FormItems.jsx
src/components/InitForm/FormItems.jsx
+15
-0
columns.js
src/pages/system/rules/columns.js
+10
-0
index.jsx
src/pages/system/rules/index.jsx
+2
-5
No files found.
src/components/InitForm/Diyrule/index.jsx
0 → 100644
View file @
8d902bb1
This diff is collapsed.
Click to expand it.
src/components/InitForm/FormItems.jsx
View file @
8d902bb1
...
@@ -36,6 +36,7 @@ import { PlusOutlined, DownOutlined, CloseOutlined, RedoOutlined } from '@ant-de
...
@@ -36,6 +36,7 @@ import { PlusOutlined, DownOutlined, CloseOutlined, RedoOutlined } from '@ant-de
import
BraftEditor
from
'braft-editor'
;
import
BraftEditor
from
'braft-editor'
;
import
EditTable
from
'./EditTable'
;
import
EditTable
from
'./EditTable'
;
import
EditorItem
from
'./EditorItem'
;
import
EditorItem
from
'./EditorItem'
;
import
Diyrule
from
'./Diyrule'
;
import
defaultSetting
from
'../../../config/defaultSettings'
;
import
defaultSetting
from
'../../../config/defaultSettings'
;
const
{
Image
,
Form
,
Upload
,
Col
,
Pagination
,
Avatar
,
Dropdown
,
Menu
,
Tabs
,
message
}
=
Antd
;
const
{
Image
,
Form
,
Upload
,
Col
,
Pagination
,
Avatar
,
Dropdown
,
Menu
,
Tabs
,
message
}
=
Antd
;
...
@@ -70,6 +71,7 @@ const FormItems = {
...
@@ -70,6 +71,7 @@ const FormItems = {
UploadImage
,
UploadImage
,
UploadDragger
,
UploadDragger
,
Editor
,
Editor
,
Diyrules
,
FormList
,
FormList
,
FormSelectList
,
FormSelectList
,
CheckboxItem
,
CheckboxItem
,
...
@@ -1304,6 +1306,19 @@ function Editor({ item, colProps, formRef }) {
...
@@ -1304,6 +1306,19 @@ function Editor({ item, colProps, formRef }) {
);
);
}
}
// editor
function
Diyrules
({
item
,
colProps
,
formRef
})
{
let
col
=
item
.
colProps
??
colProps
;
let
curkey
=
item
.
key
??
item
.
dataIndex
;
return
(
<
Col
{
...
col
}
>
<
ProForm
.
Item
name=
{
curkey
}
label=
{
item
.
title
}
{
...
item
.
formItemProps
}
>
<
Diyrule
/>
</
ProForm
.
Item
>
</
Col
>
);
}
function
FormList
({
item
,
colProps
,
formRef
})
{
function
FormList
({
item
,
colProps
,
formRef
})
{
let
col
=
item
.
colProps
??
colProps
;
let
col
=
item
.
colProps
??
colProps
;
let
fields
=
item
.
columns
;
let
fields
=
item
.
columns
;
...
...
src/pages/system/rules/columns.js
View file @
8d902bb1
...
@@ -20,6 +20,16 @@ function getcolumns(setdrawer) {
...
@@ -20,6 +20,16 @@ function getcolumns(setdrawer) {
dataIndex
:
'ruleNames'
,
dataIndex
:
'ruleNames'
,
key
:
'ruleNames'
,
key
:
'ruleNames'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
hideInForm
:
true
,
},
{
title
:
'规则配置'
,
dataIndex
:
'nrList'
,
hideInTable
:
true
,
valueType
:
'diyrules'
,
colProps
:
{
span
:
24
,
},
},
},
];
];
}
}
...
...
src/pages/system/rules/index.jsx
View file @
8d902bb1
...
@@ -152,8 +152,7 @@ function Rules(props) {
...
@@ -152,8 +152,7 @@ function Rules(props) {
item
:
null
,
item
:
null
,
detailpath
:
null
,
detailpath
:
null
,
title
:
'新增'
,
title
:
'新增'
,
type
:
'add'
,
val
:
'add'
,
val
:
'only'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
1
);
console
.
log
(
1
);
let
params
=
{
let
params
=
{
...
@@ -192,9 +191,7 @@ function Rules(props) {
...
@@ -192,9 +191,7 @@ function Rules(props) {
}));
}));
}
}
}
}
{
...
drawer
}
{
...
drawer
}
>
/>
{
drawer
?.
type
==
'add'
?
<
AddRules
/>
:
null
}
</
DrawerPro
>
</
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