import{T as c,r as s,U as w,W as v,d as l,o as y,l as T,f as t,z as k,p as f,e as n,h as D}from"./index-TnLvmlMR.js";const i="http://127.0.0.1:9001";function S(a,o){return c({baseURL:i,url:"/script/save",method:"post",params:a,data:o})}function U(){return c({baseURL:i,url:"/script/read",method:"get"})}function z(a){return c({baseURL:i,url:"/script/run",method:"post",data:a})}const j={__name:"existing",emits:["getExisting"],setup(a,{expose:o,emit:m}){const u=s([]),h=s(),d=m,_=s();w(()=>{U().then(e=>{console.log("res:",e.data),d("getExistingData",e.data),u.value=e.data})});const x=e=>{d("getExistingData",e),h.value=e,C(),p(e)},p=e=>{_.value.setCurrentRow(e)},C=v("tableRow");return o({setTableRow:p}),(e,E)=>{const g=l("el-button"),b=l("el-table-column"),R=l("el-table");return y(),T(R,{data:D(u),"highlight-current-row":"",height:"500",onCurrentChange:x,ref_key:"singleTableRef",ref:_},{default:t(()=>[n(b,{label:"已有脚本"},{default:t(r=>[n(g,{type:"warning",round:""},{default:t(()=>[f(k(r.row.scriptName),1)]),_:2},1024)]),_:1}),n(b,{align:"right"},{default:t(r=>[n(g,{type:"primary",onClick:L=>e.handleDelete(r.$index)},{default:t(()=>[f("编辑")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])}}},B=Object.freeze(Object.defineProperty({__proto__:null,default:j},Symbol.toStringTag,{value:"Module"}));export{j as _,B as e,z as r,S as s};
