Kaynağa Gözat

我的荣誉列表接口对接

liurongli 2 hafta önce
ebeveyn
işleme
790967ebce

+ 0 - 6
components/navBar.vue

@@ -208,10 +208,4 @@
 	:deep(.uni-navbar__header-container) {
 		padding: 0;
 	}
-	// .scroll_tab_btn{
-	// 	:deep(.uni-scroll-view-content) {
-	// 		display: flex;
-	// 		gap: 24rpx;
-	// 	}
-	// }
 </style>

+ 1 - 1
pages/teacherHonor/honorTeacher/honorTeacherDetail.vue

@@ -47,7 +47,7 @@
 </template>
 
 <script setup>
-	import navBar from '@/components/nav-bar.vue';
+	import navBar from '@/components/navBar.vue';
 	import {queryHonorTypeList,queryHonorTeacherListDetail} from '@/reqApi/teacherHonor.js';
 	import {
 		reactive,

+ 47 - 36
pages/teacherHonor/myHonor/index.vue

@@ -31,9 +31,13 @@
 					<view class="honor_content">
 						<image class="honor_pic" :src="item.certPicUrl"></image>
 						<view class="honor_info">
-							<view class="honor_info_top">
-								<view class="honor_name">{{item.honorName}}</view>
-								<view class="teacher_name">获奖人:{{item.teacherName}}</view>
+							<view class="honor_name">{{item.honorName}}</view>
+							<view class="teacher_name">获奖人:{{item.teacherName}}</view>
+							<!-- 0 需审核  1 无审核 -->
+							<view :class="['honor_status',{'waiting':item.honorStatus===0,'finish':item.reviewStatus == 1 || item.honorStatus===1,'reject':item.honorStatus===2}]">
+								<template v-if="item.honorStatus===0">待审核</template>
+								<template v-if="item.reviewStatus == 1 || item.honorStatus===1">已完成</template>
+								<template v-if="item.honorStatus===2">已驳回</template>
 							</view>
 							<view class="created_at">上传时间:{{item.createdAt}}</view>
 						</view>
@@ -51,7 +55,7 @@
 
 <script setup>
 	import navBar from '@/components/navBar.vue';
-	import {queryHonorTypeList,queryHonorTeacherListDetail} from '@/reqApi/teacherHonor.js';
+	import {queryHonorTypeList,queryHonorList} from '@/reqApi/teacherHonor.js';
 	import {
 		reactive,
 		nextTick,
@@ -88,8 +92,8 @@
 		pageLists:[],//全部数据
 		pageList:[],//列表数据
 		honorTypeId:'',//荣誉类型
-		teacherId: '',//教师id
-		dateType:'',//获奖时间
+		dateType:'',//获奖时间 全部-不传值,最近三个月-3,最近 6 个月-6,最近一年-12	
+		honorStatus:'',//0-待审核,1-已审核(审核通过),2-已驳回(审核失败)
 		pageSize: 30,
 		pageNum: 1,
 		pages:0,
@@ -122,7 +126,7 @@
 	const CommonFilterData = (filterOptions,type) => {
 		const { tabsSelected,tabBtnSelected } = filterOptions;
 		state.honorTypeId = tabsSelected;
-		state.dateType = tabBtnSelected;
+		state.honorStatus = tabBtnSelected;
 		OnLoadData(true)
 	}
 	/*
@@ -137,15 +141,15 @@
 			// 	title: '加载中'
 			// });
 			state.pageNum = 1;//如果是下拉刷新、重新查询 默认加载第一页
-			queryHonorTeacherListDetail({
-				honorTypeId:state.honorTypeId,//荣誉类型id
-				teacherId:state.teacherId,
-				dateType:state.dateType,
+			queryHonorList({
+				honorTypeId:state.honorTypeId,//荣誉类型
+				honorStatus:state.honorStatus,//0-待审核,1-已审核(审核通过),2-已驳回(审核失败)
 				startDatetime:'',
-				endDatetime:''
+				endDatetime:'',
+				dateType:state.dateType,
 			}).then(res=>{
 				if(res.code == 200){
-					const tableData = res?.data?.tableData || [];
+					const tableData = res?.data || [];
 					state.pageLists = tableData;//全部数据
 					const total = tableData?.length || 0;//总数
 					state.pages = Math.ceil(total / state.pageSize);//总页数
@@ -221,7 +225,7 @@
 		flex: auto;
 		flex-shrink: 0;
 		:deep(.uni-select__selector){
-			position: fixed;
+			position: fixed !important;
 			top:313rpx !important;
 			left: 24rpx;
 			width: 196rpx;
@@ -279,36 +283,43 @@
 					.honor_info{
 						flex:1;
 						display: flex;
-						justify-content: space-between;
+						justify-content: space-around;
 						flex-direction: column;
 						overflow: hidden;
-						.honor_info_top{
-							display: flex;
+						.honor_name{
+							font-weight: 500;
+							font-size: 32rpx;
+							color: #333333;
+							width: 100%;
+							white-space: nowrap;
+							overflow: hidden;
+							text-overflow: ellipsis;
+						}
+						.teacher_name{
+							font-weight: 400;
+							font-size: 28rpx;
+							color: #333333;
 							width: 100%;
-							flex-direction: column;
-							.honor_name{
-								font-weight: 500;
-								font-size: 32rpx;
-								color: #333333;
-								width: 100%;
-								white-space: nowrap;
-								overflow: hidden;
-								text-overflow: ellipsis;
+							white-space: nowrap;
+							overflow: hidden;
+							text-overflow: ellipsis;
+						}
+						.honor_status{
+							font-weight: 500;
+							font-size: 28rpx;
+							width: 100%;
+							&.waiting{
+								color: #2E64FA;
+							}
+							&.finish{
+								color: #2BC644;
 							}
-							.teacher_name{
-								margin-top: 16rpx;
-								font-weight: 400;
-								font-size: 28rpx;
-								color: #333333;
-								width: 100%;
-								white-space: nowrap;
-								overflow: hidden;
-								text-overflow: ellipsis;
+							&.reject{
+								color: #F56C6C;
 							}
 						}
 						.created_at{
 							width: 100%;
-							line-height: 1.4;
 							white-space: nowrap;
 							overflow: hidden;
 							text-overflow: ellipsis;

+ 3 - 0
reqApi/teacherHonor.js

@@ -30,4 +30,7 @@ export function queryHonorTypeList() {//查询荣誉类型列表
 }
 export function queryHonorTeacherListDetail(data) {//教师荣誉详情
 	return request.post('/api/v1/queryHonorTeacherListDetail',data)
+}
+export function queryHonorList(data) {//查询我的荣誉列表接口
+	return request.post('/api/v1/queryHonorList',data)
 }