|
@@ -194,7 +194,14 @@ function CommitAuditModal(props) {
|
|
|
};
|
|
|
|
|
|
const getFromData = (idList, newFormValues) => {
|
|
|
- const data = JSON.parse(JSON.stringify(newFormValues));
|
|
|
+ let data = [];
|
|
|
+ if (newFormValues) {
|
|
|
+ try {
|
|
|
+ data = JSON.parse(JSON.stringify(newFormValues));
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ }
|
|
|
+ }
|
|
|
const result = [];
|
|
|
// 获取流转节点的层级关系
|
|
|
let len = 0;
|
|
@@ -624,7 +631,7 @@ function CommitAuditModal(props) {
|
|
|
let newFormValues = {
|
|
|
...formComponentValues,
|
|
|
[currentNodeID]: componentValue,
|
|
|
- }
|
|
|
+ };
|
|
|
setFormComponentValues(newFormValues);
|
|
|
console.log(formComponentValues);
|
|
|
formValueRef.current.form[currentNodeID] = [...componentValue];
|
|
@@ -724,7 +731,7 @@ function CommitAuditModal(props) {
|
|
|
}
|
|
|
// 检查之后调用一次,防止什么都没改导致获取不到值
|
|
|
onFormValueChange(tempFormData, tempFormData);
|
|
|
- const formList = getFromData(result);
|
|
|
+ const formList = getFromData(result, formComponentValues);
|
|
|
let params = {
|
|
|
desc: fieldsValue.desc,
|
|
|
// 审核流程id
|
|
@@ -789,6 +796,7 @@ function CommitAuditModal(props) {
|
|
|
}
|
|
|
|
|
|
params.files = uploadList.current.join(',');
|
|
|
+ // console.log(params);
|
|
|
onSubmitNextNode(params);
|
|
|
} catch (error) {
|
|
|
console.error(error);
|