Переглянути джерело

房源 出售 出租模块修改优化

230320a303 2 роки тому
батько
коміт
98235fb97f
33 змінених файлів з 104 додано та 53 видалено
  1. 0 0
      dist/index.html
  2. 0 0
      dist/static/js/app.d2659116.js
  3. 0 0
      dist/static/js/app.debcbd2b.js
  4. 0 0
      dist/static/js/chunk-025b2da2.753b5429.js
  5. 0 0
      dist/static/js/chunk-0293acf2.40efb9ea.js
  6. 0 0
      dist/static/js/chunk-060a14dc.457c5092.js
  7. 0 0
      dist/static/js/chunk-07fc91a6.2e8c0d25.js
  8. 0 0
      dist/static/js/chunk-150b3f2c.913fe587.js
  9. 0 0
      dist/static/js/chunk-21302018.2b9523c1.js
  10. 0 0
      dist/static/js/chunk-21380a63.cae939b3.js
  11. 0 0
      dist/static/js/chunk-22f0e970.4704879a.js
  12. 0 0
      dist/static/js/chunk-29258185.6b749caf.js
  13. 0 0
      dist/static/js/chunk-29258185.a84f1424.js
  14. 0 0
      dist/static/js/chunk-2d0ccfc9.eea0d9e1.js
  15. 0 0
      dist/static/js/chunk-36ddeec9.c0196fd6.js
  16. 0 0
      dist/static/js/chunk-3a2d42aa.dcfbfacd.js
  17. 0 0
      dist/static/js/chunk-3ad8748c.d5ca225b.js
  18. 0 0
      dist/static/js/chunk-40f6f9c8.f4dc5933.js
  19. 0 0
      dist/static/js/chunk-593f9664.1025b1db.js
  20. 0 0
      dist/static/js/chunk-67a054c9.68e567c5.js
  21. 0 0
      dist/static/js/chunk-68626a10.fe283eeb.js
  22. 0 0
      dist/static/js/chunk-7441b538.18d56bb5.js
  23. 0 0
      dist/static/js/chunk-77c90766.6c7d57b6.js
  24. 0 0
      dist/static/js/chunk-7f8b33fa.62d86404.js
  25. 0 0
      dist/static/js/chunk-9c1e7474.9c224c9a.js
  26. 0 0
      dist/static/js/chunk-9fbf1e76.c2581947.js
  27. 0 0
      dist/static/js/chunk-e0948b82.366ba666.js
  28. 0 0
      dist/static/js/chunk-libs.16866e7b.js
  29. 10 1
      src/api/house.js
  30. 6 5
      src/views/room/components/searchForm/Index.vue
  31. 5 5
      src/views/room/components/searchForm/Rent.vue
  32. 46 29
      src/views/room/index.vue
  33. 37 13
      src/views/room/rent.vue

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/index.html


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/app.d2659116.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/app.debcbd2b.js


+ 0 - 0
dist/static/js/chunk-025b2da2.271b3b87.js → dist/static/js/chunk-025b2da2.753b5429.js


+ 0 - 0
dist/static/js/chunk-0293acf2.e387858b.js → dist/static/js/chunk-0293acf2.40efb9ea.js


+ 0 - 0
dist/static/js/chunk-060a14dc.9fe713ab.js → dist/static/js/chunk-060a14dc.457c5092.js


+ 0 - 0
dist/static/js/chunk-07fc91a6.d488e100.js → dist/static/js/chunk-07fc91a6.2e8c0d25.js


+ 0 - 0
dist/static/js/chunk-150b3f2c.a0fd747b.js → dist/static/js/chunk-150b3f2c.913fe587.js


+ 0 - 0
dist/static/js/chunk-21302018.22159edf.js → dist/static/js/chunk-21302018.2b9523c1.js


+ 0 - 0
dist/static/js/chunk-21380a63.bc57b1a6.js → dist/static/js/chunk-21380a63.cae939b3.js


+ 0 - 0
dist/static/js/chunk-22f0e970.f5b81395.js → dist/static/js/chunk-22f0e970.4704879a.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-29258185.6b749caf.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-29258185.a84f1424.js


+ 0 - 0
dist/static/js/chunk-2d0ccfc9.61b64577.js → dist/static/js/chunk-2d0ccfc9.eea0d9e1.js


+ 0 - 0
dist/static/js/chunk-36ddeec9.c56df29c.js → dist/static/js/chunk-36ddeec9.c0196fd6.js


+ 0 - 0
dist/static/js/chunk-3a2d42aa.b55d4092.js → dist/static/js/chunk-3a2d42aa.dcfbfacd.js


+ 0 - 0
dist/static/js/chunk-3ad8748c.777e5020.js → dist/static/js/chunk-3ad8748c.d5ca225b.js


+ 0 - 0
dist/static/js/chunk-40f6f9c8.f4e31017.js → dist/static/js/chunk-40f6f9c8.f4dc5933.js


+ 0 - 0
dist/static/js/chunk-593f9664.c59c139f.js → dist/static/js/chunk-593f9664.1025b1db.js


+ 0 - 0
dist/static/js/chunk-67a054c9.b8b8428c.js → dist/static/js/chunk-67a054c9.68e567c5.js


+ 0 - 0
dist/static/js/chunk-68626a10.4df4efe3.js → dist/static/js/chunk-68626a10.fe283eeb.js


+ 0 - 0
dist/static/js/chunk-7441b538.f880b294.js → dist/static/js/chunk-7441b538.18d56bb5.js


+ 0 - 0
dist/static/js/chunk-77c90766.cebe2274.js → dist/static/js/chunk-77c90766.6c7d57b6.js


+ 0 - 0
dist/static/js/chunk-7f8b33fa.a15125d1.js → dist/static/js/chunk-7f8b33fa.62d86404.js


+ 0 - 0
dist/static/js/chunk-9c1e7474.121b95c0.js → dist/static/js/chunk-9c1e7474.9c224c9a.js


+ 0 - 0
dist/static/js/chunk-9fbf1e76.0305e618.js → dist/static/js/chunk-9fbf1e76.c2581947.js


+ 0 - 0
dist/static/js/chunk-e0948b82.287b3989.js → dist/static/js/chunk-e0948b82.366ba666.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-libs.16866e7b.js


+ 10 - 1
src/api/house.js

@@ -275,9 +275,12 @@ export default {
   admestateupdateprice: params => { // 楼盘自动更新均价 开关
     return getRequestNoSort('/adm/estate/update/price', params, 'loading')
   },
-  admrenthouselist: params => { // 租房 列表接口
+  admrenthouselist: params => { // 小程序编辑 新版本 租房 列表接口
     return getRequest('/adm/rent/house/list', params)
   },
+  admrenthouseshow: params => { // 小程序编辑 新版本  租房 显示隐藏
+    return getRequestNoSort('/adm/rent/house/show', params, 'loading')
+  },
   admrenthouseadd: params => { // 租房 添加
     return getRequestNoSort('/adm/rent/house/add', params, 'loading')
   },
@@ -293,4 +296,10 @@ export default {
   admrenthousedel: params => { // 租房 删除
     return getRequestNoSort('/adm/rent/house/del', params, 'loading')
   },
+  admeshouselist: params => { // 新版 小程序上房源  列表
+    return getRequest('/adm/eshouse/list', params)
+  },
+  admeshouseshow: params => { // 新版 小程序上房源  显示隐藏
+    return getRequest('/adm/eshouse/show', params, 'loading')
+  },
 }

+ 6 - 5
src/views/room/components/searchForm/Index.vue

@@ -32,12 +32,13 @@ export default {
         { label: '所属楼盘', key: 'estate_id', type: 'selectRemote',
           remoteParams: { skey: 'estate_name', api: `house.admestatelist?estate_tag=二手`, opKey: 'estate_name', opVal: 'id' }
         },
-        { label: '置业经理', key: 'sale_id', type: 'selectRemote',
-          remoteParams: { skey: 'sale_name', api: `user.admsaleuserlist?page_size=999`, opKey: 'sale_name', opVal: 'id' }
-        },
+        // { label: '置业经理', key: 'sale_id', type: 'selectRemote',
+        //   remoteParams: { skey: 'sale_name', api: `user.admsaleuserlist?page_size=999`, opKey: 'sale_name', opVal: 'id' }
+        // },
         { label: '所属区域', key: 'area_type', type: 'select', options: this.$dictData.area_type},
-        { label: '楼盘类型', key: 'product_type', type: 'select', options: this.$dictData.product_type},
-        { label: '房源户型', key: 'house_type', type: 'select', options: this.$dictData.house_type},
+        { label: '状态', key: 'hide_status', type: 'select', options: this.$dictData.hide_status},
+        // { label: '楼盘类型', key: 'product_type', type: 'select', options: this.$dictData.product_type},
+        // { label: '房源户型', key: 'house_type', type: 'select', options: this.$dictData.house_type},
       ]
       this.setDefaultValue(params, 'searchData')
     },

+ 5 - 5
src/views/room/components/searchForm/Rent.vue

@@ -32,12 +32,12 @@ export default {
         { label: '所属楼盘', key: 'estate_id', type: 'selectRemote',
           remoteParams: { skey: 'estate_name', api: `house.admestatelist?estate_tag=二手`, opKey: 'estate_name', opVal: 'id' }
         },
-        { label: '置业经理', key: 'sale_id', type: 'selectRemote',
-          remoteParams: { skey: 'sale_name', api: `user.admsaleuserlist?page_size=999`, opKey: 'sale_name', opVal: 'id' }
-        },
+        // { label: '置业经理', key: 'sale_id', type: 'selectRemote',
+        //   remoteParams: { skey: 'sale_name', api: `user.admsaleuserlist?page_size=999`, opKey: 'sale_name', opVal: 'id' }
+        // },
         { label: '所属区域', key: 'area_type', type: 'select', options: this.$dictData.area_type},
-        { label: '楼盘类型', key: 'product_type', type: 'select', options: this.$dictData.product_type},
-        { label: '房源户型', key: 'house_type', type: 'select', options: this.$dictData.house_type},
+        { label: '状态', key: 'hide_status', type: 'select', options: this.$dictData.hide_status},
+        // { label: '房源户型', key: 'house_type', type: 'select', options: this.$dictData.house_type},
       ]
       this.setDefaultValue(params, 'searchData')
     },

+ 46 - 29
src/views/room/index.vue

@@ -13,8 +13,6 @@
       :total-records="totalRecords"
       @currentChange="pageHandle"
       @sizeChange="sizeChange"
-      :isAdd="true"
-      @add="openPopup"
       :operationsDefaultLength="5"
     />
     <popup-edit
@@ -43,7 +41,7 @@ export default {
   mixins: [baseTable],
   data() {
     return {
-      apiStr: 'house.admoldhouselist',
+      apiStr: 'house.admeshouselist',
       searchForm: null,
       isDtlShow: false,
       // noCreated: true,
@@ -63,53 +61,72 @@ 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: 'title' },
+        // { label: '浏览数', prop: 'view_count' },
+        // { label: '置业经理', prop: 'sale_name' },
+        { label: '标题', prop: 'title', minWidth: 200, fullShow: true },
         { label: '主图', prop: 'pri_image', type: 'img' },
-        { 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: '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_at' },
-        { 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'
+                }
+              }
+            },
           ]
         }
       ]
     }
   },
   methods: {
-    saveHandle (row) {
-      this.$api.house.admoldhousesortedit({
-        id: row.id,
-        sort: row.sort,
-      }).then(data => {
-        this.$msgs(`已保存!`)
-        this.fetchData()
-      })
-    },
-    delHandle(row) {
-      this.$msg(`您确定要删除该楼盘吗?`, 'confirm', () => {
-        this.$api.house.admoldhousedel({
+    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.admeshouseshow({
           id: row.id,
-          status: 2
+          hide_status
         }).then(data => {
-          this.$msgs(`已删除!`)
+          this.$msgs(`${msgText}成功!`)
           this.fetchData()
         })
       }, null, true)
     },
+    // saveHandle (row) {
+    //   this.$api.house.admoldhousesortedit({
+    //     id: row.id,
+    //     sort: row.sort,
+    //   }).then(data => {
+    //     this.$msgs(`已保存!`)
+    //     this.fetchData()
+    //   })
+    // },
+    // delHandle(row) {
+    //   this.$msg(`您确定要删除该楼盘吗?`, 'confirm', () => {
+    //     this.$api.house.admoldhousedel({
+    //       id: row.id,
+    //       status: 2
+    //     }).then(data => {
+    //       this.$msgs(`已删除!`)
+    //       this.fetchData()
+    //     })
+    //   }, null, true)
+    // },
     openPopup(row) {
       if (row && row.id) {
         this.curObj = row

+ 37 - 13
src/views/room/rent.vue

@@ -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,

Деякі файли не було показано, через те що забагато файлів було змінено