index.vue 24 KB

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