|
|
|
|
@ -9898,12 +9898,10 @@ var Repository = function Repository(_ref) {
|
|
|
|
|
draggable: true,
|
|
|
|
|
onDragEnter: onDragEnter,
|
|
|
|
|
onDrop: onDrop,
|
|
|
|
|
className: Treemodules.gitTree,
|
|
|
|
|
allowDrop: function allowDrop(_ref12) {
|
|
|
|
|
var dropNode = _ref12.dropNode,
|
|
|
|
|
dropPosition = _ref12.dropPosition;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
className: Treemodules.gitTree
|
|
|
|
|
// allowDrop={({ dropNode, dropPosition }: any) => {
|
|
|
|
|
// return false
|
|
|
|
|
// }}
|
|
|
|
|
// onCheck={handleCheckTree}
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
@ -9917,7 +9915,7 @@ var Repository = function Repository(_ref) {
|
|
|
|
|
},
|
|
|
|
|
isRepository: !isRepository,
|
|
|
|
|
onOK: /*#__PURE__*/function () {
|
|
|
|
|
var _ref13 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12(data) {
|
|
|
|
|
var _ref12 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12(data) {
|
|
|
|
|
var pathArr;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee12$(_context12) {
|
|
|
|
|
while (1) switch (_context12.prev = _context12.next) {
|
|
|
|
|
@ -9936,7 +9934,7 @@ var Repository = function Repository(_ref) {
|
|
|
|
|
}, _callee12);
|
|
|
|
|
}));
|
|
|
|
|
return function (_x13) {
|
|
|
|
|
return _ref13.apply(this, arguments);
|
|
|
|
|
return _ref12.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}()
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_AddFile, {
|
|
|
|
|
@ -9967,7 +9965,7 @@ var Repository = function Repository(_ref) {
|
|
|
|
|
return setShowUploadFile(false);
|
|
|
|
|
},
|
|
|
|
|
onOK: /*#__PURE__*/function () {
|
|
|
|
|
var _ref14 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13(data) {
|
|
|
|
|
var _ref13 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13(data) {
|
|
|
|
|
var pathArr;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee13$(_context13) {
|
|
|
|
|
while (1) switch (_context13.prev = _context13.next) {
|
|
|
|
|
@ -9987,7 +9985,7 @@ var Repository = function Repository(_ref) {
|
|
|
|
|
}, _callee13);
|
|
|
|
|
}));
|
|
|
|
|
return function (_x14) {
|
|
|
|
|
return _ref14.apply(this, arguments);
|
|
|
|
|
return _ref13.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}()
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_SelectFilePathModal, {
|
|
|
|
|
@ -10017,12 +10015,12 @@ var NoData = function NoData() {
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var Tree = ((0,_umi_production_exports.connect)(function (_ref15) {
|
|
|
|
|
var shixunsDetail = _ref15.shixunsDetail,
|
|
|
|
|
loading = _ref15.loading,
|
|
|
|
|
globalSetting = _ref15.globalSetting,
|
|
|
|
|
practiceSetting = _ref15.practiceSetting,
|
|
|
|
|
user = _ref15.user;
|
|
|
|
|
/* harmony default export */ var Tree = ((0,_umi_production_exports.connect)(function (_ref14) {
|
|
|
|
|
var shixunsDetail = _ref14.shixunsDetail,
|
|
|
|
|
loading = _ref14.loading,
|
|
|
|
|
globalSetting = _ref14.globalSetting,
|
|
|
|
|
practiceSetting = _ref14.practiceSetting,
|
|
|
|
|
user = _ref14.user;
|
|
|
|
|
return {
|
|
|
|
|
shixunsDetail: shixunsDetail,
|
|
|
|
|
globalSetting: globalSetting,
|
|
|
|
|
@ -13317,13 +13315,17 @@ var MirrorModal = function MirrorModal(_ref) {
|
|
|
|
|
})(MirrorModal));
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Environment/SettingDrawer/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var SettingDrawermodules = ({"flex_box_center":"flex_box_center___jnFK3","flex_space_between":"flex_space_between___JoMuQ","flex_box_vertical_center":"flex_box_vertical_center___XkWzp","flex_box_center_end":"flex_box_center_end___kfVJX","flex_box_column":"flex_box_column___mfxox","content":"content___ujW8g","explain":"explain___vGa5a","tabs":"tabs___MbGuX","active":"active___SCmkJ","btns":"btns___MiEQa","popover":"popover___wqXWh"});
|
|
|
|
|
/* harmony default export */ var SettingDrawermodules = ({"flex_box_center":"flex_box_center___jnFK3","flex_space_between":"flex_space_between___JoMuQ","flex_box_vertical_center":"flex_box_vertical_center___XkWzp","flex_box_center_end":"flex_box_center_end___kfVJX","flex_box_column":"flex_box_column___mfxox","content":"content___ujW8g","explain":"explain___vGa5a","tabs":"tabs___MbGuX","active":"active___SCmkJ","btns":"btns___MiEQa","must":"must___n8wNT","popover":"popover___wqXWh","zybzForm":"zybzForm___m1nC0","graaytitle":"graaytitle___vdUDn","dataPicker":"dataPicker___RiEgz"});
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/drawer/index.js + 16 modules
|
|
|
|
|
var drawer = __webpack_require__(35479);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/alert/index.js + 3 modules
|
|
|
|
|
var es_alert = __webpack_require__(38925);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/popover/index.js
|
|
|
|
|
var popover = __webpack_require__(55241);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/date-picker/index.js + 79 modules
|
|
|
|
|
var date_picker = __webpack_require__(71628);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input-number/index.js + 21 modules
|
|
|
|
|
var input_number = __webpack_require__(31795);
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
|
|
|
|
|
var monaco_editor = __webpack_require__(8691);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Environment/UseCustomScriptModal/index.less?modules
|
|
|
|
|
@ -13452,6 +13454,9 @@ var UseCustomScriptModal = function UseCustomScriptModal(_ref) {
|
|
|
|
|
})(UseCustomScriptModal));
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
|
|
|
var authority = __webpack_require__(7);
|
|
|
|
|
// 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);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Environment/SettingDrawer/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -13467,8 +13472,10 @@ var authority = __webpack_require__(7);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var timeFormat = 'YYYY-MM-DD HH:mm';
|
|
|
|
|
var SettingDrawer = function SettingDrawer(_ref) {
|
|
|
|
|
var _environment$filter;
|
|
|
|
|
var _environment$filter, _schoolList$filter;
|
|
|
|
|
var visible = _ref.visible,
|
|
|
|
|
onOk = _ref.onOk,
|
|
|
|
|
onCancel = _ref.onCancel,
|
|
|
|
|
@ -13519,7 +13526,13 @@ var SettingDrawer = function SettingDrawer(_ref) {
|
|
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
|
|
isImportantShixun = _useState20[0],
|
|
|
|
|
setIsImportantShixun = _useState20[1]; //实验资源优先保障
|
|
|
|
|
|
|
|
|
|
var _Form$useForm = es_form/* default.useForm */.Z.useForm(),
|
|
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
|
|
form = _Form$useForm2[0];
|
|
|
|
|
var _useState21 = (0,react.useState)([]),
|
|
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
|
|
schoolList = _useState22[0],
|
|
|
|
|
setSchoolList = _useState22[1];
|
|
|
|
|
var tabs = [{
|
|
|
|
|
id: 1,
|
|
|
|
|
name: '评测脚本设置'
|
|
|
|
|
@ -13530,6 +13543,7 @@ var SettingDrawer = function SettingDrawer(_ref) {
|
|
|
|
|
(0,react.useEffect)(function () {
|
|
|
|
|
if (id && visible) {
|
|
|
|
|
getData();
|
|
|
|
|
getSchoolOption();
|
|
|
|
|
}
|
|
|
|
|
}, [id, visible]);
|
|
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
|
|
@ -13539,7 +13553,10 @@ var SettingDrawer = function SettingDrawer(_ref) {
|
|
|
|
|
_data$shixun,
|
|
|
|
|
_data$shixun2,
|
|
|
|
|
_data$shixun3,
|
|
|
|
|
_data$shixun4,
|
|
|
|
|
data,
|
|
|
|
|
_data$shixun5,
|
|
|
|
|
infoVal,
|
|
|
|
|
_data,
|
|
|
|
|
_args = arguments;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
@ -13560,6 +13577,7 @@ var SettingDrawer = function SettingDrawer(_ref) {
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
if (res.status === 0 && !shixun_environment_id) {
|
|
|
|
|
data = res.data;
|
|
|
|
|
console.log("data", data);
|
|
|
|
|
setEnvironmentActive((data === null || data === void 0 ? void 0 : data.shixun_environment_id) || null);
|
|
|
|
|
setEvaluateScript((data === null || data === void 0 ? void 0 : data.evaluate_script) || '');
|
|
|
|
|
setEvaluationScript((data === null || data === void 0 ? void 0 : data.choice_standard_scripts) || null);
|
|
|
|
|
@ -13567,6 +13585,15 @@ var SettingDrawer = function SettingDrawer(_ref) {
|
|
|
|
|
setCloseInternet(((_data$shixun = data.shixun) === null || _data$shixun === void 0 ? void 0 : _data$shixun.close_internet) || false);
|
|
|
|
|
setSurvivalTime((_data$shixun2 = data.shixun) === null || _data$shixun2 === void 0 ? void 0 : _data$shixun2.survival_time);
|
|
|
|
|
setIsImportantShixun(((_data$shixun3 = data.shixun) === null || _data$shixun3 === void 0 ? void 0 : _data$shixun3.is_important_shixun) || false);
|
|
|
|
|
if ((_data$shixun4 = data.shixun) !== null && _data$shixun4 !== void 0 && _data$shixun4.is_important_shixun) {
|
|
|
|
|
infoVal = (_data$shixun5 = data.shixun) === null || _data$shixun5 === void 0 ? void 0 : _data$shixun5.important_shixun_configs;
|
|
|
|
|
form.setFieldsValue({
|
|
|
|
|
identifier: infoVal === null || infoVal === void 0 ? void 0 : infoVal.identifier,
|
|
|
|
|
people_number: infoVal === null || infoVal === void 0 ? void 0 : infoVal.people_number,
|
|
|
|
|
school_id: infoVal === null || infoVal === void 0 ? void 0 : infoVal.school_id,
|
|
|
|
|
times: [dayjs_min_default()(infoVal === null || infoVal === void 0 ? void 0 : infoVal.start_time), dayjs_min_default()(infoVal === null || infoVal === void 0 ? void 0 : infoVal.end_time)]
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (res.status === 0 && shixun_environment_id) {
|
|
|
|
|
_data = res.data;
|
|
|
|
|
@ -13585,6 +13612,29 @@ var SettingDrawer = function SettingDrawer(_ref) {
|
|
|
|
|
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:
|
|
|
|
|
_context2.next = 2;
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: 'account/getSchoolOption'
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
setSchoolList(res === null || res === void 0 ? void 0 : res.schools);
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}));
|
|
|
|
|
return function getSchoolOption() {
|
|
|
|
|
return _ref3.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var handleUseCustomScript = function handleUseCustomScript() {
|
|
|
|
|
if (verifyModal()) return;
|
|
|
|
|
dispatch({
|
|
|
|
|
@ -13598,12 +13648,12 @@ var SettingDrawer = function SettingDrawer(_ref) {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var handleGetScriptContent = /*#__PURE__*/function () {
|
|
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(script_id) {
|
|
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(script_id) {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context2.next = 2;
|
|
|
|
|
_context3.next = 2;
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: 'shixunsDetail/getScriptContent',
|
|
|
|
|
payload: {
|
|
|
|
|
@ -13612,18 +13662,18 @@ var SettingDrawer = function SettingDrawer(_ref) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
res = _context3.sent;
|
|
|
|
|
if (res) {
|
|
|
|
|
setEvaluateScript(res.content);
|
|
|
|
|
}
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}, _callee3);
|
|
|
|
|
}));
|
|
|
|
|
return function handleGetScriptContent(_x) {
|
|
|
|
|
return _ref3.apply(this, arguments);
|
|
|
|
|
return _ref4.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var handleChangeEvaluationScript = function handleChangeEvaluationScript(evaluationScript) {
|
|
|
|
|
@ -13637,11 +13687,11 @@ var SettingDrawer = function SettingDrawer(_ref) {
|
|
|
|
|
children: ["\u539F\u6709\u811A\u672C\u5C06\u88AB\u65B0\u7684\u811A\u672C\u8986\u76D6\uFF0C\u65E0\u6CD5\u64A4\u9500", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u662F\u5426\u786E\u8BA4\u6267\u884C\u8986\u76D6\u64CD\u4F5C"]
|
|
|
|
|
}),
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context3.next = 2;
|
|
|
|
|
_context4.next = 2;
|
|
|
|
|
return handleGetScriptContent(evaluationScript);
|
|
|
|
|
case 2:
|
|
|
|
|
setEvaluationScript(evaluationScript);
|
|
|
|
|
@ -13656,9 +13706,9 @@ var SettingDrawer = function SettingDrawer(_ref) {
|
|
|
|
|
});
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
return _context4.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee3);
|
|
|
|
|
}, _callee4);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk.apply(this, arguments);
|
|
|
|
|
@ -13668,24 +13718,24 @@ var SettingDrawer = function SettingDrawer(_ref) {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var handleOk = /*#__PURE__*/function () {
|
|
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
|
|
var res, formInfo, query;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!(active === 1 && !environmentActive)) {
|
|
|
|
|
_context4.next = 3;
|
|
|
|
|
_context5.next = 3;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default.warning */.ZP.warning('请选择运行环境');
|
|
|
|
|
return _context4.abrupt("return");
|
|
|
|
|
return _context5.abrupt("return");
|
|
|
|
|
case 3:
|
|
|
|
|
setBtnLoading(true);
|
|
|
|
|
if (!(active === 1)) {
|
|
|
|
|
_context4.next = 8;
|
|
|
|
|
_context5.next = 8;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context4.next = 7;
|
|
|
|
|
setBtnLoading(true);
|
|
|
|
|
_context5.next = 7;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/shixuns/".concat(params.id, "/update_evaluate_script_setting.json"), {
|
|
|
|
|
method: 'put',
|
|
|
|
|
body: {
|
|
|
|
|
@ -13695,39 +13745,71 @@ var SettingDrawer = function SettingDrawer(_ref) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 7:
|
|
|
|
|
res = _context4.sent;
|
|
|
|
|
res = _context5.sent;
|
|
|
|
|
case 8:
|
|
|
|
|
if (!(active === 2)) {
|
|
|
|
|
_context4.next = 12;
|
|
|
|
|
_context5.next = 18;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context4.next = 11;
|
|
|
|
|
formInfo = form.getFieldsValue();
|
|
|
|
|
_context5.next = 12;
|
|
|
|
|
return form.validateFields();
|
|
|
|
|
case 12:
|
|
|
|
|
setBtnLoading(true);
|
|
|
|
|
query = {
|
|
|
|
|
close_internet: closeInternet,
|
|
|
|
|
survival_time: survivalTime,
|
|
|
|
|
is_important_shixun: isImportantShixun
|
|
|
|
|
};
|
|
|
|
|
if (isImportantShixun) {
|
|
|
|
|
query.important_shixun_configs = {
|
|
|
|
|
identifier: formInfo === null || formInfo === void 0 ? void 0 : formInfo.identifier,
|
|
|
|
|
people_number: formInfo === null || formInfo === void 0 ? void 0 : formInfo.people_number,
|
|
|
|
|
school_id: formInfo === null || formInfo === void 0 ? void 0 : formInfo.school_id,
|
|
|
|
|
start_time: dayjs_min_default()(formInfo === null || formInfo === void 0 ? void 0 : formInfo.times[0]).format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
end_time: dayjs_min_default()(formInfo === null || formInfo === void 0 ? void 0 : formInfo.times[1]).format("YYYY-MM-DD HH:mm")
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
_context5.next = 17;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/shixuns/".concat(params.id, "/update_environment_setting.json"), {
|
|
|
|
|
method: 'put',
|
|
|
|
|
body: {
|
|
|
|
|
close_internet: closeInternet,
|
|
|
|
|
survival_time: survivalTime,
|
|
|
|
|
is_important_shixun: isImportantShixun
|
|
|
|
|
}
|
|
|
|
|
body: query
|
|
|
|
|
});
|
|
|
|
|
case 11:
|
|
|
|
|
res = _context4.sent;
|
|
|
|
|
case 12:
|
|
|
|
|
case 17:
|
|
|
|
|
res = _context5.sent;
|
|
|
|
|
case 18:
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default.success */.ZP.success('保存成功');
|
|
|
|
|
onOk();
|
|
|
|
|
}
|
|
|
|
|
setBtnLoading(false);
|
|
|
|
|
case 14:
|
|
|
|
|
case 20:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context4.stop();
|
|
|
|
|
return _context5.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee4);
|
|
|
|
|
}, _callee5);
|
|
|
|
|
}));
|
|
|
|
|
return function handleOk() {
|
|
|
|
|
return _ref4.apply(this, arguments);
|
|
|
|
|
return _ref5.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var validateBzbs = function validateBzbs(_, value) {
|
|
|
|
|
var pattern1 = /^[^0-9][a-zA-Z0-9]*$/;
|
|
|
|
|
var pattern2 = /^.{4,30}$/;
|
|
|
|
|
;
|
|
|
|
|
var pattern3 = /^[a-zA-Z0-9]+$/;
|
|
|
|
|
if (value && !pattern3.test(value)) {
|
|
|
|
|
return Promise.reject('输入内容只能包含数字和字母');
|
|
|
|
|
} else if (value && !pattern1.test(value)) {
|
|
|
|
|
return Promise.reject('不能以数字开头');
|
|
|
|
|
} else if (value && !pattern2.test(value)) {
|
|
|
|
|
return Promise.reject('输入内容长度必须在4到30个字符之间');
|
|
|
|
|
}
|
|
|
|
|
return Promise.resolve();
|
|
|
|
|
};
|
|
|
|
|
var integerParser = function integerParser(value) {
|
|
|
|
|
return parseInt(value || '0', 10);
|
|
|
|
|
};
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(drawer/* default */.Z, {
|
|
|
|
|
title: null,
|
|
|
|
|
@ -13948,6 +14030,155 @@ var SettingDrawer = function SettingDrawer(_ref) {
|
|
|
|
|
className: "c-grey-999 font14 c-red",
|
|
|
|
|
children: "\u5F00\u542F\u540E\uFF0C\u5FC5\u987B\u901A\u77E5\u5E73\u53F0\u8FD0\u7EF4\u4EBA\u5458\u8FDB\u884C\u652F\u6301\u3002"
|
|
|
|
|
}), "\uFF09"]
|
|
|
|
|
}),
|
|
|
|
|
// 资源保障开启填写表单
|
|
|
|
|
isImportantShixun && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
|
|
form: form,
|
|
|
|
|
layout: "horizontal",
|
|
|
|
|
className: SettingDrawermodules.zybzForm,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
className: "mt30",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
className: "c-grey-333 font16 mr10",
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 55
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: SettingDrawermodules.must,
|
|
|
|
|
children: "*"
|
|
|
|
|
}), "\u4FDD\u969C\u6807\u8BC6"]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
|
|
|
label: "",
|
|
|
|
|
name: "identifier",
|
|
|
|
|
rules: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入保障标识'
|
|
|
|
|
}, {
|
|
|
|
|
validator: validateBzbs
|
|
|
|
|
}],
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
|
|
bordered: false,
|
|
|
|
|
style: {
|
|
|
|
|
width: 300,
|
|
|
|
|
backgroundColor: '#f5f5f5',
|
|
|
|
|
height: 50,
|
|
|
|
|
borderRadius: 4
|
|
|
|
|
},
|
|
|
|
|
minLength: 4,
|
|
|
|
|
maxLength: 30,
|
|
|
|
|
showCount: true,
|
|
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u4FDD\u969C\u6807\u8BC6"
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
className: "ml10 c-grey-999 font14",
|
|
|
|
|
children: ["\u4FDD\u969C\u6807\u8BC6\u53EA\u80FD\u7531\u5B57\u6BCD\u548C\u6570\u5B57\u7EC4\u6210\uFF084~30 \u4F4D\uFF09\uFF0C\u4E0D\u80FD\u4EE5\u6570\u5B57\u5F00\u5934\u3002", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u586B\u5199\u4FDD\u969C\u6807\u8BC6\u662F\u4E3A\u4E86\u4FBF\u4E8E\u5E73\u53F0\u4E3A\u6B64\u5B9E\u8DF5\u9879\u76EE\u7279\u522B\u5206\u914D\u8282\u70B9\u3002"]
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
className: "mt30",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
className: "c-grey-333 font16 mr10",
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 7
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: SettingDrawermodules.must,
|
|
|
|
|
children: "*"
|
|
|
|
|
}), "\u9700\u8981\u4FDD\u969C\u7684\u5355\u4F4D"]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
|
|
|
label: "",
|
|
|
|
|
name: "school_id",
|
|
|
|
|
rules: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择需要保障的单位'
|
|
|
|
|
}],
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select/* default */.Z, {
|
|
|
|
|
bordered: false,
|
|
|
|
|
style: {
|
|
|
|
|
width: 300,
|
|
|
|
|
backgroundColor: '#f5f5f5',
|
|
|
|
|
height: 50,
|
|
|
|
|
borderRadius: 4,
|
|
|
|
|
paddingTop: 10
|
|
|
|
|
},
|
|
|
|
|
showArrow: true,
|
|
|
|
|
filterOption: function filterOption(input, option) {
|
|
|
|
|
return option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
|
|
|
},
|
|
|
|
|
showSearch: true,
|
|
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u9700\u8981\u4FDD\u969C\u7684\u5355\u4F4D",
|
|
|
|
|
children: (_schoolList$filter = schoolList.filter(function (e) {
|
|
|
|
|
return e.id !== 0;
|
|
|
|
|
})) === null || _schoolList$filter === void 0 ? void 0 : _schoolList$filter.map(function (item, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select/* default.Option */.Z.Option, {
|
|
|
|
|
title: item === null || item === void 0 ? void 0 : item.name,
|
|
|
|
|
value: item === null || item === void 0 ? void 0 : item.id,
|
|
|
|
|
children: item === null || item === void 0 ? void 0 : item.name
|
|
|
|
|
}, index + 1);
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
className: "mt30",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
className: "c-grey-333 font16 mr10",
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 55
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: SettingDrawermodules.must,
|
|
|
|
|
children: "*"
|
|
|
|
|
}), "\u4FDD\u969C\u65F6\u95F4"]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: SettingDrawermodules.graaytitle,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
|
|
|
label: "",
|
|
|
|
|
name: "times",
|
|
|
|
|
rules: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择开始时间和结束时间'
|
|
|
|
|
}],
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker/* default.RangePicker */.Z.RangePicker, {
|
|
|
|
|
className: "".concat(SettingDrawermodules.dataPicker),
|
|
|
|
|
format: timeFormat,
|
|
|
|
|
bordered: false,
|
|
|
|
|
showTime: {
|
|
|
|
|
minuteStep: 30
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
className: "mt30",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
className: "c-grey-333 font16 mr10",
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 55
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: SettingDrawermodules.must,
|
|
|
|
|
children: "*"
|
|
|
|
|
}), "\u4FDD\u969C\u4EBA\u6570"]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
|
|
|
label: "",
|
|
|
|
|
name: "people_number",
|
|
|
|
|
rules: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入保障人数'
|
|
|
|
|
}],
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
|
|
parser: integerParser,
|
|
|
|
|
style: {
|
|
|
|
|
width: 200
|
|
|
|
|
},
|
|
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u4FDD\u969C\u4EBA\u6570",
|
|
|
|
|
min: 1
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
@ -17229,9 +17460,6 @@ var Allocation = function Allocation(_ref) {
|
|
|
|
|
var table = __webpack_require__(63889);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/react-copy-to-clipboard/lib/index.js
|
|
|
|
|
var lib = __webpack_require__(74855);
|
|
|
|
|
// 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);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Dataset/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var Datasetmodules = ({"flex_box_center":"flex_box_center___l5eTc","flex_space_between":"flex_space_between___k0OR7","flex_box_vertical_center":"flex_box_vertical_center___OKlIC","flex_box_center_end":"flex_box_center_end___hN9A6","flex_box_column":"flex_box_column___ijTq_","dataset":"dataset___dSWAV","header":"header___BzxI4","title":"title___cPEyN","dataPath":"dataPath___wJ6mR","pathTitle":"pathTitle___TOS2Z","btns":"btns___jGE8o","content":"content___s4ep8","customTable":"customTable___OG3_9","row":"row___ONd7r","empty":"empty___CgtTE","path":"path___Cg5rX","text":"text___SCLRV","actionsBtns":"actionsBtns___L5tdC","customModal":"customModal___qVeG3","shareModal":"shareModal___HedYo","fileName":"fileName___x56US","renameModal":"renameModal___SmCAd","errorDes":"errorDes___VLR_5","uploadFileModal":"uploadFileModal___pYYDB"});
|
|
|
|
|
@ -18040,8 +18268,6 @@ var SelectFilePathModal = function SelectFilePathModal(_ref) {
|
|
|
|
|
loading: loading.models.index
|
|
|
|
|
};
|
|
|
|
|
})(SelectFilePathModal));
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input-number/index.js + 21 modules
|
|
|
|
|
var input_number = __webpack_require__(31795);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/space/index.js + 2 modules
|
|
|
|
|
var space = __webpack_require__(42075);
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/FixedButton/index.tsx + 1 modules
|
|
|
|
|
|