liujq 3 years ago
parent
commit
580d170a43

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-3f16517a.e8505caa.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.4c072cd5.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.9508b347.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-3f16517a.193f24fe.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-43338aec.2ca94789.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-ae351598.ddf4005a.js


+ 9 - 0
src/api/user.js

@@ -49,6 +49,15 @@ export default {
   admanswerdel: params => { // 问答-回答删除
     return getRequestNoSort('/adm/answer/del', params, 'loading')
   },
+  admquestionshow: params => { // 问答-显示问题
+    return getRequestNoSort('/adm/question/show', params, 'loading')
+  },
+  admanswershow: params => { // 问答-显示回答
+    return getRequestNoSort('/adm/answer/show', params, 'loading')
+  },
+  admanswernew: params => { // 问答-最新回答列表
+    return getRequestNoSort('/adm/answer/new', params)
+  },
   admcommentlist: params => { // 楼盘评论 - 评论列表
     return getRequest('/adm/estate/comment/list', params)
   },

+ 1 - 0
src/views/ad/brandDtl.vue

@@ -60,6 +60,7 @@ export default {
       rows: [
         { label: '排序', prop: 'sort' },
         { label: '楼盘ID', prop: 'estate_id' },
+        { label: '楼盘', prop: 'estate_name' },
         { label: '宣传图', prop: 'pri_image', type: 'img' },
         { label: '更新人', prop: 'update_by' },
         { label: '更新时间', prop: 'update_at' },

+ 1 - 0
src/views/ad/components/popup/BrandDtlEdit.vue

@@ -38,6 +38,7 @@ export default {
         this.formData = [
           { label: '楼盘', key: 'estate_id', rules: 1, type: 'selectRemote',
             remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
+            remoteOptions: [{ keyRO: params.estate_name, valRO: params.estate_id }],
           },
           { label: '宣传图', key: 'pri_image', type: 'uploads', rules: 1 },
           { label: '排序', key: 'sort' },

+ 2 - 1
src/views/ad/components/popup/BrandEdit.vue

@@ -16,6 +16,7 @@
           <el-button :class="curBannerIndex - 1 === 0 ? 'xl-form-btn t3' : 'xl-form-btn t2'" @click="bannerHandle(1)">banner1</el-button>
           <el-button :class="curBannerIndex - 1 === 1 ? 'xl-form-btn t3' : 'xl-form-btn t2'" @click="bannerHandle(2)">banner2</el-button>
           <el-button :class="curBannerIndex - 1 === 2 ? 'xl-form-btn t3' : 'xl-form-btn t2'" @click="bannerHandle(3)">banner3</el-button>
+          <el-button :class="curBannerIndex - 1 === 3 ? 'xl-form-btn t3' : 'xl-form-btn t2'" @click="bannerHandle(4)">banner3</el-button>
           <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
           <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
         </div>
@@ -37,7 +38,7 @@ export default {
       formData: [],
       loading: true,
       cObj: {},
-      bannerArr: [{},{},{}],
+      bannerArr: [{},{},{},{}],
       curBannerIndex: 1
     }
   },

+ 4 - 0
src/views/qa/components/searchForm/Index.vue

@@ -2,6 +2,7 @@
   <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-search" class="xl-form-btn bgc2" @click="linkMore">最新回答列表</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>
@@ -22,6 +23,9 @@ export default {
     }
   },
   methods: {
+    linkMore () {
+      this.$router.push('/qa/index2')
+    },
     searchHandle() {
       const oldform = this.$refs.ruleForm.baseForm
       const newForm = { ...oldform }

+ 36 - 0
src/views/qa/components/searchForm/Index2.vue

@@ -0,0 +1,36 @@
+<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-search" class="xl-form-btn bgc2" @click="linkMore">返回问题列表</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 {
+  mixins: [],
+  props: {
+    listLoading: Boolean
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      searchData: [
+        // { label: '问题', key: 'question_cont' },
+        // { label: '标签', key: 'question_tag', type: 'select', options: this.$dictData.question_tag},
+      ]
+    }
+  },
+  methods: {
+    linkMore () {
+      this.$router.push('/qa/index')
+    },
+    searchHandle() {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      this.$emit('change', newForm)
+    }
+  }
+}
+</script>

+ 13 - 2
src/views/qa/index.vue

@@ -73,6 +73,7 @@ export default {
           return arrToObj(this.$dictData.question_tag)[v]
         })
         item.qtName = qtName.join(',')
+        if (Number(item.hide_status) !== 2) item.isHide = true
       })
       return arr
     }
@@ -82,13 +83,15 @@ export default {
     this.listConfig = {
       rows: [
         { label: '问题内容', prop: 'question_cont', fullShow: true, minWidth: 200, align: 'left' },
-        { label: '标签', prop: 'qtName' },
+        // { label: '标签', prop: 'qtName' },
+        { label: '状态', prop: 'hide_status', type: 'tag', tags: arrToObj(this.$dictData.hide_status), tagTypeObj: {'1': 'success', '2': 'danger'} },
         { label: '浏览量', prop: 'views' },
         { label: '昵称', prop: 'nickname' },
         { label: '头像', prop: 'avatar', type: 'img' },
         { label: '提问时间', prop: 'create_at' },
-        { label: '操作', width: 240, type: 'handle2', operations:
+        { label: '操作', width: 300, type: 'handle2', operations:
           [
+            { label: '显示', func: this.showHandle, btnType: 'success', hide: 'isHide' },
             { label: '我来回答', func: this.openAPopup, btnType: 'primary' },
             { label: '查看回答', func: this.openPopup, btnType: 'success' },
             { label: '删除', func: this.delHandle, btnType: 'danger' },
@@ -98,6 +101,14 @@ export default {
     }
   },
   methods: {
+    showHandle (row) {
+      this.$api.user.admquestionshow({
+        question_id: row.id
+      }).then(data => {
+        this.$msgs(`已显示!`)
+        this.fetchData()
+      })
+    },
     openQPopup () {
       this.isQShow = true
     },

+ 93 - 0
src/views/qa/index2.vue

@@ -0,0 +1,93 @@
+<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"
+      :operationsDefaultLength="6"
+    />
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import baseTable from '_m/baseTable.js'
+import SearchForm from './components/searchForm/Index2'
+export default {
+  name: 'index',
+  components: {
+    SearchForm,
+  },
+  provide() {
+    return {
+      parentData: this
+    }
+  },
+  mixins: [baseTable],
+  data() {
+    return {
+      apiStr: 'user.admanswernew',
+      searchForm: null,
+      isDtlShow: false,
+      curObj: {},
+      isQShow: false,
+      isAShow: false,
+    }
+  },
+  computed: {
+    tableData2() {
+      const arr = [...this.tableData]
+      arr.map(item => {
+        if (Number(item.hide_status) !== 2) item.isHide = true
+      })
+      return arr
+    }
+  },
+  created() {},
+  mounted() {
+    this.listConfig = {
+      rows: [
+        { label: '状态', prop: 'hide_status', type: 'tag', tags: arrToObj(this.$dictData.hide_status), tagTypeObj: {'1': 'success', '2': 'danger'} },
+        { label: '回答内容', prop: 'answer_cont', minWidth: 100, align: 'left' },
+        { label: '回答时间', prop: 'create_at' },
+        { label: '昵称', prop: 'nickname' },
+        { label: '头像', prop: 'avatar', type: 'img' },
+        { label: '问题', prop: 'question_cont', fullShow: true },
+        { label: '操作', width: 120, type: 'handle2', operations:
+          [
+            { label: '显示', func: this.showHandle, btnType: 'success', hide: 'isHide' },
+            { label: '删除', func: this.delHandle, btnType: 'danger' },
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    showHandle (row) {
+      this.$api.user.admanswershow({
+        answer_id: row.answer_id
+      }).then(data => {
+        this.$msgs(`已显示!`)
+        this.fetchData()
+      })
+    },
+    delHandle(row) {
+      this.$msg(`您确定要删除该问题吗?`, 'confirm', () => {
+        this.$api.user.admanswerdel({
+          answer_id: row.answer_id
+        }).then(data => {
+          this.$msgs(`已删除!`)
+          this.fetchData()
+        })
+      }, null, true)
+    },
+  }
+}
+</script>

Some files were not shown because too many files changed in this diff