import{_ as b,d as A,cp as L,m as c,cl as S,cs as B,w as E,r as i,o as _,A as h,x as l,h as v,u as n,D as F,H as N,a as T}from"./index.56449854.js";import{s as u,c as I}from"./content.config.f8e4daf7.js";import{u as P}from"./use-page-search.59eb5443.js";import{i as V}from"./isBeyondTime.b16fe52f.js";import{h as D}from"./export.a2ce61c0.js";import{L as M}from"./LogModal.4f178774.js";import"./xlsx.ed122d16.js";import"./createRequset.56e9fc42.js";const m="changeLog",H=A({__name:"all",setup(U){const{hasPermissionWithCode:x}=L(m),p=c(null),s=S(!1),f=c(null),d=B(),g=c(u),C={pageSearchHook:()=>P(void 0,void 0,u)},y={content:{preview:e=>f.value.onDisplay(e)}},k={onSuccess:()=>s.value=!1,onStart:()=>s.value=!0,onFail:()=>s.value=!1};E(()=>d.level,e=>{const{formItems:t}=g.value,o=t.findIndex(({field:r})=>r==="depart_id"),{itemid:a=""}=d.info||{};Number(e)===2&&(g.value.formItems[o].defaultValue=a)},{immediate:!0});async function w(){const e=p.value.getBasicParams()||{},{start:t,end:o}=e;V({start:t,end:o,len:30})||await D({params:e,...k,isAdmin:!1,name:"\u5546\u54C1\u4FEE\u6539\u62A5\u8868.xlsx",fileType:"aplication/x-msexecl",url:"/purchease/purchase/changeLogListExport"})}return(e,t)=>{const o=i("el-button"),a=i("page-container"),r=i("page-auth");return _(),h(r,{"page-name":m},{default:l(()=>[v(a,{hooks:C,events:y,"page-name":m,"get-content-ref":R=>p.value=R,"content-config":n(I),"search-config":n(u)},{content_header:l(()=>[n(x)("9")?(_(),h(o,{key:0,onClick:w,size:"small",icon:n(F)("arrow-up-line"),type:"primary"},{default:l(()=>[N("\u5BFC\u51FA")]),_:1},8,["icon"])):T("v-if",!0)]),_:1},8,["get-content-ref","content-config","search-config"]),v(M,{ref_key:"logModalRef",ref:f},null,512)]),_:1})}}});var Q=b(H,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/time/changeLog/components/all.vue"]]);export{Q as default};