From a320d27079ecab5f1a9fc142738d7d710a46c760 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期二, 07 五月 2024 18:02:40 +0800
Subject: [PATCH] feat:反馈保存、展示、处理、删除
---
src/views/feedback/list.vue | 89 ++++++++++++++++++++++++++++++++++++++++++++
src/api/feedback.js | 7 +++
src/views/user/student/list.vue | 2
src/router.js | 6 +++
4 files changed, 103 insertions(+), 1 deletions(-)
diff --git a/src/api/feedback.js b/src/api/feedback.js
new file mode 100644
index 0000000..0db7357
--- /dev/null
+++ b/src/api/feedback.js
@@ -0,0 +1,7 @@
+import { get, post } from '@/utils/request'
+
+export default {
+ getFeedbackPageList: query => post('/api/admin/feedback/page', query),
+ deleteFeedback: id => get('/api/admin/feedback/delete/' + id),
+ settleFeedback: id => get('/api/admin/feedback/settleFeedback/' + id),
+}
diff --git a/src/router.js b/src/router.js
index cf03701..31f917f 100644
--- a/src/router.js
+++ b/src/router.js
@@ -154,6 +154,12 @@
hidden: true
},
{
+ path: 'feedback/list',
+ component: () => import('@/views/feedback/list'),
+ name: 'feedback',
+ meta: { title: '閿欓鍙嶉', noCache: true }
+ },
+ {
path: 'personalSimulation/list/mathList',
component: () => import('@/views/exam/mathList/list.vue'),
name: 'multiplemathList',
diff --git a/src/views/feedback/list.vue b/src/views/feedback/list.vue
new file mode 100644
index 0000000..7d7f9a9
--- /dev/null
+++ b/src/views/feedback/list.vue
@@ -0,0 +1,89 @@
+<template>
+ <div class="app-container">
+ <el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
+ <el-table-column prop="questionTitle" label="鍙嶉棰樼洰" />
+ <el-table-column prop="describe" label="鍙嶉鎻忚堪" />
+ <el-table-column prop="userName" label="鍙嶉鐢ㄦ埛" />
+ <el-table-column prop="fix" label="鏄惁澶勭悊" width="100px">
+ <template slot-scope="{row}">
+ <el-tag :type="row.fix ? 'success' : 'warning'">{{ row.fix ? '宸插鐞�' : '鏈鐞�' }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="fixTime" label="澶勭悊鏃堕棿" width="120px"/>
+ <el-table-column label="鎿嶄綔" align="center" width="260px">
+ <template slot-scope="{row}">
+ <el-button size="mini" @click="showQuestion(row)" class="link-left">鏌ョ湅</el-button>
+ <el-button size="mini" @click="hanldSettleFeedback(row)" type="info" class="link-left">纭澶勭悊</el-button>
+ <el-button size="mini" @click="hanldDeleteFeedback(row)" type="danger" class="link-left">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <pagination v-show="total > 0" :total="total" :page.sync="queryParam.pageIndex" :limit.sync="queryParam.pageSize"
+ @pagination="search" />
+
+ <!-- 棰勮妗� -->
+ <el-dialog :visible.sync="questionShow.dialog" style="width: 100%;height: 100%">
+ <QuestionShow :qType="questionShow.qType" :question="questionShow.question" :qLoading="questionShow.loading"/>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import Pagination from '@/components/Pagination'
+import feedbackApi from '@/api/feedback'
+import QuestionShow from '../exam/question/components/Show'
+import questionApi from '@/api/question'
+
+export default {
+ components: { Pagination, QuestionShow },
+ data() {
+ return {
+ queryParam: {
+ pageIndex: 1,
+ pageSize: 10
+ },
+ subjectFilter: null,
+ listLoading: true,
+ tableData: [],
+ total: 0,
+ questionShow: {
+ qType: 0,
+ dialog: false,
+ question: null,
+ loading: false
+ }
+ }
+ },
+ created() {
+ this.search()
+ },
+ methods: {
+ search() {
+ this.listLoading = true
+ feedbackApi.getFeedbackPageList(this.queryParam).then(data => {
+ const re = data.response
+ this.tableData = re.list
+ this.total = re.total
+ this.queryParam.pageIndex = re.pageNum
+ this.listLoading = false
+ })
+ },
+ showQuestion (row) {
+ let _this = this
+ this.questionShow.dialog = true
+ this.questionShow.loading = true
+ questionApi.select(row.questionId).then(re => {
+ _this.questionShow.qType = re.response.questionType
+ _this.questionShow.question = re.response
+ _this.questionShow.loading = false
+ })
+ },
+ hanldSettleFeedback(row) {
+
+ },
+ hanldDeleteFeedback(row) {
+
+ }
+ }
+}
+</script>
diff --git a/src/views/user/student/list.vue b/src/views/user/student/list.vue
index e78badf..db7a57d 100644
--- a/src/views/user/student/list.vue
+++ b/src/views/user/student/list.vue
@@ -77,7 +77,7 @@
<el-radio label="鍑哄樊">鍑哄樊</el-radio>
<el-radio label="鍏朵粬">鍏朵粬</el-radio>
</el-radio-group>
- <el-input type="textarea" maxlength="100" show-word-limit autosize v-model="user.conditionDetail" placeholder="璇疯緭鍏ヨ缁嗘儏鍐�" style="margin-top: 30px;"></el-input>
+ <el-input type="textarea" maxlength="100" show-word-limit :autosize="{ minRows: 4}" :rows="2" v-model="user.conditionDetail" placeholder="璇疯緭鍏ヨ缁嗘儏鍐�" style="margin-top: 30px;"></el-input>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="statusConfirm">纭� 瀹�</el-button>
<el-button @click="statusVisible = false">鍙� 娑�</el-button>
--
Gitblit v1.8.0