Compare commits

..

No commits in common. "3992cc814a26e246d759c5e52fc642a540b30fa3" and "eab46ec7f48cb04ca6e0c9b8fd462c5d39dfd597" have entirely different histories.

4 changed files with 35 additions and 48 deletions

View File

@ -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: '取消',

View File

@ -377,7 +377,6 @@ const closeDialog = () => {
getStudentClassWorkDataPolling() getStudentClassWorkDataPolling()
} }
const openDialogTime = ref(null);//
/** /**
* 开启新批改弹窗 * 开启新批改弹窗
* @param item 作业对象 * @param item 作业对象
@ -387,15 +386,12 @@ const onClickItem = (item) => {
clearInterval(pollingST.value) clearInterval(pollingST.value)
// itemDialogRef.value.openDialog(item) // itemDialogRef.value.openDialog(item)
if(openDialogTime.value) return; //
clearTimeout(openDialogTime.value) // 1item2 3item
openDialogTime.value = setTimeout(() => { // localStorage.setItem('teachClassWorkItem', JSON.stringify(item))
openDialogTime.value = null; sessionStore.set('teachClassWorkItem', item)
toolState.isTaskWin=true; // toolState.isTaskWin=true //
sessionStore.set('teachClassWorkItem', item); // item createWindow('open-taskwin',{url:'/teachClassTask'})
//
createWindow('open-taskwin',{url:'/teachClassTask'})
}, 1000)
} }

View File

@ -67,20 +67,14 @@ const getHomework = async () => {
loading.value = false loading.value = false
} }
} }
const openDialogTime = ref(null);//
// //
const onClickItem = (item) => { const onClickItem = (item) => {
console.log('开启弹窗') console.log('开启弹窗')
if(openDialogTime.value) return; // itemDialogRef.value.openDialog(item)
clearTimeout(openDialogTime.value) //
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)
} }
const tagType = (time) => { const tagType = (time) => {

View File

@ -52,7 +52,6 @@
<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>
<!-- 手机登录 --> <!-- 手机登录 -->
@ -81,7 +80,6 @@
<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-
@ -286,32 +284,31 @@ 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}