"use strict";

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.MyAnchor = void 0;
exports["default"] = _default;
var _react = _interopRequireWildcard(require("react"));
var _FormModal = _interopRequireDefault(require("../../../../FormModal"));
var _config = _interopRequireDefault(require("../../../../../_mapUtil/config"));
var _config2 = _interopRequireDefault(require("../../config"));
var _service = _interopRequireDefault(require("../../service"));
var _PublicService = _interopRequireDefault(require("../../../../../_mapUtil/PublicService"));
var _request = _interopRequireDefault(require("../../../../../_mapUtil/request"));
var _message = _interopRequireDefault(require("antd/lib/message"));
var _button = _interopRequireDefault(require("antd/lib/button"));
var _index = _interopRequireDefault(require("./index.less"));
var _lodash = _interopRequireDefault(require("lodash"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } /**
 * 创建工单
 */
var processParams = _config2["default"].processParams,
  getAddModalValue = _config2["default"].getAddModalValue,
  getDetailsModalValue = _config2["default"].getDetailsModalValue,
  getImportModalValue = _config2["default"].getImportModalValue,
  getSelectShow = _config2["default"].getSelectShow,
  getTreeSelectShow = _config2["default"].getTreeSelectShow;
var getSourceData = _service["default"].getSourceData,
  getSourceSmallData = _service["default"].getSourceSmallData,
  getOrderNatureData = _service["default"].getOrderNatureData,
  getOrderCategoryData = _service["default"].getOrderCategoryData,
  getOrderAddress = _service["default"].getOrderAddress,
  getOrderTypeData = _service["default"].getOrderTypeData;
var MyAnchor = exports.MyAnchor = function MyAnchor(_ref) {
  var title = _ref.title,
    href = _ref.href;
  return /*#__PURE__*/_react["default"].createElement("div", {
    id: href
  }, title);
};
function _default(props) {
  var goBack = props.goBack,
    modalType = props.modalType,
    _props$modal = props.modal,
    modal = _props$modal === void 0 ? {} : _props$modal,
    _props$detailsVal = props.detailsVal,
    detailsVal = _props$detailsVal === void 0 ? {} : _props$detailsVal,
    caseSource = props.caseSource,
    _props$column = props.column,
    column = _props$column === void 0 ? 3 : _props$column,
    isProcess = props.isProcess,
    _props$title = props.title,
    title = _props$title === void 0 ? '工单' : _props$title,
    importData = props.importData;
  var paramsItems = (processParams === null || processParams === void 0 ? void 0 : processParams[modalType]) || {};
  var myForm = (0, _react.useRef)();
  // 下拉选数据
  var _useState = (0, _react.useState)([]),
    _useState2 = _slicedToArray(_useState, 2),
    sourceData = _useState2[0],
    setSourceData = _useState2[1]; // 工单来源
  var _useState3 = (0, _react.useState)('01'),
    _useState4 = _slicedToArray(_useState3, 2),
    sourceValue = _useState4[0],
    setSourceValue = _useState4[1]; // 来源值
  var _useState5 = (0, _react.useState)([]),
    _useState6 = _slicedToArray(_useState5, 2),
    sourceSmallData = _useState6[0],
    setSourceSmallData = _useState6[1]; // 工单来源小类
  var _useState7 = (0, _react.useState)([]),
    _useState8 = _slicedToArray(_useState7, 2),
    orderNatureData = _useState8[0],
    setOrderNatureData = _useState8[1]; // 工单性质
  var _useState9 = (0, _react.useState)([]),
    _useState10 = _slicedToArray(_useState9, 2),
    orderCategoryData = _useState10[0],
    setOrderCategoryData = _useState10[1]; // 工单类别
  var _useState11 = (0, _react.useState)([]),
    _useState12 = _slicedToArray(_useState11, 2),
    keyAreaData = _useState12[0],
    setKeyAreaData = _useState12[1]; // 事发区域
  var _useState13 = (0, _react.useState)([]),
    _useState14 = _slicedToArray(_useState13, 2),
    streetData = _useState14[0],
    setStreetData = _useState14[1]; // 所属街道
  var _useState15 = (0, _react.useState)([]),
    _useState16 = _slicedToArray(_useState15, 2),
    communityData = _useState16[0],
    setCommunityData = _useState16[1]; // 所属社区
  // 新增表单参数
  var _useState17 = (0, _react.useState)(false),
    _useState18 = _slicedToArray(_useState17, 2),
    modalLoading = _useState18[0],
    setModalLoading = _useState18[1];
  var _useState19 = (0, _react.useState)(false),
    _useState20 = _slicedToArray(_useState19, 2),
    modalBtnLoading = _useState20[0],
    setModalBtnLoading = _useState20[1];
  var _useState21 = (0, _react.useState)({}),
    _useState22 = _slicedToArray(_useState21, 2),
    formData = _useState22[0],
    setFormData = _useState22[1]; // 弹框详情
  var _useState23 = (0, _react.useState)([]),
    _useState24 = _slicedToArray(_useState23, 2),
    orderTypeData = _useState24[0],
    setOrderTypeData = _useState24[1]; // 工单类型
  var _useState25 = (0, _react.useState)(false),
    _useState26 = _slicedToArray(_useState25, 2),
    isSupervise = _useState26[0],
    setIsSupervise = _useState26[1]; // 是否介入督办

  (0, _react.useEffect)(function () {
    if (modalType !== 'Import') {
      getSourceSelect();
      getOrderTypeSelect();
      getOrderNatureSelect();
      getOrderCategorySelect();
      getOrderAddressSelect({
        levelEnd: 3
      }, function (data) {
        setKeyAreaData(data);
      }); // 事发区域
    }
    // getOrderAddressSelect({ levelEnd: 4 }, data => setStreetData(data)); // 所属街道
    // getOrderAddressSelect({ levelEnd: 5 }, data => setCommunityData(data)); // 所属社区
  }, []);

  // 整理详情信息
  (0, _react.useEffect)(function () {
    if (detailsVal) {
      handleDetails();
      getSourceSelect();
      getOrderNatureSelect();
      getOrderCategorySelect();
      getOrderTypeSelect();
      getOrderAddressSelect({
        levelEnd: 3
      }, function (data) {
        setKeyAreaData(data);
        getTreeSelectShow({
          options: data,
          value: 'hzDistrictDivisionId',
          label: '事发区域',
          modalType: 'Import',
          myForm: myForm,
          detailsVal: detailsVal
        });
      }); // 事发区域
    }
  }, [detailsVal]);

  // 整理详情展示信息
  var handleDetails = function handleDetails() {
    var formItems = getItems() || [];
    if (caseSource && modalType === 'Details') {
      // 详情
      if (title === '工单') {
        setSourceValue(caseSource); // 详情更改工单类型
      }
      var modalVal = getDetailsModalValue({
        formItems: formItems,
        formValue: detailsVal
      }) || {};
      setFormData(modalVal);
    } else if (modalType === 'Import') {
      // 12345 导入
      setSourceValue('01'); // 详情更改工单类型
      var _modalVal = getImportModalValue({
        formItems: formItems,
        formValue: detailsVal
      }) || {};
      setFormData(_objectSpread(_objectSpread({}, _modalVal), {}, {
        caseSource: '01'
      }));
    }
  };

  // 工单类别
  var getOrderTypeSelect = function getOrderTypeSelect() {
    getOrderTypeData().then(function (res) {
      var list = [];
      if (String(res === null || res === void 0 ? void 0 : res.result) === '0' && res !== null && res !== void 0 && res.data) {
        list = res.data.map(function (v) {
          return _objectSpread(_objectSpread({}, v), {}, {
            label: v.parmName,
            value: String(v.parmCode)
          });
        });
      }
      setOrderTypeData(list);
      getSelectShow({
        options: list,
        value: 'classType',
        label: '诉求类型',
        modalType: 'Import',
        myForm: myForm,
        detailsVal: detailsVal
      });
    });
  };

  // 工单来源
  var getSourceSelect = function getSourceSelect() {
    getSourceData().then(function (res) {
      var list = [];
      if (String(res === null || res === void 0 ? void 0 : res.result) === '0' && res !== null && res !== void 0 && res.data) {
        list = _PublicService["default"].transformOptions({
          data: (res === null || res === void 0 ? void 0 : res.data) || [],
          valueIndex: 'code',
          labelIndex: 'name',
          paramsAll: true
        });
      }
      setSourceData(list);
      if (modalType === 'Import') {
        getSourceSmallSelect('01', list); // 获取工单来源小类
      }
    });
  };

  // 工单来源小类
  var getSourceSmallSelect = function getSourceSmallSelect(code, data) {
    var _sourceData = data || sourceData;
    var currentInfo = _sourceData.find(function (val) {
      return (val === null || val === void 0 ? void 0 : val.code) === code;
    }) || {};
    // parentId
    getSourceSmallData({
      parentId: currentInfo === null || currentInfo === void 0 ? void 0 : currentInfo.id
    }).then(function (res) {
      var list = [];
      if (String(res === null || res === void 0 ? void 0 : res.result) === '0' && res !== null && res !== void 0 && res.data) {
        list = _PublicService["default"].transformOptions({
          data: (res === null || res === void 0 ? void 0 : res.data) || [],
          valueIndex: 'code',
          labelIndex: 'name',
          paramsAll: true
        });
      }
      setSourceSmallData(list);
      getSelectShow({
        options: list,
        value: 'caseSourceSub',
        label: '工单来源小类',
        modalType: 'Import',
        myForm: myForm,
        detailsVal: detailsVal
      });
    });
  };

  // 工单性质
  var getOrderNatureSelect = function getOrderNatureSelect() {
    getOrderNatureData().then(function (res) {
      var list = [];
      if (String(res === null || res === void 0 ? void 0 : res.result) === '0' && res !== null && res !== void 0 && res.data) {
        list = _PublicService["default"].transformOptions({
          data: (res === null || res === void 0 ? void 0 : res.data) || [],
          valueIndex: 'id',
          labelIndex: 'level',
          paramsAll: true
        });
      }
      setOrderNatureData(list);
      getSelectShow({
        options: list,
        value: 'urgencyLevelId',
        label: '诉求性质',
        modalType: 'Import',
        myForm: myForm,
        detailsVal: detailsVal
      });
    });
  };

  //递归
  var renderTree = function renderTree(data) {
    data.label = data === null || data === void 0 ? void 0 : data.name;
    data.title = data === null || data === void 0 ? void 0 : data.name;
    data.value = data === null || data === void 0 ? void 0 : data.key;
    if (['root', 'type'].includes(data === null || data === void 0 ? void 0 : data.type)) {
      data.disabled = true;
    }
    if (data.children && data.children.length) {
      data.disabled = true;
      data.children.map(function (val) {
        renderTree(val);
      });
    }
    return data;
  };

  // 工单类别
  var getOrderCategorySelect = function getOrderCategorySelect() {
    getOrderCategoryData({}).then(function (res) {
      var list = [];
      if (String(res === null || res === void 0 ? void 0 : res.result) === '0' && res !== null && res !== void 0 && res.data) {
        list = [res === null || res === void 0 ? void 0 : res.data] || [];
        list && list.length && list.map(function (item) {
          renderTree(item);
        });
      }
      setOrderCategoryData(list);
      getTreeSelectShow({
        options: list,
        value: 'eventAndComponentManageId',
        label: '工单类别',
        modalType: 'Import',
        myForm: myForm,
        detailsVal: detailsVal
      });
    });
  };

  // 获取事发区域、所属街道、所属社区
  var getOrderAddressSelect = function getOrderAddressSelect() {
    var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    var callBack = arguments.length > 1 ? arguments[1] : undefined;
    getOrderAddress(params).then(function (res) {
      var list = [];
      if (String(res === null || res === void 0 ? void 0 : res.result) === '0' && res !== null && res !== void 0 && res.data) {
        list = [res === null || res === void 0 ? void 0 : res.data] || [];
        list && list.length && list.map(function (item) {
          renderTree(item);
        });
      }
      callBack && callBack(list);
    });
  };

  // 更改工单来源
  var handleSource = function handleSource(value) {
    setSourceValue(value);
    getSourceSmallSelect(value);
    clearFormData({
      hzDistrictDivisionId: undefined,
      hzStreetDivisionId: undefined,
      hzCommunityDivisionId: undefined,
      caseSourceSub: undefined
    });
  };

  // 表单联动清空数据
  var clearFormData = function clearFormData() {
    var _myForm$current;
    var formParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    (myForm === null || myForm === void 0 || (_myForm$current = myForm.current) === null || _myForm$current === void 0 || (_myForm$current = _myForm$current.form) === null || _myForm$current === void 0 ? void 0 : _myForm$current.setFieldsValue) && myForm.current.form.setFieldsValue(formParams);
  };
  var getCurrentData = function getCurrentData() {
    var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
    var value = arguments.length > 1 ? arguments[1] : undefined;
    var list = [];
    var getData = function getData(item) {
      if (item.key === value) {
        list = (item === null || item === void 0 ? void 0 : item.children) || [];
      } else if (item !== null && item !== void 0 && item.children && item !== null && item !== void 0 && item.children.length) {
        item === null || item === void 0 || item.children.map(function (val) {
          getData(val);
        });
      }
      return list;
    };
    data && data.length && data.map(function (item) {
      getData(item);
    });
    return list;
  };

  // 更改事发区域
  var handleKeyAreaData = function handleKeyAreaData(value) {
    getOrderAddressSelect({
      levelEnd: 4
    }, function (data) {
      var list = getCurrentData(data, value);
      list = _PublicService["default"].transformOptions({
        data: list || [],
        valueIndex: 'key',
        labelIndex: 'name',
        paramsAll: true
      });
      setStreetData(list);
      clearFormData({
        hzStreetDivisionId: undefined,
        hzCommunityDivisionId: undefined
      });
    });
  };

  // 更改所属街道
  var handleStreetData = function handleStreetData(value) {
    getOrderAddressSelect({
      levelEnd: 5
    }, function (data) {
      var list = getCurrentData(data, value);
      list = _PublicService["default"].transformOptions({
        data: list || [],
        valueIndex: 'key',
        labelIndex: 'name',
        paramsAll: true
      });
      setCommunityData(list);
      clearFormData({
        hzCommunityDivisionId: undefined
      });
    });
  };

  // 是否介入督办
  var handleSupervises = function handleSupervises(e) {
    var _e$target;
    setIsSupervise(e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
    clearFormData({
      platformSupervisesDescription: undefined,
      platformSupervisesSuggestion: undefined
    });
  };
  function onSave() {
    var _myForm$current2;
    (myForm === null || myForm === void 0 || (_myForm$current2 = myForm.current) === null || _myForm$current2 === void 0 || (_myForm$current2 = _myForm$current2.form) === null || _myForm$current2 === void 0 ? void 0 : _myForm$current2.validateFields) && myForm.current.form.validateFields().then(function (val) {
      var _val, _val2;
      // let val = myForm?.current?.form?.getFieldsValue() || {};
      val.processDefinitionKey = 'customer_service_process';
      if ((_val = val) !== null && _val !== void 0 && _val.location && ((_val2 = val) === null || _val2 === void 0 ? void 0 : _val2.location) !== 'undefined,undefined') {
        var _val3, _val4;
        val.geoLocationDTO = {
          shapeType: 'point',
          coordinateType: 'wgs84',
          lngLats: (_val3 = val) === null || _val3 === void 0 ? void 0 : _val3.location
        };
        (_val4 = val) === null || _val4 === void 0 || delete _val4.location;
      } else {
        return _message["default"].warning('请去事发位置打点！', 2);
      }

      // 获取下拉选数据中对应的值
      var formItems = getItems() || [];
      val = getAddModalValue({
        formItems: formItems,
        formValue: val
      });
      var url = (paramsItems === null || paramsItems === void 0 ? void 0 : paramsItems.orderUrl) || '';
      if (url) {
        setModalBtnLoading(true);
        _request["default"].post(url, {
          body: val,
          headers: {
            ticket: true
          }
        }).then(function (res) {
          if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
            _message["default"].success('操作成功');
            onCancel();
          }
          setModalBtnLoading(false);
        });
      }
    });
  }

  // 关闭弹框
  var onCancel = function onCancel() {
    goBack && goBack();
  };
  var getDetailsForm = function getDetailsForm() {
    var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
    var formItems = _lodash["default"].cloneDeep(items);
    formItems.map(function (item) {
      var _item$items;
      if (item !== null && item !== void 0 && (_item$items = item.items) !== null && _item$items !== void 0 && _item$items.length) {
        item === null || item === void 0 || item.items.map(function (val) {
          if (['textArea', 'vtxUpload', 'fileUpload'].includes(val === null || val === void 0 ? void 0 : val.type)) {
            val.weights = column;
          } else if (val !== null && val !== void 0 && val.currentWeights) {
            val.weights = column;
          }
        });
      }
    });
    return formItems || [];
  };

  // 批转信息展示
  var getOrderPzInfo = function getOrderPzInfo() {
    var items = [{
      type: 'card',
      label: /*#__PURE__*/_react["default"].createElement(MyAnchor, {
        title: "\u6279\u8F6C\u4FE1\u606F",
        href: "endorseInfo"
      }),
      // label: '批转信息',
      items: [{
        type: 'input',
        label: '批转部门',
        paramName: 'turnDept',
        formItemLayout: {
          rules: [_objectSpread({}, _config["default"].reg.required)]
        }
      }, {
        type: 'datePicker',
        label: '批转时间',
        paramName: 'turnTime',
        itemProps: {
          showTime: {
            format: 'HH:mm'
          },
          format: 'YYYY-MM-DD HH:mm'
        },
        formItemLayout: {
          rules: [_objectSpread({}, _config["default"].reg.required)]
        }
      }, {
        type: 'datePicker',
        label: '截止时间',
        paramName: 'turnLimitTime',
        itemProps: _objectSpread({
          showTime: {
            format: 'HH:mm'
          },
          format: 'YYYY-MM-DD HH:mm'
        }, modalType === 'Import' ? {
          disabled: true
        } : {}),
        formItemLayout: {
          rules: [_objectSpread({}, _config["default"].reg.required)]
        }
      }, {
        type: 'textArea',
        label: '批转意见',
        paramName: 'turnOpinion',
        itemProps: {
          maxLength: 200
        },
        weights: 3
      }]
    }];
    var isHide = false;
    (importData === null || importData === void 0 ? void 0 : importData.length) && importData.map(function (item) {
      var _item$批转信息;
      var keys = Object.keys(item) || [];
      if (keys.includes('批转信息') && item !== null && item !== void 0 && (_item$批转信息 = item['批转信息']) !== null && _item$批转信息 !== void 0 && _item$批转信息.length) {
        isHide = true;
      }
    });
    if (title !== '工单') {
      items = [];
    } else if (title === '工单' && modalType === 'Details' && isHide) {
      // 更新批转信息
      items = [];
    }
    return items;
  };

  // 获取新增工单表单字段
  var getItems = function getItems() {
    var list = {
      '01': [{
        type: 'card',
        label: /*#__PURE__*/_react["default"].createElement(MyAnchor, {
          title: "\u57FA\u672C\u4FE1\u606F",
          href: "basicInfo"
        }),
        // label: '基本信息',
        items: [{
          type: 'select',
          label: "".concat(title, "\u6765\u6E90\u5C0F\u7C7B"),
          paramName: 'caseSource',
          itemProps: _objectSpread({
            options: sourceData,
            onChange: handleSource
          }, modalType === 'Import' ? {
            disabled: true
          } : {}),
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'input',
          label: "".concat(title, "\u7F16\u53F7"),
          exportLabel: ['诉求编号', '诉求编码'],
          paramName: 'taskNo',
          formItemLayout: {
            rules: [_objectSpread(_objectSpread({}, _config["default"].reg.required), _config["default"].reg.code)]
          }
        }, {
          type: 'input',
          label: "".concat(title, "\u540D\u79F0"),
          paramName: 'taskName',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required), _objectSpread({}, _config["default"].reg.lengthMax(40))]
          }
        }, {
          type: 'select',
          label: "".concat(title, "\u7C7B\u578B"),
          exportLabel: '诉求类型',
          paramName: 'classType',
          itemProps: {
            allowClear: true,
            options: orderTypeData
          }
        }, {
          type: 'select',
          label: "".concat(title, "\u6027\u8D28"),
          exportLabel: '诉求性质',
          paramName: 'urgencyLevelId',
          paramNameStr: 'urgencyLevel',
          itemProps: {
            options: orderNatureData
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        },
        // {
        //   type: 'select',
        //   label: `${title}来源小类`,
        //   paramName: 'caseSourceSub',
        //   itemProps: {
        //     options: sourceSmallData,
        //     ...(modalType === 'Import' ? {} : { showInitialValue: formData?.caseSourceSubStr }),
        //   },
        //   formItemLayout: {
        //     rules: [{ ...config.reg.required }],
        //   },
        // },
        {
          type: 'textArea',
          label: "".concat(title, "\u63CF\u8FF0"),
          paramName: 'caseDesc',
          exportLabel: '诉求内容',
          itemProps: {
            maxLength: 500
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          },
          weights: 3
        }, {
          type: 'treeSelect',
          label: "".concat(title, "\u7C7B\u522B"),
          paramName: 'eventAndComponentManageId',
          itemProps: {
            treeData: orderCategoryData,
            treeDefaultExpandAll: true
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'treeSelect',
          label: '事发区域',
          paramName: 'hzDistrictDivisionId',
          paramNameStr: 'hzDistrictDivisionName',
          handleValue: '市',
          itemProps: {
            treeData: keyAreaData,
            treeDefaultExpandAll: true
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }].concat(_toConsumableArray(modalType !== 'Details' ? [{
          type: 'mapLocation',
          label: '事发位置',
          showType: 'button',
          buttonLabel: '去地图',
          paramName: 'location',
          showAddress: 'address',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }] : []), [{
          type: 'input',
          label: '事发地址',
          paramName: 'address',
          currentWeights: true,
          itemProps: {
            placeholder: '',
            disabled: true
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'textArea',
          label: '备注',
          exportLabel: '补充备注',
          paramName: 'remark',
          itemProps: {
            maxLength: 200
          },
          weights: 3
        }, {
          type: 'vtxUpload',
          label: '照片',
          paramName: 'photo',
          formItemLayout: {
            initialValue: formData.photo || []
          },
          weights: 3,
          itemProps: {
            maxLength: 6,
            maxSize: 100 * 1024 * 1024,
            accept: '.jpg, .jpeg, .png'
          }
        }, {
          type: 'fileUpload',
          label: '附件',
          paramName: 'attach',
          weights: 3,
          fileView: true,
          formItemLayout: {
            initialValue: formData.attach || []
          },
          itemProps: {
            maxLength: 5,
            maxSize: 50 * 1024 * 1024,
            type: ['doc', 'docx', 'pdf', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'zip', 'rar', 'mp3', 'mp4'],
            accept: ['.doc', '.docx', '.pdf', '.xls', '.xlsx', '.ppt', '.pptx', '.txt', '.zip', '.rar', '.mp3', '.mp4']
          }
        }])
      }].concat(_toConsumableArray(title === '工单' ? [{
        type: 'card',
        label: /*#__PURE__*/_react["default"].createElement(MyAnchor, {
          title: "\u8BC9\u6C42\u4FE1\u606F",
          href: "appealInfo"
        }),
        // label: '诉求信息',
        items: [{
          type: 'input',
          label: '诉求人姓名',
          paramName: 'movantName',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required), _objectSpread({}, _config["default"].reg.lengthMax(10))]
          }
        }, {
          type: 'select',
          label: '性别',
          paramName: 'movantGender',
          itemProps: {
            allowClear: true,
            options: [{
              label: '男',
              value: '男'
            }, {
              label: '女',
              value: '女'
            }]
          }
        }, {
          type: 'input',
          label: '诉求人地址',
          paramName: 'movantAddress',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.lengthMax(100))]
          }
        }, {
          type: 'textArea',
          label: '虚拟号码',
          paramName: 'movantVirtualNum',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          },
          itemProps: {
            maxLength: 100
          },
          weights: 3
        }]
      }] : []), _toConsumableArray(getOrderPzInfo() || []), _toConsumableArray(title === '工单' ? [{
        type: 'card',
        label: /*#__PURE__*/_react["default"].createElement(MyAnchor, {
          title: "\u5E73\u53F0\u7763\u529E\u4FE1\u606F",
          href: "superviseInfo"
        }),
        // label: '平台督办信息',
        items: [{
          type: 'radio',
          label: '是否介入平台督办',
          paramName: 'beenPlatformSupervises',
          formItemLayout: {
            initialValue: false,
            rules: [_objectSpread({}, _config["default"].reg.required)]
          },
          itemProps: {
            options: [{
              label: '是',
              value: true
            }, {
              label: '否',
              value: false
            }],
            onChange: handleSupervises
          }
        }].concat(_toConsumableArray(isSupervise ? [{
          type: 'textArea',
          label: '督办描述',
          paramName: 'platformSupervisesDescription',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          },
          itemProps: {
            maxLength: 200
          },
          weights: 3
        }, {
          type: 'textArea',
          label: '交办意见',
          paramName: 'platformSupervisesSuggestion',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          },
          itemProps: {
            maxLength: 200
          },
          weights: 3
        }] : []))
      }] : [])),
      '02': [{
        type: 'card',
        label: /*#__PURE__*/_react["default"].createElement(MyAnchor, {
          title: "\u57FA\u672C\u4FE1\u606F",
          href: "basicInfo"
        }),
        // label: '基本信息',
        items: [{
          type: 'select',
          label: "".concat(title, "\u6765\u6E90\u5C0F\u7C7B"),
          paramName: 'caseSource',
          itemProps: {
            options: sourceData,
            onChange: handleSource
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'input',
          label: "".concat(title, "\u7F16\u53F7"),
          paramName: 'taskNo',
          formItemLayout: {
            rules: [_objectSpread(_objectSpread({}, _config["default"].reg.required), _config["default"].reg.code)]
          }
        }, {
          type: 'input',
          label: "".concat(title, "\u540D\u79F0"),
          paramName: 'taskName',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required), _objectSpread({}, _config["default"].reg.lengthMax(40))]
          }
        }, {
          type: 'select',
          label: "".concat(title, "\u7C7B\u578B"),
          paramName: 'classType',
          itemProps: {
            allowClear: true,
            options: orderTypeData
          }
        }, {
          type: 'select',
          label: "".concat(title, "\u6027\u8D28"),
          paramName: 'urgencyLevelId',
          paramNameStr: 'urgencyLevel',
          itemProps: {
            options: orderNatureData
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        },
        // {
        //   type: 'select',
        //   label: `${title}来源小类`,
        //   paramName: 'caseSourceSub',
        //   paramName_Name: 'caseSourceSubStr',
        //   itemProps: {
        //     options: sourceSmallData,
        //     showInitialValue: formData?.caseSourceSubStr,
        //   },
        //   formItemLayout: {
        //     rules: [{ ...config.reg.required }],
        //   },
        // },
        {
          type: 'treeSelect',
          label: "".concat(title, "\u7C7B\u522B"),
          paramName: 'eventAndComponentManageId',
          itemProps: {
            treeData: orderCategoryData,
            treeDefaultExpandAll: true
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'treeSelect',
          label: '事发区域',
          paramName: 'hzDistrictDivisionId',
          paramNameStr: 'hzDistrictDivisionName',
          itemProps: {
            treeData: keyAreaData,
            treeDefaultExpandAll: true,
            onChange: handleKeyAreaData
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          // type: 'treeSelect',
          type: 'select',
          label: '所属街道',
          paramName: 'hzStreetDivisionId',
          paramNameStr: 'hzStreetDivisionName',
          itemProps: {
            // treeData: streetData,
            // treeDefaultExpandAll: true,
            options: streetData,
            onChange: handleStreetData,
            showInitialValue: formData === null || formData === void 0 ? void 0 : formData.hzStreetDivisionName
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          // type: 'treeSelect',
          type: 'select',
          label: '所属社区',
          paramName: 'hzCommunityDivisionId',
          paramNameStr: 'hzCommunityDivisionName',
          itemProps: {
            // treeData: communityData,
            // treeDefaultExpandAll: true,
            options: communityData,
            showInitialValue: formData === null || formData === void 0 ? void 0 : formData.hzCommunityDivisionName
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }].concat(_toConsumableArray(modalType !== 'Details' ? [{
          type: 'mapLocation',
          label: '事发位置',
          showType: 'button',
          buttonLabel: '去地图',
          paramName: 'location',
          showAddress: 'address',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }] : []), [{
          type: 'input',
          label: '事发地址',
          paramName: 'address',
          currentWeights: true,
          itemProps: {
            placeholder: '',
            disabled: true
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'textArea',
          label: "".concat(title, "\u63CF\u8FF0"),
          paramName: 'caseDesc',
          itemProps: {
            maxLength: 200
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          },
          weights: 3
        }, {
          type: 'vtxUpload',
          label: '照片',
          paramName: 'photo',
          formItemLayout: {
            initialValue: formData.photo || []
          },
          weights: 3,
          itemProps: {
            maxLength: 6,
            maxSize: 100 * 1024 * 1024,
            accept: '.jpg, .jpeg, .png'
          }
        }, {
          type: 'fileUpload',
          label: '附件',
          paramName: 'attach',
          weights: 3,
          fileView: true,
          formItemLayout: {
            initialValue: formData.attach || []
          },
          itemProps: {
            maxLength: 5,
            maxSize: 50 * 1024 * 1024,
            type: ['doc', 'docx', 'pdf', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'zip', 'rar', 'mp3', 'mp4'],
            accept: ['.doc', '.docx', '.pdf', '.xls', '.xlsx', '.ppt', '.pptx', '.txt', '.zip', '.rar', '.mp3', '.mp4']
          }
        }])
      }],
      '03': [{
        type: 'card',
        label: /*#__PURE__*/_react["default"].createElement(MyAnchor, {
          title: "\u57FA\u672C\u4FE1\u606F",
          href: "basicInfo"
        }),
        // label: '基本信息',
        items: [{
          type: 'select',
          label: "".concat(title, "\u6765\u6E90\u5C0F\u7C7B"),
          paramName: 'caseSource',
          itemProps: {
            options: sourceData,
            onChange: handleSource
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        },
        // {
        //   type: 'input',
        //   label: '工单编号',
        //   paramName: 'code',
        //   formItemLayout: {
        //     rules: [{ ...config.reg.required }],
        //   },
        // },
        {
          type: 'input',
          label: "".concat(title, "\u540D\u79F0"),
          paramName: 'taskName',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required), _objectSpread({}, _config["default"].reg.lengthMax(40))]
          }
        }, {
          type: 'select',
          label: "".concat(title, "\u7C7B\u578B"),
          paramName: 'classType',
          itemProps: {
            allowClear: true,
            options: orderTypeData
          }
        }, {
          type: 'select',
          label: "".concat(title, "\u6027\u8D28"),
          paramName: 'urgencyLevelId',
          paramNameStr: 'urgencyLevel',
          itemProps: {
            options: orderNatureData
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'treeSelect',
          label: "".concat(title, "\u7C7B\u522B"),
          paramName: 'eventAndComponentManageId',
          itemProps: {
            treeData: orderCategoryData,
            treeDefaultExpandAll: true
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'treeSelect',
          label: '事发区域',
          paramName: 'hzDistrictDivisionId',
          paramNameStr: 'hzDistrictDivisionName',
          itemProps: {
            treeData: keyAreaData,
            treeDefaultExpandAll: true,
            onChange: handleKeyAreaData
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          // type: 'treeSelect',
          type: 'select',
          label: '所属街道',
          paramName: 'hzStreetDivisionId',
          paramNameStr: 'hzStreetDivisionName',
          itemProps: {
            // treeData: streetData,
            // treeDefaultExpandAll: true,
            options: streetData,
            onChange: handleStreetData,
            showInitialValue: formData === null || formData === void 0 ? void 0 : formData.hzStreetDivisionName
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          // type: 'treeSelect',
          type: 'select',
          label: '所属社区',
          paramName: 'hzCommunityDivisionId',
          paramNameStr: 'hzCommunityDivisionName',
          itemProps: {
            // treeData: communityData,
            // treeDefaultExpandAll: true,
            options: communityData,
            showInitialValue: formData === null || formData === void 0 ? void 0 : formData.hzCommunityDivisionName
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }].concat(_toConsumableArray(modalType !== 'Details' ? [{
          type: 'mapLocation',
          label: '事发位置',
          showType: 'button',
          buttonLabel: '去地图',
          paramName: 'location',
          showAddress: 'address',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }] : []), [{
          type: 'input',
          label: '事发地址',
          paramName: 'address',
          currentWeights: true,
          itemProps: {
            placeholder: '',
            disabled: true
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'textArea',
          label: "".concat(title, "\u63CF\u8FF0"),
          paramName: 'caseDesc',
          itemProps: {
            maxLength: 200
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          },
          weights: 3
        }, {
          type: 'vtxUpload',
          label: '照片',
          paramName: 'photo',
          formItemLayout: {
            initialValue: formData.photo || []
          },
          weights: 3,
          itemProps: {
            maxLength: 6,
            maxSize: 100 * 1024 * 1024,
            accept: '.jpg, .jpeg, .png'
          }
        }, {
          type: 'fileUpload',
          label: '附件',
          paramName: 'attach',
          weights: 3,
          fileView: true,
          formItemLayout: {
            initialValue: formData.attach || []
          },
          itemProps: {
            maxLength: 5,
            maxSize: 50 * 1024 * 1024,
            type: ['doc', 'docx', 'pdf', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'zip', 'rar', 'mp3', 'mp4'],
            accept: ['.doc', '.docx', '.pdf', '.xls', '.xlsx', '.ppt', '.pptx', '.txt', '.zip', '.rar', '.mp3', '.mp4']
          }
        }])
      }].concat(_toConsumableArray(title === '工单' ? [{
        type: 'card',
        label: /*#__PURE__*/_react["default"].createElement(MyAnchor, {
          title: "\u8BC9\u6C42\u4FE1\u606F",
          href: "appealInfo"
        }),
        // label: '诉求信息',
        items: [{
          type: 'input',
          label: '诉求人电话',
          paramName: 'movantPhone',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required), _objectSpread({}, _config["default"].reg.phone2)]
          }
        }, {
          type: 'input',
          label: '户号',
          paramName: 'householdNum',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'input',
          label: '诉求人姓名',
          paramName: 'movantName',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required), _objectSpread({}, _config["default"].reg.lengthMax(10))]
          }
        }, {
          type: 'input',
          label: '表身号',
          paramName: 'waterMeterNum',
          itemProps: {
            disabled: true
          }
        }, {
          type: 'input',
          label: '用水地址',
          paramName: 'waterAddress',
          itemProps: {
            disabled: true
          }
        }, {
          type: 'input',
          label: '用水状态',
          paramName: 'waterStatus',
          itemProps: {
            disabled: true
          }
        }, {
          type: 'input',
          label: '用户状态',
          paramName: 'userStatus',
          itemProps: {
            disabled: true
          }
        }, {
          type: 'input',
          label: '账户类型',
          paramName: 'accountType',
          itemProps: {
            disabled: true
          }
        }, {
          type: 'input',
          label: '账户余额',
          paramName: 'accountBalance',
          itemProps: {
            disabled: true
          }
        }]
      }] : [])),
      '05': [{
        type: 'card',
        label: /*#__PURE__*/_react["default"].createElement(MyAnchor, {
          title: "\u57FA\u672C\u4FE1\u606F",
          href: "basicInfo"
        }),
        // label: '基本信息',
        items: [{
          type: 'select',
          label: "".concat(title, "\u6765\u6E90\u5C0F\u7C7B"),
          paramName: 'caseSource',
          itemProps: {
            options: sourceData,
            onChange: handleSource
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'input',
          label: "".concat(title, "\u7F16\u53F7"),
          paramName: 'taskNo',
          formItemLayout: {
            rules: [_objectSpread(_objectSpread({}, _config["default"].reg.required), _config["default"].reg.code)]
          }
        }, {
          type: 'input',
          label: "".concat(title, "\u540D\u79F0"),
          paramName: 'taskName',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required), _objectSpread({}, _config["default"].reg.lengthMax(40))]
          }
        }, {
          type: 'select',
          label: "".concat(title, "\u6027\u8D28"),
          paramName: 'urgencyLevelId',
          paramNameStr: 'urgencyLevel',
          itemProps: {
            options: orderNatureData
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'treeSelect',
          label: "".concat(title, "\u7C7B\u522B"),
          paramName: 'eventAndComponentManageId',
          itemProps: {
            treeData: orderCategoryData,
            treeDefaultExpandAll: true
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'input',
          label: "\u4E8B\u53D1\u5BF9\u8C61",
          paramName: 'componentName'
        }, {
          type: 'treeSelect',
          label: '事发区域',
          paramName: 'hzDistrictDivisionId',
          paramNameStr: 'hzDistrictDivisionName',
          itemProps: {
            treeData: keyAreaData,
            treeDefaultExpandAll: true,
            onChange: handleKeyAreaData
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }].concat(_toConsumableArray(modalType !== 'Details' ? [{
          type: 'mapLocation',
          label: '事发位置',
          showType: 'button',
          buttonLabel: '去地图',
          paramName: 'location',
          showAddress: 'address',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }] : []), [{
          type: 'input',
          label: '事发地址',
          paramName: 'address',
          currentWeights: true,
          itemProps: {
            placeholder: '',
            disabled: true
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'textArea',
          label: "".concat(title, "\u63CF\u8FF0"),
          paramName: 'caseDesc',
          itemProps: {
            maxLength: 200
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          },
          weights: 3
        }, {
          type: 'vtxUpload',
          label: '照片',
          paramName: 'photo',
          formItemLayout: {
            initialValue: formData.photo || []
          },
          weights: 3,
          itemProps: {
            maxLength: 6,
            maxSize: 100 * 1024 * 1024,
            accept: '.jpg, .jpeg, .png'
          }
        }, {
          type: 'fileUpload',
          label: '附件',
          paramName: 'attach',
          weights: 3,
          fileView: true,
          formItemLayout: {
            initialValue: formData.attach || []
          },
          itemProps: {
            maxLength: 5,
            maxSize: 50 * 1024 * 1024,
            type: ['doc', 'docx', 'pdf', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'zip', 'rar', 'mp3', 'mp4'],
            accept: ['.doc', '.docx', '.pdf', '.xls', '.xlsx', '.ppt', '.pptx', '.txt', '.zip', '.rar', '.mp3', '.mp4']
          }
        }])
      }],
      '04': [{
        type: 'card',
        label: /*#__PURE__*/_react["default"].createElement(MyAnchor, {
          title: "\u57FA\u672C\u4FE1\u606F",
          href: "basicInfo"
        }),
        // label: '基本信息',
        items: [{
          type: 'select',
          label: "".concat(title, "\u6765\u6E90\u5C0F\u7C7B"),
          paramName: 'caseSource',
          itemProps: {
            options: sourceData,
            onChange: handleSource
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'input',
          label: "".concat(title, "\u7F16\u53F7"),
          paramName: 'taskNo',
          formItemLayout: {
            rules: [_objectSpread(_objectSpread({}, _config["default"].reg.required), _config["default"].reg.code)]
          }
        }, {
          type: 'input',
          label: "".concat(title, "\u540D\u79F0"),
          paramName: 'taskName',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required), _objectSpread({}, _config["default"].reg.lengthMax(40))]
          }
        }, {
          type: 'select',
          label: "".concat(title, "\u6027\u8D28"),
          paramName: 'urgencyLevelId',
          paramNameStr: 'urgencyLevel',
          itemProps: {
            options: orderNatureData
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'treeSelect',
          label: "".concat(title, "\u7C7B\u522B"),
          paramName: 'eventAndComponentManageId',
          itemProps: {
            treeData: orderCategoryData,
            treeDefaultExpandAll: true
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'input',
          label: "\u4E8B\u53D1\u5BF9\u8C61",
          paramName: 'componentName'
        }, {
          type: 'treeSelect',
          label: '事发区域',
          paramName: 'hzDistrictDivisionId',
          paramNameStr: 'hzDistrictDivisionName',
          itemProps: {
            treeData: keyAreaData,
            treeDefaultExpandAll: true,
            onChange: handleKeyAreaData
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }].concat(_toConsumableArray(modalType !== 'Details' ? [{
          type: 'mapLocation',
          label: '事发位置',
          showType: 'button',
          buttonLabel: '去地图',
          paramName: 'location',
          showAddress: 'address',
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }] : []), [{
          type: 'input',
          label: '事发地址',
          paramName: 'address',
          currentWeights: true,
          itemProps: {
            placeholder: '',
            disabled: true
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          }
        }, {
          type: 'textArea',
          label: "".concat(title, "\u63CF\u8FF0"),
          paramName: 'caseDesc',
          itemProps: {
            maxLength: 200
          },
          formItemLayout: {
            rules: [_objectSpread({}, _config["default"].reg.required)]
          },
          weights: 3
        }, {
          type: 'vtxUpload',
          label: '照片',
          paramName: 'photo',
          formItemLayout: {
            initialValue: formData.photo || []
          },
          weights: 3,
          itemProps: {
            maxLength: 6,
            maxSize: 100 * 1024 * 1024,
            accept: '.jpg, .jpeg, .png'
          }
        }, {
          type: 'fileUpload',
          label: '附件',
          paramName: 'attach',
          weights: 3,
          fileView: true,
          formItemLayout: {
            initialValue: formData.attach || []
          },
          itemProps: {
            maxLength: 5,
            maxSize: 50 * 1024 * 1024,
            type: ['doc', 'docx', 'pdf', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'zip', 'rar', 'mp3', 'mp4'],
            accept: ['.doc', '.docx', '.pdf', '.xls', '.xlsx', '.ppt', '.pptx', '.txt', '.zip', '.rar', '.mp3', '.mp4']
          }
        }])
      }]
    };
    return (list === null || list === void 0 ? void 0 : list[sourceValue]) || (list === null || list === void 0 ? void 0 : list['04']);
  };
  var currentItems = getItems() || [];
  var items = modalType === 'Details' ? getDetailsForm(currentItems) : currentItems;
  var disabled = modalType === 'Details';
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(_index["default"].createOrderWrap, " ").concat(isProcess && _index["default"].createOrderWrapOther)
  }, /*#__PURE__*/_react["default"].createElement(_FormModal["default"], _extends({
    width: 1200,
    column: column,
    ref: myForm,
    visible: true,
    formData: formData,
    title: "",
    items: items,
    isShowModal: false
    // onConfirm={onSave}
    // onCancel={onCancel}
    ,
    disabled: disabled,
    footerShow: !disabled,
    modalLoading: modalLoading,
    modalBtnLoading: modalBtnLoading,
    formStyle: {
      width: '100%'
    }
    // cancelTitle={'取消'}
  }, modal)), disabled ? null : /*#__PURE__*/_react["default"].createElement("div", {
    className: _index["default"].orderButton
  }, /*#__PURE__*/_react["default"].createElement(_button["default"], {
    onClick: onCancel,
    loading: modalBtnLoading
  }, "\u53D6\u6D88"), /*#__PURE__*/_react["default"].createElement(_button["default"], {
    type: "primary",
    onClick: onSave,
    loading: modalBtnLoading
  }, "\u786E\u5B9A")));
}
//# sourceMappingURL=index.js.map
