Compare commits

..

No commits in common. "9167751c6c65ffb8da5e0c224c74c8dd2698dd0c" and "7319c396c44b0e9bb8059d23610a83f0fae042f3" have entirely different histories.

15 changed files with 508 additions and 277 deletions

View File

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 4723712 */ font-family: "iconfont"; /* Project id 4723712 */
src: url('iconfont.woff2?t=1730256542457') format('woff2'), src: url('iconfont.woff2?t=1730189025078') format('woff2'),
url('iconfont.woff?t=1730256542457') format('woff'), url('iconfont.woff?t=1730189025078') format('woff'),
url('iconfont.ttf?t=1730256542457') format('truetype'); url('iconfont.ttf?t=1730189025078') format('truetype');
} }
.iconfont { .iconfont {
@ -13,14 +13,6 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-A:before {
content: "\e6ef";
}
.icon-yanhouke-shengyinyichang:before {
content: "\e672";
}
.icon-renzheng-:before { .icon-renzheng-:before {
content: "\e623"; content: "\e623";
} }

File diff suppressed because one or more lines are too long

View File

@ -5,20 +5,6 @@
"css_prefix_text": "icon-", "css_prefix_text": "icon-",
"description": "", "description": "",
"glyphs": [ "glyphs": [
{
"icon_id": "12688893",
"name": "A",
"font_class": "A",
"unicode": "e6ef",
"unicode_decimal": 59119
},
{
"icon_id": "5257347",
"name": "咽喉科-声音异常",
"font_class": "yanhouke-shengyinyichang",
"unicode": "e672",
"unicode_decimal": 58994
},
{ {
"icon_id": "7447571", "icon_id": "7447571",
"name": "认证-01", "name": "认证-01",

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 369 KiB

View File

@ -61,6 +61,7 @@ import pkc from "../../../../../package.json"
const { ipcRenderer } = window.electron || {} const { ipcRenderer } = window.electron || {}
const dev_api = ref(import.meta.env.VITE_APP_BASE_API) const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
const userStore = useUserStore() const userStore = useUserStore()
console.log(userStore,'userStore')
const router = useRouter() const router = useRouter()
const currentRoute = ref('') const currentRoute = ref('')
const activeId = ref('/home') const activeId = ref('/home')
@ -92,15 +93,9 @@ const headerMenus = [
] ]
const sideBottomMenu = [ const sideBottomMenu = [
{
name: '算力',
id: 4,
icon: 'icon-yanhouke-shengyinyichang',
path: '/hashrate'
},
{ {
name: '设置', name: '设置',
id: 5, id: 4,
icon: 'icon-set', icon: 'icon-set',
path: '/setting' path: '/setting'
}, },
@ -156,7 +151,7 @@ const logout = () => {
</script> </script>
<style lang="scss"> <style>
.el-popover.popoverStyle{ .el-popover.popoverStyle{
min-width:120px; min-width:120px;
padding: 0; padding: 0;

View File

@ -128,12 +128,6 @@ export const constantRoutes = [
name: 'examReport', name: 'examReport',
meta: {title: '考试分析'} meta: {title: '考试分析'}
}, },
{
path: '/hashrate',
component: () => import('@/views/hashrate/index.vue'),
name: 'hashrate',
meta: {title: '算力'}
},
{ {
path: '/setting', path: '/setting',
component: () => import('@/views/setting/index.vue'), component: () => import('@/views/setting/index.vue'),

View File

@ -1,13 +0,0 @@
<template>
<div>
算力
</div>
</template>
<script setup>
</script>
<style lang="scss" scoped>
</style>

View File

@ -1,157 +0,0 @@
<template>
<div>
<el-dialog v-model="dialogVisible" title="加入班级" width="50%" append-to-body>
<el-form
style="width: 100%"
label-width="auto"
:model="classForm"
:rules="rules"
ref="myForm"
>
<el-form-item label="老师" style="margin-right: 10px; width: 50%">
<el-text>
{{ userStore.nickName }}
</el-text>
</el-form-item>
<el-form-item label="班级">
<el-tree-select
v-model="classids"
:data="gradeTree"
multiple
:render-after-expand="false"
style="width: 240px"
/>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="btnSave"> </el-button>
</template>
</el-dialog>
</div>
</template>
<script setup>
import { ref, defineExpose,reactive } from 'vue'
import { listClassmain, addClasses } from '@/api/classManage/index'
import { ElMessage } from 'element-plus'
import useUserStore from '@/store/modules/user'
//
const dialogVisible = ref(false)
const userStore = useUserStore().user
const classids = ref([])
//
const classList = ref([])
//
const gradeTree = ref([])
//
const classesNotAMemberOf = ref([])
//
const currentIndex = ref(0)
const newGradeList = reactive([
[
{ label: '一年级', agekey: 1, checked: false, current: 1 },
{ label: '二年级', agekey: 2, checked: false, current: 1 },
{ label: '三年级', agekey: 3, checked: false, current: 1 },
{ label: '四年级', agekey: 4, checked: false, current: 1 },
{ label: '五年级', agekey: 5, checked: false, current: 1 },
{ label: '六年级', agekey: 6, checked: false, current: 1 },
],
[
{ label: '初一', agekey: 7, checked: false, current: 2 },
{ label: '初二', agekey: 8, checked: false, current: 2 },
{ label: '初三', agekey: 9, checked: false, current: 2 },
],
[
{ label: '高一', agekey: 10, checked: false, current: 3 },
{ label: '高二', agekey: 11, checked: false, current: 3 },
{ label: '高三', agekey: 12, checked: false, current: 3 },
],
])
//
const open = () => {
dialogVisible.value = true
getClassInfo()
}
//
const btnSave = () => {
addClasses({ classIds: classids.value.join(','), userId: userStore.userId }).then(res => {
if (res.code === 200) {
dialogVisible.value = false
ElMessage({
message: res.msg,
type: 'success',
})
//
classids.value = []
} else {
ElMessage({
message: res.msg,
type: 'warning',
})
}
})
}
//
const getClassInfo = () => {
classList.value = []
listClassmain({ classuserid: userStore.userId, pageSize: 100, status: 'open' }).then(response => {
classList.value = [...response.rows]
if(classList.value.length > 0){
currentIndex.value = 0
}
});
listClassmain({entpid: userStore.deptId, status: 'open', pageSize: 100}).then(response => {
//
classesNotAMemberOf.value = [...response.rows]
classList.value.forEach(item => {
const currentIndex = classesNotAMemberOf.value.findIndex(items => items.id === item.id)
if(currentIndex) classesNotAMemberOf.value.splice(currentIndex, 1)
})
//
gradeTree.value = groupByCondition(classesNotAMemberOf.value, item => item.agekey);
})
}
//
function groupByCondition(arr, condition) {
//
const groups = arr.reduce((groups, item) => {
const groupKey = condition(item);
item.label = item.caption
item.value = item.id
groups[groupKey] = groups[groupKey] || [];
groups[groupKey].push(item);
return groups;
}, {});
//
const formattedGroups = Object.keys(groups).map(key => ({
label: gradeName(key),
value:key,
children: groups[key]
}));
return formattedGroups;
}
//key
function gradeName(key){
//
const flatGradeDataList = newGradeList.flat();
const currentIndex = flatGradeDataList.findIndex(item => item.agekey === Number(key));
if(currentIndex !== -1){
return flatGradeDataList[currentIndex].label;
}else{
//
const defaultLabel = '社团';
flatGradeDataList[currentIndex] = { ...flatGradeDataList[currentIndex], label: defaultLabel };
return defaultLabel;
}
}
defineExpose({
open
})
</script>

View File

@ -1,15 +1,12 @@
<template> <template>
<div style="display: flex;flex-wrap: wrap;align-items: center;"> <div v-for="(item,index) in classList" :key="index">
<div v-for="(item,index) in classList" :key="index" style="margin-right: 10px;cursor: pointer;"> <div>{{item.caption}}</div>
<el-tag type="primary">{{item.caption}}</el-tag>
</div> </div>
<el-button type="primary" link @click="addClass">加入班级</el-button> <el-button type="primary" link>加入班级</el-button>
<AddClass ref="addClassRef" /> </template>
</div>
</template>
<script setup> <script setup>
import {onMounted, ref} from "vue"; import {onMounted, ref} from "vue";
import AddClass from './addClass.vue'
const props = defineProps({ const props = defineProps({
classList:{ classList:{
type:Array, type:Array,
@ -18,10 +15,6 @@
type:Array, type:Array,
} }
}) })
const addClassRef = ref()
const addClass = () => {
addClassRef.value.open()
}
onMounted(() => { onMounted(() => {
}) })

View File

@ -1,41 +1,39 @@
<template> <template>
<div style="display: flex;"> <div style="margin-left: 15px">
<div style="margin-left: 15px"> <el-dropdown @command="handleUserEduStage">
<el-dropdown @command="handleUserEduStage"> <span class="el-dropdown-link">
<span class="el-dropdown-link"> <el-button class="custom-button" type="default" round >{{ userStore.edustage }}
<el-button class="custom-button" type="default" round >{{ userStore.edustage }} <el-icon><ArrowDown /></el-icon>
<el-icon><ArrowDown /></el-icon> </el-button>
</el-button> </span>
</span> <template #dropdown>
<template #dropdown> <el-dropdown-menu>
<el-dropdown-menu> <el-dropdown-item command="幼儿园">幼儿园</el-dropdown-item>
<el-dropdown-item command="幼儿园">幼儿园</el-dropdown-item> <el-dropdown-item command="小学">小学</el-dropdown-item>
<el-dropdown-item command="小学">小学</el-dropdown-item> <el-dropdown-item command="初中">初中</el-dropdown-item>
<el-dropdown-item command="初中">初中</el-dropdown-item> <el-dropdown-item command="高中">高中</el-dropdown-item>
<el-dropdown-item command="高中">高中</el-dropdown-item> </el-dropdown-menu>
</el-dropdown-menu> </template>
</template> </el-dropdown>
</el-dropdown>
</div>
<div style="margin-left: 15px">
<el-dropdown @command="handleUserEduSubject">
<span class="el-dropdown-link">
<el-button class="custom-button" type="default" round>{{ userStore.edusubject }}
<el-icon><ArrowDown /></el-icon>
</el-button>
</span>
<template #dropdown>
<el-dropdown-menu>
<template v-for="(item, index) in subjectList">
<el-dropdown-item :command="item.itemtitle">{{
item.itemtitle }}</el-dropdown-item>
</template>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
</div> </div>
</template> <div style="margin-left: 15px">
<el-dropdown @command="handleUserEduSubject">
<span class="el-dropdown-link">
<el-button class="custom-button" type="default" round>{{ userStore.edusubject }}
<el-icon><ArrowDown /></el-icon>
</el-button>
</span>
<template #dropdown>
<el-dropdown-menu>
<template v-for="(item, index) in subjectList">
<el-dropdown-item v-if="item.edustage == userStore.edustage" :command="item.itemtitle">{{
item.itemtitle }}</el-dropdown-item>
</template>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
</template>
<script setup> <script setup>
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
@ -53,13 +51,6 @@ const getSubject = () => {
subjectList.value = res.rows.filter(item => arr.includes(String(item.id))).map(items => items) subjectList.value = res.rows.filter(item => arr.includes(String(item.id))).map(items => items)
}) })
} }
//
const handleUserEduStage = (item) => {
userStore.edustage = item
}
const handleUserEduSubject = (item) => {
userStore.edusubject = item
}
onMounted(() => { onMounted(() => {
getSubject() getSubject()
console.log(userStore,'123') console.log(userStore,'123')

View File

@ -80,6 +80,9 @@ onMounted(() => {
font-size: 28px; font-size: 28px;
font-weight: bold; font-weight: bold;
} }
.infomation{
display: flex;
}
} }
} }
.list-group-item { .list-group-item {

View File

@ -131,7 +131,7 @@ const getSubject = () => {
} }
setTimeout(() => { setTimeout(() => {
if (userStore.user.edudegree != '') { if (props.user.edudegree != '') {
var upcaseName = [ var upcaseName = [
'一年级', '一年级',
'二年级', '二年级',
@ -146,15 +146,15 @@ setTimeout(() => {
'高二', '高二',
'高三' '高三'
] ]
var d = parseInt(userStore.user.edudegree.replace('年级', '')) var d = parseInt(props.user.edudegree.replace('年级', ''))
if (d <= 6) { if (d <= 6) {
userStore.user.edustage = '小学' props.user.edustage = '小学'
} else if (d >= 7 && d <= 9) { } else if (d >= 7 && d <= 9) {
userStore.user.edustage = '初中' props.user.edustage = '初中'
} else if (d >= 9 && d <= 12) { } else if (d >= 9 && d <= 12) {
userStore.user.edustage = '高中' props.user.edustage = '高中'
} }
userStore.user.stagelabel = upcaseName[d - 1] props.user.stagelabel = upcaseName[d - 1]
} }
}, 1000) }, 1000)
@ -162,10 +162,10 @@ setTimeout(() => {
function submit() { function submit() {
proxy.$refs.userRef.validate((valid) => { proxy.$refs.userRef.validate((valid) => {
if (valid) { if (valid) {
userStore.user.avatar = userStore.user.avatar props.user.avatar = userStore.user.avatar
updateUserInfo(userStore.user).then((response) => { updateUserInfo(props.user).then((response) => {
if(response.code == 200){ if(response.code == 200){
userStore.login({username:userStore.user.userName,password:userStore.user.plainpwd}).then(() => { userStore.login({username:props.user.userName,password:props.user.plainpwd}).then(() => {
userStore.getInfo().then(res => { userStore.getInfo().then(res => {
if(res.code === 200){ if(res.code === 200){
let sessionSubject = { let sessionSubject = {
@ -191,20 +191,21 @@ function submit() {
} }
const semeterChange = (item) => { const semeterChange = (item) => {
if(item === '幼儿园'){ if(item === '幼儿园'){
userStore.user.edusubject = '' props.user.edusubject = ''
} }
} }
// //
const getClassInfo = () => { const getClassInfo = () => {
classList.value = [] classList.value = []
listClassmain({ classuserid: userStore.user.userId, pageSize: 100, status: 'open' }).then(response => { debugger
listClassmain({ classuserid: props.user.userId, pageSize: 100, status: 'open' }).then(response => {
classList.value = [...response.rows] classList.value = [...response.rows]
if(classList.value.length > 0){ if(classList.value.length > 0){
currentIndex.value = 0 currentIndex.value = 0
} }
}); });
listClassmain({entpid: userStore.user.deptId, status: 'open', pageSize: 100}).then(response => { listClassmain({entpid: props.user.deptId, status: 'open', pageSize: 100}).then(response => {
// //
classesNotAMemberOf.value = [...response.rows] classesNotAMemberOf.value = [...response.rows]
classList.value.forEach(item => { classList.value.forEach(item => {
@ -248,6 +249,9 @@ function groupByCondition(arr, condition) {
return defaultLabel; return defaultLabel;
} }
} }
const addClass = () => {
dialogVisible.value = true
}
onMounted(() => { onMounted(() => {
getSubject() getSubject()
getClassInfo() getClassInfo()