import{_ as I,g as U,d as L}from"./EditRecordDialog.vue_vue_type_script_setup_true_lang.3a437794.js";import{A as S}from"./index.1d26a072.js";import{u as $}from"./useAgent.c0cb1751.js";import{d as q,b as C,r as b,c as r,e as E,f as v,g as s,h as t,i as l,u as o,m as p,t as M,A as h,k as j,q as H,F as G,y as F,N as J,E as K,_ as O}from"./index.0308b213.js";import"./install.524ae6f2.js";import"./list.5526c7ef.js";const P={class:"filter-form"},Q=p("\u67E5\u8BE2"),W={class:"data"},X={class:"operation-btn",style:{"margin-bottom":"10px"}},Y=p("\u6DFB\u52A0\u8BBE\u7F6E"),Z={class:"table"},ee={key:0},te={key:1},oe={class:"table-operation-btn"},ae={class:"top"},le=p("\u4FEE\u6539"),ne=p("\u5220\u9664"),se={class:"bottom"},ie={class:"pagination"},ue=q({setup(de){let n=C({page:1,limit:10,agentid:0}),_=C({limit:"",page:"",pages:1,total:0,list:[]});const c=()=>{U(n).then(i=>{_.list=i.list,_.total=i.count})};c();const{getAgentList:k,getAgentTitle:x}=$();k();let d=b(!1),m=b(!1),g=b(0);const B=i=>{g.value=i,m.value=!0,F(()=>{d.value=!0})},A=()=>{m.value=!1,g.value=0},w=()=>{g.value=0,m.value=!0,F(()=>{d.value=!0})},D=i=>{J.confirm("\u786E\u5B9A\u5220\u9664\u5417\uFF1F","\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{L(i).then(a=>{K.success("\u5220\u9664\u6210\u529F"),c()})})},V=()=>{n.page=1,c()};return(i,a)=>{const y=r("el-form-item"),f=r("el-button"),N=r("el-form"),u=r("el-table-column"),R=r("el-table"),T=r("el-pagination");return E(),v(G,null,[s("div",P,[t(N,{model:o(n),"label-width":"90px"},{default:l(()=>[t(y,{class:"tn-el-form-item",label:"\u4EE3\u7406\u533A\u57DF"},{default:l(()=>[t(o(S),{modelValue:o(n).agentid,"onUpdate:modelValue":a[0]||(a[0]=e=>o(n).agentid=e)},null,8,["modelValue"])]),_:1}),t(y,null,{default:l(()=>[t(f,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:V},{default:l(()=>[Q]),_:1})]),_:1})]),_:1},8,["model"])]),s("div",W,[s("div",X,[t(f,{class:"btn",type:"primary",onClick:w},{default:l(()=>[Y]),_:1})]),s("div",Z,[t(R,{data:o(_).list},{default:l(()=>[t(u,{type:"selection",width:"55"}),t(u,{label:"id",prop:"id"}),t(u,{label:"\u6240\u5C5E\u57CE\u5E02",width:"100px"},{default:l(({row:e})=>[p(M(o(x)(e.agentid)),1)]),_:1}),t(u,{label:"\u6839\u636E\u7C7B\u578B",prop:"type"},{default:l(e=>[e.row.type=="agent"?(E(),v("span",ee,"\u4EE3\u7406")):h("",!0),e.row.type=="area"?(E(),v("span",te,"\u5546\u5708")):h("",!0)]),_:1}),t(u,{label:"\u661F\u671F\u51E0",prop:"week"}),t(u,{label:"\u6267\u884C\u65F6\u95F4",prop:"execute_time"}),t(u,{label:"\u64CD\u4F5C",align:"center"},{default:l(e=>[s("div",oe,[s("div",ae,[t(f,{type:"primary",onClick:z=>B(e.row.id)},{default:l(()=>[le]),_:2},1032,["onClick"]),t(f,{type:"danger",onClick:z=>D(e.row.id)},{default:l(()=>[ne]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),s("div",se,[s("div",ie,[t(T,{"current-page":o(n).page,"onUpdate:current-page":a[1]||(a[1]=e=>o(n).page=e),"page-size":o(n).limit,"onUpdate:page-size":a[2]||(a[2]=e=>o(n).limit=e),"page-limit":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:o(_).total},null,8,["current-page","page-size","total"])])]),o(m)?(E(),j(I,{key:0,modelValue:o(d),"onUpdate:modelValue":a[3]||(a[3]=e=>H(d)?d.value=e:d=e),EditId:o(g),onHideEdit:A,onRefresh:a[4]||(a[4]=e=>c())},null,8,["modelValue","EditId"])):h("",!0)],64)}}});const fe=O(ue,[["__scopeId","data-v-e211d59e"]]);export{fe as default};
