import{_ as m}from"./TABBG-WY6uizpD.js";import{_ as f,i as v,a as $,u as B,r as D,o as E,j as b,b as g,f as h,k as _,w as C,d as a,q as k,e as w,h as I,n as N,y as S,z as V,A as j}from"./index-F1El3hcz.js";import{m as A,j as G}from"./api-6AhkDDlN.js";import"./axios-QLjAsgXu.js";const L=n=>(S("data-v-bc6a521c"),n=n(),V(),n),R={key:0,class:"center"},z={key:1,class:"box"},T={class:"img-cls"},q=L(()=>a("img",{src:m,style:{width:"100%",height:"100%",position:"absolute"},alt:""},null,-1)),M={class:"content"},O={class:"btns"},F={key:0,class:"table"},H={__name:"Businesses",setup(n){const y=v(!1),o=$();B();let d=v(0),u={};const s=t=>{i.data.splice(0,i.data.length),d.value=t,A({...o.area,status:d.value,limit:50}).then(e=>{u=e.data.list,p(e.data.list)})},x=t=>{t.columnIndex==10&&G({mer_id:u[t.rowIndex].mer_id,...o.area}).then(e=>{o.storeLogin(e.data),j.push("/storeLogin"),console.log(o.userInfo)})},p=t=>{t.forEach((e,l)=>{var c,r;l%2==0?i.data.push([`
${l+1}
`,`
${e.mer_name}
`,`
${e.real_name}
`,`
${e.mer_address}
`,`
${e.mark||"--"}
`,`
${e.is_best?"推荐":"不推荐"}
`,`
${e.create_time}
`,`
${e.margin}
`,`
${((c=e.merchantCategory)==null?void 0:c.category_name)||"--"}
`,`
${e.status?"开启":"关闭"}
`,"
登录
"]):i.data.push([`
${l+1}
`,`
${e.mer_name}
`,`
${e.real_name}
`,`
${e.mer_address}
`,`
${e.mark||"--"}
`,`
${e.is_best?"推荐":"不推荐"}
`,`
${e.create_time}
`,`
${e.margin}
`,`
${((r=e.merchantCategory)==null?void 0:r.category_name)||"--"}
`,`
${e.status?"开启":"关闭"}
`,"
登录
"])})},i=D({headerBGC:"linear-gradient(to right, #ff0000, #00ff00)",oddRowBGC:"",evenRowBGC:"",rowNum:20,header:["
ID
","
商户名称
","
商户姓名
","
商户属地
","
备注
","
推荐
","
创建时间
","
押金
","
商户分类
","
开启/关闭
","
操作
"],data:[]});return E(()=>{s(1)}),(t,e)=>{const l=b("dv-loading"),c=b("dv-scroll-board");return y.value?(g(),h("div",R,[_(l,null,{default:C(()=>[N("正在登陆商户...")]),_:1})])):(g(),h("div",z,[a("div",T,[q,a("div",M,[a("div",O,[a("div",{class:k(["btn",w(d)?"act-btn":""]),onClick:e[0]||(e[0]=r=>s(1))},"正常开启的商户",2),a("div",{class:k(["btn",w(d)?"":"act-btn"]),onClick:e[1]||(e[1]=r=>s(0))},"已关闭的商户",2)]),i.data.length?(g(),h("div",F,[_(c,{config:i,onClick:x,style:{width:"95vw",height:"100%"}},null,8,["config"])])):I("",!0)])])]))}}},U=f(H,[["__scopeId","data-v-bc6a521c"]]);export{U as default};