import{Z as x,cp as B,_ as N,d as I,d1 as z,m as d,cU as T,w as U,r as l,o as g,A as y,x as a,h as u,u as i,H as E,D as k,a as D,cc as V}from"./index.e80c366d.js";import{s as C}from"./search.config.6b768e50.js";import{a as S,D as $}from"./demand-modify-modal.33ae3afa.js";import{u as P}from"./use-page-search.e3e95470.js";import H from"./exec-modal.56dae4c3.js";import"./isBeyondTime.bf04ab35.js";import"./createRequset.60472412.js";const O=[{value:1,label:"\u5F85\u6267\u884C",type:"info"},{value:2,label:"\u6267\u884C\u5B8C\u6210",type:"success"},{value:3,label:"\u6267\u884C\u5931\u8D25",type:"danger"}],j=[{value:1,label:"\u7ACB\u5373\u6267\u884C",type:""},{value:2,label:"\u5EF6\u8FDF\u6267\u884C",type:"warning"}],L=[{prop:"exec_name",label:"\u4E1A\u52A1\u8868\u540D\u79F0",minWidth:"115px"},{prop:"start",label:"\u6570\u636E\u5F00\u59CB\u65F6\u95F4",minWidth:"155px"},{prop:"end",label:"\u6570\u636E\u7ED3\u675F\u65F6\u95F4",minWidth:"155px"},{prop:"updatetime",label:"\u72B6\u6001\u66F4\u65B0\u65F6\u95F4",minWidth:"155px"},{prop:"createtime",label:"\u521B\u5EFA\u65F6\u95F4",minWidth:"115px"},{prop:"exce_type",label:"\u6267\u884C\u7C7B\u578B",cellRenderer({row:p}){const n=j.find(({value:o})=>String(o)===String(p.exec_type));return x(B,{type:n.type||""},{default:()=>n.label||"--"})}},{prop:"status",label:"\u72B6\u6001",cellRenderer({row:p}){const n=O.find(({value:o})=>String(o)===String(p.status));return x(B,{type:n.type||""},{default:()=>n.label||"--"})}},{prop:"departName",label:"\u90E8\u95E8\u540D\u79F0",minWidth:"155px"},{prop:"apply_name",label:"\u7533\u8BF7\u4EBA",minWidth:"80px"},{label:"\u64CD\u4F5C",fixed:"right",width:90,slot:"operation"}],Z={columns:L,showTitle:!1,superUserNoAction:!1,apis:{httpList:S.list}},h="costAnalysis",q=I({__name:"all",setup(p){const n=z(),o=d(C),v=d(null),F=d(null),f=d(null),{hasPermissionWithCode:b}=T(h);async function A(c){const e=await S.delete_exec({id:c});e.code===1?f.value.onSearch():V.warning(e.message)}U(()=>n.level,c=>{const{formItems:e}=o.value,r=e.findIndex(({field:_})=>_==="depart_id"),{itemid:m=""}=n.info||{};Number(c)===2&&(o.value.formItems[r].defaultValue=m,o.value.formItems[r].disabled=!0)},{immediate:!0});const M={pageSearchHook:()=>P(void 0,void 0,C)};return(c,e)=>{const r=l("el-button"),m=l("ElButton"),_=l("el-link"),R=l("el-popconfirm"),W=l("page-container"),w=l("page-auth");return g(),y(w,{"page-name":h},{default:a(()=>[u(W,{hooks:M,"page-name":h,"search-config":i(C),"get-content-ref":t=>f.value=t,"content-config":i(Z)},{content_header:a(()=>[u(r,{type:"",size:"mini",onClick:e[0]||(e[0]=t=>{var s;return(s=F.value)==null?void 0:s.onDisplay({})})},{default:a(()=>[E(" \u67E5\u770B\u6267\u884C\u7C7B\u578B\u8BF4\u660E ")]),_:1}),u(r,{size:"mini",type:"primary",onClick:e[1]||(e[1]=t=>{var s;return(s=v.value)==null?void 0:s.onDisplay({})})},{default:a(()=>[E(" \u6DFB\u52A0 ")]),_:1})]),content_action:a(t=>[String(t.status)==="2"&&i(b)("10")?(g(),y(_,{key:0,href:t.down_url,target:"_blank",underline:!1},{default:a(()=>[u(m,{link:"",size:"small",type:"primary",icon:i(k)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):D("v-if",!0),i(b)("8")&&(String(t.status)==="3"||String(t.status)==="1")?(g(),y(R,{key:1,title:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u8BE5\u6761\u8BB0\u5F55?",onConfirm:s=>A(t.id)},{reference:a(()=>[u(m,{link:"",size:"small",type:"primary",icon:i(k)("delete")},null,8,["icon"])]),_:2},1032,["onConfirm"])):D("v-if",!0)]),_:1},8,["search-config","get-content-ref","content-config"]),u($,{ref_key:"demandModifyModal",ref:v,onRefresh:e[2]||(e[2]=t=>f.value.onSearch())},null,512),u(H,{ref_key:"execModalRef",ref:F},null,512)]),_:1})}}});var te=N(q,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/subscribe/costAnalysis/components/all.vue"]]);export{te as default};
