liujq 4 лет назад
Родитель
Сommit
b731d37f28

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/index.html


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/js/app.02424aeb.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/js/app.9c066b38.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/js/chunk-0cf2b486.7f002a61.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/js/chunk-0f29154e.6fbc0413.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/js/chunk-231fea20.b344dde7.js


+ 6 - 0
src/api/user.js

@@ -31,4 +31,10 @@ export default {
   admanswerdel: params => { // 问答-回答删除
     return getRequestNoSort('/adm/answer/del', params, 'loading')
   },
+  admcommentlist: params => { // 楼盘评论 - 评论列表
+    return getRequest('/adm/comment/list', params)
+  },
+  admcommentdel: params => { // 楼盘评论 - 评论删除
+    return getRequestNoSort('/adm/comment/del', params, 'loading')
+  },
 }

+ 23 - 17
src/router/index.js

@@ -55,6 +55,17 @@ export const moreRoutes = [
       }
     ]
   },
+  {
+    path: '/news',
+    component: Layout,
+    redirect: '/news/index',
+    children: [{
+      path: 'index',
+      name: 'NewsIndex',
+      component: () => import('@/views/news/index'),
+      meta: { title: '洪楼News', icon: 'dashboard' }
+    }]
+  },
   {
     path: '/house',
     component: Layout,
@@ -68,12 +79,6 @@ export const moreRoutes = [
         component: () => import('@/views/house/index'),
         meta: { title: '楼盘列表' }
       },
-      {
-        path: 'old',
-        name: 'HouseOld',
-        component: () => import('@/views/house/old'),
-        meta: { title: '二手房管理' }
-      },
       {
         path: 'news',
         name: 'HouseNews',
@@ -87,6 +92,18 @@ export const moreRoutes = [
         component: () => import('@/views/house/theme'),
         meta: { title: '模板主题' }
       },
+      {
+        path: 'comment',
+        name: 'HouseComment',
+        component: () => import('@/views/house/comment'),
+        meta: { title: '楼盘评论' }
+      },
+      {
+        path: 'old',
+        name: 'HouseOld',
+        component: () => import('@/views/house/old'),
+        meta: { title: '二手房管理' }
+      },
     ]
   },
   {
@@ -100,17 +117,6 @@ export const moreRoutes = [
       meta: { title: '学校管理', icon: 'dashboard' }
     }]
   },
-  {
-    path: '/news',
-    component: Layout,
-    redirect: '/news/index',
-    children: [{
-      path: 'index',
-      name: 'NewsIndex',
-      component: () => import('@/views/news/index'),
-      meta: { title: '洪楼News', icon: 'dashboard' }
-    }]
-  },
   // {
   //   path: '/user',
   //   component: Layout,

+ 78 - 0
src/views/house/comment.vue

@@ -0,0 +1,78 @@
+<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"
+    />
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import SearchForm from './components/searchForm/Comment'
+import baseTable from '_m/baseTable.js'
+export default {
+  name: 'index',
+  components: {
+    SearchForm,
+  },
+  provide() {
+    return {
+      parentData: this
+    }
+  },
+  mixins: [baseTable],
+  data() {
+    return {
+      apiStr: 'user.admcommentlist',
+      searchForm: null,
+      isDtlShow: false,
+      curObj: {},
+    }
+  },
+  computed: {
+    tableData2() {
+      const arr = [...this.tableData]
+      arr.map(item => {})
+      return arr
+    }
+  },
+  created() {},
+  mounted() {
+    this.listConfig = {
+      rows: [
+        { label: '楼盘名称', prop: 'estate_name' },
+        { label: '评论内容', prop: 'comm_cont', fullShow: true, minWidth: 200, align: 'left' },
+        { label: '昵称', prop: 'nickname' },
+        { label: '头像', prop: 'avatar', type: 'img' },
+        { label: '评论时间', prop: 'create_at' },
+        { label: '操作', width: 200, type: 'handle2', operations:
+          [
+            { label: '删除', func: this.delHandle, btnType: 'danger' },
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    delHandle(row) {
+      this.$msg(`您确定要删除该评论吗?`, 'confirm', () => {
+        this.$api.user.admcommentdel({
+          id: row.id
+        }).then(data => {
+          this.$msgs(`已删除!`)
+          this.fetchData()
+        })
+      }, null, true)
+    },
+  }
+}
+</script>

+ 39 - 0
src/views/house/components/searchForm/Comment.vue

@@ -0,0 +1,39 @@
+<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: 'estate_id', type: 'selectRemote',
+          remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' }
+        },
+      ]
+    },
+    searchHandle() {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      this.$emit('change', newForm)
+    }
+  }
+}
+</script>

Некоторые файлы не были показаны из-за большого количества измененных файлов