Commit a1f5b176 authored by TZW's avatar TZW

1111

parent 3e004033
...@@ -19,6 +19,7 @@ import moment from 'moment'; ...@@ -19,6 +19,7 @@ import moment from 'moment';
let Diyrule = (props) => { let Diyrule = (props) => {
let { onChange } = props; let { onChange } = props;
let defval = props?.value ?? {}; let defval = props?.value ?? {};
console.log(defval);
let value = defval?.value || [], let value = defval?.value || [],
other = useMemo(() => { other = useMemo(() => {
return ( return (
...@@ -522,7 +523,6 @@ let Diyrule = (props) => { ...@@ -522,7 +523,6 @@ let Diyrule = (props) => {
value: i + 1, value: i + 1,
}))} }))}
onChange={(val) => { onChange={(val) => {
console.log('改变的val', val);
onChange({ onChange({
value: value, value: value,
other: { other: {
......
This diff is collapsed.
...@@ -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: 2023-01-19 09:43:42 * @Last Modified time: 2023-01-30 10:30:44
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -66,6 +66,7 @@ function Rules(props) { ...@@ -66,6 +66,7 @@ function Rules(props) {
title: '编辑', title: '编辑',
val: 'edit', val: 'edit',
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(vals);
vals.nrList.other = _.pick(vals.nrList.other, [ vals.nrList.other = _.pick(vals.nrList.other, [
'formatType', 'formatType',
'increaseList', 'increaseList',
...@@ -73,7 +74,14 @@ function Rules(props) { ...@@ -73,7 +74,14 @@ function Rules(props) {
'sort', 'sort',
]); ]);
vals.nrList.value = vals.nrList.value.map((it) => { vals.nrList.value = vals.nrList.value.map((it) => {
return _.pick(it, ['id', 'noContent', 'noRuleCode', 'sort', 'paramList']); return _.pick(it, [
'formatType',
'id',
'noContent',
'noRuleCode',
'sort',
'paramList',
]);
}); });
let params = { ...vals }; let params = { ...vals };
params.nrList = []; params.nrList = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment