Agriculture-front-end/dist/assets/log.c58c99c3.js

2 lines
8.1 KiB
JavaScript
Raw Normal View History

2023-05-09 18:19:28 +08:00
import{z as R,_ as de,O as pe,r as g,u as ce,B as me,W as _e,d as s,V as Y,o as d,c as k,Q as w,R as K,f as l,e,w as o,j as fe,G as O,H as E,k as v,P as T,m as r,l as F,x as h,g as G,s as be}from"./index.75ecb6e9.js";import{g as ge}from"./job.b4f8ddca.js";function ve(V){return R({url:"/monitor/jobLog/list",method:"get",params:V})}function he(V){return R({url:"/monitor/jobLog/"+V,method:"delete"})}function we(){return R({url:"/monitor/jobLog/clean",method:"delete"})}const je={class:"app-container"},ye={key:0},ke={key:1},Ve={class:"dialog-footer"},xe=pe({name:"JobLog"}),Ce=Object.assign(xe,{setup(V){const{proxy:m}=be(),{sys_common_status:U,sys_job_group:$}=m.useDict("sys_common_status","sys_job_group"),I=g([]),j=g(!1),N=g(!0),x=g(!0),L=g([]),P=g(!0),S=g(0),y=g([]),q=ce(),A=me({form:{},queryParams:{pageNum:1,pageSize:10,dictName:void 0,dictType:void 0,status:void 0}}),{queryParams:n,form:p,rules:Ne}=_e(A);function f(){N.value=!0,ve(m.addDateRange(n.value,y.value)).then(u=>{I.value=u.rows,S.value=u.total,N.value=!1})}function H(){const u={path:"/monitor/job"};m.$tab.closeOpenPage(u)}function D(){n.value.pageNum=1,f()}function W(){y.value=[],m.resetForm("queryRef"),D()}function X(u){L.value=u.map(a=>a.jobLogId),P.value=!u.length}function Z(u){j.value=!0,p.value=u}function ee(u){m.$modal.confirm('\u662F\u5426\u786E\u8BA4\u5220\u9664\u8C03\u5EA6\u65E5\u5FD7\u7F16\u53F7\u4E3A"'+L.value+'"\u7684\u6570\u636E\u9879?').then(function(){return he(L.value)}).then(()=>{f(),m.$modal.msgSuccess("\u5220\u9664\u6210\u529F")}).catch(()=>{})}function oe(){m.$modal.confirm("\u662F\u5426\u786E\u8BA4\u6E05\u7A7A\u6240\u6709\u8C03\u5EA6\u65E5\u5FD7\u6570\u636E\u9879?").then(function(){return we()}).then(()=>{f(),m.$modal.msgSuccess("\u6E05\u7A7A\u6210\u529F")}).catch(()=>{})}function le(){m.download("monitor/jobLog/export",{...n.value},`job_log_${new Date().getTime()}.xlsx`)}return(()=>{const u=q.params&&q.params.jobId;u!==void 0&&u!=0?ge(u).then(a=>{n.value.jobName=a.data.jobName,n.value.jobGroup=a.data.jobGroup,f()}):f()})(),f(),(u,a)=>{const te=s("el-input"),i=s("el-form-item"),B=s("el-option"),J=s("el-select"),ae=s("el-date-picker"),b=s("el-button"),z=s("el-form"),c=s("el-col"),ne=s("right-toolbar"),M=s("el-row"),_=s("el-table-column"),Q=s("dict-tag"),ue=s("el-table"),se=s("pagination"),re=s("el-dialog"),C=Y("hasPermi"),ie=Y("loading");return d(),k("div",je,[w(e(z,{model:l(n),ref:"queryRef",inline:!0,"label-width":"68px"},{default:o(()=>[e(i,{label:"\u4EFB\u52A1\u540D\u79F0",prop:"jobName"},{default:o(()=>[e(te,{modelValue:l(n).jobName,"onUpdate:modelValue":a[0]||(a[0]=t=>l(n).jobName=t),placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0",clearable:"",style:{width:"240px"},onKeyup:fe(D,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(i,{label:"\u4EFB\u52A1\u7EC4\u540D",prop:"jobGroup"},{default:o(()=>[e(J,{modelValue:l(n).jobGroup,"onUpdate:modelValue":a[1]||(a[1]=t=>l(n).jobGroup=t),placeholder:"\u8BF7\u9009\u62E9\u4EFB\u52A1\u7EC4\u540D",clearable:"",style:{width:"240px"}},{default:o(()=>[(d(!0),k(O,null,E(l($),t=>(d(),v(B,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(i,{label:"\u6267\u884C\u72B6\u6001",prop:"status"},{default:o(()=>[e(J,{modelValue:l(n).status,"onUpdate:modelValue":a[2]||(a[2]=t=>l(n).status=t),placeholder:"\u8BF7\u9009\u62E9\u6267\u884C\u72B6\u6001",clearable:"",style:{width:"240px"}},{default:o(()=>[(d(!0),k(O,null,E(l(U),t=>(d(),v(B,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(i,{label:"\u6267\u884C\u65F6\u95F4",style:{width:"308px"}},{default:o(()=>[e(ae,{modelValue:l(y),"onUpdate:modelValue":a[3]||(a[3]=t=>T(y)?y.value=t:null),"value-format":"YYYY-MM-DD",type:"daterange","range-separator":"-","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F"},null,8,["modelValue"])]),_:1}),e(i,null,{default:o(()=>[e(b,{type:"primary",icon:"Search",onClick:D},{default:o(()=>[r("\u641C\u7D22")]),_:1}),e(b,{icon:"Refresh",onClick:W},{default:o(()=>[r("\u91