autoUpdataFile

dev_local_v9_zzxy
eduauto 1 year ago
parent 71c8ffcd64
commit 7b8ae40676

@ -27,7 +27,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.c26726c9.js"></script>
<script src="/react/build/umi.79e50812.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -505,9 +505,12 @@ var Navigation = function Navigation(_ref) {
children: [(record === null || record === void 0 ? void 0 : record.kind) == 'open_experiment' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: MyReservationmodules.cz_btn,
onClick: function onClick() {
setOpenSeeModal(true);
setModalType('查看');
setInfoData(record);
// setOpenSeeModal(true)
// setModalType('查看')
// setInfoData(record)
_umi_production_exports.history.push("/laboratory/openReservation/".concat(record === null || record === void 0 ? void 0 : record.container_id));
// history.push(`1`)
},
children: "\u67E5\u770B"
}), ((record === null || record === void 0 ? void 0 : record.status) == 'waiting' || (record === null || record === void 0 ? void 0 : record.status) == 'reviewing') && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {

@ -0,0 +1,966 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[51810],{
/***/ 13942:
/*!******************************************************************************************!*\
!*** ./src/pages/Laboratory/OpenReservation/OpenReservationDetail/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_OpenReservationDetail; }
});
// 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/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/OpenReservationDetail/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var OpenReservationDetailmodules = ({"back_style":"back_style___Kt501","header_div":"header_div___bqPUB","header_title":"header_title___UoBqy","search":"search___WwJzq","searchIcon":"searchIcon___Il82z","search_params":"search_params___Yxl8R","formWrap":"formWrap___FVmkK","cz_btn":"cz_btn___yQ4KO","list_item":"list_item___bXoQo","add_Data":"add_Data___Fm7Rb","tj_Data":"tj_Data___yXfzM","jdy_dom":"jdy_dom___Hvx62","jdy_title_con":"jdy_title_con___Aa3Xk","con_title":"con_title___jenIy","title_status":"title_status___GYNtA","title_name":"title_name___tI6T7","content_list":"content_list___bw9hR","content":"content___kdzaS","content_img":"content_img___EN5Or","content_id":"content_id___DJFBM","content_name":"content_name___uAdFo","content_params":"content_params___yqoax","params_title":"params_title___p6iRv","params_content":"params_content___YcSXh"});
// 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/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/button/index.js
var es_button = __webpack_require__(3113);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tabs/index.js + 24 modules
var tabs = __webpack_require__(99313);
// 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/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/select/index.js
var es_select = __webpack_require__(57809);
// EXTERNAL MODULE: ./src/service/laboratory.ts
var laboratory = __webpack_require__(39531);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(95972);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(69423);
// 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: ./src/components/RenderHtml/index.tsx + 2 modules
var RenderHtml = __webpack_require__(85681);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(82710);
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
var NoData = __webpack_require__(63017);
// EXTERNAL MODULE: ./src/assets/images/roomInitImgMaterials.png
var roomInitImgMaterials = __webpack_require__(3416);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Laboratory/OpenReservation/OpenReservationDetail/index.tsx
var statusType = {
'unstart': {
name: '未开始',
color: '#9096A3',
background: 'rgba(144, 150, 163, 0.1)'
},
'running': {
name: '进行中',
color: '#00B187',
background: 'rgba(0, 177, 135, 0.1)'
},
'completed': {
name: '已完成',
color: '#E30000',
background: 'rgba(227, 0, 0, 0.1)'
}
};
var Dragger = upload/* default */.Z.Dragger;
var unitType = {
1: '个',
2: '套',
3: '袋',
4: '条',
5: '根',
6: '升',
7: '毫升'
};
var OpenReservationDetail = function OpenReservationDetail(_ref) {
var _statusType$titledata, _statusType$titledata2, _statusType$titledata3, _titledata$substance_, _titledata$substance_2, _ref3, _titledata$substances, _titledata$substances2, _infoData$attachments, _infoData$attachments2, _user$userInfo2;
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 _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)({
content: "",
type: ""
}),
_useState6 = slicedToArray_default()(_useState5, 2),
data = _useState6[0],
setData = _useState6[1];
//分页
var _useState7 = (0,_react_17_0_2_react.useState)(0),
_useState8 = slicedToArray_default()(_useState7, 2),
total = _useState8[0],
setTotal = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(1),
_useState10 = slicedToArray_default()(_useState9, 2),
page = _useState10[0],
setPage = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(10),
_useState12 = slicedToArray_default()(_useState11, 2),
limit = _useState12[0],
setLimit = _useState12[1];
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
myForm = _Form$useForm2[0];
var _useState13 = (0,_react_17_0_2_react.useState)(false),
_useState14 = slicedToArray_default()(_useState13, 2),
openSeeModal = _useState14[0],
setOpenSeeModal = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)({}),
_useState16 = slicedToArray_default()(_useState15, 2),
infoData = _useState16[0],
setInfoData = _useState16[1];
//新增
var _useState17 = (0,_react_17_0_2_react.useState)(false),
_useState18 = slicedToArray_default()(_useState17, 2),
openMyModal = _useState18[0],
setOpenMyModal = _useState18[1];
var _useState19 = (0,_react_17_0_2_react.useState)([]),
_useState20 = slicedToArray_default()(_useState19, 2),
directorsList = _useState20[0],
setDirectorsList = _useState20[1];
var _useState21 = (0,_react_17_0_2_react.useState)(false),
_useState22 = slicedToArray_default()(_useState21, 2),
spinning = _useState22[0],
setSpinning = _useState22[1];
var _useState23 = (0,_react_17_0_2_react.useState)(),
_useState24 = slicedToArray_default()(_useState23, 2),
titledata = _useState24[0],
settitledata = _useState24[1];
var _useState25 = (0,_react_17_0_2_react.useState)(false),
_useState26 = slicedToArray_default()(_useState25, 2),
openModal = _useState26[0],
setOpenModal = _useState26[1];
var _useState27 = (0,_react_17_0_2_react.useState)('1'),
_useState28 = slicedToArray_default()(_useState27, 2),
tablekey = _useState28[0],
settablekey = _useState28[1];
(0,_react_17_0_2_react.useEffect)(function () {
getData(false);
}, [page]);
(0,_react_17_0_2_react.useEffect)(function () {
getData(true);
}, [keyword, limit]);
(0,_react_17_0_2_react.useEffect)(function () {
//预约人
(0,service_user/* user_table_query */.bn)({
open_experiment_id: urlParam === null || urlParam === void 0 ? void 0 : urlParam.id
}).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);
});
gettitle();
}, []);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(flag) {
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
setSpinning(true);
if (flag) {
setPage(1);
}
_context.next = 4;
return (0,laboratory/* open_experiments_detail */.EH)({
id: urlParam === null || urlParam === void 0 ? void 0 : urlParam.id,
page: page,
limit: limit,
keyword: keyword
}).then(function (res) {
var _res$data2, _res$data3;
setTotal(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.count);
setTableData(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.list);
});
case 4:
setSpinning(false);
case 5:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData(_x) {
return _ref2.apply(this, arguments);
};
}();
function gettitle() {
return _gettitle.apply(this, arguments);
}
function _gettitle() {
_gettitle = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
var res;
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return (0,fetch/* default */.ZP)("/api/zz_classrooms/open_experiments/".concat(urlParam === null || urlParam === void 0 ? void 0 : urlParam.id, ".json"), {
method: 'get'
});
case 2:
res = _context5.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
settitledata(res === null || res === void 0 ? void 0 : res.data);
}
case 4:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _gettitle.apply(this, arguments);
}
var columns = [{
title: '预约人',
dataIndex: 'user_name',
"with": 120,
ellipsis: true,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: text || '--'
});
}
}, {
title: '角色',
"with": 120,
dataIndex: 'user_role',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text == 'student' ? '学员' : '教员',
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text == 'student' ? '学员' : '教员'
})
});
}
}, {
title: '预约房间',
"with": 120,
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: '所属实验室',
"with": 120,
dataIndex: 'classroom_room_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: 'student_id',
ellipsis: true,
"with": 120,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: text || '--'
});
}
}, {
title: '手机',
dataIndex: 'user_phone',
ellipsis: true,
"with": 120,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: text || '--'
});
}
}, {
title: '邮箱',
dataIndex: 'mail',
"with": 120,
ellipsis: true,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: text || '--'
});
}
}, {
title: '操作',
ellipsis: true,
width: 200,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer"
},
onClick: function onClick() {
setInfoData(record);
setOpenSeeModal(true);
},
children: "\u67E5\u770B\u5B9E\u9A8C\u7B80\u62A5"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#5F6367",
marginLeft: "15px",
cursor: "pointer"
},
onClick: function onClick() {
modal/* default */.Z.confirm({
centered: true,
okText: '确定',
cancelText: '取消',
title: "提示",
content: "\u8BF7\u786E\u8BA4\u662F\u5426\u53D6\u6D88\u9884\u7EA6",
onOk: function () {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
(0,laboratory/* cancel_reservation */.T$)({
id: record === null || record === void 0 ? void 0 : record.id,
reservation_id: record === null || record === void 0 ? void 0 : record.reservation_id
}).then(function (res) {
if (res.status === 0) {
message/* default */.ZP.success('取消成功');
getData(true);
}
});
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
function onOk() {
return _onOk.apply(this, arguments);
}
return onOk;
}()
});
},
children: "\u53D6\u6D88\u9884\u7EA6"
})]
});
}
}].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);
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: OpenReservationDetailmodules.back_style,
style: {
display: 'flex',
alignItems: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
onClick: function onClick() {
_umi_production_exports.history.push("/laboratory/openReservation");
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-fanhui2 font12 mr5"
}), titledata === null || titledata === void 0 ? void 0 : titledata.name]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
flex: 1,
textAlign: 'end'
},
children: (titledata === null || titledata === void 0 ? void 0 : titledata.can_reservation) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
onClick: function onClick() {
setOpenModal(true);
},
children: "\u9884\u7EA6\u5B9E\u9A8C"
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginTop: 50,
display: 'flex'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
style: {
width: 150,
marginRight: 20
},
src: (env/* default */.Z === null || env/* default */.Z === void 0 ? void 0 : env/* default */.Z.IMG_SERVER) + '/' + (titledata === null || titledata === void 0 ? void 0 : titledata.image)
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
alignItems: 'center',
marginBottom: 10
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.title_status,
style: {
color: (_statusType$titledata = statusType[titledata === null || titledata === void 0 ? void 0 : titledata.status]) === null || _statusType$titledata === void 0 ? void 0 : _statusType$titledata.color,
background: (_statusType$titledata2 = statusType[titledata === null || titledata === void 0 ? void 0 : titledata.status]) === null || _statusType$titledata2 === void 0 ? void 0 : _statusType$titledata2.background
},
children: (_statusType$titledata3 = statusType[titledata === null || titledata === void 0 ? void 0 : titledata.status]) === null || _statusType$titledata3 === void 0 ? void 0 : _statusType$titledata3.name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.title_name,
children: titledata === null || titledata === void 0 ? void 0 : titledata.name
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
fontSize: '12px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: OpenReservationDetailmodules.jdy_dom,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: OpenReservationDetailmodules.con_title,
children: "\u6559\u5BFC\u5458"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.jdy_title_con,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: titledata === null || titledata === void 0 ? void 0 : titledata.teachers.map(function (info, index) {
var _titledata$teachers;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: [info === null || info === void 0 ? void 0 : info.name, index == (titledata === null || titledata === void 0 || (_titledata$teachers = titledata.teachers) === null || _titledata$teachers === void 0 ? void 0 : _titledata$teachers.length) - 1 ? '' : '、']
});
}),
children: titledata === null || titledata === void 0 ? void 0 : titledata.teachers.map(function (info, index) {
var _titledata$teachers2;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: [info === null || info === void 0 ? void 0 : info.name, index == (titledata === null || titledata === void 0 || (_titledata$teachers2 = titledata.teachers) === null || _titledata$teachers2 === void 0 ? void 0 : _titledata$teachers2.length) - 1 ? '' : '、']
});
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mr40",
style: {
display: 'flex'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: OpenReservationDetailmodules.con_title,
children: "\u5B9E\u9A8C\u5BA4\u5206\u5BA4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.jdy_title_con,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: titledata === null || titledata === void 0 ? void 0 : titledata.classroom_room_name,
children: (titledata === null || titledata === void 0 ? void 0 : titledata.classroom_room_name) || '暂无分室'
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: OpenReservationDetailmodules.con_title,
children: "\u65F6\u95F4"
}), dayjs_min_default()(titledata === null || titledata === void 0 ? void 0 : titledata.start_time).format('YYYY-MM-DD hh:mm'), "~", dayjs_min_default()(titledata === null || titledata === void 0 ? void 0 : titledata.end_time).format('YYYY-MM-DD hh:mm')]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
display: 'flex',
fontSize: '12px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: OpenReservationDetailmodules.jdy_dom,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: OpenReservationDetailmodules.con_title,
children: "\u62A5\u540D\u622A\u6B62\u65F6\u95F4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.jdy_title_con,
children: (titledata === null || titledata === void 0 ? void 0 : titledata.finish_time) || '- -'
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
display: 'flex',
fontSize: '12px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: OpenReservationDetailmodules.jdy_dom,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: OpenReservationDetailmodules.con_title,
children: "\u6240\u9700\u7269\u8D44\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.jdy_title_con,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: titledata === null || titledata === void 0 || (_titledata$substance_ = titledata.substance_names) === null || _titledata$substance_ === void 0 ? void 0 : _titledata$substance_.join('、'),
children: (titledata === null || titledata === void 0 || (_titledata$substance_2 = titledata.substance_names) === null || _titledata$substance_2 === void 0 ? void 0 : _titledata$substance_2.join('、')) || '暂无物资需求'
})
})]
})
})]
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z, {
defaultActiveKey: "1",
onChange: function onChange(key) {
settablekey(key);
},
items: (_ref3 = [{
label: '所需物资',
key: '1'
}, (titledata === null || titledata === void 0 ? void 0 : titledata.show_detail) && {
label: '预约详情',
key: '2'
}]) === null || _ref3 === void 0 ? void 0 : _ref3.filter(function (item) {
return !!item;
})
}), tablekey === '1' && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: (titledata === null || titledata === void 0 || (_titledata$substances = titledata.substances) === null || _titledata$substances === void 0 ? void 0 : _titledata$substances.length) > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.content_list,
children: titledata === null || titledata === void 0 || (_titledata$substances2 = titledata.substances) === null || _titledata$substances2 === void 0 ? void 0 : _titledata$substances2.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: OpenReservationDetailmodules.content,
onClick: function onClick() {
// history.push(`/materials/itemAssets/${item?.id}/info?backUrl=/materials/itemAssets&indexType=0`)
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: OpenReservationDetailmodules.content_img,
src: item !== null && item !== void 0 && item.image ? env/* default */.Z.API_SERVER + '/' + (item === null || item === void 0 ? void 0 : item.image) : roomInitImgMaterials
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: OpenReservationDetailmodules.content_id,
children: ["\u7269\u8D44\u7F16\u53F7\uFF1A", item === null || item === void 0 ? void 0 : item.number]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.content_name,
children: item === null || item === void 0 ? void 0 : item.title
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: OpenReservationDetailmodules.content_params,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.params_title,
children: "\u578B\u53F7\u89C4\u683C\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: item === null || item === void 0 ? void 0 : item.model,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.params_content,
children: item === null || item === void 0 ? void 0 : item.model
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: OpenReservationDetailmodules.content_params,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.params_title,
children: "\u6240\u5728\u5B9E\u9A8C\u5BA4\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: item === null || item === void 0 ? void 0 : item.classroom_titile,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.params_content,
children: (item === null || item === void 0 ? void 0 : item.classroom_titile) || '--'
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: OpenReservationDetailmodules.content_params,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.params_title,
children: "\u6240\u5728\u623F\u95F4\u53F7\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: item === null || item === void 0 ? void 0 : item.classroom_room_title,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.params_content,
children: (item === null || item === void 0 ? void 0 : item.classroom_room_title) || '--'
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: OpenReservationDetailmodules.content_params,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.params_title,
children: "\u603B\u6570\u91CF\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "".concat(item === null || item === void 0 ? void 0 : item.total).concat(unitType[item === null || item === void 0 ? void 0 : item.unit], "(\u5269\u4F59").concat(item === null || item === void 0 ? void 0 : item.apply_total).concat(unitType[item === null || item === void 0 ? void 0 : item.unit], "\u53EF\u7533\u8BF7)"),
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: OpenReservationDetailmodules.params_content,
children: [item === null || item === void 0 ? void 0 : item.total, unitType[item === null || item === void 0 ? void 0 : item.unit], /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: "#01795D",
marginLeft: '5px'
},
children: ["(\u5269\u4F59", item === null || item === void 0 ? void 0 : item.apply_total, unitType[item === null || item === void 0 ? void 0 : item.unit], "\u53EF\u7533\u8BF7)"]
})]
})
})]
})]
}, index);
})
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
customText: "\u6682\u65E0\u6570\u636E"
})
}), tablekey === '2' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(OpenReservationDetailmodules.header_div),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
placeholder: "\u8BF7\u8F93\u5165\u9884\u7EA6\u4EBA\u540D\u79F0\u641C\u7D22",
size: "large",
className: OpenReservationDetailmodules.search,
value: keyword,
onChange: function onChange(e) {
setkeyword(e.target.value);
},
onSearch: function onSearch(value) {
setkeyword(value);
},
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-sousuo9 font14 ".concat(OpenReservationDetailmodules.searchIcon),
onClick: function onClick() {
setkeyword(keyword);
getData(true);
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.add_Data,
onClick: function onClick() {
setOpenMyModal(true);
},
children: "\u589E\u52A0\u9884\u7EA6"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.add_Data,
onClick: function onClick() {
(0,util/* downLoadFile */.FH)('', (0,util/* setUrlQuery */.NY)({
url: env/* default */.Z.API_SERVER + "/api/zz_classrooms/open_experiments/".concat(urlParam === null || urlParam === void 0 ? void 0 : urlParam.id, "/reservations.xlsx"),
query: {}
}));
},
children: "\u5BFC\u51FA"
})]
})]
}), /*#__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: OpenReservationDetailmodules.my_modal,
open: openMyModal,
title: "\u65B0\u5EFA\u9884\u7EA6",
width: "600px",
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.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 _context3.stop();
}
}, _callee3);
})),
onCancel: function onCancel() {
setOpenMyModal(false);
myForm === null || myForm === void 0 || myForm.resetFields();
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
className: OpenReservationDetailmodules.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: (titledata === null || titledata === void 0 ? void 0 : titledata.name) || '--'
})
}), /*#__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: (titledata === null || titledata === void 0 ? void 0 : titledata.classroom_room_name) || '--'
})
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
maskClosable: false,
centered: true,
keyboard: false,
destroyOnClose: true,
className: OpenReservationDetailmodules.my_modal,
open: openSeeModal,
title: "\u5B9E\u9A8C\u7B80\u62A5",
width: "600px",
onOk: function onOk() {
setOpenSeeModal(false);
},
onCancel: function onCancel() {
setOpenSeeModal(false);
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
form: myForm,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u5B9E\u9A8C\u540D\u79F0",
children: infoData === null || infoData === void 0 ? void 0 : infoData.user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u5185\u5BB9",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: infoData === null || infoData === void 0 ? void 0 : infoData.report_content
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u8D44\u6E90",
children: (infoData === null || infoData === void 0 || (_infoData$attachments = infoData.attachments) === null || _infoData$attachments === void 0 ? void 0 : _infoData$attachments.length) > 0 && (infoData === null || infoData === void 0 || (_infoData$attachments2 = infoData.attachments) === null || _infoData$attachments2 === void 0 ? void 0 : _infoData$attachments2.map(function (items) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
display: 'flex'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#3061D0',
cursor: 'pointer'
},
onClick: function onClick() {
return (0,util/* downLoadLink */.Nd)(items === null || items === void 0 ? void 0 : items.name, env/* default */.Z.API_SERVER + (items === null || items === void 0 ? void 0 : items.url));
},
children: (items === null || items === void 0 ? void 0 : items.title) || '--'
})
});
}))
})]
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
maskClosable: false,
centered: true,
keyboard: false,
destroyOnClose: true,
className: OpenReservationDetailmodules.formWrap,
open: openModal,
title: "\u521B\u5EFA\u9884\u7EA6",
width: "400px",
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
var _user$userInfo;
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return (0,laboratory/* public_open_experiments */.GU)({
id: titledata === null || titledata === void 0 ? void 0 : titledata.id,
reservation_user_id: user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.user_id
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('操作成功');
getData(true);
}
});
case 2:
setOpenModal(false);
case 3:
case "end":
return _context4.stop();
}
}, _callee4);
})),
onCancel: function onCancel() {
setOpenModal(false);
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u9884\u7EA6\u4EBA: ", user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.username]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
margin: '15px 0'
},
children: ["\u9884\u7EA6\u5B9E\u9A8C\u5BA4: ", titledata === null || titledata === void 0 ? void 0 : titledata.name]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u9884\u7EA6\u623F\u95F4\u53F7: ", titledata === null || titledata === void 0 ? void 0 : titledata.classroom_room_name]
})]
})
})]
});
};
/* harmony default export */ var OpenReservation_OpenReservationDetail = ((0,_umi_production_exports.connect)(function (_ref6) {
var loading = _ref6.loading,
engineeringNavigtion = _ref6.engineeringNavigtion,
user = _ref6.user;
return objectSpread2_default()(objectSpread2_default()({
loading: loading
}, engineeringNavigtion), {}, {
user: user
});
})(OpenReservationDetail));
/***/ }),
/***/ 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);
/***/ })
}]);

@ -1,613 +0,0 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[51810],{
/***/ 13942:
/*!******************************************************************************************!*\
!*** ./src/pages/Laboratory/OpenReservation/OpenReservationDetail/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_OpenReservationDetail; }
});
// 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/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/OpenReservationDetail/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var OpenReservationDetailmodules = ({"back_style":"back_style___Kt501","header_div":"header_div___bqPUB","header_title":"header_title___UoBqy","search":"search___WwJzq","searchIcon":"searchIcon___Il82z","search_params":"search_params___Yxl8R","formWrap":"formWrap___FVmkK","cz_btn":"cz_btn___yQ4KO","list_item":"list_item___bXoQo","add_Data":"add_Data___Fm7Rb","tj_Data":"tj_Data___yXfzM"});
// 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/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/input/index.js + 3 modules
var input = __webpack_require__(92832);
// 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/select/index.js
var es_select = __webpack_require__(57809);
// EXTERNAL MODULE: ./src/service/laboratory.ts
var laboratory = __webpack_require__(39531);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(95972);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(69423);
// EXTERNAL MODULE: ./src/service/user.ts
var service_user = __webpack_require__(43255);
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 2 modules
var RenderHtml = __webpack_require__(85681);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Laboratory/OpenReservation/OpenReservationDetail/index.tsx
var Dragger = upload/* default */.Z.Dragger;
var OpenReservationDetail = function OpenReservationDetail(_ref) {
var _infoData$attachments, _infoData$attachments2;
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)({
content: "",
type: ""
}),
_useState6 = slicedToArray_default()(_useState5, 2),
data = _useState6[0],
setData = _useState6[1];
//分页
var _useState7 = (0,_react_17_0_2_react.useState)(0),
_useState8 = slicedToArray_default()(_useState7, 2),
total = _useState8[0],
setTotal = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(1),
_useState10 = slicedToArray_default()(_useState9, 2),
page = _useState10[0],
setPage = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(10),
_useState12 = slicedToArray_default()(_useState11, 2),
limit = _useState12[0],
setLimit = _useState12[1];
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
myForm = _Form$useForm2[0];
var _useState13 = (0,_react_17_0_2_react.useState)(false),
_useState14 = slicedToArray_default()(_useState13, 2),
openSeeModal = _useState14[0],
setOpenSeeModal = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)({}),
_useState16 = slicedToArray_default()(_useState15, 2),
infoData = _useState16[0],
setInfoData = _useState16[1];
//新增
var _useState17 = (0,_react_17_0_2_react.useState)(false),
_useState18 = slicedToArray_default()(_useState17, 2),
openMyModal = _useState18[0],
setOpenMyModal = _useState18[1];
var _useState19 = (0,_react_17_0_2_react.useState)([]),
_useState20 = slicedToArray_default()(_useState19, 2),
directorsList = _useState20[0],
setDirectorsList = _useState20[1];
var _useState21 = (0,_react_17_0_2_react.useState)(false),
_useState22 = slicedToArray_default()(_useState21, 2),
spinning = _useState22[0],
setSpinning = _useState22[1];
(0,_react_17_0_2_react.useEffect)(function () {
getData(false);
}, [page]);
(0,_react_17_0_2_react.useEffect)(function () {
getData(true);
}, [keyword, limit]);
(0,_react_17_0_2_react.useEffect)(function () {
//预约人
(0,service_user/* user_table_query */.bn)({
open_experiment_id: urlParam === null || urlParam === void 0 ? void 0 : urlParam.id
}).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);
});
}, []);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(flag) {
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
setSpinning(true);
if (flag) {
setPage(1);
}
_context.next = 4;
return (0,laboratory/* open_experiments_detail */.EH)({
id: urlParam === null || urlParam === void 0 ? void 0 : urlParam.id,
page: page,
limit: limit,
keyword: keyword
}).then(function (res) {
var _res$data2, _res$data3;
setTotal(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.count);
setTableData(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.list);
});
case 4:
setSpinning(false);
case 5:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData(_x) {
return _ref2.apply(this, arguments);
};
}();
var columns = [{
title: '预约人',
dataIndex: 'user_name',
"with": 120,
ellipsis: true,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: text || '--'
});
}
}, {
title: '角色',
"with": 120,
dataIndex: 'user_role',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text == 'student' ? '学员' : '教员',
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text == 'student' ? '学员' : '教员'
})
});
}
}, {
title: '预约房间',
"with": 120,
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: '所属实验室',
"with": 120,
dataIndex: 'classroom_room_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: 'student_id',
ellipsis: true,
"with": 120,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: text || '--'
});
}
}, {
title: '手机',
dataIndex: 'user_phone',
ellipsis: true,
"with": 120,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: text || '--'
});
}
}, {
title: '邮箱',
dataIndex: 'mail',
"with": 120,
ellipsis: true,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: text || '--'
});
}
}, {
title: '操作',
ellipsis: true,
width: 200,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer"
},
onClick: function onClick() {
setInfoData(record);
setOpenSeeModal(true);
},
children: "\u67E5\u770B\u5B9E\u9A8C\u7B80\u62A5"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#5F6367",
marginLeft: "15px",
cursor: "pointer"
},
onClick: function onClick() {
modal/* default */.Z.confirm({
centered: true,
okText: '确定',
cancelText: '取消',
title: "提示",
content: "\u8BF7\u786E\u8BA4\u662F\u5426\u53D6\u6D88\u9884\u7EA6",
onOk: function () {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
(0,laboratory/* cancel_reservation */.T$)({
id: record === null || record === void 0 ? void 0 : record.id,
reservation_id: record === null || record === void 0 ? void 0 : record.reservation_id
}).then(function (res) {
if (res.status === 0) {
message/* default */.ZP.success('取消成功');
getData(true);
}
});
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
function onOk() {
return _onOk.apply(this, arguments);
}
return onOk;
}()
});
},
children: "\u53D6\u6D88\u9884\u7EA6"
})]
});
}
}].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);
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(OpenReservationDetailmodules.header_div),
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: OpenReservationDetailmodules.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: OpenReservationDetailmodules.header_title,
children: "\u9884\u7EA6\u72B6\u6001"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
placeholder: "\u8BF7\u8F93\u5165\u9884\u7EA6\u4EBA\u540D\u79F0\u641C\u7D22",
size: "large",
className: OpenReservationDetailmodules.search,
value: keyword,
onChange: function onChange(e) {
setkeyword(e.target.value);
},
onSearch: function onSearch(value) {
setkeyword(value);
},
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-sousuo9 font14 ".concat(OpenReservationDetailmodules.searchIcon),
onClick: function onClick() {
setkeyword(keyword);
getData(true);
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.add_Data,
onClick: function onClick() {
setOpenMyModal(true);
},
children: "\u589E\u52A0\u9884\u7EA6"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationDetailmodules.add_Data,
onClick: function onClick() {
(0,util/* downLoadFile */.FH)('', (0,util/* setUrlQuery */.NY)({
url: env/* default */.Z.API_SERVER + "/api/zz_classrooms/open_experiments/".concat(urlParam === null || urlParam === void 0 ? void 0 : urlParam.id, "/reservations.xlsx"),
query: {}
}));
},
children: "\u5BFC\u51FA"
})]
})]
}), /*#__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: OpenReservationDetailmodules.my_modal,
open: openMyModal,
title: "\u65B0\u5EFA\u9884\u7EA6",
width: "600px",
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.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 _context3.stop();
}
}, _callee3);
})),
onCancel: function onCancel() {
setOpenMyModal(false);
myForm === null || myForm === void 0 || myForm.resetFields();
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
className: OpenReservationDetailmodules.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 || '--'
})
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
maskClosable: false,
centered: true,
keyboard: false,
destroyOnClose: true,
className: OpenReservationDetailmodules.my_modal,
open: openSeeModal,
title: "\u5B9E\u9A8C\u7B80\u62A5",
width: "600px",
onOk: function onOk() {
setOpenSeeModal(false);
},
onCancel: function onCancel() {
setOpenSeeModal(false);
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
form: myForm,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u5B9E\u9A8C\u540D\u79F0",
children: infoData === null || infoData === void 0 ? void 0 : infoData.user_name
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u5185\u5BB9",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: infoData === null || infoData === void 0 ? void 0 : infoData.report_content
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u8D44\u6E90",
children: (infoData === null || infoData === void 0 || (_infoData$attachments = infoData.attachments) === null || _infoData$attachments === void 0 ? void 0 : _infoData$attachments.length) > 0 && (infoData === null || infoData === void 0 || (_infoData$attachments2 = infoData.attachments) === null || _infoData$attachments2 === void 0 ? void 0 : _infoData$attachments2.map(function (items) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
display: 'flex'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#3061D0',
cursor: 'pointer'
},
onClick: function onClick() {
return (0,util/* downLoadLink */.Nd)(items === null || items === void 0 ? void 0 : items.name, env/* default */.Z.API_SERVER + (items === null || items === void 0 ? void 0 : items.url));
},
children: (items === null || items === void 0 ? void 0 : items.title) || '--'
})
});
}))
})]
})
})]
});
};
/* harmony default export */ var OpenReservation_OpenReservationDetail = ((0,_umi_production_exports.connect)(function (_ref4) {
var loading = _ref4.loading,
engineeringNavigtion = _ref4.engineeringNavigtion,
user = _ref4.user;
return objectSpread2_default()(objectSpread2_default()({
loading: loading
}, engineeringNavigtion), {}, {
user: user
});
})(OpenReservationDetail));
/***/ }),
/***/ 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);
/***/ })
}]);

@ -134,4 +134,117 @@
cursor: pointer;
margin-top: 3px;
}
.jdy_dom___Hvx62 {
display: flex;
}
.jdy_title_con___Aa3Xk {
max-width: 150px;
margin-right: 40px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.con_title___jenIy {
margin-right: 10px;
color: #5F6367;
font-size: 12px;
}
.title_status___GYNtA {
width: 52px;
height: 20px;
border-radius: 2px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 12px;
line-height: 12px;
text-align: left;
font-style: normal;
display: flex;
align-items: center;
justify-content: center;
margin-right: 8px;
}
.title_name___tI6T7 {
width: 510px;
height: 22px;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 14px;
color: #000000;
line-height: 22px;
text-align: left;
font-style: normal;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.content_list___bw9hR {
display: flex;
flex-wrap: wrap;
}
.content_list___bw9hR .content___kdzaS {
width: 222px;
height: 302px;
background: #FFFFFF;
margin: 0 20px 20px 0px;
box-shadow: 0px 2px 4px 0px #D6DAE1;
border-radius: 8px;
cursor: pointer;
position: relative;
}
.content_list___bw9hR .content___kdzaS .content_img___EN5Or {
width: 222px;
height: 140px;
box-shadow: 0px 2px 4px 0px #D6DAE1;
border-radius: 8px 8px 0px 0px;
}
.content_list___bw9hR .content___kdzaS .content_id___DJFBM {
width: 222px;
height: 36px;
line-height: 36px;
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
box-shadow: 0px 2px 4px 0px #D6DAE1;
position: absolute;
top: 104px;
color: #FFE7C8;
font-size: 12px;
font-weight: 400;
font-style: normal;
padding-left: 15px;
}
.content_list___bw9hR .content___kdzaS .content_name___uAdFo {
height: 26px;
font-size: 16px;
font-family: PingFangSC, PingFang SC;
font-weight: 600;
color: #20232B;
line-height: 26px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
margin-top: 10px;
margin-bottom: 5px;
padding: 0 15px;
}
.content_list___bw9hR .content___kdzaS .content_params___yqoax {
padding: 5px 15px;
display: flex;
}
.content_list___bw9hR .content___kdzaS .content_params___yqoax .params_title___p6iRv {
max-width: 80px;
color: #999999;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
font-size: 12px;
display: flex;
}
.content_list___bw9hR .content___kdzaS .content_params___yqoax .params_content___YcSXh {
color: #000F37;
width: 135px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
font-size: 12px;
}

@ -606,7 +606,7 @@ var OpenReservation = function OpenReservation(_ref) {
style: {
display: 'flex',
alignItems: 'center',
marginBottom: 20
marginBottom: 10
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: OpenReservationmodules.title_status,

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save