"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = Rules;
var _react = _interopRequireDefault(require("react"));
var _vmNodata = _interopRequireDefault(require("../../../vm-nodata"));
var _vmSubTitle = _interopRequireDefault(require("../../../vm-sub-title"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
 * 收集点-总览信息-收运规则
 */

function Rules(props) {
  var rules = props.rules;
  var getImgCode = function getImgCode(name) {
    var code = 'ss';
    switch (name) {
      case '洒水':
        code = 'ss';
        break;
      case '机扫':
        code = 'js';
        break;
      case '洗扫':
        code = 'xs';
        break;
      case '雾炮':
        code = 'wp';
        break;
      default:
        code = 'ss';
        break;
    }
    return code;
  };
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "workRules"
  }, /*#__PURE__*/_react["default"].createElement(_vmSubTitle["default"], {
    title: "\u4F5C\u4E1A\u89C4\u5219"
  }), Array.isArray(rules) ? rules.filter(function (item) {
    return item.beenLaunch;
  }).map(function (ele, index) {
    return /*#__PURE__*/_react["default"].createElement("div", {
      className: "workRules-item",
      key: index
    }, /*#__PURE__*/_react["default"].createElement("div", {
      className: "workRules-item--name  ".concat(getImgCode((ele === null || ele === void 0 ? void 0 : ele.workTypeName) || ''))
    }, (ele === null || ele === void 0 ? void 0 : ele.workTypeName) || '--'), /*#__PURE__*/_react["default"].createElement("div", {
      className: "workRules-item--content"
    }, /*#__PURE__*/_react["default"].createElement("span", null, "\u4F5C\u4E1A\u8D9F\u6570\uFF1A"), (ele === null || ele === void 0 ? void 0 : ele.workCount) || '--'), /*#__PURE__*/_react["default"].createElement("div", {
      className: "workRules-item--content"
    }, /*#__PURE__*/_react["default"].createElement("span", null, "\u4F5C\u4E1A\u65F6\u6BB5\uFF1A"), "".concat(ele === null || ele === void 0 ? void 0 : ele.workStartTime, "-").concat(ele === null || ele === void 0 ? void 0 : ele.workEndTime)));
  }) : (/*#__PURE__*/_react["default"].createElement(_vmNodata["default"], null)));
}
//# sourceMappingURL=Rules.js.map
