|
|
|
|
@ -179,6 +179,10 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
|
|
|
confirmLoading = _useState30[0],
|
|
|
|
|
setConfirmLoading = _useState30[1];
|
|
|
|
|
var _useState31 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
|
|
|
tableLoading = _useState32[0],
|
|
|
|
|
setTableLoading = _useState32[1];
|
|
|
|
|
var statusType = {
|
|
|
|
|
'not_exported': '未导出',
|
|
|
|
|
'exported': '已导出',
|
|
|
|
|
@ -253,6 +257,9 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
},
|
|
|
|
|
href: "".concat(env/* default */.Z.API_SERVER, "/api/yn_classrooms/substance_details/").concat(record === null || record === void 0 ? void 0 : record.id, "/download.json"),
|
|
|
|
|
download: true,
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
getData(true);
|
|
|
|
|
},
|
|
|
|
|
children: "\u5BFC\u51FA\u6761\u5F62\u7801"
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
@ -296,23 +303,40 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
setPage(page);
|
|
|
|
|
setLimit(size);
|
|
|
|
|
};
|
|
|
|
|
var getData = function getData(flag) {
|
|
|
|
|
if (flag) {
|
|
|
|
|
setPage(1);
|
|
|
|
|
}
|
|
|
|
|
(0,materials/* substance_details_query */.cO)({
|
|
|
|
|
page: page,
|
|
|
|
|
limit: limit,
|
|
|
|
|
keyword: keyword,
|
|
|
|
|
scrapped: 0,
|
|
|
|
|
status: status,
|
|
|
|
|
substance_id: params === null || params === void 0 ? void 0 : params.itemAssetsId
|
|
|
|
|
}).then(function (res) {
|
|
|
|
|
var _res$data2, _res$data3;
|
|
|
|
|
setTableData(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.list);
|
|
|
|
|
setTotal(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.count);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(flag) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (flag) {
|
|
|
|
|
setPage(1);
|
|
|
|
|
}
|
|
|
|
|
setTableLoading(true);
|
|
|
|
|
_context.next = 4;
|
|
|
|
|
return (0,materials/* substance_details_query */.cO)({
|
|
|
|
|
page: page,
|
|
|
|
|
limit: limit,
|
|
|
|
|
keyword: keyword,
|
|
|
|
|
scrapped: 0,
|
|
|
|
|
status: status,
|
|
|
|
|
substance_id: params === null || params === void 0 ? void 0 : params.itemAssetsId
|
|
|
|
|
}).then(function (res) {
|
|
|
|
|
var _res$data2, _res$data3;
|
|
|
|
|
setTableData(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.list);
|
|
|
|
|
setTotal(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.count);
|
|
|
|
|
});
|
|
|
|
|
case 4:
|
|
|
|
|
setTableLoading(false);
|
|
|
|
|
case 5:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
return function getData(_x) {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var getInfo = function getInfo() {
|
|
|
|
|
(0,materials/* substances_info */.os)({
|
|
|
|
|
id: params === null || params === void 0 ? void 0 : params.itemAssetsId
|
|
|
|
|
@ -360,7 +384,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
children: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.substance_category_title
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u578B\u53F7\u89C4\u5219"
|
|
|
|
|
children: "\u578B\u53F7\u89C4\u683C"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
title: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.model,
|
|
|
|
|
placement: "topLeft",
|
|
|
|
|
@ -377,7 +401,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u89C4\xA0\xA0\xA0\xA0\xA0\xA0\xA0\u683C"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
title: (itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.capacity) + '/' + unitType[itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.unit],
|
|
|
|
|
title: (itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.capacity) + unitType[itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.unit],
|
|
|
|
|
placement: "topLeft",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
@ -385,7 +409,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
width: '200px',
|
|
|
|
|
paddingLeft: '5px'
|
|
|
|
|
},
|
|
|
|
|
children: [itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.capacity, "/", unitType[itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.unit]]
|
|
|
|
|
children: [itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.capacity, unitType[itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.unit]]
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "\u5B58\u653E\u5730\u70B9"
|
|
|
|
|
@ -533,6 +557,9 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
},
|
|
|
|
|
href: "".concat(env/* default */.Z.API_SERVER, "/api/yn_classrooms/substance_details/batch_download.json?substance_id=").concat(itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.id, "&status=").concat(status, "&scrapped=0"),
|
|
|
|
|
download: true,
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
getData(true);
|
|
|
|
|
},
|
|
|
|
|
children: "\u6279\u91CF\u5BFC\u51FA\u6761\u5F62\u7801"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: InfoCodemodules.header_button,
|
|
|
|
|
@ -558,6 +585,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
|
|
loading: tableLoading,
|
|
|
|
|
pagination: false,
|
|
|
|
|
dataSource: tableData,
|
|
|
|
|
columns: columns
|
|
|
|
|
@ -623,15 +651,15 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
open: openBox,
|
|
|
|
|
title: '添加',
|
|
|
|
|
width: "400px",
|
|
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
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:
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
_context2.next = 2;
|
|
|
|
|
return myForm.validateFields();
|
|
|
|
|
case 2:
|
|
|
|
|
setConfirmLoading(true);
|
|
|
|
|
_context.next = 5;
|
|
|
|
|
_context2.next = 5;
|
|
|
|
|
return (0,materials/* new_substance_create_details */.NP)({
|
|
|
|
|
substance_detail: {
|
|
|
|
|
substance_id: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.id,
|
|
|
|
|
@ -649,9 +677,9 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
setConfirmLoading(false);
|
|
|
|
|
case 6:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}, _callee2);
|
|
|
|
|
})),
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
setOpenBox(false);
|
|
|
|
|
@ -799,12 +827,12 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var InfoCode = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
|
|
|
var loading = _ref3.loading,
|
|
|
|
|
user = _ref3.user,
|
|
|
|
|
engineeringNavigtion = _ref3.engineeringNavigtion,
|
|
|
|
|
account = _ref3.account,
|
|
|
|
|
dispatch = _ref3.dispatch;
|
|
|
|
|
/* harmony default export */ var InfoCode = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
|
|
var loading = _ref4.loading,
|
|
|
|
|
user = _ref4.user,
|
|
|
|
|
engineeringNavigtion = _ref4.engineeringNavigtion,
|
|
|
|
|
account = _ref4.account,
|
|
|
|
|
dispatch = _ref4.dispatch;
|
|
|
|
|
return objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
loading: loading,
|
|
|
|
|
user: user
|