230320a303 8 月之前
父節點
當前提交
33b4dce0d3

文件差異過大導致無法顯示
+ 0 - 0
dist/index.html


文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/chunk-384c211a.9aa93a26.css


文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/chunk-5dacdcb6.52d28dda.css


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.0cb328fd.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.b01d3230.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-384c211a.afdb71db.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-5dacdcb6.d43cc317.js


+ 15 - 0
src/api/house.js

@@ -208,6 +208,21 @@ export default {
   admestatehousearealist: params => { // 摇号期数 - 楼盘户型图列表
     return getRequest('/adm/estate/house/area/list', params, 'loading')
   },
+  admestatehousedynamiclist: params => { // 房价动态 - 列表
+    return getRequest('/adm/estate/house/dynamic/list', params)
+  },
+  admestatehousedynamicadd: params => { // 房价动态 - 添加
+    return getRequest('/adm/estate/house/dynamic/add', params, 'loading')
+  },
+  admestatehousedynamicedit: params => { // 房价动态 - 编辑
+    return getRequest('/adm/estate/house/dynamic/edit', params, 'loading')
+  },
+  admestatehousedynamicdel: params => { // 房价动态 - 删除
+    return getRequest('/adm/estate/house/dynamic/del', params, 'loading')
+  },
+  admestatehousedynamicupdate: params => { // 房价动态 - 更新
+    return getRequest('/adm/estate/house/dynamic/update', params, 'loading')
+  },
   admestatelotterypriceedit: params => { // 一房一价 - 编辑
     return getRequestNoSort('/adm/estate/lottery/price/edit', params, 'loading')
   },

+ 147 - 0
src/views/house/components/popup/TrendEdit.vue

@@ -0,0 +1,147 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="curObj.id ? '编辑楼盘数据' : '添加楼盘数据'"
+      :fullscreen="false"
+      width="700px"
+      custom-class="xl-dialog"
+      center
+    >
+      <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="100px">
+        <div slot="footer" style="padding-top: 20px;">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+          <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
+        </div>
+      </base-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+export default {
+  components: { },
+  mixins,
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      formData: [],
+      loading: true,
+      cObj: {},
+      roomAreaList: [],
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        if (this.curObj.id) {
+          this.cObj = JSON.parse(JSON.stringify(this.curObj))
+        } else {
+          this.cObj = {}
+        }
+        this.getDef()
+      }
+    },
+  },
+  methods: {
+    getDef(fieldStr) {
+      let params = { ...this.cObj }
+      this.formData = [
+        { label: '关联楼盘', rules: 1, key: 'estate_id', type: 'selectRemote', changeHandle: this.estateChange,
+          remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
+          remoteOptions: [{ keyRO: params.estate_name, valRO: params.estate_id }]
+        },
+        { label: '所属区域', rules: 1, key: 'area_type', type: 'select', options: this.$dictData.area_type},
+        { label: `面积产品户型`, label2: `快捷选择工具`, key: `HT`, type: 'select', options: this.roomAreaList, changeHandle: this.htChange,},
+        { label: '产品类型', rules: 1, key: 'product_type', type: 'select', options: this.$dictData.product_type, class: 'c-2'},
+        { label: '户型面积', rules: 1, key: 'house_square', class: 'c-2', type: 'inputFont', appendFont: '㎡'},
+      ]
+      this.setDefaultValue(params)
+    },
+    estateChange (estate_id, op, cur) {
+      if (estate_id) {
+        this.$api.house.admestatehousearealist({estate_id}).then(res => {
+          const list = res.list || []
+          const htObj = arrToObj(this.$dictData.house_type)
+          const ptObj = arrToObj(this.$dictData.product_type)
+          list.map(item => {
+            item.key = `${item.area}㎡-${ptObj[item.product_type]}-${htObj[item.house_type]}`
+            item.key2 = `${htObj[item.house_type]}`
+            item.val = item.id
+          })
+          this.roomAreaList = [...list]
+          this.cObj.estate_id = estate_id
+          this.cObj.area_type = cur.area_type
+          this.cObj.HT = ''
+          this.cObj.product_type = ''
+          this.cObj.house_square = ''
+          this.getDef('edit')
+        })
+      } else {
+        this.cObj = {}
+        this.getDef('edit')
+      }
+    },
+    htChange (val) {
+      this.roomAreaList.forEach(ra => {
+        if (val === ra.id) {
+          this.cObj.product_type = ra.product_type
+          this.cObj.house_square = ra.area
+          this.cObj.HT = val
+          this.getDef('edit')
+        }
+        return
+      })
+    },
+    close(str) {
+      if (str === 'confirm') {
+        this.$refs['ruleForm'].$refs['baseForm'].validate((valid) => {
+          if (valid) {
+            const oldform = this.$refs.ruleForm.baseForm
+            const newForm = { ...oldform }
+            if (this.curObj.id) newForm.id = this.curObj.id
+            let apiStr = 'admestatehousedynamicadd'
+            if (newForm.id) apiStr = 'admestatehousedynamicedit'
+            this.$api.house[apiStr](newForm).then(data => {
+              this.$msgs(newForm.id ? '编辑成功' : '新增成功')
+              this.$emit('close', newForm)
+            })
+          }
+        })
+      } else {
+        this.$emit('close')
+        this.setDefaultValue()
+      }
+    },
+  }
+}
+</script>
+<style lang="scss" scoped>
+@import '../../../../styles/libEdit.scss';
+.lib-edit {
+  padding-top: 0;
+  ::v-deep .el-form-item {
+    margin-bottom: 10px;
+  }
+  ::v-deep .el-date-editor.el-input {
+    width: 100%;
+  }
+}
+::v-deep .img-upload {
+  height: 180px;
+  overflow: hidden;
+  .icon {
+    width: 160px;
+  }
+  .img {
+    width: 160px;
+  }
+}
+</style>

+ 109 - 0
src/views/house/components/popup/TrendUpdate.vue

@@ -0,0 +1,109 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="curObj.id ? `更新${curObj.estate_name}数据` : 'un'"
+      :fullscreen="false"
+      width="700px"
+      custom-class="xl-dialog"
+      center
+    >
+      <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="100px">
+        <div slot="footer" style="padding-top: 20px;">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+          <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
+        </div>
+      </base-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+export default {
+  components: { },
+  mixins,
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      formData: [],
+      loading: true,
+      cObj: {},
+      roomAreaList: [],
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        if (this.curObj.id) {
+          this.cObj = JSON.parse(JSON.stringify(this.curObj))
+        } else {
+          this.cObj = {}
+        }
+        this.getDef()
+      }
+    },
+  },
+  methods: {
+    getDef(fieldStr) {
+      let params = { ...this.cObj }
+      this.formData = [
+        { label: '起价', rules: 1, key: 'price_min', type: 'inputFont', appendFont: '元', class: 'c-2'},
+        { label: '封顶价', rules: 1, key: 'price_max', type: 'inputFont', appendFont: '元', class: 'c-2'},
+        { label: '现场折扣', key: 'scene_discount'},
+        { label: '实际折扣', key: 'actual_discount'},
+        { label: '最新动态', key: 'dynamic', type: 'textarea'},
+      ]
+      this.setDefaultValue(params)
+    },
+    close(str) {
+      if (str === 'confirm') {
+        this.$refs['ruleForm'].$refs['baseForm'].validate((valid) => {
+          if (valid) {
+            const oldform = this.$refs.ruleForm.baseForm
+            const newForm = { ...oldform }
+            if (this.curObj.id) newForm.id = this.curObj.id
+            let apiStr = 'admestatehousedynamicupdate'
+            if (newForm.id) apiStr = 'admestatehousedynamicupdate'
+            this.$api.house[apiStr](newForm).then(data => {
+              this.$msgs(newForm.id ? '编辑成功' : '新增成功')
+              this.$emit('close', newForm)
+            })
+          }
+        })
+      } else {
+        this.$emit('close')
+        this.setDefaultValue()
+      }
+    },
+  }
+}
+</script>
+<style lang="scss" scoped>
+@import '../../../../styles/libEdit.scss';
+.lib-edit {
+  padding-top: 0;
+  ::v-deep .el-form-item {
+    margin-bottom: 10px;
+  }
+  ::v-deep .el-date-editor.el-input {
+    width: 100%;
+  }
+}
+::v-deep .img-upload {
+  height: 180px;
+  overflow: hidden;
+  .icon {
+    width: 160px;
+  }
+  .img {
+    width: 160px;
+  }
+}
+</style>

+ 40 - 0
src/views/house/components/searchForm/Trend.vue

@@ -0,0 +1,40 @@
+<template>
+  <base-form slot="content" ref="ruleForm" :data="searchData">
+    <div slot="footer">
+      <el-button :loading="listLoading" icon="el-icon-search" class="xl-form-btn bgc1" @click="searchHandle">查询</el-button>
+      </div>
+  </base-form>
+</template>
+<script>
+export default {
+  props: {
+    listLoading: Boolean
+  },
+  inject: ['parentData'],
+  mixins,
+  data() {
+    return {
+      searchData: []
+    }
+  },
+  mounted () {
+    this.getDef()
+  },
+  methods: {
+    getDef (str) {
+      let params = { ...this.$refs.ruleForm.baseForm }
+      this.searchData = [
+        { label: '楼盘名称', key: 'estate_name'},
+        { label: '所属区域', key: 'area_type', type: 'select', options: this.$dictData.area_type},
+        { label: '产品类型', key: 'product_type', type: 'select', options: this.$dictData.product_type},
+      ]
+      this.setDefaultValue(params, 'searchData')
+    },
+    searchHandle() {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      this.$emit('change', newForm)
+    }
+  }
+}
+</script>

+ 133 - 0
src/views/house/trend.vue

@@ -0,0 +1,133 @@
+<template>
+  <div class="app-container">
+    <search-form
+      :list-loading="listLoading"
+      @change="searchHandle"
+    />
+    <table-list
+      :list-loading="listLoading"
+      :data="tableData2"
+      :columns="listConfig"
+      :current-page="currentPage"
+      :page-size="pageSize"
+      :total-records="totalRecords"
+      @currentChange="pageHandle"
+      @sizeChange="sizeChange"
+      :isAdd="true"
+      @add="openPopup"
+    />
+    <popup-edit
+      :isShow="isDtlShow"
+      :curObj="curObj"
+      @close="closePopup"
+    />
+    <popup-update
+      :isShow="isUpdateShow"
+      :curObj="curObj"
+      @close="closeUpdatePopup"
+    />
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import SearchForm from './components/searchForm/Trend'
+import PopupEdit from './components/popup/TrendEdit'
+import PopupUpdate from './components/popup/TrendUpdate'
+import baseTable from '_m/baseTable.js'
+export default {
+  name: 'index',
+  components: {
+    SearchForm,
+    PopupEdit,
+    PopupUpdate,
+  },
+  provide() {
+    return {
+      parentData: this
+    }
+  },
+  mixins: [baseTable],
+  data() {
+    return {
+      apiStr: 'house.admestatehousedynamiclist',
+      searchForm: null,
+      isDtlShow: false,
+      curObj: {},
+      isUpdateShow: false,
+    }
+  },
+  computed: {
+    tableData2() {
+      const arr = [...this.tableData,]
+      arr.map(item => {})
+      return arr
+    }
+  },
+  created() {},
+  mounted() {
+    this.listConfig = {
+      rows: [
+        //  minWidth: 150, align: 'left'
+        { label: '更新时间', prop: 'update_at' },
+        { label: '楼盘名称', prop: 'estate_name' },
+        { label: '所属区域', prop: 'area_type', type: 'flag', flags: arrToObj(this.$dictData.area_type) },
+        { label: '产品类型', prop: 'product_type', type: 'flag', flags: arrToObj(this.$dictData.product_type) },
+        { label: '户型面积', prop: 'house_square' },
+        { label: '起价', prop: 'price_min' },
+        { label: '封顶价', prop: 'price_max' },
+        { label: '现场折扣', prop: 'scene_discount' },
+        { label: '实际折扣', prop: 'actual_discount' },
+        { label: '最新动态', prop: 'dynamic' },
+        { label: '更新人', prop: 'update_by' },
+        { label: '操作', width: 200, type: 'handle2', operations:
+          [
+            { label: '更新动态', func: this.openUpdatePopup, btnType: 'success' },
+            { label: '编辑', func: this.openPopup, btnType: 'primary' },
+            { label: '删除', func: this.delHandle, btnType: 'danger' },
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    delHandle(row) {
+      this.$msg(`您确定要删除该动态数据吗?`, 'confirm', () => {
+        this.$api.house.admestatehousedynamicdel({
+          id: row.id,
+        }).then(data => {
+          this.$msgs(`已删除!`)
+          this.fetchData()
+        })
+      }, null, true)
+    },
+    openPopup(row) {
+      if (row && row.id) {
+        this.curObj = row
+      } else {
+        this.curObj = {}
+      }
+      this.isDtlShow = true
+    },
+    closePopup(obj) {
+      this.isDtlShow = false
+      if (obj) {
+        this.fetchData() 
+      }
+    },
+    openUpdatePopup(row) {
+      if (row && row.id) {
+        this.curObj = row
+      } else {
+        this.curObj = {}
+      }
+      this.isUpdateShow = true
+    },
+    closeUpdatePopup(obj) {
+      this.isUpdateShow = false
+      if (obj) {
+        this.fetchData() 
+      }
+    }
+  }
+}
+</script>

部分文件因文件數量過多而無法顯示