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.
1204 lines
46 KiB
1204 lines
46 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[7520],{
|
|
|
|
/***/ 37597:
|
|
/*!**********************************************************************************************!*\
|
|
!*** ./src/pages/Laboratory/OpenReservation/OpenReservationStatistics/index.tsx + 1 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 */ OpenReservation_OpenReservationStatistics; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
|
|
var toConsumableArray = __webpack_require__(37205);
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// 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);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
var _umi_production_exports = __webpack_require__(88271);
|
|
;// CONCATENATED MODULE: ./src/pages/Laboratory/OpenReservation/OpenReservationStatistics/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var OpenReservationStatisticsmodules = ({"back_style":"back_style___SWBNM","header_div":"header_div___fOQop","header_title":"header_title___Cfwb1","search":"search___yctrd","searchIcon":"searchIcon___Fz8sz","search_params":"search_params___plMZF","formWrap":"formWrap___wQQPx","cz_btn":"cz_btn___QBLFK","list_item":"list_item___VRKBv","add_Data":"add_Data___MnntK","tj_Data":"tj_Data___iloNq","tj_warp":"tj_warp___sD6oq","tjcount":"tjcount___epMZR","colorBlue":"colorBlue___Ys7k1","tj_item":"tj_item___IdqFB","tj_item_icon":"tj_item_icon___Ptyc2","tj_item_num":"tj_item_num___wZvvC","tj_item_text":"tj_item_text___jzKAh","clear_Data":"clear_Data___eHtUi"});
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js
|
|
var upload = __webpack_require__(60028);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
var es_form = __webpack_require__(78241);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
var tooltip = __webpack_require__(6848);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js + 6 modules
|
|
var breadcrumb = __webpack_require__(66104);
|
|
// 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/table/index.js + 85 modules
|
|
var table = __webpack_require__(36546);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(19871);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
var modal = __webpack_require__(43418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
var message = __webpack_require__(8591);
|
|
// EXTERNAL MODULE: ./src/service/laboratory.ts
|
|
var laboratory = __webpack_require__(39531);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.13@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(61186);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
// EXTERNAL MODULE: ./src/service/user.ts
|
|
var service_user = __webpack_require__(43255);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Laboratory/OpenReservation/OpenReservationStatistics/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Dragger = upload/* default */.Z.Dragger;
|
|
var OpenReservationStatistics = function OpenReservationStatistics(_ref) {
|
|
var _ref3, _ref4, _ref5, _ref6, _ref7;
|
|
var loading = _ref.loading,
|
|
user = _ref.user;
|
|
var _useState = (0,_react_17_0_2_react.useState)(),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
keyword = _useState2[0],
|
|
setkeyword = _useState2[1];
|
|
var urlParam = (0,_umi_production_exports.useParams)();
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
// 获取查询参数
|
|
var params = new URLSearchParams(location.search);
|
|
var labName = params.get('labName');
|
|
var roomName = params.get('roomName');
|
|
//预约数据
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
tableData = _useState4[0],
|
|
setTableData = _useState4[1];
|
|
|
|
//分页
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(0),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
total = _useState6[0],
|
|
setTotal = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(1),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
page = _useState8[0],
|
|
setPage = _useState8[1];
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(10),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
limit = _useState10[0],
|
|
setLimit = _useState10[1];
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
myForm = _Form$useForm2[0];
|
|
|
|
//新增
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
openMyModal = _useState12[0],
|
|
setOpenMyModal = _useState12[1];
|
|
var _useState13 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
directorsList = _useState14[0],
|
|
setDirectorsList = _useState14[1];
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
directorsId = _useState16[0],
|
|
setDirectorsId = _useState16[1];
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
spinning = _useState18[0],
|
|
setSpinning = _useState18[1];
|
|
var _useState19 = (0,_react_17_0_2_react.useState)('全部'),
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
selectTime = _useState20[0],
|
|
setSelectTime = _useState20[1];
|
|
var _useState21 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
appointedBy = _useState22[0],
|
|
setAppointedBy = _useState22[1];
|
|
var _useState23 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
appointedById = _useState24[0],
|
|
setAppointedById = _useState24[1];
|
|
var _useState25 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
rooms = _useState26[0],
|
|
setRooms = _useState26[1];
|
|
var _useState27 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState28 = slicedToArray_default()(_useState27, 2),
|
|
classroomId = _useState28[0],
|
|
setClassroomId = _useState28[1];
|
|
var _useState29 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
shixunNameList = _useState30[0],
|
|
setShixunNameList = _useState30[1];
|
|
var _useState31 = (0,_react_17_0_2_react.useState)('全部'),
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
shixunName = _useState32[0],
|
|
setShixunName = _useState32[1];
|
|
var _useState33 = (0,_react_17_0_2_react.useState)({
|
|
reservation_all_time: 0,
|
|
reservation_num: 0,
|
|
shixun_num: 0,
|
|
teacher_num: 0
|
|
}),
|
|
_useState34 = slicedToArray_default()(_useState33, 2),
|
|
tjData = _useState34[0],
|
|
setTjData = _useState34[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
//教导员
|
|
(0,laboratory/* directors_query */.C0)({}).then(function (res) {
|
|
var _res$data;
|
|
setDirectorsList(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list);
|
|
});
|
|
//实验房间
|
|
(0,laboratory/* classroom_rooms_query */.jd)({
|
|
page: 1,
|
|
limit: 10000,
|
|
keyword: '',
|
|
classroom_id: '',
|
|
is_all: true
|
|
}).then(function (res) {
|
|
var _res$data2;
|
|
setRooms(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.list);
|
|
});
|
|
//预约人
|
|
(0,service_user/* user_table_query */.bn)({
|
|
open_experiment_id: urlParam === null || urlParam === void 0 ? void 0 : urlParam.id
|
|
}).then(function (res) {
|
|
var _res$data3;
|
|
setAppointedBy(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.list);
|
|
});
|
|
//实验
|
|
(0,laboratory/* shixun_names */.OQ)({}).then(function (res) {
|
|
setShixunNameList(res === null || res === void 0 ? void 0 : res.shixun_names);
|
|
});
|
|
}, []);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
getData(false);
|
|
}, [page]);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
getData(true);
|
|
}, [keyword, limit, selectTime, shixunName, directorsId, classroomId, appointedById]);
|
|
var getData = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(flag) {
|
|
var date;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
setSpinning(true);
|
|
if (flag) {
|
|
setPage(1);
|
|
}
|
|
date = getDateDinterval();
|
|
_context.next = 5;
|
|
return (0,laboratory/* open_experiments_tj */.tq)({
|
|
page: page,
|
|
limit: limit,
|
|
start_time: date[0],
|
|
end_time: date[1],
|
|
teacher_id: directorsId,
|
|
shixun_name: shixunName,
|
|
classroom_room_id: classroomId
|
|
}).then(function (res) {
|
|
var _res$data4 = res === null || res === void 0 ? void 0 : res.data,
|
|
reservation_all_time = _res$data4.reservation_all_time,
|
|
reservation_num = _res$data4.reservation_num,
|
|
shixun_num = _res$data4.shixun_num,
|
|
teacher_num = _res$data4.teacher_num,
|
|
count = _res$data4.count,
|
|
list = _res$data4.list;
|
|
setTotal(count);
|
|
setTableData(list);
|
|
setTjData({
|
|
reservation_all_time: reservation_all_time,
|
|
reservation_num: reservation_num,
|
|
shixun_num: shixun_num,
|
|
teacher_num: teacher_num
|
|
});
|
|
});
|
|
case 5:
|
|
setSpinning(false);
|
|
case 6:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getData(_x) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var columns = [{
|
|
width: 100,
|
|
title: '序号',
|
|
dataIndex: 'order',
|
|
key: 'order',
|
|
render: function render(text, record, index) {
|
|
return "".concat((page - 1) * limit + index + 1);
|
|
}
|
|
}, {
|
|
title: '实验名称',
|
|
dataIndex: 'name',
|
|
ellipsis: true,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "bottomLeft",
|
|
title: text,
|
|
children: text || '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '预约人',
|
|
dataIndex: 'user_name',
|
|
ellipsis: true,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "bottomLeft",
|
|
title: text,
|
|
children: text || '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '预约实验室分室',
|
|
dataIndex: 'classroom_title',
|
|
ellipsis: true,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "bottomLeft",
|
|
title: text,
|
|
children: text || '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '所需物资',
|
|
dataIndex: 'substance_names',
|
|
ellipsis: true,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "bottomLeft",
|
|
title: text === null || text === void 0 ? void 0 : text.join('、'),
|
|
children: (text === null || text === void 0 ? void 0 : text.join('、')) || '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '实验时间',
|
|
dataIndex: 'times',
|
|
ellipsis: true,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [dayjs_min_default()(record === null || record === void 0 ? void 0 : record.start_time).format('YYYY-MM-DD'), " \u81F3 ", dayjs_min_default()(record === null || record === void 0 ? void 0 : record.end_time).format('YYYY-MM-DD')]
|
|
});
|
|
}
|
|
}, {
|
|
title: '教导员',
|
|
dataIndex: 'directors',
|
|
ellipsis: true,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: record === null || record === void 0 ? void 0 : record.teachers.map(function (info, index) {
|
|
var _record$teachers;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [info === null || info === void 0 ? void 0 : info.name, index == (record === null || record === void 0 || (_record$teachers = record.teachers) === null || _record$teachers === void 0 ? void 0 : _record$teachers.length) - 1 ? '' : '、']
|
|
});
|
|
}),
|
|
children: record === null || record === void 0 ? void 0 : record.teachers.map(function (info, index) {
|
|
var _record$teachers2;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [info === null || info === void 0 ? void 0 : info.name, index == (record === null || record === void 0 || (_record$teachers2 = record.teachers) === null || _record$teachers2 === void 0 ? void 0 : _record$teachers2.length) - 1 ? '' : '、']
|
|
});
|
|
})
|
|
});
|
|
}
|
|
}].filter(function (item) {
|
|
return !!item;
|
|
});
|
|
var onShowSizeChange = function onShowSizeChange(page, size) {
|
|
setPage(page);
|
|
setLimit(size);
|
|
};
|
|
var filterOption = function filterOption(input, option) {
|
|
var _option$label, _option$phone;
|
|
var label = ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').toLowerCase();
|
|
var phone = ((_option$phone = option === null || option === void 0 ? void 0 : option.phone) !== null && _option$phone !== void 0 ? _option$phone : '').toLowerCase();
|
|
var search = input.toLowerCase();
|
|
return label.includes(search) || phone.includes(search);
|
|
};
|
|
var getDateDinterval = function getDateDinterval() {
|
|
var startDate, endDate;
|
|
var currentYear = dayjs_min_default()().year(); // 获取当前年份
|
|
|
|
switch (selectTime) {
|
|
case '全部':
|
|
startDate = dayjs_min_default()("".concat(currentYear, "-01-01")); // 今年1月1日
|
|
endDate = dayjs_min_default()("".concat(currentYear, "-12-31")); // 今年12月31日
|
|
break;
|
|
case '上半年':
|
|
startDate = dayjs_min_default()("".concat(currentYear, "-01-01")); // 今年1月1日
|
|
endDate = dayjs_min_default()("".concat(currentYear, "-06-30")); // 今年6月30日
|
|
break;
|
|
case '下半年':
|
|
startDate = dayjs_min_default()("".concat(currentYear, "-07-01")); // 今年7月1日
|
|
endDate = dayjs_min_default()("".concat(currentYear, "-12-31")); // 今年12月31日
|
|
break;
|
|
}
|
|
return [startDate.format('YYYY-MM-DD'), endDate.format('YYYY-MM-DD')];
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "".concat(OpenReservationStatisticsmodules.header_div),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: OpenReservationStatisticsmodules.back_style,
|
|
style: {
|
|
display: 'flex',
|
|
alignItems: 'center'
|
|
},
|
|
onClick: function onClick() {
|
|
_umi_production_exports.history.push("/laboratory/openReservation");
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
style: {
|
|
marginRight: 20
|
|
},
|
|
className: "icon-zzxy-fanhui1"
|
|
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z, {
|
|
separator: ">",
|
|
items: [{
|
|
title: '实验室预约'
|
|
}, {
|
|
title: '概览统计'
|
|
}]
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: OpenReservationStatisticsmodules.search_params,
|
|
style: {
|
|
display: 'flex'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
colon: false,
|
|
label: "\u65F6\u95F4",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
style: {
|
|
width: 240
|
|
},
|
|
value: selectTime,
|
|
onChange: function onChange(e) {
|
|
setSelectTime(e);
|
|
},
|
|
children: (_ref3 = ['全部', '上半年', '下半年']) === null || _ref3 === void 0 ? void 0 : _ref3.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
value: item,
|
|
children: item
|
|
}, index);
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
colon: false,
|
|
label: "\u6559\u5BFC\u5458",
|
|
style: {
|
|
marginLeft: '20px'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
style: {
|
|
width: 200
|
|
},
|
|
value: directorsId,
|
|
onChange: function onChange(e) {
|
|
setDirectorsId(e);
|
|
},
|
|
children: (_ref4 = [{
|
|
id: '',
|
|
name: '全部'
|
|
}].concat(toConsumableArray_default()(directorsList))) === null || _ref4 === void 0 ? void 0 : _ref4.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
value: item === null || item === void 0 ? void 0 : item.id,
|
|
children: item === null || item === void 0 ? void 0 : item.name
|
|
}, index);
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
colon: false,
|
|
label: "\u9884\u7EA6\u4EBA",
|
|
style: {
|
|
marginLeft: '20px'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
style: {
|
|
width: 200
|
|
},
|
|
value: appointedById,
|
|
onChange: function onChange(e) {
|
|
setAppointedById(e);
|
|
},
|
|
children: (_ref5 = [{
|
|
id: '',
|
|
real_name: '全部'
|
|
}].concat(toConsumableArray_default()(appointedBy))) === null || _ref5 === void 0 ? void 0 : _ref5.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
value: item === null || item === void 0 ? void 0 : item.id,
|
|
children: item === null || item === void 0 ? void 0 : item.real_name
|
|
}, index);
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
colon: false,
|
|
label: "\u5B9E\u9A8C\u5BA4\u623F\u95F4",
|
|
style: {
|
|
marginLeft: '20px'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
style: {
|
|
width: 200
|
|
},
|
|
defaultValue: classroomId,
|
|
value: classroomId,
|
|
onChange: function onChange(e) {
|
|
setClassroomId(e);
|
|
},
|
|
children: (_ref6 = [{
|
|
id: '',
|
|
title: '全部'
|
|
}].concat(toConsumableArray_default()(rooms))) === null || _ref6 === void 0 ? void 0 : _ref6.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
value: item === null || item === void 0 ? void 0 : item.id,
|
|
children: item === null || item === void 0 ? void 0 : item.title
|
|
}, index);
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
colon: false,
|
|
label: "\u5B9E\u9A8C",
|
|
style: {
|
|
marginLeft: '20px'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
style: {
|
|
width: 200
|
|
},
|
|
value: shixunName,
|
|
onChange: function onChange(e) {
|
|
setShixunName(e);
|
|
},
|
|
children: (_ref7 = ['全部'].concat(toConsumableArray_default()(shixunNameList))) === null || _ref7 === void 0 ? void 0 : _ref7.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
value: item,
|
|
children: item
|
|
}, index);
|
|
})
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: OpenReservationStatisticsmodules.tj_warp,
|
|
children: [{
|
|
name: '实验数',
|
|
num: (tjData === null || tjData === void 0 ? void 0 : tjData.shixun_num) || 0,
|
|
iconfont: 'icon-a-zhishitupu1'
|
|
}, {
|
|
name: '教导员数',
|
|
num: (tjData === null || tjData === void 0 ? void 0 : tjData.teacher_num) || 0,
|
|
iconfont: 'icon-shenqingchengweizhujiao'
|
|
}, {
|
|
name: '预约次数',
|
|
num: (tjData === null || tjData === void 0 ? void 0 : tjData.reservation_num) || 0,
|
|
iconfont: 'icon-wodeyuyue'
|
|
}, {
|
|
name: '预约累积时长(分钟)',
|
|
num: (tjData === null || tjData === void 0 ? void 0 : tjData.reservation_all_time) || 0,
|
|
iconfont: 'icon-leiji'
|
|
}].map(function (item) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: OpenReservationStatisticsmodules.tjcount,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: OpenReservationStatisticsmodules.tj_item_icon,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont ".concat(item === null || item === void 0 ? void 0 : item.iconfont, " font18 ").concat(OpenReservationStatisticsmodules.colorBlue)
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: OpenReservationStatisticsmodules.tj_item_data,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: OpenReservationStatisticsmodules.tj_item_num,
|
|
children: item === null || item === void 0 ? void 0 : item.num
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: OpenReservationStatisticsmodules.tj_item_text,
|
|
children: [item === null || item === void 0 ? void 0 : item.name, (item === null || item === void 0 ? void 0 : item.name) == '预约累积时长' && '(分钟)']
|
|
})]
|
|
})]
|
|
}, item === null || item === void 0 ? void 0 : item.name);
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "materials-table-wrp",
|
|
style: {
|
|
padding: 0,
|
|
marginTop: 50
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
loading: spinning,
|
|
pagination: false,
|
|
dataSource: tableData,
|
|
className: "materials-table",
|
|
columns: columns
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
children: total > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
justifyContent: 'space-between',
|
|
padding: '10px 7px 20px 7px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
showSizeChanger: true,
|
|
showQuickJumper: true,
|
|
onChange: onShowSizeChange,
|
|
defaultCurrent: 1,
|
|
pageSizeOptions: ['10', '20', '50', '100'],
|
|
current: page || 1,
|
|
pageSize: limit || 10,
|
|
defaultPageSize: 10,
|
|
total: total
|
|
})]
|
|
}) : ''
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
maskClosable: false,
|
|
centered: true,
|
|
keyboard: false,
|
|
destroyOnClose: true,
|
|
className: OpenReservationStatisticsmodules.my_modal,
|
|
open: openMyModal,
|
|
title: "\u65B0\u5EFA\u9884\u7EA6",
|
|
width: "600px",
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
_context2.next = 2;
|
|
return myForm.validateFields();
|
|
case 2:
|
|
(0,laboratory/* public_open_experiments */.GU)({
|
|
id: urlParam.id,
|
|
reservation_user_id: myForm.getFieldValue('reservation_user_id')
|
|
}).then(function (res) {
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
message/* default */.ZP.success('新建成功');
|
|
getData(true);
|
|
setOpenMyModal(false);
|
|
myForm === null || myForm === void 0 || myForm.resetFields();
|
|
}
|
|
});
|
|
case 3:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
})),
|
|
onCancel: function onCancel() {
|
|
setOpenMyModal(false);
|
|
myForm === null || myForm === void 0 || myForm.resetFields();
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
className: OpenReservationStatisticsmodules.formWrap,
|
|
form: myForm,
|
|
labelCol: {
|
|
span: 4
|
|
},
|
|
wrapperCol: {
|
|
span: 20
|
|
},
|
|
style: {
|
|
marginTop: '20px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
name: "reservation_user_id",
|
|
label: "\u9884\u7EA6\u4EBA",
|
|
rules: [{
|
|
required: true,
|
|
message: '预约人不能为空'
|
|
}],
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
options: directorsList,
|
|
showSearch: true,
|
|
filterOption: function filterOption(input, option) {
|
|
var _option$real_name;
|
|
return ((_option$real_name = option === null || option === void 0 ? void 0 : option.real_name) !== null && _option$real_name !== void 0 ? _option$real_name : '').toLowerCase().includes(input.toLowerCase());
|
|
},
|
|
fieldNames: {
|
|
label: 'real_name',
|
|
value: 'id'
|
|
},
|
|
size: "large"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u9884\u7EA6\u5B9E\u9A8C\u5BA4",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
lineHeight: '36px'
|
|
},
|
|
children: labName || '--'
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u9884\u7EA6\u623F\u95F4\u53F7",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
lineHeight: '36px'
|
|
},
|
|
children: roomName || '--'
|
|
})
|
|
})]
|
|
})
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var OpenReservation_OpenReservationStatistics = ((0,_umi_production_exports.connect)(function (_ref9) {
|
|
var loading = _ref9.loading,
|
|
engineeringNavigtion = _ref9.engineeringNavigtion,
|
|
user = _ref9.user;
|
|
return objectSpread2_default()(objectSpread2_default()({
|
|
loading: loading
|
|
}, engineeringNavigtion), {}, {
|
|
user: user
|
|
});
|
|
})(OpenReservationStatistics));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 66104:
|
|
/*!**************************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js + 6 modules ***!
|
|
\**************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ breadcrumb; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.3@rc-util/es/Children/toArray.js
|
|
var toArray = __webpack_require__(38298);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.3@rc-util/es/pickAttrs.js
|
|
var pickAttrs = __webpack_require__(36994);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
|
|
var reactNode = __webpack_require__(92343);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.0@@ant-design/icons/es/icons/DownOutlined.js + 1 modules
|
|
var DownOutlined = __webpack_require__(76995);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown.js
|
|
var dropdown = __webpack_require__(91857);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/BreadcrumbSeparator.js
|
|
"use client";
|
|
|
|
|
|
|
|
const BreadcrumbSeparator = _ref => {
|
|
let {
|
|
children
|
|
} = _ref;
|
|
const {
|
|
getPrefixCls
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const prefixCls = getPrefixCls('breadcrumb');
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("li", {
|
|
className: `${prefixCls}-separator`,
|
|
"aria-hidden": "true"
|
|
}, children === '' ? children : children || '/');
|
|
};
|
|
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
|
|
/* harmony default export */ var breadcrumb_BreadcrumbSeparator = (BreadcrumbSeparator);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/useItemRender.js
|
|
"use client";
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
function getBreadcrumbName(route, params) {
|
|
if (route.title === undefined || route.title === null) {
|
|
return null;
|
|
}
|
|
const paramsKeys = Object.keys(params).join('|');
|
|
return typeof route.title === 'object' ? route.title : String(route.title).replace(new RegExp(`:(${paramsKeys})`, 'g'), (replacement, key) => params[key] || replacement);
|
|
}
|
|
function renderItem(prefixCls, item, children, href) {
|
|
if (children === null || children === undefined) {
|
|
return null;
|
|
}
|
|
const {
|
|
className,
|
|
onClick
|
|
} = item,
|
|
restItem = __rest(item, ["className", "onClick"]);
|
|
const passedProps = Object.assign(Object.assign({}, (0,pickAttrs/* default */.Z)(restItem, {
|
|
data: true,
|
|
aria: true
|
|
})), {
|
|
onClick
|
|
});
|
|
if (href !== undefined) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("a", Object.assign({}, passedProps, {
|
|
className: _classnames_2_5_1_classnames_default()(`${prefixCls}-link`, className),
|
|
href: href
|
|
}), children);
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("span", Object.assign({}, passedProps, {
|
|
className: _classnames_2_5_1_classnames_default()(`${prefixCls}-link`, className)
|
|
}), children);
|
|
}
|
|
function useItemRender(prefixCls, itemRender) {
|
|
const mergedItemRender = (item, params, routes, path, href) => {
|
|
if (itemRender) {
|
|
return itemRender(item, params, routes, path);
|
|
}
|
|
const name = getBreadcrumbName(item, params);
|
|
return renderItem(prefixCls, item, name, href);
|
|
};
|
|
return mergedItemRender;
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/BreadcrumbItem.js
|
|
"use client";
|
|
|
|
var BreadcrumbItem_rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const InternalBreadcrumbItem = props => {
|
|
const {
|
|
prefixCls,
|
|
separator = '/',
|
|
children,
|
|
menu,
|
|
overlay,
|
|
dropdownProps,
|
|
href
|
|
} = props;
|
|
// Warning for deprecated usage
|
|
if (false) {}
|
|
/** If overlay is have Wrap a Dropdown */
|
|
const renderBreadcrumbNode = breadcrumbItem => {
|
|
if (menu || overlay) {
|
|
const mergeDropDownProps = Object.assign({}, dropdownProps);
|
|
if (menu) {
|
|
const _a = menu || {},
|
|
{
|
|
items
|
|
} = _a,
|
|
menuProps = BreadcrumbItem_rest(_a, ["items"]);
|
|
mergeDropDownProps.menu = Object.assign(Object.assign({}, menuProps), {
|
|
items: items === null || items === void 0 ? void 0 : items.map((_a, index) => {
|
|
var {
|
|
key,
|
|
title,
|
|
label,
|
|
path
|
|
} = _a,
|
|
itemProps = BreadcrumbItem_rest(_a, ["key", "title", "label", "path"]);
|
|
let mergedLabel = label !== null && label !== void 0 ? label : title;
|
|
if (path) {
|
|
mergedLabel = /*#__PURE__*/_react_17_0_2_react.createElement("a", {
|
|
href: `${href}${path}`
|
|
}, mergedLabel);
|
|
}
|
|
return Object.assign(Object.assign({}, itemProps), {
|
|
key: key !== null && key !== void 0 ? key : index,
|
|
label: mergedLabel
|
|
});
|
|
})
|
|
});
|
|
} else if (overlay) {
|
|
mergeDropDownProps.overlay = overlay;
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(dropdown/* default */.Z, Object.assign({
|
|
placement: "bottom"
|
|
}, mergeDropDownProps), /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: `${prefixCls}-overlay-link`
|
|
}, breadcrumbItem, /*#__PURE__*/_react_17_0_2_react.createElement(DownOutlined/* default */.Z, null)));
|
|
}
|
|
return breadcrumbItem;
|
|
};
|
|
// wrap to dropDown
|
|
const link = renderBreadcrumbNode(children);
|
|
if (link !== undefined && link !== null) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /*#__PURE__*/_react_17_0_2_react.createElement("li", null, link), separator && /*#__PURE__*/_react_17_0_2_react.createElement(breadcrumb_BreadcrumbSeparator, null, separator));
|
|
}
|
|
return null;
|
|
};
|
|
const BreadcrumbItem = props => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
children,
|
|
href
|
|
} = props,
|
|
restProps = BreadcrumbItem_rest(props, ["prefixCls", "children", "href"]);
|
|
const {
|
|
getPrefixCls
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(InternalBreadcrumbItem, Object.assign({}, restProps, {
|
|
prefixCls: prefixCls
|
|
}), renderItem(prefixCls, restProps, children, href));
|
|
};
|
|
BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
|
|
/* harmony default export */ var breadcrumb_BreadcrumbItem = (BreadcrumbItem);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
var style = __webpack_require__(17313);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(37613);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/style/index.js
|
|
|
|
|
|
const genBreadcrumbStyle = token => {
|
|
const {
|
|
componentCls,
|
|
iconCls
|
|
} = token;
|
|
return {
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
color: token.itemColor,
|
|
fontSize: token.fontSize,
|
|
[iconCls]: {
|
|
fontSize: token.iconFontSize
|
|
},
|
|
ol: {
|
|
display: 'flex',
|
|
flexWrap: 'wrap',
|
|
margin: 0,
|
|
padding: 0,
|
|
listStyle: 'none'
|
|
},
|
|
a: Object.assign({
|
|
color: token.linkColor,
|
|
transition: `color ${token.motionDurationMid}`,
|
|
padding: `0 ${token.paddingXXS}px`,
|
|
borderRadius: token.borderRadiusSM,
|
|
height: token.lineHeight * token.fontSize,
|
|
display: 'inline-block',
|
|
marginInline: -token.marginXXS,
|
|
'&:hover': {
|
|
color: token.linkHoverColor,
|
|
backgroundColor: token.colorBgTextHover
|
|
}
|
|
}, (0,style/* genFocusStyle */.Qy)(token)),
|
|
[`li:last-child`]: {
|
|
color: token.lastItemColor
|
|
},
|
|
[`${componentCls}-separator`]: {
|
|
marginInline: token.separatorMargin,
|
|
color: token.separatorColor
|
|
},
|
|
[`${componentCls}-link`]: {
|
|
[`
|
|
> ${iconCls} + span,
|
|
> ${iconCls} + a
|
|
`]: {
|
|
marginInlineStart: token.marginXXS
|
|
}
|
|
},
|
|
[`${componentCls}-overlay-link`]: {
|
|
borderRadius: token.borderRadiusSM,
|
|
height: token.lineHeight * token.fontSize,
|
|
display: 'inline-block',
|
|
padding: `0 ${token.paddingXXS}px`,
|
|
marginInline: -token.marginXXS,
|
|
[`> ${iconCls}`]: {
|
|
marginInlineStart: token.marginXXS,
|
|
fontSize: token.fontSizeIcon
|
|
},
|
|
'&:hover': {
|
|
color: token.linkHoverColor,
|
|
backgroundColor: token.colorBgTextHover,
|
|
a: {
|
|
color: token.linkHoverColor
|
|
}
|
|
},
|
|
a: {
|
|
'&:hover': {
|
|
backgroundColor: 'transparent'
|
|
}
|
|
}
|
|
},
|
|
// rtl style
|
|
[`&${token.componentCls}-rtl`]: {
|
|
direction: 'rtl'
|
|
}
|
|
})
|
|
};
|
|
};
|
|
// ============================== Export ==============================
|
|
/* harmony default export */ var breadcrumb_style = ((0,genComponentStyleHook/* default */.Z)('Breadcrumb', token => {
|
|
const BreadcrumbToken = (0,statistic/* merge */.TS)(token, {});
|
|
return [genBreadcrumbStyle(BreadcrumbToken)];
|
|
}, token => ({
|
|
itemColor: token.colorTextDescription,
|
|
lastItemColor: token.colorText,
|
|
iconFontSize: token.fontSize,
|
|
linkColor: token.colorTextDescription,
|
|
linkHoverColor: token.colorText,
|
|
separatorColor: token.colorTextDescription,
|
|
separatorMargin: token.marginXS
|
|
})));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/useItems.js
|
|
var useItems_rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
function route2item(route) {
|
|
const {
|
|
breadcrumbName,
|
|
children
|
|
} = route,
|
|
rest = useItems_rest(route, ["breadcrumbName", "children"]);
|
|
const clone = Object.assign({
|
|
title: breadcrumbName
|
|
}, rest);
|
|
if (children) {
|
|
clone.menu = {
|
|
items: children.map(_a => {
|
|
var {
|
|
breadcrumbName: itemBreadcrumbName
|
|
} = _a,
|
|
itemProps = useItems_rest(_a, ["breadcrumbName"]);
|
|
return Object.assign(Object.assign({}, itemProps), {
|
|
title: itemBreadcrumbName
|
|
});
|
|
})
|
|
};
|
|
}
|
|
return clone;
|
|
}
|
|
function useItems(items, routes) {
|
|
return (0,_react_17_0_2_react.useMemo)(() => {
|
|
if (items) {
|
|
return items;
|
|
}
|
|
if (routes) {
|
|
return routes.map(route2item);
|
|
}
|
|
return null;
|
|
}, [items, routes]);
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/Breadcrumb.js
|
|
"use client";
|
|
|
|
var Breadcrumb_rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getPath = (params, path) => {
|
|
if (path === undefined) {
|
|
return path;
|
|
}
|
|
let mergedPath = (path || '').replace(/^\//, '');
|
|
Object.keys(params).forEach(key => {
|
|
mergedPath = mergedPath.replace(`:${key}`, params[key]);
|
|
});
|
|
return mergedPath;
|
|
};
|
|
const Breadcrumb = props => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
separator = '/',
|
|
style,
|
|
className,
|
|
rootClassName,
|
|
routes: legacyRoutes,
|
|
items,
|
|
children,
|
|
itemRender,
|
|
params = {}
|
|
} = props,
|
|
restProps = Breadcrumb_rest(props, ["prefixCls", "separator", "style", "className", "rootClassName", "routes", "items", "children", "itemRender", "params"]);
|
|
const {
|
|
getPrefixCls,
|
|
direction,
|
|
breadcrumb
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
let crumbs;
|
|
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
const [wrapSSR, hashId] = breadcrumb_style(prefixCls);
|
|
const mergedItems = useItems(items, legacyRoutes);
|
|
if (false) {}
|
|
const mergedItemRender = useItemRender(prefixCls, itemRender);
|
|
if (mergedItems && mergedItems.length > 0) {
|
|
// generated by route
|
|
const paths = [];
|
|
const itemRenderRoutes = items || legacyRoutes;
|
|
crumbs = mergedItems.map((item, index) => {
|
|
const {
|
|
path,
|
|
key,
|
|
type,
|
|
menu,
|
|
overlay,
|
|
onClick,
|
|
className: itemClassName,
|
|
separator: itemSeparator,
|
|
dropdownProps
|
|
} = item;
|
|
const mergedPath = getPath(params, path);
|
|
if (mergedPath !== undefined) {
|
|
paths.push(mergedPath);
|
|
}
|
|
const mergedKey = key !== null && key !== void 0 ? key : index;
|
|
if (type === 'separator') {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(breadcrumb_BreadcrumbSeparator, {
|
|
key: mergedKey
|
|
}, itemSeparator);
|
|
}
|
|
const itemProps = {};
|
|
const isLastItem = index === mergedItems.length - 1;
|
|
if (menu) {
|
|
itemProps.menu = menu;
|
|
} else if (overlay) {
|
|
itemProps.overlay = overlay;
|
|
}
|
|
let {
|
|
href
|
|
} = item;
|
|
if (paths.length && mergedPath !== undefined) {
|
|
href = `#/${paths.join('/')}`;
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(InternalBreadcrumbItem, Object.assign({
|
|
key: mergedKey
|
|
}, itemProps, (0,pickAttrs/* default */.Z)(item, {
|
|
data: true,
|
|
aria: true
|
|
}), {
|
|
className: itemClassName,
|
|
dropdownProps: dropdownProps,
|
|
href: href,
|
|
separator: isLastItem ? '' : separator,
|
|
onClick: onClick,
|
|
prefixCls: prefixCls
|
|
}), mergedItemRender(item, params, itemRenderRoutes, paths, href));
|
|
});
|
|
} else if (children) {
|
|
const childrenLength = (0,toArray/* default */.Z)(children).length;
|
|
crumbs = (0,toArray/* default */.Z)(children).map((element, index) => {
|
|
if (!element) {
|
|
return element;
|
|
}
|
|
// =================== Warning =====================
|
|
if (false) {}
|
|
false ? 0 : void 0;
|
|
const isLastItem = index === childrenLength - 1;
|
|
return (0,reactNode/* cloneElement */.Tm)(element, {
|
|
separator: isLastItem ? '' : separator,
|
|
key: index
|
|
});
|
|
});
|
|
}
|
|
const breadcrumbClassName = _classnames_2_5_1_classnames_default()(prefixCls, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.className, {
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
}, className, rootClassName, hashId);
|
|
const mergedStyle = Object.assign(Object.assign({}, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.style), style);
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("nav", Object.assign({
|
|
className: breadcrumbClassName,
|
|
style: mergedStyle
|
|
}, restProps), /*#__PURE__*/_react_17_0_2_react.createElement("ol", null, crumbs)));
|
|
};
|
|
Breadcrumb.Item = breadcrumb_BreadcrumbItem;
|
|
Breadcrumb.Separator = breadcrumb_BreadcrumbSeparator;
|
|
if (false) {}
|
|
/* harmony default export */ var breadcrumb_Breadcrumb = (Breadcrumb);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js
|
|
"use client";
|
|
|
|
|
|
/* harmony default export */ var breadcrumb = (breadcrumb_Breadcrumb);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 60028:
|
|
/*!**********************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/upload/index.js ***!
|
|
\**********************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _Dragger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Dragger */ 71409);
|
|
/* harmony import */ var _Upload__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Upload */ 41945);
|
|
"use client";
|
|
|
|
|
|
|
|
const Upload = _Upload__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z;
|
|
Upload.Dragger = _Dragger__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z;
|
|
Upload.LIST_IGNORE = _Upload__WEBPACK_IMPORTED_MODULE_0__/* .LIST_IGNORE */ .E;
|
|
/* harmony default export */ __webpack_exports__.Z = (Upload);
|
|
|
|
/***/ })
|
|
|
|
}]); |