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.
747 lines
32 KiB
747 lines
32 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[88501],{
|
|
|
|
/***/ 5958:
|
|
/*!***********************************************************!*\
|
|
!*** ./src/pages/ReservationDetail/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 */ ReservationDetail; }
|
|
});
|
|
|
|
// 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/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/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(79800);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(39647);
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
// 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__(25789);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 3 modules
|
|
var input = __webpack_require__(92832);
|
|
// 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/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: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
|
|
var spin = __webpack_require__(71418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/index.js + 12 modules
|
|
var date_picker = __webpack_require__(47119);
|
|
// 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/button/index.js
|
|
var es_button = __webpack_require__(3113);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(1710);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(58421);
|
|
;// CONCATENATED MODULE: ./src/pages/ReservationDetail/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var ReservationDetailmodules = ({"bg":"bg___C5aIe","wrap":"wrap___uIZPh","goBack":"goBack___fMJh4","cancel_dialog":"cancel_dialog___qY8CI","ant-modal-title":"ant-modal-title___Jsteo","footerWrap":"footerWrap___fSCJn","tag_btn":"tag_btn___MORGk","info":"info___B6v45","update":"update___v_S0T","xiajia":"xiajia___ROQJk","yuyue_info":"yuyue_info___IGzDh","yuyue_clear":"yuyue_clear___eKa_y","yuyue_update":"yuyue_update___JUp6h","baofei_info":"baofei_info___mt5ZE","yichang_info":"yichang_info___ECFi2","content":"content___OXkIt","box":"box___gogSw","left":"left___e14yQ","left_content":"left_content___Nu1bM","content_title":"content_title___urX6W","content_data":"content_data___qLBJh"});
|
|
// EXTERNAL MODULE: ./src/components/ReservationDialog/index.tsx + 1 modules
|
|
var ReservationDialog = __webpack_require__(81273);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(55794);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.19@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(66649);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
// EXTERNAL MODULE: ./src/service/shixuns.ts
|
|
var service_shixuns = __webpack_require__(22158);
|
|
// EXTERNAL MODULE: ./src/assets/img/new_data.png
|
|
var new_data = __webpack_require__(43150);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/ReservationDetail/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["globalSetting", "shixunsDetail", "user", "loading", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var TextArea = input/* default */.Z.TextArea;
|
|
var Reservation = function Reservation(_ref) {
|
|
var _shixunsDetail$detail, _shixunsDetail$detail3, _shixunsDetail$detail4, _user$userInfo, _shixunsDetail$detail5;
|
|
var globalSetting = _ref.globalSetting,
|
|
shixunsDetail = _ref.shixunsDetail,
|
|
user = _ref.user,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
var param = (0,_umi_production_exports.useParams)();
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
cancelDialog = _useState2[0],
|
|
setCancelDialog = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
updateDialog = _useState4[0],
|
|
setUpdateDialog = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)({}),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
selectItem = _useState6[0],
|
|
setSelectItem = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
spinLoading = _useState8[0],
|
|
setSpinLoading = _useState8[1];
|
|
// 实验室、设备标签
|
|
var _useState9 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
kd_classrooms = _useState10[0],
|
|
setKd_classrooms = _useState10[1];
|
|
var _useState11 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
tableData = _useState12[0],
|
|
setTableData = _useState12[1];
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(1),
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
page = _useState14[0],
|
|
setPage = _useState14[1];
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(10),
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
limit = _useState16[0],
|
|
setLimit = _useState16[1];
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(0),
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
total = _useState18[0],
|
|
setTotal = _useState18[1];
|
|
var _useState19 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
shixuns = _useState20[0],
|
|
setShixuns = _useState20[1];
|
|
// 预约弹窗
|
|
var _useState21 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
startDialog = _useState22[0],
|
|
setStartDialog = _useState22[1];
|
|
var _useState23 = (0,_react_17_0_2_react.useState)({}),
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
box = _useState24[0],
|
|
setBox = _useState24[1];
|
|
var _useState25 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
lableDialog = _useState26[0],
|
|
setLableDialog = _useState26[1];
|
|
var _useState27 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState28 = slicedToArray_default()(_useState27, 2),
|
|
yysmDialog = _useState28[0],
|
|
setYysmDialog = _useState28[1];
|
|
var _useState29 = (0,_react_17_0_2_react.useState)([{
|
|
id: '',
|
|
name: '全部'
|
|
}]),
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
departments = _useState30[0],
|
|
setDepartments = _useState30[1];
|
|
var _useState31 = (0,_react_17_0_2_react.useState)({}),
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
statistics = _useState32[0],
|
|
setStatistics = _useState32[1];
|
|
var defaultFormData = {
|
|
device_id: '',
|
|
date: dayjs_min_default()(),
|
|
role: '',
|
|
status: '',
|
|
shixun_id: '',
|
|
department_id: ''
|
|
};
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
form = _Form$useForm2[0];
|
|
var disabledDate = function disabledDate(time) {
|
|
return time > dayjs_min_default()().add(7 - new Date().getDay() + 7, 'd');
|
|
};
|
|
var onShowSizeChange = function onShowSizeChange(current, pageSize) {
|
|
setLimit(pageSize);
|
|
queryData();
|
|
};
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
// 获取实训详情
|
|
dispatch({
|
|
type: 'shixunsDetail/getShixunsDetail',
|
|
payload: {
|
|
id: param === null || param === void 0 ? void 0 : param.id
|
|
}
|
|
});
|
|
sessionStorage.setItem('reservation_time', dayjs_min_default()(new Date()).format('YYYY-MM-DD'));
|
|
// 学院列表
|
|
(0,service_shixuns/* college_table_query */.$2)({
|
|
page: 1,
|
|
per_page: 100
|
|
}).then(function (res) {
|
|
var _res$departments;
|
|
var arr = (res === null || res === void 0 || (_res$departments = res.departments) === null || _res$departments === void 0 ? void 0 : _res$departments.map(function (info) {
|
|
return {
|
|
value: info.id,
|
|
label: info.name
|
|
};
|
|
})) || [];
|
|
setDepartments(toConsumableArray_default()(arr));
|
|
});
|
|
//实验项目
|
|
(0,service_shixuns/* can_reservation_shixuns */.L$)().then(function (res) {
|
|
if (res !== null && res !== void 0 && res.reservation_shixun) {
|
|
setShixuns([{
|
|
id: '',
|
|
name: '全部'
|
|
}].concat(toConsumableArray_default()(res === null || res === void 0 ? void 0 : res.reservation_shixun)));
|
|
}
|
|
});
|
|
(0,service_shixuns/* reservation_data */.tV)(param === null || param === void 0 ? void 0 : param.id).then(function (res) {
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
setStatistics(res === null || res === void 0 ? void 0 : res.data);
|
|
}
|
|
});
|
|
}, []);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
form.setFieldsValue(defaultFormData);
|
|
}, [shixunsDetail === null || shixunsDetail === void 0 || (_shixunsDetail$detail = shixunsDetail.detail) === null || _shixunsDetail$detail === void 0 ? void 0 : _shixunsDetail$detail.id]);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
queryData();
|
|
}, [page]);
|
|
var queryData = function queryData() {
|
|
var _shixunsDetail$detail2;
|
|
(0,service_shixuns/* reservations_table_query */.ed)({
|
|
page: page,
|
|
limit: limit,
|
|
date: form.getFieldValue('date') ? dayjs_min_default()(form.getFieldValue('date')).format('YYYY-MM-DD') : '',
|
|
device_id: form.getFieldValue('device_id') || '',
|
|
role: form.getFieldValue('role') || '',
|
|
shixun_id: shixunsDetail === null || shixunsDetail === void 0 || (_shixunsDetail$detail2 = shixunsDetail.detail) === null || _shixunsDetail$detail2 === void 0 ? void 0 : _shixunsDetail$detail2.id,
|
|
status: form.getFieldValue('status') || '',
|
|
department_id: form.getFieldValue('department_id') || ''
|
|
}).then(function (res) {
|
|
setTableData(res === null || res === void 0 ? void 0 : res.reservations);
|
|
setTotal(res === null || res === void 0 ? void 0 : res.reservations_count);
|
|
});
|
|
};
|
|
var columns = [{
|
|
title: '序号',
|
|
key: 'index',
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: (page - 1) * limit + index + 1
|
|
});
|
|
}
|
|
}, {
|
|
title: '姓名',
|
|
key: 'user_name',
|
|
dataIndex: 'user_name'
|
|
}, {
|
|
title: '角色',
|
|
key: 'is_student',
|
|
dataIndex: 'is_student',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text ? '学员' : '教员'
|
|
});
|
|
}
|
|
}, {
|
|
title: '学院',
|
|
key: 'department',
|
|
dataIndex: 'department'
|
|
}, {
|
|
title: '实验项目',
|
|
key: 'shixun_name',
|
|
dataIndex: 'shixun_name'
|
|
}, {
|
|
title: '排队状态',
|
|
key: 'status',
|
|
dataIndex: 'status',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text === 'reviewing' ? '待审核' : text === 'waiting' ? '等待' : text === 'running' ? '运行' : text === 'completed' ? '完成' : text === 'rejected' ? '驳回' : text === 'approved' ? '已批准' : ''
|
|
});
|
|
}
|
|
}, {
|
|
title: '预约时间',
|
|
key: 'reservation_times',
|
|
dataIndex: 'reservation_times',
|
|
render: function render(text) {
|
|
return text === null || text === void 0 ? void 0 : text.map(function (v, k) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: (v === null || v === void 0 ? void 0 : v.name) + ' '
|
|
}, k);
|
|
});
|
|
}
|
|
}, {
|
|
title: '前方人数',
|
|
key: 'waiting_number',
|
|
dataIndex: 'waiting_number'
|
|
}, {
|
|
title: '预估等待(分)',
|
|
key: 'waiting_time',
|
|
dataIndex: 'waiting_time'
|
|
}, {
|
|
title: '操作',
|
|
key: 'cz',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [(text === null || text === void 0 ? void 0 : text.status) === 'waiting' && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.yuyue_clear,
|
|
onClick: function onClick() {
|
|
cancelReservation(record);
|
|
},
|
|
children: "\u53D6\u6D88\u9884\u7EA6"
|
|
}), (text === null || text === void 0 ? void 0 : text.status) === 'waiting' && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.yuyue_update,
|
|
onClick: function onClick() {
|
|
setSelectItem(record);
|
|
setUpdateDialog(true);
|
|
},
|
|
children: "\u8C03\u6574\u9884\u7EA6"
|
|
}), (text === null || text === void 0 ? void 0 : text.status) === 'reviewing' && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.update,
|
|
onClick: function onClick() {
|
|
reviewed(record, true, '');
|
|
},
|
|
children: "\u6279\u51C6"
|
|
}), (text === null || text === void 0 ? void 0 : text.status) === 'reviewing' && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.xiajia,
|
|
onClick: function onClick() {
|
|
setBox(text), setLableDialog(true);
|
|
},
|
|
children: "\u9A73\u56DE"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.yuyue_info,
|
|
onClick: function onClick() {
|
|
setSelectItem(record);
|
|
setYysmDialog(true);
|
|
},
|
|
children: "\u9884\u7EA6\u8BF4\u660E"
|
|
})]
|
|
});
|
|
}
|
|
}];
|
|
var cancelReservation = function cancelReservation(data) {
|
|
modal/* default */.Z.confirm({
|
|
title: '取消预约',
|
|
centered: true,
|
|
icon: null,
|
|
content: '取消该用户预约任务,建议先联系该用户,取消后用户可收到预约变动信息',
|
|
okText: '确认',
|
|
cancelText: '取消',
|
|
onOk: function onOk() {
|
|
(0,service_shixuns/* reservations_table_canceled */.$Y)(data === null || data === void 0 ? void 0 : data.id).then(function (res) {
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
message/* default */.ZP.success('取消预约成功');
|
|
queryData();
|
|
} else {
|
|
message/* default */.ZP.error(res === null || res === void 0 ? void 0 : res.message);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
};
|
|
var reviewed = function reviewed(box, flag, rejected_reason) {
|
|
(0,service_shixuns/* reservations_table_reviewed */.f6)({
|
|
id: box === null || box === void 0 ? void 0 : box.id,
|
|
status: flag,
|
|
rejected_reason: rejected_reason
|
|
}).then(function (res) {
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
if (flag) {
|
|
message/* default */.ZP.success('批准成功');
|
|
} else {
|
|
message/* default */.ZP.success('驳回成功');
|
|
}
|
|
queryData();
|
|
} else {
|
|
message/* default */.ZP.error(res === null || res === void 0 ? void 0 : res.message);
|
|
}
|
|
});
|
|
};
|
|
var onChange = function onChange(pageNumber) {
|
|
setPage(pageNumber);
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ReservationDetailmodules.bg,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ReservationDetailmodules.wrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
onClick: function onClick() {
|
|
_umi_production_exports.history.go(-1);
|
|
},
|
|
className: ReservationDetailmodules.goBack,
|
|
children: [' < ', "\u9884\u7EA6\u8BE6\u60C5"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
|
|
spinning: spinLoading,
|
|
delay: 500,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ReservationDetailmodules.box,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.left,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ReservationDetailmodules.left_content,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: new_data
|
|
}), "\u6570\u636E\u603B\u89C8"]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
width: '80%',
|
|
display: 'flex',
|
|
justifyContent: 'space-between',
|
|
marginLeft: '1.5%'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ReservationDetailmodules.content,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.content_title,
|
|
children: "\u603B\u5B8C\u6210\u9884\u7EA6\u6B21\u6570"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.content_data,
|
|
children: (statistics === null || statistics === void 0 ? void 0 : statistics.count) || 0
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ReservationDetailmodules.content,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.content_title,
|
|
children: "\u5B66\u5458\u5B8C\u6210\u9884\u7EA6\u6570"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.content_data,
|
|
children: (statistics === null || statistics === void 0 ? void 0 : statistics.student_count) || 0
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ReservationDetailmodules.content,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.content_title,
|
|
children: "\u6559\u5458\u5B8C\u6210\u9884\u7EA6\u6570"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.content_data,
|
|
children: (statistics === null || statistics === void 0 ? void 0 : statistics.teacher_count) || 0
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.left,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ReservationDetailmodules.left_content,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: new_data
|
|
}), "\u4ECA\u65E5\u6570\u636E"]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
width: '80%',
|
|
display: 'flex',
|
|
justifyContent: 'space-between',
|
|
marginLeft: '1.5%'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ReservationDetailmodules.content,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.content_title,
|
|
children: "\u5DF2\u7ECF\u5B8C\u6210\u9884\u7EA6\u4EBA\u6570"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.content_data,
|
|
children: (statistics === null || statistics === void 0 ? void 0 : statistics.completed_count) || 0
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ReservationDetailmodules.content,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.content_title,
|
|
children: "\u6B63\u5728\u4F7F\u7528\u4EBA\u6570"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.content_data,
|
|
children: (statistics === null || statistics === void 0 ? void 0 : statistics.running_count) || 0
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ReservationDetailmodules.content,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.content_title,
|
|
children: "\u6392\u961F\u4EBA\u6570"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.content_data,
|
|
children: (statistics === null || statistics === void 0 ? void 0 : statistics.waiting_count) || 0
|
|
})]
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
justifyContent: 'space-between',
|
|
alignItems: 'center',
|
|
marginBottom: 20
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
initialValues: defaultFormData,
|
|
form: form,
|
|
layout: "inline",
|
|
autoComplete: "off",
|
|
className: ReservationDetailmodules.search_list,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u9884\u7EA6\u65F6\u95F4",
|
|
name: "date",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker["default"], {
|
|
disabledDate: disabledDate,
|
|
onChange: queryData,
|
|
allowClear: true,
|
|
format: "YYYY-MM-DD"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u5B66\u9662",
|
|
name: "department_id",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
onChange: queryData,
|
|
allowClear: true,
|
|
style: {
|
|
width: '120px'
|
|
},
|
|
options: [{
|
|
value: '',
|
|
label: '全部'
|
|
}].concat(toConsumableArray_default()(departments))
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u6392\u961F\u72B6\u6001",
|
|
name: "status",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
onChange: queryData,
|
|
allowClear: true,
|
|
style: {
|
|
width: '120px'
|
|
},
|
|
options: [{
|
|
value: '',
|
|
label: '全部'
|
|
},
|
|
// { value: 'reviewing', label: '待审核' },
|
|
{
|
|
value: 'waiting',
|
|
label: '等待'
|
|
}, {
|
|
value: 'running',
|
|
label: '运行'
|
|
}, {
|
|
value: 'completed',
|
|
label: '完成'
|
|
}
|
|
// { value: 'rejected', label: '驳回' },
|
|
// { value: 'approved', label: '已批准' }
|
|
]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u89D2\u8272",
|
|
name: "role",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
onChange: queryData,
|
|
allowClear: true,
|
|
style: {
|
|
width: '120px'
|
|
},
|
|
options: [{
|
|
value: '',
|
|
label: '全部'
|
|
}, {
|
|
value: 1,
|
|
label: '学员'
|
|
}, {
|
|
value: 2,
|
|
label: '教员'
|
|
}]
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
size: "large",
|
|
type: "primary",
|
|
ghost: true,
|
|
onClick: function onClick() {
|
|
return setStartDialog(true);
|
|
},
|
|
children: "\u589E\u52A0\u9884\u7EA6"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
columns: columns,
|
|
pagination: false,
|
|
dataSource: tableData,
|
|
rowKey: function rowKey(record) {
|
|
return record.id;
|
|
}
|
|
}), total > limit && /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
showQuickJumper: true,
|
|
current: page,
|
|
pageSize: limit,
|
|
total: total,
|
|
onChange: onChange,
|
|
className: ReservationDetailmodules.page_style,
|
|
onShowSizeChange: onShowSizeChange
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ReservationDialog/* default */.Z, {
|
|
modalName: "\u589E\u52A0\u9884\u7EA6",
|
|
open: startDialog,
|
|
shixuns_detail_id: (_shixunsDetail$detail3 = shixunsDetail.detail) === null || _shixunsDetail$detail3 === void 0 ? void 0 : _shixunsDetail$detail3.id,
|
|
shixuns_detail_name: (_shixunsDetail$detail4 = shixunsDetail.detail) === null || _shixunsDetail$detail4 === void 0 ? void 0 : _shixunsDetail$detail4.name,
|
|
dataInfo: {
|
|
reservation_user_id: user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.user_id,
|
|
shixun_id: shixunsDetail === null || shixunsDetail === void 0 || (_shixunsDetail$detail5 = shixunsDetail.detail) === null || _shixunsDetail$detail5 === void 0 ? void 0 : _shixunsDetail$detail5.id
|
|
},
|
|
onCancel: function onCancel() {
|
|
setStartDialog(false);
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
|
|
visible: cancelDialog,
|
|
title: "\u53D6\u6D88\u9884\u7EA6",
|
|
width: "422px",
|
|
centered: true,
|
|
className: ReservationDetailmodules.cancel_dialog,
|
|
maskClosable: false,
|
|
footer: null,
|
|
onCancel: function onCancel() {
|
|
return setCancelDialog(false);
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: "\u8BF7\u786E\u8BA4\u662F\u5426\u53D6\u6D88\u8BE5\u9884\u7EA6\u4EFB\u52A1"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ReservationDetailmodules.footerWrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
className: "mr20",
|
|
size: "large",
|
|
onClick: function onClick() {
|
|
return setCancelDialog(false);
|
|
},
|
|
children: "\u53D6\u6D88"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
size: "large",
|
|
type: "primary",
|
|
ghost: true,
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return (0,fetch/* default */.ZP)("/api/zz_classrooms/reservations/".concat(selectItem === null || selectItem === void 0 ? void 0 : selectItem.id, "/canceled.json"), {
|
|
method: 'Get'
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
if (res.status == 0) {
|
|
message/* default */.ZP.success('操作成功');
|
|
setCancelDialog(false);
|
|
queryData();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
})),
|
|
children: "\u786E\u5B9A"
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ReservationDialog/* default */.Z, {
|
|
modalName: "\u8C03\u6574\u9884\u7EA6",
|
|
open: updateDialog,
|
|
shixuns_detail_id: selectItem === null || selectItem === void 0 ? void 0 : selectItem.shixun_id,
|
|
shixuns_detail_name: selectItem === null || selectItem === void 0 ? void 0 : selectItem.shixun_name,
|
|
dataInfo: selectItem,
|
|
onCancel: function onCancel(success) {
|
|
setUpdateDialog(false);
|
|
if (success) {
|
|
console.log("1111111");
|
|
queryData();
|
|
}
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
title: "\u9A73\u56DE",
|
|
width: 400,
|
|
visible: lableDialog,
|
|
onOk: function onOk() {
|
|
setLableDialog(false);
|
|
reviewed(box, false, form.getFieldValue('rejected_reason'));
|
|
},
|
|
onCancel: function onCancel() {
|
|
setLableDialog(false);
|
|
},
|
|
maskClosable: false,
|
|
centered: true,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z, {
|
|
form: form,
|
|
layout: "inline",
|
|
autoComplete: "off",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
name: "rejected_reason",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
|
|
placeholder: "\u8BF7\u8F93\u5165\u9A73\u56DE\u7406\u7531\uFF0C\u9884\u7EA6\u4EBA\u5C06\u6536\u5230\u9884\u7EA6\u5931\u8D25\u7684\u6D88\u606F\u901A\u77E5",
|
|
rows: 8,
|
|
cols: 38
|
|
})
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
title: "\u9884\u7EA6\u8BF4\u660E",
|
|
width: 400,
|
|
visible: yysmDialog,
|
|
onOk: function onOk() {
|
|
setYysmDialog(false);
|
|
},
|
|
onCancel: function onCancel() {
|
|
setYysmDialog(false);
|
|
},
|
|
maskClosable: false,
|
|
centered: true,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ReservationDetailmodules.content,
|
|
children: (selectItem === null || selectItem === void 0 ? void 0 : selectItem.description) || '--'
|
|
})
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var ReservationDetail = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
var globalSetting = _ref3.globalSetting,
|
|
shixunsDetail = _ref3.shixunsDetail,
|
|
user = _ref3.user,
|
|
loading = _ref3.loading;
|
|
return {
|
|
globalSetting: globalSetting,
|
|
shixunsDetail: shixunsDetail,
|
|
user: user,
|
|
loading: loading.models.index
|
|
};
|
|
})(Reservation));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 43150:
|
|
/*!*************************************!*\
|
|
!*** ./src/assets/img/new_data.png ***!
|
|
\*************************************/
|
|
/***/ (function(module) {
|
|
|
|
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAOZJREFUWEdjZBgAsOb1fpP/f/6dxmY14wC4h2HUQYRCfTSERkOIUAgQkh9NQ6MhRCgECMlTnob+NzAZHb+jhLXuYeN6eNZk1m9CjkCWp9hBuoejBBn/M77DZuk/5j8qV6xX3h11EDEhpLY/UoSDhakWW2ixfvhUedZ38zeQHN2iTOdouDLTX5Y72Bz0n/G/0GXbZe9HHTQaQujpAznbj6YhQgUjVUJI71D0LazZ9D9D8GX7pZdBcsSW1NRy0H+sPmdiMr1is/jMqIP0DkWPhhDeumw0hAjV9qMhNBpClDbQRtMQgTQEAAwnmDsFGBvrAAAAAElFTkSuQmCC";
|
|
|
|
/***/ })
|
|
|
|
}]); |