1 |
- import{s}from"./index.module-422ac088.js";import{M as m}from"./index-9eb775de.js";import{d as h,i as g,O as A,o as S,g as a,R as v,I as w,S as y,T as C,N as D,a as M}from"./index-071fe22e.js";import{M as N}from"./index-6e946af3.js";import{D as R}from"./drop-down-modal-0acf6951.js";import{b as r,d as k}from"./constant-a400d214.js";import{S as I}from"./skeletion-index-modal-60df4db3.js";import{M as O}from"./index-627a2934.js";import{D as E,a as b}from"./index-e9165e94.js";import{L as G}from"./index-378e01f1.js";import{C as L}from"./index-5ff8e868.js";import{C as d}from"./index-02fc6d53.js";import{T as Y}from"./index-3c908e76.js";import"./index-df3b588b.js";import"./index-031935fc.js";import"./index-119ece69.js";import"./use-tab-status-9f8207e0.js";import"./index-ba01ad91.js";import"./index-71c05002.js";const T="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAPNJREFUaEPtWdsNwjAMtAeBJZwlmISZmIQl4iXoIEERIFWUqnapRY2u307ie9iNFabkHyfPnwDg1wqGKVBKObXWLh0gM59rrdcIsGEARORGRIdn0oOqHrMBaOOEVTWErJBNe+IiAgAWy0GBOZZgIYt/eos2xrnDoICRMiiAIjZaZS4MFoKFYKEvGdidhUaT1GsYCYLo3nb4NNlNutDbJOU+JXjBZLL7PwDpLbSVBXAbNTKJq8Tu/gNG5RbDUAOLFD0CUAOoAaNVMJF5iUIXMjKGLoQuZLQKupCXqPSPfOmfWb2KrY0Pa6NrE/KuAwAvY1vH3wH7G7YxyJgWewAAAABJRU5ErkJggg==",et=h({name:"activtiy-record",setup(){const p=D(),i=g(),t=A({activeValue:"",activeColumns:[{text:"全部活动",value:""}],isClick:!1,listState:{dataShow:!0,loading:!0,finished:!1,refreshing:!1},params:{type:"",keyword:"",page:1,rows:20},list:[]}),c=e=>{e.value&&e.value.toggle()},u=()=>{let e="";return t.activeColumns.forEach(o=>{t.params.type===o.value&&(e=o.text)}),e},l=async()=>{try{if(t.isClick)return;t.isClick=!0;const{data:e}=await M.post("/api-web/schoolActivity/page",{data:t.params}),o=e||{};t.listState.refreshing?t.list=o.rows||[]:t.list=t.list.concat(o.rows||[]),t.listState.finished=o.pageNo>=o.totalPage,t.params.page=o.pageNo+1}catch(e){t.listState.finished=!0}finally{setTimeout(()=>{t.listState.dataShow=t.list.length>0,t.listState.refreshing=!1,t.listState.loading=!1,t.isClick=!1},500)}},n=()=>{t.params.page=1,l()},f=e=>{p.push({path:"/activity-record-detail",query:{id:e.id}})};return S(()=>{for(const e in r)Object.prototype.hasOwnProperty.call(r,e)&&t.activeColumns.push({text:r[e],value:e});l()}),()=>a("div",{class:s["activity-record"]},[a(m,{position:"top"},{default:()=>[a(v,null,{right:()=>a(w,{name:T,class:s.iconAdd,onClick:()=>{p.push("activity-record-operation")}},null)}),a(N,{placeholder:"请输入活动名称",disabled:t.listState.refreshing,onSearch:e=>{t.params.keyword=e,t.listState.refreshing=!0,n()}},{left:()=>a(E,{class:s.patrolDetailDropDown,closeOnClickOutside:!1},{default:()=>[a(b,{title:u(),ref:i},{default:()=>[a(R,{selectValues:t.params.type,columns:t.activeColumns,open:i.value.state.showPopup,onDropDownClose:()=>c(i),onDropDownConfirm:e=>{t.params.type=e[0],c(i),t.listState.refreshing=!0,n()}},null)]})]})})]}),a(I,{show:t.listState.loading,"onUpdate:show":e=>t.listState.loading=e},{default:()=>[a(O,{modelValue:t.listState.refreshing,"onUpdate:modelValue":e=>t.listState.refreshing=e,onRefresh:()=>n(),style:{minHeight:"calc(100vh - var(--header-height))"}},{default:()=>[a(G,{finished:t.listState.finished,finishedText:" ",style:{overflow:"hidden",marginBottom:"18px"},onLoad:l,immediateCheck:!1},{default:()=>[t.listState.dataShow?t.list.map(e=>a(L,{inset:!0,class:s.cellGroup,onClick:()=>f(e)},{default:()=>[a(d,{center:!0,isLink:!0,class:s.cellTitle,clickable:!1},{icon:()=>a(Y,{plain:!0,type:"primary",class:s.tag},{default:()=>[r[e.type]]}),title:()=>a("div",{class:[s.title,"van-ellipsis"]},[e.name])}),a(d,{class:s.cellTimer,center:!0,title:`活动日期:${y(e.startTime).format("YYYY年MM月DD日")}`,value:k[e.status],valueClass:[e.status==="PROCESSING"?s.ing:"",e.status==="END"?s.end:""]},null)]})):a(C,{style:{minHeight:"calc(100vh - var(--header-height))"},description:"暂无数据"},null)]})]})]})])}});export{et as default};
|