liujq 2 years ago
parent
commit
8490e0b8a9
2 changed files with 109 additions and 1 deletions
  1. 2 1
      src/views/feedback/components/searchForm/Index.vue
  2. 107 0
      src/views/feedback/sys.vue

+ 2 - 1
src/views/feedback/components/searchForm/Index.vue

@@ -15,7 +15,8 @@ export default {
   data() {
     return {
       searchData: [
-        { label: '反馈类型', key: 'feedback_type', type: 'select', options: this.$dictData.feedback_type },
+        // { label: '反馈类型', key: 'feedback_type', type: 'select', options: this.$dictData.feedback_type },
+        { label: '反馈内容搜索', key: 'remark', },
       ]
     }
   },

+ 107 - 0
src/views/feedback/sys.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"
+    >
+    </table-list>
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import SearchForm from './components/searchForm/Index'
+import baseTable from '_m/baseTable.js'
+export default {
+  name: 'sys',
+  components: {
+    SearchForm,
+  },
+  provide() {
+    return {
+      parentData: this
+    }
+  },
+  mixins: [baseTable],
+  data() {
+    return {
+      apiStr: 'user.admfeedbacklist',
+      searchForm: null,
+      isDtlShow: false,
+      curObj: {}
+    }
+  },
+  computed: {
+    tableData2() {
+      const arr = [...this.tableData]
+      arr.map(item => {
+        const curImg = (item.images || '').split(',')
+        console.log(curImg)
+        item.img1 = curImg[0] || ''
+        item.img2 = curImg[1] || ''
+        item.img3 = curImg[2] || ''
+        if (item.is_dispose === '1') item.deal1 = true
+      })
+      return arr
+    }
+  },
+  created() {},
+  mounted() {
+    this.listConfig = {
+      rows: [
+        { label: '楼盘名称', prop: 'estate_name' },
+        { label: '反馈图1', prop: 'img1', type: 'img' },
+        { label: '反馈图2', prop: 'img2', type: 'img' },
+        { label: '反馈图3', prop: 'img3', type: 'img' },
+        { label: '反馈内容', prop: 'feedback_count', fullShow: true, minWidth: '300' },
+        { label: '类型', prop: 'feedback_type', fullShow: true, type: 'flag', flags: arrToObj(this.$dictData.feedback_type) }, 
+        { label: '已处理', prop: 'is_dispose', type: 'tag', tags: arrToObj(this.$dictData.sys_yesno) }, 
+        { label: '联系方式', prop: 'contact' },
+        { label: '微信昵称', prop: 'nickname' },
+        { label: '微信头像', prop: 'avatar', type: 'img' },
+        { label: '操作', width: 150, type: 'handle2', operations:
+          [
+            { label: '标记已处理', func: this.dealHandle, btnType: 'primary', hide: 'deal1' },
+            { label: '删除', func: this.delHandle, btnType: 'danger' },
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    dealHandle (row) {
+      this.$msg(`您确定要标记成已处理吗`, 'confirm', () => {
+        this.$api.user.admfeedbackdispose({
+          id: row.id,
+          is_dispose: 1,
+        }).then(data => {
+          this.$msgs(`已处理!`)
+          this.fetchData()
+        })
+      }, null, true)
+    },
+    delHandle(row) {
+      this.$msg(`您确定要删除该文章吗?`, 'confirm', () => {
+        this.$api.user.admfeedbackdel({
+          id: row.id,
+        }).then(data => {
+          this.$msgs(`已删除!`)
+          this.fetchData()
+        })
+      }, null, true)
+    },
+  }
+}
+</script>
+<style lang="scss" scoped>
+</style>
+