You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Paths__New__index.async.js

3046 lines
86 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[28982,12325],{
/***/ 81353:
/*!***************************************************!*\
!*** ./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/helpers/toConsumableArray.js
var toConsumableArray = __webpack_require__(861);
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__(38416);
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(70215);
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(88275);
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 5 modules
var input = __webpack_require__(79531);
// EXTERNAL MODULE: ./node_modules/antd/es/tree-select/index.js + 67 modules
var tree_select = __webpack_require__(42167);
// EXTERNAL MODULE: ./node_modules/antd/es/form/index.js + 17 modules
var es_form = __webpack_require__(25159);
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 4 modules
var message = __webpack_require__(2453);
// EXTERNAL MODULE: ./node_modules/antd/es/auto-complete/index.js
var auto_complete = __webpack_require__(49288);
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
var row = __webpack_require__(71230);
// EXTERNAL MODULE: ./node_modules/antd/es/col/index.js
var col = __webpack_require__(15746);
// EXTERNAL MODULE: ./node_modules/antd/es/switch/index.js + 27 modules
var es_switch = __webpack_require__(47897);
// EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 5 modules
var es_radio = __webpack_require__(78045);
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/index.js + 3 modules
var es_checkbox = __webpack_require__(84567);
// EXTERNAL MODULE: ./node_modules/antd/es/upload/index.js + 24 modules
var upload = __webpack_require__(31365);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
var markdown_editor = __webpack_require__(55373);
;// 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__(29427);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(59758);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(84519);
// EXTERNAL MODULE: ./node_modules/antd/es/empty/index.js + 3 modules
var empty = __webpack_require__(32983);
;// 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/es/icons/CloseOutlined.js + 1 modules
var CloseOutlined = __webpack_require__(97937);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/RightOutlined.js + 1 modules
var RightOutlined = __webpack_require__(18073);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// 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.createRef)();
var Cascader = function Cascader(_ref) {
var dataSource = _ref.dataSource,
placeholder = _ref.placeholder,
defaultValue = _ref.defaultValue,
onChange = _ref.onChange;
var _useState = (0,react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
leftStatus = _useState2[0],
setLeftStatus = _useState2[1];
var _useState3 = (0,react.useState)({
data: [],
objData: {},
ids: []
}),
_useState4 = slicedToArray_default()(_useState3, 2),
value = _useState4[0],
setValue = _useState4[1];
var _useState5 = (0,react.useState)({}),
_useState6 = slicedToArray_default()(_useState5, 2),
targetData = _useState6[0],
setTargetData = _useState6[1];
(0,react.useEffect)(function () {
window.addEventListener('click', function () {
setLeftStatus(false);
setTargetData({});
});
}, []);
(0,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.PRESENTED_IMAGE_SIMPLE */.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/es/modal/index.js + 39 modules
var modal = __webpack_require__(72423);
// EXTERNAL MODULE: ./node_modules/antd/es/cascader/index.js + 63 modules
var cascader = __webpack_require__(80316);
// EXTERNAL MODULE: ./node_modules/@umijs/plugins/node_modules/dayjs/dayjs.min.js
var dayjs_min = __webpack_require__(94699);
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js + 1 modules
var CheckCircleFilled = __webpack_require__(89739);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js + 1 modules
var CloseCircleFilled = __webpack_require__(4340);
// EXTERNAL MODULE: ./src/utils/cityData.ts
var cityData = __webpack_require__(12325);
;// 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.TextArea */.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.useForm */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
(0,react.useEffect)(function () {
form.setFieldsValue({
name: schoolName
});
}, [schoolName]);
var handleFinish = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(values) {
var _ref3, name, _ref3$city, city, address, remarks, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.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;
_context.next = 3;
return dispatch({
type: 'newCourse/appplySchool',
payload: {
name: name,
province: city[0],
city: city[1],
address: address,
remarks: remarks
}
});
case 3:
res = _context.sent;
dispatch({
type: 'newCourse/setActionTabs',
payload: {}
});
if (res) {
message/* default.success */.ZP.success("新增发布单位成功!");
onSuccess(name);
}
case 6:
case "end":
return _context.stop();
}
}, _callee);
}));
return function handleFinish(_x) {
return _ref2.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsx)(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.Item */.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.Item */.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.Item */.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.Item */.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.Item */.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.TextArea */.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.useForm */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var _useState = (0,react.useState)({}),
_useState2 = slicedToArray_default()(_useState, 2),
formValue = _useState2[0],
setFormValue = _useState2[1];
var _useState3 = (0,react.useState)(),
_useState4 = slicedToArray_default()(_useState3, 2),
isEdit = _useState4[0],
setIsEdit = _useState4[1];
var pathId = (0,react.useRef)();
var _useState5 = (0,react.useState)(true),
_useState6 = slicedToArray_default()(_useState5, 2),
custseq = _useState6[0],
setCustSeq = _useState6[1];
var _useState7 = (0,react.useState)(false),
_useState8 = slicedToArray_default()(_useState7, 2),
showspoc = _useState8[0],
setShowSpoc = _useState8[1];
var _useState9 = (0,react.useState)(),
_useState10 = slicedToArray_default()(_useState9, 2),
Filelists = _useState10[0],
setFileLists = _useState10[1];
var _useState11 = (0,react.useState)(),
_useState12 = slicedToArray_default()(_useState11, 2),
Filelists1 = _useState12[0],
setFileLists1 = _useState12[1];
var _useState13 = (0,react.useState)(true),
_useState14 = slicedToArray_default()(_useState13, 2),
show_tag = _useState14[0],
setshow_tag = _useState14[1];
var _useState15 = (0,react.useState)(false),
_useState16 = slicedToArray_default()(_useState15, 2),
show_history = _useState16[0],
setshow_history = _useState16[1];
var _useState17 = (0,react.useState)(false),
_useState18 = slicedToArray_default()(_useState17, 2),
ismodel = _useState18[0],
setismodel = _useState18[1];
var _useState19 = (0,react.useState)(-1),
_useState20 = slicedToArray_default()(_useState19, 2),
open_num = _useState20[0],
setopen_num = _useState20[1];
var _useState21 = (0,react.useState)(true),
_useState22 = slicedToArray_default()(_useState21, 2),
schoolLoading = _useState22[0],
setSchoolLoading = _useState22[1];
var _useState23 = (0,react.useState)([]),
_useState24 = slicedToArray_default()(_useState23, 2),
schoolList = _useState24[0],
setSchoolList = _useState24[1];
var _useState25 = (0,react.useState)([]),
_useState26 = slicedToArray_default()(_useState25, 2),
filterSchoolList = _useState26[0],
setFilterSchoolList = _useState26[1];
var _useState27 = (0,react.useState)(false),
_useState28 = slicedToArray_default()(_useState27, 2),
allow_download = _useState28[0],
setallow_download = _useState28[1];
var _useState29 = (0,react.useState)(false),
_useState30 = slicedToArray_default()(_useState29, 2),
show_course_section = _useState30[0],
setShowCourseSection = _useState30[1];
// 方向课程数据源
var _useState31 = (0,react.useState)([]),
_useState32 = slicedToArray_default()(_useState31, 2),
options = _useState32[0],
setOptions = _useState32[1];
// 方向课程的值
var _useState33 = (0,react.useState)([]),
_useState34 = slicedToArray_default()(_useState33, 2),
disciplinesValue = _useState34[0],
setDisciplinesValue = _useState34[1];
(0,react.useEffect)(function () {
var _globalSetting$settin;
getOptionsData();
getSchoolOption();
pathId.current = params.pathId;
setIsEdit(!!pathId.current);
(0,util/* setDocumentTitle */.Dk)(globalSetting === null || globalSetting === void 0 ? 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$attachments2$, _res$attachments3, _res$attachments3$, _res$attachments4, _res$attachments4$, _res$attachments_b2, _res$attachments_b2$, _res$attachments_b3, _res$attachments_b3$, _res$attachments_b4, _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 ? 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 ? void 0 : (_res$toast2 = res.toast) === null || _res$toast2 === void 0 ? void 0 : _res$toast2.is_open);
setopen_num(res === null || res === void 0 ? 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 ? void 0 : (_res$attachments = res.attachments) === null || _res$attachments === void 0 ? void 0 : _res$attachments.length) > 0) {
setFileLists([{
uid: res === null || res === void 0 ? void 0 : (_res$attachments2 = res.attachments) === null || _res$attachments2 === void 0 ? void 0 : (_res$attachments2$ = _res$attachments2[0]) === null || _res$attachments2$ === void 0 ? void 0 : _res$attachments2$.id,
name: res === null || res === void 0 ? void 0 : (_res$attachments3 = res.attachments) === null || _res$attachments3 === void 0 ? void 0 : (_res$attachments3$ = _res$attachments3[0]) === null || _res$attachments3$ === void 0 ? void 0 : _res$attachments3$.title,
response: {
id: res === null || res === void 0 ? void 0 : (_res$attachments4 = res.attachments) === null || _res$attachments4 === void 0 ? void 0 : (_res$attachments4$ = _res$attachments4[0]) === null || _res$attachments4$ === void 0 ? void 0 : _res$attachments4$.id
}
}]);
}
if ((res === null || res === void 0 ? 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 ? void 0 : (_res$attachments_b2 = res.attachments_b) === null || _res$attachments_b2 === void 0 ? 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 ? void 0 : (_res$attachments_b3 = res.attachments_b) === null || _res$attachments_b3 === void 0 ? 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 ? void 0 : (_res$attachments_b4 = res.attachments_b) === null || _res$attachments_b4 === void 0 ? 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 ? 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$, _Filelists$$response, _Filelists1$, _Filelists1$$response;
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.error */.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 ? void 0 : (_Filelists$ = Filelists[0]) === null || _Filelists$ === void 0 ? void 0 : (_Filelists$$response = _Filelists$.response) === null || _Filelists$$response === void 0 ? void 0 : _Filelists$$response.id],
attachment_ids_b: [Filelists1 === null || Filelists1 === void 0 ? void 0 : (_Filelists1$ = Filelists1[0]) === null || _Filelists1$ === void 0 ? void 0 : (_Filelists1$$response = _Filelists1$.response) === null || _Filelists1$$response === void 0 ? void 0 : _Filelists1$$response.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()({}, form.getFieldsValue()));
};
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.Item */.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.Item */.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.Item */.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.Item */.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.Item */.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.Item */.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.Item */.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.Item */.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.API_SERVER */.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 ? 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.error */.ZP.error('只能上传jpg 或者png图片');
return false;
}
var isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
message/* default.error */.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.API_SERVER */.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 ? 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.error */.ZP.error('只能上传jpg 或者png图片');
return false;
}
var isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
message/* default.error */.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));
/***/ }),
/***/ 12325:
/*!*******************************!*\
!*** ./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: '其他'
}]
}];
/***/ })
}]);