/**
 * 下推工具类，下推参数构建
 * import { PushUtil } from "@birt/funclib/PushUtil"
 * 
 * @author cls
 * @date 2021-06-02
 */

import { $CONST } from "@birt/funclib/ConstUtil";

export const PushUtil = {
  // 构建任务中心打开参数
  buildOpenTaskParam(row, flow) {
    let param = {};
    param[$CONST.FLOWTASKGUID] = row.ftaskguid;
    param[$CONST.FLOWORDERGUID] = row.forderguid;
    param[$CONST.FLOWNUMBER] = row.fordernumber;
    param[$CONST.FLOWSTATE] = row.flowstate;
    param[$CONST.FLOWMODELPATH] = row.fmodelpath;
    param[$CONST.FLOWTITLE] = row.fpdisplayname;
    param[$CONST.FLOWVERSION] = flow.order.fversion;
    param[$CONST.FLOWREADONLY] = flow.task.readonly;
    param[$CONST.FLOWHASBACK] = flow.task.hasBack;
    return param;
  }
};