import{Z as A,cm as W,_ as $,d as D,cT as I,m as R,r as t,o as m,A as d,x as c,h as f,u as n,D as v,a as _,cc as N}from"./index.d0c68291.js";import{c as s}from"./createRequset.2a519b90.js";import{u as P}from"./use-page-search.f8fe5a6b.js";const w={formItems:[{field:"depart_id",type:"depart-query",trigger:"change"}]},o="admin/exec/";var C={list:s(`${o}execList`),exce_list:s(`${o}execList`),create_exec:s(`${o}addExec`),status:s(`${o}execStatus`),delete_exec:s(`${o}deleteExec`)};const z=[{value:0,label:"\u7981\u7528",type:"danger"},{value:1,label:"\u542F\u7528",type:"success"}],L=[{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:h}){const a=z.find(({value:i})=>String(i)===String(h.status));return A(W,{type:a.type||""},{default:()=>a.label||"--"})}},{label:"\u64CD\u4F5C",fixed:"right",width:90,slot:"operation"}],T={columns:L,showTitle:!1,superUserNoAction:!1,apis:{httpList:C.list}},g="scripts",U=D({__name:"index",setup(h){const{hasPermissionWithCode:a,permissions:i}=I(g),x=R(null),y=async F=>{const{id:b,status:u}=F,{code:l,message:p}=await C.status({id:b,status:u+""=="1"?"0":"1"});l===1?x.value.onSearch():N.warning(p)},k={pageSearchHook:()=>P(void 0,void 0,w)};return(F,b)=>{const u=t("ElButton"),l=t("el-link"),p=t("el-button"),E=t("el-popconfirm"),B=t("page-container"),S=t("page-auth");return m(),d(S,{"page-name":g},{default:c(()=>[f(B,{hooks:k,"page-name":g,"get-content-ref":e=>x.value=e,"content-config":n(T)},{content_action:c(e=>[String(e.status)==="2"&&n(a)("10")?(m(),d(l,{key:0,href:e.down_url,target:"_blank",underline:!1},{default:c(()=>[f(u,{link:"",size:"small",type:"primary",icon:n(v)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):_("v-if",!0),_(` <el-popconfirm\r
          title="\u662F\u5426\u786E\u8BA4\u5220\u9664\u8BE5\u811A\u672C?"\r
          @confirm="deleteItem(row.id)"\r
          v-if="hasPermissionWithCode('8')"\r
        >\r
          <template #reference>\r
            <ElButton\r
              link\r
              size="small"\r
              type="primary"\r
              :icon="useRenderIcon('delete')"\r
            />\r
          </template>\r
        </el-popconfirm> `),n(i).some(r=>r=="7")&&e.status+""=="1"||n(i).some(r=>r=="6")&&e.status+""=="0"?(m(),d(E,{key:1,title:String(e.status)==="1"?"\u6539\u4E3A\u7981\u7528\uFF1F":"\u6539\u4E3A\u542F\u7528\uFF1F",onConfirm:r=>y(e)},{reference:c(()=>[f(p,{class:"reset-margin",link:"",type:"primary",size:"mini",icon:n(v)(String(e.status)==="1"?"close-circle-line":"checkbox-circle-line")},null,8,["icon"])]),_:2},1032,["title","onConfirm"])):_("v-if",!0)]),_:1},8,["get-content-ref","content-config"])]),_:1})}}});var j=$(U,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/subscribe/scripts/index.vue"]]);export{j as default};
