"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[675],{90503:function(A,s,n){n.d(s,{DH:function(){return P},Xk:function(){return p},n5:function(){return g},xu:function(){return c}});var f=n(97857),r=n.n(f),t=n(12578),p={Add:function(e){return(0,t.request)("/api/alarmlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/alarmlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/alarmlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/alarmlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/alarmlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/alarmlog/pagedlist",{method:"POST",data:r()({},e)})}},P={Add:function(e){return(0,t.request)("/api/programlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/programlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/programlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/programlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/programlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/programlog/pagedlist",{method:"POST",data:r()({},e)})}},g={Add:function(e){return(0,t.request)("/api/userlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/userlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/userlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/userlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/userlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/userlog/pagedlist",{method:"POST",data:r()({},e)})}},c={Add:function(e){return(0,t.request)("/api/runlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/runlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/runlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/runlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/runlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/runlog/pagedlist",{method:"POST",data:r()({},e)})}}},48098:function(A,s,n){n.r(s);var f=n(15009),r=n.n(f),t=n(99289),p=n.n(t),P=n(5574),g=n.n(P),c=n(67286),a=n(15513),e=n(71577),i=n(45360),E=n(67294),T=n(90503),_=n(85893);s.default=function(){var b=(0,E.useState)("table"),S=g()(b,2),D=S[0],O=S[1],h=(0,E.useRef)(),v=(0,E.useRef)(),L=function(){var o,d;(o=h.current)===null||o===void 0||o.resetFields(),(d=v.current)===null||d===void 0||d.reload()},R=[{title:"\u4E3B\u952E",dataIndex:"id",search:!1},{title:"\u65E5\u5FD7\u7C7B\u522B",dataIndex:"logType"},{title:"\u65E5\u5FD7\u6D88\u606F",dataIndex:"msgInfo"}];return(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(c.Z,{children:[D==="form"?(0,_.jsx)(e.ZP,{type:"link",onClick:function(){var o;(o=h.current)===null||o===void 0||o.resetFields(),O("table")},children:"\u2B05\u8FD4\u56DE"}):"",(0,_.jsx)(a.Z,{columns:R,type:D,formRef:h,actionRef:v,onSubmit:function(o){console.log(o),D==="form"&&(o.id?T.xu.Update(o).then(function(d){d.statusCode===200?(i.ZP.info("\u66F4\u65B0\u6210\u529F!"),O("table"),L()):i.ZP.error(d.errors)}):T.xu.Add(o).then(function(d){d.statusCode===200?(i.ZP.info("\u65B0\u589E\u6210\u529F!"),O("table"),L()):i.ZP.error(d.errors)}))},request:p()(r()().mark(function l(){var o,d,m,M=arguments;return r()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return o=M.length>0&&M[0]!==void 0?M[0]:{},d={pageIndex:o.current||1,pageSize:o.pageSize||10,logType:o.logType,msgInfo:o.msgInfo},u.next=4,T.xu.PagedList(d);case 4:if(m=u.sent,m.statusCode!==200){u.next=9;break}return u.abrupt("return",{data:m.data.items,success:!0,total:m.data.total});case 9:return u.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return u.stop()}},l)})),pagination:{pageSize:5},rowKey:"id",dateFormatter:"string",headerTitle:"\u5217\u8868",toolBarRender:!1})]})})}}}]);
