Compare commits
11 Commits
eab46ec7f4
...
3992cc814a
Author | SHA1 | Date |
---|---|---|
lyc | 3992cc814a | |
lyc | 19e385ec24 | |
baigl | bac959c0bb | |
白了个白 | e72710f027 | |
白了个白 | 9a74630e56 | |
zhengdegang | 28b189e965 | |
zdg | 8ea28d2635 | |
zdg | 352bb9be97 | |
zhengdegang | 7c8e10628b | |
zdg | 0ea299c317 | |
zouyf | 5fa328fd93 |
|
@ -153,7 +153,7 @@ function handleCommand(command) {
|
||||||
|
|
||||||
function logout() {
|
function logout() {
|
||||||
const hasClass = sessionStore.has('activeClass.id')
|
const hasClass = sessionStore.has('activeClass.id')
|
||||||
if (hasClass || toolState.isToolWin) return ElMessage.warning('当前正在上课,请先结结束上课')
|
if (hasClass || toolState.isToolWin) return ElMessage.warning('当前正在上课,请先结束上课')
|
||||||
ElMessageBox.confirm('确认退出系统吗?', '提示', {
|
ElMessageBox.confirm('确认退出系统吗?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
|
|
|
@ -377,6 +377,7 @@ const closeDialog = () => {
|
||||||
getStudentClassWorkDataPolling()
|
getStudentClassWorkDataPolling()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const openDialogTime = ref(null);//弹窗
|
||||||
/**
|
/**
|
||||||
* 开启新批改弹窗
|
* 开启新批改弹窗
|
||||||
* @param item 作业对象
|
* @param item 作业对象
|
||||||
|
@ -386,12 +387,15 @@ const onClickItem = (item) => {
|
||||||
clearInterval(pollingST.value)
|
clearInterval(pollingST.value)
|
||||||
// itemDialogRef.value.openDialog(item)
|
// itemDialogRef.value.openDialog(item)
|
||||||
|
|
||||||
// 新跳转子窗口链接
|
if(openDialogTime.value) return;
|
||||||
// 1、本地缓存item数据,2、打开子窗口 3、子窗口加载item数据
|
clearTimeout(openDialogTime.value)
|
||||||
// localStorage.setItem('teachClassWorkItem', JSON.stringify(item))
|
openDialogTime.value = setTimeout(() => {
|
||||||
sessionStore.set('teachClassWorkItem', item)
|
openDialogTime.value = null;
|
||||||
toolState.isTaskWin=true //设置打开批改窗口
|
toolState.isTaskWin=true; // 设置打开批改窗口
|
||||||
createWindow('open-taskwin',{url:'/teachClassTask'})
|
sessionStore.set('teachClassWorkItem', item); // 缓存点击的item
|
||||||
|
// 调用新窗口批改页面
|
||||||
|
createWindow('open-taskwin',{url:'/teachClassTask'})
|
||||||
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -67,14 +67,20 @@ const getHomework = async () => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const openDialogTime = ref(null);//弹窗
|
||||||
// 批改作业
|
// 批改作业
|
||||||
const onClickItem = (item) => {
|
const onClickItem = (item) => {
|
||||||
console.log('开启弹窗')
|
console.log('开启弹窗')
|
||||||
// itemDialogRef.value.openDialog(item)
|
if(openDialogTime.value) return;
|
||||||
// 调用新窗口批改页面
|
clearTimeout(openDialogTime.value)
|
||||||
sessionStore.set('teachClassWorkItem', item)
|
openDialogTime.value = setTimeout(() => {
|
||||||
toolState.isTaskWin=true //设置打开批改窗口
|
openDialogTime.value = null;
|
||||||
createWindow('open-taskwin',{url:'/teachClassTask'})
|
toolState.isTaskWin=true; // 设置打开批改窗口
|
||||||
|
sessionStore.set('teachClassWorkItem', item); // 缓存点击的item
|
||||||
|
// 调用新窗口批改页面
|
||||||
|
createWindow('open-taskwin',{url:'/teachClassTask'})
|
||||||
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
const tagType = (time) => {
|
const tagType = (time) => {
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
<div :title="value" v-if="!!value">
|
<div :title="value" v-if="!!value">
|
||||||
<vue-qr :text="value" :size="200" :margin="10" colorDark="green" colorLight="white" :logoSrc="getStaticUrl('/img/logo.png')" :logoScale="0.2" :dotScale="0.7"></vue-qr>
|
<vue-qr :text="value" :size="200" :margin="10" colorDark="green" colorLight="white" :logoSrc="getStaticUrl('/img/logo.png')" :logoScale="0.2" :dotScale="0.7"></vue-qr>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <el-button type="primary" :icon="Refresh" round title="刷新" @click="getQrUrl()" /> -->
|
||||||
<!-- <el-button type="warning" :loading="dt.loadingDel" @click="removeClasscourse()">删除记录</el-button>-->
|
<!-- <el-button type="warning" :loading="dt.loadingDel" @click="removeClasscourse()">删除记录</el-button>-->
|
||||||
</template>
|
</template>
|
||||||
<!-- 手机登录 -->
|
<!-- 手机登录 -->
|
||||||
|
@ -80,6 +81,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
// 功能说明:课程开始
|
// 功能说明:课程开始
|
||||||
import { onMounted, reactive, ref, watchEffect, watch, nextTick } from 'vue' // vue
|
import { onMounted, reactive, ref, watchEffect, watch, nextTick } from 'vue' // vue
|
||||||
|
import { Refresh } from '@element-plus/icons-vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus' // ui框架: 消息提示
|
import { ElMessage, ElMessageBox } from 'element-plus' // ui框架: 消息提示
|
||||||
import vueQr from 'vue-qr/src/packages/vue-qr.vue' // 插件: 二维码
|
import vueQr from 'vue-qr/src/packages/vue-qr.vue' // 插件: 二维码
|
||||||
import imChat from '@/views/tool/components/imChat.vue' // im-chat-子组件
|
import imChat from '@/views/tool/components/imChat.vue' // im-chat-子组件
|
||||||
|
@ -284,31 +286,32 @@ const getQrUrl = async() => {
|
||||||
const { userName, userId } = userStore.user
|
const { userName, userId } = userStore.user
|
||||||
if (!id||!userName) return
|
if (!id||!userName) return
|
||||||
// 原始方法(需要wx登录)
|
// 原始方法(需要wx登录)
|
||||||
// const qrCodeUrl = `wxlogin?username=${userName}&nextaction=classteaching&id=${id}`
|
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
|
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
|
||||||
}
|
}
|
||||||
|
// 定时器监听
|
||||||
|
|
||||||
// ================== 监听 =======================
|
// ================== 监听 =======================
|
||||||
// im-chat: 聊天事件 {type, data}
|
// im-chat: 聊天事件 {type, data}
|
||||||
|
|
Loading…
Reference in New Issue