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

2 lines
7.1 KiB
JavaScript

import{_ as N,a as y,u as x,r as Y,o as b,b as h,c as T,w as O,d as s,F as R,e as v,t as C,f,g as K,h as L,T as P,i as p,j as V,k as _,l as j,m as X,n as J,p as G}from"./index-5L8dO1EA.js";import{a as W}from"./axios-QLjAsgXu.js";import{m as w}from"./mitt-Efd5K_Pa.js";const Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABh0lEQVQ4jXXTPUjXYRAH8E9SWhSEDZZBkKBB0tTQKkU1uTRE0CK4NEjQkEggtAYG0RKBS0Ou9oLYEBUVtISDEYIgDbUKvfpCgsbF/eLp4e/Bw+/33N1z97277+2YfDSjhdzFJbSnaRVTGKtdd1b3bnzCCu7gDdpwDtdwGf34uV2Az3iF85X+NcbxEUs42BjaCqf7GbB5fAGLWMDp1J1AV1lKGeAKrub/RUzjBd7hJQbSdgs36hL25/dJfidxDyOF/QF68BCjmXyzQbBVIfqNPQW63dhogfofgh8F9NsYwmyOcRcGcSp9hvEtstfRJvKEPMNZ9OJIPn6fthjnzeZRTaSv+FA0rJalvPfWJTRyNOE9T/KUMo/D2NeqB418D1TZ1BjdmdQHgfrQUUMqe3AST3MHOpM8wf9oZiCLzDHWx3n/D8EhzOEt9mYZf+eMXwXs8I99iV4EN1ZCEdm+JOui8yHBgbUMvF7oYkvjBMVjb45HgOsZOTYslqbsy3IiOVDogmSR8BhG/gAPOE6l4o28nAAAAABJRU5ErkJggg==",H="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(D,{emit:E}){let o=y();const i=x(),l=E,t=D;let n=Y([]);const r=(a,d)=>{o.changeArea({areaCode:o.area.areaCode,streetCode:a}),t.choseArea=!1,l("offAreaList",d),i.replace("/townDetail?code="+a)},u=()=>{o.changeArea({areaCode:o.area.areaCode,streetCode:null}),t.choseArea=!1,l("offAreaList","泸县"),i.replace("/")};return b(()=>{W.get(`https://crmeb-test.shop.lihaink.cn/api/city/get_street?area_code=${o.area.areaCode}`).then(function(a){a.data.data.forEach(d=>{n.push(d)})}).catch(function(a){}).finally(function(){})}),(a,d)=>(h(),T(P,null,{default:O(()=>[t.choseArea?(h(),f("div",Q,[s("div",{class:"address-li",onClick:u},"泸县 "),(h(!0),f(R,null,K(v(n),(A,k)=>(h(),f("div",{class:"address-li",onClick:S=>r(A.code,A.name)},C(A.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:"datePickerOne",setup(D){const E=y(),o=t=>{var n=t,r=n.getFullYear(),u=(n.getMonth()+1).toString().padStart(2,"0"),a=n.getDate().toString().padStart(2,"0"),d=r+"-"+u+"-"+a;return d},i=p(new Date),l=t=>{E.setDate(o(t)),w.emit("changeOneTime",t)};return(t,n)=>{const r=V("el-date-picker"),u=V("el-config-provider");return h(),T(u,{locale:v(te)},{default:O(()=>[_(r,{modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=a=>i.value=a),onChange:l,style:{"background-color":"#001E31",width:"10vw"}},null,8,["modelValue"])]),_:1},8,["locale"])}}},ae={class:"headers"},oe=s("div",{class:"logo"},null,-1),se={class:"tab"},ne={style:{"font-size":"18px","font-weight":"bold",color:"#eee"}},re={class:"right"},ce=s("img",{style:{width:"1VW",height:"1VW","margin-right":"0.5vw"},src:Z,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:H,alt:""},null,-1),de=[le],he=s("div",{class:"right-line"},[s("span"),s("span")],-1),Ee={__name:"header",setup(D){const E=y();let o=p(""),i=JSON.parse(localStorage.getItem("TRADE_USER")),l=p(i.role);const t=x(),n=j(),r=Y([!1,!0,!0,!0,!0]),u=(e,c)=>{if(r.forEach((g,m)=>{r[m]=!0}),r[e]=!r[e],c){if(E.area.streetCode&&c=="/"){t.push("/townDetail?code=510524102");return}t.replace(c)}},a=p("");w.on("header-title",e=>{a.value=e,w.off("header-title")}),p("/"),X(()=>n.path,(e,c)=>{e=="/index"&&(u(0),o.value="泸县"),e=="/townDetail"&&u(0),e=="/commodity"&&u(1),(e=="/Businesses"||e=="/storeLogin")&&u(2),e=="/order"&&u(3),e=="/finance"&&u(4),e=="/finance"&&u(4)},{deep:!0,immediate:!0});const d=()=>{l.value==2&&(A.value=!0)},A=p(!1),k=e=>{A.value=!1,o.value=e},S=()=>{localStorage.removeItem("TRADE_USER"),t.replace("/login")},z=()=>{var e=new Date,c=e.getHours(),g=e.getMinutes(),m=e.getSeconds(),M=e.getFullYear(),B=e.getMonth(),F=e.getDate();c=(c<10?"0":"")+c,g=(g<10?"0":"")+g,m=(m<10?"0":"")+m;var U=c+":"+g+":"+m,I=M+"-"+(B>=10?B+1:"0"+(B+1))+"-"+(F>=10?F:"0"+F);document.getElementById("time").innerHTML=U,document.getElementById("days").innerHTML=I};return b(()=>{setInterval(z,1e3)}),(e,c)=>(h(),f("div",ae,[oe,s("div",se,[s("span",ne,C(a.value),1)]),s("div",re,[_(ue),s("div",{class:"rigth-li",onClick:d},[ce,J(" "+C(v(o)),1)]),_(ee,{choseArea:A.value,onOffAreaList:k,style:{left:"12vw"}},null,8,["choseArea"]),ie,s("div",{class:"rigth-li",onClick:S},de),he])]))}},ge={__name:"home",setup(D){const E=j();return(o,i)=>{const l=V("router-view");return h(),f(R,null,[_(Ee),(h(),T(l,{key:v(E).path}))],64)}}};export{ge as default};