Auto Submit

dev_local_v9_test5
autosubmit 2 years ago
parent d9e4513268
commit 747a213f57

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

@ -60,12 +60,12 @@ __webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ IOT_DeviceManage; }
});
// 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/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/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
@ -100,10 +100,10 @@ var pagination = __webpack_require__(53864);
var modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
var row = __webpack_require__(95237);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/index.js + 5 modules
var config_provider = __webpack_require__(92736);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
var spin = __webpack_require__(71418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/index.js + 5 modules
var config_provider = __webpack_require__(92736);
// EXTERNAL MODULE: ./src/service/laboratory.ts
var laboratory = __webpack_require__(47591);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.8@@babel/runtime/helpers/esm/extends.js
@ -138,6 +138,8 @@ if (false) {}
var PoweroffOutlined = __webpack_require__(84078);
// EXTERNAL MODULE: ./src/service/iot.ts
var iot = __webpack_require__(87763);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(70311);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/IOT/DeviceManage/index.tsx
@ -156,8 +158,9 @@ var jsx_runtime = __webpack_require__(37712);
var DeviceManage = function DeviceManage(_ref) {
var _ref2, _ref3;
var _ref3, _ref4;
var loading = _ref.loading,
dispatch = _ref.dispatch;
var _useState = (0,_react_17_0_2_react.useState)(),
@ -260,6 +263,14 @@ var DeviceManage = function DeviceManage(_ref) {
_useState38 = slicedToArray_default()(_useState37, 2),
keys = _useState38[0],
setKeys = _useState38[1];
var _useState39 = (0,_react_17_0_2_react.useState)(true),
_useState40 = slicedToArray_default()(_useState39, 2),
isSpin = _useState40[0],
setIsSpin = _useState40[1];
var _useState41 = (0,_react_17_0_2_react.useState)(false),
_useState42 = slicedToArray_default()(_useState41, 2),
tableLoading = _useState42[0],
setTableLoading = _useState42[1];
var isFirstLoad = (0,_react_17_0_2_react.useRef)(true);
var columns = [{
title: '设备编号',
@ -388,10 +399,32 @@ var DeviceManage = function DeviceManage(_ref) {
cursor: "pointer",
marginLeft: '20px'
},
onClick: function onClick() {
setRowData(record);
setControlModal(true);
},
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res, _res$data2;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
setRowData(objectSpread2_default()({}, record));
setControlModal(true);
setIsSpin(false);
_context.next = 5;
return (0,fetch/* default */.ZP)("/api/yn_classrooms/devices/".concat(record === null || record === void 0 ? void 0 : record.id, "/lot_status.json"), {
method: 'get'
});
case 5:
res = _context.sent;
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
setRowData(objectSpread2_default()(objectSpread2_default()({}, record), {}, {
use_status: res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.use_status
}));
setIsSpin(true);
}
case 7:
case "end":
return _context.stop();
}
}, _callee);
})),
children: "\u63A7\u5236"
})]
});
@ -403,8 +436,8 @@ var DeviceManage = function DeviceManage(_ref) {
page: 1,
limit: 10000
}).then(function (res) {
var _res$data2;
setLaboratorys(toConsumableArray_default()(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.list));
var _res$data3;
setLaboratorys(toConsumableArray_default()(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.list));
});
//实验室房间
(0,laboratory/* classroom_rooms_query */.jd)({
@ -412,8 +445,8 @@ var DeviceManage = function DeviceManage(_ref) {
limit: 10000,
classroom_id: ''
}).then(function (res) {
var _res$data3;
setRooms(toConsumableArray_default()(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.list));
var _res$data4;
setRooms(toConsumableArray_default()(res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.list));
});
dispatch({
type: 'globalSetting/footerToggle',
@ -440,6 +473,7 @@ var DeviceManage = function DeviceManage(_ref) {
if (flag) {
setPage(1);
}
setTableLoading(true);
(0,iot/* getIOTDeviceList */.Yj)({
page: page,
limit: limit,
@ -450,12 +484,13 @@ var DeviceManage = function DeviceManage(_ref) {
// 1:非物理网设备 2:电子班牌 3:智慧开关
genre: 3
}).then(function (res) {
var _res$data4, _res$data5;
setTotal(res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.count);
setTableData(res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 || (_res$data5 = _res$data5.list) === null || _res$data5 === void 0 ? void 0 : _res$data5.map(function (item) {
var _res$data5, _res$data6;
setTotal(res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.count);
setTableData(res === null || res === void 0 || (_res$data6 = res.data) === null || _res$data6 === void 0 || (_res$data6 = _res$data6.list) === null || _res$data6 === void 0 ? void 0 : _res$data6.map(function (item) {
item.key = item === null || item === void 0 ? void 0 : item.id;
return item;
}));
setTableLoading(false);
});
};
var onShowSizeChange = function onShowSizeChange(page, size) {
@ -492,6 +527,7 @@ var DeviceManage = function DeviceManage(_ref) {
// return e
// })
// setKeys(new Date())
// setControlModal(false)
// }, 10000);
if (type == 'running') {
(0,iot/* lot_up */.zh)({
@ -518,6 +554,7 @@ var DeviceManage = function DeviceManage(_ref) {
return e;
});
setKeys(new Date());
setControlModal(false);
};
var rule = function rule(num) {
if (num == 1) {
@ -587,14 +624,14 @@ var DeviceManage = function DeviceManage(_ref) {
limit: 10000,
classroom_id: e
}).then(function (res) {
var _res$data6;
setRooms(toConsumableArray_default()(res === null || res === void 0 || (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.list));
var _res$data7;
setRooms(toConsumableArray_default()(res === null || res === void 0 || (_res$data7 = res.data) === null || _res$data7 === void 0 ? void 0 : _res$data7.list));
});
},
children: (_ref2 = [{
children: (_ref3 = [{
id: '',
title: '全部'
}].concat(toConsumableArray_default()(laboratorys))) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (item, index) {
}].concat(toConsumableArray_default()(laboratorys))) === null || _ref3 === void 0 ? void 0 : _ref3.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.id,
children: item === null || item === void 0 ? void 0 : item.title
@ -617,10 +654,10 @@ var DeviceManage = function DeviceManage(_ref) {
onChange: function onChange(e) {
setSysRoom(e);
},
children: (_ref3 = [{
children: (_ref4 = [{
id: '',
title: '全部'
}].concat(toConsumableArray_default()(rooms))) === null || _ref3 === void 0 ? void 0 : _ref3.map(function (item, index) {
}].concat(toConsumableArray_default()(rooms))) === null || _ref4 === void 0 ? void 0 : _ref4.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.id,
children: item === null || item === void 0 ? void 0 : item.title
@ -662,7 +699,7 @@ var DeviceManage = function DeviceManage(_ref) {
// type: 'checkbox',
// ...rowSelection,
// }}
// loading={tableLoading}
loading: tableLoading,
pagination: false,
dataSource: tableData,
columns: columns,
@ -727,9 +764,9 @@ var DeviceManage = function DeviceManage(_ref) {
return item.name;
}).join('、'), "\uFF09\u5C06\u4F1A\u88AB\u6279\u91CF\u5F00\u673A, \u8BF7\u60A8\u786E\u8BA4!"),
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) {
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,iot/* lot_up */.zh)({
device_ids: selectIds === null || selectIds === void 0 ? void 0 : selectIds.map(function (item) {
@ -743,9 +780,9 @@ var DeviceManage = function DeviceManage(_ref) {
});
case 1:
case "end":
return _context.stop();
return _context2.stop();
}
}, _callee);
}, _callee2);
}));
function onOk() {
return _onOk.apply(this, arguments);
@ -778,9 +815,9 @@ var DeviceManage = function DeviceManage(_ref) {
return item.name;
}).join('、'), "\uFF09\u5C06\u4F1A\u88AB\u6279\u91CF\u5173\u673A, \u8BF7\u60A8\u786E\u8BA4!"),
onOk: function () {
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
(0,iot/* lot_down */.hQ)({
device_ids: selectIds === null || selectIds === void 0 ? void 0 : selectIds.map(function (item) {
@ -794,9 +831,9 @@ var DeviceManage = function DeviceManage(_ref) {
});
case 1:
case "end":
return _context2.stop();
return _context3.stop();
}
}, _callee2);
}, _callee3);
}));
function onOk() {
return _onOk2.apply(this, arguments);
@ -834,11 +871,11 @@ var DeviceManage = function DeviceManage(_ref) {
open: openAddModal,
title: "".concat(rowData ? '编辑关联设备' : '关联设备'),
width: "948px",
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context3.next = 2;
_context4.next = 2;
return myForm.validateFields();
case 2:
if (rowData) {
@ -869,9 +906,9 @@ var DeviceManage = function DeviceManage(_ref) {
}
case 3:
case "end":
return _context3.stop();
return _context4.stop();
}
}, _callee3);
}, _callee4);
})),
onCancel: function onCancel() {
setOpenAddModal(false);
@ -1004,8 +1041,8 @@ var DeviceManage = function DeviceManage(_ref) {
limit: 10000,
classroom_id: e
}).then(function (res) {
var _res$data7;
setRooms2(toConsumableArray_default()(res === null || res === void 0 || (_res$data7 = res.data) === null || _res$data7 === void 0 ? void 0 : _res$data7.list));
var _res$data8;
setRooms2(toConsumableArray_default()(res === null || res === void 0 || (_res$data8 = res.data) === null || _res$data8 === void 0 ? void 0 : _res$data8.list));
});
},
children: laboratorys === null || laboratorys === void 0 ? void 0 : laboratorys.map(function (item, index) {
@ -1061,7 +1098,19 @@ var DeviceManage = function DeviceManage(_ref) {
color: '#3A3A3A'
},
children: "\u5F53\u524D\u63A7\u5236\u7684\u4E3A".concat(rowData === null || rowData === void 0 ? void 0 : rowData.classroom_title, "\u5B9E\u9A8C\u5BA4 ").concat(rowData === null || rowData === void 0 ? void 0 : rowData.classroom_room_title, "\u623F\u95F4\u603B\u7535\u6E90")
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
}), !isSpin ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
width: '100%',
height: '365px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
tip: "\u83B7\u53D6\u6700\u65B0\u72B6\u6001\u4E2D...",
delay: 500
})
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [rule(1) && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: DeviceManagemodules.img_sty,
src: __webpack_require__(/*! ./images/breakpoint.png */ 18701)
@ -1109,10 +1158,10 @@ var DeviceManage = function DeviceManage(_ref) {
})]
});
};
/* harmony default export */ var IOT_DeviceManage = ((0,_umi_production_exports.connect)(function (_ref5) {
var loading = _ref5.loading,
engineeringNavigtion = _ref5.engineeringNavigtion,
dispatch = _ref5.dispatch;
/* harmony default export */ var IOT_DeviceManage = ((0,_umi_production_exports.connect)(function (_ref6) {
var loading = _ref6.loading,
engineeringNavigtion = _ref6.engineeringNavigtion,
dispatch = _ref6.dispatch;
return objectSpread2_default()(objectSpread2_default()({
loading: loading
}, engineeringNavigtion), {}, {

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