"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8200],{93058:function(ae,A,a){a.r(A);var N=a(67294),D=a(17788),E=a(26412),r=a(76772),B=a(61314),n=a(85893),U=function(f){var o,t=f.values,j=f.businessTypeOptions,R=f.operatorTypeOptions,K=f.statusOptions,S=(0,r.useIntl)(),w=function(){console.log("handle ok")},Z=function(){f.onCancel()};return(0,n.jsx)(D.Z,{width:640,title:S.formatMessage({id:"monitor.operlog.title",defaultMessage:"\u7F16\u8F91\u64CD\u4F5C\u65E5\u5FD7\u8BB0\u5F55"}),open:f.open,destroyOnClose:!0,onOk:w,onCancel:Z,children:(0,n.jsxs)(E.Z,{column:24,children:[(0,n.jsx)(E.Z.Item,{span:12,label:(0,n.jsx)(r.FormattedMessage,{id:"monitor.operlog.module",defaultMessage:"\u64CD\u4F5C\u6A21\u5757"}),children:"".concat(t.title,"/").concat((0,B.n)(j,t.businessType))}),(0,n.jsx)(E.Z.Item,{span:12,label:(0,n.jsx)(r.FormattedMessage,{id:"monitor.operlog.request_method",defaultMessage:"\u8BF7\u6C42\u65B9\u5F0F"}),children:t.requestMethod}),(0,n.jsx)(E.Z.Item,{span:12,label:(0,n.jsx)(r.FormattedMessage,{id:"monitor.operlog.oper_name",defaultMessage:"\u64CD\u4F5C\u4EBA\u5458"}),children:"".concat(t.operName,"/").concat(t.operIp)}),(0,n.jsx)(E.Z.Item,{span:12,label:(0,n.jsx)(r.FormattedMessage,{id:"monitor.operlog.operator_type",defaultMessage:"\u64CD\u4F5C\u7C7B\u522B"}),children:(0,B.n)(R,t.operatorType)}),(0,n.jsx)(E.Z.Item,{span:24,label:(0,n.jsx)(r.FormattedMessage,{id:"monitor.operlog.method",defaultMessage:"\u65B9\u6CD5\u540D\u79F0"}),children:t.method}),(0,n.jsx)(E.Z.Item,{span:24,label:(0,n.jsx)(r.FormattedMessage,{id:"monitor.operlog.oper_url",defaultMessage:"\u8BF7\u6C42URL"}),children:t.operUrl}),(0,n.jsx)(E.Z.Item,{span:24,label:(0,n.jsx)(r.FormattedMessage,{id:"monitor.operlog.oper_param",defaultMessage:"\u8BF7\u6C42\u53C2\u6570"}),children:t.operParam}),(0,n.jsx)(E.Z.Item,{span:24,label:(0,n.jsx)(r.FormattedMessage,{id:"monitor.operlog.json_result",defaultMessage:"\u8FD4\u56DE\u53C2\u6570"}),children:t.jsonResult}),(0,n.jsx)(E.Z.Item,{span:24,label:(0,n.jsx)(r.FormattedMessage,{id:"monitor.operlog.error_msg",defaultMessage:"\u9519\u8BEF\u6D88\u606F"}),children:t.errorMsg}),(0,n.jsx)(E.Z.Item,{span:12,label:(0,n.jsx)(r.FormattedMessage,{id:"monitor.operlog.status",defaultMessage:"\u64CD\u4F5C\u72B6\u6001"}),children:(0,B.n)(K,t.status)}),(0,n.jsx)(E.Z.Item,{span:12,label:(0,n.jsx)(r.FormattedMessage,{id:"monitor.operlog.oper_time",defaultMessage:"\u64CD\u4F5C\u65F6\u95F4"}),children:(o=t.operTime)===null||o===void 0?void 0:o.toString()})]})})};A.default=U},38200:function(ae,A,a){a.r(A);var N=a(5574),D=a.n(N),E=a(15009),r=a.n(E),B=a(97857),n=a.n(B),U=a(99289),v=a.n(U),f=a(67294),o=a(76772),t=a(2453),j=a(83622),R=a(17788),K=a(6110),S=a(65385),w=a(2236),Z=a(24969),x=a(11475),V=a(48689),y=a(32597),te=a(93058),$=a(92982),k=a(94162),s=a(85893),ne=function(){var C=v()(r()().mark(function h(d){var _,u;return r()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return _=t.ZP.loading("\u6B63\u5728\u6DFB\u52A0"),e.prev=1,e.next=4,(0,y.zg)(n()({},d));case 4:return u=e.sent,_(),u.code===200?t.ZP.success("\u6DFB\u52A0\u6210\u529F"):t.ZP.error(u.msg),e.abrupt("return",!0);case 10:return e.prev=10,e.t0=e.catch(1),_(),t.ZP.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),e.abrupt("return",!1);case 15:case"end":return e.stop()}},h,null,[[1,10]])}));return function(d){return C.apply(this,arguments)}}(),ue=function(){var C=v()(r()().mark(function h(d){var _,u;return r()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return _=t.ZP.loading("\u6B63\u5728\u66F4\u65B0"),e.prev=1,e.next=4,(0,y.HM)(d);case 4:return u=e.sent,_(),u.code===200?t.ZP.success("\u66F4\u65B0\u6210\u529F"):t.ZP.error(u.msg),e.abrupt("return",!0);case 10:return e.prev=10,e.t0=e.catch(1),_(),t.ZP.error("\u914D\u7F6E\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),e.abrupt("return",!1);case 15:case"end":return e.stop()}},h,null,[[1,10]])}));return function(d){return C.apply(this,arguments)}}(),J=function(){var C=v()(r()().mark(function h(d){var _,u;return r()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(_=t.ZP.loading("\u6B63\u5728\u5220\u9664"),d){e.next=3;break}return e.abrupt("return",!0);case 3:return e.prev=3,e.next=6,(0,y.Ro)(d.map(function(H){return H.operId}).join(","));case 6:return u=e.sent,_(),u.code===200?t.ZP.success("\u5220\u9664\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"):t.ZP.error(u.msg),e.abrupt("return",!0);case 12:return e.prev=12,e.t0=e.catch(3),_(),t.ZP.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),e.abrupt("return",!1);case 17:case"end":return e.stop()}},h,null,[[3,12]])}));return function(d){return C.apply(this,arguments)}}(),le=function(){var C=v()(r()().mark(function h(){var d,_;return r()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return d=t.ZP.loading("\u6B63\u5728\u6E05\u7A7A"),p.prev=1,p.next=4,(0,y.Xe)();case 4:return _=p.sent,d(),_.code===200?t.ZP.success("\u6E05\u7A7A\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"):t.ZP.error(_.msg),p.abrupt("return",!0);case 10:return p.prev=10,p.t0=p.catch(1),d(),t.ZP.error("\u6E05\u7A7A\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),p.abrupt("return",!1);case 15:case"end":return p.stop()}},h,null,[[1,10]])}));return function(){return C.apply(this,arguments)}}(),oe=function(){var C=v()(r()().mark(function h(){var d;return r()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return d=t.ZP.loading("\u6B63\u5728\u5BFC\u51FA"),u.prev=1,u.next=4,(0,y.G6)();case 4:return d(),t.ZP.success("\u5BFC\u51FA\u6210\u529F"),u.abrupt("return",!0);case 9:return u.prev=9,u.t0=u.catch(1),d(),t.ZP.error("\u5BFC\u51FA\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),u.abrupt("return",!1);case 14:case"end":return u.stop()}},h,null,[[1,9]])}));return function(){return C.apply(this,arguments)}}(),ie=function(){var h=(0,f.useRef)(),d=(0,f.useState)(!1),_=D()(d,2),u=_[0],p=_[1],e=(0,f.useRef)(),H=(0,f.useState)(),Q=D()(H,2),de=Q[0],W=Q[1],_e=(0,f.useState)([]),Y=D()(_e,2),O=Y[0],L=Y[1],pe=(0,f.useState)([]),q=D()(pe,2),X=q[0],ce=q[1],me=(0,f.useState)([]),ee=D()(me,2),z=ee[0],ge=ee[1],fe=(0,f.useState)([]),re=D()(fe,2),G=re[0],he=re[1],F=(0,o.useAccess)(),ve=(0,o.useIntl)();(0,f.useEffect)(function(){(0,$.pX)("sys_oper_type",!0).then(function(m){ce(m)}),(0,$.pX)("sys_oper_type",!0).then(function(m){ge(m)}),(0,$.pX)("sys_common_status",!0).then(function(m){he(m)})},[]);var Me=[{title:(0,s.jsx)(o.FormattedMessage,{id:"monitor.operlog.oper_id",defaultMessage:"\u65E5\u5FD7\u4E3B\u952E"}),dataIndex:"operId",valueType:"text",hideInSearch:!0},{title:(0,s.jsx)(o.FormattedMessage,{id:"monitor.operlog.title",defaultMessage:"\u64CD\u4F5C\u6A21\u5757"}),dataIndex:"title",valueType:"text"},{title:(0,s.jsx)(o.FormattedMessage,{id:"monitor.operlog.business_type",defaultMessage:"\u4E1A\u52A1\u7C7B\u578B"}),dataIndex:"businessType",valueType:"select",valueEnum:X,render:function(c,i){return(0,s.jsx)(k.Z,{enums:X,value:i.businessType})}},{title:(0,s.jsx)(o.FormattedMessage,{id:"monitor.operlog.request_method",defaultMessage:"\u8BF7\u6C42\u65B9\u5F0F"}),dataIndex:"requestMethod",valueType:"text"},{title:(0,s.jsx)(o.FormattedMessage,{id:"monitor.operlog.operator_type",defaultMessage:"\u64CD\u4F5C\u7C7B\u522B"}),dataIndex:"operatorType",valueType:"select",valueEnum:z,render:function(c,i){return(0,s.jsx)(k.Z,{enums:z,value:i.operatorType})}},{title:(0,s.jsx)(o.FormattedMessage,{id:"monitor.operlog.oper_name",defaultMessage:"\u64CD\u4F5C\u4EBA\u5458"}),dataIndex:"operName",valueType:"text"},{title:(0,s.jsx)(o.FormattedMessage,{id:"monitor.operlog.oper_ip",defaultMessage:"\u4E3B\u673A\u5730\u5740"}),dataIndex:"operIp",valueType:"text"},{title:(0,s.jsx)(o.FormattedMessage,{id:"monitor.operlog.oper_location",defaultMessage:"\u64CD\u4F5C\u5730\u70B9"}),dataIndex:"operLocation",valueType:"text"},{title:(0,s.jsx)(o.FormattedMessage,{id:"monitor.operlog.status",defaultMessage:"\u64CD\u4F5C\u72B6\u6001"}),dataIndex:"status",valueType:"select",valueEnum:G,render:function(c,i){return(0,s.jsx)(k.Z,{enums:G,value:i.status},"status")}},{title:(0,s.jsx)(o.FormattedMessage,{id:"monitor.operlog.oper_time",defaultMessage:"\u64CD\u4F5C\u65F6\u95F4"}),dataIndex:"operTime",valueType:"dateTime"},{title:(0,s.jsx)(o.FormattedMessage,{id:"pages.searchTable.titleOption",defaultMessage:"\u64CD\u4F5C"}),dataIndex:"option",width:"120px",valueType:"option",render:function(c,i){return[(0,s.jsx)(j.ZP,{type:"link",size:"small",hidden:!F.hasPerms("system:operlog:edit"),onClick:function(){p(!0),W(i)},children:"\u8BE6\u7EC6"},"edit")]}}];return(0,s.jsxs)(K._z,{children:[(0,s.jsx)("div",{style:{width:"100%",float:"right"},children:(0,s.jsx)(S.Z,{headerTitle:ve.formatMessage({id:"pages.searchTable.title",defaultMessage:"\u4FE1\u606F"}),actionRef:e,formRef:h,rowKey:"operId",search:{labelWidth:120},toolBarRender:function(){return[(0,s.jsxs)(j.ZP,{type:"primary",hidden:!F.hasPerms("system:operlog:add"),onClick:v()(r()().mark(function c(){return r()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:W(void 0),p(!0);case 2:case"end":return l.stop()}},c)})),children:[(0,s.jsx)(Z.Z,{})," ",(0,s.jsx)(o.FormattedMessage,{id:"pages.searchTable.new",defaultMessage:"\u65B0\u5EFA"})]},"add"),(0,s.jsxs)(j.ZP,{type:"primary",danger:!0,hidden:(O==null?void 0:O.length)===0||!F.hasPerms("system:operlog:remove"),onClick:v()(r()().mark(function c(){return r()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:R.Z.confirm({title:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u6240\u9009\u6570\u636E\u9879?",icon:(0,s.jsx)(x.Z,{}),content:"\u8BF7\u8C28\u614E\u64CD\u4F5C",onOk:function(){return v()(r()().mark(function M(){var b,P,T;return r()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,J(O);case 2:b=g.sent,b&&(L([]),(P=e.current)===null||P===void 0||(T=P.reloadAndRest)===null||T===void 0||T.call(P));case 4:case"end":return g.stop()}},M)}))()},onCancel:function(){}});case 1:case"end":return l.stop()}},c)})),children:[(0,s.jsx)(V.Z,{}),(0,s.jsx)(o.FormattedMessage,{id:"pages.searchTable.delete",defaultMessage:"\u5220\u9664"})]},"remove"),(0,s.jsxs)(j.ZP,{type:"primary",danger:!0,hidden:!F.hasPerms("system:operlog:remove"),onClick:v()(r()().mark(function c(){return r()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:R.Z.confirm({title:"\u662F\u5426\u786E\u8BA4\u6E05\u7A7A\u6240\u6709\u6570\u636E\u9879?",icon:(0,s.jsx)(x.Z,{}),content:"\u8BF7\u8C28\u614E\u64CD\u4F5C",onOk:function(){return v()(r()().mark(function M(){var b,P,T;return r()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,le();case 2:b=g.sent,b&&(L([]),(P=e.current)===null||P===void 0||(T=P.reloadAndRest)===null||T===void 0||T.call(P));case 4:case"end":return g.stop()}},M)}))()},onCancel:function(){}});case 1:case"end":return l.stop()}},c)})),children:[(0,s.jsx)(V.Z,{}),(0,s.jsx)(o.FormattedMessage,{id:"pages.searchTable.cleanAll",defaultMessage:"\u6E05\u7A7A"})]},"clean"),(0,s.jsxs)(j.ZP,{type:"primary",hidden:!F.hasPerms("system:operlog:export"),onClick:v()(r()().mark(function c(){return r()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:oe();case 1:case"end":return l.stop()}},c)})),children:[(0,s.jsx)(Z.Z,{}),(0,s.jsx)(o.FormattedMessage,{id:"pages.searchTable.export",defaultMessage:"\u5BFC\u51FA"})]},"export")]},request:function(c){return(0,y.s8)(n()({},c)).then(function(i){var l={data:i.rows,total:i.total,success:!0};return l})},columns:Me,rowSelection:{onChange:function(c,i){L(i)}}},"operlogList")}),(O==null?void 0:O.length)>0&&(0,s.jsx)(w.S,{extra:(0,s.jsxs)("div",{children:[(0,s.jsx)(o.FormattedMessage,{id:"pages.searchTable.chosen",defaultMessage:"\u5DF2\u9009\u62E9"}),(0,s.jsx)("a",{style:{fontWeight:600},children:O.length}),(0,s.jsx)(o.FormattedMessage,{id:"pages.searchTable.item",defaultMessage:"\u9879"})]}),children:(0,s.jsx)(j.ZP,{danger:!0,hidden:!F.hasPerms("system:operlog:del"),onClick:v()(r()().mark(function m(){return r()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:R.Z.confirm({title:"\u5220\u9664",content:"\u786E\u5B9A\u5220\u9664\u8BE5\u9879\u5417\uFF1F",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var l=v()(r()().mark(function M(){var b,P,T;return r()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,J(O);case 2:b=g.sent,b&&(L([]),(P=e.current)===null||P===void 0||(T=P.reloadAndRest)===null||T===void 0||T.call(P));case 4:case"end":return g.stop()}},M)}));function I(){return l.apply(this,arguments)}return I}()});case 1:case"end":return i.stop()}},m)})),children:(0,s.jsx)(o.FormattedMessage,{id:"pages.searchTable.batchDeletion",defaultMessage:"\u6279\u91CF\u5220\u9664"})},"remove")}),(0,s.jsx)(te.default,{onSubmit:function(){var m=v()(r()().mark(function c(i){var l;return r()().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(l=!1,!i.operId){M.next=7;break}return M.next=4,ue(n()({},i));case 4:l=M.sent,M.next=10;break;case 7:return M.next=9,ne(n()({},i));case 9:l=M.sent;case 10:l&&(p(!1),W(void 0),e.current&&e.current.reload());case 11:case"end":return M.stop()}},c)}));return function(c){return m.apply(this,arguments)}}(),onCancel:function(){p(!1),W(void 0)},open:u,values:de||{},businessTypeOptions:X,operatorTypeOptions:z,statusOptions:G})]})};A.default=ie}}]); |