|
|
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[136],{
|
|
|
|
|
|
/***/ "+XC9":
|
|
|
/*!***************************************************************************!*\
|
|
|
!*** ./src/pages/Engineering/Lists/TrainingObjectives/index.less?modules ***!
|
|
|
\***************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
module.exports = {"flex_box_center":"flex_box_center___2F5Cv","flex_space_between":"flex_space_between___3nkkm","flex_box_vertical_center":"flex_box_vertical_center___1Olas","flex_box_center_end":"flex_box_center_end___3qXSu","flex_box_column":"flex_box_column___3y0nS","wrap":"wrap___3zAzU","title":"title___2-USl","control":"control___1F5sc","label":"label___1mMWh","customTable":"customTable___3K7s1"};
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "7ixt":
|
|
|
/*!**************************************************!*\
|
|
|
!*** ./node_modules/rc-tooltip/es/placements.js ***!
|
|
|
\**************************************************/
|
|
|
/*! exports provided: placements, default */
|
|
|
/*! exports used: placements */
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return placements; });
|
|
|
var autoAdjustOverflow = {
|
|
|
adjustX: 1,
|
|
|
adjustY: 1
|
|
|
};
|
|
|
var targetOffset = [0, 0];
|
|
|
var placements = {
|
|
|
left: {
|
|
|
points: ['cr', 'cl'],
|
|
|
overflow: autoAdjustOverflow,
|
|
|
offset: [-4, 0],
|
|
|
targetOffset: targetOffset
|
|
|
},
|
|
|
right: {
|
|
|
points: ['cl', 'cr'],
|
|
|
overflow: autoAdjustOverflow,
|
|
|
offset: [4, 0],
|
|
|
targetOffset: targetOffset
|
|
|
},
|
|
|
top: {
|
|
|
points: ['bc', 'tc'],
|
|
|
overflow: autoAdjustOverflow,
|
|
|
offset: [0, -4],
|
|
|
targetOffset: targetOffset
|
|
|
},
|
|
|
bottom: {
|
|
|
points: ['tc', 'bc'],
|
|
|
overflow: autoAdjustOverflow,
|
|
|
offset: [0, 4],
|
|
|
targetOffset: targetOffset
|
|
|
},
|
|
|
topLeft: {
|
|
|
points: ['bl', 'tl'],
|
|
|
overflow: autoAdjustOverflow,
|
|
|
offset: [0, -4],
|
|
|
targetOffset: targetOffset
|
|
|
},
|
|
|
leftTop: {
|
|
|
points: ['tr', 'tl'],
|
|
|
overflow: autoAdjustOverflow,
|
|
|
offset: [-4, 0],
|
|
|
targetOffset: targetOffset
|
|
|
},
|
|
|
topRight: {
|
|
|
points: ['br', 'tr'],
|
|
|
overflow: autoAdjustOverflow,
|
|
|
offset: [0, -4],
|
|
|
targetOffset: targetOffset
|
|
|
},
|
|
|
rightTop: {
|
|
|
points: ['tl', 'tr'],
|
|
|
overflow: autoAdjustOverflow,
|
|
|
offset: [4, 0],
|
|
|
targetOffset: targetOffset
|
|
|
},
|
|
|
bottomRight: {
|
|
|
points: ['tr', 'br'],
|
|
|
overflow: autoAdjustOverflow,
|
|
|
offset: [0, 4],
|
|
|
targetOffset: targetOffset
|
|
|
},
|
|
|
rightBottom: {
|
|
|
points: ['bl', 'br'],
|
|
|
overflow: autoAdjustOverflow,
|
|
|
offset: [4, 0],
|
|
|
targetOffset: targetOffset
|
|
|
},
|
|
|
bottomLeft: {
|
|
|
points: ['tl', 'bl'],
|
|
|
overflow: autoAdjustOverflow,
|
|
|
offset: [0, 4],
|
|
|
targetOffset: targetOffset
|
|
|
},
|
|
|
leftBottom: {
|
|
|
points: ['br', 'bl'],
|
|
|
overflow: autoAdjustOverflow,
|
|
|
offset: [-4, 0],
|
|
|
targetOffset: targetOffset
|
|
|
}
|
|
|
};
|
|
|
/* unused harmony default export */ var _unused_webpack_default_export = (placements);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "BU3w":
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***!
|
|
|
\***************************************************/
|
|
|
/*! exports provided: injectCSS, updateCSS */
|
|
|
/*! exports used: updateCSS */
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
/* unused harmony export injectCSS */
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return updateCSS; });
|
|
|
/* harmony import */ var _canUseDom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./canUseDom */ "MNnm");
|
|
|
|
|
|
var MARK_KEY = "rc-util-key";
|
|
|
|
|
|
function getContainer(option) {
|
|
|
if (option.attachTo) {
|
|
|
return option.attachTo;
|
|
|
}
|
|
|
|
|
|
var head = document.querySelector('head');
|
|
|
return head || document.body;
|
|
|
}
|
|
|
|
|
|
function injectCSS(css) {
|
|
|
var _option$csp;
|
|
|
|
|
|
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
|
|
|
|
if (!Object(_canUseDom__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])()) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
var styleNode = document.createElement('style');
|
|
|
|
|
|
if ((_option$csp = option.csp) === null || _option$csp === void 0 ? void 0 : _option$csp.nonce) {
|
|
|
var _option$csp2;
|
|
|
|
|
|
styleNode.nonce = (_option$csp2 = option.csp) === null || _option$csp2 === void 0 ? void 0 : _option$csp2.nonce;
|
|
|
}
|
|
|
|
|
|
styleNode.innerHTML = css;
|
|
|
var container = getContainer(option);
|
|
|
var firstChild = container.firstChild;
|
|
|
|
|
|
if (option.prepend && container.prepend) {
|
|
|
// Use `prepend` first
|
|
|
container.prepend(styleNode);
|
|
|
} else if (option.prepend && firstChild) {
|
|
|
// Fallback to `insertBefore` like IE not support `prepend`
|
|
|
container.insertBefore(styleNode, firstChild);
|
|
|
} else {
|
|
|
container.appendChild(styleNode);
|
|
|
}
|
|
|
|
|
|
return styleNode;
|
|
|
}
|
|
|
var containerCache = new Map();
|
|
|
function updateCSS(css, key) {
|
|
|
var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
|
var container = getContainer(option); // Get real parent
|
|
|
|
|
|
if (!containerCache.has(container)) {
|
|
|
var placeholderStyle = injectCSS('', option);
|
|
|
var parentNode = placeholderStyle.parentNode;
|
|
|
containerCache.set(container, parentNode);
|
|
|
parentNode.removeChild(placeholderStyle);
|
|
|
}
|
|
|
|
|
|
var existNode = Array.from(containerCache.get(container).children).find(function (node) {
|
|
|
return node.tagName === 'STYLE' && node[MARK_KEY] === key;
|
|
|
});
|
|
|
|
|
|
if (existNode) {
|
|
|
var _option$csp3, _option$csp4;
|
|
|
|
|
|
if (((_option$csp3 = option.csp) === null || _option$csp3 === void 0 ? void 0 : _option$csp3.nonce) && existNode.nonce !== ((_option$csp4 = option.csp) === null || _option$csp4 === void 0 ? void 0 : _option$csp4.nonce)) {
|
|
|
var _option$csp5;
|
|
|
|
|
|
existNode.nonce = (_option$csp5 = option.csp) === null || _option$csp5 === void 0 ? void 0 : _option$csp5.nonce;
|
|
|
}
|
|
|
|
|
|
if (existNode.innerHTML !== css) {
|
|
|
existNode.innerHTML = css;
|
|
|
}
|
|
|
|
|
|
return existNode;
|
|
|
}
|
|
|
|
|
|
var newNode = injectCSS(css, option);
|
|
|
newNode[MARK_KEY] = key;
|
|
|
return newNode;
|
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "GfqC":
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/rc-upload/es/index.js + 6 modules ***!
|
|
|
\********************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXTERNAL MODULE: external "window.React"
|
|
|
var external_window_React_ = __webpack_require__("cDcd");
|
|
|
var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__("TSYQ");
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-upload/es/request.js
|
|
|
function getError(option, xhr) {
|
|
|
var msg = 'cannot ' + option.method + ' ' + option.action + ' ' + xhr.status + '\'';
|
|
|
var err = new Error(msg);
|
|
|
err.status = xhr.status;
|
|
|
err.method = option.method;
|
|
|
err.url = option.action;
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
function getBody(xhr) {
|
|
|
var text = xhr.responseText || xhr.response;
|
|
|
if (!text) {
|
|
|
return text;
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
return JSON.parse(text);
|
|
|
} catch (e) {
|
|
|
return text;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// option {
|
|
|
// onProgress: (event: { percent: number }): void,
|
|
|
// onError: (event: Error, body?: Object): void,
|
|
|
// onSuccess: (body: Object): void,
|
|
|
// data: Object,
|
|
|
// filename: String,
|
|
|
// file: File,
|
|
|
// withCredentials: Boolean,
|
|
|
// action: String,
|
|
|
// headers: Object,
|
|
|
// }
|
|
|
function upload(option) {
|
|
|
// eslint-disable-next-line no-undef
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
|
|
|
if (option.onProgress && xhr.upload) {
|
|
|
xhr.upload.onprogress = function progress(e) {
|
|
|
if (e.total > 0) {
|
|
|
e.percent = e.loaded / e.total * 100;
|
|
|
}
|
|
|
option.onProgress(e);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
// eslint-disable-next-line no-undef
|
|
|
var formData = new FormData();
|
|
|
|
|
|
if (option.data) {
|
|
|
Object.keys(option.data).forEach(function (key) {
|
|
|
var value = option.data[key];
|
|
|
// support key-value array data
|
|
|
if (Array.isArray(value)) {
|
|
|
value.forEach(function (item) {
|
|
|
// { list: [ 11, 22 ] }
|
|
|
// formData.append('list[]', 11);
|
|
|
formData.append(key + '[]', item);
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
formData.append(key, option.data[key]);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// eslint-disable-next-line no-undef
|
|
|
if (option.file instanceof Blob) {
|
|
|
formData.append(option.filename, option.file, option.file.name);
|
|
|
} else {
|
|
|
formData.append(option.filename, option.file);
|
|
|
}
|
|
|
|
|
|
xhr.onerror = function error(e) {
|
|
|
option.onError(e);
|
|
|
};
|
|
|
|
|
|
xhr.onload = function onload() {
|
|
|
// allow success when 2xx status
|
|
|
// see https://github.com/react-component/upload/issues/34
|
|
|
if (xhr.status < 200 || xhr.status >= 300) {
|
|
|
return option.onError(getError(option, xhr), getBody(xhr));
|
|
|
}
|
|
|
|
|
|
return option.onSuccess(getBody(xhr), xhr);
|
|
|
};
|
|
|
|
|
|
xhr.open(option.method, option.action, true);
|
|
|
|
|
|
// Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179
|
|
|
if (option.withCredentials && 'withCredentials' in xhr) {
|
|
|
xhr.withCredentials = true;
|
|
|
}
|
|
|
|
|
|
var headers = option.headers || {};
|
|
|
|
|
|
// when set headers['X-Requested-With'] = null , can close default XHR header
|
|
|
// see https://github.com/react-component/upload/issues/33
|
|
|
if (headers['X-Requested-With'] !== null) {
|
|
|
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
|
|
}
|
|
|
|
|
|
Object.keys(headers).forEach(function (h) {
|
|
|
if (headers[h] !== null) {
|
|
|
xhr.setRequestHeader(h, headers[h]);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
xhr.send(formData);
|
|
|
|
|
|
return {
|
|
|
abort: function abort() {
|
|
|
xhr.abort();
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-upload/es/uid.js
|
|
|
var now = +new Date();
|
|
|
var index = 0;
|
|
|
|
|
|
function uid_uid() {
|
|
|
return "rc-upload-" + now + "-" + ++index;
|
|
|
}
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-upload/es/attr-accept.js
|
|
|
function endsWith(str, suffix) {
|
|
|
return str.indexOf(suffix, str.length - suffix.length) !== -1;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var attr_accept = (function (file, acceptedFiles) {
|
|
|
if (file && acceptedFiles) {
|
|
|
var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');
|
|
|
var fileName = file.name || '';
|
|
|
var mimeType = file.type || '';
|
|
|
var baseMimeType = mimeType.replace(/\/.*$/, '');
|
|
|
|
|
|
return acceptedFilesArray.some(function (type) {
|
|
|
var validType = type.trim();
|
|
|
if (validType.charAt(0) === '.') {
|
|
|
return endsWith(fileName.toLowerCase(), validType.toLowerCase());
|
|
|
} else if (/\/\*$/.test(validType)) {
|
|
|
// This is something like a image/* mime type
|
|
|
return baseMimeType === validType.replace(/\/.*$/, '');
|
|
|
}
|
|
|
return mimeType === validType;
|
|
|
});
|
|
|
}
|
|
|
return true;
|
|
|
});
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-upload/es/traverseFileTree.js
|
|
|
function loopFiles(item, callback) {
|
|
|
var dirReader = item.createReader();
|
|
|
var fileList = [];
|
|
|
|
|
|
function sequence() {
|
|
|
dirReader.readEntries(function (entries) {
|
|
|
var entryList = Array.prototype.slice.apply(entries);
|
|
|
fileList = fileList.concat(entryList);
|
|
|
|
|
|
// Check if all the file has been viewed
|
|
|
var isFinished = !entryList.length;
|
|
|
|
|
|
if (isFinished) {
|
|
|
callback(fileList);
|
|
|
} else {
|
|
|
sequence();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
sequence();
|
|
|
}
|
|
|
|
|
|
var traverseFileTree = function traverseFileTree(files, callback, isAccepted) {
|
|
|
var _traverseFileTree = function _traverseFileTree(item, path) {
|
|
|
path = path || '';
|
|
|
if (item.isFile) {
|
|
|
item.file(function (file) {
|
|
|
if (isAccepted(file)) {
|
|
|
// https://github.com/ant-design/ant-design/issues/16426
|
|
|
if (item.fullPath && !file.webkitRelativePath) {
|
|
|
Object.defineProperties(file, {
|
|
|
webkitRelativePath: {
|
|
|
writable: true
|
|
|
}
|
|
|
});
|
|
|
file.webkitRelativePath = item.fullPath.replace(/^\//, '');
|
|
|
Object.defineProperties(file, {
|
|
|
webkitRelativePath: {
|
|
|
writable: false
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
callback([file]);
|
|
|
}
|
|
|
});
|
|
|
} else if (item.isDirectory) {
|
|
|
loopFiles(item, function (entries) {
|
|
|
entries.forEach(function (entryItem) {
|
|
|
_traverseFileTree(entryItem, '' + path + item.name + '/');
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
files.forEach(function (file) {
|
|
|
_traverseFileTree(file.webkitGetAsEntry());
|
|
|
});
|
|
|
};
|
|
|
|
|
|
/* harmony default export */ var es_traverseFileTree = (traverseFileTree);
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-upload/es/AjaxUploader.js
|
|
|
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
|
|
|
|
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
|
|
|
|
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
|
|
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
|
|
|
|
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
|
|
|
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
|
|
|
|
/* eslint react/no-is-mounted:0,react/sort-comp:0,react/prop-types:0 */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dataOrAriaAttributeProps = function dataOrAriaAttributeProps(props) {
|
|
|
return Object.keys(props).reduce(function (acc, key) {
|
|
|
if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') {
|
|
|
acc[key] = props[key];
|
|
|
}
|
|
|
return acc;
|
|
|
}, {});
|
|
|
};
|
|
|
|
|
|
var AjaxUploader_AjaxUploader = function (_Component) {
|
|
|
_inherits(AjaxUploader, _Component);
|
|
|
|
|
|
function AjaxUploader() {
|
|
|
var _ref;
|
|
|
|
|
|
var _temp, _this, _ret;
|
|
|
|
|
|
_classCallCheck(this, AjaxUploader);
|
|
|
|
|
|
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
|
args[_key] = arguments[_key];
|
|
|
}
|
|
|
|
|
|
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = AjaxUploader.__proto__ || Object.getPrototypeOf(AjaxUploader)).call.apply(_ref, [this].concat(args))), _this), _this.state = { uid: uid_uid() }, _this.reqs = {}, _this.onChange = function (e) {
|
|
|
var files = e.target.files;
|
|
|
_this.uploadFiles(files);
|
|
|
_this.reset();
|
|
|
}, _this.onClick = function (e) {
|
|
|
var el = _this.fileInput;
|
|
|
if (!el) {
|
|
|
return;
|
|
|
}
|
|
|
var _this$props = _this.props,
|
|
|
children = _this$props.children,
|
|
|
onClick = _this$props.onClick;
|
|
|
|
|
|
if (children && children.type === 'button') {
|
|
|
el.parentNode.focus();
|
|
|
el.parentNode.querySelector('button').blur();
|
|
|
}
|
|
|
el.click();
|
|
|
if (onClick) {
|
|
|
onClick(e);
|
|
|
}
|
|
|
}, _this.onKeyDown = function (e) {
|
|
|
if (e.key === 'Enter') {
|
|
|
_this.onClick();
|
|
|
}
|
|
|
}, _this.onFileDrop = function (e) {
|
|
|
var multiple = _this.props.multiple;
|
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
if (e.type === 'dragover') {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (_this.props.directory) {
|
|
|
es_traverseFileTree(Array.prototype.slice.call(e.dataTransfer.items), _this.uploadFiles, function (_file) {
|
|
|
return attr_accept(_file, _this.props.accept);
|
|
|
});
|
|
|
} else {
|
|
|
var files = Array.prototype.slice.call(e.dataTransfer.files).filter(function (file) {
|
|
|
return attr_accept(file, _this.props.accept);
|
|
|
});
|
|
|
|
|
|
if (multiple === false) {
|
|
|
files = files.slice(0, 1);
|
|
|
}
|
|
|
|
|
|
_this.uploadFiles(files);
|
|
|
}
|
|
|
}, _this.uploadFiles = function (files) {
|
|
|
var postFiles = Array.prototype.slice.call(files);
|
|
|
postFiles.map(function (file) {
|
|
|
file.uid = uid_uid();
|
|
|
return file;
|
|
|
}).forEach(function (file) {
|
|
|
_this.upload(file, postFiles);
|
|
|
});
|
|
|
}, _this.saveFileInput = function (node) {
|
|
|
_this.fileInput = node;
|
|
|
}, _temp), _possibleConstructorReturn(_this, _ret);
|
|
|
}
|
|
|
|
|
|
_createClass(AjaxUploader, [{
|
|
|
key: 'componentDidMount',
|
|
|
value: function componentDidMount() {
|
|
|
this._isMounted = true;
|
|
|
}
|
|
|
}, {
|
|
|
key: 'componentWillUnmount',
|
|
|
value: function componentWillUnmount() {
|
|
|
this._isMounted = false;
|
|
|
this.abort();
|
|
|
}
|
|
|
}, {
|
|
|
key: 'upload',
|
|
|
value: function upload(file, fileList) {
|
|
|
var _this2 = this;
|
|
|
|
|
|
var props = this.props;
|
|
|
|
|
|
if (!props.beforeUpload) {
|
|
|
// always async in case use react state to keep fileList
|
|
|
return setTimeout(function () {
|
|
|
return _this2.post(file);
|
|
|
}, 0);
|
|
|
}
|
|
|
|
|
|
var before = props.beforeUpload(file, fileList);
|
|
|
if (before && before.then) {
|
|
|
before.then(function (processedFile) {
|
|
|
var processedFileType = Object.prototype.toString.call(processedFile);
|
|
|
if (processedFileType === '[object File]' || processedFileType === '[object Blob]') {
|
|
|
return _this2.post(processedFile);
|
|
|
}
|
|
|
return _this2.post(file);
|
|
|
})['catch'](function (e) {
|
|
|
// eslint-disable-next-line no-console
|
|
|
console.log(e);
|
|
|
});
|
|
|
} else if (before !== false) {
|
|
|
setTimeout(function () {
|
|
|
return _this2.post(file);
|
|
|
}, 0);
|
|
|
}
|
|
|
return undefined;
|
|
|
}
|
|
|
}, {
|
|
|
key: 'post',
|
|
|
value: function post(file) {
|
|
|
var _this3 = this;
|
|
|
|
|
|
if (!this._isMounted) {
|
|
|
return;
|
|
|
}
|
|
|
var props = this.props;
|
|
|
var onStart = props.onStart,
|
|
|
onProgress = props.onProgress,
|
|
|
_props$transformFile = props.transformFile,
|
|
|
transformFile = _props$transformFile === undefined ? function (originFile) {
|
|
|
return originFile;
|
|
|
} : _props$transformFile;
|
|
|
|
|
|
|
|
|
new Promise(function (resolve) {
|
|
|
var action = props.action;
|
|
|
|
|
|
if (typeof action === 'function') {
|
|
|
action = action(file);
|
|
|
}
|
|
|
return resolve(action);
|
|
|
}).then(function (action) {
|
|
|
var uid = file.uid;
|
|
|
|
|
|
var request = props.customRequest || upload;
|
|
|
var transform = Promise.resolve(transformFile(file)).then(function (transformedFile) {
|
|
|
var data = props.data;
|
|
|
|
|
|
if (typeof data === 'function') {
|
|
|
data = data(transformedFile);
|
|
|
}
|
|
|
return Promise.all([transformedFile, data]);
|
|
|
})['catch'](function (e) {
|
|
|
console.error(e); // eslint-disable-line no-console
|
|
|
});
|
|
|
|
|
|
transform.then(function (_ref2) {
|
|
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
|
transformedFile = _ref3[0],
|
|
|
data = _ref3[1];
|
|
|
|
|
|
var requestOption = {
|
|
|
action: action,
|
|
|
filename: props.name,
|
|
|
data: data,
|
|
|
file: transformedFile,
|
|
|
headers: props.headers,
|
|
|
withCredentials: props.withCredentials,
|
|
|
method: props.method || 'post',
|
|
|
onProgress: onProgress ? function (e) {
|
|
|
onProgress(e, file);
|
|
|
} : null,
|
|
|
onSuccess: function onSuccess(ret, xhr) {
|
|
|
delete _this3.reqs[uid];
|
|
|
props.onSuccess(ret, file, xhr);
|
|
|
},
|
|
|
onError: function onError(err, ret) {
|
|
|
delete _this3.reqs[uid];
|
|
|
props.onError(err, ret, file);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
onStart(file);
|
|
|
_this3.reqs[uid] = request(requestOption);
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
key: 'reset',
|
|
|
value: function reset() {
|
|
|
this.setState({
|
|
|
uid: uid_uid()
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
key: 'abort',
|
|
|
value: function abort(file) {
|
|
|
var reqs = this.reqs;
|
|
|
|
|
|
if (file) {
|
|
|
var uid = file;
|
|
|
if (file && file.uid) {
|
|
|
uid = file.uid;
|
|
|
}
|
|
|
if (reqs[uid] && reqs[uid].abort) {
|
|
|
reqs[uid].abort();
|
|
|
}
|
|
|
delete reqs[uid];
|
|
|
} else {
|
|
|
Object.keys(reqs).forEach(function (uid) {
|
|
|
if (reqs[uid] && reqs[uid].abort) {
|
|
|
reqs[uid].abort();
|
|
|
}
|
|
|
delete reqs[uid];
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
key: 'render',
|
|
|
value: function render() {
|
|
|
var _classNames;
|
|
|
|
|
|
var _props = this.props,
|
|
|
Tag = _props.component,
|
|
|
prefixCls = _props.prefixCls,
|
|
|
className = _props.className,
|
|
|
disabled = _props.disabled,
|
|
|
id = _props.id,
|
|
|
style = _props.style,
|
|
|
multiple = _props.multiple,
|
|
|
accept = _props.accept,
|
|
|
children = _props.children,
|
|
|
directory = _props.directory,
|
|
|
openFileDialogOnClick = _props.openFileDialogOnClick,
|
|
|
onMouseEnter = _props.onMouseEnter,
|
|
|
onMouseLeave = _props.onMouseLeave,
|
|
|
otherProps = _objectWithoutProperties(_props, ['component', 'prefixCls', 'className', 'disabled', 'id', 'style', 'multiple', 'accept', 'children', 'directory', 'openFileDialogOnClick', 'onMouseEnter', 'onMouseLeave']);
|
|
|
|
|
|
var cls = classnames_default()((_classNames = {}, _defineProperty(_classNames, prefixCls, true), _defineProperty(_classNames, prefixCls + '-disabled', disabled), _defineProperty(_classNames, className, className), _classNames));
|
|
|
var events = disabled ? {} : {
|
|
|
onClick: openFileDialogOnClick ? this.onClick : function () {},
|
|
|
onKeyDown: openFileDialogOnClick ? this.onKeyDown : function () {},
|
|
|
onMouseEnter: onMouseEnter,
|
|
|
onMouseLeave: onMouseLeave,
|
|
|
onDrop: this.onFileDrop,
|
|
|
onDragOver: this.onFileDrop,
|
|
|
tabIndex: '0'
|
|
|
};
|
|
|
return external_window_React_default.a.createElement(
|
|
|
Tag,
|
|
|
_extends({}, events, {
|
|
|
className: cls,
|
|
|
role: 'button',
|
|
|
style: style
|
|
|
}),
|
|
|
external_window_React_default.a.createElement('input', _extends({}, dataOrAriaAttributeProps(otherProps), {
|
|
|
id: id,
|
|
|
type: 'file',
|
|
|
ref: this.saveFileInput,
|
|
|
onClick: function onClick(e) {
|
|
|
return e.stopPropagation();
|
|
|
} // https://github.com/ant-design/ant-design/issues/19948
|
|
|
, key: this.state.uid,
|
|
|
style: { display: 'none' },
|
|
|
accept: accept,
|
|
|
directory: directory ? 'directory' : null,
|
|
|
webkitdirectory: directory ? 'webkitdirectory' : null,
|
|
|
multiple: multiple,
|
|
|
onChange: this.onChange
|
|
|
})),
|
|
|
children
|
|
|
);
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
return AjaxUploader;
|
|
|
}(external_window_React_["Component"]);
|
|
|
|
|
|
/* harmony default export */ var es_AjaxUploader = (AjaxUploader_AjaxUploader);
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-upload/es/Upload.js
|
|
|
var Upload_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
|
|
|
|
var Upload_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
|
|
|
function Upload_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
function Upload_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
|
|
|
|
function Upload_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
|
|
|
|
/* eslint react/prop-types:0 */
|
|
|
|
|
|
|
|
|
|
|
|
function empty() {}
|
|
|
|
|
|
var Upload_Upload = function (_Component) {
|
|
|
Upload_inherits(Upload, _Component);
|
|
|
|
|
|
function Upload() {
|
|
|
var _ref;
|
|
|
|
|
|
var _temp, _this, _ret;
|
|
|
|
|
|
Upload_classCallCheck(this, Upload);
|
|
|
|
|
|
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
|
args[_key] = arguments[_key];
|
|
|
}
|
|
|
|
|
|
return _ret = (_temp = (_this = Upload_possibleConstructorReturn(this, (_ref = Upload.__proto__ || Object.getPrototypeOf(Upload)).call.apply(_ref, [this].concat(args))), _this), _this.saveUploader = function (node) {
|
|
|
_this.uploader = node;
|
|
|
}, _temp), Upload_possibleConstructorReturn(_this, _ret);
|
|
|
}
|
|
|
|
|
|
Upload_createClass(Upload, [{
|
|
|
key: 'abort',
|
|
|
value: function abort(file) {
|
|
|
this.uploader.abort(file);
|
|
|
}
|
|
|
}, {
|
|
|
key: 'render',
|
|
|
value: function render() {
|
|
|
return external_window_React_default.a.createElement(es_AjaxUploader, Upload_extends({}, this.props, { ref: this.saveUploader }));
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
return Upload;
|
|
|
}(external_window_React_["Component"]);
|
|
|
|
|
|
Upload_Upload.defaultProps = {
|
|
|
component: 'span',
|
|
|
prefixCls: 'rc-upload',
|
|
|
data: {},
|
|
|
headers: {},
|
|
|
name: 'file',
|
|
|
multipart: false,
|
|
|
onStart: empty,
|
|
|
onError: empty,
|
|
|
onSuccess: empty,
|
|
|
multiple: false,
|
|
|
beforeUpload: null,
|
|
|
customRequest: null,
|
|
|
withCredentials: false,
|
|
|
openFileDialogOnClick: true
|
|
|
};
|
|
|
|
|
|
|
|
|
/* harmony default export */ var es_Upload = (Upload_Upload);
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-upload/es/index.js
|
|
|
// export this package's api
|
|
|
|
|
|
|
|
|
/* harmony default export */ var es = __webpack_exports__["a"] = (es_Upload);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "Gytx":
|
|
|
/*!********************************************!*\
|
|
|
!*** ./node_modules/shallowequal/index.js ***!
|
|
|
\********************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
|
|
/***/ (function(module, exports) {
|
|
|
|
|
|
//
|
|
|
|
|
|
module.exports = function shallowEqual(objA, objB, compare, compareContext) {
|
|
|
var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
|
|
|
|
|
|
if (ret !== void 0) {
|
|
|
return !!ret;
|
|
|
}
|
|
|
|
|
|
if (objA === objB) {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
var keysA = Object.keys(objA);
|
|
|
var keysB = Object.keys(objB);
|
|
|
|
|
|
if (keysA.length !== keysB.length) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
|
|
|
|
|
|
// Test for A's keys different from B.
|
|
|
for (var idx = 0; idx < keysA.length; idx++) {
|
|
|
var key = keysA[idx];
|
|
|
|
|
|
if (!bHasOwnProperty(key)) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
var valueA = objA[key];
|
|
|
var valueB = objB[key];
|
|
|
|
|
|
ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
|
|
|
|
|
|
if (ret === false || (ret === void 0 && valueA !== valueB)) {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return true;
|
|
|
};
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "LdHM":
|
|
|
/*!********************************************************!*\
|
|
|
!*** ./node_modules/rc-select/es/index.js + 6 modules ***!
|
|
|
\********************************************************/
|
|
|
/*! exports provided: Option, OptGroup, default */
|
|
|
/*! exports used: OptGroup, Option, default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/TransBtn.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/generate.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/pickAttrs.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-virtual-list/es/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ es_Option; });
|
|
|
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ es_OptGroup; });
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
|
var classCallCheck = __webpack_require__("1OyB");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
|
var createClass = __webpack_require__("vuIU");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
|
|
|
var inherits = __webpack_require__("Ji7U");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
|
|
|
var createSuper = __webpack_require__("LK+K");
|
|
|
|
|
|
// EXTERNAL MODULE: external "window.React"
|
|
|
var external_window_React_ = __webpack_require__("cDcd");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
|
var defineProperty = __webpack_require__("rePB");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
|
var objectWithoutProperties = __webpack_require__("Ff2n");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
|
var slicedToArray = __webpack_require__("ODXe");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js
|
|
|
var KeyCode = __webpack_require__("4IlW");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/pickAttrs.js
|
|
|
var pickAttrs = __webpack_require__("bX4T");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMemo.js
|
|
|
var useMemo = __webpack_require__("YrtM");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__("TSYQ");
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-virtual-list/es/index.js + 19 modules
|
|
|
var es = __webpack_require__("+nKL");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-select/es/TransBtn.js
|
|
|
var TransBtn = __webpack_require__("8OUc");
|
|
|
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-select/es/OptionList.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Using virtual list of option display.
|
|
|
* Will fallback to dom if use customize render.
|
|
|
*/
|
|
|
|
|
|
var OptionList_OptionList = function OptionList(_ref, ref) {
|
|
|
var prefixCls = _ref.prefixCls,
|
|
|
id = _ref.id,
|
|
|
flattenOptions = _ref.flattenOptions,
|
|
|
childrenAsData = _ref.childrenAsData,
|
|
|
values = _ref.values,
|
|
|
searchValue = _ref.searchValue,
|
|
|
multiple = _ref.multiple,
|
|
|
defaultActiveFirstOption = _ref.defaultActiveFirstOption,
|
|
|
height = _ref.height,
|
|
|
itemHeight = _ref.itemHeight,
|
|
|
notFoundContent = _ref.notFoundContent,
|
|
|
open = _ref.open,
|
|
|
menuItemSelectedIcon = _ref.menuItemSelectedIcon,
|
|
|
virtual = _ref.virtual,
|
|
|
onSelect = _ref.onSelect,
|
|
|
onToggleOpen = _ref.onToggleOpen,
|
|
|
onActiveValue = _ref.onActiveValue,
|
|
|
onScroll = _ref.onScroll,
|
|
|
onMouseEnter = _ref.onMouseEnter;
|
|
|
var itemPrefixCls = "".concat(prefixCls, "-item");
|
|
|
var memoFlattenOptions = Object(useMemo["a" /* default */])(function () {
|
|
|
return flattenOptions;
|
|
|
}, [open, flattenOptions], function (prev, next) {
|
|
|
return next[0] && prev[1] !== next[1];
|
|
|
}); // =========================== List ===========================
|
|
|
|
|
|
var listRef = external_window_React_["useRef"](null);
|
|
|
|
|
|
var onListMouseDown = function onListMouseDown(event) {
|
|
|
event.preventDefault();
|
|
|
};
|
|
|
|
|
|
var scrollIntoView = function scrollIntoView(index) {
|
|
|
if (listRef.current) {
|
|
|
listRef.current.scrollTo({
|
|
|
index: index
|
|
|
});
|
|
|
}
|
|
|
}; // ========================== Active ==========================
|
|
|
|
|
|
|
|
|
var getEnabledActiveIndex = function getEnabledActiveIndex(index) {
|
|
|
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
|
var len = memoFlattenOptions.length;
|
|
|
|
|
|
for (var i = 0; i < len; i += 1) {
|
|
|
var current = (index + i * offset + len) % len;
|
|
|
var _memoFlattenOptions$c = memoFlattenOptions[current],
|
|
|
group = _memoFlattenOptions$c.group,
|
|
|
data = _memoFlattenOptions$c.data;
|
|
|
|
|
|
if (!group && !data.disabled) {
|
|
|
return current;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return -1;
|
|
|
};
|
|
|
|
|
|
var _React$useState = external_window_React_["useState"](function () {
|
|
|
return getEnabledActiveIndex(0);
|
|
|
}),
|
|
|
_React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2),
|
|
|
activeIndex = _React$useState2[0],
|
|
|
setActiveIndex = _React$useState2[1];
|
|
|
|
|
|
var setActive = function setActive(index) {
|
|
|
setActiveIndex(index); // Trigger active event
|
|
|
|
|
|
var flattenItem = memoFlattenOptions[index];
|
|
|
|
|
|
if (!flattenItem) {
|
|
|
onActiveValue(null, -1);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
onActiveValue(flattenItem.data.value, index);
|
|
|
}; // Auto active first item when list length or searchValue changed
|
|
|
|
|
|
|
|
|
external_window_React_["useEffect"](function () {
|
|
|
setActive(defaultActiveFirstOption !== false ? getEnabledActiveIndex(0) : -1);
|
|
|
}, [memoFlattenOptions.length, searchValue]); // Auto scroll to item position in single mode
|
|
|
|
|
|
external_window_React_["useEffect"](function () {
|
|
|
/**
|
|
|
* React will skip `onChange` when component update.
|
|
|
* `setActive` function will call root accessibility state update which makes re-render.
|
|
|
* So we need to delay to let Input component trigger onChange first.
|
|
|
*/
|
|
|
var timeoutId = setTimeout(function () {
|
|
|
if (!multiple && open && values.size === 1) {
|
|
|
var value = Array.from(values)[0];
|
|
|
var index = memoFlattenOptions.findIndex(function (_ref2) {
|
|
|
var data = _ref2.data;
|
|
|
return data.value === value;
|
|
|
});
|
|
|
setActive(index);
|
|
|
scrollIntoView(index);
|
|
|
}
|
|
|
});
|
|
|
return function () {
|
|
|
return clearTimeout(timeoutId);
|
|
|
};
|
|
|
}, [open]); // ========================== Values ==========================
|
|
|
|
|
|
var onSelectValue = function onSelectValue(value) {
|
|
|
if (value !== undefined) {
|
|
|
onSelect(value, {
|
|
|
selected: !values.has(value)
|
|
|
});
|
|
|
} // Single mode should always close by select
|
|
|
|
|
|
|
|
|
if (!multiple) {
|
|
|
onToggleOpen(false);
|
|
|
}
|
|
|
}; // ========================= Keyboard =========================
|
|
|
|
|
|
|
|
|
external_window_React_["useImperativeHandle"](ref, function () {
|
|
|
return {
|
|
|
onKeyDown: function onKeyDown(event) {
|
|
|
var which = event.which;
|
|
|
|
|
|
switch (which) {
|
|
|
// >>> Arrow keys
|
|
|
case KeyCode["a" /* default */].UP:
|
|
|
case KeyCode["a" /* default */].DOWN:
|
|
|
{
|
|
|
var offset = 0;
|
|
|
|
|
|
if (which === KeyCode["a" /* default */].UP) {
|
|
|
offset = -1;
|
|
|
} else if (which === KeyCode["a" /* default */].DOWN) {
|
|
|
offset = 1;
|
|
|
}
|
|
|
|
|
|
if (offset !== 0) {
|
|
|
var nextActiveIndex = getEnabledActiveIndex(activeIndex + offset, offset);
|
|
|
scrollIntoView(nextActiveIndex);
|
|
|
setActive(nextActiveIndex);
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
}
|
|
|
// >>> Select
|
|
|
|
|
|
case KeyCode["a" /* default */].ENTER:
|
|
|
{
|
|
|
// value
|
|
|
var item = memoFlattenOptions[activeIndex];
|
|
|
|
|
|
if (item && !item.data.disabled) {
|
|
|
onSelectValue(item.data.value);
|
|
|
} else {
|
|
|
onSelectValue(undefined);
|
|
|
}
|
|
|
|
|
|
if (open) {
|
|
|
event.preventDefault();
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
}
|
|
|
// >>> Close
|
|
|
|
|
|
case KeyCode["a" /* default */].ESC:
|
|
|
{
|
|
|
onToggleOpen(false);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
onKeyUp: function onKeyUp() {},
|
|
|
scrollTo: function scrollTo(index) {
|
|
|
scrollIntoView(index);
|
|
|
}
|
|
|
};
|
|
|
}); // ========================== Render ==========================
|
|
|
|
|
|
if (memoFlattenOptions.length === 0) {
|
|
|
return external_window_React_["createElement"]("div", {
|
|
|
role: "listbox",
|
|
|
id: "".concat(id, "_list"),
|
|
|
className: "".concat(itemPrefixCls, "-empty"),
|
|
|
onMouseDown: onListMouseDown
|
|
|
}, notFoundContent);
|
|
|
}
|
|
|
|
|
|
function renderItem(index) {
|
|
|
var item = memoFlattenOptions[index];
|
|
|
if (!item) return null;
|
|
|
var itemData = item.data || {};
|
|
|
var value = itemData.value,
|
|
|
label = itemData.label,
|
|
|
children = itemData.children;
|
|
|
var attrs = Object(pickAttrs["a" /* default */])(itemData, true);
|
|
|
var mergedLabel = childrenAsData ? children : label;
|
|
|
return item ? external_window_React_["createElement"]("div", Object.assign({
|
|
|
"aria-label": typeof mergedLabel === 'string' ? mergedLabel : null
|
|
|
}, attrs, {
|
|
|
key: index,
|
|
|
role: "option",
|
|
|
id: "".concat(id, "_list_").concat(index),
|
|
|
"aria-selected": values.has(value)
|
|
|
}), value) : null;
|
|
|
}
|
|
|
|
|
|
return external_window_React_["createElement"](external_window_React_["Fragment"], null, external_window_React_["createElement"]("div", {
|
|
|
role: "listbox",
|
|
|
id: "".concat(id, "_list"),
|
|
|
style: {
|
|
|
height: 0,
|
|
|
width: 0,
|
|
|
overflow: 'hidden'
|
|
|
}
|
|
|
}, renderItem(activeIndex - 1), renderItem(activeIndex), renderItem(activeIndex + 1)), external_window_React_["createElement"](es["a" /* default */], {
|
|
|
itemKey: "key",
|
|
|
ref: listRef,
|
|
|
data: memoFlattenOptions,
|
|
|
height: height,
|
|
|
itemHeight: itemHeight,
|
|
|
fullHeight: false,
|
|
|
onMouseDown: onListMouseDown,
|
|
|
onScroll: onScroll,
|
|
|
virtual: virtual,
|
|
|
onMouseEnter: onMouseEnter
|
|
|
}, function (_ref3, itemIndex) {
|
|
|
var _classNames;
|
|
|
|
|
|
var group = _ref3.group,
|
|
|
groupOption = _ref3.groupOption,
|
|
|
data = _ref3.data;
|
|
|
var label = data.label,
|
|
|
key = data.key; // Group
|
|
|
|
|
|
if (group) {
|
|
|
return external_window_React_["createElement"]("div", {
|
|
|
className: classnames_default()(itemPrefixCls, "".concat(itemPrefixCls, "-group"))
|
|
|
}, label !== undefined ? label : key);
|
|
|
}
|
|
|
|
|
|
var disabled = data.disabled,
|
|
|
value = data.value,
|
|
|
title = data.title,
|
|
|
children = data.children,
|
|
|
style = data.style,
|
|
|
className = data.className,
|
|
|
otherProps = Object(objectWithoutProperties["a" /* default */])(data, ["disabled", "value", "title", "children", "style", "className"]); // Option
|
|
|
|
|
|
|
|
|
var selected = values.has(value);
|
|
|
var optionPrefixCls = "".concat(itemPrefixCls, "-option");
|
|
|
var optionClassName = classnames_default()(itemPrefixCls, optionPrefixCls, className, (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, "".concat(optionPrefixCls, "-grouped"), groupOption), Object(defineProperty["a" /* default */])(_classNames, "".concat(optionPrefixCls, "-active"), activeIndex === itemIndex && !disabled), Object(defineProperty["a" /* default */])(_classNames, "".concat(optionPrefixCls, "-disabled"), disabled), Object(defineProperty["a" /* default */])(_classNames, "".concat(optionPrefixCls, "-selected"), selected), _classNames));
|
|
|
var mergedLabel = childrenAsData ? children : label;
|
|
|
var iconVisible = !menuItemSelectedIcon || typeof menuItemSelectedIcon === 'function' || selected;
|
|
|
return external_window_React_["createElement"]("div", Object.assign({}, otherProps, {
|
|
|
"aria-selected": selected,
|
|
|
className: optionClassName,
|
|
|
title: title,
|
|
|
onMouseMove: function onMouseMove() {
|
|
|
if (activeIndex === itemIndex || disabled) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
setActive(itemIndex);
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
if (!disabled) {
|
|
|
onSelectValue(value);
|
|
|
}
|
|
|
},
|
|
|
style: style
|
|
|
}), external_window_React_["createElement"]("div", {
|
|
|
className: "".concat(optionPrefixCls, "-content")
|
|
|
}, mergedLabel || value), external_window_React_["isValidElement"](menuItemSelectedIcon) || selected, iconVisible && external_window_React_["createElement"](TransBtn["a" /* default */], {
|
|
|
className: "".concat(itemPrefixCls, "-option-state"),
|
|
|
customizeIcon: menuItemSelectedIcon,
|
|
|
customizeIconProps: {
|
|
|
isSelected: selected
|
|
|
}
|
|
|
}, selected ? '✓' : null));
|
|
|
}));
|
|
|
};
|
|
|
|
|
|
var RefOptionList = external_window_React_["forwardRef"](OptionList_OptionList);
|
|
|
RefOptionList.displayName = 'OptionList';
|
|
|
/* harmony default export */ var es_OptionList = (RefOptionList);
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-select/es/Option.js
|
|
|
/** This is a placeholder, not real render in dom */
|
|
|
var Option = function Option() {
|
|
|
return null;
|
|
|
};
|
|
|
|
|
|
Option.isSelectOption = true;
|
|
|
/* harmony default export */ var es_Option = (Option);
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-select/es/OptGroup.js
|
|
|
/** This is a placeholder, not real render in dom */
|
|
|
var OptGroup = function OptGroup() {
|
|
|
return null;
|
|
|
};
|
|
|
|
|
|
OptGroup.isSelectOptGroup = true;
|
|
|
/* harmony default export */ var es_OptGroup = (OptGroup);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__("VTBJ");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js
|
|
|
var toArray = __webpack_require__("Zm9Q");
|
|
|
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-select/es/utils/legacyUtil.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function convertNodeToOption(node) {
|
|
|
var key = node.key,
|
|
|
_node$props = node.props,
|
|
|
children = _node$props.children,
|
|
|
value = _node$props.value,
|
|
|
restProps = Object(objectWithoutProperties["a" /* default */])(_node$props, ["children", "value"]);
|
|
|
|
|
|
return Object(objectSpread2["a" /* default */])({
|
|
|
key: key,
|
|
|
value: value !== undefined ? value : key,
|
|
|
children: children
|
|
|
}, restProps);
|
|
|
}
|
|
|
|
|
|
function convertChildrenToData(nodes) {
|
|
|
var optionOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
|
return Object(toArray["a" /* default */])(nodes).map(function (node, index) {
|
|
|
if (!external_window_React_["isValidElement"](node) || !node.type) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
var isSelectOptGroup = node.type.isSelectOptGroup,
|
|
|
key = node.key,
|
|
|
_node$props2 = node.props,
|
|
|
children = _node$props2.children,
|
|
|
restProps = Object(objectWithoutProperties["a" /* default */])(_node$props2, ["children"]);
|
|
|
|
|
|
if (optionOnly || !isSelectOptGroup) {
|
|
|
return convertNodeToOption(node);
|
|
|
}
|
|
|
|
|
|
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
|
|
|
key: "__RC_SELECT_GRP__".concat(key === null ? index : key, "__"),
|
|
|
label: key
|
|
|
}, restProps), {}, {
|
|
|
options: convertChildrenToData(children)
|
|
|
});
|
|
|
}).filter(function (data) {
|
|
|
return data;
|
|
|
});
|
|
|
}
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-select/es/utils/valueUtil.js
|
|
|
var valueUtil = __webpack_require__("2Qr1");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-select/es/generate.js + 11 modules
|
|
|
var generate = __webpack_require__("qNPg");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
|
var esm_typeof = __webpack_require__("U8pU");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
|
|
|
var warning = __webpack_require__("Kwbf");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-select/es/utils/commonUtil.js
|
|
|
var commonUtil = __webpack_require__("WKfj");
|
|
|
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-select/es/utils/warningPropsUtil.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function warningProps(props) {
|
|
|
var mode = props.mode,
|
|
|
options = props.options,
|
|
|
children = props.children,
|
|
|
backfill = props.backfill,
|
|
|
allowClear = props.allowClear,
|
|
|
placeholder = props.placeholder,
|
|
|
getInputElement = props.getInputElement,
|
|
|
showSearch = props.showSearch,
|
|
|
onSearch = props.onSearch,
|
|
|
defaultOpen = props.defaultOpen,
|
|
|
autoFocus = props.autoFocus,
|
|
|
labelInValue = props.labelInValue,
|
|
|
value = props.value,
|
|
|
inputValue = props.inputValue,
|
|
|
optionLabelProp = props.optionLabelProp;
|
|
|
var multiple = mode === 'multiple' || mode === 'tags';
|
|
|
var mergedShowSearch = showSearch !== undefined ? showSearch : multiple || mode === 'combobox';
|
|
|
var mergedOptions = options || convertChildrenToData(children); // `tags` should not set option as disabled
|
|
|
|
|
|
Object(warning["a" /* default */])(mode !== 'tags' || mergedOptions.every(function (opt) {
|
|
|
return !opt.disabled;
|
|
|
}), 'Please avoid setting option to disabled in tags mode since user can always type text as tag.'); // `combobox` & `tags` should option be `string` type
|
|
|
|
|
|
if (mode === 'tags' || mode === 'combobox') {
|
|
|
var hasNumberValue = mergedOptions.some(function (item) {
|
|
|
if (item.options) {
|
|
|
return item.options.some(function (opt) {
|
|
|
return typeof ('value' in opt ? opt.value : opt.key) === 'number';
|
|
|
});
|
|
|
}
|
|
|
|
|
|
return typeof ('value' in item ? item.value : item.key) === 'number';
|
|
|
});
|
|
|
Object(warning["a" /* default */])(!hasNumberValue, '`value` of Option should not use number type when `mode` is `tags` or `combobox`.');
|
|
|
} // `combobox` should not use `optionLabelProp`
|
|
|
|
|
|
|
|
|
Object(warning["a" /* default */])(mode !== 'combobox' || !optionLabelProp, '`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly.'); // Only `combobox` support `backfill`
|
|
|
|
|
|
Object(warning["a" /* default */])(mode === 'combobox' || !backfill, '`backfill` only works with `combobox` mode.'); // Only `combobox` support `getInputElement`
|
|
|
|
|
|
Object(warning["a" /* default */])(mode === 'combobox' || !getInputElement, '`getInputElement` only work with `combobox` mode.'); // Customize `getInputElement` should not use `allowClear` & `placeholder`
|
|
|
|
|
|
Object(warning["b" /* noteOnce */])(mode !== 'combobox' || !getInputElement || !allowClear || !placeholder, 'Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`.'); // `onSearch` should use in `combobox` or `showSearch`
|
|
|
|
|
|
if (onSearch && !mergedShowSearch && mode !== 'combobox' && mode !== 'tags') {
|
|
|
Object(warning["a" /* default */])(false, '`onSearch` should work with `showSearch` instead of use alone.');
|
|
|
}
|
|
|
|
|
|
Object(warning["b" /* noteOnce */])(!defaultOpen || autoFocus, '`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed.');
|
|
|
|
|
|
if (value !== undefined && value !== null) {
|
|
|
var values = Object(commonUtil["d" /* toArray */])(value);
|
|
|
Object(warning["a" /* default */])(!labelInValue || values.every(function (val) {
|
|
|
return Object(esm_typeof["a" /* default */])(val) === 'object' && ('key' in val || 'value' in val);
|
|
|
}), '`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`');
|
|
|
Object(warning["a" /* default */])(!multiple || Array.isArray(value), '`value` should be array when `mode` is `multiple` or `tags`');
|
|
|
} // Syntactic sugar should use correct children type
|
|
|
|
|
|
|
|
|
if (children) {
|
|
|
var invalidateChildType = null;
|
|
|
Object(toArray["a" /* default */])(children).some(function (node) {
|
|
|
if (!external_window_React_["isValidElement"](node) || !node.type) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
var type = node.type;
|
|
|
|
|
|
if (type.isSelectOption) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
if (type.isSelectOptGroup) {
|
|
|
var allChildrenValid = Object(toArray["a" /* default */])(node.props.children).every(function (subNode) {
|
|
|
if (!external_window_React_["isValidElement"](subNode) || !node.type || subNode.type.isSelectOption) {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
invalidateChildType = subNode.type;
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
if (allChildrenValid) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
invalidateChildType = type;
|
|
|
return true;
|
|
|
});
|
|
|
|
|
|
if (invalidateChildType) {
|
|
|
Object(warning["a" /* default */])(false, "`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(invalidateChildType.displayName || invalidateChildType.name || invalidateChildType, "`."));
|
|
|
}
|
|
|
|
|
|
Object(warning["a" /* default */])(inputValue === undefined, '`inputValue` is deprecated, please use `searchValue` instead.');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var warningPropsUtil = (warningProps);
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-select/es/Select.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* To match accessibility requirement, we always provide an input in the component.
|
|
|
* Other element will not set `tabIndex` to avoid `onBlur` sequence problem.
|
|
|
* For focused select, we set `aria-live="polite"` to update the accessibility content.
|
|
|
*
|
|
|
* ref:
|
|
|
* - keyboard: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role#Keyboard_interactions
|
|
|
*
|
|
|
* New api:
|
|
|
* - listHeight
|
|
|
* - listItemHeight
|
|
|
* - component
|
|
|
*
|
|
|
* Remove deprecated api:
|
|
|
* - multiple
|
|
|
* - tags
|
|
|
* - combobox
|
|
|
* - firstActiveValue
|
|
|
* - dropdownMenuStyle
|
|
|
* - openClassName (Not list in api)
|
|
|
*
|
|
|
* Update:
|
|
|
* - `backfill` only support `combobox` mode
|
|
|
* - `combobox` mode not support `labelInValue` since it's meaningless
|
|
|
* - `getInputElement` only support `combobox` mode
|
|
|
* - `onChange` return OptionData instead of ReactNode
|
|
|
* - `filterOption` `onChange` `onSelect` accept OptionData instead of ReactNode
|
|
|
* - `combobox` mode trigger `onChange` will get `undefined` if no `value` match in Option
|
|
|
* - `combobox` mode not support `optionLabelProp`
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var RefSelect = Object(generate["a" /* default */])({
|
|
|
prefixCls: 'rc-select',
|
|
|
components: {
|
|
|
optionList: es_OptionList
|
|
|
},
|
|
|
convertChildrenToData: convertChildrenToData,
|
|
|
flattenOptions: valueUtil["d" /* flattenOptions */],
|
|
|
getLabeledValue: valueUtil["e" /* getLabeledValue */],
|
|
|
filterOptions: valueUtil["b" /* filterOptions */],
|
|
|
isValueDisabled: valueUtil["g" /* isValueDisabled */],
|
|
|
findValueOption: valueUtil["c" /* findValueOption */],
|
|
|
warningProps: warningPropsUtil,
|
|
|
fillOptionsWithMissingValue: valueUtil["a" /* fillOptionsWithMissingValue */]
|
|
|
});
|
|
|
/**
|
|
|
* Typescript not support generic with function component,
|
|
|
* we have to wrap an class component to handle this.
|
|
|
*/
|
|
|
|
|
|
var Select_Select = /*#__PURE__*/function (_React$Component) {
|
|
|
Object(inherits["a" /* default */])(Select, _React$Component);
|
|
|
|
|
|
var _super = Object(createSuper["a" /* default */])(Select);
|
|
|
|
|
|
function Select() {
|
|
|
var _this;
|
|
|
|
|
|
Object(classCallCheck["a" /* default */])(this, Select);
|
|
|
|
|
|
_this = _super.apply(this, arguments);
|
|
|
_this.selectRef = external_window_React_["createRef"]();
|
|
|
|
|
|
_this.focus = function () {
|
|
|
_this.selectRef.current.focus();
|
|
|
};
|
|
|
|
|
|
_this.blur = function () {
|
|
|
_this.selectRef.current.blur();
|
|
|
};
|
|
|
|
|
|
return _this;
|
|
|
}
|
|
|
|
|
|
Object(createClass["a" /* default */])(Select, [{
|
|
|
key: "render",
|
|
|
value: function render() {
|
|
|
return external_window_React_["createElement"](RefSelect, Object.assign({
|
|
|
ref: this.selectRef
|
|
|
}, this.props));
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
return Select;
|
|
|
}(external_window_React_["Component"]);
|
|
|
|
|
|
Select_Select.Option = es_Option;
|
|
|
Select_Select.OptGroup = es_OptGroup;
|
|
|
/* harmony default export */ var es_Select = (Select_Select);
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-select/es/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var rc_select_es = __webpack_exports__["c"] = (es_Select);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "OLES":
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./node_modules/rc-tooltip/es/index.js + 2 modules ***!
|
|
|
\*********************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tooltip/es/placements.js because of ./node_modules/antd/es/tooltip/placements.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
|
var esm_typeof = __webpack_require__("U8pU");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__("VTBJ");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
|
var objectWithoutProperties = __webpack_require__("Ff2n");
|
|
|
|
|
|
// EXTERNAL MODULE: external "window.React"
|
|
|
var external_window_React_ = __webpack_require__("cDcd");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-trigger/es/index.js + 5 modules
|
|
|
var es = __webpack_require__("uciX");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-tooltip/es/placements.js
|
|
|
var placements = __webpack_require__("7ixt");
|
|
|
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-tooltip/es/Content.js
|
|
|
|
|
|
|
|
|
var Content_Content = function Content(props) {
|
|
|
var overlay = props.overlay,
|
|
|
prefixCls = props.prefixCls,
|
|
|
id = props.id,
|
|
|
overlayInnerStyle = props.overlayInnerStyle;
|
|
|
return external_window_React_["createElement"]("div", {
|
|
|
className: "".concat(prefixCls, "-inner"),
|
|
|
id: id,
|
|
|
role: "tooltip",
|
|
|
style: overlayInnerStyle
|
|
|
}, typeof overlay === 'function' ? overlay() : overlay);
|
|
|
};
|
|
|
|
|
|
/* harmony default export */ var es_Content = (Content_Content);
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-tooltip/es/Tooltip.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Tooltip_Tooltip = function Tooltip(props, ref) {
|
|
|
var overlayClassName = props.overlayClassName,
|
|
|
_props$trigger = props.trigger,
|
|
|
trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger,
|
|
|
_props$mouseEnterDela = props.mouseEnterDelay,
|
|
|
mouseEnterDelay = _props$mouseEnterDela === void 0 ? 0 : _props$mouseEnterDela,
|
|
|
_props$mouseLeaveDela = props.mouseLeaveDelay,
|
|
|
mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela,
|
|
|
overlayStyle = props.overlayStyle,
|
|
|
_props$prefixCls = props.prefixCls,
|
|
|
prefixCls = _props$prefixCls === void 0 ? 'rc-tooltip' : _props$prefixCls,
|
|
|
children = props.children,
|
|
|
onVisibleChange = props.onVisibleChange,
|
|
|
afterVisibleChange = props.afterVisibleChange,
|
|
|
transitionName = props.transitionName,
|
|
|
animation = props.animation,
|
|
|
_props$placement = props.placement,
|
|
|
placement = _props$placement === void 0 ? 'right' : _props$placement,
|
|
|
_props$align = props.align,
|
|
|
align = _props$align === void 0 ? {} : _props$align,
|
|
|
_props$destroyTooltip = props.destroyTooltipOnHide,
|
|
|
destroyTooltipOnHide = _props$destroyTooltip === void 0 ? false : _props$destroyTooltip,
|
|
|
defaultVisible = props.defaultVisible,
|
|
|
getTooltipContainer = props.getTooltipContainer,
|
|
|
overlayInnerStyle = props.overlayInnerStyle,
|
|
|
restProps = Object(objectWithoutProperties["a" /* default */])(props, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer", "overlayInnerStyle"]);
|
|
|
|
|
|
var domRef = Object(external_window_React_["useRef"])(null);
|
|
|
Object(external_window_React_["useImperativeHandle"])(ref, function () {
|
|
|
return domRef.current;
|
|
|
});
|
|
|
|
|
|
var extraProps = Object(objectSpread2["a" /* default */])({}, restProps);
|
|
|
|
|
|
if ('visible' in props) {
|
|
|
extraProps.popupVisible = props.visible;
|
|
|
}
|
|
|
|
|
|
var getPopupElement = function getPopupElement() {
|
|
|
var _props$arrowContent = props.arrowContent,
|
|
|
arrowContent = _props$arrowContent === void 0 ? null : _props$arrowContent,
|
|
|
overlay = props.overlay,
|
|
|
id = props.id;
|
|
|
return [external_window_React_["createElement"]("div", {
|
|
|
className: "".concat(prefixCls, "-arrow"),
|
|
|
key: "arrow"
|
|
|
}, arrowContent), external_window_React_["createElement"](es_Content, {
|
|
|
key: "content",
|
|
|
prefixCls: prefixCls,
|
|
|
id: id,
|
|
|
overlay: overlay,
|
|
|
overlayInnerStyle: overlayInnerStyle
|
|
|
})];
|
|
|
};
|
|
|
|
|
|
var destroyTooltip = false;
|
|
|
var autoDestroy = false;
|
|
|
|
|
|
if (typeof destroyTooltipOnHide === 'boolean') {
|
|
|
destroyTooltip = destroyTooltipOnHide;
|
|
|
} else if (destroyTooltipOnHide && Object(esm_typeof["a" /* default */])(destroyTooltipOnHide) === 'object') {
|
|
|
var keepParent = destroyTooltipOnHide.keepParent;
|
|
|
destroyTooltip = keepParent === true;
|
|
|
autoDestroy = keepParent === false;
|
|
|
}
|
|
|
|
|
|
return external_window_React_["createElement"](es["a" /* default */], Object.assign({
|
|
|
popupClassName: overlayClassName,
|
|
|
prefixCls: prefixCls,
|
|
|
popup: getPopupElement,
|
|
|
action: trigger,
|
|
|
builtinPlacements: placements["a" /* placements */],
|
|
|
popupPlacement: placement,
|
|
|
ref: domRef,
|
|
|
popupAlign: align,
|
|
|
getPopupContainer: getTooltipContainer,
|
|
|
onPopupVisibleChange: onVisibleChange,
|
|
|
afterPopupVisibleChange: afterVisibleChange,
|
|
|
popupTransitionName: transitionName,
|
|
|
popupAnimation: animation,
|
|
|
defaultPopupVisible: defaultVisible,
|
|
|
destroyPopupOnHide: destroyTooltip,
|
|
|
autoDestroy: autoDestroy,
|
|
|
mouseLeaveDelay: mouseLeaveDelay,
|
|
|
popupStyle: overlayStyle,
|
|
|
mouseEnterDelay: mouseEnterDelay
|
|
|
}, extraProps), children);
|
|
|
};
|
|
|
|
|
|
/* harmony default export */ var es_Tooltip = (Object(external_window_React_["forwardRef"])(Tooltip_Tooltip));
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-tooltip/es/index.js
|
|
|
|
|
|
/* harmony default export */ var rc_tooltip_es = __webpack_exports__["a"] = (es_Tooltip);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "PsNh":
|
|
|
/*!*********************************************************************************!*\
|
|
|
!*** ./src/pages/Engineering/components/Evaluate/SelectWrap/index.less?modules ***!
|
|
|
\*********************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
module.exports = {"selectWrapContainer":"selectWrapContainer___M4-WR"};
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "Y1PL":
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/rc-textarea/es/index.js + 7 modules ***!
|
|
|
\**********************************************************/
|
|
|
/*! exports provided: ResizableTextArea, default */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
// ESM COMPAT FLAG
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, "ResizableTextArea", function() { return /* reexport */ es_ResizableTextArea; });
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__("wx14");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
|
var classCallCheck = __webpack_require__("1OyB");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
|
var createClass = __webpack_require__("vuIU");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
|
|
|
var inherits = __webpack_require__("Ji7U");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
|
|
|
var createSuper = __webpack_require__("LK+K");
|
|
|
|
|
|
// EXTERNAL MODULE: external "window.React"
|
|
|
var external_window_React_ = __webpack_require__("cDcd");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__("VTBJ");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
|
var defineProperty = __webpack_require__("rePB");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js
|
|
|
var toArray = __webpack_require__("Zm9Q");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
|
|
|
var warning = __webpack_require__("Kwbf");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
|
|
|
var ref = __webpack_require__("c+Xe");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js
|
|
|
var findDOMNode = __webpack_require__("m+aA");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
|
|
|
var ResizeObserver_es = __webpack_require__("bdgK");
|
|
|
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/utils/observerUtil.js
|
|
|
// =============================== Const ===============================
|
|
|
|
|
|
var elementListeners = new Map();
|
|
|
|
|
|
function observerUtil_onResize(entities) {
|
|
|
entities.forEach(function (entity) {
|
|
|
var _elementListeners$get;
|
|
|
|
|
|
var target = entity.target;
|
|
|
(_elementListeners$get = elementListeners.get(target)) === null || _elementListeners$get === void 0 ? void 0 : _elementListeners$get.forEach(function (listener) {
|
|
|
return listener(target);
|
|
|
});
|
|
|
});
|
|
|
} // Note: ResizeObserver polyfill not support option to measure border-box resize
|
|
|
|
|
|
|
|
|
var resizeObserver = new ResizeObserver_es["default"](observerUtil_onResize); // Dev env only
|
|
|
|
|
|
var _el = false ? undefined : null; // eslint-disable-line
|
|
|
|
|
|
var _rs = false ? undefined : null; // eslint-disable-line
|
|
|
// ============================== Observe ==============================
|
|
|
|
|
|
function observe(element, callback) {
|
|
|
if (!elementListeners.has(element)) {
|
|
|
elementListeners.set(element, new Set());
|
|
|
resizeObserver.observe(element);
|
|
|
}
|
|
|
|
|
|
elementListeners.get(element).add(callback);
|
|
|
}
|
|
|
function unobserve(element, callback) {
|
|
|
if (elementListeners.has(element)) {
|
|
|
elementListeners.get(element).delete(callback);
|
|
|
|
|
|
if (!elementListeners.get(element).size) {
|
|
|
resizeObserver.unobserve(element);
|
|
|
elementListeners.delete(element);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/SingleObserver/DomWrapper.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Fallback to findDOMNode if origin ref do not provide any dom element
|
|
|
*/
|
|
|
|
|
|
var DomWrapper_DomWrapper = /*#__PURE__*/function (_React$Component) {
|
|
|
Object(inherits["a" /* default */])(DomWrapper, _React$Component);
|
|
|
|
|
|
var _super = Object(createSuper["a" /* default */])(DomWrapper);
|
|
|
|
|
|
function DomWrapper() {
|
|
|
Object(classCallCheck["a" /* default */])(this, DomWrapper);
|
|
|
|
|
|
return _super.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
Object(createClass["a" /* default */])(DomWrapper, [{
|
|
|
key: "render",
|
|
|
value: function render() {
|
|
|
return this.props.children;
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
return DomWrapper;
|
|
|
}(external_window_React_["Component"]);
|
|
|
|
|
|
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/Collection.js
|
|
|
|
|
|
var CollectionContext = /*#__PURE__*/external_window_React_["createContext"](null);
|
|
|
/**
|
|
|
* Collect all the resize event from children ResizeObserver
|
|
|
*/
|
|
|
|
|
|
function Collection(_ref) {
|
|
|
var children = _ref.children,
|
|
|
onBatchResize = _ref.onBatchResize;
|
|
|
var resizeIdRef = external_window_React_["useRef"](0);
|
|
|
var resizeInfosRef = external_window_React_["useRef"]([]);
|
|
|
var onCollectionResize = external_window_React_["useContext"](CollectionContext);
|
|
|
var onResize = external_window_React_["useCallback"](function (size, element, data) {
|
|
|
resizeIdRef.current += 1;
|
|
|
var currentId = resizeIdRef.current;
|
|
|
resizeInfosRef.current.push({
|
|
|
size: size,
|
|
|
element: element,
|
|
|
data: data
|
|
|
});
|
|
|
Promise.resolve().then(function () {
|
|
|
if (currentId === resizeIdRef.current) {
|
|
|
onBatchResize === null || onBatchResize === void 0 ? void 0 : onBatchResize(resizeInfosRef.current);
|
|
|
resizeInfosRef.current = [];
|
|
|
}
|
|
|
}); // Continue bubbling if parent exist
|
|
|
|
|
|
onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(size, element, data);
|
|
|
}, [onBatchResize, onCollectionResize]);
|
|
|
return /*#__PURE__*/external_window_React_["createElement"](CollectionContext.Provider, {
|
|
|
value: onResize
|
|
|
}, children);
|
|
|
}
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/SingleObserver/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function SingleObserver(props) {
|
|
|
var children = props.children,
|
|
|
disabled = props.disabled;
|
|
|
var elementRef = external_window_React_["useRef"](null);
|
|
|
var wrapperRef = external_window_React_["useRef"](null);
|
|
|
var onCollectionResize = external_window_React_["useContext"](CollectionContext); // ============================= Size =============================
|
|
|
|
|
|
var sizeRef = external_window_React_["useRef"]({
|
|
|
width: -1,
|
|
|
height: -1,
|
|
|
offsetWidth: -1,
|
|
|
offsetHeight: -1
|
|
|
}); // ============================= Ref ==============================
|
|
|
|
|
|
var canRef = /*#__PURE__*/external_window_React_["isValidElement"](children) && Object(ref["c" /* supportRef */])(children);
|
|
|
var originRef = canRef ? children.ref : null;
|
|
|
var mergedRef = external_window_React_["useMemo"](function () {
|
|
|
return Object(ref["a" /* composeRef */])(originRef, elementRef);
|
|
|
}, [originRef, elementRef]); // =========================== Observe ============================
|
|
|
|
|
|
var propsRef = external_window_React_["useRef"](props);
|
|
|
propsRef.current = props; // Handler
|
|
|
|
|
|
var onInternalResize = external_window_React_["useCallback"](function (target) {
|
|
|
var _propsRef$current = propsRef.current,
|
|
|
onResize = _propsRef$current.onResize,
|
|
|
data = _propsRef$current.data;
|
|
|
|
|
|
var _target$getBoundingCl = target.getBoundingClientRect(),
|
|
|
width = _target$getBoundingCl.width,
|
|
|
height = _target$getBoundingCl.height;
|
|
|
|
|
|
var offsetWidth = target.offsetWidth,
|
|
|
offsetHeight = target.offsetHeight;
|
|
|
/**
|
|
|
* Resize observer trigger when content size changed.
|
|
|
* In most case we just care about element size,
|
|
|
* let's use `boundary` instead of `contentRect` here to avoid shaking.
|
|
|
*/
|
|
|
|
|
|
var fixedWidth = Math.floor(width);
|
|
|
var fixedHeight = Math.floor(height);
|
|
|
|
|
|
if (sizeRef.current.width !== fixedWidth || sizeRef.current.height !== fixedHeight || sizeRef.current.offsetWidth !== offsetWidth || sizeRef.current.offsetHeight !== offsetHeight) {
|
|
|
var size = {
|
|
|
width: fixedWidth,
|
|
|
height: fixedHeight,
|
|
|
offsetWidth: offsetWidth,
|
|
|
offsetHeight: offsetHeight
|
|
|
};
|
|
|
sizeRef.current = size; // IE is strange, right?
|
|
|
|
|
|
var mergedOffsetWidth = offsetWidth === Math.round(width) ? width : offsetWidth;
|
|
|
var mergedOffsetHeight = offsetHeight === Math.round(height) ? height : offsetHeight;
|
|
|
|
|
|
var sizeInfo = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, size), {}, {
|
|
|
offsetWidth: mergedOffsetWidth,
|
|
|
offsetHeight: mergedOffsetHeight
|
|
|
}); // Let collection know what happened
|
|
|
|
|
|
|
|
|
onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(sizeInfo, target, data);
|
|
|
|
|
|
if (onResize) {
|
|
|
// defer the callback but not defer to next frame
|
|
|
Promise.resolve().then(function () {
|
|
|
onResize(sizeInfo, target);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
}, []); // Dynamic observe
|
|
|
|
|
|
external_window_React_["useEffect"](function () {
|
|
|
var currentElement = Object(findDOMNode["a" /* default */])(elementRef.current) || Object(findDOMNode["a" /* default */])(wrapperRef.current);
|
|
|
|
|
|
if (currentElement && !disabled) {
|
|
|
observe(currentElement, onInternalResize);
|
|
|
}
|
|
|
|
|
|
return function () {
|
|
|
return unobserve(currentElement, onInternalResize);
|
|
|
};
|
|
|
}, [elementRef.current, disabled]); // ============================ Render ============================
|
|
|
|
|
|
return /*#__PURE__*/external_window_React_["createElement"](DomWrapper_DomWrapper, {
|
|
|
ref: wrapperRef
|
|
|
}, canRef ? /*#__PURE__*/external_window_React_["cloneElement"](children, {
|
|
|
ref: mergedRef
|
|
|
}) : children);
|
|
|
}
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var INTERNAL_PREFIX_KEY = 'rc-observer-key';
|
|
|
|
|
|
function ResizeObserver(props) {
|
|
|
var children = props.children;
|
|
|
var childNodes = Object(toArray["a" /* default */])(children);
|
|
|
|
|
|
if (false) {}
|
|
|
|
|
|
return childNodes.map(function (child, index) {
|
|
|
var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(INTERNAL_PREFIX_KEY, "-").concat(index);
|
|
|
return /*#__PURE__*/external_window_React_["createElement"](SingleObserver, Object(esm_extends["a" /* default */])({}, props, {
|
|
|
key: key
|
|
|
}), child);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
ResizeObserver.Collection = Collection;
|
|
|
/* harmony default export */ var es = (ResizeObserver);
|
|
|
// EXTERNAL MODULE: ./node_modules/rc-util/es/omit.js
|
|
|
var omit = __webpack_require__("bT9E");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
|
var classnames = __webpack_require__("TSYQ");
|
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-textarea/es/calculateNodeHeight.js
|
|
|
// Thanks to https://github.com/andreypopp/react-textarea-autosize/
|
|
|
|
|
|
/**
|
|
|
* calculateNodeHeight(uiTextNode, useCache = false)
|
|
|
*/
|
|
|
var HIDDEN_TEXTAREA_STYLE = "\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n";
|
|
|
var SIZING_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'font-variant', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing', 'word-break'];
|
|
|
var computedStyleCache = {};
|
|
|
var hiddenTextarea;
|
|
|
function calculateNodeStyling(node) {
|
|
|
var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
|
var nodeRef = node.getAttribute('id') || node.getAttribute('data-reactid') || node.getAttribute('name');
|
|
|
|
|
|
if (useCache && computedStyleCache[nodeRef]) {
|
|
|
return computedStyleCache[nodeRef];
|
|
|
}
|
|
|
|
|
|
var style = window.getComputedStyle(node);
|
|
|
var boxSizing = style.getPropertyValue('box-sizing') || style.getPropertyValue('-moz-box-sizing') || style.getPropertyValue('-webkit-box-sizing');
|
|
|
var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
|
|
|
var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
|
|
|
var sizingStyle = SIZING_STYLE.map(function (name) {
|
|
|
return "".concat(name, ":").concat(style.getPropertyValue(name));
|
|
|
}).join(';');
|
|
|
var nodeInfo = {
|
|
|
sizingStyle: sizingStyle,
|
|
|
paddingSize: paddingSize,
|
|
|
borderSize: borderSize,
|
|
|
boxSizing: boxSizing
|
|
|
};
|
|
|
|
|
|
if (useCache && nodeRef) {
|
|
|
computedStyleCache[nodeRef] = nodeInfo;
|
|
|
}
|
|
|
|
|
|
return nodeInfo;
|
|
|
}
|
|
|
function calculateNodeHeight(uiTextNode) {
|
|
|
var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
|
var minRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
|
var maxRows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
|
|
|
|
if (!hiddenTextarea) {
|
|
|
hiddenTextarea = document.createElement('textarea');
|
|
|
hiddenTextarea.setAttribute('tab-index', '-1');
|
|
|
hiddenTextarea.setAttribute('aria-hidden', 'true');
|
|
|
document.body.appendChild(hiddenTextarea);
|
|
|
} // Fix wrap="off" issue
|
|
|
// https://github.com/ant-design/ant-design/issues/6577
|
|
|
|
|
|
|
|
|
if (uiTextNode.getAttribute('wrap')) {
|
|
|
hiddenTextarea.setAttribute('wrap', uiTextNode.getAttribute('wrap'));
|
|
|
} else {
|
|
|
hiddenTextarea.removeAttribute('wrap');
|
|
|
} // Copy all CSS properties that have an impact on the height of the content in
|
|
|
// the textbox
|
|
|
|
|
|
|
|
|
var _calculateNodeStyling = calculateNodeStyling(uiTextNode, useCache),
|
|
|
paddingSize = _calculateNodeStyling.paddingSize,
|
|
|
borderSize = _calculateNodeStyling.borderSize,
|
|
|
boxSizing = _calculateNodeStyling.boxSizing,
|
|
|
sizingStyle = _calculateNodeStyling.sizingStyle; // Need to have the overflow attribute to hide the scrollbar otherwise
|
|
|
// text-lines will not calculated properly as the shadow will technically be
|
|
|
// narrower for content
|
|
|
|
|
|
|
|
|
hiddenTextarea.setAttribute('style', "".concat(sizingStyle, ";").concat(HIDDEN_TEXTAREA_STYLE));
|
|
|
hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || '';
|
|
|
var minHeight = Number.MIN_SAFE_INTEGER;
|
|
|
var maxHeight = Number.MAX_SAFE_INTEGER;
|
|
|
var height = hiddenTextarea.scrollHeight;
|
|
|
var overflowY;
|
|
|
|
|
|
if (boxSizing === 'border-box') {
|
|
|
// border-box: add border, since height = content + padding + border
|
|
|
height += borderSize;
|
|
|
} else if (boxSizing === 'content-box') {
|
|
|
// remove padding, since height = content
|
|
|
height -= paddingSize;
|
|
|
}
|
|
|
|
|
|
if (minRows !== null || maxRows !== null) {
|
|
|
// measure height of a textarea with a single row
|
|
|
hiddenTextarea.value = ' ';
|
|
|
var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
|
|
|
|
|
|
if (minRows !== null) {
|
|
|
minHeight = singleRowHeight * minRows;
|
|
|
|
|
|
if (boxSizing === 'border-box') {
|
|
|
minHeight = minHeight + paddingSize + borderSize;
|
|
|
}
|
|
|
|
|
|
height = Math.max(minHeight, height);
|
|
|
}
|
|
|
|
|
|
if (maxRows !== null) {
|
|
|
maxHeight = singleRowHeight * maxRows;
|
|
|
|
|
|
if (boxSizing === 'border-box') {
|
|
|
maxHeight = maxHeight + paddingSize + borderSize;
|
|
|
}
|
|
|
|
|
|
overflowY = height > maxHeight ? '' : 'hidden';
|
|
|
height = Math.min(maxHeight, height);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
height: height,
|
|
|
minHeight: minHeight,
|
|
|
maxHeight: maxHeight,
|
|
|
overflowY: overflowY,
|
|
|
resize: 'none'
|
|
|
};
|
|
|
}
|
|
|
// EXTERNAL MODULE: ./node_modules/shallowequal/index.js
|
|
|
var shallowequal = __webpack_require__("Gytx");
|
|
|
var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal);
|
|
|
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-textarea/es/ResizableTextArea.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
|
|
|
|
var RESIZE_STATUS;
|
|
|
|
|
|
(function (RESIZE_STATUS) {
|
|
|
RESIZE_STATUS[RESIZE_STATUS["NONE"] = 0] = "NONE";
|
|
|
RESIZE_STATUS[RESIZE_STATUS["RESIZING"] = 1] = "RESIZING";
|
|
|
RESIZE_STATUS[RESIZE_STATUS["RESIZED"] = 2] = "RESIZED";
|
|
|
})(RESIZE_STATUS || (RESIZE_STATUS = {}));
|
|
|
|
|
|
var ResizableTextArea_ResizableTextArea = /*#__PURE__*/function (_React$Component) {
|
|
|
Object(inherits["a" /* default */])(ResizableTextArea, _React$Component);
|
|
|
|
|
|
var _super = Object(createSuper["a" /* default */])(ResizableTextArea);
|
|
|
|
|
|
function ResizableTextArea(props) {
|
|
|
var _this;
|
|
|
|
|
|
Object(classCallCheck["a" /* default */])(this, ResizableTextArea);
|
|
|
|
|
|
_this = _super.call(this, props);
|
|
|
_this.nextFrameActionId = void 0;
|
|
|
_this.resizeFrameId = void 0;
|
|
|
_this.textArea = void 0;
|
|
|
|
|
|
_this.saveTextArea = function (textArea) {
|
|
|
_this.textArea = textArea;
|
|
|
};
|
|
|
|
|
|
_this.handleResize = function (size) {
|
|
|
var resizeStatus = _this.state.resizeStatus;
|
|
|
var _this$props = _this.props,
|
|
|
autoSize = _this$props.autoSize,
|
|
|
onResize = _this$props.onResize;
|
|
|
|
|
|
if (resizeStatus !== RESIZE_STATUS.NONE) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (typeof onResize === 'function') {
|
|
|
onResize(size);
|
|
|
}
|
|
|
|
|
|
if (autoSize) {
|
|
|
_this.resizeOnNextFrame();
|
|
|
}
|
|
|
};
|
|
|
|
|
|
_this.resizeOnNextFrame = function () {
|
|
|
cancelAnimationFrame(_this.nextFrameActionId);
|
|
|
_this.nextFrameActionId = requestAnimationFrame(_this.resizeTextarea);
|
|
|
};
|
|
|
|
|
|
_this.resizeTextarea = function () {
|
|
|
var autoSize = _this.props.autoSize;
|
|
|
|
|
|
if (!autoSize || !_this.textArea) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var minRows = autoSize.minRows,
|
|
|
maxRows = autoSize.maxRows;
|
|
|
var textareaStyles = calculateNodeHeight(_this.textArea, false, minRows, maxRows);
|
|
|
|
|
|
_this.setState({
|
|
|
textareaStyles: textareaStyles,
|
|
|
resizeStatus: RESIZE_STATUS.RESIZING
|
|
|
}, function () {
|
|
|
cancelAnimationFrame(_this.resizeFrameId);
|
|
|
_this.resizeFrameId = requestAnimationFrame(function () {
|
|
|
_this.setState({
|
|
|
resizeStatus: RESIZE_STATUS.RESIZED
|
|
|
}, function () {
|
|
|
_this.resizeFrameId = requestAnimationFrame(function () {
|
|
|
_this.setState({
|
|
|
resizeStatus: RESIZE_STATUS.NONE
|
|
|
});
|
|
|
|
|
|
_this.fixFirefoxAutoScroll();
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
|
|
|
_this.renderTextArea = function () {
|
|
|
var _this$props2 = _this.props,
|
|
|
_this$props2$prefixCl = _this$props2.prefixCls,
|
|
|
prefixCls = _this$props2$prefixCl === void 0 ? 'rc-textarea' : _this$props2$prefixCl,
|
|
|
autoSize = _this$props2.autoSize,
|
|
|
onResize = _this$props2.onResize,
|
|
|
className = _this$props2.className,
|
|
|
disabled = _this$props2.disabled;
|
|
|
var _this$state = _this.state,
|
|
|
textareaStyles = _this$state.textareaStyles,
|
|
|
resizeStatus = _this$state.resizeStatus;
|
|
|
var otherProps = Object(omit["a" /* default */])(_this.props, ['prefixCls', 'onPressEnter', 'autoSize', 'defaultValue', 'onResize']);
|
|
|
var cls = classnames_default()(prefixCls, className, Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), disabled)); // Fix https://github.com/ant-design/ant-design/issues/6776
|
|
|
// Make sure it could be reset when using form.getFieldDecorator
|
|
|
|
|
|
if ('value' in otherProps) {
|
|
|
otherProps.value = otherProps.value || '';
|
|
|
}
|
|
|
|
|
|
var style = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this.props.style), textareaStyles), resizeStatus === RESIZE_STATUS.RESIZING ? // React will warning when mix `overflow` & `overflowY`.
|
|
|
// We need to define this separately.
|
|
|
{
|
|
|
overflowX: 'hidden',
|
|
|
overflowY: 'hidden'
|
|
|
} : null);
|
|
|
|
|
|
return /*#__PURE__*/external_window_React_["createElement"](es, {
|
|
|
onResize: _this.handleResize,
|
|
|
disabled: !(autoSize || onResize)
|
|
|
}, /*#__PURE__*/external_window_React_["createElement"]("textarea", Object(esm_extends["a" /* default */])({}, otherProps, {
|
|
|
className: cls,
|
|
|
style: style,
|
|
|
ref: _this.saveTextArea
|
|
|
})));
|
|
|
};
|
|
|
|
|
|
_this.state = {
|
|
|
textareaStyles: {},
|
|
|
resizeStatus: RESIZE_STATUS.NONE
|
|
|
};
|
|
|
return _this;
|
|
|
}
|
|
|
|
|
|
Object(createClass["a" /* default */])(ResizableTextArea, [{
|
|
|
key: "componentDidUpdate",
|
|
|
value: function componentDidUpdate(prevProps) {
|
|
|
// Re-render with the new content or new autoSize property then recalculate the height as required.
|
|
|
if (prevProps.value !== this.props.value || !shallowequal_default()(prevProps.autoSize, this.props.autoSize)) {
|
|
|
this.resizeTextarea();
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
key: "componentWillUnmount",
|
|
|
value: function componentWillUnmount() {
|
|
|
cancelAnimationFrame(this.nextFrameActionId);
|
|
|
cancelAnimationFrame(this.resizeFrameId);
|
|
|
} // https://github.com/ant-design/ant-design/issues/21870
|
|
|
|
|
|
}, {
|
|
|
key: "fixFirefoxAutoScroll",
|
|
|
value: function fixFirefoxAutoScroll() {
|
|
|
try {
|
|
|
if (document.activeElement === this.textArea) {
|
|
|
var currentStart = this.textArea.selectionStart;
|
|
|
var currentEnd = this.textArea.selectionEnd;
|
|
|
this.textArea.setSelectionRange(currentStart, currentEnd);
|
|
|
}
|
|
|
} catch (e) {// Fix error in Chrome:
|
|
|
// Failed to read the 'selectionStart' property from 'HTMLInputElement'
|
|
|
// http://stackoverflow.com/q/21177489/3040605
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
key: "render",
|
|
|
value: function render() {
|
|
|
return this.renderTextArea();
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
return ResizableTextArea;
|
|
|
}(external_window_React_["Component"]);
|
|
|
|
|
|
/* harmony default export */ var es_ResizableTextArea = (ResizableTextArea_ResizableTextArea);
|
|
|
// CONCATENATED MODULE: ./node_modules/rc-textarea/es/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var es_TextArea = /*#__PURE__*/function (_React$Component) {
|
|
|
Object(inherits["a" /* default */])(TextArea, _React$Component);
|
|
|
|
|
|
var _super = Object(createSuper["a" /* default */])(TextArea);
|
|
|
|
|
|
function TextArea(props) {
|
|
|
var _this;
|
|
|
|
|
|
Object(classCallCheck["a" /* default */])(this, TextArea);
|
|
|
|
|
|
_this = _super.call(this, props);
|
|
|
_this.resizableTextArea = void 0;
|
|
|
|
|
|
_this.focus = function () {
|
|
|
_this.resizableTextArea.textArea.focus();
|
|
|
};
|
|
|
|
|
|
_this.saveTextArea = function (resizableTextArea) {
|
|
|
_this.resizableTextArea = resizableTextArea;
|
|
|
};
|
|
|
|
|
|
_this.handleChange = function (e) {
|
|
|
var onChange = _this.props.onChange;
|
|
|
|
|
|
_this.setValue(e.target.value, function () {
|
|
|
_this.resizableTextArea.resizeTextarea();
|
|
|
});
|
|
|
|
|
|
if (onChange) {
|
|
|
onChange(e);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
_this.handleKeyDown = function (e) {
|
|
|
var _this$props = _this.props,
|
|
|
onPressEnter = _this$props.onPressEnter,
|
|
|
onKeyDown = _this$props.onKeyDown;
|
|
|
|
|
|
if (e.keyCode === 13 && onPressEnter) {
|
|
|
onPressEnter(e);
|
|
|
}
|
|
|
|
|
|
if (onKeyDown) {
|
|
|
onKeyDown(e);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
var value = typeof props.value === 'undefined' || props.value === null ? props.defaultValue : props.value;
|
|
|
_this.state = {
|
|
|
value: value
|
|
|
};
|
|
|
return _this;
|
|
|
}
|
|
|
|
|
|
Object(createClass["a" /* default */])(TextArea, [{
|
|
|
key: "setValue",
|
|
|
value: function setValue(value, callback) {
|
|
|
if (!('value' in this.props)) {
|
|
|
this.setState({
|
|
|
value: value
|
|
|
}, callback);
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
key: "blur",
|
|
|
value: function blur() {
|
|
|
this.resizableTextArea.textArea.blur();
|
|
|
}
|
|
|
}, {
|
|
|
key: "render",
|
|
|
value: function render() {
|
|
|
return /*#__PURE__*/external_window_React_["createElement"](es_ResizableTextArea, Object(esm_extends["a" /* default */])({}, this.props, {
|
|
|
value: this.state.value,
|
|
|
onKeyDown: this.handleKeyDown,
|
|
|
onChange: this.handleChange,
|
|
|
ref: this.saveTextArea
|
|
|
}));
|
|
|
}
|
|
|
}], [{
|
|
|
key: "getDerivedStateFromProps",
|
|
|
value: function getDerivedStateFromProps(nextProps) {
|
|
|
if ('value' in nextProps) {
|
|
|
return {
|
|
|
value: nextProps.value
|
|
|
};
|
|
|
}
|
|
|
|
|
|
return null;
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
return TextArea;
|
|
|
}(external_window_React_["Component"]);
|
|
|
|
|
|
|
|
|
/* harmony default export */ var rc_textarea_es = __webpack_exports__["default"] = (es_TextArea);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "ZW5e":
|
|
|
/*!*********************************************************************************!*\
|
|
|
!*** ./src/pages/Engineering/components/Evaluate/PanelTitle/index.less?modules ***!
|
|
|
\*********************************************************************************/
|
|
|
/*! no static exports found */
|
|
|
/*! exports used: default */
|
|
|
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
module.exports = {"panelTitleContainer":"panelTitleContainer___tHoLi"};
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "bT9E":
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./node_modules/rc-util/es/omit.js ***!
|
|
|
\*****************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! exports used: default */
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return omit; });
|
|
|
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ");
|
|
|
|
|
|
function omit(obj, fields) {
|
|
|
var clone = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, obj);
|
|
|
|
|
|
if (Array.isArray(fields)) {
|
|
|
fields.forEach(function (key) {
|
|
|
delete clone[key];
|
|
|
});
|
|
|
}
|
|
|
|
|
|
return clone;
|
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "bnOO":
|
|
|
/*!******************************************************************************!*\
|
|
|
!*** ./src/pages/Engineering/Lists/TrainingObjectives/index.tsx + 1 modules ***!
|
|
|
\******************************************************************************/
|
|
|
/*! exports provided: default */
|
|
|
/*! all exports used */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Engineering/Lists/TrainingObjectives/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Engineering/components/Evaluate/index.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Engineering/util.tsx */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/export.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/style/index.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
// ESM COMPAT FLAG
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/style/index.js
|
|
|
var style = __webpack_require__("2qtc");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 7 modules
|
|
|
var modal = __webpack_require__("kLXV");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/style/index.js
|
|
|
var row_style = __webpack_require__("14J3");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
|
|
|
var row = __webpack_require__("BMrR");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/upload/style/index.js
|
|
|
var upload_style = __webpack_require__("DZo9");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/upload/index.js + 4 modules
|
|
|
var upload = __webpack_require__("8z0m");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/style/index.js
|
|
|
var col_style = __webpack_require__("jCWc");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/index.js
|
|
|
var col = __webpack_require__("kPKH");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js
|
|
|
var input_style = __webpack_require__("5NDa");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 3 modules
|
|
|
var input = __webpack_require__("5rEg");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js
|
|
|
var button_style = __webpack_require__("+L6B");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
|
|
|
var es_button = __webpack_require__("2/Rp");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/select/style/index.js
|
|
|
var select_style = __webpack_require__("OaEy");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/select/index.js
|
|
|
var es_select = __webpack_require__("2fM7");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__("k1fw");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js
|
|
|
var message_style = __webpack_require__("miYZ");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules
|
|
|
var message = __webpack_require__("tsqr");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__("9og8");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
|
var slicedToArray = __webpack_require__("tJVT");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js
|
|
|
var regenerator = __webpack_require__("WmNS");
|
|
|
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
|
|
|
|
|
// EXTERNAL MODULE: external "window.React"
|
|
|
var external_window_React_ = __webpack_require__("cDcd");
|
|
|
var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_);
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/pages/Engineering/Lists/TrainingObjectives/index.less?modules
|
|
|
var TrainingObjectivesmodules = __webpack_require__("+XC9");
|
|
|
var TrainingObjectivesmodules_default = /*#__PURE__*/__webpack_require__.n(TrainingObjectivesmodules);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/react-router/esm/react-router.js
|
|
|
var react_router = __webpack_require__("Ty5D");
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/core/umiExports.ts + 17 modules
|
|
|
var umiExports = __webpack_require__("9kvl");
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
var fetch = __webpack_require__("ErOA");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js
|
|
|
var tooltip_style = __webpack_require__("5Dmo");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 1 modules
|
|
|
var tooltip = __webpack_require__("3S7+");
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules
|
|
|
var ExclamationCircleOutlined = __webpack_require__("RCxd");
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/pages/Engineering/Lists/TrainingObjectives/ItemList.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function listitem(_ref) {
|
|
|
var item = _ref.item,
|
|
|
index = _ref.index,
|
|
|
setdata = _ref.setdata,
|
|
|
data = _ref.data,
|
|
|
params = _ref.params,
|
|
|
getobjectives = _ref.getobjectives;
|
|
|
|
|
|
var _useState = Object(external_window_React_["useState"])(false),
|
|
|
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
|
|
|
showInput = _useState2[0],
|
|
|
setshowInput = _useState2[1];
|
|
|
|
|
|
Object(external_window_React_["useEffect"])(function () {
|
|
|
if (!item.content) {
|
|
|
setshowInput(true);
|
|
|
}
|
|
|
}, [item.content]);
|
|
|
return /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
style: {
|
|
|
display: 'flex',
|
|
|
alignItems: 'center',
|
|
|
flexDirection: 'initial',
|
|
|
minHeight: '37px',
|
|
|
background: '#ffffff',
|
|
|
padding: '0px 20px',
|
|
|
fontSize: '14px',
|
|
|
borderBottom: '1px solid #E2E9F4'
|
|
|
}
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("span", {
|
|
|
style: {
|
|
|
width: '114px'
|
|
|
}
|
|
|
}, index + 1), /*#__PURE__*/external_window_React_default.a.createElement("span", {
|
|
|
style: {
|
|
|
flex: '3',
|
|
|
margin: "0px 10px",
|
|
|
marginRight: '90px',
|
|
|
padding: '11px 0px',
|
|
|
fontSize: '14px',
|
|
|
fontWeight: '400',
|
|
|
color: '#464F66',
|
|
|
lineHeight: '25px'
|
|
|
},
|
|
|
onClick: function onClick() {}
|
|
|
}, showInput ? /*#__PURE__*/external_window_React_default.a.createElement(input["a" /* default */], {
|
|
|
defaultValue: item.content,
|
|
|
onChange: function onChange(e) {
|
|
|
return item.name = e.target.value;
|
|
|
},
|
|
|
onBlur: function onBlur(e) {
|
|
|
// console.log(e.target.value);
|
|
|
item.content = e.target.value;
|
|
|
}
|
|
|
}) : item.content), /*#__PURE__*/external_window_React_default.a.createElement("span", {
|
|
|
onClick: function onClick() {},
|
|
|
style: {
|
|
|
width: '84px'
|
|
|
}
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], {
|
|
|
title: showInput ? '保存' : '编辑'
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("i", {
|
|
|
onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
|
|
var _data$ec_training_ite, res;
|
|
|
|
|
|
return regenerator_default.a.wrap(function _callee$(_context) {
|
|
|
while (1) {
|
|
|
switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
if (showInput) {
|
|
|
_context.next = 4;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
if (!((data === null || data === void 0 ? void 0 : (_data$ec_training_ite = data.ec_training_items) === null || _data$ec_training_ite === void 0 ? void 0 : _data$ec_training_ite.filter(function (item) {
|
|
|
return item.isupdate || item.id === '中文id';
|
|
|
}).length) > 0)) {
|
|
|
_context.next = 4;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
message["b" /* default */].info('当前已存在修改目标分解,请先保存');
|
|
|
|
|
|
return _context.abrupt("return");
|
|
|
|
|
|
case 4:
|
|
|
if (!showInput) {
|
|
|
_context.next = 13;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
if (item !== null && item !== void 0 && item.content) {
|
|
|
_context.next = 8;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
message["b" /* default */].info('目标分解详情不能为空');
|
|
|
|
|
|
return _context.abrupt("return");
|
|
|
|
|
|
case 8:
|
|
|
data.training_subitems = data.ec_training_items;
|
|
|
_context.next = 11;
|
|
|
return Object(fetch["a" /* default */])("/api/ec_years/".concat(params === null || params === void 0 ? void 0 : params.ec_year_id, "/ec_training_objectives.json"), {
|
|
|
method: 'post',
|
|
|
body: data
|
|
|
});
|
|
|
|
|
|
case 11:
|
|
|
res = _context.sent;
|
|
|
getobjectives(params.ec_year_id); // if(res.status===0){
|
|
|
// //更新成功 掉接口刷新数据
|
|
|
// getobjectives(params.ec_year_id)
|
|
|
// }
|
|
|
|
|
|
case 13:
|
|
|
setshowInput(!showInput);
|
|
|
item.isupdate = !showInput;
|
|
|
|
|
|
case 15:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee);
|
|
|
})),
|
|
|
style: {
|
|
|
color: '#0152D9',
|
|
|
cursor: 'pointer',
|
|
|
marginRight: '10px'
|
|
|
},
|
|
|
className: showInput ? "iconfont icon-baocun1" : "iconfont icon-bianji7"
|
|
|
})), showInput && /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], {
|
|
|
title: "\u53D6\u6D88"
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("i", {
|
|
|
onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee2() {
|
|
|
return regenerator_default.a.wrap(function _callee2$(_context2) {
|
|
|
while (1) {
|
|
|
switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
getobjectives(params.ec_year_id);
|
|
|
setshowInput(false);
|
|
|
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee2);
|
|
|
})),
|
|
|
style: {
|
|
|
color: '#0152D9',
|
|
|
cursor: 'pointer',
|
|
|
marginRight: '10px'
|
|
|
},
|
|
|
className: "iconfont icon-shanchudiao"
|
|
|
})), /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], {
|
|
|
title: "\u5220\u9664"
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("i", {
|
|
|
onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee4() {
|
|
|
return regenerator_default.a.wrap(function _callee4$(_context4) {
|
|
|
while (1) {
|
|
|
switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
modal["a" /* default */].confirm({
|
|
|
title: '是否确认删除',
|
|
|
icon: /*#__PURE__*/external_window_React_default.a.createElement(ExclamationCircleOutlined["a" /* default */], null),
|
|
|
content: '删除后数据不可恢复',
|
|
|
okText: '确认',
|
|
|
okType: 'danger',
|
|
|
cancelText: '取消',
|
|
|
onOk: function () {
|
|
|
var _onOk = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee3() {
|
|
|
var _data$ec_training_ite2;
|
|
|
|
|
|
var datas, res;
|
|
|
return regenerator_default.a.wrap(function _callee3$(_context3) {
|
|
|
while (1) {
|
|
|
switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
datas = data === null || data === void 0 ? void 0 : (_data$ec_training_ite2 = data.ec_training_items) === null || _data$ec_training_ite2 === void 0 ? void 0 : _data$ec_training_ite2.filter(function (items) {
|
|
|
return items.id !== item.id;
|
|
|
});
|
|
|
data.ec_training_items = datas;
|
|
|
data.training_subitems = datas;
|
|
|
setdata(Object(objectSpread2["a" /* default */])({}, data));
|
|
|
_context3.next = 6;
|
|
|
return Object(fetch["a" /* default */])("/api/ec_years/".concat(params === null || params === void 0 ? void 0 : params.ec_year_id, "/ec_training_objectives.json"), {
|
|
|
method: 'post',
|
|
|
body: data
|
|
|
});
|
|
|
|
|
|
case 6:
|
|
|
res = _context3.sent;
|
|
|
|
|
|
if (res.status === 0) {
|
|
|
//更新成功 掉接口刷新数据
|
|
|
getobjectives(params.ec_year_id);
|
|
|
}
|
|
|
|
|
|
case 8:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
return onOk;
|
|
|
}(),
|
|
|
onCancel: function onCancel() {
|
|
|
console.log('Cancel');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee4);
|
|
|
})),
|
|
|
style: {
|
|
|
color: '#0152D9',
|
|
|
cursor: 'pointer'
|
|
|
},
|
|
|
className: "iconfont icon-shanchu9"
|
|
|
}))));
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ var ItemList = (listitem);
|
|
|
// EXTERNAL MODULE: ./src/utils/export.ts
|
|
|
var utils_export = __webpack_require__("mgmH");
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__("m3rI");
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/pages/Engineering/components/Evaluate/index.ts + 2 modules
|
|
|
var Evaluate = __webpack_require__("fj85");
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/pages/Engineering/util.tsx
|
|
|
var util = __webpack_require__("g+eg");
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/pages/Engineering/Lists/TrainingObjectives/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var TrainingObjectives_Page = function Page(_ref) {
|
|
|
var _user$userInfo2, _data$ec_training_ite3;
|
|
|
|
|
|
var user = _ref.user;
|
|
|
var initParams = {
|
|
|
page: 1,
|
|
|
per_page: 20,
|
|
|
total: 0,
|
|
|
ec_major_school_id: null,
|
|
|
ec_year_id: null,
|
|
|
category: 1,
|
|
|
sort_by: null,
|
|
|
sort_direction: null
|
|
|
};
|
|
|
|
|
|
var _useState = Object(external_window_React_["useState"])(initParams),
|
|
|
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
|
|
|
params = _useState2[0],
|
|
|
setParams = _useState2[1];
|
|
|
|
|
|
var _useState3 = Object(external_window_React_["useState"])([]),
|
|
|
_useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
|
|
|
majorlist = _useState4[0],
|
|
|
setMajorList = _useState4[1];
|
|
|
|
|
|
var _useState5 = Object(external_window_React_["useState"])([]),
|
|
|
_useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2),
|
|
|
yellList = _useState6[0],
|
|
|
setYellList = _useState6[1];
|
|
|
|
|
|
var _useState7 = Object(external_window_React_["useState"])({}),
|
|
|
_useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2),
|
|
|
data = _useState8[0],
|
|
|
setdata = _useState8[1];
|
|
|
|
|
|
var _useState9 = Object(external_window_React_["useState"])(false),
|
|
|
_useState10 = Object(slicedToArray["a" /* default */])(_useState9, 2),
|
|
|
editcount = _useState10[0],
|
|
|
seteditcount = _useState10[1];
|
|
|
|
|
|
var _useState11 = Object(external_window_React_["useState"])(false),
|
|
|
_useState12 = Object(slicedToArray["a" /* default */])(_useState11, 2),
|
|
|
exportshow = _useState12[0],
|
|
|
setexport = _useState12[1];
|
|
|
|
|
|
var _useState13 = Object(external_window_React_["useState"])([]),
|
|
|
_useState14 = Object(slicedToArray["a" /* default */])(_useState13, 2),
|
|
|
fileList = _useState14[0],
|
|
|
setFileList = _useState14[1];
|
|
|
|
|
|
var _useState15 = Object(external_window_React_["useState"])(false),
|
|
|
_useState16 = Object(slicedToArray["a" /* default */])(_useState15, 2),
|
|
|
isloading = _useState16[0],
|
|
|
setisloading = _useState16[1];
|
|
|
|
|
|
var _useState17 = Object(external_window_React_["useState"])(false),
|
|
|
_useState18 = Object(slicedToArray["a" /* default */])(_useState17, 2),
|
|
|
isdisabled = _useState18[0],
|
|
|
setisdisabled = _useState18[1];
|
|
|
|
|
|
var location = Object(react_router["h" /* useLocation */])();
|
|
|
Object(external_window_React_["useEffect"])(function () {
|
|
|
var _user$userInfo;
|
|
|
|
|
|
if ((_user$userInfo = user.userInfo) !== null && _user$userInfo !== void 0 && _user$userInfo.school_id) {
|
|
|
getmajorList();
|
|
|
}
|
|
|
}, [user === null || user === void 0 ? void 0 : (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.school_id]);
|
|
|
|
|
|
function getobjectives(_x) {
|
|
|
return _getobjectives.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
function _getobjectives() {
|
|
|
_getobjectives = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee3(id) {
|
|
|
var _user$userInfo3;
|
|
|
|
|
|
var res;
|
|
|
return regenerator_default.a.wrap(function _callee3$(_context3) {
|
|
|
while (1) {
|
|
|
switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
_context3.next = 2;
|
|
|
return Object(fetch["a" /* default */])("/api/ec_years/".concat(id, "/ec_training_objectives.json"), {
|
|
|
method: 'get'
|
|
|
});
|
|
|
|
|
|
case 2:
|
|
|
res = _context3.sent;
|
|
|
params.ec_year_id = id;
|
|
|
util["a" /* localSelect */].setItem(user === null || user === void 0 ? void 0 : (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.login, [params === null || params === void 0 ? void 0 : params.ec_major_school_id, params === null || params === void 0 ? void 0 : params.ec_year_id]);
|
|
|
setdata(res);
|
|
|
setParams(Object(objectSpread2["a" /* default */])({}, params));
|
|
|
|
|
|
case 7:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return _getobjectives.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
var Draggers = {
|
|
|
onRemove: function onRemove() {
|
|
|
setFileList([]);
|
|
|
},
|
|
|
beforeUpload: function beforeUpload(file) {
|
|
|
console.log(file);
|
|
|
|
|
|
if ((file === null || file === void 0 ? void 0 : file.size) > 1024 * 1024 * 50) {
|
|
|
message["b" /* default */].info('文件超过50M,不符合上传要求');
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
var filelist = [];
|
|
|
filelist.push(file);
|
|
|
setFileList([].concat(filelist));
|
|
|
return false;
|
|
|
},
|
|
|
fileList: fileList,
|
|
|
accept: ".xls,.xlsx"
|
|
|
};
|
|
|
|
|
|
function getmajorList() {
|
|
|
return _getmajorList.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
function _getmajorList() {
|
|
|
_getmajorList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee4() {
|
|
|
var _user$userInfo4, _res$data, _user$userInfo5, _location$query, _location$query$ids, _location$query$ids$s, _res$data2, _res$data2$;
|
|
|
|
|
|
var res, item;
|
|
|
return regenerator_default.a.wrap(function _callee4$(_context4) {
|
|
|
while (1) {
|
|
|
switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
_context4.next = 2;
|
|
|
return Object(fetch["a" /* default */])("/api/schools/".concat((_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : _user$userInfo4.school_id, "/ec_majors/get_major_list.json"), {
|
|
|
method: 'get'
|
|
|
});
|
|
|
|
|
|
case 2:
|
|
|
res = _context4.sent;
|
|
|
setMajorList(res === null || res === void 0 ? void 0 : res.data);
|
|
|
|
|
|
if (!((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.length) <= 0)) {
|
|
|
_context4.next = 9;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
setisdisabled(true);
|
|
|
params.ec_major_school_id = '';
|
|
|
setParams(Object(objectSpread2["a" /* default */])({}, params));
|
|
|
return _context4.abrupt("return");
|
|
|
|
|
|
case 9:
|
|
|
item = util["a" /* localSelect */].getItem(user === null || user === void 0 ? void 0 : (_user$userInfo5 = user.userInfo) === null || _user$userInfo5 === void 0 ? void 0 : _user$userInfo5.login);
|
|
|
getYell(parseInt(location === null || location === void 0 ? void 0 : (_location$query = location.query) === null || _location$query === void 0 ? void 0 : (_location$query$ids = _location$query.ids) === null || _location$query$ids === void 0 ? void 0 : (_location$query$ids$s = _location$query$ids.split(',')) === null || _location$query$ids$s === void 0 ? void 0 : _location$query$ids$s[0]) || item[0] || (res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : (_res$data2$ = _res$data2[0]) === null || _res$data2$ === void 0 ? void 0 : _res$data2$.ec_major_school_id));
|
|
|
|
|
|
case 11:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
return _getmajorList.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
function getYell(_x2, _x3) {
|
|
|
return _getYell.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
function _getYell() {
|
|
|
_getYell = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee5(id, bool) {
|
|
|
var _res$data3, _user$userInfo6, _res$data4, _res$data4$, _location$query2, _location$query2$ids, _location$query2$ids$, _res$data5, _res$data5$;
|
|
|
|
|
|
var res, item;
|
|
|
return regenerator_default.a.wrap(function _callee5$(_context5) {
|
|
|
while (1) {
|
|
|
switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
_context5.next = 2;
|
|
|
return Object(fetch["a" /* default */])("/api/ec_major_schools/".concat(id, "/ec_years/get_year_list.json"), {
|
|
|
method: 'get'
|
|
|
});
|
|
|
|
|
|
case 2:
|
|
|
res = _context5.sent;
|
|
|
|
|
|
if (!((res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.length) <= 0)) {
|
|
|
_context5.next = 8;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
setisdisabled(true);
|
|
|
params.ec_year_id = '';
|
|
|
setParams(Object(objectSpread2["a" /* default */])({}, params));
|
|
|
return _context5.abrupt("return");
|
|
|
|
|
|
case 8:
|
|
|
setYellList(res === null || res === void 0 ? void 0 : res.data);
|
|
|
params.ec_major_school_id = id;
|
|
|
item = util["a" /* localSelect */].getItem(user === null || user === void 0 ? void 0 : (_user$userInfo6 = user.userInfo) === null || _user$userInfo6 === void 0 ? void 0 : _user$userInfo6.login);
|
|
|
getobjectives(parseInt(bool ? res === null || res === void 0 ? void 0 : (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : (_res$data4$ = _res$data4[0]) === null || _res$data4$ === void 0 ? void 0 : _res$data4$.ec_year_id : location === null || location === void 0 ? void 0 : (_location$query2 = location.query) === null || _location$query2 === void 0 ? void 0 : (_location$query2$ids = _location$query2.ids) === null || _location$query2$ids === void 0 ? void 0 : (_location$query2$ids$ = _location$query2$ids.split(',')) === null || _location$query2$ids$ === void 0 ? void 0 : _location$query2$ids$[1]) || item[1] || (res === null || res === void 0 ? void 0 : (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : (_res$data5$ = _res$data5[0]) === null || _res$data5$ === void 0 ? void 0 : _res$data5$.ec_year_id));
|
|
|
setParams(Object(objectSpread2["a" /* default */])({}, params));
|
|
|
|
|
|
case 13:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee5);
|
|
|
}));
|
|
|
return _getYell.apply(this, arguments);
|
|
|
}
|
|
|
|
|
|
var handleSelect = function handleSelect(v, type) {
|
|
|
params.page = 1;
|
|
|
params[type] = typeof v === 'number' ? v : null;
|
|
|
setParams(Object(objectSpread2["a" /* default */])({}, params));
|
|
|
|
|
|
if (type === 'ec_major_school_id') {
|
|
|
getYell(v, true);
|
|
|
}
|
|
|
|
|
|
if (type === 'profession') {
|
|
|
getobjectives(v);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
return /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
className: TrainingObjectivesmodules_default.a.wrap
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement(Evaluate["a" /* PanelTitle */], {
|
|
|
title: "\u57F9\u517B\u76EE\u6807",
|
|
|
style: {
|
|
|
padding: '12px 0 0 20px'
|
|
|
}
|
|
|
}), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
style: {
|
|
|
clear: 'both'
|
|
|
}
|
|
|
}), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
className: TrainingObjectivesmodules_default.a.control
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
className: TrainingObjectivesmodules_default.a.label
|
|
|
}, "\u8BA4\u8BC1\u4E13\u4E1A"), /*#__PURE__*/external_window_React_default.a.createElement(es_select["a" /* default */], {
|
|
|
style: {
|
|
|
width: 240
|
|
|
},
|
|
|
placeholder: "\u4E13\u4E1A",
|
|
|
value: params === null || params === void 0 ? void 0 : params.ec_major_school_id,
|
|
|
onChange: function onChange(v) {
|
|
|
return handleSelect(v, 'ec_major_school_id');
|
|
|
}
|
|
|
}, majorlist === null || majorlist === void 0 ? void 0 : majorlist.map(function (item, index) {
|
|
|
return /*#__PURE__*/external_window_React_default.a.createElement(es_select["a" /* default */].Option, {
|
|
|
value: item === null || item === void 0 ? void 0 : item.ec_major_school_id
|
|
|
}, item === null || item === void 0 ? void 0 : item.name);
|
|
|
})), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
className: TrainingObjectivesmodules_default.a.label
|
|
|
}, "\u8BA4\u8BC1\u5C4A\u522B"), /*#__PURE__*/external_window_React_default.a.createElement(es_select["a" /* default */], {
|
|
|
disabled: isdisabled,
|
|
|
style: {
|
|
|
width: 140
|
|
|
},
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u5C4A\u522B",
|
|
|
value: params === null || params === void 0 ? void 0 : params.ec_year_id,
|
|
|
onChange: function onChange(v) {
|
|
|
return handleSelect(v, 'profession');
|
|
|
}
|
|
|
}, yellList === null || yellList === void 0 ? void 0 : yellList.map(function (item, index) {
|
|
|
return /*#__PURE__*/external_window_React_default.a.createElement(es_select["a" /* default */].Option, {
|
|
|
value: item === null || item === void 0 ? void 0 : item.ec_year_id
|
|
|
}, item === null || item === void 0 ? void 0 : item.year, "\u5C4A");
|
|
|
})), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
style: {
|
|
|
textAlign: 'end',
|
|
|
flex: '1'
|
|
|
}
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], {
|
|
|
disabled: isdisabled,
|
|
|
style: {
|
|
|
margin: '0px 10px'
|
|
|
},
|
|
|
onClick: function onClick() {
|
|
|
setexport(true);
|
|
|
}
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("i", {
|
|
|
style: {
|
|
|
marginRight: '7px'
|
|
|
},
|
|
|
className: "iconfont icon-piliangdaoru"
|
|
|
}), " \u6279\u91CF\u5BFC\u5165"), /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], {
|
|
|
disabled: isdisabled,
|
|
|
onClick: function onClick() {
|
|
|
Object(utils_export["q" /* getec_training_objectives */])({
|
|
|
ec_year_id: params === null || params === void 0 ? void 0 : params.ec_year_id
|
|
|
});
|
|
|
}
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("i", {
|
|
|
style: {
|
|
|
marginRight: '7px'
|
|
|
},
|
|
|
className: "iconfont icon-daochubeifen"
|
|
|
}), " \u5BFC\u51FA")))), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
style: {
|
|
|
height: '10px',
|
|
|
background: '#fafafa'
|
|
|
}
|
|
|
}), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
className: TrainingObjectivesmodules_default.a.wrap
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
style: {
|
|
|
display: 'flex'
|
|
|
}
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
className: TrainingObjectivesmodules_default.a.title
|
|
|
}, "\u603B\u4F53\u63CF\u8FF0"), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
style: {
|
|
|
flex: '1',
|
|
|
textAlign: 'end',
|
|
|
lineHeight: '48px',
|
|
|
paddingRight: '20px'
|
|
|
}
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], {
|
|
|
disabled: isdisabled,
|
|
|
onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
|
|
var res;
|
|
|
return regenerator_default.a.wrap(function _callee$(_context) {
|
|
|
while (1) {
|
|
|
switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
if (!editcount) {
|
|
|
_context.next = 5;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
_context.next = 3;
|
|
|
return Object(fetch["a" /* default */])("/api/ec_years/".concat(params === null || params === void 0 ? void 0 : params.ec_year_id, "/ec_training_objectives.json"), {
|
|
|
method: 'post',
|
|
|
body: data
|
|
|
});
|
|
|
|
|
|
case 3:
|
|
|
res = _context.sent;
|
|
|
|
|
|
if (res.status === 0) {
|
|
|
//更新成功 掉接口刷新数据
|
|
|
getobjectives(params.ec_year_id);
|
|
|
} // })
|
|
|
|
|
|
|
|
|
case 5:
|
|
|
seteditcount(!editcount);
|
|
|
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee);
|
|
|
}))
|
|
|
}, editcount ? /*#__PURE__*/external_window_React_default.a.createElement("i", {
|
|
|
style: {
|
|
|
marginRight: '7px'
|
|
|
},
|
|
|
className: "iconfont icon-baocun1"
|
|
|
}) : /*#__PURE__*/external_window_React_default.a.createElement("i", {
|
|
|
style: {
|
|
|
marginRight: '7px'
|
|
|
},
|
|
|
className: "iconfont icon-bianji7"
|
|
|
}), editcount ? '保存' : '编辑'))), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
style: {
|
|
|
padding: '10px 20px',
|
|
|
color: '#464F66',
|
|
|
fontSize: '14px',
|
|
|
fontWeight: 400,
|
|
|
lineHeight: '25px'
|
|
|
}
|
|
|
}, editcount ? /*#__PURE__*/external_window_React_default.a.createElement(input["a" /* default */].TextArea, {
|
|
|
style: {
|
|
|
height: "80px"
|
|
|
},
|
|
|
defaultValue: data === null || data === void 0 ? void 0 : data.content,
|
|
|
onChange: function onChange(e) {
|
|
|
data.content = e.target.value;
|
|
|
}
|
|
|
}) : data === null || data === void 0 ? void 0 : data.content)), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
style: {
|
|
|
height: '10px',
|
|
|
background: '#fafafa'
|
|
|
}
|
|
|
}), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
className: TrainingObjectivesmodules_default.a.wrap
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
style: {
|
|
|
display: 'flex'
|
|
|
}
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
className: TrainingObjectivesmodules_default.a.title
|
|
|
}, "\u76EE\u6807\u5206\u89E3"), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
style: {
|
|
|
flex: '1',
|
|
|
textAlign: 'end',
|
|
|
lineHeight: '48px',
|
|
|
paddingRight: '20px'
|
|
|
}
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], {
|
|
|
disabled: editcount || isdisabled,
|
|
|
onClick: function onClick() {
|
|
|
var _data$ec_training_ite, _data$ec_training_ite2;
|
|
|
|
|
|
if ((data === null || data === void 0 ? void 0 : (_data$ec_training_ite = data.ec_training_items) === null || _data$ec_training_ite === void 0 ? void 0 : (_data$ec_training_ite2 = _data$ec_training_ite.filter(function (item) {
|
|
|
return item.id === '中文id' || item.isupdate;
|
|
|
})) === null || _data$ec_training_ite2 === void 0 ? void 0 : _data$ec_training_ite2.length) > 0) {
|
|
|
message["b" /* default */].info('请先保存已添加数据');
|
|
|
} else {
|
|
|
var newdata = {
|
|
|
id: '中文id',
|
|
|
content: ''
|
|
|
};
|
|
|
var aa = data.ec_training_items;
|
|
|
aa.push(newdata);
|
|
|
data.ec_training_items = aa;
|
|
|
setdata(Object(objectSpread2["a" /* default */])({}, data));
|
|
|
}
|
|
|
}
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("i", {
|
|
|
style: {
|
|
|
marginRight: '7px'
|
|
|
},
|
|
|
className: "iconfont icon-xinzeng"
|
|
|
}), "\u65B0\u589E\u76EE\u6807\u5206\u89E3"))), /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
style: {
|
|
|
display: 'flex',
|
|
|
alignItems: 'center',
|
|
|
flexDirection: 'initial',
|
|
|
minHeight: '37px',
|
|
|
background: '#F5F5F5',
|
|
|
padding: '0px 20px',
|
|
|
marginTop: '20px',
|
|
|
fontSize: '14px',
|
|
|
fontWeight: 500
|
|
|
}
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("span", {
|
|
|
style: {
|
|
|
width: '114px'
|
|
|
}
|
|
|
}, "\u5206\u9879"), /*#__PURE__*/external_window_React_default.a.createElement("span", {
|
|
|
style: {
|
|
|
flex: '3',
|
|
|
margin: "0px 10px"
|
|
|
}
|
|
|
}, "\u76EE\u6807\u5206\u89E3\u8BE6\u60C5"), /*#__PURE__*/external_window_React_default.a.createElement("span", {
|
|
|
style: {
|
|
|
width: '84px'
|
|
|
}
|
|
|
}, "\u64CD\u4F5C")), data === null || data === void 0 ? void 0 : (_data$ec_training_ite3 = data.ec_training_items) === null || _data$ec_training_ite3 === void 0 ? void 0 : _data$ec_training_ite3.map(function (item, index) {
|
|
|
return /*#__PURE__*/external_window_React_default.a.createElement(ItemList, {
|
|
|
data: data,
|
|
|
item: item,
|
|
|
index: index,
|
|
|
getobjectives: getobjectives,
|
|
|
setdata: setdata,
|
|
|
params: params
|
|
|
});
|
|
|
})), /*#__PURE__*/external_window_React_default.a.createElement(modal["a" /* default */], {
|
|
|
title: "\u6279\u91CF\u5BFC\u5165",
|
|
|
visible: exportshow,
|
|
|
centered: true,
|
|
|
okButtonProps: {
|
|
|
loading: isloading
|
|
|
},
|
|
|
onCancel: function onCancel() {
|
|
|
setexport(false);
|
|
|
setFileList([]);
|
|
|
},
|
|
|
onOk: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee2() {
|
|
|
var formData, res;
|
|
|
return regenerator_default.a.wrap(function _callee2$(_context2) {
|
|
|
while (1) {
|
|
|
switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
formData = new FormData();
|
|
|
|
|
|
if (!(fileList.length > 0)) {
|
|
|
_context2.next = 5;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
formData.append('file', fileList[0]);
|
|
|
_context2.next = 7;
|
|
|
break;
|
|
|
|
|
|
case 5:
|
|
|
message["b" /* default */].warn("请选择文件");
|
|
|
|
|
|
return _context2.abrupt("return");
|
|
|
|
|
|
case 7:
|
|
|
setisloading(true);
|
|
|
formData.append('ec_year_id', params.ec_year_id);
|
|
|
_context2.next = 11;
|
|
|
return Object(fetch["a" /* default */])("/api/ec_years/".concat(params.ec_year_id, "/ec_training_objectives/import.json"), {
|
|
|
method: 'post',
|
|
|
body: formData
|
|
|
}, true);
|
|
|
|
|
|
case 11:
|
|
|
res = _context2.sent;
|
|
|
setisloading(false);
|
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
setFileList([]);
|
|
|
|
|
|
message["b" /* default */].info('添加成功');
|
|
|
|
|
|
setexport(false);
|
|
|
getobjectives(params.ec_year_id);
|
|
|
}
|
|
|
|
|
|
case 14:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}))
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("p", null, "\u6B65\u9AA41\uFF1A\u4E0B\u8F7D", /*#__PURE__*/external_window_React_default.a.createElement("a", {
|
|
|
href: "".concat(env["a" /* default */].API_SERVER, "/api/ec_years/1/ec_training_objectives/down_template"),
|
|
|
download: "\u6A21\u7248.xlsx"
|
|
|
}, "\u57F9\u517B\u76EE\u6807\u5BFC\u5165\u65B9\u6848"), ",\u6279\u91CF\u5BFC\u5165\u57F9\u517B\u76EE\u6807\u3002", /*#__PURE__*/external_window_React_default.a.createElement("span", {
|
|
|
style: {
|
|
|
color: '#D95201'
|
|
|
}
|
|
|
}, "\u6CE8\uFF1A\u76EE\u524D\u4EC5\u652F\u6301Excel\u683C\u5F0F\u6A21\u677F")), /*#__PURE__*/external_window_React_default.a.createElement(row["a" /* default */], null, /*#__PURE__*/external_window_React_default.a.createElement(col["a" /* default */], null, "\u6B65\u9AA42\uFF1A"), /*#__PURE__*/external_window_React_default.a.createElement(col["a" /* default */], null, /*#__PURE__*/external_window_React_default.a.createElement(upload["a" /* default */], Draggers, /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], {
|
|
|
type: "primary"
|
|
|
}, "\u9009\u62E9\u6587\u4EF6"))))));
|
|
|
};
|
|
|
|
|
|
/* harmony default export */ var TrainingObjectives = __webpack_exports__["default"] = (Object(umiExports["a" /* connect */])(function (_ref4) {
|
|
|
var user = _ref4.user;
|
|
|
return {
|
|
|
user: user
|
|
|
};
|
|
|
})(TrainingObjectives_Page));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "fj85":
|
|
|
/*!************************************************************************!*\
|
|
|
!*** ./src/pages/Engineering/components/Evaluate/index.ts + 2 modules ***!
|
|
|
\************************************************************************/
|
|
|
/*! exports provided: PanelTitle, SelectWrap */
|
|
|
/*! exports used: PanelTitle, SelectWrap */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Engineering/components/Evaluate/PanelTitle/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Engineering/components/Evaluate/SelectWrap/index.less?modules (<- Module is not an ECMAScript module) */
|
|
|
/*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ Evaluate_PanelTitle; });
|
|
|
__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ Evaluate_SelectWrap; });
|
|
|
|
|
|
// EXTERNAL MODULE: external "window.React"
|
|
|
var external_window_React_ = __webpack_require__("cDcd");
|
|
|
var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_);
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/pages/Engineering/components/Evaluate/PanelTitle/index.less?modules
|
|
|
var PanelTitlemodules = __webpack_require__("ZW5e");
|
|
|
var PanelTitlemodules_default = /*#__PURE__*/__webpack_require__.n(PanelTitlemodules);
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/pages/Engineering/components/Evaluate/PanelTitle/index.tsx
|
|
|
/*
|
|
|
* @Author: dengcheng
|
|
|
* @Date: 2022-03-29 21:51:10
|
|
|
* @Last Modified by: dengcheng
|
|
|
* @Last Modified time: 2022-03-30 15:20:33
|
|
|
* @description:面板标题
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
var PanelTitle_PanelTitle = function PanelTitle(_ref) {
|
|
|
var title = _ref.title,
|
|
|
_ref$style = _ref.style,
|
|
|
style = _ref$style === void 0 ? {} : _ref$style;
|
|
|
return /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
className: PanelTitlemodules_default.a.panelTitleContainer,
|
|
|
style: style
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("div", null, title));
|
|
|
};
|
|
|
|
|
|
/* harmony default export */ var Evaluate_PanelTitle = (PanelTitle_PanelTitle);
|
|
|
// EXTERNAL MODULE: ./src/pages/Engineering/components/Evaluate/SelectWrap/index.less?modules
|
|
|
var SelectWrapmodules = __webpack_require__("PsNh");
|
|
|
var SelectWrapmodules_default = /*#__PURE__*/__webpack_require__.n(SelectWrapmodules);
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/pages/Engineering/components/Evaluate/SelectWrap/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
var SelectWrap_SelectWrap = function SelectWrap(_ref) {
|
|
|
var title = _ref.title,
|
|
|
children = _ref.children;
|
|
|
return /*#__PURE__*/external_window_React_default.a.createElement("div", {
|
|
|
className: SelectWrapmodules_default.a.selectWrapContainer
|
|
|
}, /*#__PURE__*/external_window_React_default.a.createElement("span", null, title), children);
|
|
|
};
|
|
|
|
|
|
/* harmony default export */ var Evaluate_SelectWrap = (SelectWrap_SelectWrap);
|
|
|
// CONCATENATED MODULE: ./src/pages/Engineering/components/Evaluate/index.ts
|
|
|
// 面板标题
|
|
|
// 选择包装器
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "mgmH":
|
|
|
/*!*****************************!*\
|
|
|
!*** ./src/utils/export.ts ***!
|
|
|
\*****************************/
|
|
|
/*! exports provided: ExportCourseInfo, ExportCourseActScore, ExportCourseMemberScores, ExportCourseAndOther, exportMoocrecord, ExportCourseTotalScore, ExportCourseWorkListScores, ExportCourseWorkListAppendix, ExportPollsScores, ExportAttendance, ExportVideoStudent, ExportCourseStudentsInfo, ExportProblemset, Exportcompetitions, ExportExerciseStudentScores, getDownFile, getecyears, getec_training_objectives, getec_graduation_requirements */
|
|
|
/*! exports used: ExportAttendance, ExportCourseActScore, ExportCourseAndOther, ExportCourseInfo, ExportCourseMemberScores, ExportCourseStudentsInfo, ExportCourseTotalScore, ExportCourseWorkListScores, ExportExerciseStudentScores, ExportPollsScores, ExportProblemset, ExportVideoStudent, Exportcompetitions, exportMoocrecord, getDownFile, getec_graduation_requirements, getec_training_objectives, getecyears */
|
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ExportCourseInfo; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ExportCourseActScore; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return ExportCourseMemberScores; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ExportCourseAndOther; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return exportMoocrecord; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return ExportCourseTotalScore; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return ExportCourseWorkListScores; });
|
|
|
/* unused harmony export ExportCourseWorkListAppendix */
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return ExportPollsScores; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ExportAttendance; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return ExportVideoStudent; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return ExportCourseStudentsInfo; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return ExportProblemset; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return Exportcompetitions; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return ExportExerciseStudentScores; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return getDownFile; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return getecyears; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return getec_training_objectives; });
|
|
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return getec_graduation_requirements; });
|
|
|
/* harmony import */ var antd_es_message_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/message/style */ "miYZ");
|
|
|
/* harmony import */ var antd_es_message__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/message */ "tsqr");
|
|
|
/* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
|
|
|
/* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8");
|
|
|
/* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */ "WmNS");
|
|
|
/* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4__);
|
|
|
/* harmony import */ var _service_classrooms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/service/classrooms */ "oUNq");
|
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! umi */ "9kvl");
|
|
|
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./util */ "1vsH");
|
|
|
/* harmony import */ var _env__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./env */ "m3rI");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var showLoading = function showLoading() {
|
|
|
Object(umi__WEBPACK_IMPORTED_MODULE_6__[/* getDvaApp */ "c"])()._store.dispatch({
|
|
|
type: 'globalSetting/setGlobalLoading',
|
|
|
payload: {
|
|
|
show: true,
|
|
|
text: '正在生成文件,请稍后...'
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
|
|
var hideLoading = function hideLoading() {
|
|
|
Object(umi__WEBPACK_IMPORTED_MODULE_6__[/* getDvaApp */ "c"])()._store.dispatch({
|
|
|
type: 'globalSetting/setGlobalLoading',
|
|
|
payload: {
|
|
|
show: false,
|
|
|
text: ''
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
|
|
var ExportCourseInfo = /*#__PURE__*/function () {
|
|
|
var _ref = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee(params) {
|
|
|
var res;
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee$(_context) {
|
|
|
while (1) {
|
|
|
switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
showLoading();
|
|
|
_context.next = 3;
|
|
|
return Object(_service_classrooms__WEBPACK_IMPORTED_MODULE_5__[/* exportCourseInfo */ "s"])(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, params));
|
|
|
|
|
|
case 3:
|
|
|
res = _context.sent;
|
|
|
|
|
|
if (!(res.status === 0)) {
|
|
|
_context.next = 7;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
_context.next = 7;
|
|
|
return Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* downLoadFileIframe */ "u"])('', Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* setUrlQuery */ "W"])({
|
|
|
url: _env__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].API_SERVER + "/api/courses/".concat(params.coursesId, "/export_couser_info.json"),
|
|
|
query: params
|
|
|
}));
|
|
|
|
|
|
case 7:
|
|
|
hideLoading();
|
|
|
|
|
|
case 8:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
|
|
|
return function ExportCourseInfo(_x) {
|
|
|
return _ref.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var ExportCourseActScore = /*#__PURE__*/function () {
|
|
|
var _ref2 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee2(params) {
|
|
|
var res;
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee2$(_context2) {
|
|
|
while (1) {
|
|
|
switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
_context2.next = 2;
|
|
|
return Object(_service_classrooms__WEBPACK_IMPORTED_MODULE_5__[/* exportCourseActScore */ "q"])(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, params));
|
|
|
|
|
|
case 2:
|
|
|
res = _context2.sent;
|
|
|
|
|
|
if (!(res.status === 0)) {
|
|
|
_context2.next = 8;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
antd_es_message__WEBPACK_IMPORTED_MODULE_1__[/* default */ "b"].info('导出任务生成成功');
|
|
|
|
|
|
umi__WEBPACK_IMPORTED_MODULE_6__[/* history */ "d"].push("/classrooms/".concat(params.coursesId, "/exportlist/course_member_act_score"));
|
|
|
_context2.next = 13;
|
|
|
break;
|
|
|
|
|
|
case 8:
|
|
|
if (!(res.status === -2)) {
|
|
|
_context2.next = 12;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
return _context2.abrupt("return", res);
|
|
|
|
|
|
case 12:
|
|
|
if (res.status === -3) {
|
|
|
Object(umi__WEBPACK_IMPORTED_MODULE_6__[/* getDvaApp */ "c"])()._store.dispatch({
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
payload: {
|
|
|
key: '导出提醒'
|
|
|
}
|
|
|
});
|
|
|
|
|
|
umi__WEBPACK_IMPORTED_MODULE_6__[/* history */ "d"].push("/classrooms/".concat(params.coursesId, "/exportlist/course_member_act_score"));
|
|
|
}
|
|
|
|
|
|
case 13:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
|
|
|
return function ExportCourseActScore(_x2) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var ExportCourseMemberScores = /*#__PURE__*/function () {
|
|
|
var _ref3 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee3(params) {
|
|
|
var res;
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee3$(_context3) {
|
|
|
while (1) {
|
|
|
switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
_context3.next = 2;
|
|
|
return Object(_service_classrooms__WEBPACK_IMPORTED_MODULE_5__[/* exportCourseMemberScores */ "t"])(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, params));
|
|
|
|
|
|
case 2:
|
|
|
res = _context3.sent;
|
|
|
|
|
|
if (!(res.status === 0)) {
|
|
|
_context3.next = 8;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
antd_es_message__WEBPACK_IMPORTED_MODULE_1__[/* default */ "b"].info('导出任务生成成功');
|
|
|
|
|
|
umi__WEBPACK_IMPORTED_MODULE_6__[/* history */ "d"].push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_score"));
|
|
|
_context3.next = 13;
|
|
|
break;
|
|
|
|
|
|
case 8:
|
|
|
if (!(res.status === -2)) {
|
|
|
_context3.next = 12;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
return _context3.abrupt("return", res);
|
|
|
|
|
|
case 12:
|
|
|
if (res.status === -3) {
|
|
|
Object(umi__WEBPACK_IMPORTED_MODULE_6__[/* getDvaApp */ "c"])()._store.dispatch({
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
payload: {
|
|
|
key: '导出提醒'
|
|
|
}
|
|
|
});
|
|
|
|
|
|
umi__WEBPACK_IMPORTED_MODULE_6__[/* history */ "d"].push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_score"));
|
|
|
}
|
|
|
|
|
|
case 13:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
|
|
|
return function ExportCourseMemberScores(_x3) {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}(); //试卷
|
|
|
|
|
|
var ExportCourseAndOther = /*#__PURE__*/function () {
|
|
|
var _ref4 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee4(params) {
|
|
|
var res;
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee4$(_context4) {
|
|
|
while (1) {
|
|
|
switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
_context4.next = 2;
|
|
|
return Object(_service_classrooms__WEBPACK_IMPORTED_MODULE_5__[/* exportCourseAndOther */ "r"])(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, params));
|
|
|
|
|
|
case 2:
|
|
|
res = _context4.sent;
|
|
|
|
|
|
if (!(res.status === 0)) {
|
|
|
_context4.next = 8;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
antd_es_message__WEBPACK_IMPORTED_MODULE_1__[/* default */ "b"].info('导出任务生成成功');
|
|
|
|
|
|
umi__WEBPACK_IMPORTED_MODULE_6__[/* history */ "d"].push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_exercise_and_other"));
|
|
|
_context4.next = 13;
|
|
|
break;
|
|
|
|
|
|
case 8:
|
|
|
if (!(res.status === -2)) {
|
|
|
_context4.next = 12;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
return _context4.abrupt("return", res);
|
|
|
|
|
|
case 12:
|
|
|
if (res.status === -3) {
|
|
|
Object(umi__WEBPACK_IMPORTED_MODULE_6__[/* getDvaApp */ "c"])()._store.dispatch({
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
payload: {
|
|
|
key: '导出提醒'
|
|
|
}
|
|
|
});
|
|
|
|
|
|
umi__WEBPACK_IMPORTED_MODULE_6__[/* history */ "d"].push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_exercise_and_other"));
|
|
|
}
|
|
|
|
|
|
case 13:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
|
|
|
return function ExportCourseAndOther(_x4) {
|
|
|
return _ref4.apply(this, arguments);
|
|
|
};
|
|
|
}(); //第三方幕课
|
|
|
|
|
|
var exportMoocrecord = /*#__PURE__*/function () {
|
|
|
var _ref5 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee5(params) {
|
|
|
var res;
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee5$(_context5) {
|
|
|
while (1) {
|
|
|
switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
_context5.next = 2;
|
|
|
return Object(_service_classrooms__WEBPACK_IMPORTED_MODULE_5__[/* exportMoocrecords */ "y"])(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, params));
|
|
|
|
|
|
case 2:
|
|
|
res = _context5.sent;
|
|
|
|
|
|
if (!(res.status === 0)) {
|
|
|
_context5.next = 8;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
antd_es_message__WEBPACK_IMPORTED_MODULE_1__[/* default */ "b"].info('导出任务生成成功');
|
|
|
|
|
|
umi__WEBPACK_IMPORTED_MODULE_6__[/* history */ "d"].push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_exercise_and_other"));
|
|
|
_context5.next = 13;
|
|
|
break;
|
|
|
|
|
|
case 8:
|
|
|
if (!(res.status === -2)) {
|
|
|
_context5.next = 12;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
return _context5.abrupt("return", res);
|
|
|
|
|
|
case 12:
|
|
|
if (res.status === -3) {
|
|
|
Object(umi__WEBPACK_IMPORTED_MODULE_6__[/* getDvaApp */ "c"])()._store.dispatch({
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
payload: {
|
|
|
key: '导出提醒'
|
|
|
}
|
|
|
});
|
|
|
|
|
|
umi__WEBPACK_IMPORTED_MODULE_6__[/* history */ "d"].push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_exercise_and_other"));
|
|
|
}
|
|
|
|
|
|
case 13:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee5);
|
|
|
}));
|
|
|
|
|
|
return function exportMoocrecord(_x5) {
|
|
|
return _ref5.apply(this, arguments);
|
|
|
};
|
|
|
}(); //作业
|
|
|
|
|
|
var ExportCourseTotalScore = /*#__PURE__*/function () {
|
|
|
var _ref6 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee6(params) {
|
|
|
var res;
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee6$(_context6) {
|
|
|
while (1) {
|
|
|
switch (_context6.prev = _context6.next) {
|
|
|
case 0:
|
|
|
_context6.next = 2;
|
|
|
return Object(_service_classrooms__WEBPACK_IMPORTED_MODULE_5__[/* exportCourseTotalScore */ "u"])(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, params));
|
|
|
|
|
|
case 2:
|
|
|
res = _context6.sent;
|
|
|
|
|
|
if (!(res.status === 0)) {
|
|
|
_context6.next = 8;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
antd_es_message__WEBPACK_IMPORTED_MODULE_1__[/* default */ "b"].info('导出任务生成成功');
|
|
|
|
|
|
umi__WEBPACK_IMPORTED_MODULE_6__[/* history */ "d"].push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_homework"));
|
|
|
_context6.next = 13;
|
|
|
break;
|
|
|
|
|
|
case 8:
|
|
|
if (!(res.status === -2)) {
|
|
|
_context6.next = 12;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
return _context6.abrupt("return", res);
|
|
|
|
|
|
case 12:
|
|
|
if (res.status === -3) {
|
|
|
Object(umi__WEBPACK_IMPORTED_MODULE_6__[/* getDvaApp */ "c"])()._store.dispatch({
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
payload: {
|
|
|
key: '导出提醒'
|
|
|
}
|
|
|
});
|
|
|
|
|
|
umi__WEBPACK_IMPORTED_MODULE_6__[/* history */ "d"].push("/classrooms/".concat(params.coursesId, "/exportlist/course_total_homework"));
|
|
|
}
|
|
|
|
|
|
case 13:
|
|
|
case "end":
|
|
|
return _context6.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee6);
|
|
|
}));
|
|
|
|
|
|
return function ExportCourseTotalScore(_x6) {
|
|
|
return _ref6.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var ExportCourseWorkListScores = /*#__PURE__*/function () {
|
|
|
var _ref7 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee7(params, type) {
|
|
|
var res;
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee7$(_context7) {
|
|
|
while (1) {
|
|
|
switch (_context7.prev = _context7.next) {
|
|
|
case 0:
|
|
|
_context7.next = 2;
|
|
|
return Object(_service_classrooms__WEBPACK_IMPORTED_MODULE_5__[/* exportCourseWorkListScores */ "w"])(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, params));
|
|
|
|
|
|
case 2:
|
|
|
res = _context7.sent;
|
|
|
|
|
|
if (res.status === 0) {
|
|
|
antd_es_message__WEBPACK_IMPORTED_MODULE_1__[/* default */ "b"].info('导出任务生成成功');
|
|
|
|
|
|
umi__WEBPACK_IMPORTED_MODULE_6__[/* history */ "d"].push("/classrooms/".concat(params.coursesId, "/exportlist/").concat(type));
|
|
|
} else if (res.status === -3) {
|
|
|
Object(umi__WEBPACK_IMPORTED_MODULE_6__[/* getDvaApp */ "c"])()._store.dispatch({
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
payload: {
|
|
|
key: '导出提醒'
|
|
|
}
|
|
|
});
|
|
|
|
|
|
umi__WEBPACK_IMPORTED_MODULE_6__[/* history */ "d"].push("/classrooms/".concat(params.coursesId, "/exportlist/").concat(type));
|
|
|
} // else if(res.status === -1){
|
|
|
// history.push(`/classrooms/${params.coursesId}/exportlist/${type}`)
|
|
|
// };
|
|
|
// console.log(JSON.stringify(params))
|
|
|
// if(res.status === 0) await downLoadFileIframe('',setUrlQuery({url:ENV.API_SERVER + `/api/homework_commons/${params.categoryId}/works_list.xlsx`,query:params}))
|
|
|
// hideLoading();
|
|
|
|
|
|
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context7.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee7);
|
|
|
}));
|
|
|
|
|
|
return function ExportCourseWorkListScores(_x7, _x8) {
|
|
|
return _ref7.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var ExportCourseWorkListAppendix = /*#__PURE__*/function () {
|
|
|
var _ref8 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee8(params) {
|
|
|
var res;
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee8$(_context8) {
|
|
|
while (1) {
|
|
|
switch (_context8.prev = _context8.next) {
|
|
|
case 0:
|
|
|
showLoading();
|
|
|
_context8.next = 3;
|
|
|
return Object(_service_classrooms__WEBPACK_IMPORTED_MODULE_5__[/* exportCourseWorkListAppendix */ "v"])(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, params));
|
|
|
|
|
|
case 3:
|
|
|
res = _context8.sent;
|
|
|
|
|
|
if (!(res.status === 0)) {
|
|
|
_context8.next = 7;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
_context8.next = 7;
|
|
|
return Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* downLoadFileIframe */ "u"])('', Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* setUrlQuery */ "W"])({
|
|
|
url: _env__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].API_SERVER + "/api/homework_commons/".concat(params.categoryId, "/works_list.zip"),
|
|
|
query: params
|
|
|
}));
|
|
|
|
|
|
case 7:
|
|
|
hideLoading();
|
|
|
|
|
|
case 8:
|
|
|
case "end":
|
|
|
return _context8.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee8);
|
|
|
}));
|
|
|
|
|
|
return function ExportCourseWorkListAppendix(_x9) {
|
|
|
return _ref8.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var ExportPollsScores = /*#__PURE__*/function () {
|
|
|
var _ref9 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee9(params) {
|
|
|
var res;
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee9$(_context9) {
|
|
|
while (1) {
|
|
|
switch (_context9.prev = _context9.next) {
|
|
|
case 0:
|
|
|
showLoading();
|
|
|
_context9.next = 3;
|
|
|
return Object(_service_classrooms__WEBPACK_IMPORTED_MODULE_5__[/* exportPollsScores */ "z"])(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, params));
|
|
|
|
|
|
case 3:
|
|
|
res = _context9.sent;
|
|
|
|
|
|
if (!(res.status === 0)) {
|
|
|
_context9.next = 7;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
_context9.next = 7;
|
|
|
return Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* downLoadFileIframe */ "u"])('', Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* setUrlQuery */ "W"])({
|
|
|
url: _env__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].API_SERVER + "/api/polls/".concat(params.categoryId, "/commit_result.xlsx"),
|
|
|
query: params
|
|
|
}));
|
|
|
|
|
|
case 7:
|
|
|
hideLoading();
|
|
|
|
|
|
case 8:
|
|
|
case "end":
|
|
|
return _context9.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee9);
|
|
|
}));
|
|
|
|
|
|
return function ExportPollsScores(_x10) {
|
|
|
return _ref9.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var ExportAttendance = /*#__PURE__*/function () {
|
|
|
var _ref10 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee10(params) {
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee10$(_context10) {
|
|
|
while (1) {
|
|
|
switch (_context10.prev = _context10.next) {
|
|
|
case 0:
|
|
|
_context10.next = 2;
|
|
|
return Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* downLoadFile */ "t"])('', Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* setUrlQuery */ "W"])({
|
|
|
url: _env__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].API_SERVER + "/api/courses/".concat(params.coursesId, "/attendances/export_xlsx_data.xlsx"),
|
|
|
query: params
|
|
|
}));
|
|
|
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context10.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee10);
|
|
|
}));
|
|
|
|
|
|
return function ExportAttendance(_x11) {
|
|
|
return _ref10.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var ExportVideoStudent = /*#__PURE__*/function () {
|
|
|
var _ref11 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee11(params) {
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee11$(_context11) {
|
|
|
while (1) {
|
|
|
switch (_context11.prev = _context11.next) {
|
|
|
case 0:
|
|
|
_context11.next = 2;
|
|
|
return Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* downLoadFile */ "t"])('', Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* setUrlQuery */ "W"])({
|
|
|
url: _env__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].API_SERVER + "/api/courses/".concat(params.coursesId, "/video_study_statics.xlsx"),
|
|
|
query: params
|
|
|
}));
|
|
|
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context11.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee11);
|
|
|
}));
|
|
|
|
|
|
return function ExportVideoStudent(_x12) {
|
|
|
return _ref11.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var ExportCourseStudentsInfo = /*#__PURE__*/function () {
|
|
|
var _ref12 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee12(params) {
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee12$(_context12) {
|
|
|
while (1) {
|
|
|
switch (_context12.prev = _context12.next) {
|
|
|
case 0:
|
|
|
_context12.next = 2;
|
|
|
return Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* downLoadFile */ "t"])('', Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* setUrlQuery */ "W"])({
|
|
|
url: _env__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].API_SERVER + "/api/courses/".concat(params.coursesId, "/export_course_students_info.xlsx"),
|
|
|
query: params
|
|
|
}));
|
|
|
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context12.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee12);
|
|
|
}));
|
|
|
|
|
|
return function ExportCourseStudentsInfo(_x13) {
|
|
|
return _ref12.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var ExportProblemset = /*#__PURE__*/function () {
|
|
|
var _ref13 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee13(params) {
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee13$(_context13) {
|
|
|
while (1) {
|
|
|
switch (_context13.prev = _context13.next) {
|
|
|
case 0:
|
|
|
_context13.next = 2;
|
|
|
return Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* downLoadFile */ "t"])('', Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* setUrlQuery */ "W"])({
|
|
|
url: _env__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].API_SERVER + "/api/item_banks/export.xlsx",
|
|
|
query: params
|
|
|
}));
|
|
|
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context13.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee13);
|
|
|
}));
|
|
|
|
|
|
return function ExportProblemset(_x14) {
|
|
|
return _ref13.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var Exportcompetitions = /*#__PURE__*/function () {
|
|
|
var _ref14 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee14(params) {
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee14$(_context14) {
|
|
|
while (1) {
|
|
|
switch (_context14.prev = _context14.next) {
|
|
|
case 0:
|
|
|
_context14.next = 2;
|
|
|
return Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* downLoadFile */ "t"])('', Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* setUrlQuery */ "W"])({
|
|
|
url: _env__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].API_SERVER + "/api/competitions/region_reports.xlsx",
|
|
|
query: params
|
|
|
}));
|
|
|
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context14.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee14);
|
|
|
}));
|
|
|
|
|
|
return function Exportcompetitions(_x15) {
|
|
|
return _ref14.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var ExportExerciseStudentScores = /*#__PURE__*/function () {
|
|
|
var _ref15 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee15(params) {
|
|
|
var res;
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee15$(_context15) {
|
|
|
while (1) {
|
|
|
switch (_context15.prev = _context15.next) {
|
|
|
case 0:
|
|
|
_context15.next = 2;
|
|
|
return Object(_service_classrooms__WEBPACK_IMPORTED_MODULE_5__[/* exportExerciseStudentScores */ "x"])(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, params));
|
|
|
|
|
|
case 2:
|
|
|
res = _context15.sent;
|
|
|
|
|
|
if (res.status === 0) {
|
|
|
antd_es_message__WEBPACK_IMPORTED_MODULE_1__[/* default */ "b"].info('导出任务生成成功');
|
|
|
|
|
|
umi__WEBPACK_IMPORTED_MODULE_6__[/* history */ "d"].push("/classrooms/".concat(params.coursesId, "/exportlist/exercise_score"));
|
|
|
} else if (res.status === -3) {
|
|
|
Object(umi__WEBPACK_IMPORTED_MODULE_6__[/* getDvaApp */ "c"])()._store.dispatch({
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
payload: {
|
|
|
key: '导出提醒'
|
|
|
}
|
|
|
});
|
|
|
|
|
|
umi__WEBPACK_IMPORTED_MODULE_6__[/* history */ "d"].push("/classrooms/".concat(params.coursesId, "/exportlist/exercise_score"));
|
|
|
} // else if(res.status === -1){
|
|
|
// history.push(`/classrooms/${params.coursesId}/exportlist/exercise_score`)
|
|
|
// };
|
|
|
// // https://test-newweb.educoder.net/api/exercises/4229/exercise_lists.xlsx?page=1&search=&limit=20&order=end_at&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a
|
|
|
// if(res.status === 0) await downLoadFileIframe('',setUrlQuery({url:ENV.API_SERVER + `/api/exercises/${params.categoryId}/exercise_lists.xlsx`,query:params}))
|
|
|
// hideLoading();
|
|
|
|
|
|
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context15.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee15);
|
|
|
}));
|
|
|
|
|
|
return function ExportExerciseStudentScores(_x16) {
|
|
|
return _ref15.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var getDownFile = /*#__PURE__*/function () {
|
|
|
var _ref16 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee16(params) {
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee16$(_context16) {
|
|
|
while (1) {
|
|
|
switch (_context16.prev = _context16.next) {
|
|
|
case 0:
|
|
|
console.log('----------', '调用下载');
|
|
|
_context16.next = 3;
|
|
|
return Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* downLoadFile */ "t"])('', Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* setUrlQuery */ "W"])({
|
|
|
url: _env__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].API_SERVER + "/api/export_records/".concat(params.id, ".xlsx"),
|
|
|
query: params
|
|
|
}));
|
|
|
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context16.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee16);
|
|
|
}));
|
|
|
|
|
|
return function getDownFile(_x17) {
|
|
|
return _ref16.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var getecyears = /*#__PURE__*/function () {
|
|
|
var _ref17 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee17(params) {
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee17$(_context17) {
|
|
|
while (1) {
|
|
|
switch (_context17.prev = _context17.next) {
|
|
|
case 0:
|
|
|
_context17.next = 2;
|
|
|
return Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* downLoadFile */ "t"])('', Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* setUrlQuery */ "W"])({
|
|
|
url: _env__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].API_SERVER + "/api/ec_major_schools/0/ec_years.xlsx",
|
|
|
query: params
|
|
|
}));
|
|
|
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context17.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee17);
|
|
|
}));
|
|
|
|
|
|
return function getecyears(_x18) {
|
|
|
return _ref17.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var getec_training_objectives = /*#__PURE__*/function () {
|
|
|
var _ref18 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee18(params) {
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee18$(_context18) {
|
|
|
while (1) {
|
|
|
switch (_context18.prev = _context18.next) {
|
|
|
case 0:
|
|
|
_context18.next = 2;
|
|
|
return Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* downLoadFile */ "t"])('', Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* setUrlQuery */ "W"])({
|
|
|
url: _env__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].API_SERVER + "/api/ec_years/".concat(params === null || params === void 0 ? void 0 : params.ec_year_id, "/ec_training_objectives.xlsx"),
|
|
|
query: params
|
|
|
}));
|
|
|
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context18.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee18);
|
|
|
}));
|
|
|
|
|
|
return function getec_training_objectives(_x19) {
|
|
|
return _ref18.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var getec_graduation_requirements = /*#__PURE__*/function () {
|
|
|
var _ref19 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.mark(function _callee19(params) {
|
|
|
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default.a.wrap(function _callee19$(_context19) {
|
|
|
while (1) {
|
|
|
switch (_context19.prev = _context19.next) {
|
|
|
case 0:
|
|
|
_context19.next = 2;
|
|
|
return Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* downLoadFile */ "t"])('', Object(_util__WEBPACK_IMPORTED_MODULE_7__[/* setUrlQuery */ "W"])({
|
|
|
url: _env__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].API_SERVER + "/api/ec_years/".concat(params === null || params === void 0 ? void 0 : params.ec_year_id, "/ec_graduation_requirements.xlsx"),
|
|
|
query: params
|
|
|
}));
|
|
|
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context19.stop();
|
|
|
}
|
|
|
}
|
|
|
}, _callee19);
|
|
|
}));
|
|
|
|
|
|
return function getec_graduation_requirements(_x20) {
|
|
|
return _ref19.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |