liurongli 2 недель назад
Родитель
Сommit
f1730faf43

+ 10 - 3
pages.json

@@ -151,21 +151,28 @@
 		{
 			"path": "pages/studentStudy/index",
 			"style": {
-				"navigationBarTitleText": "教师研修",
+				"navigationBarTitleText": "学生学习",
 				"navigationStyle": "custom"
 			}
 		},
 		{
 			"path": "pages/studentStudy/videoDetails",
 			"style": {
-				"navigationBarTitleText": "教师研修-视频详情",
+				"navigationBarTitleText": "学生学习-视频详情",
 				"navigationStyle": "custom"
 			}
 		},
 		{
 			"path": "pages/studentStudy/learningMonitor/taskDetails",
 			"style": {
-				"navigationBarTitleText": "教师研修-研修监控-任务详情",
+				"navigationBarTitleText": "学生学习-学习监控-任务详情",
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/teacherHonor/index",
+			"style": {
+				"navigationBarTitleText": "教师发展",
 				"navigationStyle": "custom"
 			}
 		}

+ 8 - 0
pages/teacherHonor/honorAudit/index.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 251 - 0
pages/teacherHonor/honorOverview/index.vue

@@ -0,0 +1,251 @@
+<template>
+	<!-- 头部 -->
+	<nav-bar height="120" backPath="workspace" title="教师专业发展" :showHeaderborder="true" :showFilterPicker="false" :showTabs="false" :onlyTitle="false" rightWidth="0rpx" @CommonFilterData="CommonFilterData"></nav-bar>
+	<view class="page_content">
+		<view class="count_list"></view>
+	</view>
+</template>
+
+<script setup>
+	import navBar from '@/components/nav-bar.vue';
+	import {queryTeacherCourseTypeList,teacherCenterPageData} from '@/reqApi/studentStudy.js';
+	import {
+		reactive,
+		ref,
+		onMounted,
+		nextTick
+	} from 'vue';
+	const state = reactive({
+		courseTypeData:[],//顶部查询数据 
+		filterPickerData: [{
+			valueIndex:0,//默认值索引
+			defaultValue:'',//默认值
+			list:[]
+		},{
+			valueIndex:0,//默认值索引
+			defaultValue:'',//默认值
+			list:[]
+		}],
+		tabList: [{
+			label: '最新发布',
+			value: '0'
+		}, {
+			label: '播放最多',
+			value: '1'
+		}, {
+			label: '关注最多',
+			value: '2'
+		}],
+		pageList:[],//列表数据
+		queryStr: '',
+		sortType: '0',//排序方式,课程中心参数,0-最新发布,1-播放最多,2-关注最多
+		studCourseTypeClassId: '',//学习专题	
+		studCourseTypeId: '',//内容领域	
+		pageSize: 30,
+		pageNum: 1,
+		scrollTop:0,
+		oldScrollTop:0,
+		isRefreshing:false,//设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
+		isLoading:true,//加载中
+		noMoreData:false,//没有更多数据了
+		loadStatus:'more',//loading状态
+	})
+	onMounted(() => {
+		getCourseTypeDataList();
+		OnLoadData(true);
+	});
+	//获取顶部查询项
+	const getCourseTypeDataList = () => {
+		queryTeacherCourseTypeList().then(res => {
+			if(res.code == 200){
+				const defaultData = [{
+					label:'内容领域',
+					id:'',
+					value:''
+				}];
+				const resData = res?.data || [];
+				state.courseTypeData = defaultData.concat(resData);
+				//一级条件
+				state.filterPickerData[0].list = state.courseTypeData.map(item=>({
+					...item,
+					value:item.id
+				}))
+			}else{
+				state.courseTypeData = [];
+				state.filterPickerData = [{
+					valueIndex:0,//默认值索引
+					defaultValue:'',//默认值
+					list:[],
+				},{
+					valueIndex:0,
+					defaultValue:'',//默认值
+					list:[],
+				}]
+			}
+		})
+	}
+	//切换条件选择器
+	const CommonFilterData = (searchWord,filterPicker,tabsSelected,type) => {
+		const {valueIndex, index,filterPickerValue} = filterPicker;
+		if(type == 'filterPicker'){
+			if(index==0){//索引
+				state.filterPickerData[index].valueIndex = valueIndex;//一级条件选中项的索引
+				state.filterPickerData[1].valueIndex = 0;//二级条件选中项的索引
+				const childrenData = state.courseTypeData?.[valueIndex]?.children || [];
+				const childrenList = childrenData.map(item=>({
+					...item,
+					value:item?.id ?? ''
+				}))
+				if(childrenList.length){
+					childrenList.unshift({
+						label:'学习专题',
+						id:'',
+						value:''
+					})
+				}
+				state.filterPickerData[1].list = childrenList;//二级条件数据
+			}else{
+				state.filterPickerData[index].valueIndex = valueIndex;//二级条件选中项的索引
+			}
+		}
+		state.queryStr = searchWord;
+		state.studCourseTypeId = filterPickerValue[0];
+		state.studCourseTypeClassId = filterPickerValue[1];
+		state.sortType = tabsSelected;
+		OnLoadData(true)
+	}
+	/*
+	*获取数据
+	* initPage:初始分页 从第一开始
+	*/
+	const OnLoadData = (initPage) => {
+		// uni.showLoading({
+		// 	title: '加载中'
+		// });
+		if (initPage) state.pageNum = 1;//如果是下拉刷新、重新查询 默认加载第一页
+		state.isLoading = true;
+		state.loadStatus = 'loading';
+		teacherCenterPageData({
+			queryStr:state.queryStr,
+			studCourseTypeId:state.studCourseTypeId,
+			studCourseTypeClassId:state.studCourseTypeClassId,
+			sortType:state.sortType,
+			pageSize:state.pageSize,
+			pageNum:state.pageNum
+		}).then(res=>{
+			if(res.code == 200){
+				const total = Number(res.data.total) || 0;//总数
+				const pages = Math.ceil(total / state.pageSize);//总页数
+				const recordsData = res?.data?.records || [];
+				state.pageList = initPage ? recordsData : [...state.pageList,...recordsData];
+				state.noMoreData = state.pageNum == pages;
+				state.pageNum++;
+			}
+		}).finally(()=>{
+			// uni.hideLoading();
+			state.isLoading = false;
+			state.isRefreshing = false;//下拉刷新未被触发
+			if(state.noMoreData){
+				state.loadStatus = 'no-more';
+			}else{
+				state.loadStatus = 'more';
+			}
+			//返回到页面顶部
+			if(initPage){
+				GoTop();
+			}
+		})
+	}
+	// 自定义下拉刷新被触发	 下拉刷新
+	const OnRefresh = () =>{
+		state.isRefreshing = true;//下拉刷新已经被触发
+		OnLoadData(true);
+	}
+	//滚动到底部/右边 触发上拉刷新
+	const OnLoadMore = () => {
+		if (state.isLoading || state.noMoreData) return;
+		OnLoadData(false);
+	}
+	//	滚动时触发
+	const OnScroll = (e) => {
+		state.oldScrollTop = e.detail.scrollTop;
+	}
+	//返回到顶部
+	const GoTop = () => {
+		// 解决view层不同步的问题
+		state.scrollTop = state.oldScrollTop;
+		nextTick(() => {
+			state.scrollTop = 0
+		});
+	}
+	//视频详情
+	const GoVideoDetails = (id) => {
+		uni.navigateTo({
+			url: `/pages/studentStudy/videoDetails?id=${id}`
+		});
+	}
+</script>
+
+<style lang="scss" scoped>
+	.page_content{
+		height: calc(100% - 448rpx);
+		.scroll_view_y{
+			height: 100%;
+			.refresh_loading{
+				padding: 10rpx 0;
+			}
+		}
+		.page_list{
+			display: flex;
+			width: 100%;
+			flex-wrap: wrap;
+			gap:32rpx;
+			.list_item{
+				&:nth-child(1){
+					margin-top: 16rpx;
+				}
+				&:nth-child(2){
+					margin-top: 16rpx;
+				}
+				width: calc((100% - 32rpx) / 2);
+				overflow: hidden;
+				display: flex;
+				flex-direction: column;
+				.item_img{
+					width: 100%;
+					height: 220rpx;
+					border-radius: 8rpx;
+				}
+				.item_title{
+					display: flex;
+					width: 100%;
+					margin:8rpx 0;
+					font-weight: 400;
+					font-size: 24rpx;
+					color: #333333;
+					display: -webkit-box;
+					-webkit-line-clamp: 2;
+					-webkit-box-orient: vertical;
+					overflow: hidden;
+					text-overflow: ellipsis;
+				}
+				.item_time{
+					display: flex;
+					align-items: center;
+					width: 100%;
+					.img{
+						width: 28rpx;
+						height: 28rpx;
+						margin-right: 8rpx;
+					}
+					.time{
+						font-weight: 400;
+						font-size: 24rpx;
+						color: #999999;
+					}
+				}
+			}
+		}
+		
+	}
+</style>

+ 8 - 0
pages/teacherHonor/honorTeacher/index.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 68 - 0
pages/teacherHonor/index.vue

@@ -0,0 +1,68 @@
+<template>
+	<view class="page_body">
+		<!-- 荣誉总览 -->
+		<honor-overview v-if="state.tabBarValue=='honorOverview'"></honor-overview>
+		<!-- 荣誉教师 -->
+		<honor-teacher v-if="state.tabBarValue=='honorTeacher'"></honor-teacher>
+		<!-- 我的荣誉 -->
+		<my-honor v-if="state.tabBarValue=='myHonor'"></my-honor>
+		<!-- 荣誉审核 -->
+		<honor-audit v-if="state.tabBarValue=='myHonor'"></honor-audit>
+		<!-- 底部tabbar -->
+		<page-tabbar :tabBarValue="state.tabBarValue" :tabBarList="state.tabBarList" @ChangeTabBarValue="ChangeTabBarValue"></page-tabbar>
+	</view>
+</template>
+
+<script setup>
+	import pageTabbar from '@/components/page-tabbar.vue';//头部
+	import honorOverview from './honorOverview/index.vue';//荣誉总览
+	import honorTeacher from './honorTeacher/index.vue';//荣誉教师
+	import myHonor from './myHonor/index.vue';//我的荣誉
+	import honorAudit from './honorAudit/index.vue';//荣誉审核
+	import { reactive, ref,onMounted } from 'vue';
+	import { useStore } from 'vuex';
+	const store = useStore();
+	const state = reactive({
+		tabBarValue:'honorOverview',
+		tabBarList:[{
+			"pathName":"myHonor",
+			"iconPath": "/static/image/tabbar/myHonor.png",
+			"selectedIconPath": "/static/image/tabbar/myHonor_cur.png",
+			"text": "我的荣誉"
+		},{
+			"pathName":"honorAudit",
+			"iconPath": "/static/image/tabbar/honorAudit.png",
+			"selectedIconPath": "/static/image/tabbar/honorAudit_cur.png",
+			"text": "荣誉审核"
+		}]
+	})
+	//切换tabBar
+	const ChangeTabBarValue = (name) => {
+		state.tabBarValue = name;
+	}
+	onMounted(()=>{
+		const roleCodes  = store.state?.userStore?.userInfo?.roleCodes || [];
+		// 管理员和校长包含荣誉总览和荣誉教师,其他用户没有荣誉总览和荣誉教师
+		if(roleCodes.includes('SCHOOL_MANAGER') || roleCodes.includes('SCHOOL_MASTER')){//管理员和校长
+			const tabList = [{
+				"pathName":"honorOverview",
+				"iconPath": "/static/image/tabbar/honorOverview.png",
+				"selectedIconPath": "/static/image/tabbar/honorOverview_cur.png",
+				"text": "荣誉总览"
+			},{
+				"pathName":"honorTeacher",
+				"iconPath": "/static/image/tabbar/honorTeacher.png",
+				"selectedIconPath": "/static/image/tabbar/honorTeacher_cur.png",
+				"text": "荣誉教师"
+			}]
+			state.tabBarList = [...tabList,...state.tabBarList];
+		}
+	})
+</script>
+
+<style lang="scss" scoped>
+	.page_body{
+		height: 100%;
+		min-height: auto;
+	}
+</style>

+ 8 - 0
pages/teacherHonor/myHonor/index.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 3 - 7
pages/workspace/index.vue

@@ -178,7 +178,7 @@ const systemItems = ref([
 	{ name: '教师研修', key:'teacherStudy', image: '/static/image/workspace/icon3.png', isLarge: false, visible: true },
 	{ name: '学生学习', key:'studentStudy', image: '/static/image/workspace/icon4.png', isLarge: false, visible: true },
 	{ name: '智能选课', key:'', image: '/static/image/workspace/icon5.png', isLarge: false, visible: true },
-	{ name: '教师发展', key:'', image: '/static/image/workspace/icon6.png', isLarge: false, visible: true },
+	{ name: '教师发展', key:'teacherHonor', image: '/static/image/workspace/icon6.png', isLarge: false, visible: true },
 	{ name: '协同备课', key:'', image: '/static/image/workspace/icon7.png', isLarge: false, visible: true },
 	{ name: '校内通知', key:'notice', image: '/static/image/workspace/icon8.png', isLarge: false, visible: true },
 	{ name: '评教评学', key:'', image: '/static/image/workspace/icon9.png', isLarge: false, visible: true },
@@ -350,13 +350,9 @@ const handleSystemClick = (item) => {
 				url: '/pages/notice/mine/index?hideTabbar=true'
 			});
 		}
-	}else if(item.key == 'teacherStudy'){//教师研修
+	}else if(item.key == 'teacherStudy' || item.key == 'studentStudy' || item.key == 'teacherHonor'){//教师研修 学生学习 教师发展
 		uni.navigateTo({
-			url: '/pages/teacherStudy/index'
-		});
-	}else if(item.key == 'studentStudy'){//学生学习
-		uni.navigateTo({
-			url: '/pages/studentStudy/index'
+			url: `/pages/${item.key}/index`
 		});
 	} else {
 		uni.showToast({ title: `即将打开:${item.name}`, icon: 'none' });

BIN
static/image/tabbar/honorAudit.png


BIN
static/image/tabbar/honorAudit_cur.png


BIN
static/image/tabbar/honorOverview.png


BIN
static/image/tabbar/honorOverview_cur.png


BIN
static/image/tabbar/honorTeacher.png


BIN
static/image/tabbar/honorTeacher_cur.png


BIN
static/image/tabbar/myHonor.png


BIN
static/image/tabbar/myHonor_cur.png


+ 3 - 1
style/common.scss

@@ -369,6 +369,9 @@ uni-page-body {
 }
 //定义表头样式 复杂表头样式
 .custom_uni_nav_bar{
+	.uni-navbar--border{
+		border-bottom-color:#F3F3F3 !important;
+	}
 	.uni-navbar__header-btns-left{
 		position: absolute;
 		top: 0;
@@ -487,7 +490,6 @@ uni-page-body {
 //定义只有标题时的表头样式
 .custom_navbar_only_title{
 	.uni-navbar--border{
-		border-bottom-width: 2rpx !important;
 		border-bottom-color:#F3F3F3 !important;
 	}
 	.uni-navbar__header-btns-left {

+ 1 - 1
uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue

@@ -335,7 +335,7 @@
 	}
 
 	.uni-navbar--border {
-		border-bottom-width: 1rpx;
+		border-bottom-width: 2rpx;
 		border-bottom-style: solid;
 		border-bottom-color: #eee;
 	}

+ 9 - 2
unpackage/dist/cache/.vite/deps/_metadata.json

@@ -2,7 +2,14 @@
   "hash": "567e918b",
   "configHash": "1b48dfbe",
   "lockfileHash": "3f808f5a",
-  "browserHash": "a04cf648",
-  "optimized": {},
+  "browserHash": "63141172",
+  "optimized": {
+    "jsencrypt": {
+      "src": "../../../../../node_modules/jsencrypt/lib/index.js",
+      "file": "jsencrypt.js",
+      "fileHash": "24bb345a",
+      "needsInterop": false
+    }
+  },
   "chunks": {}
 }