index.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077
  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. }
  550. .dot-green {
  551. background-color: #52C41A;
  552. }
  553. .dot-red {
  554. background-color: #F5222D;
  555. }
  556. .small_icon {
  557. width: 96rpx;
  558. height: 96rpx;
  559. margin-bottom: 20rpx;
  560. }
  561. .small_name {
  562. font-size: 28rpx;
  563. color: $text-secondary;
  564. text-align: center;
  565. }
  566. }
  567. }
  568. }
  569. .bottom_grid {
  570. display: grid;
  571. grid-template-columns: repeat(4, 1fr);
  572. gap: 16rpx;
  573. .small_item {
  574. display: flex;
  575. flex-direction: column;
  576. align-items: center;
  577. justify-content: center;
  578. background-color: #FFFFFF;
  579. border-radius: 12rpx;
  580. padding: 20rpx 0;
  581. position: relative;
  582. .card_dot {
  583. position: absolute;
  584. top: 12rpx;
  585. right: 12rpx;
  586. width: 32rpx;
  587. height: 32rpx;
  588. z-index: 100;
  589. }
  590. .dot-green {
  591. background-color: #52C41A;
  592. }
  593. .dot-red {
  594. background-color: #F5222D;
  595. }
  596. .small_icon {
  597. width: 96rpx;
  598. height: 96rpx;
  599. margin-bottom: 20rpx;
  600. }
  601. .small_name {
  602. font-size: 28rpx;
  603. color: $text-secondary;
  604. text-align: center;
  605. }
  606. }
  607. }
  608. .system_grid_full {
  609. display: grid;
  610. grid-template-columns: repeat(4, 1fr);
  611. gap: 16rpx;
  612. .small_item {
  613. display: flex;
  614. flex-direction: column;
  615. align-items: center;
  616. justify-content: center;
  617. background-color: #FFFFFF;
  618. border-radius: 12rpx;
  619. padding: 20rpx 0;
  620. position: relative;
  621. .card_dot {
  622. position: absolute;
  623. top: 12rpx;
  624. right: 12rpx;
  625. width: 12rpx;
  626. height: 12rpx;
  627. border-radius: 50%;
  628. }
  629. .dot-green {
  630. background-color: #52C41A;
  631. }
  632. .dot-red {
  633. background-color: #F5222D;
  634. }
  635. .small_icon {
  636. width: 64rpx;
  637. height: 64rpx;
  638. margin-bottom: 12rpx;
  639. }
  640. .small_name {
  641. font-size: 22rpx;
  642. color: $text-secondary;
  643. text-align: center;
  644. }
  645. }
  646. }
  647. }
  648. // 日程
  649. .calendar_section {
  650. @include bg-card;
  651. .calendar_header {
  652. @include flex-between;
  653. margin-bottom: 32rpx;
  654. .section_title {
  655. font-size: $font-sm;
  656. font-weight: 500;
  657. color: $text-primary;
  658. }
  659. .view_schedule {
  660. font-size: 28rpx;
  661. color: $primary-color;
  662. }
  663. }
  664. .calendar_toolbar {
  665. display: flex;
  666. gap: 18rpx;
  667. padding-bottom: 32rpx;
  668. .year_month_select {
  669. display: flex;
  670. gap: 18rpx;
  671. flex: 1;
  672. .select_item {
  673. flex: 1;
  674. // @include flex-center;
  675. gap: 8rpx;
  676. padding: 0;
  677. height: 72rpx;
  678. background-color: #FFFFFF;
  679. border-radius: 8rpx;
  680. border: 2rpx solid #DCDFE6;
  681. .select_content {
  682. display: flex;
  683. justify-content: space-between;
  684. align-items: center;
  685. width: 81%;
  686. padding: 0 16rpx;
  687. height: 72rpx;
  688. }
  689. .select_text {
  690. font-size: $font-xs;
  691. color: $text-primary;
  692. }
  693. }
  694. }
  695. .week_nav {
  696. display: flex;
  697. gap: 18rpx;
  698. .nav_btn {
  699. width: 122rpx;
  700. height: 72rpx;
  701. @include flex-center;
  702. background-color: #FFFFFF;
  703. border-radius: 8rpx;
  704. border: 2rpx solid #DCDFE6;
  705. .nav_text {
  706. font-size: $font-xs;
  707. color: $text-secondary;
  708. }
  709. }
  710. }
  711. }
  712. .calendar_grid {
  713. margin-bottom: $spacing-lg;
  714. .calendar_weekday {
  715. display: flex;
  716. margin-bottom: $spacing-xs;
  717. .weekday_text {
  718. flex: 1;
  719. text-align: center;
  720. font-size: 28rpx;
  721. color: $text-secondary;
  722. }
  723. }
  724. .calendar_days {
  725. display: flex;
  726. justify-content: space-around;
  727. align-items: center;
  728. height: 80rpx;
  729. .day_item {
  730. flex-shrink: 0;
  731. box-sizing: border-box;
  732. display: flex;
  733. justify-content: center;
  734. align-items: center;
  735. width: 80rpx;
  736. height: 80rpx;
  737. border-radius: 50%;
  738. border: 2rpx solid transparent;
  739. position: relative;
  740. &.active {
  741. background-color: rgba(46, 100, 250, 0.1);
  742. border-color: #2E64FA;
  743. .day_text {
  744. color: #2E64FA;
  745. }
  746. }
  747. .day_text {
  748. font-size: $font-sm;
  749. color: $text-primary;
  750. }
  751. &.weekend:not(.active) {
  752. .day_text {
  753. color: #999999;
  754. }
  755. }
  756. .schedule_dot {
  757. position: absolute;
  758. bottom: 12rpx;
  759. width: 8rpx;
  760. height: 8rpx;
  761. background-color: transparent;
  762. border-radius: 50%;
  763. &.visible {
  764. background-color: #2E64FA;
  765. }
  766. }
  767. }
  768. }
  769. }
  770. .schedule_list {
  771. margin-bottom: $spacing-lg;
  772. background: #F9FAFF;
  773. border-radius: 20rpx 20rpx 20rpx 20rpx;
  774. padding: $spacing-lg;
  775. .schedule_title {
  776. font-size: 28rpx;
  777. font-weight: 500;
  778. color: $text-primary;
  779. margin-bottom: $spacing-xs;
  780. }
  781. .schedule_item {
  782. display: flex;
  783. align-items: flex-start;
  784. padding: 24rpx 0;
  785. border-bottom: 2rpx solid #EBEEF5;
  786. &:last-child {
  787. border-bottom: none;
  788. }
  789. .schedule_dot {
  790. width: 16rpx;
  791. height: 16rpx;
  792. background-color: $primary-color;
  793. border-radius: $radius-circle;
  794. margin-top: 14rpx;
  795. margin-right: 14rpx;
  796. flex-shrink: 0;
  797. }
  798. .schedule_text_container {
  799. flex: 1;
  800. position: relative;
  801. }
  802. .schedule_text {
  803. font-size: 28rpx;
  804. color: #666666;
  805. line-height: 1.6;
  806. display: -webkit-box;
  807. flex: 1;
  808. text-align: justify;
  809. &.expanded {
  810. -webkit-line-clamp: unset;
  811. overflow: visible;
  812. text-overflow: unset;
  813. padding-right: 0;
  814. }
  815. }
  816. .toggle_text {
  817. font-size: 28rpx;
  818. color: #2E64FA;
  819. position: absolute;
  820. right: 0;
  821. bottom: 0;
  822. line-height: 1.6;
  823. }
  824. }
  825. }
  826. .add_schedule_btn {
  827. @include flex-center;
  828. gap: 16rpx;
  829. height: 56rpx;
  830. background-color: #FFFFFF;
  831. border-radius: 12rpx 12rpx 12rpx 12rpx;
  832. ;
  833. border: 1px solid #2E64FA;
  834. .btn_text {
  835. font-size: 28rpx;
  836. color: #2E64FA;
  837. font-weight: 500;
  838. }
  839. .add_icon {
  840. width: 32rpx;
  841. height: 32rpx;
  842. }
  843. }
  844. }
  845. .modal-overlay {
  846. position: fixed;
  847. top: 0;
  848. left: 0;
  849. right: 0;
  850. bottom: 0;
  851. background-color: rgba(0, 0, 0, 0.5);
  852. display: flex;
  853. justify-content: center;
  854. align-items: center;
  855. z-index: 1000;
  856. }
  857. .modal-content {
  858. width: 702rpx;
  859. background-color: #FFFFFF;
  860. border-radius: 16rpx;
  861. overflow: hidden;
  862. .modal-header {
  863. display: flex;
  864. justify-content: space-between;
  865. align-items: center;
  866. height: 96rpx;
  867. padding: 0 40rpx;
  868. background-color: #F5F7FA;
  869. .modal-title {
  870. font-size: 32rpx;
  871. font-weight: 500;
  872. color: #303133;
  873. }
  874. .modal-close {
  875. width: 60rpx;
  876. height: 60rpx;
  877. display: flex;
  878. justify-content: center;
  879. align-items: center;
  880. }
  881. .close-icon {
  882. width: 40rpx;
  883. height: 40rpx;
  884. }
  885. }
  886. .modal-body {
  887. padding: 24rpx;
  888. .modal-date {
  889. font-size: 32rpx;
  890. color: #333333;
  891. margin-bottom: 24rpx;
  892. display: block;
  893. }
  894. .schedule-textarea {
  895. width: 100%;
  896. height: 364rpx;
  897. padding: 20rpx;
  898. border: 2rpx solid #E8E8E8;
  899. border-radius: 12rpx;
  900. font-size: 28rpx;
  901. color: #333333;
  902. box-sizing: border-box;
  903. }
  904. .textarea-placeholder {
  905. color: #999999;
  906. }
  907. }
  908. .modal-footer {
  909. display: flex;
  910. justify-content: flex-end;
  911. align-items: center;
  912. padding: 28rpx 40rpx;
  913. gap: 16rpx;
  914. border-top: 2rpx solid #EBEEF5;
  915. .modal-btn {
  916. height: 72rpx;
  917. // padding: 0 48rpx;
  918. width: 136rpx;
  919. display: flex;
  920. justify-content: center;
  921. align-items: center;
  922. font-size: 28rpx;
  923. border-radius: 8rpx;
  924. flex-shrink: 0;
  925. &.cancel-btn {
  926. color: #666666;
  927. background-color: #FFFFFF;
  928. border: 2rpx solid #DCDFE6;
  929. height: 68rpx;
  930. }
  931. &.confirm-btn {
  932. color: #FFFFFF;
  933. background-color: #2E64FA;
  934. border: none;
  935. }
  936. }
  937. }
  938. }
  939. </style>