|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[42159],{
|
|
|
|
|
|
/***/ 53044:
|
|
|
/*!***************************************************************!*\
|
|
|
!*** ./src/pages/Equipment/Information/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 */ Information; }
|
|
|
});
|
|
|
|
|
|
// 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);
|
|
|
// 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/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__(63350);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Equipment/Information/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Informationmodules = ({"header_div":"header_div___DxzF4","header_title":"header_title___TIQ1E","search":"search___zx0A4","searchIcon":"searchIcon___XMi2l","search_params":"search_params___KjmvR","clear_Data":"clear_Data___H_Csn","content_list":"content_list___hZqmk","content":"content___W2bsU","content_img":"content_img___KZ5Jd","content_name":"content_name___H_7Zy","content_title":"content_title___hLkQm","content_params":"content_params___TaW4p","redRow":"redRow___gPapJ","my_modal":"my_modal___J2N_p"});
|
|
|
// 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/message/index.js + 4 modules
|
|
|
var message = __webpack_require__(8591);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(24650);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
|
|
|
var es_select = __webpack_require__(57809);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
|
var table = __webpack_require__(51945);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
|
var pagination = __webpack_require__(86859);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
var modal = __webpack_require__(43418);
|
|
|
// EXTERNAL MODULE: ./src/service/laboratory.ts
|
|
|
var laboratory = __webpack_require__(12822);
|
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
|
var NoData = __webpack_require__(67666);
|
|
|
// EXTERNAL MODULE: ./src/service/equipment.ts
|
|
|
var equipment = __webpack_require__(58313);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Equipment/Information/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Navigation = function Navigation(_ref) {
|
|
|
var _ref2;
|
|
|
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 _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
|
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
|
|
|
searchParams = _useSearchParams2[0];
|
|
|
//状态
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(searchParams.get("runType") == 'abnormal' ? '3' : ''),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
useStatus = _useState4[0],
|
|
|
setUseStatus = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(''),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
status = _useState6[0],
|
|
|
setStatus = _useState6[1];
|
|
|
//实验室
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
laboratorys = _useState8[0],
|
|
|
setLaboratorys = _useState8[1];
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(''),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
laboratorySq = _useState10[0],
|
|
|
setLaboratorySq = _useState10[1];
|
|
|
//实验室房间
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
rooms = _useState12[0],
|
|
|
setRooms = _useState12[1];
|
|
|
//分页
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(0),
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
total = _useState14[0],
|
|
|
setTotal = _useState14[1];
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(1),
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
page = _useState16[0],
|
|
|
setPage = _useState16[1];
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(10),
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
limit = _useState18[0],
|
|
|
setLimit = _useState18[1];
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
tableData = _useState20[0],
|
|
|
setTableData = _useState20[1];
|
|
|
var _useState21 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
openAddModal = _useState22[0],
|
|
|
setOpenAddModal = _useState22[1];
|
|
|
var _useState23 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
|
openTopModal = _useState24[0],
|
|
|
setOpenTopModal = _useState24[1];
|
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
myForm = _Form$useForm2[0];
|
|
|
var _useState25 = (0,_react_17_0_2_react.useState)(''),
|
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
|
devicesId = _useState26[0],
|
|
|
setDevicesId = _useState26[1];
|
|
|
var useStatusType = {
|
|
|
'1': '未开启',
|
|
|
'2': '运行中',
|
|
|
'3': '异常',
|
|
|
'-1': '离线'
|
|
|
};
|
|
|
var columns = [{
|
|
|
title: '设备名称',
|
|
|
dataIndex: '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: 'status',
|
|
|
ellipsis: true,
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
placement: "bottomLeft",
|
|
|
title: text == '1' ? '上架' : '下架',
|
|
|
children: text == '1' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: '#2EC25B'
|
|
|
},
|
|
|
children: "\u4E0A\u67B6"
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: '#FA6400'
|
|
|
},
|
|
|
children: "\u4E0B\u67B6"
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '运行状态',
|
|
|
dataIndex: 'use_status',
|
|
|
ellipsis: true,
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
placement: "bottomLeft",
|
|
|
title: useStatusType[text],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: useStatusType[text]
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '所属实验室',
|
|
|
dataIndex: 'classroom_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 || '--'
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '所属房间',
|
|
|
dataIndex: 'classroom_room_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 || '--'
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '金额',
|
|
|
dataIndex: 'amount',
|
|
|
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: '操作',
|
|
|
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() {
|
|
|
_umi_production_exports.history.push("/equipment/information/".concat(record === null || record === void 0 ? void 0 : record.id, "/info?backUrl=/equipment/information"));
|
|
|
},
|
|
|
children: "\u8BE6\u60C5"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: "#165DFF",
|
|
|
cursor: "pointer",
|
|
|
marginLeft: '20px'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
_umi_production_exports.history.push("/equipment/information/".concat(record === null || record === void 0 ? void 0 : record.id, "/edit?backUrl=/equipment/information"));
|
|
|
},
|
|
|
children: "\u7F16\u8F91"
|
|
|
}), (record === null || record === void 0 ? void 0 : record.status) == '0' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: "#165DFF",
|
|
|
cursor: "pointer",
|
|
|
marginLeft: '20px'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
if (record !== null && record !== void 0 && record.ip) {
|
|
|
(0,equipment/* change_use_status */.xF)({
|
|
|
status: true,
|
|
|
id: record === null || record === void 0 ? void 0 : record.id,
|
|
|
ip: record === null || record === void 0 ? void 0 : record.ip
|
|
|
}).then(function (res) {
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
|
var _res$data, _res$data2;
|
|
|
if ((res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.category) == 'virtual' && (res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.status) == '-1') {
|
|
|
message/* default */.ZP.info('设备离线可能由于IP地址错误导致,请核查IP地址设置是否正确');
|
|
|
} else {
|
|
|
message/* default */.ZP.success('上架成功');
|
|
|
getData(false);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
setOpenTopModal(true);
|
|
|
setDevicesId(record === null || record === void 0 ? void 0 : record.id);
|
|
|
}
|
|
|
},
|
|
|
children: "\u4E0A\u67B6"
|
|
|
}), (record === null || record === void 0 ? void 0 : record.status) == '1' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: "#FA6400",
|
|
|
cursor: "pointer",
|
|
|
marginLeft: '20px'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
(0,equipment/* change_use_status */.xF)({
|
|
|
status: false,
|
|
|
id: record === null || record === void 0 ? void 0 : record.id
|
|
|
}).then(function (res) {
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
|
message/* default */.ZP.success('下架成功');
|
|
|
getData(true);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
children: "\u4E0B\u67B6"
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
//实验室
|
|
|
(0,laboratory/* classroom_query */.GJ)({
|
|
|
page: 1,
|
|
|
limit: 10000
|
|
|
}).then(function (res) {
|
|
|
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)({
|
|
|
page: 1,
|
|
|
limit: 10000,
|
|
|
classroom_id: ''
|
|
|
}).then(function (res) {
|
|
|
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));
|
|
|
});
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
//列表查询
|
|
|
getData(false);
|
|
|
}, [page]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
//列表查询
|
|
|
getData(true);
|
|
|
}, [limit, laboratorySq, useStatus, status, keyword]);
|
|
|
var getData = function getData(flag) {
|
|
|
if (flag) {
|
|
|
setPage(1);
|
|
|
}
|
|
|
(0,equipment/* devices_query */.RS)({
|
|
|
page: page,
|
|
|
limit: limit,
|
|
|
use_status: useStatus,
|
|
|
status: status,
|
|
|
keyword: keyword,
|
|
|
classroom_id: laboratorySq,
|
|
|
scrapped: 0
|
|
|
}).then(function (res) {
|
|
|
var _res$data5, _res$data6;
|
|
|
setTableData(res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.list);
|
|
|
setTotal(res === null || res === void 0 || (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.count);
|
|
|
});
|
|
|
};
|
|
|
var onShowSizeChange = function onShowSizeChange(page, size) {
|
|
|
setPage(page);
|
|
|
setLimit(size);
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Informationmodules.header_div,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Informationmodules.header_title,
|
|
|
children: "\u8BBE\u5907\u4FE1\u606F\u7BA1\u7406"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
display: 'flex'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u8BBE\u5907\u540D\u79F0\u641C\u7D22",
|
|
|
size: "large",
|
|
|
className: Informationmodules.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(Informationmodules.searchIcon),
|
|
|
onClick: function onClick() {
|
|
|
setkeyword(keyword);
|
|
|
getData(true);
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Informationmodules.clear_Data,
|
|
|
style: {
|
|
|
width: '96px',
|
|
|
marginLeft: '20px'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
setOpenAddModal(true);
|
|
|
},
|
|
|
children: "\u5173\u8054\u8BBE\u5907"
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Informationmodules.search_params,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
colon: false,
|
|
|
label: "\u6240\u5C5E\u5B9E\u9A8C\u5BA4",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
style: {
|
|
|
width: 120
|
|
|
},
|
|
|
defaultValue: laboratorySq,
|
|
|
value: laboratorySq,
|
|
|
onChange: function onChange(e) {
|
|
|
setLaboratorySq(e);
|
|
|
},
|
|
|
children: (_ref2 = [{
|
|
|
id: '',
|
|
|
title: '全部'
|
|
|
}].concat(toConsumableArray_default()(laboratorys))) === null || _ref2 === void 0 ? void 0 : _ref2.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
|
|
|
}, index);
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
colon: false,
|
|
|
label: "\u4E0A\u67B6\u72B6\u6001",
|
|
|
style: {
|
|
|
marginLeft: 'auto'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
|
|
|
style: {
|
|
|
width: 120
|
|
|
},
|
|
|
defaultValue: status,
|
|
|
value: status,
|
|
|
onChange: function onChange(e) {
|
|
|
setStatus(e);
|
|
|
},
|
|
|
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: "\u4E0A\u67B6"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
value: "0",
|
|
|
children: "\u4E0B\u67B6"
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
colon: false,
|
|
|
label: "\u8FD0\u884C\u72B6\u6001",
|
|
|
style: {
|
|
|
marginLeft: '20px'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
|
|
|
style: {
|
|
|
width: 120
|
|
|
},
|
|
|
defaultValue: useStatus,
|
|
|
value: useStatus,
|
|
|
onChange: function onChange(e) {
|
|
|
setUseStatus(e);
|
|
|
},
|
|
|
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: "\u672A\u5F00\u542F"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
value: "2",
|
|
|
children: "\u8FD0\u884C\u4E2D"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
value: "3",
|
|
|
children: "\u5F02\u5E38"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
value: "-1",
|
|
|
children: "\u79BB\u7EBF"
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
}), (tableData === null || tableData === void 0 ? void 0 : tableData.length) > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
pagination: false,
|
|
|
dataSource: tableData,
|
|
|
columns: columns
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
|
|
|
customText: "\u6682\u65E0\u6570\u636E"
|
|
|
}), /*#__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: Informationmodules.my_modal,
|
|
|
open: openAddModal,
|
|
|
title: "\u5173\u8054\u8BBE\u5907",
|
|
|
width: "600px",
|
|
|
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:
|
|
|
_context.next = 2;
|
|
|
return myForm.validateFields();
|
|
|
case 2:
|
|
|
(0,equipment/* devices_create */.Ct)({
|
|
|
device: objectSpread2_default()(objectSpread2_default()({}, myForm.getFieldsValue()), {}, {
|
|
|
settings: {}
|
|
|
})
|
|
|
}).then(function (res) {
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
|
message/* default */.ZP.success('关联成功');
|
|
|
setOpenAddModal(false);
|
|
|
myForm.resetFields();
|
|
|
getData(false);
|
|
|
}
|
|
|
});
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
})),
|
|
|
onCancel: function onCancel() {
|
|
|
setOpenAddModal(false);
|
|
|
myForm.resetFields();
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
className: Informationmodules.formWrap,
|
|
|
form: myForm,
|
|
|
wrapperCol: {
|
|
|
span: 19
|
|
|
},
|
|
|
style: {
|
|
|
maxHeight: "550px",
|
|
|
overflowY: 'auto'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
colon: false,
|
|
|
label: "\u8BBE\u5907\u79CD\u7C7B",
|
|
|
name: "category",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '必填项'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
|
|
|
size: "large",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
value: 'physical',
|
|
|
children: "\u7269\u7406\u673A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
value: 'virtual',
|
|
|
children: "\u865A\u62DF\u673A"
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
colon: false,
|
|
|
label: "\u8BBE\u5907\u540D\u79F0",
|
|
|
name: "name",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '必填项'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
size: "large",
|
|
|
showCount: true,
|
|
|
maxLength: 60,
|
|
|
onChange: function onChange(e) {
|
|
|
var _e$target;
|
|
|
myForm.setFieldValue('name', 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());
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
colon: false,
|
|
|
label: "\u8BBE\u5907\u578B\u53F7",
|
|
|
name: "model",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '必填项'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
size: "large",
|
|
|
showCount: true,
|
|
|
maxLength: 60,
|
|
|
onChange: function onChange(e) {
|
|
|
var _e$target2;
|
|
|
myForm.setFieldValue('model', 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());
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
colon: false,
|
|
|
label: "\u6240\u5C5E\u5B9E\u9A8C\u5BA4",
|
|
|
name: "container_type2",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '必填项'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
size: "large",
|
|
|
onChange: function onChange(e) {
|
|
|
myForm.setFieldValue('classroom_room_id', '');
|
|
|
//实验室房间
|
|
|
(0,laboratory/* classroom_rooms_query */.jd)({
|
|
|
page: 1,
|
|
|
limit: 10000,
|
|
|
classroom_id: e
|
|
|
}).then(function (res) {
|
|
|
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: laboratorys === null || laboratorys === void 0 ? void 0 : laboratorys.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
|
|
|
}, index);
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
colon: false,
|
|
|
label: "\u6240\u5C5E\u623F\u95F4\u53F7",
|
|
|
name: "classroom_room_id",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '必填项'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
size: "large",
|
|
|
children: rooms === null || rooms === void 0 ? void 0 : rooms.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
|
|
|
}, index);
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
colon: false,
|
|
|
label: "IP\u5730\u5740",
|
|
|
name: "ip",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '必填项'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
size: "large",
|
|
|
showCount: true,
|
|
|
maxLength: 60,
|
|
|
onChange: function onChange(e) {
|
|
|
var _e$target3;
|
|
|
myForm.setFieldValue('ip', e === null || e === void 0 || (_e$target3 = e.target) === null || _e$target3 === void 0 || (_e$target3 = _e$target3.value) === null || _e$target3 === void 0 ? void 0 : _e$target3.trim());
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
colon: false,
|
|
|
label: "MAC\u5730\u5740",
|
|
|
name: "mac_address",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
size: "large",
|
|
|
showCount: true,
|
|
|
maxLength: 60,
|
|
|
onChange: function onChange(e) {
|
|
|
var _e$target4;
|
|
|
myForm.setFieldValue('mac_address', e === null || e === void 0 || (_e$target4 = e.target) === null || _e$target4 === void 0 || (_e$target4 = _e$target4.value) === null || _e$target4 === void 0 ? void 0 : _e$target4.trim());
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
colon: false,
|
|
|
label: "\u8BBE\u5907\u91D1\u989D",
|
|
|
name: "amount",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
size: "large",
|
|
|
showCount: true,
|
|
|
maxLength: 60,
|
|
|
onChange: function onChange(e) {
|
|
|
var _e$target5;
|
|
|
myForm.setFieldValue('amount', e === null || e === void 0 || (_e$target5 = e.target) === null || _e$target5 === void 0 || (_e$target5 = _e$target5.value) === null || _e$target5 === void 0 ? void 0 : _e$target5.trim());
|
|
|
}
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
maskClosable: false,
|
|
|
centered: true,
|
|
|
keyboard: false,
|
|
|
destroyOnClose: true,
|
|
|
className: Informationmodules.my_modal,
|
|
|
open: openTopModal,
|
|
|
title: "\u4E0A\u67B6\u63D0\u793A",
|
|
|
width: "600px",
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
_context2.next = 2;
|
|
|
return myForm.validateFields();
|
|
|
case 2:
|
|
|
(0,equipment/* change_use_status */.xF)({
|
|
|
status: true,
|
|
|
id: devicesId,
|
|
|
ip: myForm.getFieldValue('device_ip')
|
|
|
}).then(function (res) {
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
|
message/* default */.ZP.success('上架成功');
|
|
|
setOpenTopModal(false);
|
|
|
myForm.resetFields();
|
|
|
getData(false);
|
|
|
}
|
|
|
});
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
})),
|
|
|
onCancel: function onCancel() {
|
|
|
setOpenTopModal(false);
|
|
|
myForm.resetFields();
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
className: Informationmodules.formWrap,
|
|
|
form: myForm,
|
|
|
wrapperCol: {
|
|
|
span: 19
|
|
|
},
|
|
|
style: {
|
|
|
maxHeight: "550px",
|
|
|
overflowY: 'auto'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
margin: '10px 0 20px 0'
|
|
|
},
|
|
|
children: "\u4E3A\u4E86\u786E\u4FDD\u8BBE\u5907\u6B63\u5E38\u4E0A\u67B6\u5E76\u5B9E\u65F6\u76D1\u63A7\u8BBE\u5907\u72B6\u6001\uFF0C\u8BF7\u63D0\u4F9B\u8BBE\u5907\u7684IP\u5730\u5740\u3002"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
colon: false,
|
|
|
label: "\u8BBE\u5907IP\u5730\u5740",
|
|
|
name: "device_ip",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '必填项'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
size: "large",
|
|
|
showCount: true,
|
|
|
maxLength: 60
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Information = ((0,_umi_production_exports.connect)(function (_ref5) {
|
|
|
var loading = _ref5.loading,
|
|
|
engineeringNavigtion = _ref5.engineeringNavigtion;
|
|
|
return objectSpread2_default()({
|
|
|
loading: loading
|
|
|
}, engineeringNavigtion);
|
|
|
})(Navigation));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 58313:
|
|
|
/*!**********************************!*\
|
|
|
!*** ./src/service/equipment.ts ***!
|
|
|
\**********************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ Ae: function() { return /* binding */ repair_records_info; },
|
|
|
/* harmony export */ Be: function() { return /* binding */ device_messages; },
|
|
|
/* harmony export */ Ct: function() { return /* binding */ devices_create; },
|
|
|
/* harmony export */ Hn: function() { return /* binding */ statistics_query; },
|
|
|
/* harmony export */ J_: function() { return /* binding */ repair_records_create; },
|
|
|
/* harmony export */ LP: function() { return /* binding */ repair_records_query; },
|
|
|
/* harmony export */ NE: function() { return /* binding */ repair_records_update; },
|
|
|
/* harmony export */ Nz: function() { return /* binding */ devices_scrapped; },
|
|
|
/* harmony export */ RS: function() { return /* binding */ devices_query; },
|
|
|
/* harmony export */ RV: function() { return /* binding */ devices_update; },
|
|
|
/* harmony export */ cl: function() { return /* binding */ monitor_info; },
|
|
|
/* harmony export */ jc: function() { return /* binding */ devices_info; },
|
|
|
/* harmony export */ xF: function() { return /* binding */ change_use_status; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_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_test5_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_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_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);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/fetch */ 57964);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//设备关联列表
|
|
|
function devices_query(_x) {
|
|
|
return _devices_query.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
//关联设备
|
|
|
function _devices_query() {
|
|
|
_devices_query = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(params) {
|
|
|
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
return _context.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/devices.json", {
|
|
|
method: 'get',
|
|
|
params: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return _devices_query.apply(this, arguments);
|
|
|
}
|
|
|
function devices_create(_x2) {
|
|
|
return _devices_create.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
//编辑设备
|
|
|
function _devices_create() {
|
|
|
_devices_create = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee2(data) {
|
|
|
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
return _context2.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/devices.json", {
|
|
|
method: 'post',
|
|
|
body: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return _devices_create.apply(this, arguments);
|
|
|
}
|
|
|
function devices_update(_x3) {
|
|
|
return _devices_update.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
//上下架
|
|
|
function _devices_update() {
|
|
|
_devices_update = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee3(data) {
|
|
|
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
return _context3.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/devices/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
|
|
|
method: 'put',
|
|
|
body: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return _devices_update.apply(this, arguments);
|
|
|
}
|
|
|
function change_use_status(_x4) {
|
|
|
return _change_use_status.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
//设备详情
|
|
|
function _change_use_status() {
|
|
|
_change_use_status = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee4(data) {
|
|
|
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee4$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
return _context4.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/devices/".concat(data === null || data === void 0 ? void 0 : data.id, "/change_use_status.json"), {
|
|
|
method: 'post',
|
|
|
body: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
return _change_use_status.apply(this, arguments);
|
|
|
}
|
|
|
function devices_info(_x5) {
|
|
|
return _devices_info.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
//设备报废
|
|
|
function _devices_info() {
|
|
|
_devices_info = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee5(params) {
|
|
|
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee5$(_context5) {
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
return _context5.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/devices/".concat(params === null || params === void 0 ? void 0 : params.id, ".json"), {
|
|
|
method: 'get',
|
|
|
params: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}, _callee5);
|
|
|
}));
|
|
|
return _devices_info.apply(this, arguments);
|
|
|
}
|
|
|
function devices_scrapped(_x6) {
|
|
|
return _devices_scrapped.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
//创建维修记录
|
|
|
function _devices_scrapped() {
|
|
|
_devices_scrapped = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee6(data) {
|
|
|
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee6$(_context6) {
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
case 0:
|
|
|
return _context6.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/devices/".concat(data === null || data === void 0 ? void 0 : data.id, "/scrapped.json"), {
|
|
|
method: 'post',
|
|
|
body: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context6.stop();
|
|
|
}
|
|
|
}, _callee6);
|
|
|
}));
|
|
|
return _devices_scrapped.apply(this, arguments);
|
|
|
}
|
|
|
function repair_records_create(_x7) {
|
|
|
return _repair_records_create.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
//编辑维修记录
|
|
|
function _repair_records_create() {
|
|
|
_repair_records_create = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee7(data) {
|
|
|
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee7$(_context7) {
|
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
|
case 0:
|
|
|
return _context7.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/repair_records.json", {
|
|
|
method: 'post',
|
|
|
body: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context7.stop();
|
|
|
}
|
|
|
}, _callee7);
|
|
|
}));
|
|
|
return _repair_records_create.apply(this, arguments);
|
|
|
}
|
|
|
function repair_records_update(_x8) {
|
|
|
return _repair_records_update.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
//维修记录列表
|
|
|
function _repair_records_update() {
|
|
|
_repair_records_update = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee8(data) {
|
|
|
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee8$(_context8) {
|
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
|
case 0:
|
|
|
return _context8.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/repair_records/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
|
|
|
method: 'put',
|
|
|
body: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context8.stop();
|
|
|
}
|
|
|
}, _callee8);
|
|
|
}));
|
|
|
return _repair_records_update.apply(this, arguments);
|
|
|
}
|
|
|
function repair_records_query(_x9) {
|
|
|
return _repair_records_query.apply(this, arguments);
|
|
|
}
|
|
|
//维修记录详情
|
|
|
function _repair_records_query() {
|
|
|
_repair_records_query = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee9(params) {
|
|
|
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee9$(_context9) {
|
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
|
case 0:
|
|
|
return _context9.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/repair_records.json", {
|
|
|
method: 'get',
|
|
|
params: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context9.stop();
|
|
|
}
|
|
|
}, _callee9);
|
|
|
}));
|
|
|
return _repair_records_query.apply(this, arguments);
|
|
|
}
|
|
|
function repair_records_info(_x10) {
|
|
|
return _repair_records_info.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
//设备统计
|
|
|
function _repair_records_info() {
|
|
|
_repair_records_info = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee10(params) {
|
|
|
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee10$(_context10) {
|
|
|
while (1) switch (_context10.prev = _context10.next) {
|
|
|
case 0:
|
|
|
return _context10.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/repair_records/".concat(params, ".json"), {
|
|
|
method: 'get',
|
|
|
params: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context10.stop();
|
|
|
}
|
|
|
}, _callee10);
|
|
|
}));
|
|
|
return _repair_records_info.apply(this, arguments);
|
|
|
}
|
|
|
function statistics_query(_x11) {
|
|
|
return _statistics_query.apply(this, arguments);
|
|
|
}
|
|
|
//设备异常消息
|
|
|
function _statistics_query() {
|
|
|
_statistics_query = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee11(params) {
|
|
|
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee11$(_context11) {
|
|
|
while (1) switch (_context11.prev = _context11.next) {
|
|
|
case 0:
|
|
|
return _context11.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/devices/statistics.json", {
|
|
|
method: 'get',
|
|
|
params: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context11.stop();
|
|
|
}
|
|
|
}, _callee11);
|
|
|
}));
|
|
|
return _statistics_query.apply(this, arguments);
|
|
|
}
|
|
|
function device_messages(_x12) {
|
|
|
return _device_messages.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
//设备性能
|
|
|
function _device_messages() {
|
|
|
_device_messages = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee12(params) {
|
|
|
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee12$(_context12) {
|
|
|
while (1) switch (_context12.prev = _context12.next) {
|
|
|
case 0:
|
|
|
return _context12.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/device_messages.json", {
|
|
|
method: 'get',
|
|
|
params: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context12.stop();
|
|
|
}
|
|
|
}, _callee12);
|
|
|
}));
|
|
|
return _device_messages.apply(this, arguments);
|
|
|
}
|
|
|
function monitor_info(_x13) {
|
|
|
return _monitor_info.apply(this, arguments);
|
|
|
}
|
|
|
function _monitor_info() {
|
|
|
_monitor_info = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee13(params) {
|
|
|
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee13$(_context13) {
|
|
|
while (1) switch (_context13.prev = _context13.next) {
|
|
|
case 0:
|
|
|
return _context13.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/devices/".concat(params, "/monitor.json"), {
|
|
|
method: 'get',
|
|
|
params: _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
|
|
|
}));
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context13.stop();
|
|
|
}
|
|
|
}, _callee13);
|
|
|
}));
|
|
|
return _monitor_info.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |