|
|
|
|
@ -382,6 +382,8 @@ var _umi_production_exports = __webpack_require__(5841);
|
|
|
|
|
var laboratory = __webpack_require__(32089);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/hooks/useCustomRequest.ts
|
|
|
|
|
var useCustomRequest = __webpack_require__(64011);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
|
|
var fetch = __webpack_require__(43391);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Equipment/Working/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -409,6 +411,7 @@ var useCustomRequest = __webpack_require__(64011);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var IndexPage = function IndexPage(_ref) {
|
|
|
|
|
@ -648,6 +651,75 @@ var IndexPage = function IndexPage(_ref) {
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}, [DeviceStatisticsData]);
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
// setInterval(() => {
|
|
|
|
|
getifrom();
|
|
|
|
|
|
|
|
|
|
// }, 1000);
|
|
|
|
|
}, []);
|
|
|
|
|
function getifrom() {
|
|
|
|
|
return _getifrom.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
function _getifrom() {
|
|
|
|
|
_getifrom = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
|
|
var iframe, aa, i, item;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
iframe = document.getElementById('iframeShixuns');
|
|
|
|
|
aa = [];
|
|
|
|
|
for (i = 51; i <= 70; i++) {
|
|
|
|
|
item = {
|
|
|
|
|
szUsername: 'admin',
|
|
|
|
|
szPassword: 'zaq12wsx',
|
|
|
|
|
szIP: "192.168.1.".concat(i),
|
|
|
|
|
szPort: '80'
|
|
|
|
|
};
|
|
|
|
|
aa.push(item);
|
|
|
|
|
}
|
|
|
|
|
iframe.contentWindow.postMessage(aa, '*');
|
|
|
|
|
|
|
|
|
|
// console.log('---', aa);
|
|
|
|
|
|
|
|
|
|
iframe.addEventListener('load', /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context2.next = 2;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/zz_classrooms/statistics/camera_infos.json", {
|
|
|
|
|
method: 'get'
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
|
|
|
|
|
|
|
// let aa=[
|
|
|
|
|
// {szUsername:'admin',szPassword:'zaq12wsx',szIP:'192.168.1.51',szPort:'80'}
|
|
|
|
|
// ]
|
|
|
|
|
// const loginDevices = res.data?.infos.map((item) => {
|
|
|
|
|
// return {
|
|
|
|
|
// szUsername: item.user,
|
|
|
|
|
// szPassword: item.pas,
|
|
|
|
|
// szIP: item.ip,
|
|
|
|
|
// szPort: item.dk,
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
})));
|
|
|
|
|
case 5:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee3);
|
|
|
|
|
}));
|
|
|
|
|
return _getifrom.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Workingmodules.monitor,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
@ -775,11 +847,11 @@ var IndexPage = function IndexPage(_ref) {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u8BBE\u5907\u76D1\u63A7"
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
display: 'flex'
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
|
|
|
|
|
id: "iframeShixuns",
|
|
|
|
|
style: {
|
|
|
|
|
height: 250,
|
|
|
|
|
@ -787,20 +859,9 @@ var IndexPage = function IndexPage(_ref) {
|
|
|
|
|
marginTop: 20,
|
|
|
|
|
visibility: "hidden"
|
|
|
|
|
},
|
|
|
|
|
src: 'http://127.0.0.1/cn/demo.html?ip=192.168.1.51&user=admin&password=zaq12wsx&dk=80',
|
|
|
|
|
src: 'http://127.0.0.1/cn/demo.html',
|
|
|
|
|
frameBorder: "0"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
|
|
|
|
|
id: "iframeShixuns",
|
|
|
|
|
style: {
|
|
|
|
|
height: 250,
|
|
|
|
|
width: 650,
|
|
|
|
|
marginTop: 20,
|
|
|
|
|
marginLeft: 20,
|
|
|
|
|
visibility: 'hidden'
|
|
|
|
|
},
|
|
|
|
|
src: 'http://127.0.0.1/cn/demo3.html?ip=192.168.1.52&user=admin&password=zaq12wsx&dk=80',
|
|
|
|
|
frameBorder: "0"
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Workingmodules.sb_xxzs,
|
|
|
|
|
@ -983,10 +1044,10 @@ var IndexPage = function IndexPage(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var Working = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
|
|
|
var loading = _ref3.loading,
|
|
|
|
|
engineeringNavigtion = _ref3.engineeringNavigtion,
|
|
|
|
|
dispatch = _ref3.dispatch;
|
|
|
|
|
/* harmony default export */ var Working = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
|
|
var loading = _ref4.loading,
|
|
|
|
|
engineeringNavigtion = _ref4.engineeringNavigtion,
|
|
|
|
|
dispatch = _ref4.dispatch;
|
|
|
|
|
return objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
loading: loading
|
|
|
|
|
}, engineeringNavigtion), {}, {
|