index.vue 27 KB

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