index.vue 24 KB

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