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
4.5 KiB
1 line
4.5 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[45950],{49981:function(e,n,t){t.r(n);var i=t(7557),c=t.n(i),r=t(41498),o=t.n(r),a=t(82242),l=t.n(a),s=t(79800),u=t.n(s),d=t(59301),g=t(65363),h=t(78241),f=t(95237),m=t(43604),p=t(3113),v=t(73782),x=t(71418),j=t(27092),_=t(8591),y=t(50127),S=t(49261),Z=t(96853),C=t(15309),w=t(38296),b=t(37712);n.default=(0,g.connect)((function(e){var n=e.user,t=e.loading,i=e.globalSetting,c=e.coreCurriculum;return{user:n,loading:t.effects,globalSetting:i,coreCurriculum:c}}))((function(e){var n,t=e.coreCurriculum,i=e.dispatch,r=e.loading,a=(e.user,e.globalSetting),s=t.CoreSubjects,g=h.Z.useForm(),k=u()(g,1)[0],I=(0,d.useState)(!1),N=u()(I,2),D=N[0],E=N[1],F=(0,d.useState)(""),P=u()(F,2),z=P[0],O=P[1],R=(0,d.useState)({page:1,limit:12}),B=u()(R,2),G=B[0],Y=B[1],q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l()(l()({},G),{},{keyword:z});i({type:"coreCurriculum/getCoreSubjects",payload:l()({},e)})};return(0,d.useEffect)((function(){q()}),[G]),(0,d.useEffect)((function(){return i({type:"globalSetting/footerToggle",payload:!1}),function(){i({type:"globalSetting/footerToggle",payload:!0})}}),[]),(0,b.jsxs)("section",{children:[(0,b.jsx)("div",{className:"".concat(y.Z.Bg),style:{width:"100%",height:168,backgroundImage:"url(".concat(C.Z.IMG_SERVER,"/").concat(null==a||null===(n=a.setting)||void 0===n?void 0:n.core_banner_url,")")},children:(0,b.jsxs)(f.Z,{style:{width:1200,height:"100%",margin:"0 auto"},align:"middle",justify:"space-between",wrap:!1,children:[(0,b.jsxs)(m.Z,{children:[(0,b.jsx)("div",{style:{color:"#fff",fontSize:"30px",letterSpacing:"5px",fontWeight:600},children:"核心课程"}),(0,w.Ny)()&&(0,b.jsx)(p.ZP,{className:"mt25 ".concat(y.Z.DivDownPlay),icon:(0,b.jsx)("i",{className:"iconfont icon-icon_xinyong_xianxing_jijin-249"}),onClick:function(){E(!0)},children:"新建核心课程"})]}),(0,b.jsx)(v.Z.Search,{placeholder:"请输入关键字进行搜索",size:"large",className:y.Z.search,value:z,onChange:function(e){O(e.target.value)},onSearch:function(e){O(e)},suffix:(0,b.jsx)("i",{className:"iconfont icon-sousuo9 font14 ".concat(y.Z.searchIcon),onClick:function(){O(z),Y(l()(l()({},G),{},{page:1})),q()}})})]})}),(0,b.jsxs)(x.Z,{spinning:!!r["coreCurriculum/getCoreSubjects"],children:[(0,b.jsx)("div",{style:{width:1200,margin:"40px auto 0"},children:(0,b.jsx)(f.Z,{gutter:[16,24],children:(0,b.jsx)(Z.Z,{data:(null==s?void 0:s.list)||[]})})}),(0,b.jsxs)(f.Z,{wrap:!1,align:"middle",justify:"space-between",style:{width:1200,margin:"20px auto"},children:[(0,b.jsxs)(m.Z,{children:["共 ",(0,b.jsx)("span",{style:{color:"#165DFF"},children:(null==s?void 0:s.count)||0})," 条数据"]}),(0,b.jsx)(m.Z,{className:"mr20",children:(0,b.jsx)(j.Z,{showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,current:G.page,pageSize:G.limit,onChange:function(e,n){return Y(l()(l()({},G),{},{page:e,limit:n}))},total:(null==s?void 0:s.count)||0})})]})]}),(0,b.jsx)(S.Z,{title:"新建核心课程",form:k,open:D,dispatch:!0,onCancel:function(){k.resetFields(),E(!1)},confirmLoading:!!r["coreCurriculum/postCoreSubjects"],onOk:function(){return k.submit()},handleFinish:function(){var e=o()(c()().mark((function e(n){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"coreCurriculum/postCoreSubjects",payload:n});case 2:0==(null==(t=e.sent)?void 0:t.status)&&(_.ZP.success("添加成功"),E(!1),k.resetFields(),q());case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()})]})}))},96853:function(e,n,t){var i=t(82242),c=t.n(i),r=t(39647),o=t.n(r),a=(t(59301),t(43604)),l=t(50127),s=t(27627),u=t(15309),d=t(92310),g=t.n(d),h=t(37712),f=["dispatch","data","className","style"];n.Z=function(e){e.dispatch;var n=e.data,t=e.className,i=e.style;o()(e,f);return(0,h.jsx)(h.Fragment,{children:null==n?void 0:n.map((function(e,n){var r,o;return(0,h.jsx)(a.Z,{children:(0,h.jsx)("div",{className:g()(l.Z.CoreItem,t),style:c()({},i),onClick:function(){return(0,s.xg)("/core/".concat(null==e?void 0:e.id))},children:(0,h.jsx)("div",{className:l.Z.img,children:(0,h.jsx)("img",{src:"".concat(u.Z.API_SERVER).concat(null==e||null===(r=e.cover)||void 0===r?void 0:r.url),alt:null==e||null===(o=e.cover)||void 0===o?void 0:o.title})})})},(null==e?void 0:e.id)||n)}))})}},50127:function(e,n){n.Z={Onerow:"Onerow___rEE1I",Bg:"Bg___Dn6ug",DivDownPlay:"DivDownPlay___KGY4k",SearchInput:"SearchInput___rSGs4",CoreItem:"CoreItem___g9fqX",img:"img___EYzkb",search:"search___mXDq2",searchIcon:"searchIcon___DY4UQ"}}}]); |