x-php-Admin/dist/static/js/403.e9d9a53c.js
2024-01-05 16:08:59 +08:00

1 line
7.3 KiB
JavaScript

"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[403],{5403:function(e,a,t){t.r(a),t.d(a,{default:function(){return y}});var l=t(6808),s=t(9511);const i={class:"left-panel"},o={class:"right-panel"},n={class:"right-panel-search"},d=["src"],r={class:"input-mask"},u=["value"];function c(e,a,t,c,p,m){const h=(0,l.up)("el-tab-pane"),g=(0,l.up)("el-tabs"),w=(0,l.up)("el-header"),f=(0,l.up)("el-button"),b=(0,l.up)("el-input"),k=(0,l.up)("el-table-column"),v=(0,l.up)("x-status-indicator"),y=(0,l.up)("el-badge"),_=(0,l.up)("el-link"),W=(0,l.up)("el-button-group"),C=(0,l.up)("xTable"),$=(0,l.up)("el-main"),S=(0,l.up)("el-container"),x=(0,l.up)("room-dialog"),D=(0,l.up)("update"),j=(0,l.up)("images"),T=(0,l.up)("videos"),V=(0,l.up)("lives");return(0,l.wg)(),(0,l.iD)(l.HY,null,[(0,l.Wm)(S,null,{default:(0,l.w5)((()=>[(0,l.Wm)(w,{class:"header-tabs"},{default:(0,l.w5)((()=>[(0,l.Wm)(g,{type:"card",modelValue:p.search.status,"onUpdate:modelValue":a[0]||(a[0]=e=>p.search.status=e),onTabChange:m.tabChange},{default:(0,l.w5)((()=>[(0,l.Wm)(h,{label:"所有",name:"0"}),(0,l.Wm)(h,{label:"在线公寓",name:"1"}),(0,l.Wm)(h,{label:"已下架",name:"2"}),(0,l.Wm)(h,{label:"短租公寓",name:"3"})])),_:1},8,["modelValue","onTabChange"])])),_:1}),(0,l.Wm)(w,null,{default:(0,l.w5)((()=>[(0,l._)("div",i,[(0,l.Wm)(f,{type:"primary",icon:"el-icon-plus",onClick:m.add},null,8,["onClick"])]),(0,l._)("div",o,[(0,l._)("div",n,[(0,l.Wm)(b,{modelValue:p.search.keyword,"onUpdate:modelValue":a[1]||(a[1]=e=>p.search.keyword=e),placeholder:"关键词",clearable:""},null,8,["modelValue"]),(0,l.Wm)(f,{type:"primary",icon:"el-icon-search",onClick:m.upsearch},null,8,["onClick"])])])])),_:1}),(0,l.Wm)($,{class:"nopadding"},{default:(0,l.w5)((()=>[(0,l.Wm)(C,{ref:"table",apiObj:p.apiObj,"row-key":"id",onSelectionChange:m.selectionChange,hideSetting:!0,remoteSort:"",remoteFilter:"",stripe:""},{default:(0,l.w5)((()=>[(0,l.Wm)(k,{type:"selection",width:"30"}),(0,l.Wm)(k,{label:"ID",prop:"id",width:"50"}),(0,l.Wm)(k,{label:"",prop:"status",width:"38"},{default:(0,l.w5)((e=>[1==e.row.status?((0,l.wg)(),(0,l.j4)(v,{key:0,pulse:"",type:"success"})):(0,l.kq)("",!0),0==e.row.status?((0,l.wg)(),(0,l.j4)(v,{key:1,pulse:"",type:"info"})):(0,l.kq)("",!0)])),_:1}),(0,l.Wm)(k,{label:"公寓名称",prop:"title",minWidth:"300"},{default:(0,l.w5)((e=>[(0,l._)("img",{src:e.row.image,height:"25",style:{"border-radius":"8px"}},null,8,d),(0,l._)("label",r,[(0,l._)("input",{style:{cursor:"pointer"},class:"el-input__inner",type:"text",readonly:"",value:e.row.title},null,8,u)])])),_:1}),(0,l.Wm)(k,{label:"图组",prop:"attachment",width:"60"},{default:(0,l.w5)((e=>[(0,l.Wm)(_,{underline:!1,size:"small",onClick:a=>m.setImage(e.row)},{default:(0,l.w5)((()=>[(0,l.Wm)(y,{value:e.row.attachment.length,type:"danger"},null,8,["value"])])),_:2},1032,["onClick"])])),_:1}),(0,l.Wm)(k,{label:"视频",prop:"video",width:"60"},{default:(0,l.w5)((e=>[(0,l.Wm)(_,{underline:!1,size:"small",onClick:a=>m.setVideo(e.row)},{default:(0,l.w5)((()=>[(0,l.Wm)(y,{value:Object.keys(e.row.video||{}).length,type:"warning"},null,8,["value"])])),_:2},1032,["onClick"])])),_:1}),(0,l.Wm)(k,{label:"直播",prop:"live",width:"60"},{default:(0,l.w5)((e=>[(0,l.Wm)(_,{underline:!1,size:"small",onClick:a=>m.setLive(e.row)},{default:(0,l.w5)((()=>[(0,l.Wm)(y,{value:Object.keys(e.row.live||{}).length,type:"info"},null,8,["value"])])),_:2},1032,["onClick"])])),_:1}),(0,l.Wm)(k,{label:"客服ID",prop:"customerservice",width:"80"}),(0,l.Wm)(k,{label:"品牌",prop:"company",width:"180"}),(0,l.Wm)(k,{label:"租金",prop:"rentprice",width:"80"}),(0,l.Wm)(k,{label:"排序",prop:"sort",width:"100"}),(0,l.Wm)(k,{label:"添加时间",prop:"timestamp",width:"150"}),(0,l.Wm)(k,{label:"浏览",prop:"viewnum",width:"90"}),(0,l.Wm)(k,{label:"操作",fixed:"right",align:"left",width:"195"},{default:(0,l.w5)((e=>[(0,l.Wm)(W,null,{default:(0,l.w5)((()=>[(0,l.Wm)(f,{type:"primary",size:"small",onClick:a=>m.table_edit(e.row,e.$index)},{default:(0,l.w5)((()=>[(0,l.Uk)("编辑")])),_:2},1032,["onClick"]),(0,l.Wm)(f,{type:"warning",size:"small",onClick:a=>m.table_room(e.row,e.$index)},{default:(0,l.w5)((()=>[(0,l.Uk)("房型("+(0,s.zw)(e.row.room)+")",1)])),_:2},1032,["onClick"]),(0,l.Wm)(f,{type:"danger",size:"small",onClick:a=>m.open(e.row)},{default:(0,l.w5)((()=>[(0,l.Uk)("海报")])),_:2},1032,["onClick"])])),_:2},1024)])),_:1})])),_:1},8,["apiObj","onSelectionChange"])])),_:1})])),_:1}),p.dialog.room?((0,l.wg)(),(0,l.j4)(x,{key:0,ref:"roomDialog",onSuccess:m.handleSuccess,onClosed:a[2]||(a[2]=e=>p.dialog.room=!1)},null,8,["onSuccess"])):(0,l.kq)("",!0),p.dialog.update?((0,l.wg)(),(0,l.j4)(D,{key:1,ref:"update",onSuccess:m.handleSuccess,onClosed:a[3]||(a[3]=e=>p.dialog.update=!1)},null,8,["onSuccess"])):(0,l.kq)("",!0),p.dialog.images?((0,l.wg)(),(0,l.j4)(j,{key:2,ref:"images",onSuccess:m.attachmenthandleSuccess,onClosed:a[4]||(a[4]=e=>p.dialog.images=!1)},null,8,["onSuccess"])):(0,l.kq)("",!0),p.dialog.videos?((0,l.wg)(),(0,l.j4)(T,{key:3,ref:"videos",onSuccess:m.attachmenthandleSuccess,onClosed:a[5]||(a[5]=e=>p.dialog.videos=!1)},null,8,["onSuccess"])):(0,l.kq)("",!0),p.dialog.lives?((0,l.wg)(),(0,l.j4)(V,{key:4,ref:"lives",onSuccess:m.attachmenthandleSuccess,onClosed:a[6]||(a[6]=e=>p.dialog.lives=!1)},null,8,["onSuccess"])):(0,l.kq)("",!0)],64)}var p=t(2508),m=t(1562),h=t(4570),g=t(2033),w=t(7882),f=t(3995),b={name:"apartment",components:{roomDialog:p["default"],update:m["default"],videos:g["default"],images:h["default"],lives:w["default"]},data(){return{dialog:{room:!1,update:!1,images:!1,videos:!1,lives:!1},apiObj:f["default"].list,selection:[],search:{keyword:"",status:"0"}}},mounted(){},methods:{open(e){window.open(e.apartmentposter)},tabChange(e){this.search.status=e,this.$refs.table.reload(this.search)},upsearch(){this.$refs.table.reload(this.search)},add(){this.dialog.update=!0,this.$nextTick((()=>{this.$refs.update.open().setConfig()}))},setImage(e){this.dialog.images=!0,this.$nextTick((()=>{this.$refs.images.open().remoteData(e)}))},setVideo(e){this.dialog.videos=!0,this.$nextTick((()=>{this.$refs.videos.open().remoteData(e)}))},setLive(e){this.dialog.lives=!0,this.$nextTick((()=>{this.$refs.lives.open().remoteData(e)}))},table_edit(e){this.dialog.update=!0,this.$nextTick((()=>{this.$refs.update.open("edit").setConfig().setData(e)}))},table_room(e){this.dialog.room=!0,this.$nextTick((()=>{this.$refs.roomDialog.open("edit").setData(e)}))},async table_del(e,a){var t={id:e.id},l=await f["default"].post("delete",t);200==l.code?(this.$refs.table.tableData.splice(a,1),this.$message.success("删除成功")):this.$alert(l.message,"提示",{type:"error"})},async batch_del(){this.$confirm(`确定下架选中的 ${this.selection.length} 项吗?`,"提示",{type:"warning"}).then((()=>{const e=this.$loading();this.selection.forEach((e=>{this.$refs.table.tableData.forEach(((a,t)=>{e.id===a.id&&this.$refs.table.tableData.splice(t,1)}))})),e.close(),this.$message.success("操作成功")})).catch((()=>{}))},selectionChange(e){this.selection=e},async attachmenthandleSuccess(e,a){var t=await f["default"].post("attachmentSubmit",e);if(200==t.code)return a.close(),this.$refs.table.refresh(),void this.$message.success("操作成功");this.$alert(t.message,"提示",{type:"error"})},async handleSuccess(){this.$refs.table.refresh()}}},k=t(8700);const v=(0,k.Z)(b,[["render",c],["__scopeId","data-v-2be1269c"]]);var y=v}}]);