|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[75357,52720],{
|
|
|
|
|
|
/***/ 63959:
|
|
|
/*!********************************************************************************!*\
|
|
|
!*** ./src/pages/Engineering/Lists/TrainingProgram/Edit/index.tsx + 1 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 */ Edit; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(79800);
|
|
|
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/pages/Engineering/Lists/TrainingProgram/Edit/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Editmodules = ({"flex_box_center":"flex_box_center___nfalI","flex_space_between":"flex_space_between___muERG","flex_box_vertical_center":"flex_box_vertical_center___c6bb6","flex_box_center_end":"flex_box_center_end___dAE7C","flex_box_column":"flex_box_column___QoDZW","flex-col":"flex-col___mcmWO","flex-row":"flex-row___HPjIt","justify-start":"justify-start___AjJR8","justify-center":"justify-center___A_RoL","justify-end":"justify-end___ufVfj","justify-evenly":"justify-evenly___nxxy_","justify-around":"justify-around___NRGdb","justify-between":"justify-between___smMcb","align-start":"align-start___X_lRh","align-center":"align-center___OxVvV","align-end":"align-end___i3dbd","wrap":"wrap___p1lBE","title":"title___NdrqL","control":"control___eo7W9","label":"label___LWvs5","rowFrom":"rowFrom___MZz3p","customTable":"customTable___peiBr"});
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
|
var _umi_production_exports = __webpack_require__(13032);
|
|
|
// 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/breadcrumb/index.js + 6 modules
|
|
|
var breadcrumb = __webpack_require__(66104);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules
|
|
|
var divider = __webpack_require__(28103);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
|
|
|
var es_select = __webpack_require__(57809);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/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/input/index.js + 3 modules
|
|
|
var input = __webpack_require__(92832);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js
|
|
|
var upload = __webpack_require__(60028);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
var modal = __webpack_require__(43418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
|
var es_table = __webpack_require__(1710);
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
var fetch = __webpack_require__(58181);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/Lists/TrainingProgram/Edit/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Page = function Page(_ref) {
|
|
|
var _user$userInfo2;
|
|
|
var user = _ref.user;
|
|
|
var initParams = {
|
|
|
page: 1,
|
|
|
per_page: 20,
|
|
|
total: 0,
|
|
|
ec_major_school_id: null,
|
|
|
ec_year_id: null,
|
|
|
category: 1,
|
|
|
sort_by: null,
|
|
|
sort_direction: null,
|
|
|
school_id: null
|
|
|
};
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(initParams),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
params = _useState2[0],
|
|
|
setParams = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(true),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
loading = _useState4[0],
|
|
|
setLoading = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
tableData = _useState6[0],
|
|
|
setTableData = _useState6[1];
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
majorlist = _useState8[0],
|
|
|
setMajorList = _useState8[1];
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
yellList = _useState10[0],
|
|
|
setYellList = _useState10[1];
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
showmajor = _useState12[0],
|
|
|
setshwomajor = _useState12[1];
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
majorid = _useState14[0],
|
|
|
setmajorid = _useState14[1];
|
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
form = _Form$useForm2[0];
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
tabparams = _useState16[0],
|
|
|
setTabparams = _useState16[1];
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
fileList = _useState18[0],
|
|
|
setFileList = _useState18[1];
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
majorids = _useState20[0],
|
|
|
setmajorids = _useState20[1];
|
|
|
//是否操作文件
|
|
|
var _useState21 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
isupfile = _useState22[0],
|
|
|
setisupfile = _useState22[1];
|
|
|
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
|
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
|
|
|
SearchParams = _useSearchParams2[0];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
var _user$userInfo;
|
|
|
if ((_user$userInfo = user.userInfo) !== null && _user$userInfo !== void 0 && _user$userInfo.school_id) {
|
|
|
getmajorList();
|
|
|
getYell();
|
|
|
getDatas();
|
|
|
}
|
|
|
}, [user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.school_id]);
|
|
|
function getDatas() {
|
|
|
return _getDatas.apply(this, arguments);
|
|
|
}
|
|
|
function _getDatas() {
|
|
|
_getDatas = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
_context2.next = 2;
|
|
|
return (0,fetch/* default */.ZP)("/api/ec_major_schools/0/ec_years/".concat(SearchParams.get('ec_year_id'), ".json"), {
|
|
|
method: 'get'
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context2.sent;
|
|
|
if (res) {
|
|
|
form.setFieldsValue({
|
|
|
name: res === null || res === void 0 ? void 0 : res.name,
|
|
|
year: res === null || res === void 0 ? void 0 : res.year,
|
|
|
major_id: res === null || res === void 0 ? void 0 : res.major_name
|
|
|
});
|
|
|
if (res !== null && res !== void 0 && res.file_id) {
|
|
|
setFileList([{
|
|
|
uid: res === null || res === void 0 ? void 0 : res.file_id,
|
|
|
name: res === null || res === void 0 ? void 0 : res.file_name
|
|
|
}]);
|
|
|
}
|
|
|
setmajorids([res === null || res === void 0 ? void 0 : res.major_id] || 0);
|
|
|
setmajorid([res === null || res === void 0 ? void 0 : res.major_id] || 0);
|
|
|
}
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return _getDatas.apply(this, arguments);
|
|
|
}
|
|
|
function getmajorList(_x) {
|
|
|
return _getmajorList.apply(this, arguments);
|
|
|
}
|
|
|
function _getmajorList() {
|
|
|
_getmajorList = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(params) {
|
|
|
var _user$userInfo4;
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
setTabparams(objectSpread2_default()({}, params));
|
|
|
_context3.next = 3;
|
|
|
return (0,fetch/* default */.ZP)("/api/schools/".concat(user === null || user === void 0 || (_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : _user$userInfo4.school_id, "/ec_majors.json"), {
|
|
|
method: 'get',
|
|
|
params: objectSpread2_default()({
|
|
|
per_page: 10000
|
|
|
}, params)
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context3.sent;
|
|
|
setMajorList(res === null || res === void 0 ? void 0 : res.ec_majors);
|
|
|
case 5:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return _getmajorList.apply(this, arguments);
|
|
|
}
|
|
|
function getYell() {
|
|
|
return _getYell.apply(this, arguments);
|
|
|
}
|
|
|
function _getYell() {
|
|
|
_getYell = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
_context4.next = 2;
|
|
|
return (0,fetch/* default */.ZP)("/api/ec_major_schools/1/ec_years/select_year.json", {
|
|
|
method: 'get'
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context4.sent;
|
|
|
setYellList(res === null || res === void 0 ? void 0 : res.year_arr);
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
return _getYell.apply(this, arguments);
|
|
|
}
|
|
|
var table = [{
|
|
|
title: '专业代码',
|
|
|
dataIndex: 'code',
|
|
|
key: 'code'
|
|
|
}, {
|
|
|
title: '专业名称',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name'
|
|
|
}];
|
|
|
var Draggers = {
|
|
|
onRemove: function onRemove() {
|
|
|
setFileList([]);
|
|
|
setisupfile(true);
|
|
|
},
|
|
|
beforeUpload: function beforeUpload(file) {
|
|
|
console.log(file);
|
|
|
if ((file === null || file === void 0 ? void 0 : file.size) > 1024 * 1024 * 50) {
|
|
|
message/* default */.ZP.info('文件超过50M,不符合上传要求');
|
|
|
return false;
|
|
|
}
|
|
|
var filelist = [];
|
|
|
filelist.push(file);
|
|
|
setFileList([].concat(filelist));
|
|
|
setisupfile(true);
|
|
|
return false;
|
|
|
},
|
|
|
fileList: fileList
|
|
|
// accept: ".xls,.xlsx,word,PPT,Excel,pdf"
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Editmodules.wrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(breadcrumb/* default */.Z, {
|
|
|
separator: "",
|
|
|
style: {
|
|
|
padding: '20px'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
to: "/engineering/training/program",
|
|
|
children: "\u57F9\u517B\u65B9\u6848"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Separator, {
|
|
|
children: '>>'
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
|
children: "\u4FEE\u6539\u57F9\u517B\u65B9\u6848"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Editmodules.title,
|
|
|
children: "\u57F9\u517B\u65B9\u6848\u4FE1\u606F"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
style: {
|
|
|
padding: '0px 20px'
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
paddingTop: '50px'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
labelCol: {
|
|
|
span: 8
|
|
|
},
|
|
|
wrapperCol: {
|
|
|
span: 8
|
|
|
},
|
|
|
form: form,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u8BA4\u8BC1\u5C4A\u522B",
|
|
|
name: "year",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请选择届别'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
children: yellList === null || yellList === void 0 ? void 0 : yellList.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"].Option, {
|
|
|
value: item,
|
|
|
children: [item, "\u5C4A"]
|
|
|
});
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
marginRight: '4px',
|
|
|
color: '#ff4d4f'
|
|
|
},
|
|
|
children: "*"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("label", {
|
|
|
children: "\u8BA4\u8BC1\u4E13\u4E1A"
|
|
|
})]
|
|
|
}),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
gutter: 8,
|
|
|
style: {
|
|
|
flexFlow: "initial",
|
|
|
flexDirection: 'row-reverse'
|
|
|
},
|
|
|
className: Editmodules.rowFrom,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
name: "major_id",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
style: {
|
|
|
color: '#000'
|
|
|
},
|
|
|
disabled: true,
|
|
|
bordered: false
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
span: 12,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
onClick: function onClick() {
|
|
|
setshwomajor(true);
|
|
|
setmajorids(majorid || '');
|
|
|
},
|
|
|
children: "\u9009\u62E9\u8BA4\u8BC1\u4E13\u4E1A"
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u57F9\u517B\u65B9\u6848\u540D\u79F0",
|
|
|
name: "name",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入培养方案名称'
|
|
|
}, {
|
|
|
whitespace: true,
|
|
|
message: '请输入培养方案名称'
|
|
|
}, {
|
|
|
max: 60,
|
|
|
message: '培养方案名称不能超过60个字'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
span: 8,
|
|
|
style: {
|
|
|
textAlign: 'right'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("label", {
|
|
|
children: "\u57F9\u517B\u65B9\u6848\u6587\u4EF6\uFF1A"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
span: 8,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, Draggers), {}, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
children: "\u4E0A\u4F20\u6587\u4EF6"
|
|
|
})
|
|
|
}))
|
|
|
})]
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
textAlign: 'end',
|
|
|
paddingRight: '30px'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
onClick: function onClick() {
|
|
|
_umi_production_exports.history.push("/engineering/training/program");
|
|
|
},
|
|
|
children: "\u8FD4\u56DE"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var _user$userInfo3;
|
|
|
var params, formData, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
form.submit();
|
|
|
_context.next = 3;
|
|
|
return form.validateFields();
|
|
|
case 3:
|
|
|
params = form.getFieldsValue();
|
|
|
if (majorid) {
|
|
|
_context.next = 7;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.info('请选择认证专业');
|
|
|
return _context.abrupt("return");
|
|
|
case 7:
|
|
|
if (!(!params.name || !params.year)) {
|
|
|
_context.next = 9;
|
|
|
break;
|
|
|
}
|
|
|
return _context.abrupt("return");
|
|
|
case 9:
|
|
|
formData = new FormData();
|
|
|
if (fileList.length > 0 && isupfile) {
|
|
|
formData.append('file', fileList[0]);
|
|
|
}
|
|
|
formData.append('is_upfile', isupfile);
|
|
|
formData.append('school_id', user === null || user === void 0 || (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.school_id);
|
|
|
formData.append('major_id', majorid);
|
|
|
formData.append('name', params.name);
|
|
|
formData.append('year', params.year);
|
|
|
_context.next = 18;
|
|
|
return (0,fetch/* default */.ZP)("/api/ec_major_schools/1/ec_years/".concat(SearchParams.get('ec_year_id'), ".json"), {
|
|
|
method: 'put',
|
|
|
body: formData
|
|
|
}, true);
|
|
|
case 18:
|
|
|
res = _context.sent;
|
|
|
if (res.status === 0) {
|
|
|
message/* default */.ZP.info('修改成功');
|
|
|
_umi_production_exports.history.push("/engineering/training/program");
|
|
|
}
|
|
|
case 20:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
})),
|
|
|
style: {
|
|
|
marginLeft: '10px'
|
|
|
},
|
|
|
type: "primary",
|
|
|
children: "\u4FDD\u5B58"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
|
|
|
title: "\u9009\u62E9\u8BA4\u8BC1\u4E13\u4E1A",
|
|
|
centered: true,
|
|
|
open: showmajor,
|
|
|
onCancel: function onCancel() {
|
|
|
setshwomajor(false);
|
|
|
setmajorids([]);
|
|
|
},
|
|
|
onOk: function onOk() {
|
|
|
var _majorlist$filter;
|
|
|
setshwomajor(false);
|
|
|
setmajorid(majorids);
|
|
|
form.setFieldsValue({
|
|
|
major_id: majorlist === null || majorlist === void 0 || (_majorlist$filter = majorlist.filter(function (item) {
|
|
|
return item.id === parseInt(majorids);
|
|
|
})) === null || _majorlist$filter === void 0 || (_majorlist$filter = _majorlist$filter[0]) === null || _majorlist$filter === void 0 ? void 0 : _majorlist$filter.name
|
|
|
});
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
display: 'flex',
|
|
|
marginBottom: '10px',
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'space-between'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
|
|
style: {
|
|
|
width: '300px'
|
|
|
},
|
|
|
onSearch: function onSearch(e) {
|
|
|
getmajorList(objectSpread2_default()(objectSpread2_default()({}, tabparams), {}, {
|
|
|
search: e
|
|
|
}));
|
|
|
},
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u4E13\u4E1A\u4EE3\u7801\u6216\u540D\u79F0"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_table/* default */.Z, {
|
|
|
dataSource: majorlist,
|
|
|
columns: table,
|
|
|
pagination: false,
|
|
|
rowKey: function rowKey(v) {
|
|
|
return v.id;
|
|
|
},
|
|
|
scroll: {
|
|
|
y: 300
|
|
|
},
|
|
|
rowSelection: {
|
|
|
type: 'radio',
|
|
|
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
|
setmajorids(selectedRowKeys);
|
|
|
},
|
|
|
selectedRowKeys: majorids
|
|
|
}
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Edit = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
|
var user = _ref3.user;
|
|
|
return {
|
|
|
user: user
|
|
|
};
|
|
|
})(Page));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 66104:
|
|
|
/*!**************************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js + 6 modules ***!
|
|
|
\**************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ breadcrumb; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/Children/toArray.js
|
|
|
var toArray = __webpack_require__(11592);
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/pickAttrs.js
|
|
|
var pickAttrs = __webpack_require__(26112);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
|
|
|
var reactNode = __webpack_require__(92343);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(36355);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/DownOutlined.js + 1 modules
|
|
|
var DownOutlined = __webpack_require__(84105);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown.js
|
|
|
var dropdown = __webpack_require__(91857);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/BreadcrumbSeparator.js
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
const BreadcrumbSeparator = _ref => {
|
|
|
let {
|
|
|
children
|
|
|
} = _ref;
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
|
const prefixCls = getPrefixCls('breadcrumb');
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("li", {
|
|
|
className: `${prefixCls}-separator`,
|
|
|
"aria-hidden": "true"
|
|
|
}, children === '' ? children : children || '/');
|
|
|
};
|
|
|
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
|
|
|
/* harmony default export */ var breadcrumb_BreadcrumbSeparator = (BreadcrumbSeparator);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/useItemRender.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;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function getBreadcrumbName(route, params) {
|
|
|
if (route.title === undefined || route.title === null) {
|
|
|
return null;
|
|
|
}
|
|
|
const paramsKeys = Object.keys(params).join('|');
|
|
|
return typeof route.title === 'object' ? route.title : String(route.title).replace(new RegExp(`:(${paramsKeys})`, 'g'), (replacement, key) => params[key] || replacement);
|
|
|
}
|
|
|
function renderItem(prefixCls, item, children, href) {
|
|
|
if (children === null || children === undefined) {
|
|
|
return null;
|
|
|
}
|
|
|
const {
|
|
|
className,
|
|
|
onClick
|
|
|
} = item,
|
|
|
restItem = __rest(item, ["className", "onClick"]);
|
|
|
const passedProps = Object.assign(Object.assign({}, (0,pickAttrs/* default */.Z)(restItem, {
|
|
|
data: true,
|
|
|
aria: true
|
|
|
})), {
|
|
|
onClick
|
|
|
});
|
|
|
if (href !== undefined) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("a", Object.assign({}, passedProps, {
|
|
|
className: _classnames_2_5_1_classnames_default()(`${prefixCls}-link`, className),
|
|
|
href: href
|
|
|
}), children);
|
|
|
}
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("span", Object.assign({}, passedProps, {
|
|
|
className: _classnames_2_5_1_classnames_default()(`${prefixCls}-link`, className)
|
|
|
}), children);
|
|
|
}
|
|
|
function useItemRender(prefixCls, itemRender) {
|
|
|
const mergedItemRender = (item, params, routes, path, href) => {
|
|
|
if (itemRender) {
|
|
|
return itemRender(item, params, routes, path);
|
|
|
}
|
|
|
const name = getBreadcrumbName(item, params);
|
|
|
return renderItem(prefixCls, item, name, href);
|
|
|
};
|
|
|
return mergedItemRender;
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/BreadcrumbItem.js
|
|
|
"use client";
|
|
|
|
|
|
var BreadcrumbItem_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 InternalBreadcrumbItem = props => {
|
|
|
const {
|
|
|
prefixCls,
|
|
|
separator = '/',
|
|
|
children,
|
|
|
menu,
|
|
|
overlay,
|
|
|
dropdownProps,
|
|
|
href
|
|
|
} = props;
|
|
|
// Warning for deprecated usage
|
|
|
if (false) {}
|
|
|
/** If overlay is have Wrap a Dropdown */
|
|
|
const renderBreadcrumbNode = breadcrumbItem => {
|
|
|
if (menu || overlay) {
|
|
|
const mergeDropDownProps = Object.assign({}, dropdownProps);
|
|
|
if (menu) {
|
|
|
const _a = menu || {},
|
|
|
{
|
|
|
items
|
|
|
} = _a,
|
|
|
menuProps = BreadcrumbItem_rest(_a, ["items"]);
|
|
|
mergeDropDownProps.menu = Object.assign(Object.assign({}, menuProps), {
|
|
|
items: items === null || items === void 0 ? void 0 : items.map((_a, index) => {
|
|
|
var {
|
|
|
key,
|
|
|
title,
|
|
|
label,
|
|
|
path
|
|
|
} = _a,
|
|
|
itemProps = BreadcrumbItem_rest(_a, ["key", "title", "label", "path"]);
|
|
|
let mergedLabel = label !== null && label !== void 0 ? label : title;
|
|
|
if (path) {
|
|
|
mergedLabel = /*#__PURE__*/_react_17_0_2_react.createElement("a", {
|
|
|
href: `${href}${path}`
|
|
|
}, mergedLabel);
|
|
|
}
|
|
|
return Object.assign(Object.assign({}, itemProps), {
|
|
|
key: key !== null && key !== void 0 ? key : index,
|
|
|
label: mergedLabel
|
|
|
});
|
|
|
})
|
|
|
});
|
|
|
} else if (overlay) {
|
|
|
mergeDropDownProps.overlay = overlay;
|
|
|
}
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(dropdown/* default */.Z, Object.assign({
|
|
|
placement: "bottom"
|
|
|
}, mergeDropDownProps), /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
|
className: `${prefixCls}-overlay-link`
|
|
|
}, breadcrumbItem, /*#__PURE__*/_react_17_0_2_react.createElement(DownOutlined/* default */.Z, null)));
|
|
|
}
|
|
|
return breadcrumbItem;
|
|
|
};
|
|
|
// wrap to dropDown
|
|
|
const link = renderBreadcrumbNode(children);
|
|
|
if (link !== undefined && link !== null) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /*#__PURE__*/_react_17_0_2_react.createElement("li", null, link), separator && /*#__PURE__*/_react_17_0_2_react.createElement(breadcrumb_BreadcrumbSeparator, null, separator));
|
|
|
}
|
|
|
return null;
|
|
|
};
|
|
|
const BreadcrumbItem = props => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
children,
|
|
|
href
|
|
|
} = props,
|
|
|
restProps = BreadcrumbItem_rest(props, ["prefixCls", "children", "href"]);
|
|
|
const {
|
|
|
getPrefixCls
|
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
|
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(InternalBreadcrumbItem, Object.assign({}, restProps, {
|
|
|
prefixCls: prefixCls
|
|
|
}), renderItem(prefixCls, restProps, children, href));
|
|
|
};
|
|
|
BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
|
|
|
/* harmony default export */ var breadcrumb_BreadcrumbItem = (BreadcrumbItem);
|
|
|
// 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/breadcrumb/style/index.js
|
|
|
|
|
|
|
|
|
const genBreadcrumbStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
iconCls
|
|
|
} = token;
|
|
|
return {
|
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
|
color: token.itemColor,
|
|
|
fontSize: token.fontSize,
|
|
|
[iconCls]: {
|
|
|
fontSize: token.iconFontSize
|
|
|
},
|
|
|
ol: {
|
|
|
display: 'flex',
|
|
|
flexWrap: 'wrap',
|
|
|
margin: 0,
|
|
|
padding: 0,
|
|
|
listStyle: 'none'
|
|
|
},
|
|
|
a: Object.assign({
|
|
|
color: token.linkColor,
|
|
|
transition: `color ${token.motionDurationMid}`,
|
|
|
padding: `0 ${token.paddingXXS}px`,
|
|
|
borderRadius: token.borderRadiusSM,
|
|
|
height: token.lineHeight * token.fontSize,
|
|
|
display: 'inline-block',
|
|
|
marginInline: -token.marginXXS,
|
|
|
'&:hover': {
|
|
|
color: token.linkHoverColor,
|
|
|
backgroundColor: token.colorBgTextHover
|
|
|
}
|
|
|
}, (0,style/* genFocusStyle */.Qy)(token)),
|
|
|
[`li:last-child`]: {
|
|
|
color: token.lastItemColor
|
|
|
},
|
|
|
[`${componentCls}-separator`]: {
|
|
|
marginInline: token.separatorMargin,
|
|
|
color: token.separatorColor
|
|
|
},
|
|
|
[`${componentCls}-link`]: {
|
|
|
[`
|
|
|
> ${iconCls} + span,
|
|
|
> ${iconCls} + a
|
|
|
`]: {
|
|
|
marginInlineStart: token.marginXXS
|
|
|
}
|
|
|
},
|
|
|
[`${componentCls}-overlay-link`]: {
|
|
|
borderRadius: token.borderRadiusSM,
|
|
|
height: token.lineHeight * token.fontSize,
|
|
|
display: 'inline-block',
|
|
|
padding: `0 ${token.paddingXXS}px`,
|
|
|
marginInline: -token.marginXXS,
|
|
|
[`> ${iconCls}`]: {
|
|
|
marginInlineStart: token.marginXXS,
|
|
|
fontSize: token.fontSizeIcon
|
|
|
},
|
|
|
'&:hover': {
|
|
|
color: token.linkHoverColor,
|
|
|
backgroundColor: token.colorBgTextHover,
|
|
|
a: {
|
|
|
color: token.linkHoverColor
|
|
|
}
|
|
|
},
|
|
|
a: {
|
|
|
'&:hover': {
|
|
|
backgroundColor: 'transparent'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
// rtl style
|
|
|
[`&${token.componentCls}-rtl`]: {
|
|
|
direction: 'rtl'
|
|
|
}
|
|
|
})
|
|
|
};
|
|
|
};
|
|
|
// ============================== Export ==============================
|
|
|
/* harmony default export */ var breadcrumb_style = ((0,genComponentStyleHook/* default */.Z)('Breadcrumb', token => {
|
|
|
const BreadcrumbToken = (0,statistic/* merge */.TS)(token, {});
|
|
|
return [genBreadcrumbStyle(BreadcrumbToken)];
|
|
|
}, token => ({
|
|
|
itemColor: token.colorTextDescription,
|
|
|
lastItemColor: token.colorText,
|
|
|
iconFontSize: token.fontSize,
|
|
|
linkColor: token.colorTextDescription,
|
|
|
linkHoverColor: token.colorText,
|
|
|
separatorColor: token.colorTextDescription,
|
|
|
separatorMargin: token.marginXS
|
|
|
})));
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/useItems.js
|
|
|
var useItems_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;
|
|
|
};
|
|
|
|
|
|
function route2item(route) {
|
|
|
const {
|
|
|
breadcrumbName,
|
|
|
children
|
|
|
} = route,
|
|
|
rest = useItems_rest(route, ["breadcrumbName", "children"]);
|
|
|
const clone = Object.assign({
|
|
|
title: breadcrumbName
|
|
|
}, rest);
|
|
|
if (children) {
|
|
|
clone.menu = {
|
|
|
items: children.map(_a => {
|
|
|
var {
|
|
|
breadcrumbName: itemBreadcrumbName
|
|
|
} = _a,
|
|
|
itemProps = useItems_rest(_a, ["breadcrumbName"]);
|
|
|
return Object.assign(Object.assign({}, itemProps), {
|
|
|
title: itemBreadcrumbName
|
|
|
});
|
|
|
})
|
|
|
};
|
|
|
}
|
|
|
return clone;
|
|
|
}
|
|
|
function useItems(items, routes) {
|
|
|
return (0,_react_17_0_2_react.useMemo)(() => {
|
|
|
if (items) {
|
|
|
return items;
|
|
|
}
|
|
|
if (routes) {
|
|
|
return routes.map(route2item);
|
|
|
}
|
|
|
return null;
|
|
|
}, [items, routes]);
|
|
|
}
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/Breadcrumb.js
|
|
|
"use client";
|
|
|
|
|
|
var Breadcrumb_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 getPath = (params, path) => {
|
|
|
if (path === undefined) {
|
|
|
return path;
|
|
|
}
|
|
|
let mergedPath = (path || '').replace(/^\//, '');
|
|
|
Object.keys(params).forEach(key => {
|
|
|
mergedPath = mergedPath.replace(`:${key}`, params[key]);
|
|
|
});
|
|
|
return mergedPath;
|
|
|
};
|
|
|
const Breadcrumb = props => {
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
separator = '/',
|
|
|
style,
|
|
|
className,
|
|
|
rootClassName,
|
|
|
routes: legacyRoutes,
|
|
|
items,
|
|
|
children,
|
|
|
itemRender,
|
|
|
params = {}
|
|
|
} = props,
|
|
|
restProps = Breadcrumb_rest(props, ["prefixCls", "separator", "style", "className", "rootClassName", "routes", "items", "children", "itemRender", "params"]);
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction,
|
|
|
breadcrumb
|
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
|
let crumbs;
|
|
|
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
|
const [wrapSSR, hashId] = breadcrumb_style(prefixCls);
|
|
|
const mergedItems = useItems(items, legacyRoutes);
|
|
|
if (false) {}
|
|
|
const mergedItemRender = useItemRender(prefixCls, itemRender);
|
|
|
if (mergedItems && mergedItems.length > 0) {
|
|
|
// generated by route
|
|
|
const paths = [];
|
|
|
const itemRenderRoutes = items || legacyRoutes;
|
|
|
crumbs = mergedItems.map((item, index) => {
|
|
|
const {
|
|
|
path,
|
|
|
key,
|
|
|
type,
|
|
|
menu,
|
|
|
overlay,
|
|
|
onClick,
|
|
|
className: itemClassName,
|
|
|
separator: itemSeparator,
|
|
|
dropdownProps
|
|
|
} = item;
|
|
|
const mergedPath = getPath(params, path);
|
|
|
if (mergedPath !== undefined) {
|
|
|
paths.push(mergedPath);
|
|
|
}
|
|
|
const mergedKey = key !== null && key !== void 0 ? key : index;
|
|
|
if (type === 'separator') {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(breadcrumb_BreadcrumbSeparator, {
|
|
|
key: mergedKey
|
|
|
}, itemSeparator);
|
|
|
}
|
|
|
const itemProps = {};
|
|
|
const isLastItem = index === mergedItems.length - 1;
|
|
|
if (menu) {
|
|
|
itemProps.menu = menu;
|
|
|
} else if (overlay) {
|
|
|
itemProps.overlay = overlay;
|
|
|
}
|
|
|
let {
|
|
|
href
|
|
|
} = item;
|
|
|
if (paths.length && mergedPath !== undefined) {
|
|
|
href = `#/${paths.join('/')}`;
|
|
|
}
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(InternalBreadcrumbItem, Object.assign({
|
|
|
key: mergedKey
|
|
|
}, itemProps, (0,pickAttrs/* default */.Z)(item, {
|
|
|
data: true,
|
|
|
aria: true
|
|
|
}), {
|
|
|
className: itemClassName,
|
|
|
dropdownProps: dropdownProps,
|
|
|
href: href,
|
|
|
separator: isLastItem ? '' : separator,
|
|
|
onClick: onClick,
|
|
|
prefixCls: prefixCls
|
|
|
}), mergedItemRender(item, params, itemRenderRoutes, paths, href));
|
|
|
});
|
|
|
} else if (children) {
|
|
|
const childrenLength = (0,toArray/* default */.Z)(children).length;
|
|
|
crumbs = (0,toArray/* default */.Z)(children).map((element, index) => {
|
|
|
if (!element) {
|
|
|
return element;
|
|
|
}
|
|
|
// =================== Warning =====================
|
|
|
if (false) {}
|
|
|
false ? 0 : void 0;
|
|
|
const isLastItem = index === childrenLength - 1;
|
|
|
return (0,reactNode/* cloneElement */.Tm)(element, {
|
|
|
separator: isLastItem ? '' : separator,
|
|
|
key: index
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
const breadcrumbClassName = _classnames_2_5_1_classnames_default()(prefixCls, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.className, {
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
|
}, className, rootClassName, hashId);
|
|
|
const mergedStyle = Object.assign(Object.assign({}, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.style), style);
|
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("nav", Object.assign({
|
|
|
className: breadcrumbClassName,
|
|
|
style: mergedStyle
|
|
|
}, restProps), /*#__PURE__*/_react_17_0_2_react.createElement("ol", null, crumbs)));
|
|
|
};
|
|
|
Breadcrumb.Item = breadcrumb_BreadcrumbItem;
|
|
|
Breadcrumb.Separator = breadcrumb_BreadcrumbSeparator;
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var breadcrumb_Breadcrumb = (Breadcrumb);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
/* harmony default export */ var breadcrumb = (breadcrumb_Breadcrumb);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 28103:
|
|
|
/*!***********************************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules ***!
|
|
|
\***********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ divider; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
|
var context = __webpack_require__(36355);
|
|
|
// 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/divider/style/index.js
|
|
|
|
|
|
|
|
|
// ============================== Shared ==============================
|
|
|
const genSharedDividerStyle = token => {
|
|
|
const {
|
|
|
componentCls,
|
|
|
sizePaddingEdgeHorizontal,
|
|
|
colorSplit,
|
|
|
lineWidth,
|
|
|
textPaddingInline,
|
|
|
orientationMargin,
|
|
|
verticalMarginInline
|
|
|
} = token;
|
|
|
return {
|
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
|
borderBlockStart: `${lineWidth}px solid ${colorSplit}`,
|
|
|
// vertical
|
|
|
'&-vertical': {
|
|
|
position: 'relative',
|
|
|
top: '-0.06em',
|
|
|
display: 'inline-block',
|
|
|
height: '0.9em',
|
|
|
marginInline: verticalMarginInline,
|
|
|
marginBlock: 0,
|
|
|
verticalAlign: 'middle',
|
|
|
borderTop: 0,
|
|
|
borderInlineStart: `${lineWidth}px solid ${colorSplit}`
|
|
|
},
|
|
|
'&-horizontal': {
|
|
|
display: 'flex',
|
|
|
clear: 'both',
|
|
|
width: '100%',
|
|
|
minWidth: '100%',
|
|
|
margin: `${token.dividerHorizontalGutterMargin}px 0`
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text`]: {
|
|
|
display: 'flex',
|
|
|
alignItems: 'center',
|
|
|
margin: `${token.dividerHorizontalWithTextGutterMargin}px 0`,
|
|
|
color: token.colorTextHeading,
|
|
|
fontWeight: 500,
|
|
|
fontSize: token.fontSizeLG,
|
|
|
whiteSpace: 'nowrap',
|
|
|
textAlign: 'center',
|
|
|
borderBlockStart: `0 ${colorSplit}`,
|
|
|
'&::before, &::after': {
|
|
|
position: 'relative',
|
|
|
width: '50%',
|
|
|
borderBlockStart: `${lineWidth}px solid transparent`,
|
|
|
// Chrome not accept `inherit` in `border-top`
|
|
|
borderBlockStartColor: 'inherit',
|
|
|
borderBlockEnd: 0,
|
|
|
transform: 'translateY(50%)',
|
|
|
content: "''"
|
|
|
}
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text-left`]: {
|
|
|
'&::before': {
|
|
|
width: `${orientationMargin * 100}%`
|
|
|
},
|
|
|
'&::after': {
|
|
|
width: `${100 - orientationMargin * 100}%`
|
|
|
}
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text-right`]: {
|
|
|
'&::before': {
|
|
|
width: `${100 - orientationMargin * 100}%`
|
|
|
},
|
|
|
'&::after': {
|
|
|
width: `${orientationMargin * 100}%`
|
|
|
}
|
|
|
},
|
|
|
[`${componentCls}-inner-text`]: {
|
|
|
display: 'inline-block',
|
|
|
paddingBlock: 0,
|
|
|
paddingInline: textPaddingInline
|
|
|
},
|
|
|
'&-dashed': {
|
|
|
background: 'none',
|
|
|
borderColor: colorSplit,
|
|
|
borderStyle: 'dashed',
|
|
|
borderWidth: `${lineWidth}px 0 0`
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text${componentCls}-dashed`]: {
|
|
|
'&::before, &::after': {
|
|
|
borderStyle: 'dashed none none'
|
|
|
}
|
|
|
},
|
|
|
[`&-vertical${componentCls}-dashed`]: {
|
|
|
borderInlineStartWidth: lineWidth,
|
|
|
borderInlineEnd: 0,
|
|
|
borderBlockStart: 0,
|
|
|
borderBlockEnd: 0
|
|
|
},
|
|
|
[`&-plain${componentCls}-with-text`]: {
|
|
|
color: token.colorText,
|
|
|
fontWeight: 'normal',
|
|
|
fontSize: token.fontSize
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text-left${componentCls}-no-default-orientation-margin-left`]: {
|
|
|
'&::before': {
|
|
|
width: 0
|
|
|
},
|
|
|
'&::after': {
|
|
|
width: '100%'
|
|
|
},
|
|
|
[`${componentCls}-inner-text`]: {
|
|
|
paddingInlineStart: sizePaddingEdgeHorizontal
|
|
|
}
|
|
|
},
|
|
|
[`&-horizontal${componentCls}-with-text-right${componentCls}-no-default-orientation-margin-right`]: {
|
|
|
'&::before': {
|
|
|
width: '100%'
|
|
|
},
|
|
|
'&::after': {
|
|
|
width: 0
|
|
|
},
|
|
|
[`${componentCls}-inner-text`]: {
|
|
|
paddingInlineEnd: sizePaddingEdgeHorizontal
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
};
|
|
|
};
|
|
|
// ============================== Export ==============================
|
|
|
/* harmony default export */ var divider_style = ((0,genComponentStyleHook/* default */.Z)('Divider', token => {
|
|
|
const dividerToken = (0,statistic/* merge */.TS)(token, {
|
|
|
dividerHorizontalWithTextGutterMargin: token.margin,
|
|
|
dividerHorizontalGutterMargin: token.marginLG,
|
|
|
sizePaddingEdgeHorizontal: 0
|
|
|
});
|
|
|
return [genSharedDividerStyle(dividerToken)];
|
|
|
}, token => ({
|
|
|
textPaddingInline: '1em',
|
|
|
orientationMargin: 0.05,
|
|
|
verticalMarginInline: token.marginXS
|
|
|
})));
|
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/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 Divider = props => {
|
|
|
const {
|
|
|
getPrefixCls,
|
|
|
direction,
|
|
|
divider
|
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
|
const {
|
|
|
prefixCls: customizePrefixCls,
|
|
|
type = 'horizontal',
|
|
|
orientation = 'center',
|
|
|
orientationMargin,
|
|
|
className,
|
|
|
rootClassName,
|
|
|
children,
|
|
|
dashed,
|
|
|
plain,
|
|
|
style
|
|
|
} = props,
|
|
|
restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "plain", "style"]);
|
|
|
const prefixCls = getPrefixCls('divider', customizePrefixCls);
|
|
|
const [wrapSSR, hashId] = divider_style(prefixCls);
|
|
|
const orientationPrefix = orientation.length > 0 ? `-${orientation}` : orientation;
|
|
|
const hasChildren = !!children;
|
|
|
const hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;
|
|
|
const hasCustomMarginRight = orientation === 'right' && orientationMargin != null;
|
|
|
const classString = _classnames_2_5_1_classnames_default()(prefixCls, divider === null || divider === void 0 ? void 0 : divider.className, hashId, `${prefixCls}-${type}`, {
|
|
|
[`${prefixCls}-with-text`]: hasChildren,
|
|
|
[`${prefixCls}-with-text${orientationPrefix}`]: hasChildren,
|
|
|
[`${prefixCls}-dashed`]: !!dashed,
|
|
|
[`${prefixCls}-plain`]: !!plain,
|
|
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
|
[`${prefixCls}-no-default-orientation-margin-left`]: hasCustomMarginLeft,
|
|
|
[`${prefixCls}-no-default-orientation-margin-right`]: hasCustomMarginRight
|
|
|
}, className, rootClassName);
|
|
|
const memoizedOrientationMargin = _react_17_0_2_react.useMemo(() => {
|
|
|
if (typeof orientationMargin === 'number') {
|
|
|
return orientationMargin;
|
|
|
}
|
|
|
if (/^\d+$/.test(orientationMargin)) {
|
|
|
return Number(orientationMargin);
|
|
|
}
|
|
|
return orientationMargin;
|
|
|
}, [orientationMargin]);
|
|
|
const innerStyle = Object.assign(Object.assign({}, hasCustomMarginLeft && {
|
|
|
marginLeft: memoizedOrientationMargin
|
|
|
}), hasCustomMarginRight && {
|
|
|
marginRight: memoizedOrientationMargin
|
|
|
});
|
|
|
// Warning children not work in vertical mode
|
|
|
if (false) {}
|
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({
|
|
|
className: classString,
|
|
|
style: Object.assign(Object.assign({}, divider === null || divider === void 0 ? void 0 : divider.style), style)
|
|
|
}, restProps, {
|
|
|
role: "separator"
|
|
|
}), children && type !== 'vertical' && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
|
className: `${prefixCls}-inner-text`,
|
|
|
style: innerStyle
|
|
|
}, children)));
|
|
|
};
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var divider = (Divider);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 60028:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/upload/index.js ***!
|
|
|
\**********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _Dragger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Dragger */ 71409);
|
|
|
/* harmony import */ var _Upload__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Upload */ 37714);
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
const Upload = _Upload__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z;
|
|
|
Upload.Dragger = _Dragger__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z;
|
|
|
Upload.LIST_IGNORE = _Upload__WEBPACK_IMPORTED_MODULE_0__/* .LIST_IGNORE */ .E;
|
|
|
/* harmony default export */ __webpack_exports__.Z = (Upload);
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |