import{B as e}from"./index420.js?v=1761009159";import{K as a}from"./utils-lib.js?v=1761009159";import{c as l,s,g as t,e as r,C as o,U as u,a6 as i,v as m,x as n,y as p}from"./base-lib.js?v=1761009159";import{j as v,h as c}from"./form-item.js?v=1761009159";import{C as d}from"./useController8.js?v=1761009159";import{L as b}from"./useStore6.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";import"./index126.js?v=1761009159";import"./index119.js?v=1761009159";import"./index105.js?v=1761009159";import"./column.js?v=1761009159";import"./useStore7.js?v=1761009159";import"./validator.js?v=1761009159";const j={class:"p-[20px] pb-0 flex flex-col"},f=l({__name:"index",setup(l,{expose:f}){const x=b(),{outDataForm:y,countType:g,configData:_}=s(x),{$reset_out:w}=x,{BtForm:C,submit:E}=a({data:y.value,options:a=>{var l,s;const i="crontab"===(null==(l=_.value)?void 0:l.type),m=g.value.includes(null==(s=_.value)?void 0:s.type);return i&&(a.value.isOutError=y.value.isOutError),m&&(a.value.count=y.value.count),t(()=>{var l;return[v("类型","type",m?[{label:"所有日志",value:"all"},{label:"成功日志",value:"Accepted"},{label:"失败日志",value:"Failed"}]:[{label:"运行日志",value:"access"},{label:"异常日志",value:"error"}],{attrs:{class:"!w-[22rem]"}}),...m?[]:[v("导出范围","day",[{label:"全部",value:"all"},{label:"近7天",value:"7"},{label:"近30天",value:"30"},..."crontab"!=(null==(l=_.value)?void 0:l.type)?[{label:"近180天",value:"180"}]:[]],{attrs:{class:"!w-[22rem]"}})],...i?[c(" ",()=>r(u,{modelValue:a.value.isOutError,"onUpdate:modelValue":e=>a.value.isOutError=e},{default:()=>[r("span",{class:"!text-small"},[o("仅导出异常日志")])]}))]:[],...m?[c("导出条数",()=>r(e,{modelValue:a.value.count,"onUpdate:modelValue":e=>a.value.count=e},null),"count",{rules:[{required:!0,message:"请输入导出条数",trigger:"blur"},{pattern:/^[1-9]\d*$/,message:"请输入正整数",trigger:"blur"}]})]:[]]})},submit:async(e,a)=>(await a(),await d(_.value.type,e.value))});return i(w),f({onConfirm:E}),(e,a)=>(m(),n("div",j,[r(p(C))]))}});export{f as default};
