cust.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <div class="app-container">
  3. <search-form
  4. :list-loading="listLoading"
  5. @change="searchHandle"
  6. />
  7. <table-list
  8. :list-loading="listLoading"
  9. :data="tableData2"
  10. :columns="listConfig"
  11. :current-page="currentPage"
  12. :page-size="pageSize"
  13. :total-records="totalRecords"
  14. @currentChange="pageHandle"
  15. @sizeChange="sizeChange"
  16. >
  17. <!-- :insertSlotArr="[4]" -->
  18. <!-- <div slot="OI5">
  19. <el-table-column
  20. width="70"
  21. label="查看房子图片"
  22. align="center"
  23. >
  24. <template slot-scope="scope">
  25. </template>
  26. </el-table-column>
  27. </div> -->
  28. </table-list>
  29. </div>
  30. </template>
  31. <script>
  32. import { arrToObj } from '@/utils'
  33. import SearchForm from './components/searchForm/Cust'
  34. import baseTable from '_m/baseTable.js'
  35. export default {
  36. name: 'index',
  37. components: {
  38. SearchForm,
  39. },
  40. provide() {
  41. return {
  42. parentData: this
  43. }
  44. },
  45. mixins: [baseTable],
  46. data() {
  47. return {
  48. apiStr: 'user.admuserhouselist',
  49. searchForm: null,
  50. isDtlShow: false,
  51. curObj: {}
  52. }
  53. },
  54. computed: {
  55. tableData2() {
  56. const arr = [...this.tableData]
  57. arr.map(item => {
  58. const curImg = (item.images || '').split(',')
  59. item.img1 = curImg[0] || ''
  60. item.img2 = curImg[1] || ''
  61. item.img3 = curImg[2] || ''
  62. item.img4 = curImg[3] || ''
  63. item.img5 = curImg[4] || ''
  64. item.img6 = curImg[5] || ''
  65. item.img7 = curImg[6] || ''
  66. item.img8 = curImg[7] || ''
  67. item.img9 = curImg[8] || ''
  68. if (item.verify_state === '1') item.deal1 = true
  69. })
  70. return arr
  71. }
  72. },
  73. created() {},
  74. mounted() {
  75. this.listConfig = {
  76. rows: [
  77. { label: '已审核', prop: 'verify_state', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno) },
  78. { label: '房产证', prop: 'house_cert', type: 'img' },
  79. { label: '联系方式', prop: 'phone' },
  80. { label: '预期价格', prop: 'price' },
  81. { label: '房东备注', prop: 'remark', fullShow: true, minWidth: '200', align: 'left' },
  82. { label: '图1', prop: 'img1', type: 'img' },
  83. { label: '图2', prop: 'img2', type: 'img' },
  84. { label: '图3', prop: 'img3', type: 'img' },
  85. { label: '图4', prop: 'img4', type: 'img' },
  86. { label: '图5', prop: 'img5', type: 'img' },
  87. { label: '图6', prop: 'img6', type: 'img' },
  88. { label: '图7', prop: 'img7', type: 'img' },
  89. { label: '图8', prop: 'img8', type: 'img' },
  90. { label: '图9', prop: 'img9', type: 'img' },
  91. { label: '更新人', prop: 'update_by' },
  92. { label: '更新时间', prop: 'update_at' },
  93. { label: '创建时间', prop: 'create_at' },
  94. { label: '操作', width: 120, type: 'handle2', operations:
  95. [
  96. { label: '标记已审核', func: this.dealHandle, btnType: 'primary', hide: 'deal1' },
  97. // { label: '删除', func: this.delHandle, btnType: 'danger' },
  98. ]
  99. }
  100. ]
  101. }
  102. },
  103. methods: {
  104. dealHandle (row) {
  105. this.$msg(`您确定要标记成已审核吗`, 'confirm', () => {
  106. this.$api.user.admuserhouseverify({
  107. id: row.id,
  108. is_dispose: 1,
  109. }).then(data => {
  110. this.$msgs(`已处理!`)
  111. this.fetchData()
  112. })
  113. }, null, true)
  114. },
  115. delHandle(row) {
  116. this.$msg(`您确定要删除该文章吗?`, 'confirm', () => {
  117. this.$api.user.admfeedbackdel({
  118. id: row.id,
  119. }).then(data => {
  120. this.$msgs(`已删除!`)
  121. this.fetchData()
  122. })
  123. }, null, true)
  124. },
  125. }
  126. }
  127. </script>
  128. <style lang="scss" scoped>
  129. </style>