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__Laboratory__Index__index...

330 lines
18 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[35380],{
/***/ 96126:
/*!**********************************************************!*\
!*** ./src/pages/Laboratory/Index/index.tsx + 2 modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ Index; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./src/pages/Laboratory/Index/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Indexmodules = ({"flex_box_center":"flex_box_center___lrHxi","flex_space_between":"flex_space_between___jBQWM","flex_box_vertical_center":"flex_box_vertical_center___r27qS","flex_box_center_end":"flex_box_center_end___P4YAj","flex_box_column":"flex_box_column___Ejmkk","flex-col":"flex-col___bvmF7","flex-row":"flex-row___m7iv1","justify-start":"justify-start___wdBZW","justify-center":"justify-center___a93Fq","justify-end":"justify-end___cJ6H_","justify-evenly":"justify-evenly___bVYPK","justify-around":"justify-around___IFWgT","justify-between":"justify-between___mhcs5","align-start":"align-start___WE2TQ","align-center":"align-center___cahB7","align-end":"align-end___yjEqK","all_box":"all_box___JhY33","wrap":"wrap___nc2Lp","left":"left___IiZZt","home":"home___cTaaj","info":"info___SduOB","right":"right___App8I","search-bar":"search-bar___hMRJq"});
;// CONCATENATED MODULE: ./src/pages/Laboratory/Index/index2.less
// extracted by mini-css-extract-plugin
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/menu/index.js + 11 modules
var menu = __webpack_require__(20834);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(88271);
// EXTERNAL MODULE: ./src/components/HeaderNav/index.tsx + 4 modules
var HeaderNav = __webpack_require__(59827);
// EXTERNAL MODULE: ./src/assets/images/statistics/logo.png
var logo = __webpack_require__(97629);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Laboratory/Index/index.tsx
var SubMenu = menu/* default */.Z.SubMenu;
// import XazyHeader from '@/components/XazyHeader';
var Engineering = function Engineering(_ref) {
var _user$userInfo, _user$userInfo2, _user$userInfo3, _user$userInfo4, _user$userInfo5, _user$userInfo6, _user$userInfo7, _user$userInfo8, _user$userInfo9, _user$userInfo10, _user$userInfo11, _user$userInfo12, _user$userInfo13, _user$userInfo14;
var user = _ref.user,
globalSetting = _ref.globalSetting,
engineering = _ref.engineering,
dispatch = _ref.dispatch;
var location = (0,_umi_production_exports.useLocation)();
var _useState = (0,_react_17_0_2_react.useState)(1),
_useState2 = slicedToArray_default()(_useState, 2),
menuKey = _useState2[0],
setMenuKey = _useState2[1];
(0,_react_17_0_2_react.useEffect)(function () {
if (location.pathname == '/laboratory') {
_umi_production_exports.history.replace('/laboratory/reservations');
}
setMenuKey(function (e) {
return e + 1;
});
}, [location.pathname]);
(0,_react_17_0_2_react.useEffect)(function () {
dispatch({
type: 'globalSetting/headerFooterToggle',
payload: false
});
return function () {
dispatch({
type: 'globalSetting/headerFooterToggle',
payload: true
});
};
}, []);
function getItem(label, key, icon, children, type) {
return {
key: key,
icon: icon,
children: children,
label: label,
type: type
};
}
var items = [getItem('实验室预约', '/laboratory/reservations', /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-shiyanshiyuyue"
})), getItem('实验开放预约', '/laboratory/openReservation', /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-shiyanshiyuyue"
})), getItem('我的预约', '/laboratory/myreservation', /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-wodeyuyue"
})), (user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.classroom_center_auth) && getItem('工作台', 'workbench', /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-wodegongzuotai"
}), [(user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.classroom_center_auth) && getItem('实验室中心管理', '/laboratory/laboratoryCenter'),
// (user?.userInfo?.classroom_center_auth || user?.userInfo?.classroom_auth) && getItem('智慧大屏', '/wisdom'),
((user === null || user === void 0 || (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.classroom_center_auth) || (user === null || user === void 0 || (_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : _user$userInfo4.classroom_auth)) && getItem('实验室管理', '/laboratory/myLaboratory'), ((user === null || user === void 0 || (_user$userInfo5 = user.userInfo) === null || _user$userInfo5 === void 0 ? void 0 : _user$userInfo5.classroom_center_auth) || (user === null || user === void 0 || (_user$userInfo6 = user.userInfo) === null || _user$userInfo6 === void 0 ? void 0 : _user$userInfo6.classroom_auth)) && getItem('实验室分室管理', '/laboratory/laboratoryRoom'), ((user === null || user === void 0 || (_user$userInfo7 = user.userInfo) === null || _user$userInfo7 === void 0 ? void 0 : _user$userInfo7.classroom_center_auth) || (user === null || user === void 0 || (_user$userInfo8 = user.userInfo) === null || _user$userInfo8 === void 0 ? void 0 : _user$userInfo8.classroom_auth)) && getItem('预约规则管理', '/laboratory/ruleManage'),
// (user?.userInfo?.classroom_center_auth || user?.userInfo?.classroom_auth) && getItem('实验室分类', '/laboratory/laboratoryType'),
((user === null || user === void 0 || (_user$userInfo9 = user.userInfo) === null || _user$userInfo9 === void 0 ? void 0 : _user$userInfo9.classroom_center_auth) || (user === null || user === void 0 || (_user$userInfo10 = user.userInfo) === null || _user$userInfo10 === void 0 ? void 0 : _user$userInfo10.classroom_auth)) && (user === null || user === void 0 || (_user$userInfo11 = user.userInfo) === null || _user$userInfo11 === void 0 ? void 0 : _user$userInfo11.admin_and_review) && getItem('预约管理', '/laboratory/reservationmanage')])];
// 获取所有二级菜单项的key
var allSubMenuKeys = items.filter(function (item) {
return item === null || item === void 0 ? void 0 : item.children;
}).map(function (item) {
return item.key;
});
return (
/*#__PURE__*/
// <div className={styles.all_box}>
// <div className={styles.wrap}>
// <div className={styles.left}>
// <aside
// className={styles.home}
// >
// <div className="mr15">
// <img width={22} src={NavImg} style={{ marginTop: "3px" }} />
// </div>
// <div className={styles.info}>
// <div>实验室管理</div>
// </div>
// </aside>
// <Menu
// key={menuKey}
// defaultSelectedKeys={[location?.pathname]}
// defaultOpenKeys={allSubMenuKeys}
// mode="inline"
// theme="light"
// items={items}
// onClick={(item: any) => {
// history.push(item?.key)
// }}
// />
// </div>
// <div className={styles.right}><Outlet /></div>
// </div>
// </div>
(0,jsx_runtime.jsxs)("div", {
className: "".concat(Indexmodules.all_box, " materials-wrp"),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(HeaderNav/* default */.Z, {
title: "\u5B9E\u9A8C\u5BA4\u7BA1\u7406",
goBackUrl: '/laboratoryOverview',
imgUrl: logo
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Indexmodules.wrap,
style: {
marginTop: 40
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Indexmodules.left,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
paddingBottom: 20
},
className: "block_1 flex-col",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
margin: '10px 10px 0px 10px',
color: '#93ACFF'
},
children: "\u65E5\u5E38\u5DE5\u4F5C\u53F0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(location.pathname === "/laboratory/reservations" ? "section_7" : "section_8", " flex-row"),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
to: "/laboratory/reservations",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "icon-zzxy-shiyanshiyuyue"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "text_5",
children: "\u5B9E\u9A8C\u5BA4\u9884\u7EA6"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(location.pathname === "/laboratory/openReservation" ? "section_7" : "section_8", " flex-row"),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
to: "/laboratory/openReservation",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "icon-zzxy-kaifangshiyanyuyue"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "text_5",
children: "\u5B9E\u9A8C\u5F00\u653E\u9884\u7EA6"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
marginBottom: 0
},
className: "".concat(location.pathname === "/laboratory/myreservation" ? "section_7" : "section_8", " flex-row"),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
to: "/laboratory/myreservation",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "icon-zzxy-wodeyuyue"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "text_5",
children: "\u6211\u7684\u9884\u7EA6"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
marginBottom: 40
},
className: "".concat(location.pathname === "/laboratory/regulations" ? "section_7" : "section_8", " flex-row"),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
to: "/laboratory/regulations",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "icon-zzxy-guizhangzhidu"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "text_5",
children: "\u89C4\u7AE0\u5236\u5EA6"
})]
})
}), (user === null || user === void 0 || (_user$userInfo12 = user.userInfo) === null || _user$userInfo12 === void 0 ? void 0 : _user$userInfo12.classroom_center_auth) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
margin: '10px 10px 0px 10px',
color: '#93ACFF'
},
children: "\u7BA1\u7406\u5DE5\u4F5C\u53F0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(location.pathname === "/laboratory/laboratoryCenter" ? "section_7" : "section_8", " flex-row"),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
to: "/laboratory/laboratoryCenter",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "icon-zzxy-shiyanshizhongxinguanli"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "text_5",
children: "\u5B9E\u9A8C\u5BA4\u4E2D\u5FC3\u7BA1\u7406"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(location.pathname === "/laboratory/myLaboratory" ? "section_7" : "section_8", " flex-row"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
to: "/laboratory/myLaboratory",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "image-text_19 flex-row justify-between",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "icon-zzxy-shiyanshiguanli"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "text-group_1 text_5",
children: "\u5B9E\u9A8C\u5BA4\u7BA1\u7406"
})]
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(location.pathname === "/laboratory/laboratoryRoom" ? "section_7" : "section_8", " flex-row"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
to: "/laboratory/laboratoryRoom",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "image-text_20 flex-row justify-between",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "icon-zzxy-shiyanshifenshiguanli"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "text-group_2 text_5",
children: "\u5B9E\u9A8C\u5BA4\u5206\u5BA4\u7BA1\u7406"
})]
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(location.pathname === "/laboratory/ruleManage" ? "section_7" : "section_8", " flex-row"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
to: "/laboratory/ruleManage",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "image-text_21 flex-row justify-between",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "icon-zzxy-yuyueguizeguanli"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "text-group_3 text_5",
children: "\u9884\u7EA6\u89C4\u5219\u7BA1\u7406"
})]
})
})
}), (user === null || user === void 0 || (_user$userInfo13 = user.userInfo) === null || _user$userInfo13 === void 0 ? void 0 : _user$userInfo13.admin_and_review) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(location.pathname === "/laboratory/reservationmanage" ? "section_7" : "section_8", " flex-row"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
to: "/laboratory/reservationmanage",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "image-text_22 flex-row justify-between",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "icon-zzxy-yuyueguanli"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "text-group_4 text_5",
children: "\u9884\u7EA6\u7BA1\u7406"
})]
})
})
}), (user === null || user === void 0 || (_user$userInfo14 = user.userInfo) === null || _user$userInfo14 === void 0 ? void 0 : _user$userInfo14.admin_and_review) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(location.pathname === "/laboratory/regulationsadmins" ? "section_7" : "section_8", " flex-row"),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
to: "/laboratory/regulationsadmins",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "image-text_22 flex-row justify-between",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "icon-zzxy-guizhangzhiduguanli"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "text-group_4 text_5",
children: "\u89C4\u7AE0\u5236\u5EA6\u7BA1\u7406"
})]
})
})
})]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Indexmodules.right,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Outlet, {})
})]
})]
})
);
};
/* harmony default export */ var Index = ((0,_umi_production_exports.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));
/***/ })
}]);