|
- (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()<t.date())return-u(t,n);var s=12*(t.year()-n.year())+(t.month()-n.month()),e=n.clone().add(s,i),o=t-e<0,a=n.clone().add(s+(o?-1:1),i);return+(-(s+(t-e)/(o?e-a:a-e))||0)},a:function(u){return u<0?Math.ceil(u)||0:Math.floor(u)},p:function(u){return{M:i,y:M,w:N,d:Z,D:U,h:C,m:v,s:T,ms:I,Q:d}[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(u){return u===void 0}},F="en",j={};j[F]=nt;var rt=function(u){return u instanceof X},J=function u(n,t,s){var e;if(!n)return F;if(typeof n=="string"){var o=n.toLowerCase();j[o]&&(e=o),t&&(j[o]=t,e=o);var a=n.split("-");if(!e&&a.length>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)<this.startOf(s)},n.isBefore=function(t,s){return this.endOf(s)<y(t)},n.$g=function(t,s,e){return h.u(t)?this[s]:this.set(e,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,s){var e=this,o=!!h.u(s)||s,a=h.p(t),l=function(B,x){var P=h.w(e.$u?Date.UTC(e.$y,x,B):new Date(e.$y,x,B),e);return o?P:P.endOf(Z)},$=function(B,x){return h.w(e.toDate()[B].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(x)),e)},m=this.$W,S=this.$M,z=this.$D,V="set"+(this.$u?"UTC":"");switch(a){case M:return o?l(1,0):l(31,11);case i:return o?l(1,S):l(0,S+1);case N:var H=this.$locale().weekStart||0,G=(m<H?m+7:m)-H;return l(o?z-G:z+(6-G),S);case Z:case U:return $(V+"Hours",0);case C:return $(V+"Minutes",1);case v:return $(V+"Seconds",2);case T:return $(V+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,s){var e,o=h.p(t),a="set"+(this.$u?"UTC":""),l=(e={},e[Z]=a+"Date",e[U]=a+"Date",e[i]=a+"Month",e[M]=a+"FullYear",e[C]=a+"Hours",e[v]=a+"Minutes",e[T]=a+"Seconds",e[I]=a+"Milliseconds",e)[o],$=o===Z?this.$D+(s-this.$W):s;if(o===i||o===M){var m=this.clone().set(U,1);m.$d[l]($),m.init(),this.$d=m.set(U,Math.min(this.$D,m.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},n.set=function(t,s){return this.clone().$set(t,s)},n.get=function(t){return this[h.p(t)]()},n.add=function(t,s){var e,o=this;t=Number(t);var a=h.p(s),l=function(S){var z=y(o);return h.w(z.date(z.date()+Math.round(S*t)),o)};if(a===i)return this.set(i,this.$M+t);if(a===M)return this.set(M,this.$y+t);if(a===Z)return l(1);if(a===N)return l(7);var $=(e={},e[v]=r,e[C]=g,e[T]=W,e)[a]||1,m=this.$d.getTime()+t*$;return h.w(m,this)},n.subtract=function(t,s){return this.add(-1*t,s)},n.format=function(t){var s=this,e=this.$locale();if(!this.isValid())return e.invalidDate||R;var o=t||"YYYY-MM-DDTHH:mm:ssZ",a=h.z(this),l=this.$H,$=this.$m,m=this.$M,S=e.weekdays,z=e.months,V=function(x,P,q,c){return x&&(x[P]||x(s,o))||q[P].slice(0,c)},H=function(x){return h.s(l%12||12,x,"0")},G=e.meridiem||function(x,P,q){var c=x<12?"AM":"PM";return q?c.toLowerCase():c},B={YY:String(this.$y).slice(-2),YYYY:this.$y,M:m+1,MM:h.s(m+1,2,"0"),MMM:V(e.monthsShort,m,z,3),MMMM:V(z,m),D:this.$D,DD:h.s(this.$D,2,"0"),d:String(this.$W),dd:V(e.weekdaysMin,this.$W,S,2),ddd:V(e.weekdaysShort,this.$W,S,3),dddd:S[this.$W],H:String(l),HH:h.s(l,2,"0"),h:H(1),hh:H(2),a:G(l,$,!0),A:G(l,$,!1),m:String($),mm:h.s($,2,"0"),s:String(this.$s),ss:h.s(this.$s,2,"0"),SSS:h.s(this.$ms,3,"0"),Z:a};return o.replace(Q,function(x,P){return P||B[x]||a.replace(":","")})},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,s,e){var o,a=h.p(s),l=y(t),$=(l.utcOffset()-this.utcOffset())*r,m=this-l,S=h.m(this,l);return S=(o={},o[M]=S/12,o[i]=S,o[d]=S/3,o[N]=(m-$)/6048e5,o[Z]=(m-$)/864e5,o[C]=m/g,o[v]=m/r,o[T]=m/W,o)[a]||m,e?S:h.a(S)},n.daysInMonth=function(){return this.endOf(i).$D},n.$locale=function(){return j[this.$L]},n.locale=function(t,s){if(!t)return this.$L;var e=this.clone(),o=J(t,s,!0);return o&&(e.$L=o),e},n.clone=function(){return h.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},u}(),at=X.prototype;return y.prototype=at,[["$ms",I],["$s",T],["$m",v],["$H",C],["$W",Z],["$M",i],["$y",M],["$D",U]].forEach(function(u){at[u[1]]=function(n){return this.$g(n,u[0],u[1])}}),y.extend=function(u,n){return u.$i||(u(n,X,y),u.$i=!0),y},y.locale=J,y.isDayjs=rt,y.unix=function(u){return y(1e3*u)},y.en=j[F],y.Ls=j,y.p={},y})},96036:function(K){(function(W,r){K.exports=r()})(this,function(){"use strict";return function(W,r,g){var I=r.prototype,T=function(i){return i&&(i.indexOf?i:i.s)},v=function(i,d,M,U,R){var E=i.name?i:i.$locale(),Q=T(E[d]),nt=T(E[M]),w=Q||nt.map(function(F){return F.slice(0,U)});if(!R)return w;var et=E.weekStart;return w.map(function(F,j){return w[(j+(et||0))%7]})},C=function(){return g.Ls[g.locale()]},Z=function(i,d){return i.formats[d]||function(M){return M.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(U,R,E){return R||E.slice(1)})}(i.formats[d.toUpperCase()])},N=function(){var i=this;return{months:function(d){return d?d.format("MMMM"):v(i,"months")},monthsShort:function(d){return d?d.format("MMM"):v(i,"monthsShort","months",3)},firstDayOfWeek:function(){return i.$locale().weekStart||0},weekdays:function(d){return d?d.format("dddd"):v(i,"weekdays")},weekdaysMin:function(d){return d?d.format("dd"):v(i,"weekdaysMin","weekdays",2)},weekdaysShort:function(d){return d?d.format("ddd"):v(i,"weekdaysShort","weekdays",3)},longDateFormat:function(d){return Z(i.$locale(),d)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};I.localeData=function(){return N.bind(this)()},g.localeData=function(){var i=C();return{firstDayOfWeek:function(){return i.weekStart||0},weekdays:function(){return g.weekdays()},weekdaysShort:function(){return g.weekdaysShort()},weekdaysMin:function(){return g.weekdaysMin()},months:function(){return g.months()},monthsShort:function(){return g.monthsShort()},longDateFormat:function(d){return Z(i,d)},meridiem:i.meridiem,ordinal:i.ordinal}},g.months=function(){return v(C(),"months")},g.monthsShort=function(){return v(C(),"monthsShort","months",3)},g.weekdays=function(i){return v(C(),"weekdays",null,null,i)},g.weekdaysShort=function(i){return v(C(),"weekdaysShort","weekdays",3,i)},g.weekdaysMin=function(i){return v(C(),"weekdaysMin","weekdays",2,i)}}})},72540:function(K){(function(W,r){K.exports=r()})(this,function(){"use strict";return function(W,r){r.prototype.weekday=function(g){var I=this.$locale().weekStart||0,T=this.$W,v=(T<I?T+7:T)-I;return this.$utils().u(g)?v:this.subtract(v,"day").add(g,"day")}}})}}]);
|