Compare commits
8 Commits
d534340f88
...
4d9ae0ab90
Author | SHA1 | Date |
---|---|---|
zouyf | 4d9ae0ab90 | |
“zouyf” | 26c388f31c | |
“zouyf” | d9ddb1982b | |
朱浩 | 3942f894b0 | |
朱浩 | ec8f7b5727 | |
yangws | 1a447b30fb | |
小杨 | 1c9a3762ef | |
lyc | ea88aa959d |
|
@ -18,6 +18,14 @@ export function listClassworkdataByDeadDate(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询classworkdata详细
|
||||||
|
export function getClassworkdata(id) {
|
||||||
|
return request({
|
||||||
|
url: '/education/classworkdata/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询classworkdata列表 班级作业列表
|
// 查询classworkdata列表 班级作业列表
|
||||||
export function listClassworkdata(query) {
|
export function listClassworkdata(query) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
<li class="flex" :class="[activeId == menu.path ? 'active-li' : '', menu.disabled ? 'disabled' : '']"
|
<li class="flex" :class="[activeId == menu.path ? 'active-li' : '', menu.disabled ? 'disabled' : '']"
|
||||||
v-for="menu in headerMenus" :key="menu.id" @click="clickMenu(menu)">
|
v-for="menu in headerMenus" :key="menu.id" @click="clickMenu(menu)">
|
||||||
<div class="icon-box">
|
<div class="icon-box">
|
||||||
|
|
||||||
|
|
||||||
<svg class="icon iconfont" aria-hidden="true">
|
<svg class="icon iconfont" aria-hidden="true">
|
||||||
<use :xlink:href="menu.icon"></use>
|
<use :xlink:href="menu.icon"></use>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<span class="text">{{ menu.name }}</span>
|
<span class="text">{{ menu.name }}</span>
|
||||||
</li>
|
</li>
|
||||||
|
@ -80,8 +80,8 @@ import { updateUserInfo } from '@/api/system/user'
|
||||||
import logoIco from '@/assets/images/logo.png'
|
import logoIco from '@/assets/images/logo.png'
|
||||||
import { listEvaluation } from '@/api/classManage/index'
|
import { listEvaluation } from '@/api/classManage/index'
|
||||||
import { sessionStore } from '@/utils/store'
|
import { sessionStore } from '@/utils/store'
|
||||||
import Chat from '@/utils/chat' // im 登录初始化
|
// import Chat from '@/utils/chat' // im 登录初始化
|
||||||
if (!Chat.imChat) Chat.init()
|
// if (!Chat.imChat) Chat.init()
|
||||||
|
|
||||||
let homeTitle = ref(import.meta.env.VITE_APP_TITLE)
|
let homeTitle = ref(import.meta.env.VITE_APP_TITLE)
|
||||||
const { ipcRenderer } = window.electron || {}
|
const { ipcRenderer } = window.electron || {}
|
||||||
|
@ -145,7 +145,7 @@ function handleCommand(command) {
|
||||||
break
|
break
|
||||||
case 'logout':
|
case 'logout':
|
||||||
logout()
|
logout()
|
||||||
Chat?.logout() // im 退出登录
|
// Chat?.logout() // im 退出登录
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
|
@ -161,7 +161,9 @@ function logout() {
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
|
const Chat = (await import('@/utils/chat')).default
|
||||||
|
if (!!Chat.imChat) Chat.logout()
|
||||||
userStore
|
userStore
|
||||||
.logOut()
|
.logOut()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@ -172,8 +174,7 @@ function logout() {
|
||||||
// router.replace('/login')
|
// router.replace('/login')
|
||||||
ipcRenderer && ipcRenderer.send('openLoginWindow')
|
ipcRenderer && ipcRenderer.send('openLoginWindow')
|
||||||
})
|
})
|
||||||
})
|
}).catch(()=>{})
|
||||||
.catch(() => { })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const emits = defineEmits(['setLayout'])
|
const emits = defineEmits(['setLayout'])
|
||||||
|
@ -183,10 +184,10 @@ function setLayout() {
|
||||||
// 切换学科
|
// 切换学科
|
||||||
const changeSubject = async (command) =>{
|
const changeSubject = async (command) =>{
|
||||||
let sessionSubject = {
|
let sessionSubject = {
|
||||||
bookList: null,
|
bookList: null,
|
||||||
curBook: null,
|
curBook: null,
|
||||||
curNode: null,
|
curNode: null,
|
||||||
defaultExpandedKeys: [],
|
defaultExpandedKeys: [],
|
||||||
subjectTree: []
|
subjectTree: []
|
||||||
}
|
}
|
||||||
sessionStore.set( 'subject', sessionSubject)
|
sessionStore.set( 'subject', sessionSubject)
|
||||||
|
|
|
@ -20,9 +20,9 @@ export class Chat {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 初始化 获取IM签名
|
* 初始化 获取IM签名
|
||||||
* @param {*} isInit : 是否初始化IM
|
* @param {*} isInit : 是否初始化IM
|
||||||
* @param {*} isLogin : 是否登录IM
|
* @param {*} isLogin : 是否登录IM
|
||||||
* @param {*} callback: 监听消息回调函数
|
* @param {*} callback: 监听消息回调函数
|
||||||
* @returns Promise<ImChat>
|
* @returns Promise<ImChat>
|
||||||
*/
|
*/
|
||||||
async init(isInit = true, isLogin = true, callback) {
|
async init(isInit = true, isLogin = true, callback) {
|
||||||
|
@ -69,7 +69,6 @@ export class Chat {
|
||||||
async logout() {
|
async logout() {
|
||||||
if (!this.imChat) return
|
if (!this.imChat) return
|
||||||
await this.imChat?.logout()
|
await this.imChat?.logout()
|
||||||
imChat = null
|
|
||||||
this.imChat = null
|
this.imChat = null
|
||||||
}
|
}
|
||||||
// 发群消息
|
// 发群消息
|
||||||
|
@ -95,4 +94,4 @@ export class Chat {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default new Chat()
|
export default new Chat()
|
||||||
|
|
|
@ -32,6 +32,8 @@ function getColor(index) {
|
||||||
// 初始化图表
|
// 初始化图表
|
||||||
function initChart() {
|
function initChart() {
|
||||||
const myChart = echarts.init(chartRef.value);
|
const myChart = echarts.init(chartRef.value);
|
||||||
|
const total = dataList.value.reduce((acc, cur) => acc + cur.value, 0); // 计算总数
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
|
@ -70,7 +72,11 @@ function initChart() {
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'top',
|
position: 'top',
|
||||||
formatter: '{c}人',
|
formatter: params => {
|
||||||
|
const value = dataList.value[params.dataIndex].value;
|
||||||
|
const percentage = ((value / total) * 100).toFixed(2); // 计算百分比并保留两位小数
|
||||||
|
return `${percentage}%`; // 显示为百分比形式
|
||||||
|
},
|
||||||
color: '#333',
|
color: '#333',
|
||||||
fontSize: 12
|
fontSize: 12
|
||||||
}
|
}
|
||||||
|
|
|
@ -460,12 +460,13 @@ import useUserStore from '@/store/modules/user'
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
// import { Plus } from '@element-plus/icons-vue'
|
// import { Plus } from '@element-plus/icons-vue'
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||||
import { updateClassworkeval, updateClassworkdata } from '@/api/classTask'
|
import { updateClassworkeval, updateClassworkdata, getClassworkdata } from '@/api/classTask'
|
||||||
import { getTimeDate } from '@/utils/date'
|
import { getTimeDate } from '@/utils/date'
|
||||||
import ReFilePreview from '@/components/refile-preview/index.vue'
|
import ReFilePreview from '@/components/refile-preview/index.vue'
|
||||||
import { quizStrToList } from '@/utils/comm';
|
import { quizStrToList } from '@/utils/comm';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
@ -644,7 +645,7 @@ const selectScore = (score) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 接收父组件传过来的参数
|
// 接收父组件传过来的参数
|
||||||
const acceptParams = (params) => {
|
const acceptParams = async (params) => {
|
||||||
console.log(params)
|
console.log(params)
|
||||||
console.log(dialogProps, 'dialogProps')
|
console.log(dialogProps, 'dialogProps')
|
||||||
// 先重置一下 参数
|
// 先重置一下 参数
|
||||||
|
@ -709,8 +710,9 @@ const acceptParams = (params) => {
|
||||||
if (params.studentObj.worktype == '常规作业') {
|
if (params.studentObj.worktype == '常规作业') {
|
||||||
try {
|
try {
|
||||||
// 老师布置的附件 datacontent TODO:常规作业、其他类型还未接入
|
// 老师布置的附件 datacontent TODO:常规作业、其他类型还未接入
|
||||||
if (params.studentObj.datacontent != '') {
|
const res = await getClassworkdata(params.studentObj.id);
|
||||||
const teachWorkFileList = JSON.parse(params.studentObj.datacontent)
|
if(res.data.datacontent != ''){
|
||||||
|
const teachWorkFileList = JSON.parse(res.data.datacontent);
|
||||||
console.log(teachWorkFileList, '老师filelist-------------')
|
console.log(teachWorkFileList, '老师filelist-------------')
|
||||||
teachWorkFileList &&
|
teachWorkFileList &&
|
||||||
teachWorkFileList.forEach((item) => {
|
teachWorkFileList.forEach((item) => {
|
||||||
|
@ -727,7 +729,6 @@ const acceptParams = (params) => {
|
||||||
teacherFeedContentList.value.push(teachWorkFileList)
|
teacherFeedContentList.value.push(teachWorkFileList)
|
||||||
}
|
}
|
||||||
|
|
||||||
dialogProps.value.studentObj.datacontent = dialogProps.value.studentObj.datacontent
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Invalid JSON:', error)
|
console.error('Invalid JSON:', error)
|
||||||
}
|
}
|
||||||
|
|
|
@ -418,15 +418,15 @@ const getStudentClassWorkDataDetail = (row) => {
|
||||||
wevalres.rows[w].score = wevalres.rows[w].score ? wevalres.rows[w].score : 0
|
wevalres.rows[w].score = wevalres.rows[w].score ? wevalres.rows[w].score : 0
|
||||||
|
|
||||||
// 参考答案 去除下html标签
|
// 参考答案 去除下html标签
|
||||||
wevalres.rows[w].rightanswer =
|
// wevalres.rows[w].rightanswer =
|
||||||
wevalres.rows[w].rightanswer != '' && wevalres.rows[w].rightanswer != null
|
// wevalres.rows[w].rightanswer != '' && wevalres.rows[w].rightanswer != null
|
||||||
? wevalres.rows[w].rightanswer.replace(/<[^>]+>/g, '')
|
// ? wevalres.rows[w].rightanswer.replace(/<[^>]+>/g, '')
|
||||||
: wevalres.rows[w].rightanswer
|
// : wevalres.rows[w].rightanswer
|
||||||
// 学生回答 去除下html标签
|
// // 学生回答 去除下html标签
|
||||||
wevalres.rows[w].feedcontent =
|
// wevalres.rows[w].feedcontent =
|
||||||
wevalres.rows[w].feedcontent != '' && wevalres.rows[w].feedcontent != null
|
// wevalres.rows[w].feedcontent != '' && wevalres.rows[w].feedcontent != null
|
||||||
? wevalres.rows[w].feedcontent.replace(/<[^>]+>/g, '')
|
// ? wevalres.rows[w].feedcontent.replace(/<[^>]+>/g, '')
|
||||||
: wevalres.rows[w].feedcontent
|
// : wevalres.rows[w].feedcontent
|
||||||
|
|
||||||
if (classWorkAnalysis.row.worktype == '常规作业') {
|
if (classWorkAnalysis.row.worktype == '常规作业') {
|
||||||
wevalres.rows[w].feedcontent = JSON.parse(wevalres.rows[w].feedcontent)
|
wevalres.rows[w].feedcontent = JSON.parse(wevalres.rows[w].feedcontent)
|
||||||
|
|
|
@ -410,15 +410,15 @@ const getStudentClassWorkDataDetail = (row) => {
|
||||||
wevalres.rows[w].score = wevalres.rows[w].score ? wevalres.rows[w].score : 0
|
wevalres.rows[w].score = wevalres.rows[w].score ? wevalres.rows[w].score : 0
|
||||||
|
|
||||||
// 参考答案 去除下html标签
|
// 参考答案 去除下html标签
|
||||||
wevalres.rows[w].rightanswer =
|
// wevalres.rows[w].rightanswer =
|
||||||
wevalres.rows[w].rightanswer != '' && wevalres.rows[w].rightanswer != null
|
// wevalres.rows[w].rightanswer != '' && wevalres.rows[w].rightanswer != null
|
||||||
? wevalres.rows[w].rightanswer.replace(/<[^>]+>/g, '')
|
// ? wevalres.rows[w].rightanswer.replace(/<[^>]+>/g, '')
|
||||||
: wevalres.rows[w].rightanswer
|
// : wevalres.rows[w].rightanswer
|
||||||
// 学生回答 去除下html标签
|
// // 学生回答 去除下html标签
|
||||||
wevalres.rows[w].feedcontent =
|
// wevalres.rows[w].feedcontent =
|
||||||
wevalres.rows[w].feedcontent != '' && wevalres.rows[w].feedcontent != null
|
// wevalres.rows[w].feedcontent != '' && wevalres.rows[w].feedcontent != null
|
||||||
? wevalres.rows[w].feedcontent.replace(/<[^>]+>/g, '')
|
// ? wevalres.rows[w].feedcontent.replace(/<[^>]+>/g, '')
|
||||||
: wevalres.rows[w].feedcontent
|
// : wevalres.rows[w].feedcontent
|
||||||
|
|
||||||
if (classWorkAnalysis.row.worktype == '常规作业') {
|
if (classWorkAnalysis.row.worktype == '常规作业') {
|
||||||
wevalres.rows[w].feedcontent = JSON.parse(wevalres.rows[w].feedcontent)
|
wevalres.rows[w].feedcontent = JSON.parse(wevalres.rows[w].feedcontent)
|
||||||
|
|
Loading…
Reference in New Issue