Compare commits
20 Commits
db20978575
...
eab46ec7f4
Author | SHA1 | Date |
---|---|---|
“zouyf” | eab46ec7f4 | |
“zouyf” | 81dd59f564 | |
lyc | 7c36255508 | |
lyc | 310d1aee59 | |
zhengdegang | 3caa561610 | |
zdg | ada2e63060 | |
zdg | eaf9d508d4 | |
朱浩 | 716c1dd0a9 | |
“zouyf” | cb15855fc1 | |
朱浩 | 76f053d8c8 | |
yangws | 988c6160bb | |
小杨 | 0119a92501 | |
yangws | e1dfc0f8b4 | |
小杨 | 31f9ec61ea | |
“zouyf” | 7b3f00ba67 | |
baigl | 042f8e5907 | |
“zouyf” | 2ca4117561 | |
朱浩 | 0511256094 | |
朱浩 | e2e8cae690 | |
zdg | 68cf2bae1f |
|
@ -26,3 +26,13 @@ export class imChat {
|
|||
// 获取腾讯im-chat appid 签名
|
||||
static getTxCloudSign = data => ApiService.publicHttp('/system/user/txCloudSign', data)
|
||||
}
|
||||
|
||||
// zdg: url跳转-后端存储
|
||||
export class toLink {
|
||||
// 设置链接-返回key(默认15分钟有效时间)
|
||||
static setLink = url => ApiService.publicHttp(`/smarttalk/toLink`, {url}, 'post', null, 'form')
|
||||
// 获取链接
|
||||
static getLink = key => ApiService.publicHttp(`/smarttalk/toLink/${key}`)
|
||||
// 删除链接-缓存
|
||||
static delLink = key => ApiService.publicHttp(`/smarttalk/toLink/${key}`, null, 'delete')
|
||||
}
|
||||
|
|
|
@ -27,6 +27,15 @@ export function listClassworkdata(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 新接口---查询classworkdata列表 班级作业列表
|
||||
export function listClassworkdataNew(query) {
|
||||
return request({
|
||||
url: '/education/classworkdata/new/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询entpcoursework列表 课程作业列表
|
||||
export function listEntpcoursework(query) {
|
||||
return request({
|
||||
|
|
|
@ -122,7 +122,8 @@ const outerAi = [
|
|||
title: '教学大模型',
|
||||
secondTit: '中小学基础教学大模型',
|
||||
img: new URL('../../../src/assets/images/ai-02.png', import.meta.url).href,
|
||||
disabled: true,
|
||||
path: '/ais/aimoss'
|
||||
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
|
|
|
@ -57,7 +57,7 @@ function stateSyncWatch(storeName, newState) {
|
|||
const diffData = findDifferences(oldState, newState)
|
||||
if(!_.keys(diffData).length) return // 没有变化就终止执行
|
||||
// 数据处理: 找出差异
|
||||
console.log('state-change-diffData', diffData)
|
||||
// console.log('state-change-diffData', diffData)
|
||||
try {
|
||||
let pinaValue = {} // store pina状态管理需要的数据格式
|
||||
// 数据转换处理
|
||||
|
@ -116,7 +116,7 @@ function stateSyncInit(wid, store) {
|
|||
function sessionWatch(store) {
|
||||
const unsubscribe = sessionStore.onDidAnyChange((newV, oldV) => {
|
||||
if (newV !== oldV) {
|
||||
console.log('session-change', newV, oldV)
|
||||
// console.log('session-change', newV, oldV)
|
||||
// 通知主线程更新
|
||||
// ipcRenderer?.invoke('pinia-state-change', storeName, jsonStr)
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ function stateChange(store) {
|
|||
const storeName = store.$id
|
||||
ipcRenderer?.on('pinia-state-set', (e, sName, jsonStr) => {
|
||||
if (sName == storeName) { // 更新对应数据
|
||||
console.log('state-set', jsonStr, sName)
|
||||
// console.log('state-set', jsonStr, sName)
|
||||
const curJson = circularSafeStringify(store.$state) // 当前数据
|
||||
const isUp = curJson != jsonStr // 不同的时候才写入,不然会导致触发数据变化监听,导致死循环
|
||||
if (!isUp) return
|
||||
|
|
|
@ -266,6 +266,9 @@ const btnSave = () => {
|
|||
}
|
||||
//新建小组
|
||||
const addGroup = () => {
|
||||
// 做清空处理
|
||||
groupForm.groupname = ''
|
||||
groupForm.orderidx = 0
|
||||
groupVisible.value = true
|
||||
}
|
||||
const btnGroupSave = () => {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<el-descriptions-item label="班级名称">{{ classInfo.caption }}</el-descriptions-item>
|
||||
<el-descriptions-item label="教师">
|
||||
<template v-if="classInfo.teacher.length > 0">
|
||||
<el-tag type="primary" v-for="(item, index) in classInfo.teacher" :key="index">{{item.name}}</el-tag>
|
||||
<el-tag style="margin-right: 5px;margin-bottom: 5px;" type="primary" v-for="(item, index) in classInfo.teacher" :key="index">{{item.name}}</el-tag>
|
||||
</template>
|
||||
<template v-else>{{ classInfo.teachername }}</template>
|
||||
</el-descriptions-item>
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
<script setup>
|
||||
import { ref, onMounted, onUnmounted, computed, watch } from 'vue'
|
||||
import { listByDeadDate, listClassworkdata } from '@/api/classTask'
|
||||
import { listByDeadDate, listClassworkdata, listClassworkdataNew } from '@/api/classTask'
|
||||
|
||||
import TaskItem from '@/views/classTask/container/task-item.vue'
|
||||
// import ItemDialog from '@/views/classTask/container/item-dialog.vue'
|
||||
|
@ -119,7 +119,7 @@ const getData = async () => {
|
|||
classWorkList.value = []
|
||||
loading.value = true
|
||||
// 1、班级列表
|
||||
getClassList()
|
||||
//getClassList()
|
||||
// 2、班级作业
|
||||
await getClassWorkList()
|
||||
// 3、班级学生作业 包含多个班级
|
||||
|
@ -140,10 +140,11 @@ const getClassList = () => {
|
|||
* 2、获取班级作业
|
||||
*/
|
||||
const getClassWorkList = async () => {
|
||||
if(classTaskStore.classListIds.length>0){
|
||||
//if(classTaskStore.classListIds.length>0){
|
||||
{
|
||||
// 班级作业数据,包含多个班级 homeworklist
|
||||
const response = await listByDeadDate({
|
||||
classidarray: classTaskStore.classListIds.join(','),
|
||||
//classidarray: classTaskStore.classListIds.join(','),
|
||||
edituserid: userStore.userId, // 老师的id
|
||||
edustage: userStore.edustage, // 学段
|
||||
edusubject: userStore.edusubject,//学科
|
||||
|
@ -218,7 +219,7 @@ const getClassWorkList = async () => {
|
|||
const getStudentClassWorkData = async() => {
|
||||
// const { chapterId } = await useGetHomework(props.bookobj.node)
|
||||
// this.entpcourseid = chapterId
|
||||
if(classTaskStore.classListIds.length>0){
|
||||
//if(classTaskStore.classListIds.length>0){
|
||||
// listClassworkdataByDeadDate({
|
||||
// edituserid: userStore.userId, // 老师的id
|
||||
// classids: classTaskStore.classListIds.join(','),
|
||||
|
@ -228,7 +229,21 @@ const getStudentClassWorkData = async() => {
|
|||
// orderby: "deaddate DESC",// TODO: 这里是否加 deaddate 的排序,后续看
|
||||
// pageSize: 1000,
|
||||
// })
|
||||
|
||||
// listClassworkdataNew({
|
||||
// classworkids: ids, // 作业id
|
||||
// edituserid: userStore.userId, // 老师的id
|
||||
// edusubject: userStore.edusubject,//学科
|
||||
// evalStatus: 1,
|
||||
// pageSize: 1000,
|
||||
// })
|
||||
|
||||
|
||||
{
|
||||
const ids = classWorkList.value.map((item) => item.id).join(',');
|
||||
if (ids == '') {
|
||||
return;
|
||||
}
|
||||
listClassworkdata({
|
||||
classworkids: ids,
|
||||
pageSize: 1000,
|
||||
|
|
|
@ -349,7 +349,7 @@ const getClassWorkStudentList = (rowId) => {
|
|||
// 常规作业(去除【】前后引号).replace(/"(\[.*\])"/g, '$1'); :eg: "feedcontent\":\"[{\"name\":\"Bliss.jpg\",\"url\":\"https://wzyzoss.3b8daa474.jpg\"}]\",
|
||||
// json转换会报错; .replace(/""/g, '"') eg: ""宇宙环境安全""
|
||||
response.rows[i].classworkevallist = escapeHtmlQuotes(response.rows[i].classworkevallist)
|
||||
console.log('学生完成情况分析classworkevallist', response.rows[i].classworkevallist)
|
||||
//console.log('学生完成情况分析classworkevallist', response.rows[i].classworkevallist)
|
||||
const evalarray = JSON.parse('[' + response.rows[i].classworkevallist + ']')
|
||||
var scoingCount = 0
|
||||
var feedcount = 0
|
||||
|
@ -362,7 +362,7 @@ const getClassWorkStudentList = (rowId) => {
|
|||
}
|
||||
}
|
||||
}
|
||||
console.log(evalarray, 'evalarray------------------------------------')
|
||||
//console.log(evalarray, 'evalarray------------------------------------')
|
||||
if (feedcount > 0) {
|
||||
// 多个题目的总得分率: 正确题数/(题目数*100)
|
||||
response.rows[i].scoingRate = ((scoingCount / feedcount) * 100).toFixed(0) + '%'
|
||||
|
|
|
@ -345,6 +345,7 @@ watchEffect(() => { initData() })
|
|||
}
|
||||
.t-left{width: 160px;text-align: left;}
|
||||
.c-respond{
|
||||
text-align: left;
|
||||
.el-tag{margin: 0 5px;}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -341,7 +341,7 @@ const getClassWorkStudentList = (rowId) => {
|
|||
// 常规作业(去除【】前后引号).replace(/"(\[.*\])"/g, '$1'); :eg: "feedcontent\":\"[{\"name\":\"Bliss.jpg\",\"url\":\"https://wzyzoss.3b8daa474.jpg\"}]\",
|
||||
// json转换会报错; .replace(/""/g, '"') eg: ""宇宙环境安全""
|
||||
response.rows[i].classworkevallist = escapeHtmlQuotes(response.rows[i].classworkevallist)
|
||||
console.log('学生完成情况分析classworkevallist', response.rows[i].classworkevallist)
|
||||
//console.log('学生完成情况分析classworkevallist', response.rows[i].classworkevallist)
|
||||
const evalarray = JSON.parse('[' + response.rows[i].classworkevallist + ']')
|
||||
var scoingCount = 0
|
||||
var feedcount = 0
|
||||
|
@ -354,7 +354,7 @@ const getClassWorkStudentList = (rowId) => {
|
|||
}
|
||||
}
|
||||
}
|
||||
console.log(evalarray, 'evalarray------------------------------------')
|
||||
//console.log(evalarray, 'evalarray------------------------------------')
|
||||
if (feedcount > 0) {
|
||||
// 多个题目的总得分率: 正确题数/(题目数*100)
|
||||
response.rows[i].scoingRate = ((scoingCount / feedcount) * 100).toFixed(0) + '%'
|
||||
|
@ -531,6 +531,7 @@ const workHandle = (type) => {
|
|||
classWorkAnalysis.view = type
|
||||
const isClose = type != 'quizStats' && !! classWorkActiveData.timerId
|
||||
const isOpen = type == 'quizStats' && !classWorkActiveData.timerId
|
||||
// 每次进来都重新调用一次
|
||||
if(type == 'quizStats') {
|
||||
getWorkFeedList();
|
||||
}
|
||||
|
|
|
@ -85,12 +85,14 @@ import vueQr from 'vue-qr/src/packages/vue-qr.vue' // 插件: 二维码
|
|||
import imChat from '@/views/tool/components/imChat.vue' // im-chat-子组件
|
||||
import MsgEnum from '@/plugins/imChat/msgEnum' // 消息头-相关定义(nuem)
|
||||
import * as commUtil from '@/utils/comm' // 工具类-通用
|
||||
import { toLinkWeb, getStaticUrl } from '@/utils/tool'
|
||||
import { toLinkWeb, getStaticUrl } from '@/utils/tool' // 工具类-主进程相关
|
||||
|
||||
import * as Http_ClassManage from '@/api/classManage' // api接口
|
||||
import * as Http_Classcourse from '@/api/teaching/classcourse' // api接口
|
||||
import * as Http_Entpcoursefile from '@/api/education/entpcoursefile' // api接口
|
||||
import * as Http_Entpcoursefile from '@/api/education/entpcoursefile' // api接口
|
||||
import * as Http_api from '@/api/apiService' // api接口
|
||||
import useUserStore from "@/store/modules/user" // 状态管理:user
|
||||
import CryptoJS from 'crypto-js'
|
||||
|
||||
const baseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
|
||||
const userStore = useUserStore()
|
||||
|
@ -189,9 +191,9 @@ const getClassList = async () => {
|
|||
})
|
||||
if (res.code == 200) {
|
||||
listData.classList = (res.rows || []).map(o => {
|
||||
if(!!o.classstudentlist) { // 学生列表转为数组
|
||||
o.classstudentlist = JSON.parse('[' + o.classstudentlist + ']')
|
||||
}
|
||||
// if(!!o.classstudentlist) { // 学生列表转为数组
|
||||
// o.classstudentlist = JSON.parse('[' + o.classstudentlist + ']')
|
||||
// }
|
||||
return o
|
||||
});
|
||||
// 默认选中第一项
|
||||
|
@ -277,11 +279,34 @@ const classTeachingStart = async () => {
|
|||
}
|
||||
}
|
||||
// 获取二维码地址
|
||||
const getQrUrl = () => {
|
||||
const getQrUrl = async() => {
|
||||
const { classcourseid:id } = teacherForm.form
|
||||
const { userName } = userStore.user
|
||||
const { userName, userId } = userStore.user
|
||||
if (!id||!userName) return
|
||||
const qrCodeUrl = `wxlogin?username=${userName}&nextaction=classteaching&id=${id}`
|
||||
// 原始方法(需要wx登录)
|
||||
// const qrCodeUrl = `wxlogin?username=${userName}&nextaction=classteaching&id=${id}`
|
||||
// teacherForm.form.qrUrl = baseUrl + qrCodeUrl
|
||||
// const baseUrl = 'https://localhost:7860'
|
||||
// token跳转
|
||||
const url = `/teaching/classteachingonmobile?classcourseid=${id}` // 跳转移动端-上课
|
||||
let qrCodeUrl = '' // 移动端-二维码地址
|
||||
try {
|
||||
// 走后端缓存url
|
||||
const res = await Http_api.toLink.setLink(url) // 设置链接-缓存
|
||||
if (res.code == 200) {
|
||||
const redisKey = res.data
|
||||
const base64Key = CryptoJS.enc.Utf8.parse(redisKey).toString(CryptoJS.enc.Base64) // base64加密
|
||||
const enStrUrl = encodeURIComponent(base64Key) // url转码
|
||||
qrCodeUrl = `?_server=${enStrUrl}`
|
||||
teacherForm.form.qrUrl = baseUrl + qrCodeUrl
|
||||
}
|
||||
} catch (error) { // 异常, 直接加密token
|
||||
const jsonStr = JSON.stringify({ url, token: userStore.token }) // json数据:{url, token}
|
||||
const key = `Ax19i14Ga6qEDOkGTo` // AES加密-key
|
||||
const enStr = CryptoJS.AES.encrypt(jsonStr, key).toString() // AES加密-数据
|
||||
const enStrUrl = encodeURIComponent(enStr) // url转码
|
||||
qrCodeUrl = `?_web=${enStrUrl}`
|
||||
}
|
||||
teacherForm.form.qrUrl = baseUrl + qrCodeUrl
|
||||
}
|
||||
|
||||
|
|
|
@ -711,7 +711,10 @@ export default {
|
|||
.page-center-wrap{
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
padding: 0 10px;
|
||||
padding: 0 5px;
|
||||
margin: 0 5px;
|
||||
border-radius: 10px;
|
||||
background-color: white;
|
||||
.prepare-center-jxkj{
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
|
Loading…
Reference in New Issue