|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[75357,52720],{95306: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___p1lBE",m="title___NdrqL",f="rowFrom___MZz3p",h=n(49389),g=n(78241),b=n(8591),x=n(66104),y=n(28103),v=n(57809),j=n(95237),O=n(43604),S=n(10249),_=n(3113),w=n(54580),k=n(43418),C=n(1710),$=n(94171),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)([]),B=d()(T,2),R=B[0],H=B[1],X=(0,u.useState)(!1),F=d()(X,2),W=F[0],A=F[1],D=(0,u.useState)(),L=d()(D,2),G=L[0],q=L[1],U=g.Z.useForm(),V=d()(U,1)[0],K=(0,u.useState)(),Q=d()(K,2),Y=Q[0],J=Q[1],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],se=(0,u.useState)(!1),ce=d()(se,2),de=ce[0],ue=ce[1],pe=(0,h.useSearchParams)(),me=d()(pe,1)[0];function fe(){return(fe=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/0/ec_years/".concat(me.get("ec_year_id"),".json"),{method:"get"});case 2:(t=e.sent)&&(V.setFieldsValue({name:null==t?void 0:t.name,year:null==t?void 0:t.year,major_id:null==t?void 0:t.major_name}),null!=t&&t.file_id&&re([{uid:null==t?void 0:t.file_id,name:null==t?void 0:t.file_name}]),le([null==t?void 0:t.major_id]||0),q([null==t?void 0:t.major_id]||0));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function he(e){return ge.apply(this,arguments)}function ge(){return ge=s()(i()().mark((function e(t){var r,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return J(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)}))),ge.apply(this,arguments)}function be(){return(be=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&&(he(),function(){be.apply(this,arguments)}(),function(){fe.apply(this,arguments)}())}),[null==n||null===(t=n.userInfo)||void 0===t?void 0:t.school_id]);var xe={onRemove:function(){re([]),ue(!0)},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),re([].concat(t)),ue(!0),!1},fileList:ne};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,{labelCol:{span:8},wrapperCol:{span:8},form:V,children:[(0,Z.jsx)(g.Z.Item,{label:"认证届别",name:"year",rules:[{required:!0,message:"请选择届别"}],children:(0,Z.jsx)(v.default,{children:null==R?void 0:R.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:8,style:{flexFlow:"initial",flexDirection:"row-reverse"},className:f,children:[(0,Z.jsx)(O.Z,{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:12,children:(0,Z.jsx)(_.ZP,{onClick:function(){A(!0),le(G||"")},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,{})}),(0,Z.jsxs)(j.Z,{children:[(0,Z.jsx)(O.Z,{span:8,style:{textAlign:"right"},children:(0,Z.jsx)("label",{children:"培养方案文件:"})}),(0,Z.jsx)(O.Z,{span:8,children:(0,Z.jsx)(w.Z,a()(a()({},xe),{},{children:(0,Z.jsx)(_.ZP,{children:"上传文件"})}))})]})]})}),(0,Z.jsxs)("div",{style:{textAlign:"end",paddingRight:"30px"},children:[(0,Z.jsx)(_.ZP,{onClick:function(){h.history.push("/engineering/training/program")},children:"返回"}),(0,Z.jsx)(_.ZP,{onClick:s()(i()().mark((function e(){var t,r,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return V.submit(),e.next=3,V.validateFields();case 3:if(r=V.getFieldsValue(),G){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,ne.length>0&&de&&o.append("file",ne[0]),o.append("is_upfile",de),o.append("school_id",null==n||null===(t=n.userInfo)||void 0===t?void 0:t.school_id),o.append("major_id",G),o.append("name",r.name),o.append("year",r.year),e.next=18,(0,$.ZP)("/api/ec_major_schools/1/ec_years/".concat(me.get("ec_year_id"),".json"),{method:"put",body:o},!0);case 18:0===e.sent.status&&(b.ZP.info("修改成功"),h.history.push("/engineering/training/program"));case 20:case"end":return e.stop()}}),e)}))),style:{marginLeft:"10px"},type:"primary",children:"保存"})]}),(0,Z.jsxs)(k.Z,{title:"选择认证专业",centered:!0,open:W,onCancel:function(){A(!1),le([])},onOk:function(){var e;A(!1),q(ae),V.setFieldsValue({major_id:null==N||null===(e=N.filter((function(e){return e.id===parseInt(ae)})))||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){he(a()(a()({},Y),{},{search:e}))},placeholder:"请输入专业代码或名称"})}),(0,Z.jsx)(C.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){le(e)},selectedRowKeys:ae}})]})]})}))},66104:function(e,t,n){n.d(t,{Z:function(){return I}});var r=n(92310),i=n.n(r),o=n(11592),a=n(26112),l=n(59301),s=n(92343),c=n(36355),d=n(84105),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 _=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 w=(0,O.Z)("Breadcrumb",(e=>{const t=(0,S.TS)(e,{});return[_(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 C(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 _;const k=j("breadcrumb",t),[Z,I]=w(k),E=function(e,t){return(0,l.useMemo)((()=>e||(t?t.map(C):null)),[e,t])}(f,p);const P=g(k,b);if(E&&E.length>0){const e=[],t=f||p;_=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;_=(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,_)))};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,_=!!h,w="left"===c&&null!=d,k="right"===c&&null!=d,C=i()(v,null==r?void 0:r.className,O,`${v}-${s}`,{[`${v}-with-text`]:_,[`${v}-with-text${S}`]:_,[`${v}-dashed`]:!!g,[`${v}-plain`]:!!b,[`${v}-rtl`]:"rtl"===n,[`${v}-no-default-orientation-margin-left`]:w,[`${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({},w&&{marginLeft:$}),k&&{marginRight:$});return j(o.createElement("div",Object.assign({className:C,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)))}}}]); |