index.vue 24 KB

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