import{Z as F,cp as E,_ as W,d as N,m as d,d1 as z,cU as T,w as U,n as P,r as u,o as h,A as y,x as s,h as l,u as i,H as V,D as k,a as S,cc as $}from"./index.e80c366d.js";import{s as b}from"./search.config.96435a7a.js";import{a as x,D as H}from"./demand-modify-modal.6ffbb86e.js";import{u as O}from"./use-page-search.e3e95470.js";import j from"./exec-modal.12aa92dc.js";import"./createRequset.60472412.js";import"./isBeyondTime.bf04ab35.js";const q=[{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"}],L=[{value:1,label:"\u7ACB\u5373\u6267\u884C",type:""},{value:2,label:"\u5EF6\u8FDF\u6267\u884C",type:"warning"}],Z=[{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 t=L.find(({value:r})=>String(r)===String(p.exec_type));return F(E,{type:t.type||""},{default:()=>t.label||"--"})}},{prop:"status",label:"\u72B6\u6001",cellRenderer({row:p}){const t=q.find(({value:r})=>String(r)===String(p.status));return F(E,{type:t.type||""},{default:()=>t.label||"--"})}},{prop:"apply_name",label:"\u7533\u8BF7\u4EBA",minWidth:"80px"},{label:"\u64CD\u4F5C",fixed:"right",width:90,slot:"operation"}],G={columns:Z,showTitle:!1,superUserNoAction:!1,apis:{httpList:x.list}},v="subscribes",J=N({__name:"all",setup(p){const t=d(null),r=d(null),C=z(),{hasPermissionWithCode:B}=T(v),m=d(null),f=d(b);U(()=>C.level,c=>{const{formItems:e}=f.value;e.findIndex(({field:o})=>o==="depart_id"),C.info},{immediate:!0});async function M(c){const e=await x.delete_exec({id:c});e.code===1?m.value.onSearch():$.warning(e.message)}async function D(){const{data:c,code:e}=await x.exce_list({size:1e4}),o=f.value.formItems.findIndex(({field:a})=>a==="exec_id");Number(e)===1&&o>=0&&(f.value.formItems[o].options=c.list.map(({id:a,exec_name:_})=>({value:a,label:_})))}const w={pageSearchHook:()=>O(void 0,void 0,b)};return P(()=>D()),(c,e)=>{const o=u("el-button"),a=u("ElButton"),_=u("el-link"),A=u("el-popconfirm"),R=u("page-container"),I=u("page-auth");return h(),y(I,{"page-name":v},{default:s(()=>[l(R,{hooks:w,"page-name":v,"search-config":i(b),"get-content-ref":n=>m.value=n,"content-config":i(G)},{content_header:s(()=>[l(o,{type:"",size:"mini",onClick:e[0]||(e[0]=n=>{var g;return(g=t.value)==null?void 0:g.onDisplay({})})},{default:s(()=>[V("\u67E5\u770B\u6267\u884C\u7C7B\u578B\u8BF4\u660E")]),_:1})]),content_action:s(n=>[String(n.status)==="2"&&i(B)("10")?(h(),y(_,{key:0,href:n.down_url,target:"_blank",underline:!1},{default:s(()=>[l(a,{link:"",size:"small",type:"primary",icon:i(k)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):S("v-if",!0),i(B)("8")&&String(n.status)==="3"?(h(),y(A,{key:1,title:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u8BE5\u6761\u8BB0\u5F55?",onConfirm:g=>M(n.id)},{reference:s(()=>[l(a,{link:"",size:"small",type:"primary",icon:i(k)("delete")},null,8,["icon"])]),_:2},1032,["onConfirm"])):S("v-if",!0)]),_:1},8,["search-config","get-content-ref","content-config"]),l(H,{ref_key:"demandModifyModal",ref:r,onRefresh:e[1]||(e[1]=n=>m.value.onSearch())},null,512),l(j,{ref_key:"execModalRef",ref:t},null,512)]),_:1})}}});var oe=W(J,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/subscribe/subscribes/components/all.vue"]]);export{oe as default};
