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.
1 line
8.4 KiB
1 line
8.4 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[65191],{90921:function(e,t,n){var i=n(82242),s=n.n(i),a=(n(59301),n(93314)),o=n(3113),r=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,i=void 0===n?{}:n,l=e.styles,c=void 0===l?{}:l,d=e.customText,u=e.ButtonText,f=e.ButtonClick,x=e.Buttonclass,p=e.ButtonTwo,_=e.imgStyles,m=e.loading,h=void 0!==m&&m;return(0,r.jsxs)("section",{className:"tc animated fadeIn",style:s()(s()({},{color:"#999",margin:"100px auto",visibility:h?"hidden":"visible"}),c),children:[(0,r.jsx)("img",{src:t||a,style:s()(s()({},_),{},{pointerEvents:"none",userSelect:"none"})}),(0,r.jsx)("p",{className:"mt20 font14",children:d||"暂时还没有相关数据哦!"}),u&&(0,r.jsx)(o.ZP,s()(s()({className:x,onClick:f},i),{},{children:u})),p&&p]})}},73115:function(e,t,n){n.r(t);var i=n(7557),s=n.n(i),a=n(41498),o=n.n(a),r=n(79800),l=n.n(r),c=n(39647),d=n.n(c),u=n(59301),f=n(65233),x=n(31797),p=n(57809),_=n(43418),m=n(14491),h=n(53864),g=(n(79329),n(44425),n(26795)),j=n(27786),y=n(25914),v=n(34933),S=n(94321),b=n(99232),k=n.n(b),w=n(37712),I=["classroomList","globalSetting","loading","user","dispatch"];x.Z.Countdown,p.default.Option;k().locale("ZH-cn");t.default=(0,f.connect)((function(e){var t=e.classroomList,n=e.loading,i=e.globalSetting,s=e.user;return{classroomList:t,globalSetting:i,loading:n.models.classroomList,user:s}}))((function(e){e.classroomList,e.globalSetting,e.loading;var t=e.user,n=(e.dispatch,d()(e,I),(0,f.useSearchParams)()),i=l()(n,1)[0],a=(0,u.useState)(i.get("category")||"manage_certificates"),r=l()(a,2),c=r[0],x=r[1],p=(0,u.useState)(),b=l()(p,2),k=b[0],C=b[1],Z=(0,u.useState)(1),z=l()(Z,2),F=z[0],P=z[1],W=(0,u.useState)(15),N=l()(W,2),T=N[0],L=(N[1],(0,u.useState)(!1)),V=l()(L,2),G=V[0],O=V[1],B=(0,u.useState)([]),A=l()(B,2),q=A[0],E=A[1],H=(0,u.useState)(!1),M=l()(H,2),D=M[0],R=M[1],Y=(0,u.useState)(),J=l()(Y,2),K=J[0],Q=J[1];(0,u.useRef)(),(0,f.useParams)();function U(){return U=o()(s()().mark((function e(n){var i,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,j.ZP)("/api/users/".concat(null==t||null===(i=t.userInfo)||void 0===i?void 0:i.login,"/subjects/").concat(n,".json"),{method:"get",params:{page:F,limit:T}});case 2:(a=e.sent)&&C(a);case 4:case"end":return e.stop()}}),e)}))),U.apply(this,arguments)}(0,u.useEffect)((function(){var e;null!=t&&null!==(e=t.userInfo)&&void 0!==e&&e.login&&function(e){U.apply(this,arguments)}(c)}),[c,F,t]);var X=[{title:"序号",dataIndex:"name",align:"left",key:"name",ellipsis:!0,width:50,render:function(e,t,n){return(0,w.jsx)("span",{children:n+1})}},{title:"课程名称",dataIndex:"subject_name",key:"subject_name"},{title:"申请人",dataIndex:"user_name",key:"user_name"},{title:"申请时间",dataIndex:"created_at",key:"created_at"},{title:"证书编号",dataIndex:"code",key:"code"}],$=[{title:"序号",dataIndex:"name",align:"left",key:"name",ellipsis:!0,width:50,render:function(e,t,n){return(0,w.jsx)("span",{style:{color:"#000000",fontSize:14},children:T*(F-1)+n+1})}},{title:"课程名称",dataIndex:"name",key:"name",render:function(e,t,n){return(0,w.jsx)("span",{style:{color:"#000000",fontSize:14,fontWeight:500},children:e||"- -"})}},{title:"开课人",dataIndex:"subject_user_name",key:"subject_user_name",ellipsis:!0,render:function(e,t,n){return(0,w.jsx)("span",{style:{color:"#000000",fontSize:14,fontWeight:400},children:e||"- -"})}},{title:"实训数",dataIndex:"shixuns_count",key:"shixuns_count",render:function(e,t,n){return(0,w.jsx)("span",{style:{color:"#5F6368",fontSize:14,fontWeight:400},children:e||"- -"})}},{title:"申请人数",dataIndex:"certificates_count",key:"certificates_count",render:function(e,t,n){return(0,w.jsx)("span",{style:{color:"#5F6368",fontSize:14,fontWeight:400},children:e||"- -"})}},{title:"申请时间",dataIndex:"created_at",key:"created_at",ellipsis:!0,render:function(e,t,n){return(0,w.jsx)("span",{style:{color:"#5F6368",fontSize:14,fontWeight:400},children:e||"- -"})}},{title:"操作",dataIndex:"remark",key:"remark",ellipsis:!0,render:function(e,n,i){return(0,w.jsx)("span",{onClick:o()(s()().mark((function e(){var i;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,j.ZP)("/api/users/".concat(t.userInfo.login,"/subjects/certificate_users.json"),{method:"get",params:{page:1,limit:1e4,subject_id:null==n?void 0:n.id}});case 2:(i=e.sent)&&(E(i),O(!0));case 4:case"end":return e.stop()}}),e)}))),style:{cursor:"pointer",color:"#165DFF"},children:"查看申请人"})}}],ee=[{title:"序号",dataIndex:"name",align:"center",key:"name",ellipsis:!0,width:50,render:function(e,t,n){return(0,w.jsx)("span",{style:{color:"#000000"},children:T*(F-1)+n+1})}},{title:"课程名称",dataIndex:"subject_name",key:"subject_name",ellipsis:!0,render:function(e,t,n){return(0,w.jsx)("span",{style:{color:"#000000",fontSize:14,fontWeight:500},children:e||"- -"})}},{title:"开课人",dataIndex:"subject_user_name",key:"subject_user_name",ellipsis:!0,render:function(e,t,n){return(0,w.jsx)("span",{style:{color:"#000000",fontSize:14,fontWeight:400},children:e||"- -"})}},{title:"实训数",dataIndex:"shixuns_count",key:"shixuns_count",ellipsis:!0,render:function(e,t,n){return(0,w.jsx)("span",{style:{color:"#5F6368",fontSize:14,fontWeight:400},children:e||"- -"})}},{title:"申请时间",dataIndex:"created_at",key:"created_at",ellipsis:!0,render:function(e,t,n){return(0,w.jsx)("span",{style:{color:"#5F6368",fontSize:14,fontWeight:400},children:e||"- -"})}},{title:"申请状态",dataIndex:"state",ellipsis:!0,key:"state",render:function(e,t){return(0,w.jsxs)(w.Fragment,{children:["drafted"===(null==t?void 0:t.state)&&(0,w.jsx)("span",{style:{color:"#000000"},children:"申请中"}),"rejected"===(null==t?void 0:t.state)&&(0,w.jsx)("span",{style:{color:"#000000"},children:"未通过"}),"passed"===(null==t?void 0:t.state)&&(0,w.jsx)("span",{style:{color:"#000000"},children:"通过"})]})}},{title:"操作",dataIndex:"code",key:"code",ellipsis:!0,render:function(e,t,n){return(0,w.jsxs)("div",{style:{display:"flex",justifyContent:"space-evenly"},children:["passed"===(null==t?void 0:t.state)&&(0,w.jsx)("span",{style:{cursor:"pointer",color:"#0152d9"},onClick:function(){Q(t),R(!0)},children:"查看证书"}),"drafted"===(null==t?void 0:t.state)&&(0,w.jsx)("span",{style:{cursor:"not-allowed",color:"#7F7F7F"},children:"查看"}),"rejected"===(null==t?void 0:t.state)&&(0,w.jsx)("span",{onClick:function(){return e=t,void _.Z.info({title:"拒绝原因",icon:null,className:"custom-modal-divider",centered:!0,width:400,content:(0,w.jsx)("div",{children:null==e?void 0:e.content}),okText:"确定"});var e},style:{cursor:"pointer",color:"#0152d9"},children:"查看拒绝理由"})]})}}];return(0,w.jsxs)("div",{style:{marginTop:22,marginLeft:45},children:[(0,w.jsx)(y.YG,{value:c,onChange:function(e){var t;null!==(t=window.location.href.toString())&&void 0!==t&&t.includes("category")?(0,g.jz)("category",e):window.history.replaceState(null,"",window.location.href.indexOf("?")>-1?window.location.href+"&category=".concat(e):"?category=".concat(e)),x(e)},className:"mb25",dataSource:[{id:"manage_certificates",name:"我管理的"},{id:"my_certificates",name:"我获得的"}]}),"manage_certificates"===c&&(0,w.jsxs)("div",{children:[(0,w.jsx)(y.Gi,{children:(0,w.jsx)(m.Z,{columns:$,dataSource:null==k?void 0:k.subjects,pagination:!1})}),(0,w.jsx)(h.Z,{hideOnSinglePage:!0,style:{textAlign:"center",marginTop:"10px"},pageSize:T,current:F,onChange:function(e,t){P(e)},total:null==k?void 0:k.total_count})]}),"my_certificates"===c&&(0,w.jsxs)("div",{children:[(0,w.jsx)(y.Gi,{children:(0,w.jsx)(m.Z,{columns:ee,dataSource:null==k?void 0:k.certificates,pagination:!1})}),(0,w.jsx)(h.Z,{hideOnSinglePage:!0,style:{textAlign:"center",marginTop:"10px"},pageSize:T,current:F,onChange:function(e,t){P(e)},total:null==k?void 0:k.total_count})]}),(0,w.jsx)(_.Z,{title:"查看申请人",open:G,width:800,footer:null,wrapClassName:v.Z.CustomCss,onCancel:function(){return O(!1)},children:(0,w.jsx)(y.Gi,{children:(0,w.jsx)(m.Z,{dataSource:null==q?void 0:q.certificates,pagination:!1,columns:X})})}),(0,w.jsx)(S.Z,{visible:D,onCancel:function(){R(!1)},data:K||{}})]})}))},34933:function(e,t){t.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}},79329:function(){}}]); |