index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835
  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: '精准教学', key:'', image: '/static/image/workspace/icon1.png' },
  136. { name: '教师研修', key:'teacherStudy', image: '/static/image/workspace/icon2.png' },
  137. { name: '协同备课', key:'', image: '/static/image/workspace/icon3.png' },
  138. { name: '材料采集', key:'', image: '/static/image/workspace/icon4.png' },
  139. { name: '教师发展', key:'', image: '/static/image/workspace/icon5.png' },
  140. { name: '校内通知', key:'notice', image: '/static/image/workspace/icon6.png' },
  141. { name: '选择题判分', key:'', image: '/static/image/workspace/icon7.png' },
  142. { name: '智能选课', key:'', image: '/static/image/workspace/icon8.png' },
  143. { name: '学生学习', key:'', image: '/static/image/workspace/icon9.png' },
  144. { name: '基础数据', key:'', 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.key === 'notice') {
  268. uni.navigateTo({
  269. url: '/pages/notice/overview/index'
  270. });
  271. }else if(item.key == 'teacherStudy'){
  272. uni.navigateTo({
  273. url: '/pages/teacherStudy/index'
  274. });
  275. } else {
  276. uni.showToast({ title: `即将打开:${item.name}`, icon: 'none' });
  277. }
  278. };
  279. const handleViewSchedule = () => {
  280. uni.navigateTo({
  281. url: '/pages/workspace/schedule'
  282. });
  283. };
  284. const handlePrevWeek = () => {
  285. const currentDate = new Date(currentYear.value, currentMonth.value - 1, currentDay.value);
  286. currentDate.setDate(currentDate.getDate() - 7);
  287. currentYear.value = currentDate.getFullYear();
  288. currentMonth.value = currentDate.getMonth() + 1;
  289. currentDay.value = currentDate.getDate();
  290. updateYearMonthIndex();
  291. updateCalendarDays();
  292. fetchScheduleList();
  293. };
  294. const handleNextWeek = () => {
  295. const currentDate = new Date(currentYear.value, currentMonth.value - 1, currentDay.value);
  296. currentDate.setDate(currentDate.getDate() + 7);
  297. currentYear.value = currentDate.getFullYear();
  298. currentMonth.value = currentDate.getMonth() + 1;
  299. currentDay.value = currentDate.getDate();
  300. updateYearMonthIndex();
  301. updateCalendarDays();
  302. fetchScheduleList();
  303. };
  304. const handleDayClick = (day) => {
  305. calendarDays.value.forEach(d => d.isActive = false);
  306. day.isActive = true;
  307. currentYear.value = day.year;
  308. currentMonth.value = day.month;
  309. currentDay.value = day.date;
  310. updateYearMonthIndex();
  311. };
  312. const handleYearChange = (e) => {
  313. yearIndex.value = e.detail.value;
  314. currentYear.value = parseInt(yearList.value[e.detail.value].replace('年', ''));
  315. updateCalendarDays();
  316. fetchScheduleList();
  317. };
  318. const handleMonthChange = (e) => {
  319. monthIndex.value = e.detail.value;
  320. currentMonth.value = parseInt(monthList.value[e.detail.value].replace('月', ''));
  321. updateCalendarDays();
  322. fetchScheduleList();
  323. };
  324. const showAddScheduleModal = ref(false);
  325. const scheduleContent = ref('');
  326. const handleAddSchedule = () => {
  327. showAddScheduleModal.value = true;
  328. scheduleContent.value = '';
  329. };
  330. const handleCloseModal = () => {
  331. showAddScheduleModal.value = false;
  332. scheduleContent.value = '';
  333. };
  334. const handleConfirmSchedule = async () => {
  335. if (!scheduleContent.value.trim()) {
  336. uni.showToast({ title: '请输入日程内容', icon: 'none' });
  337. return;
  338. }
  339. const scheduleDate = `${currentYear.value}-${String(currentMonth.value).padStart(2, '0')}-${String(currentDay.value).padStart(2, '0')}`;
  340. try {
  341. await workspaceApi.saveSchedule({
  342. content: scheduleContent.value.trim(),
  343. scheduleDate
  344. });
  345. uni.showToast({ title: '添加成功', icon: 'success' });
  346. showAddScheduleModal.value = false;
  347. scheduleContent.value = '';
  348. fetchScheduleList();
  349. } catch (error) {
  350. console.error('添加日程失败:', error);
  351. uni.showToast({ title: '添加日程失败,请稍后重试', icon: 'none', duration: 3000 });
  352. }
  353. };
  354. </script>
  355. <style lang="scss">
  356. $primary-color: #2E64FA;
  357. $text-primary: #333333;
  358. $text-secondary: #666666;
  359. $text-tertiary: #999999;
  360. $bg-color: #F5F7FA;
  361. $bg-white: #FFFFFF;
  362. $border-color: #F0F0F0;
  363. $header-border: #EEEEEE;
  364. $font-lg: 44rpx;
  365. $font-md: 34rpx;
  366. $font-sm: 32rpx;
  367. $font-xs: 26rpx;
  368. $font-xxs: 24rpx;
  369. $radius-lg: 20rpx;
  370. $radius-md: 12rpx;
  371. $radius-sm: 8rpx;
  372. $radius-circle: 50%;
  373. $spacing-xl: 80rpx;
  374. $spacing-lg: 32rpx;
  375. $spacing-md: 24rpx;
  376. $spacing-sm: 24rpx;
  377. $spacing-xs: 16rpx;
  378. $spacing-xxs: 12rpx;
  379. $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
  380. @mixin flex-center {
  381. display: flex;
  382. justify-content: center;
  383. align-items: center;
  384. }
  385. @mixin flex-between {
  386. display: flex;
  387. justify-content: space-between;
  388. align-items: center;
  389. }
  390. @mixin flex-column {
  391. display: flex;
  392. flex-direction: column;
  393. align-items: center;
  394. }
  395. @mixin bg-card {
  396. background-color: $bg-white;
  397. border-radius: $radius-lg;
  398. padding: $spacing-md;
  399. }
  400. @mixin text-ellipsis {
  401. overflow: hidden;
  402. text-overflow: ellipsis;
  403. white-space: nowrap;
  404. }
  405. .page_workspace {
  406. min-height: 100vh;
  407. background-color: #F8F9FD;
  408. // padding-bottom: 120rpx;
  409. // font-family: PingFang SC, Helvetica Neue, Arial, sans-serif;
  410. }
  411. .workspace_content {
  412. padding: 140rpx 24rpx 30rpx 24rpx;
  413. }
  414. // 系统列表
  415. .system_list {
  416. @include bg-card;
  417. margin-bottom: $spacing-sm;
  418. .section_title {
  419. font-size: $font-sm;
  420. font-weight: 500;
  421. color: $text-primary;
  422. margin-bottom: $spacing-sm;
  423. }
  424. .system_grid {
  425. display: grid;
  426. grid-template-columns: repeat(4, 130rpx);
  427. justify-content: space-between;
  428. }
  429. .system_item {
  430. @include flex-column;
  431. padding: 20rpx 0;
  432. .system_icon {
  433. width: 96rpx;
  434. height: 96rpx;
  435. margin-bottom: 20rpx;
  436. }
  437. .system_name {
  438. font-size: $font-xxs;
  439. color: $text-secondary;
  440. }
  441. }
  442. }
  443. // 日程
  444. .calendar_section {
  445. @include bg-card;
  446. .calendar_header {
  447. @include flex-between;
  448. margin-bottom: 32rpx;
  449. .section_title {
  450. font-size: $font-sm;
  451. font-weight: 500;
  452. color: $text-primary;
  453. }
  454. .view_schedule {
  455. font-size: 28rpx;
  456. color: $primary-color;
  457. }
  458. }
  459. .calendar_toolbar {
  460. display: flex;
  461. gap: 18rpx;
  462. padding-bottom: 32rpx;
  463. .year_month_select {
  464. display: flex;
  465. gap: 18rpx;
  466. flex: 1;
  467. .select_item {
  468. flex: 1;
  469. // @include flex-center;
  470. gap: 8rpx;
  471. padding: 0;
  472. height: 72rpx;
  473. background-color: #FFFFFF;
  474. border-radius: 8rpx;
  475. border: 2rpx solid #DCDFE6;
  476. .select_content {
  477. display: flex;
  478. justify-content: space-between;
  479. align-items: center;
  480. width: 81%;
  481. padding: 0 16rpx;
  482. height: 72rpx;
  483. }
  484. .select_text {
  485. font-size: $font-xs;
  486. color: $text-primary;
  487. }
  488. }
  489. }
  490. .week_nav {
  491. display: flex;
  492. gap: 18rpx;
  493. .nav_btn {
  494. width: 122rpx;
  495. height: 72rpx;
  496. @include flex-center;
  497. background-color: #FFFFFF;
  498. border-radius: 8rpx;
  499. border: 2rpx solid #DCDFE6;
  500. .nav_text {
  501. font-size: $font-xs;
  502. color: $text-secondary;
  503. }
  504. }
  505. }
  506. }
  507. .calendar_grid {
  508. margin-bottom: $spacing-lg;
  509. .calendar_weekday {
  510. display: flex;
  511. margin-bottom: $spacing-xs;
  512. .weekday_text {
  513. flex: 1;
  514. text-align: center;
  515. font-size: 28rpx;
  516. color: $text-secondary;
  517. }
  518. }
  519. .calendar_days {
  520. display: flex;
  521. justify-content: space-around;
  522. align-items: center;
  523. height: 80rpx;
  524. .day_item {
  525. flex-shrink: 0;
  526. box-sizing: border-box;
  527. display: flex;
  528. justify-content: center;
  529. align-items: center;
  530. width: 80rpx;
  531. height: 80rpx;
  532. border-radius: 50%;
  533. border: 2rpx solid transparent;
  534. position: relative;
  535. &.active {
  536. background-color: rgba(46, 100, 250, 0.1);
  537. border-color: #2E64FA;
  538. .day_text {
  539. color: #2E64FA;
  540. }
  541. }
  542. .day_text {
  543. font-size: $font-sm;
  544. color: $text-primary;
  545. }
  546. &.weekend:not(.active) {
  547. .day_text {
  548. color: #999999;
  549. }
  550. }
  551. .schedule_dot {
  552. position: absolute;
  553. bottom: 12rpx;
  554. width: 8rpx;
  555. height: 8rpx;
  556. background-color: transparent;
  557. border-radius: 50%;
  558. &.visible {
  559. background-color: #2E64FA;
  560. }
  561. }
  562. }
  563. }
  564. }
  565. .schedule_list {
  566. margin-bottom: $spacing-lg;
  567. background: #F9FAFF;
  568. border-radius: 20rpx 20rpx 20rpx 20rpx;
  569. padding: $spacing-lg;
  570. .schedule_title {
  571. font-size: 28rpx;
  572. font-weight: 500;
  573. color: $text-primary;
  574. margin-bottom: $spacing-xs;
  575. }
  576. .schedule_item {
  577. display: flex;
  578. align-items: flex-start;
  579. padding: 24rpx 0;
  580. border-bottom: 2rpx solid #EBEEF5;
  581. &:last-child {
  582. border-bottom: none;
  583. }
  584. .schedule_dot {
  585. width: 16rpx;
  586. height: 16rpx;
  587. background-color: $primary-color;
  588. border-radius: $radius-circle;
  589. margin-top: 14rpx;
  590. margin-right: 14rpx;
  591. flex-shrink: 0;
  592. }
  593. .schedule_text_container {
  594. flex: 1;
  595. position: relative;
  596. }
  597. .schedule_text {
  598. font-size: 28rpx;
  599. color: #666666;
  600. line-height: 1.6;
  601. display: -webkit-box;
  602. -webkit-box-orient: vertical;
  603. -webkit-line-clamp: 2;
  604. overflow: hidden;
  605. text-overflow: ellipsis;
  606. &.expanded {
  607. -webkit-line-clamp: unset;
  608. overflow: visible;
  609. text-overflow: unset;
  610. }
  611. }
  612. .toggle_text {
  613. font-size: 24rpx;
  614. color: #2E64FA;
  615. float: right;
  616. margin-top: 14rpx;
  617. display: inline;
  618. }
  619. }
  620. }
  621. .add_schedule_btn {
  622. @include flex-center;
  623. gap: 16rpx;
  624. height: 56rpx;
  625. background-color: #FFFFFF;
  626. border-radius: 12rpx 12rpx 12rpx 12rpx;;
  627. border: 1px solid #2E64FA;
  628. .btn_text {
  629. font-size: 28rpx;
  630. color: #2E64FA;
  631. font-weight: 500;
  632. }
  633. .add_icon {
  634. width: 32rpx;
  635. height: 32rpx;
  636. }
  637. }
  638. }
  639. .modal-overlay {
  640. position: fixed;
  641. top: 0;
  642. left: 0;
  643. right: 0;
  644. bottom: 0;
  645. background-color: rgba(0, 0, 0, 0.5);
  646. display: flex;
  647. justify-content: center;
  648. align-items: center;
  649. z-index: 1000;
  650. }
  651. .modal-content {
  652. width: 702rpx;
  653. background-color: #FFFFFF;
  654. border-radius: 16rpx;
  655. overflow: hidden;
  656. .modal-header {
  657. display: flex;
  658. justify-content: space-between;
  659. align-items: center;
  660. height: 96rpx;
  661. padding: 0 40rpx;
  662. background-color: #F5F7FA;
  663. .modal-title {
  664. font-size: 32rpx;
  665. font-weight: 500;
  666. color: #303133;
  667. }
  668. .modal-close {
  669. width: 60rpx;
  670. height: 60rpx;
  671. display: flex;
  672. justify-content: center;
  673. align-items: center;
  674. }
  675. .close-icon {
  676. width: 40rpx;
  677. height: 40rpx;
  678. }
  679. }
  680. .modal-body {
  681. padding: 24rpx;
  682. .modal-date {
  683. font-size: 32rpx;
  684. color: #333333;
  685. margin-bottom: 24rpx;
  686. display: block;
  687. }
  688. .schedule-textarea {
  689. width: 100%;
  690. height: 364rpx;
  691. padding: 20rpx;
  692. border: 2rpx solid #E8E8E8;
  693. border-radius: 12rpx;
  694. font-size: 28rpx;
  695. color: #333333;
  696. box-sizing: border-box;
  697. }
  698. .textarea-placeholder {
  699. color: #999999;
  700. }
  701. }
  702. .modal-footer {
  703. display: flex;
  704. justify-content: flex-end;
  705. align-items: center;
  706. padding: 28rpx 40rpx;
  707. gap: 16rpx;
  708. border-top: 2rpx solid #EBEEF5;
  709. .modal-btn {
  710. height: 72rpx;
  711. // padding: 0 48rpx;
  712. width: 136rpx;
  713. display: flex;
  714. justify-content: center;
  715. align-items: center;
  716. font-size: 28rpx;
  717. border-radius: 8rpx;
  718. flex-shrink: 0;
  719. &.cancel-btn {
  720. color: #666666;
  721. background-color: #FFFFFF;
  722. border: 2rpx solid #DCDFE6;
  723. height: 68rpx;
  724. }
  725. &.confirm-btn {
  726. color: #FFFFFF;
  727. background-color: #2E64FA;
  728. border: none;
  729. }
  730. }
  731. }
  732. }
  733. </style>