import{b as x,u as z,ah as b,e as P,dO as V,cE as B,o as u,c as U,p as s,q as l,n as o,P as m,x as c,aH as _,y as k,t as h,aj as q,f6 as T,S as $,f7 as j,f8 as L,j as F,k as M,l as O,m as A,D as H}from"./index.8d733f79.js";const G={class:"page-content"},W={__name:"index",setup(J){const{t:C,locale:K}=x(),{proxy:N}=H(),w=z(),d=b({total:0,tableData:[],columns:[{prop:"reportName",label:"reportName"},{prop:"createTime",label:"uploadTime"},{label:"action",type:"action",width:280,fixed:"right"}]}),n=b({reportName:"",pageNo:1,pageSize:10});P(()=>{i()});async function i(){const e=await V(n);d.total=e.data.totalElements,d.tableData=e.data.content}const R=()=>{n.reportName="",i()},v=e=>{w.push({path:"/system/signalReport/detail",query:{reportName:e.reportName}})},S=e=>{T({reportId:e.id}).then(t=>{$.success(t.msg),i()})},D=e=>{j({fileId:e.fileId}).then(t=>{$.success("\u5BFC\u51FA\u6210\u529F");const g=new Blob([t]),r=document.createElement("a");r.href=URL.createObjectURL(g),r.download=`${e.reportName}\u62A5\u544A.docx`,r.style.display="none",document.body.appendChild(r),r.click(),r.remove()})},I=e=>{N.$modal.confirm(C("confirmDelete")).then(()=>{L({reportId:e.id}).then(t=>{N.$modal.msgSuccess(t.msg),i()})}).catch(()=>{})};return(e,t)=>{const g=F,r=M,p=O,E=A,f=B("hasPermi");return u(),U("div",G,[s(E,{ref:"formRef",model:o(n),inline:!0},{default:l(()=>[s(r,{label:e.$t("reportName"),prop:"reportName"},{default:l(()=>[s(g,{modelValue:o(n).reportName,"onUpdate:modelValue":t[0]||(t[0]=a=>o(n).reportName=a),placeholder:e.$t("reportNameP"),maxlength:"20",style:{width:"236px"}},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),s(r,null,{default:l(()=>[s(p,{type:"primary",onClick:i},{default:l(()=>[m(c(e.$t("query")),1)]),_:1}),s(p,{onClick:R},{default:l(()=>[m(c(e.$t("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"]),s(o(q),{class:"f-h",columns:o(d).columns,tableData:o(d).tableData,total:o(d).total,pageNum:o(n).pageNo,"onUpdate:pageNum":t[1]||(t[1]=a=>o(n).pageNo=a),pageSize:o(n).pageSize,"onUpdate:pageSize":t[2]||(t[2]=a=>o(n).pageSize=a),onPagination:i},{action:l(({scope:a})=>[s(p,{link:"",type:"primary",onClick:y=>v(a.row)},{default:l(()=>[m(c(e.$t("view")),1)]),_:2},1032,["onClick"]),a.row.fileId?h("",!0):_((u(),k(p,{key:0,link:"",type:"primary",onClick:y=>S(a.row)},{default:l(()=>[m(c(e.$t("regenerateReport")),1)]),_:2},1032,["onClick"])),[[f,["system_signal_export"]]]),a.row.fileId?_((u(),k(p,{key:1,link:"",type:"primary",onClick:y=>D(a.row)},{default:l(()=>[m(c(e.$t("export")),1)]),_:2},1032,["onClick"])),[[f,["system_signal_export"]]]):h("",!0),_((u(),k(p,{link:"",type:"primary",onClick:y=>I(a.row)},{default:l(()=>[m(c(e.$t("delete")),1)]),_:2},1032,["onClick"])),[[f,["system_signal_delete"]]])]),_:1},8,["columns","tableData","total","pageNum","pageSize"])])}}};export{W as default};
