|
|
@@ -1,52 +1,39 @@
|
|
|
<template>
|
|
|
- <view class="page_workspace">
|
|
|
+ <view class="page_workspace"
|
|
|
+ :style="{ paddingTop: statusBarHeight + 160 + 'rpx', paddingBottom: safeAreaBottom + 150 + 'rpx' }">
|
|
|
<page-header></page-header>
|
|
|
<scroll-view scroll-y class="workspace_content">
|
|
|
<!-- 系统列表 -->
|
|
|
<view class="system_list">
|
|
|
- <view class="section_title">系统列表</view>
|
|
|
-
|
|
|
<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)"
|
|
|
- >
|
|
|
+ <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 class="bottom_grid">
|
|
|
- <view
|
|
|
- v-for="(item, index) in bottomCards"
|
|
|
- :key="index"
|
|
|
- class="small_item"
|
|
|
- @click="handleSystemClick(item)"
|
|
|
- >
|
|
|
+ <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)"
|
|
|
- >
|
|
|
+ <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>
|
|
|
@@ -95,7 +82,8 @@
|
|
|
</view>
|
|
|
<view class="calendar_days">
|
|
|
<view v-for="day in calendarDays" :key="day.fullDate" class="day_item"
|
|
|
- :class="{ active: day.isActive, weekend: day.isWeekend, today: day.isToday }" @click="handleDayClick(day)">
|
|
|
+ :class="{ active: day.isActive, weekend: day.isWeekend, today: day.isToday }"
|
|
|
+ @click="handleDayClick(day)">
|
|
|
<text class="day_text">{{ day.date }}</text>
|
|
|
<view class="schedule_dot" :class="{ visible: day.hasSchedule }"></view>
|
|
|
</view>
|
|
|
@@ -104,21 +92,12 @@
|
|
|
<!-- 日程列表 -->
|
|
|
<view class="schedule_list">
|
|
|
<view class="schedule_title">当日日程</view>
|
|
|
- <no-data v-if="scheduleList.length === 0" centered text="暂无日程安排" />
|
|
|
- <view
|
|
|
- v-else
|
|
|
- v-for="item in scheduleList"
|
|
|
- :key="item.id"
|
|
|
- class="schedule_item"
|
|
|
- >
|
|
|
+ <no-data v-if="scheduleList.length === 0" text="暂无日程安排" />
|
|
|
+ <view v-else v-for="item in scheduleList" :key="item.id" class="schedule_item">
|
|
|
<view class="schedule_dot"></view>
|
|
|
<view class="schedule_text_container">
|
|
|
- <text class="schedule_text" :class="{ expanded: expandedItems[item.id] }">{{ item.title }}</text>
|
|
|
- <text
|
|
|
- v-if="item.title.length > 30"
|
|
|
- class="toggle_text"
|
|
|
- @click.stop="toggleExpand(item.id)"
|
|
|
- >{{ expandedItems[item.id] ? '收起' : '更多' }}</text>
|
|
|
+ <text class="schedule_text" :class="{ expanded: expandedItems[item.id] }">{{ item.title
|
|
|
+ }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -138,13 +117,10 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="modal-body">
|
|
|
- <text class="modal-date">{{ currentYear }}-{{ String(currentMonth).padStart(2, '0') }}-{{ String(currentDay).padStart(2, '0') }}日程</text>
|
|
|
- <textarea
|
|
|
- class="schedule-textarea"
|
|
|
- v-model="scheduleContent"
|
|
|
- placeholder="请输入日程内容"
|
|
|
- placeholder-class="textarea-placeholder"
|
|
|
- ></textarea>
|
|
|
+ <text class="modal-date">{{ currentYear }}-{{ String(currentMonth).padStart(2, '0') }}-{{
|
|
|
+ String(currentDay).padStart(2, '0') }}日程</text>
|
|
|
+ <textarea class="schedule-textarea" v-model="scheduleContent" placeholder="请输入日程内容"
|
|
|
+ placeholder-class="textarea-placeholder"></textarea>
|
|
|
</view>
|
|
|
<view class="modal-footer">
|
|
|
<view class="modal-btn cancel-btn" @click="handleCloseModal">
|
|
|
@@ -167,24 +143,27 @@ import { useStore } from 'vuex';
|
|
|
import workspaceApi from '@/reqApi/workspace.js';
|
|
|
import PageHeader from '@/components/page-header.vue';
|
|
|
import NoData from '@/components/no-data.vue';
|
|
|
+import CommonTabbar from '@/components/commonTabbar.vue';
|
|
|
+import { useSafeArea } from '@/common/safeArea';
|
|
|
|
|
|
const store = useStore();
|
|
|
const schoolName = ref('');
|
|
|
+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: '大数据精准教学诊断平台', 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: '', 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));
|
|
|
@@ -262,12 +241,12 @@ const getWeekRange = (date) => {
|
|
|
const updateCalendarDays = () => {
|
|
|
const days = [];
|
|
|
const { monday } = getWeekRange(new Date(currentYear.value, currentMonth.value - 1, currentDay.value));
|
|
|
-
|
|
|
+
|
|
|
weekStartDate.value = monday;
|
|
|
const sunday = new Date(monday);
|
|
|
sunday.setDate(monday.getDate() + 6);
|
|
|
weekEndDate.value = sunday;
|
|
|
-
|
|
|
+
|
|
|
for (let i = 0; i < 7; i++) {
|
|
|
const date = new Date(monday);
|
|
|
date.setDate(monday.getDate() + i);
|
|
|
@@ -291,7 +270,7 @@ const fetchScheduleList = async () => {
|
|
|
const { monday, sunday } = getWeekRange(new Date(currentYear.value, currentMonth.value - 1, currentDay.value));
|
|
|
const startDate = `${monday.getFullYear()}-${String(monday.getMonth() + 1).padStart(2, '0')}-${String(monday.getDate()).padStart(2, '0')}`;
|
|
|
const endDate = `${sunday.getFullYear()}-${String(sunday.getMonth() + 1).padStart(2, '0')}-${String(sunday.getDate()).padStart(2, '0')}`;
|
|
|
-
|
|
|
+
|
|
|
isLoading.value = true;
|
|
|
try {
|
|
|
const res = await workspaceApi.getSchedule({ startDate, endDate });
|
|
|
@@ -324,6 +303,7 @@ const updateYearMonthIndex = () => {
|
|
|
};
|
|
|
|
|
|
onMounted(() => {
|
|
|
+ initSafeArea();
|
|
|
schoolName.value = store.state.userStore.userInfo.schoolName || '';
|
|
|
generateYearList();
|
|
|
generateMonthList();
|
|
|
@@ -340,7 +320,7 @@ const handleSystemClick = (item) => {
|
|
|
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'
|
|
|
@@ -350,13 +330,17 @@ const handleSystemClick = (item) => {
|
|
|
url: '/pages/notice/mine/index?hideTabbar=true'
|
|
|
});
|
|
|
}
|
|
|
- } else if(item.key === 'materialCollection'){
|
|
|
+ } else if (item.key === 'materialCollection') {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/materialCollection/taskOverview/index'
|
|
|
});
|
|
|
- } else if(item.key == 'teacherStudy' || item.key == 'studentStudy' || item.key == 'teacherHonor'){//教师研修 学生学习 教师发展
|
|
|
+ } else if (item.key == 'teacherStudy') {//教师研修
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/teacherStudy/index'
|
|
|
+ });
|
|
|
+ } else if (item.key == 'studentStudy') {//学生学习
|
|
|
uni.navigateTo({
|
|
|
- url: `/pages/${item.key}/index`
|
|
|
+ url: '/pages/studentStudy/index'
|
|
|
});
|
|
|
} else {
|
|
|
uni.showToast({ title: `即将打开:${item.name}`, icon: 'none' });
|
|
|
@@ -364,7 +348,7 @@ const handleSystemClick = (item) => {
|
|
|
};
|
|
|
|
|
|
const handleViewSchedule = () => {
|
|
|
- uni.navigateTo({
|
|
|
+ uni.navigateTo({
|
|
|
url: '/pages/workspace/schedule'
|
|
|
});
|
|
|
};
|
|
|
@@ -512,16 +496,13 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
.page_workspace {
|
|
|
min-height: 100vh;
|
|
|
background-color: #F8F9FD;
|
|
|
- padding-bottom: env(safe-area-inset-bottom);
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.workspace_content {
|
|
|
- padding-top: calc(140rpx + env(safe-area-inset-top));
|
|
|
- padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
|
|
|
padding-left: 24rpx;
|
|
|
padding-right: 24rpx;
|
|
|
- height: 100vh;
|
|
|
+ height: 100%;
|
|
|
box-sizing: border-box;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
@@ -794,7 +775,7 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
height: 8rpx;
|
|
|
background-color: transparent;
|
|
|
border-radius: 50%;
|
|
|
-
|
|
|
+
|
|
|
&.visible {
|
|
|
background-color: #2E64FA;
|
|
|
}
|
|
|
@@ -808,9 +789,7 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
background: #F9FAFF;
|
|
|
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
|
|
padding: $spacing-lg;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- flex: 1;
|
|
|
+
|
|
|
.schedule_title {
|
|
|
font-size: 28rpx;
|
|
|
font-weight: 500;
|
|
|
@@ -848,24 +827,23 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
color: #666666;
|
|
|
line-height: 1.6;
|
|
|
display: -webkit-box;
|
|
|
- -webkit-box-orient: vertical;
|
|
|
- -webkit-line-clamp: 2;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
-
|
|
|
+ flex: 1;
|
|
|
+ text-align: justify;
|
|
|
&.expanded {
|
|
|
-webkit-line-clamp: unset;
|
|
|
overflow: visible;
|
|
|
text-overflow: unset;
|
|
|
+ padding-right: 0;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.toggle_text {
|
|
|
- font-size: 24rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
color: #2E64FA;
|
|
|
- float: right;
|
|
|
- margin-top: 14rpx;
|
|
|
- display: inline;
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ line-height: 1.6;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -875,7 +853,8 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
gap: 16rpx;
|
|
|
height: 56rpx;
|
|
|
background-color: #FFFFFF;
|
|
|
- border-radius: 12rpx 12rpx 12rpx 12rpx;;
|
|
|
+ border-radius: 12rpx 12rpx 12rpx 12rpx;
|
|
|
+ ;
|
|
|
border: 1px solid #2E64FA;
|
|
|
|
|
|
.btn_text {
|
|
|
@@ -971,6 +950,7 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
padding: 28rpx 40rpx;
|
|
|
gap: 16rpx;
|
|
|
border-top: 2rpx solid #EBEEF5;
|
|
|
+
|
|
|
.modal-btn {
|
|
|
height: 72rpx;
|
|
|
// padding: 0 48rpx;
|
|
|
@@ -997,4 +977,4 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|