liujq 3 years ago
parent
commit
0f53fab12c

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-2176ce29.2985d353.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.352ae068.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.7481b943.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-14b97148.eb5cb308.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-1cb43ded.d1a7c86f.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-2176ce29.11344161.js


+ 6 - 0
src/api/house.js

@@ -253,4 +253,10 @@ export default {
   admestatecooperatedel: params => { // 合作楼盘 - 删除
     return getRequestNoSort('/adm/estate/cooperate/del', params, 'loading')
   },
+  admestatevredit: params => { // 楼盘航拍 - 编辑
+    return getRequestNoSort('/adm/estate/vr/edit', params, 'loading')
+  },
+  admestatevrdetail: params => { // 楼盘航拍 - 详情
+    return getRequestNoSort('/adm/estate/vr/detail', params, 'loading')
+  },
 }

+ 106 - 0
src/views/house/components/popup/VrEdit.vue

@@ -0,0 +1,106 @@
+<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="110px">
+        <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>
+export default {
+  components: { },
+  mixins,
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      formData: [],
+      loading: true,
+      cObj: {},
+      isShowMap: false
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        if (this.curObj.id) {
+          this.$api.house.admestatevrdetail({id: this.curObj.id}).then(res => {
+            let curData = res || {}
+            this.cObj = curData || {}
+            this.getDef()
+          })
+        } else {
+          this.cObj = this.curObj
+          this.getDef()
+        }
+      }
+    },
+  },
+  methods: {
+    getDef() {
+      const params = { ...this.cObj }
+      this.formData = [
+        { label: '航拍key', key: 'vr_key', rules: 1 },
+        { label: '航拍背景图', key: 'vr_image', type: 'cuImg',
+          options: {
+            w: 375,
+            h: 250,
+          }
+        , rules: 1 },
+      ]
+      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 = 'admestatevredit'
+            if (newForm.id) apiStr = 'admestatevredit'
+            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%;
+  }
+}
+</style>

+ 23 - 0
src/views/house/index.vue

@@ -26,6 +26,11 @@
       :curObj="curObj"
       @close="closePhotoPopup"
     />
+    <vr-edit
+      :isShow="isVrShow"
+      :curObj="curObj"
+      @close="closeVrPopup"
+    />
     <theme-house-edit
       :isShow="isTHEShow"
       :curObj="curObj"
@@ -43,6 +48,7 @@ import { arrToObj } from '@/utils'
 import SearchForm from './components/searchForm/Index'
 import PopupEdit from './components/popup/IndexEdit'
 import PhotoEdit from './components/popup/PhotoEdit'
+import VrEdit from './components/popup/VrEdit'
 import ThemeHouseEdit from './components/popup/ThemeHouseEdit'
 import HelpRule from './components/popup/HelpRule'
 import baseTable from '_m/baseTable.js'
@@ -52,6 +58,7 @@ export default {
     SearchForm,
     PopupEdit,
     PhotoEdit,
+    VrEdit,
     ThemeHouseEdit,
     HelpRule,
   },
@@ -67,6 +74,7 @@ export default {
       searchForm: null,
       isDtlShow: false,
       isPhotoShow: false,
+      isVrShow: false,
       // noCreated: true,
       curObj: {},
       isTHEShow: false,
@@ -122,6 +130,7 @@ export default {
             { label: '保存排序', func: this.saveHandle, btnType: 'success' },
             { label: '编辑信息', func: this.openPopup, btnType: 'primary' },
             { label: '编辑相册', func: this.openPhotoPopup, btnType: 'info' },
+            { label: '楼盘航拍', func: this.openVrPopup, btnType: 'primary' },
             { label: '置业顾问', func: this.openSale, btnType: 'info' },
             { label: '楼盘动态', func: this.openNews, btnType: 'info' },
             { label: '历史成交价', func: this.openPrice, btnType: 'info' },
@@ -167,6 +176,20 @@ export default {
     openSale (item) {
       this.$router.push('/house/sale?id=' + item.id + '&name=' + item.estate_name)
     },
+    openVrPopup(row) {
+      if (row && row.id) {
+        this.curObj = row
+      } else {
+        this.curObj = {}
+      }
+      this.isVrShow = true
+    },
+    closeVrPopup(obj) {
+      this.isVrShow = false
+      if (obj) {
+        this.fetchData()
+      }
+    },
     openPhotoPopup(row) {
       if (row && row.id) {
         this.curObj = row

Some files were not shown because too many files changed in this diff