Răsfoiți Sursa

材料采集

liurongli 1 săptămână în urmă
părinte
comite
dd0c73bdc7

+ 3 - 0
pages/login/index.vue

@@ -282,6 +282,9 @@ const DialogConfirm = () => {
 		deviceType: 'APP'
 	}).then(res => {
 		if (res.code == 200) {
+			const modules = res?.data?.modules || [];
+			store.dispatch('setModulesList', modules);
+			uni.setStorageSync('modulesList', modules);
 			LoginSuccess();
 		}
 	})

+ 4 - 4
pages/materialCollection/taskOverview/components/index.vue

@@ -19,7 +19,7 @@
 
 			<view class="form_item">
 				<view class="form_row form_row_type">
-					<text class="form_label">归属部门</text>
+					<text class="form_label">归属分类</text>
 					<view class="form_content">
 						<picker mode="selector" :range="categoryOptions" :value="categoryIndex" @change="handleCategoryChange">
 							<view class="filter_item">
@@ -96,7 +96,7 @@
 				</view>
 			</view>
 
-			<view class="form_item" v-if="formData.auditMechanism === 1">
+			<view class="form_item" v-if="formData.auditMechanism === 0">
 				<view class="form_row form_row_type">
 					<text class="form_label">审核人</text>
 					<view class="form_content">
@@ -222,8 +222,8 @@ const auditorListFiltered = computed(() => {
 });
 
 const auditOptions = [
-	{ label: '需审核', value: 1 },
-	{ label: '无审核', value: 0 }
+	{ label: '需审核', value: 0 },
+	{ label: '无审核', value: 1 }
 ];
 
 const formData = reactive({

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

@@ -34,7 +34,7 @@
 								<view class="created_at">上传时间:{{item.createdAt}}</view>
 							</view>
 						</view>
-					</view>
+					</view>	
 				</view>
 				<view class="no_data" v-if="!state.isLoading && state.pageList.length == 0">
 					<image class="no_data_img" src="@/static/image/bg/no_data.png"></image>

+ 124 - 17
pages/workspace/index.vue

@@ -8,6 +8,9 @@
 				<template v-if="largeCard?.visible">
 					<view class="system_grid_with_large">
 						<view class="large_card" @click="handleSystemClick(largeCard)">
+							<view class="card_dot" >
+								<img :src="getModulePermission(largeCard.id) == 1 ? './static/image/workspace/throughIcon.png' : '/static/image/workspace/authorityIcon.png'" class="dot_img" alt="">
+							</view>
 							<image :src="largeCard.image" class="large_icon" mode="aspectFit"></image>
 							<text class="large_name">{{ largeCard.name }}</text>
 						</view>
@@ -15,6 +18,9 @@
 						<view class="right_top_grid">
 							<view v-for="(item, index) in rightTopCards" :key="index" class="small_item"
 								@click="handleSystemClick(item)">
+								<view class="card_dot" >
+									<img :src="getModulePermission(item.id) == 1 ? './static/image/workspace/throughIcon.png' : '/static/image/workspace/authorityIcon.png'" class="dot_img" alt="">
+								</view>
 								<image :src="item.image" class="small_icon" mode="aspectFit"></image>
 								<text class="small_name">{{ item.name }}</text>
 							</view>
@@ -24,6 +30,9 @@
 					<view class="bottom_grid">
 						<view v-for="(item, index) in bottomCards" :key="index" class="small_item"
 							@click="handleSystemClick(item)">
+							<view class="card_dot" >
+								<img :src="getModulePermission(item.id) == 1 ? './static/image/workspace/throughIcon.png' : '/static/image/workspace/authorityIcon.png'" class="dot_img" alt="">
+							</view>
 							<image :src="item.image" class="small_icon" mode="aspectFit"></image>
 							<text class="small_name">{{ item.name }}</text>
 						</view>
@@ -34,6 +43,7 @@
 					<view class="system_grid_full">
 						<view v-for="(item, index) in allSmallCards" :key="index" class="small_item"
 							@click="handleSystemClick(item)">
+							<view class="card_dot" :class="{ 'dot-green': getModulePermission(item.id) == 1, 'dot-red': getModulePermission(item.id) == 0 }"></view>
 							<image :src="item.image" class="small_icon" mode="aspectFit"></image>
 							<text class="small_name">{{ item.name }}</text>
 						</view>
@@ -97,7 +107,7 @@
 						<view class="schedule_dot"></view>
 						<view class="schedule_text_container">
 							<text class="schedule_text" :class="{ expanded: expandedItems[item.id] }">{{ item.title
-								}}</text>
+							}}</text>
 						</view>
 					</view>
 				</view>
@@ -146,25 +156,42 @@ import NoData from '@/components/noData.vue';
 import CommonTabbar from '@/components/commonTabbar.vue';
 import { useSafeArea } from '@/common/safeArea';
 
+
+
 const store = useStore();
 const { statusBarHeight, safeAreaBottom, initSafeArea } = useSafeArea();
 
 const systemItems = ref([
-	{ name: '大数据精准教学诊断平台', key: '', image: '/static/image/workspace/iconLeft.png', isLarge: true, visible: true },
-	{ name: '选择题判分', key: '', image: '/static/image/workspace/icon1.png', isLarge: false, visible: true },
-	{ name: '材料采集', key: 'materialCollection', image: '/static/image/workspace/icon2.png', isLarge: false, visible: true },
-	{ 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: '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 },
-	{ name: '考场编排', key: '', image: '/static/image/workspace/icon10.png', isLarge: false, visible: true },
-	{ name: '听课评课', key: '', image: '/static/image/workspace/icon11.png', isLarge: false, visible: true },
-	{ name: '基础数据', key: '', image: '/static/image/workspace/icon12.png', isLarge: false, visible: true }
+	{ name: '大数据精准教学诊断平台', id: '1', key: '', image: '/static/image/workspace/iconLeft.png', isLarge: true, visible: true },
+	{ name: '选择题判分', id: '3', key: '', image: '/static/image/workspace/icon1.png', isLarge: false, visible: true },
+	{ name: '材料采集', id: '7', key: 'materialCollection', image: '/static/image/workspace/icon2.png', isLarge: false, visible: true },
+	{ name: '教师研修', id: '9', key: 'teacherStudy', image: '/static/image/workspace/icon3.png', isLarge: false, visible: true },
+	{ name: '学生学习', id: '13', key: 'studentStudy', image: '/static/image/workspace/icon4.png', isLarge: false, visible: true },
+	{ name: '智能选课', id: '4', key: '', image: '/static/image/workspace/icon5.png', isLarge: false, visible: true },
+	{ name: '教师发展', id: '8', key: 'teacherHonor', image: '/static/image/workspace/icon6.png', isLarge: false, visible: true },
+	{ name: '协同备课', id: '10', key: '', image: '/static/image/workspace/icon7.png', isLarge: false, visible: true },
+	{ name: '校内通知', id: '12', key: 'notice', image: '/static/image/workspace/icon8.png', isLarge: false, visible: true },
+	{ name: '评教评学', id: '5', key: '', image: '/static/image/workspace/icon9.png', isLarge: false, visible: true },
+	{ name: '考场编排', id: '6', key: '', image: '/static/image/workspace/icon10.png', isLarge: false, visible: true },
+	{ name: '听课评课', id: '11', key: '', image: '/static/image/workspace/icon11.png', isLarge: false, visible: true },
+	{ name: '基础数据', id: '2', key: '', image: '/static/image/workspace/icon12.png', isLarge: false, visible: true }
 ]);
 
+const modulesList = ref([]);
+const moduleMap = computed(() => {
+	const map = {};
+	modulesList.value.forEach(item => {
+		map[item.id] = item;
+	});
+	return map;
+});
+
+const getModulePermission = (itemId) => {
+	const module = moduleMap.value[itemId];
+	if (!module) return 1;
+	return module.isSelect;
+};
+
 const largeCard = computed(() => systemItems.value.find(item => item.isLarge));
 const smallCards = computed(() => systemItems.value.filter(item => !item.isLarge));
 const rightTopCards = computed(() => smallCards.value.slice(0, 4));
@@ -310,10 +337,17 @@ onMounted(() => {
 });
 
 onShow(() => {
+	modulesList.value = store.state.userStore.modulesList || uni.getStorageSync('modulesList') || [];
 	fetchScheduleList();
 });
 
 const handleSystemClick = (item) => {
+	const isSelect = getModulePermission(item.id);
+	if (isSelect == 0) {
+		uni.showToast({ title: '暂无权限,敬请期待!', icon: 'none' });
+		return;
+	}
+
 	if (item.key === 'notice') {
 		const userInfo = store.state.userStore.userInfo || uni.getStorageSync('userInfo') || {};
 		const roleCodes = userInfo.roleCodes || [];
@@ -524,7 +558,27 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
 			border-radius: 20rpx;
 			width: 324rpx;
 			height: 352rpx;
-			// padding: 30rpx 0;
+			position: relative;
+
+			.card_dot {
+				position: absolute;
+				top: -6rpx;
+				right: -12rpx;
+				width: 32rpx;
+				height: 32rpx;
+				img {
+					width: 100%;
+					height: 100%;
+				}
+			}
+
+			.dot-green {
+				background-color: #52C41A;
+			}
+
+			.dot-red {
+				background-color: #F5222D;
+			}
 
 			.large_icon {
 				width: 160rpx;
@@ -554,8 +608,24 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
 				align-items: center;
 				justify-content: center;
 				background-color: #FFFFFF;
-				// border-radius: 12rpx;
-				// padding: 20rpx 0;
+				position: relative;
+
+				.card_dot {
+					position: absolute;
+					top: -2rpx;
+					right: 12rpx;
+					width: 32rpx;
+					height: 32rpx;
+					z-index: 100;
+				}
+
+				.dot-green {
+					background-color: #52C41A;
+				}
+
+				.dot-red {
+					background-color: #F5222D;
+				}
 
 				.small_icon {
 					width: 96rpx;
@@ -585,6 +655,24 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
 			background-color: #FFFFFF;
 			border-radius: 12rpx;
 			padding: 20rpx 0;
+			position: relative;
+
+			.card_dot {
+				position: absolute;
+				top: 12rpx;
+				right: 12rpx;
+				width: 32rpx;
+				height: 32rpx;
+				z-index: 100;
+			}
+
+			.dot-green {
+				background-color: #52C41A;
+			}
+
+			.dot-red {
+				background-color: #F5222D;
+			}
 
 			.small_icon {
 				width: 96rpx;
@@ -613,6 +701,24 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
 			background-color: #FFFFFF;
 			border-radius: 12rpx;
 			padding: 20rpx 0;
+			position: relative;
+
+			.card_dot {
+				position: absolute;
+				top: 12rpx;
+				right: 12rpx;
+				width: 12rpx;
+				height: 12rpx;
+				border-radius: 50%;
+			}
+
+			.dot-green {
+				background-color: #52C41A;
+			}
+
+			.dot-red {
+				background-color: #F5222D;
+			}
 
 			.small_icon {
 				width: 64rpx;
@@ -819,6 +925,7 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
 				display: -webkit-box;
 				flex: 1;
 				text-align: justify;
+
 				&.expanded {
 					-webkit-line-clamp: unset;
 					overflow: visible;

BIN
static/image/workspace/authorityIcon.png


BIN
static/image/workspace/throughIcon.png


+ 11 - 0
store/modules/user.js

@@ -5,6 +5,7 @@ const userStore = {
 		token:uni.getStorageSync('token') || '',//token
 		userInfo:uni.getStorageSync('userInfo') || {},//用户信息
 		schoolsList:uni.getStorageSync('schoolsList') || '',//schoolsList
+		modulesList:uni.getStorageSync('modulesList') || [],//模块权限列表
 		
 	},
 	mutations: {
@@ -24,13 +25,19 @@ const userStore = {
 			state.token = '';
 			state.userInfo = {};
 			state.schoolsList = '';
+			state.modulesList = [];
 			uni.removeStorageSync('token');
 			uni.removeStorageSync('userInfo');
 			uni.removeStorageSync('schoolsList');
+			uni.removeStorageSync('modulesList');
 		},
 		//保存学校
 		SET_SCHOOLSLIST(state,list){
 			state.schoolsList = list;
+		},
+		//保存模块权限列表
+		SET_MODULESLIST(state,list){
+			state.modulesList = list;
 		}
 	},
 	getters: {
@@ -97,6 +104,10 @@ const userStore = {
 		//保存学校
 		setSchoolsList({ commit }, list){
 			commit('SET_SCHOOLSLIST', list);
+		},
+		//保存模块权限列表
+		setModulesList({ commit }, list){
+			commit('SET_MODULESLIST', list);
 		}
 	}
 }