|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[28982,4977,55523,10014,22941],{
|
|
|
|
|
|
/***/ 56672:
|
|
|
/*!*********************************!*\
|
|
|
!*** ./src/pages/tasks/util.js ***!
|
|
|
\*********************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ Ax: function() { return /* binding */ processTreeData; },
|
|
|
/* harmony export */ Ds: function() { return /* binding */ debounce; },
|
|
|
/* harmony export */ KI: function() { return /* binding */ apiPref; },
|
|
|
/* harmony export */ SI: function() { return /* binding */ getTreeData; },
|
|
|
/* harmony export */ f1: function() { return /* binding */ isCompileOk; }
|
|
|
/* harmony export */ });
|
|
|
/* unused harmony export isProd */
|
|
|
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/env */ 47015);
|
|
|
|
|
|
function isCompileOk(rs) {
|
|
|
var flag = true;
|
|
|
if (rs.length > 0) {
|
|
|
for (var i = 0; i < rs.length; i++) {
|
|
|
if (rs[i].compile_success == 0 || !rs[i].compile_success) {
|
|
|
flag = false;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
flag = false;
|
|
|
}
|
|
|
return flag;
|
|
|
}
|
|
|
function getTreeData(data) {
|
|
|
var parentKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
|
var result = [];
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
var item = data[i];
|
|
|
var key = parentKey ? "".concat(parentKey, "/").concat(item.name) : "".concat(item.name);
|
|
|
result.push({
|
|
|
title: item.name,
|
|
|
isLeaf: item.type === 'tree' ? false : true,
|
|
|
key: key
|
|
|
});
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
function processTreeData(repos, key, newData) {
|
|
|
for (var i = 0; i < repos.length; i++) {
|
|
|
var item = repos[i];
|
|
|
if (item.key === key) {
|
|
|
item.children = newData;
|
|
|
break;
|
|
|
}
|
|
|
if (item.children) {
|
|
|
processTreeData(item.children, key, newData);
|
|
|
}
|
|
|
}
|
|
|
return repos;
|
|
|
}
|
|
|
function debounce(func, wait, immediate) {
|
|
|
var timeout;
|
|
|
return function () {
|
|
|
var context = this,
|
|
|
args = arguments;
|
|
|
var later = function later() {
|
|
|
timeout = null;
|
|
|
if (!immediate) func.apply(context, args);
|
|
|
};
|
|
|
var callNow = immediate && !timeout;
|
|
|
clearTimeout(timeout);
|
|
|
timeout = setTimeout(later, wait);
|
|
|
if (callNow) func.apply(context, args);
|
|
|
};
|
|
|
}
|
|
|
var isProd = true;
|
|
|
var apiPref = _utils_env__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.API_SERVER;
|
|
|
// export const isProd =
|
|
|
// window.location.href.indexOf('test-') > 0 ||
|
|
|
// window.location.href.indexOf('localhost') > 0
|
|
|
// ? false
|
|
|
// : true;
|
|
|
|
|
|
// export const apiPref = isProd
|
|
|
// ? 'https://www.educoder.net'
|
|
|
// : 'https://test-newweb.educoder.net';
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 72020:
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./src/components/NoData/index.tsx ***!
|
|
|
\*****************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 4977);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 3113);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var noData = function noData(_ref) {
|
|
|
var img = _ref.img,
|
|
|
_ref$buttonProps = _ref.buttonProps,
|
|
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
|
_ref$styles = _ref.styles,
|
|
|
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
|
|
customText = _ref.customText,
|
|
|
ButtonText = _ref.ButtonText,
|
|
|
ButtonClick = _ref.ButtonClick,
|
|
|
Buttonclass = _ref.Buttonclass,
|
|
|
ButtonTwo = _ref.ButtonTwo,
|
|
|
imgStyles = _ref.imgStyles,
|
|
|
_ref$loading = _ref.loading,
|
|
|
loading = _ref$loading === void 0 ? false : _ref$loading;
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", {
|
|
|
className: "tc animated fadeIn",
|
|
|
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, {
|
|
|
color: '#999',
|
|
|
margin: '100px auto',
|
|
|
visibility: loading ? 'hidden' : 'visible'
|
|
|
}), styles),
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", {
|
|
|
src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__,
|
|
|
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, imgStyles)
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
|
|
|
className: "mt20 font14",
|
|
|
children: customText || '暂时还没有相关数据哦!'
|
|
|
}), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
|
|
|
className: Buttonclass,
|
|
|
onClick: ButtonClick
|
|
|
}, buttonProps), {}, {
|
|
|
children: ButtonText
|
|
|
})), ButtonTwo && ButtonTwo]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__.Z = (noData);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 48058:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
|
|
|
\*********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ PreviewAll; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(26801);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(10574);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(39343);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(11006);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
|
|
|
var ArrowDownOutlined = __webpack_require__(98915);
|
|
|
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 4 modules
|
|
|
var monaco_editor = __webpack_require__(14654);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
|
var tooltip = __webpack_require__(6848);
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(27291);
|
|
|
// EXTERNAL MODULE: ./src/service/exercise.ts
|
|
|
var exercise = __webpack_require__(6303);
|
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
|
var NoData = __webpack_require__(72020);
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(47015);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var PreviewAll = (function (_ref) {
|
|
|
var _data, _data2, _data3, _data4, _data5, _data6;
|
|
|
var _ref$editOffice = _ref.editOffice,
|
|
|
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
|
|
|
data = _ref.data,
|
|
|
theme = _ref.theme,
|
|
|
type = _ref.type,
|
|
|
filename = _ref.filename,
|
|
|
monacoEditor = _ref.monacoEditor,
|
|
|
className = _ref.className,
|
|
|
style = _ref.style,
|
|
|
close = _ref.close,
|
|
|
onClose = _ref.onClose,
|
|
|
hasMask = _ref.hasMask,
|
|
|
disabledDownload = _ref.disabledDownload,
|
|
|
onImgDimensions = _ref.onImgDimensions,
|
|
|
showNodata = _ref.showNodata;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
src = _useState2[0],
|
|
|
setSrc = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(""),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
token = _useState4[0],
|
|
|
setToken = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
officeData = _useState6[0],
|
|
|
setOfficeData = _useState6[1];
|
|
|
var officePath = window.ENV === "build" ? "/react/build" : "";
|
|
|
var apiServer = location.host.startsWith("localhost") ? env/* default */.Z.PROXY_SERVER : env/* default */.Z.API_SERVER;
|
|
|
// let size;
|
|
|
var unit = 1024 * 1024;
|
|
|
var maxSize = 10 * unit;
|
|
|
var closeRef = (0,_react_17_0_2_react.useRef)();
|
|
|
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
|
|
|
data = env/* default */.Z.API_SERVER + data;
|
|
|
}
|
|
|
// if (type === "office") {
|
|
|
// size = parseUrl(data).filesize
|
|
|
// if (size > maxSize) {
|
|
|
// type = "other"
|
|
|
// }
|
|
|
// }
|
|
|
if (filename) monacoEditor.filename = filename;
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
var _document$cookie;
|
|
|
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 || (_document$cookie = _document$cookie.replace(/\s/g, "")) === null || _document$cookie === void 0 ? void 0 : _document$cookie.split(";");
|
|
|
cookies === null || cookies === void 0 || cookies.map(function (item) {
|
|
|
var i = item.split("=");
|
|
|
if (i[0] === '_educoder_session') {
|
|
|
setToken(i[1]);
|
|
|
}
|
|
|
});
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (type === "office") getData();
|
|
|
}, [type, data]);
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var _url, _id, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
console.log("data:", data);
|
|
|
_url = data;
|
|
|
if (!data.startsWith("http")) {
|
|
|
_url = location.origin + _url;
|
|
|
}
|
|
|
_id = new URL(_url).pathname.split("/").pop();
|
|
|
_context.next = 6;
|
|
|
return (0,exercise/* setEcsAttachment */.gJ)({
|
|
|
attachment_id: _id
|
|
|
});
|
|
|
case 6:
|
|
|
res = _context.sent;
|
|
|
setOfficeData(res);
|
|
|
case 8:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function getData() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleClick = function handleClick() {
|
|
|
if (data.startsWith("http") || data.startsWith('blob:')) {
|
|
|
handleDown();
|
|
|
return;
|
|
|
}
|
|
|
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
|
|
|
};
|
|
|
var handleDown = function handleDown() {
|
|
|
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: objectSpread2_default()({}, style || {}),
|
|
|
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
|
|
|
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: PreviewAllmodules.close,
|
|
|
ref: closeRef,
|
|
|
children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",
|
|
|
getPopupContainer: function getPopupContainer() {
|
|
|
return closeRef.current;
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
onClick: function onClick() {
|
|
|
onClose();
|
|
|
onImgDimensions();
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "icon-yulanpizhu"
|
|
|
})
|
|
|
})
|
|
|
}), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
|
|
|
getPopupContainer: function getPopupContainer() {
|
|
|
return closeRef.current;
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
onClick: handleDown,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "icon-quxiaozhiding"
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: "\u5173\u95ED",
|
|
|
getPopupContainer: function getPopupContainer() {
|
|
|
return closeRef.current;
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "",
|
|
|
onClick: onClose,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "icon-guanbi1"
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
|
|
|
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
|
|
|
})
|
|
|
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
|
|
|
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
|
|
|
autoPlay: true
|
|
|
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
|
|
|
controls: true,
|
|
|
src: "".concat(data),
|
|
|
autoPlay: true
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
|
|
|
controls: true,
|
|
|
src: "data:video/mp4;base64,".concat(data),
|
|
|
autoPlay: true
|
|
|
})
|
|
|
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
|
|
|
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
|
|
|
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
|
|
|
src: data + '&disposition=inline'
|
|
|
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
|
|
|
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
|
|
|
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
|
|
|
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
|
|
|
}), (type === "other" || type === "download") && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
children: showNodata ? /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
|
|
|
customText: "\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",
|
|
|
ButtonTwo: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-xiazai4 font14"
|
|
|
}),
|
|
|
type: "primary",
|
|
|
size: 'middle',
|
|
|
onClick: handleClick,
|
|
|
children: "\u4E0B\u8F7D"
|
|
|
})
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
type: "primary",
|
|
|
size: 'middle',
|
|
|
onClick: handleClick,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 55523:
|
|
|
/*!*********************************************************!*\
|
|
|
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
|
|
|
\*********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ RenderHtml; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(26801);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/toConsumableArray.js
|
|
|
var toConsumableArray = __webpack_require__(93923);
|
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/createForOfIteratorHelper.js
|
|
|
var createForOfIteratorHelper = __webpack_require__(98190);
|
|
|
var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(11006);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_katex@0.11.1@katex/dist/katex.min.css
|
|
|
var katex_min = __webpack_require__(70657);
|
|
|
// EXTERNAL MODULE: ./node_modules/_marked@2.0.7@marked/lib/marked.js
|
|
|
var marked = __webpack_require__(32834);
|
|
|
var marked_default = /*#__PURE__*/__webpack_require__.n(marked);
|
|
|
// EXTERNAL MODULE: ./node_modules/_marked@2.0.7@marked/src/helpers.js
|
|
|
var helpers = __webpack_require__(11690);
|
|
|
;// CONCATENATED MODULE: ./src/utils/marked.ts
|
|
|
|
|
|
|
|
|
|
|
|
function indentCodeCompensation(raw, text) {
|
|
|
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
|
|
|
if (matchIndentToCode === null) {
|
|
|
return text;
|
|
|
}
|
|
|
var indentToCode = matchIndentToCode[1];
|
|
|
return text.split('\n').map(function (node) {
|
|
|
var matchIndentInNode = node.match(/^\s+/);
|
|
|
if (matchIndentInNode === null) {
|
|
|
return node;
|
|
|
}
|
|
|
var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1),
|
|
|
indentInNode = _matchIndentInNode[0];
|
|
|
if (indentInNode.length >= indentToCode.length) {
|
|
|
return node.slice(indentToCode.length);
|
|
|
}
|
|
|
return node;
|
|
|
}).join('\n');
|
|
|
}
|
|
|
//兼容之前的 ##标题式写法
|
|
|
var toc = [];
|
|
|
var ctx = ["<ul>"];
|
|
|
var renderer = new (marked_default()).Renderer();
|
|
|
var headingRegex = /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;
|
|
|
function cleanToc() {
|
|
|
toc.length = 0;
|
|
|
ctx = ["<ul>"];
|
|
|
}
|
|
|
var lines = {
|
|
|
overflow: "hidden",
|
|
|
WebkitBoxOrient: "vertical",
|
|
|
display: "-webkit-box",
|
|
|
WebkitLineClamp: 2
|
|
|
};
|
|
|
function buildToc(coll, k, level, ctx) {
|
|
|
if (k >= coll.length || coll[k].level <= level) {
|
|
|
return k;
|
|
|
}
|
|
|
var node = coll[k];
|
|
|
ctx.push("<li><a href='#" + node.anchor + "'>" + node.text + "</a>");
|
|
|
k++;
|
|
|
var childCtx = [];
|
|
|
k = buildToc(coll, k, node.level, childCtx);
|
|
|
if (childCtx.length > 0) {
|
|
|
ctx.push("<ul>");
|
|
|
childCtx.forEach(function (idm) {
|
|
|
ctx.push(idm);
|
|
|
});
|
|
|
ctx.push("</ul>");
|
|
|
}
|
|
|
ctx.push("</li>");
|
|
|
k = buildToc(coll, k, level, ctx);
|
|
|
return k;
|
|
|
}
|
|
|
function getTocContent() {
|
|
|
buildToc(toc, 0, 0, ctx);
|
|
|
ctx.push("</ul>");
|
|
|
return ctx.join("");
|
|
|
}
|
|
|
var tokenizer = {
|
|
|
heading: function heading(src) {
|
|
|
var cap = headingRegex.exec(src);
|
|
|
if (cap) {
|
|
|
return {
|
|
|
type: 'heading',
|
|
|
raw: cap[0],
|
|
|
depth: cap[1].length,
|
|
|
text: cap[2]
|
|
|
};
|
|
|
}
|
|
|
},
|
|
|
fences: function fences(src) {
|
|
|
var cap = this.rules.block.fences.exec(src);
|
|
|
if (cap) {
|
|
|
var raw = cap[0];
|
|
|
var text = indentCodeCompensation(raw, cap[3] || '');
|
|
|
var lang = cap[2] ? cap[2].trim() : cap[2];
|
|
|
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
|
|
|
var id = next_id();
|
|
|
var expression = text;
|
|
|
text = id;
|
|
|
math_expressions[id] = {
|
|
|
type: 'block',
|
|
|
expression: expression
|
|
|
};
|
|
|
}
|
|
|
return {
|
|
|
type: 'code',
|
|
|
raw: raw,
|
|
|
lang: lang,
|
|
|
text: text
|
|
|
};
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
var latexRegex = /(?:\${2})([^\n`]+?)(?:\${2})/gi;
|
|
|
var katex_count = 0;
|
|
|
var next_id = function next_id() {
|
|
|
return "__special_katext_id_".concat(katex_count++, "__");
|
|
|
};
|
|
|
var math_expressions = {};
|
|
|
function getMathExpressions() {
|
|
|
return math_expressions;
|
|
|
}
|
|
|
function resetMathExpressions() {
|
|
|
katex_count = 0;
|
|
|
math_expressions = {};
|
|
|
}
|
|
|
function replace_math_with_ids(text) {
|
|
|
text = text.replace(latexRegex, function (_match, expression) {
|
|
|
var id = next_id();
|
|
|
math_expressions[id] = {
|
|
|
type: 'inline',
|
|
|
expression: expression
|
|
|
};
|
|
|
return id;
|
|
|
});
|
|
|
return text;
|
|
|
}
|
|
|
var original_listitem = renderer.listitem;
|
|
|
renderer.listitem = function (text) {
|
|
|
return original_listitem(replace_math_with_ids(text));
|
|
|
};
|
|
|
var original_paragraph = renderer.paragraph;
|
|
|
renderer.paragraph = function (text) {
|
|
|
return original_paragraph(replace_math_with_ids(text));
|
|
|
};
|
|
|
var original_tablecell = renderer.tablecell;
|
|
|
renderer.tablecell = function (content, flags) {
|
|
|
return original_tablecell(replace_math_with_ids(content), flags);
|
|
|
};
|
|
|
renderer.code = function (code, infostring, escaped) {
|
|
|
var lang = (infostring || '').match(/\S*/)[0];
|
|
|
if (!lang) {
|
|
|
return '<pre class="prettyprint linenums"><code>' + (escaped ? code : (0,helpers.escape)(code, true)) + '</code></pre>';
|
|
|
}
|
|
|
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
|
|
|
return "<p class='editormd-tex'>".concat(code, "</p>");
|
|
|
} else {
|
|
|
return "<pre class=\"prettyprint linenums\"><code class=\"language-".concat(infostring, "\">").concat(escaped ? code : (0,helpers.escape)(code, true), "</code></pre>\n");
|
|
|
}
|
|
|
};
|
|
|
renderer.heading = function (text, level, raw) {
|
|
|
var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
|
|
|
toc.push({
|
|
|
anchor: anchor,
|
|
|
level: level,
|
|
|
text: text
|
|
|
});
|
|
|
return '<h' + level + ' id="' + anchor + '">' + text + '</h' + level + '>';
|
|
|
};
|
|
|
marked_default().setOptions({
|
|
|
silent: true,
|
|
|
gfm: true,
|
|
|
pedantic: false
|
|
|
});
|
|
|
marked_default().use({
|
|
|
tokenizer: tokenizer,
|
|
|
renderer: renderer
|
|
|
});
|
|
|
/* harmony default export */ var utils_marked = ((marked_default()));
|
|
|
// EXTERNAL MODULE: ./node_modules/_code-prettify@0.1.0@code-prettify/src/prettify.js
|
|
|
var prettify = __webpack_require__(64018);
|
|
|
// EXTERNAL MODULE: ./node_modules/_hls.js@1.4.12@hls.js/dist/hls.mjs
|
|
|
var dist_hls = __webpack_require__(36775);
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(47015);
|
|
|
// EXTERNAL MODULE: ./node_modules/_katex@0.11.1@katex/dist/katex.js
|
|
|
var katex = __webpack_require__(15342);
|
|
|
// EXTERNAL MODULE: ./node_modules/_uuid@8.3.0@uuid/dist/esm-browser/v4.js + 4 modules
|
|
|
var v4 = __webpack_require__(1012);
|
|
|
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
|
|
|
var PreviewAll = __webpack_require__(48058);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/components/RenderHtml/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ADD_MULTI = '@▁▁@';
|
|
|
var ADD_SINGLE = '@▁@';
|
|
|
var preRegex = /<pre[^>]*>/g;
|
|
|
function _unescape(str) {
|
|
|
var div = document.createElement('div');
|
|
|
div.innerHTML = str;
|
|
|
return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
|
|
|
}
|
|
|
/* harmony default export */ var RenderHtml = (function (_ref) {
|
|
|
var _ref$value = _ref.value,
|
|
|
value = _ref$value === void 0 ? '' : _ref$value,
|
|
|
className = _ref.className,
|
|
|
showTextOnly = _ref.showTextOnly,
|
|
|
showLines = _ref.showLines,
|
|
|
_ref$style = _ref.style,
|
|
|
style = _ref$style === void 0 ? {} : _ref$style,
|
|
|
_ref$stylesPrev = _ref.stylesPrev,
|
|
|
stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev,
|
|
|
highlightKeywords = _ref.highlightKeywords,
|
|
|
showProgramFill = _ref.showProgramFill,
|
|
|
isProgramFill = _ref.isProgramFill,
|
|
|
_ref$disabledFill = _ref.disabledFill,
|
|
|
disabledFill = _ref$disabledFill === void 0 ? false : _ref$disabledFill,
|
|
|
programFillValue = _ref.programFillValue,
|
|
|
_ref$onFillChange = _ref.onFillChange,
|
|
|
onFillChange = _ref$onFillChange === void 0 ? function (value) {} : _ref$onFillChange,
|
|
|
_ref$onFillBlur = _ref.onFillBlur,
|
|
|
onFillBlur = _ref$onFillBlur === void 0 ? function () {} : _ref$onFillBlur;
|
|
|
var str = String(value);
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(""),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
data = _useState2[0],
|
|
|
setData = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)("office"),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
type = _useState4[0],
|
|
|
setType = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
projectValue = _useState6[0],
|
|
|
setProjectValue = _useState6[1];
|
|
|
var classNamesRef = (0,_react_17_0_2_react.useRef)("a" + (0,v4/* default */.Z)());
|
|
|
var formObj = {};
|
|
|
var createInput = function createInput(a, num) {
|
|
|
// const wrap = document.createElement("span")
|
|
|
// wrap.className =
|
|
|
var input = document.createElement(a === ADD_SINGLE ? "input" : "textarea");
|
|
|
input.style.width = "100%";
|
|
|
input.style.height = a === ADD_SINGLE ? "40px" : "151px";
|
|
|
input.rows = 5;
|
|
|
input.spellcheck = false;
|
|
|
input.name = "edu-program-fill";
|
|
|
input.placeholder = "请输入";
|
|
|
input.dataset.id = num;
|
|
|
var key = Object.keys(formObj).length;
|
|
|
formObj[key] = input;
|
|
|
return "<span class=\"edu-program-fill-wrap ".concat(a === ADD_SINGLE ? "" : "show", "\" style=\"width:").concat(a === ADD_SINGLE ? "200px" : "100%", "\"><span>").concat(input.outerHTML, "<span class=\"edu-program-fill-score\"></span></span></span>");
|
|
|
};
|
|
|
var formatMD = function formatMD(rs) {
|
|
|
return rs.replace(/<style.*?>([\s\S]+?)<\/style>/gim, function (_, css) {
|
|
|
var _css = css.replace(/(\n|\r)/g, "").split("}");
|
|
|
var arr = [];
|
|
|
_css.map(function (item) {
|
|
|
if (item != '') {
|
|
|
arr.push(".".concat(classNamesRef.current, " ").concat(item));
|
|
|
}
|
|
|
});
|
|
|
return "<style>".concat(arr.join("}"), "</style>");
|
|
|
});
|
|
|
};
|
|
|
var html = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
try {
|
|
|
var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
|
|
|
var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
|
|
|
var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
|
|
|
str = str.replace(reg, "(" + env/* default */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
|
|
|
// str = str.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), " \n")
|
|
|
} catch (e) {}
|
|
|
;
|
|
|
if (showProgramFill) {
|
|
|
var num = -1;
|
|
|
str = str.replace(/(@▁▁@|@▁@)/g, function (a, b, c) {
|
|
|
++num;
|
|
|
return createInput(a, num);
|
|
|
});
|
|
|
return "<pre style=\"background:#fff;padding:4px\">".concat(formatMD(str || ""), "</pre>");
|
|
|
}
|
|
|
var rs = utils_marked(str);
|
|
|
rs = formatMD(rs);
|
|
|
var math_expressions = getMathExpressions();
|
|
|
if (str.match(/\[TOC\]/)) {
|
|
|
rs = rs.replace('<p>[TOC]</p>', getTocContent());
|
|
|
cleanToc();
|
|
|
}
|
|
|
rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) {
|
|
|
var _math_expressions$cap = math_expressions[capture],
|
|
|
type = _math_expressions$cap.type,
|
|
|
expression = _math_expressions$cap.expression;
|
|
|
return (0,katex.renderToString)(_unescape(expression) || '', {
|
|
|
displayMode: type === 'block',
|
|
|
throwOnError: false,
|
|
|
output: 'html'
|
|
|
});
|
|
|
});
|
|
|
rs = rs.replace(/▁/g, '▁▁▁');
|
|
|
resetMathExpressions();
|
|
|
// return dompurify.sanitize(rs)
|
|
|
var dom = document.createElement('div');
|
|
|
dom.innerHTML = rs;
|
|
|
if (highlightKeywords) {
|
|
|
var escapedKeywords = highlightKeywords.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
|
findKeyword(dom, escapedKeywords);
|
|
|
return dom.innerHTML;
|
|
|
}
|
|
|
if (showTextOnly) {
|
|
|
return dom.innerText;
|
|
|
}
|
|
|
setTimeout(function () {
|
|
|
return onLoad();
|
|
|
}, 500);
|
|
|
return dom.innerHTML;
|
|
|
}, [str, highlightKeywords]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (el.current) {
|
|
|
var inputs = el.current.querySelectorAll(["input", "textarea"]);
|
|
|
inputs.forEach(function (input) {
|
|
|
input.oninput = onInput;
|
|
|
input.onblur = onBlur;
|
|
|
});
|
|
|
}
|
|
|
}, [projectValue]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (!!(programFillValue !== null && programFillValue !== void 0 && programFillValue.length)) {
|
|
|
var scoreDom = el.current.querySelectorAll(".edu-program-fill-score");
|
|
|
var dom = el.current.querySelectorAll('[name="edu-program-fill"]');
|
|
|
var _iterator = createForOfIteratorHelper_default()(dom.entries()),
|
|
|
_step;
|
|
|
try {
|
|
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
|
var _programFillValue$k;
|
|
|
var _step$value = slicedToArray_default()(_step.value, 2),
|
|
|
k = _step$value[0],
|
|
|
i = _step$value[1];
|
|
|
i.value = (_programFillValue$k = programFillValue[k]) === null || _programFillValue$k === void 0 ? void 0 : _programFillValue$k.value;
|
|
|
if (programFillValue[k].type === "warning") {
|
|
|
i.className = "program-fill-warning";
|
|
|
} else if (programFillValue[k].type === "success") {
|
|
|
i.className = "program-fill-success";
|
|
|
} else {
|
|
|
i.className = "";
|
|
|
}
|
|
|
}
|
|
|
} catch (err) {
|
|
|
_iterator.e(err);
|
|
|
} finally {
|
|
|
_iterator.f();
|
|
|
}
|
|
|
var _iterator2 = createForOfIteratorHelper_default()(scoreDom.entries()),
|
|
|
_step2;
|
|
|
try {
|
|
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
|
var _programFillValue$_k, _programFillValue$_k2;
|
|
|
var _step2$value = slicedToArray_default()(_step2.value, 2),
|
|
|
_k = _step2$value[0],
|
|
|
_i = _step2$value[1];
|
|
|
_i.innerHTML = (_programFillValue$_k = programFillValue[_k]) !== null && _programFillValue$_k !== void 0 && _programFillValue$_k.score ? "".concat((_programFillValue$_k2 = programFillValue[_k]) === null || _programFillValue$_k2 === void 0 ? void 0 : _programFillValue$_k2.score, "\u5206") : "";
|
|
|
}
|
|
|
} catch (err) {
|
|
|
_iterator2.e(err);
|
|
|
} finally {
|
|
|
_iterator2.f();
|
|
|
}
|
|
|
setProjectValue(programFillValue);
|
|
|
}
|
|
|
}, [programFillValue]);
|
|
|
var onInput = function onInput(e) {
|
|
|
projectValue[e.target.dataset.id] = projectValue[e.target.dataset.id] || {};
|
|
|
projectValue[e.target.dataset.id]["value"] = e.target.value;
|
|
|
setProjectValue(toConsumableArray_default()(projectValue));
|
|
|
onFillChange(projectValue, e.target.dataset.id);
|
|
|
};
|
|
|
var onBlur = function onBlur(e) {
|
|
|
projectValue[e.target.dataset.id] = projectValue[e.target.dataset.id] || {};
|
|
|
projectValue[e.target.dataset.id]["value"] = e.target.value;
|
|
|
setProjectValue(toConsumableArray_default()(projectValue));
|
|
|
onFillBlur(projectValue, e.target.dataset.id);
|
|
|
};
|
|
|
function findKeyword(node, keyword) {
|
|
|
return node.childNodes.forEach(function (childNode) {
|
|
|
if (childNode.childNodes.length > 0) {
|
|
|
findKeyword(childNode, keyword);
|
|
|
} else if (childNode.nodeName !== "IMG") {
|
|
|
if (childNode.innerHTML) {
|
|
|
var _childNode$innerHTML;
|
|
|
childNode.innerHTML = (_childNode$innerHTML = childNode.innerHTML) === null || _childNode$innerHTML === void 0 ? void 0 : _childNode$innerHTML.replace(new RegExp(keyword, "gi"), '<span style="color:#0152d9;background-color:#1890ff33">$&</span>');
|
|
|
} else {
|
|
|
var dom = document.createElement("span");
|
|
|
dom.innerHTML = childNode.textContent.replace(new RegExp(keyword, "gi"), '<span style="color:#0152d9;background-color:#1890ff33">$&</span>');
|
|
|
childNode.replaceWith(dom);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// return dom.childNodes.forEach((node:any) => {
|
|
|
// console.log("nodeLen:",node.childNodes.length)
|
|
|
// if(node.childNodes.length > 0){
|
|
|
// debugger
|
|
|
// // findKeyword(dom.childNodes,keyword)
|
|
|
// }else{
|
|
|
// if(node.nodeName !== "#text"){
|
|
|
// node.innerHTML = node.innerHTML.replaceAll(keyword,`<span class="c-blue">${keyword}</span>`)
|
|
|
// console.log("node:",node,dom,node.nodeName,node.innerHTML,node.childNodes.length)
|
|
|
// debugger
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
// return node
|
|
|
// });
|
|
|
}
|
|
|
|
|
|
var el = (0,_react_17_0_2_react.useRef)();
|
|
|
lines['WebkitLineClamp'] = showLines;
|
|
|
if (showLines) {
|
|
|
style = objectSpread2_default()(objectSpread2_default()({}, style), lines);
|
|
|
}
|
|
|
function onAncherHandler(e) {
|
|
|
var target = e.target;
|
|
|
if (target.tagName.toUpperCase() === 'A') {
|
|
|
var ancher = target.getAttribute('href');
|
|
|
if (ancher.indexOf("office") > -1) {
|
|
|
e.preventDefault();
|
|
|
setData(ancher);
|
|
|
setType("office");
|
|
|
} else if (ancher.indexOf("application/pdf") > -1) {
|
|
|
e.preventDefault();
|
|
|
setData(ancher);
|
|
|
setType("pdf");
|
|
|
} else if (ancher.indexOf("text/html") > -1) {
|
|
|
e.preventDefault();
|
|
|
setData(ancher);
|
|
|
setType("html");
|
|
|
} else if (ancher.startsWith('#')) {
|
|
|
e.preventDefault();
|
|
|
var viewEl = document.getElementById(ancher.replace('#', ''));
|
|
|
if (viewEl) {
|
|
|
viewEl.scrollIntoView(true);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
var onLoad = function onLoad() {
|
|
|
var _el$current;
|
|
|
var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video');
|
|
|
videoElement === null || videoElement === void 0 || videoElement.forEach(function (item) {
|
|
|
item.oncontextmenu = function () {
|
|
|
return false;
|
|
|
};
|
|
|
if (item.src.indexOf('.m3u8') > -1) {
|
|
|
if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (dist_hls/* default */.Z.isSupported()) {
|
|
|
var hls = new dist_hls/* default */.Z();
|
|
|
hls.loadSource(item.src);
|
|
|
hls.attachMedia(item);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (el.current && html) {
|
|
|
if (html.match(preRegex)) {
|
|
|
window.PR.prettyPrint();
|
|
|
}
|
|
|
}
|
|
|
if (el.current) {
|
|
|
el.current.addEventListener('click', onAncherHandler);
|
|
|
return function () {
|
|
|
var _el$current2;
|
|
|
(_el$current2 = el.current) === null || _el$current2 === void 0 || _el$current2.removeEventListener('click', onAncherHandler);
|
|
|
resetMathExpressions();
|
|
|
cleanToc();
|
|
|
};
|
|
|
}
|
|
|
}, [html, el.current, onAncherHandler]);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [showTextOnly && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
ref: el,
|
|
|
children: html
|
|
|
}), !showTextOnly && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
ref: el,
|
|
|
style: objectSpread2_default()({}, style),
|
|
|
className: "".concat(className ? className : '', " ").concat(disabledFill ? "disabled-fill" : "", " markdown-body ").concat(classNamesRef.current),
|
|
|
dangerouslySetInnerHTML: {
|
|
|
__html: html
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
|
|
|
close: true,
|
|
|
data: data,
|
|
|
type: !!(data !== null && data !== void 0 && data.length) ? type : "",
|
|
|
style: objectSpread2_default()({}, stylesPrev),
|
|
|
onClose: function onClose() {
|
|
|
return setData("");
|
|
|
}
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 95635:
|
|
|
/*!*************************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/code-block/index.tsx ***!
|
|
|
\*************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ h: function() { return /* binding */ MyCodeMirror; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 57809);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd */ 78241);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! antd */ 3113);
|
|
|
/* harmony import */ var codemirror__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! codemirror */ 89780);
|
|
|
/* harmony import */ var codemirror__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(codemirror__WEBPACK_IMPORTED_MODULE_3__);
|
|
|
/* harmony import */ var codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! codemirror/lib/codemirror.css */ 39416);
|
|
|
/* harmony import */ var codemirror_theme_blackboard_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! codemirror/theme/blackboard.css */ 23626);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Option = antd__WEBPACK_IMPORTED_MODULE_7__["default"].Option;
|
|
|
|
|
|
//https://github.com/codemirror/CodeMirror/issues/4838
|
|
|
var formItemLayout = {
|
|
|
labelCol: {
|
|
|
span: 4
|
|
|
},
|
|
|
wrapperCol: {
|
|
|
span: 20
|
|
|
}
|
|
|
};
|
|
|
var LanguageDesc = {
|
|
|
asp: ['ASP', 'vbscript'],
|
|
|
actionscript: ['ActionScript(3.0)/Flash/Flex', 'clike'],
|
|
|
bash: ['Bash/Bat', 'shell'],
|
|
|
css: ['CSS', 'css'],
|
|
|
c: ['C', 'clike'],
|
|
|
cpp: ['C++', 'clike'],
|
|
|
csharp: ['C#', 'clike'],
|
|
|
coffeescript: ['CoffeeScript', 'coffeescript'],
|
|
|
d: ['D', 'd'],
|
|
|
dart: ['Dart', 'dart'],
|
|
|
delphi: ['Delphi/Pascal', 'pascal'],
|
|
|
erlang: ['Erlang', 'erlang'],
|
|
|
go: ['Golang', 'go'],
|
|
|
groovy: ['Groovy', 'groovy'],
|
|
|
html: ['HTML', 'text/html'],
|
|
|
java: ['Java', 'clike'],
|
|
|
json: ['JSON', 'text/json'],
|
|
|
javascript: ['Javascript', 'javascript'],
|
|
|
lua: ['Lua', 'lua'],
|
|
|
less: ['LESS', 'css'],
|
|
|
markdown: ['Markdown', 'gfm'],
|
|
|
'objective-c': ['Objective-C', 'clike'],
|
|
|
php: ['PHP', 'php'],
|
|
|
perl: ['Perl', 'perl'],
|
|
|
python: ['Python', 'python'],
|
|
|
r: ['R', 'r'],
|
|
|
rst: ['reStructedText', 'rst'],
|
|
|
ruby: ['Ruby', 'ruby'],
|
|
|
sql: ['SQL', 'sql'],
|
|
|
sass: ['SASS/SCSS', 'sass'],
|
|
|
shell: ['Shell', 'shell'],
|
|
|
scala: ['Scala', 'clike'],
|
|
|
swift: ['Swift', 'clike'],
|
|
|
vb: ['VB/VBScript', 'vb'],
|
|
|
xml: ['XML', 'text/xml'],
|
|
|
yaml: ['YAML', 'yaml']
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__.Z = (function (_ref) {
|
|
|
var callback = _ref.callback,
|
|
|
onCancel = _ref.onCancel;
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)('python'),
|
|
|
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default()(_useState, 2),
|
|
|
mode = _useState2[0],
|
|
|
setMode = _useState2[1];
|
|
|
function onSetMode(value) {
|
|
|
setMode(LanguageDesc[value][1]);
|
|
|
}
|
|
|
function onSubmit(values) {
|
|
|
callback(values);
|
|
|
}
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, formItemLayout), {}, {
|
|
|
className: "code-block-panel",
|
|
|
initialValues: {
|
|
|
language: 'python',
|
|
|
content: ''
|
|
|
},
|
|
|
onFinish: onSubmit,
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z.Item, {
|
|
|
label: "\u4EE3\u7801\u8BED\u8A00",
|
|
|
name: "language",
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_7__["default"], {
|
|
|
getPopupContainer: function getPopupContainer(trigger) {
|
|
|
return trigger.parentNode;
|
|
|
},
|
|
|
onChange: onSetMode,
|
|
|
children: Object.keys(LanguageDesc).map(function (item) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(Option, {
|
|
|
value: item,
|
|
|
children: LanguageDesc[item][0]
|
|
|
}, item);
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z.Item, {
|
|
|
label: "\u4EE3\u7801\u5185\u5BB9",
|
|
|
name: "content",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入代码内容'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(MyCodeMirror, {
|
|
|
mode: mode
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("div", {
|
|
|
className: "flex-container flex-end",
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP, {
|
|
|
type: "primary",
|
|
|
htmlType: "submit",
|
|
|
style: {
|
|
|
marginRight: 10
|
|
|
},
|
|
|
children: "\u786E\u5B9A"
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP, {
|
|
|
type: "ghost",
|
|
|
onClick: onCancel,
|
|
|
children: "\u53D6\u6D88"
|
|
|
})]
|
|
|
})]
|
|
|
}));
|
|
|
});
|
|
|
function MyCodeMirror(_ref2) {
|
|
|
var value = _ref2.value,
|
|
|
onChange = _ref2.onChange,
|
|
|
mode = _ref2.mode,
|
|
|
_ref2$options = _ref2.options,
|
|
|
options = _ref2$options === void 0 ? {} : _ref2$options;
|
|
|
var el = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)();
|
|
|
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(),
|
|
|
_useState4 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default()(_useState3, 2),
|
|
|
cm = _useState4[0],
|
|
|
setCm = _useState4[1];
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
|
|
|
if (cm) {
|
|
|
var onChangeHandler = function onChangeHandler(cm) {
|
|
|
var content = cm.getValue();
|
|
|
onChange && onChange(content);
|
|
|
};
|
|
|
cm.on('change', onChangeHandler);
|
|
|
return function () {
|
|
|
cm.off('change', onChangeHandler);
|
|
|
};
|
|
|
}
|
|
|
}, [cm, onChange]);
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
|
|
|
if (cm) {
|
|
|
cm.setOption('mode', mode);
|
|
|
}
|
|
|
}, [cm, mode]);
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
|
|
|
if (cm) {
|
|
|
if (value !== cm.getValue() || value === '') {
|
|
|
setTimeout(function () {
|
|
|
cm.setValue(value || '');
|
|
|
}, 300);
|
|
|
}
|
|
|
}
|
|
|
}, [cm, value]);
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {
|
|
|
if (el.current && !cm) {
|
|
|
var instance = codemirror__WEBPACK_IMPORTED_MODULE_3___default().fromTextArea(el.current, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
|
|
|
mode: mode,
|
|
|
lineNumbers: true,
|
|
|
lineWrapping: true,
|
|
|
autoCloseBrackets: true,
|
|
|
tabSize: 4,
|
|
|
autofocus: true,
|
|
|
autoCloseTags: true,
|
|
|
matchBrackets: true,
|
|
|
styleActiveLine: true
|
|
|
}, options));
|
|
|
setCm(instance);
|
|
|
}
|
|
|
}, [el.current, cm]);
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", {
|
|
|
className: "my-codemirror-container",
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("textarea", {
|
|
|
ref: el
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 20755:
|
|
|
/*!***************************************************************!*\
|
|
|
!*** ./src/components/markdown-editor/index.tsx + 10 modules ***!
|
|
|
\***************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ markdown_editor; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/createForOfIteratorHelper.js
|
|
|
var createForOfIteratorHelper = __webpack_require__(98190);
|
|
|
var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(11006);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/defineProperty.js
|
|
|
var defineProperty = __webpack_require__(22060);
|
|
|
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_codemirror@5.58.2@codemirror/lib/codemirror.js
|
|
|
var codemirror = __webpack_require__(89780);
|
|
|
var codemirror_default = /*#__PURE__*/__webpack_require__.n(codemirror);
|
|
|
// EXTERNAL MODULE: ./node_modules/_resize-observer-polyfill@1.5.1@resize-observer-polyfill/dist/ResizeObserver.es.js
|
|
|
var ResizeObserver_es = __webpack_require__(76374);
|
|
|
// EXTERNAL MODULE: ./node_modules/_codemirror@5.58.2@codemirror/lib/codemirror.css
|
|
|
var lib_codemirror = __webpack_require__(39416);
|
|
|
// EXTERNAL MODULE: ./node_modules/_codemirror@5.58.2@codemirror/addon/edit/closetag.js
|
|
|
var closetag = __webpack_require__(6313);
|
|
|
// EXTERNAL MODULE: ./node_modules/_codemirror@5.58.2@codemirror/addon/edit/closebrackets.js
|
|
|
var closebrackets = __webpack_require__(25717);
|
|
|
// EXTERNAL MODULE: ./node_modules/_codemirror@5.58.2@codemirror/addon/display/placeholder.js
|
|
|
var placeholder = __webpack_require__(99498);
|
|
|
// EXTERNAL MODULE: ./node_modules/_codemirror@5.58.2@codemirror/mode/markdown/markdown.js
|
|
|
var markdown = __webpack_require__(25419);
|
|
|
// EXTERNAL MODULE: ./node_modules/_codemirror@5.58.2@codemirror/mode/stex/stex.js
|
|
|
var stex = __webpack_require__(67549);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
|
|
|
var RenderHtml = __webpack_require__(55523);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/components/RenderHtml/stex.tsx
|
|
|
|
|
|
// const latexjs = require('latex-l.js/dist/latex.js');
|
|
|
// import "latex-l.js/dist/css/base.css"
|
|
|
|
|
|
|
|
|
/* harmony default export */ var RenderHtml_stex = (function (_ref) {
|
|
|
var _ref$value = _ref.value,
|
|
|
value = _ref$value === void 0 ? '' : _ref$value,
|
|
|
className = _ref.className,
|
|
|
showTextOnly = _ref.showTextOnly,
|
|
|
showLines = _ref.showLines,
|
|
|
_ref$style = _ref.style,
|
|
|
style = _ref$style === void 0 ? {} : _ref$style;
|
|
|
var html = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
// try {
|
|
|
// const latex = value || 'This is some text';
|
|
|
// let generator = new latexjs.default.HtmlGenerator({ hyphenate: true })
|
|
|
// let doc = latexjs.default.parse(latex, { generator: generator }).htmlDocument()
|
|
|
// return doc.body.innerHTML
|
|
|
// }catch(e){
|
|
|
// console.log("e:",e)
|
|
|
// return "错误的latex语法,请检查"
|
|
|
// }
|
|
|
return "";
|
|
|
}, [value]);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
dangerouslySetInnerHTML: {
|
|
|
__html: html
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
});
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(26801);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/toolbar/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/css/iconfont.css
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/toolbar/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DEFAULTICONS = [{
|
|
|
title: '粗体',
|
|
|
icon: 'icon-bold',
|
|
|
actionName: 'bold'
|
|
|
}, {
|
|
|
title: '斜体',
|
|
|
icon: 'icon-italic',
|
|
|
actionName: 'italic'
|
|
|
}, '|', {
|
|
|
title: '无序列表',
|
|
|
icon: 'icon-unorder-list',
|
|
|
actionName: 'list-ul'
|
|
|
}, {
|
|
|
title: '有序列表',
|
|
|
icon: 'icon-order-list',
|
|
|
actionName: 'list-ol'
|
|
|
}, '|', {
|
|
|
title: '行内代码',
|
|
|
icon: 'icon-code',
|
|
|
actionName: 'code'
|
|
|
}, {
|
|
|
title: '代码块(多语言风格)',
|
|
|
icon: 'icon-file-code',
|
|
|
actionName: 'code-block'
|
|
|
}, {
|
|
|
title: '链接',
|
|
|
icon: 'icon-link',
|
|
|
actionName: 'link'
|
|
|
}, '|', {
|
|
|
title: '行内公式',
|
|
|
icon: 'icon-sum',
|
|
|
actionName: 'inline-latex'
|
|
|
}, {
|
|
|
title: '多行公式',
|
|
|
icon: 'icon-formula',
|
|
|
actionName: 'latex'
|
|
|
}, '|', {
|
|
|
title: '添加图片',
|
|
|
icon: 'icon-picture',
|
|
|
actionName: 'upload-image'
|
|
|
}, {
|
|
|
title: '表格',
|
|
|
icon: 'icon-table',
|
|
|
actionName: 'add-table'
|
|
|
}, '|', {
|
|
|
title: '换行',
|
|
|
icon: 'icon-minus',
|
|
|
actionName: 'line-break'
|
|
|
}, {
|
|
|
title: '清空',
|
|
|
icon: 'icon-eraser',
|
|
|
actionName: 'eraser'
|
|
|
}];
|
|
|
function AButton(_ref) {
|
|
|
var onActionCallback = _ref.onActionCallback,
|
|
|
title = _ref.title,
|
|
|
icon = _ref.icon,
|
|
|
actionName = _ref.actionName,
|
|
|
_ref$className = _ref.className,
|
|
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
|
children = _ref.children;
|
|
|
function onAction() {
|
|
|
onActionCallback(actionName);
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
|
title: title,
|
|
|
className: className,
|
|
|
onClick: onAction,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "md-iconfont ".concat(icon)
|
|
|
}), children]
|
|
|
});
|
|
|
}
|
|
|
/* harmony default export */ var toolbar = (function (_ref2) {
|
|
|
var watch = _ref2.watch,
|
|
|
showNullButton = _ref2.showNullButton,
|
|
|
showNullProgramButton = _ref2.showNullProgramButton,
|
|
|
onActionCallback = _ref2.onActionCallback,
|
|
|
fullScreen = _ref2.fullScreen,
|
|
|
insertTemp = _ref2.insertTemp,
|
|
|
hidetoolBar = _ref2.hidetoolBar;
|
|
|
var icons = [].concat(DEFAULTICONS, [{
|
|
|
title: "".concat(watch ? '关闭实时预览' : '开启实时预览'),
|
|
|
icon: "".concat(watch ? 'icon-eye-slash' : 'icon-eye'),
|
|
|
actionName: 'trigger-watch'
|
|
|
}]);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
|
className: "markdown-toolbar-container",
|
|
|
children: [!hidetoolBar && icons.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
children: item.actionName ? /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, objectSpread2_default()(objectSpread2_default()({}, item), {}, {
|
|
|
onActionCallback: onActionCallback
|
|
|
})) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "v-line"
|
|
|
})
|
|
|
}, index);
|
|
|
}), showNullButton ? /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
|
|
|
icon: "icon-edit insert-blank",
|
|
|
className: "btn-null",
|
|
|
title: "\u589E\u52A0\u586B\u7A7A",
|
|
|
actionName: "add-null-ch",
|
|
|
onActionCallback: onActionCallback,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "fill-tip",
|
|
|
children: "\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"
|
|
|
})
|
|
|
})
|
|
|
}) : null, showNullProgramButton ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
|
|
|
icon: "icon-edit insert-blank",
|
|
|
className: "btn-null",
|
|
|
title: "\u589E\u52A0\u586B\u7A7A",
|
|
|
actionName: "add-signal",
|
|
|
onActionCallback: onActionCallback,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "fill-tip",
|
|
|
children: "\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
|
|
|
icon: "icon-uniE900 insert-blank",
|
|
|
className: "btn-null",
|
|
|
title: "\u589E\u52A0\u586B\u7A7A",
|
|
|
actionName: "add-multiple",
|
|
|
onActionCallback: onActionCallback,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "fill-tip",
|
|
|
children: "\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879"
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
}) : null, insertTemp && /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
|
|
|
icon: "icon-edit",
|
|
|
className: "btn-null",
|
|
|
title: "\u63D2\u5165\u6A21\u677F",
|
|
|
actionName: "inster-template-".concat(insertTemp),
|
|
|
onActionCallback: onActionCallback,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "fill-tip",
|
|
|
children: "\u63D2\u5165\u6A21\u677F"
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
|
className: "btn-full-screen",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AButton, {
|
|
|
icon: "".concat(fullScreen ? 'icon-shrink' : 'icon-enlarge'),
|
|
|
title: fullScreen ? '关闭全屏' : '开启全屏',
|
|
|
actionName: "trigger-full-screen",
|
|
|
onActionCallback: onActionCallback
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
// EXTERNAL MODULE: ./src/components/modal.tsx
|
|
|
var modal = __webpack_require__(44668);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
|
var es_form = __webpack_require__(78241);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(1056);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/link/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var formItemLayout = {
|
|
|
labelCol: {
|
|
|
span: 4
|
|
|
},
|
|
|
wrapperCol: {
|
|
|
span: 20
|
|
|
}
|
|
|
};
|
|
|
/* harmony default export */ var markdown_editor_link = (function (_ref) {
|
|
|
var callback = _ref.callback,
|
|
|
onCancel = _ref.onCancel;
|
|
|
function onSubmit(values) {
|
|
|
callback(values);
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, formItemLayout), {}, {
|
|
|
initialValues: {
|
|
|
link: 'http://',
|
|
|
title: ''
|
|
|
},
|
|
|
className: "link-panel",
|
|
|
onFinish: onSubmit,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u94FE\u63A5\u5730\u5740",
|
|
|
name: "link",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入链接地址'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u94FE\u63A5\u6807\u9898",
|
|
|
name: "title",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入链接标题'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "flex-container flex-end",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "primary",
|
|
|
htmlType: "submit",
|
|
|
style: {
|
|
|
marginRight: 10
|
|
|
},
|
|
|
children: "\u786E\u5B9A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "ghost",
|
|
|
onClick: onCancel,
|
|
|
children: "\u53D6\u6D88"
|
|
|
})]
|
|
|
})]
|
|
|
}));
|
|
|
});
|
|
|
// EXTERNAL MODULE: ./src/components/markdown-editor/code-block/index.tsx
|
|
|
var code_block = __webpack_require__(95635);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
var message = __webpack_require__(8591);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/upload-image/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/pages/tasks/util.js
|
|
|
var util = __webpack_require__(56672);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/upload-image/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var useForm = es_form/* default */.Z.useForm;
|
|
|
var style = {
|
|
|
width: 280,
|
|
|
marginRight: 10
|
|
|
};
|
|
|
var upload_image_formItemLayout = {
|
|
|
labelCol: {
|
|
|
span: 5
|
|
|
},
|
|
|
wrapperCol: {
|
|
|
span: 19
|
|
|
}
|
|
|
};
|
|
|
/* harmony default export */ var upload_image = (function (_ref) {
|
|
|
var callback = _ref.callback,
|
|
|
onCancel = _ref.onCancel;
|
|
|
var _useForm = useForm(),
|
|
|
_useForm2 = slicedToArray_default()(_useForm, 1),
|
|
|
form = _useForm2[0];
|
|
|
function onSubmit(values) {
|
|
|
callback(values);
|
|
|
}
|
|
|
function onAddUrl(data, file) {
|
|
|
if (data.status === -1) {
|
|
|
message/* default */.ZP.error(data.message);
|
|
|
return;
|
|
|
}
|
|
|
form.setFieldsValue({
|
|
|
src: "/api/attachments/".concat(data.id),
|
|
|
type: file.type
|
|
|
});
|
|
|
}
|
|
|
function onFileChange(e) {
|
|
|
var file = e.target.files[0];
|
|
|
uploadImage(file, onAddUrl);
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, objectSpread2_default()(objectSpread2_default()({
|
|
|
form: form
|
|
|
}, upload_image_formItemLayout), {}, {
|
|
|
className: "upload-image-panel",
|
|
|
onFinish: onSubmit,
|
|
|
style: {
|
|
|
width: 470,
|
|
|
overflow: "hidden"
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u56FE\u7247\u5730\u5740",
|
|
|
required: true,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "flex-container",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
noStyle: true,
|
|
|
name: "src",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入图片地址'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
style: style
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(UploadButton, {
|
|
|
onFileChange: onFileChange
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u56FE\u7247\u63CF\u8FF0",
|
|
|
name: "alt"
|
|
|
// rules={[{ required: true, message: '请输入图片描述' }]}
|
|
|
,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
style: {
|
|
|
width: 264
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
|
|
|
style: {
|
|
|
textAlign: "right"
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "primary",
|
|
|
htmlType: "submit",
|
|
|
style: {
|
|
|
marginRight: 10
|
|
|
},
|
|
|
children: "\u786E\u5B9A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "default",
|
|
|
onClick: onCancel,
|
|
|
children: "\u53D6\u6D88"
|
|
|
})]
|
|
|
})]
|
|
|
}));
|
|
|
});
|
|
|
function UploadButton(_ref2) {
|
|
|
var onFileChange = _ref2.onFileChange;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("label", {
|
|
|
className: "upload-button",
|
|
|
style: {
|
|
|
cursor: "pointer"
|
|
|
},
|
|
|
children: ["\u672C\u5730\u4E0A\u4F20", /*#__PURE__*/(0,jsx_runtime.jsx)("input", {
|
|
|
type: "file",
|
|
|
onChange: onFileChange
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
function uploadImage(file, callback) {
|
|
|
if (!file) {
|
|
|
throw new String('没有文件');
|
|
|
return;
|
|
|
}
|
|
|
var formData = new FormData();
|
|
|
formData.append('editormd-image-file', file);
|
|
|
formData.append('file_param_name', 'editormd-image-file');
|
|
|
formData.append('byxhr', 'true');
|
|
|
var xhr = new window.XMLHttpRequest();
|
|
|
xhr.withCredentials = true;
|
|
|
xhr.addEventListener('load', function (response) {
|
|
|
callback(JSON.parse(response.target.responseText), file);
|
|
|
}, false);
|
|
|
xhr.addEventListener('error', function (error) {
|
|
|
console.error(error);
|
|
|
}, false);
|
|
|
xhr.open('POST', "".concat(util/* apiPref */.KI, "/api/attachments.json"));
|
|
|
xhr.send(formData);
|
|
|
}
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
|
|
|
var es_radio = __webpack_require__(5112);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input-number/index.js + 14 modules
|
|
|
var input_number = __webpack_require__(85731);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/add-table-panel/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var RadioGroup = es_radio/* default.Group */.ZP.Group;
|
|
|
var add_table_panel_style = {
|
|
|
margin: '0 8px'
|
|
|
};
|
|
|
/* harmony default export */ var add_table_panel = (function (_ref) {
|
|
|
var callback = _ref.callback,
|
|
|
onCancel = _ref.onCancel;
|
|
|
function onSubmit(values) {
|
|
|
callback(values);
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
className: "add-table-panel",
|
|
|
initialValues: {
|
|
|
row: 3,
|
|
|
col: 2,
|
|
|
align: 'default'
|
|
|
},
|
|
|
onFinish: onSubmit,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "flex-container",
|
|
|
style: {
|
|
|
alignItems: "baseline"
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: add_table_panel_style,
|
|
|
children: "\u5355\u5143\u683C\u6570\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: add_table_panel_style,
|
|
|
children: "\u884C\u6570"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
name: "row",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入行数'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: add_table_panel_style,
|
|
|
children: "\u5217\u6570"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
name: "col",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入列数'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "flex-container",
|
|
|
style: {
|
|
|
marginTop: 12,
|
|
|
alignItems: "baseline"
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: add_table_panel_style,
|
|
|
children: "\u5BF9\u9F50\u65B9\u5F0F\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
name: "align",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(RadioGroup, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
value: "default",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "fa fa-align-justify"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
value: "left",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "fa fa-align-left"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
value: "center",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "fa fa-align-center"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
value: "right",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "fa fa-align-right"
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "flex-container flex-end",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "primary",
|
|
|
htmlType: "submit",
|
|
|
style: {
|
|
|
marginRight: 10
|
|
|
},
|
|
|
children: "\u786E\u5B9A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
type: "ghost",
|
|
|
onClick: onCancel,
|
|
|
children: "\u53D6\u6D88"
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(47015);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
var es_modal = __webpack_require__(43418);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/constant.ts
|
|
|
var LINK = 'link';
|
|
|
var UPLOAD_IMAGE = 'upload-image';
|
|
|
var CODE_BLOCK = 'code-block';
|
|
|
var ADD_TABLE = 'add-table';
|
|
|
var HRLINE = '------------';
|
|
|
var ALIGNSIGN = {
|
|
|
"default": HRLINE,
|
|
|
left: ":".concat(HRLINE),
|
|
|
center: ":".concat(HRLINE, ":"),
|
|
|
right: "".concat(HRLINE, ":")
|
|
|
};
|
|
|
// EXTERNAL MODULE: ./src/components/useInterval.tsx
|
|
|
var useInterval = __webpack_require__(14332);
|
|
|
;// CONCATENATED MODULE: ./src/components/markdown-editor/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
var _DEFAULTKEYMAP, _TitleDesc;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function noop() {}
|
|
|
var pending = 0;
|
|
|
var StorageTimeTicket = 10000;
|
|
|
var NULL_CH = '▁';
|
|
|
var ADD_MULTI = '@▁▁@';
|
|
|
var ADD_SINGLE = '@▁@';
|
|
|
var TEMP1 = '\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作'; //课程须知模板
|
|
|
function processSize(size) {
|
|
|
return !/^\d+$/.test(size) ? size : "".concat(size, "px");
|
|
|
}
|
|
|
var isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
|
|
var key = isMac ? 'Cmd' : 'Ctrl';
|
|
|
var DEFAULTKEYMAP = (_DEFAULTKEYMAP = {}, defineProperty_default()(_DEFAULTKEYMAP, key + '-B', 'bold'), defineProperty_default()(_DEFAULTKEYMAP, key + '-I', 'italic'), _DEFAULTKEYMAP);
|
|
|
var TitleDesc = (_TitleDesc = {}, defineProperty_default()(_TitleDesc, LINK, '添加链接'), defineProperty_default()(_TitleDesc, CODE_BLOCK, '添加代码块'), defineProperty_default()(_TitleDesc, UPLOAD_IMAGE, '添加图片'), defineProperty_default()(_TitleDesc, ADD_TABLE, '添加表格'), _TitleDesc);
|
|
|
|
|
|
//https://codemirror.net/demo
|
|
|
//The height can be set through CSS (by giving the .CodeMirror class a height property), or by calling the cm's setSize method.
|
|
|
/* harmony default export */ var markdown_editor = (function (_ref) {
|
|
|
var _ref$defaultValue = _ref.defaultValue,
|
|
|
defaultValue = _ref$defaultValue === void 0 ? '' : _ref$defaultValue,
|
|
|
onChange = _ref.onChange,
|
|
|
_ref$width = _ref.width,
|
|
|
width = _ref$width === void 0 ? '100%' : _ref$width,
|
|
|
_ref$height = _ref.height,
|
|
|
height = _ref$height === void 0 ? 400 : _ref$height,
|
|
|
_ref$miniToolbar = _ref.miniToolbar,
|
|
|
miniToolbar = _ref$miniToolbar === void 0 ? false : _ref$miniToolbar,
|
|
|
_ref$isFocus = _ref.isFocus,
|
|
|
isFocus = _ref$isFocus === void 0 ? false : _ref$isFocus,
|
|
|
watch = _ref.watch,
|
|
|
insertTemp = _ref.insertTemp,
|
|
|
_ref$mode = _ref.mode,
|
|
|
mode = _ref$mode === void 0 ? "markdown" : _ref$mode,
|
|
|
_ref$id = _ref.id,
|
|
|
id = _ref$id === void 0 ? 'markdown-editor-id' : _ref$id,
|
|
|
_ref$showResizeBar = _ref.showResizeBar,
|
|
|
showResizeBar = _ref$showResizeBar === void 0 ? false : _ref$showResizeBar,
|
|
|
_ref$noStorage = _ref.noStorage,
|
|
|
noStorage = _ref$noStorage === void 0 ? false : _ref$noStorage,
|
|
|
_ref$showNullButton = _ref.showNullButton,
|
|
|
showNullButton = _ref$showNullButton === void 0 ? false : _ref$showNullButton,
|
|
|
_ref$showNullProgramB = _ref.showNullProgramButton,
|
|
|
showNullProgramButton = _ref$showNullProgramB === void 0 ? false : _ref$showNullProgramB,
|
|
|
_ref$hidetoolBar = _ref.hidetoolBar,
|
|
|
hidetoolBar = _ref$hidetoolBar === void 0 ? false : _ref$hidetoolBar,
|
|
|
_ref$fullScreen = _ref.fullScreen,
|
|
|
fullScreen = _ref$fullScreen === void 0 ? false : _ref$fullScreen,
|
|
|
onBlur = _ref.onBlur,
|
|
|
onCMBeforeChange = _ref.onCMBeforeChange,
|
|
|
onFullScreen = _ref.onFullScreen,
|
|
|
_ref$className = _ref.className,
|
|
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
|
_ref$disablePaste = _ref.disablePaste,
|
|
|
disablePaste = _ref$disablePaste === void 0 ? false : _ref$disablePaste,
|
|
|
_ref$disabled = _ref.disabled,
|
|
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
|
_ref$disabledFill = _ref.disabledFill,
|
|
|
disabledFill = _ref$disabledFill === void 0 ? false : _ref$disabledFill,
|
|
|
_ref$placeholder = _ref.placeholder,
|
|
|
placeholder = _ref$placeholder === void 0 ? '' : _ref$placeholder,
|
|
|
_ref$values = _ref.values,
|
|
|
values = _ref$values === void 0 ? '' : _ref$values;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(null),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
cm = _useState2[0],
|
|
|
setCm = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(defaultValue),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
value = _useState4[0],
|
|
|
setValue = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(watch),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
preview = _useState6[0],
|
|
|
setPreview = _useState6[1];
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(fullScreen),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
isFull = _useState8[0],
|
|
|
setIsFull = _useState8[1];
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(''),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
action = _useState10[0],
|
|
|
setAction = _useState10[1];
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(0),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
lastedUpdateTime = _useState12[0],
|
|
|
setLastedUpdateTime = _useState12[1];
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(height),
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
h = _useState14[0],
|
|
|
setH = _useState14[1];
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
tip = _useState16[0],
|
|
|
setTip = _useState16[1];
|
|
|
var cmEl = (0,_react_17_0_2_react.useRef)();
|
|
|
var containerEl = (0,_react_17_0_2_react.useRef)();
|
|
|
var resizeBarEl = (0,_react_17_0_2_react.useRef)();
|
|
|
var previewEl = (0,_react_17_0_2_react.useRef)();
|
|
|
|
|
|
// useEffect(() => {
|
|
|
// setValue(defaultValue)
|
|
|
// cm?.setValue(defaultValue)
|
|
|
// },[])
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
var scrollTop = window.scrollY || window.pageYOffset;
|
|
|
setValue(values);
|
|
|
cm === null || cm === void 0 || cm.setValue(values);
|
|
|
window.scrollTo(0, scrollTop);
|
|
|
}, [values]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
onFullScreen === null || onFullScreen === void 0 || onFullScreen(isFull);
|
|
|
}, [isFull]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (cmEl.current) {
|
|
|
var onPaste = function onPaste(_, e) {
|
|
|
if (disablePaste) {
|
|
|
e.preventDefault();
|
|
|
return;
|
|
|
}
|
|
|
var clipboardData = e.clipboardData;
|
|
|
if (clipboardData) {
|
|
|
var types = clipboardData.types.toString();
|
|
|
var items = clipboardData.items;
|
|
|
var officeSix = ["pptm", "pptx", "ppt", "pot", "pps", "ppa", "potx", "ppsx", "ppam", "pptm", "potm", "ppsm", "doc", "docx", "dot", "dotx", "docm", "dotm", "xls", "xlsx", "csv", "xlt", "xla", "xltx", "xlsm", "xltm", "xlam", "xlsb"];
|
|
|
if (types === 'Files' || clipboardData.types.indexOf("Files") > -1) {
|
|
|
e.preventDefault();
|
|
|
if (mode == "stex") return;
|
|
|
try {
|
|
|
var _items$;
|
|
|
var item = items[1];
|
|
|
if (((_items$ = items[0]) === null || _items$ === void 0 ? void 0 : _items$.kind) === 'file') {
|
|
|
item = items[0];
|
|
|
}
|
|
|
var file = item.getAsFile();
|
|
|
var fileSix = file.name.split(".").pop();
|
|
|
// console.log("item:", item, file, item?.type?.match(/^video\//i))
|
|
|
uploadImage(file, function (data) {
|
|
|
if (data.id) {
|
|
|
var _file$type, _file$type2, _file$type3;
|
|
|
if ((file === null || file === void 0 || (_file$type = file.type) === null || _file$type === void 0 ? void 0 : _file$type.indexOf("image")) > -1) {
|
|
|
instance.replaceSelection(".concat(data.content_type, ")"));
|
|
|
} else if ((file === null || file === void 0 || (_file$type2 = file.type) === null || _file$type2 === void 0 ? void 0 : _file$type2.indexOf("video")) > -1) {
|
|
|
instance.replaceSelection("<video width=\"100%\" controls src=\"".concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(data.id, "\"></video>"));
|
|
|
} else if ((file === null || file === void 0 || (_file$type3 = file.type) === null || _file$type3 === void 0 ? void 0 : _file$type3.indexOf("pdf")) > -1) {
|
|
|
instance.replaceSelection("<a href=\"".concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=").concat(file.type, "&disposition=inline\" target=\"_blank\">").concat(file.name, "</a>"));
|
|
|
} else if (officeSix.includes(fileSix)) {
|
|
|
instance.replaceSelection("<a href=\"".concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=office&disposition=inline\" target=\"_blank\">").concat(file.name, "</a>"));
|
|
|
} else {
|
|
|
instance.replaceSelection("[".concat(file.name, "](").concat(env/* default */.Z.API_SERVER, "/api/attachments/").concat(data.id, "?type=").concat(data.content_type, ")"));
|
|
|
}
|
|
|
} else {
|
|
|
if ((data === null || data === void 0 ? void 0 : data.status) === 401) document.location.href = '/user/login';
|
|
|
}
|
|
|
});
|
|
|
} catch (e) {
|
|
|
message/* default */.ZP.warning("请使用chrome浏览器粘贴");
|
|
|
}
|
|
|
return true;
|
|
|
} else {
|
|
|
//toMarkdown ?
|
|
|
// let html = clipboardData.getData('text/html')
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
return true;
|
|
|
};
|
|
|
var instance = codemirror_default().fromTextArea(cmEl.current, {
|
|
|
mode: mode,
|
|
|
// inputStyle: 'contenteditable',
|
|
|
lineNumbers: miniToolbar ? false : true,
|
|
|
lineWrapping: true,
|
|
|
value: defaultValue,
|
|
|
autoCloseTags: true,
|
|
|
autoCloseBrackets: true
|
|
|
});
|
|
|
instance.on("keyup", function (cm, event) {
|
|
|
if (event.keyCode === 8) {
|
|
|
if (cm.getValue() == "") {
|
|
|
instance.setOption("placeholder", placeholder);
|
|
|
} else {
|
|
|
instance.setOption("placeholder", null);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
instance.on("keydown", function (cm, event) {
|
|
|
if (event.keyCode === 8) {
|
|
|
var pos = deleteAtSymbol(cm);
|
|
|
if (pos) {
|
|
|
event.preventDefault();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
isFocus && instance.focus();
|
|
|
instance.on('paste', onPaste);
|
|
|
if (disabled) {
|
|
|
instance.on("beforeChange", function (instances, change) {
|
|
|
if (change.origin === "paste" || change.origin === "+input") {
|
|
|
change.cancel();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
setCm(instance);
|
|
|
return function () {
|
|
|
instance.off('paste', onPaste);
|
|
|
};
|
|
|
}
|
|
|
}, []);
|
|
|
var resizeEditorBodyHeight = (0,_react_17_0_2_react.useCallback)(function () {
|
|
|
if (containerEl.current) {
|
|
|
try {
|
|
|
// let toolH = containerEl.current.getElementsByClassName('markdown-toolbar-container')[0].offsetHeight
|
|
|
// let mdBody = containerEl.current.getElementsByClassName('markdown-editor-body')[0]
|
|
|
// if (!isFull) {
|
|
|
// mdBody.style.height = `${h - toolH}px`
|
|
|
// } else {
|
|
|
// mdBody.style.height = `calc(100vh - ${toolH}px)`
|
|
|
// }
|
|
|
} catch (error) {
|
|
|
console.log(error, '---- to set md editor body height');
|
|
|
}
|
|
|
}
|
|
|
}, [h, containerEl, isFull]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
function onLayout() {
|
|
|
var ro = new ResizeObserver_es/* default */.Z(function (entries) {
|
|
|
var _iterator = createForOfIteratorHelper_default()(entries),
|
|
|
_step;
|
|
|
try {
|
|
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
|
var entry = _step.value;
|
|
|
if (entry.target.offsetHeight > 0 || entry.target.offsetWidth > 0) {
|
|
|
resizeEditorBodyHeight();
|
|
|
cm.setSize('100%', '100%');
|
|
|
cm.refresh();
|
|
|
}
|
|
|
}
|
|
|
} catch (err) {
|
|
|
_iterator.e(err);
|
|
|
} finally {
|
|
|
_iterator.f();
|
|
|
}
|
|
|
});
|
|
|
ro.observe(cmEl.current.parentElement);
|
|
|
return ro;
|
|
|
}
|
|
|
if (cm) {
|
|
|
var ro = onLayout();
|
|
|
return function () {
|
|
|
var _cmEl$current, _cmEl$current2;
|
|
|
if ((_cmEl$current = cmEl.current) !== null && _cmEl$current !== void 0 && _cmEl$current.parentElement) ro.unobserve((_cmEl$current2 = cmEl.current) === null || _cmEl$current2 === void 0 ? void 0 : _cmEl$current2.parentElement);
|
|
|
};
|
|
|
}
|
|
|
}, [cm, resizeEditorBodyHeight]);
|
|
|
|
|
|
//keymap
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (cm) {
|
|
|
var keymap = [];
|
|
|
var _loop = function _loop() {
|
|
|
var _Object$entries$_i = slicedToArray_default()(_Object$entries[_i], 2),
|
|
|
k = _Object$entries$_i[0],
|
|
|
value = _Object$entries$_i[1];
|
|
|
var map = defineProperty_default()({}, k, function () {
|
|
|
onActionCallback(value);
|
|
|
});
|
|
|
keymap.push(map);
|
|
|
cm.addKeyMap(map);
|
|
|
};
|
|
|
for (var _i = 0, _Object$entries = Object.entries(DEFAULTKEYMAP); _i < _Object$entries.length; _i++) {
|
|
|
_loop();
|
|
|
}
|
|
|
return function () {
|
|
|
for (var _i2 = 0, _keymap = keymap; _i2 < _keymap.length; _i2++) {
|
|
|
var m = _keymap[_i2];
|
|
|
cm.removeKeyMap(m);
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
}, [cm]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (fullScreen !== isFull) {
|
|
|
setIsFull(fullScreen);
|
|
|
}
|
|
|
}, [fullScreen]);
|
|
|
(0,useInterval/* default */.Z)(function () {
|
|
|
if (!noStorage && lastedUpdateTime > 0) {
|
|
|
var currentTime = new Date().getTime();
|
|
|
var lastedValue = window.sessionStorage.getItem(id);
|
|
|
if (currentTime >= lastedUpdateTime + StorageTimeTicket && (!lastedValue || lastedValue !== value)) {
|
|
|
window.sessionStorage.setItem(id, value);
|
|
|
setTip(true);
|
|
|
}
|
|
|
}
|
|
|
}, StorageTimeTicket);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
setPreview(watch);
|
|
|
}, [cm, watch]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (cm) {
|
|
|
isFocus && cm.focus();
|
|
|
}
|
|
|
}, [cm, isFocus]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (preview && cm) {
|
|
|
var syncScroll = function syncScroll(e) {
|
|
|
var target = e.target;
|
|
|
if (previewEl.current) {
|
|
|
var ratio = target.scrollTop / target.scrollHeight;
|
|
|
previewEl.current.scrollTop = previewEl.current.scrollHeight * ratio;
|
|
|
}
|
|
|
};
|
|
|
var scrollEl = cm.getScrollerElement();
|
|
|
scrollEl.addEventListener('scroll', syncScroll);
|
|
|
return function () {
|
|
|
scrollEl.removeEventListener('scroll', syncScroll);
|
|
|
};
|
|
|
}
|
|
|
}, [cm, preview]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (cm && onCMBeforeChange) {
|
|
|
var onChangeHandler = function onChangeHandler(cm, change) {
|
|
|
onCMBeforeChange(cm, change);
|
|
|
};
|
|
|
cm.on('beforeChange', onChangeHandler);
|
|
|
return function () {
|
|
|
cm.off('beforeChange', onChangeHandler);
|
|
|
};
|
|
|
}
|
|
|
}, [cm, onCMBeforeChange]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (cm && onBlur) {
|
|
|
var onBlurHandler = function onBlurHandler() {
|
|
|
onBlur(cm.getValue());
|
|
|
};
|
|
|
cm.on('blur', onBlurHandler);
|
|
|
return function () {
|
|
|
cm.off('blur', onBlurHandler);
|
|
|
};
|
|
|
}
|
|
|
}, [cm, onBlur]);
|
|
|
function deleteAtSymbol(cm, change) {
|
|
|
var doc = cm.getDoc();
|
|
|
var cursor = doc.getCursor();
|
|
|
var line = doc.getLine(cursor.line);
|
|
|
var ch = line.charAt(cursor.ch - 1);
|
|
|
var p1 = line.lastIndexOf("@▁@", cursor.ch);
|
|
|
var p2 = line.lastIndexOf("@▁▁@", cursor.ch);
|
|
|
var posStart = p1 > p2 ? p1 : p2;
|
|
|
var n = p1 > p2 ? 3 : 4;
|
|
|
if (ADD_MULTI.indexOf(ch) === -1) return null;
|
|
|
console.log("change1:", change, cm, line, cursor, posStart, p1, p2, ch);
|
|
|
if (posStart >= 0 && cursor.ch - posStart < 5) {
|
|
|
var posEnd = posStart + n;
|
|
|
doc.replaceRange("", {
|
|
|
line: cursor.line,
|
|
|
ch: posStart
|
|
|
}, {
|
|
|
line: cursor.line,
|
|
|
ch: posEnd
|
|
|
});
|
|
|
return {
|
|
|
line: cursor.line,
|
|
|
ch: posEnd
|
|
|
};
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (cm) {
|
|
|
var onChangeHandler = function onChangeHandler(cm, change) {
|
|
|
var content = cm.getValue();
|
|
|
setValue(content);
|
|
|
setLastedUpdateTime(new Date().getTime());
|
|
|
cm.getScrollerElement().dispatchEvent(new CustomEvent('scroll'));
|
|
|
if (onChange) {
|
|
|
if (showNullProgramButton) {
|
|
|
onChange(content, formatProgramFill(content));
|
|
|
} else {
|
|
|
onChange(content);
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
cm.on('change', onChangeHandler);
|
|
|
return function () {
|
|
|
cm.off('change', onChangeHandler);
|
|
|
};
|
|
|
}
|
|
|
}, [cm, onChange]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (cm) {
|
|
|
// isFocus && cm.focus()
|
|
|
if (defaultValue === null || defaultValue === undefined) {
|
|
|
cm.setValue('');
|
|
|
setValue('');
|
|
|
} else {
|
|
|
var scrollTop = window.scrollY || window.pageYOffset;
|
|
|
if (defaultValue !== cm.getValue()) {
|
|
|
cm.setValue(defaultValue);
|
|
|
setValue(defaultValue);
|
|
|
cm.setCursor(disabled ? 1 : cm.lineCount(), 0);
|
|
|
window.scrollTo(0, scrollTop);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, [cm, defaultValue]);
|
|
|
var onActionCallback = (0,_react_17_0_2_react.useCallback)(function (actionName) {
|
|
|
var cursor = cm.getCursor();
|
|
|
var selection = cm.getSelection();
|
|
|
var selectionText = selection.split('\n');
|
|
|
switch (actionName) {
|
|
|
case 'bold':
|
|
|
cm.replaceSelection('**' + selection + '**');
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch + 2);
|
|
|
}
|
|
|
return cm.focus();
|
|
|
case 'italic':
|
|
|
cm.replaceSelection('*' + selection + '*');
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch + 1);
|
|
|
}
|
|
|
return cm.focus();
|
|
|
case 'code':
|
|
|
cm.replaceSelection('`' + selection + '`');
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch + 1);
|
|
|
}
|
|
|
return cm.focus();
|
|
|
case 'inline-latex':
|
|
|
cm.replaceSelection('`$$' + selection + '$$`');
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch + 3);
|
|
|
}
|
|
|
return cm.focus();
|
|
|
case 'latex':
|
|
|
cm.replaceSelection("```latex\n" + selection + "\n```");
|
|
|
cm.setCursor(cursor.line + 1, selection.length + 1);
|
|
|
return cm.focus();
|
|
|
case 'line-break':
|
|
|
cm.replaceSelection('<br/>\n');
|
|
|
return cm.focus();
|
|
|
case 'list-ul':
|
|
|
if (selection === '') {
|
|
|
cm.replaceSelection('- ' + selection);
|
|
|
} else {
|
|
|
cm.replaceSelection(selectionText.map(function (item) {
|
|
|
return item === '' ? '' : "- ".concat(item);
|
|
|
}).join('\n'));
|
|
|
}
|
|
|
return cm.focus();
|
|
|
case 'list-ol':
|
|
|
if (selection === '') {
|
|
|
cm.replaceSelection('1. ' + selection);
|
|
|
} else {
|
|
|
cm.replaceSelection(selectionText.map(function (item, index) {
|
|
|
return item === '' ? '' : "".concat(index + 1, ". ").concat(item);
|
|
|
}).join('\n'));
|
|
|
}
|
|
|
return cm.focus();
|
|
|
case 'add-null-ch':
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch);
|
|
|
}
|
|
|
cm.replaceSelection(NULL_CH);
|
|
|
return cm.focus();
|
|
|
case 'add-signal':
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch);
|
|
|
}
|
|
|
cm.replaceSelection(ADD_SINGLE);
|
|
|
return cm.focus();
|
|
|
case 'add-multiple':
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch);
|
|
|
}
|
|
|
cm.replaceSelection(ADD_MULTI);
|
|
|
return cm.focus();
|
|
|
case 'inster-template-1':
|
|
|
if (selection === '') {
|
|
|
cm.setCursor(cursor.line, cursor.ch);
|
|
|
}
|
|
|
cm.replaceSelection(TEMP1);
|
|
|
return cm.focus();
|
|
|
case 'eraser':
|
|
|
cm.setValue('');
|
|
|
return cm.focus();
|
|
|
case 'trigger-watch':
|
|
|
setPreview(!preview);
|
|
|
return cm.focus();
|
|
|
case 'trigger-full-screen':
|
|
|
setIsFull(!isFull);
|
|
|
return cm.focus();
|
|
|
case LINK:
|
|
|
setAction(LINK);
|
|
|
return;
|
|
|
case CODE_BLOCK:
|
|
|
setAction(CODE_BLOCK);
|
|
|
return;
|
|
|
case UPLOAD_IMAGE:
|
|
|
setAction(UPLOAD_IMAGE);
|
|
|
return;
|
|
|
case ADD_TABLE:
|
|
|
setAction(ADD_TABLE);
|
|
|
return;
|
|
|
default:
|
|
|
throw new Error();
|
|
|
}
|
|
|
}, [cm, preview, isFull]);
|
|
|
var ExecutePluginAction = (0,_react_17_0_2_react.useCallback)(function (values) {
|
|
|
setAction('');
|
|
|
switch (action) {
|
|
|
case LINK:
|
|
|
var title = values.title,
|
|
|
link = values.link;
|
|
|
cm.replaceSelection("[".concat(title, "](").concat(link, ")"));
|
|
|
return cm.focus();
|
|
|
case CODE_BLOCK:
|
|
|
var language = values.language,
|
|
|
content = values.content;
|
|
|
cm.replaceSelection(['```' + language, content, '```'].join('\n'));
|
|
|
return cm.focus();
|
|
|
case UPLOAD_IMAGE:
|
|
|
var src = values.src,
|
|
|
alt = values.alt;
|
|
|
if (alt) {
|
|
|
cm.replaceSelection(".concat(src, " \"").concat(alt, "\" )"));
|
|
|
} else {
|
|
|
cm.replaceSelection(""));
|
|
|
}
|
|
|
return cm.focus();
|
|
|
case ADD_TABLE:
|
|
|
var row = values.row,
|
|
|
col = values.col,
|
|
|
align = values.align;
|
|
|
var table = '\n';
|
|
|
for (var r = 0; r < row; r++) {
|
|
|
var rows = [];
|
|
|
var heads = [];
|
|
|
for (var c = 0; c < col; c++) {
|
|
|
if (r === 1) {
|
|
|
heads.push(ALIGNSIGN[align]);
|
|
|
}
|
|
|
rows.push(' ');
|
|
|
}
|
|
|
if (r === 1) {
|
|
|
table += "| ".concat(heads.join(' | '), " |\n");
|
|
|
}
|
|
|
table += "| ".concat(rows.join(col === 1 ? '' : ' | '), " |\n");
|
|
|
}
|
|
|
cm.replaceSelection(table + '\n');
|
|
|
return cm.focus();
|
|
|
default:
|
|
|
throw new Error();
|
|
|
}
|
|
|
}, [cm, action]);
|
|
|
var PluginEl = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
switch (action) {
|
|
|
case LINK:
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor_link, {
|
|
|
callback: ExecutePluginAction,
|
|
|
onCancel: onCancel
|
|
|
});
|
|
|
case CODE_BLOCK:
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(code_block/* default */.Z, {
|
|
|
callback: ExecutePluginAction,
|
|
|
onCancel: onCancel
|
|
|
});
|
|
|
case UPLOAD_IMAGE:
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(upload_image, {
|
|
|
callback: ExecutePluginAction,
|
|
|
onCancel: onCancel
|
|
|
});
|
|
|
case ADD_TABLE:
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(add_table_panel, {
|
|
|
callback: ExecutePluginAction,
|
|
|
onCancel: onCancel
|
|
|
});
|
|
|
default:
|
|
|
return null;
|
|
|
}
|
|
|
}, [action]);
|
|
|
function onCancel() {
|
|
|
setAction('');
|
|
|
}
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (resizeBarEl.current) {
|
|
|
var onMouseDown = function onMouseDown(e) {
|
|
|
dragging = true;
|
|
|
startY = e.pageY;
|
|
|
};
|
|
|
var onMouseUp = function onMouseUp() {
|
|
|
dragging = false;
|
|
|
};
|
|
|
var onMouseMove = function onMouseMove(e) {
|
|
|
if (dragging) {
|
|
|
var delta = e.pageY - startY;
|
|
|
if (delta < 0) {
|
|
|
delta = 0;
|
|
|
}
|
|
|
if (delta > 300) {
|
|
|
delta = 300;
|
|
|
}
|
|
|
var resizeH = height + delta + 'px';
|
|
|
setH(resizeH);
|
|
|
}
|
|
|
};
|
|
|
var resizeBar = resizeBarEl.current;
|
|
|
var dragging = false;
|
|
|
var startY = 0;
|
|
|
resizeBar.addEventListener('mousedown', onMouseDown);
|
|
|
document.addEventListener('mousemove', onMouseMove);
|
|
|
document.addEventListener('mouseup', onMouseUp);
|
|
|
return function () {
|
|
|
resizeBar.removeEventListener('mousedown', onMouseDown);
|
|
|
document.removeEventListener('mousemove', onMouseMove);
|
|
|
document.removeEventListener('mouseup', onMouseUp);
|
|
|
};
|
|
|
}
|
|
|
}, [cm, resizeBarEl]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
setH(height);
|
|
|
}, [height]);
|
|
|
var fixedWidth = processSize(width);
|
|
|
var fixedHeight = processSize(h);
|
|
|
var style = {
|
|
|
width: fixedWidth,
|
|
|
height: fixedHeight
|
|
|
};
|
|
|
var saveTime = (0,_react_17_0_2_react.useMemo)(function () {
|
|
|
if (lastedUpdateTime) {
|
|
|
var d = new Date(lastedUpdateTime);
|
|
|
var _h = d.getHours();
|
|
|
var m = d.getMinutes();
|
|
|
var s = d.getSeconds();
|
|
|
_h = _h < 10 ? '0' + _h : _h;
|
|
|
m = m < 10 ? '0' + m : m;
|
|
|
s = s < 10 ? '0' + s : s;
|
|
|
return "".concat(_h, ":").concat(m, ":").concat(s);
|
|
|
}
|
|
|
return 0;
|
|
|
}, [lastedUpdateTime]);
|
|
|
var formatProgramFill = function formatProgramFill(str) {
|
|
|
var arr = [];
|
|
|
if (showNullProgramButton) {
|
|
|
var num = -1;
|
|
|
str = str.replace(/(@▁▁@|@▁@)/g, function (a, b, c) {
|
|
|
arr.push({
|
|
|
multiLine: !(a === ADD_SINGLE)
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
return arr;
|
|
|
};
|
|
|
function onCancelStorage() {
|
|
|
window.sessionStorage.removeItem(id);
|
|
|
setTip(false);
|
|
|
setLastedUpdateTime(0);
|
|
|
}
|
|
|
function onReset() {
|
|
|
setTip(false);
|
|
|
setLastedUpdateTime(0);
|
|
|
cm.setValue(window.sessionStorage.getItem(id));
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "markdown-editor-wrapper",
|
|
|
ref: containerEl,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "markdown-editor-container ".concat(className, " ").concat(preview ? 'on-preview' : '', " ").concat(miniToolbar ? 'mini' : '', " ").concat(isFull ? 'full-screen' : ''),
|
|
|
style: style,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(toolbar, {
|
|
|
insertTemp: insertTemp,
|
|
|
watch: preview,
|
|
|
fullScreen: isFull,
|
|
|
showNullButton: showNullButton,
|
|
|
showNullProgramButton: showNullProgramButton,
|
|
|
onActionCallback: onActionCallback,
|
|
|
hidetoolBar: hidetoolBar
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "markdown-editor-body",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "codemirror-container",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("textarea", {
|
|
|
ref: cmEl,
|
|
|
placeholder: placeholder
|
|
|
})
|
|
|
}), preview ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
ref: previewEl,
|
|
|
className: "preview-container",
|
|
|
children: [mode === "stex" && /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml_stex, {
|
|
|
value: value
|
|
|
}), mode !== "stex" && /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
disabledFill: disabledFill,
|
|
|
showProgramFill: showNullProgramButton,
|
|
|
value: value
|
|
|
})]
|
|
|
}) : null]
|
|
|
})]
|
|
|
})
|
|
|
}), showResizeBar ? /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
ref: resizeBarEl,
|
|
|
className: "editor-resize"
|
|
|
}) : null, /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
children: TitleDesc[action] ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
|
|
|
centered: true,
|
|
|
title: TitleDesc[action],
|
|
|
open: true,
|
|
|
onCancel: onCancel,
|
|
|
footer: null,
|
|
|
className: "markdown-popup-form",
|
|
|
children: PluginEl
|
|
|
}) : null
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 44668:
|
|
|
/*!**********************************!*\
|
|
|
!*** ./src/components/modal.tsx ***!
|
|
|
\**********************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ Z: function() { return /* binding */ Dialog; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/classCallCheck.js */ 94312);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/createClass.js */ 24127);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/inherits.js */ 93242);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/createSuper.js */ 10564);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ 4676);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Dialog = /*#__PURE__*/function (_React$Component) {
|
|
|
_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_2___default()(Dialog, _React$Component);
|
|
|
var _super = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_3___default()(Dialog);
|
|
|
function Dialog(props) {
|
|
|
var _this;
|
|
|
_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0___default()(this, Dialog);
|
|
|
_this = _super.call(this, props);
|
|
|
var doc = window.document;
|
|
|
_this.node = doc.createElement('div');
|
|
|
doc.body.appendChild(_this.node);
|
|
|
return _this;
|
|
|
}
|
|
|
_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_1___default()(Dialog, [{
|
|
|
key: "render",
|
|
|
value: function render() {
|
|
|
var children = this.props.children;
|
|
|
return /*#__PURE__*/(0,react_dom__WEBPACK_IMPORTED_MODULE_5__.createPortal)(children, this.node);
|
|
|
}
|
|
|
}, {
|
|
|
key: "componentWillUnmount",
|
|
|
value: function componentWillUnmount() {
|
|
|
window.document.body.removeChild(this.node);
|
|
|
}
|
|
|
}]);
|
|
|
return Dialog;
|
|
|
}(react__WEBPACK_IMPORTED_MODULE_4__.Component);
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 14332:
|
|
|
/*!****************************************!*\
|
|
|
!*** ./src/components/useInterval.tsx ***!
|
|
|
\****************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ Z: function() { return /* binding */ useInterval; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
|
|
|
|
function useInterval(callback, delay) {
|
|
|
var savedCallback = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
|
|
|
|
// 保存新回调
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
|
savedCallback.current = callback;
|
|
|
});
|
|
|
|
|
|
// 建立 interval
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
|
function tick() {
|
|
|
savedCallback.current();
|
|
|
}
|
|
|
if (delay !== null) {
|
|
|
var id = setInterval(tick, delay);
|
|
|
return function () {
|
|
|
return clearInterval(id);
|
|
|
};
|
|
|
}
|
|
|
}, [delay]);
|
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 83729:
|
|
|
/*!***************************************************!*\
|
|
|
!*** ./src/pages/Paths/New/index.tsx + 5 modules ***!
|
|
|
\***************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// ESM COMPAT FLAG
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"default": function() { return /* binding */ New; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/toConsumableArray.js
|
|
|
var toConsumableArray = __webpack_require__(93923);
|
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/defineProperty.js
|
|
|
var defineProperty = __webpack_require__(22060);
|
|
|
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(26801);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(10574);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(39343);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(11006);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectWithoutProperties.js
|
|
|
var objectWithoutProperties = __webpack_require__(27161);
|
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
|
|
|
var _umi_production_exports = __webpack_require__(66660);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(1056);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tree-select/index.js + 17 modules
|
|
|
var tree_select = __webpack_require__(98228);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
|
var es_form = __webpack_require__(78241);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
var message = __webpack_require__(8591);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/auto-complete/index.js
|
|
|
var auto_complete = __webpack_require__(88522);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
|
|
var row = __webpack_require__(95237);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
|
|
var col = __webpack_require__(43604);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/switch/index.js + 2 modules
|
|
|
var es_switch = __webpack_require__(78673);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
|
|
|
var es_radio = __webpack_require__(5112);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
|
|
|
var es_checkbox = __webpack_require__(24905);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules
|
|
|
var upload = __webpack_require__(6557);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
|
|
|
var markdown_editor = __webpack_require__(20755);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paths/New/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Newmodules = ({"bg":"bg____raBL","wrap":"wrap___HeK2P","crumbs":"crumbs___bamBY","titleWrap":"titleWrap___UpC0c","flexRow":"flexRow___WjoyK","flexJustifyCenter":"flexJustifyCenter___V6ndk","flexAlignEnd":"flexAlignEnd___So64w","flexAlignCenter":"flexAlignCenter___WWRXs","flexColumn":"flexColumn___b0Fz8","formWrap":"formWrap___Bmhgz","fieldWrap":"fieldWrap___pR4UB","mdWrap":"mdWrap___FPskk","backgroundFa":"backgroundFa___ghlCO","aBtn":"aBtn___M7dWu","bBtn":"bBtn___XycZO","cascaderWrap":"cascaderWrap___CPNAV","listItem":"listItem____eV5T","right":"right___x8wr7","one":"one___wdYdi","schoolHintWrap":"schoolHintWrap___AWsQj","colorCDCDCD":"colorCDCDCD___xguLh","color0152d9":"color0152d9___MEYYd","spanText":"spanText___Srs_u"});
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(27291);
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(47015);
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
var fetch = __webpack_require__(97174);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/empty/index.js + 3 modules
|
|
|
var empty = __webpack_require__(64165);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paths/New/Cascader/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Cascadermodules = ({"cascaderContainer":"cascaderContainer___uz26h","valueWrap":"valueWrap___zTHXb","valueItem":"valueItem___vBNoA","placeholder":"placeholder___bJTkn","modalWrap":"modalWrap___uhROO","left":"left___oZrbl","right":"right___y9QjL","disabled":"disabled___LVx0f","emptyWrap":"emptyWrap___KG5pK"});
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/CloseOutlined.js + 1 modules
|
|
|
var CloseOutlined = __webpack_require__(99174);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/RightOutlined.js + 1 modules
|
|
|
var RightOutlined = __webpack_require__(22311);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paths/New/Cascader/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["sub_discipline"],
|
|
|
_excluded2 = ["sub_disciplines"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* @param dataSource 数据源
|
|
|
* @param defaultValue 默认选中的数据
|
|
|
* @param placeholder 提示语
|
|
|
* @param onChange 点击回调事件 返回选中二级的id
|
|
|
*/
|
|
|
|
|
|
|
|
|
var ref = /*#__PURE__*/(0,_react_17_0_2_react.createRef)();
|
|
|
var Cascader = function Cascader(_ref) {
|
|
|
var dataSource = _ref.dataSource,
|
|
|
placeholder = _ref.placeholder,
|
|
|
defaultValue = _ref.defaultValue,
|
|
|
onChange = _ref.onChange;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
leftStatus = _useState2[0],
|
|
|
setLeftStatus = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)({
|
|
|
data: [],
|
|
|
objData: {},
|
|
|
ids: []
|
|
|
}),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
value = _useState4[0],
|
|
|
setValue = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)({}),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
targetData = _useState6[0],
|
|
|
setTargetData = _useState6[1];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
window.addEventListener('click', function () {
|
|
|
setLeftStatus(false);
|
|
|
setTargetData({});
|
|
|
});
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (defaultValue) {
|
|
|
var objData = {};
|
|
|
var ids = [];
|
|
|
defaultValue.forEach(function (list) {
|
|
|
var sub_discipline = list.sub_discipline,
|
|
|
rest = objectWithoutProperties_default()(list, _excluded);
|
|
|
if (sub_discipline) {
|
|
|
objData[sub_discipline.id] = objectSpread2_default()(objectSpread2_default()({}, rest), {}, {
|
|
|
sub_disciplines: [sub_discipline]
|
|
|
});
|
|
|
ids.push(sub_discipline.id);
|
|
|
}
|
|
|
});
|
|
|
setValue({
|
|
|
ids: ids,
|
|
|
data: Object.values(objData),
|
|
|
objData: objData
|
|
|
});
|
|
|
onChange(ids);
|
|
|
}
|
|
|
}, [defaultValue]);
|
|
|
var getEmpty = function getEmpty() {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cascadermodules.emptyWrap,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(empty/* default */.Z, {
|
|
|
image: empty/* default */.Z.PRESENTED_IMAGE_SIMPLE
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 选中课程事件
|
|
|
*/
|
|
|
var onItemClick = function onItemClick(item) {
|
|
|
if (value.ids.includes(item.id)) {
|
|
|
return false;
|
|
|
}
|
|
|
var sub_disciplines = targetData.sub_disciplines,
|
|
|
rest = objectWithoutProperties_default()(targetData, _excluded2);
|
|
|
var _value = objectSpread2_default()(objectSpread2_default()({}, value.objData), {}, defineProperty_default()({}, item.id, objectSpread2_default()(objectSpread2_default()({}, rest), {}, {
|
|
|
sub_disciplines: [item]
|
|
|
})));
|
|
|
setValue({
|
|
|
ids: [].concat(toConsumableArray_default()(value.ids), [item.id]),
|
|
|
data: Object.values(_value),
|
|
|
objData: _value
|
|
|
});
|
|
|
onChange([].concat(toConsumableArray_default()(value.ids), [item.id]));
|
|
|
};
|
|
|
/**
|
|
|
*
|
|
|
*/
|
|
|
var onItemRemove = function onItemRemove(id) {
|
|
|
var objData = value.objData;
|
|
|
delete objData[id];
|
|
|
var ids = value.ids.filter(function (item) {
|
|
|
return item !== id;
|
|
|
});
|
|
|
setValue({
|
|
|
data: Object.values(objData),
|
|
|
objData: objData,
|
|
|
ids: ids
|
|
|
});
|
|
|
onChange(ids);
|
|
|
};
|
|
|
var top = 45;
|
|
|
if (ref && ref.current && ref.current.clientHeight > 45) {
|
|
|
top = ref.current.clientHeight + 5;
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cascadermodules.cascaderContainer,
|
|
|
onClick: function onClick(event) {
|
|
|
event.stopPropagation();
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
ref: ref,
|
|
|
className: Cascadermodules.valueWrap,
|
|
|
onClick: function onClick() {
|
|
|
return setLeftStatus(!leftStatus);
|
|
|
},
|
|
|
children: [value.data.length === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: Cascadermodules.placeholder,
|
|
|
children: placeholder ? placeholder : '请选择方向&课程'
|
|
|
}), value.data.map(function (item) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cascadermodules.valueItem,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: item.name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "/"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: item.sub_disciplines[0].name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
onClick: function onClick(event) {
|
|
|
event.stopPropagation();
|
|
|
event.preventDefault();
|
|
|
onItemRemove(item.sub_disciplines[0].id);
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(CloseOutlined/* default */.Z, {})
|
|
|
})]
|
|
|
}, item.id);
|
|
|
})]
|
|
|
}), leftStatus && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cascadermodules.modalWrap,
|
|
|
style: {
|
|
|
top: top
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cascadermodules.left,
|
|
|
children: [dataSource.length === 0 && getEmpty(), dataSource.length > 0 && dataSource.map(function (item) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
onClick: function onClick() {
|
|
|
setTargetData(item);
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: item.name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RightOutlined/* default */.Z, {})
|
|
|
})]
|
|
|
}, item.id);
|
|
|
})]
|
|
|
}), targetData.sub_disciplines && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cascadermodules.right,
|
|
|
children: [targetData.sub_disciplines.length === 0 && getEmpty(), targetData.sub_disciplines.length > 0 && targetData.sub_disciplines.map(function (item) {
|
|
|
var active = value.ids.includes(item.id);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: active ? Cascadermodules.disabled : '',
|
|
|
onClick: function onClick() {
|
|
|
onItemClick(item);
|
|
|
setLeftStatus(false);
|
|
|
},
|
|
|
children: item.name
|
|
|
}, item.id);
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var New_Cascader = (Cascader);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
var es_modal = __webpack_require__(43418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
|
var table = __webpack_require__(72315);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/cascader/index.js + 18 modules
|
|
|
var cascader = __webpack_require__(19842);
|
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
|
|
var dayjs_min = __webpack_require__(9498);
|
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/CheckCircleFilled.js + 1 modules
|
|
|
var CheckCircleFilled = __webpack_require__(95934);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/CloseCircleFilled.js + 1 modules
|
|
|
var CloseCircleFilled = __webpack_require__(48796);
|
|
|
// EXTERNAL MODULE: ./src/utils/cityData.ts
|
|
|
var cityData = __webpack_require__(22941);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paths/New/components/AppplySchoolModal/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var AppplySchoolModalmodules = ({"flexRow":"flexRow___qY1Ro","flexColumn":"flexColumn___xTKsc","formWrap":"formWrap___OJ1NZ","example":"example___XZnZv","footerWrap":"footerWrap___DSZCv"});
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paths/New/components/AppplySchoolModal/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var AppplySchoolModal_excluded = ["newCourse", "globalSetting", "loading", "dispatch", "schoolName", "onSuccess"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var filter = function filter(inputValue, path) {
|
|
|
return path.some(function (option) {
|
|
|
return option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;
|
|
|
});
|
|
|
};
|
|
|
var TextArea = input/* default */.Z.TextArea;
|
|
|
var AppplySchoolModal = function AppplySchoolModal(_ref) {
|
|
|
var newCourse = _ref.newCourse,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch,
|
|
|
schoolName = _ref.schoolName,
|
|
|
_ref$onSuccess = _ref.onSuccess,
|
|
|
onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess,
|
|
|
props = objectWithoutProperties_default()(_ref, AppplySchoolModal_excluded);
|
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
form = _Form$useForm2[0];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
form.setFieldsValue({
|
|
|
name: schoolName
|
|
|
});
|
|
|
}, [schoolName]);
|
|
|
var handleFinish = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(values) {
|
|
|
var _ref3, name, _ref3$city, city, address, remarks, res, modal;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
_ref3 = values || {}, name = _ref3.name, _ref3$city = _ref3.city, city = _ref3$city === void 0 ? [] : _ref3$city, address = _ref3.address, remarks = _ref3.remarks;
|
|
|
_context2.next = 3;
|
|
|
return dispatch({
|
|
|
type: 'newCourse/appplySchool',
|
|
|
payload: {
|
|
|
name: name,
|
|
|
province: city[0],
|
|
|
city: city[1],
|
|
|
address: address,
|
|
|
remarks: remarks
|
|
|
}
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context2.sent;
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) == 2)) {
|
|
|
_context2.next = 7;
|
|
|
break;
|
|
|
}
|
|
|
modal = es_modal/* default */.Z.confirm({
|
|
|
icon: null,
|
|
|
width: 600,
|
|
|
centered: true,
|
|
|
okText: '确定',
|
|
|
cancelText: '取消',
|
|
|
title: '提示',
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
children: "\u7CFB\u7EDF\u68C0\u6D4B\u5230\u60A8\u7533\u8BF7\u65B0\u589E\u7684\u5355\u4F4D\u5DF2\u5B58\u5728\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4E3A\u8BE5\u5355\u4F4D\uFF1F"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
columns: [{
|
|
|
title: '学校/单位',
|
|
|
dataIndex: 'name'
|
|
|
}, {
|
|
|
title: '用户数',
|
|
|
width: 150,
|
|
|
dataIndex: 'users_count'
|
|
|
}],
|
|
|
dataSource: [objectSpread2_default()({}, res)],
|
|
|
pagination: false
|
|
|
})]
|
|
|
}),
|
|
|
onOk: function () {
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return onSuccess(name);
|
|
|
case 2:
|
|
|
modal.destroy();
|
|
|
dispatch({
|
|
|
type: 'newCourse/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}(),
|
|
|
onCancel: function onCancel() {
|
|
|
modal.destroy();
|
|
|
}
|
|
|
});
|
|
|
return _context2.abrupt("return");
|
|
|
case 7:
|
|
|
dispatch({
|
|
|
type: 'newCourse/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
if (res.status == 0) {
|
|
|
message/* default */.ZP.success("新增发布单位成功!");
|
|
|
onSuccess(name);
|
|
|
}
|
|
|
case 9:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function handleFinish(_x) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
|
|
|
centered: true,
|
|
|
keyboard: false,
|
|
|
closable: false,
|
|
|
destroyOnClose: true,
|
|
|
open: newCourse.actionTabs.key === 'NewCourse-AppplySchool',
|
|
|
title: "\u7533\u8BF7\u53D1\u5E03\u5355\u4F4D",
|
|
|
width: "600px",
|
|
|
footer: null,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
className: AppplySchoolModalmodules.formWrap,
|
|
|
form: form,
|
|
|
labelCol: {
|
|
|
span: 4
|
|
|
},
|
|
|
wrapperCol: {
|
|
|
span: 20
|
|
|
},
|
|
|
onFinish: handleFinish,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u53D1\u5E03\u5355\u4F4D\uFF1A",
|
|
|
name: "name",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入学校或工作单位'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u5E03\u5355\u4F4D"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "".concat(AppplySchoolModalmodules.flexRow, " ").concat(AppplySchoolModalmodules.example),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: "\u793A\u4F8B\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: AppplySchoolModalmodules.flexColumn,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(CheckCircleFilled/* default */.Z, {
|
|
|
style: {
|
|
|
color: "rgb(82, 196, 26)"
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "font14 ml5",
|
|
|
children: "\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(CloseCircleFilled/* default */.Z, {
|
|
|
style: {
|
|
|
color: "red"
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "font14 ml5",
|
|
|
children: ["\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784", dayjs_min_default()().format("YYYY"), "\u6625"]
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u5730\u533A\uFF1A",
|
|
|
name: "city",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(cascader/* default */.Z, {
|
|
|
allowClear: true,
|
|
|
size: 'middle',
|
|
|
options: cityData/* CityData */.P,
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u6240\u5728\u5730",
|
|
|
showSearch: {
|
|
|
matchInputWidth: true,
|
|
|
filter: filter
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u8BE6\u7EC6\u5730\u5740\uFF1A",
|
|
|
name: "address",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
placeholder: "\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u8BF4\u660E\uFF1A",
|
|
|
name: "remarks",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
|
|
|
placeholder: "\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: AppplySchoolModalmodules.footerWrap,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
className: "mr5",
|
|
|
size: 'middle',
|
|
|
onClick: function onClick() {
|
|
|
dispatch({
|
|
|
type: 'newCourse/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
},
|
|
|
children: "\u53D6\u6D88"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
size: 'middle',
|
|
|
type: "primary",
|
|
|
htmlType: "submit",
|
|
|
loading: loading['newCourse/appplySchool'],
|
|
|
children: "\u4FDD\u5B58"
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var components_AppplySchoolModal = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
var newCourse = _ref4.newCourse,
|
|
|
loading = _ref4.loading,
|
|
|
globalSetting = _ref4.globalSetting;
|
|
|
return {
|
|
|
newCourse: newCourse,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects
|
|
|
};
|
|
|
})(AppplySchoolModal));
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paths/New/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var New_excluded = ["user", "newCourse", "globalSetting", "loading", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var New_TextArea = input/* default */.Z.TextArea;
|
|
|
var TreeNode = tree_select/* default.TreeNode */.Z.TreeNode;
|
|
|
var NewCoursePage = function NewCoursePage(_ref) {
|
|
|
var _formValue$name, _formValue$name_en, _jsx2;
|
|
|
var user = _ref.user,
|
|
|
newCourse = _ref.newCourse,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch,
|
|
|
props = objectWithoutProperties_default()(_ref, New_excluded);
|
|
|
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
|
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
|
|
|
searchParams = _useSearchParams2[0];
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
form = _Form$useForm2[0];
|
|
|
var _useState = (0,_react_17_0_2_react.useState)({}),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
formValue = _useState2[0],
|
|
|
setFormValue = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
isEdit = _useState4[0],
|
|
|
setIsEdit = _useState4[1];
|
|
|
var pathId = (0,_react_17_0_2_react.useRef)();
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(true),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
custseq = _useState6[0],
|
|
|
setCustSeq = _useState6[1];
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
showspoc = _useState8[0],
|
|
|
setShowSpoc = _useState8[1];
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
Filelists = _useState10[0],
|
|
|
setFileLists = _useState10[1];
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
Filelists1 = _useState12[0],
|
|
|
setFileLists1 = _useState12[1];
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(true),
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
show_tag = _useState14[0],
|
|
|
setshow_tag = _useState14[1];
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
show_history = _useState16[0],
|
|
|
setshow_history = _useState16[1];
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
ismodel = _useState18[0],
|
|
|
setismodel = _useState18[1];
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)(-1),
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
open_num = _useState20[0],
|
|
|
setopen_num = _useState20[1];
|
|
|
var _useState21 = (0,_react_17_0_2_react.useState)(true),
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
schoolLoading = _useState22[0],
|
|
|
setSchoolLoading = _useState22[1];
|
|
|
var _useState23 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
|
schoolList = _useState24[0],
|
|
|
setSchoolList = _useState24[1];
|
|
|
var _useState25 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
|
filterSchoolList = _useState26[0],
|
|
|
setFilterSchoolList = _useState26[1];
|
|
|
var _useState27 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState28 = slicedToArray_default()(_useState27, 2),
|
|
|
allow_download = _useState28[0],
|
|
|
setallow_download = _useState28[1];
|
|
|
var _useState29 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
|
show_course_section = _useState30[0],
|
|
|
setShowCourseSection = _useState30[1];
|
|
|
|
|
|
// 方向课程数据源
|
|
|
var _useState31 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
|
options = _useState32[0],
|
|
|
setOptions = _useState32[1];
|
|
|
|
|
|
// 方向课程的值
|
|
|
var _useState33 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState34 = slicedToArray_default()(_useState33, 2),
|
|
|
disciplinesValue = _useState34[0],
|
|
|
setDisciplinesValue = _useState34[1];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
var _globalSetting$settin;
|
|
|
getOptionsData();
|
|
|
getSchoolOption();
|
|
|
pathId.current = params.pathId;
|
|
|
setIsEdit(!!pathId.current);
|
|
|
(0,util/* setDocumentTitle */.Dk)(globalSetting === null || globalSetting === void 0 || (_globalSetting$settin = globalSetting.setting) === null || _globalSetting$settin === void 0 ? void 0 : _globalSetting$settin.name);
|
|
|
form.setFieldsValue({
|
|
|
learning_notes_title: '课程须知'
|
|
|
});
|
|
|
if (pathId.current) {
|
|
|
getEditCourseData();
|
|
|
}
|
|
|
}, []);
|
|
|
|
|
|
/**
|
|
|
* 获取方向/课程的数据
|
|
|
*/
|
|
|
var getOptionsData = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var result;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return (0,fetch/* default */.ZP)("/api/disciplines.json", {
|
|
|
method: 'get',
|
|
|
params: {
|
|
|
source: 'subject'
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
result = _context.sent;
|
|
|
setOptions(result.disciplines);
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function getOptionsData() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var getSchoolOption = /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
setSchoolLoading(true);
|
|
|
_context2.next = 3;
|
|
|
return dispatch({
|
|
|
type: 'newCourse/getSchoolOption'
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context2.sent;
|
|
|
setSchoolLoading(false);
|
|
|
setSchoolList(res === null || res === void 0 ? void 0 : res.schools);
|
|
|
setFilterSchoolList(res === null || res === void 0 ? void 0 : res.schools);
|
|
|
case 7:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function getSchoolOption() {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var goBack = function goBack() {
|
|
|
if (searchParams.get("username")) {
|
|
|
_umi_production_exports.history.push("/users/".concat(searchParams.get("username"), "/paths"));
|
|
|
return;
|
|
|
}
|
|
|
_umi_production_exports.history.push(isEdit ? "/paths/".concat(pathId.current) : '/paths');
|
|
|
};
|
|
|
var getEditCourseData = /*#__PURE__*/function () {
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
var res, _res$toast, _res$toast2, _res$toast3, _res$attachments, _res$attachments_b, _res$toast4, formData, _res$attachments2, _res$attachments3, _res$attachments4, _res$attachments_b2, _res$attachments_b3, _res$attachments_b4;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
_context3.next = 2;
|
|
|
return dispatch({
|
|
|
type: 'newCourse/getEditCourseData',
|
|
|
payload: {
|
|
|
id: pathId.current
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context3.sent;
|
|
|
if (res) {
|
|
|
formData = {
|
|
|
name: res.name,
|
|
|
name_en: res.name_en,
|
|
|
intro: res.description,
|
|
|
content: res === null || res === void 0 || (_res$toast = res.toast) === null || _res$toast === void 0 ? void 0 : _res$toast.content,
|
|
|
notice: res.learning_notes,
|
|
|
school_id: res === null || res === void 0 ? void 0 : res.school,
|
|
|
learning_notes_title: res.learning_notes_title || '课程须知'
|
|
|
};
|
|
|
if (res.disciplines && res.disciplines.length > 0) {
|
|
|
setDisciplinesValue(res.disciplines);
|
|
|
// formData['sub_discipline_ids'] = [
|
|
|
// res.disciplines[0].id,
|
|
|
// res.disciplines[0].sub_discipline.id,
|
|
|
// ];
|
|
|
}
|
|
|
|
|
|
form.setFieldsValue(formData);
|
|
|
setismodel(res === null || res === void 0 || (_res$toast2 = res.toast) === null || _res$toast2 === void 0 ? void 0 : _res$toast2.is_open);
|
|
|
setopen_num(res === null || res === void 0 || (_res$toast3 = res.toast) === null || _res$toast3 === void 0 ? void 0 : _res$toast3.open_num);
|
|
|
setCustSeq(res === null || res === void 0 ? void 0 : res.cust_seq);
|
|
|
setShowSpoc(res === null || res === void 0 ? void 0 : res.show_spoc);
|
|
|
setshow_history(res === null || res === void 0 ? void 0 : res.show_history);
|
|
|
setShowCourseSection(res === null || res === void 0 ? void 0 : res.show_course_section);
|
|
|
setallow_download(res === null || res === void 0 ? void 0 : res.allow_download);
|
|
|
setshow_tag(res === null || res === void 0 ? void 0 : res.show_tag);
|
|
|
if ((res === null || res === void 0 || (_res$attachments = res.attachments) === null || _res$attachments === void 0 ? void 0 : _res$attachments.length) > 0) {
|
|
|
setFileLists([{
|
|
|
uid: res === null || res === void 0 || (_res$attachments2 = res.attachments) === null || _res$attachments2 === void 0 || (_res$attachments2 = _res$attachments2[0]) === null || _res$attachments2 === void 0 ? void 0 : _res$attachments2.id,
|
|
|
name: res === null || res === void 0 || (_res$attachments3 = res.attachments) === null || _res$attachments3 === void 0 || (_res$attachments3 = _res$attachments3[0]) === null || _res$attachments3 === void 0 ? void 0 : _res$attachments3.title,
|
|
|
response: {
|
|
|
id: res === null || res === void 0 || (_res$attachments4 = res.attachments) === null || _res$attachments4 === void 0 || (_res$attachments4 = _res$attachments4[0]) === null || _res$attachments4 === void 0 ? void 0 : _res$attachments4.id
|
|
|
}
|
|
|
}]);
|
|
|
}
|
|
|
if ((res === null || res === void 0 || (_res$attachments_b = res.attachments_b) === null || _res$attachments_b === void 0 ? void 0 : _res$attachments_b.length) > 0) {
|
|
|
setFileLists1([{
|
|
|
uid: res === null || res === void 0 || (_res$attachments_b2 = res.attachments_b) === null || _res$attachments_b2 === void 0 || (_res$attachments_b2 = _res$attachments_b2[0]) === null || _res$attachments_b2 === void 0 ? void 0 : _res$attachments_b2.id,
|
|
|
name: res === null || res === void 0 || (_res$attachments_b3 = res.attachments_b) === null || _res$attachments_b3 === void 0 || (_res$attachments_b3 = _res$attachments_b3[0]) === null || _res$attachments_b3 === void 0 ? void 0 : _res$attachments_b3.title,
|
|
|
response: {
|
|
|
id: res === null || res === void 0 || (_res$attachments_b4 = res.attachments_b) === null || _res$attachments_b4 === void 0 || (_res$attachments_b4 = _res$attachments_b4[0]) === null || _res$attachments_b4 === void 0 ? void 0 : _res$attachments_b4.id
|
|
|
}
|
|
|
}]);
|
|
|
}
|
|
|
setFormValue({
|
|
|
name: res.name,
|
|
|
intro: res.description,
|
|
|
notice: res.learning_notes,
|
|
|
content: res === null || res === void 0 || (_res$toast4 = res.toast) === null || _res$toast4 === void 0 ? void 0 : _res$toast4.content
|
|
|
});
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return function getEditCourseData() {
|
|
|
return _ref4.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleFinish = /*#__PURE__*/function () {
|
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(values) {
|
|
|
var _Filelists$, _Filelists1$;
|
|
|
var _ref6, name, description, learning_notes, name_en, learning_notes_title, sub_discipline_ids, school_id, type, isIncludes, schhool_name, param, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
_ref6 = values || {}, name = _ref6.name, description = _ref6.intro, learning_notes = _ref6.notice, name_en = _ref6.name_en, learning_notes_title = _ref6.learning_notes_title, sub_discipline_ids = _ref6.sub_discipline_ids, school_id = _ref6.school_id;
|
|
|
type = isEdit ? 'newCourse/editCourse' : 'newCourse/submitCourse';
|
|
|
isIncludes = false;
|
|
|
schhool_name = null;
|
|
|
schoolList.map(function (item) {
|
|
|
if (school_id === item.name) {
|
|
|
isIncludes = true;
|
|
|
schhool_name = item.id;
|
|
|
}
|
|
|
});
|
|
|
if (isIncludes) {
|
|
|
_context4.next = 7;
|
|
|
break;
|
|
|
}
|
|
|
return _context4.abrupt("return", message/* default */.ZP.error("\u672A\u627E\u5230\u5305\u542B'".concat(school_id, "'\u7684\u53D1\u5E03\u5355\u4F4D")));
|
|
|
case 7:
|
|
|
param = {
|
|
|
id: pathId.current,
|
|
|
name: name,
|
|
|
name_en: name_en,
|
|
|
description: description,
|
|
|
learning_notes: learning_notes,
|
|
|
cust_seq: custseq,
|
|
|
show_spoc: showspoc,
|
|
|
school_id: schhool_name,
|
|
|
show_tag: show_tag,
|
|
|
show_history: show_history,
|
|
|
show_course_section: show_course_section,
|
|
|
allow_download: allow_download,
|
|
|
learning_notes_title: learning_notes_title,
|
|
|
attachment_ids: [Filelists === null || Filelists === void 0 || (_Filelists$ = Filelists[0]) === null || _Filelists$ === void 0 || (_Filelists$ = _Filelists$.response) === null || _Filelists$ === void 0 ? void 0 : _Filelists$.id],
|
|
|
attachment_ids_b: [Filelists1 === null || Filelists1 === void 0 || (_Filelists1$ = Filelists1[0]) === null || _Filelists1$ === void 0 || (_Filelists1$ = _Filelists1$.response) === null || _Filelists1$ === void 0 ? void 0 : _Filelists1$.id],
|
|
|
sub_discipline_ids: sub_discipline_ids,
|
|
|
subject_toast_attributes: {
|
|
|
is_open: ismodel,
|
|
|
open_num: open_num,
|
|
|
content: values.content
|
|
|
}
|
|
|
};
|
|
|
_context4.next = 10;
|
|
|
return dispatch({
|
|
|
type: type,
|
|
|
payload: objectSpread2_default()({}, param)
|
|
|
});
|
|
|
case 10:
|
|
|
res = _context4.sent;
|
|
|
(res === null || res === void 0 ? void 0 : res.subject_id) && _umi_production_exports.history.push("/paths/".concat(res.subject_id));
|
|
|
case 12:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
return function handleFinish(_x) {
|
|
|
return _ref5.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleApplySchool = function handleApplySchool() {
|
|
|
dispatch({
|
|
|
type: 'newCourse/setActionTabs',
|
|
|
payload: {
|
|
|
key: 'NewCourse-AppplySchool'
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
var onSuccess = function onSuccess(value) {
|
|
|
getSchoolOption();
|
|
|
setFormValue(objectSpread2_default()(objectSpread2_default()({}, form.getFieldsValue()), {}, {
|
|
|
school_id: value
|
|
|
}));
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Newmodules.wrap,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Newmodules.bg,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Newmodules.crumbs,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u5B9E\u8DF5\u8BFE\u7A0B"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
className: "iconfont icon-zhankai1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("b", {
|
|
|
children: [isEdit ? '编辑' : '创建', "\u5B9E\u8DF5\u8BFE\u7A0B"]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Newmodules.titleWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: [isEdit ? '编辑' : '创建', "\u5B9E\u8DF5\u8BFE\u7A0B"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
|
|
|
onClick: goBack,
|
|
|
children: "\u8FD4\u56DE"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
form: form,
|
|
|
className: Newmodules.formWrap,
|
|
|
scrollToFirstError: true,
|
|
|
layout: "vertical",
|
|
|
colon: false,
|
|
|
onValuesChange: function onValuesChange() {
|
|
|
var formValue = form.getFieldsValue();
|
|
|
if ('school_id' in formValue) {
|
|
|
setFilterSchoolList(schoolList.filter(function (item) {
|
|
|
return item.name.includes(formValue.school_id);
|
|
|
}));
|
|
|
}
|
|
|
setFormValue(objectSpread2_default()({}, formValue));
|
|
|
},
|
|
|
onFinish: handleFinish,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Newmodules.fieldWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
extra: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "tr c-grey-333 font12 mt3",
|
|
|
children: "".concat(((_formValue$name = formValue.name) === null || _formValue$name === void 0 ? void 0 : _formValue$name.length) || 0, "/60")
|
|
|
}),
|
|
|
name: "name",
|
|
|
label: "\u5B9E\u8DF5\u8BFE\u7A0B\u540D\u79F0",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入实践课程名称'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(New_TextArea, {
|
|
|
maxLength: 60,
|
|
|
placeholder: "\u4F8B\u5982\uFF1A\u5927\u5B66\u8BA1\u7B97\u673A\u57FA\u7840 \u2014\u2014 \u8BA1\u7B97\u601D\u7EF4"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, (_jsx2 = {
|
|
|
style: {
|
|
|
marginTop: '-24px'
|
|
|
},
|
|
|
name: "name_en",
|
|
|
label: "\u82F1\u6587\u8BFE\u7A0B\u540D\u79F0"
|
|
|
}, defineProperty_default()(_jsx2, "style", {
|
|
|
marginTop: '-24px'
|
|
|
}), defineProperty_default()(_jsx2, "extra", /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "tr c-grey-333 font12 mt3",
|
|
|
children: "".concat(((_formValue$name_en = formValue.name_en) === null || _formValue$name_en === void 0 ? void 0 : _formValue$name_en.length) || 0, "/200")
|
|
|
})), defineProperty_default()(_jsx2, "rules", [{
|
|
|
message: '请输入英文课程名称'
|
|
|
}]), defineProperty_default()(_jsx2, "children", /*#__PURE__*/(0,jsx_runtime.jsx)(New_TextArea, {
|
|
|
maxLength: 200,
|
|
|
placeholder: "College Computer Fundamentals - Computational Thinking"
|
|
|
// addonAfter={`${formValue.name_en?.length || 0}/200`}
|
|
|
})), _jsx2)), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
name: "sub_discipline_ids",
|
|
|
label: "\u65B9\u5411&\u8BFE\u7A0B",
|
|
|
style: {
|
|
|
marginTop: '-24px'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(New_Cascader, {
|
|
|
defaultValue: disciplinesValue,
|
|
|
dataSource: options,
|
|
|
onChange: function onChange(sub_discipline_ids) {
|
|
|
return form.setFieldsValue({
|
|
|
sub_discipline_ids: sub_discipline_ids
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u53D1\u5E03\u5355\u4F4D",
|
|
|
name: "school_id",
|
|
|
wrapperCol: {
|
|
|
span: 24
|
|
|
},
|
|
|
extra: !schoolLoading && formValue.school_id && !(schoolList !== null && schoolList !== void 0 && schoolList.find(function (item) {
|
|
|
return item.name === formValue.school_id;
|
|
|
})) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Newmodules.schoolHintWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Newmodules.colorCDCDCD,
|
|
|
children: ["\u672A\u627E\u5230\u5305\u542B\u201C", formValue.school_id, "\u201D\u7684\u53D1\u5E03\u5355\u4F4D\uFF0C"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "".concat(Newmodules.color0152d9),
|
|
|
onClick: handleApplySchool,
|
|
|
children: "\u7533\u8BF7\u65B0\u589E"
|
|
|
})]
|
|
|
}),
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入发布单位'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(auto_complete/* default */.Z, {
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u5E03\u5355\u4F4D",
|
|
|
showSearch: true,
|
|
|
size: "large",
|
|
|
options: filterSchoolList === null || filterSchoolList === void 0 ? void 0 : filterSchoolList.map(function (item) {
|
|
|
return {
|
|
|
value: item.name
|
|
|
};
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Newmodules.mdWrap,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
name: "intro",
|
|
|
label: "\u7B80\u4ECB",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入实践课程的简介'
|
|
|
}, {
|
|
|
whitespace: true,
|
|
|
message: '请输入实践课程的简介'
|
|
|
}, {
|
|
|
max: 65000,
|
|
|
message: '实践课程的简介最大限制65000个字符'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
|
|
|
watch: true,
|
|
|
defaultValue: formValue.intro
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Newmodules.mdWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "top",
|
|
|
className: "mb10 mt10",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-red mr10",
|
|
|
children: "*"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "1",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
name: "learning_notes_title",
|
|
|
label: "",
|
|
|
style: {
|
|
|
marginBottom: 0
|
|
|
},
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输课程须知标题'
|
|
|
}, {
|
|
|
max: 15,
|
|
|
message: '请输课程须知标题最大限制15个字符'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
style: {
|
|
|
height: 38
|
|
|
},
|
|
|
placeholder: "\u8BF7\u8F93\u5165"
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
name: "notice",
|
|
|
label: "",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入实践课程的课程须知'
|
|
|
}, {
|
|
|
whitespace: true,
|
|
|
message: '请输入实践课程的课程须知'
|
|
|
}, {
|
|
|
max: 65000,
|
|
|
message: '实践课程的课程须知最大限制65000个字符'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
|
|
|
insertTemp: "1",
|
|
|
watch: true,
|
|
|
defaultValue: formValue.notice
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Newmodules.mdWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
display: 'flex',
|
|
|
alignItems: 'center'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_switch/* default */.Z, {
|
|
|
checked: ismodel,
|
|
|
style: {
|
|
|
marginRight: 11,
|
|
|
minWidth: 32
|
|
|
},
|
|
|
onChange: function onChange(e) {
|
|
|
setismodel(e);
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Newmodules.spanText,
|
|
|
children: ["\u8BFE\u7A0B\u516C\u544A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\uFF08\u652F\u6301\u8001\u5E08\u81EA\u5B9A\u4E49\u516C\u544A\u5185\u5BB9\uFF0C\u4EE5\u5F39\u6846\u5F62\u5F0F\u63D0\u9192\u8BFE\u7A0B\u7684\u5B66\u4E60\u7528\u6237\uFF09"
|
|
|
})]
|
|
|
})]
|
|
|
}), ismodel && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
style: {
|
|
|
marginTop: 10
|
|
|
},
|
|
|
name: "content",
|
|
|
label: "",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入实践课程的课程提示'
|
|
|
}, {
|
|
|
max: 10000,
|
|
|
message: '实践课程的课程提示最大限制10000个字符'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
|
|
|
insertTemp: "1",
|
|
|
watch: true,
|
|
|
defaultValue: formValue.content
|
|
|
})
|
|
|
}), ismodel && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
marginTop: 20,
|
|
|
borderBottom: '1px solid #DBDCE0',
|
|
|
paddingBottom: 7
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("label", {
|
|
|
style: {
|
|
|
color: '#000',
|
|
|
marginRight: 10
|
|
|
},
|
|
|
children: "\u63D0\u793A\u6B21\u6570"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
|
|
|
value: open_num,
|
|
|
onChange: function onChange(e) {
|
|
|
setopen_num(e.target.value);
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
className: "c-black",
|
|
|
value: -1,
|
|
|
children: "\u6BCF\u6B21"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
className: "ml20 c-black",
|
|
|
value: 1,
|
|
|
children: "\u4E00\u6B21"
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Newmodules.mdWrap,
|
|
|
style: {
|
|
|
marginTop: 25
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
checked: custseq,
|
|
|
onChange: function onChange(e) {
|
|
|
setCustSeq(e === null || e === void 0 ? void 0 : e.target.checked);
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Newmodules.spanText,
|
|
|
children: ["\u5C55\u793A\u9ED8\u8BA4\u7AE0\u8282\u5E8F\u53F7", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\uFF08\u9009\u4E2D\uFF0C\u5219\u4E3A\u7AE0\u8282\u4E0B\u6240\u6709\u9879\u76EE\u6DFB\u52A0\u6392\u5E8F\u7F16\u53F7\uFF09"
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
style: {
|
|
|
marginTop: '10px'
|
|
|
},
|
|
|
checked: showspoc,
|
|
|
onChange: function onChange(e) {
|
|
|
return setShowSpoc(e === null || e === void 0 ? void 0 : e.target.checked);
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Newmodules.spanText,
|
|
|
children: ["\u81EA\u9009\u5E76\u5C55\u793ASPOC\u8BFE\u5802", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u6559\u5B66\u56E2\u961F\u4E0B\u65B9\u6DFB\u52A0SPOC\u8BFE\u5802\u6A21\u5757\uFF0C\u56E2\u961F\u6210\u5458\u53EF\u7BA1\u7406\u6A21\u5757\u4E2D\u8BFE\u5802\u7684\u5C55\u793A\uFF09"
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
style: {
|
|
|
marginTop: '10px'
|
|
|
},
|
|
|
checked: show_tag,
|
|
|
onChange: function onChange(e) {
|
|
|
return setshow_tag(e === null || e === void 0 ? void 0 : e.target.checked);
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Newmodules.spanText,
|
|
|
children: ["\u5C55\u793A\u6280\u672F\u6807\u7B7E\u6A21\u5757", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u6559\u5B66\u56E2\u961F\u4E0B\u65B9\u6DFB\u52A0\u6280\u672F\u6807\u7B7E\u6A21\u5757\uFF09"
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
style: {
|
|
|
marginTop: '10px'
|
|
|
},
|
|
|
checked: show_history,
|
|
|
onChange: function onChange(e) {
|
|
|
return setshow_history(e === null || e === void 0 ? void 0 : e.target.checked);
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Newmodules.spanText,
|
|
|
children: ["\u5C55\u793A\u5386\u53F2\u8BFE\u5802\u6A21\u5757", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u6559\u5B66\u56E2\u961F\u4E0B\u65B9\u6DFB\u52A0\u5386\u53F2\u8BFE\u5802\u6A21\u5757\uFF0C\u56E2\u961F\u6210\u5458\u53EF\u7BA1\u7406\u6A21\u5757\u4E2D\u8BFE\u5802\u7684\u5C55\u793A\uFF09"
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
style: {
|
|
|
marginTop: '10px'
|
|
|
},
|
|
|
checked: allow_download,
|
|
|
onChange: function onChange(e) {
|
|
|
return setallow_download(e === null || e === void 0 ? void 0 : e.target.checked);
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Newmodules.spanText,
|
|
|
children: ["\u5141\u8BB8\u4E0B\u8F7D\u6559\u5B66\u8BFE\u4EF6", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\uFF08\u9009\u4E2D\uFF0C\u5219\u5141\u8BB8\u5B66\u4E60\u7528\u6237\u4E0B\u8F7D\u8BFE\u7A0B\u7AE0\u8282\u4E2D\u4E0A\u4F20\u7684\u6559\u5B66\u8BFE\u4EF6\uFF09"
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
style: {
|
|
|
marginTop: '10px'
|
|
|
},
|
|
|
checked: show_course_section,
|
|
|
onChange: function onChange(e) {
|
|
|
return setShowCourseSection(e === null || e === void 0 ? void 0 : e.target.checked);
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Newmodules.spanText,
|
|
|
children: ["\u9ED8\u8BA4\u5C55\u5F00\u8BFE\u7A0B\u5C0F\u8282\u5185\u5BB9", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\uFF08\u9009\u4E2D\uFF0C\u5219\u7528\u6237\u5728\u8FDB\u5165\u662F\u5C06\u8BFE\u7A0B\u8BE6\u60C5\u9875\u9762\u65F6\uFF0C\u9ED8\u8BA4\u5C55\u5F00\u6240\u6709\u5C0F\u8282\u5185\u5BB9\uFF09"
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt10",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "c-black mb10",
|
|
|
children: "\u81EA\u5B9A\u4E49\u9876\u90E8\u80CC\u666F\u56FE"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(upload/* default */.Z, {
|
|
|
action: env/* default */.Z.API_SERVER + '/api/attachments.json',
|
|
|
withCredentials: true,
|
|
|
fileList: Filelists,
|
|
|
onChange: function onChange(e) {
|
|
|
var _e$fileList;
|
|
|
var isLt2M = (e === null || e === void 0 ? void 0 : e.file.size) / 1024 / 1024 < 2;
|
|
|
if (!((_e$fileList = e.fileList) !== null && _e$fileList !== void 0 && _e$fileList.length)) return false;
|
|
|
if (!isLt2M) {
|
|
|
setFileLists(toConsumableArray_default()(Filelists));
|
|
|
} else {
|
|
|
var _e$fileList2;
|
|
|
setFileLists(e === null || e === void 0 || (_e$fileList2 = e.fileList) === null || _e$fileList2 === void 0 ? void 0 : _e$fileList2.slice(-1));
|
|
|
}
|
|
|
},
|
|
|
beforeUpload: function beforeUpload(file) {
|
|
|
var isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
|
|
if (!isJpgOrPng) {
|
|
|
message/* default */.ZP.error('只能上传jpg 或者png图片');
|
|
|
return false;
|
|
|
}
|
|
|
var isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
if (!isLt2M) {
|
|
|
message/* default */.ZP.error('文件大小不能大于2m');
|
|
|
return false;
|
|
|
}
|
|
|
return isJpgOrPng && isLt2M;
|
|
|
},
|
|
|
onRemove: function onRemove(file) {
|
|
|
setFileLists([]);
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Newmodules.aBtn,
|
|
|
children: "\u4E0A\u4F20\u56FE\u7247"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: '#5F6367',
|
|
|
pointerEvents: 'none'
|
|
|
},
|
|
|
children: "\uFF08\u672C\u9879\u975E\u5FC5\u9700\u3002\u5982\u4E0D\u4E0A\u4F20\uFF0C\u5219\u4F7F\u7528\u7CFB\u7EDF\u9ED8\u8BA4\u56FE\u7247\uFF1B\u5982\u4E0A\u4F20\uFF0C\u8BF7\u9009\u62E9jpg\u3001png\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC72M\uFF0C\u5EFA\u8BAE\u5C3A\u5BF81920*240\u50CF\u7D20\uFF09"
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt10",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "c-black mb10",
|
|
|
children: "\u81EA\u5B9A\u4E49\u9876\u90E8\u5185\u5BB9\u56FE"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(upload/* default */.Z, {
|
|
|
action: env/* default */.Z.API_SERVER + '/api/attachments.json',
|
|
|
withCredentials: true,
|
|
|
fileList: Filelists1,
|
|
|
onChange: function onChange(e) {
|
|
|
var _e$fileList3;
|
|
|
var isLt2M = (e === null || e === void 0 ? void 0 : e.file.size) / 1024 / 1024 < 2;
|
|
|
if (!((_e$fileList3 = e.fileList) !== null && _e$fileList3 !== void 0 && _e$fileList3.length)) return false;
|
|
|
if (!isLt2M) {
|
|
|
setFileLists1(toConsumableArray_default()(Filelists1));
|
|
|
} else {
|
|
|
var _e$fileList4;
|
|
|
setFileLists1(e === null || e === void 0 || (_e$fileList4 = e.fileList) === null || _e$fileList4 === void 0 ? void 0 : _e$fileList4.slice(-1));
|
|
|
}
|
|
|
},
|
|
|
beforeUpload: function beforeUpload(file) {
|
|
|
var isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
|
|
if (!isJpgOrPng) {
|
|
|
message/* default */.ZP.error('只能上传jpg 或者png图片');
|
|
|
return false;
|
|
|
}
|
|
|
var isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
if (!isLt2M) {
|
|
|
message/* default */.ZP.error('文件大小不能大于2m');
|
|
|
return false;
|
|
|
}
|
|
|
return isJpgOrPng && isLt2M;
|
|
|
},
|
|
|
onRemove: function onRemove(file) {
|
|
|
setFileLists1([]);
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Newmodules.aBtn,
|
|
|
children: "\u4E0A\u4F20\u56FE\u7247"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: '#5F6367',
|
|
|
pointerEvents: 'none'
|
|
|
},
|
|
|
children: "\uFF08\u672C\u9879\u975E\u5FC5\u9700\u3002\u5982\u4E0D\u4E0A\u4F20\uFF0C\u5219\u4F7F\u7528\u7CFB\u7EDF\u9ED8\u8BA4\u56FE\u7247\uFF1B\u5982\u4E0A\u4F20\uFF0C\u8BF7\u9009\u62E9jpg\u3001png\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC72M\uFF0C\u5EFA\u8BAE\u5C3A\u5BF81200*240\u50CF\u7D20\uFF09"
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Newmodules.backgroundFa,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Newmodules.bBtn,
|
|
|
onClick: goBack,
|
|
|
children: "\u53D6\u6D88"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
className: Newmodules.cBtn,
|
|
|
onClick: function onClick() {
|
|
|
return form.submit();
|
|
|
},
|
|
|
loading: loading['newCourse/editCourse'] || loading['newCourse/submitCourse'],
|
|
|
children: "\u63D0\u4EA4 "
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_AppplySchoolModal, {
|
|
|
schoolName: formValue.school_id,
|
|
|
onSuccess: onSuccess
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var New = ((0,_umi_production_exports.connect)(function (_ref7) {
|
|
|
var user = _ref7.user,
|
|
|
newCourse = _ref7.newCourse,
|
|
|
loading = _ref7.loading,
|
|
|
globalSetting = _ref7.globalSetting;
|
|
|
return {
|
|
|
user: user,
|
|
|
newCourse: newCourse,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects
|
|
|
};
|
|
|
})(NewCoursePage));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 22941:
|
|
|
/*!*******************************!*\
|
|
|
!*** ./src/utils/cityData.ts ***!
|
|
|
\*******************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ P: function() { return /* binding */ CityData; }
|
|
|
/* harmony export */ });
|
|
|
var CityData = [{
|
|
|
value: '北京',
|
|
|
label: '北京',
|
|
|
children: [{
|
|
|
value: "东城",
|
|
|
label: '东城'
|
|
|
}, {
|
|
|
value: "西城",
|
|
|
label: "西城"
|
|
|
}, {
|
|
|
value: "朝阳",
|
|
|
label: "朝阳"
|
|
|
}, {
|
|
|
value: "丰台",
|
|
|
label: "丰台"
|
|
|
}, {
|
|
|
value: "石景山",
|
|
|
label: "石景山"
|
|
|
}, {
|
|
|
value: "海淀",
|
|
|
label: "海淀"
|
|
|
}, {
|
|
|
value: "门头沟",
|
|
|
label: "门头沟"
|
|
|
}, {
|
|
|
value: "房山",
|
|
|
label: "房山"
|
|
|
}, {
|
|
|
value: "通州",
|
|
|
label: "通州"
|
|
|
}, {
|
|
|
value: "顺义",
|
|
|
label: "顺义"
|
|
|
}, {
|
|
|
value: "昌平",
|
|
|
label: "昌平"
|
|
|
}, {
|
|
|
value: "大兴",
|
|
|
label: "大兴"
|
|
|
}, {
|
|
|
value: "平谷",
|
|
|
label: "平谷"
|
|
|
}, {
|
|
|
value: "怀柔",
|
|
|
label: "怀柔"
|
|
|
}, {
|
|
|
value: "密云",
|
|
|
label: "密云"
|
|
|
}, {
|
|
|
value: "延庆",
|
|
|
label: "延庆"
|
|
|
}]
|
|
|
}, {
|
|
|
value: '上海',
|
|
|
label: '上海',
|
|
|
children: [{
|
|
|
value: "崇明",
|
|
|
label: '崇明'
|
|
|
}, {
|
|
|
value: '黄浦',
|
|
|
label: '黄浦'
|
|
|
}, {
|
|
|
value: '卢湾',
|
|
|
label: '卢湾'
|
|
|
}, {
|
|
|
value: '徐汇',
|
|
|
label: '徐汇'
|
|
|
}, {
|
|
|
value: '长宁',
|
|
|
label: '长宁'
|
|
|
}, {
|
|
|
value: '静安',
|
|
|
label: '静安'
|
|
|
}, {
|
|
|
value: '普陀',
|
|
|
label: '普陀'
|
|
|
}, {
|
|
|
value: '闸北',
|
|
|
label: '闸北'
|
|
|
}, {
|
|
|
value: '虹口',
|
|
|
label: '虹口'
|
|
|
}, {
|
|
|
value: '杨浦',
|
|
|
label: '杨浦'
|
|
|
}, {
|
|
|
value: '闵行',
|
|
|
label: '闵行'
|
|
|
}, {
|
|
|
value: '宝山',
|
|
|
label: '宝山'
|
|
|
}, {
|
|
|
value: '嘉定',
|
|
|
label: '嘉定'
|
|
|
}, {
|
|
|
value: '浦东',
|
|
|
label: '浦东'
|
|
|
}, {
|
|
|
value: '金山',
|
|
|
label: '金山'
|
|
|
}, {
|
|
|
value: '松江',
|
|
|
label: '松江'
|
|
|
}, {
|
|
|
value: '青浦',
|
|
|
label: '青浦'
|
|
|
}, {
|
|
|
value: '南汇',
|
|
|
label: '南汇'
|
|
|
}, {
|
|
|
value: '奉贤',
|
|
|
label: '奉贤'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '广东',
|
|
|
label: '广东',
|
|
|
children: [{
|
|
|
value: "广州",
|
|
|
label: '广州'
|
|
|
}, {
|
|
|
value: '深圳',
|
|
|
label: '深圳'
|
|
|
}, {
|
|
|
value: '珠海',
|
|
|
label: '珠海'
|
|
|
}, {
|
|
|
value: '东莞',
|
|
|
label: '东莞'
|
|
|
}, {
|
|
|
value: '中山',
|
|
|
label: '中山'
|
|
|
}, {
|
|
|
value: '佛山',
|
|
|
label: '佛山'
|
|
|
}, {
|
|
|
value: '惠州',
|
|
|
label: '惠州'
|
|
|
}, {
|
|
|
value: '河源',
|
|
|
label: '河源'
|
|
|
}, {
|
|
|
value: '潮州',
|
|
|
label: '潮州'
|
|
|
}, {
|
|
|
value: '江门',
|
|
|
label: '江门'
|
|
|
}, {
|
|
|
value: '揭阳',
|
|
|
label: '揭阳'
|
|
|
}, {
|
|
|
value: '茂名',
|
|
|
label: '茂名'
|
|
|
}, {
|
|
|
value: '梅州',
|
|
|
label: '梅州'
|
|
|
}, {
|
|
|
value: '清远',
|
|
|
label: '清远'
|
|
|
}, {
|
|
|
value: '汕头',
|
|
|
label: '汕头'
|
|
|
}, {
|
|
|
value: '汕尾',
|
|
|
label: '汕尾'
|
|
|
}, {
|
|
|
value: '韶关',
|
|
|
label: '韶关'
|
|
|
}, {
|
|
|
value: '顺德',
|
|
|
label: '顺德'
|
|
|
}, {
|
|
|
value: '阳江',
|
|
|
label: '阳江'
|
|
|
}, {
|
|
|
value: '云浮',
|
|
|
label: '云浮'
|
|
|
}, {
|
|
|
value: '湛江',
|
|
|
label: '湛江'
|
|
|
}, {
|
|
|
value: '肇庆',
|
|
|
label: '肇庆'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '江苏',
|
|
|
label: '江苏',
|
|
|
children: [{
|
|
|
value: "南京",
|
|
|
label: '南京'
|
|
|
}, {
|
|
|
value: '常熟',
|
|
|
label: '常熟'
|
|
|
}, {
|
|
|
value: '常州',
|
|
|
label: '常州'
|
|
|
}, {
|
|
|
value: '海门',
|
|
|
label: '海门'
|
|
|
}, {
|
|
|
value: '淮安',
|
|
|
label: '淮安'
|
|
|
}, {
|
|
|
value: '江都',
|
|
|
label: '江都'
|
|
|
}, {
|
|
|
value: '江阴',
|
|
|
label: '江阴'
|
|
|
}, {
|
|
|
value: '昆山',
|
|
|
label: '昆山'
|
|
|
}, {
|
|
|
value: '连云港',
|
|
|
label: '连云港'
|
|
|
}, {
|
|
|
value: '南通',
|
|
|
label: '南通'
|
|
|
}, {
|
|
|
value: '启东',
|
|
|
label: '启东'
|
|
|
}, {
|
|
|
value: '沭阳',
|
|
|
label: '沭阳'
|
|
|
}, {
|
|
|
value: '宿迁',
|
|
|
label: '宿迁'
|
|
|
}, {
|
|
|
value: '苏州',
|
|
|
label: '苏州'
|
|
|
}, {
|
|
|
value: '太仓',
|
|
|
label: '太仓'
|
|
|
}, {
|
|
|
value: '泰州',
|
|
|
label: '泰州'
|
|
|
}, {
|
|
|
value: '同里',
|
|
|
label: '同里'
|
|
|
}, {
|
|
|
value: '无锡',
|
|
|
label: '无锡'
|
|
|
}, {
|
|
|
value: '徐州',
|
|
|
label: '徐州'
|
|
|
}, {
|
|
|
value: '盐城',
|
|
|
label: '盐城'
|
|
|
}, {
|
|
|
value: '扬州',
|
|
|
label: '扬州'
|
|
|
}, {
|
|
|
value: '宜兴',
|
|
|
label: '宜兴'
|
|
|
}, {
|
|
|
value: '仪征',
|
|
|
label: '仪征'
|
|
|
}, {
|
|
|
value: '张家港',
|
|
|
label: '张家港'
|
|
|
}, {
|
|
|
value: '镇江',
|
|
|
label: '镇江'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '重庆',
|
|
|
label: '重庆',
|
|
|
children: [{
|
|
|
value: "万州",
|
|
|
label: '万州'
|
|
|
}, {
|
|
|
value: '涪陵',
|
|
|
label: '涪陵'
|
|
|
}, {
|
|
|
value: '渝中',
|
|
|
label: '渝中'
|
|
|
}, {
|
|
|
value: '大渡口',
|
|
|
label: '大渡口'
|
|
|
}, {
|
|
|
value: '江北',
|
|
|
label: '江北'
|
|
|
}, {
|
|
|
value: '沙坪坝',
|
|
|
label: '沙坪坝'
|
|
|
}, {
|
|
|
value: '九龙坡',
|
|
|
label: '九龙坡'
|
|
|
}, {
|
|
|
value: '南岸',
|
|
|
label: '南岸'
|
|
|
}, {
|
|
|
value: '北碚',
|
|
|
label: '北碚'
|
|
|
}, {
|
|
|
value: '万盛',
|
|
|
label: '万盛'
|
|
|
}, {
|
|
|
value: '双挢',
|
|
|
label: '双挢'
|
|
|
}, {
|
|
|
value: '渝北',
|
|
|
label: '渝北'
|
|
|
}, {
|
|
|
value: '巴南',
|
|
|
label: '巴南'
|
|
|
}, {
|
|
|
value: '黔江',
|
|
|
label: '黔江'
|
|
|
}, {
|
|
|
value: '长寿',
|
|
|
label: '长寿'
|
|
|
}, {
|
|
|
value: '綦江',
|
|
|
label: '綦江'
|
|
|
}, {
|
|
|
value: '潼南',
|
|
|
label: '潼南'
|
|
|
}, {
|
|
|
value: '铜梁',
|
|
|
label: '铜梁'
|
|
|
}, {
|
|
|
value: '大足',
|
|
|
label: '大足'
|
|
|
}, {
|
|
|
value: '荣昌',
|
|
|
label: '荣昌'
|
|
|
}, {
|
|
|
value: '壁山',
|
|
|
label: '壁山'
|
|
|
}, {
|
|
|
value: '梁平',
|
|
|
label: '梁平'
|
|
|
}, {
|
|
|
value: '城口',
|
|
|
label: '城口'
|
|
|
}, {
|
|
|
value: '丰都',
|
|
|
label: '丰都'
|
|
|
}, {
|
|
|
value: '垫江',
|
|
|
label: '垫江'
|
|
|
}, {
|
|
|
value: '武隆',
|
|
|
label: '武隆'
|
|
|
}, {
|
|
|
value: '忠县',
|
|
|
label: '忠县'
|
|
|
}, {
|
|
|
value: '开县',
|
|
|
label: '开县'
|
|
|
}, {
|
|
|
value: '云阳',
|
|
|
label: '云阳'
|
|
|
}, {
|
|
|
value: '奉节',
|
|
|
label: '奉节'
|
|
|
}, {
|
|
|
value: '巫山',
|
|
|
label: '巫山'
|
|
|
}, {
|
|
|
value: '巫溪',
|
|
|
label: '巫溪'
|
|
|
}, {
|
|
|
value: '石柱',
|
|
|
label: '石柱'
|
|
|
}, {
|
|
|
value: '秀山',
|
|
|
label: '秀山'
|
|
|
}, {
|
|
|
value: '酉阳',
|
|
|
label: '酉阳'
|
|
|
}, {
|
|
|
value: '彭水',
|
|
|
label: '彭水'
|
|
|
}, {
|
|
|
value: '江津',
|
|
|
label: '江津'
|
|
|
}, {
|
|
|
value: '合川',
|
|
|
label: '合川'
|
|
|
}, {
|
|
|
value: '永川',
|
|
|
label: '永川'
|
|
|
}, {
|
|
|
value: '南川',
|
|
|
label: '南川'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '安徽',
|
|
|
label: '安徽',
|
|
|
children: [{
|
|
|
value: "合肥",
|
|
|
label: '合肥'
|
|
|
}, {
|
|
|
value: '安庆',
|
|
|
label: '安庆'
|
|
|
}, {
|
|
|
value: '蚌埠',
|
|
|
label: '蚌埠'
|
|
|
}, {
|
|
|
value: '亳州',
|
|
|
label: '亳州'
|
|
|
}, {
|
|
|
value: '巢湖',
|
|
|
label: '巢湖'
|
|
|
}, {
|
|
|
value: '滁州',
|
|
|
label: '滁州'
|
|
|
}, {
|
|
|
value: '阜阳',
|
|
|
label: '阜阳'
|
|
|
}, {
|
|
|
value: '贵池',
|
|
|
label: '贵池'
|
|
|
}, {
|
|
|
value: '淮北',
|
|
|
label: '淮北'
|
|
|
}, {
|
|
|
value: '淮化',
|
|
|
label: '淮化'
|
|
|
}, {
|
|
|
value: '淮南',
|
|
|
label: '淮南'
|
|
|
}, {
|
|
|
value: '黄山',
|
|
|
label: '黄山'
|
|
|
}, {
|
|
|
value: '九华山',
|
|
|
label: '九华山'
|
|
|
}, {
|
|
|
value: '六安',
|
|
|
label: '六安'
|
|
|
}, {
|
|
|
value: '马鞍山',
|
|
|
label: '马鞍山'
|
|
|
}, {
|
|
|
value: '宿州',
|
|
|
label: '宿州'
|
|
|
}, {
|
|
|
value: '铜陵',
|
|
|
label: '铜陵'
|
|
|
}, {
|
|
|
value: '屯溪',
|
|
|
label: '屯溪'
|
|
|
}, {
|
|
|
value: '芜湖',
|
|
|
label: '芜湖'
|
|
|
}, {
|
|
|
value: '宣城',
|
|
|
label: '宣城'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '福建',
|
|
|
label: '福建',
|
|
|
children: [{
|
|
|
value: "福州",
|
|
|
label: '福州'
|
|
|
}, {
|
|
|
value: '厦门',
|
|
|
label: '厦门'
|
|
|
}, {
|
|
|
value: '泉州',
|
|
|
label: '泉州'
|
|
|
}, {
|
|
|
value: '漳州',
|
|
|
label: '漳州'
|
|
|
}, {
|
|
|
value: '龙岩',
|
|
|
label: '龙岩'
|
|
|
}, {
|
|
|
value: '南平',
|
|
|
label: '南平'
|
|
|
}, {
|
|
|
value: '宁德',
|
|
|
label: '宁德'
|
|
|
}, {
|
|
|
value: '莆田',
|
|
|
label: '莆田'
|
|
|
}, {
|
|
|
value: '三明',
|
|
|
label: '三明'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '甘肃',
|
|
|
label: '甘肃',
|
|
|
children: [{
|
|
|
value: "兰州",
|
|
|
label: '兰州'
|
|
|
}, {
|
|
|
value: "嘉峪关",
|
|
|
label: '嘉峪关'
|
|
|
}, {
|
|
|
value: '白银',
|
|
|
label: '白银'
|
|
|
}, {
|
|
|
value: '定西',
|
|
|
label: '定西'
|
|
|
}, {
|
|
|
value: '敦煌',
|
|
|
label: '敦煌'
|
|
|
}, {
|
|
|
value: '甘南',
|
|
|
label: '甘南'
|
|
|
}, {
|
|
|
value: '金昌',
|
|
|
label: '金昌'
|
|
|
}, {
|
|
|
value: '酒泉',
|
|
|
label: '酒泉'
|
|
|
}, {
|
|
|
value: '临夏',
|
|
|
label: '临夏'
|
|
|
}, {
|
|
|
value: '平凉',
|
|
|
label: '平凉'
|
|
|
}, {
|
|
|
value: '天水',
|
|
|
label: '天水'
|
|
|
}, {
|
|
|
value: '陇南',
|
|
|
label: '陇南'
|
|
|
}, {
|
|
|
value: '武威',
|
|
|
label: '武威'
|
|
|
}, {
|
|
|
value: '西峰',
|
|
|
label: '西峰'
|
|
|
}, {
|
|
|
value: '张掖',
|
|
|
label: '张掖'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '广西',
|
|
|
label: '广西',
|
|
|
children: [{
|
|
|
value: "南宁",
|
|
|
label: '南宁'
|
|
|
}, {
|
|
|
value: "来宾",
|
|
|
label: '来宾'
|
|
|
}, {
|
|
|
value: '百色',
|
|
|
label: '百色'
|
|
|
}, {
|
|
|
value: '北海',
|
|
|
label: '北海'
|
|
|
}, {
|
|
|
value: '桂林',
|
|
|
label: '桂林'
|
|
|
}, {
|
|
|
value: '防城港',
|
|
|
label: '防城港'
|
|
|
}, {
|
|
|
value: '贵港',
|
|
|
label: '贵港'
|
|
|
}, {
|
|
|
value: '河池',
|
|
|
label: '河池'
|
|
|
}, {
|
|
|
value: '贺州',
|
|
|
label: '贺州'
|
|
|
}, {
|
|
|
value: '柳州',
|
|
|
label: '柳州'
|
|
|
}, {
|
|
|
value: '钦州',
|
|
|
label: '钦州'
|
|
|
}, {
|
|
|
value: '梧州',
|
|
|
label: '梧州'
|
|
|
}, {
|
|
|
value: '玉林',
|
|
|
label: '玉林'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '贵州',
|
|
|
label: '贵州',
|
|
|
children: [{
|
|
|
value: "贵阳",
|
|
|
label: '贵阳'
|
|
|
}, {
|
|
|
value: '安顺',
|
|
|
label: '安顺'
|
|
|
}, {
|
|
|
value: '毕节',
|
|
|
label: '毕节'
|
|
|
}, {
|
|
|
value: '都匀',
|
|
|
label: '都匀'
|
|
|
}, {
|
|
|
value: '凯里',
|
|
|
label: '凯里'
|
|
|
}, {
|
|
|
value: '六盘水',
|
|
|
label: '六盘水'
|
|
|
}, {
|
|
|
value: '铜仁',
|
|
|
label: '铜仁'
|
|
|
}, {
|
|
|
value: '兴义',
|
|
|
label: '兴义'
|
|
|
}, {
|
|
|
value: '玉屏',
|
|
|
label: '玉屏'
|
|
|
}, {
|
|
|
value: '遵义',
|
|
|
label: '遵义'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '海南',
|
|
|
label: '海南',
|
|
|
children: [{
|
|
|
value: "海口",
|
|
|
label: '海口'
|
|
|
}, {
|
|
|
value: '儋县',
|
|
|
label: '儋县'
|
|
|
}, {
|
|
|
value: '陵水',
|
|
|
label: '陵水'
|
|
|
}, {
|
|
|
value: '琼海',
|
|
|
label: '琼海'
|
|
|
}, {
|
|
|
value: '三亚',
|
|
|
label: '三亚'
|
|
|
}, {
|
|
|
value: '通什',
|
|
|
label: '通什'
|
|
|
}, {
|
|
|
value: '万宁',
|
|
|
label: '万宁'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '河北',
|
|
|
label: '河北',
|
|
|
children: [{
|
|
|
value: "石家庄",
|
|
|
label: '石家庄'
|
|
|
}, {
|
|
|
value: '保定',
|
|
|
label: '保定'
|
|
|
}, {
|
|
|
value: '北戴河',
|
|
|
label: '北戴河'
|
|
|
}, {
|
|
|
value: '沧州',
|
|
|
label: '沧州'
|
|
|
}, {
|
|
|
value: '承德',
|
|
|
label: '承德'
|
|
|
}, {
|
|
|
value: '丰润',
|
|
|
label: '丰润'
|
|
|
}, {
|
|
|
value: '邯郸',
|
|
|
label: '邯郸'
|
|
|
}, {
|
|
|
value: '衡水',
|
|
|
label: '衡水'
|
|
|
}, {
|
|
|
value: '廊坊',
|
|
|
label: '廊坊'
|
|
|
}, {
|
|
|
value: '南戴河',
|
|
|
label: '南戴河'
|
|
|
}, {
|
|
|
value: '秦皇岛',
|
|
|
label: '秦皇岛'
|
|
|
}, {
|
|
|
value: '唐山',
|
|
|
label: '唐山'
|
|
|
}, {
|
|
|
value: '新城',
|
|
|
label: '新城'
|
|
|
}, {
|
|
|
value: '邢台',
|
|
|
label: '邢台'
|
|
|
}, {
|
|
|
value: '张家口',
|
|
|
label: '张家口'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '黑龙江',
|
|
|
label: '黑龙江',
|
|
|
children: [{
|
|
|
value: "哈尔滨",
|
|
|
label: '哈尔滨'
|
|
|
}, {
|
|
|
value: '北安',
|
|
|
label: '北安'
|
|
|
}, {
|
|
|
value: '大庆',
|
|
|
label: '大庆'
|
|
|
}, {
|
|
|
value: '大兴安岭',
|
|
|
label: '大兴安岭'
|
|
|
}, {
|
|
|
value: '鹤岗',
|
|
|
label: '鹤岗'
|
|
|
}, {
|
|
|
value: '黑河',
|
|
|
label: '黑河'
|
|
|
}, {
|
|
|
value: '佳木斯',
|
|
|
label: '佳木斯'
|
|
|
}, {
|
|
|
value: '鸡西',
|
|
|
label: '鸡西'
|
|
|
}, {
|
|
|
value: '牡丹江',
|
|
|
label: '牡丹江'
|
|
|
}, {
|
|
|
value: '齐齐哈尔',
|
|
|
label: '齐齐哈尔'
|
|
|
}, {
|
|
|
value: '七台河',
|
|
|
label: '七台河'
|
|
|
}, {
|
|
|
value: '双鸭山',
|
|
|
label: '双鸭山'
|
|
|
}, {
|
|
|
value: '绥化',
|
|
|
label: '绥化'
|
|
|
}, {
|
|
|
value: '伊春',
|
|
|
label: '伊春'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '河南',
|
|
|
label: '河南',
|
|
|
children: [{
|
|
|
value: "郑州",
|
|
|
label: '郑州'
|
|
|
}, {
|
|
|
value: '安阳',
|
|
|
label: '安阳'
|
|
|
}, {
|
|
|
value: '鹤壁',
|
|
|
label: '鹤壁'
|
|
|
}, {
|
|
|
value: '潢川',
|
|
|
label: '潢川'
|
|
|
}, {
|
|
|
value: '焦作',
|
|
|
label: '焦作'
|
|
|
}, {
|
|
|
value: '济源',
|
|
|
label: '济源'
|
|
|
}, {
|
|
|
value: '开封',
|
|
|
label: '开封'
|
|
|
}, {
|
|
|
value: '漯河',
|
|
|
label: '漯河'
|
|
|
}, {
|
|
|
value: '洛阳',
|
|
|
label: '洛阳'
|
|
|
}, {
|
|
|
value: '南阳',
|
|
|
label: '南阳'
|
|
|
}, {
|
|
|
value: '平顶山',
|
|
|
label: '平顶山'
|
|
|
}, {
|
|
|
value: '濮阳',
|
|
|
label: '濮阳'
|
|
|
}, {
|
|
|
value: '三门峡',
|
|
|
label: '三门峡'
|
|
|
}, {
|
|
|
value: '商丘',
|
|
|
label: '商丘'
|
|
|
}, {
|
|
|
value: '新乡',
|
|
|
label: '新乡'
|
|
|
}, {
|
|
|
value: '信阳',
|
|
|
label: '信阳'
|
|
|
}, {
|
|
|
value: '许昌',
|
|
|
label: '许昌'
|
|
|
}, {
|
|
|
value: '周口',
|
|
|
label: '周口'
|
|
|
}, {
|
|
|
value: '驻马店',
|
|
|
label: '驻马店'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '香港',
|
|
|
label: '香港',
|
|
|
children: [{
|
|
|
value: "香港",
|
|
|
label: '香港'
|
|
|
}, {
|
|
|
value: '九龙',
|
|
|
label: '九龙'
|
|
|
}, {
|
|
|
value: '新界',
|
|
|
label: '新界'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '湖北',
|
|
|
label: '湖北',
|
|
|
children: [{
|
|
|
value: "武汉",
|
|
|
label: '武汉'
|
|
|
}, {
|
|
|
value: "天门",
|
|
|
label: '天门'
|
|
|
}, {
|
|
|
value: '恩施',
|
|
|
label: '恩施'
|
|
|
}, {
|
|
|
value: '鄂州',
|
|
|
label: '鄂州'
|
|
|
}, {
|
|
|
value: '黄冈',
|
|
|
label: '黄冈'
|
|
|
}, {
|
|
|
value: '黄石',
|
|
|
label: '黄石'
|
|
|
}, {
|
|
|
value: '荆门',
|
|
|
label: '荆门'
|
|
|
}, {
|
|
|
value: '荆州',
|
|
|
label: '荆州'
|
|
|
}, {
|
|
|
value: '潜江',
|
|
|
label: '潜江'
|
|
|
}, {
|
|
|
value: '十堰',
|
|
|
label: '十堰'
|
|
|
}, {
|
|
|
value: '随州',
|
|
|
label: '随州'
|
|
|
}, {
|
|
|
value: '武穴',
|
|
|
label: '武穴'
|
|
|
}, {
|
|
|
value: '仙桃',
|
|
|
label: '仙桃'
|
|
|
}, {
|
|
|
value: '咸宁',
|
|
|
label: '咸宁'
|
|
|
}, {
|
|
|
value: '襄阳',
|
|
|
label: '襄阳'
|
|
|
}, {
|
|
|
value: '襄樊',
|
|
|
label: '襄樊'
|
|
|
}, {
|
|
|
value: '孝感',
|
|
|
label: '孝感'
|
|
|
}, {
|
|
|
value: '宜昌',
|
|
|
label: '宜昌'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '湖南',
|
|
|
label: '湖南',
|
|
|
children: [{
|
|
|
value: "长沙",
|
|
|
label: '长沙'
|
|
|
}, {
|
|
|
value: '常德',
|
|
|
label: '常德'
|
|
|
}, {
|
|
|
value: '郴州',
|
|
|
label: '郴州'
|
|
|
}, {
|
|
|
value: '衡阳',
|
|
|
label: '衡阳'
|
|
|
}, {
|
|
|
value: '怀化',
|
|
|
label: '怀化'
|
|
|
}, {
|
|
|
value: '吉首',
|
|
|
label: '吉首'
|
|
|
}, {
|
|
|
value: '娄底',
|
|
|
label: '娄底'
|
|
|
}, {
|
|
|
value: '邵阳',
|
|
|
label: '邵阳'
|
|
|
}, {
|
|
|
value: '湘潭',
|
|
|
label: '湘潭'
|
|
|
}, {
|
|
|
value: '益阳',
|
|
|
label: '益阳'
|
|
|
}, {
|
|
|
value: '岳阳',
|
|
|
label: '岳阳'
|
|
|
}, {
|
|
|
value: '永州',
|
|
|
label: '永州'
|
|
|
}, {
|
|
|
value: '张家界',
|
|
|
label: '张家界'
|
|
|
}, {
|
|
|
value: '株洲',
|
|
|
label: '株洲'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '江西',
|
|
|
label: '江西',
|
|
|
children: [{
|
|
|
value: "南昌",
|
|
|
label: '南昌'
|
|
|
}, {
|
|
|
value: '抚州',
|
|
|
label: '抚州'
|
|
|
}, {
|
|
|
value: '赣州',
|
|
|
label: '赣州'
|
|
|
}, {
|
|
|
value: '吉安',
|
|
|
label: '吉安'
|
|
|
}, {
|
|
|
value: '景德镇',
|
|
|
label: '景德镇'
|
|
|
}, {
|
|
|
value: '井冈山',
|
|
|
label: '井冈山'
|
|
|
}, {
|
|
|
value: '九江',
|
|
|
label: '九江'
|
|
|
}, {
|
|
|
value: '庐山',
|
|
|
label: '庐山'
|
|
|
}, {
|
|
|
value: '萍乡',
|
|
|
label: '萍乡'
|
|
|
}, {
|
|
|
value: '上饶',
|
|
|
label: '上饶'
|
|
|
}, {
|
|
|
value: '新余',
|
|
|
label: '新余'
|
|
|
}, {
|
|
|
value: '宜春',
|
|
|
label: '宜春'
|
|
|
}, {
|
|
|
value: '鹰潭',
|
|
|
label: '鹰潭'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '吉林',
|
|
|
label: '吉林',
|
|
|
children: [{
|
|
|
value: "长春",
|
|
|
label: '长春'
|
|
|
}, {
|
|
|
value: '吉林',
|
|
|
label: '吉林'
|
|
|
}, {
|
|
|
value: '白城',
|
|
|
label: '白城'
|
|
|
}, {
|
|
|
value: '白山',
|
|
|
label: '白山'
|
|
|
}, {
|
|
|
value: '珲春',
|
|
|
label: '珲春'
|
|
|
}, {
|
|
|
value: '辽源',
|
|
|
label: '辽源'
|
|
|
}, {
|
|
|
value: '梅河',
|
|
|
label: '梅河'
|
|
|
}, {
|
|
|
value: '四平',
|
|
|
label: '四平'
|
|
|
}, {
|
|
|
value: '松原',
|
|
|
label: '松原'
|
|
|
}, {
|
|
|
value: '通化',
|
|
|
label: '通化'
|
|
|
}, {
|
|
|
value: '延吉',
|
|
|
label: '延吉'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '辽宁',
|
|
|
label: '辽宁',
|
|
|
children: [{
|
|
|
value: "沈阳",
|
|
|
label: '沈阳'
|
|
|
}, {
|
|
|
value: '鞍山',
|
|
|
label: '鞍山'
|
|
|
}, {
|
|
|
value: '本溪',
|
|
|
label: '本溪'
|
|
|
}, {
|
|
|
value: '朝阳',
|
|
|
label: '朝阳'
|
|
|
}, {
|
|
|
value: '大连',
|
|
|
label: '大连'
|
|
|
}, {
|
|
|
value: '丹东',
|
|
|
label: '丹东'
|
|
|
}, {
|
|
|
value: '抚顺',
|
|
|
label: '抚顺'
|
|
|
}, {
|
|
|
value: '阜新',
|
|
|
label: '阜新'
|
|
|
}, {
|
|
|
value: '葫芦岛',
|
|
|
label: '葫芦岛'
|
|
|
}, {
|
|
|
value: '锦州',
|
|
|
label: '锦州'
|
|
|
}, {
|
|
|
value: '辽阳',
|
|
|
label: '辽阳'
|
|
|
}, {
|
|
|
value: '盘锦',
|
|
|
label: '盘锦'
|
|
|
}, {
|
|
|
value: '铁岭',
|
|
|
label: '铁岭'
|
|
|
}, {
|
|
|
value: '营口',
|
|
|
label: '营口'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '澳门',
|
|
|
label: '澳门',
|
|
|
children: [{
|
|
|
value: '澳门',
|
|
|
label: '澳门'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '内蒙古',
|
|
|
label: '内蒙古',
|
|
|
children: [{
|
|
|
value: "呼和浩特",
|
|
|
label: '呼和浩特'
|
|
|
}, {
|
|
|
value: '阿拉善盟',
|
|
|
label: '阿拉善盟'
|
|
|
}, {
|
|
|
value: '包头',
|
|
|
label: '包头'
|
|
|
}, {
|
|
|
value: '赤峰',
|
|
|
label: '赤峰'
|
|
|
}, {
|
|
|
value: '东胜',
|
|
|
label: '东胜'
|
|
|
}, {
|
|
|
value: '海拉尔',
|
|
|
label: '海拉尔'
|
|
|
}, {
|
|
|
value: '集宁',
|
|
|
label: '集宁'
|
|
|
}, {
|
|
|
value: '临河',
|
|
|
label: '临河'
|
|
|
}, {
|
|
|
value: '通辽',
|
|
|
label: '通辽'
|
|
|
}, {
|
|
|
value: '乌海',
|
|
|
label: '乌海'
|
|
|
}, {
|
|
|
value: '乌兰浩特',
|
|
|
label: '乌兰浩特'
|
|
|
}, {
|
|
|
value: '锡林浩特',
|
|
|
label: '锡林浩特'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '宁夏',
|
|
|
label: '宁夏',
|
|
|
children: [{
|
|
|
value: "银川",
|
|
|
label: '银川'
|
|
|
}, {
|
|
|
value: '固源',
|
|
|
label: '固源'
|
|
|
}, {
|
|
|
value: '石嘴山',
|
|
|
label: '石嘴山'
|
|
|
}, {
|
|
|
value: '吴忠',
|
|
|
label: '吴忠'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '青海',
|
|
|
label: '青海',
|
|
|
children: [{
|
|
|
value: "西宁",
|
|
|
label: '西宁'
|
|
|
}, {
|
|
|
value: '德令哈',
|
|
|
label: '德令哈'
|
|
|
}, {
|
|
|
value: '格尔木',
|
|
|
label: '格尔木'
|
|
|
}, {
|
|
|
value: '共和',
|
|
|
label: '共和'
|
|
|
}, {
|
|
|
value: '海东',
|
|
|
label: '海东'
|
|
|
}, {
|
|
|
value: '海晏',
|
|
|
label: '海晏'
|
|
|
}, {
|
|
|
value: '玛沁',
|
|
|
label: '玛沁'
|
|
|
}, {
|
|
|
value: '同仁',
|
|
|
label: '同仁'
|
|
|
}, {
|
|
|
value: '玉树',
|
|
|
label: '玉树'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '山东',
|
|
|
label: '山东',
|
|
|
children: [{
|
|
|
value: "济南",
|
|
|
label: '济南'
|
|
|
}, {
|
|
|
value: '滨州',
|
|
|
label: '滨州'
|
|
|
}, {
|
|
|
value: '兖州',
|
|
|
label: '兖州'
|
|
|
}, {
|
|
|
value: '德州',
|
|
|
label: '德州'
|
|
|
}, {
|
|
|
value: '东营',
|
|
|
label: '东营'
|
|
|
}, {
|
|
|
value: '菏泽',
|
|
|
label: '菏泽'
|
|
|
}, {
|
|
|
value: '济宁',
|
|
|
label: '济宁'
|
|
|
}, {
|
|
|
value: '莱芜',
|
|
|
label: '莱芜'
|
|
|
}, {
|
|
|
value: '聊城',
|
|
|
label: '聊城'
|
|
|
}, {
|
|
|
value: '临沂',
|
|
|
label: '临沂'
|
|
|
}, {
|
|
|
value: '蓬莱',
|
|
|
label: '蓬莱'
|
|
|
}, {
|
|
|
value: '青岛',
|
|
|
label: '青岛'
|
|
|
}, {
|
|
|
value: '曲阜',
|
|
|
label: '曲阜'
|
|
|
}, {
|
|
|
value: '日照',
|
|
|
label: '日照'
|
|
|
}, {
|
|
|
value: '泰安',
|
|
|
label: '泰安'
|
|
|
}, {
|
|
|
value: '潍坊',
|
|
|
label: '潍坊'
|
|
|
}, {
|
|
|
value: '威海',
|
|
|
label: '威海'
|
|
|
}, {
|
|
|
value: '烟台',
|
|
|
label: '烟台'
|
|
|
}, {
|
|
|
value: '枣庄',
|
|
|
label: '枣庄'
|
|
|
}, {
|
|
|
value: '淄博',
|
|
|
label: '淄博'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '山西',
|
|
|
label: '山西',
|
|
|
children: [{
|
|
|
value: "太原",
|
|
|
label: '太原'
|
|
|
}, {
|
|
|
value: "吕梁",
|
|
|
label: '吕梁'
|
|
|
}, {
|
|
|
value: '长治',
|
|
|
label: '长治'
|
|
|
}, {
|
|
|
value: '大同',
|
|
|
label: '大同'
|
|
|
}, {
|
|
|
value: '候马',
|
|
|
label: '候马'
|
|
|
}, {
|
|
|
value: '晋城',
|
|
|
label: '晋城'
|
|
|
}, {
|
|
|
value: '离石',
|
|
|
label: '离石'
|
|
|
}, {
|
|
|
value: '临汾',
|
|
|
label: '临汾'
|
|
|
}, {
|
|
|
value: '宁武',
|
|
|
label: '宁武'
|
|
|
}, {
|
|
|
value: '朔州',
|
|
|
label: '朔州'
|
|
|
}, {
|
|
|
value: '忻州',
|
|
|
label: '忻州'
|
|
|
}, {
|
|
|
value: '阳泉',
|
|
|
label: '阳泉'
|
|
|
}, {
|
|
|
value: '榆次',
|
|
|
label: '榆次'
|
|
|
}, {
|
|
|
value: '晋中',
|
|
|
label: '晋中'
|
|
|
}, {
|
|
|
value: '运城',
|
|
|
label: '运城'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '陕西',
|
|
|
label: '陕西',
|
|
|
children: [{
|
|
|
value: "西安",
|
|
|
label: '西安'
|
|
|
}, {
|
|
|
value: '安康',
|
|
|
label: '安康'
|
|
|
}, {
|
|
|
value: '宝鸡',
|
|
|
label: '宝鸡'
|
|
|
}, {
|
|
|
value: '汉中',
|
|
|
label: '汉中'
|
|
|
}, {
|
|
|
value: '渭南',
|
|
|
label: '渭南'
|
|
|
}, {
|
|
|
value: '商州',
|
|
|
label: '商州'
|
|
|
}, {
|
|
|
value: '绥德',
|
|
|
label: '绥德'
|
|
|
}, {
|
|
|
value: '铜川',
|
|
|
label: '铜川'
|
|
|
}, {
|
|
|
value: '咸阳',
|
|
|
label: '咸阳'
|
|
|
}, {
|
|
|
value: '延安',
|
|
|
label: '延安'
|
|
|
}, {
|
|
|
value: '榆林',
|
|
|
label: '榆林'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '四川',
|
|
|
label: '四川',
|
|
|
children: [{
|
|
|
value: "成都",
|
|
|
label: '成都'
|
|
|
}, {
|
|
|
value: '巴中',
|
|
|
label: '巴中'
|
|
|
}, {
|
|
|
value: '达川',
|
|
|
label: '达川'
|
|
|
}, {
|
|
|
value: '德阳',
|
|
|
label: '德阳'
|
|
|
}, {
|
|
|
value: '都江堰',
|
|
|
label: '都江堰'
|
|
|
}, {
|
|
|
value: '峨眉山',
|
|
|
label: '峨眉山'
|
|
|
}, {
|
|
|
value: '涪陵',
|
|
|
label: '涪陵'
|
|
|
}, {
|
|
|
value: '广安',
|
|
|
label: '广安'
|
|
|
}, {
|
|
|
value: '广元',
|
|
|
label: '广元'
|
|
|
}, {
|
|
|
value: '九寨沟',
|
|
|
label: '九寨沟'
|
|
|
}, {
|
|
|
value: '康定',
|
|
|
label: '康定'
|
|
|
}, {
|
|
|
value: '乐山',
|
|
|
label: '乐山'
|
|
|
}, {
|
|
|
value: '泸州',
|
|
|
label: '泸州'
|
|
|
}, {
|
|
|
value: '马尔康',
|
|
|
label: '马尔康'
|
|
|
}, {
|
|
|
value: '绵阳',
|
|
|
label: '绵阳'
|
|
|
}, {
|
|
|
value: '眉山',
|
|
|
label: '眉山'
|
|
|
}, {
|
|
|
value: '南充',
|
|
|
label: '南充'
|
|
|
}, {
|
|
|
value: '内江',
|
|
|
label: '内江'
|
|
|
}, {
|
|
|
value: '攀枝花',
|
|
|
label: '攀枝花'
|
|
|
}, {
|
|
|
value: '遂宁',
|
|
|
label: '遂宁'
|
|
|
}, {
|
|
|
value: '汶川',
|
|
|
label: '汶川'
|
|
|
}, {
|
|
|
value: '西昌',
|
|
|
label: '西昌'
|
|
|
}, {
|
|
|
value: '雅安',
|
|
|
label: '雅安'
|
|
|
}, {
|
|
|
value: '宜宾',
|
|
|
label: '宜宾'
|
|
|
}, {
|
|
|
value: '自贡',
|
|
|
label: '自贡'
|
|
|
}, {
|
|
|
value: '资阳',
|
|
|
label: '资阳'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '台湾',
|
|
|
label: '台湾',
|
|
|
children: [{
|
|
|
value: "台北",
|
|
|
label: '台北'
|
|
|
}, {
|
|
|
value: '基隆',
|
|
|
label: '基隆'
|
|
|
}, {
|
|
|
value: '台南',
|
|
|
label: '台南'
|
|
|
}, {
|
|
|
value: '台中',
|
|
|
label: '台中'
|
|
|
}, {
|
|
|
value: '高雄',
|
|
|
label: '高雄'
|
|
|
}, {
|
|
|
value: '屏东',
|
|
|
label: '屏东'
|
|
|
}, {
|
|
|
value: '南投',
|
|
|
label: '南投'
|
|
|
}, {
|
|
|
value: '云林',
|
|
|
label: '云林'
|
|
|
}, {
|
|
|
value: '新竹',
|
|
|
label: '新竹'
|
|
|
}, {
|
|
|
value: '彰化',
|
|
|
label: '彰化'
|
|
|
}, {
|
|
|
value: '苗栗',
|
|
|
label: '苗栗'
|
|
|
}, {
|
|
|
value: '嘉义',
|
|
|
label: '嘉义'
|
|
|
}, {
|
|
|
value: '桃园',
|
|
|
label: '桃园'
|
|
|
}, {
|
|
|
value: '宜兰',
|
|
|
label: '宜兰'
|
|
|
}, {
|
|
|
value: '台东',
|
|
|
label: '台东'
|
|
|
}, {
|
|
|
value: '金门',
|
|
|
label: '金门'
|
|
|
}, {
|
|
|
value: '马祖',
|
|
|
label: '马祖'
|
|
|
}, {
|
|
|
value: '澎湖',
|
|
|
label: '澎湖'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '天津',
|
|
|
label: '天津',
|
|
|
children: [{
|
|
|
value: "天津",
|
|
|
label: '天津'
|
|
|
}, {
|
|
|
value: '和平',
|
|
|
label: '和平'
|
|
|
}, {
|
|
|
value: '东丽',
|
|
|
label: '东丽'
|
|
|
}, {
|
|
|
value: '河东',
|
|
|
label: '河东'
|
|
|
}, {
|
|
|
value: '西青',
|
|
|
label: '西青'
|
|
|
}, {
|
|
|
value: '河西',
|
|
|
label: '河西'
|
|
|
}, {
|
|
|
value: '津南',
|
|
|
label: '津南'
|
|
|
}, {
|
|
|
value: '南开',
|
|
|
label: '南开'
|
|
|
}, {
|
|
|
value: '北辰',
|
|
|
label: '北辰'
|
|
|
}, {
|
|
|
value: '河北',
|
|
|
label: '河北'
|
|
|
}, {
|
|
|
value: '武清',
|
|
|
label: '武清'
|
|
|
}, {
|
|
|
value: '红挢',
|
|
|
label: '红挢'
|
|
|
}, {
|
|
|
value: '塘沽',
|
|
|
label: '塘沽'
|
|
|
}, {
|
|
|
value: '汉沽',
|
|
|
label: '汉沽'
|
|
|
}, {
|
|
|
value: '大港',
|
|
|
label: '大港'
|
|
|
}, {
|
|
|
value: '宁河',
|
|
|
label: '宁河'
|
|
|
}, {
|
|
|
value: '静海',
|
|
|
label: '静海'
|
|
|
}, {
|
|
|
value: '宝坻',
|
|
|
label: '宝坻'
|
|
|
}, {
|
|
|
value: '蓟县',
|
|
|
label: '蓟县'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '新疆',
|
|
|
label: '新疆',
|
|
|
children: [{
|
|
|
value: "乌鲁木齐",
|
|
|
label: '乌鲁木齐'
|
|
|
}, {
|
|
|
value: '阿克苏',
|
|
|
label: '阿克苏'
|
|
|
}, {
|
|
|
value: '阿勒泰',
|
|
|
label: '阿勒泰'
|
|
|
}, {
|
|
|
value: '阿图什',
|
|
|
label: '阿图什'
|
|
|
}, {
|
|
|
value: '博乐',
|
|
|
label: '博乐'
|
|
|
}, {
|
|
|
value: '昌吉',
|
|
|
label: '昌吉'
|
|
|
}, {
|
|
|
value: '东山',
|
|
|
label: '东山'
|
|
|
}, {
|
|
|
value: '哈密',
|
|
|
label: '哈密'
|
|
|
}, {
|
|
|
value: '和田',
|
|
|
label: '和田'
|
|
|
}, {
|
|
|
value: '喀什',
|
|
|
label: '喀什'
|
|
|
}, {
|
|
|
value: '克拉玛依',
|
|
|
label: '克拉玛依'
|
|
|
}, {
|
|
|
value: '库车',
|
|
|
label: '库车'
|
|
|
}, {
|
|
|
value: '库尔勒',
|
|
|
label: '库尔勒'
|
|
|
}, {
|
|
|
value: '奎屯',
|
|
|
label: '奎屯'
|
|
|
}, {
|
|
|
value: '石河子',
|
|
|
label: '石河子'
|
|
|
}, {
|
|
|
value: '塔城',
|
|
|
label: '塔城'
|
|
|
}, {
|
|
|
value: '吐鲁番',
|
|
|
label: '吐鲁番'
|
|
|
}, {
|
|
|
value: '伊宁',
|
|
|
label: '伊宁'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '西藏',
|
|
|
label: '西藏',
|
|
|
children: [{
|
|
|
value: "拉萨",
|
|
|
label: '拉萨'
|
|
|
}, {
|
|
|
value: '阿里',
|
|
|
label: '阿里'
|
|
|
}, {
|
|
|
value: '昌都',
|
|
|
label: '昌都'
|
|
|
}, {
|
|
|
value: '林芝',
|
|
|
label: '林芝'
|
|
|
}, {
|
|
|
value: '那曲',
|
|
|
label: '那曲'
|
|
|
}, {
|
|
|
value: '日喀则',
|
|
|
label: '日喀则'
|
|
|
}, {
|
|
|
value: '山南',
|
|
|
label: '山南'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '云南',
|
|
|
label: '云南',
|
|
|
children: [{
|
|
|
value: "昆明",
|
|
|
label: '昆明'
|
|
|
}, {
|
|
|
value: '大理',
|
|
|
label: '大理'
|
|
|
}, {
|
|
|
value: '保山',
|
|
|
label: '保山'
|
|
|
}, {
|
|
|
value: '楚雄',
|
|
|
label: '楚雄'
|
|
|
}, {
|
|
|
value: '大理',
|
|
|
label: '大理'
|
|
|
}, {
|
|
|
value: '东川',
|
|
|
label: '东川'
|
|
|
}, {
|
|
|
value: '个旧',
|
|
|
label: '个旧'
|
|
|
}, {
|
|
|
value: '景洪',
|
|
|
label: '景洪'
|
|
|
}, {
|
|
|
value: '开远',
|
|
|
label: '开远'
|
|
|
}, {
|
|
|
value: '临沧',
|
|
|
label: '临沧'
|
|
|
}, {
|
|
|
value: '丽江',
|
|
|
label: '丽江'
|
|
|
}, {
|
|
|
value: '六库',
|
|
|
label: '六库'
|
|
|
}, {
|
|
|
value: '潞西',
|
|
|
label: '潞西'
|
|
|
}, {
|
|
|
value: '曲靖',
|
|
|
label: '曲靖'
|
|
|
}, {
|
|
|
value: '思茅',
|
|
|
label: '思茅'
|
|
|
}, {
|
|
|
value: '文山',
|
|
|
label: '文山'
|
|
|
}, {
|
|
|
value: '西双版纳',
|
|
|
label: '西双版纳'
|
|
|
}, {
|
|
|
value: '玉溪',
|
|
|
label: '玉溪'
|
|
|
}, {
|
|
|
value: '中甸',
|
|
|
label: '中甸'
|
|
|
}, {
|
|
|
value: '昭通',
|
|
|
label: '昭通'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '浙江',
|
|
|
label: '浙江',
|
|
|
children: [{
|
|
|
value: "杭州",
|
|
|
label: '杭州'
|
|
|
}, {
|
|
|
value: "温州",
|
|
|
label: '温州'
|
|
|
}, {
|
|
|
value: '安吉',
|
|
|
label: '安吉'
|
|
|
}, {
|
|
|
value: '慈溪',
|
|
|
label: '慈溪'
|
|
|
}, {
|
|
|
value: '定海',
|
|
|
label: '定海'
|
|
|
}, {
|
|
|
value: '奉化',
|
|
|
label: '奉化'
|
|
|
}, {
|
|
|
value: '海盐',
|
|
|
label: '海盐'
|
|
|
}, {
|
|
|
value: '黄岩',
|
|
|
label: '黄岩'
|
|
|
}, {
|
|
|
value: '湖州',
|
|
|
label: '湖州'
|
|
|
}, {
|
|
|
value: '嘉兴',
|
|
|
label: '嘉兴'
|
|
|
}, {
|
|
|
value: '金华',
|
|
|
label: '金华'
|
|
|
}, {
|
|
|
value: '临安',
|
|
|
label: '临安'
|
|
|
}, {
|
|
|
value: '临海',
|
|
|
label: '临海'
|
|
|
}, {
|
|
|
value: '丽水',
|
|
|
label: '丽水'
|
|
|
}, {
|
|
|
value: '宁波',
|
|
|
label: '宁波'
|
|
|
}, {
|
|
|
value: '瓯海',
|
|
|
label: '瓯海'
|
|
|
}, {
|
|
|
value: '平湖',
|
|
|
label: '平湖'
|
|
|
}, {
|
|
|
value: '千岛湖',
|
|
|
label: '千岛湖'
|
|
|
}, {
|
|
|
value: '衢州',
|
|
|
label: '衢州'
|
|
|
}, {
|
|
|
value: '江山',
|
|
|
label: '江山'
|
|
|
}, {
|
|
|
value: '瑞安',
|
|
|
label: '瑞安'
|
|
|
}, {
|
|
|
value: '绍兴',
|
|
|
label: '绍兴'
|
|
|
}, {
|
|
|
value: '嵊州',
|
|
|
label: '嵊州'
|
|
|
}, {
|
|
|
value: '台州',
|
|
|
label: '台州'
|
|
|
}, {
|
|
|
value: '温岭',
|
|
|
label: '温岭'
|
|
|
}, {
|
|
|
value: '余姚',
|
|
|
label: '余姚'
|
|
|
}, {
|
|
|
value: '舟山',
|
|
|
label: '舟山'
|
|
|
}]
|
|
|
}, {
|
|
|
value: '海外',
|
|
|
label: '海外',
|
|
|
children: [{
|
|
|
value: "美国",
|
|
|
label: '美国'
|
|
|
}, {
|
|
|
value: '日本',
|
|
|
label: '日本'
|
|
|
}, {
|
|
|
value: '英国',
|
|
|
label: '英国'
|
|
|
}, {
|
|
|
value: '法国',
|
|
|
label: '法国'
|
|
|
}, {
|
|
|
value: '德国',
|
|
|
label: '德国'
|
|
|
}, {
|
|
|
value: '其他',
|
|
|
label: '其他'
|
|
|
}]
|
|
|
}];
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 88522:
|
|
|
/*!*****************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/auto-complete/index.js ***!
|
|
|
\*****************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 12124);
|
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/Children/toArray */ 45659);
|
|
|
/* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/omit */ 99468);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var _util_PurePanel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/PurePanel */ 53487);
|
|
|
/* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/reactNode */ 92343);
|
|
|
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config-provider */ 36355);
|
|
|
/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../select */ 57809);
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const {
|
|
|
Option
|
|
|
} = _select__WEBPACK_IMPORTED_MODULE_3__["default"];
|
|
|
function isSelectOptionOrSelectOptGroup(child) {
|
|
|
return child && child.type && (child.type.isSelectOption || child.type.isSelectOptGroup);
|
|
|
}
|
|
|
const AutoComplete = (props, ref) => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
className,
|
|
|
popupClassName,
|
|
|
dropdownClassName,
|
|
|
children,
|
|
|
dataSource
|
|
|
} = props;
|
|
|
const childNodes = (0,rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(children);
|
|
|
// ============================= Input =============================
|
|
|
let customizeInput;
|
|
|
if (childNodes.length === 1 && (0,_util_reactNode__WEBPACK_IMPORTED_MODULE_4__/* .isValidElement */ .l$)(childNodes[0]) && !isSelectOptionOrSelectOptGroup(childNodes[0])) {
|
|
|
[customizeInput] = childNodes;
|
|
|
}
|
|
|
const getInputElement = customizeInput ? () => customizeInput : undefined;
|
|
|
// ============================ Options ============================
|
|
|
let optionChildren;
|
|
|
// [Legacy] convert `children` or `dataSource` into option children
|
|
|
if (childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0])) {
|
|
|
optionChildren = children;
|
|
|
} else {
|
|
|
optionChildren = dataSource ? dataSource.map(item => {
|
|
|
if ((0,_util_reactNode__WEBPACK_IMPORTED_MODULE_4__/* .isValidElement */ .l$)(item)) {
|
|
|
return item;
|
|
|
}
|
|
|
switch (typeof item) {
|
|
|
case 'string':
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(Option, {
|
|
|
key: item,
|
|
|
value: item
|
|
|
}, item);
|
|
|
case 'object':
|
|
|
{
|
|
|
const {
|
|
|
value: optionValue
|
|
|
} = item;
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(Option, {
|
|
|
key: optionValue,
|
|
|
value: optionValue
|
|
|
}, item.text);
|
|
|
}
|
|
|
default:
|
|
|
false ? 0 : void 0;
|
|
|
return undefined;
|
|
|
}
|
|
|
}) : [];
|
|
|
}
|
|
|
if (false) {}
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_5__/* .ConfigContext */ .E_);
|
|
|
const prefixCls = getPrefixCls('select', customizePrefixCls);
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_select__WEBPACK_IMPORTED_MODULE_3__["default"], Object.assign({
|
|
|
ref: ref,
|
|
|
suffixIcon: null
|
|
|
}, (0,rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(props, ['dataSource', 'dropdownClassName']), {
|
|
|
prefixCls: prefixCls,
|
|
|
popupClassName: popupClassName || dropdownClassName,
|
|
|
className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(`${prefixCls}-auto-complete`, className),
|
|
|
mode: _select__WEBPACK_IMPORTED_MODULE_3__["default"].SECRET_COMBOBOX_MODE_DO_NOT_USE
|
|
|
}, {
|
|
|
// Internal api
|
|
|
getInputElement
|
|
|
}), optionChildren);
|
|
|
};
|
|
|
const RefAutoComplete = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(AutoComplete);
|
|
|
// We don't care debug panel
|
|
|
/* istanbul ignore next */
|
|
|
const PurePanel = (0,_util_PurePanel__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)(RefAutoComplete);
|
|
|
RefAutoComplete.Option = Option;
|
|
|
RefAutoComplete._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;
|
|
|
if (false) {}
|
|
|
/* harmony default export */ __webpack_exports__.Z = (RefAutoComplete);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 78673:
|
|
|
/*!**********************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/switch/index.js + 2 modules ***!
|
|
|
\**********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ es_switch; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/LoadingOutlined.js + 1 modules
|
|
|
var LoadingOutlined = __webpack_require__(38521);
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js
|
|
|
var _classnames_2_3_2_classnames = __webpack_require__(12124);
|
|
|
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(26508);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/defineProperty.js
|
|
|
var defineProperty = __webpack_require__(80268);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
|
var slicedToArray = __webpack_require__(39718);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
|
var objectWithoutProperties = __webpack_require__(26779);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/hooks/useMergedState.js
|
|
|
var useMergedState = __webpack_require__(84381);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/KeyCode.js
|
|
|
var KeyCode = __webpack_require__(84821);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-switch@4.1.0@rc-switch/es/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange", "onKeyDown"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Switch = /*#__PURE__*/_react_17_0_2_react.forwardRef(function (_ref, ref) {
|
|
|
var _classNames;
|
|
|
var _ref$prefixCls = _ref.prefixCls,
|
|
|
prefixCls = _ref$prefixCls === void 0 ? 'rc-switch' : _ref$prefixCls,
|
|
|
className = _ref.className,
|
|
|
checked = _ref.checked,
|
|
|
defaultChecked = _ref.defaultChecked,
|
|
|
disabled = _ref.disabled,
|
|
|
loadingIcon = _ref.loadingIcon,
|
|
|
checkedChildren = _ref.checkedChildren,
|
|
|
unCheckedChildren = _ref.unCheckedChildren,
|
|
|
onClick = _ref.onClick,
|
|
|
onChange = _ref.onChange,
|
|
|
onKeyDown = _ref.onKeyDown,
|
|
|
restProps = (0,objectWithoutProperties/* default */.Z)(_ref, _excluded);
|
|
|
var _useMergedState = (0,useMergedState/* default */.Z)(false, {
|
|
|
value: checked,
|
|
|
defaultValue: defaultChecked
|
|
|
}),
|
|
|
_useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2),
|
|
|
innerChecked = _useMergedState2[0],
|
|
|
setInnerChecked = _useMergedState2[1];
|
|
|
function triggerChange(newChecked, event) {
|
|
|
var mergedChecked = innerChecked;
|
|
|
if (!disabled) {
|
|
|
mergedChecked = newChecked;
|
|
|
setInnerChecked(mergedChecked);
|
|
|
onChange === null || onChange === void 0 ? void 0 : onChange(mergedChecked, event);
|
|
|
}
|
|
|
return mergedChecked;
|
|
|
}
|
|
|
function onInternalKeyDown(e) {
|
|
|
if (e.which === KeyCode/* default */.Z.LEFT) {
|
|
|
triggerChange(false, e);
|
|
|
} else if (e.which === KeyCode/* default */.Z.RIGHT) {
|
|
|
triggerChange(true, e);
|
|
|
}
|
|
|
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
|
}
|
|
|
function onInternalClick(e) {
|
|
|
var ret = triggerChange(!innerChecked, e);
|
|
|
// [Legacy] trigger onClick with value
|
|
|
onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);
|
|
|
}
|
|
|
var switchClassName = _classnames_2_3_2_classnames_default()(prefixCls, className, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-checked"), innerChecked), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("button", (0,esm_extends/* default */.Z)({}, restProps, {
|
|
|
type: "button",
|
|
|
role: "switch",
|
|
|
"aria-checked": innerChecked,
|
|
|
disabled: disabled,
|
|
|
className: switchClassName,
|
|
|
ref: ref,
|
|
|
onKeyDown: onInternalKeyDown,
|
|
|
onClick: onInternalClick
|
|
|
}), loadingIcon, /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
|
className: "".concat(prefixCls, "-inner")
|
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
|
className: "".concat(prefixCls, "-inner-checked")
|
|
|
}, checkedChildren), /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
|
className: "".concat(prefixCls, "-inner-unchecked")
|
|
|
}, unCheckedChildren)));
|
|
|
});
|
|
|
Switch.displayName = 'Switch';
|
|
|
/* harmony default export */ var es = (Switch);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/index.js + 4 modules
|
|
|
var wave = __webpack_require__(14088);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(36355);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/DisabledContext.js
|
|
|
var DisabledContext = __webpack_require__(1684);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useSize.js
|
|
|
var useSize = __webpack_require__(19716);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ctrl_tinycolor@3.6.1@@ctrl/tinycolor/dist/module/index.js
|
|
|
var dist_module = __webpack_require__(64993);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
|
var style = __webpack_require__(17313);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
|
var statistic = __webpack_require__(37613);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/switch/style/index.js
|
|
|
|
|
|
|
|
|
|
|
|
const genSwitchSmallStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
trackHeightSM,
|
|
|
trackPadding,
|
|
|
trackMinWidthSM,
|
|
|
innerMinMarginSM,
|
|
|
innerMaxMarginSM,
|
|
|
handleSizeSM
|
|
|
} = token;
|
|
|
const switchInnerCls = `${componentCls}-inner`;
|
|
|
return {
|
|
|
[componentCls]: {
|
|
|
[`&${componentCls}-small`]: {
|
|
|
minWidth: trackMinWidthSM,
|
|
|
height: trackHeightSM,
|
|
|
lineHeight: `${trackHeightSM}px`,
|
|
|
[`${componentCls}-inner`]: {
|
|
|
paddingInlineStart: innerMaxMarginSM,
|
|
|
paddingInlineEnd: innerMinMarginSM,
|
|
|
[`${switchInnerCls}-checked`]: {
|
|
|
marginInlineStart: `calc(-100% + ${handleSizeSM + trackPadding * 2}px - ${innerMaxMarginSM * 2}px)`,
|
|
|
marginInlineEnd: `calc(100% - ${handleSizeSM + trackPadding * 2}px + ${innerMaxMarginSM * 2}px)`
|
|
|
},
|
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
|
marginTop: -trackHeightSM,
|
|
|
marginInlineStart: 0,
|
|
|
marginInlineEnd: 0
|
|
|
}
|
|
|
},
|
|
|
[`${componentCls}-handle`]: {
|
|
|
width: handleSizeSM,
|
|
|
height: handleSizeSM
|
|
|
},
|
|
|
[`${componentCls}-loading-icon`]: {
|
|
|
top: (handleSizeSM - token.switchLoadingIconSize) / 2,
|
|
|
fontSize: token.switchLoadingIconSize
|
|
|
},
|
|
|
[`&${componentCls}-checked`]: {
|
|
|
[`${componentCls}-inner`]: {
|
|
|
paddingInlineStart: innerMinMarginSM,
|
|
|
paddingInlineEnd: innerMaxMarginSM,
|
|
|
[`${switchInnerCls}-checked`]: {
|
|
|
marginInlineStart: 0,
|
|
|
marginInlineEnd: 0
|
|
|
},
|
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
|
marginInlineStart: `calc(100% - ${handleSizeSM + trackPadding * 2}px + ${innerMaxMarginSM * 2}px)`,
|
|
|
marginInlineEnd: `calc(-100% + ${handleSizeSM + trackPadding * 2}px - ${innerMaxMarginSM * 2}px)`
|
|
|
}
|
|
|
},
|
|
|
[`${componentCls}-handle`]: {
|
|
|
insetInlineStart: `calc(100% - ${handleSizeSM + trackPadding}px)`
|
|
|
}
|
|
|
},
|
|
|
[`&:not(${componentCls}-disabled):active`]: {
|
|
|
[`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
|
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
|
marginInlineStart: token.marginXXS / 2,
|
|
|
marginInlineEnd: -token.marginXXS / 2
|
|
|
}
|
|
|
},
|
|
|
[`&${componentCls}-checked ${switchInnerCls}`]: {
|
|
|
[`${switchInnerCls}-checked`]: {
|
|
|
marginInlineStart: -token.marginXXS / 2,
|
|
|
marginInlineEnd: token.marginXXS / 2
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
const genSwitchLoadingStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
handleSize
|
|
|
} = token;
|
|
|
return {
|
|
|
[componentCls]: {
|
|
|
[`${componentCls}-loading-icon${token.iconCls}`]: {
|
|
|
position: 'relative',
|
|
|
top: (handleSize - token.fontSize) / 2,
|
|
|
color: token.switchLoadingIconColor,
|
|
|
verticalAlign: 'top'
|
|
|
},
|
|
|
[`&${componentCls}-checked ${componentCls}-loading-icon`]: {
|
|
|
color: token.switchColor
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
const genSwitchHandleStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
motion,
|
|
|
trackPadding,
|
|
|
handleBg,
|
|
|
handleShadow,
|
|
|
handleSize
|
|
|
} = token;
|
|
|
const switchHandleCls = `${componentCls}-handle`;
|
|
|
return {
|
|
|
[componentCls]: {
|
|
|
[switchHandleCls]: {
|
|
|
position: 'absolute',
|
|
|
top: trackPadding,
|
|
|
insetInlineStart: trackPadding,
|
|
|
width: handleSize,
|
|
|
height: handleSize,
|
|
|
transition: `all ${token.switchDuration} ease-in-out`,
|
|
|
'&::before': {
|
|
|
position: 'absolute',
|
|
|
top: 0,
|
|
|
insetInlineEnd: 0,
|
|
|
bottom: 0,
|
|
|
insetInlineStart: 0,
|
|
|
backgroundColor: handleBg,
|
|
|
borderRadius: handleSize / 2,
|
|
|
boxShadow: handleShadow,
|
|
|
transition: `all ${token.switchDuration} ease-in-out`,
|
|
|
content: '""'
|
|
|
}
|
|
|
},
|
|
|
[`&${componentCls}-checked ${switchHandleCls}`]: {
|
|
|
insetInlineStart: `calc(100% - ${handleSize + trackPadding}px)`
|
|
|
},
|
|
|
[`&:not(${componentCls}-disabled):active`]: motion ? {
|
|
|
[`${switchHandleCls}::before`]: {
|
|
|
insetInlineEnd: token.switchHandleActiveInset,
|
|
|
insetInlineStart: 0
|
|
|
},
|
|
|
[`&${componentCls}-checked ${switchHandleCls}::before`]: {
|
|
|
insetInlineEnd: 0,
|
|
|
insetInlineStart: token.switchHandleActiveInset
|
|
|
}
|
|
|
} : /* istanbul ignore next */
|
|
|
{}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
const genSwitchInnerStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
trackHeight,
|
|
|
trackPadding,
|
|
|
innerMinMargin,
|
|
|
innerMaxMargin,
|
|
|
handleSize
|
|
|
} = token;
|
|
|
const switchInnerCls = `${componentCls}-inner`;
|
|
|
return {
|
|
|
[componentCls]: {
|
|
|
[switchInnerCls]: {
|
|
|
display: 'block',
|
|
|
overflow: 'hidden',
|
|
|
borderRadius: 100,
|
|
|
height: '100%',
|
|
|
paddingInlineStart: innerMaxMargin,
|
|
|
paddingInlineEnd: innerMinMargin,
|
|
|
transition: `padding-inline-start ${token.switchDuration} ease-in-out, padding-inline-end ${token.switchDuration} ease-in-out`,
|
|
|
[`${switchInnerCls}-checked, ${switchInnerCls}-unchecked`]: {
|
|
|
display: 'block',
|
|
|
color: token.colorTextLightSolid,
|
|
|
fontSize: token.fontSizeSM,
|
|
|
transition: `margin-inline-start ${token.switchDuration} ease-in-out, margin-inline-end ${token.switchDuration} ease-in-out`,
|
|
|
pointerEvents: 'none'
|
|
|
},
|
|
|
[`${switchInnerCls}-checked`]: {
|
|
|
marginInlineStart: `calc(-100% + ${handleSize + trackPadding * 2}px - ${innerMaxMargin * 2}px)`,
|
|
|
marginInlineEnd: `calc(100% - ${handleSize + trackPadding * 2}px + ${innerMaxMargin * 2}px)`
|
|
|
},
|
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
|
marginTop: -trackHeight,
|
|
|
marginInlineStart: 0,
|
|
|
marginInlineEnd: 0
|
|
|
}
|
|
|
},
|
|
|
[`&${componentCls}-checked ${switchInnerCls}`]: {
|
|
|
paddingInlineStart: innerMinMargin,
|
|
|
paddingInlineEnd: innerMaxMargin,
|
|
|
[`${switchInnerCls}-checked`]: {
|
|
|
marginInlineStart: 0,
|
|
|
marginInlineEnd: 0
|
|
|
},
|
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
|
marginInlineStart: `calc(100% - ${handleSize + trackPadding * 2}px + ${innerMaxMargin * 2}px)`,
|
|
|
marginInlineEnd: `calc(-100% + ${handleSize + trackPadding * 2}px - ${innerMaxMargin * 2}px)`
|
|
|
}
|
|
|
},
|
|
|
[`&:not(${componentCls}-disabled):active`]: {
|
|
|
[`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
|
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
|
marginInlineStart: trackPadding * 2,
|
|
|
marginInlineEnd: -trackPadding * 2
|
|
|
}
|
|
|
},
|
|
|
[`&${componentCls}-checked ${switchInnerCls}`]: {
|
|
|
[`${switchInnerCls}-checked`]: {
|
|
|
marginInlineStart: -trackPadding * 2,
|
|
|
marginInlineEnd: trackPadding * 2
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
};
|
|
|
const genSwitchStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
trackHeight,
|
|
|
trackMinWidth
|
|
|
} = token;
|
|
|
return {
|
|
|
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
|
position: 'relative',
|
|
|
display: 'inline-block',
|
|
|
boxSizing: 'border-box',
|
|
|
minWidth: trackMinWidth,
|
|
|
height: trackHeight,
|
|
|
lineHeight: `${trackHeight}px`,
|
|
|
verticalAlign: 'middle',
|
|
|
background: token.colorTextQuaternary,
|
|
|
border: '0',
|
|
|
borderRadius: 100,
|
|
|
cursor: 'pointer',
|
|
|
transition: `all ${token.motionDurationMid}`,
|
|
|
userSelect: 'none',
|
|
|
[`&:hover:not(${componentCls}-disabled)`]: {
|
|
|
background: token.colorTextTertiary
|
|
|
}
|
|
|
}), (0,style/* genFocusStyle */.Qy)(token)), {
|
|
|
[`&${componentCls}-checked`]: {
|
|
|
background: token.switchColor,
|
|
|
[`&:hover:not(${componentCls}-disabled)`]: {
|
|
|
background: token.colorPrimaryHover
|
|
|
}
|
|
|
},
|
|
|
[`&${componentCls}-loading, &${componentCls}-disabled`]: {
|
|
|
cursor: 'not-allowed',
|
|
|
opacity: token.switchDisabledOpacity,
|
|
|
'*': {
|
|
|
boxShadow: 'none',
|
|
|
cursor: 'not-allowed'
|
|
|
}
|
|
|
},
|
|
|
// rtl style
|
|
|
[`&${componentCls}-rtl`]: {
|
|
|
direction: 'rtl'
|
|
|
}
|
|
|
})
|
|
|
};
|
|
|
};
|
|
|
// ============================== Export ==============================
|
|
|
/* harmony default export */ var switch_style = ((0,genComponentStyleHook/* default */.Z)('Switch', token => {
|
|
|
const switchToken = (0,statistic/* merge */.TS)(token, {
|
|
|
switchDuration: token.motionDurationMid,
|
|
|
switchColor: token.colorPrimary,
|
|
|
switchDisabledOpacity: token.opacityLoading,
|
|
|
switchLoadingIconSize: token.fontSizeIcon * 0.75,
|
|
|
switchLoadingIconColor: `rgba(0, 0, 0, ${token.opacityLoading})`,
|
|
|
switchHandleActiveInset: '-30%'
|
|
|
});
|
|
|
return [genSwitchStyle(switchToken),
|
|
|
// inner style
|
|
|
genSwitchInnerStyle(switchToken),
|
|
|
// handle style
|
|
|
genSwitchHandleStyle(switchToken),
|
|
|
// loading style
|
|
|
genSwitchLoadingStyle(switchToken),
|
|
|
// small style
|
|
|
genSwitchSmallStyle(switchToken)];
|
|
|
}, token => {
|
|
|
const {
|
|
|
fontSize,
|
|
|
lineHeight,
|
|
|
controlHeight,
|
|
|
colorWhite
|
|
|
} = token;
|
|
|
const height = fontSize * lineHeight;
|
|
|
const heightSM = controlHeight / 2;
|
|
|
const padding = 2; // Fixed value
|
|
|
const handleSize = height - padding * 2;
|
|
|
const handleSizeSM = heightSM - padding * 2;
|
|
|
return {
|
|
|
trackHeight: height,
|
|
|
trackHeightSM: heightSM,
|
|
|
trackMinWidth: handleSize * 2 + padding * 4,
|
|
|
trackMinWidthSM: handleSizeSM * 2 + padding * 2,
|
|
|
trackPadding: padding,
|
|
|
handleBg: colorWhite,
|
|
|
handleSize,
|
|
|
handleSizeSM,
|
|
|
handleShadow: `0 2px 4px 0 ${new dist_module/* TinyColor */.C('#00230b').setAlpha(0.2).toRgbString()}`,
|
|
|
innerMinMargin: handleSize / 2,
|
|
|
innerMaxMargin: handleSize + padding + padding * 2,
|
|
|
innerMinMarginSM: handleSizeSM / 2,
|
|
|
innerMaxMarginSM: handleSizeSM + padding + padding * 2
|
|
|
};
|
|
|
}));
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/switch/index.js
|
|
|
"use client";
|
|
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
var t = {};
|
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
|
}
|
|
|
return t;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const switch_Switch = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
size: customizeSize,
|
|
|
disabled: customDisabled,
|
|
|
loading,
|
|
|
className,
|
|
|
rootClassName,
|
|
|
style
|
|
|
} = props,
|
|
|
restProps = __rest(props, ["prefixCls", "size", "disabled", "loading", "className", "rootClassName", "style"]);
|
|
|
false ? 0 : void 0;
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction,
|
|
|
switch: SWITCH
|
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
|
// ===================== Disabled =====================
|
|
|
const disabled = _react_17_0_2_react.useContext(DisabledContext/* default */.Z);
|
|
|
const mergedDisabled = (customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled) || loading;
|
|
|
const prefixCls = getPrefixCls('switch', customizePrefixCls);
|
|
|
const loadingIcon = /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
|
className: `${prefixCls}-handle`
|
|
|
}, loading && /*#__PURE__*/_react_17_0_2_react.createElement(LoadingOutlined/* default */.Z, {
|
|
|
className: `${prefixCls}-loading-icon`
|
|
|
}));
|
|
|
// Style
|
|
|
const [wrapSSR, hashId] = switch_style(prefixCls);
|
|
|
const mergedSize = (0,useSize/* default */.Z)(customizeSize);
|
|
|
const classes = _classnames_2_3_2_classnames_default()(SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.className, {
|
|
|
[`${prefixCls}-small`]: mergedSize === 'small',
|
|
|
[`${prefixCls}-loading`]: loading,
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
|
}, className, rootClassName, hashId);
|
|
|
const mergedStyle = Object.assign(Object.assign({}, SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.style), style);
|
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(wave/* default */.Z, {
|
|
|
component: "Switch"
|
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(es, Object.assign({}, restProps, {
|
|
|
prefixCls: prefixCls,
|
|
|
className: classes,
|
|
|
style: mergedStyle,
|
|
|
disabled: mergedDisabled,
|
|
|
ref: ref,
|
|
|
loadingIcon: loadingIcon
|
|
|
}))));
|
|
|
});
|
|
|
switch_Switch.__ANT_SWITCH = true;
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var es_switch = (switch_Switch);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 4977:
|
|
|
/*!********************************************!*\
|
|
|
!*** ./src/assets/images/icons/nodata.png ***!
|
|
|
\********************************************/
|
|
|
/***/ (function(module) {
|
|
|
|
|
|
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKx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