You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
31 KiB

1 month ago
import{I as e,N as t,O as n,P as r,V as i,Y as a,_ as o,d as s,f as c,h as l,i as u,it as d,kt as f,l as p,nt as m,p as h,u as g,ut as ee,v as _,y as te,z as v}from"./runtime-core.esm-bundler-CnFWH3R5.js";import{ot as ne,t as y}from"./message-Dh9377vh.js";import{n as b}from"./http-BWP--XXK.js";import{i as x,r as S}from"./index-CLnpIFlv.js";import{t as re}from"./RichEditorField-CB5ec-6r.js";import{t as ie}from"./listTableRowIndex-Bl-nc9Qt.js";function ae(e,t){return function(){return e()?window.confirm(t):!0}}function oe(e,n=`当前有未保存改动,确定要离开吗?`){function i(t){e()&&(t.preventDefault(),t.returnValue=``)}S((t,r,i)=>{if(!e()){i();return}i(window.confirm(n))}),t(()=>{window.addEventListener(`beforeunload`,i)}),r(()=>{window.removeEventListener(`beforeunload`,i)})}var se={style:{color:`#f53f3f`}},ce={style:{color:`#f53f3f`}},le={style:{color:`#f53f3f`}},ue={style:{color:`#f53f3f`}},de={style:{color:`#f53f3f`}},fe={style:{color:`#f53f3f`}},pe={style:{color:`#f53f3f`}},me={class:`activity-form-tags`},he={class:`activity-form-tags__line`},ge={class:`activity-form-tags__chips`},_e={key:0,class:`activity-form-tags__empty`},ve={key:1,style:{color:`var(--color-text-3)`}},ye={style:{"margin-left":`8px`,color:`var(--color-text-3)`}},be={class:`activity-address-coord-row`},xe={style:{color:`#f53f3f`}},Se={class:`activity-cover-carousel-wrap`},Ce={class:`activity-cover-carousel-row__col`},we=[`src`],Te={class:`activity-cover-carousel-row__col`},Ee={style:{display:`flex`,"flex-direction":`column`,"align-items":`flex-start`,width:`100%`}},De={style:{width:`100%`,"margin-bottom":`8px`}},Oe={class:`activity-gallery-grid`},ke=[`src`,`onClick`],Ae=[`src`,`onClick`],je=[`src`],Me=[`src`],Ne={style:{display:`flex`,gap:`12px`}},Pe={style:{width:`280px`,height:`520px`,overflow:`auto`,border:`1px solid #e5e6eb`,padding:`8px`}},Fe=1420,C=x(te({__name:`ActivityList`,setup(r){let te=d([]),x=d([]),S=d(null),C=d(!1),Ie=d(!1),w=d(!1),T=m({current:1,pageSize:10,total:0}),E=m({keyword:``,venue_id:void 0,reservation_type:void 0,is_active:void 0,schedule_status:void 0,audit_status:void 0}),D=d(null),O=d(``),k=d(!1),A=d(!0),j=d(null),Le=d(``),Re={maxHeight:`70vh`,overflow:`auto`},ze=d(0),M=d(!1),Be=d(`image`),N=d(``),P=d(!1),F=d(!1),I=d(``),L=d([]),Ve=d(null),R=null,z=null,B=d(null),He={lat:31.299379,lng:120.585315};function V(e){if(!e)return``;let t=new Date(String(e));return Number.isNaN(t.getTime())?String(e).slice(0,10):new Intl.DateTimeFormat(`en-CA`,{timeZone:`Asia/Shanghai`,year:`numeric`,month:`2-digit`,day:`2-digit`}).format(t)}function Ue(e){let t=e.start_at?V(String(e.start_at)):``,n=e.end_at?V(String(e.end_at)):``;return!t&&!n?`-`:t&&n?t===n?t:`${t}${n}`:t||n||`-`}let H=m({venue_id:void 0,reservation_type:`phone`,ticket_note:`free`,location:``,lat:void 0,lng:void 0,specific_time:``,offline_reservation_method:``,external_url:``,title:``,contact_name:``,contact_phone:``,start_at:``,end_at:``,detail_html:``,cover_image:``,gallery_media:[],tags:[],sort:0,summary:``,is_active:!0}),U=d(``),W=m({title:``,venue_id:``,start_at:``,end_at:``,reservation_type:``,ticket_note:``,offline_reservation_method:``,external_url:``,location:``,cover_image:``,gallery_media:``,detail_html:``,contact_name:``,contact_phone:``}),We=p({get(){if(H.start_at&&H.end_at)return[H.start_at,H.end_at]},set(e){Array.isArray(e)&&e.length>=2&&e[0]&&e[1]?(H.start_at=String(e[0]),H.end_at=String(e[1])):(H.start_at=``,H.end_at=``)}}),G=p(()=>nt(H.start_at||``,H.end_at||``));function Ge(e,t){let n=String(e||``).trim();if(n)return/^https?:\/\//i.test(n)?n:n.startsWith(`/`)?`${window.location.origin}${n}`:`${window.location.origin}/${n}`;let r=String(t||``).trim();if(!r)return``;let i=r.replace(/^\/+/,``);return`${window.location.origin}/storage/${i}`}async function K(e){let t=new FormData;t.append(`file`,e);let{data:n}=await b.post(`/upload`,t);return Ge(n?.url,n?.path)}function Ke(){ze.value+=1}function q(e,t){t&&(Be.value=e,N.value=t,M.value=!0)}function qe(){let e=this.quill,t=document.createElement(`input`);t.type=`file`,t.accept=`image/*`,t.onchange=a