You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__User__Detail__Paths__ind...

1 line
16 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[94662],{89136:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(1565),a=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},s=n(68475),i=function(e,t){return a.createElement(s.Z,(0,r.Z)({},e,{ref:t,icon:o}))};var c=a.forwardRef(i)},7406:function(e,t,n){var r=n(82242),a=n.n(r),o=(n(59301),n(93314)),s=n(3113),i=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,r=void 0===n?{}:n,c=e.styles,l=void 0===c?{}:c,u=e.customText,d=e.ButtonText,p=e.ButtonClick,f=e.Buttonclass,m=e.ButtonTwo,g=e.imgStyles,_=e.loading,h=void 0!==_&&_;return(0,i.jsxs)("section",{className:"tc animated fadeIn",style:a()(a()({},{color:"#999",margin:"100px auto",visibility:h?"hidden":"visible"}),l),children:[(0,i.jsx)("img",{src:t||o,style:a()(a()({},g),{},{pointerEvents:"none",userSelect:"none"})}),(0,i.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,i.jsx)(s.ZP,a()(a()({className:f,onClick:p},r),{},{children:d})),m&&m]})}},35513:function(e,t,n){n.r(t),n.d(t,{default:function(){return E}});var r=n(7557),a=n.n(r),o=n(41498),s=n.n(o),i=n(79800),c=n.n(i),l=n(39647),u=n.n(l),d=n(59301),p=n(7880),f=n(56511),m=n(53864),g={flex_box_center:"flex_box_center___IuXaZ",flex_space_between:"flex_space_between___FgiDp",flex_box_vertical_center:"flex_box_vertical_center____WBjP",flex_box_center_end:"flex_box_center_end___CPJQF",flex_box_column:"flex_box_column___ivE9u",wrap:"wrap___iwvHC",midWrap:"midWrap___JC0F2",color999:"color999___aMrEh",orderWrap:"orderWrap___gxKVG",orderIconWrap:"orderIconWrap___O1L7r",orderAsc:"orderAsc___aghh_",orderDesc:"orderDesc___q0uG2",color0152d9:"color0152d9___UuR9f",h10:"h10___dl8aJ",cursorPointer:"cursorPointer___mLanQ",orderTextWrap:"orderTextWrap___ghSqq",cardWrap:"cardWrap___Wv0mR",countWrap:"countWrap___NIkIb",type:"type___m6IRF"},_=n(6848),h=n(14491),x="tagY___S9fxB",v="tagB___R3ZdV",y="text___vAK5m",b=n(99232),w=n.n(b),j=n(6457),C=n(90963),S=n(37712),P=function(e){var t=e.data,n=e.number,r=e.params,a=e.setParams,o=e.getPaths,s=[{title:"序号",dataIndex:"index",key:"index",width:55,render:function(e,t,r){return(0,S.jsx)("span",{children:n+r+1})}},{title:"实践课程名称",dataIndex:"name",sorter:!0,sortOrder:"name"===r.sort_by?"desc"===r.sort_direction?"descend":"ascend":null,key:"name",render:function(e){return(0,S.jsx)(_.Z,{title:e,placement:"bottomLeft",children:(0,S.jsx)("span",{className:y,children:e})})}},{title:"管理员",dataIndex:"owner_name",key:"owner_name",width:78,ellipsis:!0,render:function(e){return(0,S.jsx)(_.Z,{title:e||"--",placement:"bottomLeft",children:(0,S.jsx)("span",{children:e||"--"})})}},{title:"合作者",dataIndex:"members",key:"members",width:134,ellipsis:!0,render:function(e){return(0,S.jsx)(_.Z,{title:e.join("、"),placement:"bottomLeft",children:(0,S.jsx)("span",{children:e.join("、")})})}},{title:"学习人数",dataIndex:"members_count",width:80,key:"members_count",render:function(e){return(0,S.jsx)("span",{className:"c-grey-666",children:e})}},{title:"创建时间",dataIndex:"created_at",key:"created_at",sorter:!0,sortOrder:"created_at"===r.sort_by?"desc"===r.sort_direction?"descend":"ascend":null,width:110,render:function(e){return(0,S.jsx)("span",{className:"c-grey-666",children:w()(e).format("YYYY-MM-DD")})}},{title:"章节数",dataIndex:"stages_count",width:70,key:"stages_count",render:function(e){return(0,S.jsx)("span",{className:"c-grey-666",children:e})}},{title:"实训数",dataIndex:"shixuns_count",width:70,key:"shixuns_count",render:function(e){return(0,S.jsx)("span",{className:"c-grey-666",children:e})}},{title:"课程标签",dataIndex:"excellent",width:88,key:"excellent",align:"center",render:function(e,t){return(0,S.jsxs)(S.Fragment,{children:[t.featured>0&&(0,S.jsxs)("div",{className:x,children:[1===t.featured&&"国家一流",2===t.featured&&"军队一流",3===t.featured&&"省级一流",4===t.featured&&"精品课程"]}),e&&(0,S.jsx)("div",{className:v,children:"开放课程"}),!(null!=t&&t.featured)&&!e&&(0,S.jsx)("span",{className:"c-grey-666",children:"- -"})]})}},{title:"操作",dataIndex:"name",key:"name",width:65,align:"right",render:function(e,t){return(0,S.jsx)("span",{className:"current-primary",onClick:function(e){e.stopPropagation(),(0,j.xg)("/paths/".concat(t.id))},children:"详情"})}}];return(0,S.jsx)(d.Fragment,{children:(0,S.jsx)(C.Gi,{children:(0,S.jsx)(h.Z,{style:{cursor:"pointer"},onRow:function(e){return{onClick:function(t){window.open("/paths/".concat(e.id),"_blank")}}},onChange:function(e,t,n){n.field&&(r.sort_by=n.field),n.order||(r.sort_direction="asc"),"ascend"===n.order&&(r.sort_direction="asc"),"descend"===n.order&&(r.sort_direction="desc"),n.order||(r.sort_direction="asc"),a(r),o(r)},pagination:!1,dataSource:t,columns:s})})})},N=n(89392),k=n(89918),O=["user","userDetail","globalSetting","loading","dispatch"],E=(0,p.connect)((function(e){var t=e.user,n=e.userDetail,r=e.loading;return{user:t,userDetail:n,globalSetting:e.globalSetting,loading:r.effects}}))((function(e){var t,n,r=e.user,o=(e.userDetail,e.globalSetting,e.loading),i=e.dispatch,l=(u()(e,O),(0,p.useSearchParams)()),_=c()(l,1)[0],h=(0,p.useLocation)(),x=(0,d.useRef)(),v=(0,d.useState)({}),y=c()(v,2),b=y[0],w=y[1],E=(0,d.useState)(0),I=c()(E,2),Z=I[0],z=I[1],M=(0,d.useState)([]),D=c()(M,2),W=D[0],B=D[1],T=(0,d.useState)(),R=c()(T,2),L=R[0],A=R[1],$=(0,d.useState)(!1),q=c()($,2),F=(q[0],q[1],(0,d.useState)([{label:(0,S.jsx)("span",{className:"icon-juxingfenbu font14"}),value:1},{label:(0,S.jsx)("span",{className:"icon-liebiaofenbu font14"}),value:2}])),Q=c()(F,2),V=(Q[0],Q[1],(0,d.useState)(parseInt(localStorage.getItem("PathShowtype"))||1)),Y=c()(V,2),G=Y[0],J=Y[1],U=(0,d.useRef)((0,N.throttle)((function(e){return K(e)}),500,{trailing:!1}));(0,d.useEffect)((function(){U.current=(0,N.throttle)(K,500,{trailing:!1})}),[b]),(0,d.useEffect)((function(){var e;x.current=null===(e=h.pathname.split("/"))||void 0===e?void 0:e[2];var t={category:_.get("category")||"",status:"manage"===_.get("category")?te.map((function(e){return e.id})).includes(_.get("status"))?_.get("status"):"":("study"===_.get("category")||"collect"===_.get("category"))&&ee.map((function(e){return e.id})).includes(_.get("status"))?_.get("status"):"",page:1,per_page:15,sort_by:"updated_at",sort_direction:"desc",username:x.current};w(t),H(t)}),[h.pathname]),(0,d.useEffect)((function(){var e;A((null===(e=r.userInfo)||void 0===e?void 0:e.login)===x.current)}),[null===(t=r.userInfo)||void 0===t?void 0:t.login,x.current]);var H=function(){var e=s()(a()().mark((function e(t){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"userDetail/getPaths",payload:t});case 2:(n=e.sent)&&(z((null==n?void 0:n.count)||0),B((null==n?void 0:n.subjects)||[]));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),K=function(e){var t;b.category=e,b.status="",null!==(t=window.location.href.toString())&&void 0!==t&&t.includes("category")?((0,j.jz)("category",e),(0,j.jz)("status","")):window.history.replaceState(null,"",window.location.href.indexOf("?")>-1?window.location.href+"&category=".concat(e):"?category=".concat(e)),b.page=1,w(b),H(b)},X=[{id:"",name:"全部"},{id:"manage",name:"".concat(L?"我":"TA","管理的")},{id:"study",name:"".concat(L?"我":"TA","学习的")},{id:"collect",name:"".concat(L?"我":"TA","收藏的")},{id:"payed",name:"".concat(L?"我":"TA","购买的")}],ee=[{id:"",name:"全部"},{id:"unfinished",name:"未完成"},{id:"finished",name:"已完成"}],te=[{id:"",name:"全部"},{id:"editing",name:"编辑中"},{id:"applying",name:"待审核"},{id:"published",name:"已发布"}],ne="manage"===b.category?te:"study"===(null==b?void 0:b.category)||"collect"===(null==b?void 0:b.category)||"payed"===(null==b?void 0:b.category)?ee:[];return(0,S.jsxs)("div",{className:g.wrap,children:[(0,S.jsx)(C.YG,{value:b.category,onChange:K,tabBarExtraContent:(0,S.jsx)(C.t7,{style:{width:303},placeholder:"搜索实践课程",value:b.search,onChange:function(e){b.search=e,b.page=1,w(b),H(b)},onInputChange:function(e){b.search=e,w(b)}}),className:"mb25",dataSource:X}),L&&!!b.category&&(0,S.jsx)(C.qp,{title:"状态",value:b.status,onChange:function(e){var t;b.status=e,b.page=1,null!==(t=window.location.href.toString())&&void 0!==t&&t.includes("status")?(0,j.jz)("status",e):window.history.replaceState(null,"",window.location.href.indexOf("?")>-1?window.location.href+"&status=".concat(e):"?status=".concat(e)),w(b),H(b)},dataSource:ne,titleWidth:28}),(0,S.jsxs)("div",{className:g.midWrap,children:[(0,S.jsx)(C.cq,{sortValue:b.sort_direction,dropValue:b.sort_by,onSort:function(e){b.sort_direction=e,w(b),H(b)},onDrop:function(e){b.sort_by=e,b.sort_direction="desc",w(b),H(b)}}),(0,S.jsxs)("div",{className:g.type,children:[(0,S.jsx)("i",{className:1===G?"iconfont icon-fenbu ".concat(g.cursorPointer," ").concat(g.color0152d9):"iconfont icon-fenbu ".concat(g.cursorPointer),onClick:function(){J(1),localStorage.setItem("PathShowtype","1")}}),(0,S.jsx)("span",{className:g.orderDesc,children:(0,S.jsx)("i",{className:2===G?"iconfont icon-fenbu-2 ".concat(g.cursorPointer," ").concat(g.color0152d9," "):"iconfont icon-fenbu-2 ".concat(g.cursorPointer),onClick:function(){J(2),localStorage.setItem("PathShowtype","2")}})})]}),!("student"===(null===(n=r.userInfo)||void 0===n?void 0:n.identity)&&!(0,k.Ny)())&&(0,S.jsx)(C.op,{style:{marginLeft:"auto"},className:g.btn,onClick:function(){return p.history.push("/paths/new?username=".concat(x.current))},children:"新建实践课程"})]}),(0,S.jsxs)(f.Z,{loading:o["userDetail/getPaths"],active:!0,paragraph:{rows:5},children:[1==G&&(0,S.jsx)(C.cQ,{dataSource:W,right:23,col:3,wrapWidth:887,loading:!1}),1!=G&&(0,S.jsx)("div",{className:"mt10",style:{minHeight:400},children:(0,S.jsx)(P,{number:(b.page-1)*b.per_page,data:W,params:b,setParams:w,getPaths:H})}),Z>0&&(0,S.jsx)("div",{className:g.countWrap,children:(0,S.jsx)(m.Z,{showQuickJumper:!0,showSizeChanger:!0,pageSizeOptions:["10","15","50","100","200"],total:Z,onChange:function(e,t){!function(e,t){b.page=e,b.per_page=t,w(b),H(b)}(e,t)},pageSize:b.per_page,hideOnSinglePage:!0,current:b.page})})]})]})}))},98135:function(e,t,n){n.d(t,{Z:function(){return z}});var r=n(92310),a=n.n(r),o=n(59301),s=n(36355),i=n(32441),c=n(9937);var l=e=>{const{getPrefixCls:t,direction:n}=(0,o.useContext)(s.E_),{prefixCls:r,className:l}=e,u=t("input-group",r),d=t("input"),[p,f]=(0,c.ZP)(d),m=a()(u,{[`${u}-lg`]:"large"===e.size,[`${u}-sm`]:"small"===e.size,[`${u}-compact`]:e.compact,[`${u}-rtl`]:"rtl"===n},f,l),g=(0,o.useContext)(i.aM),_=(0,o.useMemo)((()=>Object.assign(Object.assign({},g),{isFormItemInput:!1})),[g]);return p(o.createElement("span",{className:m,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},o.createElement(i.aM.Provider,{value:_},e.children)))},u=n(9432),d=n(1565),p={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},f=n(68475),m=function(e,t){return o.createElement(f.Z,(0,d.Z)({},e,{ref:t,icon:p}))};var g=o.forwardRef(m),_=n(89136),h=n(70521),x=n(16863),v=n(59412),y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};const b=e=>e?o.createElement(_.Z,null):o.createElement(g,null),w={click:"onClick",hover:"onMouseOver"};var j=o.forwardRef(((e,t)=>{const{visibilityToggle:n=!0}=e,r="object"==typeof n&&void 0!==n.visible,[i,c]=(0,o.useState)((()=>!!r&&n.visible)),l=(0,o.useRef)(null);o.useEffect((()=>{r&&c(n.visible)}),[r,n]);const d=(0,v.Z)(l),p=()=>{const{disabled:t}=e;t||(i&&d(),c((e=>{var t;const r=!e;return"object"==typeof n&&(null===(t=n.onVisibleChange)||void 0===t||t.call(n,r)),r})))},{className:f,prefixCls:m,inputPrefixCls:g,size:_}=e,j=y(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:C}=o.useContext(s.E_),S=C("input",g),P=C("input-password",m),N=n&&(t=>{const{action:n="click",iconRender:r=b}=e,a=w[n]||"",s=r(i),c={[a]:p,className:`${t}-icon`,key:"passwordIcon",onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return o.cloneElement(o.isValidElement(s)?s:o.createElement("span",null,s),c)})(P),k=a()(P,f,{[`${P}-${_}`]:!!_}),O=Object.assign(Object.assign({},(0,h.Z)(j,["suffix","iconRender","visibilityToggle"])),{type:i?"text":"password",className:k,prefixCls:S,suffix:N});return _&&(O.size=_),o.createElement(u.Z,Object.assign({ref:(0,x.sQ)(t,l)},O))})),C=n(11013),S=n(92343),P=n(3113),N=n(19716),k=n(33234),O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};var E=o.forwardRef(((e,t)=>{const{prefixCls:n,inputPrefixCls:r,className:i,size:c,suffix:l,enterButton:d=!1,addonAfter:p,loading:f,disabled:m,onSearch:g,onChange:_,onCompositionStart:h,onCompositionEnd:v}=e,y=O(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:b,direction:w}=o.useContext(s.E_),j=o.useRef(!1),E=b("input-search",n),I=b("input",r),{compactSize:Z}=(0,k.ri)(E,w),z=(0,N.Z)((e=>{var t;return null!==(t=null!=c?c:Z)&&void 0!==t?t:e})),M=o.useRef(null),D=e=>{var t;document.activeElement===(null===(t=M.current)||void 0===t?void 0:t.input)&&e.preventDefault()},W=e=>{var t,n;g&&g(null===(n=null===(t=M.current)||void 0===t?void 0:t.input)||void 0===n?void 0:n.value,e,{source:"input"})},B="boolean"==typeof d?o.createElement(C.Z,null):null,T=`${E}-button`;let R;const L=d||{},A=L.type&&!0===L.type.__ANT_BUTTON;R=A||"button"===L.type?(0,S.Tm)(L,Object.assign({onMouseDown:D,onClick:e=>{var t,n;null===(n=null===(t=null==L?void 0:L.props)||void 0===t?void 0:t.onClick)||void 0===n||n.call(t,e),W(e)},key:"enterButton"},A?{className:T,size:z}:{})):o.createElement(P.ZP,{className:T,type:d?"primary":void 0,size:z,disabled:m,key:"enterButton",onMouseDown:D,onClick:W,loading:f,icon:B},d),p&&(R=[R,(0,S.Tm)(p,{key:"addonAfter"})]);const $=a()(E,{[`${E}-rtl`]:"rtl"===w,[`${E}-${z}`]:!!z,[`${E}-with-button`]:!!d},i);return o.createElement(u.Z,Object.assign({ref:(0,x.sQ)(M,t),onPressEnter:e=>{j.current||f||W(e)}},y,{size:z,onCompositionStart:e=>{j.current=!0,null==h||h(e)},onCompositionEnd:e=>{j.current=!1,null==v||v(e)},prefixCls:I,addonAfter:R,suffix:l,onChange:e=>{e&&e.target&&"click"===e.type&&g&&g(e.target.value,e,{source:"clear"}),_&&_(e)},className:$,disabled:m}))})),I=n(1643);const Z=u.Z;Z.Group=l,Z.Search=E,Z.TextArea=I.Z,Z.Password=j;var z=Z}}]);