index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <template>
  2. <view class="page_review" :style="{paddingTop: statusBarHeight + 120 + 'rpx', paddingBottom: safeAreaBottom + 100 + 'rpx' }">
  3. <notice-header title="审核材料" mode="review">
  4. </notice-header>
  5. <view class="review_content">
  6. <view class="review_list">
  7. <scroll-view v-if="reviewList.length > 0" scroll-y>
  8. <view v-for="item in reviewList" :key="item.id" class="review_item">
  9. <view class="item_header">
  10. <text class="submitter_name">{{ item.submitter }}</text>
  11. <view class="review_status" :class="item.statusClass">
  12. <text>{{ item.status }}</text>
  13. </view>
  14. </view>
  15. <view class="item_info">
  16. <text class="info_text">提交时间: {{ item.submitTime }}</text>
  17. <text class="info_text">材料: {{ item.materialCount }}个</text>
  18. </view>
  19. <view class="item_actions">
  20. <view class="action_btn reject" @click="handleReject(item)">
  21. <text>驳回</text>
  22. </view>
  23. <view class="action_btn approve" @click="handleApprove(item)">
  24. <text>通过</text>
  25. </view>
  26. </view>
  27. </view>
  28. </scroll-view>
  29. <no-data v-else centered text="暂无待审核材料" />
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script setup>
  35. import { ref, onMounted } from 'vue';
  36. import NoticeHeader from '@/components/notice-header.vue';
  37. import NoData from '@/components/no-data.vue';
  38. import { useSafeArea } from '@/common/safeArea';
  39. const { statusBarHeight, safeAreaBottom, initSafeArea } = useSafeArea();
  40. const reviewList = ref([
  41. {
  42. id: 1,
  43. submitter: '张老师',
  44. status: '待审核',
  45. statusClass: 'status-pending',
  46. submitTime: '2025-07-28 10:30',
  47. materialCount: 5
  48. },
  49. {
  50. id: 2,
  51. submitter: '李老师',
  52. status: '待审核',
  53. statusClass: 'status-pending',
  54. submitTime: '2025-07-28 11:20',
  55. materialCount: 3
  56. },
  57. {
  58. id: 3,
  59. submitter: '王老师',
  60. status: '待审核',
  61. statusClass: 'status-pending',
  62. submitTime: '2025-07-27 16:45',
  63. materialCount: 8
  64. }
  65. ]);
  66. onMounted(() => {
  67. initSafeArea();
  68. });
  69. const handleApprove = (item) => {
  70. uni.showModal({
  71. title: '确认通过',
  72. content: `确定要通过 ${item.submitter} 提交的材料吗?`,
  73. success: (res) => {
  74. if (res.confirm) {
  75. uni.showToast({ title: '审核通过', icon: 'success' });
  76. reviewList.value = reviewList.value.filter(i => i.id !== item.id);
  77. }
  78. }
  79. });
  80. };
  81. const handleReject = (item) => {
  82. uni.showModal({
  83. title: '确认驳回',
  84. content: `确定要驳回 ${item.submitter} 提交的材料吗?`,
  85. success: (res) => {
  86. if (res.confirm) {
  87. uni.showToast({ title: '已驳回', icon: 'none' });
  88. reviewList.value = reviewList.value.filter(i => i.id !== item.id);
  89. }
  90. }
  91. });
  92. };
  93. </script>
  94. <style lang="scss" scoped>
  95. .page_review {
  96. min-height: 100vh;
  97. background-color: #F5F7FA;
  98. }
  99. .review_content {
  100. flex: 1;
  101. padding: 24rpx;
  102. }
  103. .review_list {
  104. background-color: #FFFFFF;
  105. border-radius: 16rpx;
  106. overflow: hidden;
  107. flex: 1;
  108. display: flex;
  109. flex-direction: column;
  110. }
  111. .review_item {
  112. padding: 24rpx;
  113. border-bottom: 1rpx solid #EBEEF5;
  114. &:last-child {
  115. border-bottom: none;
  116. }
  117. .item_header {
  118. display: flex;
  119. align-items: center;
  120. justify-content: space-between;
  121. margin-bottom: 16rpx;
  122. .submitter_name {
  123. font-size: 30rpx;
  124. font-weight: 500;
  125. color: #333333;
  126. }
  127. .review_status {
  128. font-size: 24rpx;
  129. padding: 8rpx 16rpx;
  130. border-radius: 8rpx;
  131. &.status-pending {
  132. background: rgba(230, 162, 60, 0.1);
  133. color: #E6A23C;
  134. }
  135. }
  136. }
  137. .item_info {
  138. display: flex;
  139. gap: 32rpx;
  140. margin-bottom: 20rpx;
  141. .info_text {
  142. font-size: 26rpx;
  143. color: #999999;
  144. }
  145. }
  146. .item_actions {
  147. display: flex;
  148. justify-content: flex-end;
  149. gap: 24rpx;
  150. .action_btn {
  151. font-size: 28rpx;
  152. padding: 16rpx 32rpx;
  153. border-radius: 12rpx;
  154. &.reject {
  155. background-color: #FFFFFF;
  156. border: 2rpx solid #E4E7ED;
  157. color: #666666;
  158. }
  159. &.approve {
  160. background-color: #2E64FA;
  161. color: #FFFFFF;
  162. }
  163. }
  164. }
  165. }
  166. </style>