You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Equipment__Index__index....

127 lines
6.7 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[27416],{
/***/ 51624:
/*!*********************************************!*\
!*** ./src/pages/Equipment/Index/index.tsx ***!
\*********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less?modules */ 57054);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! umi */ 88271);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var Engineering = function Engineering(_ref) {
var user = _ref.user,
globalSetting = _ref.globalSetting,
engineering = _ref.engineering,
dispatch = _ref.dispatch;
var location = (0,umi__WEBPACK_IMPORTED_MODULE_2__.useLocation)();
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
if (location.pathname == '/equipment') {
umi__WEBPACK_IMPORTED_MODULE_2__.history.replace('/equipment/information');
}
}, [location.pathname]);
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
dispatch({
type: 'globalSetting/footerToggle',
payload: false
});
return function () {
dispatch({
type: 'globalSetting/footerToggle',
payload: true
});
};
}, []);
function getItem(label, key, icon, children, type) {
return {
key: key,
icon: icon,
children: children,
label: label,
type: type
};
}
var items = [getItem('设备信息管理', '/equipment/information', /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("i", {
className: "iconfont icon-shebeixinxiguanli"
})),
// getItem('预约管理', '/equipment/bookingManage', <i className="iconfont icon-shebeibaofei-2"></i>),
getItem('设备在线监控', '/equipment/working', /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("i", {
className: "iconfont icon-shebeiyunhangjiankong"
})), getItem('设备类型管理', '/equipment/maintenance', /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("i", {
className: "iconfont icon-shebeiweixiujilu"
})),
// getItem('设备标签管理', '/equipment/deviceLabel', <i className="iconfont icon-shebeibaofei-2"></i>),
getItem('保养信息管理', '/equipment/faultlibrary', /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("i", {
className: "iconfont icon-shebeibaofei-2"
})), getItem('消息中心', '/equipment/messageCenterManage', /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("i", {
className: "iconfont icon-shebeibaofei-2"
})), getItem('操作日志', '/equipment/actionlog', /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("i", {
className: "iconfont icon-shebeibaofei-2"
}))];
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", {
className: "flex p20 pl30 pr30",
style: {
gap: "20px",
height: "calc(100vh - 82px)"
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
className: "p10 ".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z.MenuStyles, " flex flex-col"),
children: items === null || items === void 0 ? void 0 : items.map(function (item) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", {
className: "flex items-center justify-center current ".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z.MenuStylesItem, " ").concat(location.pathname === (item === null || item === void 0 ? void 0 : item.key) ? _index_less_modules__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z.MenuStylesItemActive : ''),
style: {
gap: "10px"
},
onClick: function onClick(e) {
umi__WEBPACK_IMPORTED_MODULE_2__.history.push(item === null || item === void 0 ? void 0 : item.key);
},
children: [item === null || item === void 0 ? void 0 : item.icon, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
className: "flex-1",
style: {
minWidth: 0
},
children: item === null || item === void 0 ? void 0 : item.label
})]
}, item === null || item === void 0 ? void 0 : item.key);
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
className: "flex-1 p20 ".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z.ContentStyles),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(umi__WEBPACK_IMPORTED_MODULE_2__.Outlet, {})
})]
});
};
/* harmony default export */ __webpack_exports__["default"] = ((0,umi__WEBPACK_IMPORTED_MODULE_2__.connect)(function (_ref2) {
var globalSetting = _ref2.globalSetting,
user = _ref2.user,
engineering = _ref2.engineering,
dispatch = _ref2.dispatch;
return {
user: user,
globalSetting: globalSetting,
engineering: engineering,
dispatch: dispatch
};
})(Engineering));
/***/ }),
/***/ 57054:
/*!******************************************************!*\
!*** ./src/pages/Equipment/Index/index.less?modules ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
// extracted by mini-css-extract-plugin
/* harmony default export */ __webpack_exports__.Z = ({"flex_box_center":"flex_box_center___jmmXe","flex_space_between":"flex_space_between___vxGWa","flex_box_vertical_center":"flex_box_vertical_center___SGwrN","flex_box_center_end":"flex_box_center_end___KiDj3","flex_box_column":"flex_box_column___Z6TVL","flex-col":"flex-col___ZnKoO","flex-row":"flex-row___pctXX","justify-start":"justify-start___csUBe","justify-center":"justify-center___kKub2","justify-end":"justify-end___n8cXO","justify-evenly":"justify-evenly___mjQm1","justify-around":"justify-around___JL_9s","justify-between":"justify-between___qTRS7","align-start":"align-start___lqbAM","align-center":"align-center___oDNBy","align-end":"align-end___Uiurd","MenuStyles":"MenuStyles___BHYdE","MenuStylesItem":"MenuStylesItem___cnAZu","MenuStylesItemActive":"MenuStylesItemActive___KgmGV","ContentStyles":"ContentStyles___Mfx8e","ModalStyles":"ModalStyles___tzV2m","InputStyles":"InputStyles___V8C5m","FormStyle":"FormStyle___gPLGW","TableStyle":"TableStyle___DNKJL"});
/***/ })
}]);