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
41 KiB
1 line
41 KiB
|
2 weeks ago
|
import{n as e,st as t}from"./axios-CiYFffbI.js";import{I as n,N as r,O as i,P as a,V as o,Y as s,_ as c,d as l,f as u,h as d,i as f,it as p,kt as m,l as h,nt as g,p as _,u as v,ut as ee,v as y,y as te,z as b}from"./runtime-core.esm-bundler-CnFWH3R5.js";import{a as x,n as S,o as C}from"./index-BvpdbDif.js";import{t as ne}from"./RichEditorField-DGsT_W30.js";import{t as re}from"./listTable-Dphyh0Bn.js";function ie(e,t){return function(){return e()?window.confirm(t):!0}}function ae(e,t=`当前有未保存改动,确定要离开吗?`){function n(t){e()&&(t.preventDefault(),t.returnValue=``)}x((n,r,i)=>{if(!e()){i();return}i(window.confirm(t))}),r(()=>{window.addEventListener(`beforeunload`,n)}),a(()=>{window.removeEventListener(`beforeunload`,n)})}var oe={style:{color:`#f53f3f`}},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={key:0,class:`booking-settings`},Ie={style:{"margin-top":`16px`,"text-align":`right`}},Le=C(te({__name:`ActivityList`,setup(a){let te=p([]),x=p([]),C=p(null),Le=p(!1),Re=p(!1),w=p(!1),T=g({current:1,pageSize:10,total:0}),E=g({keyword:``,venue_id:void 0,reservation_type:void 0,is_active:void 0,schedule_status:void 0,audit_status:void 0}),D=p(null),O=p(``),k=p(!1),A=p(!0),ze=p(null),Be=p(``),Ve={maxHeight:`70vh`,overflow:`auto`},He=p(0),Ue=p(!1),We=p(`image`),j=p(``),Ge=p(!1),M=p(!1),N=p(``),P=p([]),Ke=p(null),F=null,I=null,L=p(null),qe={lat:31.299379,lng:120.585315},R=p(!1),z=p(!1),Je=p(!1),B=p(null),V=p(`both`),H=p(1),U=p(1),W=p([]);function G(){return`bk-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function K(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 Ye(e){let t=e.start_at?K(String(e.start_at)):``,n=e.end_at?K(String(e.end_at)):``;return!t&&!n?`-`:t&&n?t===n?t:`${t} 至 ${n}`:t||n||`-`}let Xe=h(()=>W.value.reduce((e,t)=>e+(Number(t.day_quota)||0),0)),q=g({venue_id:void 0,reservation_type:`online`,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}),Ze=p(``),J=g({title:``,venue_id:``,start_at:``,end_at:``,reservation_type:``,offline_reservation_method:``,external_url:``,location:``,cover_image:``,gallery_media:``,detail_html:``,contact_name:``,contact_phone:``}),Qe=h({get(){if(q.start_at&&q.end_at)return[q.start_at,q.end_at]},set(e){Array.isArray(e)&&e.length>=2&&e[0]&&e[1]?(q.start_at=String(e[0]),q.end_at=String(e[1])):(q.start_at=``,q.end_at=``)}}),$e=h(()=>mt(q.start_at||``,q.end_at||``));function et(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 Y(e){let t=new FormData;t.append(`file`,e);l
|