|
|
|
|
@ -435,8 +435,6 @@ var table = __webpack_require__(72315);
|
|
|
|
|
var pagination = __webpack_require__(41867);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/affix/index.js + 2 modules
|
|
|
|
|
var affix = __webpack_require__(81228);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
|
|
var util = __webpack_require__(27291);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
|
|
|
var authority = __webpack_require__(76107);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
|
|
@ -662,6 +660,8 @@ var es_radio = __webpack_require__(5112);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
|
|
|
|
var dayjs_min = __webpack_require__(9498);
|
|
|
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
|
|
var util = __webpack_require__(27291);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
|
|
|
var input = __webpack_require__(1056);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Attachment/components/TrfList/index.less?modules
|
|
|
|
|
@ -2520,7 +2520,7 @@ var Config_defaultFormValue = {
|
|
|
|
|
var RangePicker = date_picker["default"].RangePicker;
|
|
|
|
|
var Config_Option = es_select["default"].Option;
|
|
|
|
|
var Config_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
var _histories$, _histories$2, _histories$3, _histories$4, _histories$5;
|
|
|
|
|
var _histories$, _histories$2, _histories$3, _histories$4;
|
|
|
|
|
var attachment = _ref.attachment,
|
|
|
|
|
shixunHomeworks = _ref.shixunHomeworks,
|
|
|
|
|
dispatch = _ref.dispatch,
|
|
|
|
|
@ -2529,15 +2529,7 @@ var Config_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
|
|
// const { workSetting, workList, changeData } = shixunHomeworks
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
group_settings: [{
|
|
|
|
|
"group_id": 18454,
|
|
|
|
|
"group_name": "分班1",
|
|
|
|
|
"publish_time": null
|
|
|
|
|
}, {
|
|
|
|
|
"group_id": 18455,
|
|
|
|
|
"group_name": "分班2",
|
|
|
|
|
"publish_time": null
|
|
|
|
|
}]
|
|
|
|
|
group_settings: []
|
|
|
|
|
}),
|
|
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
|
|
workSetting = _useState2[0],
|
|
|
|
|
@ -2554,43 +2546,41 @@ var Config_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
|
|
formValue = _useState6[0],
|
|
|
|
|
setFormValue = _useState6[1];
|
|
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
|
|
allpublish = _useState8[0],
|
|
|
|
|
setallpublish = _useState8[1];
|
|
|
|
|
var _disabledDate = function disabledDate(current) {
|
|
|
|
|
return current && current < dayjs_min_default()().startOf('day');
|
|
|
|
|
};
|
|
|
|
|
params['id'] = params['coursesId'];
|
|
|
|
|
params['course_id'] = params['coursesId'];
|
|
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
unified_setting: true,
|
|
|
|
|
//是否统一设置
|
|
|
|
|
publish_time: '' // string 统一设置的发布时间
|
|
|
|
|
//分班设置
|
|
|
|
|
// group_settings: [
|
|
|
|
|
// // {
|
|
|
|
|
// // group_id: "",
|
|
|
|
|
// // group_name: "",
|
|
|
|
|
// // publish_time: "",
|
|
|
|
|
// // }
|
|
|
|
|
// ],
|
|
|
|
|
}),
|
|
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
|
|
data = _useState8[0],
|
|
|
|
|
setData = _useState8[1];
|
|
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)([{
|
|
|
|
|
// "group_id": 18454,
|
|
|
|
|
// "group_name": "分班1",
|
|
|
|
|
// "publish_time": null,
|
|
|
|
|
}]),
|
|
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
|
|
groupSettings = _useState10[0],
|
|
|
|
|
setGroupSetting = _useState10[1];
|
|
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
data = _useState10[0],
|
|
|
|
|
setData = _useState10[1];
|
|
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)([{
|
|
|
|
|
is_admin: true
|
|
|
|
|
}]),
|
|
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
|
|
repairSettings = _useState12[0],
|
|
|
|
|
setRepairSetting = _useState12[1];
|
|
|
|
|
groupSettings = _useState12[0],
|
|
|
|
|
setGroupSetting = _useState12[1];
|
|
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
|
|
othergroupSettings = _useState14[0],
|
|
|
|
|
setOtherGroupSetting = _useState14[1];
|
|
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
|
|
repairSettings = _useState16[0],
|
|
|
|
|
setRepairSetting = _useState16[1];
|
|
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var _res$course_groups;
|
|
|
|
|
var res, newarr;
|
|
|
|
|
var _res$course_groups2;
|
|
|
|
|
var res, _res$course_groups, newarr, _res$course_groups3, _res$course_groups4, arr, otherarr;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
@ -2608,22 +2598,51 @@ var Config_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
formValue["publish_time"] = res.publish_time;
|
|
|
|
|
form.setFieldsValue(formValue);
|
|
|
|
|
// data.unified_setting = res?.unified_setting || res?.batches_publish_info.length==0
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.course_groups.length) > 0) {
|
|
|
|
|
data.unified_setting = false;
|
|
|
|
|
setallpublish(res === null || res === void 0 ? void 0 : res.unified_setting);
|
|
|
|
|
if (attachment.actionTabs.manage_all_group) {
|
|
|
|
|
if ((res === null || res === void 0 || (_res$course_groups = res.course_groups) === null || _res$course_groups === void 0 ? void 0 : _res$course_groups.length) > 0) {
|
|
|
|
|
data.unified_setting = false;
|
|
|
|
|
} else {
|
|
|
|
|
data.unified_setting = true;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (res !== null && res !== void 0 && res.unified_setting) {
|
|
|
|
|
data.unified_setting = true;
|
|
|
|
|
} else {
|
|
|
|
|
data.unified_setting = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
data.publish_time = res.publish_time ? res.publish_time : dayjs_min_default()(dayjs_min_default()(new Date()).add(0, 'days').format('YYYY-MM-DD HH:mm'));
|
|
|
|
|
console.log(data.unified_setting);
|
|
|
|
|
setData(Object.assign({}, data));
|
|
|
|
|
setHistories([objectSpread2_default()({}, res)].concat(toConsumableArray_default()(res === null || res === void 0 ? void 0 : res.attachment_histories)));
|
|
|
|
|
newarr = objectSpread2_default()({}, workSetting);
|
|
|
|
|
newarr.group_settings = res === null || res === void 0 ? void 0 : res.batches_publish_info;
|
|
|
|
|
console.log(newarr);
|
|
|
|
|
setworksetting(newarr);
|
|
|
|
|
if ((res === null || res === void 0 || (_res$course_groups = res.course_groups) === null || _res$course_groups === void 0 ? void 0 : _res$course_groups.length) > 0) {
|
|
|
|
|
setGroupSetting(res === null || res === void 0 ? void 0 : res.course_groups);
|
|
|
|
|
if ((res === null || res === void 0 || (_res$course_groups2 = res.course_groups) === null || _res$course_groups2 === void 0 ? void 0 : _res$course_groups2.length) > 0) {
|
|
|
|
|
arr = res === null || res === void 0 || (_res$course_groups3 = res.course_groups) === null || _res$course_groups3 === void 0 ? void 0 : _res$course_groups3.filter(function (item) {
|
|
|
|
|
return item.is_admin;
|
|
|
|
|
});
|
|
|
|
|
otherarr = res === null || res === void 0 || (_res$course_groups4 = res.course_groups) === null || _res$course_groups4 === void 0 ? void 0 : _res$course_groups4.filter(function (item) {
|
|
|
|
|
return !item.is_admin;
|
|
|
|
|
});
|
|
|
|
|
if ((arr === null || arr === void 0 ? void 0 : arr.length) > 0) {
|
|
|
|
|
setGroupSetting(arr);
|
|
|
|
|
} else {
|
|
|
|
|
setGroupSetting([{
|
|
|
|
|
is_admin: true
|
|
|
|
|
}]);
|
|
|
|
|
}
|
|
|
|
|
if ((otherarr === null || otherarr === void 0 ? void 0 : otherarr.length) > 0) {
|
|
|
|
|
setOtherGroupSetting(otherarr);
|
|
|
|
|
} else {
|
|
|
|
|
setOtherGroupSetting([]);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
console.log(groupSettings);
|
|
|
|
|
}
|
|
|
|
|
case 18:
|
|
|
|
|
case 20:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
@ -2696,10 +2715,10 @@ var Config_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var fileTypes = ["pdf", "docx", "doc", "xlsx", "xls", "ppt", "pptx", "zip"];
|
|
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
|
|
fileList = _useState14[0],
|
|
|
|
|
setFileList = _useState14[1];
|
|
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
|
|
fileList = _useState18[0],
|
|
|
|
|
setFileList = _useState18[1];
|
|
|
|
|
var uploadProps = {
|
|
|
|
|
multiple: false,
|
|
|
|
|
maxCount: 1,
|
|
|
|
|
@ -2796,6 +2815,10 @@ var Config_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
// if(allpublish&&!data.unified_setting){
|
|
|
|
|
// message.error('资料已统一发布,不能再分班发布')
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
if (!data.unified_setting) groupSettings = (_groupSettings = groupSettings) === null || _groupSettings === void 0 ? void 0 : _groupSettings.map(function (item) {
|
|
|
|
|
var _workSetting$group_se;
|
|
|
|
|
if (!item.course_group_name) {
|
|
|
|
|
@ -2822,7 +2845,7 @@ var Config_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
value = form.getFieldValue();
|
|
|
|
|
value = Object.assign({}, formValue, value);
|
|
|
|
|
bodyData = JSON.parse(JSON.stringify(data));
|
|
|
|
|
bodyData.group_settings = groupSettings;
|
|
|
|
|
bodyData.group_settings = groupSettings.concat(othergroupSettings);
|
|
|
|
|
_context3.next = 10;
|
|
|
|
|
return (0,service_attachment/* updateFiles */.Ot)(objectSpread2_default()({
|
|
|
|
|
id: detail.id,
|
|
|
|
|
@ -2999,7 +3022,7 @@ var Config_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
children: "\u7EDF\u4E00\u53D1\u5E03"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
|
|
value: false,
|
|
|
|
|
disabled: ((_histories$3 = histories[0]) === null || _histories$3 === void 0 ? void 0 : _histories$3.unified_setting) || ((_histories$4 = histories[0]) === null || _histories$4 === void 0 ? void 0 : _histories$4.batches_publish_info.length) == 0,
|
|
|
|
|
disabled: (_histories$3 = histories[0]) === null || _histories$3 === void 0 ? void 0 : _histories$3.unified_setting,
|
|
|
|
|
children: "\u5206\u73ED\u53D1\u5E03"
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
@ -3031,7 +3054,7 @@ var Config_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
disabledTime: function disabledTime(current) {
|
|
|
|
|
return (0,Releasesetting/* disabledTime */.d0)(current);
|
|
|
|
|
},
|
|
|
|
|
disabled: dayjs_min_default()() > dayjs_min_default()((_histories$5 = histories[0]) === null || _histories$5 === void 0 ? void 0 : _histories$5.publish_time),
|
|
|
|
|
disabled: dayjs_min_default()() > dayjs_min_default()((_histories$4 = histories[0]) === null || _histories$4 === void 0 ? void 0 : _histories$4.publish_time) || !attachment.actionTabs.manage_all_group,
|
|
|
|
|
value: data.publish_time ? dayjs_min_default()(data.publish_time) : '',
|
|
|
|
|
onChange: function onChange(value, time) {
|
|
|
|
|
data.publish_time = time;
|
|
|
|
|
@ -3585,14 +3608,6 @@ var OutLinkConfig_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
unified_setting: true,
|
|
|
|
|
//是否统一设置
|
|
|
|
|
publish_time: '' // string 统一设置的发布时间
|
|
|
|
|
//分班设置
|
|
|
|
|
// group_settings: [
|
|
|
|
|
// // {
|
|
|
|
|
// // group_id: "",
|
|
|
|
|
// // group_name: "",
|
|
|
|
|
// // publish_time: "",
|
|
|
|
|
// // }
|
|
|
|
|
// ],
|
|
|
|
|
}),
|
|
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
|
|
data = _useState6[0],
|
|
|
|
|
@ -3612,17 +3627,19 @@ var OutLinkConfig_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
workSetting = _useState8[0],
|
|
|
|
|
setworksetting = _useState8[1];
|
|
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)([{
|
|
|
|
|
// "group_id": 18454,
|
|
|
|
|
// "group_name": "分班1",
|
|
|
|
|
// "publish_time": null,
|
|
|
|
|
is_admin: true
|
|
|
|
|
}]),
|
|
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
|
|
groupSettings = _useState10[0],
|
|
|
|
|
setGroupSetting = _useState10[1];
|
|
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
|
|
repairSettings = _useState12[0],
|
|
|
|
|
setRepairSetting = _useState12[1];
|
|
|
|
|
othergroupSettings = _useState12[0],
|
|
|
|
|
setOtherGroupSetting = _useState12[1];
|
|
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
|
|
repairSettings = _useState14[0],
|
|
|
|
|
setRepairSetting = _useState14[1];
|
|
|
|
|
var props = {
|
|
|
|
|
name: 'file',
|
|
|
|
|
multiple: true,
|
|
|
|
|
@ -3639,8 +3656,8 @@ var OutLinkConfig_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
};
|
|
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var _res$course_groups, _res$course_groups2;
|
|
|
|
|
var res, newarr;
|
|
|
|
|
var _res$course_groups2;
|
|
|
|
|
var res, _res$course_groups, newarr, _res$course_groups3, _res$course_groups4, arr, otherarr;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
@ -3663,8 +3680,18 @@ var OutLinkConfig_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
setFormValue(objectSpread2_default()({}, formValue));
|
|
|
|
|
form.setFieldsValue(formValue);
|
|
|
|
|
// data.unified_setting = res?.unified_setting || res?.batches_publish_info.length==0
|
|
|
|
|
if ((res === null || res === void 0 || (_res$course_groups = res.course_groups) === null || _res$course_groups === void 0 ? void 0 : _res$course_groups.length) > 0) {
|
|
|
|
|
data.unified_setting = false;
|
|
|
|
|
if (attachment.actionTabs.manage_all_group) {
|
|
|
|
|
if ((res === null || res === void 0 || (_res$course_groups = res.course_groups) === null || _res$course_groups === void 0 ? void 0 : _res$course_groups.length) > 0) {
|
|
|
|
|
data.unified_setting = false;
|
|
|
|
|
} else {
|
|
|
|
|
data.unified_setting = true;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (res !== null && res !== void 0 && res.unified_setting) {
|
|
|
|
|
data.unified_setting = true;
|
|
|
|
|
} else {
|
|
|
|
|
data.unified_setting = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
data.publish_time = res.publish_time ? res.publish_time : dayjs_min_default()(dayjs_min_default()(new Date()).add(0, 'days').format('YYYY-MM-DD HH:mm'));
|
|
|
|
|
setData(Object.assign({}, data));
|
|
|
|
|
@ -3674,7 +3701,24 @@ var OutLinkConfig_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
console.log(newarr);
|
|
|
|
|
setworksetting(newarr);
|
|
|
|
|
if ((res === null || res === void 0 || (_res$course_groups2 = res.course_groups) === null || _res$course_groups2 === void 0 ? void 0 : _res$course_groups2.length) > 0) {
|
|
|
|
|
setGroupSetting(res === null || res === void 0 ? void 0 : res.course_groups);
|
|
|
|
|
arr = res === null || res === void 0 || (_res$course_groups3 = res.course_groups) === null || _res$course_groups3 === void 0 ? void 0 : _res$course_groups3.filter(function (item) {
|
|
|
|
|
return item.is_admin;
|
|
|
|
|
});
|
|
|
|
|
otherarr = res === null || res === void 0 || (_res$course_groups4 = res.course_groups) === null || _res$course_groups4 === void 0 ? void 0 : _res$course_groups4.filter(function (item) {
|
|
|
|
|
return !item.is_admin;
|
|
|
|
|
});
|
|
|
|
|
if ((arr === null || arr === void 0 ? void 0 : arr.length) > 0) {
|
|
|
|
|
setGroupSetting(arr);
|
|
|
|
|
} else {
|
|
|
|
|
setGroupSetting([{
|
|
|
|
|
is_admin: true
|
|
|
|
|
}]);
|
|
|
|
|
}
|
|
|
|
|
if ((otherarr === null || otherarr === void 0 ? void 0 : otherarr.length) > 0) {
|
|
|
|
|
setOtherGroupSetting(otherarr);
|
|
|
|
|
} else {
|
|
|
|
|
setOtherGroupSetting([]);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
console.log(groupSettings);
|
|
|
|
|
}
|
|
|
|
|
@ -3737,7 +3781,7 @@ var OutLinkConfig_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
value = form.getFieldValue();
|
|
|
|
|
value = Object.assign({}, formValue, value);
|
|
|
|
|
bodyData = JSON.parse(JSON.stringify(data));
|
|
|
|
|
bodyData.group_settings = groupSettings;
|
|
|
|
|
bodyData.group_settings = groupSettings.concat(othergroupSettings);
|
|
|
|
|
_context2.next = 10;
|
|
|
|
|
return (0,service_attachment/* updateFiles */.Ot)(objectSpread2_default()({
|
|
|
|
|
id: detail.id,
|
|
|
|
|
@ -3826,6 +3870,7 @@ var OutLinkConfig_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z.Group, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
|
|
value: true,
|
|
|
|
|
disabled: ((_histories$ = histories[0]) === null || _histories$ === void 0 || (_histories$ = _histories$.course_groups) === null || _histories$ === void 0 ? void 0 : _histories$.length) > 0 || !attachment.actionTabs.manage_all_group,
|
|
|
|
|
children: "\u9009\u4E2D\uFF0C\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF0C\u5426\u5219\u8BFE\u5802\u6210\u5458\u53EF\u89C1"
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
@ -3856,11 +3901,11 @@ var OutLinkConfig_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
|
|
value: true,
|
|
|
|
|
disabled: ((_histories$ = histories[0]) === null || _histories$ === void 0 || (_histories$ = _histories$.course_groups) === null || _histories$ === void 0 ? void 0 : _histories$.length) > 0 || !attachment.actionTabs.manage_all_group,
|
|
|
|
|
disabled: ((_histories$2 = histories[0]) === null || _histories$2 === void 0 || (_histories$2 = _histories$2.course_groups) === null || _histories$2 === void 0 ? void 0 : _histories$2.length) > 0 || !attachment.actionTabs.manage_all_group,
|
|
|
|
|
children: "\u7EDF\u4E00\u53D1\u5E03"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
|
|
value: false,
|
|
|
|
|
disabled: ((_histories$2 = histories[0]) === null || _histories$2 === void 0 ? void 0 : _histories$2.unified_setting) || ((_histories$3 = histories[0]) === null || _histories$3 === void 0 ? void 0 : _histories$3.batches_publish_info.length) == 0,
|
|
|
|
|
disabled: (_histories$3 = histories[0]) === null || _histories$3 === void 0 ? void 0 : _histories$3.unified_setting,
|
|
|
|
|
children: "\u5206\u73ED\u53D1\u5E03"
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
@ -3892,7 +3937,7 @@ var OutLinkConfig_SetPublic = function SetPublic(_ref) {
|
|
|
|
|
disabledTime: function disabledTime(current) {
|
|
|
|
|
return (0,Releasesetting/* disabledTime */.d0)(current);
|
|
|
|
|
},
|
|
|
|
|
disabled: dayjs_min_default()() > dayjs_min_default()((_histories$4 = histories[0]) === null || _histories$4 === void 0 ? void 0 : _histories$4.publish_time),
|
|
|
|
|
disabled: dayjs_min_default()() > dayjs_min_default()((_histories$4 = histories[0]) === null || _histories$4 === void 0 ? void 0 : _histories$4.publish_time) || !attachment.actionTabs.manage_all_group,
|
|
|
|
|
value: data.publish_time ? dayjs_min_default()(data.publish_time) : '',
|
|
|
|
|
onChange: function onChange(value, time) {
|
|
|
|
|
data.publish_time = time;
|
|
|
|
|
@ -4361,7 +4406,6 @@ var BottomControl = __webpack_require__(9046);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// import CutOffNow from './components/CutOffNow';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -4401,7 +4445,7 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
sort_type: 'publish_time',
|
|
|
|
|
sort: 'desc',
|
|
|
|
|
page_size: 20,
|
|
|
|
|
clazz: searchParams.get("tabs") === '0' ? '' : searchParams.get("tabs") === '1' ? '2' : searchParams.get("tabs") === '2' ? '1' : ''
|
|
|
|
|
clazz: searchParams.get("tabs") === '0' ? '' : searchParams.get("tabs") === '1' ? '2' : searchParams.get("tabs") === '2' ? '3' : searchParams.get("tabs") === '3' ? '1' : ''
|
|
|
|
|
}),
|
|
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
|
|
params = _useState2[0],
|
|
|
|
|
@ -4644,11 +4688,16 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
id: '2',
|
|
|
|
|
total: (0,authority/* isAdmin */.GJ)() ? detailAttachmentList.unpublish_count : null,
|
|
|
|
|
index: 1
|
|
|
|
|
}, {
|
|
|
|
|
name: '未开始',
|
|
|
|
|
id: '3',
|
|
|
|
|
total: (0,authority/* isAdmin */.GJ)() ? detailAttachmentList.not_started_count : null,
|
|
|
|
|
index: 2
|
|
|
|
|
}, {
|
|
|
|
|
name: '已发布',
|
|
|
|
|
id: '1',
|
|
|
|
|
total: (0,authority/* isAdmin */.GJ)() ? detailAttachmentList.publish_count : null,
|
|
|
|
|
index: 2
|
|
|
|
|
index: 3
|
|
|
|
|
}];
|
|
|
|
|
var SortMenus = [{
|
|
|
|
|
name: '默认排序',
|
|
|
|
|
@ -4726,12 +4775,13 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
}];
|
|
|
|
|
var onMenuSelect = function onMenuSelect(v) {
|
|
|
|
|
if (v.key === '0' || v.key === '1') {
|
|
|
|
|
console.log(v.key);
|
|
|
|
|
if (v.key === '0' || v.key === '1' || v.key === '2') {
|
|
|
|
|
params.sort_type = 'created_on';
|
|
|
|
|
params.sort = 'desc';
|
|
|
|
|
setSortMenuName('创建时间降序排列');
|
|
|
|
|
}
|
|
|
|
|
if (v.key === '2') {
|
|
|
|
|
if (v.key === '3') {
|
|
|
|
|
params.sort_type = 'publish_time';
|
|
|
|
|
params.sort = 'desc';
|
|
|
|
|
setSortMenuName('发布时间降序排列');
|
|
|
|
|
@ -4965,8 +5015,15 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
|
|
|
}), v.link && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
className: "tag-style-border-small c-orange border-orange ml10",
|
|
|
|
|
children: [' ', "\u5916\u94FE", ' ']
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(util/* StatusClassroomsTags */.VV, {
|
|
|
|
|
status: [!v.is_publish ? '未发布' : '已发布']
|
|
|
|
|
}), v.is_publish && v.publish_status && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "tag-style bg-light-blue ml10",
|
|
|
|
|
children: "\u5DF2\u53D1\u5E03"
|
|
|
|
|
}), v.is_publish && !v.publish_status && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "tag-style bg-c5d6ff ml10soft",
|
|
|
|
|
children: "\u672A\u5F00\u59CB"
|
|
|
|
|
}), !v.is_publish && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "tag-style bgB8B8B8 ml10soft",
|
|
|
|
|
children: "\u672A\u53D1\u5E03"
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Attachmentmodules.titleRight,
|
|
|
|
|
|