import{C as S}from"./ConnectStatus.39609056.js";import{_ as h}from"./index.c9528988.js";import{a5 as d,o as m,c as _,X as s,R as o,a as r,W as c,ak as b,S as z}from"./vendor-vue.e07d7f7e.js";import"./element-icon.bb5f2c38.js";import"./vendor-lib.f93a8f58.js";import"./element-plus.0d508af4.js";const w={name:"",components:{ConnectStatus:S},props:{list:{type:Array}},computed:{},data(){return{currentRow:null,dialogVisible:!1}},methods:{handleEditRow(t){this.currentRow=t,this.dialogVisible=!0},async handleDeleteClick(t){let a={id:t.id};const n=await this.$http.function(a);n.code==0?(this.$msg.success("\u64CD\u4F5C\u6210\u529F"),this.$emit("on-success")):this.$msg.error(n.msg)},async handleStatusChange(t){let a={id:t.id};const n=await this.$http.function(a);n.code==0?(this.$msg.success("\u64CD\u4F5C\u6210\u529F"),this.$emit("on-success")):this.$msg.error(n.msg)},handleUpdateSuccess(){this.$emit("on-success")}},created(){}};function C(t,a,n,f,i,p){const l=d("el-table-column"),g=d("ConnectStatus"),u=d("el-table");return m(),_("div",null,[s(u,{data:n.list,stripe:"",border:""},{default:o(()=>[s(l,{label:"\u5E8F\u53F7",align:"center",prop:"id",width:"60"},{default:o(e=>[r("span",null,c(e.$index+1),1)]),_:1}),s(l,{label:"\u5F00\u59CB\u65F6\u95F4","header-align":"center",align:"center",prop:"create_time"},{default:o(e=>[r("span",null,c(e.row.create_time||"-"),1)]),_:1}),s(l,{label:"\u7ED3\u675F\u65F6\u95F4","header-align":"center",align:"center",prop:"update_time"},{default:o(e=>[r("span",null,c(e.row.update_time||"-"),1)]),_:1}),s(l,{label:"\u6301\u7EED\u65F6\u95F4","header-align":"center",align:"center",prop:"total_time_label"},{default:o(e=>[r("span",null,c(e.row.total_time_label||"-"),1)]),_:1}),s(l,{label:"\u72B6\u6001","header-align":"center",align:"center",prop:"status",width:"60"},{default:o(e=>[s(g,{value:e.row.status},null,8,["value"])]),_:1}),s(l,{label:"\u9519\u8BEF\u4FE1\u606F","header-align":"center",align:"center",prop:"status"},{default:o(e=>[r("span",null,c(e.row.error_message||"-"),1)]),_:1})]),_:1},8,["data"])])}const D=h(w,[["render",C]]),y={name:"log-scheduler-list",props:{},components:{DataTable:D},data(){return{list:[],total:0,page:1,size:20,keywords:"",loading:!0,dialogVisible:!1,pageSizeCachekey:"pageSize"}},computed:{},methods:{resetData(){this.page=1,this.getData()},refreshData(){this.getData()},async getData(){this.loading=!0;let t={ticket:this.ticket,page:this.page,size:this.size,keywords:this.keywords};const a=await this.$http.getLogSchedulerList(t);a.code==0&&(this.list=a.data.list,this.total=a.data.total),this.loading=!1},handleAddRow(){this.dialogVisible=!0},handleAddSuccess(){this.resetData()},handleSizeChange(t){localStorage.setItem(this.pageSizeCachekey,t),this.resetData()},loadPageSize(){let t=localStorage.getItem(this.pageSizeCachekey);t&&(this.size=parseInt(t))}},created(){this.loadPageSize(),this.getData()}},k={class:"app-container"};function v(t,a,n,f,i,p){const l=d("DataTable"),g=d("el-pagination"),u=b("loading");return m(),_("div",k,[z(s(l,{list:i.list,onOnSuccess:p.resetData},null,8,["list","onOnSuccess"]),[[u,i.loading]]),s(g,{class:"mt-md justify-center",background:"",layout:"total, sizes, prev, pager, next",total:i.total,"page-size":i.size,"onUpdate:page-size":a[0]||(a[0]=e=>i.size=e),"current-page":i.page,"onUpdate:current-page":a[1]||(a[1]=e=>i.page=e),onCurrentChange:p.getData,onSizeChange:p.handleSizeChange},null,8,["total","page-size","current-page","onCurrentChange","onSizeChange"])])}const I=h(y,[["render",v]]);export{I as default};
