Compare commits

..

10 Commits

12 changed files with 47 additions and 28 deletions

View File

@ -13,8 +13,8 @@
"build": "electron-vite build",
"postinstall": "electron-builder install-app-deps",
"build:unpack": "npm run build && electron-builder --dir",
"build:test": "npm run build && electron-builder --win --config ./electron-builder-test.yml",
"build:prod": "npm run build && electron-builder --win --config ./electron-builder.yml",
"build:dev": "npm run build && electron-builder --win --config ./electron-builder-test.yml",
"build:test": "npm run build && electron-builder --win --config ./electron-builder.yml",
"build:mac": "npm run build && electron-builder --mac",
"build:linux": "npm run build && electron-builder --linux"
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -190,6 +190,7 @@ function setLayout() {
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 5px;
flex-direction: column;
@ -215,6 +216,7 @@ function setLayout() {
height: 30px;
border-radius: 10px;
margin-top: 8px;
margin-right: 10px;
}
.user-avatar:hover {

View File

@ -38,7 +38,13 @@ 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: '班级中心'},
},
]
},
...toolRouters

View File

@ -19,10 +19,8 @@
</template>
<script setup>
import {ref,defineProps,defineEmits} from "vue";
import { useRouter } from 'vue-router'
import {ref,defineProps,defineEmits,onMounted} from "vue";
const activeIndex = ref('0')
const router = useRouter()
const props = defineProps({
classList:{
type:Array,
@ -45,7 +43,9 @@ const handleSelect = (itemDom,pathKey) => {
// })
emits('handleSelect',{index,id})
}
onMounted(() => {
console.log(props.classList,'props.classList')
})
</script>
<style scoped>

View File

@ -113,8 +113,7 @@ import useUserStore from '@/store/modules/user'
import {useRoute} from 'vue-router'
import {ElMessage} from "element-plus";
const userStore = useUserStore()
const route = useRoute()
const userStore = useUserStore().user
const props = defineProps({
classId: {type: Number}
})

View File

@ -2,19 +2,24 @@
<el-card style="width: 100%">
<template #header>
<div style="text-align: left">
<el-button type="danger" @click="deleteClassRoom">删除班级</el-button>
<el-button v-if="classInfo.teacher.length > 0" 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 v-if="classInfo.teacher.length > 0">
<template>
<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>
@ -35,7 +40,7 @@
student: []
})
const isDelClass = delClassDemo()
const userStore = useUserStore()
const userStore = useUserStore().user
//
const deleteClassRoom = () => {
ElMessageBox.alert('确认删除该班级?', {

View File

@ -75,7 +75,7 @@
import ClassInfo from './classInfo.vue'
import Aside from './aside.vue'
const userStore = useUserStore()
const userStore = useUserStore().user
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?.id){
if(item.classteacherids && Number(item.classteacherids) === userStore.userId){
classList.value.push(item)
}
})
@ -265,6 +265,7 @@
onMounted(() => {
getClassInfo()
nextTick(() => {
console.log(userStore.deptId,'123')
viewportHeight.value = getViewportHeight()
})
window.addEventListener('resize', () => {

View File

@ -118,7 +118,7 @@
const studentVisible = ref(false)
const importVisiable = ref(false)
const userStore = useUserStore()
const userStore = useUserStore().user
const props = defineProps({
classId: {type: Number}
})
@ -191,6 +191,8 @@
message: '修改成功',
type: 'success',
})
getClassStudentInfo()
studentVisible.value = false
})
}else{
studentForm.entpid = classInfo.value.entpid;
@ -206,10 +208,11 @@
type: 'success',
})
}
})
}
getClassStudentInfo()
studentVisible.value = false
})
}
} else {
return false;
}

View File

@ -29,7 +29,7 @@
<i class="iconfont icon-bianji"></i>
<span>编辑</span>
</div>
<div class="item-popover-item" @click="delRow(item)">
<div class="item-popover-item" v-if="userInfo.userId == item.uploadUserId" @click="delRow(item)">
<i class="iconfont icon-shanchu"></i>
<span>删除</span>
</div>
@ -65,11 +65,15 @@ import FileImage from '@/components/file-image/index.vue'
import { deleteSmarttalk, updateSmarttalk } from '@/api/file'
import { addFileToPrepare } from '@/api/subject'
import { getFileSuffix } from '@/utils/ruoyi'
import useUserStore from '@/store/modules/user'
import useResoureStore from '../store'
const { ipcRenderer } = window.electron || {}
const userstore = useUserStore()
const sourceStore = useResoureStore()
const userInfo = userstore.user
// change
const handleSizeChange = (limit) => {
sourceStore.query.pageSize = limit

View File

@ -28,7 +28,6 @@ import ResoureList from './container/resoure-list.vue'
import uploadDialog from '@/components/upload-dialog/index.vue'
import uploaderState from '@/store/modules/uploader'
import { createWindow } from '@/utils/tool'
import { hasPermission } from '@/utils/hasPermission'
//
const sourceStore = useResoureStore()
const isDialogOpen = ref(false)