1 |
- import{d,ag as p,r as f,$ as c,c as t,a5 as A,ai as v,F as S,ak as y,m as b,q as T}from"./index.ffe80dbe.js";import{O as k}from"./index.a0ef77e4.js";import{O as w}from"./index.4ddd16f0.js";import{O as C}from"./index.45b38760.js";import{O as D}from"./index.c7af3af2.js";import{s as L}from"./index.931cf0b8.js";import{s as o}from"./index.module.a0fba9ef.js";import{L as Q}from"./index.cafcb8b5.js";import{C as V}from"./index.914765a1.js";import{C as u}from"./index.ea031708.js";import{T as U,a as h}from"./index.466e527a.js";import"./index.1d5c6f70.js";import"./index.92ec0bf4.js";import"./use-tab-status.5a3cd090.js";import"./index.b4b77b5a.js";import"./index.02edecb1.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=f({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 a=r.data||{};if(e.list.length>0&&a.current===1)return;e.list=e.list.concat(a.rows||[]),e.finished=a.current>=a.pages,e.params.page=a.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()},g=async r=>{l.push({path:"/create-message",query:{id:r.id}})};return c(()=>{s()}),()=>{let r;return t(S,null,[t(D,{placeholder:"\u8BF7\u8F93\u5165\u7FA4\u804A/\u5B66\u5458\u540D\u79F0/\u4F34\u5B66\u6307\u5BFC\u540D\u79F0",onSearch:a=>{e.params.keyword=a,n()}},null),t("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?t(C,{modelValue:e.refreshing,"onUpdate:modelValue":a=>e.refreshing=a,onRefresh:n,style:{minHeight:"calc(100vh - var(--van-tabs-line-height) - var(--header-height) - var(--van-search-input-height) - 0.53334rem)"}},{default:()=>[t(Q,{finished:e.finished,finishedText:" ",class:[o.liveList],onLoad:s,style:{paddingTop:"12px"},immediateCheck:!1},E(r=e.list.map(a=>t(V,{inset:!0,onClick:()=>g(a),style:{marginBottom:"12px"}},{default:()=>[t(u,{class:[o.waitSend,a.sendStatus==="SEND"&&o.messageSend],titleStyle:{flex:"1 auto"}},{title:()=>t("div",{class:o.time},[a.sendStatus==="WAIT"&&t(A,{name:N,class:o.clockO},null),a.sendTime]),value:()=>t("span",null,[L[a.sendStatus]])}),t(u,{valueClass:[o.messageContent,"van-multi-ellipsis--l3"]},{default:()=>[a.textMessage]})]})))?r:{default:()=>[r]})]}):t(v,{btnStatus:!1,tips:"\u6682\u65E0\u7FA4\u53D1\u6D88\u606F"},null)])])}}}),Y=d({name:"mass-message",setup(){const i=p(),l=sessionStorage.getItem("mass-message-send"),e=f({refreshing:!1,height:0,tabValue:l||"WAIT"});return()=>t("div",{class:[o.massMessage]},[t(w,{position:"top",onGetHeight:s=>{e.height=s,document.documentElement.style.setProperty("--header-height",s+"px")}},{default:()=>[t(k,{border:!1},{right:()=>t("span",{style:"color: var(--van-primary-color)",onClick:()=>{i.push("/create-message")}},[T("\u6D88\u606F\u7FA4\u53D1")])})]}),t(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:()=>[t(h,{title:"\u5F85\u53D1\u9001",name:"WAIT"},{default:()=>[e.tabValue==="WAIT"&&t(m,{status:"WAIT",height:e.height},null)]}),t(h,{title:"\u5DF2\u53D1\u9001",name:"SEND"},{default:()=>[e.tabValue==="SEND"&&t(m,{status:"SEND",height:e.height},null)]})]})])}});export{Y as default};
|