|
|
|
|
@ -1,96 +1,6 @@
|
|
|
|
|
"use strict";
|
|
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[89053],{
|
|
|
|
|
|
|
|
|
|
/***/ 49866:
|
|
|
|
|
/*!*************************************************************************************************************!*\
|
|
|
|
|
!*** ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/CheckCircleOutlined.js + 1 modules ***!
|
|
|
|
|
\*************************************************************************************************************/
|
|
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
Z: function() { return /* binding */ icons_CheckCircleOutlined; }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.7@@babel/runtime/helpers/esm/extends.js
|
|
|
|
|
var esm_extends = __webpack_require__(4751);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/CheckCircleOutlined.js
|
|
|
|
|
// This icon file is generated automatically.
|
|
|
|
|
var CheckCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "check-circle", "theme": "outlined" };
|
|
|
|
|
/* harmony default export */ var asn_CheckCircleOutlined = (CheckCircleOutlined);
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
|
|
var AntdIcon = __webpack_require__(68475);
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/CheckCircleOutlined.js
|
|
|
|
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var CheckCircleOutlined_CheckCircleOutlined = function CheckCircleOutlined(props, ref) {
|
|
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
|
|
ref: ref,
|
|
|
|
|
icon: asn_CheckCircleOutlined
|
|
|
|
|
}));
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(CheckCircleOutlined_CheckCircleOutlined);
|
|
|
|
|
if (false) {}
|
|
|
|
|
/* harmony default export */ var icons_CheckCircleOutlined = (RefIcon);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 84078:
|
|
|
|
|
/*!**********************************************************************************************************!*\
|
|
|
|
|
!*** ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/PoweroffOutlined.js + 1 modules ***!
|
|
|
|
|
\**********************************************************************************************************/
|
|
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
Z: function() { return /* binding */ icons_PoweroffOutlined; }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.7@@babel/runtime/helpers/esm/extends.js
|
|
|
|
|
var esm_extends = __webpack_require__(4751);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/PoweroffOutlined.js
|
|
|
|
|
// This icon file is generated automatically.
|
|
|
|
|
var PoweroffOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z" } }] }, "name": "poweroff", "theme": "outlined" };
|
|
|
|
|
/* harmony default export */ var asn_PoweroffOutlined = (PoweroffOutlined);
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
|
|
var AntdIcon = __webpack_require__(68475);
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/PoweroffOutlined.js
|
|
|
|
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var PoweroffOutlined_PoweroffOutlined = function PoweroffOutlined(props, ref) {
|
|
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
|
|
ref: ref,
|
|
|
|
|
icon: asn_PoweroffOutlined
|
|
|
|
|
}));
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** */
|
|
|
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(PoweroffOutlined_PoweroffOutlined);
|
|
|
|
|
if (false) {}
|
|
|
|
|
/* harmony default export */ var icons_PoweroffOutlined = (RefIcon);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 75857:
|
|
|
|
|
/*!**************************************************************!*\
|
|
|
|
|
!*** ./src/pages/IOT/ElectronBPManage/index.tsx + 1 modules ***!
|
|
|
|
|
@ -108,12 +18,12 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
// 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/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);
|
|
|
|
|
// 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);
|
|
|
|
|
@ -145,10 +55,6 @@ var modal = __webpack_require__(43418);
|
|
|
|
|
var message = __webpack_require__(8591);
|
|
|
|
|
// EXTERNAL MODULE: ./src/service/laboratory.ts
|
|
|
|
|
var laboratory = __webpack_require__(5703);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/CheckCircleOutlined.js + 1 modules
|
|
|
|
|
var CheckCircleOutlined = __webpack_require__(49866);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/PoweroffOutlined.js + 1 modules
|
|
|
|
|
var PoweroffOutlined = __webpack_require__(84078);
|
|
|
|
|
// EXTERNAL MODULE: ./src/service/iot.ts
|
|
|
|
|
var iot = __webpack_require__(93717);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
|
|
@ -168,7 +74,6 @@ var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ElectronBPManage = function ElectronBPManage(_ref) {
|
|
|
|
|
var _ref2, _ref3;
|
|
|
|
|
var loading = _ref.loading,
|
|
|
|
|
@ -215,48 +120,44 @@ var ElectronBPManage = function ElectronBPManage(_ref) {
|
|
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
|
|
isLoading = _useState14[0],
|
|
|
|
|
setIsLoading = _useState14[1];
|
|
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(),
|
|
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
|
|
selectIds = _useState16[0],
|
|
|
|
|
setSelectIds = _useState16[1];
|
|
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(),
|
|
|
|
|
refresh = _useState16[0],
|
|
|
|
|
setRefresh = _useState16[1];
|
|
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(null),
|
|
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
|
|
refresh = _useState18[0],
|
|
|
|
|
setRefresh = _useState18[1];
|
|
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)(null),
|
|
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
|
|
rowData = _useState20[0],
|
|
|
|
|
setRowData = _useState20[1];
|
|
|
|
|
rowData = _useState18[0],
|
|
|
|
|
setRowData = _useState18[1];
|
|
|
|
|
|
|
|
|
|
//实验室
|
|
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
|
|
laboratorys = _useState20[0],
|
|
|
|
|
setLaboratorys = _useState20[1];
|
|
|
|
|
//实验室房间
|
|
|
|
|
var _useState21 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
|
|
laboratorys = _useState22[0],
|
|
|
|
|
setLaboratorys = _useState22[1];
|
|
|
|
|
//实验室房间
|
|
|
|
|
var _useState23 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
rooms = _useState22[0],
|
|
|
|
|
setRooms = _useState22[1];
|
|
|
|
|
var _useState23 = (0,_react_17_0_2_react.useState)(''),
|
|
|
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
|
|
|
rooms = _useState24[0],
|
|
|
|
|
setRooms = _useState24[1];
|
|
|
|
|
sys = _useState24[0],
|
|
|
|
|
setSys = _useState24[1];
|
|
|
|
|
var _useState25 = (0,_react_17_0_2_react.useState)(''),
|
|
|
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
|
|
|
sys = _useState26[0],
|
|
|
|
|
setSys = _useState26[1];
|
|
|
|
|
sysRoom = _useState26[0],
|
|
|
|
|
setSysRoom = _useState26[1];
|
|
|
|
|
var _useState27 = (0,_react_17_0_2_react.useState)(''),
|
|
|
|
|
_useState28 = slicedToArray_default()(_useState27, 2),
|
|
|
|
|
sysRoom = _useState28[0],
|
|
|
|
|
setSysRoom = _useState28[1];
|
|
|
|
|
var _useState29 = (0,_react_17_0_2_react.useState)(''),
|
|
|
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
|
|
|
deviceStatus = _useState30[0],
|
|
|
|
|
setDeviceStatus = _useState30[1];
|
|
|
|
|
deviceStatus = _useState28[0],
|
|
|
|
|
setDeviceStatus = _useState28[1];
|
|
|
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
|
|
myForm = _Form$useForm2[0];
|
|
|
|
|
var _useState31 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
|
|
|
openAddModal = _useState32[0],
|
|
|
|
|
setOpenAddModal = _useState32[1];
|
|
|
|
|
var _useState29 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
|
|
|
openAddModal = _useState30[0],
|
|
|
|
|
setOpenAddModal = _useState30[1];
|
|
|
|
|
var isFirstLoad = (0,_react_17_0_2_react.useRef)(true);
|
|
|
|
|
var columns = [{
|
|
|
|
|
title: '设备编号',
|
|
|
|
|
@ -436,25 +337,12 @@ var ElectronBPManage = function ElectronBPManage(_ref) {
|
|
|
|
|
setPage(page);
|
|
|
|
|
setLimit(size);
|
|
|
|
|
};
|
|
|
|
|
var rowSelection = {
|
|
|
|
|
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
|
|
|
setSelectIds(selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.map(function (item) {
|
|
|
|
|
item.id = item === null || item === void 0 ? void 0 : item.key;
|
|
|
|
|
return item;
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var validateIPAddress = function validateIPAddress(_, value) {
|
|
|
|
|
if (value && !/^(\d{1,3}\.){3}\d{1,3}$/.test(value)) {
|
|
|
|
|
return Promise.reject(new Error('请输入正确的 IP 地址'));
|
|
|
|
|
}
|
|
|
|
|
return Promise.resolve();
|
|
|
|
|
};
|
|
|
|
|
var rowClassName = function rowClassName(record, index) {
|
|
|
|
|
if (record.use_status === 'abnormal') {
|
|
|
|
|
return ElectronBPManagemodules.maleRow;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: ElectronBPManagemodules.header_div,
|
|
|
|
|
@ -555,14 +443,10 @@ var ElectronBPManage = function ElectronBPManage(_ref) {
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
|
|
rowSelection: objectSpread2_default()({
|
|
|
|
|
type: 'checkbox'
|
|
|
|
|
}, rowSelection),
|
|
|
|
|
loading: isLoading,
|
|
|
|
|
pagination: false,
|
|
|
|
|
dataSource: tableData,
|
|
|
|
|
columns: columns,
|
|
|
|
|
rowClassName: rowClassName
|
|
|
|
|
columns: columns
|
|
|
|
|
}, refresh), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
|
|
children: total > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
@ -593,134 +477,6 @@ var ElectronBPManage = function ElectronBPManage(_ref) {
|
|
|
|
|
total: total
|
|
|
|
|
})]
|
|
|
|
|
}) : ''
|
|
|
|
|
}), !!(selectIds !== null && selectIds !== void 0 && selectIds.length) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: ElectronBPManagemodules.batch,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
flexShrink: 0,
|
|
|
|
|
marginRight: 20
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#999',
|
|
|
|
|
fontSize: 14
|
|
|
|
|
},
|
|
|
|
|
children: ["\u5DF2\u9009(", selectIds === null || selectIds === void 0 ? void 0 : selectIds.length, ")"]
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: ElectronBPManagemodules.btns,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: ElectronBPManagemodules.btn,
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
centered: true,
|
|
|
|
|
okText: '确定',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
icon: null,
|
|
|
|
|
title: "提示",
|
|
|
|
|
content: "\u60A8\u9009\u4E2D\u7684\u8BBE\u5907\uFF08".concat(selectIds === null || selectIds === void 0 ? void 0 : selectIds.map(function (item) {
|
|
|
|
|
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) {
|
|
|
|
|
case 0:
|
|
|
|
|
(0,iot/* lot_up */.zh)({
|
|
|
|
|
device_ids: selectIds === null || selectIds === void 0 ? void 0 : selectIds.map(function (item) {
|
|
|
|
|
return item === null || item === void 0 ? void 0 : item.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: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)(CheckCircleOutlined/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
marginRight: 5
|
|
|
|
|
}
|
|
|
|
|
}), "\u6279\u91CF\u5F00\u673A"]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: ElectronBPManagemodules.btn,
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
var obj = [];
|
|
|
|
|
selectIds === null || selectIds === void 0 || selectIds.map(function (item) {
|
|
|
|
|
if (item !== null && item !== void 0 && item.has_reservation) {
|
|
|
|
|
obj.push(item === null || item === void 0 ? void 0 : item.title);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
centered: true,
|
|
|
|
|
okText: '确定',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
icon: null,
|
|
|
|
|
title: "提示",
|
|
|
|
|
content: "\u60A8\u9009\u4E2D\u7684\u8BBE\u5907\uFF08".concat(selectIds === null || selectIds === void 0 ? void 0 : selectIds.map(function (item) {
|
|
|
|
|
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) {
|
|
|
|
|
case 0:
|
|
|
|
|
(0,iot/* lot_down */.hQ)({
|
|
|
|
|
device_ids: selectIds === null || selectIds === void 0 ? void 0 : selectIds.map(function (item) {
|
|
|
|
|
return item === null || item === void 0 ? void 0 : item.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 _onOk2.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onOk;
|
|
|
|
|
}()
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)(PoweroffOutlined/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
marginRight: 5
|
|
|
|
|
}
|
|
|
|
|
}), "\u6279\u91CF\u5173\u673A"]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setSelectIds([]);
|
|
|
|
|
setRefresh(new Date());
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 'auto'
|
|
|
|
|
},
|
|
|
|
|
className: ElectronBPManagemodules.btn,
|
|
|
|
|
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-piliangcaozuoicon2"
|
|
|
|
|
}), "\u53D6\u6D88\u64CD\u4F5C"]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
|
|
maskClosable: false,
|
|
|
|
|
centered: true,
|
|
|
|
|
@ -730,11 +486,11 @@ var ElectronBPManage = function ElectronBPManage(_ref) {
|
|
|
|
|
open: openAddModal,
|
|
|
|
|
title: "".concat(rowData ? '编辑关联设备' : '关联设备'),
|
|
|
|
|
width: "534px",
|
|
|
|
|
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 _callee() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context3.next = 2;
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
return myForm.validateFields();
|
|
|
|
|
case 2:
|
|
|
|
|
if (rowData) {
|
|
|
|
|
@ -765,9 +521,9 @@ var ElectronBPManage = function ElectronBPManage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
case 3:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee3);
|
|
|
|
|
}, _callee);
|
|
|
|
|
})),
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
setOpenAddModal(false);
|