"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"), _typeof = require("@babel/runtime/helpers/typeof");

Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.default = void 0;

var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")), _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")), _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")), _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")), _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")), _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")), _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")), _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")), _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")), _react = _interopRequireWildcard(require("react")), _propTypes = _interopRequireDefault(require("prop-types")), _amosAntd = require("amos-antd"), _amosFramework = require("amos-framework"), _rayValidate = require("ray-validate"), _processor = require("../../../../utils/processor"), _urlConsts = require("../../../../consts/urlConsts"), _DeviceEnum = require("./../../common/DeviceEnum"), _DeviceLang = require("./../../common/DeviceLang"), _validate = require("./../../../common/utils/validate");

function _getRequireWildcardCache(e) {
  if ("function" != typeof WeakMap) return null;
  var t = new WeakMap, a = new WeakMap;
  return (_getRequireWildcardCache = function(e) {
    return e ? a : t;
  })(e);
}

function _interopRequireWildcard(e, t) {
  if (!t && e && e.__esModule) return e;
  if (null === e || "object" !== _typeof(e) && "function" != typeof e) return {
    default: e
  };
  var a = _getRequireWildcardCache(t);
  if (a && a.has(e)) return a.get(e);
  var r = {}, l = Object.defineProperty && Object.getOwnPropertyDescriptor;
  for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) {
    var n = l ? Object.getOwnPropertyDescriptor(e, u) : null;
    n && (n.get || n.set) ? Object.defineProperty(r, u, n) : r[u] = e[u];
  }
  return r.default = e, a && a.set(e, r), r;
}

function _createSuper(e) {
  var t = _isNativeReflectConstruct();
  return function() {
    var a, r = (0, _getPrototypeOf2.default)(e);
    if (t) {
      var l = (0, _getPrototypeOf2.default)(this).constructor;
      a = Reflect.construct(r, arguments, l);
    } else a = r.apply(this, arguments);
    return (0, _possibleConstructorReturn2.default)(this, a);
  };
}

function _isNativeReflectConstruct() {
  if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  if (Reflect.construct.sham) return !1;
  if ("function" == typeof Proxy) return !0;
  try {
    return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), 
    !0;
  } catch (e) {
    return !1;
  }
}

var RadioGroup = _amosAntd.Radio.Group, Option = _amosFramework.Select.Option, FormItem = _amosAntd.Form.Item, dataTypeOption = (0, 
_DeviceLang.enums2array)(_DeviceEnum.dataTypeEnum).map((function(e) {
  return _react.default.createElement(Option, {
    key: e.key,
    value: "".concat(e.key)
  }, e.label);
})), classifyOption = (0, _DeviceLang.enums2array)(_DeviceEnum.classifyEnum).map((function(e) {
  return _react.default.createElement(_amosAntd.Radio, {
    key: e.key,
    value: "".concat(e.key)
  }, e.label);
})), formItemLayout = {
  labelCol: {
    xs: {
      span: 24
    },
    sm: {
      span: 5
    }
  },
  wrapperCol: {
    xs: {
      span: 24
    },
    sm: {
      span: 16
    }
  }
}, fieldNames = [ "name", "type", "displayName", "dataType", "unit", "descr", "isRequired" ], AddEditDeviceProperty = function(e) {
  (0, _inherits2.default)(a, e);
  var t = _createSuper(a);
  function a(e) {
    var r;
    return (0, _classCallCheck2.default)(this, a), r = t.call(this, e), (0, _defineProperty2.default)((0, 
    _assertThisInitialized2.default)(r), "onEnumRangeChange", (function(e) {
      r.setState({
        currentenumRange: e.target.value
      });
    })), (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(r), "getDynamicCode", (function() {
      var e = r.props.form, t = e.getFieldProps, a = e.getFieldValue, l = r.props.propertyInfo, u = l.valueStr, n = l.enumRange, d = l.minValue, i = l.maxValue, s = l.precision, o = void 0 === r.state.currentenumRange ? null === n ? "" : n : r.state.currentenumRange, c = a("dataType"), m = a("type"), f = t("defaultAppointedInt", {
        initialValue: u ? parseInt(u) : "",
        rules: [ {
          required: !0,
          message: "常量值不能为空！"
        }, {
          validator: r.checkInt
        } ]
      }), p = t("defaultAppointedFloat", {
        initialValue: u ? parseFloat(u) : "",
        rules: [ {
          required: !0,
          message: "常量值不能为空！"
        }, {
          validator: r.checkFloat
        } ]
      }), _ = t("defaultAppointedString", {
        initialValue: u || "",
        rules: [ {
          required: !0,
          min: 0,
          max: 255,
          message: "最大长度255！"
        } ]
      }), h = t("defaultAppointedBoolean", {
        initialValue: u,
        rules: [ {
          required: !0,
          message: "常量值不能为空！"
        } ]
      }), y = t("defaultAppointedPwd", {
        initialValue: u || "",
        rules: [ {
          required: !0,
          min: 0,
          max: 255,
          message: "最大长度255！"
        } ]
      }), I = t("enumRange", {
        initialValue: o,
        rules: [ {
          required: !0,
          message: "枚举范围不能为空！"
        } ]
      }), v = t("defaultIntValue", {
        initialValue: u ? parseInt(u) : "",
        rules: [ {
          required: !1,
          message: "默认值不能为空！"
        }, {
          validator: r.checkIntExcludeNull
        } ]
      }), b = t("minIntValue", {
        initialValue: d,
        rules: [ {
          validator: r.checkInt
        } ]
      }), E = t("maxIntValue", {
        initialValue: i,
        rules: [ {
          validator: r.checkInt
        } ]
      }), F = t("defaultFloatValue", {
        initialValue: u ? parseFloat(u) : "",
        rules: [ {
          required: !1,
          message: "默认值不能为空！"
        }, {
          validator: r.checkFloatExcludeNull
        } ]
      }), g = t("minFloatValue", {
        initialValue: d,
        rules: [ {
          validator: r.checkFloat
        } ]
      }), x = t("maxFloatValue", {
        initialValue: i,
        rules: [ {
          validator: r.checkFloat
        } ]
      }), k = t("defaultEnumValue", {
        initialValue: u || "",
        rules: [ {
          required: !1,
          message: "默认值不能为空！"
        } ]
      }), q = t("defaultStringValue", {
        initialValue: u || "",
        rules: [ {
          required: !1,
          min: 0,
          max: 255,
          message: "最大长度255！"
        } ]
      }), V = t("defaultPwdValue", {
        initialValue: u || "",
        rules: [ {
          required: !1,
          min: 0,
          max: 255,
          message: "最大长度255！"
        } ]
      }), A = t("defaultBoolean", {
        initialValue: u,
        rules: [ {
          required: !1,
          message: "默认值不能为空！"
        } ]
      }), R = t("precision", {
        initialValue: void 0 === s ? 2 : s,
        rules: []
      }), P = [];
      if ("1" === c) "1" === m ? (P.push(_react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "最小值: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, b, {
        placeholder: "最小值"
      })))), P.push(_react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "最大值: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, E, {
        placeholder: "最大值"
      })))), P.push(_react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "默认值: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, v, {
        placeholder: "默认值"
      }))))) : "2" === m && P.push(_react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "数值: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, f, {
        placeholder: "(数值)最多支持32位整型数据"
      })))); else if ("3" === c) "1" === m ? P.push(_react.default.createElement(FormItem, (0, 
      _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "默认值: "
      }), _react.default.createElement(RadioGroup, A, _react.default.createElement(_amosAntd.Radio, {
        key: "1",
        value: "1"
      }, "true"), _react.default.createElement(_amosAntd.Radio, {
        key: "0",
        value: "0"
      }, "false")))) : "2" === m && P.push(_react.default.createElement(FormItem, (0, 
      _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "值: "
      }), _react.default.createElement(RadioGroup, h, _react.default.createElement(_amosAntd.Radio, {
        key: "1",
        value: "1"
      }, "true"), _react.default.createElement(_amosAntd.Radio, {
        key: "0",
        value: "0"
      }, "false")))); else if ("4" === c) if ("1" === m) {
        P.push(_react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
          hasFeedback: !0,
          label: "枚举范围: "
        }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, I, {
          placeholder: "由中文英文及字符组成，字符之间以一个半角逗号作为间隔",
          onChange: r.onEnumRangeChange
        }))));
        for (var C = o.split(","), D = [], T = 0; T < C.length; T++) {
          var L = C[T];
          "" !== L && D.push(_react.default.createElement(Option, {
            key: T,
            value: "".concat(L)
          }, L));
        }
        P.push(_react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
          hasFeedback: !0,
          label: "默认值: "
        }), _react.default.createElement(_amosFramework.Select, (0, _extends2.default)({
          style: {
            width: "100%",
            height: "32px"
          }
        }, k, {
          placeholder: "请先输入枚举范围"
        }), D)));
      } else "2" === m && P.push(_react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "枚举范围: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, I, {
        placeholder: "由中文英文及字符组成，字符之间以一个半角逗号作为间隔"
      })))); else "5" === c ? "1" === m ? P.push(_react.default.createElement(FormItem, (0, 
      _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "默认值: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, q, {
        placeholder: "默认值"
      })))) : "2" === m && P.push(_react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "默认值: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, _, {
        placeholder: "默认值"
      })))) : "6" === c ? "1" === m ? P.push(_react.default.createElement(FormItem, (0, 
      _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "默认值: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, V, {
        type: "password",
        placeholder: "默认值"
      })))) : "2" === m && P.push(_react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "默认值: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, y, {
        type: "password",
        placeholder: "默认值"
      })))) : "2" === c && ("1" === m ? (P.push(_react.default.createElement(FormItem, (0, 
      _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "精度: "
      }), _react.default.createElement("label", null, "小数点后"), _react.default.createElement(_amosAntd.InputNumber, (0, 
      _extends2.default)({
        min: 0,
        max: 32,
        defaultValue: 0
      }, R)), _react.default.createElement("label", null, "位"))), P.push(_react.default.createElement(FormItem, (0, 
      _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "最小值: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, g, {
        placeholder: "最小值"
      })))), P.push(_react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "最大值: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, x, {
        placeholder: "最大值"
      })))), P.push(_react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "默认值: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, F, {
        placeholder: "默认值"
      }))))) : "2" === m && P.push(_react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "数值: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, p, {
        placeholder: "(数值)最多支持小数点前后32位浮点型数据"
      })))));
      return P;
    })), (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(r), "getDynamicCodeName", (function() {
      var e = r.props.form.getFieldValue, t = e("dataType"), a = e("type"), l = [];
      return "1" === t ? "1" === a ? (l.push("minIntValue"), l.push("maxIntValue"), l.push("defaultIntValue")) : "2" === a && l.push("defaultAppointedInt") : "3" === t ? "1" === a ? l.push("defaultBoolean") : "2" === a && l.push("defaultAppointedBoolean") : "4" === t ? "1" === a ? (l.push("enumRange"), 
      l.push("defaultEnumValue")) : "2" === a && l.push("enumRange") : "5" === t ? "1" === a ? l.push("defaultStringValue") : "2" === a && l.push("defaultAppointedString") : "6" === t ? "1" === a ? l.push("defaultPwdValue") : "2" === a && l.push("defaultAppointedPwd") : "2" === t && ("1" === a ? (l.push("precision"), 
      l.push("minFloatValue"), l.push("maxFloatValue"), l.push("defaultFloatValue")) : "2" === a && l.push("defaultAppointedFloat")), 
      l;
    })), (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(r), "handleSubmit", (function(e) {
      e.preventDefault();
      var t = [].concat(fieldNames, (0, _toConsumableArray2.default)(r.getDynamicCodeName()));
      r.props.form.validateFields(t, {}, (function(e, t) {
        e || (t = (0, _validate.objOfStrPropTrim)(t), r.handleSave(t));
      }));
    })), (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(r), "handleSave", (function(e) {
      var t = 0, a = 0, l = "", u = "", n = 0;
      for (var d in e) e.hasOwnProperty(d) && d.startsWith("min") ? t = e[d] : e.hasOwnProperty(d) && d.startsWith("max") ? a = e[d] : e.hasOwnProperty(d) && d.startsWith("default") ? l = String(e[d]) : e.hasOwnProperty(d) && "enumRange" === d ? u = e[d] : e.hasOwnProperty(d) && "precision" === d && (n = e[d]);
      var i = (new Date).getTime();
      (0, _extends2.default)(e, {
        minValue: t,
        maxValue: a,
        valueStr: l,
        enumRange: u,
        precision: n,
        key: i
      });
      var s = [ {
        key: i,
        name: e.name,
        type: e.type,
        dataType: e.dataType
      } ];
      void 0 === r.props.deviceId ? (r.props.addDeviceProperty(e), r.props.autoCardCalculate(s), 
      r.props.form.resetFields(), r.props.callBack()) : r.saveDeviceProperty(e);
    })), (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(r), "handleCancel", (function(e) {
      r.props.form.resetFields(), r.props.callBack();
    })), (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(r), "saveDeviceProperty", (function(e) {
      var t = r.props, a = t.propertyInfo, l = t.deviceId, u = a ? a.id : void 0;
      (0, _extends2.default)(e, {
        equipmentId: l,
        id: u
      }), _processor.AmosFetch.post(_urlConsts.OltSerUrl.deviceAttributeUpdate, {
        data: e
      }).then((function(e) {
        if (e.ok) return e.json();
        throw new Error("从服务端获取数据失败！");
      })).then((function(e) {
        "SUCCESS" === e.result ? _amosFramework.message.success("新增或编辑属性成功！") : _amosFramework.message.danger("新增或编辑属性失败！"), 
        r.props.getDeviceInfoById(l), r.props.form.resetFields(), r.props.callBack();
      }));
    })), (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(r), "checkInt", (function(e, t, a) {
      if ("" === t || null == t) a(); else if ((0, _rayValidate.isInt)(parseInt(t))) {
        var r = t.toString().length;
        r > 0 && r < 33 ? a() : a("最多支持32位整型数据");
      } else a("最多支持32位整型数据");
    })), (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(r), "checkFloat", (function(e, t, a) {
      if ("" === t || null == t) a(); else if ((0, _rayValidate.isNum)(parseInt(t))) {
        var r = t.toString().length;
        r > 0 && r < 33 ? a() : a("最多支持小数点前后32位浮点型数据");
      } else a("最多支持小数点前后32位浮点型数据");
    })), (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(r), "checkIntExcludeNull", (function(e, t, a) {
      if ("" === t || null == t) a(); else if ((0, _rayValidate.isInt)(parseInt(t))) {
        var r = t.toString().length;
        r > 0 && r < 33 ? a() : a("最多支持32位整型数据");
      } else a("最多支持32位整型数据");
    })), (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(r), "checkFloatExcludeNull", (function(e, t, a) {
      if ("" === t || null == t) a(); else if ((0, _rayValidate.isNum)(parseInt(t))) {
        var r = t.toString().length;
        r > 0 && r < 33 ? a() : a("最多支持小数点前后32位浮点型数据");
      } else a("最多支持小数点前后32位浮点型数据");
    })), r.state = {
      currentenumRange: void 0
    }, r;
  }
  return (0, _createClass2.default)(a, [ {
    key: "componentDidMount",
    value: function() {}
  }, {
    key: "render",
    value: function() {
      var e = this.props.form.getFieldProps, t = this.props.propertyInfo, a = e("name", {
        initialValue: t ? t.name : "",
        rules: [ {
          required: !0,
          min: 1,
          max: 20,
          message: "支持1-20位非空格字符！"
        }, {
          validator: (0, _validate.noSpaceLengthValidate)(20, !0, "属性名不能为空！")
        } ]
      }), r = e("type", {
        initialValue: t ? "".concat(t.type) : 1,
        rules: [ {
          required: !0,
          message: "分类不能为空！"
        } ]
      }), l = e("displayName", {
        initialValue: t ? t.displayName : "",
        rules: [ {
          required: !0,
          min: 1,
          max: 20,
          message: "支持1-20位非空格字符！"
        }, {
          validator: (0, _validate.noSpaceLengthValidate)(20, !0, "显示名称不能为空！")
        } ]
      }), u = e("dataType", {
        initialValue: t ? "".concat(t.dataType) : 1,
        rules: [ {
          required: !0,
          message: "数据类型不能为空！"
        } ]
      }), n = e("unit", {
        initialValue: t ? t.unit : "",
        rules: [ {
          required: !1,
          min: 1,
          max: 20,
          message: "支持1-20位非空格字符！"
        } ]
      }), d = e("descr", {
        initialValue: t ? t.descr : "",
        rules: [ {
          required: !1,
          message: "描述不能为空！"
        } ]
      }), i = e("isRequired", {
        initialValue: !!t && t.isRequired,
        valuePropName: "checked",
        rules: []
      });
      return _react.default.createElement("div", {
        className: "device-property-add-modal"
      }, _react.default.createElement(_amosAntd.Form, {
        horizontal: !0,
        onSubmit: this.handleSubmit
      }, _react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "属性名: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, a, {
        placeholder: "属性名（支持1-20位非空格字符）"
      }))), _react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "分类: "
      }), _react.default.createElement(RadioGroup, r, classifyOption)), _react.default.createElement(FormItem, (0, 
      _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "显示名称: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, l, {
        placeholder: "属性名（支持1-20位非空格字符）"
      }))), _react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "数据类型："
      }), _react.default.createElement(_amosFramework.Select, (0, _extends2.default)({
        style: {
          width: "100%",
          height: "32px"
        }
      }, u), dataTypeOption)), _react.default.createElement("div", null, this.getDynamicCode()), _react.default.createElement(FormItem, (0, 
      _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "单位: "
      }), _react.default.createElement(_amosAntd.Input, (0, _extends2.default)({}, n, {
        placeholder: "单位（支持1-20位非空格字符）"
      }))), _react.default.createElement(FormItem, (0, _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "描述: "
      }), _react.default.createElement(_amosAntd.Input, d)), _react.default.createElement(FormItem, (0, 
      _extends2.default)({}, formItemLayout, {
        hasFeedback: !0,
        label: "是否必填: "
      }), _react.default.createElement(_amosAntd.Checkbox, (0, _extends2.default)({}, i, {
        style: {
          lineHeight: "31px",
          float: "left",
          "margin-left": "7px"
        }
      }))), _react.default.createElement(FormItem, {
        wrapperCol: {
          xs: {
            span: 24,
            offset: 0
          },
          sm: {
            span: 24,
            offset: 0
          }
        }
      }, _react.default.createElement(_amosAntd.Row, null, _react.default.createElement(_amosAntd.Col, {
        span: 3,
        offset: 14
      }, _react.default.createElement(_amosAntd.Button, {
        type: "primary",
        htmlType: "submit"
      }, "提交")), _react.default.createElement(_amosAntd.Col, {
        span: 3,
        offset: 1
      }, _react.default.createElement(_amosAntd.Button, {
        onClick: this.handleCancel
      }, "取消"))))));
    }
  } ]), a;
}(_react.Component);

AddEditDeviceProperty.displayName = "AddEditDeviceProperty", AddEditDeviceProperty.propTypes = {
  form: _propTypes.default.any,
  callBack: _propTypes.default.func,
  addDeviceProperty: _propTypes.default.func,
  autoCardCalculate: _propTypes.default.func,
  deviceId: _propTypes.default.number,
  propertyInfo: _propTypes.default.any,
  getDeviceInfoById: _propTypes.default.func
}, AddEditDeviceProperty.defaultProps = {
  propertyInfo: {
    type: 1,
    dataType: 1,
    enumRange: ""
  }
};

var _default = AddEditDeviceProperty;

exports.default = _default;