index.vue 20 KB

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