|
@@ -8,6 +8,9 @@
|
|
|
<template v-if="largeCard?.visible">
|
|
<template v-if="largeCard?.visible">
|
|
|
<view class="system_grid_with_large">
|
|
<view class="system_grid_with_large">
|
|
|
<view class="large_card" @click="handleSystemClick(largeCard)">
|
|
<view class="large_card" @click="handleSystemClick(largeCard)">
|
|
|
|
|
+ <view class="card_dot" >
|
|
|
|
|
+ <img :src="getModulePermission(largeCard.id) == 1 ? './static/image/workspace/throughIcon.png' : '/static/image/workspace/authorityIcon.png'" class="dot_img" alt="">
|
|
|
|
|
+ </view>
|
|
|
<image :src="largeCard.image" class="large_icon" mode="aspectFit"></image>
|
|
<image :src="largeCard.image" class="large_icon" mode="aspectFit"></image>
|
|
|
<text class="large_name">{{ largeCard.name }}</text>
|
|
<text class="large_name">{{ largeCard.name }}</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -15,6 +18,9 @@
|
|
|
<view class="right_top_grid">
|
|
<view class="right_top_grid">
|
|
|
<view v-for="(item, index) in rightTopCards" :key="index" class="small_item"
|
|
<view v-for="(item, index) in rightTopCards" :key="index" class="small_item"
|
|
|
@click="handleSystemClick(item)">
|
|
@click="handleSystemClick(item)">
|
|
|
|
|
+ <view class="card_dot" >
|
|
|
|
|
+ <img :src="getModulePermission(item.id) == 1 ? './static/image/workspace/throughIcon.png' : '/static/image/workspace/authorityIcon.png'" class="dot_img" alt="">
|
|
|
|
|
+ </view>
|
|
|
<image :src="item.image" class="small_icon" mode="aspectFit"></image>
|
|
<image :src="item.image" class="small_icon" mode="aspectFit"></image>
|
|
|
<text class="small_name">{{ item.name }}</text>
|
|
<text class="small_name">{{ item.name }}</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -24,6 +30,9 @@
|
|
|
<view class="bottom_grid">
|
|
<view class="bottom_grid">
|
|
|
<view v-for="(item, index) in bottomCards" :key="index" class="small_item"
|
|
<view v-for="(item, index) in bottomCards" :key="index" class="small_item"
|
|
|
@click="handleSystemClick(item)">
|
|
@click="handleSystemClick(item)">
|
|
|
|
|
+ <view class="card_dot" >
|
|
|
|
|
+ <img :src="getModulePermission(item.id) == 1 ? './static/image/workspace/throughIcon.png' : '/static/image/workspace/authorityIcon.png'" class="dot_img" alt="">
|
|
|
|
|
+ </view>
|
|
|
<image :src="item.image" class="small_icon" mode="aspectFit"></image>
|
|
<image :src="item.image" class="small_icon" mode="aspectFit"></image>
|
|
|
<text class="small_name">{{ item.name }}</text>
|
|
<text class="small_name">{{ item.name }}</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -34,6 +43,7 @@
|
|
|
<view class="system_grid_full">
|
|
<view class="system_grid_full">
|
|
|
<view v-for="(item, index) in allSmallCards" :key="index" class="small_item"
|
|
<view v-for="(item, index) in allSmallCards" :key="index" class="small_item"
|
|
|
@click="handleSystemClick(item)">
|
|
@click="handleSystemClick(item)">
|
|
|
|
|
+ <view class="card_dot" :class="{ 'dot-green': getModulePermission(item.id) == 1, 'dot-red': getModulePermission(item.id) == 0 }"></view>
|
|
|
<image :src="item.image" class="small_icon" mode="aspectFit"></image>
|
|
<image :src="item.image" class="small_icon" mode="aspectFit"></image>
|
|
|
<text class="small_name">{{ item.name }}</text>
|
|
<text class="small_name">{{ item.name }}</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -97,7 +107,7 @@
|
|
|
<view class="schedule_dot"></view>
|
|
<view class="schedule_dot"></view>
|
|
|
<view class="schedule_text_container">
|
|
<view class="schedule_text_container">
|
|
|
<text class="schedule_text" :class="{ expanded: expandedItems[item.id] }">{{ item.title
|
|
<text class="schedule_text" :class="{ expanded: expandedItems[item.id] }">{{ item.title
|
|
|
- }}</text>
|
|
|
|
|
|
|
+ }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -146,25 +156,42 @@ import NoData from '@/components/noData.vue';
|
|
|
import CommonTabbar from '@/components/commonTabbar.vue';
|
|
import CommonTabbar from '@/components/commonTabbar.vue';
|
|
|
import { useSafeArea } from '@/common/safeArea';
|
|
import { useSafeArea } from '@/common/safeArea';
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
const store = useStore();
|
|
const store = useStore();
|
|
|
const { statusBarHeight, safeAreaBottom, initSafeArea } = useSafeArea();
|
|
const { statusBarHeight, safeAreaBottom, initSafeArea } = useSafeArea();
|
|
|
|
|
|
|
|
const systemItems = ref([
|
|
const systemItems = ref([
|
|
|
- { name: '大数据精准教学诊断平台', key: '', image: '/static/image/workspace/iconLeft.png', isLarge: true, visible: true },
|
|
|
|
|
- { name: '选择题判分', key: '', image: '/static/image/workspace/icon1.png', isLarge: false, visible: true },
|
|
|
|
|
- { name: '材料采集', key: 'materialCollection', image: '/static/image/workspace/icon2.png', isLarge: false, visible: true },
|
|
|
|
|
- { name: '教师研修', key: 'teacherStudy', image: '/static/image/workspace/icon3.png', isLarge: false, visible: true },
|
|
|
|
|
- { name: '学生学习', key: 'studentStudy', image: '/static/image/workspace/icon4.png', isLarge: false, visible: true },
|
|
|
|
|
- { name: '智能选课', key: '', image: '/static/image/workspace/icon5.png', isLarge: false, visible: true },
|
|
|
|
|
- { name: '教师发展', key: 'teacherHonor', image: '/static/image/workspace/icon6.png', isLarge: false, visible: true },
|
|
|
|
|
- { name: '协同备课', key: '', image: '/static/image/workspace/icon7.png', isLarge: false, visible: true },
|
|
|
|
|
- { name: '校内通知', key: 'notice', image: '/static/image/workspace/icon8.png', isLarge: false, visible: true },
|
|
|
|
|
- { name: '评教评学', key: '', image: '/static/image/workspace/icon9.png', isLarge: false, visible: true },
|
|
|
|
|
- { name: '考场编排', key: '', image: '/static/image/workspace/icon10.png', isLarge: false, visible: true },
|
|
|
|
|
- { name: '听课评课', key: '', image: '/static/image/workspace/icon11.png', isLarge: false, visible: true },
|
|
|
|
|
- { name: '基础数据', key: '', image: '/static/image/workspace/icon12.png', isLarge: false, visible: true }
|
|
|
|
|
|
|
+ { name: '大数据精准教学诊断平台', id: '1', key: '', image: '/static/image/workspace/iconLeft.png', isLarge: true, visible: true },
|
|
|
|
|
+ { name: '选择题判分', id: '3', key: '', image: '/static/image/workspace/icon1.png', isLarge: false, visible: true },
|
|
|
|
|
+ { name: '材料采集', id: '7', key: 'materialCollection', image: '/static/image/workspace/icon2.png', isLarge: false, visible: true },
|
|
|
|
|
+ { name: '教师研修', id: '9', key: 'teacherStudy', image: '/static/image/workspace/icon3.png', isLarge: false, visible: true },
|
|
|
|
|
+ { name: '学生学习', id: '13', key: 'studentStudy', image: '/static/image/workspace/icon4.png', isLarge: false, visible: true },
|
|
|
|
|
+ { name: '智能选课', id: '4', key: '', image: '/static/image/workspace/icon5.png', isLarge: false, visible: true },
|
|
|
|
|
+ { name: '教师发展', id: '8', key: 'teacherHonor', image: '/static/image/workspace/icon6.png', isLarge: false, visible: true },
|
|
|
|
|
+ { name: '协同备课', id: '10', key: '', image: '/static/image/workspace/icon7.png', isLarge: false, visible: true },
|
|
|
|
|
+ { name: '校内通知', id: '12', key: 'notice', image: '/static/image/workspace/icon8.png', isLarge: false, visible: true },
|
|
|
|
|
+ { name: '评教评学', id: '5', key: '', image: '/static/image/workspace/icon9.png', isLarge: false, visible: true },
|
|
|
|
|
+ { name: '考场编排', id: '6', key: '', image: '/static/image/workspace/icon10.png', isLarge: false, visible: true },
|
|
|
|
|
+ { name: '听课评课', id: '11', key: '', image: '/static/image/workspace/icon11.png', isLarge: false, visible: true },
|
|
|
|
|
+ { name: '基础数据', id: '2', key: '', image: '/static/image/workspace/icon12.png', isLarge: false, visible: true }
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
|
|
+const modulesList = ref([]);
|
|
|
|
|
+const moduleMap = computed(() => {
|
|
|
|
|
+ const map = {};
|
|
|
|
|
+ modulesList.value.forEach(item => {
|
|
|
|
|
+ map[item.id] = item;
|
|
|
|
|
+ });
|
|
|
|
|
+ return map;
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+const getModulePermission = (itemId) => {
|
|
|
|
|
+ const module = moduleMap.value[itemId];
|
|
|
|
|
+ if (!module) return 1;
|
|
|
|
|
+ return module.isSelect;
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const largeCard = computed(() => systemItems.value.find(item => item.isLarge));
|
|
const largeCard = computed(() => systemItems.value.find(item => item.isLarge));
|
|
|
const smallCards = computed(() => systemItems.value.filter(item => !item.isLarge));
|
|
const smallCards = computed(() => systemItems.value.filter(item => !item.isLarge));
|
|
|
const rightTopCards = computed(() => smallCards.value.slice(0, 4));
|
|
const rightTopCards = computed(() => smallCards.value.slice(0, 4));
|
|
@@ -310,10 +337,17 @@ onMounted(() => {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
onShow(() => {
|
|
onShow(() => {
|
|
|
|
|
+ modulesList.value = store.state.userStore.modulesList || uni.getStorageSync('modulesList') || [];
|
|
|
fetchScheduleList();
|
|
fetchScheduleList();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const handleSystemClick = (item) => {
|
|
const handleSystemClick = (item) => {
|
|
|
|
|
+ const isSelect = getModulePermission(item.id);
|
|
|
|
|
+ if (isSelect == 0) {
|
|
|
|
|
+ uni.showToast({ title: '暂无权限,敬请期待!', icon: 'none' });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (item.key === 'notice') {
|
|
if (item.key === 'notice') {
|
|
|
const userInfo = store.state.userStore.userInfo || uni.getStorageSync('userInfo') || {};
|
|
const userInfo = store.state.userStore.userInfo || uni.getStorageSync('userInfo') || {};
|
|
|
const roleCodes = userInfo.roleCodes || [];
|
|
const roleCodes = userInfo.roleCodes || [];
|
|
@@ -524,7 +558,27 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
|
width: 324rpx;
|
|
width: 324rpx;
|
|
|
height: 352rpx;
|
|
height: 352rpx;
|
|
|
- // padding: 30rpx 0;
|
|
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+
|
|
|
|
|
+ .card_dot {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: -6rpx;
|
|
|
|
|
+ right: -12rpx;
|
|
|
|
|
+ width: 32rpx;
|
|
|
|
|
+ height: 32rpx;
|
|
|
|
|
+ img {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dot-green {
|
|
|
|
|
+ background-color: #52C41A;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dot-red {
|
|
|
|
|
+ background-color: #F5222D;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
.large_icon {
|
|
.large_icon {
|
|
|
width: 160rpx;
|
|
width: 160rpx;
|
|
@@ -554,8 +608,24 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
background-color: #FFFFFF;
|
|
background-color: #FFFFFF;
|
|
|
- // border-radius: 12rpx;
|
|
|
|
|
- // padding: 20rpx 0;
|
|
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+
|
|
|
|
|
+ .card_dot {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: -2rpx;
|
|
|
|
|
+ right: 12rpx;
|
|
|
|
|
+ width: 32rpx;
|
|
|
|
|
+ height: 32rpx;
|
|
|
|
|
+ z-index: 100;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dot-green {
|
|
|
|
|
+ background-color: #52C41A;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dot-red {
|
|
|
|
|
+ background-color: #F5222D;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
.small_icon {
|
|
.small_icon {
|
|
|
width: 96rpx;
|
|
width: 96rpx;
|
|
@@ -585,6 +655,24 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
background-color: #FFFFFF;
|
|
background-color: #FFFFFF;
|
|
|
border-radius: 12rpx;
|
|
border-radius: 12rpx;
|
|
|
padding: 20rpx 0;
|
|
padding: 20rpx 0;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+
|
|
|
|
|
+ .card_dot {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 12rpx;
|
|
|
|
|
+ right: 12rpx;
|
|
|
|
|
+ width: 32rpx;
|
|
|
|
|
+ height: 32rpx;
|
|
|
|
|
+ z-index: 100;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dot-green {
|
|
|
|
|
+ background-color: #52C41A;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dot-red {
|
|
|
|
|
+ background-color: #F5222D;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
.small_icon {
|
|
.small_icon {
|
|
|
width: 96rpx;
|
|
width: 96rpx;
|
|
@@ -613,6 +701,24 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
background-color: #FFFFFF;
|
|
background-color: #FFFFFF;
|
|
|
border-radius: 12rpx;
|
|
border-radius: 12rpx;
|
|
|
padding: 20rpx 0;
|
|
padding: 20rpx 0;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+
|
|
|
|
|
+ .card_dot {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 12rpx;
|
|
|
|
|
+ right: 12rpx;
|
|
|
|
|
+ width: 12rpx;
|
|
|
|
|
+ height: 12rpx;
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dot-green {
|
|
|
|
|
+ background-color: #52C41A;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dot-red {
|
|
|
|
|
+ background-color: #F5222D;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
.small_icon {
|
|
.small_icon {
|
|
|
width: 64rpx;
|
|
width: 64rpx;
|
|
@@ -819,6 +925,7 @@ $shadow-sm: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
display: -webkit-box;
|
|
display: -webkit-box;
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
text-align: justify;
|
|
text-align: justify;
|
|
|
|
|
+
|
|
|
&.expanded {
|
|
&.expanded {
|
|
|
-webkit-line-clamp: unset;
|
|
-webkit-line-clamp: unset;
|
|
|
overflow: visible;
|
|
overflow: visible;
|