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

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[84546,52720],{56951:function(e,t,n){n.r(t),n.d(t,{default:function(){return I}});var r=n(7557),i=n.n(r),o=n(82242),a=n.n(o),l=n(41498),s=n.n(l),c=n(79800),d=n.n(c),u=n(59301),p="wrap___G6cMl",m="title___GslHD",f="rowFrom___W8LJO",h=n(51876),g=n(78241),b=n(8591),x=n(66104),y=n(28103),v=n(57809),j=n(95237),O=n(43604),S=n(92832),w=n(3113),C=n(59028),k=n(43418),$=n(61998),_=n(79311),Z=n(37712),I=(0,h.connect)((function(e){return{user:e.user}}))((function(e){var t,n=e.user,r=(0,u.useState)({page:1,per_page:20,total:0,ec_major_school_id:null,ec_year_id:null,category:1,sort_by:null,sort_direction:null,school_id:null}),o=d()(r,2),l=(o[0],o[1],(0,u.useState)(!0)),c=d()(l,2),I=(c[0],c[1],(0,u.useState)([])),E=d()(I,2),P=(E[0],E[1],(0,u.useState)([])),z=d()(P,2),N=z[0],M=z[1],T=(0,u.useState)([]),R=d()(T,2),B=R[0],H=R[1],X=(0,u.useState)(!1),W=d()(X,2),D=W[0],F=W[1],A=(0,u.useState)(),G=d()(A,2),L=G[0],U=G[1],q=(0,u.useState)(),K=d()(q,2),V=K[0],J=K[1],Q=g.Z.useForm(),Y=d()(Q,1)[0],ee=(0,u.useState)(),te=d()(ee,2),ne=te[0],re=te[1],ie=(0,u.useState)([]),oe=d()(ie,2),ae=oe[0],le=oe[1];function se(e){return ce.apply(this,arguments)}function ce(){return ce=s()(i()().mark((function e(t){var r,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return re(a()({},t)),e.next=3,(0,_.ZP)("/api/schools/".concat(null==n||null===(r=n.userInfo)||void 0===r?void 0:r.school_id,"/ec_majors.json"),{method:"get",params:a()({per_page:1e4},t)});case 3:o=e.sent,M(null==o?void 0:o.ec_majors);case 5:case"end":return e.stop()}}),e)}))),ce.apply(this,arguments)}function de(){return(de=s()(i()().mark((function e(){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_.ZP)("/api/ec_major_schools/1/ec_years/select_year.json",{method:"get"});case 2:t=e.sent,H(null==t?void 0:t.year_arr);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,u.useEffect)((function(){var e;null!==(e=n.userInfo)&&void 0!==e&&e.school_id&&(se(),function(){de.apply(this,arguments)}())}),[null==n||null===(t=n.userInfo)||void 0===t?void 0:t.school_id]);var ue={onRemove:function(){le([])},beforeUpload:function(e){if(console.log(e),(null==e?void 0:e.size)>52428800)return b.ZP.info("文件超过50M不符合上传要求"),!1;var t=[];return t.push(e),le([].concat(t)),!1},fileList:ae};return(0,Z.jsxs)("div",{className:p,children:[(0,Z.jsxs)(x.Z,{separator:"",style:{padding:"20px"},children:[(0,Z.jsx)(x.Z.Item,{children:(0,Z.jsx)(h.Link,{to:"/engineering/training/program",children:"培养方案"})}),(0,Z.jsx)(x.Z.Separator,{children:">>"}),(0,Z.jsx)(x.Z.Item,{children:"新增培养方案"})]}),(0,Z.jsx)("div",{className:m,children:"培养方案信息"}),(0,Z.jsx)(y.Z,{style:{padding:"0px 20px"}}),(0,Z.jsx)("div",{style:{paddingTop:"50px"},children:(0,Z.jsxs)(g.Z,{form:Y,labelCol:{span:8},wrapperCol:{span:8},children:[(0,Z.jsx)(g.Z.Item,{label:"认证届别",name:"year",rules:[{required:!0,message:"请选择届别"}],children:(0,Z.jsx)(v.default,{children:null==B?void 0:B.map((function(e,t){return(0,Z.jsxs)(v.default.Option,{value:e,children:[e,"届"]})}))})}),(0,Z.jsx)(g.Z.Item,{label:(0,Z.jsxs)("div",{children:[(0,Z.jsx)("span",{style:{marginRight:"4px",color:"#ff4d4f"},children:"*"}),(0,Z.jsx)("label",{children:"认证专业"})]}),children:(0,Z.jsxs)(j.Z,{gutter:12,style:{flexFlow:"initial",flexDirection:"row-reverse"},className:f,children:[(0,Z.jsx)(O.Z,{span:16,children:(0,Z.jsx)(g.Z.Item,{name:"major_id",children:(0,Z.jsx)(S.Z,{style:{color:"#000"},disabled:!0,bordered:!1})})}),(0,Z.jsx)(O.Z,{span:8,children:(0,Z.jsx)(w.ZP,{onClick:function(){F(!0),J(L||"")},children:"选择认证专业"})})]})}),(0,Z.jsx)(g.Z.Item,{label:"培养方案名称",name:"name",rules:[{required:!0,message:"请输入培养方案名称"},{whitespace:!0,message:"请输入培养方案名称"},{max:60,message:"培养方案名称不能超过60个字"}],children:(0,Z.jsx)(S.Z,{placeholder:"例如2021级计算机科学与技术专业本科技术人才培养方案"})}),(0,Z.jsxs)(j.Z,{children:[(0,Z.jsx)(O.Z,{span:8,style:{justifyContent:"end",display:"flex",marginTop:"2px"},children:(0,Z.jsx)("label",{children:"培养方案文件:"})}),(0,Z.jsx)(O.Z,{span:8,children:(0,Z.jsx)(C.Z,a()(a()({},ue),{},{children:(0,Z.jsx)(w.ZP,{children:"上传文件"})}))})]})]})}),(0,Z.jsxs)("div",{style:{textAlign:"end",paddingRight:"30px"},children:[(0,Z.jsx)(w.ZP,{onClick:function(){h.history.push("/engineering/training/program")},children:"返回"}),(0,Z.jsx)(w.ZP,{onClick:s()(i()().mark((function e(){var t,r,o,a;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y.submit(),e.next=3,Y.validateFields();case 3:if(r=Y.getFieldsValue(),L){e.next=7;break}return b.ZP.info("请选择认证专业"),e.abrupt("return");case 7:if(r.name&&r.year){e.next=9;break}return e.abrupt("return");case 9:return o=new FormData,ae.length>0&&o.append("file",ae[0]),o.append("school_id",null==n||null===(t=n.userInfo)||void 0===t?void 0:t.school_id),o.append("major_id",L),o.append("name",r.name),o.append("year",r.year),e.next=17,(0,_.ZP)("/api/ec_major_schools/1/ec_years.json",{method:"post",body:o},!0);case 17:0===(null==(a=e.sent)?void 0:a.status)&&(b.ZP.info("添加成功"),h.history.push("/engineering/training/program"));case 19:case"end":return e.stop()}}),e)}))),style:{marginLeft:"10px"},type:"primary",children:"保存"})]}),(0,Z.jsxs)(k.Z,{title:"选择认证专业",centered:!0,open:D,onCancel:function(){F(!1),J("")},onOk:function(){var e;F(!1),U(V),Y.setFieldsValue({major_id:null==N||null===(e=N.filter((function(e){return e.id===parseInt(V)})))||void 0===e||null===(e=e[0])||void 0===e?void 0:e.name})},children:[(0,Z.jsx)("div",{style:{display:"flex",marginBottom:"10px",alignItems:"center",justifyContent:"space-between"},children:(0,Z.jsx)(S.Z.Search,{style:{width:"300px"},onSearch:function(e){se(a()(a()({},ne),{},{search:e}))},placeholder:"请输入专业代码或名称"})}),(0,Z.jsx)($.Z,{dataSource:N,columns:[{title:"专业代码",dataIndex:"code",key:"code"},{title:"专业名称",dataIndex:"name",key:"name"}],pagination:!1,rowKey:function(e){return e.id},scroll:{y:300},rowSelection:{type:"radio",onChange:function(e,t){J(e)},selectedRowKeys:V}})]})]})}))},66104:function(e,t,n){n.d(t,{Z:function(){return I}});var r=n(92310),i=n.n(r),o=n(75440),a=n(47413),l=n(59301),s=n(92343),c=n(36355),d=n(78386),u=n(91857);const p=e=>{let{children:t}=e;const{getPrefixCls:n}=l.useContext(c.E_),r=n("breadcrumb");return l.createElement("li",{className:`${r}-separator`,"aria-hidden":"true"},""===t?t:t||"/")};p.__ANT_BREADCRUMB_SEPARATOR=!0;var m=p,f=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function h(e,t,n,r){if(null==n)return null;const{className:o,onClick:s}=t,c=f(t,["className","onClick"]),d=Object.assign(Object.assign({},(0,a.Z)(c,{data:!0,aria:!0})),{onClick:s});return void 0!==r?l.createElement("a",Object.assign({},d,{className:i()(`${e}-link`,o),href:r}),n):l.createElement("span",Object.assign({},d,{className:i()(`${e}-link`,o)}),n)}function g(e,t){return(n,r,i,o,a)=>{if(t)return t(n,r,i,o);const l=function(e,t){if(void 0===e.title||null===e.title)return null;const n=Object.keys(t).join("|");return"object"==typeof e.title?e.title:String(e.title).replace(new RegExp(`:(${n})`,"g"),((e,n)=>t[n]||e))}(n,r);return h(e,n,l,a)}}var b=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const x=e=>{const{prefixCls:t,separator:n="/",children:r,menu:i,overlay:o,dropdownProps:a,href:s}=e;const c=(e=>{if(i||o){const n=Object.assign({},a);if(i){const e=i||{},{items:t}=e,r=b(e,["items"]);n.menu=Object.assign(Object.assign({},r),{items:null==t?void 0:t.map(((e,t)=>{var{key:n,title:r,label:i,path:o}=e,a=b(e,["key","title","label","path"]);let c=null!=i?i:r;return o&&(c=l.createElement("a",{href:`${s}${o}`},c)),Object.assign(Object.assign({},a),{key:null!=n?n:t,label:c})}))})}else o&&(n.overlay=o);return l.createElement(u.Z,Object.assign({placement:"bottom"},n),l.createElement("span",{className:`${t}-overlay-link`},e,l.createElement(d.Z,null)))}return e})(r);return null!=c?l.createElement(l.Fragment,null,l.createElement("li",null,c),n&&l.createElement(m,null,n)):null},y=e=>{const{prefixCls:t,children:n,href:r}=e,i=b(e,["prefixCls","children","href"]),{getPrefixCls:o}=l.useContext(c.E_),a=o("breadcrumb",t);return l.createElement(x,Object.assign({},i,{prefixCls:a}),h(a,i,n,r))};y.__ANT_BREADCRUMB_ITEM=!0;var v=y,j=n(17313),O=n(83116),S=n(37613);const w=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:Object.assign(Object.assign({},(0,j.Wf)(e)),{color:e.itemColor,fontSize:e.fontSize,[n]:{fontSize:e.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${e.paddingXXS}px`,borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",marginInline:-e.marginXXS,"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover}},(0,j.Qy)(e)),"li:last-child":{color:e.lastItemColor},[`${t}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${t}-link`]:{[`\n > ${n} + span,\n > ${n} + a\n `]:{marginInlineStart:e.marginXXS}},[`${t}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",padding:`0 ${e.paddingXXS}px`,marginInline:-e.marginXXS,[`> ${n}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}};var C=(0,O.Z)("Breadcrumb",(e=>{const t=(0,S.TS)(e,{});return[w(t)]}),(e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS}))),k=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function $(e){const{breadcrumbName:t,children:n}=e,r=k(e,["breadcrumbName","children"]),i=Object.assign({title:t},r);return n&&(i.menu={items:n.map((e=>{var{breadcrumbName:t}=e,n=k(e,["breadcrumbName"]);return Object.assign(Object.assign({},n),{title:t})}))}),i}var _=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Z=e=>{const{prefixCls:t,separator:n="/",style:r,className:d,rootClassName:u,routes:p,items:f,children:h,itemRender:b,params:y={}}=e,v=_(e,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:j,direction:O,breadcrumb:S}=l.useContext(c.E_);let w;const k=j("breadcrumb",t),[Z,I]=C(k),E=function(e,t){return(0,l.useMemo)((()=>e||(t?t.map($):null)),[e,t])}(f,p);const P=g(k,b);if(E&&E.length>0){const e=[],t=f||p;w=E.map(((r,i)=>{const{path:o,key:s,type:c,menu:d,overlay:u,onClick:p,className:f,separator:h,dropdownProps:g}=r,b=((e,t)=>{if(void 0===t)return t;let n=(t||"").replace(/^\//,"");return Object.keys(e).forEach((t=>{n=n.replace(`:${t}`,e[t])})),n})(y,o);void 0!==b&&e.push(b);const v=null!=s?s:i;if("separator"===c)return l.createElement(m,{key:v},h);const j={},O=i===E.length-1;d?j.menu=d:u&&(j.overlay=u);let{href:S}=r;return e.length&&void 0!==b&&(S=`#/${e.join("/")}`),l.createElement(x,Object.assign({key:v},j,(0,a.Z)(r,{data:!0,aria:!0}),{className:f,dropdownProps:g,href:S,separator:O?"":n,onClick:p,prefixCls:k}),P(r,y,t,e,S))}))}else if(h){const e=(0,o.Z)(h).length;w=(0,o.Z)(h).map(((t,r)=>{if(!t)return t;const i=r===e-1;return(0,s.Tm)(t,{separator:i?"":n,key:r})}))}const z=i()(k,null==S?void 0:S.className,{[`${k}-rtl`]:"rtl"===O},d,u,I),N=Object.assign(Object.assign({},null==S?void 0:S.style),r);return Z(l.createElement("nav",Object.assign({className:z,style:N},v),l.createElement("ol",null,w)))};Z.Item=v,Z.Separator=m;var I=Z},28103:function(e,t,n){n.d(t,{Z:function(){return m}});var r=n(92310),i=n.n(r),o=n(59301),a=n(36355),l=n(17313),s=n(83116),c=n(37613);const d=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:a,verticalMarginInline:s}=e;return{[t]:Object.assign(Object.assign({},(0,l.Wf)(e)),{borderBlockStart:`${i}px solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${i}px solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${i}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-left`]:{"&::before":{width:100*a+"%"},"&::after":{width:100-100*a+"%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:100-100*a+"%"},"&::after":{width:100*a+"%"}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${i}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}};var u=(0,s.Z)("Divider",(e=>{const t=(0,c.TS)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[d(t)]}),(e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}))),p=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};var m=e=>{const{getPrefixCls:t,direction:n,divider:r}=o.useContext(a.E_),{prefixCls:l,type:s="horizontal",orientation:c="center",orientationMargin:d,className:m,rootClassName:f,children:h,dashed:g,plain:b,style:x}=e,y=p(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),v=t("divider",l),[j,O]=u(v),S=c.length>0?`-${c}`:c,w=!!h,C="left"===c&&null!=d,k="right"===c&&null!=d,$=i()(v,null==r?void 0:r.className,O,`${v}-${s}`,{[`${v}-with-text`]:w,[`${v}-with-text${S}`]:w,[`${v}-dashed`]:!!g,[`${v}-plain`]:!!b,[`${v}-rtl`]:"rtl"===n,[`${v}-no-default-orientation-margin-left`]:C,[`${v}-no-default-orientation-margin-right`]:k},m,f),_=o.useMemo((()=>"number"==typeof d?d:/^\d+$/.test(d)?Number(d):d),[d]),Z=Object.assign(Object.assign({},C&&{marginLeft:_}),k&&{marginRight:_});return j(o.createElement("div",Object.assign({className:$,style:Object.assign(Object.assign({},null==r?void 0:r.style),x)},y,{role:"separator"}),h&&"vertical"!==s&&o.createElement("span",{className:`${v}-inner-text`,style:Z},h)))}}}]);