index-Oy6k-4E7.js 3.5 KB

1
  1. import{d as w,b as _,T as g}from"./baTable-MdxYOkAk.js";import{a1 as v,c as y}from"./index-EwE51S_X.js";import{g as R,d as k,a2 as C,a as D,av as E,o as N,K as m,aq as T,e as u,f as U,u as l,y as b,C as A,j as i,L as f,t as B,i as S,am as O}from"./vue-A59npLRR.js";import{_ as j}from"./popupForm.vue_vue_type_script_setup_true_lang-ljoO3oQb.js";import{T as I}from"./index-K8IR974I.js";import"./echarts-cxb9vJr1.js";import"./index-r6iTpmP6.js";import"./validate-_EUdkMt3.js";import"./index-XALue448.js";var q=function(c,e,s,n){var t=typeof n<"u"?[n,c]:[c],r=new Blob(t,{type:s||"application/octet-stream"});if(typeof window.navigator.msSaveBlob<"u")window.navigator.msSaveBlob(r,e);else{var o=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(r):window.webkitURL.createObjectURL(r),a=document.createElement("a");a.style.display="none",a.href=o,a.setAttribute("download",e),typeof a.download>"u"&&a.setAttribute("target","_blank"),document.body.appendChild(a),a.click(),setTimeout(function(){document.body.removeChild(a),window.URL.revokeObjectURL(o)},200)}};const G=R(q),V={class:"default-main ba-table-box"},F={class:"table-header-operate-text"},W=k({name:"examples/export",__name:"index",setup(c){const{t:e}=C(),s=D(),n=w(["weigh-sort","edit","delete"]),t=new _(new v("/admin/examples.export/"),{pk:"id",column:[{type:"selection",align:"center",operator:!1},{label:e("examples.export.id"),prop:"id",align:"center",width:70,sortable:"custom",operator:"RANGE"},{label:e("examples.export.name"),prop:"name",align:"center"},{label:e("examples.export.age"),prop:"age",align:"center",operator:"RANGE"},{label:e("examples.export.addr"),prop:"addr",align:"center"},{label:e("examples.export.h"),prop:"h",align:"center",operator:"RANGE"},{label:e("examples.export.status"),prop:"status",align:"center",render:"tag",replaceValue:{0:e("examples.export.status 0"),1:e("examples.export.status 1")}},{label:e("examples.export.weigh"),prop:"weigh",align:"center",sortable:"custom",operator:!1},{label:e("Update time"),prop:"update_time",align:"center",render:"datetime",sortable:"custom",operator:"RANGE",width:160},{label:e("Create time"),prop:"create_time",align:"center",render:"datetime",sortable:"custom",operator:"RANGE",width:160},{label:e("Operate"),align:"center",width:140,render:"buttons",buttons:n,operator:!1}],dblClickNotEditColumn:[void 0],defaultOrder:{prop:"weigh",order:"desc"}},{defaultItems:{h:"0",status:"1",weigh:"0"}});E("baTable",t),N(()=>{var o;t.table.ref=s.value,t.mount(),(o=t.getIndex())==null||o.then(()=>{t.initSort(),t.dragSort()})});const r=()=>{y({url:"/admin/examples.Export/export",method:"get",responseType:"blob"},{reductDataFormat:!1}).then(o=>{const p=o.headers["content-disposition"].split("filename="),d=decodeURI(p[1]);G(o.data,d)})};return(o,a)=>{const p=m("el-alert"),d=m("Icon"),x=m("el-button"),h=T("blur");return u(),U("div",V,[l(t).table.remark?(u(),b(p,{key:0,class:"ba-table-alert",title:l(t).table.remark,type:"info","show-icon":""},null,8,["title"])):A("",!0),i(I,{buttons:["refresh","add","edit","delete","comSearch","quickSearch","columnDisplay"],"quick-search-placeholder":l(e)("Quick search placeholder",{fields:l(e)("examples.export.quick Search Fields")})},{default:f(()=>[O((u(),b(x,{class:"table-header-operate",type:"success",style:{"margin-left":"12px"},onClick:r},{default:f(()=>[i(d,{color:"#ffffff",name:"el-icon-Download"}),S("span",F,B(l(e)("examples.export.export")),1)]),_:1})),[[h]])]),_:1},8,["quick-search-placeholder"]),i(g,{ref_key:"tableRef",ref:s},null,512),i(j)])}}});export{W as default};