webpackJsonp([28],{"83y7":function(e,t){},HnS9:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("Dd8w"),l=a.n(i),n=a("NYxO"),r={created:function(){this.getData()},data:function(){return{totalNumber:0,totalPage:10,currentPage:1,pageSize:20,tableData:[],filter1:"",filter2:"",tableColumns:[{label:"房源id",value:"houseId",show:!0},{label:"类型",value:"imageType",show:!0},{label:"名称",value:"imageName",show:!0},{label:"地址",value:"imageUrl",show:!0}],multipleMode:!1,imgSrc:"",imageDialogVisible:!1}},computed:l()({},Object(n.b)(["tableHeight"]),{selection:function(){return this.$refs.table.selection.map(function(e){return e.id})}}),methods:{pageSizeChange:function(e){this.currentPage=1,this.pageSize=e,this.getData()},currentPageChange:function(e){this.currentPage=e,this.getData()},getData:function(){var e=this;this.$http.get({url:"/houseImage/page",data:{currentPage:this.currentPage,pageNumber:this.pageSize,houseId:this.$route.query.houseId,searchKey:this.filter1}}).then(function(t){t.success&&(e.totalNumber=t.data.page.totalNumber,e.tableData=t.data.pp)})},isColumnShow:function(e){var t=this.tableColumns.find(function(t){return t.value===e});return!!t&&t.show},toggleMultipleMode:function(e){this.multipleMode=e,e||this.$refs.table.clearSelection()},editRow:function(e){this.$router.push({path:"/houseImage",query:{id:e.id}})},operation1:function(){this.$notify({title:"提示",message:this.selection})},operation2:function(){this.$message("操作2")},imageTypeFormatter:function(e,t,a){var i="";switch(a){case 0:i="图片";break;case 1:i="封面"}return i},showImg:function(e){this.imgSrc=e,this.imageDialogVisible=!0},searchData:function(){this.currentPage=1,this.getData()}}},s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"filters-container"},[a("el-input",{staticClass:"filter-item",attrs:{placeholder:"关键字",size:"small",clearable:""},model:{value:e.filter1,callback:function(t){e.filter1=t},expression:"filter1"}}),e._v(" "),a("el-button",{staticClass:"filter-item",attrs:{type:"primary",size:"small",icon:"el-icon-search"},on:{click:e.searchData}},[e._v("搜索\n        ")]),e._v(" "),a("el-button",{staticClass:"filter-item",attrs:{type:"primary",size:"small",icon:"el-icon-edit"},on:{click:function(t){e.$router.push({path:"/houseImage",query:{houseId:e.$route.query.houseId}})}}},[e._v("添加\n        ")]),e._v(" "),a("el-dropdown",{staticClass:"table-column-filter",attrs:{trigger:"click",size:"medium"}},[a("span",[e._v("\n                筛选数据\n                "),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),a("el-dropdown-menu",{staticClass:"table-column-filter-wrapper",attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.tableColumns,function(t){return a("el-checkbox",{key:t.value,model:{value:t.show,callback:function(a){e.$set(t,"show",a)},expression:"item.show"}},[e._v(e._s(t.label)+"\n                ")])}))],1)],1),e._v(" "),a("el-table",{ref:"table",attrs:{data:e.tableData,height:e.tableHeight,"row-key":"id"}},[e.multipleMode?a("el-table-column",{attrs:{align:"center",type:"selection",width:"50"}}):e._e(),e._v(" "),a("el-table-column",{attrs:{type:"index","min-width":"50",align:"center"}}),e._v(" "),e.isColumnShow("houseId")?a("el-table-column",{attrs:{prop:"houseId",label:"房源id","min-width":"100"}}):e._e(),e._v(" "),e.isColumnShow("imageType")?a("el-table-column",{attrs:{prop:"imageType",formatter:e.imageTypeFormatter,label:"类型","min-width":"100"}}):e._e(),e._v(" "),e.isColumnShow("imageName")?a("el-table-column",{attrs:{prop:"imageName",label:"名称","min-width":"100"}}):e._e(),e._v(" "),e.isColumnShow("imageUrl")?a("el-table-column",{attrs:{prop:"imageUrl",label:"地址","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("img",{staticStyle:{width:"100px",height:"100px","vertical-align":"middle"},attrs:{src:t.row.imageUrl},on:{click:function(a){e.showImg(t.row.imageUrl)}}})]}}])}):e._e(),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"primary",size:"mini",plain:""},on:{click:function(a){e.editRow(t.row)}}},[e._v("编辑")])]}}])})],1),e._v(" "),a("div",{staticClass:"pagination-wrapper"},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[10,20,30,40,50],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalNumber},on:{"size-change":e.pageSizeChange,"current-change":e.currentPageChange}})],1),e._v(" "),a("el-dialog",{attrs:{title:"查看图片",visible:e.imageDialogVisible,size:"small"},on:{"update:visible":function(t){e.imageDialogVisible=t}}},[a("img",{attrs:{width:"100%",src:e.imgSrc,alt:""}})])],1)},staticRenderFns:[]};var o=a("VU/8")(r,s,!1,function(e){a("83y7")},"data-v-7518236d",null);t.default=o.exports}});
//# sourceMappingURL=28.edef73355e0aaa14a6c2.js.map