2023-11-15 15:57:04 +08:00

2 lines
7.0 KiB
JavaScript

/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index-7eafba5f.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css */import{a as M,E as R}from"./el-form-item-1b16c9fc.js";/* empty css *//* empty css */import{t as e}from"./index-0ca94763.js";import{m as Y,n as I,o as O}from"./tourism-6d4e6397.js";import{c as A}from"./common-c3be41fd.js";import{u as q,a as G}from"./vue-router-48fdc1e3.js";import{E as J}from"./index-ee5275c6.js";import{E as K}from"./index-c5914bde.js";import{E as Q}from"./index-e27c3bb0.js";import{E as W}from"./index-51138976.js";import{a as X,E as Z}from"./index-4601cf3b.js";import{E as tt}from"./index-9ecd3f93.js";import{a as et,E as at}from"./index-fe3867fe.js";import{E as ot}from"./index-21f38393.js";import{v as lt}from"./directive-64fb15dc.js";import{d as rt,r as S,O as C,e as _,f as P,y as l,x as i,g as p,B as n,u as t,A as d,F as it,z as nt,v as g,M as st,H as w}from"./plugin-vue_export-helper-85a4d40b.js";import"./index-bcd7a424.js";import"./index-cf9a2dd7.js";import"./index-e513479b.js";import"./el-main-86eb724f.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-b9e5f5cb.js";import"./el-overlay-08181e74.js";import"./event-f85d77b0.js";import"./index-313cd2ce.js";import"./focus-trap-64c402c5.js";import"./index-1ad115d7.js";import"./index-de1d3b53.js";import"./index-d469ae66.js";import"./index-4d8f36c6.js";import"./index-ebc73046.js";import"./_baseClone-3dbf39d6.js";import"./aria-adfa05c5.js";import"./validator-bcf701e4.js";import"./customParseFormat-40c50080.js";import"./arrays-e667dc24.js";import"./flatten-749195f8.js";import"./index-6c0acd90.js";import"./debounce-6c3123a6.js";import"./index-bd04154b.js";import"./isEqual-0b9509fd.js";import"./index-99b65a15.js";import"./strings-53351eda.js";import"./index-95b00894.js";import"./_isIterateeCall-47526406.js";const mt={class:"main-container"},pt={class:"flex justify-between items-center"},dt={class:"text-[20px]"},ct={class:"mt-[10px]"},ut={class:"flex items-center cursor-pointer"},_t={class:"min-w-[60px] h-[60px] flex items-center justify-center"},ht=["src"],ft=["title"],gt={class:"mt-[16px] flex justify-end"},Pe=rt({__name:"list",setup(bt){const V=q().meta.title,v=S([]);(async()=>{v.value=await(await Y()).data})();let o=C({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{hotel_name:"",create_time:[]}});const H=C({1:e("oneStar"),2:e("twoStar"),3:e("threeStar"),4:e("fourStar"),5:e("fiveStar")}),x=S(),h=(s=1)=>{o.loading=!0,o.page=s,I({page:o.page,limit:o.limit,...o.searchParam}).then(r=>{o.loading=!1,o.data=r.data.data,o.total=r.data.total}).catch(()=>{o.loading=!1})};h();const b=G(),T=()=>{b.push("/tourism/product/hotel/edit")},B=s=>{b.push("/tourism/product/hotel/edit?id="+s.hotel_id)},D=s=>{b.push("/tourism/product/hotel/room?id="+s.hotel_id)},y=(s,r)=>{let m=s==1?e("upPrompt"):e("downPrompt");J.confirm(m,e("warning"),{confirmButtonText:e("confirm"),cancelButtonText:e("cancel"),type:"warning"}).then(()=>{O({hotel_id:r.hotel_id,hotel_status:s}).then(()=>{h()})})};return(s,r)=>{const m=K,z=Q,f=M,F=W,k=X,N=Z,$=R,E=tt,u=et,L=at,j=ot,U=lt;return _(),P("div",mt,[l(E,{class:"box-card !border-none",shadow:"never"},{default:i(()=>[p("div",pt,[p("span",dt,n(t(V)),1),l(m,{type:"primary",class:"w-[100px]",onClick:T},{default:i(()=>[d(n(t(e)("addTourismHotel")),1)]),_:1})]),l(E,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:i(()=>[l($,{inline:!0,model:t(o).searchParam,ref_key:"searchFormRef",ref:x},{default:i(()=>[l(f,{label:t(e)("hotelName"),prop:"hotel_name"},{default:i(()=>[l(z,{modelValue:t(o).searchParam.hotel_name,"onUpdate:modelValue":r[0]||(r[0]=a=>t(o).searchParam.hotel_name=a),placeholder:t(e)("hotelNamePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(f,{label:t(e)("createTime"),prop:"create_time"},{default:i(()=>[l(F,{modelValue:t(o).searchParam.create_time,"onUpdate:modelValue":r[1]||(r[1]=a=>t(o).searchParam.create_time=a),type:"datetimerange","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":t(e)("startDate"),"end-placeholder":t(e)("endDate")},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"]),l(f,{label:t(e)("hotelStatus"),prop:"hotel_status"},{default:i(()=>[l(N,{modelValue:t(o).searchParam.hotel_status,"onUpdate:modelValue":r[2]||(r[2]=a=>t(o).searchParam.hotel_status=a),clearable:"",placeholder:t(e)("hotelStatusPlaceholder"),class:"input-width"},{default:i(()=>[l(k,{label:t(e)("selectPlaceholder"),value:""},null,8,["label"]),(_(!0),P(it,null,nt(v.value,(a,c)=>(_(),g(k,{label:a.name,value:a.status},null,8,["label","value"]))),256))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),l(f,null,{default:i(()=>[l(m,{type:"primary",onClick:r[3]||(r[3]=a=>h())},{default:i(()=>[d(n(t(e)("search")),1)]),_:1}),l(m,{onClick:r[4]||(r[4]=a=>{var c;return(c=x.value)==null?void 0:c.resetFields()})},{default:i(()=>[d(n(t(e)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),p("div",ct,[st((_(),g(L,{data:t(o).data,size:"large"},{empty:i(()=>[p("span",null,n(t(o).loading?"":t(e)("emptyData")),1)]),default:i(()=>[l(u,{label:t(e)("hotelInfo"),"min-width":"240",align:"left"},{default:i(({row:a})=>[p("div",ut,[p("div",_t,[p("img",{class:"max-w-[60px] max-h-[60px]",src:t(A)(a.cover_thumb_small)},null,8,ht)]),p("a",{href:"javascript:;",title:a.hotel_name,class:"multi-hidden ml-2"},n(a.hotel_name),9,ft)])]),_:1},8,["label"]),l(u,{prop:"hotel_star",label:t(e)("hotelStar"),"min-width":"100"},{default:i(({row:a})=>[d(n(H[a.hotel_star]),1)]),_:1},8,["label"]),l(u,{prop:"full_address",label:t(e)("fullAddress"),"min-width":"150"},null,8,["label"]),l(u,{prop:"hotel_status_name",label:t(e)("hotelStatus"),"min-width":"100"},null,8,["label"]),l(u,{prop:"create_time",label:t(e)("createTime"),"min-width":"150"},null,8,["label"]),l(u,{label:t(e)("operation"),fixed:"right",align:"right",width:"240"},{default:i(({row:a})=>[a.hotel_status==0?(_(),g(m,{key:0,type:"primary",link:"",onClick:c=>y(1,a)},{default:i(()=>[d(n(t(e)("grounding")),1)]),_:2},1032,["onClick"])):w("",!0),a.hotel_status==1?(_(),g(m,{key:1,type:"primary",link:"",onClick:c=>y(0,a)},{default:i(()=>[d(n(t(e)("OffShelf")),1)]),_:2},1032,["onClick"])):w("",!0),l(m,{type:"primary",link:"",onClick:c=>B(a)},{default:i(()=>[d(n(t(e)("edit")),1)]),_:2},1032,["onClick"]),l(m,{type:"primary",link:"",onClick:c=>D(a)},{default:i(()=>[d(n(t(e)("roomList")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[U,t(o).loading]]),p("div",gt,[l(j,{"current-page":t(o).page,"onUpdate:currentPage":r[5]||(r[5]=a=>t(o).page=a),"page-size":t(o).limit,"onUpdate:pageSize":r[6]||(r[6]=a=>t(o).limit=a),layout:"total, sizes, prev, pager, next, jumper",total:t(o).total,onSizeChange:r[7]||(r[7]=a=>h()),onCurrentChange:h},null,8,["current-page","page-size","total"])])])]),_:1})])}}});export{Pe as default};