"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[464],{90503:function(A,i,n){n.d(i,{DH:function(){return p},Xk:function(){return P},n5:function(){return E},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)})}},E={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)})}}},46730:function(A,i,n){n.r(i);var f=n(15009),r=n.n(f),t=n(99289),P=n.n(t),p=n(5574),E=n.n(p),c=n(67286),a=n(15513),e=n(27484),R=n.n(e),b=n(71577),l=n(45360),g=n(67294),D=n(90503),s=n(85893);i.default=function(){var j=(0,g.useState)("table"),S=E()(j,2),T=S[0],O=S[1],h=(0,g.useRef)(),v=(0,g.useRef)(),L=function(){var d,o;(d=h.current)===null||d===void 0||d.resetFields(),(o=v.current)===null||o===void 0||o.reload()},I=[{title:"\u4E3B\u952E",dataIndex:"id",hideInForm:!0,search:!1},{title:"\u6743\u9650",dataIndex:"permission",ellipsis:!0,search:!1},{title:"\u7528\u6237\u540D",dataIndex:"userName"},{title:"\u65E5\u5FD7\u6D88\u606F",dataIndex:"msgInfo",width:120},{title:"\u65F6\u95F4",dataIndex:"createDate",render:function(d,o){return(0,s.jsx)(s.Fragment,{children:o.createDate?R()(o.createDate).format("YYYY-MM-DD HH:mm:ss"):""})}}];return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(c.Z,{children:[T==="form"?(0,s.jsx)(b.ZP,{type:"link",onClick:function(){var d;(d=h.current)===null||d===void 0||d.resetFields(),O("table")},children:"\u2B05\u8FD4\u56DE"}):"",(0,s.jsx)(a.Z,{columns:I,type:T,formRef:h,actionRef:v,onSubmit:function(d){console.log(d),T==="form"&&(d.id?D.n5.Update(d).then(function(o){o.statusCode===200?(l.ZP.info("\u66F4\u65B0\u6210\u529F!"),O("table"),L()):l.ZP.error(o.errors)}):D.n5.Add(d).then(function(o){o.statusCode===200?(l.ZP.info("\u65B0\u589E\u6210\u529F!"),O("table"),L()):l.ZP.error(o.errors)}))},request:P()(r()().mark(function _(){var d,o,m,M=arguments;return r()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return d=M.length>0&&M[0]!==void 0?M[0]:{},o={pageIndex:d.current||1,pageSize:d.pageSize||10,userName:d.userName,msgInfo:d.msgInfo},u.next=4,D.n5.PagedList(o);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()}},_)})),pagination:{pageSize:5,showSizeChanger:!1},rowKey:"id",dateFormatter:"string",headerTitle:"\u5217\u8868",toolBarRender:!1})]})})}}}]);
