Index-legacy-e41ed64d.js 7.4 KB

1
  1. System.register(["./index-legacy-4d01450a.js","./CusNavigation-legacy-6c20afcf.js","./index-legacy-755e9f4a.js","./ReloadOutlined-legacy-525c1ef3.js"],(function(e,t){"use strict";var n,l,i,a,o,r,u,d,c,f,s,p,v,g,x,m,h,y,b,w,k,_,C,z,F,S;return{setters:[function(e){n=e.d,l=e.i,i=e.n,a=e.r,o=e.o,r=e.b,u=e.w,d=e.c,c=e.C,f=e.e,s=e.t,p=e.v,v=e.y,g=e.f,x=e.F,m=e.M,h=e.E,y=e.D,b=e.G,w=e.S,k=e.p,_=e.j,C=e._},function(e){z=e.C},function(e){F=e.p},function(e){S=e.R}],execute:function(){var t=document.createElement("style");t.textContent="[data-v-dd49940e] .ant-table-wrapper{height:0px;flex-grow:1}[data-v-dd49940e] .ant-spin-nested-loading{height:100%}[data-v-dd49940e] .ant-spin-container{height:100%;display:flex;flex-direction:column}[data-v-dd49940e] .ant-table{flex-grow:1;height:0px}[data-v-dd49940e] .ant-table-container{height:100%;display:flex;flex-direction:column}[data-v-dd49940e] .ant-table-body{overflow-y:auto!important;flex-grow:1;border-bottom:1px solid #eee;border-right:1px solid #eee}[data-v-dd49940e] .ant-table-body::-webkit-scrollbar{width:1px;height:8px;background:#0058FF}[data-v-dd49940e] .ant-table-body::-webkit-scrollbar-track{width:1px;background:#eee}[data-v-dd49940e] .ant-table-body::-webkit-scrollbar-thumb{width:1px;background:#0058FF}[data-v-dd49940e] .ant-table-body::-webkit-scrollbar-thumb:hover{background:#0058FF}[data-v-dd49940e] .ant-table-body::-webkit-scrollbar-corner{width:1px;background:#eee}.cus-forbidden[data-v-dd49940e]:hover{cursor:not-allowed}\n",document.head.appendChild(t);var j={style:{overflow:"visible"}},D=n({__name:"Detail",setup:function(e,t){var n=t.expose,p=function(e){console.log(e),v.value=!1},v=l(!1),g=l();return i((function(){})),n({show:function(e){v.value=!0,g.value=e},hidden:function(){v.value=!1}}),function(e,t){var n=a("a-button"),l=a("a-modal");return o(),r(l,{title:"设备日志",visible:v.value,"onUpdate:visible":t[0]||(t[0]=function(e){return v.value=e}),maskClosable:!1,width:580,bodyStyle:{height:"500px",overflow:"auto",padding:"10px"}},{footer:u((function(){return[d(n,{type:"primary",onClick:p},{default:u((function(){return[c("知道了")]})),_:1})]})),default:u((function(){return[f("pre",j,s(g.value),1)]})),_:1},8,["visible"])}}}),T=function(e){return k("data-v-dd49940e"),e=e(),_(),e},Y={class:"cus-animation",style:{height:"100%",width:"100%",padding:"16px 20px",display:"flex","flex-direction":"column"}},E={style:{display:"flex","justify-content":"space-between","align-items":"flex-end"}},H={style:{display:"flex"}},M={style:{display:"flex","align-items":"center"}},O=T((function(){return f("span",{style:{"font-size":"16px","margin-right":"5px"}},"当前数据文件大小为",-1)})),R={style:{"font-size":"16px","margin-right":"5px"}},U=T((function(){return f("span",{style:{"font-size":"16px"}},",可",-1)})),I=T((function(){return f("span",{style:{"font-size":"16px","margin-right":"5px"}},",删除",-1)})),G=T((function(){return f("span",{style:{"font-size":"16px","margin-left":"5px"}},"前的数据",-1)})),J={style:{"margin-left":"50px"}},L={style:{"white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden"}},N=["onClick"],Q=T((function(){return f("a",{style:{"margin-left":"26px"}},"删除",-1)}));e("default",C(n({__name:"Index",setup:function(e){var t=l(null),n=p({x:1300}),r=p({pageSize:20,current:1,size:"default",showQuickJumper:!0,showTotal:function(e){return"共 ".concat(e," 条数据")},onChange:function(e,t){this.current=e,this.pageSize=t,T()}}),k=l([]),_=l(0),C=l(!1),j=p({size:20,page:1,sort:"time",order:"desc",keyWord:"",mac:""}),T=function(){C.value=!0,j.size=r.pageSize,j.page=r.current,F({url:"/error-log/search",data:j},(function(e){console.log(e),r.total=e.total,k.value=e.data,C.value=!1})),F({url:"/system/data-file-size"},(function(e){console.log(e),_.value=e.data}))},W=function(){r.current=1,T()},q=l(null),A=function(){m.confirm({title:"确定清理数据?",icon:d(h),content:"操作耗时较长,且影响系统的正常运行,请在空闲时操作!",onOk:function(){F({url:"/system/vacuum"},(function(e){console.log(e)}))},onCancel:function(){}})},B=l(null),K=function(){console.log(B.value),B.value?m.confirm({title:"确定删除数据?",icon:d(h),content:"操作将会批量删除数据,且不可恢复,请谨慎操作!",onOk:function(){var e=b(B.value).format("YYYY-MM-DD HH:mm:ss");console.log(e),F({url:"/error-log/delete-batch",data:{date:e}},(function(e){console.log(e),y.info("删除成功"),T()}))},onCancel:function(){}}):y.error("日期不能为空")};return i((function(){var e;n.y=(null===(e=t.value)||void 0===e?void 0:e.clientHeight)-113,T()})),function(e,l){var i=a("a-tooltip"),p=a("a-input"),m=a("a-form-item"),h=a("a-form"),b=a("a-date-picker"),P=a("a-button"),V=a("a-table-column"),X=a("a-popconfirm"),Z=a("a-table");return o(),v(x,null,[f("div",Y,[d(g(z),{title:"设备日志"}),f("div",E,[f("div",H,[d(h,{layout:"inline",model:j},{default:u((function(){return[d(m,null,{default:u((function(){return[d(p,{allowClear:"",value:j.mac,"onUpdate:value":l[0]||(l[0]=function(e){return j.mac=e}),placeholder:"请输入要查询的内容",style:{width:"280px"}},{suffix:u((function(){return[d(i,{title:"点击搜索",onClick:W},{default:u((function(){return[d(g(w),{style:{color:"rgba(0, 0, 0, 0.45)"}})]})),_:1})]})),_:1},8,["value"])]})),_:1})]})),_:1},8,["model"])]),f("div",M,[f("div",null,[O,f("span",R,s(_.value),1),U,f("span",{style:{"font-size":"16px"}},[f("a",{onClick:A},"清理")]),I,d(b,{"show-time":"",style:{width:"195px"},value:B.value,"onUpdate:value":l[1]||(l[1]=function(e){return B.value=e})},null,8,["value"]),G,d(P,{size:"small",type:"primary",style:{"margin-left":"10px"},onClick:K},{default:u((function(){return[c("删除")]})),_:1})]),f("div",J,[d(i,{onClick:T},{default:u((function(){return[d(g(S),{style:{"font-size":"20px"},spin:C.value},null,8,["spin"])]})),_:1})])])]),f("div",{ref_key:"table_container",ref:t,style:{"margin-top":"9px","border-top":"1px solid #eee",display:"flex","flex-direction":"column",overflow:"hidden",height:"0px","flex-grow":"1"}},[d(Z,{"data-source":k.value,pagination:r,scroll:n,bordered:!0,loading:C.value,size:"middle"},{default:u((function(){return[d(V,{title:"序号",width:60,fixed:"left",align:"center"},{default:u((function(e){var t=e.index;return[f("div",null,s(t+1),1)]})),_:1}),d(V,{title:"编号","data-index":"id",width:200,fixed:"left",align:"center"}),d(V,{title:"错误源","data-index":"source",width:160,fixed:"left"}),d(V,{title:"错误记录",width:200,ellipsis:!0},{default:u((function(e){var t=e.record;return[d(i,{placement:"topLeft",mouseEnterDelay:.8,overlayStyle:{"max-width":"500px"}},{title:u((function(){return[f("div",null,s(t.result),1)]})),default:u((function(){return[f("div",L,s(t.result),1)]})),_:2},1024)]})),_:1}),d(V,{title:"添加时间","data-index":"createTime",width:200}),d(V,{title:"操作",width:160,fixed:"right"},{default:u((function(e){var t=e.record;return[f("div",null,[f("a",{style:{"margin-left":"0px"},onClick:function(e){return function(e){var t;console.log(e),null===(t=q.value)||void 0===t||t.show(e)}(t)}},"查看",8,N),d(X,{title:"确定删除?",okText:"确定",cancelText:"取消",onConfirm:function(e){return function(e){console.log(e);var t={id:e.id};F({url:"/error-log/delete",data:t},(function(e){console.log(e),y.info(e.msg),T()}))}(t)}},{default:u((function(){return[Q]})),_:2},1032,["onConfirm"])])]})),_:1})]})),_:1},8,["data-source","pagination","scroll","loading"])],512)]),d(D,{ref_key:"detailRef",ref:q},null,512)],64)}}}),[["__scopeId","data-v-dd49940e"]]))}}}));