index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993
  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:'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 == 'teacherStudy' || item.key == 'studentStudy' || item.key == 'teacherHonor'){//教师研修 学生学习 教师发展
  321. uni.navigateTo({
  322. url: `/pages/${item.key}/index`
  323. });
  324. } else {
  325. uni.showToast({ title: `即将打开:${item.name}`, icon: 'none' });
  326. }
  327. };
  328. const handleViewSchedule = () => {
  329. uni.navigateTo({
  330. url: '/pages/workspace/schedule'
  331. });
  332. };
  333. const handlePrevWeek = () => {
  334. const currentDate = new Date(currentYear.value, currentMonth.value - 1, currentDay.value);
  335. currentDate.setDate(currentDate.getDate() - 7);
  336. currentYear.value = currentDate.getFullYear();
  337. currentMonth.value = currentDate.getMonth() + 1;
  338. currentDay.value = currentDate.getDate();
  339. updateYearMonthIndex();
  340. updateCalendarDays();
  341. fetchScheduleList();
  342. };
  343. const handleNextWeek = () => {
  344. const currentDate = new Date(currentYear.value, currentMonth.value - 1, currentDay.value);
  345. currentDate.setDate(currentDate.getDate() + 7);
  346. currentYear.value = currentDate.getFullYear();
  347. currentMonth.value = currentDate.getMonth() + 1;
  348. currentDay.value = currentDate.getDate();
  349. updateYearMonthIndex();
  350. updateCalendarDays();
  351. fetchScheduleList();
  352. };
  353. const handleDayClick = (day) => {
  354. calendarDays.value.forEach(d => d.isActive = false);
  355. day.isActive = true;
  356. currentYear.value = day.year;
  357. currentMonth.value = day.month;
  358. currentDay.value = day.date;
  359. updateYearMonthIndex();
  360. };
  361. const handleYearChange = (e) => {
  362. yearIndex.value = e.detail.value;
  363. currentYear.value = parseInt(yearList.value[e.detail.value].replace('年', ''));
  364. updateCalendarDays();
  365. fetchScheduleList();
  366. };
  367. const handleMonthChange = (e) => {
  368. monthIndex.value = e.detail.value;
  369. currentMonth.value = parseInt(monthList.value[e.detail.value].replace('月', ''));
  370. updateCalendarDays();
  371. fetchScheduleList();
  372. };
  373. const showAddScheduleModal = ref(false);
  374. const scheduleContent = ref('');
  375. const handleAddSchedule = () => {
  376. showAddScheduleModal.value = true;
  377. scheduleContent.value = '';
  378. };
  379. const handleCloseModal = () => {
  380. showAddScheduleModal.value = false;
  381. scheduleContent.value = '';
  382. };
  383. const handleConfirmSchedule = async () => {
  384. if (!scheduleContent.value.trim()) {
  385. uni.showToast({ title: '请输入日程内容', icon: 'none' });
  386. return;
  387. }
  388. const scheduleDate = `${currentYear.value}-${String(currentMonth.value).padStart(2, '0')}-${String(currentDay.value).padStart(2, '0')}`;
  389. try {
  390. await workspaceApi.saveSchedule({
  391. content: scheduleContent.value.trim(),
  392. scheduleDate
  393. });
  394. uni.showToast({ title: '添加成功', icon: 'success' });
  395. showAddScheduleModal.value = false;
  396. scheduleContent.value = '';
  397. fetchScheduleList();
  398. } catch (error) {
  399. console.error('添加日程失败:', error);
  400. uni.showToast({ title: '添加日程失败,请稍后重试', icon: 'none', duration: 3000 });
  401. }
  402. };
  403. </script>
  404. <style lang="scss">
  405. $primary-color: #2E64FA;
  406. $text-primary: #333333;
  407. $text-secondary: #666666;
  408. $text-tertiary: #999999;
  409. $bg-color: #F5F7FA;
  410. $bg-white: #FFFFFF;
  411. $border-color: #F0F0F0;
  412. $header-border: #EEEEEE;
  413. $font-lg: 44rpx;
  414. $font-md: 34rpx;
  415. $font-sm: 32rpx;
  416. $font-xs: 26rpx;
  417. $font-xxs: 24rpx;
  418. $radius-lg: 20rpx;
  419. $radius-md: 12rpx;
  420. $radius-sm: 8rpx;
  421. $radius-circle: 50%;
  422. $spacing-xl: 80rpx;
  423. $spacing-lg: 32rpx;
  424. $spacing-md: 24rpx;
  425. $spacing-sm: 24rpx;
  426. $spacing-xs: 16rpx;
  427. $spacing-xxs: 12rpx;
  428. $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
  429. @mixin flex-center {
  430. display: flex;
  431. justify-content: center;
  432. align-items: center;
  433. }
  434. @mixin flex-between {
  435. display: flex;
  436. justify-content: space-between;
  437. align-items: center;
  438. }
  439. @mixin flex-column {
  440. display: flex;
  441. flex-direction: column;
  442. align-items: center;
  443. }
  444. @mixin bg-card {
  445. background-color: $bg-white;
  446. border-radius: $radius-lg;
  447. padding: $spacing-md;
  448. }
  449. @mixin text-ellipsis {
  450. overflow: hidden;
  451. text-overflow: ellipsis;
  452. white-space: nowrap;
  453. }
  454. .page_workspace {
  455. min-height: 100vh;
  456. background-color: #F8F9FD;
  457. padding-bottom: env(safe-area-inset-bottom);
  458. box-sizing: border-box;
  459. }
  460. .workspace_content {
  461. padding-top: calc(140rpx + env(safe-area-inset-top));
  462. padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
  463. padding-left: 24rpx;
  464. padding-right: 24rpx;
  465. height: 100vh;
  466. box-sizing: border-box;
  467. overflow: hidden;
  468. }
  469. // 系统列表
  470. .system_list {
  471. @include bg-card;
  472. margin-bottom: $spacing-sm;
  473. .section_title {
  474. font-size: $font-sm;
  475. font-weight: 500;
  476. color: $text-primary;
  477. margin-bottom: $spacing-sm;
  478. }
  479. .system_grid_with_large {
  480. display: flex;
  481. gap: 20rpx;
  482. margin-bottom: 20rpx;
  483. .large_card {
  484. flex: 1;
  485. display: flex;
  486. flex-direction: column;
  487. align-items: center;
  488. justify-content: center;
  489. background-color: #EAF0FF;
  490. border-radius: 20rpx;
  491. width: 324rpx;
  492. height: 352rpx;
  493. // padding: 30rpx 0;
  494. .large_icon {
  495. width: 160rpx;
  496. height: 160rpx;
  497. margin-bottom: 32rpx;
  498. }
  499. .large_name {
  500. font-size: 32rpx;
  501. color: #333333;
  502. font-weight: 500;
  503. text-align: center;
  504. line-height: 48rpx;
  505. width: 276rpx;
  506. }
  507. }
  508. .right_top_grid {
  509. flex: 1;
  510. display: grid;
  511. grid-template-columns: repeat(2, 1fr);
  512. gap: 16rpx;
  513. .small_item {
  514. display: flex;
  515. flex-direction: column;
  516. align-items: center;
  517. justify-content: center;
  518. background-color: #FFFFFF;
  519. // border-radius: 12rpx;
  520. // padding: 20rpx 0;
  521. .small_icon {
  522. width: 96rpx;
  523. height: 96rpx;
  524. margin-bottom: 20rpx;
  525. }
  526. .small_name {
  527. font-size: 28rpx;
  528. color: $text-secondary;
  529. text-align: center;
  530. }
  531. }
  532. }
  533. }
  534. .bottom_grid {
  535. display: grid;
  536. grid-template-columns: repeat(4, 1fr);
  537. gap: 16rpx;
  538. .small_item {
  539. display: flex;
  540. flex-direction: column;
  541. align-items: center;
  542. justify-content: center;
  543. background-color: #FFFFFF;
  544. border-radius: 12rpx;
  545. padding: 20rpx 0;
  546. .small_icon {
  547. width: 96rpx;
  548. height: 96rpx;
  549. margin-bottom: 20rpx;
  550. }
  551. .small_name {
  552. font-size: 28rpx;
  553. color: $text-secondary;
  554. text-align: center;
  555. }
  556. }
  557. }
  558. .system_grid_full {
  559. display: grid;
  560. grid-template-columns: repeat(4, 1fr);
  561. gap: 16rpx;
  562. .small_item {
  563. display: flex;
  564. flex-direction: column;
  565. align-items: center;
  566. justify-content: center;
  567. background-color: #FFFFFF;
  568. border-radius: 12rpx;
  569. padding: 20rpx 0;
  570. .small_icon {
  571. width: 64rpx;
  572. height: 64rpx;
  573. margin-bottom: 12rpx;
  574. }
  575. .small_name {
  576. font-size: 22rpx;
  577. color: $text-secondary;
  578. text-align: center;
  579. }
  580. }
  581. }
  582. }
  583. // 日程
  584. .calendar_section {
  585. @include bg-card;
  586. .calendar_header {
  587. @include flex-between;
  588. margin-bottom: 32rpx;
  589. .section_title {
  590. font-size: $font-sm;
  591. font-weight: 500;
  592. color: $text-primary;
  593. }
  594. .view_schedule {
  595. font-size: 28rpx;
  596. color: $primary-color;
  597. }
  598. }
  599. .calendar_toolbar {
  600. display: flex;
  601. gap: 18rpx;
  602. padding-bottom: 32rpx;
  603. .year_month_select {
  604. display: flex;
  605. gap: 18rpx;
  606. flex: 1;
  607. .select_item {
  608. flex: 1;
  609. // @include flex-center;
  610. gap: 8rpx;
  611. padding: 0;
  612. height: 72rpx;
  613. background-color: #FFFFFF;
  614. border-radius: 8rpx;
  615. border: 2rpx solid #DCDFE6;
  616. .select_content {
  617. display: flex;
  618. justify-content: space-between;
  619. align-items: center;
  620. width: 81%;
  621. padding: 0 16rpx;
  622. height: 72rpx;
  623. }
  624. .select_text {
  625. font-size: $font-xs;
  626. color: $text-primary;
  627. }
  628. }
  629. }
  630. .week_nav {
  631. display: flex;
  632. gap: 18rpx;
  633. .nav_btn {
  634. width: 122rpx;
  635. height: 72rpx;
  636. @include flex-center;
  637. background-color: #FFFFFF;
  638. border-radius: 8rpx;
  639. border: 2rpx solid #DCDFE6;
  640. .nav_text {
  641. font-size: $font-xs;
  642. color: $text-secondary;
  643. }
  644. }
  645. }
  646. }
  647. .calendar_grid {
  648. margin-bottom: $spacing-lg;
  649. .calendar_weekday {
  650. display: flex;
  651. margin-bottom: $spacing-xs;
  652. .weekday_text {
  653. flex: 1;
  654. text-align: center;
  655. font-size: 28rpx;
  656. color: $text-secondary;
  657. }
  658. }
  659. .calendar_days {
  660. display: flex;
  661. justify-content: space-around;
  662. align-items: center;
  663. height: 80rpx;
  664. .day_item {
  665. flex-shrink: 0;
  666. box-sizing: border-box;
  667. display: flex;
  668. justify-content: center;
  669. align-items: center;
  670. width: 80rpx;
  671. height: 80rpx;
  672. border-radius: 50%;
  673. border: 2rpx solid transparent;
  674. position: relative;
  675. &.active {
  676. background-color: rgba(46, 100, 250, 0.1);
  677. border-color: #2E64FA;
  678. .day_text {
  679. color: #2E64FA;
  680. }
  681. }
  682. .day_text {
  683. font-size: $font-sm;
  684. color: $text-primary;
  685. }
  686. &.weekend:not(.active) {
  687. .day_text {
  688. color: #999999;
  689. }
  690. }
  691. .schedule_dot {
  692. position: absolute;
  693. bottom: 12rpx;
  694. width: 8rpx;
  695. height: 8rpx;
  696. background-color: transparent;
  697. border-radius: 50%;
  698. &.visible {
  699. background-color: #2E64FA;
  700. }
  701. }
  702. }
  703. }
  704. }
  705. .schedule_list {
  706. margin-bottom: $spacing-lg;
  707. background: #F9FAFF;
  708. border-radius: 20rpx 20rpx 20rpx 20rpx;
  709. padding: $spacing-lg;
  710. .schedule_title {
  711. font-size: 28rpx;
  712. font-weight: 500;
  713. color: $text-primary;
  714. margin-bottom: $spacing-xs;
  715. }
  716. .schedule_item {
  717. display: flex;
  718. align-items: flex-start;
  719. padding: 24rpx 0;
  720. border-bottom: 2rpx solid #EBEEF5;
  721. &:last-child {
  722. border-bottom: none;
  723. }
  724. .schedule_dot {
  725. width: 16rpx;
  726. height: 16rpx;
  727. background-color: $primary-color;
  728. border-radius: $radius-circle;
  729. margin-top: 14rpx;
  730. margin-right: 14rpx;
  731. flex-shrink: 0;
  732. }
  733. .schedule_text_container {
  734. flex: 1;
  735. position: relative;
  736. }
  737. .schedule_text {
  738. font-size: 28rpx;
  739. color: #666666;
  740. line-height: 1.6;
  741. display: -webkit-box;
  742. -webkit-box-orient: vertical;
  743. -webkit-line-clamp: 2;
  744. overflow: hidden;
  745. text-overflow: ellipsis;
  746. &.expanded {
  747. -webkit-line-clamp: unset;
  748. overflow: visible;
  749. text-overflow: unset;
  750. }
  751. }
  752. .toggle_text {
  753. font-size: 24rpx;
  754. color: #2E64FA;
  755. float: right;
  756. margin-top: 14rpx;
  757. display: inline;
  758. }
  759. }
  760. }
  761. .add_schedule_btn {
  762. @include flex-center;
  763. gap: 16rpx;
  764. height: 56rpx;
  765. background-color: #FFFFFF;
  766. border-radius: 12rpx 12rpx 12rpx 12rpx;;
  767. border: 1px solid #2E64FA;
  768. .btn_text {
  769. font-size: 28rpx;
  770. color: #2E64FA;
  771. font-weight: 500;
  772. }
  773. .add_icon {
  774. width: 32rpx;
  775. height: 32rpx;
  776. }
  777. }
  778. }
  779. .modal-overlay {
  780. position: fixed;
  781. top: 0;
  782. left: 0;
  783. right: 0;
  784. bottom: 0;
  785. background-color: rgba(0, 0, 0, 0.5);
  786. display: flex;
  787. justify-content: center;
  788. align-items: center;
  789. z-index: 1000;
  790. }
  791. .modal-content {
  792. width: 702rpx;
  793. background-color: #FFFFFF;
  794. border-radius: 16rpx;
  795. overflow: hidden;
  796. .modal-header {
  797. display: flex;
  798. justify-content: space-between;
  799. align-items: center;
  800. height: 96rpx;
  801. padding: 0 40rpx;
  802. background-color: #F5F7FA;
  803. .modal-title {
  804. font-size: 32rpx;
  805. font-weight: 500;
  806. color: #303133;
  807. }
  808. .modal-close {
  809. width: 60rpx;
  810. height: 60rpx;
  811. display: flex;
  812. justify-content: center;
  813. align-items: center;
  814. }
  815. .close-icon {
  816. width: 40rpx;
  817. height: 40rpx;
  818. }
  819. }
  820. .modal-body {
  821. padding: 24rpx;
  822. .modal-date {
  823. font-size: 32rpx;
  824. color: #333333;
  825. margin-bottom: 24rpx;
  826. display: block;
  827. }
  828. .schedule-textarea {
  829. width: 100%;
  830. height: 364rpx;
  831. padding: 20rpx;
  832. border: 2rpx solid #E8E8E8;
  833. border-radius: 12rpx;
  834. font-size: 28rpx;
  835. color: #333333;
  836. box-sizing: border-box;
  837. }
  838. .textarea-placeholder {
  839. color: #999999;
  840. }
  841. }
  842. .modal-footer {
  843. display: flex;
  844. justify-content: flex-end;
  845. align-items: center;
  846. padding: 28rpx 40rpx;
  847. gap: 16rpx;
  848. border-top: 2rpx solid #EBEEF5;
  849. .modal-btn {
  850. height: 72rpx;
  851. // padding: 0 48rpx;
  852. width: 136rpx;
  853. display: flex;
  854. justify-content: center;
  855. align-items: center;
  856. font-size: 28rpx;
  857. border-radius: 8rpx;
  858. flex-shrink: 0;
  859. &.cancel-btn {
  860. color: #666666;
  861. background-color: #FFFFFF;
  862. border: 2rpx solid #DCDFE6;
  863. height: 68rpx;
  864. }
  865. &.confirm-btn {
  866. color: #FFFFFF;
  867. background-color: #2E64FA;
  868. border: none;
  869. }
  870. }
  871. }
  872. }
  873. </style>