mer-tradescreen/yusi/assets/home-kJ87gw39.js

2 lines
7.2 KiB
JavaScript

import{_ as N,a as V,u as x,r as Y,o as b,b as E,c as w,w as R,d as s,F as j,e as v,t as C,f,g as K,h as L,T as P,i as p,j as y,k as D,l as z,m as X,n as J,p as G}from"./index-x46xq0Cd.js";import{a as H}from"./axios-QLjAsgXu.js";import{m as S}from"./mitt-Efd5K_Pa.js";const W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABh0lEQVQ4jXXTPUjXYRAH8E9SWhSEDZZBkKBB0tTQKkU1uTRE0CK4NEjQkEggtAYG0RKBS0Ou9oLYEBUVtISDEYIgDbUKvfpCgsbF/eLp4e/Bw+/33N1z97277+2YfDSjhdzFJbSnaRVTGKtdd1b3bnzCCu7gDdpwDtdwGf34uV2Az3iF85X+NcbxEUs42BjaCqf7GbB5fAGLWMDp1J1AV1lKGeAKrub/RUzjBd7hJQbSdgs36hL25/dJfidxDyOF/QF68BCjmXyzQbBVIfqNPQW63dhogfofgh8F9NsYwmyOcRcGcSp9hvEtstfRJvKEPMNZ9OJIPn6fthjnzeZRTaSv+FA0rJalvPfWJTRyNOE9T/KUMo/D2NeqB418D1TZ1BjdmdQHgfrQUUMqe3AST3MHOpM8wf9oZiCLzDHWx3n/D8EhzOEt9mYZf+eMXwXs8I99iV4EN1ZCEdm+JOui8yHBgbUMvF7oYkvjBMVjb45HgOsZOTYslqbsy3IiOVDogmSR8BhG/gAPOE6l4o28nAAAAABJRU5ErkJggg==",Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAVCAYAAACkCdXRAAABhUlEQVQ4jZ3Uz4tOURzH8ZdnkLHyIxozxUZkYcEKYzVlMSYr8g9YkKIkv5KNhcSGjA2ysWPpR9PIWLES0ROWlGymkIRs6FvfW9c09znP83zqdO495/t933PP98eC9ux3Be3FctwqGXYDe4tNYVsyXFgywCcs68JOa561cLyAPfn+N0elYzjVDWwXvuJMh9NsxEV8wNom2Dim0cYI7jTADmEn1uEj1syFhfMjvMJmfG4AVXqG1fn8ci5sJuetBUhdsxnlIVyvYFuwAQd7AFV6j/s4jKUBO5obN/qAhc7mPB6w7XnkftVOv22tDPXzDqDhHE2KHPwV0Y0K+F3I8Id4Uzj1AP4E7DV2dDA8XQAtwWK8i9+8h0VYVXBq0v5cfxBdYxA/M2kn+oB9yXtb2crLu4zdGOsRdC573T61CjiZEX3SA/AEzmMST+uw0CheJPAKVjRAooSmcAk3caTamK/TXq1VRZTLY/zIXIseV33kAG7XHZva9nocz3us96zI9ru4hm//eeAfZkVOJyyU+TAAAAAASUVORK5CYII=",Q={key:0,class:"address"},q=["onClick"],$={__name:"areaList",props:{choseArea:Boolean},emits:["offAreaList"],setup(_,{emit:i}){let t=V();const l=x(),d=i,u=_;let r=Y([]);const n=(o,h)=>{t.changeArea({areaCode:t.area.areaCode,streetCode:o}),u.choseArea=!1,d("offAreaList",h),l.replace("/townDetail?code="+o)},a=()=>{t.changeArea({areaCode:t.area.areaCode,streetCode:null}),u.choseArea=!1,d("offAreaList","泸县"),l.replace("/")};return b(()=>{H.get(`https://crmeb-test.shop.lihaink.cn/api/city/get_street?area_code=${t.area.areaCode}`).then(function(o){o.data.data.forEach(h=>{r.push(h)})}).catch(function(o){}).finally(function(){})}),(o,h)=>(E(),w(P,null,{default:R(()=>[u.choseArea?(E(),f("div",Q,[s("div",{class:"address-li",onClick:a},"泸县 "),(E(!0),f(j,null,K(v(r),(m,T)=>(E(),f("div",{class:"address-li",onClick:k=>n(m.code,m.name)},C(m.name),9,q))),256))])):L("",!0)]),_:1}))}},ee=N($,[["__scopeId","data-v-2ec5cbb8"]]);var te={name:"zh-cn",el:{colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"}}};const ue={__name:"datePicker",setup(_){const i=V(),t=u=>{var r=u,n=r.getFullYear(),a=(r.getMonth()+1).toString().padStart(2,"0"),o=r.getDate().toString().padStart(2,"0"),h=n+"-"+a+"-"+o;return h},l=p([i.time[0],i.time[1]]),d=u=>{i.changeTime([t(u[0]),t(u[1])])};return(u,r)=>{const n=y("el-date-picker"),a=y("el-config-provider");return E(),w(a,{locale:v(te)},{default:R(()=>[D(n,{modelValue:l.value,"onUpdate:modelValue":r[0]||(r[0]=o=>l.value=o),onChange:d,style:{"background-color":"#001E31",width:"10vw"},type:"daterange","range-separator":"-"},null,8,["modelValue"])]),_:1},8,["locale"])}}},ae={class:"headers"},oe=s("div",{class:"logo"},null,-1),se={class:"tab"},re={style:{"font-size":"18px","font-weight":"bold",color:"#eee"}},ne={class:"right"},ce=s("img",{style:{width:"1VW",height:"1VW","margin-right":"0.5vw"},src:W,alt:""},null,-1),ie=G('<div class="right-line"><span></span><span></span></div><div class="rigth-li" id="time">15:33:26</div><div class="right-line"><span></span><span></span></div><div class="rigth-li" id="days">2023-11-28</div><div class="right-line"><span></span><span></span></div>',5),le=s("img",{style:{width:"1VW",height:"1VW","margin-right":"0.5vw"},src:Z,alt:""},null,-1),de=[le],he=s("div",{class:"right-line"},[s("span"),s("span")],-1),Ee={__name:"Header",setup(_){const i=V();let t=p(""),l=JSON.parse(localStorage.getItem("TRADE_USER")),d=p(l.role);const u=x(),r=z(),n=Y([!1,!0,!0,!0,!0]),a=(e,c)=>{if(n.forEach((g,A)=>{n[A]=!0}),n[e]=!n[e],c){if(i.area.streetCode&&c=="/"){u.push("/townDetail?code=510524102");return}u.replace(c)}},o=p("");S.on("header-title",e=>{o.value=e,S.off("header-title")}),p("/"),X(()=>r.path,(e,c)=>{e=="/index"&&(a(0),t.value="泸县"),e=="/townDetail"&&a(0),e=="/commodity"&&a(1),(e=="/Businesses"||e=="/storeLogin")&&a(2),e=="/order"&&a(3),e=="/finance"&&a(4),e=="/finance"&&a(4)},{deep:!0,immediate:!0});const h=()=>{d.value==2&&(m.value=!0)},m=p(!1),T=e=>{m.value=!1,t.value=e},k=()=>{localStorage.removeItem("TRADE_USER"),u.replace("/login")},M=()=>{var e=new Date,c=e.getHours(),g=e.getMinutes(),A=e.getSeconds(),U=e.getFullYear(),B=e.getMonth(),F=e.getDate();c=(c<10?"0":"")+c,g=(g<10?"0":"")+g,A=(A<10?"0":"")+A;var O=c+":"+g+":"+A,I=U+"-"+(B>=10?B+1:"0"+(B+1))+"-"+(F>=10?F:"0"+F);document.getElementById("time").innerHTML=O,document.getElementById("days").innerHTML=I};return b(()=>{setInterval(M,1e3)}),(e,c)=>(E(),f("div",ae,[oe,s("div",se,[s("span",re,C(o.value),1)]),s("div",ne,[D(ue),s("div",{class:"rigth-li",onClick:h},[ce,J(" "+C(v(t)),1)]),D(ee,{choseArea:m.value,onOffAreaList:T,style:{left:"12vw"}},null,8,["choseArea"]),ie,s("div",{class:"rigth-li",onClick:k},de),he])]))}},ge={__name:"home",setup(_){const i=z();return(t,l)=>{const d=y("router-view");return E(),f(j,null,[D(Ee),(E(),w(d,{key:v(i).path}))],64)}}};export{ge as default};