import { message } from "antd/lib/index";
import { getPropertyData, extendInclude, extendRule, getDataFieldValue, setDataFieldValue, initFilter, guid } from "../../utils/common";
import moment from 'moment';
/**
 * @return {string}
 */
// 编辑
export default {
  onBeforeSaveHandleRecord(params) {
    params.record.TaskID = params.data.TaskID    //TaskID传递消息表ID
    params.record.PUBLISH = params.customParams;
  },
  onBeforeEdit(params){
    const { isNew, isCopy, dispatch, login, setFieldValueByBatch,data, stateData } = params ? params : {};
    let json = initFilter(login.OrgId,data.id);
    dispatch({
        type: 'app/getDataByPost',
        payload: json,
        url: 'HM/HMFilePublish/ChangeStatus',
        onComplete: (ret) => {
            if(ret)
            {
                message.success("表单已阅后将不再显示首页");
            }                   
        }
    });
},
}
