autoUpdataFile

dev_local_v9_haigongda
eduauto 1 year ago
parent 45721c3949
commit 14c278f6eb

@ -140,6 +140,7 @@ var AddOrEdit = function AddOrEdit(_ref) {
name: values === null || values === void 0 ? void 0 : values.name,
vs_type: values === null || values === void 0 ? void 0 : values.vs_type,
identifier: values === null || values === void 0 ? void 0 : values.identifier,
school_id: values === null || values === void 0 ? void 0 : values.school_id,
cover_id: (fileList === null || fileList === void 0 || (_fileList$ = fileList[0]) === null || _fileList$ === void 0 || (_fileList$ = _fileList$.response) === null || _fileList$ === void 0 ? void 0 : _fileList$.id) || '',
backbground_image_id: (fileOtherList === null || fileOtherList === void 0 || (_fileOtherList$ = fileOtherList[0]) === null || _fileOtherList$ === void 0 || (_fileOtherList$ = _fileOtherList$.response) === null || _fileOtherList$ === void 0 ? void 0 : _fileOtherList$.id) || ''
};
@ -282,7 +283,7 @@ var AddOrEdit = function AddOrEdit(_ref) {
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u6240\u5C5E\u5B66\u9662",
name: "schoolId",
name: "school_id",
rules: [{
required: true,
message: '请选择所属学院'

@ -27,7 +27,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.69af33dc.js"></script>
<script src="/react/build/umi.82094ee4.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -546,17 +546,53 @@ var ui_customization = __webpack_require__(6897);
var TopPlanBanner_TopBanner = function TopBanner(_ref) {
var virtualSpaces = _ref.virtualSpaces,
user = _ref.user,
dispatch = _ref.dispatch;
var virtualSpacesDetails = virtualSpaces.virtualSpacesDetails;
var urlParams = (0,_umi_production_exports.useParams)();
var _useState = (0,_react_17_0_2_react.useState)(3),
_useState2 = slicedToArray_default()(_useState, 2),
type = _useState2[0],
setType = _useState2[1];
var showModal = function showModal(title, content, apiUrl) {
modal/* default */.Z.confirm({
centered: true,
okText: '确定',
cancelText: '取消',
title: title,
content: content,
onOk: function () {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,fetch/* default */.ZP)(apiUrl, {
method: 'post'
});
case 2:
res = _context.sent;
if (res.status === 0) {
message/* default */.ZP.success('操作成功');
dispatch({
type: 'virtualSpaces/getVirtualSpacesDetails',
payload: {
id: urlParams === null || urlParams === void 0 ? void 0 : urlParams.virtual_spacesId
}
});
}
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
function onOk() {
return _onOk.apply(this, arguments);
}
return onOk;
}()
});
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: TopPlanBannermodules.bg,
style: {
@ -575,7 +611,7 @@ var TopPlanBanner_TopBanner = function TopBanner(_ref) {
zIndex: 100
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: type == 1 ? '虚拟教研室当前为未公开状态,点击可向管理员申请公开' : type == 2 ? '虚拟教研室当前为审核中状态,请等待管理员审核' : '虚拟教研室当前为已公开状态,点击取消公开',
title: (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.status) == 2 ? '虚拟教研室当前为未公开状态,点击可向管理员申请公开' : (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.status) == 0 ? '虚拟教研室当前为审核中状态,请等待管理员审核' : '虚拟教研室当前为已公开状态,点击取消公开',
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
width: '79px',
@ -586,47 +622,54 @@ var TopPlanBanner_TopBanner = function TopBanner(_ref) {
justifyContent: 'center',
alignItems: 'center',
border: '1px solid',
borderColor: type == 1 ? '#ffffff' : type == 2 ? '#FFAB58' : '#57A87D',
background: type == 1 ? 'rgba(216,216,216,0.14)' : type == 2 ? 'rgba(255,188,107,0.12)' : 'rgba(187,255,197,0.12)',
borderColor: (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.status) == 2 ? '#ffffff' : (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.status) == 0 ? '#FFAB58' : '#57A87D',
background: (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.status) == 2 ? 'rgba(216,216,216,0.14)' : (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.status) == 0 ? 'rgba(255,188,107,0.12)' : 'rgba(187,255,197,0.12)',
position: 'absolute',
right: '100px',
top: '20px'
},
onClick: function onClick() {
if ((virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.status) === 1) {
showModal('取消公开', "\u8BF7\u786E\u8BA4\u662F\u5426\u5C06\u300A".concat(virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.name, "\u300B\u865A\u62DF\u6559\u7814\u5BA4\u53D6\u6D88\u516C\u5F00\uFF1F"), "/api/virtual_classrooms/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.virtual_spacesId, "/un_public.json"));
} else if ((virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.status) === 2) {
showModal('申请公开', "\u8BF7\u786E\u8BA4\u662F\u5426\u5C06\u300A".concat(virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.name, "\u300B\u865A\u62DF\u6559\u7814\u5BA4\u7533\u8BF7\u516C\u5F00\uFF1F"), "/api/virtual_classrooms/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.virtual_spacesId, "/apply_public.json"));
}
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
width: '7px',
height: '7px',
borderRadius: '7px',
background: type == 1 ? '#ffffff' : type == 2 ? '#FFAB58' : '#57A87D',
background: (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.status) == 2 ? '#ffffff' : (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.status) == 0 ? '#FFAB58' : '#57A87D',
marginRight: '5px'
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
color: type == 1 ? '#ffffff' : type == 2 ? '#FFAB58' : '#57A87D'
color: (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.status) == 2 ? '#ffffff' : (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.status) == 0 ? '#FFAB58' : '#57A87D'
},
children: type == 1 ? '未公开' : type == 2 ? '审核中' : '已公开'
children: (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.status) == 2 ? '未公开' : (virtualSpacesDetails === null || virtualSpacesDetails === void 0 ? void 0 : virtualSpacesDetails.status) == 0 ? '审核中' : '已公开'
})]
})
}), !(virtualSpacesDetails !== null && virtualSpacesDetails !== void 0 && virtualSpacesDetails.is_member) && /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context.next = 2;
_context2.next = 2;
return (0,fetch/* default */.ZP)("/api/virtual_classrooms/".concat(urlParams === null || urlParams === void 0 ? void 0 : urlParams.virtual_spacesId, "/apply_become_member.json"), {
method: 'post'
});
case 2:
res = _context.sent;
res = _context2.sent;
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('提交申请成功');
}
case 4:
case "end":
return _context.stop();
return _context2.stop();
}
}, _callee);
}, _callee2);
})),
children: "\u7533\u8BF7\u52A0\u5165\u8BFE\u7A0B"
})]

@ -2172,6 +2172,9 @@ var IndexPage = function IndexPage(_ref) {
src: titleRight_namespaceObject
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Indexmodules.more_text,
onClick: function onClick() {
_umi_production_exports.history.push("/vtrs");
},
children: "\u67E5\u770B\u66F4\u591A"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save