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__Engineering__Lists__Trai...

1 line
16 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[59649],{77171:function(e,n,t){t.d(n,{Z:function(){return l}});var i=t(87462),o=t(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"},c=t(43387),r=function(e,n){return o.createElement(c.Z,(0,i.Z)({},e,{ref:n,icon:a}))};var l=o.forwardRef(r)},11475:function(e,n,t){t.d(n,{Z:function(){return l}});var i=t(87462),o=t(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},c=t(43387),r=function(e,n){return o.createElement(c.Z,(0,i.Z)({},e,{ref:n,icon:a}))};var l=o.forwardRef(r)},36579:function(e,n,t){t.d(n,{Z:function(){return w}});var i=t(42122),o=t.n(i),a=t(17061),c=t.n(a),r=t(17156),l=t.n(r),s=t(27424),d=t.n(s),u=t(67294),_={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},p=t(71577),h=t(77171),f=t(8691),x=t(83062),v=t(29427),m=t(51412),g=t(82982),j=t(59758),y=t(85893),w=function(e){var n,t,i,a,r,s,w,b=e.editOffice,Z=void 0===b?"view":b,k=e.data,C=(e.theme,e.type),I=e.filename,N=e.monacoEditor,P=e.className,S=e.style,E=e.close,z=e.onClose,O=e.hasMask,R=e.disabledDownload,T=e.onImgDimensions,q=e.showNodata,V=(0,u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),B=d()(V,2),J=(B[0],B[1],(0,u.useState)("")),W=d()(J,2),L=(W[0],W[1]),U=(0,u.useState)(),M=d()(U,2),F=M[0],A=M[1],D="build"===window.ENV?"/react/build":"",X=location.host.startsWith("localhost")?j.Z.PROXY_SERVER:j.Z.API_SERVER,Y=(0,u.useRef)();null!==(n=k)&&void 0!==n&&n.startsWith("/api")&&"txt"!==C&&(k=j.Z.API_SERVER+k),I&&(N.filename=I),(0,u.useEffect)((function(){var e,n,t=null===(e=document.cookie)||void 0===e||null===(n=e.replace(/\s/g,""))||void 0===n?void 0:n.split(";");null==t||t.map((function(e){var n=e.split("=");"_educoder_session"===n[0]&&L(n[1])}))}),[]),(0,u.useEffect)((function(){"office"===C&&H()}),[C,k]);var H=function(){var e=l()(c()().mark((function e(){var n,t,i;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=k,k.startsWith("http")||(n=location.origin+n),t=new URL(n).pathname.split("/").pop(),e.next=5,(0,m.gJ)({attachment_id:t});case 5:i=e.sent,A(i);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),K=function(){Q()},Q=function(){(0,v.Nd)(I||"educoder",decodeURIComponent(k))};return(0,y.jsxs)("div",{style:o()({},S||{}),className:"".concat(O&&_.bgBlack," ").concat(C?_.wrp:"hide"),children:[E&&(0,y.jsxs)("div",{className:_.close,ref:Y,children:[!!T&&(0,y.jsx)(x.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return Y.current},children:(0,y.jsx)("span",{onClick:function(){z(),T()},children:(0,y.jsx)("i",{className:"icon-yulanpizhu"})})}),!R&&(0,y.jsx)(x.Z,{title:"点击下载此文件",getPopupContainer:function(){return Y.current},children:(0,y.jsx)("span",{onClick:Q,children:(0,y.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,y.jsx)(x.Z,{title:"关闭",getPopupContainer:function(){return Y.current},children:(0,y.jsx)("span",{className:"",onClick:z,children:(0,y.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,y.jsx)("div",{className:"".concat(_[P]," ").concat(P," ").concat(_.monaco," ").concat("txt"===C?"show":"hide"),children:"txt"===C&&(0,y.jsx)(f.ZP,o()({},N))}),"audio"===C&&(0,y.jsx)("audio",{src:(null===(t=k)||void 0===t?void 0:t.indexOf("http"))>-1||null!==(i=k)&&void 0!==i&&i.startsWith("/api")?k:"data:image/png;base64,".concat(k),autoPlay:!0}),"video"===C&&(0,y.jsx)(y.Fragment,{children:(null===(a=k)||void 0===a?void 0:a.indexOf("http"))>-1||null!==(r=k)&&void 0!==r&&r.startsWith("/api")?(0,y.jsx)("video",{controls:!0,src:"".concat(k),autoPlay:!0}):(0,y.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(k),autoPlay:!0})}),"office"===C&&F&&(0,y.jsx)("iframe",{src:"".concat(D,"/office.html?key=").concat(F.key,"&url=").concat(X+F.url,"&callbackUrl=").concat(X+F.callbackUrl,"&fileType=").concat(F.fileType,"&title=").concat(F.title,"&model=").concat(Z,"&officeServer=").concat(j.Z.ONLYOFFICE,"&disabledDownload=").concat(!!R)}),"html"===C&&(0,y.jsx)("iframe",{src:k+"&disposition=inline"}),"pdf"===C&&(0,y.jsx)("iframe",{src:"".concat(D,"/js/pdfview/index.html?url=").concat(k,"&disabledDownload=").concat(!!R)}),"image"===C&&(0,y.jsx)("img",{src:(null===(s=k)||void 0===s?void 0:s.indexOf("http"))>-1||null!==(w=k)&&void 0!==w&&w.startsWith("/api")?k:"data:image/png;base64,".concat(k)}),("other"===C||"download"===C)&&(0,y.jsx)(y.Fragment,{children:q?(0,y.jsx)(g.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,y.jsx)(p.ZP,{icon:(0,y.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:K,children:"下载"})}):(0,y.jsxs)(p.ZP,{type:"primary",size:"middle",onClick:K,children:[(0,y.jsx)(h.Z,{}),"点击下载"]})})]})}},75200:function(e,n,t){t.r(n),t.d(n,{default:function(){return I}});var i=t(17061),o=t.n(i),a=t(42122),c=t.n(a),r=t(17156),l=t.n(r),s=t(27424),d=t.n(s),u=t(67294),_={flex_box_center:"flex_box_center___3dsSw",flex_space_between:"flex_space_between___UViQa",flex_box_vertical_center:"flex_box_vertical_center___VRHmE",flex_box_center_end:"flex_box_center_end___Sap6p",flex_box_column:"flex_box_column___cXZm0",wrap:"wrap___JbEle",title:"title___PD779",control:"control___xPMqa",label:"label___JqmpT",customTable:"customTable___YjprJ"},p=t(88275),h=t(2453),f=t(83062),x=t(14446),v=t(96101),m=t(71577),g=t(76661),j=t(11475),y=t(12034),w=t(84519),b=t(32337),Z=t(69555),k=t(36579),C=t(85893),I=(0,p.connect)((function(e){return{user:e.user}}))((function(e){var n,t=e.user,i=(0,u.useState)({page:1,per_page:20,total:0,ec_major_school_id:0,ec_year_id:0,category:1,sort_by:null,sort_direction:null,school_id:null}),a=d()(i,2),r=a[0],s=a[1],I=(0,u.useState)(!0),N=d()(I,2),P=N[0],S=N[1],E=(0,u.useState)([]),z=d()(E,2),O=z[0],R=z[1],T=(0,u.useState)([]),q=d()(T,2),V=q[0],B=q[1],J=(0,u.useState)([]),W=d()(J,2),L=W[0],U=W[1],M=(0,u.useState)({filename:"",editOffice:"view",type:"",className:"",data:"",close:!0,hasMask:!0,style:{position:"fixed",zIndex:9999,background:"rgba(0,0,0,.7)"},monacoEditor:{value:"",language:"",theme:"vs",options:{readOnly:!0}}}),F=d()(M,2),A=F[0],D=F[1],X=function(){var e=l()(o()().mark((function e(n){var i,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(!0),n.school_id=null==t||null===(i=t.userInfo)||void 0===i?void 0:i.school_id,e.next=4,(0,w.ZP)("/api/ec_major_schools/".concat((null==n?void 0:n.ec_major_school_id)||0,"/ec_years.json"),{method:"get",params:c()(c()({},n),{},{year:0===(null==n?void 0:n.ec_year_id)?null:null==n?void 0:n.ec_year_id,ec_year_id:(null==n||n.ec_year_id,null)})});case 4:(a=e.sent)&&(R(null==a?void 0:a.ec_years),S(!1),r.total=null==a?void 0:a.count,s(c()({},r)));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();function Y(){return(Y=l()(o()().mark((function e(){var n,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.ZP)("/api/schools/".concat(null==t||null===(n=t.userInfo)||void 0===n?void 0:n.school_id,"/ec_majors/get_major_list.json"),{method:"get"});case 2:i=e.sent,B(null==i?void 0:i.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function H(){return(H=l()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.ZP)("/api/ec_major_schools/1/ec_years/select_year.json",{method:"get"});case 2:n=e.sent,U(null==n?void 0:n.year_arr);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,u.useEffect)((function(){var e;null!==(e=t.userInfo)&&void 0!==e&&e.school_id&&(!function(){Y.apply(this,arguments)}(),function(){H.apply(this,arguments)}(),X(r))}),[null==t||null===(n=t.userInfo)||void 0===n?void 0:n.school_id]);var K=function(e,n){r.page=1,r[n]="number"==typeof e?e:null,s(c()({},r)),X(r)},Q=[{title:"序号",dataIndex:"index",width:54,render:function(e,n,t){return r.per_page*(r.page-1)+t+1}},{title:"培养方案",dataIndex:"name",width:"17%",ellipsis:!0,key:"name",render:function(e,n,t){return(0,C.jsx)(p.Link,{to:"/engineering/training/program/edit?ec_year_id=".concat(null==n?void 0:n.id),children:e})}},{title:"培养方案文件",dataIndex:"file_name",width:"10%",ellipsis:!0,key:"name",render:function(e,n,t){return(0,C.jsx)("a",{onClick:function(){["xlsx","docx","pptx"].includes(null==n?void 0:n.type)?(A.editOffice="edit",D(c()(c()({},A),{},{type:n.file_type,data:"/api/attachments/".concat(n.attachment_id)}))):h.ZP.info("当前文件不支持编辑")},children:e||"- -"})}},{title:"届别",width:"5%",dataIndex:"year",render:function(e,n,t){return e+"届"}},{title:"培养目标(项)",width:"8%",dataIndex:"training_subitem_count",render:function(e,n,t){return e||(0,C.jsx)("a",{href:"/engineering/training/objectives?ids=".concat(null==n?void 0:n.ec_major_school_id,",").concat(null==n?void 0:n.id),children:"设置"})}},{title:"毕业要求(项)",width:"8%",dataIndex:"graduation_requirement_count",render:function(e,n,t){return e||(0,C.jsx)("a",{href:"/engineering/graduated/index?ec_major_school_id=".concat(null==n?void 0:n.ec_major_school_id,"&ec_year_id=").concat(null==n?void 0:n.id),children:"设置"})}},{title:"授课教师/学生(人)",width:"10%",dataIndex:"teacher_count",render:function(e,n,t){return e+"/"+(null==n?void 0:n.student_count)}},{title:"课程(门)",width:"7%",dataIndex:"course_count",render:function(e,n,t){return e||(0,C.jsx)("a",{href:"/engineering/course/list?ec_major_school_id=".concat(null==n?void 0:n.ec_major_school_id,"&ec_year_id=").concat(null==n?void 0:n.id),children:"设置"})}},{title:"课程达成度",width:"9%",dataIndex:"achieved_graduation_course_count",render:function(e,n,t){return(0,C.jsx)(f.Z,{title:"已达成课程数:".concat(e," / 课程总数:").concat(null==n?void 0:n.course_count),children:(0,C.jsx)("span",{style:{color:null!=n&&n.course_count?parseInt(e)===parseInt(null==n?void 0:n.course_count)?"#07C160":"#E30000":""},children:null!=n&&n.course_count?e+"/"+(null==n?void 0:n.course_count):"- -"})})}},{title:"毕业要求达成度",width:"8%",dataIndex:"achieved_graduation_objective_count",render:function(e,n,t){return(0,C.jsx)(f.Z,{title:"已达成毕业要求数:".concat(e," / 毕业要求总数:").concat(null==n?void 0:n.graduation_requirement_count),children:(0,C.jsx)("span",{style:{color:null!=n&&n.graduation_requirement_count?parseInt(e)===parseInt(null==n?void 0:n.graduation_requirement_count)?"#07C160":"#E30000":""},children:null!=n&&n.graduation_requirement_count?e+"/"+(null==n?void 0:n.graduation_requirement_count):"- -"})})}},{title:"评价结果",width:"7%",dataIndex:"status",render:function(e,n,t){return(0,C.jsx)("span",{style:{color:"achieved"===e?"#E30000":"#07C160"},children:"achieved"===e?"未达成":"达成"})}},{title:"操作",dataIndex:"id",width:64,render:function(e,n,i){return(0,C.jsxs)("div",{style:{display:"flex"},children:[(0,C.jsx)("i",{onClick:l()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:p.history.push("/engineering/training/program/edit?ec_year_id=".concat(null==n?void 0:n.id));case 1:case"end":return e.stop()}}),e)}))),style:{color:"#0152d9",cursor:"pointer",marginRight:"5px"},className:"iconfont icon-bianji6"}),(0,C.jsx)("i",{onClick:function(){var n;x.Z.confirm({title:"确认是否删除?",icon:(0,C.jsx)(j.Z,{}),okText:"确认",cancelText:"取消",onOk:(n=l()(o()().mark((function n(){var i;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,w.ZP)("/api/ec_major_schools/1/ec_years/".concat(e),{method:"delete"});case 2:n.sent&&(Z.U.clear(null==t||null===(i=t.userInfo)||void 0===i?void 0:i.login),h.ZP.info("删除成功"),X(r));case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)}),onCancel:function(){}})},style:{marginRight:"5px",color:"#0152d9",cursor:"pointer"},className:"iconfont icon-shanchu9"}),(0,C.jsx)("i",{onClick:l()(o()().mark((function n(){var i;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:(0,y.xm)({ec_year_id:e,school_id:null==t||null===(i=t.userInfo)||void 0===i?void 0:i.school_id});case 1:case"end":return n.stop()}}),n)}))),style:{color:"#0152d9",cursor:"pointer"},className:"iconfont icon-daochubeifen"})]})}}];return(0,C.jsxs)("div",{className:_.wrap,children:[(0,C.jsx)(b.p,{title:"培养方案",style:{padding:"12px 0 0 20px"}}),(0,C.jsx)("div",{style:{clear:"both"}}),(0,C.jsxs)("div",{className:_.control,children:[(0,C.jsx)("div",{className:_.label,children:"认证专业"}),(0,C.jsxs)(v.Z,{style:{width:240},allowClear:!0,placeholder:"专业",value:null==r?void 0:r.ec_major_school_id,onChange:function(e){return K(e,"ec_major_school_id")},children:[(0,C.jsx)(v.Z.Option,{value:0,children:"全部"}),null==V?void 0:V.map((function(e,n){return(0,C.jsx)(v.Z.Option,{value:null==e?void 0:e.ec_major_school_id,children:null==e?void 0:e.name})}))]}),(0,C.jsx)("div",{className:_.label,children:"认证届别"}),(0,C.jsxs)(v.Z,{style:{width:140},allowClear:!0,placeholder:"请选择届别",value:null==r?void 0:r.ec_year_id,onChange:function(e){return K(e,"ec_year_id")},children:[(0,C.jsx)(v.Z.Option,{value:0,children:"全部"}),null==L?void 0:L.map((function(e,n){return(0,C.jsxs)(v.Z.Option,{value:e,children:[e,"届"]})}))]}),(0,C.jsx)("div",{style:{flex:1,textAlign:"end"},children:(0,C.jsxs)(m.ZP,{onClick:function(){p.history.push("/engineering/training/program/add")},style:{height:"30px",width:"135px"},type:"primary",children:[(0,C.jsx)("i",{style:{marginRight:"7px"},className:"iconfont icon-xinzeng"}),"新增培养方案"]})})]}),(0,C.jsx)(g.Z,{className:_.customTable,dataSource:O,bordered:!1,rowKey:function(e){return e.id},columns:Q,rowClassName:_.row,loading:P,onChange:function(e,n,t){r.page=null==e?void 0:e.current,r.per_page=null==e?void 0:e.pageSize,null!=t&&t.order?(r.sort_by=null==t?void 0:t.field,r.sort_direction="ascend"===(null==t?void 0:t.order)?"asc":"desc"):(r.sort_by=null,r.sort_direction=null),s(c()({},r)),X(r)},pagination:{pageSize:r.per_page,total:r.total,current:r.page,showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!1,size:"default",position:["bottomCenter"],showTotal:function(e){return(0,C.jsxs)("span",{className:"mr10",children:["共",(0,C.jsx)("span",{className:"c-orange",children:e}),"条数据"]})}}}),(0,C.jsx)(k.Z,c()(c()({},A),{},{onClose:function(){D(c()(c()({},A),{},{type:""}))}}))]})}))},32337:function(e,n,t){t.d(n,{p:function(){return a},v:function(){return r}});t(67294);var i="panelTitleContainer___Ypuh_",o=t(85893),a=function(e){var n=e.title,t=e.style,a=void 0===t?{}:t;return(0,o.jsx)("div",{className:i,style:a,children:(0,o.jsx)("div",{children:n})})},c="selectWrapContainer___qocIH",r=function(e){var n=e.title,t=e.children;return(0,o.jsxs)("div",{className:c,children:[(0,o.jsx)("span",{children:n}),t]})}}}]);