index.vue 27 KB

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