feedback.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <div class="feedback-page">
  3. <div class="feedback-head">
  4. <el-radio-group
  5. v-model="problemStatus"
  6. class="radio-button"
  7. text-color="#1677FF"
  8. fill="#1890FF26"
  9. @change="handleClick"
  10. >
  11. <el-radio-button v-for="item in tabContent" :label="item.name" :value="item.value" />
  12. </el-radio-group>
  13. <div class="search-input">
  14. <el-input
  15. v-model="queryDescription"
  16. style="width: 294px"
  17. placeholder="请输入搜索内容"
  18. :prefix-icon="Search"
  19. />
  20. <el-button type="primary" style="margin-left: 16px" @click="searchFeedback"
  21. >搜索</el-button
  22. ></div
  23. ></div
  24. >
  25. <div class="problem-list"
  26. ><singleProblem
  27. v-for="(item,index) in feedbackList"
  28. :key="index"
  29. :problem-data="item"
  30. :is-handle="item.problemStatus === STATUS.unhandled"
  31. style="margin-top: 22px; margin-bottom: 2px"
  32. /></div>
  33. <el-pagination
  34. v-model:current-page="pageNumber"
  35. v-model:page-size="pageSize"
  36. background
  37. layout="prev, pager, next,sizes,jumper"
  38. :page-sizes="[5, 10, 20, 40]"
  39. :total="totalRow"
  40. @size-change="handleSizeChange"
  41. @current-change="handleCurrentChange"
  42. class="flex justify-end"
  43. />
  44. </div>
  45. </template>
  46. <script setup lang="ts">
  47. import { Search } from '@element-plus/icons-vue';
  48. import { tabContent } from './constant';
  49. import singleProblem from './component/singleProblem.vue';
  50. import useFeedback from './use-feedback.ts';
  51. import { STATUS } from '@/api/feedback/feedback';
  52. const useFeedbackList = useFeedback();
  53. const { feedbackList, pageNumber, pageSize, problemStatus, queryDescription, totalRow, getList } =
  54. useFeedbackList;
  55. const handleClick = () => {
  56. queryDescription.value = '';
  57. getList();
  58. };
  59. const searchFeedback = () => {
  60. pageNumber.value = 1;
  61. getList();
  62. };
  63. const handleSizeChange = () => {
  64. pageNumber.value = 1;
  65. getList();
  66. };
  67. const handleCurrentChange = () => {
  68. getList();
  69. };
  70. </script>
  71. <style scoped>
  72. .feedback-page {
  73. position: relative;
  74. height: calc(100vh - 64px - 12px);
  75. background-color: #ffffff;
  76. padding-top: 20px;
  77. padding-left: 20px;
  78. padding-right: 20px;
  79. }
  80. :deep(.el-radio-button .el-radio-button__inner) {
  81. width: 188px;
  82. background-color: #00000005;
  83. }
  84. .feedback-head {
  85. display: flex;
  86. flex-direction: column;
  87. }
  88. .search-input {
  89. margin-top: 24px;
  90. }
  91. .problem-list {
  92. height: calc(100vh - 270px);
  93. overflow: auto;
  94. margin-bottom: 4px;
  95. padding: 0 2px;
  96. }
  97. :deep(.el-pagination .el-select) {
  98. width: 92px;
  99. }
  100. </style>