"use strict"; (self["webpackChunk"] = self["webpackChunk"] || []).push([[2823],{ /***/ 97534: /*!**********************************************************************!*\ !*** ./src/pages/Engineering/Navigation/Home/index.tsx + 10 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 */ Home; } }); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); // EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules var _umi_production_exports = __webpack_require__(23852); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules var spin = __webpack_require__(71418); ;// CONCATENATED MODULE: ./src/pages/Engineering/Navigation/Home/Header/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var Headermodules = ({"headerTabBarContainer":"headerTabBarContainer___Nq0Dm","userInfo":"userInfo___R_AXo","img":"img___XUouS","detail":"detail___k89kc","space":"space___zTuz_","school":"school___bCCy2","headerContainer":"headerContainer___zNlzC","listItemWrap":"listItemWrap___SpIzT","listItem":"listItem___cFJUj","nameContainer":"nameContainer___fQG64","iconWrap":"iconWrap___wK4NI"}); ;// CONCATENATED MODULE: ./src/pages/Engineering/components/Navigation/StyleWrap/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var StyleWrapmodules = ({"styleWrapContainer":"styleWrapContainer___fTNBN","default":"default___lObcd","header":"header___oOyPW","tabBarContainer":"tabBarContainer___EWE_7","large":"large___Ael5K","middle":"middle___PPMC_","title":"title___XNXFq","tabBarText":"tabBarText___aN99K","small":"small___Oo9S7"}); ;// CONCATENATED MODULE: ./src/pages/Engineering/components/Navigation/StyleWrap/index.tsx const StyleWrap = ({ children, style = {}, title, type = "default", tabBarContent, onTabBarClick }) => { return /* @__PURE__ */ _react_17_0_2_react.createElement( "div", { className: `${StyleWrapmodules.styleWrapContainer} ${StyleWrapmodules[type]}`, style }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: StyleWrapmodules.header }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: StyleWrapmodules.title }, title), type === "large" && tabBarContent, type === "default" && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: StyleWrapmodules.tabBarContainer }, tabBarContent.map((item, index) => /* @__PURE__ */ _react_17_0_2_react.createElement( "div", { key: index, onClick: () => onTabBarClick ? onTabBarClick(item.value) : {} }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: `iconfont ${item.icon}` })), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, item.label) ))), type === "middle" && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: StyleWrapmodules.tabBarText }, tabBarContent)), children ); }; /* harmony default export */ var Navigation_StyleWrap = (StyleWrap); ;// CONCATENATED MODULE: ./src/pages/Engineering/components/Navigation/index.ts // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js var es_select = __webpack_require__(57809); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules var message = __webpack_require__(8591); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules var input = __webpack_require__(20008); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/UserOutlined.js + 1 modules var UserOutlined = __webpack_require__(74594); // EXTERNAL MODULE: ./src/models/engineering/evaluateList.ts var evaluateList = __webpack_require__(6179); // EXTERNAL MODULE: ./src/utils/env.ts + 1 modules var env = __webpack_require__(19351); ;// CONCATENATED MODULE: ./src/pages/Engineering/Navigation/Home/Header/index.tsx var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); const { Option } = es_select["default"]; const inputRef = _react_17_0_2_react.createRef(); const Header = ({ loading, headerData, user, dispatch }) => { var _a; const [editData, setEditData] = (0,_react_17_0_2_react.useState)({ status: false, oldValue: "", newValue: "" }); const [imgError, setImgError] = (0,_react_17_0_2_react.useState)(false); const firstEnter = (0,_react_17_0_2_react.useRef)(true); (0,_react_17_0_2_react.useEffect)(() => { var _a2; if ((_a2 = user == null ? void 0 : user.userInfo) == null ? void 0 : _a2.school_id) { onEditClose(); setImgError(false); dispatch({ type: "engineeringNavigtion/getMajorList" }); } return () => { dispatch({ type: "engineeringNavigtion/setMajorOrYearActive", payload: { key: evaluateList/* evaluateListHeaderKey */.k[0], value: "" } }); dispatch({ type: "engineeringNavigtion/setMajorOrYearActive", payload: { key: evaluateList/* evaluateListHeaderKey */.k[1], value: "" } }); }; }, [(_a = user == null ? void 0 : user.userInfo) == null ? void 0 : _a.school_id]); (0,_react_17_0_2_react.useEffect)(() => { if (headerData.active[evaluateList/* evaluateListHeaderKey */.k[0]]) { dispatch({ type: "engineeringNavigtion/getYearList", payload: { id: headerData.active[evaluateList/* evaluateListHeaderKey */.k[0]], firstEnter: firstEnter.current } }); firstEnter.current = false; } dispatch({ type: "engineeringNavigtion/setMajorOrYearDataSource", payload: { key: evaluateList/* evaluateListHeaderKey */.k[1], value: [] } }); dispatch({ type: "engineeringNavigtion/setMajorOrYearActive", payload: { key: evaluateList/* evaluateListHeaderKey */.k[1], value: "" } }); }, [headerData.active[evaluateList/* evaluateListHeaderKey */.k[0]]]); (0,_react_17_0_2_react.useEffect)(() => { dispatch({ type: "engineeringNavigtion/getTopPage" }); onEditClose(); }, [headerData.active[evaluateList/* evaluateListHeaderKey */.k[1]]]); const onSelectChange = (key, value) => { dispatch({ type: "engineeringNavigtion/setMajorOrYearActive", payload: { key, value } }); }; const onEditClick = () => { setEditData({ status: true, oldValue: headerData.name, newValue: headerData.name }); setTimeout(() => { if (inputRef && inputRef.current) { inputRef.current.focus(); } }, 100); }; const onEditChange = (value) => { setEditData(__spreadProps(__spreadValues({}, editData), { newValue: value })); }; const onEditSave = () => { let newValue = editData.newValue.trim(); let oldValue = editData.oldValue.trim(); if (!newValue) { message/* default */.ZP.warning("\u8BF7\u586B\u5199\u540D\u79F0"); return false; } if (newValue !== oldValue) { dispatch({ type: "engineeringNavigtion/putTopPageName", payload: { id: headerData.active[evaluateList/* evaluateListHeaderKey */.k[1]], name: newValue }, callback: ({ status, message: msg }) => { if (status === 0) { message/* default */.ZP.success("\u4FDD\u5B58\u6210\u529F"); dispatch({ type: "engineeringNavigtion/getTopPage" }); } else { message/* default */.ZP.error(msg); } onEditClose(); } }); } else { onEditClose(); } }; const onEditClose = () => { setEditData({ status: false, oldValue: "", newValue: "" }); }; const renderTabBar = () => { var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j; return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Headermodules.headerTabBarContainer }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Headermodules.userInfo }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Headermodules.img }, imgError && /* @__PURE__ */ _react_17_0_2_react.createElement(UserOutlined/* default */.Z, null), !imgError && /* @__PURE__ */ _react_17_0_2_react.createElement( "img", { src: `${(_a2 = env/* default */.Z) == null ? void 0 : _a2.IMG_SERVER}/images/${(_b = user.userInfo) == null ? void 0 : _b.image_url}`, onError: () => setImgError(true) } )), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Headermodules.detail }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, (_d = (_c = user.userInfo) == null ? void 0 : _c.ec_user_info) == null ? void 0 : _d.user_name), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, (_f = (_e = user.userInfo) == null ? void 0 : _e.ec_user_info) == null ? void 0 : _f.user_type))), ((_h = (_g = user.userInfo) == null ? void 0 : _g.ec_user_info) == null ? void 0 : _h.user_school) && /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Headermodules.space }), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Headermodules.school }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-daxue" })), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, (_j = (_i = user.userInfo) == null ? void 0 : _i.ec_user_info) == null ? void 0 : _j.user_school)))); }; return /* @__PURE__ */ _react_17_0_2_react.createElement( Navigation_StyleWrap, { title: headerData.title, type: "large", tabBarContent: renderTabBar() }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Headermodules.headerContainer }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Headermodules.listItemWrap }, Object.entries(headerData.dataSource).map(([key, list]) => { return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { key, className: Headermodules.listItem }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, key), /* @__PURE__ */ _react_17_0_2_react.createElement( es_select["default"], { style: { width: list.width }, value: headerData.active[key] || void 0, bordered: false, placeholder: list.placeholder, loading: loading.effects[list.loading], onChange: (value) => onSelectChange(key, value) }, list.dataList.map((item) => /* @__PURE__ */ _react_17_0_2_react.createElement(Option, { key: item.value, value: item.value }, item.label)) )); })), headerData.name && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Headermodules.nameContainer }, !editData.status && /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, headerData.name), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { onClick: onEditClick }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-bianji7" }))), editData.status && /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /* @__PURE__ */ _react_17_0_2_react.createElement( input["default"], { ref: inputRef, value: editData.newValue, style: { width: 280, marginRight: 15, height: 38 }, onChange: (event) => onEditChange(event.target.value) } ), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Headermodules.iconWrap }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { onClick: onEditSave }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-baocun1" })), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { onClick: onEditClose }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-quxiao" })))))) ); }; /* harmony default export */ var Home_Header = ((0,_umi_production_exports.connect)( ({ user, loading, engineeringNavigtion }) => __spreadValues({ user, loading }, engineeringNavigtion) )(Header)); ;// CONCATENATED MODULE: ./src/pages/Engineering/Navigation/Home/CardList/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var CardListmodules = ({"cardListContainer":"cardListContainer___cOvhW","left":"left___aHG_T","leftList":"leftList____UVAt","resultWrap":"resultWrap___EMouZ","reusltContainer":"reusltContainer___rkPOf","success":"success___B8bZK","spheric":"spheric___si9yt","listItemWrap":"listItemWrap___AZiiY","listItem":"listItem___x5794","content":"content___nMJwb","label":"label___IKiST","total":"total___NvRmD","right":"right___iac1g","rightList":"rightList___RJ6cd","emptyContaioner":"emptyContaioner___famIv"}); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/empty/index.js + 3 modules var empty = __webpack_require__(64165); ;// CONCATENATED MODULE: ./src/pages/Engineering/Navigation/Home/CardList/index.tsx var CardList_defProp = Object.defineProperty; var CardList_getOwnPropSymbols = Object.getOwnPropertySymbols; var CardList_hasOwnProp = Object.prototype.hasOwnProperty; var CardList_propIsEnum = Object.prototype.propertyIsEnumerable; var CardList_defNormalProp = (obj, key, value) => key in obj ? CardList_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var CardList_spreadValues = (a, b) => { for (var prop in b || (b = {})) if (CardList_hasOwnProp.call(b, prop)) CardList_defNormalProp(a, prop, b[prop]); if (CardList_getOwnPropSymbols) for (var prop of CardList_getOwnPropSymbols(b)) { if (CardList_propIsEnum.call(b, prop)) CardList_defNormalProp(a, prop, b[prop]); } return a; }; const CardList = ({ appraiseData, teamData, active }) => { return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CardListmodules.cardListContainer }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CardListmodules.left }, Object.entries(appraiseData).map(([key, list], index) => { return /* @__PURE__ */ _react_17_0_2_react.createElement( Navigation_StyleWrap, { key, title: list.title, tabBarContent: list.tabBarContent, style: { marginBottom: index === 1 ? 0 : 20, height: 350 }, onTabBarClick: (k) => { const url = active["\u8BA4\u8BC1\u5C4A\u522B"] ? `${k}?ec_major_school_id=${active["\u8BA4\u8BC1\u4E13\u4E1A"]}&ec_year_id=${active["\u8BA4\u8BC1\u5C4A\u522B"]}` : k; _umi_production_exports.history.push(url); } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CardListmodules.leftList }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CardListmodules.resultWrap }, /* @__PURE__ */ _react_17_0_2_react.createElement( "div", { className: `${CardListmodules.reusltContainer} ${list.result === "\u8FBE\u6210" ? CardListmodules.success : ""}` }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CardListmodules.spheric }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, list.result), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u8BC4\u4EF7\u7ED3\u679C")) )), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CardListmodules.listItemWrap }, list.listData.map((item, index2) => { return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CardListmodules.listItem, key: index2 }, /* @__PURE__ */ _react_17_0_2_react.createElement( "span", { style: { background: item.backgroundColor, color: item.textColor } }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: `iconfont ${item.icon}` }) ), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CardListmodules.content }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CardListmodules.label }, item.label), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CardListmodules.total }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, item.value), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, item.unit)))); }))) ); })), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CardListmodules.right }, Object.entries(teamData).map(([key, list], index) => { return /* @__PURE__ */ _react_17_0_2_react.createElement( Navigation_StyleWrap, { type: "middle", key, title: list.title, tabBarContent: list.tabBarContent, style: { marginBottom: index === 1 ? 0 : 20, height: 350 } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CardListmodules.rightList }, list.listData.length === 0 && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CardListmodules.emptyContaioner }, /* @__PURE__ */ _react_17_0_2_react.createElement(empty/* default */.Z, { image: empty/* default */.Z.PRESENTED_IMAGE_SIMPLE })), list.listData.length > 0 && list.listData.map((item, index2) => { return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { key: index2, className: CardListmodules.listItem }, item); })) ); }))); }; /* harmony default export */ var Home_CardList = ((0,_umi_production_exports.connect)( ({ user, engineeringNavigtion }) => CardList_spreadValues(CardList_spreadValues({ user }, engineeringNavigtion.headerData), engineeringNavigtion.cardListData) )(CardList)); ;// CONCATENATED MODULE: ./src/pages/Engineering/Navigation/Home/TotalList/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var TotalListmodules = ({"totalListContainer":"totalListContainer___GwKjh","listItem":"listItem___Gj5yg","total":"total___DzDtA","icon":"icon___YtvQo"}); ;// CONCATENATED MODULE: ./src/pages/Engineering/Navigation/Home/TotalList/index.tsx var TotalList_defProp = Object.defineProperty; var TotalList_getOwnPropSymbols = Object.getOwnPropertySymbols; var TotalList_hasOwnProp = Object.prototype.hasOwnProperty; var TotalList_propIsEnum = Object.prototype.propertyIsEnumerable; var TotalList_defNormalProp = (obj, key, value) => key in obj ? TotalList_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var TotalList_spreadValues = (a, b) => { for (var prop in b || (b = {})) if (TotalList_hasOwnProp.call(b, prop)) TotalList_defNormalProp(a, prop, b[prop]); if (TotalList_getOwnPropSymbols) for (var prop of TotalList_getOwnPropSymbols(b)) { if (TotalList_propIsEnum.call(b, prop)) TotalList_defNormalProp(a, prop, b[prop]); } return a; }; const TotalList = ({ totalListData }) => { return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: TotalListmodules.totalListContainer }, totalListData.map((list) => { return /* @__PURE__ */ _react_17_0_2_react.createElement( Navigation_StyleWrap, { key: list.title, title: list.title, tabBarContent: null, type: "small", style: { width: "calc((100% - 40px) / 3)", height: 160 } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: TotalListmodules.listItem }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: TotalListmodules.total }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, list.value), "\u4EBA"), /* @__PURE__ */ _react_17_0_2_react.createElement( "div", { className: TotalListmodules.icon, style: { backgroundColor: list.backgroundColor } }, /* @__PURE__ */ _react_17_0_2_react.createElement( "i", { className: `iconfont ${list.icon}`, style: { color: list.textColor } } ) )) ); })); }; /* harmony default export */ var Home_TotalList = ((0,_umi_production_exports.connect)( ({ engineeringNavigtion }) => TotalList_spreadValues({}, engineeringNavigtion) )(TotalList)); ;// CONCATENATED MODULE: ./src/pages/Engineering/Navigation/Home/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var Homemodules = ({"navigationHomeContainer":"navigationHomeContainer___fTEXn"}); ;// CONCATENATED MODULE: ./src/pages/Engineering/Navigation/Home/index.tsx var Home_defProp = Object.defineProperty; var Home_getOwnPropSymbols = Object.getOwnPropertySymbols; var Home_hasOwnProp = Object.prototype.hasOwnProperty; var Home_propIsEnum = Object.prototype.propertyIsEnumerable; var Home_defNormalProp = (obj, key, value) => key in obj ? Home_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var Home_spreadValues = (a, b) => { for (var prop in b || (b = {})) if (Home_hasOwnProp.call(b, prop)) Home_defNormalProp(a, prop, b[prop]); if (Home_getOwnPropSymbols) for (var prop of Home_getOwnPropSymbols(b)) { if (Home_propIsEnum.call(b, prop)) Home_defNormalProp(a, prop, b[prop]); } return a; }; const Navigation = ({ loading }) => { return /* @__PURE__ */ _react_17_0_2_react.createElement(spin/* default */.Z, { spinning: loading.effects["engineeringNavigtion/getTopPage"] }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Homemodules.navigationHomeContainer }, /* @__PURE__ */ _react_17_0_2_react.createElement(Home_Header, null), /* @__PURE__ */ _react_17_0_2_react.createElement(Home_CardList, null), /* @__PURE__ */ _react_17_0_2_react.createElement(Home_TotalList, null))); }; /* harmony default export */ var Home = ((0,_umi_production_exports.connect)( ({ loading, engineeringNavigtion }) => Home_spreadValues({ loading }, engineeringNavigtion) )(Navigation)); /***/ }) }]);