index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997
  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" 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:'', 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:'', 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 == 'teacherStudy'){//教师研修
  321. uni.navigateTo({
  322. url: '/pages/teacherStudy/index'
  323. });
  324. }else if(item.key == 'studentStudy'){//学生学习
  325. uni.navigateTo({
  326. url: '/pages/studentStudy/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. .schedule_title {
  715. font-size: 28rpx;
  716. font-weight: 500;
  717. color: $text-primary;
  718. margin-bottom: $spacing-xs;
  719. }
  720. .schedule_item {
  721. display: flex;
  722. align-items: flex-start;
  723. padding: 24rpx 0;
  724. border-bottom: 2rpx solid #EBEEF5;
  725. &:last-child {
  726. border-bottom: none;
  727. }
  728. .schedule_dot {
  729. width: 16rpx;
  730. height: 16rpx;
  731. background-color: $primary-color;
  732. border-radius: $radius-circle;
  733. margin-top: 14rpx;
  734. margin-right: 14rpx;
  735. flex-shrink: 0;
  736. }
  737. .schedule_text_container {
  738. flex: 1;
  739. position: relative;
  740. }
  741. .schedule_text {
  742. font-size: 28rpx;
  743. color: #666666;
  744. line-height: 1.6;
  745. display: -webkit-box;
  746. -webkit-box-orient: vertical;
  747. -webkit-line-clamp: 2;
  748. overflow: hidden;
  749. text-overflow: ellipsis;
  750. &.expanded {
  751. -webkit-line-clamp: unset;
  752. overflow: visible;
  753. text-overflow: unset;
  754. }
  755. }
  756. .toggle_text {
  757. font-size: 24rpx;
  758. color: #2E64FA;
  759. float: right;
  760. margin-top: 14rpx;
  761. display: inline;
  762. }
  763. }
  764. }
  765. .add_schedule_btn {
  766. @include flex-center;
  767. gap: 16rpx;
  768. height: 56rpx;
  769. background-color: #FFFFFF;
  770. border-radius: 12rpx 12rpx 12rpx 12rpx;;
  771. border: 1px solid #2E64FA;
  772. .btn_text {
  773. font-size: 28rpx;
  774. color: #2E64FA;
  775. font-weight: 500;
  776. }
  777. .add_icon {
  778. width: 32rpx;
  779. height: 32rpx;
  780. }
  781. }
  782. }
  783. .modal-overlay {
  784. position: fixed;
  785. top: 0;
  786. left: 0;
  787. right: 0;
  788. bottom: 0;
  789. background-color: rgba(0, 0, 0, 0.5);
  790. display: flex;
  791. justify-content: center;
  792. align-items: center;
  793. z-index: 1000;
  794. }
  795. .modal-content {
  796. width: 702rpx;
  797. background-color: #FFFFFF;
  798. border-radius: 16rpx;
  799. overflow: hidden;
  800. .modal-header {
  801. display: flex;
  802. justify-content: space-between;
  803. align-items: center;
  804. height: 96rpx;
  805. padding: 0 40rpx;
  806. background-color: #F5F7FA;
  807. .modal-title {
  808. font-size: 32rpx;
  809. font-weight: 500;
  810. color: #303133;
  811. }
  812. .modal-close {
  813. width: 60rpx;
  814. height: 60rpx;
  815. display: flex;
  816. justify-content: center;
  817. align-items: center;
  818. }
  819. .close-icon {
  820. width: 40rpx;
  821. height: 40rpx;
  822. }
  823. }
  824. .modal-body {
  825. padding: 24rpx;
  826. .modal-date {
  827. font-size: 32rpx;
  828. color: #333333;
  829. margin-bottom: 24rpx;
  830. display: block;
  831. }
  832. .schedule-textarea {
  833. width: 100%;
  834. height: 364rpx;
  835. padding: 20rpx;
  836. border: 2rpx solid #E8E8E8;
  837. border-radius: 12rpx;
  838. font-size: 28rpx;
  839. color: #333333;
  840. box-sizing: border-box;
  841. }
  842. .textarea-placeholder {
  843. color: #999999;
  844. }
  845. }
  846. .modal-footer {
  847. display: flex;
  848. justify-content: flex-end;
  849. align-items: center;
  850. padding: 28rpx 40rpx;
  851. gap: 16rpx;
  852. border-top: 2rpx solid #EBEEF5;
  853. .modal-btn {
  854. height: 72rpx;
  855. // padding: 0 48rpx;
  856. width: 136rpx;
  857. display: flex;
  858. justify-content: center;
  859. align-items: center;
  860. font-size: 28rpx;
  861. border-radius: 8rpx;
  862. flex-shrink: 0;
  863. &.cancel-btn {
  864. color: #666666;
  865. background-color: #FFFFFF;
  866. border: 2rpx solid #DCDFE6;
  867. height: 68rpx;
  868. }
  869. &.confirm-btn {
  870. color: #FFFFFF;
  871. background-color: #2E64FA;
  872. border: none;
  873. }
  874. }
  875. }
  876. }
  877. </style>