|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[48077],{
|
|
|
|
|
|
/***/ 49495:
|
|
|
/*!***********************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons-svg/es/asn/DownloadOutlined.js ***!
|
|
|
\***********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
|
|
// This icon file is generated automatically.
|
|
|
var DownloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, "name": "download", "theme": "outlined" };
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = (DownloadOutlined);
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 92287:
|
|
|
/*!*****************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons-svg/es/asn/UpOutlined.js ***!
|
|
|
\*****************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
|
|
// 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 */ __webpack_exports__["Z"] = (UpOutlined);
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 7918:
|
|
|
/*!******************************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules ***!
|
|
|
\******************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ AntdIcon; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(1413);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
|
var slicedToArray = __webpack_require__(97685);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
|
var defineProperty = __webpack_require__(4942);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
|
var objectWithoutProperties = __webpack_require__(45987);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/components/Context.js
|
|
|
|
|
|
var IconContext = /*#__PURE__*/(0,react.createContext)({});
|
|
|
/* harmony default export */ var Context = (IconContext);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
|
var esm_typeof = __webpack_require__(71002);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ctrl/tinycolor/dist/module/conversion.js
|
|
|
var conversion = __webpack_require__(86500);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ctrl/tinycolor/dist/module/format-input.js
|
|
|
var format_input = __webpack_require__(1350);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/node_modules/@ant-design/colors/es/generate.js
|
|
|
|
|
|
var hueStep = 2; // 色相阶梯
|
|
|
|
|
|
var saturationStep = 0.16; // 饱和度阶梯,浅色部分
|
|
|
|
|
|
var saturationStep2 = 0.05; // 饱和度阶梯,深色部分
|
|
|
|
|
|
var brightnessStep1 = 0.05; // 亮度阶梯,浅色部分
|
|
|
|
|
|
var brightnessStep2 = 0.15; // 亮度阶梯,深色部分
|
|
|
|
|
|
var lightColorCount = 5; // 浅色数量,主色上
|
|
|
|
|
|
var darkColorCount = 4; // 深色数量,主色下
|
|
|
// 暗色主题颜色映射关系表
|
|
|
|
|
|
var darkColorMap = [{
|
|
|
index: 7,
|
|
|
opacity: 0.15
|
|
|
}, {
|
|
|
index: 6,
|
|
|
opacity: 0.25
|
|
|
}, {
|
|
|
index: 5,
|
|
|
opacity: 0.3
|
|
|
}, {
|
|
|
index: 5,
|
|
|
opacity: 0.45
|
|
|
}, {
|
|
|
index: 5,
|
|
|
opacity: 0.65
|
|
|
}, {
|
|
|
index: 5,
|
|
|
opacity: 0.85
|
|
|
}, {
|
|
|
index: 4,
|
|
|
opacity: 0.9
|
|
|
}, {
|
|
|
index: 3,
|
|
|
opacity: 0.95
|
|
|
}, {
|
|
|
index: 2,
|
|
|
opacity: 0.97
|
|
|
}, {
|
|
|
index: 1,
|
|
|
opacity: 0.98
|
|
|
}];
|
|
|
|
|
|
// Wrapper function ported from TinyColor.prototype.toHsv
|
|
|
// Keep it here because of `hsv.h * 360`
|
|
|
function toHsv(_ref) {
|
|
|
var r = _ref.r,
|
|
|
g = _ref.g,
|
|
|
b = _ref.b;
|
|
|
var hsv = (0,conversion/* rgbToHsv */.py)(r, g, b);
|
|
|
return {
|
|
|
h: hsv.h * 360,
|
|
|
s: hsv.s,
|
|
|
v: hsv.v
|
|
|
};
|
|
|
} // Wrapper function ported from TinyColor.prototype.toHexString
|
|
|
// Keep it here because of the prefix `#`
|
|
|
|
|
|
|
|
|
function toHex(_ref2) {
|
|
|
var r = _ref2.r,
|
|
|
g = _ref2.g,
|
|
|
b = _ref2.b;
|
|
|
return "#".concat((0,conversion/* rgbToHex */.vq)(r, g, b, false));
|
|
|
} // Wrapper function ported from TinyColor.prototype.mix, not treeshakable.
|
|
|
// Amount in range [0, 1]
|
|
|
// Assume color1 & color2 has no alpha, since the following src code did so.
|
|
|
|
|
|
|
|
|
function mix(rgb1, rgb2, amount) {
|
|
|
var p = amount / 100;
|
|
|
var rgb = {
|
|
|
r: (rgb2.r - rgb1.r) * p + rgb1.r,
|
|
|
g: (rgb2.g - rgb1.g) * p + rgb1.g,
|
|
|
b: (rgb2.b - rgb1.b) * p + rgb1.b
|
|
|
};
|
|
|
return rgb;
|
|
|
}
|
|
|
|
|
|
function getHue(hsv, i, light) {
|
|
|
var hue; // 根据色相不同,色相转向不同
|
|
|
|
|
|
if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
|
|
|
hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
|
|
|
} else {
|
|
|
hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
|
|
|
}
|
|
|
|
|
|
if (hue < 0) {
|
|
|
hue += 360;
|
|
|
} else if (hue >= 360) {
|
|
|
hue -= 360;
|
|
|
}
|
|
|
|
|
|
return hue;
|
|
|
}
|
|
|
|
|
|
function getSaturation(hsv, i, light) {
|
|
|
// grey color don't change saturation
|
|
|
if (hsv.h === 0 && hsv.s === 0) {
|
|
|
return hsv.s;
|
|
|
}
|
|
|
|
|
|
var saturation;
|
|
|
|
|
|
if (light) {
|
|
|
saturation = hsv.s - saturationStep * i;
|
|
|
} else if (i === darkColorCount) {
|
|
|
saturation = hsv.s + saturationStep;
|
|
|
} else {
|
|
|
saturation = hsv.s + saturationStep2 * i;
|
|
|
} // 边界值修正
|
|
|
|
|
|
|
|
|
if (saturation > 1) {
|
|
|
saturation = 1;
|
|
|
} // 第一格的 s 限制在 0.06-0.1 之间
|
|
|
|
|
|
|
|
|
if (light && i === lightColorCount && saturation > 0.1) {
|
|
|
saturation = 0.1;
|
|
|
}
|
|
|
|
|
|
if (saturation < 0.06) {
|
|
|
saturation = 0.06;
|
|
|
}
|
|
|
|
|
|
return Number(saturation.toFixed(2));
|
|
|
}
|
|
|
|
|
|
function getValue(hsv, i, light) {
|
|
|
var value;
|
|
|
|
|
|
if (light) {
|
|
|
value = hsv.v + brightnessStep1 * i;
|
|
|
} else {
|
|
|
value = hsv.v - brightnessStep2 * i;
|
|
|
}
|
|
|
|
|
|
if (value > 1) {
|
|
|
value = 1;
|
|
|
}
|
|
|
|
|
|
return Number(value.toFixed(2));
|
|
|
}
|
|
|
|
|
|
function generate(color) {
|
|
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
|
var patterns = [];
|
|
|
var pColor = (0,format_input/* inputToRGB */.uA)(color);
|
|
|
|
|
|
for (var i = lightColorCount; i > 0; i -= 1) {
|
|
|
var hsv = toHsv(pColor);
|
|
|
var colorString = toHex((0,format_input/* inputToRGB */.uA)({
|
|
|
h: getHue(hsv, i, true),
|
|
|
s: getSaturation(hsv, i, true),
|
|
|
v: getValue(hsv, i, true)
|
|
|
}));
|
|
|
patterns.push(colorString);
|
|
|
}
|
|
|
|
|
|
patterns.push(toHex(pColor));
|
|
|
|
|
|
for (var _i = 1; _i <= darkColorCount; _i += 1) {
|
|
|
var _hsv = toHsv(pColor);
|
|
|
|
|
|
var _colorString = toHex((0,format_input/* inputToRGB */.uA)({
|
|
|
h: getHue(_hsv, _i),
|
|
|
s: getSaturation(_hsv, _i),
|
|
|
v: getValue(_hsv, _i)
|
|
|
}));
|
|
|
|
|
|
patterns.push(_colorString);
|
|
|
} // dark theme patterns
|
|
|
|
|
|
|
|
|
if (opts.theme === 'dark') {
|
|
|
return darkColorMap.map(function (_ref3) {
|
|
|
var index = _ref3.index,
|
|
|
opacity = _ref3.opacity;
|
|
|
var darkColorString = toHex(mix((0,format_input/* inputToRGB */.uA)(opts.backgroundColor || '#141414'), (0,format_input/* inputToRGB */.uA)(patterns[index]), opacity * 100));
|
|
|
return darkColorString;
|
|
|
});
|
|
|
}
|
|
|
|
|
|
return patterns;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/node_modules/@ant-design/colors/es/index.js
|
|
|
|
|
|
var presetPrimaryColors = {
|
|
|
red: '#F5222D',
|
|
|
volcano: '#FA541C',
|
|
|
orange: '#FA8C16',
|
|
|
gold: '#FAAD14',
|
|
|
yellow: '#FADB14',
|
|
|
lime: '#A0D911',
|
|
|
green: '#52C41A',
|
|
|
cyan: '#13C2C2',
|
|
|
blue: '#1677FF',
|
|
|
geekblue: '#2F54EB',
|
|
|
purple: '#722ED1',
|
|
|
magenta: '#EB2F96',
|
|
|
grey: '#666666'
|
|
|
};
|
|
|
var presetPalettes = {};
|
|
|
var presetDarkPalettes = {};
|
|
|
Object.keys(presetPrimaryColors).forEach(function (key) {
|
|
|
presetPalettes[key] = generate(presetPrimaryColors[key]);
|
|
|
presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes
|
|
|
|
|
|
presetDarkPalettes[key] = generate(presetPrimaryColors[key], {
|
|
|
theme: 'dark',
|
|
|
backgroundColor: '#141414'
|
|
|
});
|
|
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
|
});
|
|
|
var red = presetPalettes.red;
|
|
|
var volcano = presetPalettes.volcano;
|
|
|
var gold = presetPalettes.gold;
|
|
|
var orange = presetPalettes.orange;
|
|
|
var yellow = presetPalettes.yellow;
|
|
|
var lime = presetPalettes.lime;
|
|
|
var green = presetPalettes.green;
|
|
|
var cyan = presetPalettes.cyan;
|
|
|
var blue = presetPalettes.blue;
|
|
|
var geekblue = presetPalettes.geekblue;
|
|
|
var purple = presetPalettes.purple;
|
|
|
var magenta = presetPalettes.magenta;
|
|
|
var grey = presetPalettes.grey;
|
|
|
var gray = presetPalettes.grey;
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
|
|
|
var warning = __webpack_require__(80334);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/dynamicCSS.js
|
|
|
var dynamicCSS = __webpack_require__(44958);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/utils.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function utils_warning(valid, message) {
|
|
|
(0,warning/* default */.ZP)(valid, "[@ant-design/icons] ".concat(message));
|
|
|
}
|
|
|
function isIconDefinition(target) {
|
|
|
return (0,esm_typeof/* default */.Z)(target) === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && ((0,esm_typeof/* default */.Z)(target.icon) === 'object' || typeof target.icon === 'function');
|
|
|
}
|
|
|
function normalizeAttrs() {
|
|
|
var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
|
return Object.keys(attrs).reduce(function (acc, key) {
|
|
|
var val = attrs[key];
|
|
|
switch (key) {
|
|
|
case 'class':
|
|
|
acc.className = val;
|
|
|
delete acc.class;
|
|
|
break;
|
|
|
default:
|
|
|
acc[key] = val;
|
|
|
}
|
|
|
return acc;
|
|
|
}, {});
|
|
|
}
|
|
|
function utils_generate(node, key, rootProps) {
|
|
|
if (!rootProps) {
|
|
|
return /*#__PURE__*/react.createElement(node.tag, (0,objectSpread2/* default */.Z)({
|
|
|
key: key
|
|
|
}, normalizeAttrs(node.attrs)), (node.children || []).map(function (child, index) {
|
|
|
return utils_generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
|
|
|
}));
|
|
|
}
|
|
|
return /*#__PURE__*/react.createElement(node.tag, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({
|
|
|
key: key
|
|
|
}, normalizeAttrs(node.attrs)), rootProps), (node.children || []).map(function (child, index) {
|
|
|
return utils_generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
|
|
|
}));
|
|
|
}
|
|
|
function getSecondaryColor(primaryColor) {
|
|
|
// choose the second color
|
|
|
return generate(primaryColor)[0];
|
|
|
}
|
|
|
function normalizeTwoToneColors(twoToneColor) {
|
|
|
if (!twoToneColor) {
|
|
|
return [];
|
|
|
}
|
|
|
return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
|
|
|
}
|
|
|
// These props make sure that the SVG behaviours like general text.
|
|
|
// Reference: https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
|
|
|
var svgBaseProps = {
|
|
|
width: '1em',
|
|
|
height: '1em',
|
|
|
fill: 'currentColor',
|
|
|
'aria-hidden': 'true',
|
|
|
focusable: 'false'
|
|
|
};
|
|
|
var iconStyles = "\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
|
|
|
var useInsertStyles = function useInsertStyles() {
|
|
|
var styleStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : iconStyles;
|
|
|
var _useContext = (0,react.useContext)(Context),
|
|
|
csp = _useContext.csp,
|
|
|
prefixCls = _useContext.prefixCls;
|
|
|
var mergedStyleStr = styleStr;
|
|
|
if (prefixCls) {
|
|
|
mergedStyleStr = mergedStyleStr.replace(/anticon/g, prefixCls);
|
|
|
}
|
|
|
(0,react.useEffect)(function () {
|
|
|
(0,dynamicCSS/* updateCSS */.hq)(mergedStyleStr, '@ant-design-icons', {
|
|
|
prepend: true,
|
|
|
csp: csp
|
|
|
});
|
|
|
}, []);
|
|
|
};
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/components/IconBase.js
|
|
|
|
|
|
|
|
|
var _excluded = ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"];
|
|
|
|
|
|
var twoToneColorPalette = {
|
|
|
primaryColor: '#333',
|
|
|
secondaryColor: '#E6E6E6',
|
|
|
calculated: false
|
|
|
};
|
|
|
function setTwoToneColors(_ref) {
|
|
|
var primaryColor = _ref.primaryColor,
|
|
|
secondaryColor = _ref.secondaryColor;
|
|
|
twoToneColorPalette.primaryColor = primaryColor;
|
|
|
twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
|
|
|
twoToneColorPalette.calculated = !!secondaryColor;
|
|
|
}
|
|
|
function getTwoToneColors() {
|
|
|
return (0,objectSpread2/* default */.Z)({}, twoToneColorPalette);
|
|
|
}
|
|
|
var IconBase = function IconBase(props) {
|
|
|
var icon = props.icon,
|
|
|
className = props.className,
|
|
|
onClick = props.onClick,
|
|
|
style = props.style,
|
|
|
primaryColor = props.primaryColor,
|
|
|
secondaryColor = props.secondaryColor,
|
|
|
restProps = (0,objectWithoutProperties/* default */.Z)(props, _excluded);
|
|
|
var colors = twoToneColorPalette;
|
|
|
if (primaryColor) {
|
|
|
colors = {
|
|
|
primaryColor: primaryColor,
|
|
|
secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
|
|
|
};
|
|
|
}
|
|
|
useInsertStyles();
|
|
|
utils_warning(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
|
|
|
if (!isIconDefinition(icon)) {
|
|
|
return null;
|
|
|
}
|
|
|
var target = icon;
|
|
|
if (target && typeof target.icon === 'function') {
|
|
|
target = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, target), {}, {
|
|
|
icon: target.icon(colors.primaryColor, colors.secondaryColor)
|
|
|
});
|
|
|
}
|
|
|
return utils_generate(target.icon, "svg-".concat(target.name), (0,objectSpread2/* default */.Z)({
|
|
|
className: className,
|
|
|
onClick: onClick,
|
|
|
style: style,
|
|
|
'data-icon': target.name,
|
|
|
width: '1em',
|
|
|
height: '1em',
|
|
|
fill: 'currentColor',
|
|
|
'aria-hidden': 'true'
|
|
|
}, restProps));
|
|
|
};
|
|
|
IconBase.displayName = 'IconReact';
|
|
|
IconBase.getTwoToneColors = getTwoToneColors;
|
|
|
IconBase.setTwoToneColors = setTwoToneColors;
|
|
|
/* harmony default export */ var components_IconBase = (IconBase);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js
|
|
|
|
|
|
|
|
|
|
|
|
function setTwoToneColor(twoToneColor) {
|
|
|
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
|
|
|
_normalizeTwoToneColo2 = (0,slicedToArray/* default */.Z)(_normalizeTwoToneColo, 2),
|
|
|
primaryColor = _normalizeTwoToneColo2[0],
|
|
|
secondaryColor = _normalizeTwoToneColo2[1];
|
|
|
return components_IconBase.setTwoToneColors({
|
|
|
primaryColor: primaryColor,
|
|
|
secondaryColor: secondaryColor
|
|
|
});
|
|
|
}
|
|
|
function getTwoToneColor() {
|
|
|
var colors = components_IconBase.getTwoToneColors();
|
|
|
if (!colors.calculated) {
|
|
|
return colors.primaryColor;
|
|
|
}
|
|
|
return [colors.primaryColor, colors.secondaryColor];
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var AntdIcon_excluded = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Initial setting
|
|
|
// should move it to antd main repo?
|
|
|
setTwoToneColor('#1890ff');
|
|
|
var Icon = /*#__PURE__*/react.forwardRef(function (props, ref) {
|
|
|
var _classNames;
|
|
|
var className = props.className,
|
|
|
icon = props.icon,
|
|
|
spin = props.spin,
|
|
|
rotate = props.rotate,
|
|
|
tabIndex = props.tabIndex,
|
|
|
onClick = props.onClick,
|
|
|
twoToneColor = props.twoToneColor,
|
|
|
restProps = (0,objectWithoutProperties/* default */.Z)(props, AntdIcon_excluded);
|
|
|
var _React$useContext = react.useContext(Context),
|
|
|
_React$useContext$pre = _React$useContext.prefixCls,
|
|
|
prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre,
|
|
|
rootClassName = _React$useContext.rootClassName;
|
|
|
var classString = classnames_default()(rootClassName, prefixCls, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-").concat(icon.name), !!icon.name), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-spin"), !!spin || icon.name === 'loading'), _classNames), className);
|
|
|
var iconTabIndex = tabIndex;
|
|
|
if (iconTabIndex === undefined && onClick) {
|
|
|
iconTabIndex = -1;
|
|
|
}
|
|
|
var svgStyle = rotate ? {
|
|
|
msTransform: "rotate(".concat(rotate, "deg)"),
|
|
|
transform: "rotate(".concat(rotate, "deg)")
|
|
|
} : undefined;
|
|
|
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
|
|
|
_normalizeTwoToneColo2 = (0,slicedToArray/* default */.Z)(_normalizeTwoToneColo, 2),
|
|
|
primaryColor = _normalizeTwoToneColo2[0],
|
|
|
secondaryColor = _normalizeTwoToneColo2[1];
|
|
|
return /*#__PURE__*/react.createElement("span", (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({
|
|
|
role: "img",
|
|
|
"aria-label": icon.name
|
|
|
}, restProps), {}, {
|
|
|
ref: ref,
|
|
|
tabIndex: iconTabIndex,
|
|
|
onClick: onClick,
|
|
|
className: classString
|
|
|
}), /*#__PURE__*/react.createElement(components_IconBase, {
|
|
|
icon: icon,
|
|
|
primaryColor: primaryColor,
|
|
|
secondaryColor: secondaryColor,
|
|
|
style: svgStyle
|
|
|
}));
|
|
|
});
|
|
|
Icon.displayName = 'AntdIcon';
|
|
|
Icon.getTwoToneColor = getTwoToneColor;
|
|
|
Icon.setTwoToneColor = setTwoToneColor;
|
|
|
/* harmony default export */ var AntdIcon = (Icon);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 28508:
|
|
|
/*!******************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js ***!
|
|
|
\******************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
|
|
|
/* harmony import */ var _ant_design_icons_svg_es_asn_CloseOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/CloseOutlined */ 89503);
|
|
|
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918);
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
var CloseOutlined = function CloseOutlined(props, ref) {
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
|
|
|
ref: ref,
|
|
|
icon: _ant_design_icons_svg_es_asn_CloseOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
|
|
|
}));
|
|
|
};
|
|
|
CloseOutlined.displayName = 'CloseOutlined';
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(CloseOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 69753:
|
|
|
/*!*********************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons/es/icons/DownloadOutlined.js ***!
|
|
|
\*********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
|
|
|
/* harmony import */ var _ant_design_icons_svg_es_asn_DownloadOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/DownloadOutlined */ 49495);
|
|
|
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918);
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
var DownloadOutlined = function DownloadOutlined(props, ref) {
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
|
|
|
ref: ref,
|
|
|
icon: _ant_design_icons_svg_es_asn_DownloadOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
|
|
|
}));
|
|
|
};
|
|
|
DownloadOutlined.displayName = 'DownloadOutlined';
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(DownloadOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 33160:
|
|
|
/*!*******************************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons/es/icons/ReloadOutlined.js + 1 modules ***!
|
|
|
\*******************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ icons_ReloadOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(1413);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/ReloadOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var ReloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z" } }] }, "name": "reload", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_ReloadOutlined = (ReloadOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules
|
|
|
var AntdIcon = __webpack_require__(7918);
|
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/ReloadOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
var ReloadOutlined_ReloadOutlined = function ReloadOutlined(props, ref) {
|
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, {
|
|
|
ref: ref,
|
|
|
icon: asn_ReloadOutlined
|
|
|
}));
|
|
|
};
|
|
|
ReloadOutlined_ReloadOutlined.displayName = 'ReloadOutlined';
|
|
|
/* harmony default export */ var icons_ReloadOutlined = (/*#__PURE__*/react.forwardRef(ReloadOutlined_ReloadOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 64029:
|
|
|
/*!***************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons/es/icons/UpOutlined.js ***!
|
|
|
\***************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
|
|
|
/* harmony import */ var _ant_design_icons_svg_es_asn_UpOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/UpOutlined */ 92287);
|
|
|
/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918);
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
var UpOutlined = function UpOutlined(props, ref) {
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, {
|
|
|
ref: ref,
|
|
|
icon: _ant_design_icons_svg_es_asn_UpOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z
|
|
|
}));
|
|
|
};
|
|
|
UpOutlined.displayName = 'UpOutlined';
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(UpOutlined));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 63065:
|
|
|
/*!*************************************************************!*\
|
|
|
!*** ./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/antd/es/dropdown/style/index.js + 1 modules
|
|
|
var style = __webpack_require__(68018);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/index.js
|
|
|
var dropdown = __webpack_require__(13013);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/empty/style/index.js + 1 modules
|
|
|
var empty_style = __webpack_require__(81151);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/empty/index.js + 2 modules
|
|
|
var empty = __webpack_require__(62986);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js + 1 modules
|
|
|
var input_style = __webpack_require__(69463);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(75008);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(27424);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
;// 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"});
|
|
|
;// 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/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
|
;// 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.useState)(0),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
start = _useState2[0],
|
|
|
setStart = _useState2[1];
|
|
|
var _useState3 = (0,react.useState)(0),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
count = _useState4[0],
|
|
|
setCount = _useState4[1];
|
|
|
var scrollRef = (0,react.useRef)(null);
|
|
|
var contentRef = (0,react.useRef)(null);
|
|
|
var totalHeight = (0,react.useMemo)(function () {
|
|
|
return itemHeight * list.length;
|
|
|
}, [list.length]);
|
|
|
(0,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.Fragment, {
|
|
|
children: list === null || list === void 0 ? void 0 : list.map(function (item, i) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(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.Fragment, {
|
|
|
children: mapList(item)
|
|
|
}, i);
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var components_VirtualList = (VirtualList);
|
|
|
;// 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.useState)(''),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
value = _useState2[0],
|
|
|
setValue = _useState2[1];
|
|
|
var _useState3 = (0,react.useState)([]),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
list = _useState4[0],
|
|
|
setList = _useState4[1];
|
|
|
var _useState5 = (0,react.useState)(false),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
visible = _useState6[0],
|
|
|
setVisible = _useState6[1];
|
|
|
var inputRef = (0,react.useRef)(null);
|
|
|
var isFocus = (0,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.PRESENTED_IMAGE_SIMPLE */.Z.PRESENTED_IMAGE_SIMPLE
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
onMouseLeave: function onMouseLeave() {
|
|
|
if (!isFocus.current) {
|
|
|
setVisible(false);
|
|
|
}
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z, {
|
|
|
open: visible,
|
|
|
dropdownRender: submenu,
|
|
|
destroyPopupOnHide: true,
|
|
|
placement: reversal ? 'topLeft' : 'bottomLeft',
|
|
|
getPopupContainer: function getPopupContainer(trigger) {
|
|
|
return isParentNode ? trigger.parentNode : document.body;
|
|
|
},
|
|
|
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);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 66663:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./src/components/ManageHead/index.tsx + 1 modules ***!
|
|
|
\*********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ components_ManageHead; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
|
|
|
var _umi_production_exports = __webpack_require__(89214);
|
|
|
;// CONCATENATED MODULE: ./src/components/ManageHead/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var ManageHeadmodules = ({"ManageHead":"ManageHead___OlGnQ","tabs":"tabs____UQeJ","title":"title___VM9am","active":"active___XkbXs"});
|
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
|
var authority = __webpack_require__(7);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
|
;// CONCATENATED MODULE: ./src/components/ManageHead/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ManageHead = function ManageHead(_ref) {
|
|
|
var children = _ref.children,
|
|
|
active = _ref.active;
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: ManageHeadmodules.ManageHead,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: ManageHeadmodules.tabs,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
onClick: function onClick() {
|
|
|
return _umi_production_exports.history.push("/classrooms/".concat(params.coursesId, "/teachers"));
|
|
|
},
|
|
|
className: "".concat(ManageHeadmodules.title, " ").concat(active === 1 ? ManageHeadmodules.active : ''),
|
|
|
children: "\u6559\u5E08\u5217\u8868"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
onClick: function onClick() {
|
|
|
return _umi_production_exports.history.push("/classrooms/".concat(params.coursesId, "/students"));
|
|
|
},
|
|
|
className: "".concat(ManageHeadmodules.title, " ").concat(active === 2 ? ManageHeadmodules.active : ''),
|
|
|
children: "\u5B66\u751F\u5217\u8868"
|
|
|
}), (0,authority/* isAdminOrCreatorOrOperation */.Rb)() ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
onClick: function onClick() {
|
|
|
return _umi_production_exports.history.push("/classrooms/".concat(params.coursesId, "/assistant"));
|
|
|
},
|
|
|
className: "".concat(ManageHeadmodules.title, " ").concat(active === 3 ? ManageHeadmodules.active : ''),
|
|
|
children: "\u52A9\u6559\u6743\u9650"
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: children
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var components_ManageHead = (ManageHead);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 82982:
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./src/components/NoData/index.tsx ***!
|
|
|
\*****************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var antd_es_button_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/button/style */ 29913);
|
|
|
/* harmony import */ var antd_es_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/es/button */ 71577);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ 42122);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 67294);
|
|
|
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 4977);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var noData = function noData(_ref) {
|
|
|
var _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;
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("section", {
|
|
|
className: "tc animated fadeIn",
|
|
|
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, {
|
|
|
color: '#999',
|
|
|
margin: '200px auto'
|
|
|
}), styles),
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", {
|
|
|
src: _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_3__
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
|
|
|
className: "mt20 font14",
|
|
|
children: customText || '暂时还没有相关数据哦!'
|
|
|
}), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(antd_es_button__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
|
className: Buttonclass,
|
|
|
onClick: ButtonClick
|
|
|
}, buttonProps), {}, {
|
|
|
children: ButtonText
|
|
|
})), ButtonTwo && ButtonTwo]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = (noData);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 75490:
|
|
|
/*!************************************************************!*\
|
|
|
!*** ./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/antd/es/button/style/index.js + 1 modules
|
|
|
var style = __webpack_require__(29913);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(71577);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(27424);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
;// CONCATENATED MODULE: ./src/components/image-preview/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/mediator.js
|
|
|
var mediator = __webpack_require__(91562);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ReloadOutlined.js + 1 modules
|
|
|
var ReloadOutlined = __webpack_require__(33160);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/DownloadOutlined.js
|
|
|
var DownloadOutlined = __webpack_require__(69753);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CloseOutlined.js
|
|
|
var CloseOutlined = __webpack_require__(28508);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
|
;// CONCATENATED MODULE: ./src/components/image-preview/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var image_preview = (function () {
|
|
|
var _useState = (0,react.useState)(''),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
url = _useState2[0],
|
|
|
setUrl = _useState2[1];
|
|
|
var _useState3 = (0,react.useState)(0),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
deg = _useState4[0],
|
|
|
setDeg = _useState4[1];
|
|
|
var saveUrl = (0,react.useRef)('');
|
|
|
(0,react.useEffect)(function () {
|
|
|
var unSub = mediator/* default.subscribe */.Z.subscribe('preview-image', function (value) {
|
|
|
setUrl(value);
|
|
|
// window.document.body
|
|
|
// document.body.style.height='100%'
|
|
|
document.body.style.overflow = 'hidden';
|
|
|
});
|
|
|
return unSub;
|
|
|
}, []);
|
|
|
(0,react.useEffect)(function () {
|
|
|
document.addEventListener('keydown', onViewEscClose);
|
|
|
return function () {
|
|
|
document.removeEventListener('keydown', onViewEscClose);
|
|
|
};
|
|
|
}, []);
|
|
|
(0,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';
|
|
|
setUrl('');
|
|
|
}
|
|
|
function onRotate() {
|
|
|
setDeg(deg + 90);
|
|
|
}
|
|
|
var maskRef = (0,react.useRef)();
|
|
|
var previewWrapperRef = (0,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.Fragment, {
|
|
|
children: !url ? null : /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "image-preview-container",
|
|
|
ref: maskRef,
|
|
|
onClick: handleMaskClick,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "button-group",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
|
|
|
onClick: onRotate,
|
|
|
children: ["\u65CB\u8F6C", /*#__PURE__*/(0,jsx_runtime.jsx)(ReloadOutlined/* default */.Z, {})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
|
|
|
href: url,
|
|
|
children: ["\u4E0B\u8F7D", /*#__PURE__*/(0,jsx_runtime.jsx)(DownloadOutlined/* default */.Z, {})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
|
|
|
onClick: onClose,
|
|
|
children: ["\u5173\u95ED", /*#__PURE__*/(0,jsx_runtime.jsx)(CloseOutlined/* default */.Z, {})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "preview-wrp-group",
|
|
|
ref: previewWrapperRef,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
className: "image-preview",
|
|
|
src: url,
|
|
|
alt: "\u9884\u89C8\u5927\u56FE",
|
|
|
style: {
|
|
|
transform: "rotate(".concat(deg, "deg)")
|
|
|
}
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 54148:
|
|
|
/*!*******************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Students/index.tsx + 5 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/antd/es/menu/style/index.js + 1 modules
|
|
|
var style = __webpack_require__(83736);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/menu/index.js + 5 modules
|
|
|
var es_menu = __webpack_require__(66516);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(42122);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(27424);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
|
|
|
var _umi_production_exports = __webpack_require__(89214);
|
|
|
// EXTERNAL MODULE: ./src/utils/export.ts
|
|
|
var utils_export = __webpack_require__(12034);
|
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
|
var authority = __webpack_require__(7);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/style/index.js
|
|
|
var row_style = __webpack_require__(13062);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
|
|
|
var row = __webpack_require__(71230);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
|
|
|
var button_style = __webpack_require__(29913);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(71577);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js + 1 modules
|
|
|
var input_style = __webpack_require__(69463);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(75008);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/select/style/index.js + 1 modules
|
|
|
var select_style = __webpack_require__(95985);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/select/index.js
|
|
|
var es_select = __webpack_require__(34041);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/style/index.js
|
|
|
var col_style = __webpack_require__(89032);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/index.js
|
|
|
var col = __webpack_require__(15746);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/tabs/style/index.js + 1 modules
|
|
|
var tabs_style = __webpack_require__(99558);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/tabs/index.js + 22 modules
|
|
|
var tabs = __webpack_require__(3381);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(17061);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(17156);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./src/service/teacher.ts
|
|
|
var teacher = __webpack_require__(65130);
|
|
|
;// 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/antd/es/affix/style/index.js + 1 modules
|
|
|
var affix_style = __webpack_require__(48283);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/affix/index.js + 1 modules
|
|
|
var affix = __webpack_require__(15771);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/pagination/style/index.js + 1 modules
|
|
|
var pagination_style = __webpack_require__(14182);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/pagination/index.js + 10 modules
|
|
|
var pagination = __webpack_require__(260);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js + 1 modules
|
|
|
var message_style = __webpack_require__(14934);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules
|
|
|
var message = __webpack_require__(12461);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/table/style/index.js + 1 modules
|
|
|
var table_style = __webpack_require__(71854);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/table/index.js + 58 modules
|
|
|
var table = __webpack_require__(67250);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/style/index.js + 1 modules
|
|
|
var modal_style = __webpack_require__(35611);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 7 modules
|
|
|
var modal = __webpack_require__(85402);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/style/index.js + 1 modules
|
|
|
var checkbox_style = __webpack_require__(82000);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/index.js + 2 modules
|
|
|
var es_checkbox = __webpack_require__(32808);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
|
|
|
var toConsumableArray = __webpack_require__(861);
|
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
|
var NoData = __webpack_require__(82982);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Students/components/Approved/ApplicantTable.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ApproveType;
|
|
|
(function (ApproveType) {
|
|
|
ApproveType[ApproveType["approve"] = 1] = "approve";
|
|
|
ApproveType[ApproveType["reject"] = 2] = "reject";
|
|
|
})(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.confirm */.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.success */.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.confirm */.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.success */.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.confirm */.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.success */.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 ? 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 ? 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 */.Z, {
|
|
|
danger: true,
|
|
|
className: Studentsmodules.rejectBtn,
|
|
|
onClick: function onClick() {
|
|
|
handleApplicationReview(selectedKey, ApproveType.reject);
|
|
|
},
|
|
|
children: "\u62D2\u7EDD"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
|
|
|
type: "primary",
|
|
|
className: Studentsmodules.approveBtn,
|
|
|
onClick: function onClick() {
|
|
|
handleApplicationReview(selectedKey, ApproveType.approve);
|
|
|
},
|
|
|
children: "\u540C\u610F"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
|
|
|
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/es/popconfirm/style/index.js + 1 modules
|
|
|
var popconfirm_style = __webpack_require__(33219);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/popconfirm/index.js + 1 modules
|
|
|
var popconfirm = __webpack_require__(65360);
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
var fetch = __webpack_require__(84519);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/UpOutlined.js
|
|
|
var UpOutlined = __webpack_require__(64029);
|
|
|
// EXTERNAL MODULE: ./src/components/image-preview/index.tsx + 1 modules
|
|
|
var image_preview = __webpack_require__(75490);
|
|
|
// EXTERNAL MODULE: ./src/components/DropdownSearch/index.tsx + 3 modules
|
|
|
var DropdownSearch = __webpack_require__(63065);
|
|
|
// EXTERNAL MODULE: ./src/components/mediator.js
|
|
|
var mediator = __webpack_require__(91562);
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(59758);
|
|
|
;// 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.useState)([]),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
checkedArrs = _useState2[0],
|
|
|
setCheckedArrs = _useState2[1];
|
|
|
var _useState3 = (0,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.info */.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.success */.ZP.success('操作成功');
|
|
|
if (selectedKey.length >= (studentsList === null || studentsList === void 0 ? void 0 : (_studentsList$student = studentsList.students) === null || _studentsList$student === void 0 ? void 0 : _studentsList$student.length) || (studentsList === null || studentsList === void 0 ? 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.API_SERVER */.Z.API_SERVER + text,
|
|
|
onClick: function onClick() {
|
|
|
mediator/* default.publish */.Z.publish('preview-image', env/* default.API_SERVER */.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.success */.ZP.success('修改成功');
|
|
|
if (1 >= (studentsList === null || studentsList === void 0 ? 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.Group */.Z.Group, {
|
|
|
value: checkedArrs,
|
|
|
defaultValue: record.member_roles,
|
|
|
children: [(record === null || record === void 0 ? 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.confirm */.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.success */.ZP.success('删除成功');
|
|
|
if (1 >= (studentsList === null || studentsList === void 0 ? 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 ? 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 ? 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 */.Z, {
|
|
|
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 */.Z, {
|
|
|
style: {
|
|
|
fontSize: '12px',
|
|
|
color: '#145DFF'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
if ((selectedKey === null || selectedKey === void 0 ? void 0 : selectedKey.length) <= 0) {
|
|
|
message/* default.info */.ZP.info('请选择学生');
|
|
|
return;
|
|
|
}
|
|
|
modal/* default.confirm */.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.success */.ZP.success('删除成功');
|
|
|
if (selectedKey.length >= (studentsList === null || studentsList === void 0 ? 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
|
|
|
}
|
|
|
});
|
|
|
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 */.Z, {
|
|
|
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));
|
|
|
;// CONCATENATED MODULE: ./src/utils/hooks/useCustomRequest.ts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//常见的请求模式,包含loading和改变params。
|
|
|
|
|
|
function useCustomRequest(request, baseParams) {
|
|
|
var _useState = (0,react.useState)(baseParams),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
params = _useState2[0],
|
|
|
setParams = _useState2[1];
|
|
|
var _useState3 = (0,react.useState)(false),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
loading = _useState4[0],
|
|
|
setLoading = _useState4[1];
|
|
|
var _useState5 = (0,react.useState)(),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
data = _useState6[0],
|
|
|
setData = _useState6[1];
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(newParams) {
|
|
|
var reset,
|
|
|
mergedParams,
|
|
|
res,
|
|
|
_args = arguments;
|
|
|
return regeneratorRuntime_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 : objectSpread2_default()(objectSpread2_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];
|
|
|
}
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(29427);
|
|
|
;// 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.useState)(''),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
batch = _useState2[0],
|
|
|
setBatch = _useState2[1];
|
|
|
var _useState3 = (0,react.useState)([]),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
memberSelectedKey = _useState4[0],
|
|
|
setMemberSelectedKey = _useState4[1]; //已审批的选中项
|
|
|
var _useState5 = (0,react.useState)([]),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
applicantSelectedKey = _useState6[0],
|
|
|
setApplicantSelectedKey = _useState6[1]; //申请者的选中项
|
|
|
|
|
|
(0,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 = useCustomRequest(getMemberData, {
|
|
|
page: 1,
|
|
|
limit: 20
|
|
|
}),
|
|
|
_useCustomRequest2 = slicedToArray_default()(_useCustomRequest, 4),
|
|
|
params = _useCustomRequest2[0],
|
|
|
isLoading = _useCustomRequest2[1],
|
|
|
getData = _useCustomRequest2[2],
|
|
|
d = _useCustomRequest2[3];
|
|
|
var _useCustomRequest3 = useCustomRequest(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.useState)(tab),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
activeKey = _useState8[0],
|
|
|
setActiveKey = _useState8[1];
|
|
|
var _useState9 = (0,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.TabPane */.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.TabPane */.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 */.Z, {
|
|
|
size: "large",
|
|
|
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 */.Z.Option, {
|
|
|
value: '全部',
|
|
|
children: "\u5168\u90E8\u5206\u73ED"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select/* default.Option */.Z.Option, {
|
|
|
value: '0',
|
|
|
children: "\u672A\u5206\u73ED"
|
|
|
}), allCourseGroups === null || allCourseGroups === void 0 ? 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 */.Z.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.Search */.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 */.Z, {
|
|
|
style: {
|
|
|
fontSize: '12px'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
if (batch.length > 0) {
|
|
|
resetBatchStatus();
|
|
|
} else {
|
|
|
setBatch(activeKey);
|
|
|
}
|
|
|
},
|
|
|
size: "large",
|
|
|
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__(67644);
|
|
|
// EXTERNAL MODULE: ./src/components/ManageHead/index.tsx + 1 modules
|
|
|
var ManageHead = __webpack_require__(66663);
|
|
|
;// 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.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.Item */.Z.Item, {
|
|
|
children: "\u8BFE\u5802\u4FE1\u606F"
|
|
|
}, 1), /*#__PURE__*/(0,jsx_runtime.jsx)(es_menu/* default.Item */.Z.Item, {
|
|
|
children: "\u6D3B\u8DC3\u5EA6"
|
|
|
}, 2), /*#__PURE__*/(0,jsx_runtime.jsx)(es_menu/* default.Item */.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));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 67644:
|
|
|
/*!************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Teachers/components/ChangeAdmin.tsx ***!
|
|
|
\************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var antd_es_modal_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/modal/style */ 35611);
|
|
|
/* harmony import */ var antd_es_modal__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! antd/es/modal */ 85402);
|
|
|
/* harmony import */ var antd_es_spin_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/spin/style */ 22536);
|
|
|
/* harmony import */ var antd_es_spin__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! antd/es/spin */ 11382);
|
|
|
/* harmony import */ var antd_es_radio_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/radio/style */ 83822);
|
|
|
/* harmony import */ var antd_es_radio__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! antd/es/radio */ 29924);
|
|
|
/* harmony import */ var antd_es_message_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/message/style */ 14934);
|
|
|
/* harmony import */ var antd_es_message__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! antd/es/message */ 12461);
|
|
|
/* harmony import */ var antd_es_form_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/es/form/style */ 75627);
|
|
|
/* harmony import */ var antd_es_form__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! antd/es/form */ 51018);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js */ 17061);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/toConsumableArray.js */ 861);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ 42122);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/asyncToGenerator.js */ 17156);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/slicedToArray.js */ 27424);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react */ 67294);
|
|
|
/* harmony import */ var _service_teacher__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/service/teacher */ 65130);
|
|
|
/* harmony import */ var react_infinite_scroller__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react-infinite-scroller */ 246);
|
|
|
/* harmony import */ var react_infinite_scroller__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react_infinite_scroller__WEBPACK_IMPORTED_MODULE_12__);
|
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! umi */ 89214);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var EditAttendance = function EditAttendance(_ref) {
|
|
|
var teachers = _ref.teachers,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch;
|
|
|
var params = (0,umi__WEBPACK_IMPORTED_MODULE_13__.useParams)();
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_10__.useState)([]),
|
|
|
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9___default()(_useState, 2),
|
|
|
data = _useState2[0],
|
|
|
setData = _useState2[1];
|
|
|
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_10__.useState)(false),
|
|
|
_useState4 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9___default()(_useState3, 2),
|
|
|
isLoading = _useState4[0],
|
|
|
setIsLoading = _useState4[1];
|
|
|
var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_10__.useState)(true),
|
|
|
_useState6 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9___default()(_useState5, 2),
|
|
|
hasMore = _useState6[0],
|
|
|
setHasMore = _useState6[1];
|
|
|
params['id'] = params['coursesId'];
|
|
|
params['course_id'] = params['coursesId'];
|
|
|
params['limit'] = 20;
|
|
|
params['page'] = 1;
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
var _ref2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_5___default()().mark(function _callee() {
|
|
|
var res;
|
|
|
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_5___default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
setIsLoading(true);
|
|
|
_context.next = 3;
|
|
|
return (0,_service_teacher__WEBPACK_IMPORTED_MODULE_11__/* .getList */ .gp)(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7___default()({}, params));
|
|
|
case 3:
|
|
|
res = _context.sent;
|
|
|
if (res !== null && res !== void 0 && res.teacher_list) {
|
|
|
params['page']++;
|
|
|
setData([].concat(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_6___default()(data), _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_6___default()(res.teacher_list)));
|
|
|
if (res.teacher_list.length !== params['limit']) setHasMore(false);
|
|
|
}
|
|
|
setIsLoading(false);
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function getData() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_10__.useEffect)(function () {
|
|
|
if (teachers.actionTabs.key === '更换管理员') {
|
|
|
params['page'] = 1;
|
|
|
setData([]);
|
|
|
getData();
|
|
|
}
|
|
|
}, [teachers.actionTabs.key]);
|
|
|
var _Form$useForm = antd_es_form__WEBPACK_IMPORTED_MODULE_15__/* ["default"].useForm */ .Z.useForm(),
|
|
|
_Form$useForm2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9___default()(_Form$useForm, 1),
|
|
|
form = _Form$useForm2[0];
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)(antd_es_modal__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .Z, {
|
|
|
centered: true,
|
|
|
title: "\u66F4\u6362\u7BA1\u7406\u5458",
|
|
|
open: teachers.actionTabs.key === '更换管理员' ? true : false,
|
|
|
okText: "\u786E\u5B9A",
|
|
|
cancelText: "\u53D6\u6D88",
|
|
|
bodyStyle: {
|
|
|
minHeight: 200
|
|
|
},
|
|
|
onOk: /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_5___default()().mark(function _callee2() {
|
|
|
var formValue, selectValue, res;
|
|
|
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_5___default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
formValue = form.getFieldValue();
|
|
|
if (!formValue.course_member_id) {
|
|
|
_context2.next = 9;
|
|
|
break;
|
|
|
}
|
|
|
selectValue = formValue.course_member_id.split(",");
|
|
|
_context2.next = 5;
|
|
|
return (0,_service_teacher__WEBPACK_IMPORTED_MODULE_11__/* .changeCourseAdmin */ .rM)(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7___default()({}, params), {}, {
|
|
|
user_id: selectValue[1],
|
|
|
course_member_id: selectValue[0]
|
|
|
}));
|
|
|
case 5:
|
|
|
res = _context2.sent;
|
|
|
if (res.status === 0) {
|
|
|
setData([]);
|
|
|
antd_es_message__WEBPACK_IMPORTED_MODULE_17__/* ["default"].success */ .ZP.success('修改成功');
|
|
|
dispatch({
|
|
|
type: 'user/getUserInfo',
|
|
|
payload: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7___default()({}, params)
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'teachers/getList',
|
|
|
payload: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7___default()({}, params)
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'classroomList/getClassroomTopBanner',
|
|
|
payload: {
|
|
|
id: params.coursesId
|
|
|
}
|
|
|
});
|
|
|
dispatch({
|
|
|
type: 'teachers/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
}
|
|
|
_context2.next = 10;
|
|
|
break;
|
|
|
case 9:
|
|
|
antd_es_message__WEBPACK_IMPORTED_MODULE_17__/* ["default"].error */ .ZP.error("请选择管理员");
|
|
|
case 10:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
})),
|
|
|
onCancel: function onCancel() {
|
|
|
setData([]);
|
|
|
dispatch({
|
|
|
type: 'teachers/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsxs)("p", {
|
|
|
className: "tc",
|
|
|
children: ["\u9009\u62E9\u7684\u6210\u5458\u5C06\u4F1A\u6210\u4E3A\u65B0\u7684\u7BA1\u7406\u5458", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("br", {}), "\u60A8\u5C06\u4E0D\u518D\u62E5\u6709\u7BA1\u7406\u5458\u7684\u6743\u9650\uFF0C\u4F46\u60A8\u4ECD\u662F\u6559\u5E08\u56E2\u961F\u7684\u4E00\u5458"]
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(antd_es_form__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z, {
|
|
|
form: form,
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("div", {
|
|
|
style: {
|
|
|
background: "#F4FAFF",
|
|
|
padding: 20
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("div", {
|
|
|
style: {
|
|
|
maxHeight: 200,
|
|
|
overflow: "auto"
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)((react_infinite_scroller__WEBPACK_IMPORTED_MODULE_12___default()), {
|
|
|
initialLoad: false,
|
|
|
pageStart: 0,
|
|
|
loadMore: function loadMore() {
|
|
|
return getData();
|
|
|
},
|
|
|
hasMore: !isLoading && hasMore,
|
|
|
useWindow: false,
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(antd_es_spin__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, {
|
|
|
spinning: isLoading,
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(antd_es_form__WEBPACK_IMPORTED_MODULE_15__/* ["default"].Item */ .Z.Item, {
|
|
|
name: "course_member_id",
|
|
|
style: {
|
|
|
marginBottom: 0
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(antd_es_radio__WEBPACK_IMPORTED_MODULE_19__/* ["default"].Group */ .ZP.Group, {
|
|
|
children: data === null || data === void 0 ? void 0 : data.map(function (item, key) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_14__.jsx)(antd_es_radio__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .ZP, {
|
|
|
value: item.course_member_id + "," + item.user_id,
|
|
|
children: item.name
|
|
|
})
|
|
|
});
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = ((0,umi__WEBPACK_IMPORTED_MODULE_13__.connect)(function (_ref4) {
|
|
|
var teachers = _ref4.teachers,
|
|
|
loading = _ref4.loading;
|
|
|
return {
|
|
|
teachers: teachers,
|
|
|
loading: loading
|
|
|
};
|
|
|
})(EditAttendance));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 81643:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/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 */ });
|
|
|
var getRenderPropValue = function getRenderPropValue(propValue) {
|
|
|
if (!propValue) {
|
|
|
return null;
|
|
|
}
|
|
|
if (typeof propValue === 'function') {
|
|
|
return propValue();
|
|
|
}
|
|
|
return propValue;
|
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 48783:
|
|
|
/*!****************************************************************!*\
|
|
|
!*** ./node_modules/antd/es/_util/throttleByAnimationFrame.js ***!
|
|
|
\****************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ "U": function() { return /* binding */ throttleByAnimationFrameDecorator; },
|
|
|
/* harmony export */ "t": function() { return /* binding */ throttleByAnimationFrame; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ 74902);
|
|
|
/* harmony import */ var rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/raf */ 75164);
|
|
|
|
|
|
|
|
|
function throttleByAnimationFrame(fn) {
|
|
|
var requestId;
|
|
|
var later = function later(args) {
|
|
|
return function () {
|
|
|
requestId = null;
|
|
|
fn.apply(void 0, (0,_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(args));
|
|
|
};
|
|
|
};
|
|
|
var throttled = function throttled() {
|
|
|
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 = function () {
|
|
|
rc_util_es_raf__WEBPACK_IMPORTED_MODULE_0__/* ["default"].cancel */ .Z.cancel(requestId);
|
|
|
requestId = null;
|
|
|
};
|
|
|
return throttled;
|
|
|
}
|
|
|
function throttleByAnimationFrameDecorator() {
|
|
|
return function throttle(target, key, descriptor) {
|
|
|
var fn = descriptor.value;
|
|
|
var definingProperty = false;
|
|
|
return {
|
|
|
configurable: true,
|
|
|
get: function get() {
|
|
|
// In IE11 calling Object.defineProperty has a side-effect of evaluating the
|
|
|
// getter for the property which is being replaced. This causes infinite
|
|
|
// recursion and an "Out of stack space" error.
|
|
|
// eslint-disable-next-line no-prototype-builtins
|
|
|
if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) {
|
|
|
/* istanbul ignore next */
|
|
|
return fn;
|
|
|
}
|
|
|
var boundFn = throttleByAnimationFrame(fn.bind(this));
|
|
|
definingProperty = true;
|
|
|
Object.defineProperty(this, key, {
|
|
|
value: boundFn,
|
|
|
configurable: true,
|
|
|
writable: true
|
|
|
});
|
|
|
definingProperty = false;
|
|
|
return boundFn;
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 15771:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/antd/es/affix/index.js + 1 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/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(87462);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
|
var defineProperty = __webpack_require__(4942);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
|
var classCallCheck = __webpack_require__(15671);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
|
var createClass = __webpack_require__(43144);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
|
|
|
var inherits = __webpack_require__(60136);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
|
|
|
var createSuper = __webpack_require__(51630);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
|
var esm_typeof = __webpack_require__(71002);
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-resize-observer/es/index.js + 4 modules
|
|
|
var es = __webpack_require__(48555);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/omit.js
|
|
|
var omit = __webpack_require__(98423);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(53124);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/throttleByAnimationFrame.js
|
|
|
var throttleByAnimationFrame = __webpack_require__(48783);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/addEventListener.js
|
|
|
var addEventListener = __webpack_require__(64019);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/affix/utils.js
|
|
|
|
|
|
function getTargetRect(target) {
|
|
|
return target !== window ? target.getBoundingClientRect() : {
|
|
|
top: 0,
|
|
|
bottom: window.innerHeight
|
|
|
};
|
|
|
}
|
|
|
function getFixedTop(placeholderReact, targetRect, offsetTop) {
|
|
|
if (offsetTop !== undefined && targetRect.top > placeholderReact.top - offsetTop) {
|
|
|
return offsetTop + targetRect.top;
|
|
|
}
|
|
|
return undefined;
|
|
|
}
|
|
|
function getFixedBottom(placeholderReact, targetRect, offsetBottom) {
|
|
|
if (offsetBottom !== undefined && targetRect.bottom < placeholderReact.bottom + offsetBottom) {
|
|
|
var targetBottomOffset = window.innerHeight - targetRect.bottom;
|
|
|
return offsetBottom + targetBottomOffset;
|
|
|
}
|
|
|
return undefined;
|
|
|
}
|
|
|
// ======================== Observer ========================
|
|
|
var TRIGGER_EVENTS = ['resize', 'scroll', 'touchstart', 'touchmove', 'touchend', 'pageshow', 'load'];
|
|
|
var observerEntities = [];
|
|
|
function getObserverEntities() {
|
|
|
// Only used in test env. Can be removed if refactor.
|
|
|
return observerEntities;
|
|
|
}
|
|
|
function addObserveTarget(target, affix) {
|
|
|
if (!target) {
|
|
|
return;
|
|
|
}
|
|
|
var entity = observerEntities.find(function (item) {
|
|
|
return item.target === target;
|
|
|
});
|
|
|
if (entity) {
|
|
|
entity.affixList.push(affix);
|
|
|
} else {
|
|
|
entity = {
|
|
|
target: target,
|
|
|
affixList: [affix],
|
|
|
eventHandlers: {}
|
|
|
};
|
|
|
observerEntities.push(entity);
|
|
|
// Add listener
|
|
|
TRIGGER_EVENTS.forEach(function (eventName) {
|
|
|
entity.eventHandlers[eventName] = (0,addEventListener/* default */.Z)(target, eventName, function () {
|
|
|
entity.affixList.forEach(function (targetAffix) {
|
|
|
targetAffix.lazyUpdatePosition();
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
function removeObserveTarget(affix) {
|
|
|
var observerEntity = observerEntities.find(function (oriObserverEntity) {
|
|
|
var hasAffix = oriObserverEntity.affixList.some(function (item) {
|
|
|
return item === affix;
|
|
|
});
|
|
|
if (hasAffix) {
|
|
|
oriObserverEntity.affixList = oriObserverEntity.affixList.filter(function (item) {
|
|
|
return item !== affix;
|
|
|
});
|
|
|
}
|
|
|
return hasAffix;
|
|
|
});
|
|
|
if (observerEntity && observerEntity.affixList.length === 0) {
|
|
|
observerEntities = observerEntities.filter(function (item) {
|
|
|
return item !== observerEntity;
|
|
|
});
|
|
|
// Remove listener
|
|
|
TRIGGER_EVENTS.forEach(function (eventName) {
|
|
|
var handler = observerEntity.eventHandlers[eventName];
|
|
|
if (handler && handler.remove) {
|
|
|
handler.remove();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/affix/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
|
var c = arguments.length,
|
|
|
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
|
d;
|
|
|
if ((typeof Reflect === "undefined" ? "undefined" : (0,esm_typeof/* default */.Z)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getDefaultTarget() {
|
|
|
return typeof window !== 'undefined' ? window : null;
|
|
|
}
|
|
|
var AffixStatus;
|
|
|
(function (AffixStatus) {
|
|
|
AffixStatus[AffixStatus["None"] = 0] = "None";
|
|
|
AffixStatus[AffixStatus["Prepare"] = 1] = "Prepare";
|
|
|
})(AffixStatus || (AffixStatus = {}));
|
|
|
var Affix = /*#__PURE__*/function (_React$Component) {
|
|
|
(0,inherits/* default */.Z)(Affix, _React$Component);
|
|
|
var _super = (0,createSuper/* default */.Z)(Affix);
|
|
|
function Affix() {
|
|
|
var _this;
|
|
|
(0,classCallCheck/* default */.Z)(this, Affix);
|
|
|
_this = _super.apply(this, arguments);
|
|
|
_this.state = {
|
|
|
status: AffixStatus.None,
|
|
|
lastAffix: false,
|
|
|
prevTarget: null
|
|
|
};
|
|
|
_this.getOffsetTop = function () {
|
|
|
var _this$props = _this.props,
|
|
|
offsetBottom = _this$props.offsetBottom,
|
|
|
offsetTop = _this$props.offsetTop;
|
|
|
return offsetBottom === undefined && offsetTop === undefined ? 0 : offsetTop;
|
|
|
};
|
|
|
_this.getOffsetBottom = function () {
|
|
|
return _this.props.offsetBottom;
|
|
|
};
|
|
|
_this.savePlaceholderNode = function (node) {
|
|
|
_this.placeholderNode = node;
|
|
|
};
|
|
|
_this.saveFixedNode = function (node) {
|
|
|
_this.fixedNode = node;
|
|
|
};
|
|
|
// =================== Measure ===================
|
|
|
_this.measure = function () {
|
|
|
var _this$state = _this.state,
|
|
|
status = _this$state.status,
|
|
|
lastAffix = _this$state.lastAffix;
|
|
|
var onChange = _this.props.onChange;
|
|
|
var targetFunc = _this.getTargetFunc();
|
|
|
if (status !== AffixStatus.Prepare || !_this.fixedNode || !_this.placeholderNode || !targetFunc) {
|
|
|
return;
|
|
|
}
|
|
|
var offsetTop = _this.getOffsetTop();
|
|
|
var offsetBottom = _this.getOffsetBottom();
|
|
|
var targetNode = targetFunc();
|
|
|
if (!targetNode) {
|
|
|
return;
|
|
|
}
|
|
|
var newState = {
|
|
|
status: AffixStatus.None
|
|
|
};
|
|
|
var targetRect = getTargetRect(targetNode);
|
|
|
var placeholderReact = getTargetRect(_this.placeholderNode);
|
|
|
var fixedTop = getFixedTop(placeholderReact, targetRect, offsetTop);
|
|
|
var fixedBottom = getFixedBottom(placeholderReact, targetRect, offsetBottom);
|
|
|
if (placeholderReact.top === 0 && placeholderReact.left === 0 && placeholderReact.width === 0 && placeholderReact.height === 0) {
|
|
|
return;
|
|
|
}
|
|
|
if (fixedTop !== undefined) {
|
|
|
newState.affixStyle = {
|
|
|
position: 'fixed',
|
|
|
top: fixedTop,
|
|
|
width: placeholderReact.width,
|
|
|
height: placeholderReact.height
|
|
|
};
|
|
|
newState.placeholderStyle = {
|
|
|
width: placeholderReact.width,
|
|
|
height: placeholderReact.height
|
|
|
};
|
|
|
} else if (fixedBottom !== undefined) {
|
|
|
newState.affixStyle = {
|
|
|
position: 'fixed',
|
|
|
bottom: fixedBottom,
|
|
|
width: placeholderReact.width,
|
|
|
height: placeholderReact.height
|
|
|
};
|
|
|
newState.placeholderStyle = {
|
|
|
width: placeholderReact.width,
|
|
|
height: placeholderReact.height
|
|
|
};
|
|
|
}
|
|
|
newState.lastAffix = !!newState.affixStyle;
|
|
|
if (onChange && lastAffix !== newState.lastAffix) {
|
|
|
onChange(newState.lastAffix);
|
|
|
}
|
|
|
_this.setState(newState);
|
|
|
};
|
|
|
// @ts-ignore TS6133
|
|
|
_this.prepareMeasure = function () {
|
|
|
// 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) { var onTestUpdatePosition; }
|
|
|
};
|
|
|
return _this;
|
|
|
}
|
|
|
(0,createClass/* default */.Z)(Affix, [{
|
|
|
key: "getTargetFunc",
|
|
|
value: function getTargetFunc() {
|
|
|
var getTargetContainer = this.context.getTargetContainer;
|
|
|
var target = this.props.target;
|
|
|
if (target !== undefined) {
|
|
|
return target;
|
|
|
}
|
|
|
return getTargetContainer !== null && getTargetContainer !== void 0 ? getTargetContainer : getDefaultTarget;
|
|
|
}
|
|
|
// Event handler
|
|
|
}, {
|
|
|
key: "componentDidMount",
|
|
|
value: function componentDidMount() {
|
|
|
var _this2 = this;
|
|
|
var targetFunc = this.getTargetFunc();
|
|
|
if (targetFunc) {
|
|
|
// [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.timeout = setTimeout(function () {
|
|
|
addObserveTarget(targetFunc(), _this2);
|
|
|
// Mock Event object.
|
|
|
_this2.updatePosition();
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
key: "componentDidUpdate",
|
|
|
value: function componentDidUpdate(prevProps) {
|
|
|
var prevTarget = this.state.prevTarget;
|
|
|
var targetFunc = this.getTargetFunc();
|
|
|
var newTarget = (targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc()) || null;
|
|
|
if (prevTarget !== newTarget) {
|
|
|
removeObserveTarget(this);
|
|
|
if (newTarget) {
|
|
|
addObserveTarget(newTarget, this);
|
|
|
// Mock Event object.
|
|
|
this.updatePosition();
|
|
|
}
|
|
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
|
this.setState({
|
|
|
prevTarget: newTarget
|
|
|
});
|
|
|
}
|
|
|
if (prevProps.offsetTop !== this.props.offsetTop || prevProps.offsetBottom !== this.props.offsetBottom) {
|
|
|
this.updatePosition();
|
|
|
}
|
|
|
this.measure();
|
|
|
}
|
|
|
}, {
|
|
|
key: "componentWillUnmount",
|
|
|
value: function componentWillUnmount() {
|
|
|
clearTimeout(this.timeout);
|
|
|
removeObserveTarget(this);
|
|
|
this.updatePosition.cancel();
|
|
|
// https://github.com/ant-design/ant-design/issues/22683
|
|
|
this.lazyUpdatePosition.cancel();
|
|
|
}
|
|
|
// Handle realign logic
|
|
|
}, {
|
|
|
key: "updatePosition",
|
|
|
value: function updatePosition() {
|
|
|
this.prepareMeasure();
|
|
|
}
|
|
|
}, {
|
|
|
key: "lazyUpdatePosition",
|
|
|
value: function lazyUpdatePosition() {
|
|
|
var targetFunc = this.getTargetFunc();
|
|
|
var affixStyle = this.state.affixStyle;
|
|
|
// Check position change before measure to make Safari smooth
|
|
|
if (targetFunc && affixStyle) {
|
|
|
var offsetTop = this.getOffsetTop();
|
|
|
var offsetBottom = this.getOffsetBottom();
|
|
|
var targetNode = targetFunc();
|
|
|
if (targetNode && this.placeholderNode) {
|
|
|
var targetRect = getTargetRect(targetNode);
|
|
|
var placeholderReact = getTargetRect(this.placeholderNode);
|
|
|
var fixedTop = getFixedTop(placeholderReact, targetRect, offsetTop);
|
|
|
var fixedBottom = getFixedBottom(placeholderReact, 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();
|
|
|
}
|
|
|
// =================== Render ===================
|
|
|
}, {
|
|
|
key: "render",
|
|
|
value: function render() {
|
|
|
var _this3 = this;
|
|
|
var _this$state2 = this.state,
|
|
|
affixStyle = _this$state2.affixStyle,
|
|
|
placeholderStyle = _this$state2.placeholderStyle;
|
|
|
var _this$props2 = this.props,
|
|
|
affixPrefixCls = _this$props2.affixPrefixCls,
|
|
|
children = _this$props2.children;
|
|
|
var className = classnames_default()((0,defineProperty/* default */.Z)({}, affixPrefixCls, !!affixStyle));
|
|
|
var props = (0,omit/* default */.Z)(this.props, ['prefixCls', 'offsetTop', 'offsetBottom', 'target', 'onChange', 'affixPrefixCls']);
|
|
|
// Omit this since `onTestUpdatePosition` only works on test.
|
|
|
if (false) {}
|
|
|
return /*#__PURE__*/react.createElement(es/* default */.Z, {
|
|
|
onResize: function onResize() {
|
|
|
_this3.updatePosition();
|
|
|
}
|
|
|
}, /*#__PURE__*/react.createElement("div", (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: this.savePlaceholderNode
|
|
|
}), affixStyle && /*#__PURE__*/react.createElement("div", {
|
|
|
style: placeholderStyle,
|
|
|
"aria-hidden": "true"
|
|
|
}), /*#__PURE__*/react.createElement("div", {
|
|
|
className: className,
|
|
|
ref: this.saveFixedNode,
|
|
|
style: affixStyle
|
|
|
}, /*#__PURE__*/react.createElement(es/* default */.Z, {
|
|
|
onResize: function onResize() {
|
|
|
_this3.updatePosition();
|
|
|
}
|
|
|
}, children))));
|
|
|
}
|
|
|
}]);
|
|
|
return Affix;
|
|
|
}(react.Component);
|
|
|
Affix.contextType = context/* ConfigContext */.E_;
|
|
|
__decorate([(0,throttleByAnimationFrame/* throttleByAnimationFrameDecorator */.U)()], Affix.prototype, "updatePosition", null);
|
|
|
__decorate([(0,throttleByAnimationFrame/* throttleByAnimationFrameDecorator */.U)()], Affix.prototype, "lazyUpdatePosition", null);
|
|
|
var AffixFC = /*#__PURE__*/react.forwardRef(function (props, ref) {
|
|
|
var customizePrefixCls = props.prefixCls;
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
|
var affixPrefixCls = getPrefixCls('affix', customizePrefixCls);
|
|
|
var affixProps = (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({}, props), {
|
|
|
affixPrefixCls: affixPrefixCls
|
|
|
});
|
|
|
return /*#__PURE__*/react.createElement(Affix, (0,esm_extends/* default */.Z)({}, affixProps, {
|
|
|
ref: ref
|
|
|
}));
|
|
|
});
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var affix = (AffixFC);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 48283:
|
|
|
/*!***************************************************************!*\
|
|
|
!*** ./node_modules/antd/es/affix/style/index.js + 1 modules ***!
|
|
|
\***************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
|
|
|
var style_default = __webpack_require__(43146);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/affix/style/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/affix/style/index.js
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 65360:
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./node_modules/antd/es/popconfirm/index.js + 1 modules ***!
|
|
|
\**************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ popconfirm; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(87462);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
|
var slicedToArray = __webpack_require__(97685);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/@ant-design/icons/es/icons/ExclamationCircleFilled.js
|
|
|
var ExclamationCircleFilled = __webpack_require__(29950);
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__(94184);
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js
|
|
|
var useMergedState = __webpack_require__(21770);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js
|
|
|
var KeyCode = __webpack_require__(15105);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(53124);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/popover/index.js
|
|
|
var popover = __webpack_require__(55241);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
|
|
|
var reactNode = __webpack_require__(96159);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(71577);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/button.js + 2 modules
|
|
|
var button_button = __webpack_require__(6134);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/ActionButton.js
|
|
|
var ActionButton = __webpack_require__(86743);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/locale-provider/LocaleReceiver.js + 1 modules
|
|
|
var LocaleReceiver = __webpack_require__(23715);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/locale/default.js + 1 modules
|
|
|
var locale_default = __webpack_require__(80779);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/getRenderPropValue.js
|
|
|
var getRenderPropValue = __webpack_require__(81643);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/popconfirm/PurePanel.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Overlay = function Overlay(props) {
|
|
|
var prefixCls = props.prefixCls,
|
|
|
okButtonProps = props.okButtonProps,
|
|
|
cancelButtonProps = props.cancelButtonProps,
|
|
|
title = props.title,
|
|
|
cancelText = props.cancelText,
|
|
|
okText = props.okText,
|
|
|
okType = props.okType,
|
|
|
icon = props.icon,
|
|
|
_props$showCancel = props.showCancel,
|
|
|
showCancel = _props$showCancel === void 0 ? true : _props$showCancel,
|
|
|
close = props.close,
|
|
|
onConfirm = props.onConfirm,
|
|
|
onCancel = props.onCancel;
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
|
return /*#__PURE__*/react.createElement(LocaleReceiver/* default */.Z, {
|
|
|
componentName: "Popconfirm",
|
|
|
defaultLocale: locale_default/* default.Popconfirm */.Z.Popconfirm
|
|
|
}, function (contextLocale) {
|
|
|
return /*#__PURE__*/react.createElement("div", {
|
|
|
className: "".concat(prefixCls, "-inner-content")
|
|
|
}, /*#__PURE__*/react.createElement("div", {
|
|
|
className: "".concat(prefixCls, "-message")
|
|
|
}, icon && /*#__PURE__*/react.createElement("span", {
|
|
|
className: "".concat(prefixCls, "-message-icon")
|
|
|
}, icon), /*#__PURE__*/react.createElement("div", {
|
|
|
className: "".concat(prefixCls, "-message-title")
|
|
|
}, (0,getRenderPropValue/* getRenderPropValue */.Z)(title))), /*#__PURE__*/react.createElement("div", {
|
|
|
className: "".concat(prefixCls, "-buttons")
|
|
|
}, showCancel && /*#__PURE__*/react.createElement(es_button/* default */.Z, (0,esm_extends/* default */.Z)({
|
|
|
onClick: onCancel,
|
|
|
size: "small"
|
|
|
}, cancelButtonProps), cancelText !== null && cancelText !== void 0 ? cancelText : contextLocale.cancelText), /*#__PURE__*/react.createElement(ActionButton/* default */.Z, {
|
|
|
buttonProps: (0,esm_extends/* default */.Z)((0,esm_extends/* default */.Z)({
|
|
|
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.okText)));
|
|
|
});
|
|
|
};
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/popconfirm/index.js
|
|
|
|
|
|
|
|
|
var _this = undefined;
|
|
|
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;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Popconfirm = /*#__PURE__*/react.forwardRef(function (props, ref) {
|
|
|
var _React$useContext = react.useContext(context/* ConfigContext */.E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
|
var _useMergedState = (0,useMergedState/* default */.Z)(false, {
|
|
|
value: props.open !== undefined ? props.open : props.visible,
|
|
|
defaultValue: props.defaultOpen !== undefined ? props.defaultOpen : props.defaultVisible
|
|
|
}),
|
|
|
_useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2),
|
|
|
open = _useMergedState2[0],
|
|
|
setOpen = _useMergedState2[1];
|
|
|
// const isDestroyed = useDestroyed();
|
|
|
var settingOpen = function settingOpen(value, e) {
|
|
|
var _a, _b;
|
|
|
setOpen(value, true);
|
|
|
(_a = props.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(props, value, e);
|
|
|
(_b = props.onOpenChange) === null || _b === void 0 ? void 0 : _b.call(props, value, e);
|
|
|
};
|
|
|
var close = function close(e) {
|
|
|
settingOpen(false, e);
|
|
|
};
|
|
|
var onConfirm = function onConfirm(e) {
|
|
|
var _a;
|
|
|
return (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(_this, e);
|
|
|
};
|
|
|
var onCancel = function onCancel(e) {
|
|
|
var _a;
|
|
|
settingOpen(false, e);
|
|
|
(_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(_this, e);
|
|
|
};
|
|
|
var _onKeyDown = function onKeyDown(e) {
|
|
|
if (e.keyCode === KeyCode/* default.ESC */.Z.ESC && open) {
|
|
|
settingOpen(false, e);
|
|
|
}
|
|
|
};
|
|
|
var onOpenChange = function onOpenChange(value) {
|
|
|
var _props$disabled = props.disabled,
|
|
|
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
|
|
if (disabled) {
|
|
|
return;
|
|
|
}
|
|
|
settingOpen(value);
|
|
|
};
|
|
|
var customizePrefixCls = props.prefixCls,
|
|
|
_props$placement = props.placement,
|
|
|
placement = _props$placement === void 0 ? 'top' : _props$placement,
|
|
|
_props$trigger = props.trigger,
|
|
|
trigger = _props$trigger === void 0 ? 'click' : _props$trigger,
|
|
|
_props$okType = props.okType,
|
|
|
okType = _props$okType === void 0 ? 'primary' : _props$okType,
|
|
|
_props$icon = props.icon,
|
|
|
icon = _props$icon === void 0 ? /*#__PURE__*/react.createElement(ExclamationCircleFilled/* default */.Z, null) : _props$icon,
|
|
|
children = props.children,
|
|
|
overlayClassName = props.overlayClassName,
|
|
|
restProps = __rest(props, ["prefixCls", "placement", "trigger", "okType", "icon", "children", "overlayClassName"]);
|
|
|
var prefixCls = getPrefixCls('popover', customizePrefixCls);
|
|
|
var prefixClsConfirm = getPrefixCls('popconfirm', customizePrefixCls);
|
|
|
var overlayClassNames = classnames_default()(prefixClsConfirm, overlayClassName);
|
|
|
return /*#__PURE__*/react.createElement(popover/* default */.Z, (0,esm_extends/* default */.Z)({}, restProps, {
|
|
|
trigger: trigger,
|
|
|
prefixCls: prefixCls,
|
|
|
placement: placement,
|
|
|
onOpenChange: onOpenChange,
|
|
|
open: open,
|
|
|
ref: ref,
|
|
|
overlayClassName: overlayClassNames,
|
|
|
_overlay: /*#__PURE__*/react.createElement(Overlay, (0,esm_extends/* default */.Z)({
|
|
|
okType: okType,
|
|
|
icon: icon
|
|
|
}, props, {
|
|
|
prefixCls: prefixCls,
|
|
|
close: close,
|
|
|
onConfirm: onConfirm,
|
|
|
onCancel: onCancel
|
|
|
}))
|
|
|
}), (0,reactNode/* cloneElement */.Tm)(children, {
|
|
|
onKeyDown: function onKeyDown(e) {
|
|
|
var _a, _b;
|
|
|
if ( /*#__PURE__*/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);
|
|
|
}
|
|
|
}));
|
|
|
});
|
|
|
/* harmony default export */ var popconfirm = (Popconfirm);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 33219:
|
|
|
/*!********************************************************************!*\
|
|
|
!*** ./node_modules/antd/es/popconfirm/style/index.js + 1 modules ***!
|
|
|
\********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
|
|
|
var style_default = __webpack_require__(43146);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
|
|
|
var style = __webpack_require__(29913);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/popover/style/index.js + 1 modules
|
|
|
var popover_style = __webpack_require__(63942);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/popconfirm/style/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/popconfirm/style/index.js
|
|
|
|
|
|
// style dependencies
|
|
|
// deps-lint-skip: tooltip, popover
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 55241:
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./node_modules/antd/es/popover/index.js ***!
|
|
|
\***********************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 87462);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294);
|
|
|
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config-provider */ 53124);
|
|
|
/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../tooltip */ 84908);
|
|
|
/* harmony import */ var _util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_util/getRenderPropValue */ 81643);
|
|
|
/* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../_util/motion */ 33603);
|
|
|
|
|
|
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;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Overlay = function Overlay(_ref) {
|
|
|
var title = _ref.title,
|
|
|
content = _ref.content,
|
|
|
prefixCls = _ref.prefixCls;
|
|
|
if (!title && !content) {
|
|
|
return null;
|
|
|
}
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
|
|
|
className: "".concat(prefixCls, "-title")
|
|
|
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_1__/* .getRenderPropValue */ .Z)(title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", {
|
|
|
className: "".concat(prefixCls, "-inner-content")
|
|
|
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_1__/* .getRenderPropValue */ .Z)(content)));
|
|
|
};
|
|
|
var Popover = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function (props, ref) {
|
|
|
var customizePrefixCls = props.prefixCls,
|
|
|
title = props.title,
|
|
|
content = props.content,
|
|
|
_overlay = props._overlay,
|
|
|
_props$placement = props.placement,
|
|
|
placement = _props$placement === void 0 ? 'top' : _props$placement,
|
|
|
_props$trigger = props.trigger,
|
|
|
trigger = _props$trigger === void 0 ? 'hover' : _props$trigger,
|
|
|
_props$mouseEnterDela = props.mouseEnterDelay,
|
|
|
mouseEnterDelay = _props$mouseEnterDela === void 0 ? 0.1 : _props$mouseEnterDela,
|
|
|
_props$mouseLeaveDela = props.mouseLeaveDelay,
|
|
|
mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela,
|
|
|
_props$overlayStyle = props.overlayStyle,
|
|
|
overlayStyle = _props$overlayStyle === void 0 ? {} : _props$overlayStyle,
|
|
|
otherProps = __rest(props, ["prefixCls", "title", "content", "_overlay", "placement", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle"]);
|
|
|
var _React$useContext = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_2__/* .ConfigContext */ .E_),
|
|
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
|
var prefixCls = getPrefixCls('popover', customizePrefixCls);
|
|
|
var rootPrefixCls = getPrefixCls();
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tooltip__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({
|
|
|
placement: placement,
|
|
|
trigger: trigger,
|
|
|
mouseEnterDelay: mouseEnterDelay,
|
|
|
mouseLeaveDelay: mouseLeaveDelay,
|
|
|
overlayStyle: overlayStyle
|
|
|
}, otherProps, {
|
|
|
prefixCls: prefixCls,
|
|
|
ref: ref,
|
|
|
overlay: _overlay || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Overlay, {
|
|
|
prefixCls: prefixCls,
|
|
|
title: title,
|
|
|
content: content
|
|
|
}),
|
|
|
transitionName: (0,_util_motion__WEBPACK_IMPORTED_MODULE_5__/* .getTransitionName */ .mL)(rootPrefixCls, 'zoom-big', otherProps.transitionName)
|
|
|
}));
|
|
|
});
|
|
|
if (false) {}
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = (Popover);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 63942:
|
|
|
/*!*****************************************************************!*\
|
|
|
!*** ./node_modules/antd/es/popover/style/index.js + 1 modules ***!
|
|
|
\*****************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less
|
|
|
var style_default = __webpack_require__(43146);
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/popover/style/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/popover/style/index.js
|
|
|
|
|
|
|
|
|
// style dependencies
|
|
|
// deps-lint-skip: tooltip
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |