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

1 line
13 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([[54621],{7406:function(e,n,t){var i=t(82242),r=t.n(i),a=(t(59301),t(93314)),s=t(3113),l=t(37712);n.Z=function(e){var n=e.img,t=e.buttonProps,i=void 0===t?{}:t,o=e.styles,c=void 0===o?{}:o,d=e.customText,u=e.ButtonText,j=e.ButtonClick,p=e.Buttonclass,x=e.ButtonTwo,m=e.imgStyles,g=e.loading,h=void 0!==g&&g;return(0,l.jsxs)("section",{className:"tc animated fadeIn",style:r()(r()({},{color:"#999",margin:"100px auto",visibility:h?"hidden":"visible"}),c),children:[(0,l.jsx)("img",{src:n||a,style:r()(r()({},m),{},{pointerEvents:"none",userSelect:"none"})}),(0,l.jsx)("p",{className:"mt20 font14",children:d||"暂时还没有相关数据哦!"}),u&&(0,l.jsx)(s.ZP,r()(r()({className:p,onClick:j},i),{},{children:u})),x&&x]})}},89163:function(e,n,t){t.r(n),t.d(n,{default:function(){return Q}});var i=t(85573),r=t.n(i),a=t(7557),s=t.n(a),l=t(82242),o=t.n(l),c=t(41498),d=t.n(c),u=t(79800),j=t.n(u),p=t(39647),x=t.n(p),m=t(59301),g=t(7880),h="head___rTtJZ",y="head_position___JORCm",M="addQuestionBtn____mhKD",f="pngIcon___wku3M",v="contentWrap___qdHlc",L="antdTable___VlDc8",N="footer___by1Sw",I="tabs___L6XlV";Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var S=t(78241),w=t(43418),k=t(98135),C=t(8591),Z=t(99313),T=t(57809),A=t(3113),b=t(71418),D=t(14491),O=t(53864),z=t(51136),P=t(7406),_=t(90963),E=t(99232),Y=t.n(E),U=t(37712),V=["userDetail","user","globalSetting","loading","dispatch"],Q=(0,g.connect)((function(e){var n=e.user,t=e.userDetail,i=e.loading;return{user:n,userDetail:t,globalSetting:e.globalSetting,loading:i.models.index}}))((function(e){e.userDetail,e.user,e.globalSetting,e.loading,e.dispatch,x()(e,V);var n=(0,m.useState)({page:1,limit:10}),t=j()(n,2),i=t[0],a=t[1],l=(0,m.useState)([]),c=j()(l,2),u=c[0],p=c[1],g=(0,m.useState)(!0),E=j()(g,2),Q=E[0],F=E[1],G=(0,m.useState)(0),H=j()(G,2),R=H[0],W=H[1],B=(0,m.useState)(!1),J=j()(B,2),q=J[0],X=J[1],K=S.Z.useForm(),$=j()(K,1)[0],ee=(0,m.useState)([]),ne=j()(ee,2),te=ne[0],ie=ne[1],re=(0,m.useState)(""),ae=j()(re,2),se=ae[0],le=ae[1];function oe(e){return ce.apply(this,arguments)}function ce(){return(ce=d()(s()().mark((function e(n){var t,r,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return F(!0),e.next=3,(0,z.ZP)("/api/departments/".concat(null==i?void 0:i.department_id,"/majors.json"),{method:"get",params:{per_page:n.limit,page:n.page,status:se,keywords:null==i?void 0:i.keywords,department_id:null==i?void 0:i.department_id}});case 3:a=e.sent,p((null==a||null===(t=a.data)||void 0===t?void 0:t.majors)||[]),W(null==a||null===(r=a.data)||void 0===r?void 0:r.count),F(!1);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,m.useEffect)((function(){ue()}),[]),(0,m.useEffect)((function(){oe(i)}),[se]);var de=[{title:"专业名称",dataIndex:"name",ellipsis:!0,render:function(e){return e}},{title:"状态",dataIndex:"status",render:function(e){return 1===e?(0,U.jsx)("span",{style:{color:"#19CB70"},children:"已通过"}):0===e?(0,U.jsx)("span",{style:{color:"#FF8C29"},children:"待审核"}):void 0}},{title:"学生人数(已职业认证)",dataIndex:"user_count",ellipsis:!0,width:200,render:function(e){return(0,U.jsx)("span",{children:e||"--"})}},{title:"所属学院",dataIndex:"department_name",ellipsis:!0,render:function(e){return(0,U.jsx)("span",{children:e||"--"})}},"0"==se&&{title:"说明",dataIndex:"remarks",ellipsis:!0,render:function(e){return(0,U.jsx)("span",{children:e||"--"})}},{title:"创建时间",dataIndex:"created_at",ellipsis:!0,render:function(e){return(0,U.jsx)("span",{children:e?Y()(e).format("YYYY-MM-DD HH:mm"):"--"})}},{title:"操作",dataIndex:"id",key:"item_type",align:"right",width:150,render:function(e,n,t){return(0,U.jsxs)("div",{style:{textAlign:"end"},children:[1==(null==n?void 0:n.status)&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)("span",{style:{color:"#165dff",marginLeft:"20px",cursor:"pointer"},onClick:function(){var e;$.setFieldValue("name",null==n?void 0:n.name),w.Z.confirm({title:"重命名",centered:!0,icon:null,width:500,content:(0,U.jsx)("div",{style:{marginTop:"10px"},children:(0,U.jsx)(S.Z,{form:$,labelCol:{span:4},wrapperCol:{span:20},children:(0,U.jsx)(S.Z.Item,{label:"专业名称",name:"name",rules:[{required:!0,message:"请输入专业名称"}],children:(0,U.jsx)(k.Z,{placeholder:"请输入专业名称",style:{height:40,marginTop:"-4px"}})})})}),onOk:(e=d()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.validateFields();case 2:return e.next=4,(0,z.ZP)("/api/departments/".concat(null==n?void 0:n.department_id,"/majors/").concat(null==n?void 0:n.id,"/rename.json"),{method:"put",body:{name:$.getFieldValue("name")}});case 4:0===e.sent.status&&(C.ZP.success("操作成功"),oe(i));case 6:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"重命名"}),(0,U.jsx)("span",{style:{color:"#165dff",marginLeft:"20px",cursor:"pointer"},onClick:function(){var e;w.Z.confirm({title:"删除提示",centered:!0,icon:null,width:500,content:(0,U.jsx)("div",{children:"确定删除该专业吗?删除后用户的专业相关信息将被清空,但此操作不影响用户的职业认证和实名认证。"}),onOk:(e=d()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,z.ZP)("/api/departments/".concat(null==n?void 0:n.department_id,"/majors/").concat(null==n?void 0:n.id,".json"),{method:"DELETE"});case 2:0===e.sent.status&&(C.ZP.success("删除成功"),oe(i));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"删除"})]}),0==(null==n?void 0:n.status)&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)("span",{style:{color:"#165dff",marginLeft:"20px",cursor:"pointer"},onClick:function(){var e;w.Z.confirm({title:"通过申请",centered:!0,icon:null,width:500,content:(0,U.jsx)("div",{children:"确认批准通过该专业的新增申请?"}),onOk:(e=d()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,z.ZP)("/api/departments/".concat(null==n?void 0:n.department_id,"/majors/").concat(null==n?void 0:n.id,"/audit.json"),{method:"put",body:{status:1}});case 2:0===e.sent.status&&(C.ZP.success("操作成功"),oe(i));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"通过"}),(0,U.jsx)("span",{style:{color:"#165dff",marginLeft:"20px",cursor:"pointer"},onClick:function(){var e;w.Z.confirm({title:"拒绝原因",centered:!0,icon:null,width:500,content:(0,U.jsxs)("div",{style:{marginTop:"10px"},children:[(0,U.jsx)(S.Z,{form:$,labelCol:{span:3},wrapperCol:{span:21},children:(0,U.jsx)(S.Z.Item,{label:"原因",name:"reason",rules:[{required:!0,message:"请输入原因"}],children:(0,U.jsx)(k.Z.TextArea,{maxLength:200,placeholder:"请输入拒绝原因最多200字",rows:4})})}),(0,U.jsx)("div",{style:{fontSize:"12px",marginTop:"-10px",color:"#666"},children:"提示:拒绝新增专业的申请后,申请新增的用户将收到被拒绝的消息提醒。"})]}),onOk:(e=d()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.validateFields();case 2:return e.next=4,(0,z.ZP)("/api/departments/".concat(null==n?void 0:n.department_id,"/majors/").concat(null==n?void 0:n.id,"/audit.json"),{method:"put",body:{reason:$.getFieldValue("reason"),status:2}});case 4:0===e.sent.status&&(C.ZP.success("操作成功"),oe(i));case 6:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"拒绝"})]})]})}}].filter((function(e){return!!e})),ue=function(){var e=d()(s()().mark((function e(){var n,t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,z.ZP)("/api/school_manages/departments.json",{method:"get"});case 2:(n=e.sent)&&ie(null==n||null===(t=n.data)||void 0===t?void 0:t.departments);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,U.jsxs)("div",{children:[(0,U.jsxs)("div",{className:h,children:[(0,U.jsx)(Z.Z,{defaultActiveKey:"",className:I,items:[{key:"",label:"全部"},{key:"0",label:"待审核"}],onChange:function(e){i.page=1,a(o()({},i)),le(e)}}),(0,U.jsxs)("div",{className:y,children:[(0,U.jsx)("span",{style:{fontSize:14,display:"inline-block",paddingRight:20,lineHeight:"38px"},children:"学院"}),(0,U.jsx)(T.default,{onChange:function(e){i.department_id=e,oe(i)},className:"select",placeholder:"全部",size:"large",allowClear:!0,getPopupContainer:function(e){return e.parentNode},children:null==te?void 0:te.map((function(e){return(0,U.jsx)(T.default.Option,{children:null==e?void 0:e.name},null==e?void 0:e.id)}))}),(0,U.jsx)(_.t7,{style:{width:262,marginLeft:"15px"},value:{value:null==i?void 0:i.keywords},onChange:function(e,n){i.page=1,i.keywords=e,a(o()({},i)),oe(i)},placeholder:"请输入专业名称进行搜索"}),(0,U.jsx)("div",{children:(0,U.jsxs)(A.ZP,{className:M,onClick:function(e){return X(!0)},children:[(0,U.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbm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DEuMTc3LS40OTktLjE1OS0xLjAwMy0uMy0xLjUxLS40MjZsLS40MjcuNjM2YzEuMjEzLjMwNCAyLjM5NC43MjQgMy41MjYgMS4yNTVsLjQ1LS42OTdjLS4zOC0uMTY4LS43NjQtLjMyLTEuMTU1LS40NTcuNzItLjUyIDEuMjU0LTEuMDMyIDEuNTk2LTEuNTM1di0uNjk3SDYuOTM5Yy4wODUtLjI0OS4xNy0uNTIuMjU2LS43OThoNC4ydi0uNzc2SDcuNDA0Yy4wNTQtLjIzMi4xMDktLjQ2NC4xNjMtLjcxM2gzLjM2M3YtLjc1Mkg3LjczYy4wNDctLjI2NC4xLS41MjYuMTQ4LS44MDVsLS44My0uMDdoLjAwMVoiIGZpbGw9InVybCgjYSkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",className:f,alt:""}),"新增专业"]})})]})]}),(0,U.jsxs)("div",{className:v,children:[(0,U.jsx)(b.Z,{spinning:Q,children:0===R?(0,U.jsx)(P.Z,{customText:"暂无专业相关数据"}):(0,U.jsx)(D.Z,{className:L,rowKey:"id",columns:de,dataSource:u,pagination:!1})}),(0,U.jsxs)("div",{className:N,children:[R>(null==i?void 0:i.limit)?(0,U.jsx)("div",{children:(0,U.jsxs)("span",{style:{color:"#656F87"},children:["共",(0,U.jsx)("span",{className:"c-light-primary",children:R}),"条数据"]})}):"",(0,U.jsx)(O.Z,{defaultCurrent:1,defaultPageSize:10,current:(null==i?void 0:i.page)||1,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,total:R,onChange:function(e){i.page=e,a(o()({},i)),oe(i)}})]})]}),(0,U.jsx)(w.Z,{centered:!0,title:"新增专业名称",open:q,okText:"确定",cancelText:"取消",destroyOnClose:!0,onCancel:function(){X(!1)},onOk:d()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.validateFields();case 2:return e.t0=o(),e.t1={},e.next=6,$.validateFields();case 6:return e.t2=e.sent,n=(0,e.t0)(e.t1,e.t2),e.next=10,(0,z.ZP)("/api/departments/".concat($.getFieldValue("department_id"),"/majors.json"),{method:"post",body:o()({},n)});case 10:0===e.sent.status&&(C.ZP.success("新增成功"),oe(i),X(!1),$.resetFields());case 12:case"end":return e.stop()}}),e)}))),children:(0,U.jsxs)(S.Z,{form:$,labelAlign:"right",labelCol:{span:4},style:{height:"320px"},children:[(0,U.jsx)(S.Z.Item,{label:"院系名称",name:"department_id",rules:[{required:!0,message:"请输入院系名称"}],style:{marginTop:"20px"},children:(0,U.jsx)(T.default,{className:"select",size:"large",allowClear:!0,getPopupContainer:function(e){return e.parentNode},children:null==te?void 0:te.map((function(e){return(0,U.jsx)(T.default.Option,{children:null==e?void 0:e.name},null==e?void 0:e.id)}))})}),(0,U.jsx)(S.Z.Item,{label:"专业名称",name:"name",rules:[{required:!0,validator:function(e,n){var t;return(null==n||null===(t=n.replaceAll(" ",""))||void 0===t?void 0:t.length)>0?Promise.resolve():Promise.reject("请输入专业名称")}}],children:(0,U.jsx)(k.Z,r()({maxLength:20,size:"large",style:{height:40},showCount:!0},"maxLength",20))}),(0,U.jsx)(S.Z.Item,{label:"说明",name:"remarks",children:(0,U.jsx)(k.Z.TextArea,{maxLength:200,placeholder:"再次说明特别情况(选填)",rows:8})})]})})]})}))}}]);