import{_ as e}from"./index-765bf96c.js";import{e as t}from"./exportExcel-331c8441.js";import{h as a}from"./moment-b265113e.js";import{d as s,p as r,r as o,o as p,j as n,w as i,s as m,b as _,k as u,R as l,O as y}from"./index-018fb6dd.js";/* empty css             *//* empty css                   */const c=s({__name:"index",props:{api:{type:String,require:!0},extro_params:{type:Object},title_obj:{type:Object,require:!0},sheet_name:{type:String,require:!0},api_type:{type:String,default:"get"},is_show_icon:{type:Boolean,default:!0},button_type:{type:String,default:"primary"}},setup(s){const c=s,d=()=>{const e=u([]);l[c.api_type](c.api,c.extro_params).then((s=>{const r=s.data;1e4===r.code&&(e.value=r.data,e.value.length>0?t(e.value,`${c.sheet_name}${a().format("YYYY-MM-DD HH:mm:ss")}`,c.title_obj,c.sheet_name):y.warning("暂无数据"))}))};return r((()=>{})),(t,a)=>{const r=e,u=o("el-button");return p(),n(u,{type:s.button_type,onClick:d,size:"default"},{default:i((()=>[s.is_show_icon?(p(),n(r,{key:0,name:"document-arrow-up",className:"w-4 h-4 mr-1 -ml-1"})):m("",!0),_(" 导出 ")])),_:1},8,["type"])}}});export{c as _};
