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
f0901b4a
Commit
f0901b4a
authored
Dec 14, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sader
parent
769d3272
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
24 deletions
+26
-24
FormItems.jsx
src/components/InitForm/FormItems.jsx
+25
-1
index.jsx
src/components/InitForm/index.jsx
+0
-7
index.jsx
src/pages/system/rules/index.jsx
+1
-16
No files found.
src/components/InitForm/FormItems.jsx
View file @
f0901b4a
...
@@ -1312,7 +1312,31 @@ function Diyrules({ item, colProps, formRef }) {
...
@@ -1312,7 +1312,31 @@ function Diyrules({ item, colProps, formRef }) {
let
curkey
=
item
.
key
??
item
.
dataIndex
;
let
curkey
=
item
.
key
??
item
.
dataIndex
;
return
(
return
(
<
Col
{
...
col
}
>
<
Col
{
...
col
}
>
<
ProForm
.
Item
name=
{
curkey
}
label=
{
item
.
title
}
{
...
item
.
formItemProps
}
>
<
ProForm
.
Item
convertValue=
{
(
value
)
=>
{
console
.
log
(
value
);
if
(
value
?.
other
)
return
value
;
let
obj
=
{
noTypeId
:
value
?.[
0
]?.
noTypeId
,
nrList
:
{
other
:
{},
value
:
[],
},
};
value
?.
forEach
((
it
)
=>
{
if
(
it
?.
noRuleCode
==
'increasing_order'
)
{
obj
.
nrList
.
other
=
it
;
}
else
{
obj
.
nrList
.
value
.
push
(
it
);
}
});
console
.
log
(
obj
);
return
obj
;
}
}
name=
{
curkey
}
label=
{
item
.
title
}
{
...
item
.
formItemProps
}
>
<
Diyrule
/>
<
Diyrule
/>
</
ProForm
.
Item
>
</
ProForm
.
Item
>
</
Col
>
</
Col
>
...
...
src/components/InitForm/index.jsx
View file @
f0901b4a
...
@@ -103,8 +103,6 @@ function InitForm({
...
@@ -103,8 +103,6 @@ function InitForm({
})
{
})
{
let
proformRef
=
useRef
();
let
proformRef
=
useRef
();
proformRef
=
formRef
??
proformRef
;
proformRef
=
formRef
??
proformRef
;
console
.
log
(
detailpath
);
console
.
log
(
detailFormat
());
return
(
return
(
<
ProForm
<
ProForm
style=
{
{
overflow
:
'hidden'
}
}
style=
{
{
overflow
:
'hidden'
}
}
...
@@ -135,11 +133,6 @@ function InitForm({
...
@@ -135,11 +133,6 @@ function InitForm({
...
obj
,
...
obj
,
...
defaultFormValue
,
...
defaultFormValue
,
};
};
}
else
if
(
detailFormat
)
{
return
{
...
detailFormat
(
res
?.
data
),
...
defaultFormValue
,
};
}
}
return
{
return
{
...(
res
?.
data
?.
data
??
{}),
...(
res
?.
data
?.
data
??
{}),
...
...
src/pages/system/rules/index.jsx
View file @
f0901b4a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-14 1
5:55:13
* @Last Modified time: 2022-12-14 1
6:38:10
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -62,21 +62,6 @@ function Rules(props) {
...
@@ -62,21 +62,6 @@ function Rules(props) {
visible
:
true
,
visible
:
true
,
detailpath
:
urlParams
.
detail
,
detailpath
:
urlParams
.
detail
,
params
:
{
noTypeId
:
row
?.
id
},
params
:
{
noTypeId
:
row
?.
id
},
detailFormat
:
(
res
)
=>
{
console
.
log
(
'res:'
,
res
);
let
nrList
=
{};
res
?.
data
?.
nrList
?.
forEach
((
it
)
=>
{
if
(
it
?.
noRuleCode
==
'increasing_order'
)
{
nrList
.
other
=
it
;
}
else
{
nrList
.
value
.
push
(
it
);
}
});
delete
res
?.
data
?.
nrList
;
console
.
log
(
res
?.
data
?.
nrList
);
// res.data.nrList = nrList;
return
res
;
},
title
:
'编辑'
,
title
:
'编辑'
,
val
:
'edit'
,
val
:
'edit'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
...
...
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