import{Z as A,cp as $,_ as D,d as W,cU as N,m as R,r as t,o as m,A as d,x as r,h as _,u as n,D as b,a as v,cc as U}from"./index.e80c366d.js";import{c as s}from"./createRequset.60472412.js";import{u as I}from"./use-page-search.e3e95470.js";const L={formItems:[{field:"depart_id",type:"depart-query",trigger:"change"}]},a="admin/exec/";var C={list:s(`${a}execList`),exce_list:s(`${a}execList`),create_exec:s(`${a}addExec`),status:s(`${a}execStatus`),delete_exec:s(`${a}deleteExec`)};const P=[{value:0,label:"\u7981\u7528",type:"danger"},{value:1,label:"\u542F\u7528",type:"success"}],q=[{prop:"id",label:"ID",minWidth:"40px"},{prop:"exec_name",label:"\u811A\u672C\u540D\u79F0",minWidth:"115px"},{prop:"updatetime",label:"\u72B6\u6001\u66F4\u65B0\u65F6\u95F4",minWidth:"155px"},{prop:"createtime",label:"\u521B\u5EFA\u65F6\u95F4",minWidth:"115px"},{prop:"status",label:"\u72B6\u6001",cellRenderer({row:g}){const o=P.find(({value:i})=>String(i)===String(g.status));return A($,{type:o.type||""},{default:()=>o.label||"--"})}},{label:"\u64CD\u4F5C",fixed:"right",width:90,slot:"operation"}],w={columns:q,showTitle:!1,superUserNoAction:!1,apis:{httpList:C.list}},f="scripts",z=W({__name:"index",setup(g){const{hasPermissionWithCode:o,permissions:i}=N(f),h=R(null),k=async x=>{const{id:F,status:u}=x,{code:l,message:p}=await C.status({id:F,status:u+""=="1"?"0":"1"});l===1?h.value.onSearch():U.warning(p)},y={pageSearchHook:()=>I(void 0,void 0,L)};return(x,F)=>{const u=t("ElButton"),l=t("el-link"),p=t("el-button"),S=t("el-popconfirm"),E=t("page-container"),B=t("page-auth");return m(),d(B,{"page-name":f},{default:r(()=>[_(E,{hooks:y,"page-name":f,"get-content-ref":e=>h.value=e,"content-config":n(w)},{content_action:r(e=>[String(e.status)==="2"&&n(o)("10")?(m(),d(l,{key:0,href:e.down_url,target:"_blank",underline:!1},{default:r(()=>[_(u,{link:"",size:"small",type:"primary",icon:n(b)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):v("v-if",!0),n(i).some(c=>c=="7")&&e.status+""=="1"||n(i).some(c=>c=="6")&&e.status+""=="0"?(m(),d(S,{key:1,title:String(e.status)==="1"?"\u6539\u4E3A\u7981\u7528\uFF1F":"\u6539\u4E3A\u542F\u7528\uFF1F",onConfirm:c=>k(e)},{reference:r(()=>[_(p,{class:"reset-margin",link:"",type:"primary",size:"mini",icon:n(b)(String(e.status)==="1"?"close-circle-line":"checkbox-circle-line")},null,8,["icon"])]),_:2},1032,["title","onConfirm"])):v("v-if",!0)]),_:1},8,["get-content-ref","content-config"])]),_:1})}}});var j=D(z,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/subscribe/scripts/index.vue"]]);export{j as default};
