| 1 |
- import{d as V,r as c,n as j,o as R,p as S,q as I,b as r,c as a,f as u,B as T,e,j as n,F,x as A,k as M,z as P}from"./index-ddf66cb5.js";import{B as U}from"./index-58f6bbe0.js";import{P as W}from"./index-4290e6be.js";import{S as q}from"./index-14ec4a94.js";import{C as D}from"./index-e270b3af.js";import{I as E}from"./index-d713c94b.js";import{F as G}from"./index-a7cc295e.js";import{p as H}from"./index-f5e64579.js";import{C as J}from"./CusNavigation-52f261c8.js";import{I as K}from"./index-e9453d64.js";import{L as O}from"./index-856231c7.js";import"./index-c1d3cef3.js";import"./use-scope-id-7611483c.js";import"./on-popup-reopen-8ab517b6.js";import"./use-route-0a2b7081.js";import"./axios-1779699b.js";import"./function-call-0875a39e.js";import"./mount-component-8daea98e.js";const Q={style:{display:"flex","flex-direction":"column",height:"100vh"}},X={style:{display:"flex","align-items":"center"}},Y={style:{"background-color":"#eee","border-radius":"2.5rem","margin-left":"10px","flex-grow":"1"}},Z={style:{"line-height":"0px","padding-top":"2px","margin-left":"6px"}},$={style:{height:"80px",display:"flex"}},ee={style:{"margin-right":"18px"}},oe={key:0},te={key:1,style:{"text-align":"center",padding:"20px",color:"#ccc"}},le={key:2,style:{"text-align":"center",padding:"20px"}},ae={key:3,style:{"text-align":"center",padding:"20px",color:"#ccc"}},ne={key:4,style:{"text-align":"center",padding:"20px"}},Ce=V({__name:"Index",setup(se){const y=()=>{console.log("jjj"),console.log(f),x()},f=c(""),l=j({total:0,pageNum:1,pageSize:10,pages:0}),d=c([]),s=c(!1),p=c(!1),k=c(!1),_=()=>{console.log("onload....."),H({url:"/device/search",data:{size:l.pageSize,page:l.pageNum,sort:"createtime",order:"desc",keyWord:f.value,mac:""}}).then(t=>{if(console.log(t),p.value=!1,s.value=!1,t.code==0){const o=t.data,i=t.total,g=Math.ceil(i/l.pageSize);console.log(g),console.log(o),l.pageNum==1&&d.value.splice(0,d.value.length),d.value.push(...o),l.pages=g,l.total=i,console.log(d.value,g)}},t=>{console.log(t),p.value=!1,s.value=!1}).catch(t=>{console.log(t),p.value=!1,s.value=!1})},x=()=>{console.log("onrefresh..."),console.log(s.value),l.pageNum=1,k.value=!1,p.value=!0,_()};R(()=>{console.log("onMounted")});const v=c(null),h=c(0);S(()=>{console.log("onActived..."),P(()=>{v.value.scrollTop=h.value})}),I((t,o,i)=>{console.log(t,o),console.log("onBeforeRouteLeave..."),h.value=v.value.scrollTop,i()});const b=()=>{console.log("clickLoading"),l.pageNum++,p.value=!0,_()};return(t,o)=>{const i=K,g=G,w=E,B=D,C=q,L=O,N=W,z=U;return n(),r("div",Q,[a(T(J),{gobackabled:""},{default:u(()=>[e("div",X,[e("div",Y,[a(g,{style:{padding:"6px 16px","align-items":"center"},modelValue:f.value,"onUpdate:modelValue":o[0]||(o[0]=m=>f.value=m),size:"normal",clearable:""},{"right-icon":u(()=>[e("div",null,[a(i,{name:"scan",size:"1.5rem"})])]),_:1},8,["modelValue"])]),e("div",Z,[a(i,{name:"static/images/icon-search-black.png",size:"2.5rem",onClick:y})])])]),_:1}),e("div",{ref_key:"scrollRef",ref:v,class:"container",style:{"overflow-y":"auto","flex-grow":"1"}},[a(N,{style:{"min-height":"100%"},modelValue:s.value,"onUpdate:modelValue":o[1]||(o[1]=m=>s.value=m),onRefresh:x},{default:u(()=>[(n(!0),r(F,null,A(d.value,m=>(n(),M(C,{style:{"background-color":"#fff","margin-bottom":"10px"}},{default:u(()=>[a(B,{clickable:"",to:"/article/detail/"+m.mac},{default:u(()=>[e("div",$,[e("div",ee,[a(w,{width:"80",height:"80",radius:"6",src:"static/images/banner.png"})]),o[2]||(o[2]=e("div",{style:{width:"0px","flex-grow":"1",display:"flex","flex-direction":"column","justify-content":"space-between"}},[e("div",{style:{"font-weight":"bold","text-align":"left",color:"#000"}},[e("span",null,"公务员考试笔试,政审都过了,单位叫我去上班我要去吗?")]),e("div",{style:{display:"flex","justify-content":"space-between",color:"#969799"}},[e("div",null,"河南新闻"),e("div",null,"2024-06-11")])],-1))])]),_:2},1032,["to"])]),_:2},1024))),256)),e("div",null,[s.value?(n(),r("div",oe)):d.value.length==0?(n(),r("div",te,o[3]||(o[3]=[e("span",null,"暂无数据",-1)]))):p.value?(n(),r("div",le,[a(L,{type:"spinner",color:"#1989fa"})])):l.pages<=l.pageNum?(n(),r("div",ae,o[4]||(o[4]=[e("span",null,"没有更多了",-1)]))):(n(),r("div",ne,[e("span",{onClick:b},"点击加载")]))])]),_:1},8,["modelValue"]),a(z,{target:".container",right:"5vw",bottom:"80px"})],512)])}}});export{Ce as default};
|