index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994
  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: 120rpx;
  462. // font-family: PingFang SC, Helvetica Neue, Arial, sans-serif;
  463. }
  464. .workspace_content {
  465. padding: 140rpx 24rpx 140rpx 24rpx;
  466. height: 100vh;
  467. box-sizing: border-box;
  468. overflow: hidden;
  469. }
  470. // 系统列表
  471. .system_list {
  472. @include bg-card;
  473. margin-bottom: $spacing-sm;
  474. .section_title {
  475. font-size: $font-sm;
  476. font-weight: 500;
  477. color: $text-primary;
  478. margin-bottom: $spacing-sm;
  479. }
  480. .system_grid_with_large {
  481. display: flex;
  482. gap: 20rpx;
  483. margin-bottom: 20rpx;
  484. .large_card {
  485. flex: 1;
  486. display: flex;
  487. flex-direction: column;
  488. align-items: center;
  489. justify-content: center;
  490. background-color: #EAF0FF;
  491. border-radius: 20rpx;
  492. width: 324rpx;
  493. height: 352rpx;
  494. // padding: 30rpx 0;
  495. .large_icon {
  496. width: 160rpx;
  497. height: 160rpx;
  498. margin-bottom: 32rpx;
  499. }
  500. .large_name {
  501. font-size: 32rpx;
  502. color: #333333;
  503. font-weight: 500;
  504. text-align: center;
  505. line-height: 48rpx;
  506. width: 276rpx;
  507. }
  508. }
  509. .right_top_grid {
  510. flex: 1;
  511. display: grid;
  512. grid-template-columns: repeat(2, 1fr);
  513. gap: 16rpx;
  514. .small_item {
  515. display: flex;
  516. flex-direction: column;
  517. align-items: center;
  518. justify-content: center;
  519. background-color: #FFFFFF;
  520. // border-radius: 12rpx;
  521. // padding: 20rpx 0;
  522. .small_icon {
  523. width: 96rpx;
  524. height: 96rpx;
  525. margin-bottom: 20rpx;
  526. }
  527. .small_name {
  528. font-size: 28rpx;
  529. color: $text-secondary;
  530. text-align: center;
  531. }
  532. }
  533. }
  534. }
  535. .bottom_grid {
  536. display: grid;
  537. grid-template-columns: repeat(4, 1fr);
  538. gap: 16rpx;
  539. .small_item {
  540. display: flex;
  541. flex-direction: column;
  542. align-items: center;
  543. justify-content: center;
  544. background-color: #FFFFFF;
  545. border-radius: 12rpx;
  546. padding: 20rpx 0;
  547. .small_icon {
  548. width: 96rpx;
  549. height: 96rpx;
  550. margin-bottom: 20rpx;
  551. }
  552. .small_name {
  553. font-size: 28rpx;
  554. color: $text-secondary;
  555. text-align: center;
  556. }
  557. }
  558. }
  559. .system_grid_full {
  560. display: grid;
  561. grid-template-columns: repeat(4, 1fr);
  562. gap: 16rpx;
  563. .small_item {
  564. display: flex;
  565. flex-direction: column;
  566. align-items: center;
  567. justify-content: center;
  568. background-color: #FFFFFF;
  569. border-radius: 12rpx;
  570. padding: 20rpx 0;
  571. .small_icon {
  572. width: 64rpx;
  573. height: 64rpx;
  574. margin-bottom: 12rpx;
  575. }
  576. .small_name {
  577. font-size: 22rpx;
  578. color: $text-secondary;
  579. text-align: center;
  580. }
  581. }
  582. }
  583. }
  584. // 日程
  585. .calendar_section {
  586. @include bg-card;
  587. .calendar_header {
  588. @include flex-between;
  589. margin-bottom: 32rpx;
  590. .section_title {
  591. font-size: $font-sm;
  592. font-weight: 500;
  593. color: $text-primary;
  594. }
  595. .view_schedule {
  596. font-size: 28rpx;
  597. color: $primary-color;
  598. }
  599. }
  600. .calendar_toolbar {
  601. display: flex;
  602. gap: 18rpx;
  603. padding-bottom: 32rpx;
  604. .year_month_select {
  605. display: flex;
  606. gap: 18rpx;
  607. flex: 1;
  608. .select_item {
  609. flex: 1;
  610. // @include flex-center;
  611. gap: 8rpx;
  612. padding: 0;
  613. height: 72rpx;
  614. background-color: #FFFFFF;
  615. border-radius: 8rpx;
  616. border: 2rpx solid #DCDFE6;
  617. .select_content {
  618. display: flex;
  619. justify-content: space-between;
  620. align-items: center;
  621. width: 81%;
  622. padding: 0 16rpx;
  623. height: 72rpx;
  624. }
  625. .select_text {
  626. font-size: $font-xs;
  627. color: $text-primary;
  628. }
  629. }
  630. }
  631. .week_nav {
  632. display: flex;
  633. gap: 18rpx;
  634. .nav_btn {
  635. width: 122rpx;
  636. height: 72rpx;
  637. @include flex-center;
  638. background-color: #FFFFFF;
  639. border-radius: 8rpx;
  640. border: 2rpx solid #DCDFE6;
  641. .nav_text {
  642. font-size: $font-xs;
  643. color: $text-secondary;
  644. }
  645. }
  646. }
  647. }
  648. .calendar_grid {
  649. margin-bottom: $spacing-lg;
  650. .calendar_weekday {
  651. display: flex;
  652. margin-bottom: $spacing-xs;
  653. .weekday_text {
  654. flex: 1;
  655. text-align: center;
  656. font-size: 28rpx;
  657. color: $text-secondary;
  658. }
  659. }
  660. .calendar_days {
  661. display: flex;
  662. justify-content: space-around;
  663. align-items: center;
  664. height: 80rpx;
  665. .day_item {
  666. flex-shrink: 0;
  667. box-sizing: border-box;
  668. display: flex;
  669. justify-content: center;
  670. align-items: center;
  671. width: 80rpx;
  672. height: 80rpx;
  673. border-radius: 50%;
  674. border: 2rpx solid transparent;
  675. position: relative;
  676. &.active {
  677. background-color: rgba(46, 100, 250, 0.1);
  678. border-color: #2E64FA;
  679. .day_text {
  680. color: #2E64FA;
  681. }
  682. }
  683. .day_text {
  684. font-size: $font-sm;
  685. color: $text-primary;
  686. }
  687. &.weekend:not(.active) {
  688. .day_text {
  689. color: #999999;
  690. }
  691. }
  692. .schedule_dot {
  693. position: absolute;
  694. bottom: 12rpx;
  695. width: 8rpx;
  696. height: 8rpx;
  697. background-color: transparent;
  698. border-radius: 50%;
  699. &.visible {
  700. background-color: #2E64FA;
  701. }
  702. }
  703. }
  704. }
  705. }
  706. .schedule_list {
  707. margin-bottom: $spacing-lg;
  708. background: #F9FAFF;
  709. border-radius: 20rpx 20rpx 20rpx 20rpx;
  710. padding: $spacing-lg;
  711. .schedule_title {
  712. font-size: 28rpx;
  713. font-weight: 500;
  714. color: $text-primary;
  715. margin-bottom: $spacing-xs;
  716. }
  717. .schedule_item {
  718. display: flex;
  719. align-items: flex-start;
  720. padding: 24rpx 0;
  721. border-bottom: 2rpx solid #EBEEF5;
  722. &:last-child {
  723. border-bottom: none;
  724. }
  725. .schedule_dot {
  726. width: 16rpx;
  727. height: 16rpx;
  728. background-color: $primary-color;
  729. border-radius: $radius-circle;
  730. margin-top: 14rpx;
  731. margin-right: 14rpx;
  732. flex-shrink: 0;
  733. }
  734. .schedule_text_container {
  735. flex: 1;
  736. position: relative;
  737. }
  738. .schedule_text {
  739. font-size: 28rpx;
  740. color: #666666;
  741. line-height: 1.6;
  742. display: -webkit-box;
  743. -webkit-box-orient: vertical;
  744. -webkit-line-clamp: 2;
  745. overflow: hidden;
  746. text-overflow: ellipsis;
  747. &.expanded {
  748. -webkit-line-clamp: unset;
  749. overflow: visible;
  750. text-overflow: unset;
  751. }
  752. }
  753. .toggle_text {
  754. font-size: 24rpx;
  755. color: #2E64FA;
  756. float: right;
  757. margin-top: 14rpx;
  758. display: inline;
  759. }
  760. }
  761. }
  762. .add_schedule_btn {
  763. @include flex-center;
  764. gap: 16rpx;
  765. height: 56rpx;
  766. background-color: #FFFFFF;
  767. border-radius: 12rpx 12rpx 12rpx 12rpx;;
  768. border: 1px solid #2E64FA;
  769. .btn_text {
  770. font-size: 28rpx;
  771. color: #2E64FA;
  772. font-weight: 500;
  773. }
  774. .add_icon {
  775. width: 32rpx;
  776. height: 32rpx;
  777. }
  778. }
  779. }
  780. .modal-overlay {
  781. position: fixed;
  782. top: 0;
  783. left: 0;
  784. right: 0;
  785. bottom: 0;
  786. background-color: rgba(0, 0, 0, 0.5);
  787. display: flex;
  788. justify-content: center;
  789. align-items: center;
  790. z-index: 1000;
  791. }
  792. .modal-content {
  793. width: 702rpx;
  794. background-color: #FFFFFF;
  795. border-radius: 16rpx;
  796. overflow: hidden;
  797. .modal-header {
  798. display: flex;
  799. justify-content: space-between;
  800. align-items: center;
  801. height: 96rpx;
  802. padding: 0 40rpx;
  803. background-color: #F5F7FA;
  804. .modal-title {
  805. font-size: 32rpx;
  806. font-weight: 500;
  807. color: #303133;
  808. }
  809. .modal-close {
  810. width: 60rpx;
  811. height: 60rpx;
  812. display: flex;
  813. justify-content: center;
  814. align-items: center;
  815. }
  816. .close-icon {
  817. width: 40rpx;
  818. height: 40rpx;
  819. }
  820. }
  821. .modal-body {
  822. padding: 24rpx;
  823. .modal-date {
  824. font-size: 32rpx;
  825. color: #333333;
  826. margin-bottom: 24rpx;
  827. display: block;
  828. }
  829. .schedule-textarea {
  830. width: 100%;
  831. height: 364rpx;
  832. padding: 20rpx;
  833. border: 2rpx solid #E8E8E8;
  834. border-radius: 12rpx;
  835. font-size: 28rpx;
  836. color: #333333;
  837. box-sizing: border-box;
  838. }
  839. .textarea-placeholder {
  840. color: #999999;
  841. }
  842. }
  843. .modal-footer {
  844. display: flex;
  845. justify-content: flex-end;
  846. align-items: center;
  847. padding: 28rpx 40rpx;
  848. gap: 16rpx;
  849. border-top: 2rpx solid #EBEEF5;
  850. .modal-btn {
  851. height: 72rpx;
  852. // padding: 0 48rpx;
  853. width: 136rpx;
  854. display: flex;
  855. justify-content: center;
  856. align-items: center;
  857. font-size: 28rpx;
  858. border-radius: 8rpx;
  859. flex-shrink: 0;
  860. &.cancel-btn {
  861. color: #666666;
  862. background-color: #FFFFFF;
  863. border: 2rpx solid #DCDFE6;
  864. height: 68rpx;
  865. }
  866. &.confirm-btn {
  867. color: #FFFFFF;
  868. background-color: #2E64FA;
  869. border: none;
  870. }
  871. }
  872. }
  873. }
  874. </style>