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 lines
7.4 KiB
1 lines
7.4 KiB
import{d as O,v as W,l as G,r as v,h as i,c as d,e as t,w as r,a as y,t as p,u as e,i as g,k as l,F as w,W as V,m as D,J as H,B as F,M as J,E as K,a4 as Q,af as q,G as X,D as Z,b6 as ee,H as ae,K as te,O as le,P as oe,Q as ne,L as re}from"./index-f5d841af.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import{u as I}from"./dict-f88a0e26.js";import{_ as ie,g as se,d as de,a as ue}from"./venue-edit.vue_vue_type_style_index_0_lang-ebbfd41e.js";import{_ as pe}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */const me={class:"main-container"},ce={class:"flex justify-between items-center"},_e={class:"text-lg"},ve={class:"mt-[10px]"},fe={key:0},be={key:0},he={class:"mt-[16px] flex justify-end"},ye=O({__name:"venue",setup(ge){const B=W().meta.title;let o=G({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{campus_id:"",venue_name:"",capacity:"",availability_status:"",time_range_type:"",created_at:"",updated_at:""}});const C=v();v([]);const x=v([]);(async()=>{x.value=await(await I("SiteStatus")).data.dictionary})();const k=v([]);(async()=>{k.value=await(await I("ALLOTTED_TIME")).data.dictionary})();const c=(u=1)=>{o.loading=!0,o.page=u,se({page:o.page,limit:o.limit,...o.searchParam}).then(n=>{o.loading=!1,o.data=n.data.data,o.total=n.data.total}).catch(()=>{o.loading=!1})};c();const f=v(null),N=()=>{f.value.setFormData(),f.value.showDialog=!0},S=u=>{f.value.setFormData(u),f.value.showDialog=!0},U=u=>{J.confirm(l("venueDeleteTips"),l("warning"),{confirmButtonText:l("confirm"),cancelButtonText:l("cancel"),type:"warning"}).then(()=>{de(u).then(()=>{c()}).catch(()=>{})})},E=v([]);(async()=>{E.value=await(await ue({})).data})();const Y=u=>{u&&(u.resetFields(),c())};return(u,n)=>{const b=K,h=Q,P=q,_=X,M=Z,L=ee,z=ae,T=te,m=le,R=oe,$=ne,A=re;return i(),d("div",me,[t(T,{class:"box-card !border-none",shadow:"never"},{default:r(()=>[y("div",ce,[y("span",_e,p(e(B)),1),t(b,{type:"primary",onClick:N},{default:r(()=>[g(p(e(l)("addVenue")),1)]),_:1})]),t(T,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:r(()=>[t(z,{inline:!0,model:e(o).searchParam,ref_key:"searchFormRef",ref:C},{default:r(()=>[t(_,{label:e(l)("campusId"),prop:"campus_id"},{default:r(()=>[t(P,{class:"w-[280px]",modelValue:e(o).searchParam.campus_id,"onUpdate:modelValue":n[0]||(n[0]=a=>e(o).searchParam.campus_id=a),clearable:"",placeholder:e(l)("campusIdPlaceholder")},{default:r(()=>[(i(!0),d(w,null,V(E.value,(a,s)=>(i(),D(h,{key:s,label:a.campus_name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),t(_,{label:e(l)("venueName"),prop:"venue_name"},{default:r(()=>[t(M,{modelValue:e(o).searchParam.venue_name,"onUpdate:modelValue":n[1]||(n[1]=a=>e(o).searchParam.venue_name=a),placeholder:e(l)("venueNamePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(_,{label:e(l)("availabilityStatus"),prop:"availability_status"},{default:r(()=>[t(P,{class:"w-[280px]",modelValue:e(o).searchParam.availability_status,"onUpdate:modelValue":n[2]||(n[2]=a=>e(o).searchParam.availability_status=a),clearable:"",placeholder:e(l)("availabilityStatusPlaceholder")},{default:r(()=>[t(h,{label:"全部",value:""}),(i(!0),d(w,null,V(x.value,(a,s)=>(i(),D(h,{key:s,label:a.name,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),t(_,{label:e(l)("timeRangeType"),prop:"time_range_type"},{default:r(()=>[t(P,{class:"w-[280px]",modelValue:e(o).searchParam.time_range_type,"onUpdate:modelValue":n[3]||(n[3]=a=>e(o).searchParam.time_range_type=a),clearable:"",placeholder:e(l)("timeRangeTypePlaceholder")},{default:r(()=>[t(h,{label:"全部",value:""}),(i(!0),d(w,null,V(k.value,(a,s)=>(i(),D(h,{key:s,label:a.name,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),t(_,{label:e(l)("createdAt"),prop:"created_at"},{default:r(()=>[t(L,{modelValue:e(o).searchParam.created_at,"onUpdate:modelValue":n[4]||(n[4]=a=>e(o).searchParam.created_at=a),type:"datetimerange",format:"YYYY-MM-DD hh:mm:ss","start-placeholder":e(l)("startDate"),"end-placeholder":e(l)("endDate")},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"]),t(_,{label:e(l)("updatedAt"),prop:"updated_at"},{default:r(()=>[t(L,{modelValue:e(o).searchParam.updated_at,"onUpdate:modelValue":n[5]||(n[5]=a=>e(o).searchParam.updated_at=a),type:"datetimerange",format:"YYYY-MM-DD hh:mm:ss","start-placeholder":e(l)("startDate"),"end-placeholder":e(l)("endDate")},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"]),t(_,null,{default:r(()=>[t(b,{type:"primary",onClick:n[6]||(n[6]=a=>c())},{default:r(()=>[g(p(e(l)("search")),1)]),_:1}),t(b,{onClick:n[7]||(n[7]=a=>Y(C.value))},{default:r(()=>[g(p(e(l)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),y("div",ve,[H((i(),D(R,{data:e(o).data,size:"large"},{empty:r(()=>[y("span",null,p(e(o).loading?"":e(l)("emptyData")),1)]),default:r(()=>[t(m,{prop:"campus_id_name",label:e(l)("campusId"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(m,{prop:"venue_name",label:e(l)("venueName"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(m,{prop:"capacity",label:e(l)("capacity"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(m,{label:e(l)("availabilityStatus"),"min-width":"180",align:"center","show-overflow-tooltip":!0},{default:r(({row:a})=>[(i(!0),d(w,null,V(x.value,(s,j)=>(i(),d("div",null,[s.value==a.availability_status?(i(),d("div",fe,p(s.name),1)):F("",!0)]))),256))]),_:1},8,["label"]),t(m,{label:e(l)("timeRangeType"),"min-width":"180",align:"center","show-overflow-tooltip":!0},{default:r(({row:a})=>[(i(!0),d(w,null,V(k.value,(s,j)=>(i(),d("div",null,[s.value==a.time_range_type?(i(),d("div",be,p(s.name),1)):F("",!0)]))),256))]),_:1},8,["label"]),t(m,{prop:"created_at",label:e(l)("createdAt"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(m,{prop:"updated_at",label:e(l)("updatedAt"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(m,{label:e(l)("operation"),fixed:"right","min-width":"120"},{default:r(({row:a})=>[t(b,{type:"primary",link:"",onClick:s=>S(a)},{default:r(()=>[g(p(e(l)("edit")),1)]),_:2},1032,["onClick"]),t(b,{type:"primary",link:"",onClick:s=>U(a.id)},{default:r(()=>[g(p(e(l)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[A,e(o).loading]]),y("div",he,[t($,{"current-page":e(o).page,"onUpdate:current-page":n[8]||(n[8]=a=>e(o).page=a),"page-size":e(o).limit,"onUpdate:page-size":n[9]||(n[9]=a=>e(o).limit=a),layout:"total, sizes, prev, pager, next, jumper",total:e(o).total,onSizeChange:n[10]||(n[10]=a=>c()),onCurrentChange:c},null,8,["current-page","page-size","total"])])]),t(ie,{ref_key:"editVenueDialog",ref:f,onComplete:c},null,512)]),_:1})])}}});const qe=pe(ye,[["__scopeId","data-v-2d8d6f3f"]]);export{qe as default};
|
|
|