(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9116],{23272:function(K,W,r){"use strict";r.r(W),r.d(W,{default:function(){return mt}});var g=r(71194),I=r(50146),T=r(14965),v=r(91774),C=r(88983),Z=r(47933),N=r(47673),i=r(4107),d=r(39428),M=r(3182),U=r(57663),R=r(71577),E=r(62350),Q=r(24565),nt=r(34792),w=r(48086),et=r(9715),F=r(55843),j=r(2824),rt=r(402),J=r(56256),y=r(67294),h=r(28790),X=r(49101),at=r(16894),u=r(27484),n=r.n(u),t=r(72540),s=r.n(t),e=r(96036),o=r.n(e),a=r(48971),l=r(96690);function $(A){return m.apply(this,arguments)}function m(){return m=(0,M.Z)((0,d.Z)().mark(function A(D){return(0,d.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",(0,a.WY)((0,l.w)()+"/api/authorization/pageauthorization",{method:"POST",data:D}));case 1:case"end":return f.stop()}},A)})),m.apply(this,arguments)}function S(A){return z.apply(this,arguments)}function z(){return z=(0,M.Z)((0,d.Z)().mark(function A(D){return(0,d.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",(0,a.WY)((0,l.w)()+"/api/authorization/addauthorization",{method:"POST",data:D}));case 1:case"end":return f.stop()}},A)})),z.apply(this,arguments)}function V(A){return H.apply(this,arguments)}function H(){return H=(0,M.Z)((0,d.Z)().mark(function A(D){return(0,d.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",(0,a.WY)((0,l.w)()+"/api/authorization/updateauthorization?id="+D,{method:"POST",data:D}));case 1:case"end":return f.stop()}},A)})),H.apply(this,arguments)}function G(A){return B.apply(this,arguments)}function B(){return B=(0,M.Z)((0,d.Z)().mark(function A(D){return(0,d.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",(0,a.WY)((0,l.w)()+"/api/authorization/updateauthtime",{method:"POST",data:D}));case 1:case"end":return f.stop()}},A)})),B.apply(this,arguments)}function x(A){return P.apply(this,arguments)}function P(){return P=(0,M.Z)((0,d.Z)().mark(function A(D){return(0,d.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",(0,a.WY)((0,l.w)()+"/api/authorization/delauthorization?id="+D,{method:"POST",data:D}));case 1:case"end":return f.stop()}},A)})),P.apply(this,arguments)}var q=r(64172),c=r(85893);n().extend(s()),n().extend(o());var st="YYYY/MM/DD",ct=J.Z.Paragraph,wt=J.Z.Text,ft=function(){var D=(0,y.useRef)(),b=(0,y.useState)(!1),f=(0,j.Z)(b,2),yt=f[0],_=f[1],pt=(0,y.useState)(),ot=(0,j.Z)(pt,2),xt=ot[0],vt=ot[1],$t=F.Z.useForm(),gt=(0,j.Z)($t,1),it=gt[0],Mt=(0,y.useState)([]),dt=(0,j.Z)(Mt,2),ut=dt[0],St=dt[1];(0,y.useEffect)(function(){q.Z.getRoleBasicMenu().then(function(Y){Y.data&&St(Y.data)})},[]);var Dt=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u6388\u6743\u7801",dataIndex:"key",valueType:"textarea",search:!1,render:function(O){return(0,c.jsx)(ct,{style:{display:"inline"},copyable:!0,children:O})}},{title:"\u6709\u6548\u65E5\u671F",dataIndex:"periodValidity",valueType:"textarea",width:200,search:!1,render:function(O,p){var L=n()(p.periodValidity,st).format("YYYY-MM-DD");return(0,c.jsx)("span",{children:p.periodValidity==null?"\u957F\u671F\u6709\u6548":L})}},{title:"\u4FEE\u6539\u65F6\u95F4",dataIndex:"updateAt",valueType:"textarea",width:200,search:!1},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:300,render:function(O,p){return[ut.includes("PlatAuthUp")&&(0,c.jsx)(Q.Z,{type:"primary",title:"\u786E\u8BA4\u66F4\u65B0\u5417?",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){V(p.id).then(function(k){k.statusCode==200&&k.data?(D.current.reload(),w.default.success("\u4FEE\u6539\u6210\u529F")):w.default.error(k.errors||"\u4FEE\u6539\u5931\u8D25")})},onCancel:function(){},children:(0,c.jsx)("a",{href:"#",children:"\u66F4\u65B0\u6388\u6743\u7801"})},"primary"),ut.includes("PlatAuthUpDate")&&(0,c.jsx)("a",{href:"#",onClick:function(){vt(p);var k=p.periodValidity==null?"cqyx":"gdsj",lt=p.periodValidity==null?null:n()(p.periodValidity,st);it.setFieldsValue({id:p.id,autho:k,periodValidity:lt}),_(!0)},children:"\u66F4\u65B0\u6388\u6743\u65F6\u95F4"}),ut.includes("PlatAuthDel")&&(0,c.jsx)(Q.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417?",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){x(p.id).then(function(k){k.statusCode==200&&k.data?(D.current.reload(),w.default.success("\u5220\u9664\u6210\u529F")):w.default.error(k.errors||"\u5220\u9664\u5931\u8D25")})},children:(0,c.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,c.jsxs)(h.ZP,{host:!0,header:{title:"",breadcrumb:{}},children:[(0,c.jsx)(at.ZP,{actionRef:D,rowKey:"id",pagination:{defaultPageSize:10},search:!1,toolBarRender:function(){return[ut.includes("PlatAuthAdd")&&(0,c.jsxs)(R.Z,{type:"primary",onClick:function(){_(!0),it.setFieldsValue({id:null,autho:"cqyx",periodValidity:null})},children:[(0,c.jsx)(X.Z,{})," \u6DFB\u52A0\u6388\u6743\u7801"]},"primary")]},request:function(){var Y=(0,M.Z)((0,d.Z)().mark(function O(p){var L,k;return(0,d.Z)().wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return L=[],k=0,tt.next=4,$(p).then(function(ht){k=ht.data.total,L=ht.data.data});case 4:return tt.abrupt("return",{data:L,success:!0,total:k});case 5:case"end":return tt.stop()}},O)}));return function(O){return Y.apply(this,arguments)}}(),columns:Dt}),(0,c.jsx)(I.Z,{title:"\u6388\u6743\u64CD\u4F5C",open:yt,onOk:function(){it.submit()},onCancel:function(){_(!1)},children:(0,c.jsxs)(F.Z,{form:it,onFinish:function(O){O.id?G(O).then(function(p){p.statusCode==200&&p.data?(w.default.success("\u4FEE\u6539\u6210\u529F"),D.current.reload(),_(!1)):w.default.error(p.errors||"\u4FEE\u6539\u5931\u8D25")}):S(O).then(function(p){p.statusCode==200&&p.data?(w.default.success("\u6DFB\u52A0\u6210\u529F"),D.current.reload(),_(!1)):w.default.error(p.errors||"\u6DFB\u52A0\u5931\u8D25")})},style:{maxWidth:600},children:[(0,c.jsx)(F.Z.Item,{name:"id",hidden:!0,children:(0,c.jsx)(i.Z,{})}),(0,c.jsx)(F.Z.Item,{name:"autho",label:"\u6388\u6743\u65F6\u95F4",rules:[{required:!0}],children:(0,c.jsxs)(Z.ZP.Group,{children:[(0,c.jsx)(Z.ZP,{value:"cqyx",children:" \u957F\u671F\u6709\u6548 "}),(0,c.jsx)(Z.ZP,{value:"gdsj",children:" \u56FA\u5B9A\u65F6\u95F4 "})]})}),(0,c.jsx)(F.Z.Item,{noStyle:!0,shouldUpdate:function(O,p){return O.autho!==p.autho},children:function(O){var p=O.getFieldValue;return p("autho")=="gdsj"?(0,c.jsx)(F.Z.Item,{name:"periodValidity",label:"\u56FA\u5B9A\u65F6\u95F4",rules:[{required:!0}],children:(0,c.jsx)(v.Z,{style:{width:"300px"}})}):null}})]})})]})},mt=ft},27484:function(K){(function(W,r){K.exports=r()})(this,function(){"use strict";var W=1e3,r=6e4,g=36e5,I="millisecond",T="second",v="minute",C="hour",Z="day",N="week",i="month",d="quarter",M="year",U="date",R="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Q=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,nt={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(u){var n=["th","st","nd","rd"],t=u%100;return"["+u+(n[(t-20)%10]||n[t]||n[0])+"]"}},w=function(u,n,t){var s=String(u);return!s||s.length>=n?u:""+Array(n+1-s.length).join(t)+u},et={s:w,z:function(u){var n=-u.utcOffset(),t=Math.abs(n),s=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+w(s,2,"0")+":"+w(e,2,"0")},m:function u(n,t){if(n.date()1)return u(a[0])}else{var l=n.name;j[l]=n,e=l}return!s&&e&&(F=e),e||!s&&F},y=function(u,n){if(rt(u))return u.clone();var t=typeof n=="object"?n:{};return t.date=u,t.args=arguments,new X(t)},h=et;h.l=J,h.i=rt,h.w=function(u,n){return y(u,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var X=function(){function u(t){this.$L=J(t.locale,null,!0),this.parse(t)}var n=u.prototype;return n.parse=function(t){this.$d=function(s){var e=s.date,o=s.utc;if(e===null)return new Date(NaN);if(h.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(E);if(a){var l=a[2]-1||0,$=(a[7]||"0").substring(0,3);return o?new Date(Date.UTC(a[1],l,a[3]||1,a[4]||0,a[5]||0,a[6]||0,$)):new Date(a[1],l,a[3]||1,a[4]||0,a[5]||0,a[6]||0,$)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return h},n.isValid=function(){return this.$d.toString()!==R},n.isSame=function(t,s){var e=y(t);return this.startOf(s)<=e&&e<=this.endOf(s)},n.isAfter=function(t,s){return y(t)