index.vue 24 KB

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