1 |
- import{d,ag as p,r as g,$ as c,c as a,a5 as A,ak as v,F as S,al as y,m as b,aj as T,q as k}from"./index.332c7f08.js";import{O as w}from"./index.d7c1b6ac.js";import{O as C}from"./index.626c48f9.js";import{O as D}from"./index.d2064f3d.js";import{s as L}from"./index.b28db9f5.js";import{s as o}from"./index.module.a0fba9ef.js";import{L as Q}from"./index.b186dfda.js";import{C as V}from"./index.324108a5.js";import{C as u}from"./index.91135ff9.js";import{T as U,a as h}from"./index.7c580591.js";import"./index.1ed6273e.js";import"./use-tab-status.9d769af8.js";import"./index.1e2dfe6e.js";import"./index.4aa8e076.js";var N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAmCAYAAACsyDmTAAAAAXNSR0IArs4c6QAAA7hJREFUWEfNmE9oHFUcxz+/aWhQIba1pJZ4UBQP4s1DxVrQItWCF0mysxEK4p9joyhNaNDM20pb2mDF9OgfBA+707R4EYoeqsU/6MmLJ6nopbpKbWPAQtpkfmXmvWyycXZndhbbfbdh3m/eZ35/vu/3ntBjQ3qMh66A1Dw3iNd/H8t6Z/JjG+QfosVfxXz6V9Ef7QhI9+/tZ+umZ0GHUX0SuLvFwnVEvgQ5w6X5z+Tk2cW8gLmAdHZvP1cGxlFebwPRas06wgk2L8zKeDZYJpAeKu8i0o+AB1ZX1CWQH4DvgJ8RvZK8U9kMPAg8BroDpG8N5QU8eVGma1+381ZbIDV+7JFjgPuwziMbjqN9H4r5pG2eqNk3iCy9hC5PgGxyEEvApJjwRCuolkBqykdAD1pDVeAkaEXM3OW8+ZBYmtEtIAGwH8StJ0fF1KbSvpMK5DzzjoO5isgLEoRznYCsn6sVfxTVj0Fud+/eSPPUf4BczpyzYdKreN5uma7F+ZI69K3RR+jzzqL8iAmfEYi9mT73UHkHUXTOQS3hSfztppxqAkqq6fLATzaBVRHxszyjpvQmyNuWINouZq7ezpPOU6EL3wW2LDy8tvqagSr+AZTjLlSzYk69mhUmrZQCVIydJ0Niar9n2pjSeyDj1oQJCcKZFZsGUCJ6dw38ZnVG50Hvz5PAxYCSRP/FVV+dvxfuXRHPVaDK2DAanbbU3pQE1aNZf5pUUQEPWbuxg2h0xK03IkH1jHWYG2r8KlBGuI5uvCdLZxp2RYFinWLxohPPmphwbD3QH25b+FZM+Hge73TjocTW+N8AO4G6mHB7AyhRVa796SBmxIQTNwkoLqADdq1r2+IuIQmZJvqg3zuIV8SEHxQCuk2GZDK7ytakycvA+8mzJ4/GemeBAn8Pwuc2wXREglNJguUZzUmdahEL5Xkeip6S0tzy2hlaKQ2jYgtJeVoq4RfdAxn/NeDdDPgIvG1iqpfyAXUTspl9d/Dv9UnQwXQoVTw5L9Nhbf17NX6LkMWtKBsLJXWesLaao8ZPT2pXgoXKvkug9LJ3QFYYibvB/qG8wlgUyEqNE0aRqgS155OaapRgwa2jMFBQnkL0sK1sL2XrKLi5FgFyXWT7zTUJW4H2oxhQjvYjASrQoHUK1FGDlkDZY0/uFrYTILtFddDCNhLcHn96o8lfheqhY9A6T/XGQbEB1UtH6QZUL102NLULK9cxGo0AT7S9joGvEO/0/3Id03q3vsUXVp1oTtG5mfdDRT9c1O4GVqMfRTQFQigAAAAASUVORK5CYII=";function E(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!y(i)}var m=d({name:"mass-list",props:{status:{type:String,default:""},height:{type:Number,default:0}},setup(i){const l=p(),e=g({refreshing:!1,height:0,list:[],dataShow:!0,loading:!1,finished:!1,params:{keyword:null,sendStatus:i.status||"WAIT",page:1,rows:10},isClick:!1}),s=async()=>{try{if(e.isClick)return;e.isClick=!0;const r=await b.post("/api-school/imMessageBatchSending/page",{data:{...e.params}});e.isClick=!1,e.loading=!1,e.refreshing=!1;const t=r.data||{};if(e.list.length>0&&t.current===1)return;e.list=e.list.concat(t.rows||[]),e.finished=t.current>=t.pages,e.params.page=t.current+1,e.dataShow=e.list.length>0}catch{e.isClick=!1,e.dataShow=!1,e.refreshing=!1,e.finished=!0}},n=()=>{e.params.page=1,e.list=[],e.dataShow=!0,e.loading=!1,e.finished=!1,s()},f=async r=>{l.push({path:"/create-message",query:{id:r.id}})};return c(()=>{s()}),()=>{let r;return a(S,null,[a(D,{placeholder:"\u8BF7\u8F93\u5165\u7FA4\u804A/\u5B66\u5458\u540D\u79F0/\u4F34\u5B66\u8001\u5E08\u540D\u79F0",onSearch:t=>{e.params.keyword=t,n()}},null),a("div",{style:{height:"calc(100vh - var(--van-tabs-line-height) - var(--header-height) - var(--van-search-input-height) - 0.53334rem)",overflow:"hidden",overflowY:"auto"}},[e.dataShow?a(C,{modelValue:e.refreshing,"onUpdate:modelValue":t=>e.refreshing=t,onRefresh:n,style:{minHeight:"calc(100vh - var(--van-tabs-line-height) - var(--header-height) - var(--van-search-input-height) - 0.53334rem)"}},{default:()=>[a(Q,{finished:e.finished,finishedText:" ",class:[o.liveList],onLoad:s,style:{paddingTop:"12px"},immediateCheck:!1},E(r=e.list.map(t=>a(V,{inset:!0,onClick:()=>f(t),style:{marginBottom:"12px"}},{default:()=>[a(u,{class:[o.waitSend,t.sendStatus==="SEND"&&o.messageSend],titleStyle:{flex:"1 auto"}},{title:()=>a("div",{class:o.time},[t.sendStatus==="WAIT"&&a(A,{name:N,class:o.clockO},null),t.sendTime]),value:()=>a("span",null,[L[t.sendStatus]])}),a(u,{valueClass:[o.messageContent,"van-multi-ellipsis--l3"]},{default:()=>[t.textMessage]})]})))?r:{default:()=>[r]})]}):a(v,{btnStatus:!1,tips:"\u6682\u65E0\u7FA4\u53D1\u6D88\u606F"},null)])])}}}),B=d({name:"mass-message",setup(){const i=p(),l=sessionStorage.getItem("mass-message-send"),e=g({refreshing:!1,height:0,tabValue:l||"WAIT"});return()=>a("div",{class:[o.massMessage]},[a(w,{position:"top",onGetHeight:s=>{e.height=s,document.documentElement.style.setProperty("--header-height",s+"px")}},{default:()=>[a(T,{border:!1},{right:()=>a("span",{style:"color: var(--van-primary-color)",onClick:()=>{i.push("/create-message")}},[k("\u6D88\u606F\u7FA4\u53D1")])})]}),a(U,{lineWidth:18,active:e.tabValue,"onUpdate:active":s=>e.tabValue=s,sticky:!0,animated:!0,swipeable:!0,offsetTop:e.height,onChange:s=>{sessionStorage.setItem("mass-message-send",s)}},{default:()=>[a(h,{title:"\u5F85\u53D1\u9001",name:"WAIT"},{default:()=>[e.tabValue==="WAIT"&&a(m,{status:"WAIT",height:e.height},null)]}),a(h,{title:"\u5DF2\u53D1\u9001",name:"SEND"},{default:()=>[e.tabValue==="SEND"&&a(m,{status:"SEND",height:e.height},null)]})]})])}});export{B as default};
|