giveSmartFormGlobalProps.js 1.4 KB
Newer Older
1 2 3 4
import React from 'react';
import moment from 'moment';
import {Modal, message, notification, Tooltip, Spin, Popover, Popconfirm} from 'antd';

5 6
import { giveFilePostDataInfoForTrue } from '@/webPublic/one_stop_public/Base16';

7

8 9 10 11
export function giveSmartFormGlobalProps({
                                           fromStart = false,
                                           hasSingle = false,
                                           isHandle = false,
12
                                           onlyRead = false, // 是否此表单所有组件只读
13 14 15 16 17
                                           taskCells = [],
                                           data = {},
                                           nextUsers = {}, //
                                           calculateFlowData = [], // 移动端使用 用于分块块  禅道 23933 移动端全表单后审核步骤的显示问题优化
                                         }) {
18

19 20 21 22 23 24 25 26
  window.smartFormGlobalProps = {
    fromStart,
    hasSingle,
    isHandle,
    taskCells,
    data,
    nextUsers,
    calculateFlowData,
27
    onlyRead,
28 29 30
    apiList: {
      giveFilePostDataInfoForTrue,
      remark: 'giveFilePostDataInfoForTrue(params, url); 将接口参数 二进制文件化 并返回新的接口地址与参数',
31 32 33 34 35 36 37 38 39 40 41 42
    },
    publicComponent: {
      React,
      Modal,
      message,
      notification,
      Tooltip,
      Spin,
      Popover,
      Popconfirm,
      moment,
    },
43 44 45
  };
  return true;
}