import{_ as T}from"./EditMaintenance.vue_vue_type_script_setup_true_lang.294074bb.js";import{g as U,b as q}from"./maintenance.e221e847.js";import{A as M}from"./index.1d26a072.js";import{d as O,a6 as $,b as y,r as g,p as j,c,e as h,f as R,g as s,h as o,i,u as e,k as b,A as C,t as G,q as H,F as J,m as v,y as k,N as K,E as Q,_ as W}from"./index.0308b213.js";import"./useInstance.233fbdde.js";import"./list.bf3a7bdf.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";const X={class:"filter-form"},Y=v("\u67E5\u8BE2"),Z={class:"data"},ee={class:"operation-container"},te={class:"operation-btn"},oe=v("\u6DFB\u52A0"),ae={class:"table"},le={class:"table-operation-btn"},ne={class:"top"},se=v("\u7F16\u8F91"),ie=v("\u5220\u9664"),ue={class:"bottom"},ce={class:"pagination"},de=O({setup(re){const{OpPlatform:D}=$(),l=y({keyword:"",page:1,limit:10}),r=y({list:[],count:0});let x=g([]);const d=()=>{U(l).then(a=>{r.list=a.list,r.count=a.count})};d();const B=a=>{x.value=a.map(n=>String(n.id))};j(()=>[l.page,l.limit],()=>{d()});const A=()=>{d()};let u=g(!1),p=g(!1),_=g(0);const F=()=>{_.value=0,p.value=!0,k(()=>{u.value=!0})},V=a=>{_.value=a,p.value=!0,k(()=>{u.value=!0})},w=()=>{_.value=0,k(()=>{p.value=!1}),d()},z=a=>{L(a)},L=a=>{K.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{q({id:a}).then(()=>{Q({message:"\u5220\u9664\u6210\u529F",type:"success"}),d()})}).catch(()=>{})};return(a,n)=>{const E=c("el-form-item"),m=c("el-button"),N=c("el-form"),f=c("el-table-column"),P=c("el-table"),S=c("el-pagination");return h(),R(J,null,[s("div",X,[o(N,{model:e(l),"label-width":"90px"},{default:i(()=>[e(D)==="shangpu"?(h(),b(E,{key:0,class:"tn-el-form-item",label:"\u4EE3\u7406\u533A\u57DF"},{default:i(()=>[o(e(M),{modelValue:e(l).agentid,"onUpdate:modelValue":n[0]||(n[0]=t=>e(l).agentid=t)},null,8,["modelValue"])]),_:1})):C("",!0),o(E,null,{default:i(()=>[o(m,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:A},{default:i(()=>[Y]),_:1})]),_:1})]),_:1},8,["model"])]),s("div",Z,[s("div",ee,[s("div",te,[o(m,{class:"btn",type:"primary",onClick:F},{default:i(()=>[oe]),_:1})])]),s("div",ae,[o(P,{data:e(r).list,onSelectionChange:B},{default:i(()=>[o(f,{label:"ID",prop:"id"}),e(D)==="shangpu"?(h(),b(f,{key:0,label:"\u6240\u5C5E\u4EE3\u7406",width:"120px"},{default:i(({row:t})=>[s("span",null,G(t.agent_name),1)]),_:1})):C("",!0),o(f,{label:"\u7EF4\u4FDD\u4EBA\u5458",prop:"delivyerer_id_text"}),o(f,{fixed:"right",label:"\u64CD\u4F5C",width:"290px"},{default:i(({row:t})=>[s("div",le,[s("div",ne,[o(m,{size:"small",type:"primary",onClick:I=>V(t.id)},{default:i(()=>[se]),_:2},1032,["onClick"]),o(m,{size:"small",type:"danger",onClick:I=>z(t.id)},{default:i(()=>[ie]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])])]),s("div",ue,[s("div",ce,[o(S,{currentPage:e(l).page,"onUpdate:currentPage":n[1]||(n[1]=t=>e(l).page=t),"page-size":e(l).limit,"onUpdate:page-size":n[2]||(n[2]=t=>e(l).limit=t),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:e(r).count},null,8,["currentPage","page-size","total"])])]),e(p)?(h(),b(T,{key:0,modelValue:e(u),"onUpdate:modelValue":n[3]||(n[3]=t=>H(u)?u.value=t:u=t),id:e(_),onOnClose:w},null,8,["modelValue","id"])):C("",!0)],64)}}});const ke=W(de,[["__scopeId","data-v-b0f53f90"]]);export{ke as default};
