parent
7b8ae40676
commit
c2b11ef95a
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,742 @@
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[13294],{
|
||||
|
||||
/***/ 42404:
|
||||
/*!********************************************************************************************************!*\
|
||||
!*** ./node_modules/_@ant-design_icons@5.6.0@@ant-design/icons/es/icons/ReloadOutlined.js + 1 modules ***!
|
||||
\********************************************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ icons_ReloadOutlined; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__(16378);
|
||||
// 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/ReloadOutlined.js
|
||||
// This icon file is generated automatically.
|
||||
var ReloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z" } }] }, "name": "reload", "theme": "outlined" };
|
||||
/* harmony default export */ var asn_ReloadOutlined = (ReloadOutlined);
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.0@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
||||
var AntdIcon = __webpack_require__(31533);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.0@@ant-design/icons/es/icons/ReloadOutlined.js
|
||||
|
||||
// GENERATE BY ./scripts/generate.ts
|
||||
// DON NOT EDIT IT MANUALLY
|
||||
|
||||
|
||||
|
||||
|
||||
var ReloadOutlined_ReloadOutlined = function ReloadOutlined(props, ref) {
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
||||
ref: ref,
|
||||
icon: asn_ReloadOutlined
|
||||
}));
|
||||
};
|
||||
|
||||
/** */
|
||||
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(ReloadOutlined_ReloadOutlined);
|
||||
if (false) {}
|
||||
/* harmony default export */ var icons_ReloadOutlined = (RefIcon);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 74928:
|
||||
/*!*********************************************************************************************************!*\
|
||||
!*** ./node_modules/_@ant-design_icons@5.6.0@@ant-design/icons/es/icons/SettingOutlined.js + 1 modules ***!
|
||||
\*********************************************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ icons_SettingOutlined; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__(16378);
|
||||
// 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/SettingOutlined.js
|
||||
// This icon file is generated automatically.
|
||||
var SettingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z" } }] }, "name": "setting", "theme": "outlined" };
|
||||
/* harmony default export */ var asn_SettingOutlined = (SettingOutlined);
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.0@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
||||
var AntdIcon = __webpack_require__(31533);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.0@@ant-design/icons/es/icons/SettingOutlined.js
|
||||
|
||||
// GENERATE BY ./scripts/generate.ts
|
||||
// DON NOT EDIT IT MANUALLY
|
||||
|
||||
|
||||
|
||||
|
||||
var SettingOutlined_SettingOutlined = function SettingOutlined(props, ref) {
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
||||
ref: ref,
|
||||
icon: asn_SettingOutlined
|
||||
}));
|
||||
};
|
||||
|
||||
/** */
|
||||
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(SettingOutlined_SettingOutlined);
|
||||
if (false) {}
|
||||
/* harmony default export */ var icons_SettingOutlined = (RefIcon);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 27666:
|
||||
/*!****************************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/_util/throttleByAnimationFrame.js ***!
|
||||
\****************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ 65093);
|
||||
/* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/raf */ 23073);
|
||||
|
||||
|
||||
function throttleByAnimationFrame(fn) {
|
||||
let requestId;
|
||||
const later = args => () => {
|
||||
requestId = null;
|
||||
fn.apply(void 0, (0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(args));
|
||||
};
|
||||
const throttled = function () {
|
||||
if (requestId == null) {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
requestId = (0,rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(later(args));
|
||||
}
|
||||
};
|
||||
throttled.cancel = () => {
|
||||
rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.cancel(requestId);
|
||||
requestId = null;
|
||||
};
|
||||
return throttled;
|
||||
}
|
||||
/* harmony default export */ __webpack_exports__.Z = (throttleByAnimationFrame);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 81228:
|
||||
/*!*********************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/affix/index.js + 2 modules ***!
|
||||
\*********************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ affix; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/classCallCheck.js
|
||||
var classCallCheck = __webpack_require__(44202);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/createClass.js
|
||||
var createClass = __webpack_require__(86773);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/inherits.js
|
||||
var inherits = __webpack_require__(82412);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/createSuper.js + 1 modules
|
||||
var createSuper = __webpack_require__(52444);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
||||
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
||||
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
||||
// EXTERNAL MODULE: ./node_modules/_rc-resize-observer@1.4.3@rc-resize-observer/es/index.js + 4 modules
|
||||
var es = __webpack_require__(29301);
|
||||
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.3@rc-util/es/omit.js
|
||||
var omit = __webpack_require__(64002);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/throttleByAnimationFrame.js
|
||||
var throttleByAnimationFrame = __webpack_require__(27666);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
||||
var context = __webpack_require__(36355);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
||||
var genComponentStyleHook = __webpack_require__(83116);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
||||
var statistic = __webpack_require__(37613);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/affix/style/index.js
|
||||
|
||||
// ============================== Shared ==============================
|
||||
const genSharedAffixStyle = token => {
|
||||
const {
|
||||
componentCls
|
||||
} = token;
|
||||
return {
|
||||
[componentCls]: {
|
||||
position: 'fixed',
|
||||
zIndex: token.zIndexPopup
|
||||
}
|
||||
};
|
||||
};
|
||||
// ============================== Export ==============================
|
||||
/* harmony default export */ var style = ((0,genComponentStyleHook/* default */.Z)('Affix', token => {
|
||||
const affixToken = (0,statistic/* merge */.TS)(token, {
|
||||
zIndexPopup: token.zIndexBase + 10
|
||||
});
|
||||
return [genSharedAffixStyle(affixToken)];
|
||||
}));
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/affix/utils.js
|
||||
function getTargetRect(target) {
|
||||
return target !== window ? target.getBoundingClientRect() : {
|
||||
top: 0,
|
||||
bottom: window.innerHeight
|
||||
};
|
||||
}
|
||||
function getFixedTop(placeholderRect, targetRect, offsetTop) {
|
||||
if (offsetTop !== undefined && targetRect.top > placeholderRect.top - offsetTop) {
|
||||
return offsetTop + targetRect.top;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
function getFixedBottom(placeholderRect, targetRect, offsetBottom) {
|
||||
if (offsetBottom !== undefined && targetRect.bottom < placeholderRect.bottom + offsetBottom) {
|
||||
const targetBottomOffset = window.innerHeight - targetRect.bottom;
|
||||
return offsetBottom + targetBottomOffset;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/affix/index.js
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const TRIGGER_EVENTS = ['resize', 'scroll', 'touchstart', 'touchmove', 'touchend', 'pageshow', 'load'];
|
||||
function getDefaultTarget() {
|
||||
return typeof window !== 'undefined' ? window : null;
|
||||
}
|
||||
var AffixStatus;
|
||||
(function (AffixStatus) {
|
||||
AffixStatus[AffixStatus["None"] = 0] = "None";
|
||||
AffixStatus[AffixStatus["Prepare"] = 1] = "Prepare";
|
||||
})(AffixStatus || (AffixStatus = {}));
|
||||
let InternalAffix = /*#__PURE__*/function (_React$Component) {
|
||||
(0,inherits/* default */.Z)(InternalAffix, _React$Component);
|
||||
var _super = (0,createSuper/* default */.Z)(InternalAffix);
|
||||
function InternalAffix() {
|
||||
var _this;
|
||||
(0,classCallCheck/* default */.Z)(this, InternalAffix);
|
||||
_this = _super.apply(this, arguments);
|
||||
_this.state = {
|
||||
status: AffixStatus.None,
|
||||
lastAffix: false,
|
||||
prevTarget: null
|
||||
};
|
||||
_this.placeholderNodeRef = /*#__PURE__*/(0,_react_17_0_2_react.createRef)();
|
||||
_this.fixedNodeRef = /*#__PURE__*/(0,_react_17_0_2_react.createRef)();
|
||||
_this.addListeners = () => {
|
||||
const targetFunc = _this.getTargetFunc();
|
||||
const target = targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc();
|
||||
const {
|
||||
prevTarget
|
||||
} = _this.state;
|
||||
if (prevTarget !== target) {
|
||||
TRIGGER_EVENTS.forEach(eventName => {
|
||||
prevTarget === null || prevTarget === void 0 ? void 0 : prevTarget.removeEventListener(eventName, _this.lazyUpdatePosition);
|
||||
target === null || target === void 0 ? void 0 : target.addEventListener(eventName, _this.lazyUpdatePosition);
|
||||
});
|
||||
_this.updatePosition();
|
||||
_this.setState({
|
||||
prevTarget: target
|
||||
});
|
||||
}
|
||||
};
|
||||
_this.removeListeners = () => {
|
||||
if (_this.timer) {
|
||||
clearTimeout(_this.timer);
|
||||
_this.timer = null;
|
||||
}
|
||||
const {
|
||||
prevTarget
|
||||
} = _this.state;
|
||||
const targetFunc = _this.getTargetFunc();
|
||||
const newTarget = targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc();
|
||||
TRIGGER_EVENTS.forEach(eventName => {
|
||||
newTarget === null || newTarget === void 0 ? void 0 : newTarget.removeEventListener(eventName, _this.lazyUpdatePosition);
|
||||
prevTarget === null || prevTarget === void 0 ? void 0 : prevTarget.removeEventListener(eventName, _this.lazyUpdatePosition);
|
||||
});
|
||||
_this.updatePosition.cancel();
|
||||
// https://github.com/ant-design/ant-design/issues/22683
|
||||
_this.lazyUpdatePosition.cancel();
|
||||
};
|
||||
_this.getOffsetTop = () => {
|
||||
const {
|
||||
offsetBottom,
|
||||
offsetTop
|
||||
} = _this.props;
|
||||
return offsetBottom === undefined && offsetTop === undefined ? 0 : offsetTop;
|
||||
};
|
||||
_this.getOffsetBottom = () => _this.props.offsetBottom;
|
||||
// =================== Measure ===================
|
||||
_this.measure = () => {
|
||||
const {
|
||||
status,
|
||||
lastAffix
|
||||
} = _this.state;
|
||||
const {
|
||||
onChange
|
||||
} = _this.props;
|
||||
const targetFunc = _this.getTargetFunc();
|
||||
if (status !== AffixStatus.Prepare || !_this.fixedNodeRef.current || !_this.placeholderNodeRef.current || !targetFunc) {
|
||||
return;
|
||||
}
|
||||
const offsetTop = _this.getOffsetTop();
|
||||
const offsetBottom = _this.getOffsetBottom();
|
||||
const targetNode = targetFunc();
|
||||
if (targetNode) {
|
||||
const newState = {
|
||||
status: AffixStatus.None
|
||||
};
|
||||
const placeholderRect = getTargetRect(_this.placeholderNodeRef.current);
|
||||
if (placeholderRect.top === 0 && placeholderRect.left === 0 && placeholderRect.width === 0 && placeholderRect.height === 0) {
|
||||
return;
|
||||
}
|
||||
const targetRect = getTargetRect(targetNode);
|
||||
const fixedTop = getFixedTop(placeholderRect, targetRect, offsetTop);
|
||||
const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom);
|
||||
if (fixedTop !== undefined) {
|
||||
newState.affixStyle = {
|
||||
position: 'fixed',
|
||||
top: fixedTop,
|
||||
width: placeholderRect.width,
|
||||
height: placeholderRect.height
|
||||
};
|
||||
newState.placeholderStyle = {
|
||||
width: placeholderRect.width,
|
||||
height: placeholderRect.height
|
||||
};
|
||||
} else if (fixedBottom !== undefined) {
|
||||
newState.affixStyle = {
|
||||
position: 'fixed',
|
||||
bottom: fixedBottom,
|
||||
width: placeholderRect.width,
|
||||
height: placeholderRect.height
|
||||
};
|
||||
newState.placeholderStyle = {
|
||||
width: placeholderRect.width,
|
||||
height: placeholderRect.height
|
||||
};
|
||||
}
|
||||
newState.lastAffix = !!newState.affixStyle;
|
||||
if (onChange && lastAffix !== newState.lastAffix) {
|
||||
onChange(newState.lastAffix);
|
||||
}
|
||||
_this.setState(newState);
|
||||
}
|
||||
};
|
||||
_this.prepareMeasure = () => {
|
||||
// event param is used before. Keep compatible ts define here.
|
||||
_this.setState({
|
||||
status: AffixStatus.Prepare,
|
||||
affixStyle: undefined,
|
||||
placeholderStyle: undefined
|
||||
});
|
||||
// Test if `updatePosition` called
|
||||
if (false) {}
|
||||
};
|
||||
_this.updatePosition = (0,throttleByAnimationFrame/* default */.Z)(() => {
|
||||
_this.prepareMeasure();
|
||||
});
|
||||
_this.lazyUpdatePosition = (0,throttleByAnimationFrame/* default */.Z)(() => {
|
||||
const targetFunc = _this.getTargetFunc();
|
||||
const {
|
||||
affixStyle
|
||||
} = _this.state;
|
||||
// Check position change before measure to make Safari smooth
|
||||
if (targetFunc && affixStyle) {
|
||||
const offsetTop = _this.getOffsetTop();
|
||||
const offsetBottom = _this.getOffsetBottom();
|
||||
const targetNode = targetFunc();
|
||||
if (targetNode && _this.placeholderNodeRef.current) {
|
||||
const targetRect = getTargetRect(targetNode);
|
||||
const placeholderRect = getTargetRect(_this.placeholderNodeRef.current);
|
||||
const fixedTop = getFixedTop(placeholderRect, targetRect, offsetTop);
|
||||
const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom);
|
||||
if (fixedTop !== undefined && affixStyle.top === fixedTop || fixedBottom !== undefined && affixStyle.bottom === fixedBottom) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Directly call prepare measure since it's already throttled.
|
||||
_this.prepareMeasure();
|
||||
});
|
||||
return _this;
|
||||
}
|
||||
(0,createClass/* default */.Z)(InternalAffix, [{
|
||||
key: "getTargetFunc",
|
||||
value: function getTargetFunc() {
|
||||
const {
|
||||
getTargetContainer
|
||||
} = this.context;
|
||||
const {
|
||||
target
|
||||
} = this.props;
|
||||
if (target !== undefined) {
|
||||
return target;
|
||||
}
|
||||
return getTargetContainer !== null && getTargetContainer !== void 0 ? getTargetContainer : getDefaultTarget;
|
||||
}
|
||||
// Event handler
|
||||
}, {
|
||||
key: "componentDidMount",
|
||||
value: function componentDidMount() {
|
||||
// [Legacy] Wait for parent component ref has its value.
|
||||
// We should use target as directly element instead of function which makes element check hard.
|
||||
this.timer = setTimeout(this.addListeners);
|
||||
}
|
||||
}, {
|
||||
key: "componentDidUpdate",
|
||||
value: function componentDidUpdate(prevProps) {
|
||||
this.addListeners();
|
||||
if (prevProps.offsetTop !== this.props.offsetTop || prevProps.offsetBottom !== this.props.offsetBottom) {
|
||||
this.updatePosition();
|
||||
}
|
||||
this.measure();
|
||||
}
|
||||
}, {
|
||||
key: "componentWillUnmount",
|
||||
value: function componentWillUnmount() {
|
||||
this.removeListeners();
|
||||
}
|
||||
// =================== Render ===================
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
const {
|
||||
affixStyle,
|
||||
placeholderStyle
|
||||
} = this.state;
|
||||
const {
|
||||
affixPrefixCls,
|
||||
rootClassName,
|
||||
children
|
||||
} = this.props;
|
||||
const className = _classnames_2_5_1_classnames_default()(affixStyle && rootClassName, {
|
||||
[affixPrefixCls]: !!affixStyle
|
||||
});
|
||||
let props = (0,omit/* default */.Z)(this.props, ['prefixCls', 'offsetTop', 'offsetBottom', 'target', 'onChange', 'affixPrefixCls', 'rootClassName']);
|
||||
// Omit this since `onTestUpdatePosition` only works on test.
|
||||
if (false) {}
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(es/* default */.Z, {
|
||||
onResize: this.updatePosition
|
||||
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({}, props, {
|
||||
ref: this.placeholderNodeRef
|
||||
}), affixStyle && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
style: placeholderStyle,
|
||||
"aria-hidden": "true"
|
||||
}), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
className: className,
|
||||
ref: this.fixedNodeRef,
|
||||
style: affixStyle
|
||||
}, /*#__PURE__*/_react_17_0_2_react.createElement(es/* default */.Z, {
|
||||
onResize: this.updatePosition
|
||||
}, children))));
|
||||
}
|
||||
}]);
|
||||
return InternalAffix;
|
||||
}(_react_17_0_2_react.Component);
|
||||
InternalAffix.contextType = context/* ConfigContext */.E_;
|
||||
const Affix = /*#__PURE__*/(0,_react_17_0_2_react.forwardRef)((props, ref) => {
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
rootClassName
|
||||
} = props;
|
||||
const {
|
||||
getPrefixCls
|
||||
} = (0,_react_17_0_2_react.useContext)(context/* ConfigContext */.E_);
|
||||
const affixPrefixCls = getPrefixCls('affix', customizePrefixCls);
|
||||
const [wrapSSR, hashId] = style(affixPrefixCls);
|
||||
const AffixProps = Object.assign(Object.assign({}, props), {
|
||||
affixPrefixCls,
|
||||
rootClassName: _classnames_2_5_1_classnames_default()(rootClassName, hashId)
|
||||
});
|
||||
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(InternalAffix, Object.assign({}, AffixProps, {
|
||||
ref: ref
|
||||
})));
|
||||
});
|
||||
if (false) {}
|
||||
/* harmony default export */ var affix = (Affix);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 60028:
|
||||
/*!**********************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/upload/index.js ***!
|
||||
\**********************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* harmony import */ var _Dragger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Dragger */ 71409);
|
||||
/* harmony import */ var _Upload__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Upload */ 41945);
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
const Upload = _Upload__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z;
|
||||
Upload.Dragger = _Dragger__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z;
|
||||
Upload.LIST_IGNORE = _Upload__WEBPACK_IMPORTED_MODULE_0__/* .LIST_IGNORE */ .E;
|
||||
/* harmony default export */ __webpack_exports__.Z = (Upload);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 24334:
|
||||
/*!***********************************************************!*\
|
||||
!*** ./node_modules/_js-base64@2.6.4@js-base64/base64.js ***!
|
||||
\***********************************************************/
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
||||
* base64.js
|
||||
*
|
||||
* Licensed under the BSD 3-Clause License.
|
||||
* http://opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
* References:
|
||||
* http://en.wikipedia.org/wiki/Base64
|
||||
*/
|
||||
;(function (global, factory) {
|
||||
true
|
||||
? module.exports = factory(global)
|
||||
: 0
|
||||
}((
|
||||
typeof self !== 'undefined' ? self
|
||||
: typeof window !== 'undefined' ? window
|
||||
: typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g
|
||||
: this
|
||||
), function(global) {
|
||||
'use strict';
|
||||
// existing version for noConflict()
|
||||
global = global || {};
|
||||
var _Base64 = global.Base64;
|
||||
var version = "2.6.4";
|
||||
// constants
|
||||
var b64chars
|
||||
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
||||
var b64tab = function(bin) {
|
||||
var t = {};
|
||||
for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i;
|
||||
return t;
|
||||
}(b64chars);
|
||||
var fromCharCode = String.fromCharCode;
|
||||
// encoder stuff
|
||||
var cb_utob = function(c) {
|
||||
if (c.length < 2) {
|
||||
var cc = c.charCodeAt(0);
|
||||
return cc < 0x80 ? c
|
||||
: cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6))
|
||||
+ fromCharCode(0x80 | (cc & 0x3f)))
|
||||
: (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f))
|
||||
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
|
||||
+ fromCharCode(0x80 | ( cc & 0x3f)));
|
||||
} else {
|
||||
var cc = 0x10000
|
||||
+ (c.charCodeAt(0) - 0xD800) * 0x400
|
||||
+ (c.charCodeAt(1) - 0xDC00);
|
||||
return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07))
|
||||
+ fromCharCode(0x80 | ((cc >>> 12) & 0x3f))
|
||||
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
|
||||
+ fromCharCode(0x80 | ( cc & 0x3f)));
|
||||
}
|
||||
};
|
||||
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
|
||||
var utob = function(u) {
|
||||
return u.replace(re_utob, cb_utob);
|
||||
};
|
||||
var cb_encode = function(ccc) {
|
||||
var padlen = [0, 2, 1][ccc.length % 3],
|
||||
ord = ccc.charCodeAt(0) << 16
|
||||
| ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8)
|
||||
| ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)),
|
||||
chars = [
|
||||
b64chars.charAt( ord >>> 18),
|
||||
b64chars.charAt((ord >>> 12) & 63),
|
||||
padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),
|
||||
padlen >= 1 ? '=' : b64chars.charAt(ord & 63)
|
||||
];
|
||||
return chars.join('');
|
||||
};
|
||||
var btoa = global.btoa && typeof global.btoa == 'function'
|
||||
? function(b){ return global.btoa(b) } : function(b) {
|
||||
if (b.match(/[^\x00-\xFF]/)) throw new RangeError(
|
||||
'The string contains invalid characters.'
|
||||
);
|
||||
return b.replace(/[\s\S]{1,3}/g, cb_encode);
|
||||
};
|
||||
var _encode = function(u) {
|
||||
return btoa(utob(String(u)));
|
||||
};
|
||||
var mkUriSafe = function (b64) {
|
||||
return b64.replace(/[+\/]/g, function(m0) {
|
||||
return m0 == '+' ? '-' : '_';
|
||||
}).replace(/=/g, '');
|
||||
};
|
||||
var encode = function(u, urisafe) {
|
||||
return urisafe ? mkUriSafe(_encode(u)) : _encode(u);
|
||||
};
|
||||
var encodeURI = function(u) { return encode(u, true) };
|
||||
var fromUint8Array;
|
||||
if (global.Uint8Array) fromUint8Array = function(a, urisafe) {
|
||||
// return btoa(fromCharCode.apply(null, a));
|
||||
var b64 = '';
|
||||
for (var i = 0, l = a.length; i < l; i += 3) {
|
||||
var a0 = a[i], a1 = a[i+1], a2 = a[i+2];
|
||||
var ord = a0 << 16 | a1 << 8 | a2;
|
||||
b64 += b64chars.charAt( ord >>> 18)
|
||||
+ b64chars.charAt((ord >>> 12) & 63)
|
||||
+ ( typeof a1 != 'undefined'
|
||||
? b64chars.charAt((ord >>> 6) & 63) : '=')
|
||||
+ ( typeof a2 != 'undefined'
|
||||
? b64chars.charAt( ord & 63) : '=');
|
||||
}
|
||||
return urisafe ? mkUriSafe(b64) : b64;
|
||||
};
|
||||
// decoder stuff
|
||||
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
|
||||
var cb_btou = function(cccc) {
|
||||
switch(cccc.length) {
|
||||
case 4:
|
||||
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
|
||||
| ((0x3f & cccc.charCodeAt(1)) << 12)
|
||||
| ((0x3f & cccc.charCodeAt(2)) << 6)
|
||||
| (0x3f & cccc.charCodeAt(3)),
|
||||
offset = cp - 0x10000;
|
||||
return (fromCharCode((offset >>> 10) + 0xD800)
|
||||
+ fromCharCode((offset & 0x3FF) + 0xDC00));
|
||||
case 3:
|
||||
return fromCharCode(
|
||||
((0x0f & cccc.charCodeAt(0)) << 12)
|
||||
| ((0x3f & cccc.charCodeAt(1)) << 6)
|
||||
| (0x3f & cccc.charCodeAt(2))
|
||||
);
|
||||
default:
|
||||
return fromCharCode(
|
||||
((0x1f & cccc.charCodeAt(0)) << 6)
|
||||
| (0x3f & cccc.charCodeAt(1))
|
||||
);
|
||||
}
|
||||
};
|
||||
var btou = function(b) {
|
||||
return b.replace(re_btou, cb_btou);
|
||||
};
|
||||
var cb_decode = function(cccc) {
|
||||
var len = cccc.length,
|
||||
padlen = len % 4,
|
||||
n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)
|
||||
| (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)
|
||||
| (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0)
|
||||
| (len > 3 ? b64tab[cccc.charAt(3)] : 0),
|
||||
chars = [
|
||||
fromCharCode( n >>> 16),
|
||||
fromCharCode((n >>> 8) & 0xff),
|
||||
fromCharCode( n & 0xff)
|
||||
];
|
||||
chars.length -= [0, 0, 2, 1][padlen];
|
||||
return chars.join('');
|
||||
};
|
||||
var _atob = global.atob && typeof global.atob == 'function'
|
||||
? function(a){ return global.atob(a) } : function(a){
|
||||
return a.replace(/\S{1,4}/g, cb_decode);
|
||||
};
|
||||
var atob = function(a) {
|
||||
return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, ''));
|
||||
};
|
||||
var _decode = function(a) { return btou(_atob(a)) };
|
||||
var _fromURI = function(a) {
|
||||
return String(a).replace(/[-_]/g, function(m0) {
|
||||
return m0 == '-' ? '+' : '/'
|
||||
}).replace(/[^A-Za-z0-9\+\/]/g, '');
|
||||
};
|
||||
var decode = function(a){
|
||||
return _decode(_fromURI(a));
|
||||
};
|
||||
var toUint8Array;
|
||||
if (global.Uint8Array) toUint8Array = function(a) {
|
||||
return Uint8Array.from(atob(_fromURI(a)), function(c) {
|
||||
return c.charCodeAt(0);
|
||||
});
|
||||
};
|
||||
var noConflict = function() {
|
||||
var Base64 = global.Base64;
|
||||
global.Base64 = _Base64;
|
||||
return Base64;
|
||||
};
|
||||
// export Base64
|
||||
global.Base64 = {
|
||||
VERSION: version,
|
||||
atob: atob,
|
||||
btoa: btoa,
|
||||
fromBase64: decode,
|
||||
toBase64: encode,
|
||||
utob: utob,
|
||||
encode: encode,
|
||||
encodeURI: encodeURI,
|
||||
btou: btou,
|
||||
decode: decode,
|
||||
noConflict: noConflict,
|
||||
fromUint8Array: fromUint8Array,
|
||||
toUint8Array: toUint8Array
|
||||
};
|
||||
// if ES5 is available, make Base64.extendString() available
|
||||
if (typeof Object.defineProperty === 'function') {
|
||||
var noEnum = function(v){
|
||||
return {value:v,enumerable:false,writable:true,configurable:true};
|
||||
};
|
||||
global.Base64.extendString = function () {
|
||||
Object.defineProperty(
|
||||
String.prototype, 'fromBase64', noEnum(function () {
|
||||
return decode(this)
|
||||
}));
|
||||
Object.defineProperty(
|
||||
String.prototype, 'toBase64', noEnum(function (urisafe) {
|
||||
return encode(this, urisafe)
|
||||
}));
|
||||
Object.defineProperty(
|
||||
String.prototype, 'toBase64URI', noEnum(function () {
|
||||
return encode(this, true)
|
||||
}));
|
||||
};
|
||||
}
|
||||
//
|
||||
// export Base64 to the namespace
|
||||
//
|
||||
if (global['Meteor']) { // Meteor.js
|
||||
Base64 = global.Base64;
|
||||
}
|
||||
// module.exports and AMD are mutually exclusive.
|
||||
// module.exports has precedence.
|
||||
if ( true && module.exports) {
|
||||
module.exports.Base64 = global.Base64;
|
||||
}
|
||||
else if (true) {
|
||||
// AMD. Register as an anonymous module.
|
||||
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){ return global.Base64 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
||||
}
|
||||
// that's it!
|
||||
return {Base64: global.Base64}
|
||||
}));
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,390 +1,5 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[27039],{
|
||||
|
||||
/***/ 27666:
|
||||
/*!****************************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/_util/throttleByAnimationFrame.js ***!
|
||||
\****************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ 65093);
|
||||
/* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/raf */ 23073);
|
||||
|
||||
|
||||
function throttleByAnimationFrame(fn) {
|
||||
let requestId;
|
||||
const later = args => () => {
|
||||
requestId = null;
|
||||
fn.apply(void 0, (0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(args));
|
||||
};
|
||||
const throttled = function () {
|
||||
if (requestId == null) {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
requestId = (0,rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(later(args));
|
||||
}
|
||||
};
|
||||
throttled.cancel = () => {
|
||||
rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.cancel(requestId);
|
||||
requestId = null;
|
||||
};
|
||||
return throttled;
|
||||
}
|
||||
/* harmony default export */ __webpack_exports__.Z = (throttleByAnimationFrame);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 81228:
|
||||
/*!*********************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/affix/index.js + 2 modules ***!
|
||||
\*********************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ affix; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/classCallCheck.js
|
||||
var classCallCheck = __webpack_require__(44202);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/createClass.js
|
||||
var createClass = __webpack_require__(86773);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/inherits.js
|
||||
var inherits = __webpack_require__(82412);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.7@@babel/runtime/helpers/esm/createSuper.js + 1 modules
|
||||
var createSuper = __webpack_require__(52444);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
||||
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
||||
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
||||
// EXTERNAL MODULE: ./node_modules/_rc-resize-observer@1.4.3@rc-resize-observer/es/index.js + 4 modules
|
||||
var es = __webpack_require__(29301);
|
||||
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.3@rc-util/es/omit.js
|
||||
var omit = __webpack_require__(64002);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/throttleByAnimationFrame.js
|
||||
var throttleByAnimationFrame = __webpack_require__(27666);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
||||
var context = __webpack_require__(36355);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
||||
var genComponentStyleHook = __webpack_require__(83116);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
||||
var statistic = __webpack_require__(37613);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/affix/style/index.js
|
||||
|
||||
// ============================== Shared ==============================
|
||||
const genSharedAffixStyle = token => {
|
||||
const {
|
||||
componentCls
|
||||
} = token;
|
||||
return {
|
||||
[componentCls]: {
|
||||
position: 'fixed',
|
||||
zIndex: token.zIndexPopup
|
||||
}
|
||||
};
|
||||
};
|
||||
// ============================== Export ==============================
|
||||
/* harmony default export */ var style = ((0,genComponentStyleHook/* default */.Z)('Affix', token => {
|
||||
const affixToken = (0,statistic/* merge */.TS)(token, {
|
||||
zIndexPopup: token.zIndexBase + 10
|
||||
});
|
||||
return [genSharedAffixStyle(affixToken)];
|
||||
}));
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/affix/utils.js
|
||||
function getTargetRect(target) {
|
||||
return target !== window ? target.getBoundingClientRect() : {
|
||||
top: 0,
|
||||
bottom: window.innerHeight
|
||||
};
|
||||
}
|
||||
function getFixedTop(placeholderRect, targetRect, offsetTop) {
|
||||
if (offsetTop !== undefined && targetRect.top > placeholderRect.top - offsetTop) {
|
||||
return offsetTop + targetRect.top;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
function getFixedBottom(placeholderRect, targetRect, offsetBottom) {
|
||||
if (offsetBottom !== undefined && targetRect.bottom < placeholderRect.bottom + offsetBottom) {
|
||||
const targetBottomOffset = window.innerHeight - targetRect.bottom;
|
||||
return offsetBottom + targetBottomOffset;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/affix/index.js
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const TRIGGER_EVENTS = ['resize', 'scroll', 'touchstart', 'touchmove', 'touchend', 'pageshow', 'load'];
|
||||
function getDefaultTarget() {
|
||||
return typeof window !== 'undefined' ? window : null;
|
||||
}
|
||||
var AffixStatus;
|
||||
(function (AffixStatus) {
|
||||
AffixStatus[AffixStatus["None"] = 0] = "None";
|
||||
AffixStatus[AffixStatus["Prepare"] = 1] = "Prepare";
|
||||
})(AffixStatus || (AffixStatus = {}));
|
||||
let InternalAffix = /*#__PURE__*/function (_React$Component) {
|
||||
(0,inherits/* default */.Z)(InternalAffix, _React$Component);
|
||||
var _super = (0,createSuper/* default */.Z)(InternalAffix);
|
||||
function InternalAffix() {
|
||||
var _this;
|
||||
(0,classCallCheck/* default */.Z)(this, InternalAffix);
|
||||
_this = _super.apply(this, arguments);
|
||||
_this.state = {
|
||||
status: AffixStatus.None,
|
||||
lastAffix: false,
|
||||
prevTarget: null
|
||||
};
|
||||
_this.placeholderNodeRef = /*#__PURE__*/(0,_react_17_0_2_react.createRef)();
|
||||
_this.fixedNodeRef = /*#__PURE__*/(0,_react_17_0_2_react.createRef)();
|
||||
_this.addListeners = () => {
|
||||
const targetFunc = _this.getTargetFunc();
|
||||
const target = targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc();
|
||||
const {
|
||||
prevTarget
|
||||
} = _this.state;
|
||||
if (prevTarget !== target) {
|
||||
TRIGGER_EVENTS.forEach(eventName => {
|
||||
prevTarget === null || prevTarget === void 0 ? void 0 : prevTarget.removeEventListener(eventName, _this.lazyUpdatePosition);
|
||||
target === null || target === void 0 ? void 0 : target.addEventListener(eventName, _this.lazyUpdatePosition);
|
||||
});
|
||||
_this.updatePosition();
|
||||
_this.setState({
|
||||
prevTarget: target
|
||||
});
|
||||
}
|
||||
};
|
||||
_this.removeListeners = () => {
|
||||
if (_this.timer) {
|
||||
clearTimeout(_this.timer);
|
||||
_this.timer = null;
|
||||
}
|
||||
const {
|
||||
prevTarget
|
||||
} = _this.state;
|
||||
const targetFunc = _this.getTargetFunc();
|
||||
const newTarget = targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc();
|
||||
TRIGGER_EVENTS.forEach(eventName => {
|
||||
newTarget === null || newTarget === void 0 ? void 0 : newTarget.removeEventListener(eventName, _this.lazyUpdatePosition);
|
||||
prevTarget === null || prevTarget === void 0 ? void 0 : prevTarget.removeEventListener(eventName, _this.lazyUpdatePosition);
|
||||
});
|
||||
_this.updatePosition.cancel();
|
||||
// https://github.com/ant-design/ant-design/issues/22683
|
||||
_this.lazyUpdatePosition.cancel();
|
||||
};
|
||||
_this.getOffsetTop = () => {
|
||||
const {
|
||||
offsetBottom,
|
||||
offsetTop
|
||||
} = _this.props;
|
||||
return offsetBottom === undefined && offsetTop === undefined ? 0 : offsetTop;
|
||||
};
|
||||
_this.getOffsetBottom = () => _this.props.offsetBottom;
|
||||
// =================== Measure ===================
|
||||
_this.measure = () => {
|
||||
const {
|
||||
status,
|
||||
lastAffix
|
||||
} = _this.state;
|
||||
const {
|
||||
onChange
|
||||
} = _this.props;
|
||||
const targetFunc = _this.getTargetFunc();
|
||||
if (status !== AffixStatus.Prepare || !_this.fixedNodeRef.current || !_this.placeholderNodeRef.current || !targetFunc) {
|
||||
return;
|
||||
}
|
||||
const offsetTop = _this.getOffsetTop();
|
||||
const offsetBottom = _this.getOffsetBottom();
|
||||
const targetNode = targetFunc();
|
||||
if (targetNode) {
|
||||
const newState = {
|
||||
status: AffixStatus.None
|
||||
};
|
||||
const placeholderRect = getTargetRect(_this.placeholderNodeRef.current);
|
||||
if (placeholderRect.top === 0 && placeholderRect.left === 0 && placeholderRect.width === 0 && placeholderRect.height === 0) {
|
||||
return;
|
||||
}
|
||||
const targetRect = getTargetRect(targetNode);
|
||||
const fixedTop = getFixedTop(placeholderRect, targetRect, offsetTop);
|
||||
const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom);
|
||||
if (fixedTop !== undefined) {
|
||||
newState.affixStyle = {
|
||||
position: 'fixed',
|
||||
top: fixedTop,
|
||||
width: placeholderRect.width,
|
||||
height: placeholderRect.height
|
||||
};
|
||||
newState.placeholderStyle = {
|
||||
width: placeholderRect.width,
|
||||
height: placeholderRect.height
|
||||
};
|
||||
} else if (fixedBottom !== undefined) {
|
||||
newState.affixStyle = {
|
||||
position: 'fixed',
|
||||
bottom: fixedBottom,
|
||||
width: placeholderRect.width,
|
||||
height: placeholderRect.height
|
||||
};
|
||||
newState.placeholderStyle = {
|
||||
width: placeholderRect.width,
|
||||
height: placeholderRect.height
|
||||
};
|
||||
}
|
||||
newState.lastAffix = !!newState.affixStyle;
|
||||
if (onChange && lastAffix !== newState.lastAffix) {
|
||||
onChange(newState.lastAffix);
|
||||
}
|
||||
_this.setState(newState);
|
||||
}
|
||||
};
|
||||
_this.prepareMeasure = () => {
|
||||
// event param is used before. Keep compatible ts define here.
|
||||
_this.setState({
|
||||
status: AffixStatus.Prepare,
|
||||
affixStyle: undefined,
|
||||
placeholderStyle: undefined
|
||||
});
|
||||
// Test if `updatePosition` called
|
||||
if (false) {}
|
||||
};
|
||||
_this.updatePosition = (0,throttleByAnimationFrame/* default */.Z)(() => {
|
||||
_this.prepareMeasure();
|
||||
});
|
||||
_this.lazyUpdatePosition = (0,throttleByAnimationFrame/* default */.Z)(() => {
|
||||
const targetFunc = _this.getTargetFunc();
|
||||
const {
|
||||
affixStyle
|
||||
} = _this.state;
|
||||
// Check position change before measure to make Safari smooth
|
||||
if (targetFunc && affixStyle) {
|
||||
const offsetTop = _this.getOffsetTop();
|
||||
const offsetBottom = _this.getOffsetBottom();
|
||||
const targetNode = targetFunc();
|
||||
if (targetNode && _this.placeholderNodeRef.current) {
|
||||
const targetRect = getTargetRect(targetNode);
|
||||
const placeholderRect = getTargetRect(_this.placeholderNodeRef.current);
|
||||
const fixedTop = getFixedTop(placeholderRect, targetRect, offsetTop);
|
||||
const fixedBottom = getFixedBottom(placeholderRect, targetRect, offsetBottom);
|
||||
if (fixedTop !== undefined && affixStyle.top === fixedTop || fixedBottom !== undefined && affixStyle.bottom === fixedBottom) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Directly call prepare measure since it's already throttled.
|
||||
_this.prepareMeasure();
|
||||
});
|
||||
return _this;
|
||||
}
|
||||
(0,createClass/* default */.Z)(InternalAffix, [{
|
||||
key: "getTargetFunc",
|
||||
value: function getTargetFunc() {
|
||||
const {
|
||||
getTargetContainer
|
||||
} = this.context;
|
||||
const {
|
||||
target
|
||||
} = this.props;
|
||||
if (target !== undefined) {
|
||||
return target;
|
||||
}
|
||||
return getTargetContainer !== null && getTargetContainer !== void 0 ? getTargetContainer : getDefaultTarget;
|
||||
}
|
||||
// Event handler
|
||||
}, {
|
||||
key: "componentDidMount",
|
||||
value: function componentDidMount() {
|
||||
// [Legacy] Wait for parent component ref has its value.
|
||||
// We should use target as directly element instead of function which makes element check hard.
|
||||
this.timer = setTimeout(this.addListeners);
|
||||
}
|
||||
}, {
|
||||
key: "componentDidUpdate",
|
||||
value: function componentDidUpdate(prevProps) {
|
||||
this.addListeners();
|
||||
if (prevProps.offsetTop !== this.props.offsetTop || prevProps.offsetBottom !== this.props.offsetBottom) {
|
||||
this.updatePosition();
|
||||
}
|
||||
this.measure();
|
||||
}
|
||||
}, {
|
||||
key: "componentWillUnmount",
|
||||
value: function componentWillUnmount() {
|
||||
this.removeListeners();
|
||||
}
|
||||
// =================== Render ===================
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
const {
|
||||
affixStyle,
|
||||
placeholderStyle
|
||||
} = this.state;
|
||||
const {
|
||||
affixPrefixCls,
|
||||
rootClassName,
|
||||
children
|
||||
} = this.props;
|
||||
const className = _classnames_2_5_1_classnames_default()(affixStyle && rootClassName, {
|
||||
[affixPrefixCls]: !!affixStyle
|
||||
});
|
||||
let props = (0,omit/* default */.Z)(this.props, ['prefixCls', 'offsetTop', 'offsetBottom', 'target', 'onChange', 'affixPrefixCls', 'rootClassName']);
|
||||
// Omit this since `onTestUpdatePosition` only works on test.
|
||||
if (false) {}
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(es/* default */.Z, {
|
||||
onResize: this.updatePosition
|
||||
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({}, props, {
|
||||
ref: this.placeholderNodeRef
|
||||
}), affixStyle && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
style: placeholderStyle,
|
||||
"aria-hidden": "true"
|
||||
}), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
className: className,
|
||||
ref: this.fixedNodeRef,
|
||||
style: affixStyle
|
||||
}, /*#__PURE__*/_react_17_0_2_react.createElement(es/* default */.Z, {
|
||||
onResize: this.updatePosition
|
||||
}, children))));
|
||||
}
|
||||
}]);
|
||||
return InternalAffix;
|
||||
}(_react_17_0_2_react.Component);
|
||||
InternalAffix.contextType = context/* ConfigContext */.E_;
|
||||
const Affix = /*#__PURE__*/(0,_react_17_0_2_react.forwardRef)((props, ref) => {
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
rootClassName
|
||||
} = props;
|
||||
const {
|
||||
getPrefixCls
|
||||
} = (0,_react_17_0_2_react.useContext)(context/* ConfigContext */.E_);
|
||||
const affixPrefixCls = getPrefixCls('affix', customizePrefixCls);
|
||||
const [wrapSSR, hashId] = style(affixPrefixCls);
|
||||
const AffixProps = Object.assign(Object.assign({}, props), {
|
||||
affixPrefixCls,
|
||||
rootClassName: _classnames_2_5_1_classnames_default()(rootClassName, hashId)
|
||||
});
|
||||
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(InternalAffix, Object.assign({}, AffixProps, {
|
||||
ref: ref
|
||||
})));
|
||||
});
|
||||
if (false) {}
|
||||
/* harmony default export */ var affix = (Affix);
|
||||
|
||||
/***/ }),
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[52169],{
|
||||
|
||||
/***/ 63050:
|
||||
/*!**********************************************************************!*\
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,398 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[88093],{
|
||||
|
||||
/***/ 90804:
|
||||
/*!***************************************************************!*\
|
||||
!*** ./src/pages/Equipment/Maintenance/index.tsx + 3 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 */ Maintenance; }
|
||||
});
|
||||
|
||||
// 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/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectDestructuringEmpty.js
|
||||
var objectDestructuringEmpty = __webpack_require__(70236);
|
||||
var objectDestructuringEmpty_default = /*#__PURE__*/__webpack_require__.n(objectDestructuringEmpty);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 3 modules
|
||||
var input = __webpack_require__(92832);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
||||
var table = __webpack_require__(36546);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
||||
var pagination = __webpack_require__(19871);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// 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: ./src/service/onlinedevice.ts
|
||||
var onlinedevice = __webpack_require__(82135);
|
||||
// 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/modal/index.js + 16 modules
|
||||
var modal = __webpack_require__(43418);
|
||||
// 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/radio/index.js + 5 modules
|
||||
var es_radio = __webpack_require__(5112);
|
||||
;// CONCATENATED MODULE: ./src/pages/Equipment/Maintenance/Dialog/index.less?modules
|
||||
// extracted by mini-css-extract-plugin
|
||||
/* harmony default export */ var Dialogmodules = ({"file_button":"file_button___Ta3Fp","my_modal":"my_modal___cAWzt"});
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
||||
var jsx_runtime = __webpack_require__(37712);
|
||||
;// CONCATENATED MODULE: ./src/pages/Equipment/Maintenance/Dialog/index.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var TextArea = input/* default */.Z.TextArea;
|
||||
var DeviceTypeDialog = function DeviceTypeDialog(_ref) {
|
||||
var visible = _ref.visible,
|
||||
setVisible = _ref.setVisible,
|
||||
dataInfo = _ref.dataInfo,
|
||||
queryData = _ref.queryData;
|
||||
var _Form$useForm = es_form/* default */.Z.useForm(),
|
||||
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
||||
form = _Form$useForm2[0];
|
||||
(0,_react_17_0_2_react.useEffect)(function () {
|
||||
if (visible) {
|
||||
if (dataInfo !== null && dataInfo !== void 0 && dataInfo.id) {
|
||||
//编辑时 查看详情
|
||||
(0,onlinedevice/* device_type_table_info */.SY)(dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.id).then(function (res) {
|
||||
form.setFieldsValue(objectSpread2_default()({}, res));
|
||||
});
|
||||
}
|
||||
} else {
|
||||
form.resetFields();
|
||||
}
|
||||
}, [visible]);
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
||||
maskClosable: false,
|
||||
centered: true,
|
||||
keyboard: false,
|
||||
destroyOnClose: true,
|
||||
className: Dialogmodules.my_modal,
|
||||
title: "".concat(dataInfo !== null && dataInfo !== void 0 && dataInfo.id ? '编辑' : '新增', "\u8BBE\u5907\u7C7B\u578B"),
|
||||
width: "700px",
|
||||
open: visible,
|
||||
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:
|
||||
form.submit();
|
||||
case 1:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee);
|
||||
})),
|
||||
onCancel: function onCancel() {
|
||||
setVisible(false);
|
||||
},
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
||||
size: "large",
|
||||
className: Dialogmodules.formWrap,
|
||||
labelAlign: "right",
|
||||
labelCol: {
|
||||
span: 5
|
||||
},
|
||||
form: form,
|
||||
onFinish: function onFinish(allValue) {
|
||||
if (allValue.id) {
|
||||
var _allValue$description, _allValue$name;
|
||||
//编辑
|
||||
(0,onlinedevice/* device_type_table_update */.RW)(objectSpread2_default()(objectSpread2_default()({}, allValue), {}, {
|
||||
description: allValue === null || allValue === void 0 || (_allValue$description = allValue.description) === null || _allValue$description === void 0 ? void 0 : _allValue$description.trim(),
|
||||
name: allValue === null || allValue === void 0 || (_allValue$name = allValue.name) === null || _allValue$name === void 0 ? void 0 : _allValue$name.trim()
|
||||
})).then(function (res) {
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
||||
message/* default */.ZP.success('编辑成功');
|
||||
setVisible(false);
|
||||
queryData();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var _allValue$description2, _allValue$name2;
|
||||
//新增
|
||||
(0,onlinedevice/* device_type_table_add */.d_)(objectSpread2_default()(objectSpread2_default()({}, allValue), {}, {
|
||||
description: allValue === null || allValue === void 0 || (_allValue$description2 = allValue.description) === null || _allValue$description2 === void 0 ? void 0 : _allValue$description2.trim(),
|
||||
name: allValue === null || allValue === void 0 || (_allValue$name2 = allValue.name) === null || _allValue$name2 === void 0 ? void 0 : _allValue$name2.trim()
|
||||
})).then(function (res) {
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
||||
message/* default */.ZP.success('新增成功');
|
||||
setVisible(false);
|
||||
queryData();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "id",
|
||||
hidden: true
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "name",
|
||||
label: "\u7C7B\u578B\u540D\u79F0",
|
||||
rules: [{
|
||||
required: true
|
||||
}],
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "number",
|
||||
label: "\u7C7B\u578B\u7F16\u53F7",
|
||||
rules: [{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: '不能为空'
|
||||
}, {
|
||||
required: true,
|
||||
pattern: /^\d{3}$/,
|
||||
message: '必须是三位数字'
|
||||
}],
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
||||
disabled: dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.id
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "need_monitor",
|
||||
label: "\u662F\u5426\u9700\u8981\u76D1\u63A7\u6027\u80FD",
|
||||
rules: [{
|
||||
required: true,
|
||||
message: '请选择是否需要监控性能'
|
||||
}],
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Group */.ZP.Group, {
|
||||
options: [{
|
||||
value: false,
|
||||
label: '否'
|
||||
}, {
|
||||
value: true,
|
||||
label: '是'
|
||||
}]
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "description",
|
||||
label: "\u5907\u6CE8",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
|
||||
rows: 4
|
||||
})
|
||||
})]
|
||||
})
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var Dialog = (DeviceTypeDialog);
|
||||
;// CONCATENATED MODULE: ./src/pages/Equipment/Maintenance/index.less?modules
|
||||
// extracted by mini-css-extract-plugin
|
||||
/* harmony default export */ var Maintenancemodules = ({"header_div":"header_div___trzMW","header_title":"header_title___RyK0X","search":"search___lF9UC","searchIcon":"searchIcon___YY41x","search_params":"search_params___eBV0k","clear_Data":"clear_Data___Wcmtq","ellipsis":"ellipsis___eB9rv"});
|
||||
// EXTERNAL MODULE: ./src/styles/table_botton.less
|
||||
var table_botton = __webpack_require__(55130);
|
||||
;// CONCATENATED MODULE: ./src/pages/Equipment/Maintenance/index.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var DeviceTypePage = function DeviceTypePage(_ref) {
|
||||
objectDestructuringEmpty_default()(_ref);
|
||||
var _useState = (0,_react_17_0_2_react.useState)([]),
|
||||
_useState2 = slicedToArray_default()(_useState, 2),
|
||||
tableData = _useState2[0],
|
||||
setTableData = _useState2[1];
|
||||
var _useState3 = (0,_react_17_0_2_react.useState)(1),
|
||||
_useState4 = slicedToArray_default()(_useState3, 2),
|
||||
page = _useState4[0],
|
||||
setPage = _useState4[1];
|
||||
var _useState5 = (0,_react_17_0_2_react.useState)(10),
|
||||
_useState6 = slicedToArray_default()(_useState5, 2),
|
||||
limit = _useState6[0],
|
||||
setLimit = _useState6[1];
|
||||
var _useState7 = (0,_react_17_0_2_react.useState)(0),
|
||||
_useState8 = slicedToArray_default()(_useState7, 2),
|
||||
total = _useState8[0],
|
||||
setTotal = _useState8[1];
|
||||
var _useState9 = (0,_react_17_0_2_react.useState)(''),
|
||||
_useState10 = slicedToArray_default()(_useState9, 2),
|
||||
keyword = _useState10[0],
|
||||
setKeyword = _useState10[1];
|
||||
var _useState11 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState12 = slicedToArray_default()(_useState11, 2),
|
||||
visible = _useState12[0],
|
||||
setVisible = _useState12[1];
|
||||
var _useState13 = (0,_react_17_0_2_react.useState)({}),
|
||||
_useState14 = slicedToArray_default()(_useState13, 2),
|
||||
dataInfo = _useState14[0],
|
||||
setDataInfo = _useState14[1];
|
||||
(0,_react_17_0_2_react.useEffect)(function () {
|
||||
queryData();
|
||||
}, [page, limit]);
|
||||
var columns = [{
|
||||
title: '类型编号',
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
key: 'number',
|
||||
dataIndex: 'number'
|
||||
}, {
|
||||
title: '类型名称',
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
key: 'name',
|
||||
dataIndex: 'name'
|
||||
}, {
|
||||
title: '关联设备数',
|
||||
width: 100,
|
||||
key: 'associated_device_count',
|
||||
dataIndex: 'associated_device_count'
|
||||
}, {
|
||||
title: '是否需要监控性能',
|
||||
key: 'need_monitor',
|
||||
dataIndex: 'need_monitor',
|
||||
width: 200,
|
||||
align: 'center',
|
||||
render: function render(text) {
|
||||
return text ? '是' : '否';
|
||||
}
|
||||
}, {
|
||||
title: '类型说明',
|
||||
key: 'description',
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
dataIndex: 'description'
|
||||
}, {
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
key: 'cz',
|
||||
width: 200,
|
||||
render: function render(_, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
style: {
|
||||
color: "#165dff",
|
||||
marginRight: '10px',
|
||||
cursor: "pointer"
|
||||
},
|
||||
onClick: function onClick() {
|
||||
setVisible(true);
|
||||
setDataInfo(record);
|
||||
},
|
||||
children: "\u7F16\u8F91"
|
||||
});
|
||||
}
|
||||
}];
|
||||
var onChange = function onChange(pageNumber) {
|
||||
setPage(pageNumber);
|
||||
};
|
||||
var onShowSizeChange = function onShowSizeChange(current, pageSize) {
|
||||
setLimit(pageSize);
|
||||
};
|
||||
var queryData = function queryData() {
|
||||
(0,onlinedevice/* device_type_table_query */.uz)({
|
||||
page: page,
|
||||
limit: limit,
|
||||
keyword: keyword
|
||||
}).then(function (res) {
|
||||
// if (res.status == 0) {
|
||||
setTableData(res === null || res === void 0 ? void 0 : res.device_types);
|
||||
setTotal(res === null || res === void 0 ? void 0 : res.device_type_count);
|
||||
// }
|
||||
});
|
||||
};
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Maintenancemodules.header_div,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: Maintenancemodules.header_title,
|
||||
children: "\u8BBE\u5907\u7C7B\u578B\u7BA1\u7406"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Maintenancemodules.search_params,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
||||
placeholder: "\u8BF7\u8F93\u5165\u60A8\u60F3\u641C\u7D22\u7684\u5185\u5BB9",
|
||||
size: "large",
|
||||
className: Maintenancemodules.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(Maintenancemodules.searchIcon),
|
||||
onClick: function onClick() {
|
||||
queryData();
|
||||
}
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: Maintenancemodules.clear_Data,
|
||||
style: {
|
||||
width: '88px',
|
||||
marginLeft: '20px'
|
||||
},
|
||||
onClick: function onClick() {
|
||||
setVisible(true);
|
||||
setDataInfo({});
|
||||
},
|
||||
children: "\u65B0\u5EFA\u7C7B\u578B"
|
||||
})]
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
||||
scroll: {
|
||||
x: 1500
|
||||
},
|
||||
columns: columns,
|
||||
dataSource: tableData,
|
||||
pagination: false,
|
||||
rowKey: "id"
|
||||
}), total > limit && /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
||||
showQuickJumper: true,
|
||||
current: page,
|
||||
pageSize: limit,
|
||||
total: total,
|
||||
onChange: onChange,
|
||||
className: Maintenancemodules.page_style,
|
||||
onShowSizeChange: onShowSizeChange
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Dialog, {
|
||||
visible: visible,
|
||||
queryData: queryData,
|
||||
setVisible: setVisible,
|
||||
dataInfo: dataInfo
|
||||
})]
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var Maintenance = (DeviceTypePage);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 55130:
|
||||
/*!**************************************!*\
|
||||
!*** ./src/styles/table_botton.less ***!
|
||||
\**************************************/
|
||||
/***/ (function() {
|
||||
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
@ -1,622 +0,0 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[88093],{
|
||||
|
||||
/***/ 90804:
|
||||
/*!***************************************************************!*\
|
||||
!*** ./src/pages/Equipment/Maintenance/index.tsx + 3 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 */ Maintenance; }
|
||||
});
|
||||
|
||||
// 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/slicedToArray.js
|
||||
var slicedToArray = __webpack_require__(79800);
|
||||
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectDestructuringEmpty.js
|
||||
var objectDestructuringEmpty = __webpack_require__(70236);
|
||||
var objectDestructuringEmpty_default = /*#__PURE__*/__webpack_require__.n(objectDestructuringEmpty);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js + 1 modules
|
||||
var dropdown = __webpack_require__(38854);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/menu/index.js + 11 modules
|
||||
var menu = __webpack_require__(20834);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
||||
var modal = __webpack_require__(43418);
|
||||
// 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 + 3 modules
|
||||
var input = __webpack_require__(92832);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
||||
var table = __webpack_require__(36546);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
||||
var pagination = __webpack_require__(19871);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
||||
var env = __webpack_require__(69423);
|
||||
// EXTERNAL MODULE: ./src/utils/util.tsx
|
||||
var util = __webpack_require__(95972);
|
||||
// EXTERNAL MODULE: ./src/service/onlinedevice.ts
|
||||
var onlinedevice = __webpack_require__(82135);
|
||||
// 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/select/index.js
|
||||
var es_select = __webpack_require__(57809);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js
|
||||
var upload = __webpack_require__(60028);
|
||||
;// CONCATENATED MODULE: ./src/pages/Equipment/Maintenance/Dialog/index.less?modules
|
||||
// extracted by mini-css-extract-plugin
|
||||
/* harmony default export */ var Dialogmodules = ({"file_button":"file_button___Ta3Fp","my_modal":"my_modal___cAWzt"});
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
||||
var jsx_runtime = __webpack_require__(37712);
|
||||
;// CONCATENATED MODULE: ./src/pages/Equipment/Maintenance/Dialog/index.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var TextArea = input/* default */.Z.TextArea;
|
||||
var DeviceTypeDialog = function DeviceTypeDialog(_ref) {
|
||||
var visible = _ref.visible,
|
||||
setVisible = _ref.setVisible,
|
||||
dataInfo = _ref.dataInfo,
|
||||
queryData = _ref.queryData;
|
||||
// 关联设备弹窗
|
||||
var _Form$useForm = es_form/* default */.Z.useForm(),
|
||||
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
||||
form = _Form$useForm2[0];
|
||||
(0,_react_17_0_2_react.useEffect)(function () {
|
||||
if (visible) {
|
||||
if (dataInfo !== null && dataInfo !== void 0 && dataInfo.id) {
|
||||
//编辑时 查看详情
|
||||
(0,onlinedevice/* device_type_table_info */.SY)(dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.id).then(function (res) {
|
||||
for (var i in res) {
|
||||
form.setFieldValue(i, res[i]);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
form.resetFields();
|
||||
}
|
||||
}, [visible]);
|
||||
var _useState = (0,_react_17_0_2_react.useState)(),
|
||||
_useState2 = slicedToArray_default()(_useState, 2),
|
||||
FileLists = _useState2[0],
|
||||
setFileLists = _useState2[1];
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
||||
maskClosable: false,
|
||||
centered: true,
|
||||
keyboard: false,
|
||||
destroyOnClose: true,
|
||||
className: Dialogmodules.my_modal,
|
||||
title: "".concat(dataInfo !== null && dataInfo !== void 0 && dataInfo.id ? '编辑' : '新增', "\u8BBE\u5907\u7C7B\u578B"),
|
||||
width: "700px",
|
||||
open: visible,
|
||||
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
||||
var _values$operate_manua;
|
||||
var values, _values$description, _values$name, _values$description2, _values$name2;
|
||||
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
||||
while (1) switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.next = 2;
|
||||
return form.validateFields();
|
||||
case 2:
|
||||
values = form.getFieldsValue();
|
||||
values.operate_manual_ids = [];
|
||||
values === null || values === void 0 || (_values$operate_manua = values.operate_manuals) === null || _values$operate_manua === void 0 || _values$operate_manua.map(function (item) {
|
||||
var _values$operate_manua2, _item$response;
|
||||
values === null || values === void 0 || (_values$operate_manua2 = values.operate_manual_ids) === null || _values$operate_manua2 === void 0 || _values$operate_manua2.push((item === null || item === void 0 || (_item$response = item.response) === null || _item$response === void 0 ? void 0 : _item$response.id) || (item === null || item === void 0 ? void 0 : item.id));
|
||||
});
|
||||
if (form.getFieldValue('id')) {
|
||||
//编辑
|
||||
(0,onlinedevice/* device_type_table_update */.RW)({
|
||||
id: form.getFieldValue('id'),
|
||||
description: values === null || values === void 0 || (_values$description = values.description) === null || _values$description === void 0 ? void 0 : _values$description.trim(),
|
||||
name: values === null || values === void 0 || (_values$name = values.name) === null || _values$name === void 0 ? void 0 : _values$name.trim(),
|
||||
category: values === null || values === void 0 ? void 0 : values.category,
|
||||
operate_manual_ids: values === null || values === void 0 ? void 0 : values.operate_manual_ids
|
||||
}).then(function (res) {
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
||||
message/* default */.ZP.success('编辑成功');
|
||||
setVisible(false);
|
||||
queryData();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
//新增
|
||||
(0,onlinedevice/* device_type_table_add */.d_)({
|
||||
description: values === null || values === void 0 || (_values$description2 = values.description) === null || _values$description2 === void 0 ? void 0 : _values$description2.trim(),
|
||||
name: values === null || values === void 0 || (_values$name2 = values.name) === null || _values$name2 === void 0 ? void 0 : _values$name2.trim(),
|
||||
category: values === null || values === void 0 ? void 0 : values.category,
|
||||
operate_manual_ids: values === null || values === void 0 ? void 0 : values.operate_manual_ids
|
||||
}).then(function (res) {
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
||||
message/* default */.ZP.success('新增成功');
|
||||
setVisible(false);
|
||||
queryData();
|
||||
}
|
||||
});
|
||||
}
|
||||
case 6:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee);
|
||||
})),
|
||||
onCancel: function onCancel() {
|
||||
setVisible(false);
|
||||
},
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
||||
className: Dialogmodules.formWrap,
|
||||
form: form,
|
||||
style: {
|
||||
marginTop: '20px'
|
||||
},
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
rules: [{
|
||||
required: true
|
||||
}],
|
||||
label: "\u8BBE\u5907\u79CD\u7C7B",
|
||||
name: "category",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
||||
size: "large",
|
||||
disabled: ['计算机', '路由器', '交换机', '防火墙', '树莓派', 'FPGA', 'STM32', '串口服务器', '服务器', '摄像头'].includes(dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.name),
|
||||
allowClear: true,
|
||||
options: [{
|
||||
value: 1,
|
||||
label: '物理机'
|
||||
}, {
|
||||
value: 2,
|
||||
label: '虚拟机'
|
||||
}]
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "name",
|
||||
label: "\u7C7B\u578B\u540D\u79F0",
|
||||
rules: [{
|
||||
required: true
|
||||
}],
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
||||
size: "large",
|
||||
disabled: ['计算机', '路由器', '交换机', '防火墙', '树莓派', 'FPGA', 'STM32', '串口服务器', '服务器', '摄像头'].includes(dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.name)
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "operate_manuals",
|
||||
label: "\u64CD\u4F5C\u624B\u518C",
|
||||
valuePropName: "fileList",
|
||||
getValueFromEvent: function getValueFromEvent(e) {
|
||||
if (Array.isArray(e)) {
|
||||
return e;
|
||||
}
|
||||
return e && e.fileList;
|
||||
},
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, {
|
||||
action: env/* default */.Z.API_SERVER + '/api/attachments.json',
|
||||
withCredentials: true,
|
||||
onChange: function onChange(e) {
|
||||
var _e$fileList;
|
||||
setFileLists(e === null || e === void 0 || (_e$fileList = e.fileList) === null || _e$fileList === void 0 ? void 0 : _e$fileList.slice(-1));
|
||||
},
|
||||
onRemove: function onRemove(file) {
|
||||
console.log(file);
|
||||
setFileLists([]);
|
||||
},
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: Dialogmodules.file_button,
|
||||
children: "\u4E0A\u4F20\u624B\u518C"
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "description",
|
||||
label: "\u7C7B\u578B\u8BF4\u660E",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
|
||||
rows: 4,
|
||||
maxLength: 5000,
|
||||
size: "large"
|
||||
})
|
||||
})]
|
||||
})
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var Dialog = (DeviceTypeDialog);
|
||||
;// CONCATENATED MODULE: ./src/pages/Equipment/Maintenance/index.less?modules
|
||||
// extracted by mini-css-extract-plugin
|
||||
/* harmony default export */ var Maintenancemodules = ({"header_div":"header_div___trzMW","header_title":"header_title___RyK0X","search":"search___lF9UC","searchIcon":"searchIcon___YY41x","search_params":"search_params___eBV0k","clear_Data":"clear_Data___Wcmtq","ellipsis":"ellipsis___eB9rv"});
|
||||
// EXTERNAL MODULE: ./src/styles/table_botton.less
|
||||
var table_botton = __webpack_require__(55130);
|
||||
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
||||
var _umi_production_exports = __webpack_require__(88271);
|
||||
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
||||
var fetch = __webpack_require__(82710);
|
||||
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 3 modules
|
||||
var PreviewAll = __webpack_require__(97672);
|
||||
;// CONCATENATED MODULE: ./src/pages/Equipment/Maintenance/index.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// import { history } from 'umi';
|
||||
|
||||
|
||||
|
||||
|
||||
// import FileViewer from 'react-file-viewer';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var DeviceTypePage = function DeviceTypePage(_ref) {
|
||||
objectDestructuringEmpty_default()(_ref);
|
||||
var _useState = (0,_react_17_0_2_react.useState)([]),
|
||||
_useState2 = slicedToArray_default()(_useState, 2),
|
||||
tableData = _useState2[0],
|
||||
setTableData = _useState2[1];
|
||||
var _useState3 = (0,_react_17_0_2_react.useState)(1),
|
||||
_useState4 = slicedToArray_default()(_useState3, 2),
|
||||
page = _useState4[0],
|
||||
setPage = _useState4[1];
|
||||
var _useState5 = (0,_react_17_0_2_react.useState)(10),
|
||||
_useState6 = slicedToArray_default()(_useState5, 2),
|
||||
limit = _useState6[0],
|
||||
setLimit = _useState6[1];
|
||||
var _useState7 = (0,_react_17_0_2_react.useState)(0),
|
||||
_useState8 = slicedToArray_default()(_useState7, 2),
|
||||
total = _useState8[0],
|
||||
setTotal = _useState8[1];
|
||||
var _useState9 = (0,_react_17_0_2_react.useState)(''),
|
||||
_useState10 = slicedToArray_default()(_useState9, 2),
|
||||
keyword = _useState10[0],
|
||||
setKeyword = _useState10[1];
|
||||
var _useState11 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState12 = slicedToArray_default()(_useState11, 2),
|
||||
visible = _useState12[0],
|
||||
setVisible = _useState12[1];
|
||||
var _useState13 = (0,_react_17_0_2_react.useState)({}),
|
||||
_useState14 = slicedToArray_default()(_useState13, 2),
|
||||
dataInfo = _useState14[0],
|
||||
setDataInfo = _useState14[1];
|
||||
var _useState15 = (0,_react_17_0_2_react.useState)({
|
||||
content: "",
|
||||
type: ""
|
||||
}),
|
||||
_useState16 = slicedToArray_default()(_useState15, 2),
|
||||
data = _useState16[0],
|
||||
setData = _useState16[1];
|
||||
var monacoValueRef = (0,_react_17_0_2_react.useRef)();
|
||||
var _useState17 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState18 = slicedToArray_default()(_useState17, 2),
|
||||
isedit = _useState18[0],
|
||||
setisedit = _useState18[1];
|
||||
(0,_react_17_0_2_react.useEffect)(function () {
|
||||
queryData();
|
||||
}, [page, limit]);
|
||||
var preview = /*#__PURE__*/function () {
|
||||
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(item) {
|
||||
var res;
|
||||
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
||||
while (1) switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
if (!(item.file_type === "txt")) {
|
||||
_context.next = 5;
|
||||
break;
|
||||
}
|
||||
_context.next = 3;
|
||||
return (0,fetch/* default */.ZP)(item.url, {
|
||||
method: "get",
|
||||
headers: {
|
||||
"Content-Type": "application/xml"
|
||||
}
|
||||
});
|
||||
case 3:
|
||||
res = _context.sent;
|
||||
monacoValueRef.current = res;
|
||||
case 5:
|
||||
setData({
|
||||
type: item.file_type,
|
||||
content: env/* default */.Z.API_SERVER + item.url
|
||||
});
|
||||
case 6:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return function preview(_x) {
|
||||
return _ref2.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
var columns = [{
|
||||
title: '类型名称',
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
key: 'name',
|
||||
dataIndex: 'name'
|
||||
}, {
|
||||
title: '关联设备数',
|
||||
width: 100,
|
||||
key: 'associated_device_count',
|
||||
dataIndex: 'associated_device_count'
|
||||
}, {
|
||||
title: '支持实验项目数',
|
||||
width: 100,
|
||||
key: 'shixun_num',
|
||||
dataIndex: 'shixun_num'
|
||||
},
|
||||
// {
|
||||
// title: '支持实验课程数',
|
||||
// width: 100,
|
||||
// key: 'subject_num',
|
||||
// dataIndex: 'subject_num',
|
||||
// },
|
||||
{
|
||||
title: '操作手册',
|
||||
width: 250,
|
||||
key: 'operate_manuals',
|
||||
dataIndex: 'operate_manuals',
|
||||
render: function render(text) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: Maintenancemodules.cs_list,
|
||||
children: text.map(function (v, k) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z, {
|
||||
overlay: function overlay() {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)(menu/* default */.Z, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
||||
onClick: function onClick() {
|
||||
return preview(v);
|
||||
},
|
||||
disabled: v.file_type === 'audio' || v.file_type === 'video' || v.file_type === 'office' || v.file_type === 'html' || v.file_type === 'pdf' || v.file_type === 'image' || v.file_type === 'txt' ? false : true,
|
||||
children: "\u5728\u7EBF\u9884\u89C8"
|
||||
}, "1"), /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
||||
onClick: function onClick() {
|
||||
return (0,util/* downLoadLink */.Nd)(v.name, env/* default */.Z.API_SERVER + v.url);
|
||||
},
|
||||
children: "\u4E0B\u8F7D"
|
||||
}, "2")]
|
||||
});
|
||||
},
|
||||
placement: "bottom",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
||||
href: "#",
|
||||
className: Maintenancemodules.cs_text,
|
||||
children: [v.name, "\u3001"]
|
||||
})
|
||||
}, k);
|
||||
})
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '类型说明',
|
||||
key: 'description',
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
dataIndex: 'description'
|
||||
}, {
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
key: 'cz',
|
||||
width: 200,
|
||||
render: function render(_, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
style: {
|
||||
display: "flex"
|
||||
},
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
style: {
|
||||
color: "#165dff",
|
||||
marginRight: '10px',
|
||||
cursor: "pointer"
|
||||
},
|
||||
onClick: function onClick() {
|
||||
_umi_production_exports.history.push("/equipment/maintenance/".concat(record === null || record === void 0 ? void 0 : record.id, "/details"));
|
||||
},
|
||||
children: "\u8BE6\u60C5"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
style: {
|
||||
color: "#165dff",
|
||||
marginRight: '10px',
|
||||
cursor: "pointer"
|
||||
},
|
||||
onClick: function onClick() {
|
||||
setVisible(true);
|
||||
setDataInfo(record);
|
||||
},
|
||||
children: "\u7F16\u8F91"
|
||||
}), !['计算机', '路由器', '交换机', '防火墙', '树莓派', 'FPGA', 'STM32', '串口服务器', '服务器', '摄像头'].includes(record === null || record === void 0 ? void 0 : record.name) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
style: {
|
||||
color: "#5f6367",
|
||||
cursor: "pointer"
|
||||
},
|
||||
onClick: function onClick() {
|
||||
deleteTag(record);
|
||||
},
|
||||
children: "\u5220\u9664"
|
||||
})]
|
||||
});
|
||||
}
|
||||
}];
|
||||
var onChange = function onChange(pageNumber) {
|
||||
setPage(pageNumber);
|
||||
};
|
||||
var onShowSizeChange = function onShowSizeChange(current, pageSize) {
|
||||
setLimit(pageSize);
|
||||
};
|
||||
var queryData = function queryData() {
|
||||
(0,onlinedevice/* device_type_table_query */.uz)({
|
||||
page: page,
|
||||
limit: limit,
|
||||
keyword: keyword
|
||||
}).then(function (res) {
|
||||
// if (res.status == 0) {
|
||||
setTableData(res === null || res === void 0 ? void 0 : res.device_types);
|
||||
setTotal(res === null || res === void 0 ? void 0 : res.device_type_count);
|
||||
// }
|
||||
});
|
||||
};
|
||||
var deleteTag = function deleteTag(data) {
|
||||
modal/* default */.Z.confirm({
|
||||
title: '删除',
|
||||
icon: null,
|
||||
centered: true,
|
||||
content: '删除该类型后,数据不可恢复,请确定是否删除',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: function onOk() {
|
||||
(0,onlinedevice/* device_type_table_delete */.BM)(data.id).then(function (res) {
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
||||
message/* default */.ZP.success('删除成功');
|
||||
queryData();
|
||||
} else {
|
||||
message/* default */.ZP.error(res === null || res === void 0 ? void 0 : res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Maintenancemodules.header_div,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: Maintenancemodules.header_title,
|
||||
children: "\u8BBE\u5907\u7C7B\u578B\u7BA1\u7406"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Maintenancemodules.search_params,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
||||
placeholder: "\u8BF7\u8F93\u5165\u60A8\u60F3\u641C\u7D22\u7684\u5185\u5BB9",
|
||||
size: "large",
|
||||
className: Maintenancemodules.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(Maintenancemodules.searchIcon),
|
||||
onClick: function onClick() {
|
||||
queryData();
|
||||
}
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: Maintenancemodules.clear_Data,
|
||||
style: {
|
||||
width: '88px',
|
||||
marginLeft: '20px'
|
||||
},
|
||||
onClick: function onClick() {
|
||||
setVisible(true);
|
||||
setDataInfo({});
|
||||
},
|
||||
children: "\u65B0\u5EFA\u7C7B\u578B"
|
||||
})]
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
||||
scroll: {
|
||||
x: 1500
|
||||
},
|
||||
columns: columns,
|
||||
dataSource: tableData,
|
||||
pagination: false,
|
||||
rowKey: function rowKey(record) {
|
||||
return record.id;
|
||||
}
|
||||
}), total > limit && /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
||||
showQuickJumper: true,
|
||||
current: page,
|
||||
pageSize: limit,
|
||||
total: total,
|
||||
onChange: onChange,
|
||||
className: Maintenancemodules.page_style,
|
||||
onShowSizeChange: onShowSizeChange
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Dialog, {
|
||||
visible: visible,
|
||||
queryData: queryData,
|
||||
setVisible: setVisible,
|
||||
dataInfo: dataInfo
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
|
||||
close: true,
|
||||
data: data === null || data === void 0 ? void 0 : data.content,
|
||||
type: data === null || data === void 0 ? void 0 : data.type,
|
||||
hasMask: true,
|
||||
editOffice: isedit ? 'edit' : 'view',
|
||||
monacoEditor: {
|
||||
value: monacoValueRef.current,
|
||||
language: "txt",
|
||||
onChange: function onChange() {},
|
||||
options: {
|
||||
readOnly: true,
|
||||
fontSize: 14,
|
||||
minimap: {
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
},
|
||||
onImgDimensions: null,
|
||||
onClose: function onClose() {
|
||||
setisedit(false);
|
||||
setData({
|
||||
content: "",
|
||||
type: ""
|
||||
});
|
||||
}
|
||||
})]
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var Maintenance = (DeviceTypePage);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 55130:
|
||||
/*!**************************************!*\
|
||||
!*** ./src/styles/table_botton.less ***!
|
||||
\**************************************/
|
||||
/***/ (function() {
|
||||
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 60028:
|
||||
/*!**********************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/upload/index.js ***!
|
||||
\**********************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony import */ var _Dragger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Dragger */ 71409);
|
||||
/* harmony import */ var _Upload__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Upload */ 41945);
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
const Upload = _Upload__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z;
|
||||
Upload.Dragger = _Dragger__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z;
|
||||
Upload.LIST_IGNORE = _Upload__WEBPACK_IMPORTED_MODULE_0__/* .LIST_IGNORE */ .E;
|
||||
/* harmony default export */ __webpack_exports__.Z = (Upload);
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue