import{_ as O,s as z}from"./existing-jJhe6AQJ.js";import{r,d as a,o as s,l as u,f as t,z as _,p as o,e as n,n as m,h as C,H as E,m as c}from"./index-TnLvmlMR.js";const G=c("br",null,null,-1),H=c("br",null,null,-1),I=c("br",null,null,-1),J=c("br",null,null,-1),q=c("br",null,null,-1),M={__name:"index",setup(F){const k=[{id:"",scriptName:"",before:"打开网页：",behind:"",beforeText:"",behindText:""},{id:"",scriptName:"",before:"在：",behind:"输入：",beforeText:"",behindText:""},{id:"",scriptName:"",before:"点击：",behind:"",beforeText:"",behindText:""},{id:"",scriptName:"",before:"读取：",behind:"",beforeText:"",behindText:""},{id:"",scriptName:"",before:"自动填写：",behind:"",beforeText:"",behindText:""}],w=r(),g=r([]),d=r([]),b=r(),v=r(),N=l=>{w.value=l,x.value&&x.value.setTableRow(),A(l)},R=()=>{w.value?d.value.push(Object.assign({},w.value)):d.value.push(Object.assign({},g.value))},D=()=>{z({scriptname:b.value},d.value).then(l=>{console.log(l)})},U=function(l){d.value.splice(l,1)},j=l=>{g.value=l},x=r(null),A=l=>{v.value.setCurrentRow(l)};return(l,T)=>{const i=a("el-input"),p=a("el-table-column"),V=a("el-table"),y=a("el-col"),B=a("ArrowRight"),S=a("el-icon"),f=a("el-button"),$=a("el-row");return s(),u($,{gutter:50,justify:"space-evenly"},{default:t(()=>[n(y,{span:8},{default:t(()=>[n(V,{data:k,"highlight-current-row":"",ref_key:"singleTableRef",ref:v,onCurrentChange:N},{default:t(()=>[n(p,{label:"基本脚本"},{default:t(e=>[n(i,{style:{width:"150px"},disabled:""},{prepend:t(()=>[o(_(e.row.before),1)]),_:2},1024),e.row.behind!==""?(s(),u(i,{key:0,style:{width:"150px"},disabled:""},{prepend:t(()=>[o(_(e.row.behind),1)]),_:2},1024)):m("",!0)]),_:1})]),_:1},512),n(O,{ref_key:"childRowSet",ref:x,onGetExistingData:j},null,512)]),_:1}),n(y,{span:2},{default:t(()=>[G,H,I,J,q,n(f,{type:"primary",onClick:R},{default:t(()=>[o(" 填加 "),n(S,{class:"el-icon--right"},{default:t(()=>[n(B)]),_:1})]),_:1})]),_:1}),n(y,{span:12},{default:t(()=>[n(V,{data:C(d)},{default:t(()=>[n(p,{type:"index",width:"30"}),n(p,{label:"脚本步骤"},{default:t(e=>[e.row.before&&e.row.before!==""?(s(),u(i,{key:0,modelValue:e.row.beforeText,"onUpdate:modelValue":h=>e.row.beforeText=h,style:{width:"419px"}},{prepend:t(()=>[o(_(e.row.before),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):m("",!0),e.row.behind&&e.row.behind!==""?(s(),u(i,{key:1,modelValue:e.row.behindText,"onUpdate:modelValue":h=>e.row.behindText=h,style:{width:"250px"}},{prepend:t(()=>[o(_(e.row.behind),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):m("",!0),e.row.scriptName!==""?(s(),u(f,{key:2,type:"warning",round:""},{default:t(()=>[o(_(e.row.scriptName),1)]),_:2},1024)):m("",!0)]),_:1}),n(p,{align:"right",width:"80"},{default:t(e=>[n(f,{type:"danger",onClick:h=>U(e.$index)},{default:t(()=>[o("删除 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),n(i,{modelValue:C(b),"onUpdate:modelValue":T[0]||(T[0]=e=>E(b)?b.value=e:null),style:{width:"500px"}},{prepend:t(()=>[o("输入脚本名称：")]),_:1},8,["modelValue"]),n(f,{type:"primary",onClick:D},{default:t(()=>[o("保存脚本")]),_:1})]),_:1})]),_:1})}}};export{M as default};
