Compare commits

...

51 Commits

Author SHA1 Message Date
yangws a64ba24742 fix:2.0.4bug修改; 2024-09-22 12:51:58 +08:00
lyc df1f8737bd Merge pull request '点击章节 存储章节id (临时)' (#244) from lyc-dev into main 2024-09-22 12:34:16 +08:00
lyc 19a3b948c5 点击章节 存储章节id (临时) 2024-09-22 12:34:15 +08:00
lyc 92667a7d25 Merge pull request '注册账号-班级修改为可选' (#243) from lyc-dev into main 2024-09-22 10:38:38 +08:00
lyc 71f7e4e5a1 注册账号-班级修改为可选 2024-09-22 10:38:31 +08:00
zhangxuelin 9ff824e082 Merge pull request '修改工具拖动' (#242) from zdg into main
Reviewed-on: #242
2024-09-20 16:27:54 +08:00
zhangxuelin 8975784ce0 修改工具拖动 2024-09-20 16:27:12 +08:00
lyc e586755b75 Merge pull request 'edit' (#241) from lyc-dev into main 2024-09-20 15:38:39 +08:00
lyc ef771f4e0b edit 2024-09-20 15:38:37 +08:00
朱浩 049768c8b6 Merge pull request 'BUG修复' (#240) from zhuhao_dev into main
Reviewed-on: #240
2024-09-20 15:29:56 +08:00
朱浩 ac599a2c39 BUG修复 2024-09-20 15:29:21 +08:00
lyc 00871797bf edit 2024-09-20 15:24:23 +08:00
lyc fa7a44472b Merge pull request 'edit' (#239) from lyc-dev into main 2024-09-20 15:24:19 +08:00
lyc 85529ad81f Merge pull request 'edit' (#238) from lyc-dev into main 2024-09-20 15:20:27 +08:00
lyc f9a87143aa edit 2024-09-20 15:19:33 +08:00
zhengdegang 17ef183741 Merge pull request 'zdg' (#237) from zdg into main
Reviewed-on: #237
2024-09-20 15:17:16 +08:00
zdg d5833f6f03 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg 2024-09-20 15:16:43 +08:00
zdg c93eeeb308 修复异常 2024-09-20 15:16:34 +08:00
zhengdegang 0d48111e50 Merge pull request '解决 值为null问题' (#236) from zdg into main
Reviewed-on: #236
2024-09-20 15:06:33 +08:00
zdg ca57e72e9c 解决 值为null问题 2024-09-20 15:04:14 +08:00
zhengdegang 928a1401db Merge pull request 'zdg' (#235) from zdg into main
Reviewed-on: #235
2024-09-20 14:57:41 +08:00
zdg e0d3a6da6a Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg 2024-09-20 14:56:54 +08:00
zdg 1a9b426ec3 修复-上课 提示 2024-09-20 14:56:48 +08:00
lyc d4cfedf883 Merge pull request 'lyc-dev' (#234) from lyc-dev into main 2024-09-20 14:43:21 +08:00
lyc b5fd1f2a9d edit 2024-09-20 14:42:58 +08:00
lyc c6477d5ca9 edit 2024-09-20 14:34:22 +08:00
lyc 27ec047981 edit 教材选择 2024-09-20 14:30:36 +08:00
zhengdegang 7da4defed4 Merge pull request 'zdg' (#233) from zdg into main
Reviewed-on: #233
2024-09-20 13:54:51 +08:00
zdg 51cb1989a1 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg 2024-09-20 13:53:53 +08:00
zdg 4ab4d5dff2 恢复修改 2024-09-20 13:53:42 +08:00
lyc 80d6e1c59c Merge pull request 'edit' (#232) from lyc-dev into main 2024-09-20 13:41:22 +08:00
lyc 75c6777933 edit 2024-09-20 13:41:18 +08:00
朱浩 a75f151b19 Merge pull request 'BUG修复' (#231) from zhuhao_dev into main
Reviewed-on: #231
2024-09-20 09:22:02 +08:00
朱浩 2531c25d7c BUG修复 2024-09-20 09:21:31 +08:00
朱浩 9e5527d822 Merge pull request 'zhuhao_dev' (#230) from zhuhao_dev into main
Reviewed-on: #230
2024-09-20 09:19:10 +08:00
朱浩 e002ef5f7d Merge branch 'main' into zhuhao_dev 2024-09-20 09:18:30 +08:00
朱浩 2ca637072d BUG修复 2024-09-20 09:18:12 +08:00
baigl bd7f6f765f Merge pull request 'baigl' (#229) from baigl into main
Reviewed-on: #229
2024-09-19 16:58:13 +08:00
白了个白 ef6c3d2a2b Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into baigl 2024-09-19 16:57:03 +08:00
白了个白 9ea05568e1 作业批改:同步web端164逻辑修改 2024-09-19 16:56:15 +08:00
zhengdegang 93a061ca78 Merge pull request 'zdg' (#228) from zdg into main
Reviewed-on: #228
2024-09-19 16:37:45 +08:00
zdg c5075af2fc 已上课 2024-09-19 16:37:07 +08:00
zdg 7da60f0815 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg 2024-09-19 16:35:43 +08:00
zdg 02a25db5e2 修复 2024-09-19 16:35:36 +08:00
yangws 59de30b6b2 Merge pull request 'fix: 解决空数据的判断;' (#227) from yangws into main
Reviewed-on: #227
2024-09-19 16:03:39 +08:00
lyc 893be27671 切换学科 2024-09-19 16:02:42 +08:00
lyc b0b429c7aa Merge pull request '切换学科' (#226) from lyc-dev into main 2024-09-19 16:02:41 +08:00
朱浩 81f873bcc3 Merge branch 'main' into zhuhao_dev 2024-09-18 17:31:14 +08:00
朱浩 7303128334 Merge branch 'main' into zhuhao_dev 2024-09-18 14:14:35 +08:00
朱浩 f90e2548c6 Merge branch 'main' into zhuhao_dev 2024-09-18 13:56:53 +08:00
朱浩 fb48984e7f APT上课 2024-09-18 11:29:39 +08:00
23 changed files with 335 additions and 324 deletions

View File

@ -1,6 +1,6 @@
{
"name": "aix-win",
"version": "1.2.3",
"version": "2.0.2",
"description": "An Electron application with Vue",
"main": "./out/main/index.js",
"author": "example.com",

View File

@ -2,12 +2,12 @@
<div class="book-wrap">
<el-scrollbar height="100%">
<div class="book-name flex" @click="dialogVisible = true">
<span>{{ curBookName }}</span>
<span>{{ curBook.data.itemtitle }}</span>
<i class="iconfont icon-xiangyou"></i>
</div>
<div class="book-list" v-loading="treeLoading">
<el-tree ref="refTree" :data="treeData" accordion :props="defaultProps" node-key="id"
:default-expanded-keys="defaultExpandedKeys" :current-node-key="currentNodeId" highlight-current
<el-tree :data="treeData" accordion :props="defaultProps" node-key="id"
:default-expanded-keys="defaultExpandedKeys" :current-node-key="curNode.data.id" highlight-current
@node-click="handleNodeClick">
<template #default="{ node }">
<span :title="node.label" class="tree-label">{{ node.label }}</span>
@ -28,9 +28,9 @@
<div class="textbook-container">
<el-scrollbar height="450px">
<div class="textbook-item flex" v-for="item in subjectList" :class="curBookId == item.id ? 'active-item' : ''"
<div class="textbook-item flex" v-for="item in subjectList" :class="curBook.data.id == item.id ? 'active-item' : ''"
:key="item.id" @click="changeBook(item)">
<img v-if="item.avartar" :src="BaseUrl + item.avartar" class="textbook-img" alt="">
<img v-if="item.avartar" :src="item.avartar.indexOf('http') === 0 ? item.avartar : BaseUrl + item.avartar" class="textbook-img" alt="">
<div v-else class="textbook-img">
<i class="iconfont icon-jiaocaixuanze" style="font-size: 40px;"></i>
</div>
@ -43,166 +43,85 @@
<script setup>
import { onMounted, ref, nextTick, toRaw, reactive } from 'vue';
import useUserStore from '@/store/modules/user'
import { listEvaluation } from '@/api/subject'
import { cloneDeep } from 'lodash'
import { useGetSubject } from '@/hooks/useGetSubject'
const BaseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
// emit
const emit = defineEmits(['nodeClick', 'changeBook'])
// store
const userStore = useUserStore()
const { edustage, edusubject, userId } = userStore.user
//
let useSubject = null
const subjectList = ref([])
const evaluationList = ref([])
const dialogVisible = ref(false)
//
const treeData = ref([])
const defaultProps = {
children: 'children',
label: 'label',
label: 'itemtitle',
class: 'textbook-tree'
}
const treeLoading = ref(false)
//ID
const curBookId = ref(-1)
//
const curBookName = ref('')
//
const curBookImg = ref('')
//
const curBookPath = ref('')
//
const volumeOne = ref([])
//
const volumeTwo = ref([])
//
const curBook = reactive({
data: {}
})
//
const currentNode = reactive({
const curNode = reactive({
data:{}
})
// ID
const currentNodeId = ref(0)
//
const currentNodeName = ref('')
const treeLoading = ref(false)
//
const defaultExpandedKeys = ref([])
// tree
const refTree = ref(null)
// +
const getSubjectContent = async () => {
treeLoading.value = true
const params = {
edusubject,
edustage,
// entpcourseedituserid: userId,
itemgroup: 'textbook',
orderby: 'orderidx asc',
pageSize: 10000
}
if(localStorage.getItem('evaluationList')){
evaluationList.value = JSON.parse(localStorage.getItem('evaluationList'))
}
else{
localStorage.removeItem('defaultExpandedKeys')
localStorage.removeItem('currentNodeId')
const { rows } = await listEvaluation(params)
localStorage.setItem('evaluationList', JSON.stringify(rows))
evaluationList.value = rows
}
treeLoading.value = false
//
await getSubject()
//
/**
* 不区分上下册
* 2024/08/20调整
*/
// volumeOne.value = data.filter(item => item.level == 1 && item.semester == '')
// volumeTwo.value = data.filter(item => item.level == 1 && item.semester == '')
getTreeData()
}
//
const changeBook = ({ id, itemtitle, avartar, fileurl }) => {
curBookId.value = id
curBookName.value = itemtitle
curBookImg.value = BaseUrl + avartar
curBookPath.value = fileurl
const changeBook = (data) => {
curBook.data = data
localStorage.removeItem('defaultExpandedKeys')
localStorage.removeItem('currentNodeId')
localStorage.setItem('curBook', JSON.stringify({id, itemtitle, avartar, fileurl}))
getTreeData()
localStorage.setItem('curBook', JSON.stringify(data))
treeData.value = useSubject.getTreeData(data.id)
//
nextTick(() =>{
defaultExpandedKeys.value = [treeData.value[0].id]
curNode.data = getLastLevelData(treeData.value)[0]
localStorage.setItem('defaultExpandedKeys', JSON.stringify(defaultExpandedKeys.value))
localStorage.setItem('curNode',JSON.stringify(curNode.data))
emitChangeBook()
})
//
setTimeout(() => {
dialogVisible.value = false
}, 100);
}
const getTreeData = () => {
//
let upData = transData(evaluationList.value)
if(upData.length){
treeData.value = [...upData]
}
else{
treeData.value = []
return
}
nextTick(() => {
let defaultCurNodeId = localStorage.getItem('currentNodeId')
if(defaultCurNodeId){
defaultCurNodeId = JSON.parse(defaultCurNodeId)
const data = findNode(defaultCurNodeId)
currentNode.data = findNode(defaultCurNodeId)
currentNodeId.value = data.id
currentNodeName.value = data.label
}
else{
defaultExpandedKeys.value = [treeData.value[0].id]
currentNode.data = getLastLevelData(treeData.value)[0]
currentNodeId.value = getLastLevelData(treeData.value)[0].id
currentNodeName.value = getLastLevelData(treeData.value)[0].label
}
emitChangeBook()
})
}
const emitChangeBook = () => {
let curNode = {
id: currentNodeId.value,
label: currentNodeName.value,
itemtitle: currentNode.data.itemtitle,
edudegree: currentNode.data.edudegree,
edustage: currentNode.data.edustage,
edusubject: currentNode.data.edusubject,
}
let parentNode = findParentByChildId(treeData.value, currentNodeId.value)
curNode.parentNode = toRaw(parentNode)
const emitChangeBook = async () => {
let curData = cloneDeep(toRaw(curNode.data))
let parentNode = findParentByChildId(treeData.value, curData.id)
curData.parentNode = toRaw(parentNode)
//label label
curData.label = curData.itemtitle
const data = {
textBook: {
curBookId: curBookId.value,
curBookName: curBookName.value,
curBookImg: curBookImg.value,
curBookPath: curBookPath.value
curBookId: curBook.data.id,
curBookName: curBook.data.itemtitle,
curBookImg: BaseUrl + curBook.data.avartar,
curBookPath: curBook.data.fileurl
},
node: curNode
node: curData
}
localStorage.setItem('defaultExpandedKeys', JSON.stringify(defaultExpandedKeys.value))
localStorage.setItem('currentNodeId', JSON.stringify(currentNodeId.value))
/**
* 临时用 后续删除 unitId
*/
let levelFirstId = null
let levelSecondId = null
if (curData.parentNode) {
levelFirstId = curData.parentNode.id
levelSecondId = curData.id
} else {
levelFirstId = curData.id
levelSecondId = ''
}
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId}))
emit('changeBook', data)
}
@ -250,122 +169,94 @@ const findParentByChildId = (treeData, targetNodeId) => {
return null;
}
const findNode = (id) =>{
if(!id) return
return evaluationList.value.find( item => item.id == id)
}
const transData = (data) => {
let ary = []
data.forEach(item => {
let obj = {}
// ID
if (item.rootid == curBookId.value) {
if(item.level == 1){
obj.label = item.itemtitle
obj.id = item.id
obj.itemtitle = item.itemtitle
obj.edudegree = item.edudegree
obj.edustage = item.edustage
obj.edusubject = item.edusubject
let ary2 = []
evaluationList.value.forEach(el => {
let obj2 = {}
if (item.id == el.parentid) {
obj2 = {
label: el.itemtitle,
id: el.id,
itemtitle : el.itemtitle,
edudegree : el.edudegree,
edustage : el.edustage,
edusubject : el.edusubject,
}
ary2.push(obj2)
}
obj.children = ary2
})
ary.push(obj)
}
}
})
return ary
}
//
const getSubject = async () => {
if(localStorage.getItem('subjectList')){
subjectList.value = JSON.parse(localStorage.getItem('subjectList'))
}
else{
const { rows } = await listEvaluation({ itemkey: "version", edusubject, edustage, pageSize: 10000,orderby: 'orderidx asc', })
// subjectList.value = rows.filter(item => item.edustage == edustage && item.edusubject == edusubject)
subjectList.value = rows
localStorage.setItem('subjectList', JSON.stringify(subjectList.value))
}
//
if(!subjectList.value.length) return
let curBook = localStorage.getItem('curBook')
if(curBook){
curBook = JSON.parse(curBook)
curBookName.value = curBook.itemtitle
curBookId.value = curBook.id
curBookImg.value = BaseUrl + curBook.avartar
curBookPath.value = curBook.fileurl
}
else{
curBookName.value = subjectList.value[0].itemtitle
curBookId.value = subjectList.value[0].id
curBookImg.value = BaseUrl + subjectList.value[0].avartar
curBookPath.value = subjectList.value[0].fileurl
localStorage.setItem('curBookId', curBookId.value)
}
}
const isHaveUnit = (id) => {
return evaluationList.value.some(item => {
return item.rootid == id
})
}
const handleNodeClick = (data, node) => {
/**
* data : 当前节点数据
* node : 当前节点对象 包含当前节点所有数据 parent属性 指向父节点Node对象
*/
const nodeData = data;
let nodeData = cloneDeep(toRaw(data));
//label label
nodeData.label = nodeData.itemtitle
const parentNode = node.parent.data;
// parentNode
if (Array.isArray(parentNode)) {
//
nodeData.parentNode = null
}
else {
nodeData.parentNode = parentNode
// parentNode
nodeData.parentNode = toRaw(parentNode)
}
let curData = {
textBook: {
curBookId: curBookId.value,
curBookName: curBookName.value,
curBookImg: curBookImg.value,
curBookPath: curBookPath.value
curBookId: curBook.data.id,
curBookName: curBook.data.itemtitle,
curBookImg: BaseUrl + curBook.data.avartar,
curBookPath: curBook.data.fileurl
},
node: toRaw(nodeData)
}
currentNode.data = curData
localStorage.setItem('defaultExpandedKeys', parentNode ? JSON.stringify([parentNode.id]) : JSON.stringify([data.id]))
localStorage.setItem('curNode', JSON.stringify(nodeData))
localStorage.setItem('defaultExpandedKeys', nodeData.parentNode ? JSON.stringify([parentNode.id]) : JSON.stringify([data.id]))
localStorage.setItem('currentNodeId', JSON.stringify(data.id))
/**
* 临时用 后续删除 unitId
*/
let levelFirstId = null
let levelSecondId = null
if (nodeData.parentNode) {
levelFirstId = nodeData.parentNode.id
levelSecondId = nodeData.id
} else {
levelFirstId = nodeData.id
levelSecondId = ''
}
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId}))
emit('nodeClick', curData)
}
onMounted(() => {
getSubjectContent()
onMounted( async () => {
treeLoading.value = true
try{
useSubject = await useGetSubject()
subjectList.value = useSubject.subjectList
let book = localStorage.getItem('curBook')
if(book){
book = JSON.parse(book)
curBook.data = book
treeData.value = useSubject.getTreeData(book.id)
}
else{
curBook.data = useSubject.subjectList[0]
treeData.value = useSubject.treeData
}
//
nextTick(() =>{
//
let node = localStorage.getItem('curNode')
if(node){
curNode.data = JSON.parse(node)
defaultExpandedKeys.value = JSON.parse(localStorage.getItem('defaultExpandedKeys'))
}
else{
defaultExpandedKeys.value = [treeData.value[0].id]
curNode.data = getLastLevelData(treeData.value)[0]
//
localStorage.setItem('defaultExpandedKeys', JSON.stringify(defaultExpandedKeys.value))
localStorage.setItem('curNode', JSON.stringify(curNode.data))
}
emitChangeBook()
})
} finally{
treeLoading.value = false
}
})
</script>

View File

@ -137,7 +137,7 @@ const getSubjectContent = async () => {
}
const getSubject = async () => {
subjectList.value = JSON.parse(localStorage.getItem('subjectList'))
if (localStorage.getItem('subjectList')) {
subjectList.value = JSON.parse(localStorage.getItem('subjectList'))

View File

@ -0,0 +1,82 @@
import { ref } from 'vue'
import useUserStore from '@/store/modules/user'
import { listEvaluation } from '@/api/subject'
export const useGetSubject = async () =>{
// user store
const userStore = useUserStore()
const { edustage, edusubject, userId } = userStore.user
const BaseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
// 章节List
const unitList = ref([])
// 教材List
let subjectList = null
// 单元章节树结构
let treeData = null
// 根据 学科 + 学段 获取所有单元章节
const getSubjectUnit = async () =>{
let strUnit = localStorage.getItem('unitList')
if(strUnit){
unitList.value = JSON.parse(strUnit)
}
else{
const unitParams = {
edusubject,
edustage,
itemgroup: 'textbook',
orderby: 'orderidx asc',
pageSize: 10000
}
const { rows } = await listEvaluation(unitParams)
unitList.value = rows
localStorage.setItem('unitList', JSON.stringify(rows))
}
await getSubject()
}
// 获取 学科 + 学段 获取教材
const getSubject = async () =>{
let strSubject = localStorage.getItem('subjectList')
if(strSubject){
subjectList = JSON.parse(strSubject)
}
else{
const subjectParams = {
itemkey: "version",
edusubject,
edustage,
pageSize: 10000,
orderby: 'orderidx asc'
}
const { rows } = await listEvaluation(subjectParams)
subjectList = rows
localStorage.setItem('subjectList', JSON.stringify(rows))
}
// 默认选中第一个教材
if(subjectList && subjectList.length){
treeData = getTreeData(subjectList[0].id)
}
}
// 单元章节数据转为“树”结构
const getTreeData = (bookId) =>{
// 根据当前教材的id 查找出对应的章节
let data = unitList.value.filter(item => item.rootid == bookId && item.level == 1)
data.forEach( item => {
item.children = unitList.value.filter( item2 => item2.parentid == item.id && item2.level == 2)
})
return data
}
await getSubjectUnit()
return { subjectList, treeData, getTreeData }
}

View File

@ -37,7 +37,7 @@
<div class="user-info flex">
<span class="user-name">{{ userStore.user.nickName }}</span>
<div class="flex">
<div class="user-depname">{{ userStore.user.deptName }}</div>
<el-dropdown @command="changeSubject">
<div class="user-subject">{{ userStore.user.edusubject }}
<el-icon class="el-icon--right"><arrow-down />
@ -52,6 +52,7 @@
</template>
</el-dropdown>
</div>
<div class="user-depname">{{ userStore.user.deptName }}</div>
</div>
</div>
@ -72,6 +73,7 @@ import { updateUserInfo } from '@/api/system/user'
import outLink from '@/utils/linkConfig'
import logoIco from '@/assets/images/logo.png'
import { listEvaluation } from '@/api/classManage/index'
import { clearBookInfo } from '@/utils/ruoyi'
const { ipcRenderer } = window.electron || {}
const userStore = useUserStore()
@ -190,6 +192,7 @@ function setLayout() {
}
//
const changeSubject = async (command) =>{
clearBookInfo()
const { userId, userName, phonenumber, plainpwd } = userStore.user
const data = {
userId,
@ -329,7 +332,7 @@ onMounted(() => {
justify-content: space-around;
.user-depname {
margin-right: 5px;
margin-right: 0;
}
.user-subject {
@ -349,8 +352,8 @@ onMounted(() => {
align-items: center;
.user-avatar {
width: 35px;
height: 35px;
width: 45px;
height: 45px;
border-radius: 10px;
margin-right: 10px;
}

View File

@ -61,7 +61,7 @@ function stateSyncWatch(storeName, newState) {
// console.log('state-change-diffData', diffData)
try {
for(const key in diffData) {
const value = diffData[key]
const value = diffData[key] || null
const newValue = {} // 重新组装pinia需要的数据 {a:{b:1}} 这种
const keyArr = key.split('.') || []
keyArr.reduce((o,c,i)=>{o[c] = i === keyArr.length-1 ? value : {};return o[c]}, newValue)
@ -172,6 +172,8 @@ const getObjValue = (obj, key) => {
const findDifferences = (obj1, obj2) => {
const differences = {};
function compareObjects(o1, o2, path = '') {
if (o1 == null) return
if (o2 == null) return
for (const key in o1) {
if (o1.hasOwnProperty(key)) {
const newPath = path ? `${path}.${key}` : key;

View File

@ -257,3 +257,17 @@ export const getFileName = (filename) => {
if(!filename) return
return filename.replace(/\.[^/.]+$/, "");
}
// 清除当前选中的教材 章节 相关信息
export const clearBookInfo = () =>{
//当前选中的教材
localStorage.removeItem('curBook')
// 当前选中的节点
localStorage.removeItem('curNode')
// 所有章节单元数据
localStorage.removeItem('unitList')
// 所有教材数据
localStorage.removeItem('subjectList')
// 展开的节点
localStorage.removeItem('defaultExpandedKeys')
}

View File

@ -1,10 +1,10 @@
<template>
<el-card style="width: 100%;height: 100%;overflow: auto">
<!-- <template #header>-->
<!-- <div class="card-header" style="text-align: left">-->
<!-- <el-button type="primary" @click="addGroup">新建分组</el-button>-->
<!-- </div>-->
<!-- </template>-->
<template #header>
<div class="card-header" style="text-align: left">
<el-button type="primary" @click="addGroup">新建分组</el-button>
</div>
</template>
<template v-if="groupList.length > 0">
<div style="font-size: 16px;font-weight: bold;color: #000;text-align: left;margin-bottom: 5px">可用分组</div>
<div class="groupList">

View File

@ -186,7 +186,8 @@
])
//
const classids = ref('')
//
const classesNotAMemberOf = ref([])
//
const getClassInfo = () => {
classList.value = []
@ -199,13 +200,13 @@
});
listClassmain({entpid: userStore.deptId, status: 'open', pageSize: 100}).then(response => {
//
let arr = [...response.rows]
classesNotAMemberOf.value = [...response.rows]
classList.value.forEach(item => {
const currentIndex = arr.findIndex(items => items.id === item.id)
if(currentIndex) arr.splice(currentIndex, 1)
const currentIndex = classesNotAMemberOf.value.findIndex(items => items.id === item.id)
if(currentIndex) classesNotAMemberOf.value.splice(currentIndex, 1)
})
//
gradeTree.value = groupByCondition(arr, item => item.agekey);
gradeTree.value = groupByCondition(classesNotAMemberOf.value, item => item.agekey);
})
}
//

View File

@ -8,15 +8,15 @@
<div class="teacher_content_con">
<!-- 题目内容习题训练 -->
<div v-if="dialogProps.studentObj.worktype == '习题训练'">
<div v-for="(quItem, qIndex) in dialogProps.quizlist" :key="quItem.id">
<div v-for="(stuItem, sIndex) in dialogProps.studentQuizAllList" :key="stuItem.id">
<div v-for="quItem in dialogProps.quizlist" :key="quItem.id">
<div v-if="stuItem.entpcourseworkid == quItem.id">
<el-card style="max-width: 100%; margin-bottom: 10px">
<!-- 题型 分值 -->
<template #header>
<div class="card-header">
<span
>{{ sIndex + 1 }}{{ quItem.worktype }}
>{{ qIndex + 1 }}{{ quItem.worktype }}
{{ stuItem.score ? stuItem.score : 0 }}</span
>
</div>
@ -94,11 +94,8 @@
</span>
</el-col>
<el-col :span="6" style="padding: 10px">
<div
v-for="(imageItem, index) in stuItem.imagefile"
v-if="stuItem.imagefile && stuItem.imagefile.length > 0"
:key="index"
>
<div v-if="stuItem.imagefile && stuItem.imagefile.length > 0">
<div v-for="(imageItem, index) in stuItem.imagefile" :key="index">
<el-image
style="width: 30px; height: 30px"
:src="imageItem"
@ -110,6 +107,7 @@
fit="contain"
/>
</div>
</div>
</el-col>
<el-col :span="6" style="padding: 10px">
<!-- 单选题 填空题 多选题 判断题 主观题 复合题 待完善

View File

@ -411,8 +411,6 @@ const queryForm = reactive({
entpCourseWorkTotal.value = entpcourseworkres.data.length;
}
if()
//
processList(workResource.entpCourseWorkList);
})

View File

@ -2,9 +2,9 @@
<div class="desktop-work-item">
<div class="item-title flex">
<span class="title">工作动态</span>
<el-radio-group v-model="type">
<!-- <el-radio-group v-model="type">
<el-radio-button label="全部" :value="-1" />
</el-radio-group>
</el-radio-group> -->
</div>
<div class="item-content" v-loading="loading">
<el-scrollbar height="500px">

View File

@ -211,12 +211,6 @@ const rules = reactive({
message: '请选择地址',
trigger: 'change',
},],
class:[ {
type:'array',
required: true,
message: '请选择班级',
trigger: 'change',
},],
discipline:[ {
type: 'array',
required: true,

View File

@ -89,6 +89,8 @@ const userStore = useUserStore()
const visible = ref(false) //
const myClassActive = ref({}) // APT
const imChatRef = ref(null) // im-chat ref
const emit = defineEmits(['close'])
const classForm = reactive({ // ()
form: {}, itemOption: [], option: {}
})
@ -137,6 +139,7 @@ const handleClose = async () => {
reset() //
await chat?.logout()
chat = null
emit('close')
}
// -
const initData = () => {

View File

@ -1,6 +1,6 @@
<template>
<div class="file-oper-batch-wrap">
<div style="margin: 0 20px; line-height: 40px">
<div style="line-height: 40px">
<el-checkbox
v-model="isCheckAll"
:indeterminate="indeterminate"
@ -15,7 +15,7 @@
</template>
<script>
import { deleteSmarttalkBatch } from '@/api/file'
import { ElMessage, ElMessageBox } from 'element-plus'
import { ElMessage } from 'element-plus'
import { exportFile } from '@/utils/talkFile'
export default {
name: 'FileOperBatch',

View File

@ -52,8 +52,8 @@
</div>
</div>
<div class="prepare-body-main-item-btn">
<el-button v-if="activeClassId==item.id" type="success" @click="clickStartClass(item)">上课中</el-button>
<el-button v-else type="primary" @click="clickStartClass(item)">上课</el-button>
<!-- <el-button v-if="activeClassId==item.id" type="success" @click="clickStartClass(item)">上课中</el-button> -->
<el-button type="primary" @click="clickStartClass(item)">上课</el-button>
</div>
<div class="prepare-body-main-item-tool">
<el-popover
@ -74,7 +74,7 @@
</el-button>
</div>
<div class="item-popover-item">
<el-button text @click="deleteTalk(item)" :disabled="activeClassId==item.id">
<el-button text @click="deleteTalk(item)">
<i class="iconfont icon-shanchu"></i>
<span>删除</span>
</el-button>

View File

@ -86,7 +86,7 @@ import useUserStore from '@/store/modules/user'
import { ElMessage } from 'element-plus'
import { getCurrentTime, getAfterMinutes } from '@/utils/date'
const emit = defineEmits(['addSuccess'])
const emit = defineEmits(['addSuccess','close'])
const props = defineProps({
bookId: {
type: Number,
@ -115,7 +115,7 @@ const updateForm = ref({})
watch(
() => props.currentNode,
(newValue, oldValue) => {
form.name = newValue.label
form.name = newValue.itemtitle
}
)
const ruleForm = reactive({
@ -216,7 +216,9 @@ const openDialog = (data) => {
const closeDialog = () => {
ruleFormDialog.value.resetFields()
centerDialogVisible.value = false
form.name = props.currentNode.label
form.name = props.currentNode.itemtitle
emit('close')
}
const classList = ref([])
onMounted(() => {

View File

@ -20,7 +20,6 @@
:key="index"
:item="item"
:index="index"
:activeClassId="activeClass?.id"
@on-delete="deleteTalk"
@on-start-class="startClass"
>
@ -69,7 +68,7 @@
<el-tab-pane label="素材" name="素材">
<div class="prepare-body-header">
<div>
<label style="font-size: 15px">{{ currentFileList.length }}个文件</label>&nbsp;
<label style="font-size: 15px">{{ currentFileList.filter(ite=>ite.fileFlag!=='apt'&&ite.fileFlag!=='课件').length }}个文件</label>&nbsp;
<el-popover placement="top-start" :width="250" trigger="hover">
<template #default>
<div>
@ -141,7 +140,7 @@
</div>
<file-oper-batch
v-show="checkFileList.length > 0"
:indeterminate="checkFileList.length > 0 && checkFileList.length < currentFileList.length"
:indeterminate="checkFileList.length > 0 && checkFileList.length < currentSCFileList.length"
:choose="checkFileList"
:check-all="isCheckAll"
@click-delete="clickDelete"
@ -159,9 +158,10 @@
:current-node="currentNode"
:book-id="uploadData.textbookId"
@add-success="initReserv"
@close="closeChange"
></reserv>
<!-- 上课配置 -->
<class-start ref="calssRef"/>
<class-start ref="calssRef" @close="closeChange"/>
</template>
<script setup>
import { Check,Plus } from '@element-plus/icons-vue'
@ -255,7 +255,7 @@ export default {
computed: {
isCheckAll() {
return (
this.checkFileList.length > 0 && this.checkFileList.length === this.currentFileList.length
this.checkFileList.length > 0 && this.checkFileList.length === this.currentSCFileList.length
)
},
currentKJFileList() {
@ -305,10 +305,10 @@ export default {
methods: {
startClass(item) {
// console.log(item, sessionStore)
if(item.fileFlag === '课件') {
// ()
const id = sessionStore.has('activeClass.id') ? sessionStore.get('activeClass.id') : null
if (id && id == item.id) return ElMessage.warning('当前正在上课,请勿重复操作')
if(item.fileFlag === '课件') {
this.openReserv()
}
if(item.fileFlag === 'apt') {
@ -319,6 +319,11 @@ export default {
sessionStore.set('activeClass', item)
this.activeClass = item
},
closeChange() { // -
console.log('关闭上课弹窗')
this.activeClass = null
sessionStore.delete('activeClass')
},
initReserv(id) {
getClassInfo(id).then((res) => {
this.curClassReserv = res.data
@ -363,7 +368,7 @@ export default {
this.downloadNum = num
},
createFile() {
creatPPT(this.currentNode.label + '.pptx', this.uploadData).then((res) => {
creatPPT(this.currentNode.itemtitle + '.pptx', this.uploadData).then((res) => {
this.currentFileList.unshift(res.resData)
})
},
@ -443,7 +448,7 @@ export default {
creatAPT({
...this.uploadData,
fileId: slideid,
fileShowName: this.currentNode.label + '.apt'
fileShowName: this.currentNode.itemtitle + '.apt'
}).then((res) => {
this.currentFileList.unshift(res.resData)
})
@ -660,7 +665,7 @@ export default {
'/tool/sphere?entpcourseid=' +
this.entpcourseid +
'&label=' +
this.currentNode.label +
this.currentNode.itemtitle +
'&reservId=' +
id
})

View File

@ -30,9 +30,9 @@
<li class="list-group-item">
<div class="left-align">
<Message class="Message"/>
<span>用户邮箱</span>
<span>身份证号</span>
</div>
<div class="right-align">{{ state.user.email }}</div>
<div class="right-align">{{ state.user.identity }}</div>
</li>
<li class="list-group-item">
<div class="left-align">
@ -48,7 +48,7 @@
<Avatar class="Avatar"/>
<span>所属角色</span>
</div>
<div class="right-align">{{ state.roleGroup }}</div>
<div class="right-align">{{ state.roleGroup || '教师' }}</div>
</li>
<li class="list-group-item">
<div class="left-align">

View File

@ -6,10 +6,10 @@
<el-form-item label="手机号码" prop="phonenumber">
<el-input v-model="user.phonenumber" maxlength="11" />
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-input v-model="user.email" maxlength="50" />
<el-form-item label="身份证号" prop="identity">
<el-input v-model="user.identity" maxlength="50" />
</el-form-item>
<el-form-item label="性别">
<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>
@ -18,8 +18,8 @@
<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.title">
{{item.title }}
<el-radio :value="item.label">
{{item.label }}
</el-radio>
</template>
</el-radio-group>
@ -42,9 +42,11 @@
<script setup>
import { ref, getCurrentInstance,onMounted } from 'vue'
import {updateUserInfo } from '@/api/system/user'
import {getDept } from '@/api/login'
import { listEvaluation } from '@/api/subject/index'
import useUserStore from '@/store/modules/user'
import {ElMessage} from 'element-plus'
import { clearBookInfo } from '@/utils/ruoyi'
const props = defineProps({
user: {
@ -59,21 +61,30 @@ const userStore = useUserStore()
const semesterList = ref([
{
id:1,
title:'幼儿园'
label:'幼儿园'
},
{
id:2,
title:'小学'
label:'小学'
},
{
id:3,
title:'初中'
label:'初中'
},
{
id:4,
title:'高中'
label:'高中'
},
])
//
const getTheSection = () => {
getDept({deptId:userStore.user.deptId}).then(res => {
//
const arr = res.data.studying.split(',')
semesterList.value = semesterList.value.filter(items => {return arr.includes(items.label)}).map(item => item)
})
}
const rules = ref({
nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
@ -137,8 +148,7 @@ function submit() {
userStore.login({username:props.user.userName,password:props.user.plainpwd}).then(() => {
userStore.getInfo().then(res => {
if(res.code === 200){
localStorage.removeItem('subjectList')
localStorage.removeItem('evaluationList')
clearBookInfo()
ElMessage.success('修改成功')
}else{
ElMessage.error(response.msg)
@ -159,5 +169,6 @@ const semeterChange = (item) => {
}
onMounted(() => {
getSubject()
getTheSection()
})
</script>

View File

@ -38,7 +38,7 @@ const curBookId = ref('')
const evaluationList = ref([])
const getTreeData = () => {
evaluationList.value = JSON.parse(localStorage.getItem('evaluationList'))
evaluationList.value = JSON.parse(localStorage.getItem('unitList'))
//
/**

View File

@ -57,6 +57,8 @@ class Drag {
document.removeEventListener('mouseup', this.up);
document.addEventListener('touchmove', this.move);
document.addEventListener('touchend', this.up);
// 手动-触发事件 v-drag-start
this.el.dispatchEvent(new CustomEvent('v-drag-end', {detail:{drag: this}}))
}
// 业务逻辑
updatePosition(e) {
@ -108,6 +110,7 @@ export default {
// const { style } = binding.value
const drag = new Drag(el, binding)
const dragStart = (e) => {
// console.log('start', e)
drag.down(e)
document.addEventListener('mousemove', drag.move);
document.addEventListener('mouseup', drag.up);

View File

@ -13,7 +13,8 @@
<im-chat ref="imChatRef" @change="chatChange" group />
<!-- 底部工具栏 -->
<div class="tool-bottom-all" @mouseenter="mouseChange(0)" @mouseleave="mouseChange(1)">
<div class="tool-bottom-all"
@mouseenter="mouseChange(0)" @mouseleave="mouseChange(1)">
<div v-drag="{handle:'.tool-bottom-all', dragtime}"
@v-drag-start="dragtime = Date.now()">
<div class="c-logo" @click="logoHandle" title="拖动 | 折叠 | 展开">
@ -106,7 +107,7 @@ const getClassInfo = async () => {
const tabChange = (val) => {
const bool = !toolStore.isPdfWin && !toolStore.showBoardAll
if(bool) toolStore.showBoardAll = true
console.log('tabChange:', val, bool)
// console.log('tabChange:', val, bool)
toolStore.model = val // tab
}
// logo - |
@ -143,9 +144,12 @@ const mouseChange = (bool) => {
const isPdf = !resBool && toolStore.isPdfWin
if (isPdf) resBool = true
}
// console.log('mouseChange:', bool, resBool)
console.log('mouseChange:', bool, resBool)
setIgnore(resBool)
}
const touchChange = (e) => {
console.log(e)
}
// im-chat: {type, data}
const chatChange = (type, data, ...args) => {
if (type == 'createGroup') { // -