"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _MyModal = _interopRequireDefault(require("../../../../MyModal"));
var _vtxModal = _interopRequireDefault(require("@vtx/components/lib/vtx-modal"));
var _getVtxToken = _interopRequireDefault(require("@vtx/utils/lib/getVtxToken"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
 * @returns 临时任务新增
 */

function AddModal(props) {
  var _props$url = props.url,
    url = _props$url === void 0 ? '/zhsw-xcgl-web/#/AddTaskPool' : _props$url,
    _props$modalTitle = props.modalTitle,
    modalTitle = _props$modalTitle === void 0 ? '' : _props$modalTitle,
    _props$titleConfig = props.titleConfig,
    titleConfig = _props$titleConfig === void 0 ? '' : _props$titleConfig,
    _props$onCancel = props.onCancel,
    onCancel = _props$onCancel === void 0 ? function () {} : _props$onCancel,
    _props$objectCode = props.objectCode,
    objectCode = _props$objectCode === void 0 ? '' : _props$objectCode,
    visible = props.visible;
  var tenantId = _getVtxToken["default"].tenantId,
    userId = _getVtxToken["default"].userId,
    token = _getVtxToken["default"].token;
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, url && /*#__PURE__*/_react["default"].createElement(_MyModal["default"], {
    title: /*#__PURE__*/_react["default"].createElement(_vtxModal["default"].Title, {
      text: titleConfig,
      subtitle: modalTitle
    }),
    visible: visible,
    footer: null,
    width: 1200,
    height: 690,
    style: {
      top: '100px'
    },
    cockpit: false,
    onCancel: onCancel,
    isAntd: true
  }, /*#__PURE__*/_react["default"].createElement("div", {
    style: {
      height: '100%',
      minHeight: 552,
      display: 'flex'
    }
  }, /*#__PURE__*/_react["default"].createElement("iframe", {
    src: "".concat(window.location.origin).concat(url, "?dlCode=").concat(objectCode, "&jobClass=XJ&tenantId=").concat(tenantId, "&userId=").concat(userId, "&token=").concat(token, "&access_token=").concat(token),
    width: "100%",
    height: "552",
    frameBorder: "0"
  }))));
}
AddModal.propTypes = {
  modalTitle: _propTypes["default"].string,
  titleConfig: _propTypes["default"].string,
  onCancel: _propTypes["default"].func,
  objectCode: _propTypes["default"].string,
  visible: _propTypes["default"].bool
};
var _default = exports["default"] = AddModal;
//# sourceMappingURL=index.js.map
