@ -1,6 +1,51 @@
"use strict" ;
( self [ "webpackChunk" ] = self [ "webpackChunk" ] || [ ] ) . push ( [ [ 54862 ] , {
/***/ 24566 :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / _ @ ant - design _icons @ 5.5 . 2 @ @ ant - design / icons / es / icons / DownloadOutlined . js + 1 modules * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/***/ ( function ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
Z : function ( ) { return /* binding */ icons _DownloadOutlined ; }
} ) ;
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.26.0@@babel/runtime/helpers/esm/extends.js
var esm _extends = _ _webpack _require _ _ ( 5891 ) ;
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react _17 _0 _2 _react = _ _webpack _require _ _ ( 59301 ) ;
; // CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/DownloadOutlined.js
// This icon file is generated automatically.
var DownloadOutlined = { "icon" : { "tag" : "svg" , "attrs" : { "viewBox" : "64 64 896 896" , "focusable" : "false" } , "children" : [ { "tag" : "path" , "attrs" : { "d" : "M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } } ] } , "name" : "download" , "theme" : "outlined" } ;
/* harmony default export */ var asn _DownloadOutlined = ( DownloadOutlined ) ;
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.5.2@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = _ _webpack _require _ _ ( 88853 ) ;
; // CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.5.2@@ant-design/icons/es/icons/DownloadOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var DownloadOutlined _DownloadOutlined = function DownloadOutlined ( props , ref ) {
return /*#__PURE__*/ _react _17 _0 _2 _react . createElement ( AntdIcon /* default */ . Z , ( 0 , esm _extends /* default */ . Z ) ( { } , props , {
ref : ref ,
icon : asn _DownloadOutlined
} ) ) ;
} ;
/** */
var RefIcon = /*#__PURE__*/ _react _17 _0 _2 _react . forwardRef ( DownloadOutlined _DownloadOutlined ) ;
if ( false ) { }
/* harmony default export */ var icons _DownloadOutlined = ( RefIcon ) ;
/***/ } ) ,
/***/ 80205 :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / node _modules / _ @ ant - design _icons @ 5.5 . 2 @ @ ant - design / icons / es / icons / ExclamationCircleOutlined . js + 1 modules * * * !
@ -199,8 +244,6 @@ var _umi_production_exports = __webpack_require__(4857);
var tabs = _ _webpack _require _ _ ( 99313 ) ;
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = _ _webpack _require _ _ ( 36920 ) ;
// 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/modal/index.js + 16 modules
var modal = _ _webpack _require _ _ ( 43418 ) ;
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
@ -217,17 +260,13 @@ var row = __webpack_require__(95237);
var spin = _ _webpack _require _ _ ( 71418 ) ;
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
var pagination = _ _webpack _require _ _ ( 25700 ) ;
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
var es _radio = _ _webpack _require _ _ ( 5112 ) ;
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/cascader/index.js + 18 modules
var cascader = _ _webpack _require _ _ ( 19842 ) ;
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
var NoData = _ _webpack _require _ _ ( 69718 ) ;
// EXTERNAL MODULE: ./src/components/LanguageSelect/index.tsx + 1 modules
var LanguageSelect = _ _webpack _require _ _ ( 5446 ) ;
; // CONCATENATED MODULE: ./src/pages/Paperlibrary/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Paperlibrarymodules = ( { "flex_box_center" : "flex_box_center___bGwPE" , "flex_space_between" : "flex_space_between___S_dVk" , "flex_box_vertical_center" : "flex_box_vertical_center___JyuWa" , "flex_box_center_end" : "flex_box_center_end___OUF0K" , "flex_box_column" : "flex_box_column___rKVBK" , "page" : "page___scdxd" , "title" : "title___VrDp2" , "wrap" : "wrap___YQdqQ" , "tabsWrap" : "tabsWrap___Oc3uk" , "filterWrap" : "filterWrap___E4RIN" , "batchWrap" : "batchWrap___W_nb0" , "contentWrap" : "contentWrap___R4B3o" , "checkbox" : "checkbox____NenD" , "modal" : "modal___vvk_2" , "list" : "list___kvLHG" , "btns" : "btns___mm_gr" , "confirm" : "confirm___mRLCc" , "cancel" : "cancel___K9XSP" , "batch" : "batch___HZ2dp" , "btn" : "btn____Gjoi" , "languageSelect" : "languageSelect___yXzSf" , "searchWrp" : "searchWrp___PkGd5" , "searchInput" : "searchInput___ChO3U" , "searchIcon" : "searchIcon____721G" , "actionBtn" : "actionBtn___gil1d" ,"applyPublicContainer" : "applyPublicContainer___rqkDZ" , "ant-modal-header" : "ant-modal-header___lNIoE" , "ant-modal-title" : "ant-modal-title___dC2Be" , "ant-modal-body" : "ant-modal-body___sdjco" , "ant-modal-close" : "ant-modal-close___gRcvh" , "ant-modal-close-x" : "ant-modal-close-x___yC6AR" , "ant-modal-footer" : "ant-modal-footer___BBXL0" , "ant-input" : "ant-input____QnDa" , "ant-form-item" : "ant-form-item___tboz_" , "ant-form-item-label" : "ant-form-item-label___MlhI0" , "applyPublicContent" : "applyPublicContent___MSHlq" , "spin" : "spin___BC6EP" , "tips" : "tips___t89S9" , "action" : "action___U7a0p" }) ;
/* harmony default export */ var Paperlibrarymodules = ( { "flex_box_center" : "flex_box_center___bGwPE" , "flex_space_between" : "flex_space_between___S_dVk" , "flex_box_vertical_center" : "flex_box_vertical_center___JyuWa" , "flex_box_center_end" : "flex_box_center_end___OUF0K" , "flex_box_column" : "flex_box_column___rKVBK" , "page" : "page___scdxd" , "title" : "title___VrDp2" , "wrap" : "wrap___YQdqQ" , "tabsWrap" : "tabsWrap___Oc3uk" , "filterWrap" : "filterWrap___E4RIN" , "batchWrap" : "batchWrap___W_nb0" , "contentWrap" : "contentWrap___R4B3o" , "checkbox" : "checkbox____NenD" , "modal" : "modal___vvk_2" , "list" : "list___kvLHG" , "btns" : "btns___mm_gr" , "confirm" : "confirm___mRLCc" , "cancel" : "cancel___K9XSP" , "batch" : "batch___HZ2dp" , "btn" : "btn____Gjoi" , "languageSelect" : "languageSelect___yXzSf" , "searchWrp" : "searchWrp___PkGd5" , "searchInput" : "searchInput___ChO3U" , "searchIcon" : "searchIcon____721G" , "actionBtn" : "actionBtn___gil1d" }) ;
; // CONCATENATED MODULE: ./src/assets/images/paper/s.svg
function _createForOfIteratorHelper ( o , allowArrayLike ) { var it = typeof Symbol !== "undefined" && o [ Symbol . iterator ] || o [ "@@iterator" ] ; if ( ! it ) { if ( Array . isArray ( o ) || ( it = _unsupportedIterableToArray ( o ) ) || allowArrayLike && o && typeof o . length === "number" ) { if ( it ) o = it ; var i = 0 ; var F = function F ( ) { } ; return { s : F , n : function n ( ) { if ( i >= o . length ) return { done : true } ; return { done : false , value : o [ i ++ ] } ; } , e : function e ( _e ) { throw _e ; } , f : F } ; } throw new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ; } var normalCompletion = true , didErr = false , err ; return { s : function s ( ) { it = it . call ( o ) ; } , n : function n ( ) { var step = it . next ( ) ; normalCompletion = step . done ; return step ; } , e : function e ( _e2 ) { didErr = true ; err = _e2 ; } , f : function f ( ) { try { if ( ! normalCompletion && it [ "return" ] != null ) it [ "return" ] ( ) ; } finally { if ( didErr ) throw err ; } } } ; }
function _unsupportedIterableToArray ( o , minLen ) { if ( ! o ) return ; if ( typeof o === "string" ) return _arrayLikeToArray ( o , minLen ) ; var n = Object . prototype . toString . call ( o ) . slice ( 8 , - 1 ) ; if ( n === "Object" && o . constructor ) n = o . constructor . name ; if ( n === "Map" || n === "Set" ) return Array . from ( o ) ; if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( n ) ) return _arrayLikeToArray ( o , minLen ) ; }
@ -396,16 +435,12 @@ var RandomPromptModal = function RandomPromptModal(_ref) {
loading : loading . effects
} ;
} ) ( RandomPromptModal ) ) ;
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/menu/index.js + 11 modules
var es _menu = _ _webpack _require _ _ ( 20834 ) ;
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js + 1 modules
var dropdown = _ _webpack _require _ _ ( 38854 ) ;
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.13@dayjs/dayjs.min.js
var dayjs _min = _ _webpack _require _ _ ( 61186 ) ;
var dayjs _min _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( dayjs _min ) ;
; // CONCATENATED MODULE: ./src/pages/Paperlibrary/components/List/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Listmodules = ( { "itemWrap" : "itemWrap___KEbZ9" , "checkBoxWrapper" : "checkBoxWrapper___Y_kuj" , "listWrap" : "listWrap___VlWgM" , "list" : "list___XIr6d" , "flexCenter" : "flexCenter___eacyI" , "flexRow" : "flexRow___A_mOc" , "imgWrap" : "imgWrap___KI9io" , "img" : "img___vjS11" , "contentWrap" : "contentWrap___NI0Vt" , "titleWrap" : "titleWrap___SlBWX" , "title" : "title___KGh5v" , "content" : "content___B0PxW" , "bottomWrap" : "bottomWrap___WVJb4" , "updateTime" : "updateTime___sxvSt" , "useCount" : "useCount___puqPx" , "actionBtn" : "actionBtn___JUWfj" , "actionButton" : "actionButton___jabv3" , "actionBar" : "actionBar___I1pC8" , "typeIcon" : "typeIcon___bramC" , "private" : "private___sdERX" , "public" : "public___noSmD" , "random" : "random___l2hTA" , "actionLinkWrapper" : "actionLinkWrapper___Him3y" , "actionLink" : "actionLink___rWBLq" , "actionIcon" : "actionIcon___lMmL7" , "line" : "line___HQJlK" , "b1" : "b1___Y4KZd" , "b2" : "b2___QxMOG" , "actionLeftItem" : "actionLeftItem___Fnq4b" , "export_type_modal" : "export_type_modal___ISAzV" , "export_type_modal_con" : "export_type_modal_con___qw5B2" , "type_item" : "type_item___pdMxs" , "img_warp" : "img_warp___cDH7f" , "img_warp_active" : "img_warp_active___rLrYN" ,"menu" : "menu___Q2PXr" }) ;
/* harmony default export */ var Listmodules = ( { "itemWrap" : "itemWrap___KEbZ9" , "checkBoxWrapper" : "checkBoxWrapper___Y_kuj" , "listWrap" : "listWrap___VlWgM" , "list" : "list___XIr6d" , "flexCenter" : "flexCenter___eacyI" , "flexRow" : "flexRow___A_mOc" , "imgWrap" : "imgWrap___KI9io" , "img" : "img___vjS11" , "contentWrap" : "contentWrap___NI0Vt" , "titleWrap" : "titleWrap___SlBWX" , "title" : "title___KGh5v" , "content" : "content___B0PxW" , "bottomWrap" : "bottomWrap___WVJb4" , "updateTime" : "updateTime___sxvSt" , "useCount" : "useCount___puqPx" , "actionBtn" : "actionBtn___JUWfj" , "actionButton" : "actionButton___jabv3" , "actionBar" : "actionBar___I1pC8" , "typeIcon" : "typeIcon___bramC" , "private" : "private___sdERX" , "public" : "public___noSmD" , "random" : "random___l2hTA" , "actionLinkWrapper" : "actionLinkWrapper___Him3y" , "actionLink" : "actionLink___rWBLq" , "actionIcon" : "actionIcon___lMmL7" , "line" : "line___HQJlK" , "b1" : "b1___Y4KZd" , "b2" : "b2___QxMOG" , "actionLeftItem" : "actionLeftItem___Fnq4b" , "export_type_modal" : "export_type_modal___ISAzV" , "export_type_modal_con" : "export_type_modal_con___qw5B2" , "type_item" : "type_item___pdMxs" , "img_warp" : "img_warp___cDH7f" , "img_warp_active" : "img_warp_active___rLrYN" }) ;
// EXTERNAL MODULE: ./src/utils/authority.ts
var authority = _ _webpack _require _ _ ( 71763 ) ;
// EXTERNAL MODULE: ./src/service/exercise.ts
@ -414,6 +449,8 @@ var exercise = __webpack_require__(87799);
var verifyLogin = _ _webpack _require _ _ ( 39562 ) ;
// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js
var lodash = _ _webpack _require _ _ ( 89392 ) ;
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.5.2@@ant-design/icons/es/icons/DownloadOutlined.js + 1 modules
var DownloadOutlined = _ _webpack _require _ _ ( 24566 ) ;
// EXTERNAL MODULE: ./src/utils/export.ts
var utils _export = _ _webpack _require _ _ ( 92279 ) ;
; // CONCATENATED MODULE: ./src/pages/Paperlibrary/components/List/index.tsx
@ -433,13 +470,14 @@ var utils_export = __webpack_require__(92279);
var difficultyMapping = {
1 : '简单' ,
2 : '适中' ,
3 : '困难'
} ;
var List = function List ( _ref ) {
var _data$author , _ user$userInfo2, _ data$author2, _data$author3 , _data$author4 , _user$userInfo3 ;
var _data$author , _ data$author2, _data$author3 , _user$userInfo2 , _data$author4 , _user$userInfo3 ;
var _ref$showCheckbox = _ref . showCheckbox ,
showCheckbox = _ref$showCheckbox === void 0 ? false : _ref$showCheckbox ,
data = _ref . data ,
@ -452,12 +490,8 @@ var List = function List(_ref) {
onSetSelectIds = _ref$onSetSelectIds === void 0 ? function ( ) { } : _ref$onSetSelectIds ,
_ref$onPublicReview = _ref . onPublicReview ,
onPublicReview = _ref$onPublicReview === void 0 ? function ( ) { } : _ref$onPublicReview ,
_ref$onSetPublic = _ref . onSetPublic ,
onSetPublic = _ref$onSetPublic === void 0 ? function ( ) { } : _ref$onSetPublic ,
_ref$onCancelPublic = _ref . onCancelPublic ,
onCancelPublic = _ref$onCancelPublic === void 0 ? function ( ) { } : _ref$onCancelPublic ,
_ref$onShare = _ref . onShare ,
onShare = _ref$onShare === void 0 ? function ( ) { } : _ref$onShare ,
_ref$onCancelShare = _ref . onCancelShare ,
onCancelShare = _ref$onCancelShare === void 0 ? function ( ) { } : _ref$onCancelShare ,
_ref$onEdit = _ref . onEdit ,
@ -522,89 +556,6 @@ var List = function List(_ref) {
return _ref2 . apply ( this , arguments ) ;
} ;
} ( ) ;
var menuItems = [
// {
// label: <a className={styles.actionLink} onClick={() => {onShare(data.id)}}>
// 共享
// </a>,
// key: '1',
// // show: activeTabsKey === "0" && !data?.is_share
// show: !data.is_random && !data.is_share
// },
{
label : /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "a" , {
className : Listmodules . actionLink ,
onClick : function onClick ( ) {
onCancelShare ( data . id ) ;
} ,
children : "\u64A4\u9500\u5171\u4EAB"
} ) ,
key : '2' ,
// show: activeTabsKey === "0" && !data?.is_share
show : ! data . is _random && data . is _share
} , {
label : /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "a" , {
className : Listmodules . actionLink ,
onClick : function onClick ( ) {
return onSetPublic ( data ) ;
} ,
children : "\u516C\u5F00"
} ) ,
key : '3' ,
show : ! data . is _random && ! data [ "public" ] && ! data . apply
} , {
label : /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "a" , {
className : Listmodules . actionLink ,
onClick : function onClick ( ) {
return onCancelPublic ( data . id ) ;
} ,
children : "\u64A4\u9500\u516C\u5F00"
} ) ,
key : '4' ,
show : ! data . is _random && data [ "public" ]
} , {
label : /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "a" , {
className : Listmodules . actionLink
// onClick={onPublicReview}
,
children : "\u516C\u5F00\u5BA1\u6838\u4E2D"
} ) ,
key : '5' ,
show : ! data . is _random && ! data [ "public" ] && data . apply ,
disabled : true
} , {
label : /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "a" , {
className : Listmodules . actionLink ,
onClick : function onClick ( ) {
if ( data . is _random ) {
setExporRandomModal ( true ) ;
} else {
setExportType ( '' ) ;
setExportTypeModal ( true ) ;
}
} ,
children : "\u5BFC\u51FA\u8BD5\u5377"
} ) ,
key : '6' ,
show : true
} , {
label : /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "a" , {
className : Listmodules . actionLink ,
onClick : function onClick ( ) {
return onDelete ( data . id ) ;
} ,
children : "\u5220\u9664"
} ) ,
key : '7' ,
show : ( activeTabsKey === '0' || activeTabsKey === '2' ) && ! data [ "public" ] || activeTabsKey === '1' && ( ( _data$author = data . author ) === null || _data$author === void 0 ? void 0 : _data$author . login ) !== ( ( _user$userInfo2 = user . userInfo ) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2 . login ) && ( 0 , authority /* isCommonSuperAdmin */ . fn ) ( )
} ] . filter ( function ( item ) {
return item . show ;
} ) ;
var menu = /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( es _menu /* default */ . Z , {
forceSubMenuRender : true ,
className : Listmodules . menu ,
items : menuItems
} ) ;
return /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
className : Listmodules . itemWrap ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
@ -706,17 +657,98 @@ var List = function List(_ref) {
} ) , activeTabsKey === '1' && /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
className : Listmodules . actionLeftItem ,
children : [ "\u521B\u5EFA\u8005" , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "span" , {
children : ( _data$author 2 = data . author ) === null || _data$author 2 === void 0 ? void 0 : _data$author 2 . name
children : ( _data$author = data . author ) === null || _data$author === void 0 ? void 0 : _data$author . name
} ) ]
} ) , activeTabsKey === '2' && /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
className : Listmodules . actionLeftItem ,
children : [ "\u5206\u4EAB\u4EBA" , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "span" , {
children : ( _data$author 3 = data . author ) === null || _data$author 3 === void 0 ? void 0 : _data$author3 . name
children : ( _data$author 2 = data . author ) === null || _data$author 2 === void 0 ? void 0 : _data$author2 . name
} ) ]
} ) ]
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
className : Listmodules . flexRow ,
children : [ ( ( activeTabsKey === '0' || activeTabsKey === '2' ) && ! data [ "public" ] || activeTabsKey === '1' && ( ( _data$author4 = data . author ) === null || _data$author4 === void 0 ? void 0 : _data$author4 . login ) !== ( ( _user$userInfo3 = user . userInfo ) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3 . login ) && ( 0 , authority /* isCommonSuperAdminOrOperation */ . ag ) ( ) ) && /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( row /* default */ . Z , {
children : [ activeTabsKey === '0' && ! data [ "public" ] && ! data . is _random && data . apply && /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( row /* default */ . Z , {
align : "middle" ,
className : Listmodules . actionLinkWrapper ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
className : Listmodules . line ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "b" , {
className : Listmodules . b1
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "b" , {
className : Listmodules . b2
} ) ]
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "a" , {
className : "" . concat ( Listmodules . actionLink ) ,
onClick : onPublicReview ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "i" , {
className : "iconfont icon-gongkai " . concat ( Listmodules . actionIcon )
} ) , "\u5BA1\u6838\u4E2D" ]
} ) ]
} ) , activeTabsKey === '0' && data [ "public" ] && ! data . is _random && /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( row /* default */ . Z , {
align : "middle" ,
className : Listmodules . actionLinkWrapper ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
className : Listmodules . line ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "b" , {
className : Listmodules . b1
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "b" , {
className : Listmodules . b2
} ) ]
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "a" , {
className : "" . concat ( Listmodules . actionLink , " current" ) ,
onClick : function onClick ( ) {
return onCancelPublic ( data . id ) ;
} ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "i" , {
className : "iconfont icon-gongkai " . concat ( Listmodules . actionIcon )
} ) , "\u64A4\u9500\u516C\u5F00" ]
} ) ]
} ) , activeTabsKey === '0' && ( data === null || data === void 0 ? void 0 : data . is _share ) && ! data . is _random && /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( row /* default */ . Z , {
align : "middle" ,
className : Listmodules . actionLinkWrapper ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
className : Listmodules . line ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "b" , {
className : Listmodules . b1
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "b" , {
className : Listmodules . b2
} ) ]
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "a" , {
className : "" . concat ( Listmodules . actionLink , " current" ) ,
onClick : function onClick ( ) {
return onCancelShare ( data . id ) ;
} ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "i" , {
className : "iconfont icon-chexiaogongxiang " . concat ( Listmodules . actionIcon , " font16" )
} ) , "\u64A4\u9500\u5171\u4EAB" ]
} ) ]
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( row /* default */ . Z , {
align : "middle" ,
className : Listmodules . actionLinkWrapper ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
className : Listmodules . line ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "b" , {
className : Listmodules . b1
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "b" , {
className : Listmodules . b2
} ) ]
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "a" , {
className : "" . concat ( Listmodules . actionLink ) ,
onClick : function onClick ( ) {
if ( data . is _random ) {
setExporRandomModal ( true ) ;
} else {
setExportType ( '' ) ;
setExportTypeModal ( true ) ;
}
} ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( DownloadOutlined /* default */ . Z , {
style : {
marginRight : 5
}
} ) , "\u5BFC\u51FA\u8BD5\u5377" ]
} ) ]
} ) , ( ( activeTabsKey === '0' || activeTabsKey === '2' ) && ! data [ "public" ] || activeTabsKey === '1' && ( ( _data$author3 = data . author ) === null || _data$author3 === void 0 ? void 0 : _data$author3 . login ) !== ( ( _user$userInfo2 = user . userInfo ) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2 . login ) && ( 0 , authority /* isCommonSuperAdminOrOperation */ . ag ) ( ) ) && /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( row /* default */ . Z , {
align : "middle" ,
className : Listmodules . actionLinkWrapper ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
@ -735,6 +767,25 @@ var List = function List(_ref) {
className : "iconfont icon-bianji10 " . concat ( Listmodules . actionIcon )
} ) , "\u7F16\u8F91" ]
} ) ]
} ) , ( ( activeTabsKey === '0' || activeTabsKey === '2' ) && ! data [ "public" ] || activeTabsKey === '1' && ( ( _data$author4 = data . author ) === null || _data$author4 === void 0 ? void 0 : _data$author4 . login ) !== ( ( _user$userInfo3 = user . userInfo ) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3 . login ) && ( 0 , authority /* isCommonSuperAdmin */ . fn ) ( ) ) && /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( row /* default */ . Z , {
align : "middle" ,
className : Listmodules . actionLinkWrapper ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
className : Listmodules . line ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "b" , {
className : Listmodules . b1
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "b" , {
className : Listmodules . b2
} ) ]
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "a" , {
className : "" . concat ( Listmodules . actionLink ) ,
onClick : function onClick ( ) {
return onDelete ( data . id ) ;
} ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "i" , {
className : "iconfont icon-shanchu11 " . concat ( Listmodules . actionIcon )
} ) , "\u5220\u9664" ]
} ) ]
} ) , authRole && /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( row /* default */ . Z , {
align : "middle" ,
className : Listmodules . actionLinkWrapper ,
@ -756,27 +807,6 @@ var List = function List(_ref) {
} ) , "\u6A21\u62DF\u8003\u8BD5" ]
} )
} ) ]
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( dropdown /* default */ . Z , {
dropdownRender : function dropdownRender ( ) {
return menu ;
} ,
children : /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( row /* default */ . Z , {
align : "middle" ,
className : Listmodules . actionLinkWrapper ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
className : Listmodules . line ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "b" , {
className : Listmodules . b1
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "b" , {
className : Listmodules . b2
} ) ]
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "a" , {
className : "" . concat ( Listmodules . actionLink ) ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "i" , {
className : "iconfont icon-gengduo5 font14 mr5 " . concat ( Listmodules . actionIcon )
} ) , "\u66F4\u591A" ]
} ) ]
} )
} ) ]
} ) ]
} ) ]
@ -1071,13 +1101,12 @@ var jiangxu = __webpack_require__(23972);
var TabPane = tabs /* default */ . Z . TabPane ;
var Search = input /* default */ . Z . Search ;
var PaperlibraryPage = function PaperlibraryPage ( _ref ) {
var _paperlibrary$teachGr 5, _paperlibrary$discipl , _paperlibrary$teachGr6 , _paperlibrary$actionT , _paperlibrary$actionT2 ;
var _paperlibrary$teachGr 3, _paperlibrary$discipl , _paperlibrary$teachGr4 , _paperlibrary$actionT , _paperlibrary$actionT2 ;
var paperlibrary = _ref . paperlibrary ,
user = _ref . user ,
globalSetting = _ref . globalSetting ,
@ -1153,30 +1182,6 @@ var PaperlibraryPage = function PaperlibraryPage(_ref) {
_useState24 = slicedToArray _default ( ) ( _useState23 , 2 ) ,
SortNumber2 = _useState24 [ 0 ] ,
setSortNumber2 = _useState24 [ 1 ] ; //默认为1
var _Form$useForm = es _form /* default */ . Z . useForm ( ) ,
_Form$useForm2 = slicedToArray _default ( ) ( _Form$useForm , 1 ) ,
form = _Form$useForm2 [ 0 ] ;
var _useState25 = ( 0 , _react _17 _0 _2 _react . useState ) ( 1 ) ,
_useState26 = slicedToArray _default ( ) ( _useState25 , 2 ) ,
subType = _useState26 [ 0 ] ,
setSubType = _useState26 [ 1 ] ;
var _useState27 = ( 0 , _react _17 _0 _2 _react . useState ) ( [ ] ) ,
_useState28 = slicedToArray _default ( ) ( _useState27 , 2 ) ,
options = _useState28 [ 0 ] ,
setOptions = _useState28 [ 1 ] ;
var _useState29 = ( 0 , _react _17 _0 _2 _react . useState ) ( false ) ,
_useState30 = slicedToArray _default ( ) ( _useState29 , 2 ) ,
showPublicModal = _useState30 [ 0 ] ,
setShowPublicModal = _useState30 [ 1 ] ;
var _useState31 = ( 0 , _react _17 _0 _2 _react . useState ) ( null ) ,
_useState32 = slicedToArray _default ( ) ( _useState31 , 2 ) ,
rowData = _useState32 [ 0 ] ,
setRowData = _useState32 [ 1 ] ;
var _useState33 = ( 0 , _react _17 _0 _2 _react . useState ) ( false ) ,
_useState34 = slicedToArray _default ( ) ( _useState33 , 2 ) ,
isBatchPublic = _useState34 [ 0 ] ,
setIsBatchPublic = _useState34 [ 1 ] ;
var SortMenus = [ {
name : '按更新时间升序' ,
type : 'updated_at' ,
@ -1665,94 +1670,6 @@ var PaperlibraryPage = function PaperlibraryPage(_ref) {
}
} ) ;
} ;
var handleShare = /*#__PURE__*/ function ( ) {
var _ref7 = asyncToGenerator _default ( ) ( /*#__PURE__*/ regeneratorRuntime _default ( ) ( ) . mark ( function _callee7 ( id ) {
var _paperlibrary$teachGr3 , _paperlibrary$teachGr4 ;
return regeneratorRuntime _default ( ) ( ) . wrap ( function _callee7$ ( _context7 ) {
while ( 1 ) switch ( _context7 . prev = _context7 . next ) {
case 0 :
if ( ( _paperlibrary$teachGr3 = paperlibrary . teachGroupData ) !== null && _paperlibrary$teachGr3 !== void 0 && ( _paperlibrary$teachGr3 = _paperlibrary$teachGr3 . groups ) !== null && _paperlibrary$teachGr3 !== void 0 && _paperlibrary$teachGr3 . length ) {
_context7 . next = 2 ;
break ;
}
return _context7 . abrupt ( "return" , message /* default */ . ZP . info ( '您暂未创建或加入任何教研团队,请前往“账号管理-教研团队”查看' ) ) ;
case 2 :
modal /* default */ . Z . confirm ( {
centered : true ,
width : 530 ,
okText : '确定' ,
cancelText : '取消' ,
title : '共享至教研团队' ,
maskClosable : true ,
icon : null ,
content : /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "div" , {
className : "font14 " . concat ( Paperlibrarymodules . overflow ) ,
children : /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( es _checkbox /* default */ . Z . Group , {
className : Paperlibrarymodules . checkbox ,
defaultValue : joinGroupDataRef . current ,
onChange : function onChange ( value ) {
return joinGroupDataRef . current = value ;
} ,
children : ( _paperlibrary$teachGr4 = paperlibrary . teachGroupData ) === null || _paperlibrary$teachGr4 === void 0 || ( _paperlibrary$teachGr4 = _paperlibrary$teachGr4 . groups ) === null || _paperlibrary$teachGr4 === void 0 ? void 0 : _paperlibrary$teachGr4 . map ( function ( item ) {
return /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( es _checkbox /* default */ . Z , {
value : item . group _id ,
children : item . name
} , item . group _id ) ;
} )
} )
} ) ,
onOk : function onOk ( ) {
return new Promise ( /*#__PURE__*/ function ( ) {
var _ref8 = asyncToGenerator _default ( ) ( /*#__PURE__*/ regeneratorRuntime _default ( ) ( ) . mark ( function _callee6 ( resolve , reject ) {
var _joinGroupDataRef$cur2 ;
var res ;
return regeneratorRuntime _default ( ) ( ) . wrap ( function _callee6$ ( _context6 ) {
while ( 1 ) switch ( _context6 . prev = _context6 . next ) {
case 0 :
if ( ( _joinGroupDataRef$cur2 = joinGroupDataRef . current ) !== null && _joinGroupDataRef$cur2 !== void 0 && _joinGroupDataRef$cur2 . length ) {
_context6 . next = 3 ;
break ;
}
message /* default */ . ZP . info ( '请先选择教研团队' ) ;
return _context6 . abrupt ( "return" , reject ( ) ) ;
case 3 :
_context6 . next = 5 ;
return ( 0 , problemset /* batchShare */ . GW ) ( {
ids : id ,
clazz : 'ExaminationBank' ,
group _ids : joinGroupDataRef . current
} ) ;
case 5 :
res = _context6 . sent ;
if ( ( res === null || res === void 0 ? void 0 : res . status ) === 0 ) {
message /* default */ . ZP . info ( '所选试卷成功分享至教研团队' ) ;
joinGroupDataRef . current = [ ] ;
handleReloadData ( ) ;
setSelectIds ( [ ] ) ;
resolve ( ) ;
}
case 7 :
case "end" :
return _context6 . stop ( ) ;
}
} , _callee6 ) ;
} ) ) ;
return function ( _x8 , _x9 ) {
return _ref8 . apply ( this , arguments ) ;
} ;
} ( ) ) ;
}
} ) ;
case 3 :
case "end" :
return _context7 . stop ( ) ;
}
} , _callee7 ) ;
} ) ) ;
return function handleShare ( _x7 ) {
return _ref7 . apply ( this , arguments ) ;
} ;
} ( ) ;
var handleBatchSetPublic = function handleBatchSetPublic ( ) {
var _paperlibraryList$fil2 , _paperlibraryList$fil3 ;
if ( ! ( selectIds !== null && selectIds !== void 0 && selectIds . length ) ) {
@ -1772,171 +1689,72 @@ var PaperlibraryPage = function PaperlibraryPage(_ref) {
} ) ) {
return message /* default */ . ZP . info ( '所选试卷已公开,请重新选择' ) ;
}
if ( window . localStorage . getItem ( 'paperlibrary-set-public-hint-flag' ) === "1" ) {
handleBatchSetPublicRequest ( ) ;
} else {
var _paperlibraryList$fil4 ;
if ( paperlibraryList !== null && paperlibraryList !== void 0 && ( _paperlibraryList$fil4 = paperlibraryList . filter ( function ( x ) {
return selectIds . includes ( x . id ) ;
} ) ) !== null && _paperlibraryList$fil4 !== void 0 && _paperlibraryList$fil4 . find ( function ( x ) {
return ! ( x !== null && x !== void 0 && x . sub _discipline _id ) ;
} ) ) {
return message /* default */ . ZP . info ( '部分试卷暂未设置方向课程信息,请先设置方向课程再进行公开' ) ;
window . localStorage . getItem ( 'paperlibrary-set-public-hint-flag' ) === "1" ? handleBatchSetPublicRequest ( ) : modal /* default */ . Z . confirm ( {
centered : true ,
width : 530 ,
okText : '确定' ,
cancelText : '取消' ,
title : '公开规则告知' ,
maskClosable : true ,
icon : null ,
content : /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
className : "font16 c-grey-333" ,
children : [ "\u516C\u5F00\u5E76\u7ECF\u5E73\u53F0\u5BA1\u6838\u540E\uFF0C\u8BE5\u8BD5\u5377\u5C06\u5728\u516C\u5171\u8BD5\u5377\u5E93\u53EF\u89C1\uFF0CEducoder\u6240\u6709\u7528\u6237\u5747\u53EF\u4F7F\u7528\u8BE5\u8BD5\u5377\uFF1B\u4E14\u8BE5\u8BD5\u5377\u4E0B\u6240\u6709\u8BD5\u9898\u4E00\u5E76\u516C\u5F00\u3002" , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "br" , { } ) , "\u516C\u5F00\u540E\u4E0D\u53EF\u4FEE\u6539\uFF0C\u4F46\u53EF\u4EE5\u64A4\u9500\uFF1B\u64A4\u9500\u516C\u5F00\u540E\u53EF\u4EE5\u4FEE\u6539\u3002" , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "br" , { } ) , "\u662F\u5426\u786E\u8BA4\u7533\u8BF7\u516C\u5F00\uFF1F" , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "br" , { } ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( es _checkbox /* default */ . Z , {
className : "mt10" ,
defaultChecked : false ,
onChange : function onChange ( e ) {
return hintFlagRef . current = e . target . checked ;
} ,
children : "\u4E0D\u518D\u63D0\u793A"
} ) ]
} ) ,
onOk : function onOk ( ) {
handleBatchSetPublicRequest ( ) ;
}
setIsBatchPublic ( true ) ;
openPublicModal ( ) ;
}
} ;
var handleSetPublic = /*#__PURE__*/ function ( ) {
var _ref9 = asyncToGenerator _default ( ) ( /*#__PURE__*/ regeneratorRuntime _default ( ) ( ) . mark ( function _callee8 ( data ) {
var _paperlibraryList$fil5 ;
return regeneratorRuntime _default ( ) ( ) . wrap ( function _callee8$ ( _context8 ) {
while ( 1 ) switch ( _context8 . prev = _context8 . next ) {
case 0 :
if ( ! ( paperlibraryList !== null && paperlibraryList !== void 0 && ( _paperlibraryList$fil5 = paperlibraryList . filter ( function ( x ) {
return x . id === ( data === null || data === void 0 ? void 0 : data . id ) ;
} ) ) !== null && _paperlibraryList$fil5 !== void 0 && _paperlibraryList$fil5 . every ( function ( x ) {
return x [ "public" ] ;
} ) ) ) {
_context8 . next = 2 ;
break ;
}
return _context8 . abrupt ( "return" , message /* default */ . ZP . info ( '所选试卷已公开,请重新选择' ) ) ;
case 2 :
if ( window . localStorage . getItem ( 'paperlibrary-set-public-hint-flag' ) === "1" ) {
handleBatchSetPublicRequest ( ) ;
} else {
setIsBatchPublic ( false ) ;
openPublicModal ( data ) ;
}
case 3 :
case "end" :
return _context8 . stop ( ) ;
}
} , _callee8 ) ;
} ) ) ;
return function handleSetPublic ( _x10 ) {
return _ref9 . apply ( this , arguments ) ;
} ;
} ( ) ;
// 打开公开规则告知
var openPublicModal = function openPublicModal ( data ) {
setShowPublicModal ( true ) ;
setSubType ( 1 ) ;
form . setFieldValue ( 'type' , 1 ) ;
getData ( data ) ;
setRowData ( data ) ;
} ) ;
} ;
/** * 获取方向课程数据*/
var getData = /*#__PURE__*/ function ( ) {
var _ref10 = asyncToGenerator _default ( ) ( /*#__PURE__*/ regeneratorRuntime _default ( ) ( ) . mark ( function _callee9 ( data ) {
var result ;
return regeneratorRuntime _default ( ) ( ) . wrap ( function _callee9$ ( _context9 ) {
while ( 1 ) switch ( _context9 . prev = _context9 . next ) {
case 0 :
_context9 . next = 2 ;
return ( 0 , fetch /* default */ . ZP ) ( "/api/disciplines.json" , {
method : 'get' ,
params : {
source : 'subject'
}
} ) ;
case 2 :
result = _context9 . sent ;
setOptions ( result . disciplines || [ ] ) ;
if ( data !== null && data !== void 0 && data . sub _discipline _id ) {
form . setFieldValue ( 'sub_discipline_id' , [ data === null || data === void 0 ? void 0 : data . discipline _id , data === null || data === void 0 ? void 0 : data . sub _discipline _id ] ) ;
}
case 5 :
case "end" :
return _context9 . stop ( ) ;
}
} , _callee9 ) ;
} ) ) ;
return function getData ( _x11 ) {
return _ref10 . apply ( this , arguments ) ;
} ;
} ( ) ;
var handleBatchSetPublicRequest = /*#__PURE__*/ function ( ) {
var _ref 11 = asyncToGenerator _default ( ) ( /*#__PURE__*/ regeneratorRuntime _default ( ) ( ) . mark ( function _callee 10 ( ) {
var source , ids, res, _data$sub _discipline _ , data ;
return regeneratorRuntime _default ( ) ( ) . wrap ( function _callee 10$( _context10 ) {
while ( 1 ) switch ( _context 10. prev = _context10 . next ) {
var _ref7 = asyncToGenerator _default ( ) ( /*#__PURE__*/ regeneratorRuntime _default ( ) ( ) . mark ( function _callee6 ( ) {
var source , res ;
return regeneratorRuntime _default ( ) ( ) . wrap ( function _callee6$ ( _context6 ) {
while ( 1 ) switch ( _context6 . prev = _context6 . next ) {
case 0 :
source = activeTabsKey === "2" ? 1 : 2 ; // 试题来源; 1 教研团队分享的, 2 我创建的
ids = paperlibraryList ? paperlibraryList . filter ( function ( x ) {
return selectIds . includes ( x . id ) && ! ( x [ "public" ] || x . apply ) ;
} ) . map ( function ( x ) {
return x . id ;
} ) : [ ] ;
res = null ;
if ( ! isBatchPublic ) {
_context10 . next = 9 ;
break ;
}
_context10 . next = 6 ;
_context6 . next = 3 ;
return ( 0 , service _paperlibrary /* batchPublic */ . Qp ) ( {
ids : i ds,
ids : selectIds ,
source : source
} ) ;
case 6 :
res = _context10 . sent ;
_context10 . next = 13 ;
break ;
case 9 :
data = form . getFieldsValue ( ) ;
_context10 . next = 12 ;
return ( 0 , service _paperlibrary /* singlePublic */ . wX ) ( {
id : rowData === null || rowData === void 0 ? void 0 : rowData . id ,
source : source ,
user _customize : ( data === null || data === void 0 ? void 0 : data . type ) == 2 ? true : false ,
sub _discipline _id : data === null || data === void 0 || ( _data$sub _discipline _ = data . sub _discipline _id ) === null || _data$sub _discipline _ === void 0 ? void 0 : _data$sub _discipline _ [ 1 ] ,
discipline _name : data === null || data === void 0 ? void 0 : data . discipline _name ,
sub _discipline _name : data === null || data === void 0 ? void 0 : data . sub _discipline _name
} ) ;
case 12 :
res = _context10 . sent ;
case 13 :
case 3 :
res = _context6 . sent ;
if ( res . status === 0 ) {
hintFlagRef . current && window . localStorage . setItem ( 'paperlibrary-set-public-hint-flag' , '1' ) ;
hintFlagRef . current = false ;
handleReloadData ( ) ;
message /* default */ . ZP . success ( '申请成功' ) ;
form . resetFields ( ) ;
setRowData ( null ) ;
setShowPublicModal ( false ) ;
}
// const res = await batchPublic({ ids: id || selectIds, source });
// if (res.status === 0) {
// hintFlagRef.current && window.localStorage.setItem('paperlibrary-set-public-hint-flag', '1');
// hintFlagRef.current = false;
// handleReloadData();
// }
case 14 :
case 5 :
case "end" :
return _context 10 . stop ( ) ;
return _context6 . stop ( ) ;
}
} , _callee 10 ) ;
} , _callee6 ) ;
} ) ) ;
return function handleBatchSetPublicRequest ( ) {
return _ref 11 . apply ( this , arguments ) ;
return _ref7 . apply ( this , arguments ) ;
} ;
} ( ) ;
var handleCancelShare = /*#__PURE__*/ function ( ) {
var _ref 12 = asyncToGenerator _default ( ) ( /*#__PURE__*/ regeneratorRuntime _default ( ) ( ) . mark ( function _callee 13 ( id ) {
var _ref8 = asyncToGenerator _default ( ) ( /*#__PURE__*/ regeneratorRuntime _default ( ) ( ) . mark ( function _callee9 ( id ) {
var res , data ;
return regeneratorRuntime _default ( ) ( ) . wrap ( function _callee 13$( _context13 ) {
while ( 1 ) switch ( _context 13. prev = _context13 . next ) {
return regeneratorRuntime _default ( ) ( ) . wrap ( function _callee9$ ( _context9 ) {
while ( 1 ) switch ( _context9 . prev = _context9 . next ) {
case 0 :
_context 13 . next = 2 ;
_context9 . next = 2 ;
return ( 0 , problemset /* getTeachGroupDataById */ . hg ) ( {
clazz : 'ExaminationBank' ,
id : id
} ) ;
case 2 :
res = _context 13 . sent ;
res = _context9 . sent ;
data = ( res === null || res === void 0 ? void 0 : res . groups ) || [ ] ;
joinGroupDataRef . current = [ ] ;
modal /* default */ . Z . confirm ( {
@ -1967,58 +1785,58 @@ var PaperlibraryPage = function PaperlibraryPage(_ref) {
} ) ]
} ) ,
onOk : function ( ) {
var _onOk = asyncToGenerator _default ( ) ( /*#__PURE__*/ regeneratorRuntime _default ( ) ( ) . mark ( function _callee 12 ( ) {
return regeneratorRuntime _default ( ) ( ) . wrap ( function _callee 12$( _context12 ) {
while ( 1 ) switch ( _context 12. prev = _context12 . next ) {
var _onOk = asyncToGenerator _default ( ) ( /*#__PURE__*/ regeneratorRuntime _default ( ) ( ) . mark ( function _callee 8 ( ) {
return regeneratorRuntime _default ( ) ( ) . wrap ( function _callee 8$( _context8 ) {
while ( 1 ) switch ( _context 8. prev = _context8 . next ) {
case 0 :
return _context 12 . abrupt ( "return" , new Promise ( /*#__PURE__*/ function ( ) {
var _ref 13 = asyncToGenerator _default ( ) ( /*#__PURE__*/ regeneratorRuntime _default ( ) ( ) . mark ( function _callee 11 ( resolve , reject ) {
return _context 8 . abrupt ( "return" , new Promise ( /*#__PURE__*/ function ( ) {
var _ref 9 = asyncToGenerator _default ( ) ( /*#__PURE__*/ regeneratorRuntime _default ( ) ( ) . mark ( function _callee 7 ( resolve , reject ) {
var _data$map ;
var group _ids , res ;
return regeneratorRuntime _default ( ) ( ) . wrap ( function _callee 11$( _context11 ) {
while ( 1 ) switch ( _context 11. prev = _context11 . next ) {
return regeneratorRuntime _default ( ) ( ) . wrap ( function _callee 7$( _context7 ) {
while ( 1 ) switch ( _context 7. prev = _context7 . next ) {
case 0 :
if ( joinGroupDataRef . current . length ) {
_context 11 . next = 3 ;
_context 7 . next = 3 ;
break ;
}
message /* default */ . ZP . warning ( '请选择需要撤销共享的教研团队' ) ;
return _context 11 . abrupt ( "return" , reject ( ) ) ;
return _context 7 . abrupt ( "return" , reject ( ) ) ;
case 3 :
group _ids = data === null || data === void 0 || ( _data$map = data . map ( function ( x ) {
return x . group _id ;
} ) ) === null || _data$map === void 0 ? void 0 : _data$map . filter ( function ( id ) {
return ! joinGroupDataRef . current . includes ( id ) ;
} ) ;
_context 11 . next = 6 ;
_context 7 . next = 6 ;
return ( 0 , problemset /* batchShare */ . GW ) ( {
ids : [ id ] ,
clazz : 'ExaminationBank' ,
group _ids : group _ids
} ) ;
case 6 :
res = _context 11 . sent ;
res = _context 7 . sent ;
joinGroupDataRef . current = [ ] ;
if ( ( res === null || res === void 0 ? void 0 : res . status ) === 0 ) {
message /* default */ . ZP . info ( '撤销共享成功' ) ;
handleReloadData ( ) ;
}
return _context 11 . abrupt ( "return" , resolve ( ) ) ;
return _context 7 . abrupt ( "return" , resolve ( ) ) ;
case 10 :
case "end" :
return _context 11 . stop ( ) ;
return _context 7 . stop ( ) ;
}
} , _callee 11 ) ;
} , _callee 7 ) ;
} ) ) ;
return function ( _x 13, _x14 ) {
return _ref 13 . apply ( this , arguments ) ;
return function ( _x 8, _x9 ) {
return _ref 9 . apply ( this , arguments ) ;
} ;
} ( ) ) ) ;
case 1 :
case "end" :
return _context 12 . stop ( ) ;
return _context 8 . stop ( ) ;
}
} , _callee 12 ) ;
} , _callee 8 ) ;
} ) ) ;
function onOk ( ) {
return _onOk . apply ( this , arguments ) ;
@ -2028,12 +1846,12 @@ var PaperlibraryPage = function PaperlibraryPage(_ref) {
} ) ;
case 6 :
case "end" :
return _context 13 . stop ( ) ;
return _context 9 . stop ( ) ;
}
} , _callee 13 ) ;
} , _callee 9 ) ;
} ) ) ;
return function handleCancelShare ( _x 12 ) {
return _ref 12 . apply ( this , arguments ) ;
return function handleCancelShare ( _x 7 ) {
return _ref 8 . apply ( this , arguments ) ;
} ;
} ( ) ;
var handleChangeTeachGroup = function handleChangeTeachGroup ( id ) {
@ -2042,12 +1860,12 @@ var PaperlibraryPage = function PaperlibraryPage(_ref) {
setParams ( params ) ;
getPaperlibraryList ( params ) ;
} ;
var _ref1 4 = user . userInfo || { } ,
admin = _ref1 4 . admin ,
business = _ref1 4 . business ,
is _shixun _marker = _ref1 4 . is _shixun _marker ,
is _teacher = _ref1 4 . is _teacher ,
user _identity = _ref1 4 . user _identity ;
var _ref1 0 = user . userInfo || { } ,
admin = _ref1 0 . admin ,
business = _ref1 0 . business ,
is _shixun _marker = _ref1 0 . is _shixun _marker ,
is _teacher = _ref1 0 . is _teacher ,
user _identity = _ref1 0 . user _identity ;
var showTestPaper = admin || business || is _shixun _marker || is _teacher || user _identity !== "学生" ;
return /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( _react _17 _0 _2 _react . Fragment , {
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "section" , {
@ -2107,7 +1925,7 @@ var PaperlibraryPage = function PaperlibraryPage(_ref) {
onChange : handleTabsChange ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( TabPane , {
tab : "\u516C\u5171"
} , "1" ) , ( ( _paperlibrary$teachGr 5 = paperlibrary . teachGroupData ) === null || _paperlibrary$teachGr 5 === void 0 || ( _paperlibrary$teachGr5 = _paperlibrary$teachGr5 . groups ) === null || _paperlibrary$teachGr5 === void 0 ? void 0 : _paperlibrary$teachGr 5 . length ) && /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( TabPane , {
} , "1" ) , ( ( _paperlibrary$teachGr 3 = paperlibrary . teachGroupData ) === null || _paperlibrary$teachGr 3 === void 0 || ( _paperlibrary$teachGr3 = _paperlibrary$teachGr3 . groups ) === null || _paperlibrary$teachGr3 === void 0 ? void 0 : _paperlibrary$teachGr 3 . length ) && /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( TabPane , {
tab : "\u56E2\u961F\u5171\u4EAB"
} , "2" ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( TabPane , {
tab : "\u6211\u521B\u5EFA\u7684"
@ -2129,7 +1947,7 @@ var PaperlibraryPage = function PaperlibraryPage(_ref) {
onDirectionChange : handleDirectionChange ,
onTypeChange : handleTypeChange ,
onDifficultyChange : handleDifficultyChange ,
teachGroupData : paperlibrary === null || paperlibrary === void 0 || ( _paperlibrary$teachGr 6 = paperlibrary . teachGroupData ) === null || _paperlibrary$teachGr 6 === void 0 ? void 0 : _paperlibrary$teachGr 6 . groups ,
teachGroupData : paperlibrary === null || paperlibrary === void 0 || ( _paperlibrary$teachGr 4 = paperlibrary . teachGroupData ) === null || _paperlibrary$teachGr 4 === void 0 ? void 0 : _paperlibrary$teachGr 4 . groups ,
onTeachGroupChange : handleChangeTeachGroup ,
teachGroupValue : params . group _id ,
showTeachGroup : activeTabsKey === "2"
@ -2220,9 +2038,7 @@ var PaperlibraryPage = function PaperlibraryPage(_ref) {
onPublicReview : handlePublicReview ,
onEdit : handleEdit ,
onDelete : handleDelete ,
onSendToClass : handleSendToClass ,
onSetPublic : handleSetPublic ,
onShare : handleShare
onSendToClass : handleSendToClass
} , item . id ) ;
} )
} ) : /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( spin /* default */ . Z , {
@ -2328,122 +2144,6 @@ var PaperlibraryPage = function PaperlibraryPage(_ref) {
} ) ]
} ) ]
} )
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( modal /* default */ . Z , {
width : 640 ,
className : Paperlibrarymodules . applyPublicContainer ,
centered : true ,
closable : false ,
title : "\u516C\u5F00\u89C4\u5219\u544A\u77E5" ,
open : showPublicModal ,
onCancel : function onCancel ( ) {
setShowPublicModal ( false ) ;
form . resetFields ( ) ;
setRowData ( null ) ;
} ,
onOk : function onOk ( ) {
form . validateFields ( ) . then ( /*#__PURE__*/ function ( ) {
var _ref15 = asyncToGenerator _default ( ) ( /*#__PURE__*/ regeneratorRuntime _default ( ) ( ) . mark ( function _callee14 ( values ) {
return regeneratorRuntime _default ( ) ( ) . wrap ( function _callee14$ ( _context14 ) {
while ( 1 ) switch ( _context14 . prev = _context14 . next ) {
case 0 :
handleBatchSetPublicRequest ( ) ;
case 1 :
case "end" :
return _context14 . stop ( ) ;
}
} , _callee14 ) ;
} ) ) ;
return function ( _x15 ) {
return _ref15 . apply ( this , arguments ) ;
} ;
} ( ) ) ;
} ,
children : /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
className : Paperlibrarymodules . applyPublicContent ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( "div" , {
className : Paperlibrarymodules . tips ,
children : [ "1.\u516C\u5F00\u7684\u8BD5\u5377\u9700\u8981\u8BBE\u7F6E\u65B9\u5411&\u8BFE\u7A0B\u4FE1\u606F\u3002" , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "br" , { } ) , "2.\u516C\u5F00\u8BD5\u5377\u7533\u8BF7\u7ECF\u5E73\u53F0\u5BA1\u6838\u540E\uFF0C\u8BE5\u8BD5\u5377\u5C06\u5728\u516C\u5171\u8BD5\u5377\u5E93\u53EF\u89C1\uFF0CEducoder\u7684\u6240\u6709\u7528\u6237\u5747\u53EF\u4F7F\u7528\u8BE5\u8BD5\u5377\uFF0C\u4E14\u8BE5\u8BD5\u5377\u4E0B\u7684\u6240\u6709\u8BD5\u9898\u4E00\u5E76\u516C\u5F00\u3002" , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "br" , { } ) , "3.\u516C\u5F00\u540E\u7684\u8BD5\u5377\u4E0D\u652F\u6301\u8FDB\u884C\u7F16\u8F91\uFF0C\u53EF\u4EE5\u64A4\u9500\u540E\u518D\u8FDB\u884C\u7F16\u8F91\u3002" , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "br" , { } ) ]
} ) , ! isBatchPublic && /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( es _form /* default */ . Z , {
labelAlign : "left" ,
size : "large" ,
form : form ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( es _form /* default */ . Z . Item , {
name : "type" ,
children : /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( es _radio /* default.Group */ . ZP . Group , {
onChange : function onChange ( e ) {
setSubType ( e . target . value ) ;
if ( e . target . value == 1 ) {
form . setFieldsValue ( {
discipline _name : '' ,
sub _discipline _name : ''
} ) ;
} else {
if ( rowData !== null && rowData !== void 0 && rowData . sub _discipline _id ) {
form . setFieldValue ( 'sub_discipline_id' , [ rowData === null || rowData === void 0 ? void 0 : rowData . discipline _id , rowData === null || rowData === void 0 ? void 0 : rowData . sub _discipline _id ] ) ;
return ;
}
form . setFieldsValue ( {
sub _discipline _id : [ ]
} ) ;
}
} ,
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( es _radio /* default */ . ZP , {
value : 1 ,
children : "\u5FEB\u901F\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B"
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( es _radio /* default */ . ZP , {
value : 2 ,
style : {
marginLeft : 40
} ,
children : "\u81EA\u5B9A\u4E49\u65B9\u5411&\u8BFE\u7A0B"
} ) ]
} )
} ) , subType == 1 && /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( es _form /* default */ . Z . Item , {
label : "\u65B9\u5411&\u8BFE\u7A0B" ,
name : "sub_discipline_id" ,
rules : [ {
required : true
} ] ,
children : /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( cascader /* default */ . Z , {
expandTrigger : "hover" ,
placeholder : "\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B" ,
options : options ,
fieldNames : {
label : 'name' ,
value : 'id' ,
children : 'sub_disciplines'
} ,
onChange : function onChange ( data , v ) {
return form . setFieldsValue ( {
sub _discipline _id : data
} ) ;
}
} )
} ) , subType == 2 && /*#__PURE__*/ ( 0 , jsx _runtime . jsxs ) ( jsx _runtime . Fragment , {
children : [ /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( es _form /* default */ . Z . Item , {
label : "\u65B9\u5411" ,
name : "discipline_name" ,
rules : [ {
required : true
} ] ,
children : /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( input /* default */ . Z , {
placeholder : "\u8BF7\u8F93\u5165\u65B9\u5411" ,
autoComplete : "off"
} )
} ) , /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( es _form /* default */ . Z . Item , {
label : "\u8BFE\u7A0B" ,
name : "sub_discipline_name" ,
rules : [ {
required : true
} ] ,
children : /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( input /* default */ . Z , {
placeholder : "\u8BF7\u8F93\u5165\u8BFE\u7A0B" ,
autoComplete : "off"
} )
} ) ]
} ) ]
} ) ]
} )
} ) ]
} ) , activeTabsKey === "0" && ! ! ( selectIds !== null && selectIds !== void 0 && selectIds . length ) && /*#__PURE__*/ ( 0 , jsx _runtime . jsx ) ( "div" , {
className : Paperlibrarymodules . batch ,
@ -2504,11 +2204,11 @@ var PaperlibraryPage = function PaperlibraryPage(_ref) {
} ) ]
} ) ;
} ;
/* harmony default export */ var Paperlibrary = ( ( 0 , _umi _production _exports . connect ) ( function ( _ref1 6 ) {
var paperlibrary = _ref1 6 . paperlibrary ,
user = _ref1 6 . user ,
loading = _ref1 6 . loading ,
globalSetting = _ref1 6 . globalSetting ;
/* harmony default export */ var Paperlibrary = ( ( 0 , _umi _production _exports . connect ) ( function ( _ref1 1 ) {
var paperlibrary = _ref1 1 . paperlibrary ,
user = _ref1 1 . user ,
loading = _ref1 1 . loading ,
globalSetting = _ref1 1 . globalSetting ;
return {
paperlibrary : paperlibrary ,
user : user ,