Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into zxl
This commit is contained in:
commit
b7dc080840
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "aix-win",
|
||||
"version": "2.1.21",
|
||||
"version": "2.5.0",
|
||||
"description": "",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "上海交大重庆人工智能研究院",
|
||||
|
|
|
@ -18,6 +18,5 @@ const size = ref('default')
|
|||
text-align: center;
|
||||
color: #2c3e50;
|
||||
width: 100%;
|
||||
/* height: 100vh; */
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 4723712 */
|
||||
src: url('iconfont.woff2?t=1730183338081') format('woff2'),
|
||||
url('iconfont.woff?t=1730183338081') format('woff'),
|
||||
url('iconfont.ttf?t=1730183338081') format('truetype');
|
||||
src: url('iconfont.woff2?t=1730189025078') format('woff2'),
|
||||
url('iconfont.woff?t=1730189025078') format('woff'),
|
||||
url('iconfont.ttf?t=1730189025078') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
|
@ -13,6 +13,66 @@
|
|||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-renzheng-:before {
|
||||
content: "\e623";
|
||||
}
|
||||
|
||||
.icon-yijianfankui:before {
|
||||
content: "\e8a1";
|
||||
}
|
||||
|
||||
.icon-zuoyesheji:before {
|
||||
content: "\e619";
|
||||
}
|
||||
|
||||
.icon-jihua:before {
|
||||
content: "\e601";
|
||||
}
|
||||
|
||||
.icon-jiaocaixuanze:before {
|
||||
content: "\e642";
|
||||
}
|
||||
|
||||
.icon-xueqingfenxi:before {
|
||||
content: "\e68a";
|
||||
}
|
||||
|
||||
.icon-zuoyebuzhi:before {
|
||||
content: "\e607";
|
||||
}
|
||||
|
||||
.icon-zuoyepigai:before {
|
||||
content: "\ec35";
|
||||
}
|
||||
|
||||
.icon-tongji:before {
|
||||
content: "\e68f";
|
||||
}
|
||||
|
||||
.icon-zuzhi:before {
|
||||
content: "\e63b";
|
||||
}
|
||||
|
||||
.icon-zhiliang:before {
|
||||
content: "\e643";
|
||||
}
|
||||
|
||||
.icon-jiaoxueshijian:before {
|
||||
content: "\e676";
|
||||
}
|
||||
|
||||
.icon-kebiao:before {
|
||||
content: "\e67a";
|
||||
}
|
||||
|
||||
.icon-kaoshi:before {
|
||||
content: "\eb14";
|
||||
}
|
||||
|
||||
.icon-a-1_jiaoxuefansi:before {
|
||||
content: "\e6cd";
|
||||
}
|
||||
|
||||
.icon-xiayiye:before {
|
||||
content: "\e68b";
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,6 +5,111 @@
|
|||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "7447571",
|
||||
"name": "认证-01",
|
||||
"font_class": "renzheng-",
|
||||
"unicode": "e623",
|
||||
"unicode_decimal": 58915
|
||||
},
|
||||
{
|
||||
"icon_id": "2076317",
|
||||
"name": " 意见反馈",
|
||||
"font_class": "yijianfankui",
|
||||
"unicode": "e8a1",
|
||||
"unicode_decimal": 59553
|
||||
},
|
||||
{
|
||||
"icon_id": "2468169",
|
||||
"name": "作业指导书",
|
||||
"font_class": "zuoyesheji",
|
||||
"unicode": "e619",
|
||||
"unicode_decimal": 58905
|
||||
},
|
||||
{
|
||||
"icon_id": "3865266",
|
||||
"name": "计划",
|
||||
"font_class": "jihua",
|
||||
"unicode": "e601",
|
||||
"unicode_decimal": 58881
|
||||
},
|
||||
{
|
||||
"icon_id": "4287869",
|
||||
"name": "教材选择",
|
||||
"font_class": "jiaocaixuanze",
|
||||
"unicode": "e642",
|
||||
"unicode_decimal": 58946
|
||||
},
|
||||
{
|
||||
"icon_id": "4308245",
|
||||
"name": "学情概览",
|
||||
"font_class": "xueqingfenxi",
|
||||
"unicode": "e68a",
|
||||
"unicode_decimal": 59018
|
||||
},
|
||||
{
|
||||
"icon_id": "5113507",
|
||||
"name": "教学中心_作业批改",
|
||||
"font_class": "zuoyebuzhi",
|
||||
"unicode": "e607",
|
||||
"unicode_decimal": 58887
|
||||
},
|
||||
{
|
||||
"icon_id": "5767879",
|
||||
"name": "执行反馈",
|
||||
"font_class": "zuoyepigai",
|
||||
"unicode": "ec35",
|
||||
"unicode_decimal": 60469
|
||||
},
|
||||
{
|
||||
"icon_id": "8455509",
|
||||
"name": "统计",
|
||||
"font_class": "tongji",
|
||||
"unicode": "e68f",
|
||||
"unicode_decimal": 59023
|
||||
},
|
||||
{
|
||||
"icon_id": "12732492",
|
||||
"name": "组织",
|
||||
"font_class": "zuzhi",
|
||||
"unicode": "e63b",
|
||||
"unicode_decimal": 58939
|
||||
},
|
||||
{
|
||||
"icon_id": "18909227",
|
||||
"name": "质量管理",
|
||||
"font_class": "zhiliang",
|
||||
"unicode": "e643",
|
||||
"unicode_decimal": 58947
|
||||
},
|
||||
{
|
||||
"icon_id": "21156217",
|
||||
"name": "培训",
|
||||
"font_class": "jiaoxueshijian",
|
||||
"unicode": "e676",
|
||||
"unicode_decimal": 58998
|
||||
},
|
||||
{
|
||||
"icon_id": "33378945",
|
||||
"name": "课程标准",
|
||||
"font_class": "kebiao",
|
||||
"unicode": "e67a",
|
||||
"unicode_decimal": 59002
|
||||
},
|
||||
{
|
||||
"icon_id": "35203493",
|
||||
"name": "考试 (3)",
|
||||
"font_class": "kaoshi",
|
||||
"unicode": "eb14",
|
||||
"unicode_decimal": 60180
|
||||
},
|
||||
{
|
||||
"icon_id": "37027693",
|
||||
"name": "教学反思",
|
||||
"font_class": "a-1_jiaoxuefansi",
|
||||
"unicode": "e6cd",
|
||||
"unicode_decimal": 59085
|
||||
},
|
||||
{
|
||||
"icon_id": "694110",
|
||||
"name": "下一页",
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -2,15 +2,23 @@
|
|||
<div class="page-aside">
|
||||
<div>
|
||||
<div>
|
||||
<el-popover ref="popoverRef" placement="right" trigger="hover" :width="120" popper-class="popoverStyle" >
|
||||
<el-popover ref="popoverRef" placement="right" trigger="hover" popper-class="popoverStyle" :tabindex="999" >
|
||||
<template #reference>
|
||||
<el-image class="user-img" :src="dev_api + userStore.user.avatar" />
|
||||
<div class="user-info">
|
||||
<el-image class="user-img" :src="dev_api + userStore.user.avatar" />
|
||||
<span>{{ userStore.user.nickName }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="head-aside">
|
||||
<ul>
|
||||
<li class="auth-li">
|
||||
<i class="iconfont icon-renzheng-"></i>
|
||||
<span class="mlr-5">学校认证</span>
|
||||
<span class="gray">未认证</span>
|
||||
</li>
|
||||
<li @click="onUserTo('/profile')">个人中心</li>
|
||||
<li @click="onUserTo('/class')">班级中心</li>
|
||||
<li @click="logout">退出登录</li>
|
||||
<li @click="logout">退出登录</li>
|
||||
</ul>
|
||||
</div>
|
||||
</el-popover>
|
||||
|
@ -35,7 +43,9 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="verson">V{{ version }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -45,14 +55,19 @@ import { useRouter } from 'vue-router'
|
|||
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import { sessionStore } from '@/utils/store'
|
||||
import pkc from "../../../../../package.json"
|
||||
|
||||
const { ipcRenderer } = window.electron || {}
|
||||
const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
|
||||
const userStore = useUserStore()
|
||||
console.log(userStore,'userStore')
|
||||
const router = useRouter()
|
||||
const currentRoute = ref('')
|
||||
const activeId = ref('/home')
|
||||
|
||||
|
||||
const version = ref(pkc.version)
|
||||
|
||||
const popoverRef = ref('')
|
||||
|
||||
const headerMenus = [
|
||||
|
@ -146,18 +161,35 @@ const logout = () => {
|
|||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
-webkit-app-region: no-drag;
|
||||
ul{
|
||||
width: 100%;
|
||||
li{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
padding: 10px 0;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
border-bottom: solid #d9dce2 1px;
|
||||
.mlr-5{
|
||||
margin: 0 5px;
|
||||
}
|
||||
.gray{
|
||||
color: #a8aab1;
|
||||
}
|
||||
&:hover{
|
||||
background: #d9dce2;
|
||||
}
|
||||
}
|
||||
.auth-li{
|
||||
cursor: auto;
|
||||
&:hover{
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -171,11 +203,19 @@ const logout = () => {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.user-img{
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
.user-info{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: #fff;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
.user-img{
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.aside-tab {
|
||||
|
@ -188,12 +228,12 @@ const logout = () => {
|
|||
width: 100%;
|
||||
cursor: pointer;
|
||||
flex-direction: column;
|
||||
padding: 5px 0;
|
||||
padding: 8px 0;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
|
||||
.text {
|
||||
font-size: 11px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
|
@ -224,5 +264,9 @@ const logout = () => {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.verson{
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
</style>
|
|
@ -233,6 +233,7 @@ onMounted(() => {
|
|||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
-webkit-app-region: drag;
|
||||
.header-center{
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
|
|
@ -1,14 +1,4 @@
|
|||
<template>
|
||||
<!-- <el-container>
|
||||
<el-header>
|
||||
<Header />
|
||||
</el-header>
|
||||
<el-main>
|
||||
<AppMain />
|
||||
</el-main>
|
||||
<Uploader v-if="uploaderStore.uploadList && uploaderStore.uploadList.length > 0" />
|
||||
<AiChart/>
|
||||
</el-container> -->
|
||||
<div class="common-layout">
|
||||
<el-container>
|
||||
<el-aside width="70px">
|
||||
|
@ -30,27 +20,21 @@
|
|||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import Header from './components/Header.vue'
|
||||
import Aside from './components/Aside.vue'
|
||||
import AppMain from './components/AppMain.vue'
|
||||
import Uploader from './components/Uploader.vue'
|
||||
import AiChart from '@/components/ai-chart/index.vue'
|
||||
import uploaderState from '@/store/modules/uploader'
|
||||
// import Chat from '@/utils/chat'
|
||||
|
||||
let uploaderStore = ref(uploaderState())
|
||||
// window.test = Chat
|
||||
// Chat.init()
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-container {
|
||||
height: 100%;
|
||||
// background: url(@/assets/images/login/login-bg.png) no-repeat center;
|
||||
// background: #fff;
|
||||
background: linear-gradient(to bottom right, #cce6ff 0%, #79d0fc 100%);
|
||||
background: linear-gradient(#E5EEF5, #F2F2F2);
|
||||
background-size: cover;
|
||||
}
|
||||
.common-layout{
|
||||
|
|
|
@ -146,7 +146,7 @@ watch(
|
|||
padding: 10px 15px;
|
||||
font-size: 13px;
|
||||
flex: 1;
|
||||
|
||||
box-shadow: 0px 0px 20px 0px rgba(99, 99, 99, 0.06);
|
||||
.class-item {
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
|
|
@ -282,6 +282,7 @@ onMounted(async ()=>{
|
|||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
padding: 10px 0;
|
||||
box-shadow: 0px 0px 20px 0px rgba(99, 99, 99, 0.06);
|
||||
.con-ul{
|
||||
justify-content: space-around;
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<template>
|
||||
<div v-for="(item,index) in classList" :key="index">
|
||||
<div>{{item.caption}}、</div>
|
||||
</div>
|
||||
<el-button type="primary" link>加入班级</el-button>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {onMounted, ref} from "vue";
|
||||
const props = defineProps({
|
||||
classList:{
|
||||
type:Array,
|
||||
},
|
||||
menuItems:{
|
||||
type:Array,
|
||||
}
|
||||
})
|
||||
onMounted(() => {
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<template>
|
||||
<div style="margin-left: 15px">
|
||||
<el-dropdown @command="handleUserEduStage">
|
||||
<span class="el-dropdown-link">
|
||||
<el-button class="custom-button" type="default" round >{{ userStore.edustage }}
|
||||
<el-icon><ArrowDown /></el-icon>
|
||||
</el-button>
|
||||
</span>
|
||||
<template #dropdown>
|
||||
<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-menu>
|
||||
</template>
|
||||
</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 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>
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import {ArrowDown} from '@element-plus/icons-vue'
|
||||
import { onMounted,ref } from 'vue';
|
||||
import { listEvaluation } from '@/api/subject/index'
|
||||
const userStore = useUserStore().user
|
||||
const subjectList = ref([])
|
||||
// 获取基础的学科
|
||||
const getSubject = () => {
|
||||
//没有学科则不进行下面的步骤
|
||||
if(!userStore.subject) return
|
||||
listEvaluation({ itemkey: 'subject', pageSize: 500 }).then((res) => {
|
||||
const arr = userStore.subject.split(',')
|
||||
subjectList.value = res.rows.filter(item => arr.includes(String(item.id))).map(items => items)
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
getSubject()
|
||||
console.log(userStore,'123')
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-button {
|
||||
width: auto;
|
||||
border: 1px solid rgb(59, 130, 246);
|
||||
outline: none;
|
||||
outline-offset: none;
|
||||
padding: 0 24px;
|
||||
}
|
||||
|
||||
.custom-button i {
|
||||
margin-left: 8px; /* 调整图标与文字之间的间距 */
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -1,105 +1,45 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20" style="display: flex;flex-wrap: nowrap;justify-content: start">
|
||||
<el-col :xs="24" style="min-width: 260px;max-width: 300px">
|
||||
<el-card class="box-card">
|
||||
<template v-slot:header>
|
||||
<div class="clearfix">
|
||||
<span>个人信息</span>
|
||||
</div>
|
||||
</template>
|
||||
<div>
|
||||
<div class="text-center">
|
||||
<userAvatar />
|
||||
</div>
|
||||
<ul class="list-group list-group-striped">
|
||||
<li class="list-group-item">
|
||||
<div class="left-align">
|
||||
<UserFilled class="UserFilled"/>
|
||||
<span>用户名称</span>
|
||||
</div>
|
||||
<div class="right-align">{{ state.user.userName }}</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="left-align">
|
||||
<Cellphone class="Cellphone"/>
|
||||
<span>手机号码</span>
|
||||
</div>
|
||||
<div class="right-align">{{ state.user.phonenumber }}</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="left-align">
|
||||
<Message class="Message"/>
|
||||
<span>身份证号</span>
|
||||
</div>
|
||||
<div class="right-align">{{ state.user.identity }}</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="left-align">
|
||||
<Suitcase class="Suitcase"/>
|
||||
<span>所属部门</span>
|
||||
</div>
|
||||
<div class="right-align" v-if="state.user.dept">
|
||||
{{ state.user.dept.deptName }} / {{ state.postGroup }}
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="left-align">
|
||||
<Avatar class="Avatar"/>
|
||||
<span>所属角色</span>
|
||||
</div>
|
||||
<div class="right-align">{{ state.roleGroup || '教师' }}</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="left-align">
|
||||
<Calendar class="Calendar"/>
|
||||
<span>创建日期</span>
|
||||
</div>
|
||||
<div class="right-align">{{ state.user.createTime }}</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="left-align">
|
||||
<Paperclip class="Calendar"/>
|
||||
<span>版本编号</span>
|
||||
</div>
|
||||
<div class="right-align">v{{version}}</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="18" :xs="24">
|
||||
<el-card>
|
||||
<template v-slot:header>
|
||||
<div class="clearfix">
|
||||
<span>基本资料</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="text-center">
|
||||
<userAvatar />
|
||||
<div class="info">
|
||||
<div class="info-name">{{ state.user.nickName }}</div>
|
||||
<div class="infomation">
|
||||
<selectClass/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="20" style="display: flex;flex-wrap: nowrap;justify-content: start;width: 100%;">
|
||||
<el-col :span="24" :xs="24">
|
||||
<el-tabs v-model="activeTab">
|
||||
<el-tab-pane label="基本资料" name="userinfo">
|
||||
<userInfo :user="state.user" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="修改密码" name="resetPwd">
|
||||
<resetPwd />
|
||||
</el-tab-pane>
|
||||
<el-card>
|
||||
<el-tab-pane label="个人信息" name="userinfo">
|
||||
<userInfo :user="state.user" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="修改密码" name="resetPwd">
|
||||
<resetPwd />
|
||||
</el-tab-pane>
|
||||
</el-card>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Profile">
|
||||
import { UserFilled, Cellphone, Message, Suitcase, Avatar, Calendar, Paperclip } from '@element-plus/icons-vue'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import userAvatar from './userAvatar.vue'
|
||||
import userInfo from './userInfo.vue'
|
||||
import resetPwd from './resetPwd.vue'
|
||||
import { getUserProfile } from '@/api/system/user'
|
||||
import pkc from "../../../../../package.json"
|
||||
//选择学校和班级
|
||||
import selectClass from './components/selectClass.vue'
|
||||
|
||||
const version = ref(pkc.version)
|
||||
|
||||
const version = ref(pkc.version)
|
||||
const activeTab = ref('userinfo')
|
||||
|
||||
const state = reactive({
|
||||
user: {},
|
||||
roleGroup: {},
|
||||
|
@ -115,7 +55,9 @@ async function getUser() {
|
|||
})
|
||||
}
|
||||
|
||||
getUser()
|
||||
onMounted(() => {
|
||||
getUser()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -125,6 +67,23 @@ getUser()
|
|||
.text-center {
|
||||
margin-bottom: 15px;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.info{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
height: 120px;
|
||||
.info-name{
|
||||
text-align: left;
|
||||
padding-left: 18px;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.infomation{
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
.list-group-item {
|
||||
display: flex;
|
||||
|
|
|
@ -104,6 +104,7 @@ const cancle = () => {
|
|||
.img-circle {
|
||||
height: 120px;
|
||||
width: auto;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.avatar-upload-preview {
|
||||
position:relative;
|
||||
|
|
|
@ -1,46 +1,34 @@
|
|||
<template>
|
||||
<el-form ref="userRef" :model="user" :rules="rules" label-width="80px">
|
||||
<el-form-item label="用户昵称" prop="nickName">
|
||||
<el-form ref="userRef" :model="user" :rules="rules" label-width="150px">
|
||||
<el-form-item label="姓名" prop="nickName">
|
||||
<el-input v-model="user.nickName" maxlength="30" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" prop="phonenumber">
|
||||
<el-input v-model="user.phonenumber" maxlength="11" />
|
||||
<el-form-item label="账号/手机号码">
|
||||
{{ user.phonenumber }}
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="identity">
|
||||
<el-input v-model="user.identity" maxlength="50" />
|
||||
<el-form-item label="所属学校" prop="identity">
|
||||
<div style="display: flex;">
|
||||
<div>{{ user.deptName }}</div>
|
||||
<div>
|
||||
<el-button type="primary" link>更改学校</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" style="display: none">
|
||||
<el-radio-group v-model="user.sex">
|
||||
<el-radio value="0">男</el-radio>
|
||||
<el-radio value="1">女</el-radio>
|
||||
</el-radio-group>
|
||||
<el-form-item label="身份角色">
|
||||
{{ user.roleGroup || '教师' }}
|
||||
</el-form-item>
|
||||
<el-form-item label="学段">
|
||||
<el-radio-group v-model="user.edustage" @change="semeterChange">
|
||||
<template v-for="(item,index) in semesterList" :key="index">
|
||||
<el-radio :value="item.label">
|
||||
{{item.label }}
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="任教学科">
|
||||
<el-radio-group v-model="user.edusubject">
|
||||
<template v-for="(item,index) in subjectList" :key="index">
|
||||
<el-radio v-if="item.edustage == user.edustage" :value="item.itemtitle">
|
||||
{{item.itemtitle }}
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-radio-group>
|
||||
<el-form-item label="我的班级">
|
||||
<ClassList :classList="classList"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submit">保存</el-button>
|
||||
<el-button style="padding: 0 40px;" type="primary" @click="submit">保存</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, getCurrentInstance,onMounted } from 'vue'
|
||||
import { ref, getCurrentInstance,onMounted,reactive } from 'vue'
|
||||
import {updateUserInfo } from '@/api/system/user'
|
||||
import {getDept } from '@/api/login'
|
||||
import { listEvaluation } from '@/api/subject/index'
|
||||
|
@ -48,7 +36,18 @@ import useUserStore from '@/store/modules/user'
|
|||
import {ElMessage} from 'element-plus'
|
||||
import { clearBookInfo } from '@/utils/ruoyi'
|
||||
import { sessionStore } from '@/utils/store'
|
||||
import {listClassmain} from '@/api/classManage/index'
|
||||
//班级列表
|
||||
import ClassList from './components/classList.vue'
|
||||
|
||||
//班级列表
|
||||
const classList = ref([])
|
||||
// 未加入的班级
|
||||
const classesNotAMemberOf = ref([])
|
||||
//班级列表
|
||||
const gradeTree = ref([])
|
||||
//当前页面
|
||||
const currentIndex = ref(0)
|
||||
const props = defineProps({
|
||||
user: {
|
||||
type: Object
|
||||
|
@ -59,6 +58,7 @@ const { proxy } = getCurrentInstance()
|
|||
const userStore = useUserStore()
|
||||
|
||||
//选择学段
|
||||
// 获取学校所存在的学段
|
||||
const semesterList = ref([
|
||||
{
|
||||
id:1,
|
||||
|
@ -77,7 +77,26 @@ const semesterList = ref([
|
|||
label:'高中'
|
||||
},
|
||||
])
|
||||
// 获取学校所存在的学段
|
||||
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 getTheSection = () => {
|
||||
getDept({deptId:userStore.user.deptId}).then(res => {
|
||||
|
@ -175,8 +194,67 @@ const semeterChange = (item) => {
|
|||
props.user.edusubject = ''
|
||||
}
|
||||
}
|
||||
|
||||
// 获取班级信息
|
||||
const getClassInfo = () => {
|
||||
classList.value = []
|
||||
debugger
|
||||
listClassmain({ classuserid: props.user.userId, pageSize: 100, status: 'open' }).then(response => {
|
||||
classList.value = [...response.rows]
|
||||
if(classList.value.length > 0){
|
||||
currentIndex.value = 0
|
||||
}
|
||||
});
|
||||
listClassmain({entpid: props.user.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;
|
||||
}
|
||||
}
|
||||
const addClass = () => {
|
||||
dialogVisible.value = true
|
||||
}
|
||||
onMounted(() => {
|
||||
getSubject()
|
||||
getClassInfo()
|
||||
getTheSection()
|
||||
})
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue