Auto Submit

dev_local_v9_test2
autosubmit 2 years ago
parent 6d96d734d2
commit d36a604b97

@ -14,6 +14,7 @@
/* harmony export */ FZ: function() { return /* binding */ substances_import; },
/* harmony export */ HM: function() { return /* binding */ substances_query; },
/* harmony export */ HX: function() { return /* binding */ substance_categories_delete; },
/* harmony export */ JQ: function() { return /* binding */ receives_cancel; },
/* harmony export */ K$: function() { return /* binding */ bills_create; },
/* harmony export */ M1: function() { return /* binding */ bills_delete; },
/* harmony export */ OV: function() { return /* binding */ me_substances_query; },
@ -21,6 +22,8 @@
/* harmony export */ Td: function() { return /* binding */ substance_categories_create; },
/* harmony export */ VT: function() { return /* binding */ bills_update; },
/* harmony export */ ZW: function() { return /* binding */ purchases_query; },
/* harmony export */ _$: function() { return /* binding */ receives_query; },
/* harmony export */ _P: function() { return /* binding */ receives_matches; },
/* harmony export */ aQ: function() { return /* binding */ purchases_update; },
/* harmony export */ cO: function() { return /* binding */ substance_details_query; },
/* harmony export */ eZ: function() { return /* binding */ bills_info; },
@ -33,9 +36,10 @@
/* harmony export */ xb: function() { return /* binding */ substance_categories_query; },
/* harmony export */ y_: function() { return /* binding */ substance_details_update; },
/* harmony export */ yu: function() { return /* binding */ substance_details_create; },
/* harmony export */ zG: function() { return /* binding */ purchases_info; }
/* harmony export */ zG: function() { return /* binding */ purchases_info; },
/* harmony export */ zO: function() { return /* binding */ me_receives_query; }
/* harmony export */ });
/* unused harmony exports substances_list, code_download, code_batch_download */
/* unused harmony exports substances_list, code_download, code_batch_download, receives_create, receives_review */
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
@ -658,6 +662,8 @@ function _code_download() {
function code_batch_download(_x29) {
return _code_batch_download.apply(this, arguments);
}
//我的领用申请
function _code_batch_download() {
_code_batch_download = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(params) {
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
@ -675,6 +681,136 @@ function _code_batch_download() {
}));
return _code_batch_download.apply(this, arguments);
}
function me_receives_query(_x30) {
return _me_receives_query.apply(this, arguments);
}
//领用列表
function _me_receives_query() {
_me_receives_query = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee30(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee30$(_context30) {
while (1) switch (_context30.prev = _context30.next) {
case 0:
return _context30.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/receives/me_receives.json", {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context30.stop();
}
}, _callee30);
}));
return _me_receives_query.apply(this, arguments);
}
function receives_query(_x31) {
return _receives_query.apply(this, arguments);
}
//取消领用申请
function _receives_query() {
_receives_query = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee31(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee31$(_context31) {
while (1) switch (_context31.prev = _context31.next) {
case 0:
return _context31.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/receives.json", {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context31.stop();
}
}, _callee31);
}));
return _receives_query.apply(this, arguments);
}
function receives_cancel(_x32) {
return _receives_cancel.apply(this, arguments);
}
//创建领用申请
function _receives_cancel() {
_receives_cancel = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee32(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee32$(_context32) {
while (1) switch (_context32.prev = _context32.next) {
case 0:
return _context32.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/receives/".concat(params === null || params === void 0 ? void 0 : params.id, "/cancel.json"), {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context32.stop();
}
}, _callee32);
}));
return _receives_cancel.apply(this, arguments);
}
function receives_create(_x33) {
return _receives_create.apply(this, arguments);
}
//驳回/同意领用申请
function _receives_create() {
_receives_create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(data) {
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
while (1) switch (_context33.prev = _context33.next) {
case 0:
return _context33.abrupt("return", Fetch("/api/yn_classrooms/receives.json", {
method: 'post',
body: _objectSpread({}, data)
}));
case 1:
case "end":
return _context33.stop();
}
}, _callee33);
}));
return _receives_create.apply(this, arguments);
}
function receives_review(_x34) {
return _receives_review.apply(this, arguments);
}
//通过资源自动获取可用资源详情数据
function _receives_review() {
_receives_review = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(data) {
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
while (1) switch (_context34.prev = _context34.next) {
case 0:
return _context34.abrupt("return", Fetch("/api/yn_classrooms/receives/".concat(data === null || data === void 0 ? void 0 : data.id, "/review.json"), {
method: 'post',
body: _objectSpread({}, data)
}));
case 1:
case "end":
return _context34.stop();
}
}, _callee34);
}));
return _receives_review.apply(this, arguments);
}
function receives_matches(_x35) {
return _receives_matches.apply(this, arguments);
}
function _receives_matches() {
_receives_matches = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee35(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee35$(_context35) {
while (1) switch (_context35.prev = _context35.next) {
case 0:
return _context35.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/receives/matches.json", {
method: 'post',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context35.stop();
}
}, _callee35);
}));
return _receives_matches.apply(this, arguments);
}
/***/ })

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

@ -361,7 +361,7 @@ var Navigation = function Navigation(_ref) {
showCount: true,
onChange: function onChange(e) {
var _e$target;
myForm.setFieldValue('title', e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 || (_e$target = _e$target.value) === null || _e$target === void 0 ? void 0 : _e$target.trim());
myForm.setFieldValue('title', e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 || (_e$target = _e$target.value) === null || _e$target === void 0 ? void 0 : _e$target.trim().replace(/\s/g, ''));
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
@ -381,7 +381,7 @@ var Navigation = function Navigation(_ref) {
},
onChange: function onChange(e) {
var _e$target2;
myForm.setFieldValue('risk', e === null || e === void 0 || (_e$target2 = e.target) === null || _e$target2 === void 0 || (_e$target2 = _e$target2.value) === null || _e$target2 === void 0 ? void 0 : _e$target2.trim());
myForm.setFieldValue('risk', e === null || e === void 0 || (_e$target2 = e.target) === null || _e$target2 === void 0 || (_e$target2 = _e$target2.value) === null || _e$target2 === void 0 ? void 0 : _e$target2.trim().replace(/\s/g, ''));
}
})
})]

@ -58,12 +58,12 @@ __webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ AddReceive; }
});
// 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/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);
@ -513,7 +513,7 @@ var Navigation = function Navigation(_ref) {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u4F7F\u7528\u5730\u70B9",
name: "sys",
name: "place_parent_id",
rules: [{
required: true,
message: '必填项'
@ -524,7 +524,7 @@ var Navigation = function Navigation(_ref) {
width: '700px'
},
onChange: function onChange(e) {
myForm.setFieldValue('sysfj', '');
myForm.setFieldValue('place_id', '');
//实验室房间
(0,laboratory/* user_substance_classroom_rooms */.Zd)({
classroom_id: e
@ -542,7 +542,7 @@ var Navigation = function Navigation(_ref) {
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
name: "sysfj",
name: "place_id",
rules: [{
required: true,
message: '请选择关联'
@ -736,50 +736,57 @@ var Navigation = function Navigation(_ref) {
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AddReceivemodules.submit_button,
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _myForm$getFieldValue, _myForm$getFieldValue2;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log(formTableData);
myForm.setFieldValue('substances', formTableData === null || formTableData === void 0 ? void 0 : formTableData.map(function (item) {
item.apply_num = item === null || item === void 0 ? void 0 : item.apply_total;
return item;
}));
_context.next = 4;
_context.next = 3;
return myForm.validateFields();
case 3:
(0,materials/* receives_matches */._P)({
substances: myForm.getFieldValue('substances')
}).then(function (res) {
console.log(res);
});
// if (params?.receiveId != 'null') {//编辑
// purchases_update({
// id: params?.receiveId,
// purchase: {
// ...myForm.getFieldsValue(),
// attachment_ids: myForm.getFieldValue('attachment_ids') ?
// myForm.getFieldValue('attachment_ids')?.map((item: any) => {
// return item?.response?.id
// }) : []
// }
// }).then((res) => {
// if (res?.status == 0) {
// message.success('编辑成功')
// history.push(searchParams.get('backUrl'))
// }
// })
// } else {
// receives_create({
// receive: {
// ...myForm.getFieldsValue(),
// start_time: moment(myForm.getFieldValue('start_time')?.$d).format('YYYY-MM-DD HH:ss'),
// end_time: moment(myForm.getFieldValue('end_time')?.$d).format('YYYY-MM-DD HH:ss'),
// attachment_ids: myForm.getFieldValue('attachment_ids') ?
// myForm.getFieldValue('attachment_ids')?.map((item: any) => {
// return item?.response?.id
// }) : []
// }
// }).then((res) => {
// if (res?.status == 0) {
// message.success('申请成功')
// history.push(searchParams.get('backUrl'))
// }
// })
// }
case 4:
if ((params === null || params === void 0 ? void 0 : params.receiveId) != 'null') {
//编辑
(0,materials/* purchases_update */.aQ)({
id: params === null || params === void 0 ? void 0 : params.receiveId,
purchase: objectSpread2_default()(objectSpread2_default()({}, myForm.getFieldsValue()), {}, {
attachment_ids: myForm.getFieldValue('attachment_ids') ? (_myForm$getFieldValue = myForm.getFieldValue('attachment_ids')) === null || _myForm$getFieldValue === void 0 ? void 0 : _myForm$getFieldValue.map(function (item) {
var _item$response;
return item === null || item === void 0 || (_item$response = item.response) === null || _item$response === void 0 ? void 0 : _item$response.id;
}) : []
})
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('编辑成功');
_umi_production_exports.history.push(searchParams.get('backUrl'));
}
});
} else {
(0,materials/* purchases_create */.jc)({
purchase: objectSpread2_default()(objectSpread2_default()({}, myForm.getFieldsValue()), {}, {
attachment_ids: myForm.getFieldValue('attachment_ids') ? (_myForm$getFieldValue2 = myForm.getFieldValue('attachment_ids')) === null || _myForm$getFieldValue2 === void 0 ? void 0 : _myForm$getFieldValue2.map(function (item) {
var _item$response2;
return item === null || item === void 0 || (_item$response2 = item.response) === null || _item$response2 === void 0 ? void 0 : _item$response2.id;
}) : []
})
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('申请成功');
_umi_production_exports.history.push(searchParams.get('backUrl'));
}
});
}
case 5:
case "end":
return _context.stop();
}

@ -21,6 +21,12 @@ 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);
@ -33,6 +39,10 @@ var _umi_production_exports = __webpack_require__(44742);
/* harmony default export */ var MyReceivemodules = ({"header_div":"header_div___g5aU4","header_title":"header_title___bmMQ4","search":"search___vPJxM","searchIcon":"searchIcon___HIsg6","search_params":"search_params___F7Qdj","clear_Data":"clear_Data___wZkTY","content_list":"content_list___HLLIu","content":"content___AzXhj","content_img":"content_img___aIwBi","content_id":"content_id___FxUBi","content_name":"content_name___Amhwa","content_params":"content_params___koB_B"});
// 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/form/index.js + 19 modules
var es_form = __webpack_require__(78241);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
@ -48,6 +58,8 @@ var dayjs_min = __webpack_require__(9498);
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
var NoData = __webpack_require__(77068);
// EXTERNAL MODULE: ./src/service/materials.ts
var materials = __webpack_require__(85454);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Materials/MyReceive/index.tsx
@ -64,85 +76,76 @@ var jsx_runtime = __webpack_require__(37712);
var statusType = {
pending: '待审核',
approved: '已同意',
rejected: '已驳回',
canceled: '已取消'
};
var Navigation = function Navigation(_ref) {
var loading = _ref.loading;
var _useState = (0,_react_17_0_2_react.useState)(),
_useState2 = slicedToArray_default()(_useState, 2),
keyword = _useState2[0],
setkeyword = _useState2[1];
//时间
var _useState3 = (0,_react_17_0_2_react.useState)(dayjs_min_default()(new Date()).format('YYYY-MM-DD')),
//状态
var _useState3 = (0,_react_17_0_2_react.useState)(''),
_useState4 = slicedToArray_default()(_useState3, 2),
time = _useState4[0],
setTime = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)([{
label: '第1节',
value: 1
}, {
label: '第2节',
value: 2
}, {
label: '第6节',
value: 6
}]),
status = _useState4[0],
setStatus = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(''),
_useState6 = slicedToArray_default()(_useState5, 2),
sections = _useState6[0],
setSections = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(new Date().getHours() + 1),
_useState8 = slicedToArray_default()(_useState7, 2),
section = _useState8[0],
setSection = _useState8[1];
overdue = _useState6[0],
setOverdue = _useState6[1];
//实验室中心
var _useState9 = (0,_react_17_0_2_react.useState)([]),
var _useState7 = (0,_react_17_0_2_react.useState)([]),
_useState8 = slicedToArray_default()(_useState7, 2),
laboratoryRooms = _useState8[0],
setLaboratoryRooms = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(''),
_useState10 = slicedToArray_default()(_useState9, 2),
laboratoryRooms = _useState10[0],
setLaboratoryRooms = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(''),
_useState12 = slicedToArray_default()(_useState11, 2),
laboratoryRoom = _useState12[0],
setLaboratoryRoom = _useState12[1];
laboratoryRoom = _useState10[0],
setLaboratoryRoom = _useState10[1];
//实验室
var _useState11 = (0,_react_17_0_2_react.useState)([]),
_useState12 = slicedToArray_default()(_useState11, 2),
laboratorys = _useState12[0],
setLaboratorys = _useState12[1];
var _useState13 = (0,_react_17_0_2_react.useState)([]),
_useState14 = slicedToArray_default()(_useState13, 2),
laboratorys = _useState14[0],
setLaboratorys = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)([]),
laboratorysUse = _useState14[0],
setLaboratorysUse = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)(''),
_useState16 = slicedToArray_default()(_useState15, 2),
laboratorysUse = _useState16[0],
setLaboratorysUse = _useState16[1];
laboratory = _useState16[0],
setLaboratory = _useState16[1];
var _useState17 = (0,_react_17_0_2_react.useState)(''),
_useState18 = slicedToArray_default()(_useState17, 2),
laboratory = _useState18[0],
setLaboratory = _useState18[1];
var _useState19 = (0,_react_17_0_2_react.useState)(''),
laboratorySq = _useState18[0],
setLaboratorySq = _useState18[1];
//分页
var _useState19 = (0,_react_17_0_2_react.useState)(0),
_useState20 = slicedToArray_default()(_useState19, 2),
laboratorySq = _useState20[0],
setLaboratorySq = _useState20[1];
//实验室房间数据
var _useState21 = (0,_react_17_0_2_react.useState)([]),
total = _useState20[0],
setTotal = _useState20[1];
var _useState21 = (0,_react_17_0_2_react.useState)(1),
_useState22 = slicedToArray_default()(_useState21, 2),
roomList = _useState22[0],
setRoomList = _useState22[1];
//分页
var _useState23 = (0,_react_17_0_2_react.useState)(0),
page = _useState22[0],
setPage = _useState22[1];
var _useState23 = (0,_react_17_0_2_react.useState)(18),
_useState24 = slicedToArray_default()(_useState23, 2),
total = _useState24[0],
setTotal = _useState24[1];
var _useState25 = (0,_react_17_0_2_react.useState)(1),
limit = _useState24[0],
setLimit = _useState24[1];
var _useState25 = (0,_react_17_0_2_react.useState)([]),
_useState26 = slicedToArray_default()(_useState25, 2),
page = _useState26[0],
setPage = _useState26[1];
var _useState27 = (0,_react_17_0_2_react.useState)(18),
_useState28 = slicedToArray_default()(_useState27, 2),
limit = _useState28[0],
setLimit = _useState28[1];
var _useState29 = (0,_react_17_0_2_react.useState)([]),
_useState30 = slicedToArray_default()(_useState29, 2),
tableData = _useState30[0],
setTableData = _useState30[1];
tableData = _useState26[0],
setTableData = _useState26[1];
var columns = [{
title: '申请原因',
dataIndex: 'user_name',
dataIndex: 'reason',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
@ -155,32 +158,54 @@ var Navigation = function Navigation(_ref) {
}
}, {
title: '申请实验室',
dataIndex: 'user_role',
dataIndex: 'classroom_place_title',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text == 'student' ? '学生' : '教师'
children: text
})
});
}
}, {
title: '状态',
dataIndex: 'classroom_room_title',
ellipsis: true
dataIndex: 'status',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: statusType[text]
})
});
}
}, {
title: '使用时间',
dataIndex: 'classroom_title',
ellipsis: true
dataIndex: 'apply_time',
ellipsis: true,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: record !== null && record !== void 0 && record.start_time ? dayjs_min_default()(record === null || record === void 0 ? void 0 : record.start_time).format('YYYY-MM-DD HH:ss') : '--'
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: record !== null && record !== void 0 && record.end_time ? dayjs_min_default()(record === null || record === void 0 ? void 0 : record.end_time).format('YYYY-MM-DD HH:ss') : '--'
})]
})
});
}
}, {
title: '使用实验室',
dataIndex: 'sections',
dataIndex: 'classroom_title',
ellipsis: true
}, {
title: '使用实验室房间',
dataIndex: 'work_num',
dataIndex: 'classroom_room_title',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
@ -193,14 +218,14 @@ var Navigation = function Navigation(_ref) {
}
}, {
title: '申请时间',
dataIndex: 'container_type',
dataIndex: 'apply_time',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text || '--'
children: text ? dayjs_min_default()(text).format('YYYY-MM-DD HH:ss') : '--'
})
});
}
@ -209,15 +234,65 @@ var Navigation = function Navigation(_ref) {
ellipsis: true,
width: 150,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer"
},
onClick: function onClick() {},
children: "\u67E5\u770B\u7269\u8D44\u660E\u7EC6"
}), ((record === null || record === void 0 ? void 0 : record.status) == 'pending' || (record === null || record === void 0 ? void 0 : record.status) == 'rejected') && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",
marginLeft: "10px"
marginLeft: 10
},
children: "\u67E5\u770B"
})
onClick: function onClick() {
_umi_production_exports.history.push("/materials/itemAssets/AddProcure/".concat(record === null || record === void 0 ? void 0 : record.id, "?backUrl=/materials/myProcure"));
},
children: "\u4FEE\u6539"
}), (record === null || record === void 0 ? void 0 : record.status) == 'pending' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",
marginLeft: 10
},
onClick: function onClick() {
modal/* default */.Z.confirm({
centered: true,
okText: '确定',
cancelText: '取消',
title: "提示",
content: "\u8BF7\u786E\u8BA4\u662F\u5426\u53D6\u6D88\u8BE5\u9886\u7528\u7533\u8BF7",
onOk: function () {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
(0,materials/* receives_cancel */.JQ)({
id: record === null || record === void 0 ? void 0 : record.id
}).then(function (res) {
if (res.status === 0) {
message/* default */.ZP.success('取消成功');
getData(true);
}
});
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
function onOk() {
return _onOk.apply(this, arguments);
}
return onOk;
}()
});
},
children: "\u53D6\u6D88"
})]
});
}
}];
@ -263,22 +338,23 @@ var Navigation = function Navigation(_ref) {
(0,_react_17_0_2_react.useEffect)(function () {
//列表查询
getData(true);
}, [laboratory, laboratorySq, laboratoryRoom, time, section, keyword]);
}, [laboratory, laboratorySq, laboratoryRoom, overdue, status, keyword]);
var getData = function getData(flag) {
if (flag) {
setPage(1);
}
(0,service_laboratory/* reservation_rooms_query */.dk)({
(0,materials/* me_receives_query */.zO)({
page: page,
limit: limit,
date: time,
section: section,
status: status,
overdue: overdue,
keyword: keyword,
classroom_center_id: laboratoryRoom,
classroom_id: laboratory
classroom_place_id: laboratory,
classroom_id: laboratorySq,
place_id: laboratoryRoom
}).then(function (res) {
var _res$data4, _res$data5;
setRoomList(res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.list);
setTableData(res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.list);
setTotal(res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.count);
});
};
@ -381,21 +457,31 @@ var Navigation = function Navigation(_ref) {
style: {
marginLeft: '20px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
style: {
width: 100
},
defaultValue: section,
value: section,
defaultValue: status,
value: status,
onChange: function onChange(e) {
setSection(e);
setStatus(e);
},
children: sections === null || sections === void 0 ? void 0 : sections.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.value,
children: item === null || item === void 0 ? void 0 : item.label
}, index);
})
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "",
children: "\u5168\u90E8"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "1",
children: "\u5F85\u5BA1\u6838"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "2",
children: "\u5DF2\u540C\u610F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "3",
children: "\u5DF2\u9A73\u56DE"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "4",
children: "\u5DF2\u53D6\u6D88"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
@ -403,24 +489,28 @@ var Navigation = function Navigation(_ref) {
style: {
marginLeft: '20px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
style: {
width: 100
},
defaultValue: section,
value: section,
defaultValue: overdue,
value: overdue,
onChange: function onChange(e) {
setSection(e);
setOverdue(e);
},
children: sections === null || sections === void 0 ? void 0 : sections.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.value,
children: item === null || item === void 0 ? void 0 : item.label
}, index);
})
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "",
children: "\u5168\u90E8"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "1",
children: "\u662F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "0",
children: "\u5426"
})]
})
})]
}), (roomList === null || roomList === void 0 ? void 0 : roomList.length) > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
}), (tableData === null || tableData === void 0 ? void 0 : tableData.length) > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
pagination: false,
dataSource: tableData,
columns: columns,

@ -44,12 +44,14 @@ var table = __webpack_require__(9143);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
var pagination = __webpack_require__(88402);
// EXTERNAL MODULE: ./src/service/laboratory.ts
var service_laboratory = __webpack_require__(66754);
var laboratory = __webpack_require__(66754);
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
var dayjs_min = __webpack_require__(9498);
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
var NoData = __webpack_require__(77068);
// EXTERNAL MODULE: ./src/service/materials.ts
var materials = __webpack_require__(85454);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Materials/Receive/index.tsx
@ -66,85 +68,67 @@ var jsx_runtime = __webpack_require__(37712);
var statusType = {
pending: '待审核',
approved: '已同意',
rejected: '已驳回',
canceled: '已取消'
};
var Navigation = function Navigation(_ref) {
var loading = _ref.loading;
var _useState = (0,_react_17_0_2_react.useState)(),
_useState2 = slicedToArray_default()(_useState, 2),
keyword = _useState2[0],
setkeyword = _useState2[1];
//时间
var _useState3 = (0,_react_17_0_2_react.useState)(dayjs_min_default()(new Date()).format('YYYY-MM-DD')),
//状态
var _useState3 = (0,_react_17_0_2_react.useState)(''),
_useState4 = slicedToArray_default()(_useState3, 2),
time = _useState4[0],
setTime = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)([{
label: '全部',
value: ''
}, {
label: '第1节',
value: 1
}, {
label: '第2节',
value: 2
}, {
label: '第6节',
value: 6
}]),
status = _useState4[0],
setStatus = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(''),
_useState6 = slicedToArray_default()(_useState5, 2),
sections = _useState6[0],
setSections = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(new Date().getHours() + 1),
overdue = _useState6[0],
setOverdue = _useState6[1];
//实验室
var _useState7 = (0,_react_17_0_2_react.useState)([]),
_useState8 = slicedToArray_default()(_useState7, 2),
section = _useState8[0],
setSection = _useState8[1];
//实验室中心
var _useState9 = (0,_react_17_0_2_react.useState)([]),
laboratorys = _useState8[0],
setLaboratorys = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(''),
_useState10 = slicedToArray_default()(_useState9, 2),
laboratoryRooms = _useState10[0],
setLaboratoryRooms = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(''),
laboratorySq = _useState10[0],
setLaboratorySq = _useState10[1];
//分页
var _useState11 = (0,_react_17_0_2_react.useState)(0),
_useState12 = slicedToArray_default()(_useState11, 2),
laboratoryRoom = _useState12[0],
setLaboratoryRoom = _useState12[1];
//实验室
var _useState13 = (0,_react_17_0_2_react.useState)([]),
total = _useState12[0],
setTotal = _useState12[1];
var _useState13 = (0,_react_17_0_2_react.useState)(1),
_useState14 = slicedToArray_default()(_useState13, 2),
laboratorys = _useState14[0],
setLaboratorys = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)(''),
page = _useState14[0],
setPage = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)(10),
_useState16 = slicedToArray_default()(_useState15, 2),
laboratory = _useState16[0],
setLaboratory = _useState16[1];
var _useState17 = (0,_react_17_0_2_react.useState)(''),
limit = _useState16[0],
setLimit = _useState16[1];
var _useState17 = (0,_react_17_0_2_react.useState)([]),
_useState18 = slicedToArray_default()(_useState17, 2),
laboratorySq = _useState18[0],
setLaboratorySq = _useState18[1];
//实验室房间数据
var _useState19 = (0,_react_17_0_2_react.useState)([]),
_useState20 = slicedToArray_default()(_useState19, 2),
roomList = _useState20[0],
setRoomList = _useState20[1];
//分页
var _useState21 = (0,_react_17_0_2_react.useState)(0),
_useState22 = slicedToArray_default()(_useState21, 2),
total = _useState22[0],
setTotal = _useState22[1];
var _useState23 = (0,_react_17_0_2_react.useState)(1),
_useState24 = slicedToArray_default()(_useState23, 2),
page = _useState24[0],
setPage = _useState24[1];
var _useState25 = (0,_react_17_0_2_react.useState)(10),
_useState26 = slicedToArray_default()(_useState25, 2),
limit = _useState26[0],
setLimit = _useState26[1];
var _useState27 = (0,_react_17_0_2_react.useState)([]),
_useState28 = slicedToArray_default()(_useState27, 2),
tableData = _useState28[0],
setTableData = _useState28[1];
tableData = _useState18[0],
setTableData = _useState18[1];
var columns = [{
title: '申请人',
dataIndex: 'classroom_room_title',
ellipsis: true
dataIndex: 'user_name',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text || '--'
})
});
}
}, {
title: '角色',
dataIndex: 'user_role',
@ -154,17 +138,13 @@ var Navigation = function Navigation(_ref) {
placement: "bottomLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text == 'student' ? '学生' : '教师'
children: text == 'teacher' ? '教师' : '学生'
})
});
}
}, {
title: '手机号码',
dataIndex: 'classroom_room_title',
ellipsis: true
}, {
title: '申请原因',
dataIndex: 'user_name',
title: '手机号',
dataIndex: 'phone',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
@ -176,46 +156,68 @@ var Navigation = function Navigation(_ref) {
});
}
}, {
title: '申请实验室',
dataIndex: 'user_role',
title: '申请原因',
dataIndex: 'reason',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text == 'student' ? '学生' : '教师'
children: text || '--'
})
});
}
}, {
title: '申请实验室',
dataIndex: 'user_role',
dataIndex: 'classroom_place_title',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text == 'student' ? '学生' : '教师'
children: text
})
});
}
}, {
title: '状态',
dataIndex: 'classroom_room_title',
ellipsis: true
dataIndex: 'status',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: statusType[text]
})
});
}
}, {
title: '使用时间',
dataIndex: 'classroom_title',
ellipsis: true
dataIndex: 'apply_time',
ellipsis: true,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: record !== null && record !== void 0 && record.start_time ? dayjs_min_default()(record === null || record === void 0 ? void 0 : record.start_time).format('YYYY-MM-DD HH:ss') : '--'
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: record !== null && record !== void 0 && record.end_time ? dayjs_min_default()(record === null || record === void 0 ? void 0 : record.end_time).format('YYYY-MM-DD HH:ss') : '--'
})]
})
});
}
}, {
title: '使用实验室',
dataIndex: 'sections',
dataIndex: 'classroom_title',
ellipsis: true
}, {
title: '使用实验室房间',
dataIndex: 'work_num',
dataIndex: 'classroom_room_title',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
@ -228,14 +230,14 @@ var Navigation = function Navigation(_ref) {
}
}, {
title: '申请时间',
dataIndex: 'container_type',
dataIndex: 'apply_time',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text || '--'
children: text ? dayjs_min_default()(text).format('YYYY-MM-DD HH:ss') : '--'
})
});
}
@ -244,41 +246,21 @@ var Navigation = function Navigation(_ref) {
ellipsis: true,
width: 150,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer"
},
children: "\u9A73\u56DE"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",
marginLeft: "10px"
},
children: "\u540C\u610F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",
marginLeft: "10px"
},
children: "\u786E\u8BA4\u5F52\u8FD8"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",
marginLeft: "10px"
},
children: "\u67E5\u770B\u7269\u8D28\u660E\u7EC6"
})]
onClick: function onClick() {},
children: "\u67E5\u770B\u7269\u8D44\u660E\u7EC6"
})
});
}
}];
(0,_react_17_0_2_react.useEffect)(function () {
//实验室
(0,service_laboratory/* classroom_query */.GJ)({
(0,laboratory/* classroom_query */.GJ)({
page: 1,
limit: 10000,
keyword: ''
@ -289,19 +271,6 @@ var Navigation = function Navigation(_ref) {
title: '全部'
}].concat(toConsumableArray_default()(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list)));
});
//实验室房间
(0,service_laboratory/* classroom_rooms_query */.jd)({
page: 1,
limit: 10000,
keyword: '',
classroom_id: laboratory
}).then(function (res) {
var _res$data2;
setLaboratoryRooms([{
id: '',
title: '全部'
}].concat(toConsumableArray_default()(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.list)));
});
}, []);
(0,_react_17_0_2_react.useEffect)(function () {
//列表查询
@ -310,23 +279,22 @@ var Navigation = function Navigation(_ref) {
(0,_react_17_0_2_react.useEffect)(function () {
//列表查询
getData(true);
}, [laboratory, laboratorySq, laboratoryRoom, time, section, keyword]);
}, [laboratorySq, status, overdue, keyword]);
var getData = function getData(flag) {
if (flag) {
setPage(1);
}
(0,service_laboratory/* reservation_rooms_query */.dk)({
(0,materials/* receives_query */._$)({
page: page,
limit: limit,
date: time,
section: section,
status: status,
overdue: overdue,
keyword: keyword,
classroom_center_id: laboratoryRoom,
classroom_id: laboratory
classroom_id: laboratorySq
}).then(function (res) {
var _res$data3, _res$data4;
setRoomList(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.list);
setTotal(res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.count);
var _res$data2, _res$data3;
setTableData(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.list);
setTotal(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.count);
});
};
var onShowSizeChange = function onShowSizeChange(page, size) {
@ -381,7 +349,7 @@ var Navigation = function Navigation(_ref) {
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
style: {
width: 300
width: 120
},
defaultValue: laboratorySq,
value: laboratorySq,
@ -401,21 +369,31 @@ var Navigation = function Navigation(_ref) {
style: {
marginLeft: '20px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
style: {
width: 180
width: 120
},
defaultValue: section,
value: section,
defaultValue: status,
value: status,
onChange: function onChange(e) {
setSection(e);
setStatus(e);
},
children: sections === null || sections === void 0 ? void 0 : sections.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.value,
children: item === null || item === void 0 ? void 0 : item.label
}, index);
})
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "",
children: "\u5168\u90E8"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "1",
children: "\u5F85\u5BA1\u6838"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "2",
children: "\u5DF2\u540C\u610F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "3",
children: "\u5DF2\u9A73\u56DE"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "4",
children: "\u5DF2\u53D6\u6D88"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
@ -423,24 +401,28 @@ var Navigation = function Navigation(_ref) {
style: {
marginLeft: '20px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
style: {
width: 180
width: 120
},
defaultValue: section,
value: section,
defaultValue: overdue,
value: overdue,
onChange: function onChange(e) {
setSection(e);
setOverdue(e);
},
children: sections === null || sections === void 0 ? void 0 : sections.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.value,
children: item === null || item === void 0 ? void 0 : item.label
}, index);
})
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "",
children: "\u5168\u90E8"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "1",
children: "\u662F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "0",
children: "\u5426"
})]
})
})]
}), (roomList === null || roomList === void 0 ? void 0 : roomList.length) > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
}), (tableData === null || tableData === void 0 ? void 0 : tableData.length) > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
pagination: false,
dataSource: tableData,
columns: columns,

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