|
@@ -13,8 +13,6 @@
|
|
|
:total-records="totalRecords"
|
|
|
@currentChange="pageHandle"
|
|
|
@sizeChange="sizeChange"
|
|
|
- :isAdd="true"
|
|
|
- @add="openPopup"
|
|
|
:operationsDefaultLength="5"
|
|
|
/>
|
|
|
<popup-edit
|
|
@@ -63,33 +61,59 @@ export default {
|
|
|
mounted() {
|
|
|
this.listConfig = {
|
|
|
rows: [
|
|
|
- { label: '排序', prop: 'sort', type: 'input', width: 80},
|
|
|
+ // { label: '排序', prop: 'sort', type: 'input', width: 80},
|
|
|
{ label: '编号', prop: 'id' },
|
|
|
{ label: '楼盘', prop: 'estate_name' },
|
|
|
- { label: '浏览数', prop: 'view_count' },
|
|
|
- { label: '置业经理', prop: 'sale_name' },
|
|
|
+ // { label: '浏览数', prop: 'view_count' },
|
|
|
+ // { label: '置业经理', prop: 'sale_name' },
|
|
|
{ label: '标题', prop: 'title' },
|
|
|
{ label: '主图', prop: 'pri_image', type: 'img' },
|
|
|
- { label: '详细地址', prop: 'detail_address', fullShow: true, minWidth: 100 },
|
|
|
+ // { label: '详细地址', prop: 'detail_address', fullShow: true, minWidth: 100 },
|
|
|
{ label: '总价', prop: 'price' },
|
|
|
{ label: '面积㎡', prop: 'area' },
|
|
|
- { label: '房源类型', prop: 'house_type', width: 100, fullShow: true, type: 'flag', flags: arrToObj(this.$dictData.house_type) },
|
|
|
+ // { label: '房源类型', prop: 'house_type', width: 100, fullShow: true, type: 'flag', flags: arrToObj(this.$dictData.house_type) },
|
|
|
{ label: '所属区域', prop: 'area_type', type: 'flag', flags: arrToObj(this.$dictData.area_type) },
|
|
|
- { label: '更新人', prop: 'update_by' },
|
|
|
+ { label: '状态', prop: 'hide_status', type: 'tag', tags: arrToObj(this.$dictData.hide_status), tagTypeObj: {'1': 'success', '2': 'danger'} },
|
|
|
+ // { label: '更新人', prop: 'update_by' },
|
|
|
{ label: '更新时间', prop: 'update_at' },
|
|
|
- { label: '创建人', prop: 'create_by' },
|
|
|
+ // { label: '创建人', prop: 'create_by' },
|
|
|
{ label: '创建时间', prop: 'create_at' },
|
|
|
- { label: '操作', width: 200, type: 'handle2', operations:
|
|
|
+ { label: '操作', width: 80, type: 'handle2', operations:
|
|
|
[
|
|
|
- { label: '保存排序', func: this.saveHandle, btnType: 'success' },
|
|
|
- { label: '编辑', func: this.openPopup, btnType: 'primary' },
|
|
|
- { label: '删除', func: this.delHandle, btnType: 'danger' },
|
|
|
+ { labelFor: 'hide_status', disabled: true, func: this.statusHandle, hide: 'nosys',
|
|
|
+ labelConfig: {
|
|
|
+ texts: {
|
|
|
+ 1: '隐藏',
|
|
|
+ 2: '显示'
|
|
|
+ },
|
|
|
+ btnTypes: {
|
|
|
+ 1: 'danger',
|
|
|
+ 2: 'success'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // { label: '保存排序', func: this.saveHandle, btnType: 'success' },
|
|
|
+ // { label: '编辑', func: this.openPopup, btnType: 'primary' },
|
|
|
+ // { label: '删除', func: this.delHandle, btnType: 'danger' },
|
|
|
]
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ statusHandle (row) {
|
|
|
+ const hide_status = Number(row.hide_status) === 1 ? 2 : 1
|
|
|
+ const msgText = Number(row.hide_status) === 1 ? '隐藏' : '显示'
|
|
|
+ this.$msg(`确定要${msgText}该房源吗?`, 'confirm', ()=> {
|
|
|
+ this.$api.house.admrenthouseshow({
|
|
|
+ id: row.id,
|
|
|
+ hide_status
|
|
|
+ }).then(data => {
|
|
|
+ this.$msgs(`${msgText}成功!`)
|
|
|
+ this.fetchData()
|
|
|
+ })
|
|
|
+ }, null, true)
|
|
|
+ },
|
|
|
saveHandle (row) {
|
|
|
this.$api.house.admrenthousesortedit({
|
|
|
id: row.id,
|