liujq 2 년 전
부모
커밋
c27b917aa5

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/index.html


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/chunk-70eeabba.3e8d1821.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/chunk-910632b0.6e4735c2.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.220003e4.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.b2ab1b78.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/chunk-70eeabba.6ac99bb9.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/chunk-910632b0.25843b5a.js


+ 27 - 0
src/api/house.js

@@ -40,5 +40,32 @@ export default {
   admestategoverndel: params => { // 楼盘 案场人员 删除
     return getRequestNoSort('/adm/estate/govern/del', params, 'loading')
   },
+  admestateliblist: params => { // 内部楼盘 - 楼盘列表接口
+    return getRequest('/adm/estate/lib/list', params)
+  },
+  admestatelibadd: params => { // 内部楼盘 - 楼盘添加
+    return getRequestNoSort('/adm/estate/lib/add', params, 'loading')
+  },
+  admestatelibedit: params => { // 内部楼盘 - 楼盘编辑
+    return getRequestNoSort('/adm/estate/lib/edit', params, 'loading')
+  },
+  admestatelibdetail: params => { // 内部楼盘 - 楼盘详情
+    return getRequestNoSort('/adm/estate/lib/detail', params, 'loading')
+  },
+  admestatelibdel: params => { // 内部楼盘 - 楼盘删除
+    return getRequestNoSort('/adm/estate/lib/del', params, 'loading')
+  },
+  admbrokeragelist: params => { // 内部楼盘 平台渠道 - 列表接口
+    return getRequest('/adm/brokerage/list', params)
+  },
+  admbrokerageadd: params => { // 内部楼盘 平台渠道 - 添加
+    return getRequestNoSort('/adm/brokerage/add', params, 'loading')
+  },
+  admbrokerageedit: params => { // 内部楼盘 平台渠道 - 编辑
+    return getRequestNoSort('/adm/brokerage/edit', params, 'loading')
+  },
+  admbrokeragedel: params => { // 内部楼盘 平台渠道 - 删除
+    return getRequestNoSort('/adm/brokerage/del', params, 'loading')
+  },
 }
 

+ 138 - 0
src/views/house/all.vue

@@ -0,0 +1,138 @@
+<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"
+      :operationsDefaultLength="3"
+    >
+    </table-list>
+    <popup-edit
+      :isShow="isDtlShow"
+      :curObj="curObj"
+      @close="closePopup"
+    />
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import SearchForm from './components/searchForm/All'
+import PopupEdit from './components/popup/AllEdit'
+import baseTable from '_m/baseTable.js'
+export default {
+  name: 'all',
+  components: {
+    SearchForm,
+    PopupEdit,
+  },
+  provide() {
+    return {
+      parentData: this
+    }
+  },
+  mixins: [baseTable],
+  data() {
+    return {
+      apiStr: 'house.admestateliblist',
+      searchForm: null,
+      isDtlShow: false,
+      curObj: {},
+      isHRShow: false,
+    }
+  },
+  computed: {
+    tableData2() {
+      const arr = [...this.tableData]
+      arr.map(item => {
+        item.brokerageTag = item.brokerage_tag ? JSON.parse(item.brokerage_tag).join(',') : ''
+      })
+      return arr
+    }
+  },
+  created() {},
+  mounted() {
+    this.listConfig = {
+      rows: [
+        // { label: '排序', prop: 'sort', type: 'input', width: 80},
+        { label: '图片', prop: 'pri_image', type: 'img' },
+        { label: '楼盘名称', prop: 'estate_name' },
+        { label: '所属区域', prop: 'area_type', type: 'flag', flags: arrToObj(this.$dictData.area_type) },
+        { label: '合作平台渠道', prop: 'brokerageTag' },
+        { label: '更新时间', prop: 'update_at' },
+        { label: '操作', width: 220, type: 'handle2', operations:
+          [
+            { label: '编辑信息', func: this.openPopup, btnType: 'primary' },
+            { label: '渠道平台', func: this.linkBrokerage, btnType: 'info' },
+            { label: '删除', func: this.delHandle, btnType: 'danger' },
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    linkBrokerage (row) {
+      this.$router.push(`/house/brokerage?id=${row.id}&name=${row.estate_name}`)
+    },
+    // saveHandle (row) {
+    //   this.$api.house.admestatesortedit({
+    //     id: row.id,
+    //     sort: row.sort,
+    //   }).then(data => {
+    //     this.$msgs(`已保存!`)
+    //     this.fetchData()
+    //   })
+    // },
+    delHandle(row) {
+      this.$msg(`您确定要删除该楼盘吗?`, 'confirm', () => {
+        this.$api.house.admestatelibdel({
+          id: row.id,
+          status: 2
+        }).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()
+      }
+    },
+    openHRPopup(row) {
+      if (row && row.id) {
+        this.curObj = row
+      } else {
+        this.curObj = {}
+      }
+      this.isHRShow = true
+    },
+    closeHRPopup(obj) {
+      this.isHRShow = false
+      if (obj) {
+        this.fetchData()
+      }
+    },
+    
+  }
+}
+</script>

+ 107 - 0
src/views/house/brokerage.vue

@@ -0,0 +1,107 @@
+<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"
+    />
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import SearchForm from './components/searchForm/Brokerage'
+import PopupEdit from './components/popup/BrokerageEdit'
+import baseTable from '_m/baseTable.js'
+export default {
+  name: 'govern',
+  components: {
+    SearchForm,
+    PopupEdit,
+  },
+  provide() {
+    return {
+      parentData: this
+    }
+  },
+  mixins: [baseTable],
+  data() {
+    return {
+      apiStr: 'house.admbrokeragelist',
+      searchForm: {},
+      isDtlShow: false,
+      // noCreated: true,
+      curObj: {},
+    }
+  },
+  computed: {
+    tableData2() {
+      const arr = [...this.tableData]
+      arr.map(item => {
+      })
+      return arr
+    }
+  },
+  created() {
+    const query = this.$route.query
+    this.searchForm.estate_lib_id = query.id || ''
+  },
+  mounted() {
+    this.listConfig = {
+      rows: [
+        { label: '渠道平台', prop: 'company'},
+        { label: '佣金描述', prop: 'brokerage'},
+        { label: '更新人', prop: 'update_by' },
+        { label: '更新时间', prop: 'update_at' },
+        { label: '操作', width: 120, type: 'handle2', operations:
+          [
+            { label: '编辑', func: this.openPopup, btnType: 'primary' },
+            { label: '删除', func: this.delHandle, btnType: 'danger' },
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    delHandle(row) {
+      this.$msg(`您确定要删除该案场人员吗?`, 'confirm', () => {
+        this.$api.house.admestategoverndel({
+          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()
+      }
+    }
+  }
+}
+</script>

+ 187 - 0
src/views/house/components/popup/AllEdit.vue

@@ -0,0 +1,187 @@
+<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" :insertSlotArr="[6]">
+        <div slot="OI6" class="scoped-other-form">
+          <el-form-item label="点位坐标" class="scoped-item-two item">
+            纬度N<el-input v-model="cObj.latitude" disabled />
+            经度E<el-input v-model="cObj.longitude" disabled />
+            <el-button type="primary" class="map-btn" size="small" @click="openMap">点击从地图获取</el-button>
+          </el-form-item>
+        </div>
+        <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>
+    <handle-map :is-show="isShowMap" @close="closeMap" />
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import handleMap from '@/components/Common/Map'
+export default {
+  components: {
+    handleMap,
+  },
+  mixins,
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    const token = window.sessionStorage.getItem('fp_token')
+    let domainUrl = process.env.VUE_APP_BASE_API
+    return {
+      domainUrl,
+      token,
+      loading: false,
+      formData: [],
+      cObj: {},
+      isShowMap: false,
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        if (this.curObj.id) {
+          this.$api.house.admestatelibdetail({id: this.curObj.id}).then(res => {
+            this.cObj = res || {}
+            this.getDef()
+          })
+        } else {
+          this.cObj = this.curObj
+          this.getDef()
+        }
+      }
+    },
+  },
+  methods: {
+    getDef (str, strKey, strParams) {
+      let params = {...this.cObj}
+      if (!params.estate_tag) params.estate_tag = '热销推荐'
+      if (!params.hide_state) params.hide_state = '1'
+      if (!params.sort) params.sort = '1'
+      this.formData = [
+        { label: '楼盘名称', key: 'estate_name', class: 'c-2', rules: 1 },
+        { label: '排序', key: 'sort', class: 'c-2', rules: 1 },
+        { label: '楼盘标签', key: 'estate_tag', class: 'c-2', rules: 1 },
+        { label: 'plusId', key: 'honglou_plus', class: 'c-2' },
+        { label: '所属区域', key: 'area_type', type: 'select', class: 'c-2', options: this.$dictData.area_type, rules: 1 },
+        { label: '楼盘图', key: 'pri_image', class: 'c-2', type: 'cuImg',
+          options: {
+            w: 375,
+            h: 250,
+          }
+         },
+        // { label: '是否显示', key: 'hide_state', type: 'select', class: 'c-2', options: this.$dictData.hide_state, rules: 1 },
+        { label: '楼盘地址', key: 'address', 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 }
+            newForm.longitude = this.cObj.longitude
+            newForm.latitude = this.cObj.latitude
+            if (!newForm.longitude) return this.$msgw('请选择经度!')
+            else if (!newForm.latitude) return this.$msgw('请选择纬度!')
+            let apiStr = 'admestatelibadd'
+            if (this.curObj.id) {
+              newForm.id = this.curObj.id
+              apiStr = 'admestatelibedit'
+            }
+            this.$api.house[apiStr](newForm).then(data => {
+              this.$msgs(newForm.id ? '编辑成功' : '新增成功')
+              this.productData = []
+              this.$emit('close', newForm)
+            })
+          }
+        })
+      } else {
+        this.$emit('close')
+        this.productData = []
+        this.setDefaultValue()
+      }
+    },
+    openMap() { // 定位
+      this.isShowMap = true
+      const pointObj = {
+        latitude: this.cObj.latitude || '',
+        longitude: this.cObj.longitude || '',
+        address: this.cObj.address || ''
+      }
+      this.$root.$emit('handleMap', pointObj)
+    },
+    closeMap(obj) {
+      if (obj) {
+        const oldform = this.$refs.ruleForm.baseForm
+        const newForm = { ...oldform, ...obj }
+        this.cObj = newForm
+        this.setDefaultValue(newForm)
+      }
+      this.isShowMap = false
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+@import '../../../../styles/libEdit.scss';
+.lib-edit {
+  width: 600px;
+  padding-top: 0;
+  padding-left: 0;
+  padding-bottom: 40px;
+  ::v-deep .el-form-item {
+    margin-bottom: 10px;
+  }
+  ::v-deep .el-date-editor.el-input {
+    width: 100%;
+  }
+}
+.scoped-other-form {
+  .scoped-item-two {
+    .el-input {
+      display: inline-block;
+      width: 120px;
+      margin: 0 10px;
+    }
+  }
+}
+.map-btn{
+  height: 36px;
+}
+::v-deep .el-drawer__header {
+  margin-bottom: 10px;
+}
+
+::v-deep .img-upload {
+  width: 120px;
+  height: 80px;
+  .icon {
+    width: 120px;
+    height: 80px;
+    line-height: 80px;
+  }
+  .img {
+    width: 120px;
+    height: 80px;
+  }
+}
+
+</style>

+ 85 - 0
src/views/house/components/popup/BrokerageEdit.vue

@@ -0,0 +1,85 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="curObj.id ? '编辑渠道佣金' : '新增渠道佣金'"
+      :fullscreen="false"
+      width="400px"
+      custom-class="xl-dialog"
+      center
+    >
+      <base-form ref="ruleForm" :data="formData" :is-inline="false" label-width="80px">
+      </base-form>
+      <div class="xl-form">
+        <div class="xl-form-footer">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+          <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
+        </div>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+export default {
+  components: { },
+  mixins,
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      loading: false,
+      formData: [],
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        this.getDef()
+      }
+    },
+  },
+  methods: {
+    getDef (str) {
+      let params = { ...this.curObj }
+      this.formData = [
+        { label: '渠道平台', key: 'company', type: 'select', options: this.$dictData.brokerage_company, rules: 1 },
+        { label: '佣金描述', key: 'brokerage', type: 'textarea', rules: 1 },
+        { label: '带看材料', key: 'report_visit', 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 }
+            newForm.estate_lib_id = this.parentData.searchForm.estate_lib_id
+            let apiStr = 'admbrokerageadd'
+            if (this.curObj.id) {
+              newForm.id = this.curObj.id
+              apiStr = 'admbrokerageedit'
+            }
+            this.$api.house[apiStr](newForm).then(data => {
+              this.$msgs('操作成功')
+              this.$emit('close', newForm)
+            })
+          }
+        })
+      } else {
+        this.$emit('close')
+        this.setDefaultValue()
+      }
+    },
+  }
+}
+</script>
+<style lang="scss" scoped>
+</style>

+ 38 - 0
src/views/house/components/searchForm/All.vue

@@ -0,0 +1,38 @@
+<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>
+      <!-- <el-button :loading="listLoading" icon="el-icon-document" class="xl-form-btn bgc2" @click="toExportExcel">导出{{ this.$route.meta.title }}信息</el-button> -->
+    </div>
+  </base-form>
+</template>
+<script>
+export default {
+  props: {
+    listLoading: Boolean
+  },
+  inject: ['parentData'],
+  mixins,
+  data() {
+    return {
+      searchData: []
+    }
+  },
+  mounted () {
+    this.getDef()
+  },
+  methods: {
+    getDef (str) {
+      this.searchData = [
+        { label: '所属区域', key: 'area_type', type: 'select', options: this.$dictData.area_type},
+        { label: '楼盘名称', key: 'estate_name' },
+      ]
+    },
+    searchHandle() {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      this.$emit('change', newForm)
+    }
+  }
+}
+</script>

+ 63 - 0
src/views/house/components/searchForm/Brokerage.vue

@@ -0,0 +1,63 @@
+<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">查询:{{name}}</el-button>
+      <el-button :loading="listLoading" icon="el-icon-plus" class="xl-form-btn bgc2" @click="addHandle">添加</el-button>
+    </div>
+  </base-form>
+</template>
+<script>
+export default {
+  props: {
+    listLoading: Boolean
+  },
+  inject: ['parentData'],
+  mixins,
+  data() {
+    return {
+      searchData: [],
+      isHidePut: false,
+    }
+  },
+  computed: {
+    name () {
+      return this.parentData.$route.query.name || ''
+    }
+  },
+  mounted () {
+    this.getDef()
+  },
+  methods: {
+    addHandle () {
+      this.parentData.isDtlShow = true
+      this.parentData.curObj = {}
+    },
+    getDef (str) {
+      let params = { ...this.$refs.ruleForm.baseForm }
+      const query = this.$route.query
+      let estateName = query.name || ''
+      params.estate_lib_id = query.id ? Number(query.id) : ''
+      this.searchData = [
+        { label: '选择楼盘', key: 'estate_lib_id', type: 'selectRemote', changeHandle: this.estateChange,
+          remoteParams: { skey: 'estate_name', api: `house.admestateliblist`, opKey: 'estate_name', opVal: 'id' },
+          remoteOptions: [{ keyRO: estateName, valRO: params.estate_lib_id }]
+        },
+        // { label: '选择用户', key: 'user_id', type: 'selectRemote',
+        //   remoteParams: { skey: 'nickname', api: `user.admuserlist?auth_state=1`, opKey: 'nickname', opVal: 'id' },
+        // },
+      ]
+      this.setDefaultValue(params, 'searchData')
+    },
+    estateChange (val, options, curItem) {
+      this.$router.push(`/house/brokerage?id=${val}&name=${curItem.estate_name}`)
+      // this.$router.go(0)
+      this.searchHandle()
+    },
+    searchHandle() {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      this.$emit('change', newForm)
+    }
+  }
+}
+</script>

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

@@ -119,7 +119,6 @@ export default {
       }, null, true)
     },
     openPopup(row) {
-      console.log(row)
       if (row && row.id) {
         this.curObj = row
       } else {

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.