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.
699 lines
29 KiB
699 lines
29 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","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"});
|
|
// 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/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.jsxs)("div", {
|
|
className: "".concat(OpenReservationStatisticsmodules.header_div),
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: OpenReservationStatisticsmodules.back_style,
|
|
onClick: function onClick() {
|
|
_umi_production_exports.history.push("/laboratory/openReservation");
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-fanhui2 font12 mr5"
|
|
}), "\u8FD4\u56DE"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: OpenReservationStatisticsmodules.header_title,
|
|
children: "\u6982\u89C8\u7EDF\u8BA1"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
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: 120
|
|
},
|
|
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: 120
|
|
},
|
|
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: 120
|
|
},
|
|
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: 150
|
|
},
|
|
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: 150
|
|
},
|
|
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.tj_item,
|
|
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 mr5 ").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)(table/* default */.Z, {
|
|
loading: spinning,
|
|
pagination: false,
|
|
dataSource: tableData,
|
|
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", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
color: '#656F87'
|
|
},
|
|
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-light-primary",
|
|
children: total
|
|
}), "\u6761\u6570\u636E"]
|
|
})
|
|
}), /*#__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));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 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);
|
|
|
|
/***/ })
|
|
|
|
}]); |