|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[48077],{
|
|
|
|
|
|
/***/ 20114:
|
|
|
/*!****************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/UpOutlined.js + 1 modules ***!
|
|
|
\****************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_UpOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(26508);
|
|
|
// 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.3.1@@ant-design/icons-svg/es/asn/UpOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var UpOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, "name": "up", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_UpOutlined = (UpOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(91851);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/UpOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var UpOutlined_UpOutlined = function UpOutlined(props, ref) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_UpOutlined
|
|
|
}));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_UpOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(UpOutlined_UpOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 59391:
|
|
|
/*!*************************************************************!*\
|
|
|
!*** ./src/components/DropdownSearch/index.tsx + 3 modules ***!
|
|
|
\*************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ components_DropdownSearch; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(11006);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./src/components/DropdownSearch/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var DropdownSearchmodules = ({"flex_box_center":"flex_box_center___va8nO","flex_space_between":"flex_space_between___hPW7K","flex_box_vertical_center":"flex_box_vertical_center___PKxoL","flex_box_center_end":"flex_box_center_end___D5CRS","flex_box_column":"flex_box_column___TKM2o","listWrap":"listWrap___wC5Nd","menu":"menu___gJ_kD","list":"list___Df_Ne","pad":"pad___b8kSJ"});
|
|
|
;// CONCATENATED MODULE: ./src/components/VirtualList/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var VirtualListmodules = ({"flex_box_center":"flex_box_center___jQroX","flex_space_between":"flex_space_between___ybTjf","flex_box_vertical_center":"flex_box_vertical_center___TEudd","flex_box_center_end":"flex_box_center_end___sXWuH","flex_box_column":"flex_box_column___irPtQ","virtual":"virtual___Cl1Fa"});
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/components/VirtualList/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var VirtualList = function VirtualList(_ref) {
|
|
|
var list = _ref.list,
|
|
|
itemHeight = _ref.itemHeight,
|
|
|
mapList = _ref.mapList,
|
|
|
_ref$scrollHeight = _ref.scrollHeight,
|
|
|
scrollHeight = _ref$scrollHeight === void 0 ? 300 : _ref$scrollHeight;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(0),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
start = _useState2[0],
|
|
|
setStart = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(0),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
count = _useState4[0],
|
|
|
setCount = _useState4[1];
|
|
|
var scrollRef = (0,_react_17_0_2_react.useRef)(null);
|
|
|
var contentRef = (0,_react_17_0_2_react.useRef)(null);
|
|
|
var totalHeight = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
return itemHeight * list.length;
|
|
|
}, [list.length]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (scrollRef.current) {
|
|
|
setCount(Math.ceil(scrollRef.current.clientHeight / itemHeight));
|
|
|
}
|
|
|
}, [list === null || list === void 0 ? void 0 : list.length]);
|
|
|
var scrollHandle = function scrollHandle() {
|
|
|
var scrollTop = scrollRef.current.scrollTop;
|
|
|
var newStart = Math.floor(scrollTop / itemHeight);
|
|
|
setStart(newStart);
|
|
|
contentRef.current.style.transform = "translate3d(0, ".concat(newStart * itemHeight, "px, 0)");
|
|
|
};
|
|
|
var subList = list.slice(start, start + count);
|
|
|
|
|
|
//数据少的时候不用虚拟滚动
|
|
|
var isRenderNormalDom = list.length * itemHeight <= scrollHeight;
|
|
|
if (isRenderNormalDom) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(_react_17_0_2_react.Fragment, {
|
|
|
children: list === null || list === void 0 ? void 0 : list.map(function (item, i) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(_react_17_0_2_react.Fragment, {
|
|
|
children: mapList(item)
|
|
|
}, i);
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: VirtualListmodules.virtual,
|
|
|
style: {
|
|
|
height: scrollHeight
|
|
|
},
|
|
|
onScroll: scrollHandle,
|
|
|
ref: scrollRef,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
height: totalHeight + "px"
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "content",
|
|
|
ref: contentRef,
|
|
|
children: subList === null || subList === void 0 ? void 0 : subList.map(function (item, i) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(_react_17_0_2_react.Fragment, {
|
|
|
children: mapList(item)
|
|
|
}, i);
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var components_VirtualList = (VirtualList);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(1056);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/empty/index.js + 3 modules
|
|
|
var empty = __webpack_require__(64165);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js + 1 modules
|
|
|
var dropdown = __webpack_require__(38854);
|
|
|
;// CONCATENATED MODULE: ./src/components/DropdownSearch/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DropdownSearch = function DropdownSearch(_ref) {
|
|
|
var _ref$dataSource = _ref.dataSource,
|
|
|
dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
|
|
|
_onClick = _ref.onClick,
|
|
|
_ref$placeholder = _ref.placeholder,
|
|
|
placeholder = _ref$placeholder === void 0 ? '搜索' : _ref$placeholder,
|
|
|
children = _ref.children,
|
|
|
_ref$reversal = _ref.reversal,
|
|
|
reversal = _ref$reversal === void 0 ? false : _ref$reversal,
|
|
|
_ref$width = _ref.width,
|
|
|
width = _ref$width === void 0 ? 142 : _ref$width,
|
|
|
_ref$isParentNode = _ref.isParentNode,
|
|
|
isParentNode = _ref$isParentNode === void 0 ? false : _ref$isParentNode;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(''),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
value = _useState2[0],
|
|
|
setValue = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
list = _useState4[0],
|
|
|
setList = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
visible = _useState6[0],
|
|
|
setVisible = _useState6[1];
|
|
|
var inputRef = (0,_react_17_0_2_react.useRef)(null);
|
|
|
var isFocus = (0,_react_17_0_2_react.useRef)(false);
|
|
|
var submenu = function submenu() {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: DropdownSearchmodules.listWrap,
|
|
|
style: {
|
|
|
flexDirection: reversal ? "column-reverse" : 'column',
|
|
|
width: width
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
value: value,
|
|
|
ref: inputRef,
|
|
|
placeholder: placeholder,
|
|
|
onClick: function onClick(e) {
|
|
|
e.stopPropagation();
|
|
|
},
|
|
|
onBlur: function onBlur() {
|
|
|
isFocus.current = false;
|
|
|
|
|
|
//失焦即关闭
|
|
|
setTimeout(function () {
|
|
|
setVisible(false);
|
|
|
}, 300);
|
|
|
},
|
|
|
onChange: function onChange(e) {
|
|
|
var v = e.target.value;
|
|
|
var result = dataSource.filter(function (obj) {
|
|
|
return obj.name.includes(v);
|
|
|
});
|
|
|
setValue(v);
|
|
|
setList(result);
|
|
|
},
|
|
|
onFocus: function onFocus() {
|
|
|
isFocus.current = true;
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: DropdownSearchmodules.menu,
|
|
|
children: list.length ? /*#__PURE__*/(0,jsx_runtime.jsx)(components_VirtualList, {
|
|
|
list: list,
|
|
|
itemHeight: 32,
|
|
|
scrollHeight: 300,
|
|
|
mapList: function mapList(item) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: DropdownSearchmodules.list,
|
|
|
onClick: function onClick() {
|
|
|
//失焦即关闭
|
|
|
_onClick(item.id);
|
|
|
setVisible(false);
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
title: item.name,
|
|
|
children: item.name
|
|
|
})
|
|
|
}, item.id);
|
|
|
}
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(empty/* default */.Z, {
|
|
|
image: empty/* default */.Z.PRESENTED_IMAGE_SIMPLE
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: DropdownSearchmodules.pad,
|
|
|
onMouseLeave: function onMouseLeave() {
|
|
|
if (!isFocus.current) {
|
|
|
setVisible(false);
|
|
|
}
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z
|
|
|
// open
|
|
|
, {
|
|
|
open: visible,
|
|
|
dropdownRender: submenu,
|
|
|
destroyPopupOnHide: true,
|
|
|
placement: reversal ? 'topLeft' : 'bottomLeft',
|
|
|
getPopupContainer: function getPopupContainer(trigger) {
|
|
|
return isParentNode ? trigger.parentNode : document.body;
|
|
|
},
|
|
|
autoAdjustOverflow: false,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
onMouseEnter: function onMouseEnter() {
|
|
|
if (!visible) {
|
|
|
setVisible(true);
|
|
|
setList(dataSource);
|
|
|
setValue('');
|
|
|
}
|
|
|
},
|
|
|
children: children
|
|
|
})
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var components_DropdownSearch = (DropdownSearch);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 31917:
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./src/components/NoData/index.tsx ***!
|
|
|
\*****************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 4977);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 3113);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var noData = function noData(_ref) {
|
|
|
var img = _ref.img,
|
|
|
_ref$buttonProps = _ref.buttonProps,
|
|
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
|
_ref$styles = _ref.styles,
|
|
|
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
|
|
customText = _ref.customText,
|
|
|
ButtonText = _ref.ButtonText,
|
|
|
ButtonClick = _ref.ButtonClick,
|
|
|
Buttonclass = _ref.Buttonclass,
|
|
|
ButtonTwo = _ref.ButtonTwo,
|
|
|
imgStyles = _ref.imgStyles,
|
|
|
_ref$loading = _ref.loading,
|
|
|
loading = _ref$loading === void 0 ? false : _ref$loading;
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", {
|
|
|
className: "tc animated fadeIn",
|
|
|
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, {
|
|
|
color: '#999',
|
|
|
margin: '100px auto',
|
|
|
visibility: loading ? 'hidden' : 'visible'
|
|
|
}), styles),
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", {
|
|
|
src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__,
|
|
|
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, imgStyles)
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
|
|
|
className: "mt20 font14",
|
|
|
children: customText || '暂时还没有相关数据哦!'
|
|
|
}), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
|
|
|
className: Buttonclass,
|
|
|
onClick: ButtonClick
|
|
|
}, buttonProps), {}, {
|
|
|
children: ButtonText
|
|
|
})), ButtonTwo && ButtonTwo]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__.Z = (noData);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 25238:
|
|
|
/*!************************************************************!*\
|
|
|
!*** ./src/components/image-preview/index.tsx + 1 modules ***!
|
|
|
\************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ image_preview; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(11006);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./src/components/image-preview/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/mediator.js
|
|
|
var mediator = __webpack_require__(14279);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/image/index.js + 26 modules
|
|
|
var es_image = __webpack_require__(89536);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/components/image-preview/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var image_preview = (function () {
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(''),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
url = _useState2[0],
|
|
|
setUrl = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(0),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
deg = _useState4[0],
|
|
|
setDeg = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
width = _useState6[0],
|
|
|
setwidth = _useState6[1];
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
height = _useState8[0],
|
|
|
setheight = _useState8[1];
|
|
|
// const [movable, setmovable] = useState<any>(false);
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
down = _useState10[0],
|
|
|
setdown = _useState10[1];
|
|
|
var saveUrl = (0,_react_17_0_2_react.useRef)('');
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
var unSub = mediator/* default */.Z.subscribe('preview-image', function (value) {
|
|
|
setUrl(value);
|
|
|
// window.document.body
|
|
|
// document.body.style.height='100%'
|
|
|
console.log(imgref.current);
|
|
|
document.body.style.overflow = 'hidden';
|
|
|
});
|
|
|
return unSub;
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
document.addEventListener('keydown', onViewEscClose);
|
|
|
return function () {
|
|
|
document.removeEventListener('keydown', onViewEscClose);
|
|
|
};
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
saveUrl.current = url;
|
|
|
}, [url]);
|
|
|
function onViewEscClose(e) {
|
|
|
if (e.keyCode == 27 && saveUrl.current) {
|
|
|
onClose();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// https://data.educoder.net/api/attachments/1571649
|
|
|
function onClose() {
|
|
|
// document.body.style.height='100%'
|
|
|
document.body.style.overflow = 'auto';
|
|
|
setwidth(undefined);
|
|
|
setheight(undefined);
|
|
|
setDeg(0);
|
|
|
setUrl('');
|
|
|
}
|
|
|
function onRotate() {
|
|
|
setDeg(deg + 90);
|
|
|
}
|
|
|
function big() {
|
|
|
width = imgref.current.width * 1.1;
|
|
|
height = imgref.current.height * 1.1;
|
|
|
setheight(height);
|
|
|
setwidth(width);
|
|
|
}
|
|
|
function small() {
|
|
|
width = imgref.current.width / 1.1;
|
|
|
height = imgref.current.height / 1.1;
|
|
|
setheight(height);
|
|
|
setwidth(width);
|
|
|
}
|
|
|
var maskRef = (0,_react_17_0_2_react.useRef)();
|
|
|
var previewWrapperRef = (0,_react_17_0_2_react.useRef)();
|
|
|
var imgref = (0,_react_17_0_2_react.useRef)();
|
|
|
var handleMaskClick = function handleMaskClick(e) {
|
|
|
if (e.nativeEvent.target === maskRef.current || e.nativeEvent.target === previewWrapperRef.current) {
|
|
|
onClose();
|
|
|
}
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(_react_17_0_2_react.Fragment, {
|
|
|
children: !url ? null : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "preview-wrp-group",
|
|
|
ref: previewWrapperRef,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_image/* default */.Z, {
|
|
|
className: "image-preview",
|
|
|
src: url,
|
|
|
style: {
|
|
|
display: 'none'
|
|
|
}
|
|
|
|
|
|
// ref={imgref}
|
|
|
,
|
|
|
preview: {
|
|
|
visible: true,
|
|
|
src: url,
|
|
|
movable: false,
|
|
|
onVisibleChange: function onVisibleChange(value) {
|
|
|
setUrl('');
|
|
|
}
|
|
|
},
|
|
|
alt: "\u9884\u89C8\u5927\u56FE"
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 31316:
|
|
|
/*!*******************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Students/index.tsx + 4 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 */ Students; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(26801);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(11006);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
|
|
|
var _umi_production_exports = __webpack_require__(7181);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/menu/index.js + 11 modules
|
|
|
var es_menu = __webpack_require__(20834);
|
|
|
// EXTERNAL MODULE: ./src/utils/export.ts
|
|
|
var utils_export = __webpack_require__(94386);
|
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
|
var authority = __webpack_require__(71633);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(10574);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(39343);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
|
|
var row = __webpack_require__(95237);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
|
|
var col = __webpack_require__(43604);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tabs/index.js + 24 modules
|
|
|
var tabs = __webpack_require__(99313);
|
|
|
// 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/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(1056);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
// EXTERNAL MODULE: ./src/service/teacher.ts
|
|
|
var teacher = __webpack_require__(19841);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Students/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Studentsmodules = ({"flex_box_center":"flex_box_center___vLVuS","flex_space_between":"flex_space_between___iMfB0","flex_box_vertical_center":"flex_box_vertical_center___dYLcz","flex_box_center_end":"flex_box_center_end___hAdh1","flex_box_column":"flex_box_column___HgIbr","bg":"bg___fg0pK","header":"header___JSZ2c","menu":"menu___YsZdG","desc":"desc___rXiKH","otherLink":"otherLink___INV4V","card":"card___z8I5q","listTabWrapper":"listTabWrapper___GUJxo","operationBtn":"operationBtn___fudrU","reject":"reject___oB66Y","approve":"approve___zZZ7P","rejectBtn":"rejectBtn___SCjUa","approveBtn":"approveBtn___XtDaP","duplicateStudentModal":"duplicateStudentModal___Q1TtD","warningText":"warningText___YA0e9"});
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/toConsumableArray.js
|
|
|
var toConsumableArray = __webpack_require__(93923);
|
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
|
|
|
var es_checkbox = __webpack_require__(24905);
|
|
|
// 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/table/index.js + 85 modules
|
|
|
var table = __webpack_require__(72315);
|
|
|
// 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/pagination/index.js + 10 modules
|
|
|
var pagination = __webpack_require__(41867);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/affix/index.js + 2 modules
|
|
|
var affix = __webpack_require__(81228);
|
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
|
var NoData = __webpack_require__(31917);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Students/components/Approved/ApplicantTable.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ApproveType = /*#__PURE__*/function (ApproveType) {
|
|
|
ApproveType[ApproveType["approve"] = 1] = "approve";
|
|
|
ApproveType[ApproveType["reject"] = 2] = "reject";
|
|
|
return ApproveType;
|
|
|
}(ApproveType || {});
|
|
|
var ApplicantTable = function ApplicantTable(_ref) {
|
|
|
var _data$application_lis;
|
|
|
var params = _ref.params,
|
|
|
data = _ref.data,
|
|
|
batch = _ref.batch,
|
|
|
loading = _ref.loading,
|
|
|
reload = _ref.reload,
|
|
|
resetBatchStatus = _ref.resetBatchStatus,
|
|
|
selectedKey = _ref.selectedKey,
|
|
|
setSelectedKey = _ref.setSelectedKey,
|
|
|
dispatch = _ref.dispatch;
|
|
|
var _useParams = (0,_umi_production_exports.useParams)(),
|
|
|
coursesId = _useParams.coursesId;
|
|
|
var columns = [{
|
|
|
title: '序号',
|
|
|
dataIndex: 'name',
|
|
|
width: 70,
|
|
|
align: 'center',
|
|
|
render: function render(text, record, index) {
|
|
|
return batch.length > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
onChange: function onChange(e) {
|
|
|
if (selectedKey.includes(e.target.value)) {
|
|
|
setSelectedKey(toConsumableArray_default()(selectedKey.filter(function (item) {
|
|
|
return item != e.target.value;
|
|
|
})));
|
|
|
} else {
|
|
|
selectedKey.push(e.target.value);
|
|
|
setSelectedKey(toConsumableArray_default()(selectedKey));
|
|
|
}
|
|
|
},
|
|
|
value: record === null || record === void 0 ? void 0 : record.application_id,
|
|
|
checked: selectedKey.includes(record === null || record === void 0 ? void 0 : record.application_id),
|
|
|
children: params.limit * (params.page - 1) + index + 1
|
|
|
}) : params.limit * (params.page - 1) + index + 1;
|
|
|
}
|
|
|
}, {
|
|
|
title: '姓名',
|
|
|
width: 110,
|
|
|
align: 'center',
|
|
|
dataIndex: 'name',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
target: "_blank",
|
|
|
to: "/users/".concat(record === null || record === void 0 ? void 0 : record.login, "/classrooms"),
|
|
|
children: text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '学校/单位',
|
|
|
width: 140,
|
|
|
align: 'center',
|
|
|
dataIndex: 'school_name',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-black",
|
|
|
children: text || '--'
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '学号',
|
|
|
width: 110,
|
|
|
align: 'center',
|
|
|
dataIndex: 'student_id',
|
|
|
// sortOrder: sortObj['student_id'],
|
|
|
sortDirections: ['descend', 'ascend'],
|
|
|
sorter: function sorter(a, b) {
|
|
|
return a.id - b.id;
|
|
|
},
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-black",
|
|
|
children: text || '--'
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '手机号',
|
|
|
width: 100,
|
|
|
align: 'center',
|
|
|
dataIndex: 'phone',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-black",
|
|
|
children: text || '--'
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '邮箱',
|
|
|
width: 120,
|
|
|
align: 'center',
|
|
|
dataIndex: 'mail',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-black",
|
|
|
children: text || '--'
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '分班',
|
|
|
width: 100,
|
|
|
align: 'center',
|
|
|
dataIndex: 'course_group_name',
|
|
|
// sortOrder: sortObj['course_group_name'],
|
|
|
sortDirections: ['descend', 'ascend'],
|
|
|
sorter: function sorter(a, b) {
|
|
|
return a.id - b.id;
|
|
|
},
|
|
|
render: function render(text) {
|
|
|
return text || '--';
|
|
|
}
|
|
|
}, {
|
|
|
title: '操作',
|
|
|
align: 'center',
|
|
|
dataIndex: 'name',
|
|
|
render: function render(text, record) {
|
|
|
var application_id = record.application_id;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "".concat(Studentsmodules.operationBtn, " ").concat(Studentsmodules.reject),
|
|
|
onClick: function onClick() {
|
|
|
return handleApplicationReview([application_id], ApproveType.reject);
|
|
|
},
|
|
|
children: "\u62D2\u7EDD"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "".concat(Studentsmodules.operationBtn, " ").concat(Studentsmodules.approve),
|
|
|
onClick: function onClick() {
|
|
|
return handleApplicationReview([application_id], ApproveType.approve);
|
|
|
},
|
|
|
children: "\u540C\u610F"
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}];
|
|
|
var handleApplicationReview = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(ids, type) {
|
|
|
var res, _res$data;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
if (!(type === ApproveType.approve)) {
|
|
|
_context4.next = 7;
|
|
|
break;
|
|
|
}
|
|
|
_context4.next = 3;
|
|
|
return (0,teacher/* checkJoinStudent */.r_)(coursesId, {
|
|
|
application_ids: ids
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context4.sent;
|
|
|
if (res.status === 0) {
|
|
|
if (((_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.length) > 0) {
|
|
|
modal/* default */.Z.confirm({
|
|
|
// title: '学生重复',
|
|
|
icon: null,
|
|
|
width: 700,
|
|
|
centered: true,
|
|
|
className: Studentsmodules.duplicateStudentModal,
|
|
|
okText: '同意加入',
|
|
|
cancelText: '取消',
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
marginBottom: 4
|
|
|
},
|
|
|
children: "\u68C0\u6D4B\u5230\u8BFE\u5802\u4E2D\u5DF2\u5B58\u5728\u7684\u5B66\u751F\uFF0C\u70B9\u51FB\u201C\u540C\u610F\u52A0\u5165\u201D\u5219\u8BFE\u5802\u5C06\u4F1A\u5B58\u5728\u4E24\u4E2A\u76F8\u540C\u7684\u5B66\u751F"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Studentsmodules.warningText,
|
|
|
style: {
|
|
|
marginBottom: 4
|
|
|
},
|
|
|
children: "*\u5EFA\u8BAE\u5728\u201C\u5DF2\u5BA1\u6279\u201D\u4E2D\u5C06\u5DF2\u5B58\u5728\u7684\u5B66\u751F\u79FB\u9664\uFF0C\u518D\u52A0\u5165\u65B0\u8D26\u53F7"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
columns: [{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name'
|
|
|
}, {
|
|
|
title: '学校/单位',
|
|
|
dataIndex: 'school_name'
|
|
|
}, {
|
|
|
title: '学号',
|
|
|
dataIndex: 'student_id'
|
|
|
}, {
|
|
|
title: '班级',
|
|
|
dataIndex: 'course_group'
|
|
|
}],
|
|
|
dataSource: res.data,
|
|
|
pagination: false,
|
|
|
scroll: {
|
|
|
y: 540
|
|
|
},
|
|
|
rowKey: "student_id"
|
|
|
})]
|
|
|
}),
|
|
|
onOk: function () {
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return (0,teacher/* studentApplicationReview */.fd)(coursesId, {
|
|
|
application_ids: ids,
|
|
|
approval: ApproveType.approve
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success('操作成功');
|
|
|
//根据操作的数量判断是否回到第一页
|
|
|
if (ids.length >= data.application_list.length) {
|
|
|
reload({
|
|
|
page: 1
|
|
|
});
|
|
|
} else {
|
|
|
reload();
|
|
|
}
|
|
|
dispatch({
|
|
|
type: 'classroomList/getClassroomTopBanner',
|
|
|
payload: {
|
|
|
id: coursesId
|
|
|
}
|
|
|
});
|
|
|
setSelectedKey([]);
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
} else {
|
|
|
modal/* default */.Z.confirm({
|
|
|
centered: true,
|
|
|
okText: '确定',
|
|
|
cancelText: '取消',
|
|
|
title: "\u662F\u5426\u786E\u8BA4\u540C\u610FTA\u7684\u52A0\u5165\uFF1F",
|
|
|
onOk: function () {
|
|
|
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
_context2.next = 2;
|
|
|
return (0,teacher/* studentApplicationReview */.fd)(coursesId, {
|
|
|
application_ids: ids,
|
|
|
approval: ApproveType.approve
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context2.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success('操作成功');
|
|
|
if (ids.length >= data.application_list.length) {
|
|
|
reload({
|
|
|
page: 1
|
|
|
});
|
|
|
} else {
|
|
|
reload();
|
|
|
}
|
|
|
dispatch({
|
|
|
type: 'classroomList/getClassroomTopBanner',
|
|
|
payload: {
|
|
|
id: coursesId
|
|
|
}
|
|
|
});
|
|
|
setSelectedKey([]);
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk2.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
_context4.next = 8;
|
|
|
break;
|
|
|
case 7:
|
|
|
if (type === ApproveType.reject) {
|
|
|
modal/* default */.Z.confirm({
|
|
|
centered: true,
|
|
|
okText: '确定',
|
|
|
cancelText: '取消',
|
|
|
title: "\u662F\u5426\u786E\u8BA4\u62D2\u7EDDTA\u7684\u52A0\u5165\uFF1F",
|
|
|
onOk: function () {
|
|
|
var _onOk3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
_context3.next = 2;
|
|
|
return (0,teacher/* studentApplicationReview */.fd)(coursesId, {
|
|
|
application_ids: ids,
|
|
|
approval: ApproveType.reject
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context3.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success('操作成功');
|
|
|
if (ids.length >= data.application_list.length) {
|
|
|
reload({
|
|
|
page: 1
|
|
|
});
|
|
|
} else {
|
|
|
reload();
|
|
|
}
|
|
|
dispatch({
|
|
|
type: 'classroomList/getClassroomTopBanner',
|
|
|
payload: {
|
|
|
id: coursesId
|
|
|
}
|
|
|
});
|
|
|
setSelectedKey([]);
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk3.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
}
|
|
|
case 8:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
return function handleApplicationReview(_x, _x2) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
return (data === null || data === void 0 ? void 0 : data.apply_size) === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "bg-white pl30 pr30 pt20 pb20",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
pagination: false,
|
|
|
loading: loading,
|
|
|
columns: columns,
|
|
|
dataSource: data === null || data === void 0 ? void 0 : data.application_list,
|
|
|
rowKey: "application_id"
|
|
|
}), (data === null || data === void 0 ? void 0 : data.apply_size) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "tc mt30",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
|
showSizeChanger: true,
|
|
|
onChange: function onChange(page, pageSize) {
|
|
|
var newParams = {
|
|
|
page: page,
|
|
|
limit: pageSize
|
|
|
};
|
|
|
reload(newParams);
|
|
|
},
|
|
|
current: params.page,
|
|
|
pageSize: params.limit,
|
|
|
total: data.apply_size
|
|
|
})
|
|
|
}), batch && /*#__PURE__*/(0,jsx_runtime.jsx)(affix/* default */.Z, {
|
|
|
offsetBottom: 0,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
height: 62,
|
|
|
background: '#fff',
|
|
|
paddingLeft: '39px',
|
|
|
width: '100%',
|
|
|
boxShadow: '0px -4px 11px 0px rgba(218, 218, 218, 0.5)',
|
|
|
display: 'flex',
|
|
|
alignItems: 'center'
|
|
|
},
|
|
|
children: [batch === 'applicant' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
flex: 1
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default */.Z, {
|
|
|
checked: (selectedKey === null || selectedKey === void 0 ? void 0 : selectedKey.length) === (data === null || data === void 0 || (_data$application_lis = data.application_list) === null || _data$application_lis === void 0 ? void 0 : _data$application_lis.length),
|
|
|
onClick: function onClick() {
|
|
|
var _data$application_lis2;
|
|
|
if ((selectedKey === null || selectedKey === void 0 ? void 0 : selectedKey.length) < (data === null || data === void 0 || (_data$application_lis2 = data.application_list) === null || _data$application_lis2 === void 0 ? void 0 : _data$application_lis2.length)) {
|
|
|
setSelectedKey(toConsumableArray_default()(data === null || data === void 0 ? void 0 : data.application_list.map(function (item) {
|
|
|
return item.application_id;
|
|
|
})));
|
|
|
} else {
|
|
|
setSelectedKey([]);
|
|
|
}
|
|
|
},
|
|
|
children: ["\u5168\u9009\u672C\u9875/", /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: ["\u5DF2\u9009 \uFF08", selectedKey === null || selectedKey === void 0 ? void 0 : selectedKey.length, "\uFF09"]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
danger: true,
|
|
|
className: Studentsmodules.rejectBtn,
|
|
|
onClick: function onClick() {
|
|
|
handleApplicationReview(selectedKey, ApproveType.reject);
|
|
|
},
|
|
|
children: "\u62D2\u7EDD"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "primary",
|
|
|
className: Studentsmodules.approveBtn,
|
|
|
onClick: function onClick() {
|
|
|
handleApplicationReview(selectedKey, ApproveType.approve);
|
|
|
},
|
|
|
children: "\u540C\u610F"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
style: {
|
|
|
marginRight: 30,
|
|
|
fontSize: '12px',
|
|
|
display: 'inline-flex',
|
|
|
alignItems: 'center',
|
|
|
color: '#333333'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
resetBatchStatus();
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-piliangcaozuo font12 mr5"
|
|
|
}), "\u53D6\u6D88\u64CD\u4F5C"]
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Approved_ApplicantTable = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
|
var classroomList = _ref3.classroomList;
|
|
|
return {
|
|
|
classroomList: classroomList
|
|
|
};
|
|
|
})(ApplicantTable));
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/popconfirm/index.js + 2 modules
|
|
|
var popconfirm = __webpack_require__(14478);
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
var fetch = __webpack_require__(4781);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/UpOutlined.js + 1 modules
|
|
|
var UpOutlined = __webpack_require__(20114);
|
|
|
// EXTERNAL MODULE: ./src/components/image-preview/index.tsx + 1 modules
|
|
|
var image_preview = __webpack_require__(25238);
|
|
|
// EXTERNAL MODULE: ./src/components/DropdownSearch/index.tsx + 3 modules
|
|
|
var DropdownSearch = __webpack_require__(59391);
|
|
|
// EXTERNAL MODULE: ./src/components/mediator.js
|
|
|
var mediator = __webpack_require__(14279);
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(26078);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Students/components/Approved/StudentMemberTable.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var StudentMemberTable = function StudentMemberTable(_ref) {
|
|
|
var _studentsList$student5, _studentsList$student6, _studentsList$student7;
|
|
|
var teachers = _ref.teachers,
|
|
|
classroomList = _ref.classroomList,
|
|
|
dispatch = _ref.dispatch,
|
|
|
params = _ref.params,
|
|
|
loading = _ref.loading,
|
|
|
batch = _ref.batch,
|
|
|
getData = _ref.getData,
|
|
|
resetBatchStatus = _ref.resetBatchStatus,
|
|
|
selectedKey = _ref.selectedKey,
|
|
|
setSelectedKey = _ref.setSelectedKey;
|
|
|
var _useParams = (0,_umi_production_exports.useParams)(),
|
|
|
coursesId = _useParams.coursesId;
|
|
|
var allCourseGroups = teachers.allCourseGroups,
|
|
|
studentsList = teachers.studentsList;
|
|
|
var detailTopBanner = classroomList.detailTopBanner;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
checkedArrs = _useState2[0],
|
|
|
setCheckedArrs = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)({}),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
sortObj = _useState4[0],
|
|
|
setSortObj = _useState4[1];
|
|
|
var moveClass = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(id, record, batch) {
|
|
|
var res, _studentsList$student, _studentsList$student2;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
if (!(batch && selectedKey.length <= 0)) {
|
|
|
_context.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.info('请选择学生');
|
|
|
return _context.abrupt("return");
|
|
|
case 3:
|
|
|
_context.next = 5;
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(coursesId, "/transfer_to_course_group.json"), {
|
|
|
method: 'post',
|
|
|
body: {
|
|
|
students: batch ? selectedKey.map(function (v) {
|
|
|
return {
|
|
|
course_member_id: v
|
|
|
};
|
|
|
}) : [{
|
|
|
course_member_id: record.course_member_id
|
|
|
}],
|
|
|
course_group_id: id
|
|
|
}
|
|
|
});
|
|
|
case 5:
|
|
|
res = _context.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success('操作成功');
|
|
|
if (selectedKey.length >= (studentsList === null || studentsList === void 0 || (_studentsList$student = studentsList.students) === null || _studentsList$student === void 0 ? void 0 : _studentsList$student.length) || (studentsList === null || studentsList === void 0 || (_studentsList$student2 = studentsList.students) === null || _studentsList$student2 === void 0 ? void 0 : _studentsList$student2.length) === 1) {
|
|
|
getData({
|
|
|
page: 1
|
|
|
});
|
|
|
} else {
|
|
|
getData();
|
|
|
}
|
|
|
setSelectedKey([]);
|
|
|
}
|
|
|
case 7:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function moveClass(_x, _x2, _x3) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var onShowSizeChange = function onShowSizeChange(current, pageSize) {
|
|
|
getData({
|
|
|
page: current,
|
|
|
limit: pageSize
|
|
|
});
|
|
|
setSelectedKey([]);
|
|
|
};
|
|
|
var getChecked = function getChecked(record) {
|
|
|
if (checkedArrs.indexOf(record) > -1) {
|
|
|
checkedArrs.splice(checkedArrs.indexOf(record), 1);
|
|
|
} else {
|
|
|
checkedArrs.push(record);
|
|
|
}
|
|
|
if (checkedArrs !== null && checkedArrs !== void 0 && checkedArrs.includes('ASSISTANT_PROFESSOR') && checkedArrs !== null && checkedArrs !== void 0 && checkedArrs.includes('PROFESSOR')) {
|
|
|
if (record === 'PROFESSOR') checkedArrs.splice(checkedArrs.indexOf('ASSISTANT_PROFESSOR'), 1);
|
|
|
if (record === 'ASSISTANT_PROFESSOR') checkedArrs.splice(checkedArrs.indexOf('PROFESSOR'), 1);
|
|
|
}
|
|
|
setCheckedArrs(toConsumableArray_default()(checkedArrs));
|
|
|
};
|
|
|
var columns = [{
|
|
|
title: '序号',
|
|
|
dataIndex: 'name',
|
|
|
width: 70,
|
|
|
align: 'center',
|
|
|
render: function render(text, record, index) {
|
|
|
return batch ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
onChange: function onChange(e) {
|
|
|
if (selectedKey.includes(e.target.value)) {
|
|
|
setSelectedKey(toConsumableArray_default()(selectedKey.filter(function (item) {
|
|
|
return item != e.target.value;
|
|
|
})));
|
|
|
} else {
|
|
|
selectedKey.push(e.target.value);
|
|
|
setSelectedKey(toConsumableArray_default()(selectedKey));
|
|
|
}
|
|
|
},
|
|
|
value: record === null || record === void 0 ? void 0 : record.course_member_id,
|
|
|
checked: selectedKey.includes(record === null || record === void 0 ? void 0 : record.course_member_id),
|
|
|
children: params.limit * (params.page - 1) + index + 1
|
|
|
}) : params.limit * (params.page - 1) + index + 1;
|
|
|
}
|
|
|
}, {
|
|
|
title: '姓名',
|
|
|
width: 110,
|
|
|
align: 'center',
|
|
|
dataIndex: 'name',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
target: "_blank",
|
|
|
to: "/users/".concat(record === null || record === void 0 ? void 0 : record.login, "/classrooms"),
|
|
|
children: text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '证件照',
|
|
|
width: 60,
|
|
|
align: 'center',
|
|
|
dataIndex: 'face_image',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
style: {
|
|
|
width: 33,
|
|
|
height: 46,
|
|
|
display: !text && 'none'
|
|
|
},
|
|
|
src: env/* default */.Z.API_SERVER + text,
|
|
|
onClick: function onClick() {
|
|
|
mediator/* default */.Z.publish('preview-image', env/* default */.Z.API_SERVER + text);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}, !(detailTopBanner !== null && detailTopBanner !== void 0 && detailTopBanner.excellent) && {
|
|
|
title: '学号',
|
|
|
width: 110,
|
|
|
align: 'center',
|
|
|
dataIndex: 'student_id',
|
|
|
sortOrder: sortObj['student_id'],
|
|
|
sortDirections: ['descend', 'ascend'],
|
|
|
sorter: function sorter(a, b) {
|
|
|
return a.id - b.id;
|
|
|
},
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-black",
|
|
|
children: text || '--'
|
|
|
});
|
|
|
}
|
|
|
}, !(detailTopBanner !== null && detailTopBanner !== void 0 && detailTopBanner.is_public) && {
|
|
|
title: '手机号',
|
|
|
width: 100,
|
|
|
align: 'center',
|
|
|
dataIndex: 'user_phone',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-black",
|
|
|
children: text || '--'
|
|
|
});
|
|
|
}
|
|
|
}, !(detailTopBanner !== null && detailTopBanner !== void 0 && detailTopBanner.is_public) && {
|
|
|
title: '邮箱',
|
|
|
width: 120,
|
|
|
align: 'center',
|
|
|
dataIndex: 'user_mail',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-black",
|
|
|
children: text || '--'
|
|
|
});
|
|
|
}
|
|
|
}, (detailTopBanner === null || detailTopBanner === void 0 ? void 0 : detailTopBanner.is_public) && {
|
|
|
title: '学校/单位',
|
|
|
width: 140,
|
|
|
align: 'center',
|
|
|
dataIndex: 'school_name',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-black",
|
|
|
children: text || '--'
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '分班',
|
|
|
width: 100,
|
|
|
align: 'center',
|
|
|
dataIndex: 'course_group_name',
|
|
|
sortOrder: sortObj['course_group_name'],
|
|
|
sortDirections: ['descend', 'ascend'],
|
|
|
sorter: function sorter(a, b) {
|
|
|
return a.id - b.id;
|
|
|
},
|
|
|
render: function render(text) {
|
|
|
return text || '--';
|
|
|
}
|
|
|
}, (0,authority/* isAdminOrAssistant */.Gg)() && {
|
|
|
title: '操作',
|
|
|
align: 'center',
|
|
|
dataIndex: 'name',
|
|
|
render: function render(text, record) {
|
|
|
var _record$member_roles, _record$member_roles2, _record$member_roles3;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(popconfirm/* default */.Z, {
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {}),
|
|
|
onOpenChange: function onOpenChange() {
|
|
|
setCheckedArrs(toConsumableArray_default()(record.member_roles));
|
|
|
},
|
|
|
onConfirm: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
var res, _studentsList$student3;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
_context2.next = 2;
|
|
|
return (0,teacher/* changeMemberRole */.mw)({
|
|
|
coursesId: coursesId,
|
|
|
roles: checkedArrs,
|
|
|
user_id: record.user_id
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context2.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success('修改成功');
|
|
|
if (1 >= (studentsList === null || studentsList === void 0 || (_studentsList$student3 = studentsList.students) === null || _studentsList$student3 === void 0 ? void 0 : _studentsList$student3.length)) {
|
|
|
getData({
|
|
|
page: 1
|
|
|
});
|
|
|
} else {
|
|
|
getData();
|
|
|
}
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
})),
|
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default */.Z.Group, {
|
|
|
value: checkedArrs,
|
|
|
defaultValue: record.member_roles,
|
|
|
children: [(record === null || record === void 0 || (_record$member_roles = record.member_roles) === null || _record$member_roles === void 0 ? void 0 : _record$member_roles.includes('CREATOR')) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
disabled: true,
|
|
|
onClick: function onClick() {
|
|
|
return getChecked('CREATOR');
|
|
|
},
|
|
|
checked: true,
|
|
|
value: "CREATOR",
|
|
|
children: "\u7BA1\u7406\u5458"
|
|
|
}), !(record !== null && record !== void 0 && (_record$member_roles2 = record.member_roles) !== null && _record$member_roles2 !== void 0 && _record$member_roles2.includes('CREATOR')) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
onClick: function onClick() {
|
|
|
return getChecked('PROFESSOR');
|
|
|
},
|
|
|
value: "PROFESSOR",
|
|
|
children: "\u8001\u5E08"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
disabled: record !== null && record !== void 0 && (_record$member_roles3 = record.member_roles) !== null && _record$member_roles3 !== void 0 && _record$member_roles3.includes('CREATOR') ? true : false,
|
|
|
onClick: function onClick() {
|
|
|
return getChecked('ASSISTANT_PROFESSOR');
|
|
|
},
|
|
|
value: "ASSISTANT_PROFESSOR",
|
|
|
children: "\u52A9\u6559"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
onClick: function onClick() {
|
|
|
return getChecked('STUDENT');
|
|
|
},
|
|
|
value: "STUDENT",
|
|
|
children: "\u5B66\u751F"
|
|
|
})]
|
|
|
})
|
|
|
}),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-blue current",
|
|
|
children: "\u4FEE\u6539\u89D2\u8272"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(DropdownSearch/* default */.Z, {
|
|
|
onClick: function onClick(id) {
|
|
|
return moveClass(id, record, false);
|
|
|
},
|
|
|
dataSource: [{
|
|
|
id: '0',
|
|
|
name: '未分班'
|
|
|
}].concat(toConsumableArray_default()((allCourseGroups === null || allCourseGroups === void 0 ? void 0 : allCourseGroups.course_groups) || [])),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-blue current",
|
|
|
style: {
|
|
|
margin: '0px 10px'
|
|
|
},
|
|
|
children: "\u79FB\u52A8\u5206\u73ED"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "current",
|
|
|
style: {
|
|
|
color: 'red'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
modal/* default */.Z.confirm({
|
|
|
centered: true,
|
|
|
okText: '确定',
|
|
|
cancelText: '取消',
|
|
|
title: "\u662F\u5426\u786E\u8BA4\u5220\u9664",
|
|
|
onOk: function () {
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
var res, _studentsList$student4;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
_context3.next = 2;
|
|
|
return (0,teacher/* deleteCourseStudents */.l3)({
|
|
|
coursesId: coursesId,
|
|
|
students: [{
|
|
|
course_member_id: record.course_member_id
|
|
|
}]
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context3.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success('删除成功');
|
|
|
if (1 >= (studentsList === null || studentsList === void 0 || (_studentsList$student4 = studentsList.students) === null || _studentsList$student4 === void 0 ? void 0 : _studentsList$student4.length)) {
|
|
|
getData({
|
|
|
page: 1
|
|
|
});
|
|
|
} else {
|
|
|
getData();
|
|
|
}
|
|
|
dispatch({
|
|
|
type: 'classroomList/getClassroomTopBanner',
|
|
|
payload: {
|
|
|
id: coursesId
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
},
|
|
|
children: "\u5220\u9664"
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}].filter(function (item) {
|
|
|
return !!item;
|
|
|
});
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [studentsList.students_count === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(!!(studentsList !== null && studentsList !== void 0 && (_studentsList$student5 = studentsList.students) !== null && _studentsList$student5 !== void 0 && _studentsList$student5.length) && 'bg-white', " pl30 pr30 pt20"),
|
|
|
children: !!(studentsList !== null && studentsList !== void 0 && (_studentsList$student6 = studentsList.students) !== null && _studentsList$student6 !== void 0 && _studentsList$student6.length) && /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
onChange: function onChange(a, b, c) {
|
|
|
var newSortObj = {};
|
|
|
var newParams = {};
|
|
|
if (c.column) {
|
|
|
if (c.order === undefined) {
|
|
|
newSortObj[c.field] = 'descend';
|
|
|
newParams['sort'] = 'desc';
|
|
|
} else {
|
|
|
newParams['sort'] = c.order.replace('end', '');
|
|
|
newSortObj[c.field] = c.order;
|
|
|
}
|
|
|
newParams['order'] = 2;
|
|
|
if (c.column.dataIndex == 'student_id') {
|
|
|
newParams['order'] = 1;
|
|
|
}
|
|
|
} else {
|
|
|
newSortObj = {};
|
|
|
newParams['sort'] = '';
|
|
|
newParams['order'] = '';
|
|
|
}
|
|
|
setSortObj(objectSpread2_default()({}, newSortObj));
|
|
|
getData(newParams);
|
|
|
},
|
|
|
columns: columns,
|
|
|
dataSource: studentsList === null || studentsList === void 0 ? void 0 : studentsList.students,
|
|
|
pagination: false,
|
|
|
rowKey: "course_member_id",
|
|
|
loading: loading
|
|
|
})
|
|
|
}), (studentsList === null || studentsList === void 0 ? void 0 : studentsList.students_count) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "tc mb50 mt30",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
|
showSizeChanger: true,
|
|
|
onChange: onShowSizeChange,
|
|
|
current: params.page,
|
|
|
pageSize: params.limit,
|
|
|
total: studentsList === null || studentsList === void 0 ? void 0 : studentsList.students_count
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(image_preview/* default */.Z, {}), batch && /*#__PURE__*/(0,jsx_runtime.jsx)(affix/* default */.Z, {
|
|
|
offsetBottom: 0,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
height: 62,
|
|
|
background: '#fff',
|
|
|
paddingLeft: '39px',
|
|
|
width: '100%',
|
|
|
boxShadow: '0px -4px 11px 0px rgba(218, 218, 218, 0.5)',
|
|
|
display: 'flex',
|
|
|
alignItems: 'center'
|
|
|
},
|
|
|
children: [batch === 'member' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
flex: 1
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default */.Z, {
|
|
|
checked: (selectedKey === null || selectedKey === void 0 ? void 0 : selectedKey.length) === (studentsList === null || studentsList === void 0 || (_studentsList$student7 = studentsList.students) === null || _studentsList$student7 === void 0 ? void 0 : _studentsList$student7.length),
|
|
|
onClick: function onClick() {
|
|
|
var _studentsList$student8;
|
|
|
if ((selectedKey === null || selectedKey === void 0 ? void 0 : selectedKey.length) < (studentsList === null || studentsList === void 0 || (_studentsList$student8 = studentsList.students) === null || _studentsList$student8 === void 0 ? void 0 : _studentsList$student8.length)) {
|
|
|
setSelectedKey(toConsumableArray_default()(studentsList === null || studentsList === void 0 ? void 0 : studentsList.students.map(function (item) {
|
|
|
return item.course_member_id;
|
|
|
})));
|
|
|
} else {
|
|
|
setSelectedKey([]);
|
|
|
}
|
|
|
},
|
|
|
children: ["\u5168\u9009\u672C\u9875/", /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: ["\u5DF2\u9009 \uFF08", selectedKey === null || selectedKey === void 0 ? void 0 : selectedKey.length, "\uFF09"]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(DropdownSearch/* default */.Z, {
|
|
|
onClick: function onClick(id) {
|
|
|
return moveClass(id, {}, true);
|
|
|
},
|
|
|
dataSource: [{
|
|
|
id: '0',
|
|
|
name: '未分班'
|
|
|
}].concat(toConsumableArray_default()((allCourseGroups === null || allCourseGroups === void 0 ? void 0 : allCourseGroups.course_groups) || [])),
|
|
|
reversal: true,
|
|
|
isParentNode: true,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
style: {
|
|
|
margin: '0px 15px',
|
|
|
fontSize: '12px',
|
|
|
color: '#145DFF',
|
|
|
display: 'inline-flex',
|
|
|
alignItems: 'center'
|
|
|
},
|
|
|
children: ["\u6279\u91CF\u79FB\u52A8 ", /*#__PURE__*/(0,jsx_runtime.jsx)(UpOutlined/* default */.Z, {
|
|
|
style: {
|
|
|
color: '#464F66'
|
|
|
}
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
style: {
|
|
|
fontSize: '12px',
|
|
|
color: '#145DFF'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
if ((selectedKey === null || selectedKey === void 0 ? void 0 : selectedKey.length) <= 0) {
|
|
|
message/* default */.ZP.info('请选择学生');
|
|
|
return;
|
|
|
}
|
|
|
modal/* default */.Z.confirm({
|
|
|
centered: true,
|
|
|
okText: '确定',
|
|
|
cancelText: '取消',
|
|
|
title: "\u9009\u4E2D\u5B66\u751F\u5C06\u5168\u90E8\u88AB\u5220\u9664\uFF0C\u4E0D\u53EF\u6062\u590D\uFF0C\u662F\u5426\u7EE7\u7EED\u5220\u9664",
|
|
|
onOk: function () {
|
|
|
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
var res, _studentsList$student9;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
_context4.next = 2;
|
|
|
return (0,teacher/* deleteCourseStudents */.l3)({
|
|
|
coursesId: coursesId,
|
|
|
students: selectedKey.map(function (v) {
|
|
|
return {
|
|
|
course_member_id: v
|
|
|
};
|
|
|
})
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context4.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.success('删除成功');
|
|
|
if (selectedKey.length >= (studentsList === null || studentsList === void 0 || (_studentsList$student9 = studentsList.students) === null || _studentsList$student9 === void 0 ? void 0 : _studentsList$student9.length)) {
|
|
|
getData({
|
|
|
page: 1
|
|
|
});
|
|
|
} else {
|
|
|
getData();
|
|
|
}
|
|
|
dispatch({
|
|
|
type: 'classroomList/getClassroomTopBanner',
|
|
|
payload: {
|
|
|
id: coursesId
|
|
|
}
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'classroomList/getClassroomTopBanner',
|
|
|
payload: {
|
|
|
id: coursesId
|
|
|
}
|
|
|
});
|
|
|
setSelectedKey([]);
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk2.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
style: {
|
|
|
color: '#F65160',
|
|
|
display: 'inline-flex',
|
|
|
alignItems: 'center'
|
|
|
},
|
|
|
className: "iconfont icon-piliangshanchu2 font14 mr5"
|
|
|
}), "\u6279\u91CF\u5220\u9664"]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
style: {
|
|
|
marginRight: 30,
|
|
|
fontSize: '12px',
|
|
|
display: 'inline-flex',
|
|
|
alignItems: 'center',
|
|
|
color: '#333333'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
resetBatchStatus();
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-piliangcaozuo font12 mr5"
|
|
|
}), "\u53D6\u6D88\u64CD\u4F5C"]
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Approved_StudentMemberTable = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
var teachers = _ref4.teachers,
|
|
|
classroomList = _ref4.classroomList;
|
|
|
return {
|
|
|
teachers: teachers,
|
|
|
classroomList: classroomList
|
|
|
};
|
|
|
})(StudentMemberTable));
|
|
|
// EXTERNAL MODULE: ./src/utils/hooks/useCustomRequest.ts
|
|
|
var useCustomRequest = __webpack_require__(88992);
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(87885);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Students/components/Approved/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
var _allCourseGroups$cour;
|
|
|
var teachers = _ref.teachers,
|
|
|
dispatch = _ref.dispatch,
|
|
|
user = _ref.user,
|
|
|
classroomList = _ref.classroomList;
|
|
|
var _useParams = (0,_umi_production_exports.useParams)(),
|
|
|
coursesId = _useParams.coursesId;
|
|
|
var _getJsonFromUrl = (0,util/* getJsonFromUrl */.oP)(),
|
|
|
_getJsonFromUrl$tab = _getJsonFromUrl.tab,
|
|
|
tab = _getJsonFromUrl$tab === void 0 ? 'member' : _getJsonFromUrl$tab;
|
|
|
var allCourseGroups = teachers.allCourseGroups,
|
|
|
studentsList = teachers.studentsList;
|
|
|
var detailTopBanner = classroomList.detailTopBanner;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(''),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
batch = _useState2[0],
|
|
|
setBatch = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
memberSelectedKey = _useState4[0],
|
|
|
setMemberSelectedKey = _useState4[1]; //已审批的选中项
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
applicantSelectedKey = _useState6[0],
|
|
|
setApplicantSelectedKey = _useState6[1]; //申请者的选中项
|
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (!user.userInfo.username) {
|
|
|
return;
|
|
|
}
|
|
|
getData({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'teachers/getAllCourseGroups',
|
|
|
payload: {
|
|
|
coursesId: coursesId,
|
|
|
limit: 2000
|
|
|
}
|
|
|
});
|
|
|
if ((0,authority/* isAdminOrAssistant */.Gg)()) {
|
|
|
getApplyStudentsData({
|
|
|
page: 1,
|
|
|
limit: 10
|
|
|
});
|
|
|
}
|
|
|
}, [user]);
|
|
|
|
|
|
//获取已在班级内的学生数据
|
|
|
var getMemberData = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(queryParams) {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return dispatch({
|
|
|
type: 'teachers/getStudentsList',
|
|
|
payload: objectSpread2_default()({
|
|
|
coursesId: coursesId
|
|
|
}, queryParams)
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
return _context.abrupt("return", res);
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function getMemberData(_x) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
|
|
|
//获取申请中的学生数据
|
|
|
var getStudentData = /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(queryParams) {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
_context2.next = 2;
|
|
|
return (0,teacher/* getApplyStudents */.iU)(coursesId, queryParams);
|
|
|
case 2:
|
|
|
res = _context2.sent;
|
|
|
return _context2.abrupt("return", res);
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function getStudentData(_x2) {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var _useCustomRequest = (0,useCustomRequest/* useCustomRequest */.U)(getMemberData, {
|
|
|
page: 1,
|
|
|
limit: 20
|
|
|
}),
|
|
|
_useCustomRequest2 = slicedToArray_default()(_useCustomRequest, 4),
|
|
|
params = _useCustomRequest2[0],
|
|
|
isLoading = _useCustomRequest2[1],
|
|
|
getData = _useCustomRequest2[2],
|
|
|
d = _useCustomRequest2[3];
|
|
|
var _useCustomRequest3 = (0,useCustomRequest/* useCustomRequest */.U)(getStudentData, {
|
|
|
page: 1,
|
|
|
limit: 20
|
|
|
}),
|
|
|
_useCustomRequest4 = slicedToArray_default()(_useCustomRequest3, 4),
|
|
|
applicantParams = _useCustomRequest4[0],
|
|
|
applyTableLoading = _useCustomRequest4[1],
|
|
|
getApplyStudentsData = _useCustomRequest4[2],
|
|
|
applyStudentsData = _useCustomRequest4[3];
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(tab),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
activeKey = _useState8[0],
|
|
|
setActiveKey = _useState8[1];
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)({
|
|
|
course_group_id: '',
|
|
|
search: ''
|
|
|
}),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
commonParams = _useState10[0],
|
|
|
setCommonParams = _useState10[1];
|
|
|
var resetBatchStatus = function resetBatchStatus() {
|
|
|
setMemberSelectedKey([]);
|
|
|
setApplicantSelectedKey([]);
|
|
|
setBatch('');
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "bg-white pl30 pr30 pt20",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
justify: "space-between",
|
|
|
children: [(0,authority/* isAdminOrAssistant */.Gg)() && !(detailTopBanner !== null && detailTopBanner !== void 0 && detailTopBanner.excellent) && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(tabs/* default */.Z, {
|
|
|
className: Studentsmodules.listTabWrapper,
|
|
|
activeKey: activeKey,
|
|
|
onChange: function onChange(key) {
|
|
|
setActiveKey(key);
|
|
|
resetBatchStatus();
|
|
|
if (key === "member") {
|
|
|
getData(commonParams);
|
|
|
} else {
|
|
|
getApplyStudentsData(commonParams);
|
|
|
}
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z.TabPane, {
|
|
|
tab: "\u5DF2\u5BA1\u6279(".concat((studentsList === null || studentsList === void 0 ? void 0 : studentsList.students_count) || 0, ")")
|
|
|
}, "member"), /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z.TabPane, {
|
|
|
tab: "\u5F85\u5BA1\u6279(".concat((applyStudentsData === null || applyStudentsData === void 0 ? void 0 : applyStudentsData.apply_size) || 0, ")")
|
|
|
}, "applicant")]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
|
|
|
size: 'middle',
|
|
|
value: commonParams.course_group_id === '' ? '全部' : commonParams.course_group_id,
|
|
|
onChange: /*#__PURE__*/function () {
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(value) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
if (!(activeKey === 'member')) {
|
|
|
_context3.next = 5;
|
|
|
break;
|
|
|
}
|
|
|
_context3.next = 3;
|
|
|
return getData({
|
|
|
page: 1,
|
|
|
course_group_id: value === '全部' ? '' : value
|
|
|
});
|
|
|
case 3:
|
|
|
_context3.next = 7;
|
|
|
break;
|
|
|
case 5:
|
|
|
_context3.next = 7;
|
|
|
return getApplyStudentsData({
|
|
|
page: 1,
|
|
|
course_group_id: value === '全部' ? '' : value
|
|
|
});
|
|
|
case 7:
|
|
|
resetBatchStatus();
|
|
|
setCommonParams(function (prev) {
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, prev), {}, {
|
|
|
course_group_id: value === '全部' ? '' : value
|
|
|
});
|
|
|
});
|
|
|
case 9:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return function (_x3) {
|
|
|
return _ref4.apply(this, arguments);
|
|
|
};
|
|
|
}(),
|
|
|
style: {
|
|
|
width: 200,
|
|
|
marginRight: 10
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
value: '全部',
|
|
|
children: "\u5168\u90E8\u5206\u73ED"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
value: '0',
|
|
|
children: "\u672A\u5206\u73ED"
|
|
|
}), allCourseGroups === null || allCourseGroups === void 0 || (_allCourseGroups$cour = allCourseGroups.course_groups) === null || _allCourseGroups$cour === void 0 ? void 0 : _allCourseGroups$cour.map(function (item) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
value: item === null || item === void 0 ? void 0 : item.id,
|
|
|
children: item === null || item === void 0 ? void 0 : item.name
|
|
|
}, item === null || item === void 0 ? void 0 : item.id);
|
|
|
})]
|
|
|
}), "\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-orange",
|
|
|
children: activeKey === "member" ? studentsList === null || studentsList === void 0 ? void 0 : studentsList.students_count : (applyStudentsData === null || applyStudentsData === void 0 ? void 0 : applyStudentsData.apply_size) || 0
|
|
|
}), "\u4E2A\u5B66\u751F"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
|
|
// allowClear={true}
|
|
|
value: commonParams.search,
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u59D3\u540D\u3001\u5B66\u53F7\u8FDB\u884C\u641C\u7D22",
|
|
|
onChange: function onChange(e) {
|
|
|
e.persist();
|
|
|
setCommonParams(function (prev) {
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, prev), {}, {
|
|
|
search: e.target.value
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
onSearch: function onSearch(value) {
|
|
|
if (activeKey === 'member') {
|
|
|
getData({
|
|
|
search: value,
|
|
|
page: 1
|
|
|
});
|
|
|
} else {
|
|
|
getApplyStudentsData({
|
|
|
search: value,
|
|
|
page: 1
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
style: {
|
|
|
width: 200,
|
|
|
marginRight: 15
|
|
|
}
|
|
|
})
|
|
|
}), (0,authority/* isAdminOrAssistant */.Gg)() && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
style: {
|
|
|
fontSize: '12px'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
if (batch.length > 0) {
|
|
|
resetBatchStatus();
|
|
|
} else {
|
|
|
setBatch(activeKey);
|
|
|
}
|
|
|
},
|
|
|
size: 'middle',
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-piliangcaozuo font12 mr5"
|
|
|
}), batch ? '取消操作' : '批量操作']
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
}), activeKey === 'member' && /*#__PURE__*/(0,jsx_runtime.jsx)(Approved_StudentMemberTable, {
|
|
|
params: params,
|
|
|
getData: getData,
|
|
|
loading: isLoading,
|
|
|
batch: batch,
|
|
|
resetBatchStatus: resetBatchStatus,
|
|
|
selectedKey: memberSelectedKey,
|
|
|
setSelectedKey: setMemberSelectedKey
|
|
|
}), activeKey === 'applicant' && /*#__PURE__*/(0,jsx_runtime.jsx)(Approved_ApplicantTable, {
|
|
|
params: applicantParams,
|
|
|
data: applyStudentsData,
|
|
|
loading: applyTableLoading,
|
|
|
batch: batch,
|
|
|
resetBatchStatus: resetBatchStatus,
|
|
|
reload: getApplyStudentsData,
|
|
|
selectedKey: applicantSelectedKey,
|
|
|
setSelectedKey: setApplicantSelectedKey
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Approved = ((0,_umi_production_exports.connect)(function (_ref5) {
|
|
|
var teachers = _ref5.teachers,
|
|
|
user = _ref5.user,
|
|
|
classroomList = _ref5.classroomList;
|
|
|
return {
|
|
|
teachers: teachers,
|
|
|
user: user,
|
|
|
classroomList: classroomList
|
|
|
};
|
|
|
})(ShixunsListPage));
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Teachers/components/ChangeAdmin.tsx
|
|
|
var ChangeAdmin = __webpack_require__(25178);
|
|
|
// EXTERNAL MODULE: ./src/components/ManageHead/index.tsx + 1 modules
|
|
|
var ManageHead = __webpack_require__(22979);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Students/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Students_ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
var teachers = _ref.teachers,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
classroomList = _ref.classroomList,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch,
|
|
|
match = _ref.match;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)("0"),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
tabKey = _useState2[0],
|
|
|
setTabsKey = _useState2[1];
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
var onMenuSelect = function onMenuSelect(v) {
|
|
|
setTabsKey(v.key);
|
|
|
};
|
|
|
var menu = /*#__PURE__*/(0,jsx_runtime.jsxs)(es_menu/* default */.Z, {
|
|
|
onClick: function onClick(val) {
|
|
|
switch (val.key) {
|
|
|
case "1":
|
|
|
(0,utils_export/* ExportCourseInfo */.Zn)(objectSpread2_default()({}, params));
|
|
|
break;
|
|
|
case "2":
|
|
|
(0,utils_export/* ExportCourseActScore */.cr)(objectSpread2_default()({}, params));
|
|
|
break;
|
|
|
case "3":
|
|
|
(0,utils_export/* ExportCourseMemberScores */.fi)(objectSpread2_default()({}, params));
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_menu/* default */.Z.Item, {
|
|
|
children: "\u8BFE\u5802\u4FE1\u606F"
|
|
|
}, 1), /*#__PURE__*/(0,jsx_runtime.jsx)(es_menu/* default */.Z.Item, {
|
|
|
children: "\u6D3B\u8DC3\u5EA6"
|
|
|
}, 2), /*#__PURE__*/(0,jsx_runtime.jsx)(es_menu/* default */.Z.Item, {
|
|
|
children: "\u603B\u6210\u7EE9"
|
|
|
}, 3)]
|
|
|
});
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(ManageHead/* default */.Z, {
|
|
|
active: 2,
|
|
|
children: [(0,authority/* isAdminOrCreator */.aN)() && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "font16 mr20 current c-blue",
|
|
|
onClick: function onClick() {
|
|
|
dispatch({
|
|
|
type: 'teachers/setActionTabs',
|
|
|
payload: {
|
|
|
key: "更换管理员"
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
children: "\u66F4\u6362\u7BA1\u7406\u5458"
|
|
|
}), (0,authority/* isAdmins */.eB)() && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "font16 current c-blue",
|
|
|
onClick: function onClick(e) {
|
|
|
(0,utils_export/* ExportCourseStudentsInfo */.eV)(params);
|
|
|
},
|
|
|
children: "\u5BFC\u51FA\u5B66\u751F"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Approved, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(ChangeAdmin/* default */.Z, {})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Students = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
|
var teachers = _ref2.teachers,
|
|
|
loading = _ref2.loading,
|
|
|
globalSetting = _ref2.globalSetting,
|
|
|
classroomList = _ref2.classroomList;
|
|
|
return {
|
|
|
teachers: teachers,
|
|
|
globalSetting: globalSetting,
|
|
|
classroomList: classroomList,
|
|
|
loading: loading.effects
|
|
|
};
|
|
|
})(Students_ShixunsListPage));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 88992:
|
|
|
/*!*********************************************!*\
|
|
|
!*** ./src/utils/hooks/useCustomRequest.ts ***!
|
|
|
\*********************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ U: function() { return /* binding */ useCustomRequest; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//常见的请求模式,包含loading和改变params。
|
|
|
|
|
|
function useCustomRequest(request, baseParams) {
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(baseParams),
|
|
|
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2),
|
|
|
params = _useState2[0],
|
|
|
setParams = _useState2[1];
|
|
|
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(false),
|
|
|
_useState4 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState3, 2),
|
|
|
loading = _useState4[0],
|
|
|
setLoading = _useState4[1];
|
|
|
var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(),
|
|
|
_useState6 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState5, 2),
|
|
|
data = _useState6[0],
|
|
|
setData = _useState6[1];
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
var _ref = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(newParams) {
|
|
|
var reset,
|
|
|
mergedParams,
|
|
|
res,
|
|
|
_args = arguments;
|
|
|
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
reset = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
|
|
|
mergedParams = reset ? baseParams : _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params), newParams);
|
|
|
setLoading(true);
|
|
|
setParams(mergedParams);
|
|
|
_context.next = 6;
|
|
|
return request(mergedParams);
|
|
|
case 6:
|
|
|
res = _context.sent;
|
|
|
setLoading(false);
|
|
|
setData(res);
|
|
|
return _context.abrupt("return", res);
|
|
|
case 10:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function getData(_x) {
|
|
|
return _ref.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
return [params, loading, getData, data];
|
|
|
}
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 77578:
|
|
|
/*!**********************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/_util/getRenderPropValue.js ***!
|
|
|
\**********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ Z: function() { return /* binding */ getRenderPropValue; }
|
|
|
/* harmony export */ });
|
|
|
const getRenderPropValue = propValue => {
|
|
|
if (!propValue) {
|
|
|
return null;
|
|
|
}
|
|
|
if (typeof propValue === 'function') {
|
|
|
return propValue();
|
|
|
}
|
|
|
return propValue;
|
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 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 */ 42371);
|
|
|
/* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/raf */ 90571);
|
|
|
|
|
|
|
|
|
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.23.2@@babel/runtime/helpers/esm/classCallCheck.js
|
|
|
var classCallCheck = __webpack_require__(74809);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/createClass.js
|
|
|
var createClass = __webpack_require__(57338);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/inherits.js
|
|
|
var inherits = __webpack_require__(29161);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/createSuper.js + 1 modules
|
|
|
var createSuper = __webpack_require__(24154);
|
|
|
// 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.3.2@classnames/index.js
|
|
|
var _classnames_2_3_2_classnames = __webpack_require__(12124);
|
|
|
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-resize-observer@1.4.0@rc-resize-observer/es/index.js + 4 modules
|
|
|
var es = __webpack_require__(28647);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/omit.js
|
|
|
var omit = __webpack_require__(99468);
|
|
|
// 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_3_2_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_3_2_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);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 14478:
|
|
|
/*!**************************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/popconfirm/index.js + 2 modules ***!
|
|
|
\**************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ popconfirm; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ExclamationCircleFilled.js + 1 modules
|
|
|
var ExclamationCircleFilled = __webpack_require__(86850);
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js
|
|
|
var _classnames_2_3_2_classnames = __webpack_require__(12124);
|
|
|
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/KeyCode.js
|
|
|
var KeyCode = __webpack_require__(84821);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/hooks/useMergedState.js
|
|
|
var useMergedState = __webpack_require__(84381);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/omit.js
|
|
|
var omit = __webpack_require__(99468);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
|
|
|
var reactNode = __webpack_require__(92343);
|
|
|
// 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/popover/index.js
|
|
|
var popover = __webpack_require__(60324);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/ActionButton.js
|
|
|
var ActionButton = __webpack_require__(92806);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/getRenderPropValue.js
|
|
|
var getRenderPropValue = __webpack_require__(77578);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/button.js + 8 modules
|
|
|
var button_button = __webpack_require__(67797);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/locale/useLocale.js
|
|
|
var useLocale = __webpack_require__(9763);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/locale/en_US.js + 1 modules
|
|
|
var en_US = __webpack_require__(43710);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/popover/PurePanel.js
|
|
|
var PurePanel = __webpack_require__(39722);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/popconfirm/style/index.js
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
// =============================== Base ===============================
|
|
|
const genBaseStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
iconCls,
|
|
|
antCls,
|
|
|
zIndexPopup,
|
|
|
colorText,
|
|
|
colorWarning,
|
|
|
marginXXS,
|
|
|
marginXS,
|
|
|
fontSize,
|
|
|
fontWeightStrong,
|
|
|
colorTextHeading
|
|
|
} = token;
|
|
|
return {
|
|
|
[componentCls]: {
|
|
|
zIndex: zIndexPopup,
|
|
|
[`&${antCls}-popover`]: {
|
|
|
fontSize
|
|
|
},
|
|
|
[`${componentCls}-message`]: {
|
|
|
marginBottom: marginXS,
|
|
|
display: 'flex',
|
|
|
flexWrap: 'nowrap',
|
|
|
alignItems: 'start',
|
|
|
[`> ${componentCls}-message-icon ${iconCls}`]: {
|
|
|
color: colorWarning,
|
|
|
fontSize,
|
|
|
lineHeight: 1,
|
|
|
marginInlineEnd: marginXS
|
|
|
},
|
|
|
[`${componentCls}-title`]: {
|
|
|
fontWeight: fontWeightStrong,
|
|
|
color: colorTextHeading,
|
|
|
'&:only-child': {
|
|
|
fontWeight: 'normal'
|
|
|
}
|
|
|
},
|
|
|
[`${componentCls}-description`]: {
|
|
|
marginTop: marginXXS,
|
|
|
color: colorText
|
|
|
}
|
|
|
},
|
|
|
[`${componentCls}-buttons`]: {
|
|
|
textAlign: 'end',
|
|
|
whiteSpace: 'nowrap',
|
|
|
button: {
|
|
|
marginInlineStart: marginXS
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
// ============================== Export ==============================
|
|
|
/* harmony default export */ var popconfirm_style = ((0,genComponentStyleHook/* default */.Z)('Popconfirm', token => genBaseStyle(token), token => {
|
|
|
const {
|
|
|
zIndexPopupBase
|
|
|
} = token;
|
|
|
return {
|
|
|
zIndexPopup: zIndexPopupBase + 60
|
|
|
};
|
|
|
}, {
|
|
|
resetStyle: false
|
|
|
}));
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/popconfirm/PurePanel.js
|
|
|
"use client";
|
|
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Overlay = props => {
|
|
|
const {
|
|
|
prefixCls,
|
|
|
okButtonProps,
|
|
|
cancelButtonProps,
|
|
|
title,
|
|
|
description,
|
|
|
cancelText,
|
|
|
okText,
|
|
|
okType = 'primary',
|
|
|
icon = /*#__PURE__*/_react_17_0_2_react.createElement(ExclamationCircleFilled/* default */.Z, null),
|
|
|
showCancel = true,
|
|
|
close,
|
|
|
onConfirm,
|
|
|
onCancel,
|
|
|
onPopupClick
|
|
|
} = props;
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
|
const [contextLocale] = (0,useLocale/* default */.Z)('Popconfirm', en_US/* default */.Z.Popconfirm);
|
|
|
const theTitle = (0,getRenderPropValue/* getRenderPropValue */.Z)(title);
|
|
|
const theDescription = (0,getRenderPropValue/* getRenderPropValue */.Z)(description);
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
|
className: `${prefixCls}-inner-content`,
|
|
|
onClick: onPopupClick
|
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
|
className: `${prefixCls}-message`
|
|
|
}, icon && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
|
className: `${prefixCls}-message-icon`
|
|
|
}, icon), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
|
className: `${prefixCls}-message-text`
|
|
|
}, theTitle && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
|
className: _classnames_2_3_2_classnames_default()(`${prefixCls}-title`)
|
|
|
}, theTitle), theDescription && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
|
className: `${prefixCls}-description`
|
|
|
}, theDescription))), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
|
className: `${prefixCls}-buttons`
|
|
|
}, showCancel && /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, Object.assign({
|
|
|
onClick: onCancel,
|
|
|
size: "small"
|
|
|
}, cancelButtonProps), cancelText !== null && cancelText !== void 0 ? cancelText : contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.cancelText), /*#__PURE__*/_react_17_0_2_react.createElement(ActionButton/* default */.Z, {
|
|
|
buttonProps: Object.assign(Object.assign({
|
|
|
size: 'small'
|
|
|
}, (0,button_button/* convertLegacyProps */.n)(okType)), okButtonProps),
|
|
|
actionFn: onConfirm,
|
|
|
close: close,
|
|
|
prefixCls: getPrefixCls('btn'),
|
|
|
quitOnNullishReturnValue: true,
|
|
|
emitEvent: true
|
|
|
}, okText !== null && okText !== void 0 ? okText : contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.okText)));
|
|
|
};
|
|
|
const PurePanel_PurePanel = props => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
placement,
|
|
|
className,
|
|
|
style
|
|
|
} = props,
|
|
|
restProps = __rest(props, ["prefixCls", "placement", "className", "style"]);
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
|
const prefixCls = getPrefixCls('popconfirm', customizePrefixCls);
|
|
|
const [wrapSSR] = popconfirm_style(prefixCls);
|
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(PurePanel/* default */.ZP, {
|
|
|
placement: placement,
|
|
|
className: _classnames_2_3_2_classnames_default()(prefixCls, className),
|
|
|
style: style,
|
|
|
content: /*#__PURE__*/_react_17_0_2_react.createElement(Overlay, Object.assign({
|
|
|
prefixCls: prefixCls
|
|
|
}, restProps))
|
|
|
}));
|
|
|
};
|
|
|
/* harmony default export */ var popconfirm_PurePanel = (PurePanel_PurePanel);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/popconfirm/index.js
|
|
|
"use client";
|
|
|
|
|
|
var popconfirm_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Popconfirm = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
placement = 'top',
|
|
|
trigger = 'click',
|
|
|
okType = 'primary',
|
|
|
icon = /*#__PURE__*/_react_17_0_2_react.createElement(ExclamationCircleFilled/* default */.Z, null),
|
|
|
children,
|
|
|
overlayClassName,
|
|
|
onOpenChange,
|
|
|
onVisibleChange
|
|
|
} = props,
|
|
|
restProps = popconfirm_rest(props, ["prefixCls", "placement", "trigger", "okType", "icon", "children", "overlayClassName", "onOpenChange", "onVisibleChange"]);
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
|
const [open, setOpen] = (0,useMergedState/* default */.Z)(false, {
|
|
|
value: props.open,
|
|
|
defaultValue: props.defaultOpen
|
|
|
});
|
|
|
// const isDestroyed = useDestroyed();
|
|
|
const settingOpen = (value, e) => {
|
|
|
setOpen(value, true);
|
|
|
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(value);
|
|
|
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(value, e);
|
|
|
};
|
|
|
const close = e => {
|
|
|
settingOpen(false, e);
|
|
|
};
|
|
|
const onConfirm = e => {
|
|
|
var _a;
|
|
|
return (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(undefined, e);
|
|
|
};
|
|
|
const onCancel = e => {
|
|
|
var _a;
|
|
|
settingOpen(false, e);
|
|
|
(_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(undefined, e);
|
|
|
};
|
|
|
const onKeyDown = e => {
|
|
|
if (e.keyCode === KeyCode/* default */.Z.ESC && open) {
|
|
|
settingOpen(false, e);
|
|
|
}
|
|
|
};
|
|
|
const onInternalOpenChange = value => {
|
|
|
const {
|
|
|
disabled = false
|
|
|
} = props;
|
|
|
if (disabled) {
|
|
|
return;
|
|
|
}
|
|
|
settingOpen(value);
|
|
|
};
|
|
|
const prefixCls = getPrefixCls('popconfirm', customizePrefixCls);
|
|
|
const overlayClassNames = _classnames_2_3_2_classnames_default()(prefixCls, overlayClassName);
|
|
|
const [wrapSSR] = popconfirm_style(prefixCls);
|
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(popover/* default */.Z, Object.assign({}, (0,omit/* default */.Z)(restProps, ['title']), {
|
|
|
trigger: trigger,
|
|
|
placement: placement,
|
|
|
onOpenChange: onInternalOpenChange,
|
|
|
open: open,
|
|
|
ref: ref,
|
|
|
overlayClassName: overlayClassNames,
|
|
|
content: /*#__PURE__*/_react_17_0_2_react.createElement(Overlay, Object.assign({
|
|
|
okType: okType,
|
|
|
icon: icon
|
|
|
}, props, {
|
|
|
prefixCls: prefixCls,
|
|
|
close: close,
|
|
|
onConfirm: onConfirm,
|
|
|
onCancel: onCancel
|
|
|
})),
|
|
|
"data-popover-inject": true
|
|
|
}), (0,reactNode/* cloneElement */.Tm)(children, {
|
|
|
onKeyDown: e => {
|
|
|
var _a, _b;
|
|
|
if ( /*#__PURE__*/_react_17_0_2_react.isValidElement(children)) {
|
|
|
(_b = children === null || children === void 0 ? void 0 : (_a = children.props).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
|
}
|
|
|
onKeyDown(e);
|
|
|
}
|
|
|
})));
|
|
|
});
|
|
|
// We don't care debug panel
|
|
|
/* istanbul ignore next */
|
|
|
Popconfirm._InternalPanelDoNotUseOrYouWillBeFired = popconfirm_PurePanel;
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var popconfirm = (Popconfirm);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 39722:
|
|
|
/*!***************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/popover/PurePanel.js ***!
|
|
|
\***************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* unused harmony exports getOverlay, RawPurePanel */
|
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 12124);
|
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var rc_tooltip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-tooltip */ 55477);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ 36355);
|
|
|
/* harmony import */ var _util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_util/getRenderPropValue */ 77578);
|
|
|
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style */ 17356);
|
|
|
"use client";
|
|
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getOverlay = (prefixCls, title, content) => {
|
|
|
if (!title && !content) return undefined;
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
|
|
className: `${prefixCls}-title`
|
|
|
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__/* .getRenderPropValue */ .Z)(title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
|
|
className: `${prefixCls}-inner-content`
|
|
|
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__/* .getRenderPropValue */ .Z)(content)));
|
|
|
};
|
|
|
const RawPurePanel = props => {
|
|
|
const {
|
|
|
hashId,
|
|
|
prefixCls,
|
|
|
className,
|
|
|
style,
|
|
|
placement = 'top',
|
|
|
title,
|
|
|
content,
|
|
|
children
|
|
|
} = props;
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
|
|
className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(hashId, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className),
|
|
|
style: style
|
|
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
|
|
className: `${prefixCls}-arrow`
|
|
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(rc_tooltip__WEBPACK_IMPORTED_MODULE_1__/* .Popup */ .G, Object.assign({}, props, {
|
|
|
className: hashId,
|
|
|
prefixCls: prefixCls
|
|
|
}), children || getOverlay(prefixCls, title, content)));
|
|
|
};
|
|
|
const PurePanel = props => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls
|
|
|
} = props,
|
|
|
restProps = __rest(props, ["prefixCls"]);
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_4__/* .ConfigContext */ .E_);
|
|
|
const prefixCls = getPrefixCls('popover', customizePrefixCls);
|
|
|
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(prefixCls);
|
|
|
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(RawPurePanel, Object.assign({}, restProps, {
|
|
|
prefixCls: prefixCls,
|
|
|
hashId: hashId
|
|
|
})));
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__.ZP = (PurePanel);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 60324:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/popover/index.js ***!
|
|
|
\***********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 12124);
|
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var _util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_util/getRenderPropValue */ 77578);
|
|
|
/* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/motion */ 62892);
|
|
|
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ 36355);
|
|
|
/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../tooltip */ 6848);
|
|
|
/* harmony import */ var _PurePanel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PurePanel */ 39722);
|
|
|
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./style */ 17356);
|
|
|
"use client";
|
|
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CSSINJS
|
|
|
|
|
|
const Overlay = _ref => {
|
|
|
let {
|
|
|
title,
|
|
|
content,
|
|
|
prefixCls
|
|
|
} = _ref;
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
|
|
|
className: `${prefixCls}-title`
|
|
|
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__/* .getRenderPropValue */ .Z)(title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
|
|
|
className: `${prefixCls}-inner-content`
|
|
|
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__/* .getRenderPropValue */ .Z)(content)));
|
|
|
};
|
|
|
const Popover = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.forwardRef((props, ref) => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
title,
|
|
|
content,
|
|
|
overlayClassName,
|
|
|
placement = 'top',
|
|
|
trigger = 'hover',
|
|
|
mouseEnterDelay = 0.1,
|
|
|
mouseLeaveDelay = 0.1,
|
|
|
overlayStyle = {}
|
|
|
} = props,
|
|
|
otherProps = __rest(props, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle"]);
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_3__/* .ConfigContext */ .E_);
|
|
|
const prefixCls = getPrefixCls('popover', customizePrefixCls);
|
|
|
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(prefixCls);
|
|
|
const rootPrefixCls = getPrefixCls();
|
|
|
const overlayCls = classnames__WEBPACK_IMPORTED_MODULE_0___default()(overlayClassName, hashId);
|
|
|
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_tooltip__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, Object.assign({
|
|
|
placement: placement,
|
|
|
trigger: trigger,
|
|
|
mouseEnterDelay: mouseEnterDelay,
|
|
|
mouseLeaveDelay: mouseLeaveDelay,
|
|
|
overlayStyle: overlayStyle
|
|
|
}, otherProps, {
|
|
|
prefixCls: prefixCls,
|
|
|
overlayClassName: overlayCls,
|
|
|
ref: ref,
|
|
|
overlay: title || content ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(Overlay, {
|
|
|
prefixCls: prefixCls,
|
|
|
title: title,
|
|
|
content: content
|
|
|
}) : null,
|
|
|
transitionName: (0,_util_motion__WEBPACK_IMPORTED_MODULE_6__/* .getTransitionName */ .m)(rootPrefixCls, 'zoom-big', otherProps.transitionName),
|
|
|
"data-popover-inject": true
|
|
|
})));
|
|
|
});
|
|
|
if (false) {}
|
|
|
Popover._InternalPanelDoNotUseOrYouWillBeFired = _PurePanel__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP;
|
|
|
/* harmony default export */ __webpack_exports__.Z = (Popover);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 17356:
|
|
|
/*!*****************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/popover/style/index.js ***!
|
|
|
\*****************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ 17313);
|
|
|
/* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../style/motion */ 29878);
|
|
|
/* harmony import */ var _style_placementArrow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style/placementArrow */ 19447);
|
|
|
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ 33166);
|
|
|
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ 83116);
|
|
|
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ 37613);
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const genBaseStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
popoverColor,
|
|
|
minWidth,
|
|
|
fontWeightStrong,
|
|
|
popoverPadding,
|
|
|
boxShadowSecondary,
|
|
|
colorTextHeading,
|
|
|
borderRadiusLG: borderRadius,
|
|
|
zIndexPopup,
|
|
|
marginXS,
|
|
|
colorBgElevated,
|
|
|
popoverBg
|
|
|
} = token;
|
|
|
return [{
|
|
|
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .resetComponent */ .Wf)(token)), {
|
|
|
position: 'absolute',
|
|
|
top: 0,
|
|
|
// use `left` to fix https://github.com/ant-design/ant-design/issues/39195
|
|
|
left: {
|
|
|
_skip_check_: true,
|
|
|
value: 0
|
|
|
},
|
|
|
zIndex: zIndexPopup,
|
|
|
fontWeight: 'normal',
|
|
|
whiteSpace: 'normal',
|
|
|
textAlign: 'start',
|
|
|
cursor: 'auto',
|
|
|
userSelect: 'text',
|
|
|
transformOrigin: `var(--arrow-x, 50%) var(--arrow-y, 50%)`,
|
|
|
'--antd-arrow-background-color': colorBgElevated,
|
|
|
'&-rtl': {
|
|
|
direction: 'rtl'
|
|
|
},
|
|
|
'&-hidden': {
|
|
|
display: 'none'
|
|
|
},
|
|
|
[`${componentCls}-content`]: {
|
|
|
position: 'relative'
|
|
|
},
|
|
|
[`${componentCls}-inner`]: {
|
|
|
backgroundColor: popoverBg,
|
|
|
backgroundClip: 'padding-box',
|
|
|
borderRadius,
|
|
|
boxShadow: boxShadowSecondary,
|
|
|
padding: popoverPadding
|
|
|
},
|
|
|
[`${componentCls}-title`]: {
|
|
|
minWidth,
|
|
|
marginBottom: marginXS,
|
|
|
color: colorTextHeading,
|
|
|
fontWeight: fontWeightStrong
|
|
|
},
|
|
|
[`${componentCls}-inner-content`]: {
|
|
|
color: popoverColor
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// Arrow Style
|
|
|
(0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .ZP)(token, {
|
|
|
colorBg: 'var(--antd-arrow-background-color)'
|
|
|
}),
|
|
|
// Pure Render
|
|
|
{
|
|
|
[`${componentCls}-pure`]: {
|
|
|
position: 'relative',
|
|
|
maxWidth: 'none',
|
|
|
margin: token.sizePopupArrow,
|
|
|
display: 'inline-block',
|
|
|
[`${componentCls}-content`]: {
|
|
|
display: 'inline-block'
|
|
|
}
|
|
|
}
|
|
|
}];
|
|
|
};
|
|
|
const genColorStyle = token => {
|
|
|
const {
|
|
|
componentCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[componentCls]: _theme_internal__WEBPACK_IMPORTED_MODULE_2__/* .PresetColors */ .i.map(colorKey => {
|
|
|
const lightColor = token[`${colorKey}6`];
|
|
|
return {
|
|
|
[`&${componentCls}-${colorKey}`]: {
|
|
|
'--antd-arrow-background-color': lightColor,
|
|
|
[`${componentCls}-inner`]: {
|
|
|
backgroundColor: lightColor
|
|
|
},
|
|
|
[`${componentCls}-arrow`]: {
|
|
|
background: 'transparent'
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
})
|
|
|
};
|
|
|
};
|
|
|
const genWireframeStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
lineWidth,
|
|
|
lineType,
|
|
|
colorSplit,
|
|
|
paddingSM,
|
|
|
controlHeight,
|
|
|
fontSize,
|
|
|
lineHeight,
|
|
|
padding
|
|
|
} = token;
|
|
|
const titlePaddingBlockDist = controlHeight - Math.round(fontSize * lineHeight);
|
|
|
const popoverTitlePaddingBlockTop = titlePaddingBlockDist / 2;
|
|
|
const popoverTitlePaddingBlockBottom = titlePaddingBlockDist / 2 - lineWidth;
|
|
|
const popoverPaddingHorizontal = padding;
|
|
|
return {
|
|
|
[componentCls]: {
|
|
|
[`${componentCls}-inner`]: {
|
|
|
padding: 0
|
|
|
},
|
|
|
[`${componentCls}-title`]: {
|
|
|
margin: 0,
|
|
|
padding: `${popoverTitlePaddingBlockTop}px ${popoverPaddingHorizontal}px ${popoverTitlePaddingBlockBottom}px`,
|
|
|
borderBottom: `${lineWidth}px ${lineType} ${colorSplit}`
|
|
|
},
|
|
|
[`${componentCls}-inner-content`]: {
|
|
|
padding: `${paddingSM}px ${popoverPaddingHorizontal}px`
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__.Z = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)('Popover', token => {
|
|
|
const {
|
|
|
colorBgElevated,
|
|
|
colorText,
|
|
|
wireframe
|
|
|
} = token;
|
|
|
const popoverToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__/* .merge */ .TS)(token, {
|
|
|
popoverPadding: 12,
|
|
|
popoverBg: colorBgElevated,
|
|
|
popoverColor: colorText
|
|
|
});
|
|
|
return [genBaseStyle(popoverToken), genColorStyle(popoverToken), wireframe && genWireframeStyle(popoverToken), (0,_style_motion__WEBPACK_IMPORTED_MODULE_5__/* .initZoomMotion */ ._y)(popoverToken, 'zoom-big')];
|
|
|
}, token => ({
|
|
|
width: 177,
|
|
|
minWidth: 177,
|
|
|
zIndexPopup: token.zIndexPopupBase + 30
|
|
|
}), {
|
|
|
resetStyle: false,
|
|
|
deprecatedTokens: [['width', 'minWidth']]
|
|
|
}));
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |