|
|
@@ -1,21 +1,57 @@
|
|
|
<template>
|
|
|
<view class="page_workspace">
|
|
|
<page-header></page-header>
|
|
|
- <view class="workspace_content">
|
|
|
+ <scroll-view scroll-y class="workspace_content">
|
|
|
<!-- 系统列表 -->
|
|
|
<view class="system_list">
|
|
|
<view class="section_title">系统列表</view>
|
|
|
- <view class="system_grid">
|
|
|
- <view
|
|
|
- v-for="(item, index) in systemItems"
|
|
|
- :key="index"
|
|
|
- class="system_item"
|
|
|
- @click="handleSystemClick(item)"
|
|
|
- >
|
|
|
- <image :src="item.image" class="system_icon" mode="aspectFit"></image>
|
|
|
- <text class="system_name">{{ item.name }}</text>
|
|
|
+
|
|
|
+ <template v-if="largeCard?.visible">
|
|
|
+ <view class="system_grid_with_large">
|
|
|
+ <view class="large_card" @click="handleSystemClick(largeCard)">
|
|
|
+ <image :src="largeCard.image" class="large_icon" mode="aspectFit"></image>
|
|
|
+ <text class="large_name">{{ largeCard.name }}</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="right_top_grid">
|
|
|
+ <view
|
|
|
+ v-for="(item, index) in rightTopCards"
|
|
|
+ :key="index"
|
|
|
+ class="small_item"
|
|
|
+ @click="handleSystemClick(item)"
|
|
|
+ >
|
|
|
+ <image :src="item.image" class="small_icon" mode="aspectFit"></image>
|
|
|
+ <text class="small_name">{{ item.name }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+
|
|
|
+ <view class="bottom_grid">
|
|
|
+ <view
|
|
|
+ v-for="(item, index) in bottomCards"
|
|
|
+ :key="index"
|
|
|
+ class="small_item"
|
|
|
+ @click="handleSystemClick(item)"
|
|
|
+ >
|
|
|
+ <image :src="item.image" class="small_icon" mode="aspectFit"></image>
|
|
|
+ <text class="small_name">{{ item.name }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-else>
|
|
|
+ <view class="system_grid_full">
|
|
|
+ <view
|
|
|
+ v-for="(item, index) in allSmallCards"
|
|
|
+ :key="index"
|
|
|
+ class="small_item"
|
|
|
+ @click="handleSystemClick(item)"
|
|
|
+ >
|
|
|
+ <image :src="item.image" class="small_icon" mode="aspectFit"></image>
|
|
|
+ <text class="small_name">{{ item.name }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
<!-- 校历安排 -->
|
|
|
<view class="calendar_section">
|
|
|
@@ -91,7 +127,7 @@
|
|
|
<text class="btn_text">新增日程</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </scroll-view>
|
|
|
|
|
|
<view v-if="showAddScheduleModal" class="modal-overlay" @click="handleCloseModal">
|
|
|
<view class="modal-content" @click.stop>
|
|
|
@@ -136,18 +172,27 @@ const store = useStore();
|
|
|
const schoolName = ref('');
|
|
|
|
|
|
const systemItems = ref([
|
|
|
- { name: '精准教学', key:'', image: '/static/image/workspace/icon1.png' },
|
|
|
- { name: '教师研修', key:'teacherStudy', image: '/static/image/workspace/icon2.png' },
|
|
|
- { name: '协同备课', key:'', image: '/static/image/workspace/icon3.png' },
|
|
|
- { name: '材料采集', key:'', image: '/static/image/workspace/icon4.png' },
|
|
|
- { name: '教师发展', key:'', image: '/static/image/workspace/icon5.png' },
|
|
|
- { name: '校内通知', key:'notice', image: '/static/image/workspace/icon6.png' },
|
|
|
- { name: '选择题判分', key:'', image: '/static/image/workspace/icon7.png' },
|
|
|
- { name: '智能选课', key:'', image: '/static/image/workspace/icon8.png' },
|
|
|
- { name: '学生学习', key:'', image: '/static/image/workspace/icon9.png' },
|
|
|
- { name: '基础数据', key:'', image: '/static/image/workspace/icon10.png' }
|
|
|
+ { 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:'', 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:'', 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:'', 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 }
|
|
|
]);
|
|
|
|
|
|
+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));
|
|
|
+const bottomCards = computed(() => smallCards.value.slice(4));
|
|
|
+const allSmallCards = computed(() => smallCards.value);
|
|
|
+
|
|
|
const weekdays = ['日', '一', '二', '三', '四', '五', '六'];
|
|
|
|
|
|
const calendarDays = ref([]);
|
|
|
@@ -292,9 +337,19 @@ onShow(() => {
|
|
|
|
|
|
const handleSystemClick = (item) => {
|
|
|
if (item.key === 'notice') {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/notice/overview/index'
|
|
|
- });
|
|
|
+ const userInfo = store.state.userStore.userInfo || uni.getStorageSync('userInfo') || {};
|
|
|
+ const roleCodes = userInfo.roleCodes || [];
|
|
|
+ const isSchoolManager = Array.isArray(roleCodes) && roleCodes.includes('SCHOOL_MANAGER');
|
|
|
+
|
|
|
+ if (isSchoolManager) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/notice/overview/index'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/notice/mine/index?hideTabbar=true'
|
|
|
+ });
|
|
|
+ }
|
|
|
}else if(item.key == 'teacherStudy'){
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/teacherStudy/index'
|
|
|
@@ -458,7 +513,10 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
}
|
|
|
|
|
|
.workspace_content {
|
|
|
- padding: 140rpx 24rpx 30rpx 24rpx;
|
|
|
+ padding: 140rpx 24rpx 140rpx 24rpx;
|
|
|
+ height: 100vh;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
|
|
|
// 系统列表
|
|
|
@@ -473,25 +531,122 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
margin-bottom: $spacing-sm;
|
|
|
}
|
|
|
|
|
|
- .system_grid {
|
|
|
- display: grid;
|
|
|
- grid-template-columns: repeat(4, 130rpx);
|
|
|
- justify-content: space-between;
|
|
|
+ .system_grid_with_large {
|
|
|
+ display: flex;
|
|
|
+ gap: 20rpx;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+
|
|
|
+ .large_card {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ background-color: #EAF0FF;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ width: 324rpx;
|
|
|
+ height: 352rpx;
|
|
|
+ // padding: 30rpx 0;
|
|
|
+
|
|
|
+ .large_icon {
|
|
|
+ width: 160rpx;
|
|
|
+ height: 160rpx;
|
|
|
+ margin-bottom: 32rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .large_name {
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #333333;
|
|
|
+ font-weight: 500;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 48rpx;
|
|
|
+ width: 276rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .right_top_grid {
|
|
|
+ flex: 1;
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(2, 1fr);
|
|
|
+ gap: 16rpx;
|
|
|
+
|
|
|
+ .small_item {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ // border-radius: 12rpx;
|
|
|
+ // padding: 20rpx 0;
|
|
|
+
|
|
|
+ .small_icon {
|
|
|
+ width: 96rpx;
|
|
|
+ height: 96rpx;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .small_name {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: $text-secondary;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- .system_item {
|
|
|
- @include flex-column;
|
|
|
- padding: 20rpx 0;
|
|
|
+ .bottom_grid {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(4, 1fr);
|
|
|
+ gap: 16rpx;
|
|
|
+
|
|
|
+ .small_item {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ border-radius: 12rpx;
|
|
|
+ padding: 20rpx 0;
|
|
|
+
|
|
|
+ .small_icon {
|
|
|
+ width: 96rpx;
|
|
|
+ height: 96rpx;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+ }
|
|
|
|
|
|
- .system_icon {
|
|
|
- width: 96rpx;
|
|
|
- height: 96rpx;
|
|
|
- margin-bottom: 20rpx;
|
|
|
+ .small_name {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: $text-secondary;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .system_name {
|
|
|
- font-size: $font-xxs;
|
|
|
- color: $text-secondary;
|
|
|
+ .system_grid_full {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(4, 1fr);
|
|
|
+ gap: 16rpx;
|
|
|
+
|
|
|
+ .small_item {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ border-radius: 12rpx;
|
|
|
+ padding: 20rpx 0;
|
|
|
+
|
|
|
+ .small_icon {
|
|
|
+ width: 64rpx;
|
|
|
+ height: 64rpx;
|
|
|
+ margin-bottom: 12rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .small_name {
|
|
|
+ font-size: 22rpx;
|
|
|
+ color: $text-secondary;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|