// export function submitProcessData({ payload, item, data }) {
//   let postData = {
//     ...payload,
//     buttonInfo: item,
//     ssxRemark:
//       'examineMap 和 taskForm 都是json字符串 通过修改 examineMap, taskForm中的值 达到改变提交记录的效果',
//     apiData: data,
//     taskFormKey: data.taskFormKey,
//   };
//   return postData;
// }

export function callbackSubmitData(infoData) {
  console.log(infoData);
  if (window.callbackSubmitInfoZhiYong && typeof window.callbackSubmitInfoZhiYong === 'function') {
    infoData = window.callbackSubmitInfoZhiYong({ // 返回新的值就行了.
      postData: infoData, //
    });
  }
  if (typeof infoData === 'object') {
    delete infoData.buttonInfo;
    delete infoData.ssxRemark;
    delete infoData.userNowInfo;
    delete infoData.apiData;
    delete infoData.taskFormKey;
  }
  return infoData;
}

export function callbackApplyData(infoData) { // 流程发起的回调函数
  console.log(infoData);
  if (window.callbackApplyDataInfoZhiYong && typeof window.callbackApplyDataInfoZhiYong === 'function') {
    infoData = window.callbackApplyDataInfoZhiYong({ // 返回新的值就行了.
      postData: infoData, //
    });
    if (typeof infoData === 'object') {
      delete infoData.userNowInfo;
    }
  }
  return infoData;
}
