index.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000
  1. <template>
  2. <view class="page_workspace">
  3. <page-header></page-header>
  4. <scroll-view scroll-y class="workspace_content">
  5. <!-- 系统列表 -->
  6. <view class="system_list">
  7. <view class="section_title">系统列表</view>
  8. <template v-if="largeCard?.visible">
  9. <view class="system_grid_with_large">
  10. <view class="large_card" @click="handleSystemClick(largeCard)">
  11. <image :src="largeCard.image" class="large_icon" mode="aspectFit"></image>
  12. <text class="large_name">{{ largeCard.name }}</text>
  13. </view>
  14. <view class="right_top_grid">
  15. <view
  16. v-for="(item, index) in rightTopCards"
  17. :key="index"
  18. class="small_item"
  19. @click="handleSystemClick(item)"
  20. >
  21. <image :src="item.image" class="small_icon" mode="aspectFit"></image>
  22. <text class="small_name">{{ item.name }}</text>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="bottom_grid">
  27. <view
  28. v-for="(item, index) in bottomCards"
  29. :key="index"
  30. class="small_item"
  31. @click="handleSystemClick(item)"
  32. >
  33. <image :src="item.image" class="small_icon" mode="aspectFit"></image>
  34. <text class="small_name">{{ item.name }}</text>
  35. </view>
  36. </view>
  37. </template>
  38. <template v-else>
  39. <view class="system_grid_full">
  40. <view
  41. v-for="(item, index) in allSmallCards"
  42. :key="index"
  43. class="small_item"
  44. @click="handleSystemClick(item)"
  45. >
  46. <image :src="item.image" class="small_icon" mode="aspectFit"></image>
  47. <text class="small_name">{{ item.name }}</text>
  48. </view>
  49. </view>
  50. </template>
  51. </view>
  52. <!-- 校历安排 -->
  53. <view class="calendar_section">
  54. <view class="calendar_header">
  55. <text class="section_title">校历安排</text>
  56. <text class="view_schedule" @click="handleViewSchedule">查看日程</text>
  57. </view>
  58. <!-- 日历工具栏 -->
  59. <view class="calendar_toolbar">
  60. <view class="year_month_select">
  61. <picker :value="yearIndex" :range="yearList" @change="handleYearChange" class="select_item">
  62. <view class="select_content">
  63. <text class="select_text">{{ yearList[yearIndex] }}</text>
  64. <uni-icons type="down" size="20" color="#999999"></uni-icons>
  65. </view>
  66. </picker>
  67. <picker :value="monthIndex" :range="monthList" @change="handleMonthChange" class="select_item">
  68. <view class="select_content">
  69. <text class="select_text">{{ monthList[monthIndex] }}</text>
  70. <uni-icons type="down" size="20" color="#999999"></uni-icons>
  71. </view>
  72. </picker>
  73. </view>
  74. <view class="week_nav">
  75. <view class="nav_btn" @click="handlePrevWeek">
  76. <text class="nav_text">上一周</text>
  77. </view>
  78. <view class="nav_btn" @click="handleNextWeek">
  79. <text class="nav_text">下一周</text>
  80. </view>
  81. </view>
  82. </view>
  83. <!-- 日历网格 -->
  84. <view v-if="isLoading" class="loading-container">
  85. <view class="loading-spinner"></view>
  86. <text class="loading-text">加载中...</text>
  87. </view>
  88. <view v-else class="calendar_grid">
  89. <view class="calendar_weekday">
  90. <text v-for="day in weekdays" :key="day" class="weekday_text">{{ day }}</text>
  91. </view>
  92. <view class="calendar_days">
  93. <view v-for="day in calendarDays" :key="day.fullDate" class="day_item"
  94. :class="{ active: day.isActive, weekend: day.isWeekend, today: day.isToday }" @click="handleDayClick(day)">
  95. <text class="day_text">{{ day.date }}</text>
  96. <view class="schedule_dot" :class="{ visible: day.hasSchedule }"></view>
  97. </view>
  98. </view>
  99. </view>
  100. <!-- 日程列表 -->
  101. <view class="schedule_list">
  102. <view class="schedule_title">当日日程</view>
  103. <no-data v-if="scheduleList.length === 0" centered text="暂无日程安排" />
  104. <view
  105. v-else
  106. v-for="item in scheduleList"
  107. :key="item.id"
  108. class="schedule_item"
  109. >
  110. <view class="schedule_dot"></view>
  111. <view class="schedule_text_container">
  112. <text class="schedule_text" :class="{ expanded: expandedItems[item.id] }">{{ item.title }}</text>
  113. <text
  114. v-if="item.title.length > 30"
  115. class="toggle_text"
  116. @click.stop="toggleExpand(item.id)"
  117. >{{ expandedItems[item.id] ? '收起' : '更多' }}</text>
  118. </view>
  119. </view>
  120. </view>
  121. <view class="add_schedule_btn" @click="handleAddSchedule">
  122. <image src="/static/image/workspace/add_icon.png" class="add_icon" mode="aspectFit"></image>
  123. <text class="btn_text">新增日程</text>
  124. </view>
  125. </view>
  126. </scroll-view>
  127. <view v-if="showAddScheduleModal" class="modal-overlay" @click="handleCloseModal">
  128. <view class="modal-content" @click.stop>
  129. <view class="modal-header">
  130. <text class="modal-title">新增日程</text>
  131. <view class="modal-close" @click="handleCloseModal">
  132. <image src="/static/image/workspace/close.png" class="close-icon" mode="aspectFit"></image>
  133. </view>
  134. </view>
  135. <view class="modal-body">
  136. <text class="modal-date">{{ currentYear }}-{{ String(currentMonth).padStart(2, '0') }}-{{ String(currentDay).padStart(2, '0') }}日程</text>
  137. <textarea
  138. class="schedule-textarea"
  139. v-model="scheduleContent"
  140. placeholder="请输入日程内容"
  141. placeholder-class="textarea-placeholder"
  142. ></textarea>
  143. </view>
  144. <view class="modal-footer">
  145. <view class="modal-btn cancel-btn" @click="handleCloseModal">
  146. <text>取消</text>
  147. </view>
  148. <view class="modal-btn confirm-btn" @click="handleConfirmSchedule">
  149. <text>确定</text>
  150. </view>
  151. </view>
  152. </view>
  153. </view>
  154. </view>
  155. <common-tabbar></common-tabbar>
  156. </template>
  157. <script setup>
  158. import { ref, onMounted, computed } from 'vue';
  159. import { onShow } from '@dcloudio/uni-app';
  160. import { useStore } from 'vuex';
  161. import workspaceApi from '@/reqApi/workspace.js';
  162. import PageHeader from '@/components/page-header.vue';
  163. import NoData from '@/components/no-data.vue';
  164. const store = useStore();
  165. const schoolName = ref('');
  166. const systemItems = ref([
  167. { name: '大数据精准教学诊断平台', key:'', image: '/static/image/workspace/iconLeft.png', isLarge: true, visible: true },
  168. { name: '选择题判分', key:'', image: '/static/image/workspace/icon1.png', isLarge: false, visible: true },
  169. { name: '材料采集', key:'materialCollection', image: '/static/image/workspace/icon2.png', isLarge: false, visible: true },
  170. { name: '教师研修', key:'teacherStudy', image: '/static/image/workspace/icon3.png', isLarge: false, visible: true },
  171. { name: '学生学习', key:'studentStudy', image: '/static/image/workspace/icon4.png', isLarge: false, visible: true },
  172. { name: '智能选课', key:'', image: '/static/image/workspace/icon5.png', isLarge: false, visible: true },
  173. { name: '教师发展', key:'teacherHonor', image: '/static/image/workspace/icon6.png', isLarge: false, visible: true },
  174. { name: '协同备课', key:'', image: '/static/image/workspace/icon7.png', isLarge: false, visible: true },
  175. { name: '校内通知', key:'notice', image: '/static/image/workspace/icon8.png', isLarge: false, visible: true },
  176. { name: '评教评学', key:'', image: '/static/image/workspace/icon9.png', isLarge: false, visible: true },
  177. { name: '考场编排', key:'', image: '/static/image/workspace/icon10.png', isLarge: false, visible: true },
  178. { name: '听课评课', key:'', image: '/static/image/workspace/icon11.png', isLarge: false, visible: true },
  179. { name: '基础数据', key:'', image: '/static/image/workspace/icon12.png', isLarge: false, visible: true }
  180. ]);
  181. const largeCard = computed(() => systemItems.value.find(item => item.isLarge));
  182. const smallCards = computed(() => systemItems.value.filter(item => !item.isLarge));
  183. const rightTopCards = computed(() => smallCards.value.slice(0, 4));
  184. const bottomCards = computed(() => smallCards.value.slice(4));
  185. const allSmallCards = computed(() => smallCards.value);
  186. const weekdays = ['日', '一', '二', '三', '四', '五', '六'];
  187. const calendarDays = ref([]);
  188. const scheduleEvents = ref({});
  189. const isLoading = ref(false);
  190. const today = new Date();
  191. const todayStr = `${today.getFullYear()}-${String(today.getMonth() + 1).padStart(2, '0')}-${String(today.getDate()).padStart(2, '0')}`;
  192. const currentYear = ref(new Date().getFullYear());
  193. const currentMonth = ref(new Date().getMonth() + 1);
  194. const currentDay = ref(new Date().getDate());
  195. const weekStartDate = ref(null);
  196. const weekEndDate = ref(null);
  197. const yearList = ref([]);
  198. const monthList = ref([]);
  199. const yearIndex = ref(0);
  200. const monthIndex = ref(0);
  201. const expandedItems = ref({});
  202. const toggleExpand = (id) => {
  203. expandedItems.value[id] = !expandedItems.value[id];
  204. };
  205. const scheduleList = computed(() => {
  206. const dateKey = `${currentYear.value}-${String(currentMonth.value).padStart(2, '0')}-${String(currentDay.value).padStart(2, '0')}`;
  207. return scheduleEvents.value[dateKey] || [];
  208. });
  209. const weekDateRange = computed(() => {
  210. if (!weekStartDate.value || !weekEndDate.value) return '';
  211. return `${weekStartDate.value.getFullYear()}年${weekStartDate.value.getMonth() + 1}月${weekStartDate.value.getDate()}日 - ${weekEndDate.value.getFullYear()}年${weekEndDate.value.getMonth() + 1}月${weekEndDate.value.getDate()}日`;
  212. });
  213. const generateYearList = () => {
  214. const years = [];
  215. for (let i = currentYear.value - 5; i <= currentYear.value + 5; i++) {
  216. years.push(`${i}年`);
  217. }
  218. yearList.value = years;
  219. };
  220. const generateMonthList = () => {
  221. const months = [];
  222. for (let i = 1; i <= 12; i++) {
  223. months.push(`${i}月`);
  224. }
  225. monthList.value = months;
  226. };
  227. const getWeekRange = (date) => {
  228. const d = new Date(date);
  229. const day = d.getDay();
  230. const diff = day === 0 ? -6 : 1 - day;
  231. const monday = new Date(d);
  232. monday.setDate(d.getDate() + diff);
  233. monday.setHours(0, 0, 0, 0);
  234. const sunday = new Date(monday);
  235. sunday.setDate(monday.getDate() + 6);
  236. sunday.setHours(23, 59, 59, 999);
  237. return { monday, sunday };
  238. };
  239. const updateCalendarDays = () => {
  240. const days = [];
  241. const { monday } = getWeekRange(new Date(currentYear.value, currentMonth.value - 1, currentDay.value));
  242. weekStartDate.value = monday;
  243. const sunday = new Date(monday);
  244. sunday.setDate(monday.getDate() + 6);
  245. weekEndDate.value = sunday;
  246. for (let i = 0; i < 7; i++) {
  247. const date = new Date(monday);
  248. date.setDate(monday.getDate() + i);
  249. const dayOfWeek = date.getDay();
  250. const dateKey = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;
  251. days.push({
  252. date: date.getDate(),
  253. fullDate: dateKey,
  254. year: date.getFullYear(),
  255. month: date.getMonth() + 1,
  256. isActive: date.getDate() === currentDay.value && date.getMonth() + 1 === currentMonth.value && date.getFullYear() === currentYear.value,
  257. isWeekend: dayOfWeek === 0 || dayOfWeek === 6,
  258. isToday: dateKey === todayStr,
  259. hasSchedule: !!scheduleEvents.value[dateKey] && scheduleEvents.value[dateKey].length > 0
  260. });
  261. }
  262. calendarDays.value = days;
  263. };
  264. const fetchScheduleList = async () => {
  265. const { monday, sunday } = getWeekRange(new Date(currentYear.value, currentMonth.value - 1, currentDay.value));
  266. const startDate = `${monday.getFullYear()}-${String(monday.getMonth() + 1).padStart(2, '0')}-${String(monday.getDate()).padStart(2, '0')}`;
  267. const endDate = `${sunday.getFullYear()}-${String(sunday.getMonth() + 1).padStart(2, '0')}-${String(sunday.getDate()).padStart(2, '0')}`;
  268. isLoading.value = true;
  269. try {
  270. const res = await workspaceApi.getSchedule({ startDate, endDate });
  271. updateScheduleEvents(res.data);
  272. } catch (error) {
  273. console.error('获取日程列表失败:', error);
  274. uni.showToast({ title: '获取日程失败,请稍后重试', icon: 'none', duration: 3000 });
  275. } finally {
  276. isLoading.value = false;
  277. }
  278. };
  279. const updateScheduleEvents = (data) => {
  280. Object.keys(scheduleEvents.value).forEach(key => {
  281. delete scheduleEvents.value[key];
  282. });
  283. Object.keys(data).forEach(dateKey => {
  284. const list = data[dateKey] || [];
  285. scheduleEvents.value[dateKey] = list.map(item => ({
  286. id: String(item.id),
  287. title: item.content || ''
  288. }));
  289. });
  290. updateCalendarDays();
  291. };
  292. const updateYearMonthIndex = () => {
  293. yearIndex.value = yearList.value.indexOf(`${currentYear.value}年`);
  294. monthIndex.value = monthList.value.indexOf(`${currentMonth.value}月`);
  295. };
  296. onMounted(() => {
  297. schoolName.value = store.state.userStore.userInfo.schoolName || '';
  298. generateYearList();
  299. generateMonthList();
  300. updateYearMonthIndex();
  301. updateCalendarDays();
  302. });
  303. onShow(() => {
  304. fetchScheduleList();
  305. });
  306. const handleSystemClick = (item) => {
  307. if (item.key === 'notice') {
  308. const userInfo = store.state.userStore.userInfo || uni.getStorageSync('userInfo') || {};
  309. const roleCodes = userInfo.roleCodes || [];
  310. const isSchoolManager = Array.isArray(roleCodes) && roleCodes.includes('SCHOOL_MANAGER');
  311. if (isSchoolManager) {
  312. uni.navigateTo({
  313. url: '/pages/notice/overview/index'
  314. });
  315. } else {
  316. uni.navigateTo({
  317. url: '/pages/notice/mine/index?hideTabbar=true'
  318. });
  319. }
  320. } else if(item.key === 'materialCollection'){
  321. uni.navigateTo({
  322. url: '/pages/materialCollection/taskOverview/index'
  323. });
  324. } else if(item.key == 'teacherStudy' || item.key == 'studentStudy' || item.key == 'teacherHonor'){//教师研修 学生学习 教师发展
  325. uni.navigateTo({
  326. url: `/pages/${item.key}/index`
  327. });
  328. } else {
  329. uni.showToast({ title: `即将打开:${item.name}`, icon: 'none' });
  330. }
  331. };
  332. const handleViewSchedule = () => {
  333. uni.navigateTo({
  334. url: '/pages/workspace/schedule'
  335. });
  336. };
  337. const handlePrevWeek = () => {
  338. const currentDate = new Date(currentYear.value, currentMonth.value - 1, currentDay.value);
  339. currentDate.setDate(currentDate.getDate() - 7);
  340. currentYear.value = currentDate.getFullYear();
  341. currentMonth.value = currentDate.getMonth() + 1;
  342. currentDay.value = currentDate.getDate();
  343. updateYearMonthIndex();
  344. updateCalendarDays();
  345. fetchScheduleList();
  346. };
  347. const handleNextWeek = () => {
  348. const currentDate = new Date(currentYear.value, currentMonth.value - 1, currentDay.value);
  349. currentDate.setDate(currentDate.getDate() + 7);
  350. currentYear.value = currentDate.getFullYear();
  351. currentMonth.value = currentDate.getMonth() + 1;
  352. currentDay.value = currentDate.getDate();
  353. updateYearMonthIndex();
  354. updateCalendarDays();
  355. fetchScheduleList();
  356. };
  357. const handleDayClick = (day) => {
  358. calendarDays.value.forEach(d => d.isActive = false);
  359. day.isActive = true;
  360. currentYear.value = day.year;
  361. currentMonth.value = day.month;
  362. currentDay.value = day.date;
  363. updateYearMonthIndex();
  364. };
  365. const handleYearChange = (e) => {
  366. yearIndex.value = e.detail.value;
  367. currentYear.value = parseInt(yearList.value[e.detail.value].replace('年', ''));
  368. updateCalendarDays();
  369. fetchScheduleList();
  370. };
  371. const handleMonthChange = (e) => {
  372. monthIndex.value = e.detail.value;
  373. currentMonth.value = parseInt(monthList.value[e.detail.value].replace('月', ''));
  374. updateCalendarDays();
  375. fetchScheduleList();
  376. };
  377. const showAddScheduleModal = ref(false);
  378. const scheduleContent = ref('');
  379. const handleAddSchedule = () => {
  380. showAddScheduleModal.value = true;
  381. scheduleContent.value = '';
  382. };
  383. const handleCloseModal = () => {
  384. showAddScheduleModal.value = false;
  385. scheduleContent.value = '';
  386. };
  387. const handleConfirmSchedule = async () => {
  388. if (!scheduleContent.value.trim()) {
  389. uni.showToast({ title: '请输入日程内容', icon: 'none' });
  390. return;
  391. }
  392. const scheduleDate = `${currentYear.value}-${String(currentMonth.value).padStart(2, '0')}-${String(currentDay.value).padStart(2, '0')}`;
  393. try {
  394. await workspaceApi.saveSchedule({
  395. content: scheduleContent.value.trim(),
  396. scheduleDate
  397. });
  398. uni.showToast({ title: '添加成功', icon: 'success' });
  399. showAddScheduleModal.value = false;
  400. scheduleContent.value = '';
  401. fetchScheduleList();
  402. } catch (error) {
  403. console.error('添加日程失败:', error);
  404. uni.showToast({ title: '添加日程失败,请稍后重试', icon: 'none', duration: 3000 });
  405. }
  406. };
  407. </script>
  408. <style lang="scss">
  409. $primary-color: #2E64FA;
  410. $text-primary: #333333;
  411. $text-secondary: #666666;
  412. $text-tertiary: #999999;
  413. $bg-color: #F5F7FA;
  414. $bg-white: #FFFFFF;
  415. $border-color: #F0F0F0;
  416. $header-border: #EEEEEE;
  417. $font-lg: 44rpx;
  418. $font-md: 34rpx;
  419. $font-sm: 32rpx;
  420. $font-xs: 26rpx;
  421. $font-xxs: 24rpx;
  422. $radius-lg: 20rpx;
  423. $radius-md: 12rpx;
  424. $radius-sm: 8rpx;
  425. $radius-circle: 50%;
  426. $spacing-xl: 80rpx;
  427. $spacing-lg: 32rpx;
  428. $spacing-md: 24rpx;
  429. $spacing-sm: 24rpx;
  430. $spacing-xs: 16rpx;
  431. $spacing-xxs: 12rpx;
  432. $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
  433. @mixin flex-center {
  434. display: flex;
  435. justify-content: center;
  436. align-items: center;
  437. }
  438. @mixin flex-between {
  439. display: flex;
  440. justify-content: space-between;
  441. align-items: center;
  442. }
  443. @mixin flex-column {
  444. display: flex;
  445. flex-direction: column;
  446. align-items: center;
  447. }
  448. @mixin bg-card {
  449. background-color: $bg-white;
  450. border-radius: $radius-lg;
  451. padding: $spacing-md;
  452. }
  453. @mixin text-ellipsis {
  454. overflow: hidden;
  455. text-overflow: ellipsis;
  456. white-space: nowrap;
  457. }
  458. .page_workspace {
  459. min-height: 100vh;
  460. background-color: #F8F9FD;
  461. padding-bottom: env(safe-area-inset-bottom);
  462. box-sizing: border-box;
  463. }
  464. .workspace_content {
  465. padding-top: calc(140rpx + env(safe-area-inset-top));
  466. padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
  467. padding-left: 24rpx;
  468. padding-right: 24rpx;
  469. height: 100vh;
  470. box-sizing: border-box;
  471. overflow: hidden;
  472. }
  473. // 系统列表
  474. .system_list {
  475. @include bg-card;
  476. margin-bottom: $spacing-sm;
  477. .section_title {
  478. font-size: $font-sm;
  479. font-weight: 500;
  480. color: $text-primary;
  481. margin-bottom: $spacing-sm;
  482. }
  483. .system_grid_with_large {
  484. display: flex;
  485. gap: 20rpx;
  486. margin-bottom: 20rpx;
  487. .large_card {
  488. flex: 1;
  489. display: flex;
  490. flex-direction: column;
  491. align-items: center;
  492. justify-content: center;
  493. background-color: #EAF0FF;
  494. border-radius: 20rpx;
  495. width: 324rpx;
  496. height: 352rpx;
  497. // padding: 30rpx 0;
  498. .large_icon {
  499. width: 160rpx;
  500. height: 160rpx;
  501. margin-bottom: 32rpx;
  502. }
  503. .large_name {
  504. font-size: 32rpx;
  505. color: #333333;
  506. font-weight: 500;
  507. text-align: center;
  508. line-height: 48rpx;
  509. width: 276rpx;
  510. }
  511. }
  512. .right_top_grid {
  513. flex: 1;
  514. display: grid;
  515. grid-template-columns: repeat(2, 1fr);
  516. gap: 16rpx;
  517. .small_item {
  518. display: flex;
  519. flex-direction: column;
  520. align-items: center;
  521. justify-content: center;
  522. background-color: #FFFFFF;
  523. // border-radius: 12rpx;
  524. // padding: 20rpx 0;
  525. .small_icon {
  526. width: 96rpx;
  527. height: 96rpx;
  528. margin-bottom: 20rpx;
  529. }
  530. .small_name {
  531. font-size: 28rpx;
  532. color: $text-secondary;
  533. text-align: center;
  534. }
  535. }
  536. }
  537. }
  538. .bottom_grid {
  539. display: grid;
  540. grid-template-columns: repeat(4, 1fr);
  541. gap: 16rpx;
  542. .small_item {
  543. display: flex;
  544. flex-direction: column;
  545. align-items: center;
  546. justify-content: center;
  547. background-color: #FFFFFF;
  548. border-radius: 12rpx;
  549. padding: 20rpx 0;
  550. .small_icon {
  551. width: 96rpx;
  552. height: 96rpx;
  553. margin-bottom: 20rpx;
  554. }
  555. .small_name {
  556. font-size: 28rpx;
  557. color: $text-secondary;
  558. text-align: center;
  559. }
  560. }
  561. }
  562. .system_grid_full {
  563. display: grid;
  564. grid-template-columns: repeat(4, 1fr);
  565. gap: 16rpx;
  566. .small_item {
  567. display: flex;
  568. flex-direction: column;
  569. align-items: center;
  570. justify-content: center;
  571. background-color: #FFFFFF;
  572. border-radius: 12rpx;
  573. padding: 20rpx 0;
  574. .small_icon {
  575. width: 64rpx;
  576. height: 64rpx;
  577. margin-bottom: 12rpx;
  578. }
  579. .small_name {
  580. font-size: 22rpx;
  581. color: $text-secondary;
  582. text-align: center;
  583. }
  584. }
  585. }
  586. }
  587. // 日程
  588. .calendar_section {
  589. @include bg-card;
  590. .calendar_header {
  591. @include flex-between;
  592. margin-bottom: 32rpx;
  593. .section_title {
  594. font-size: $font-sm;
  595. font-weight: 500;
  596. color: $text-primary;
  597. }
  598. .view_schedule {
  599. font-size: 28rpx;
  600. color: $primary-color;
  601. }
  602. }
  603. .calendar_toolbar {
  604. display: flex;
  605. gap: 18rpx;
  606. padding-bottom: 32rpx;
  607. .year_month_select {
  608. display: flex;
  609. gap: 18rpx;
  610. flex: 1;
  611. .select_item {
  612. flex: 1;
  613. // @include flex-center;
  614. gap: 8rpx;
  615. padding: 0;
  616. height: 72rpx;
  617. background-color: #FFFFFF;
  618. border-radius: 8rpx;
  619. border: 2rpx solid #DCDFE6;
  620. .select_content {
  621. display: flex;
  622. justify-content: space-between;
  623. align-items: center;
  624. width: 81%;
  625. padding: 0 16rpx;
  626. height: 72rpx;
  627. }
  628. .select_text {
  629. font-size: $font-xs;
  630. color: $text-primary;
  631. }
  632. }
  633. }
  634. .week_nav {
  635. display: flex;
  636. gap: 18rpx;
  637. .nav_btn {
  638. width: 122rpx;
  639. height: 72rpx;
  640. @include flex-center;
  641. background-color: #FFFFFF;
  642. border-radius: 8rpx;
  643. border: 2rpx solid #DCDFE6;
  644. .nav_text {
  645. font-size: $font-xs;
  646. color: $text-secondary;
  647. }
  648. }
  649. }
  650. }
  651. .calendar_grid {
  652. margin-bottom: $spacing-lg;
  653. .calendar_weekday {
  654. display: flex;
  655. margin-bottom: $spacing-xs;
  656. .weekday_text {
  657. flex: 1;
  658. text-align: center;
  659. font-size: 28rpx;
  660. color: $text-secondary;
  661. }
  662. }
  663. .calendar_days {
  664. display: flex;
  665. justify-content: space-around;
  666. align-items: center;
  667. height: 80rpx;
  668. .day_item {
  669. flex-shrink: 0;
  670. box-sizing: border-box;
  671. display: flex;
  672. justify-content: center;
  673. align-items: center;
  674. width: 80rpx;
  675. height: 80rpx;
  676. border-radius: 50%;
  677. border: 2rpx solid transparent;
  678. position: relative;
  679. &.active {
  680. background-color: rgba(46, 100, 250, 0.1);
  681. border-color: #2E64FA;
  682. .day_text {
  683. color: #2E64FA;
  684. }
  685. }
  686. .day_text {
  687. font-size: $font-sm;
  688. color: $text-primary;
  689. }
  690. &.weekend:not(.active) {
  691. .day_text {
  692. color: #999999;
  693. }
  694. }
  695. .schedule_dot {
  696. position: absolute;
  697. bottom: 12rpx;
  698. width: 8rpx;
  699. height: 8rpx;
  700. background-color: transparent;
  701. border-radius: 50%;
  702. &.visible {
  703. background-color: #2E64FA;
  704. }
  705. }
  706. }
  707. }
  708. }
  709. .schedule_list {
  710. margin-bottom: $spacing-lg;
  711. background: #F9FAFF;
  712. border-radius: 20rpx 20rpx 20rpx 20rpx;
  713. padding: $spacing-lg;
  714. display: flex;
  715. flex-direction: column;
  716. flex: 1;
  717. .schedule_title {
  718. font-size: 28rpx;
  719. font-weight: 500;
  720. color: $text-primary;
  721. margin-bottom: $spacing-xs;
  722. }
  723. .schedule_item {
  724. display: flex;
  725. align-items: flex-start;
  726. padding: 24rpx 0;
  727. border-bottom: 2rpx solid #EBEEF5;
  728. &:last-child {
  729. border-bottom: none;
  730. }
  731. .schedule_dot {
  732. width: 16rpx;
  733. height: 16rpx;
  734. background-color: $primary-color;
  735. border-radius: $radius-circle;
  736. margin-top: 14rpx;
  737. margin-right: 14rpx;
  738. flex-shrink: 0;
  739. }
  740. .schedule_text_container {
  741. flex: 1;
  742. position: relative;
  743. }
  744. .schedule_text {
  745. font-size: 28rpx;
  746. color: #666666;
  747. line-height: 1.6;
  748. display: -webkit-box;
  749. -webkit-box-orient: vertical;
  750. -webkit-line-clamp: 2;
  751. overflow: hidden;
  752. text-overflow: ellipsis;
  753. &.expanded {
  754. -webkit-line-clamp: unset;
  755. overflow: visible;
  756. text-overflow: unset;
  757. }
  758. }
  759. .toggle_text {
  760. font-size: 24rpx;
  761. color: #2E64FA;
  762. float: right;
  763. margin-top: 14rpx;
  764. display: inline;
  765. }
  766. }
  767. }
  768. .add_schedule_btn {
  769. @include flex-center;
  770. gap: 16rpx;
  771. height: 56rpx;
  772. background-color: #FFFFFF;
  773. border-radius: 12rpx 12rpx 12rpx 12rpx;;
  774. border: 1px solid #2E64FA;
  775. .btn_text {
  776. font-size: 28rpx;
  777. color: #2E64FA;
  778. font-weight: 500;
  779. }
  780. .add_icon {
  781. width: 32rpx;
  782. height: 32rpx;
  783. }
  784. }
  785. }
  786. .modal-overlay {
  787. position: fixed;
  788. top: 0;
  789. left: 0;
  790. right: 0;
  791. bottom: 0;
  792. background-color: rgba(0, 0, 0, 0.5);
  793. display: flex;
  794. justify-content: center;
  795. align-items: center;
  796. z-index: 1000;
  797. }
  798. .modal-content {
  799. width: 702rpx;
  800. background-color: #FFFFFF;
  801. border-radius: 16rpx;
  802. overflow: hidden;
  803. .modal-header {
  804. display: flex;
  805. justify-content: space-between;
  806. align-items: center;
  807. height: 96rpx;
  808. padding: 0 40rpx;
  809. background-color: #F5F7FA;
  810. .modal-title {
  811. font-size: 32rpx;
  812. font-weight: 500;
  813. color: #303133;
  814. }
  815. .modal-close {
  816. width: 60rpx;
  817. height: 60rpx;
  818. display: flex;
  819. justify-content: center;
  820. align-items: center;
  821. }
  822. .close-icon {
  823. width: 40rpx;
  824. height: 40rpx;
  825. }
  826. }
  827. .modal-body {
  828. padding: 24rpx;
  829. .modal-date {
  830. font-size: 32rpx;
  831. color: #333333;
  832. margin-bottom: 24rpx;
  833. display: block;
  834. }
  835. .schedule-textarea {
  836. width: 100%;
  837. height: 364rpx;
  838. padding: 20rpx;
  839. border: 2rpx solid #E8E8E8;
  840. border-radius: 12rpx;
  841. font-size: 28rpx;
  842. color: #333333;
  843. box-sizing: border-box;
  844. }
  845. .textarea-placeholder {
  846. color: #999999;
  847. }
  848. }
  849. .modal-footer {
  850. display: flex;
  851. justify-content: flex-end;
  852. align-items: center;
  853. padding: 28rpx 40rpx;
  854. gap: 16rpx;
  855. border-top: 2rpx solid #EBEEF5;
  856. .modal-btn {
  857. height: 72rpx;
  858. // padding: 0 48rpx;
  859. width: 136rpx;
  860. display: flex;
  861. justify-content: center;
  862. align-items: center;
  863. font-size: 28rpx;
  864. border-radius: 8rpx;
  865. flex-shrink: 0;
  866. &.cancel-btn {
  867. color: #666666;
  868. background-color: #FFFFFF;
  869. border: 2rpx solid #DCDFE6;
  870. height: 68rpx;
  871. }
  872. &.confirm-btn {
  873. color: #FFFFFF;
  874. background-color: #2E64FA;
  875. border: none;
  876. }
  877. }
  878. }
  879. }
  880. </style>