Commit 526cfa36 authored by TZW's avatar TZW

bug

parent f0901b4a
...@@ -18,6 +18,7 @@ import moment from 'moment'; ...@@ -18,6 +18,7 @@ import moment from 'moment';
let Diyrule = (props) => { let Diyrule = (props) => {
let { onChange } = props; let { onChange } = props;
console.log(props?.value, 111111111);
let defval = props?.value ?? {}; let defval = props?.value ?? {};
let value = defval?.value || [], let value = defval?.value || [],
other = useMemo(() => { other = useMemo(() => {
......
...@@ -1314,24 +1314,20 @@ function Diyrules({ item, colProps, formRef }) { ...@@ -1314,24 +1314,20 @@ function Diyrules({ item, colProps, formRef }) {
<Col {...col}> <Col {...col}>
<ProForm.Item <ProForm.Item
convertValue={(value) => { convertValue={(value) => {
console.log(value);
if (value?.other) return value; if (value?.other) return value;
let obj = { let nrList = {
noTypeId: value?.[0]?.noTypeId, other: {},
nrList: { value: [],
other: {},
value: [],
},
}; };
value?.forEach((it) => { value?.forEach((it) => {
if (it?.noRuleCode == 'increasing_order') { if (it?.noRuleCode == 'increasing_order') {
obj.nrList.other = it; nrList.other = it;
} else { } else {
obj.nrList.value.push(it); nrList.value.push(it);
} }
}); });
console.log(obj); console.log(nrList);
return obj; return nrList;
}} }}
name={curkey} name={curkey}
label={item.title} label={item.title}
......
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