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