| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223 |
- <template>
- <view class="page_workspace"
- :style="{ paddingBottom: safeAreaBottom + 150 + 'rpx' }">
- <!-- <pageHeader></pageHeader> -->
- <nav-bar height="112" :title="state.schoolName" rightType="select" :onlyTitle="false" :showFilterPicker="false" :showTabs="false" :showTabBtns="false" leftWidth="0rpx" rightWidth="0rpx">
- <template #headRightIcon>
- <view class="select_box" v-if="schoolsList?.length>1" @click="ChangeSchoolInfo">
- <view class="select_label">切换学校</view>
- <image src="@/static/image/icon/arrow_down.png" class="select_icon"></image>
- </view>
- </template>
- </nav-bar>
- <scroll-view scroll-y class="workspace_content">
- <!-- 系统列表 -->
- <view class="system_list">
- <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>
- <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>
- </view>
- </view>
- <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>
- </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 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>
- </view>
- </template>
- </view>
- <!-- 校历安排 -->
- <view class="calendar_section">
- <view class="calendar_header">
- <text class="section_title">校历安排</text>
- <text class="view_schedule" @click="handleViewSchedule">查看日程</text>
- </view>
- <!-- 日历工具栏 -->
- <view class="calendar_toolbar">
- <view class="year_month_select">
- <picker :value="yearIndex" :range="yearList" @change="handleYearChange" class="select_item">
- <view class="select_content">
- <text class="select_text">{{ yearList[yearIndex] }}</text>
- <uni-icons type="down" size="20" color="#999999"></uni-icons>
- </view>
- </picker>
- <picker :value="monthIndex" :range="monthList" @change="handleMonthChange" class="select_item">
- <view class="select_content">
- <text class="select_text">{{ monthList[monthIndex] }}</text>
- <uni-icons type="down" size="20" color="#999999"></uni-icons>
- </view>
- </picker>
- </view>
- <view class="week_nav">
- <view class="nav_btn" @click="handlePrevWeek">
- <text class="nav_text">上一周</text>
- </view>
- <view class="nav_btn" @click="handleNextWeek">
- <text class="nav_text">下一周</text>
- </view>
- </view>
- </view>
- <!-- 日历网格 -->
- <view v-if="isLoading" class="loading-container">
- <view class="loading-spinner"></view>
- <text class="loading-text">加载中...</text>
- </view>
- <view v-else class="calendar_grid">
- <view class="calendar_weekday">
- <text v-for="day in weekdays" :key="day" class="weekday_text">{{ day }}</text>
- </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)">
- <text class="day_text">{{ day.date }}</text>
- <view class="schedule_dot" :class="{ visible: day.hasSchedule }"></view>
- </view>
- </view>
- </view>
- <!-- 日程列表 -->
- <view class="schedule_list">
- <view class="schedule_title">当日日程</view>
- <noData 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>
- </view>
- </view>
- </view>
- <view class="add_schedule_btn" @click="handleAddSchedule">
- <image src="@/static/image/workspace/add_icon.png" class="add_icon" mode="aspectFit"></image>
- <text class="btn_text">新增日程</text>
- </view>
- </view>
- </scroll-view>
- <view v-if="showAddScheduleModal" class="modal-overlay" @click="handleCloseModal">
- <view class="modal-content" @click.stop>
- <view class="modal-header">
- <text class="modal-title">新增日程</text>
- <view class="modal-close" @click="handleCloseModal">
- <image src="@/static/image/workspace/close.png" class="close-icon" mode="aspectFit"></image>
- </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>
- </view>
- <view class="modal-footer">
- <view class="modal-btn cancel-btn" @click="handleCloseModal">
- <text>取消</text>
- </view>
- <view class="modal-btn confirm-btn" @click="handleConfirmSchedule">
- <text>确定</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <common-tabbar></common-tabbar>
- <!-- 提示框 -->
- <popup-dialog ref="schoolPopupDialogRef" popType="custom" title="选择学校" @DialogConfirm="DialogSchoolConfirm">
- <view class="school_list">
- <view :class="['list_item',{active:state.schoolId==item.schoolId}]" @click="SelectSchool(item.schoolId)" v-for="item in schoolsList" :key="item.schoolId">
- <view class="school_logo">
- <image class="logo" v-if="item.schoolLogoUrl" :src="item.schoolLogoUrl"></image>
- <image class="logo" v-else src="@/static/image/bg/default_user.png"></image>
- </view>
- <text class="school_name">{{item.schoolName}}</text>
- <uni-icons class="item_right" type="right"></uni-icons>
- </view>
- </view>
- </popup-dialog>
- </template>
- <script setup>
- import { ref, onMounted,reactive, computed } from 'vue';
- import { onShow } from '@dcloudio/uni-app';
- import { useStore } from 'vuex';
- import workspaceApi from '@/reqApi/workspace.js';
- import navBar from '@/components/navBar.vue';
- import popupDialog from '@/components/popupDialog.vue';
- // import PageHeader from '@/components/pageHeader.vue';
- import NoData from '@/components/noData.vue';
- import CommonTabbar from '@/components/commonTabbar.vue';
- import { useSafeArea } from '@/common/safeArea';
- import user from '@/reqApi/user.js';
- const store = useStore();
- const { statusBarHeight, safeAreaBottom, initSafeArea } = useSafeArea();
- const systemItems = ref([
- { 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 schoolPopupDialogRef = ref(null);//选择学校
- const schoolsList = computed(()=>store.state.userStore.schoolsList);
- const state = reactive({
- schoolName:'',
- schoolId:''
- });
- 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));
- const bottomCards = computed(() => smallCards.value.slice(4));
- const allSmallCards = computed(() => smallCards.value);
- const weekdays = ['日', '一', '二', '三', '四', '五', '六'];
- const calendarDays = ref([]);
- const scheduleEvents = ref({});
- const isLoading = ref(false);
- const today = new Date();
- const todayStr = `${today.getFullYear()}-${String(today.getMonth() + 1).padStart(2, '0')}-${String(today.getDate()).padStart(2, '0')}`;
- const currentYear = ref(new Date().getFullYear());
- const currentMonth = ref(new Date().getMonth() + 1);
- const currentDay = ref(new Date().getDate());
- const weekStartDate = ref(null);
- const weekEndDate = ref(null);
- const yearList = ref([]);
- const monthList = ref([]);
- const yearIndex = ref(0);
- const monthIndex = ref(0);
- const expandedItems = ref({});
- const toggleExpand = (id) => {
- expandedItems.value[id] = !expandedItems.value[id];
- };
- const scheduleList = computed(() => {
- const dateKey = `${currentYear.value}-${String(currentMonth.value).padStart(2, '0')}-${String(currentDay.value).padStart(2, '0')}`;
- return scheduleEvents.value[dateKey] || [];
- });
- const weekDateRange = computed(() => {
- if (!weekStartDate.value || !weekEndDate.value) return '';
- return `${weekStartDate.value.getFullYear()}年${weekStartDate.value.getMonth() + 1}月${weekStartDate.value.getDate()}日 - ${weekEndDate.value.getFullYear()}年${weekEndDate.value.getMonth() + 1}月${weekEndDate.value.getDate()}日`;
- });
- const generateYearList = () => {
- const years = [];
- for (let i = currentYear.value - 5; i <= currentYear.value + 5; i++) {
- years.push(`${i}年`);
- }
- yearList.value = years;
- };
- const generateMonthList = () => {
- const months = [];
- for (let i = 1; i <= 12; i++) {
- months.push(`${i}月`);
- }
- monthList.value = months;
- };
- const getWeekRange = (date) => {
- const d = new Date(date);
- const day = d.getDay();
- const diff = day === 0 ? -6 : 1 - day;
- const monday = new Date(d);
- monday.setDate(d.getDate() + diff);
- monday.setHours(0, 0, 0, 0);
- const sunday = new Date(monday);
- sunday.setDate(monday.getDate() + 6);
- sunday.setHours(23, 59, 59, 999);
- return { monday, sunday };
- };
- 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);
- const dayOfWeek = date.getDay();
- const dateKey = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;
- days.push({
- date: date.getDate(),
- fullDate: dateKey,
- year: date.getFullYear(),
- month: date.getMonth() + 1,
- isActive: date.getDate() === currentDay.value && date.getMonth() + 1 === currentMonth.value && date.getFullYear() === currentYear.value,
- isWeekend: dayOfWeek === 0 || dayOfWeek === 6,
- isToday: dateKey === todayStr,
- hasSchedule: !!scheduleEvents.value[dateKey] && scheduleEvents.value[dateKey].length > 0
- });
- }
- calendarDays.value = days;
- };
- 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 });
- updateScheduleEvents(res.data);
- } catch (error) {
- console.error('获取日程列表失败:', error);
- uni.showToast({ title: '获取日程失败,请稍后重试', icon: 'none', duration: 3000 });
- } finally {
- isLoading.value = false;
- }
- };
- const updateScheduleEvents = (data) => {
- Object.keys(scheduleEvents.value).forEach(key => {
- delete scheduleEvents.value[key];
- });
- Object.keys(data).forEach(dateKey => {
- const list = data[dateKey] || [];
- scheduleEvents.value[dateKey] = list.map(item => ({
- id: String(item.id),
- title: item.content || ''
- }));
- });
- updateCalendarDays();
- };
- const updateYearMonthIndex = () => {
- yearIndex.value = yearList.value.indexOf(`${currentYear.value}年`);
- monthIndex.value = monthList.value.indexOf(`${currentMonth.value}月`);
- };
- onMounted(() => {
- getSchoolInfo();
- initSafeArea();
- generateYearList();
- generateMonthList();
- updateYearMonthIndex();
- updateCalendarDays();
- });
- 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 || [];
- 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 === 'materialCollection' || item.key == 'teacherStudy' || item.key == 'studentStudy' || item.key == 'teacherHonor') {//材料采集 教师研修 学生学习 教师发展
- uni.navigateTo({
- url: `/pages/${item.key}/index`
- });
- } else {
- uni.showToast({ title: `即将打开:${item.name}`, icon: 'none' });
- }
- };
- const handleViewSchedule = () => {
- uni.navigateTo({
- url: '/pages/workspace/schedule'
- });
- };
- const handlePrevWeek = () => {
- const currentDate = new Date(currentYear.value, currentMonth.value - 1, currentDay.value);
- currentDate.setDate(currentDate.getDate() - 7);
- currentYear.value = currentDate.getFullYear();
- currentMonth.value = currentDate.getMonth() + 1;
- currentDay.value = currentDate.getDate();
- updateYearMonthIndex();
- updateCalendarDays();
- fetchScheduleList();
- };
- const handleNextWeek = () => {
- const currentDate = new Date(currentYear.value, currentMonth.value - 1, currentDay.value);
- currentDate.setDate(currentDate.getDate() + 7);
- currentYear.value = currentDate.getFullYear();
- currentMonth.value = currentDate.getMonth() + 1;
- currentDay.value = currentDate.getDate();
- updateYearMonthIndex();
- updateCalendarDays();
- fetchScheduleList();
- };
- const handleDayClick = (day) => {
- calendarDays.value.forEach(d => d.isActive = false);
- day.isActive = true;
- currentYear.value = day.year;
- currentMonth.value = day.month;
- currentDay.value = day.date;
- updateYearMonthIndex();
- };
- const handleYearChange = (e) => {
- yearIndex.value = e.detail.value;
- currentYear.value = parseInt(yearList.value[e.detail.value].replace('年', ''));
- updateCalendarDays();
- fetchScheduleList();
- };
- const handleMonthChange = (e) => {
- monthIndex.value = e.detail.value;
- currentMonth.value = parseInt(monthList.value[e.detail.value].replace('月', ''));
- updateCalendarDays();
- fetchScheduleList();
- };
- const showAddScheduleModal = ref(false);
- const scheduleContent = ref('');
- const handleAddSchedule = () => {
- showAddScheduleModal.value = true;
- scheduleContent.value = '';
- };
- const handleCloseModal = () => {
- showAddScheduleModal.value = false;
- scheduleContent.value = '';
- };
- const handleConfirmSchedule = async () => {
- if (!scheduleContent.value.trim()) {
- uni.showToast({ title: '请输入日程内容', icon: 'none' });
- return;
- }
- const scheduleDate = `${currentYear.value}-${String(currentMonth.value).padStart(2, '0')}-${String(currentDay.value).padStart(2, '0')}`;
- try {
- await workspaceApi.saveSchedule({
- content: scheduleContent.value.trim(),
- scheduleDate
- });
- uni.showToast({ title: '添加成功', icon: 'success' });
- showAddScheduleModal.value = false;
- scheduleContent.value = '';
- fetchScheduleList();
- } catch (error) {
- console.error('添加日程失败:', error);
- uni.showToast({ title: '添加日程失败,请稍后重试', icon: 'none', duration: 3000 });
- }
- };
- //获取学生信息
- const getSchoolInfo = () => {
- state.schoolName = store.state.userStore.userInfo.schoolName;
- console.log(state.schoolName,323233)
- state.schoolId = store.state.userStore.userInfo.schoolId;
- }
- //切换学校弹框
- const ChangeSchoolInfo = () => {
- schoolPopupDialogRef.value.OpenDialog();
- }
- const SelectSchool = (schoolId) => {
- state.schoolId = schoolId;
- }
- //切换学校
- const DialogSchoolConfirm = () => {
- user.chooseBelongSchool({
- schoolId:state.schoolId,
- deviceType:'APP'
- }).then(res=>{
- if(res.code == 200){
- state.schoolName = res?.data?.schoolName || '';
- store.dispatch('setUserInfo');
- }
- })
- }
- </script>
- <style lang="scss">
- $primary-color: #2E64FA;
- $text-primary: #333333;
- $text-secondary: #666666;
- $text-tertiary: #999999;
- $bg-color: #F5F7FA;
- $bg-white: #FFFFFF;
- $border-color: #F0F0F0;
- $header-border: #EEEEEE;
- $font-lg: 44rpx;
- $font-md: 34rpx;
- $font-sm: 32rpx;
- $font-xs: 26rpx;
- $font-xxs: 24rpx;
- $radius-lg: 20rpx;
- $radius-md: 12rpx;
- $radius-sm: 8rpx;
- $radius-circle: 50%;
- $spacing-xl: 80rpx;
- $spacing-lg: 32rpx;
- $spacing-md: 24rpx;
- $spacing-sm: 24rpx;
- $spacing-xs: 16rpx;
- $spacing-xxs: 12rpx;
- $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
- @mixin flex-center {
- display: flex;
- justify-content: center;
- align-items: center;
- }
- @mixin flex-between {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- @mixin flex-column {
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- @mixin bg-card {
- background-color: $bg-white;
- border-radius: $radius-lg;
- padding: $spacing-md;
- }
- @mixin text-ellipsis {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .page_workspace {
- min-height: 100vh;
- background-color: #F8F9FD;
- box-sizing: border-box;
- }
- .workspace_content {
- padding-left: 24rpx;
- padding-right: 24rpx;
- height: 100%;
- box-sizing: border-box;
- overflow: hidden;
- }
- // 系统列表
- .system_list {
- @include bg-card;
- margin-bottom: $spacing-sm;
- .section_title {
- font-size: $font-sm;
- font-weight: 500;
- color: $text-primary;
- margin-bottom: $spacing-sm;
- }
- .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;
- 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;
- 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;
- position: relative;
- .card_dot {
- position: absolute;
- top: -2rpx;
- right: 12rpx;
- width: 32rpx;
- height: 32rpx;
- z-index: 10;
- img{
- width: 32rpx;
- height: 32rpx;
- }
- }
- .dot-green {
- background-color: #52C41A;
- }
- .dot-red {
- background-color: #F5222D;
- }
- .small_icon {
- width: 96rpx;
- height: 96rpx;
- margin-bottom: 20rpx;
- }
- .small_name {
- font-size: 28rpx;
- color: $text-secondary;
- text-align: center;
- }
- }
- }
- }
- .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;
- position: relative;
- .card_dot {
- position: absolute;
- top: 12rpx;
- right: 12rpx;
- width: 32rpx;
- height: 32rpx;
- z-index: 10;
- img{
- width: 32rpx;
- height: 32rpx;
- }
- }
- .dot-green {
- background-color: #52C41A;
- }
- .dot-red {
- background-color: #F5222D;
- }
- .small_icon {
- width: 96rpx;
- height: 96rpx;
- margin-bottom: 20rpx;
- }
- .small_name {
- font-size: 28rpx;
- color: $text-secondary;
- text-align: center;
- }
- }
- }
- .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;
- position: relative;
- .card_dot {
- position: absolute;
- top: 12rpx;
- right: 12rpx;
- width: 12rpx;
- height: 12rpx;
- border-radius: 50%;
- img{
- width: 12rpx;
- height: 12rpx;
- }
- }
- .dot-green {
- background-color: #52C41A;
- }
- .dot-red {
- background-color: #F5222D;
- }
- .small_icon {
- width: 64rpx;
- height: 64rpx;
- margin-bottom: 12rpx;
- }
- .small_name {
- font-size: 22rpx;
- color: $text-secondary;
- text-align: center;
- }
- }
- }
- }
- // 日程
- .calendar_section {
- @include bg-card;
- .calendar_header {
- @include flex-between;
- margin-bottom: 32rpx;
- .section_title {
- font-size: $font-sm;
- font-weight: 500;
- color: $text-primary;
- }
- .view_schedule {
- font-size: 28rpx;
- color: $primary-color;
- }
- }
- .calendar_toolbar {
- display: flex;
- gap: 18rpx;
- padding-bottom: 32rpx;
- .year_month_select {
- display: flex;
- gap: 18rpx;
- flex: 1;
- .select_item {
- flex: 1;
- // @include flex-center;
- gap: 8rpx;
- padding: 0;
- height: 72rpx;
- background-color: #FFFFFF;
- border-radius: 8rpx;
- border: 2rpx solid #DCDFE6;
- .select_content {
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 81%;
- padding: 0 16rpx;
- height: 72rpx;
- }
- .select_text {
- font-size: $font-xs;
- color: $text-primary;
- }
- }
- }
- .week_nav {
- display: flex;
- gap: 18rpx;
- .nav_btn {
- width: 122rpx;
- height: 72rpx;
- @include flex-center;
- background-color: #FFFFFF;
- border-radius: 8rpx;
- border: 2rpx solid #DCDFE6;
- .nav_text {
- font-size: $font-xs;
- color: $text-secondary;
- }
- }
- }
- }
- .calendar_grid {
- margin-bottom: $spacing-lg;
- .calendar_weekday {
- display: flex;
- margin-bottom: $spacing-xs;
- .weekday_text {
- flex: 1;
- text-align: center;
- font-size: 28rpx;
- color: $text-secondary;
- }
- }
- .calendar_days {
- display: flex;
- justify-content: space-around;
- align-items: center;
- height: 80rpx;
- .day_item {
- flex-shrink: 0;
- box-sizing: border-box;
- display: flex;
- justify-content: center;
- align-items: center;
- width: 80rpx;
- height: 80rpx;
- border-radius: 50%;
- border: 2rpx solid transparent;
- position: relative;
- &.active {
- background-color: rgba(46, 100, 250, 0.1);
- border-color: #2E64FA;
- .day_text {
- color: #2E64FA;
- }
- }
- .day_text {
- font-size: $font-sm;
- color: $text-primary;
- }
- &.weekend:not(.active) {
- .day_text {
- color: #999999;
- }
- }
- .schedule_dot {
- position: absolute;
- bottom: 12rpx;
- width: 8rpx;
- height: 8rpx;
- background-color: transparent;
- border-radius: 50%;
- &.visible {
- background-color: #2E64FA;
- }
- }
- }
- }
- }
- .schedule_list {
- margin-bottom: $spacing-lg;
- background: #F9FAFF;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- padding: $spacing-lg;
- .schedule_title {
- font-size: 28rpx;
- font-weight: 500;
- color: $text-primary;
- margin-bottom: $spacing-xs;
- }
- .schedule_item {
- display: flex;
- align-items: flex-start;
- padding: 24rpx 0;
- border-bottom: 2rpx solid #EBEEF5;
- &:last-child {
- border-bottom: none;
- }
- .schedule_dot {
- width: 16rpx;
- height: 16rpx;
- background-color: $primary-color;
- border-radius: $radius-circle;
- margin-top: 14rpx;
- margin-right: 14rpx;
- flex-shrink: 0;
- }
- .schedule_text_container {
- flex: 1;
- position: relative;
- }
- .schedule_text {
- font-size: 28rpx;
- color: #666666;
- line-height: 1.6;
- display: -webkit-box;
- flex: 1;
- text-align: justify;
- &.expanded {
- -webkit-line-clamp: unset;
- overflow: visible;
- text-overflow: unset;
- padding-right: 0;
- }
- }
- .toggle_text {
- font-size: 28rpx;
- color: #2E64FA;
- position: absolute;
- right: 0;
- bottom: 0;
- line-height: 1.6;
- }
- }
- }
- .add_schedule_btn {
- @include flex-center;
- gap: 16rpx;
- height: 56rpx;
- background-color: #FFFFFF;
- border-radius: 12rpx 12rpx 12rpx 12rpx;
- ;
- border: 1px solid #2E64FA;
- .btn_text {
- font-size: 28rpx;
- color: #2E64FA;
- font-weight: 500;
- }
- .add_icon {
- width: 32rpx;
- height: 32rpx;
- }
- }
- }
- .modal-overlay {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: rgba(0, 0, 0, 0.5);
- display: flex;
- justify-content: center;
- align-items: center;
- z-index: 1000;
- }
- .modal-content {
- width: 702rpx;
- background-color: #FFFFFF;
- border-radius: 16rpx;
- overflow: hidden;
- .modal-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 96rpx;
- padding: 0 40rpx;
- background-color: #F5F7FA;
- .modal-title {
- font-size: 32rpx;
- font-weight: 500;
- color: #303133;
- }
- .modal-close {
- width: 60rpx;
- height: 60rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .close-icon {
- width: 40rpx;
- height: 40rpx;
- }
- }
- .modal-body {
- padding: 24rpx;
- .modal-date {
- font-size: 32rpx;
- color: #333333;
- margin-bottom: 24rpx;
- display: block;
- }
- .schedule-textarea {
- width: 100%;
- height: 364rpx;
- padding: 20rpx;
- border: 2rpx solid #E8E8E8;
- border-radius: 12rpx;
- font-size: 28rpx;
- color: #333333;
- box-sizing: border-box;
- }
- .textarea-placeholder {
- color: #999999;
- }
- }
- .modal-footer {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- padding: 28rpx 40rpx;
- gap: 16rpx;
- border-top: 2rpx solid #EBEEF5;
- .modal-btn {
- height: 72rpx;
- // padding: 0 48rpx;
- width: 136rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 28rpx;
- border-radius: 8rpx;
- flex-shrink: 0;
- &.cancel-btn {
- color: #666666;
- background-color: #FFFFFF;
- border: 2rpx solid #DCDFE6;
- height: 68rpx;
- }
- &.confirm-btn {
- color: #FFFFFF;
- background-color: #2E64FA;
- border: none;
- }
- }
- }
- }
- .select_box{
- width: 168rpx;
- height: 48rpx;
- padding: 16rpx;
- flex-shrink: 0;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- background: rgba(46,100,250,0.1);
- border-radius: 8rpx;
- font-weight: 400;
- font-size: 28rpx;
- color: #2E64FA;
- .select_label{
- flex:1;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .select_icon{
- width: 16rpx;
- height:16rpx;
- margin-left: 8rpx;
- }
- }
- :deep(.school_list){
- padding:0 30rpx;
- width: 100%;
- box-sizing: border-box;
- .list_item{
- margin-top: 20rpx;
- display: flex;
- align-items: center;
- width: 100%;
- height: 108rpx;
- background-color: #FFFFFF;
- border-radius: 12rpx;
- border: 1px solid #E4E7ED;
- padding: 20rpx 38rpx 20rpx 24rpx;
- box-sizing: border-box;
- &.active{
- border: 1px solid #2E64FA;
- background-color: rgba(46,100,250,0.1);
- }
- .school_logo{
- width: 68rpx;
- height: 68rpx;
- background: #C2D2FF;
- border-radius: 50%;
- overflow: hidden;
- margin-right: 28rpx;
- .logo{
- width: 100%;
- height: 100%;
- border-radius: 50%;
- }
- }
- .school_name{
- flex: 1;
- height: 68rpx;
- display: inline-flex;
- align-items: center;
- justify-content: flex-start;
- font-weight: 500;
- font-size: 24rpx;
- color: #000000;
- span{
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- overflow: hidden;
- word-break: break-all;
- }
- }
- .item_right{
- margin-left: 28rpx;
- font-size: 36rpx !important;
- color: #999999 !important;
- }
- }
- }
- </style>
|