"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _button = _interopRequireDefault(require("@alifd/next/lib/button"));
var _tab = _interopRequireDefault(require("@alifd/next/lib/tab"));
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _loading = _interopRequireDefault(require("@alifd/next/lib/loading"));
var _checkbox = _interopRequireDefault(require("@alifd/next/lib/checkbox"));
var _switch = _interopRequireDefault(require("@alifd/next/lib/switch"));
var _numberPicker = _interopRequireDefault(require("@alifd/next/lib/number-picker"));
var _radio = _interopRequireDefault(require("@alifd/next/lib/radio"));
var _upload = _interopRequireDefault(require("@alifd/next/lib/upload"));
var _input = _interopRequireDefault(require("@alifd/next/lib/input"));
var _icon = _interopRequireDefault(require("@alifd/next/lib/icon"));
var _field = _interopRequireDefault(require("@alifd/next/lib/field"));
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
var _balloon = _interopRequireDefault(require("@alifd/next/lib/balloon"));
var _datePicker = _interopRequireDefault(require("@alifd/next/lib/date-picker"));
var _select = _interopRequireDefault(require("@alifd/next/lib/select"));
var _form = _interopRequireDefault(require("@alifd/next/lib/form"));
var React = _interopRequireWildcard(require("react"));
require("./index.scss");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var FormItem = _form["default"].Item;
var Option = _select["default"].Option;
var RangePicker = _datePicker["default"].RangePicker;
var Tooltip = _balloon["default"].Tooltip;
var ActivityForm = /*#__PURE__*/function (_Component) {
  (0, _inheritsLoose2["default"])(ActivityForm, _Component);
  function ActivityForm(props, context) {
    var _this;
    _this = _Component.call(this, props, context) || this;
    _this.field = new _field["default"]((0, _assertThisInitialized2["default"])(_this));
    _this.handleSubmit = function () {
      _this.field.validate();
      _this.setState({
        visible: true
      });
      setTimeout(function () {
        _this.setState({
          visible: false
        });
        _this.props.onClose();
      }, 3000);
    };
    _this.state = {
      visible: false
    };
    return _this;
  }
  var _proto = ActivityForm.prototype;
  _proto.render = function render() {
    var _this2 = this;
    var tabs = [{
      tab: '活动设置',
      key: 0,
      formItemLayout: {
        labelCol: {
          span: 6
        },
        wrapperCol: {
          span: 18
        }
      },
      data: [{
        label: '活动标题',
        key: 'activityTitle',
        value: '',
        required: true,
        type: 'Input'
      }, {
        label: '活动时间',
        key: 'activityTime',
        value: [],
        required: true,
        type: 'RangePicker'
      }, {
        label: '是否限制参与人数：',
        key: 'activityTime',
        value: 0,
        required: true,
        type: 'Switch',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: true,
        Tooltip: false
      }, {
        label: '限制人数：',
        key: 'activityTime',
        value: 0,
        required: true,
        type: 'Input',
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '是否限制抽奖次数：',
        key: 'activityTime',
        value: 0,
        required: true,
        type: 'Switch',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: true,
        Tooltip: false
      }, {
        label: '每人抽奖总次数：',
        key: 'activityTime',
        value: 10,
        required: true,
        type: 'Input',
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '每人单日抽奖次数：',
        key: 'activityTime',
        value: 10,
        required: true,
        type: 'Input',
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '是否限制中奖率：',
        key: 'activityTime',
        value: 0,
        required: true,
        type: 'Switch',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: true,
        Tooltip: false
      }, {
        label: '中奖率：',
        key: 'activityTime',
        value: 10,
        required: true,
        type: 'Input',
        isSetting: false,
        vip: false,
        Tooltip: false,
        innerAfter: ' %  '
      }, {
        label: '是否限制参与地区：',
        key: 'activityTime',
        value: 0,
        required: true,
        type: 'Switch',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: true,
        SettingNode: /*#__PURE__*/React.createElement("span", {
          className: "design"
        }, "\u8BBE\u7F6E"),
        vip: true,
        Tooltip: false
      }, {
        label: '要求填写用户信息：',
        key: 'activityTime',
        value: 0,
        required: true,
        type: 'Switch',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: true,
        SettingNode: /*#__PURE__*/React.createElement("span", {
          className: "design"
        }, "\u8BBE\u7F6E"),
        vip: true,
        Tooltip: false
      }, {
        label: '轮播获奖信息：',
        key: 'activityTime',
        value: 0,
        required: true,
        type: 'Switch',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: true,
        Tooltip: true,
        TooltipTrigger: /*#__PURE__*/React.createElement(_icon["default"], {
          type: "prompt",
          size: "xs",
          style: {
            color: '#BC4C4B',
            marginLeft: '8px',
            position: 'relative',
            top: '5px',
            cursor: 'pointer'
          }
        }),
        TooltipText: '默认轮播信息为微信名称与奖品信息，优先展示奖品等级较高的获奖者'
      }]
    }, {
      tab: '奖品设置',
      key: 1,
      formItemLayout: {
        labelCol: {
          span: 4
        },
        wrapperCol: {
          span: 20
        }
      },
      child: [[{
        label: '奖项等级：',
        key: 'prizeLevel',
        value: '特等奖',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        noteNode: /*#__PURE__*/React.createElement("div", {
          className: "error-note"
        }, /*#__PURE__*/React.createElement(_icon["default"], {
          type: "prompt",
          size: "xs"
        }), " \u5F53\u524D\u7EA2\u5305\u4F59\u989D\u4E0D\u8DB310\u5143\uFF0C\u5F53\u524D0\u5143", /*#__PURE__*/React.createElement("span", {
          className: "link-style"
        }, "\u524D\u5F80\u5145\u503C"))
      }, {
        label: '奖项名称：',
        key: 'prizeName',
        value: '七天vip',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖项图片：',
        key: 'prizeImg',
        value: '//img.maimairen.com/low-code/components/prize-list001/day15.png',
        required: true,
        type: 'Upload',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖项类型：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        radioData: [{
          label: '实物礼品',
          value: '1'
        }, {
          label: '虚拟礼品',
          value: '2'
        }, {
          label: '微信现金红包',
          value: '3'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: ' 奖品数量：',
        key: 'prizeNum',
        value: 5,
        required: true,
        type: 'NumberPicker',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        inputLabel: ''
      }, {
        label: '兑奖方式：',
        key: 'prizeImg',
        value: '',
        required: true,
        type: 'Radio',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        radioData: [{
          label: '跳转兑换页面领取',
          value: 1
        }, {
          label: '直接发放',
          value: 2
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '兑换地址：',
        key: 'prizeUrl',
        value: '',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        inputLabel: 'http：//'
      }, {
        label: '操作提示：',
        key: 'Note',
        value: '',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '兑奖须知：',
        key: 'changePrize',
        value: '请中奖用户于2021年12月31日-2022年3月31日期间到官方小程序活动页面领取奖品，未按规定时间领取均视为自动放弃。',
        required: true,
        type: 'TextArea',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '奖项等级：',
        key: 'prizeLevel',
        value: '特等奖',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        noteNode: /*#__PURE__*/React.createElement("div", {
          className: "error-note"
        }, /*#__PURE__*/React.createElement(_icon["default"], {
          type: "prompt",
          size: "xs"
        }), " \u5F53\u524D\u7EA2\u5305\u4F59\u989D\u4E0D\u8DB310\u5143\uFF0C\u5F53\u524D0\u5143", /*#__PURE__*/React.createElement("span", {
          className: "link-style"
        }, "\u524D\u5F80\u5145\u503C"))
      }, {
        label: '奖项名称：',
        key: 'prizeName',
        value: '七天vip',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖项图片：',
        key: 'prizeImg',
        value: '//img.maimairen.com/low-code/components/prize-list001/day15.png',
        required: true,
        type: 'Upload',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖项类型：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        radioData: [{
          label: '实物礼品',
          value: '1'
        }, {
          label: '虚拟礼品',
          value: '2'
        }, {
          label: '微信现金红包',
          value: '3'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: ' 奖品数量：',
        key: 'prizeNum',
        value: 5,
        required: true,
        type: 'NumberPicker',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        inputLabel: ''
      }, {
        label: '兑奖方式：',
        key: 'prizeImg',
        value: '',
        required: true,
        type: 'Radio',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        radioData: [{
          label: '跳转兑换页面领取',
          value: 1
        }, {
          label: '直接发放',
          value: 2
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '兑换地址：',
        key: 'prizeUrl',
        value: '',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        inputLabel: 'http：//'
      }, {
        label: '操作提示：',
        key: 'Note',
        value: '',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '兑奖须知：',
        key: 'changePrize',
        value: '请中奖用户于2021年12月31日-2022年3月31日期间到官方小程序活动页面领取奖品，未按规定时间领取均视为自动放弃。',
        required: true,
        type: 'TextArea',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '奖项等级：',
        key: 'prizeLevel',
        value: '特等奖',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        noteNode: /*#__PURE__*/React.createElement("div", {
          className: "error-note"
        }, /*#__PURE__*/React.createElement(_icon["default"], {
          type: "prompt",
          size: "xs"
        }), " \u5F53\u524D\u7EA2\u5305\u4F59\u989D\u4E0D\u8DB310\u5143\uFF0C\u5F53\u524D0\u5143", /*#__PURE__*/React.createElement("span", {
          className: "link-style"
        }, "\u524D\u5F80\u5145\u503C"))
      }, {
        label: '奖项名称：',
        key: 'prizeName',
        value: '七天vip',
        rules: [],
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖项图片：',
        key: 'prizeImg',
        value: '//img.maimairen.com/low-code/components/prize-list001/day15.png',
        required: true,
        type: 'Upload',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖项类型：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        radioData: [{
          label: '实物礼品',
          value: '1'
        }, {
          label: '虚拟礼品',
          value: '2'
        }, {
          label: '微信现金红包',
          value: '3'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: ' 奖品数量：',
        key: 'prizeNum',
        value: 5,
        required: true,
        type: 'NumberPicker',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        inputLabel: ''
      }, {
        label: '兑奖方式：',
        key: 'prizeImg',
        value: '',
        required: true,
        type: 'Radio',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        radioData: [{
          label: '跳转兑换页面领取',
          value: 1
        }, {
          label: '直接发放',
          value: 2
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '兑换地址：',
        key: 'prizeUrl',
        value: '',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        inputLabel: 'http：//'
      }, {
        label: '操作提示：',
        key: 'Note',
        value: '',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '兑奖须知：',
        key: 'changePrize',
        value: '请中奖用户于2021年12月31日-2022年3月31日期间到官方小程序活动页面领取奖品，未按规定时间领取均视为自动放弃。',
        required: true,
        type: 'TextArea',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '奖项等级：',
        key: 'prizeLevel',
        value: '特等奖',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        noteNode: /*#__PURE__*/React.createElement("div", {
          className: "error-note"
        }, /*#__PURE__*/React.createElement(_icon["default"], {
          type: "prompt",
          size: "xs"
        }), " \u5F53\u524D\u7EA2\u5305\u4F59\u989D\u4E0D\u8DB310\u5143\uFF0C\u5F53\u524D0\u5143", /*#__PURE__*/React.createElement("span", {
          className: "link-style"
        }, "\u524D\u5F80\u5145\u503C"))
      }, {
        label: '奖项名称：',
        key: 'prizeName',
        value: '七天vip',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖项图片：',
        key: 'prizeImg',
        value: '//img.maimairen.com/low-code/components/prize-list001/day15.png',
        required: true,
        type: 'Upload',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖项类型：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        radioData: [{
          label: '实物礼品',
          value: '1'
        }, {
          label: '虚拟礼品',
          value: '2'
        }, {
          label: '微信现金红包',
          value: '3'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: ' 奖品数量：',
        key: 'prizeNum',
        value: 5,
        required: true,
        type: 'NumberPicker',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        inputLabel: ''
      }, {
        label: '兑奖方式：',
        key: 'prizeImg',
        value: '',
        required: true,
        type: 'Radio',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        radioData: [{
          label: '跳转兑换页面领取',
          value: 1
        }, {
          label: '直接发放',
          value: 2
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '兑换地址：',
        key: 'prizeUrl',
        value: '',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        inputLabel: 'http：//'
      }, {
        label: '操作提示：',
        key: 'Note',
        value: '',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '兑奖须知：',
        key: 'changePrize',
        value: '请中奖用户于2021年12月31日-2022年3月31日期间到官方小程序活动页面领取奖品，未按规定时间领取均视为自动放弃。',
        required: true,
        type: 'TextArea',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '奖项等级：',
        key: 'prizeLevel',
        value: '特等奖',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        noteNode: /*#__PURE__*/React.createElement("div", {
          className: "error-note"
        }, /*#__PURE__*/React.createElement(_icon["default"], {
          type: "prompt",
          size: "xs"
        }), " \u5F53\u524D\u7EA2\u5305\u4F59\u989D\u4E0D\u8DB310\u5143\uFF0C\u5F53\u524D0\u5143", /*#__PURE__*/React.createElement("span", {
          className: "link-style"
        }, "\u524D\u5F80\u5145\u503C"))
      }, {
        label: '奖项名称：',
        key: 'prizeName',
        value: '七天vip',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖项图片：',
        key: 'prizeImg',
        value: '//img.maimairen.com/low-code/components/prize-list001/day15.png',
        required: true,
        type: 'Upload',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖项类型：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        radioData: [{
          label: '实物礼品',
          value: '1'
        }, {
          label: '虚拟礼品',
          value: '2'
        }, {
          label: '微信现金红包',
          value: '3'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: ' 奖品数量：',
        key: 'prizeNum',
        value: 5,
        required: true,
        type: 'NumberPicker',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        inputLabel: ''
      }, {
        label: '兑奖方式：',
        key: 'prizeImg',
        value: '',
        required: true,
        type: 'Radio',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        radioData: [{
          label: '跳转兑换页面领取',
          value: 1
        }, {
          label: '直接发放',
          value: 2
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '兑换地址：',
        key: 'prizeUrl',
        value: '',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        inputLabel: 'http：//'
      }, {
        label: '操作提示：',
        key: 'Note',
        value: '',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '兑奖须知：',
        key: 'changePrize',
        value: '请中奖用户于2021年12月31日-2022年3月31日期间到官方小程序活动页面领取奖品，未按规定时间领取均视为自动放弃。',
        required: true,
        type: 'TextArea',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '奖项等级：',
        key: 'prizeLevel',
        value: '特等奖',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        noteNode: /*#__PURE__*/React.createElement("div", {
          className: "error-note"
        }, /*#__PURE__*/React.createElement(_icon["default"], {
          type: "prompt",
          size: "xs"
        }), " \u5F53\u524D\u7EA2\u5305\u4F59\u989D\u4E0D\u8DB310\u5143\uFF0C\u5F53\u524D0\u5143", /*#__PURE__*/React.createElement("span", {
          className: "link-style"
        }, "\u524D\u5F80\u5145\u503C"))
      }, {
        label: '奖项名称：',
        key: 'prizeName',
        value: '七天vip',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖项图片：',
        key: 'prizeImg',
        value: '//img.maimairen.com/low-code/components/prize-list001/day15.png',
        required: true,
        type: 'Upload',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖项类型：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        radioData: [{
          label: '实物礼品',
          value: '1'
        }, {
          label: '虚拟礼品',
          value: '2'
        }, {
          label: '微信现金红包',
          value: '3'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: ' 奖品数量：',
        key: 'prizeNum',
        value: 5,
        required: true,
        type: 'NumberPicker',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        inputLabel: ''
      }, {
        label: '兑奖方式：',
        key: 'prizeImg',
        value: '',
        required: true,
        type: 'Radio',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        radioData: [{
          label: '跳转兑换页面领取',
          value: 1
        }, {
          label: '直接发放',
          value: 2
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '兑换地址：',
        key: 'prizeUrl',
        value: '',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false,
        inputLabel: 'http：//'
      }, {
        label: '操作提示：',
        key: 'Note',
        value: '',
        required: true,
        type: 'Input',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '兑奖须知：',
        key: 'changePrize',
        value: '请中奖用户于2021年12月31日-2022年3月31日期间到官方小程序活动页面领取奖品，未按规定时间领取均视为自动放弃。',
        required: true,
        type: 'TextArea',
        validator: {
          format: 'custom_format',
          message: '错误'
        },
        isSetting: false,
        vip: false,
        Tooltip: false
      }]]
    }, {
      tab: '中奖页面',
      key: 2,
      formItemLayout: {
        labelCol: {
          span: 4
        },
        wrapperCol: {
          span: 20
        }
      },
      child: [[{
        label: '中奖显示：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        rules: [{
          format: 'custom_format',
          message: '错误'
        }],
        radioData: [{
          label: '默认图片',
          value: '1'
        }, {
          label: '奖项图片',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖品介绍：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'TextArea',
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '中奖显示：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        rules: [{
          format: 'custom_format',
          message: '错误'
        }],
        radioData: [{
          label: '默认图片',
          value: '1'
        }, {
          label: '奖项图片',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖品介绍：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'TextArea',
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '中奖显示：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        rules: [{
          format: 'custom_format',
          message: '错误'
        }],
        radioData: [{
          label: '默认图片',
          value: '1'
        }, {
          label: '奖项图片',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖品介绍：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'TextArea',
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '中奖显示：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        rules: [{
          format: 'custom_format',
          message: '错误'
        }],
        radioData: [{
          label: '默认图片',
          value: '1'
        }, {
          label: '奖项图片',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖品介绍：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'TextArea',
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '中奖显示：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        rules: [{
          format: 'custom_format',
          message: '错误'
        }],
        radioData: [{
          label: '默认图片',
          value: '1'
        }, {
          label: '奖项图片',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖品介绍：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'TextArea',
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '中奖显示：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        rules: [{
          format: 'custom_format',
          message: '错误'
        }],
        radioData: [{
          label: '默认图片',
          value: '1'
        }, {
          label: '奖项图片',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖品介绍：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'TextArea',
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '中奖显示：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        rules: [{
          format: 'custom_format',
          message: '错误'
        }],
        radioData: [{
          label: '默认图片',
          value: '1'
        }, {
          label: '奖项图片',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖品介绍：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'TextArea',
        isSetting: false,
        vip: false,
        Tooltip: false
      }]]
    }, {
      tab: '未中奖页',
      key: 3,
      formItemLayout: {
        labelCol: {
          span: 4
        },
        wrapperCol: {
          span: 20
        }
      },
      child: [[{
        label: '中奖显示：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        rules: [{
          format: 'custom_format',
          message: '错误'
        }],
        radioData: [{
          label: '默认图片',
          value: '1'
        }, {
          label: '奖项图片',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖品介绍：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'TextArea',
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '中奖显示：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        rules: [{
          format: 'custom_format',
          message: '错误'
        }],
        radioData: [{
          label: '默认图片',
          value: '1'
        }, {
          label: '奖项图片',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖品介绍：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'TextArea',
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '中奖显示：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        rules: [{
          format: 'custom_format',
          message: '错误'
        }],
        radioData: [{
          label: '默认图片',
          value: '1'
        }, {
          label: '奖项图片',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖品介绍：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'TextArea',
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '中奖显示：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        rules: [{
          format: 'custom_format',
          message: '错误'
        }],
        radioData: [{
          label: '默认图片',
          value: '1'
        }, {
          label: '奖项图片',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖品介绍：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'TextArea',
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '中奖显示：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        rules: [{
          format: 'custom_format',
          message: '错误'
        }],
        radioData: [{
          label: '默认图片',
          value: '1'
        }, {
          label: '奖项图片',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖品介绍：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'TextArea',
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '中奖显示：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        rules: [{
          format: 'custom_format',
          message: '错误'
        }],
        radioData: [{
          label: '默认图片',
          value: '1'
        }, {
          label: '奖项图片',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖品介绍：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'TextArea',
        isSetting: false,
        vip: false,
        Tooltip: false
      }], [{
        label: '中奖显示：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        rules: [{
          format: 'custom_format',
          message: '错误'
        }],
        radioData: [{
          label: '默认图片',
          value: '1'
        }, {
          label: '奖项图片',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '奖品介绍：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'TextArea',
        isSetting: false,
        vip: false,
        Tooltip: false
      }]]
    }, {
      tab: '中奖信息',
      key: 4,
      formItemLayout: {
        labelCol: {
          span: 4
        },
        wrapperCol: {
          span: 20
        }
      },
      data: [{
        label: '选择类型：',
        key: 'prizeImg',
        value: '1',
        required: true,
        type: 'Radio',
        radioData: [{
          label: '参与前填写',
          value: '1'
        }, {
          label: '中奖后填写',
          value: '2'
        }],
        isSetting: false,
        vip: false,
        Tooltip: false
      }, {
        label: '需填信息：',
        key: 'prizeImg',
        value: ['CheckBox0'],
        required: true,
        type: 'CheckBox',
        dataSource: [{
          value: 'CheckBox0',
          label: '姓名',
          disabled: false
        }, {
          value: 'CheckBox1',
          label: '电话'
        }, {
          value: 'CheckBox2',
          label: '地址'
        }]
      }]
    }];
    var getCompent = function getCompent(e) {
      switch (e.type) {
        case 'Input':
          return /*#__PURE__*/React.createElement("section", {
            className: "width-100"
          }, /*#__PURE__*/React.createElement(_input["default"], {
            name: e.value,
            innerAfter: e.innerAfter,
            label: e.inputLabel,
            htmlType: e.htmlType,
            placeholder: e.placeholder,
            defaultValue: e.value,
            trim: e.trim,
            disabled: e.disabled,
            onChange: function onChange(value) {
              return console.log(value);
            }
          }), e.noteNode);
        case 'Upload':
          return /*#__PURE__*/React.createElement("section", {
            className: "xt-upload"
          }, /*#__PURE__*/React.createElement("div", {
            className: "img-Upload"
          }, /*#__PURE__*/React.createElement("div", {
            className: "img"
          }, /*#__PURE__*/React.createElement("img", {
            src: e.value
          })), /*#__PURE__*/React.createElement("div", {
            className: "upload"
          }, /*#__PURE__*/React.createElement("div", {
            className: "upload-btn"
          }, /*#__PURE__*/React.createElement(_upload["default"], {
            action: "/upload.do",
            autoUpload: false,
            listType: "text",
            data: {
              id: 1
            },
            accept: "image/png,image/jpg,image/gif",
            headers: {
              token: '123'
            }
          }, "\u4E0A\u4F20\u66FF\u6362")), /*#__PURE__*/React.createElement("div", null, "\u4E0A\u4F20\u56FE\u7247\u683C\u5F0F\u652F\u6301jpg\u3001gif\u3001png\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC790KB"))));
        case 'Radio':
          return /*#__PURE__*/React.createElement("section", null, /*#__PURE__*/React.createElement(_radio["default"].Group, null, e.radioData.map(function (item, index) {
            return /*#__PURE__*/React.createElement(_radio["default"], {
              key: item.label + index,
              value: item.value
            }, item.label);
          })), e.warningNoteNode);
        case 'TextArea':
          return /*#__PURE__*/React.createElement("section", {
            className: "width-100"
          }, /*#__PURE__*/React.createElement(_input["default"].TextArea, {
            placeholder: e.placeholder,
            autoHeight: {
              minRows: 3
            },
            "aria-label": "auto height"
          }));
        case 'NumberPicker':
          return /*#__PURE__*/React.createElement("section", {
            className: "new-NumberPicker"
          }, /*#__PURE__*/React.createElement(_numberPicker["default"], {
            hasTrigger: e.hasTrigger || false,
            defaultValue: e.value || 0
          }));
        case 'Switch':
          return /*#__PURE__*/React.createElement("section", null, /*#__PURE__*/React.createElement(_switch["default"], {
            defaultChecked: true
          }), e.isSetting && e.SettingNode, e.Tooltip && /*#__PURE__*/React.createElement(Tooltip, {
            popupStyle: {
              background: '#FFF',
              padding: '11px 15px',
              border: 'none',
              boxShadow: '0px 5px 44px 0px rgba(61,61,61,0.2)',
              borderRadius: '4px'
            },
            trigger: e.TooltipTrigger,
            align: "br"
          }, e.TooltipText));
        case 'RangePicker':
          return /*#__PURE__*/React.createElement(RangePicker, {
            name: "rangeDate"
          });
        case 'Select':
          return /*#__PURE__*/React.createElement(_select["default"], null, e.selectData.map(function (item) {
            return /*#__PURE__*/React.createElement(Option, {
              value: item.value,
              disabled: item.disabled
            }, item.label);
          }));
        case 'CheckBox':
          return /*#__PURE__*/React.createElement(_checkbox["default"].Group, {
            dataSource: e.dataSource,
            value: e.value
          });
      }
    };
    var detachedContentStyle = {
      padding: '10px'
    };
    var formStyle = {
      style: {
        padding: '18px 32px'
      }
    };
    return /*#__PURE__*/React.createElement("div", {
      className: "activity-form"
    }, /*#__PURE__*/React.createElement(_loading["default"], {
      tip: "\u6B63\u5728\u4FDD\u5B58\u4E2D \xB7 \xB7 \xB7 \xB7 \xB7",
      visible: this.state.visible,
      fullScreen: true
    }), /*#__PURE__*/React.createElement(_tab["default"], {
      shape: "wrapped",
      tabPosition: "left",
      contentClassName: "tab-content"
    }, tabs.map(function (item) {
      return /*#__PURE__*/React.createElement(_tab["default"].Item, {
        key: item.key,
        title: item.tab,
        onClick: _this2.handleClick
      }, /*#__PURE__*/React.createElement("div", {
        className: "tabContent"
      }, /*#__PURE__*/React.createElement("div", {
        className: "form"
      }, item.child && item.child.length > 0 ? /*#__PURE__*/React.createElement("div", {
        className: "prizeForm"
      }, /*#__PURE__*/React.createElement("div", {
        className: "title"
      }, "\u8BBE\u7F6E\u5956\u9879\u7B49\u7EA7\uFF1A"), /*#__PURE__*/React.createElement(_tab["default"], {
        shape: "wrapped",
        excessMode: "dropdown",
        contentStyle: detachedContentStyle
      }, item.child && item.child.map(function (item2, index2) {
        return /*#__PURE__*/React.createElement(_tab["default"].Item, {
          title: "\u5956\u9879" + (index2 + 1),
          key: index2
        }, /*#__PURE__*/React.createElement(_form["default"], null, item2.length > 0 && item2.map(function (e, index) {
          return /*#__PURE__*/React.createElement(FormItem, (0, _extends2["default"])({}, item.formItemLayout, {
            key: e.key + index,
            label: e.label,
            name: e.key,
            rules: e.rules || [],
            required: e.required,
            className: e.vip === true ? 'isVip' : ''
          }), getCompent(e));
        })));
      }))) : /*#__PURE__*/React.createElement(_form["default"], formStyle, item.data && item.data.map(function (e, index) {
        return /*#__PURE__*/React.createElement(FormItem, (0, _extends2["default"])({}, item.formItemLayout, {
          key: e.key + index,
          rules: e.rules || [],
          label: e.label,
          required: e.required,
          className: e.vip === true ? 'isVip' : ''
        }), getCompent(e));
      }))), /*#__PURE__*/React.createElement("div", {
        className: "item-btn"
      }, /*#__PURE__*/React.createElement(_button["default"], {
        type: "primary",
        onClick: _this2.handleSubmit
      }, /*#__PURE__*/React.createElement(_icon["default"], {
        type: "detail",
        size: "xxl"
      }), "\u4FDD\u5B58"))));
    })));
  };
  return ActivityForm;
}(React.Component);
exports["default"] = ActivityForm;
ActivityForm.displayName = 'ActivityForm';