Rent.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <base-form slot="content" ref="ruleForm" :data="searchData">
  3. <div slot="footer">
  4. <el-button :loading="listLoading" icon="el-icon-search" class="xl-form-btn bgc1" @click="searchHandle">查询</el-button>
  5. <!-- <el-button :loading="listLoading" icon="el-icon-document" class="xl-form-btn bgc2" @click="toExportExcel">导出{{ this.$route.meta.title }}信息</el-button> -->
  6. </div>
  7. </base-form>
  8. </template>
  9. <script>
  10. export default {
  11. props: {
  12. listLoading: Boolean
  13. },
  14. inject: ['parentData'],
  15. mixins,
  16. data() {
  17. return {
  18. searchData: []
  19. }
  20. },
  21. mounted () {
  22. this.getDef()
  23. },
  24. methods: {
  25. subwayLineChange (val) {
  26. this.getDef('change')
  27. },
  28. getDef (str) {
  29. let params = { ...this.$refs.ruleForm.baseForm }
  30. this.searchData = [
  31. { label: '标题', key: 'title' },
  32. { label: '所属楼盘', key: 'estate_id', type: 'selectRemote',
  33. remoteParams: { skey: 'estate_name', api: `house.admestatelist?estate_tag=二手`, opKey: 'estate_name', opVal: 'id' }
  34. },
  35. // { label: '置业经理', key: 'sale_id', type: 'selectRemote',
  36. // remoteParams: { skey: 'sale_name', api: `user.admsaleuserlist?page_size=999`, opKey: 'sale_name', opVal: 'id' }
  37. // },
  38. { label: '所属区域', key: 'area_type', type: 'select', options: this.$dictData.area_type},
  39. { label: '状态', key: 'hide_status', type: 'select', options: this.$dictData.hide_status},
  40. // { label: '房源户型', key: 'house_type', type: 'select', options: this.$dictData.house_type},
  41. ]
  42. this.setDefaultValue(params, 'searchData')
  43. },
  44. searchHandle() {
  45. const oldform = this.$refs.ruleForm.baseForm
  46. const newForm = { ...oldform }
  47. this.$emit('change', newForm)
  48. }
  49. }
  50. }
  51. </script>