Compare commits
No commits in common. "ccf16176c6057b525a285f7365fcf3a43d036e88" and "7b87b5a6e35a5362a47cc54b29c041bab2d72342" have entirely different histories.
ccf16176c6
...
7b87b5a6e3
|
@ -37,13 +37,7 @@ export const constantRoutes = [
|
|||
component: () => import('@/views/profile/index.vue'),
|
||||
name: 'profile',
|
||||
meta: {title: '个人中心'}
|
||||
},
|
||||
{
|
||||
path: '/class',
|
||||
component: () => import('@/views/classManage/index.vue'),
|
||||
name: 'class',
|
||||
meta: {title: '班级中心'},
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
|
|
@ -19,8 +19,10 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ref,defineProps,defineEmits,onMounted} from "vue";
|
||||
import {ref,defineProps,defineEmits} from "vue";
|
||||
import { useRouter } from 'vue-router'
|
||||
const activeIndex = ref('0')
|
||||
const router = useRouter()
|
||||
const props = defineProps({
|
||||
classList:{
|
||||
type:Array,
|
||||
|
@ -43,9 +45,7 @@ const handleSelect = (itemDom,pathKey) => {
|
|||
// })
|
||||
emits('handleSelect',{index,id})
|
||||
}
|
||||
onMounted(() => {
|
||||
console.log(props.classList,'props.classList')
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
@ -113,7 +113,8 @@ import useUserStore from '@/store/modules/user'
|
|||
import {useRoute} from 'vue-router'
|
||||
import {ElMessage} from "element-plus";
|
||||
|
||||
const userStore = useUserStore().user
|
||||
const userStore = useUserStore()
|
||||
const route = useRoute()
|
||||
const props = defineProps({
|
||||
classId: {type: Number}
|
||||
})
|
||||
|
|
|
@ -2,24 +2,19 @@
|
|||
<el-card style="width: 100%">
|
||||
<template #header>
|
||||
<div style="text-align: left">
|
||||
<el-button v-if="classInfo.teacher.length > 0" type="danger" @click="deleteClassRoom">删除班级</el-button>
|
||||
<el-button type="danger" @click="deleteClassRoom">删除班级</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="classInfo.teacher.length > 0">
|
||||
<el-descriptions :column="1">
|
||||
<el-descriptions-item label="班级名称">{{ classInfo.className }}</el-descriptions-item>
|
||||
<el-descriptions-item label="教师">
|
||||
<template>
|
||||
<template v-if="classInfo.teacher.length > 0">
|
||||
<el-tag type="primary" v-for="(item, index) in classInfo.teacher" :key="index">{{item.name}}</el-tag>
|
||||
</template>
|
||||
<template v-else>暂无</template>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="学生人数">{{ classInfo.student.length }}人</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<el-empty description="暂无班级信息" style="margin: 0 auto"/>
|
||||
</template>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -40,7 +35,7 @@
|
|||
student: []
|
||||
})
|
||||
const isDelClass = delClassDemo()
|
||||
const userStore = useUserStore().user
|
||||
const userStore = useUserStore()
|
||||
//删除教室
|
||||
const deleteClassRoom = () => {
|
||||
ElMessageBox.alert('确认删除该班级?', {
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
import ClassInfo from './classInfo.vue'
|
||||
import Aside from './aside.vue'
|
||||
|
||||
const userStore = useUserStore().user
|
||||
const userStore = useUserStore()
|
||||
const isDel = delClassDemo()
|
||||
//获取班级信息
|
||||
const classList = ref([])
|
||||
|
@ -144,7 +144,7 @@
|
|||
classList.value = []
|
||||
listClassmain({ entpid: userStore.deptId, pageSize: 500, status: 'open' }).then(response => {
|
||||
response.rows.forEach(item => {
|
||||
if(item.classteacherids && Number(item.classteacherids) === userStore.userId){
|
||||
if(item.classteacherids && Number(item.classteacherids) === userStore?.id){
|
||||
classList.value.push(item)
|
||||
}
|
||||
})
|
||||
|
@ -265,7 +265,6 @@
|
|||
onMounted(() => {
|
||||
getClassInfo()
|
||||
nextTick(() => {
|
||||
console.log(userStore.deptId,'123')
|
||||
viewportHeight.value = getViewportHeight()
|
||||
})
|
||||
window.addEventListener('resize', () => {
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
|
||||
const studentVisible = ref(false)
|
||||
const importVisiable = ref(false)
|
||||
const userStore = useUserStore().user
|
||||
const userStore = useUserStore()
|
||||
const props = defineProps({
|
||||
classId: {type: Number}
|
||||
})
|
||||
|
@ -191,8 +191,6 @@
|
|||
message: '修改成功',
|
||||
type: 'success',
|
||||
})
|
||||
getClassStudentInfo()
|
||||
studentVisible.value = false
|
||||
})
|
||||
}else{
|
||||
studentForm.entpid = classInfo.value.entpid;
|
||||
|
@ -208,11 +206,10 @@
|
|||
type: 'success',
|
||||
})
|
||||
}
|
||||
getClassStudentInfo()
|
||||
studentVisible.value = false
|
||||
})
|
||||
}
|
||||
|
||||
getClassStudentInfo()
|
||||
studentVisible.value = false
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue