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
40 KiB
1 line
40 KiB
|
1 month 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 b,z as x}from"./runtime-core.esm-bundler-CnFWH3R5.js";import{a as S,n as C,o as w}from"./index-Dyg4zy2p.js";import{t as te}from"./RichEditorField-Das-UNcZ.js";import{t as ne}from"./listTableRowIndex-CwNZabrG.js";function re(e,t){return function(){return e()?window.confirm(t):!0}}function ie(e,t=`当前有未保存改动,确定要离开吗?`){function n(t){e()&&(t.preventDefault(),t.returnValue=``)}S((n,r,i)=>{if(!e()){i();return}i(window.confirm(t))}),r(()=>{window.addEventListener(`beforeunload`,n)}),a(()=>{window.removeEventListener(`beforeunload`,n)})}var ae={style:{color:`#f53f3f`}},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={class:`activity-form-tags`},me={class:`activity-form-tags__line`},he={class:`activity-form-tags__chips`},ge={key:0,class:`activity-form-tags__empty`},_e={key:1,style:{color:`var(--color-text-3)`}},ve={style:{"margin-left":`8px`,color:`var(--color-text-3)`}},ye={class:`activity-address-coord-row`},be={style:{color:`#f53f3f`}},xe={class:`activity-cover-carousel-wrap`},Se={class:`activity-cover-carousel-row__col`},Ce=[`src`],we={class:`activity-cover-carousel-row__col`},Te={style:{display:`flex`,"flex-direction":`column`,"align-items":`flex-start`,width:`100%`}},Ee={style:{width:`100%`,"margin-bottom":`8px`}},De={class:`activity-gallery-grid`},Oe=[`src`,`onClick`],ke=[`src`,`onClick`],Ae=[`src`],je=[`src`],Me={style:{display:`flex`,gap:`12px`}},Ne={style:{width:`280px`,height:`520px`,overflow:`auto`,border:`1px solid #e5e6eb`,padding:`8px`}},Pe={key:0,class:`booking-settings`},Fe={style:{"margin-top":`16px`,"text-align":`right`}},Ie=1610,T=w(b({__name:`ActivityList`,setup(a){let b=p([]),S=p([]),w=p(null),T=p(!1),Le=p(!1),E=p(!1),D=g({current:1,pageSize:10,total:0}),O=g({keyword:``,venue_id:void 0,reservation_type:void 0,is_active:void 0,schedule_status:void 0,audit_status:void 0}),k=p(null),A=p(``),j=p(!1),M=p(!0),Re=p(null),ze=p(``),Be={maxHeight:`70vh`,overflow:`auto`},Ve=p(0),He=p(!1),Ue=p(`image`),N=p(``),We=p(!1),P=p(!1),F=p(``),Ge=p([]),Ke=p(null),I=null,L=null,R=p(null),qe={lat:31.299379,lng:120.585315},z=p(!1),Je=p(!1),Ye=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 Xe(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 Ze=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}),Qe=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:``}),$e=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=``)}}),et=h(()=>gt(q.start_at||``,q.end_at||``));function tt(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.appen
|