Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg
This commit is contained in:
commit
7da60f0815
|
@ -6,7 +6,7 @@
|
||||||
<i class="iconfont icon-xiangyou"></i>
|
<i class="iconfont icon-xiangyou"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="book-list" v-loading="treeLoading">
|
<div class="book-list" v-loading="treeLoading">
|
||||||
<el-tree ref="refTree" :data="treeData" :props="defaultProps" node-key="id"
|
<el-tree ref="refTree" :data="treeData" accordion :props="defaultProps" node-key="id"
|
||||||
:default-expanded-keys="defaultExpandedKeys" :current-node-key="currentNodeId" highlight-current
|
:default-expanded-keys="defaultExpandedKeys" :current-node-key="currentNodeId" highlight-current
|
||||||
@node-click="handleNodeClick">
|
@node-click="handleNodeClick">
|
||||||
<template #default="{ node }">
|
<template #default="{ node }">
|
||||||
|
@ -109,6 +109,8 @@ const getSubjectContent = async () => {
|
||||||
evaluationList.value = JSON.parse(localStorage.getItem('evaluationList'))
|
evaluationList.value = JSON.parse(localStorage.getItem('evaluationList'))
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
localStorage.removeItem('defaultExpandedKeys')
|
||||||
|
localStorage.removeItem('currentNodeId')
|
||||||
const { rows } = await listEvaluation(params)
|
const { rows } = await listEvaluation(params)
|
||||||
localStorage.setItem('evaluationList', JSON.stringify(rows))
|
localStorage.setItem('evaluationList', JSON.stringify(rows))
|
||||||
evaluationList.value = rows
|
evaluationList.value = rows
|
||||||
|
@ -134,6 +136,10 @@ const changeBook = ({ id, itemtitle, avartar, fileurl }) => {
|
||||||
curBookName.value = itemtitle
|
curBookName.value = itemtitle
|
||||||
curBookImg.value = BaseUrl + avartar
|
curBookImg.value = BaseUrl + avartar
|
||||||
curBookPath.value = fileurl
|
curBookPath.value = fileurl
|
||||||
|
|
||||||
|
localStorage.removeItem('defaultExpandedKeys')
|
||||||
|
localStorage.removeItem('currentNodeId')
|
||||||
|
localStorage.setItem('curBook', JSON.stringify({id, itemtitle, avartar, fileurl}))
|
||||||
getTreeData()
|
getTreeData()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
@ -144,7 +150,6 @@ const getTreeData = () => {
|
||||||
//数据过滤
|
//数据过滤
|
||||||
let upData = transData(evaluationList.value)
|
let upData = transData(evaluationList.value)
|
||||||
|
|
||||||
|
|
||||||
if(upData.length){
|
if(upData.length){
|
||||||
treeData.value = [...upData]
|
treeData.value = [...upData]
|
||||||
}
|
}
|
||||||
|
@ -153,10 +158,22 @@ const getTreeData = () => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
defaultExpandedKeys.value = [treeData.value[0].id]
|
|
||||||
currentNode.data = getLastLevelData(treeData.value)[0]
|
let defaultCurNodeId = localStorage.getItem('currentNodeId')
|
||||||
currentNodeId.value = getLastLevelData(treeData.value)[0].id
|
if(defaultCurNodeId){
|
||||||
currentNodeName.value = getLastLevelData(treeData.value)[0].label
|
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()
|
emitChangeBook()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -183,6 +200,9 @@ const emitChangeBook = () => {
|
||||||
},
|
},
|
||||||
node: curNode
|
node: curNode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
localStorage.setItem('defaultExpandedKeys', JSON.stringify(defaultExpandedKeys.value))
|
||||||
|
localStorage.setItem('currentNodeId', JSON.stringify(currentNodeId.value))
|
||||||
emit('changeBook', data)
|
emit('changeBook', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,6 +250,11 @@ const findParentByChildId = (treeData, targetNodeId) => {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const findNode = (id) =>{
|
||||||
|
if(!id) return
|
||||||
|
return evaluationList.value.find( item => item.id == id)
|
||||||
|
}
|
||||||
|
|
||||||
const transData = (data) => {
|
const transData = (data) => {
|
||||||
let ary = []
|
let ary = []
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
|
@ -281,10 +306,21 @@ const getSubject = async () => {
|
||||||
|
|
||||||
// 默认第一个
|
// 默认第一个
|
||||||
if(!subjectList.value.length) return
|
if(!subjectList.value.length) return
|
||||||
curBookName.value = subjectList.value[0].itemtitle
|
let curBook = localStorage.getItem('curBook')
|
||||||
curBookId.value = subjectList.value[0].id
|
if(curBook){
|
||||||
curBookImg.value = BaseUrl + subjectList.value[0].avartar
|
curBook = JSON.parse(curBook)
|
||||||
curBookPath.value = subjectList.value[0].fileurl
|
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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -321,7 +357,12 @@ const handleNodeClick = (data, node) => {
|
||||||
node: toRaw(nodeData)
|
node: toRaw(nodeData)
|
||||||
}
|
}
|
||||||
currentNode.data = curData
|
currentNode.data = curData
|
||||||
|
|
||||||
|
localStorage.setItem('defaultExpandedKeys', nodeData.parentNode ? JSON.stringify([parentNode.id]) : JSON.stringify([data.id]))
|
||||||
|
localStorage.setItem('currentNodeId', JSON.stringify(data.id))
|
||||||
|
|
||||||
emit('nodeClick', curData)
|
emit('nodeClick', curData)
|
||||||
|
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSubjectContent()
|
getSubjectContent()
|
||||||
|
|
|
@ -64,6 +64,8 @@ const getVertion = (data) => {
|
||||||
childs: []
|
childs: []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
//判断是否存在该教材,有则展示第一项
|
||||||
|
if(treeData.value.length === 0) return
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
defaultExpandedKeys.value = [treeData.value[0].id]
|
defaultExpandedKeys.value = [treeData.value[0].id]
|
||||||
node.currentNode.data = treeData.value[0]
|
node.currentNode.data = treeData.value[0]
|
||||||
|
|
|
@ -200,6 +200,8 @@ const changeSubject = async (command) =>{
|
||||||
await updateUserInfo(data)
|
await updateUserInfo(data)
|
||||||
await userStore.login({username: phonenumber, password: plainpwd})
|
await userStore.login({username: phonenumber, password: plainpwd})
|
||||||
await userStore.getInfo()
|
await userStore.getInfo()
|
||||||
|
localStorage.removeItem('subjectList')
|
||||||
|
localStorage.removeItem('evaluationList')
|
||||||
router.go()
|
router.go()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,13 @@ export const constantRoutes = [
|
||||||
path: '/resource',
|
path: '/resource',
|
||||||
component: () => import('@/views/resource/index.vue'),
|
component: () => import('@/views/resource/index.vue'),
|
||||||
name: 'resource',
|
name: 'resource',
|
||||||
meta: {title: '资源'}
|
meta: {title: '资源库'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/prepare',
|
path: '/prepare',
|
||||||
component: () => import('@/views/prepare/index.vue'),
|
component: () => import('@/views/prepare/index.vue'),
|
||||||
name: 'prepare',
|
name: 'prepare',
|
||||||
meta: {title: '备课'}
|
meta: {title: '教学实践'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/teach',
|
path: '/teach',
|
||||||
|
|
|
@ -141,6 +141,7 @@ const getClassWorkList = () => {
|
||||||
edustage: userStore.edustage,// 学段
|
edustage: userStore.edustage,// 学段
|
||||||
edusubject: userStore.edusubject,//学科
|
edusubject: userStore.edusubject,//学科
|
||||||
deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期
|
deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期
|
||||||
|
status: '1', // 作业状态:1-已发布
|
||||||
orderby: 'concat(deaddate,uniquekey) DESC',
|
orderby: 'concat(deaddate,uniquekey) DESC',
|
||||||
pageSize: 100
|
pageSize: 100
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
|
|
|
@ -211,6 +211,11 @@
|
||||||
|
|
||||||
<!-- 学生答题展示 -->
|
<!-- 学生答题展示 -->
|
||||||
<div v-if="feedContentList.length > 0">
|
<div v-if="feedContentList.length > 0">
|
||||||
|
<div v-if="dialogProps.studentObj.worktype == '常规作业' && stuItem.rightanswer != ''&& stuItem.rightanswer != null">
|
||||||
|
<!-- 常规作业:学生有的会答复 -->
|
||||||
|
<p style="padding: 10px 0;">学生答复内容</p>
|
||||||
|
<div style="padding: 0 20px">{{stuItem.rightanswer}}</div>
|
||||||
|
</div>
|
||||||
<p>学生答题附件内容</p>
|
<p>学生答题附件内容</p>
|
||||||
<div class="image_list">
|
<div class="image_list">
|
||||||
<div v-if="imageList.length > 0">
|
<div v-if="imageList.length > 0">
|
||||||
|
@ -247,6 +252,9 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 无附件内容 -->
|
||||||
|
<div v-if="imageList.length == 0 && fileList.length == 0" style="padding: 0 20px">未提交附件内容</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|
|
@ -87,7 +87,7 @@ const menuList = [{
|
||||||
// path: '/prepare'
|
// path: '/prepare'
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
name: '教学实施',
|
name: '教学实践',
|
||||||
icon: 'icon-jiaoxuefenxi',
|
icon: 'icon-jiaoxuefenxi',
|
||||||
path: '/prepare'
|
path: '/prepare'
|
||||||
},
|
},
|
||||||
|
@ -166,12 +166,14 @@ const clickMenu = ({isOuter, path, disabled}) =>{
|
||||||
if(isOuter){
|
if(isOuter){
|
||||||
let configObj = outLink().getBaseData()
|
let configObj = outLink().getBaseData()
|
||||||
let fullPath = configObj.fullPath + path
|
let fullPath = configObj.fullPath + path
|
||||||
if(path == '/teaching/classtaskassign?titleName=作业布置&openDialog=newClassTask'){
|
if(path == '/teaching/classtaskassign?titleName=作业布置&openDialog=newClassTask' || path == '/teaching/classtaskassign?titleName=作业布置'){
|
||||||
// 头部 教材分析打开外部链接需要当前章节ID
|
// 头部 教材分析打开外部链接需要当前章节ID
|
||||||
const { levelFirstId, levelSecondId } = JSON.parse(localStorage.getItem('unitId'))
|
const { levelFirstId, levelSecondId } = JSON.parse(localStorage.getItem('unitId'))
|
||||||
|
|
||||||
let unitId = levelSecondId ? levelSecondId : levelFirstId
|
let unitId = levelSecondId ? levelSecondId : levelFirstId
|
||||||
fullPath = fullPath + `&unitId=${unitId}`
|
fullPath = fullPath + `&unitId=${unitId}`
|
||||||
|
|
||||||
|
console.log(fullPath)
|
||||||
}
|
}
|
||||||
fullPath = fullPath.replaceAll('//', '/')
|
fullPath = fullPath.replaceAll('//', '/')
|
||||||
// 通知主进程
|
// 通知主进程
|
||||||
|
|
Loading…
Reference in New Issue