import{_ as M,g as O,a as $,d as j,b as G}from"./EditDialog.vue_vue_type_script_setup_true_lang.b96a9414.js";import{A as R}from"./index.1d26a072.js";import{d as S,a6 as H,r as i,b as B,p as J,c as d,at as K,e as h,f as k,u as e,h as t,i as s,A as x,g as u,w as Q,k as D,q as W,F as X,m as b,y,N as Y,E as C,_ as Z}from"./index.0308b213.js";import"./useInstance.233fbdde.js";import"./index.dfdc0704.js";import"./index.vue_vue_type_style_index_0_scoped_f00ed21d_lang.2c48f49b.js";import"./vuedraggable.umd.405b1bec.js";import"./index.35b8c9ab.js";import"./index.9e8820cd.js";import"./sort_out.2008c10d.js";import"./pickup_meal_station.b15eacf2.js";import"./install.524ae6f2.js";import"./useAgent.c0cb1751.js";import"./list.5526c7ef.js";const ee={key:0,class:"filter-form"},te=b("\u67E5\u8BE2"),ae={class:"data"},le={class:"operation-container"},oe={class:"operation-btn"},se=b("\u6DFB\u52A0"),ne={class:"table"},ue=["src"],ie={class:"table-operation-btn"},de={class:"top"},re=b("\u7F16\u8F91"),ce=b("\u5220\u9664"),pe={class:"bottom"},_e={class:"pagination"},me=S({setup(ge){const{OpPlatform:E}=H();let m=i(!1);const l=B({page:1,limit:10,keywords:""}),r=B({list:[],count:0});i([]);const c=()=>{m.value=!0,E.value=="shangpu"?O(l).then(o=>{r.list=o.list,r.count=o.count,m.value=!1}):$(l).then(o=>{r.list=o.list,r.count=o.count,m.value=!1})};c(),i(!1),i(!1),J(()=>[l.page,l.limit],()=>{c()});const A=()=>{c()};let p=i(!1),g=i(!1),f=i(0);const V=()=>{f.value=0,g.value=!0,y(()=>{p.value=!0})},w=o=>{f.value=o,g.value=!0,y(()=>{p.value=!0})},z=()=>{f.value=0,y(()=>{g.value=!1}),c()},N=o=>{Y.alert("\u786E\u5B9A\u9700\u8981\u5220\u9664\u6570\u636E\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",showCancelButton:!0,cancelButtonText:"\u53D6\u6D88"}).then(()=>{E.value=="shangpu"?j({id:o}).then(()=>{C({message:"\u5220\u9664\u6210\u529F",type:"success"}),c()}):G({id:o}).then(()=>{C({message:"\u5220\u9664\u6210\u529F",type:"success"}),c()})}).catch(()=>{})};return(o,n)=>{const F=d("el-form-item"),P=d("el-input"),v=d("el-button"),U=d("el-form"),_=d("el-table-column"),T=d("el-table"),L=d("el-pagination"),q=K("loading");return h(),k(X,null,[e(E)==="shangpu"?(h(),k("div",ee,[t(U,{model:e(l),"label-width":"90px"},{default:s(()=>[t(F,{class:"tn-el-form-item",label:"\u4EE3\u7406\u533A\u57DF"},{default:s(()=>[t(e(R),{modelValue:e(l).agentid,"onUpdate:modelValue":n[0]||(n[0]=a=>e(l).agentid=a)},null,8,["modelValue"])]),_:1}),t(F,{class:"tn-el-form-item",label:"\u540D\u79F0/\u8BBE\u5907\u53F7",prop:"keywords"},{default:s(()=>[t(P,{modelValue:e(l).keywords,"onUpdate:modelValue":n[1]||(n[1]=a=>e(l).keywords=a),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0/\u8BBE\u5907\u53F7"},null,8,["modelValue"])]),_:1}),t(F,null,{default:s(()=>[t(v,{class:"tn-el-form-item--item tn-button tn-button--blue",onClick:A},{default:s(()=>[te]),_:1})]),_:1})]),_:1},8,["model"])])):x("",!0),u("div",ae,[u("div",le,[u("div",oe,[t(v,{class:"btn",type:"primary",onClick:V},{default:s(()=>[se]),_:1})])]),u("div",ne,[Q((h(),D(T,{data:e(r).list},{default:s(()=>[t(_,{label:"\u4EE3\u7406",prop:"agent_title"}),t(_,{label:"\u540D\u79F0",prop:"name"}),t(_,{label:"\u8BBE\u5907\u53F7",prop:"imei"}),t(_,{label:"\u56FE\u7247",prop:"update_status_image"},{default:s(a=>[u("img",{src:a.row.update_status_image,style:{height:"100px"}},null,8,ue)]),_:1}),t(_,{fixed:"right",label:"\u64CD\u4F5C",width:"290px"},{default:s(({row:a})=>[u("div",ie,[u("div",de,[t(v,{size:"small",type:"primary",onClick:I=>w(a.id)},{default:s(()=>[re]),_:2},1032,["onClick"]),t(v,{size:"small",type:"danger",onClick:I=>N(a.id)},{default:s(()=>[ce]),_:2},1032,["onClick"])])])]),_:1})]),_:1},8,["data"])),[[q,e(m)]])])]),u("div",pe,[u("div",_e,[t(L,{currentPage:e(l).page,"onUpdate:currentPage":n[2]||(n[2]=a=>e(l).page=a),"page-size":e(l).limit,"onUpdate:page-size":n[3]||(n[3]=a=>e(l).limit=a),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:e(r).count},null,8,["currentPage","page-size","total"])])]),e(g)?(h(),D(M,{key:1,modelValue:e(p),"onUpdate:modelValue":n[4]||(n[4]=a=>W(p)?p.value=a:p=a),id:e(f),onOnClose:z},null,8,["modelValue","id"])):x("",!0)],64)}}});const we=Z(me,[["__scopeId","data-v-91ce25e8"]]);export{we as default};
