import { message } from "antd/lib/index";
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, empty } from "../../utils/common";
import { connect } from 'dva';
/**
 * @return {string}
 */
// 编辑
export default {
  onBeforeSaveHandleRecord(params) {
    params.record.TaskID = params.data.TaskID    //TaskID传递消息表ID
    params.record.PUBLISH = params.customParams;
  },
  onBeforeEdit({ isNew, stateData, setFieldVisible, setFieldEditable, login }) {
    if (!isNew) {
      setDataFieldValue(stateData, 'VERSION', stateData.VERSION + 1);
      setFieldEditable('Nav_AppointType.NAME', false);
    }else{
      setDataFieldValue(stateData, 'VERSION', 1);
    }
  }
}
