Compare commits
No commits in common. "f209bc673fad5fed8dd59b658df17150a434a60f" and "76f053d8c854fc405c938bf7b1d4afad7bf205d5" have entirely different histories.
f209bc673f
...
76f053d8c8
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "aix-win",
|
||||
"version": "2.1.5",
|
||||
"version": "2.1.3",
|
||||
"description": "",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "example.com",
|
||||
|
@ -66,7 +66,7 @@
|
|||
"xlsx": "^0.18.5",
|
||||
"less": "^4.2.0",
|
||||
"less-loader": "^7.3.0",
|
||||
"whiteboard_lyc": "^0.1.3"
|
||||
"whiteboard_lyc": "^0.0.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-toolkit/eslint-config": "^1.0.2",
|
||||
|
|
|
@ -74,7 +74,7 @@ function createLoginWindow() {
|
|||
updateInit(loginWindow)
|
||||
}
|
||||
|
||||
loginWindow.webContents.openDevTools()
|
||||
// loginWindow.webContents.openDevTools()
|
||||
loginWindow.once('ready-to-show', () => {
|
||||
loginWindow.show()
|
||||
})
|
||||
|
@ -128,7 +128,7 @@ function createMainWindow() {
|
|||
shell.openExternal(details.url)
|
||||
return { action: 'deny' }
|
||||
})
|
||||
mainWindow.webContents.openDevTools()
|
||||
// mainWindow.webContents.openDevTools()
|
||||
|
||||
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
|
||||
mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL'])
|
||||
|
|
|
@ -13,7 +13,6 @@ const defaultData = {
|
|||
showBoardAll: false, // 全屏画板-是否显示
|
||||
isPdfWin: false, // pdf窗口是否打开
|
||||
isToolWin: false, // 工具窗口是否打开
|
||||
isTaskWin: false, // 批改窗口是否打开
|
||||
curSubjectNode: {
|
||||
querySearch: {} // 查询资源所需参数
|
||||
},
|
||||
|
|
|
@ -26,13 +26,3 @@ 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')
|
||||
}
|
||||
|
|
|
@ -147,11 +147,10 @@ export function updateSmartClassReserv(data) {
|
|||
})
|
||||
}
|
||||
//查询课程预约
|
||||
export function getSelfReserv(params) {
|
||||
export function getSelfReserv() {
|
||||
return request({
|
||||
url: '/smarttalk/classReserv/getSelfReserv',
|
||||
method: 'get',
|
||||
params
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function deleteSmartReserv(id) {
|
||||
|
|
|
@ -27,15 +27,6 @@ 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({
|
||||
|
|
|
@ -9,14 +9,6 @@ export function listClasscourse(query) {
|
|||
})
|
||||
}
|
||||
|
||||
export function listClasscourseNew(query) {
|
||||
return request({
|
||||
url: '/education/classcourse/new/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询classcourse详细
|
||||
export function getClasscourse(id) {
|
||||
return request({
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 2794390 */
|
||||
src: url('iconfont.woff2?t=1728543886557') format('woff2'),
|
||||
url('iconfont.woff?t=1728543886557') format('woff'),
|
||||
url('iconfont.ttf?t=1728543886557') format('truetype'),
|
||||
url('iconfont.svg?t=1728543886557#iconfont') format('svg');
|
||||
src: url('iconfont.woff2?t=1727403518918') format('woff2'),
|
||||
url('iconfont.woff?t=1727403518918') format('woff'),
|
||||
url('iconfont.ttf?t=1727403518918') format('truetype'),
|
||||
url('iconfont.svg?t=1727403518918#iconfont') format('svg');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
|
@ -14,18 +14,6 @@
|
|||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-A1:before {
|
||||
content: "\e635";
|
||||
}
|
||||
|
||||
.icon-A:before {
|
||||
content: "\e6ef";
|
||||
}
|
||||
|
||||
.icon--kejian:before {
|
||||
content: "\e6a3";
|
||||
}
|
||||
|
||||
.icon-a-1_jiaoxuefansi:before {
|
||||
content: "\e6cd";
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,27 +5,6 @@
|
|||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "11657531",
|
||||
"name": "A",
|
||||
"font_class": "A1",
|
||||
"unicode": "e635",
|
||||
"unicode_decimal": 58933
|
||||
},
|
||||
{
|
||||
"icon_id": "12688893",
|
||||
"name": "A",
|
||||
"font_class": "A",
|
||||
"unicode": "e6ef",
|
||||
"unicode_decimal": 59119
|
||||
},
|
||||
{
|
||||
"icon_id": "6571029",
|
||||
"name": "课件",
|
||||
"font_class": "-kejian",
|
||||
"unicode": "e6a3",
|
||||
"unicode_decimal": 59043
|
||||
},
|
||||
{
|
||||
"icon_id": "37027693",
|
||||
"name": "教学反思",
|
||||
|
|
|
@ -14,12 +14,6 @@
|
|||
/>
|
||||
<missing-glyph />
|
||||
|
||||
<glyph glyph-name="A1" unicode="" d="M449 339h121.5L507.5 505.5zM782 834H242C143 834 62 753 62 654v-540c0-99 81-180 180-180h540c99 0 180 81 180 180V654c0 99-81 180-180 180z m-139.5-675l-40.5 103.5H422L381.5 159H287L462.5 609H557l180-450h-94.5z" horiz-adv-x="1024" />
|
||||
|
||||
<glyph glyph-name="A" unicode="" d="M841.589844 779.507813a65.917969 65.917969 0 0 0 65.917969-65.917969v-659.179688a65.917969 65.917969 0 0 0-65.917969-65.917969H182.410156a65.917969 65.917969 0 0 0-65.917969 65.917969V713.589844a65.917969 65.917969 0 0 0 65.917969 65.917969h659.179688z m0-49.438477H182.410156a16.479492 16.479492 0 0 1-16.21582-13.513183L165.930664 713.589844v-659.179688a16.479492 16.479492 0 0 1 13.513183-16.21582L182.410156 37.930664h659.179688a16.479492 16.479492 0 0 1 16.21582 13.513183L858.069336 54.410156V713.589844a16.479492 16.479492 0 0 1-13.513183 16.21582L841.589844 730.069336zM539.059326 614.712891l188.85498-461.425782h-69.543456l-53.822022 139.746094H411.606933L360.916016 153.287109H296.118652l177.1875 461.425782h65.786133z m-34.277344-48.449707c-5.899658-29.597168-14.172364-58.996582-24.884033-88.165284L429.207031 342.80127h156.456299l-48.153076 127.781982-4.779053 12.689209a1170.900879 1170.900879 0 0 0-27.982178 82.990723z" horiz-adv-x="1024" />
|
||||
|
||||
<glyph glyph-name="-kejian" unicode="" d="M873.813333 638.293333c27.306667 0 47.786667-30.72 47.786667-64.853333v-436.906667c0-42.666667-27.306667-75.093333-64.853333-75.093333H573.44c-23.893333 0-44.373333-22.186667-44.373333-46.08h-29.013334c0 23.893333-18.773333 46.08-44.373333 46.08H175.786667C136.533333 63.146667 102.4 93.866667 102.4 136.533333V573.44c0 34.133333 27.306667 64.853333 54.613333 64.853333h716.8zM457.386667 97.28c23.893333 0 44.373333-10.24 58.026666-27.306667 13.653333 17.066667 34.133333 27.306667 58.026667 27.306667h281.6c17.066667 0 30.72 15.36 30.72 40.96V573.44c0 10.24-3.413333 18.773333-6.826667 25.6-3.413333 3.413333-5.12 5.12-6.826666 5.12h-716.8c-6.826667 0-18.773333-15.36-18.773334-30.72v-436.906667c0-22.186667 18.773333-40.96 39.253334-40.96h281.6zM837.973333 660.48c0 34.133333-22.186667 64.853333-54.613333 64.853333H609.28c-40.96 0-75.093333-23.893333-93.866667-58.026666-18.773333 34.133333-54.613333 58.026667-93.866666 58.026666H247.466667c-32.426667 0-61.44-30.72-61.44-64.853333l6.826666-494.933333c0-29.013333 23.893333-51.2 52.906667-51.2h213.333333c23.893333 0 44.373333-22.186667 44.373334-46.08h29.013333c0 23.893333 18.773333 46.08 44.373333 46.08h211.626667c29.013333 0 52.906667 23.893333 52.906667 52.906666V660.48zM293.546667 513.706667c-8.533333 0-17.066667 8.533333-17.066667 20.48s6.826667 20.48 17.066667 20.48h158.72c8.533333 0 17.066667-8.533333 17.066666-20.48s-6.826667-20.48-17.066666-20.48h-158.72zM293.546667 426.666667c-8.533333 0-17.066667 8.533333-17.066667 20.48s6.826667 20.48 17.066667 20.48h158.72c8.533333 0 17.066667-8.533333 17.066666-20.48s-6.826667-20.48-17.066666-20.48h-158.72zM293.546667 339.626667c-8.533333 0-17.066667 8.533333-17.066667 20.48s6.826667 20.48 17.066667 20.48h158.72c8.533333 0 17.066667-8.533333 17.066666-20.48s-6.826667-20.48-17.066666-20.48h-158.72zM583.68 513.706667c-8.533333 0-17.066667 8.533333-17.066667 20.48s6.826667 20.48 17.066667 20.48h158.72c8.533333 0 17.066667-8.533333 17.066667-20.48s-6.826667-20.48-17.066667-20.48h-158.72zM583.68 426.666667c-8.533333 0-17.066667 8.533333-17.066667 20.48s6.826667 20.48 17.066667 20.48h158.72c8.533333 0 17.066667-8.533333 17.066667-20.48s-6.826667-20.48-17.066667-20.48h-158.72zM583.68 339.626667c-8.533333 0-17.066667 8.533333-17.066667 20.48s6.826667 20.48 17.066667 20.48h158.72c8.533333 0 17.066667-8.533333 17.066667-20.48s-6.826667-20.48-17.066667-20.48h-158.72z" horiz-adv-x="1024" />
|
||||
|
||||
<glyph glyph-name="a-1_jiaoxuefansi" unicode="" d="M410.8288 6.4512h195.9936v-63.2832H410.8288zM833.2288 645.4272A348.16 348.16 0 0 1 593.92 832.8192 347.4432 347.4432 0 0 1 509.952 844.8h0.512a311.0912 311.0912 0 0 1-78.4384-10.24 365.8752 365.8752 0 0 1-182.1696-96.6656 345.088 345.088 0 0 1-80.6912-370.4832 366.4896 366.4896 0 0 1 115.3024-155.7504 163.84 163.84 0 0 0 43.8272-54.272A180.224 180.224 0 0 0 342.1184 87.04v-13.5168h327.68v18.432a142.5408 142.5408 0 0 0 18.432 70.0416 163.84 163.84 0 0 0 48.3328 56.6272 357.2736 357.2736 0 0 1 96.8704 121.856 338.6368 338.6368 0 0 1 34.6112 151.3472 348.16 348.16 0 0 1-34.816 153.6z m-25.7024-153.6A278.6304 278.6304 0 0 0 699.392 268.1856a239.8208 239.8208 0 0 1-62.2592-74.4448 233.0624 233.0624 0 0 1-20.48-56.6272h-209.92a224.1536 224.1536 0 0 1-78.4384 126.464 274.7392 274.7392 0 0 0-94.6176 128.7168 303.3088 303.3088 0 0 0-13.824 158.1056 270.5408 270.5408 0 0 0 78.4384 146.7392 305.152 305.152 0 0 0 147.5584 81.3056c20.48 0 43.8272 2.2528 64.6144 2.2528h-0.512a333.9264 333.9264 0 0 0 66.9696-6.7584 283.3408 283.3408 0 0 0 117.6576-56.6272 294.8096 294.8096 0 0 0 82.944-101.6832A305.5616 305.5616 0 0 0 807.5264 496.64zM385.024 578.56a27.8528 27.8528 0 0 1 0-55.7056 27.8528 27.8528 0 1 1 0 55.7056zM385.024 469.6064a27.8528 27.8528 0 0 1 0-55.7056 27.8528 27.8528 0 1 1 0 55.7056zM456.704 467.456h206.6432v-55.6032H456.704zM456.704 578.6624h206.6432v-55.5008H456.704z" horiz-adv-x="1024" />
|
||||
|
||||
<glyph glyph-name="iconfontzhizuobiaozhunbduan3-1" unicode="𐂯" d="M381.8288 877.098511c42.635029 11.310603 86.403882 17.002232 130.205481 17.002232 68.479651 0 135.072325-13.469779 197.999516-40.101323l-8.362458-369.71439L381.8288 877.098511 381.8288 877.098511zM71.201134 640.609379c22.278399 38.284955 49.218982 73.313749 80.134085 104.090707 48.393173 48.396243 104.980983 85.958744 168.285774 111.666242l255.614725-267.305999L71.201134 640.609379 71.201134 640.609379zM18.900977 253.724934c-11.276834 42.463114-17.000186 86.234013-17.000186 130.276089 0 68.548212 13.502525 135.140886 40.099277 197.933001l369.749182-8.293897L18.900977 253.724934 18.900977 253.724934zM255.39011-56.798355c-38.010709 22.1423-72.968895 49.079812-104.021122 80.134085-48.428989 48.325635-85.993536 104.911398-111.664196 168.283728l267.302929 255.513418L255.39011-56.798355 255.39011-56.798355zM512.034281-126.100744c-68.481697 0-135.072325 13.470803-197.999516 40.031738l8.362458 369.71439 319.843562-392.81348C599.535147-120.411161 555.80211-126.100744 512.034281-126.100744L512.034281-126.100744zM448.830797 178.903855l504.036631-51.54905c-22.107507-37.940101-48.976458-72.900334-80.167854-104.019075-48.327682-48.464805-104.980983-86.029352-168.283728-111.734804L448.830797 178.903855 448.830797 178.903855zM612.320335 194.292334l392.81348 319.915193c11.276834-42.499953 16.966417-86.302575 16.966417-130.206504 0-68.753897-13.502525-135.282103-40.066531-198.002586L612.320335 194.292334 612.320335 194.292334zM768.60989 824.764586c37.975916-22.038946 73.004711-48.942689 104.089683-80.0645 48.464805-48.326659 86.027305-104.980983 111.664196-168.284751l-267.302929-255.580956L768.60989 824.764586 768.60989 824.764586z" horiz-adv-x="1024" />
|
||||
|
|
Before Width: | Height: | Size: 362 KiB After Width: | Height: | Size: 358 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 48 KiB |
|
@ -122,8 +122,7 @@ const outerAi = [
|
|||
title: '教学大模型',
|
||||
secondTit: '中小学基础教学大模型',
|
||||
img: new URL('../../../src/assets/images/ai-02.png', import.meta.url).href,
|
||||
path: '/ais/aimoss'
|
||||
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
|
|
|
@ -34,7 +34,7 @@ const getFileTypeIcon = () => {
|
|||
gif: 'icon-gif',
|
||||
txt: 'icon-txt',
|
||||
rar: 'icon-rar',
|
||||
apt: 'icon-A'
|
||||
apt: 'icon-lunwen'
|
||||
}
|
||||
if (iconObj[name]) {
|
||||
return '#' + iconObj[name]
|
||||
|
|
|
@ -276,7 +276,6 @@ const cloneDialog = (formEl) => {
|
|||
expandedKeys.value = []
|
||||
formEl.resetFields()
|
||||
model.value = false
|
||||
emit('on-close')
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
|
|
@ -60,12 +60,10 @@
|
|||
<el-button>{{ type == 'design' ? '形状' : '工具' }}</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="square">正方形</el-dropdown-item>
|
||||
<el-dropdown-item command="rectangle">矩形</el-dropdown-item>
|
||||
<el-dropdown-item command="diamond">菱形</el-dropdown-item>
|
||||
<el-dropdown-item command="triangle">三角形</el-dropdown-item>
|
||||
<el-dropdown-item command="circle">圆形</el-dropdown-item>
|
||||
<el-dropdown-item command="elliptic">椭圆形</el-dropdown-item>
|
||||
<el-dropdown-item command="line">线段</el-dropdown-item>
|
||||
<el-dropdown-item command="arrow">箭头</el-dropdown-item>
|
||||
<template v-if="type != 'design'">
|
||||
|
@ -399,7 +397,7 @@ const scroll = reactive({
|
|||
// 切换显示网格
|
||||
const showGrid = ref(false)
|
||||
// 模式切换
|
||||
const readonly = ref(false)
|
||||
// const readonly = ref(false)
|
||||
|
||||
// 设置单个元素是否只读
|
||||
const elReadonly = ref(false)
|
||||
|
@ -677,8 +675,8 @@ const getCanvasBase64 = async () =>{
|
|||
let base64 = await app.exportImage({
|
||||
type: 'image/jpeg',
|
||||
renderBg: exportRenderBackground.value,
|
||||
paddingX: 10,
|
||||
paddingY: 10,
|
||||
paddingX: 0,
|
||||
paddingY: 0,
|
||||
onlySelected: exportOnlySelected.value,
|
||||
backgroundColor: '#ffffff'
|
||||
})
|
||||
|
|
|
@ -80,7 +80,9 @@ import { updateUserInfo } from '@/api/system/user'
|
|||
import logoIco from '@/assets/images/logo.png'
|
||||
import { listEvaluation } from '@/api/classManage/index'
|
||||
import { sessionStore } from '@/utils/store'
|
||||
import { useToolState } from '@/store/modules/tool'
|
||||
|
||||
const toolState = useToolState();
|
||||
let homeTitle = ref(import.meta.env.VITE_APP_TITLE)
|
||||
const { ipcRenderer } = window.electron || {}
|
||||
const userStore = useUserStore()
|
||||
|
@ -151,8 +153,7 @@ function handleCommand(command) {
|
|||
|
||||
function logout() {
|
||||
const hasClass = sessionStore.has('activeClass.id')
|
||||
const hasTool = sessionStore.get('isToolWin')
|
||||
if (hasClass || hasTool) return ElMessage.warning('当前正在上课,请先结束上课')
|
||||
if (hasClass || toolState.isToolWin) return ElMessage.warning('当前正在上课,请先结结束上课')
|
||||
ElMessageBox.confirm('确认退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
|
|
@ -4,7 +4,14 @@
|
|||
<Header />
|
||||
</el-header>
|
||||
<el-main>
|
||||
<AppMain />
|
||||
<template v-if="currentRoute.path != '/home'">
|
||||
<el-page-header @back="goBack">
|
||||
<template #content>
|
||||
<span class="text-large mr-3"> {{ currentRoute.meta.title }} </span>
|
||||
</template>
|
||||
</el-page-header>
|
||||
</template>
|
||||
<AppMain :style="{ height: currentRoute.path == '/home' ? '100%' : 'calc(100% - 45px)'}" />
|
||||
</el-main>
|
||||
<Uploader v-if="uploaderStore.uploadList && uploaderStore.uploadList.length > 0" />
|
||||
<AiChart/>
|
||||
|
@ -12,16 +19,32 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import Header from './components/Header.vue'
|
||||
import AppMain from './components/AppMain.vue'
|
||||
import Uploader from './components/Uploader.vue'
|
||||
import AiChart from '@/components/ai-chart/index.vue'
|
||||
import uploaderState from '@/store/modules/uploader'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const router = useRouter()
|
||||
const currentRoute = ref('')
|
||||
|
||||
watch(
|
||||
() => router.currentRoute.value,
|
||||
(newValue) => {
|
||||
currentRoute.value = newValue
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
let uploaderStore = ref(uploaderState())
|
||||
|
||||
const goBack = () =>{
|
||||
router.back()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -10,8 +10,6 @@ import _ from 'lodash'
|
|||
// import { diff } from 'jsondiffpatch'
|
||||
// const Remote = isNode?require('@electron/remote'):{} // 远程模块
|
||||
|
||||
const exArrs = ['subject'] // 不需要同步key-排除
|
||||
|
||||
export function shareStorePlugin({store}) {
|
||||
store.$subscribe((mutation, state) => { // 自动同步
|
||||
// mutation 变量包含了变化前后的状态
|
||||
|
@ -56,45 +54,43 @@ function stateSync(storeName, key, value, state) {
|
|||
// 同步数据-发送给主线程-单独($subscribe-监听使用)
|
||||
function stateSyncWatch(storeName, newState) {
|
||||
const oldState = sessionStore.store // 旧数据
|
||||
exArrs.forEach(k => Object.keys(oldState).includes(k) && (delete oldState[k]))
|
||||
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状态管理需要的数据格式
|
||||
// 数据转换处理
|
||||
for(const key in diffData) {
|
||||
const value = diffData[key]
|
||||
const value = diffData[key] || null
|
||||
const newValue = {} // 重新组装pinia需要的数据 {a:{b:1}} 这种
|
||||
const keyArr = key.split('.') || []
|
||||
keyArr.reduce((o,c,i)=>{o[c] = i === keyArr.length-1 ? value : {};return o[c]}, newValue)
|
||||
// 合并数据 loadsh _.merge() 函数
|
||||
_.merge(pinaValue, newValue)
|
||||
}
|
||||
const piniaArr = _.toPairs(pinaValue) // 对象转换为数组 {a:1} toPairs [['a',1]]
|
||||
const setData = (key, value) => {
|
||||
// 无数据就终止执行
|
||||
if (!key) return
|
||||
// 更新本地数据-session
|
||||
// 直接获取当前最新值(整体更新),上面获取到value是差异值,并不能知道删除还是新增
|
||||
const newValAll = _.get(newState, key)
|
||||
const oldValAll = sessionStore.get(key)
|
||||
// 没变化也终止执行
|
||||
if (_.isEqual(oldValAll, newValAll)) return
|
||||
// 更新本地数据-session
|
||||
sessionStore.set(key, newValAll)
|
||||
|
||||
// 数据处理: pina-store
|
||||
const jsonStr = JSON.stringify(pinaValue) // 从新组装-json数据
|
||||
// 通知主线程更新
|
||||
ipcRenderer?.invoke('pinia-state-change', storeName, jsonStr)
|
||||
// console.log('======',key, value, jsonStr )
|
||||
}
|
||||
|
||||
// 数据处理: electron-store
|
||||
for(let [key, value] of piniaArr) {
|
||||
setData(key, value)
|
||||
}
|
||||
const [key, value] = _.toPairs(pinaValue)[0] // 对象转换为数组 {a:1} toPairs [['a',1]]
|
||||
// 无数据就终止执行
|
||||
if (!key || !value) return
|
||||
|
||||
// 更新本地数据-session
|
||||
// 直接获取当前最新值(整体更新),上面获取到value是差异值,并不能知道删除还是新增
|
||||
const newValAll = _.get(newState, key)
|
||||
const oldValAll = sessionStore.get(key)
|
||||
|
||||
// 没变化也终止执行
|
||||
if (_.isEqual(oldValAll, newValAll)) return
|
||||
|
||||
// 更新本地数据-session
|
||||
sessionStore.set(key, newValAll)
|
||||
|
||||
// 数据处理: pina-store
|
||||
const jsonStr = JSON.stringify(pinaValue) // 从新组装-json数据
|
||||
// 通知主线程更新
|
||||
ipcRenderer?.invoke('pinia-state-change', storeName, jsonStr)
|
||||
// console.log('======',key, value, jsonStr )
|
||||
} catch (error) {
|
||||
console.log('state-change-error', error)
|
||||
}
|
||||
|
@ -120,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)
|
||||
}
|
||||
|
@ -133,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
|
||||
|
|
|
@ -310,44 +310,3 @@ export function timeToStr(time,str = '时分秒', isPad = false) {
|
|||
if (isPad) return `${h?toStr(h)+arr[0]:''}${m?toStr(m)+arr[1]:''}${toStr(s)}${arr[2]||''}`
|
||||
return `${h?h+arr[0]:''}${m?m+arr[1]:''}${s?s+arr[2]||'':''}`
|
||||
}
|
||||
|
||||
/**
|
||||
* 防抖:一定时间内,如果函数被连续调用,则只执行最后一次调用。
|
||||
* debounce(() => {
|
||||
console.log('Input event handled');
|
||||
}, 300);
|
||||
* @param {*} func
|
||||
* @param {*} wait
|
||||
* @returns
|
||||
*/
|
||||
export function debounce(func, wait) {
|
||||
let timeout;
|
||||
return function() {
|
||||
const context = this;
|
||||
const args = arguments;
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(() => func.apply(context, args), wait);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 节流:一定时间内,函数最多只执行一次
|
||||
* throttle(() => {
|
||||
console.log('Scroll event handled');
|
||||
}, 300);
|
||||
* @param {*} func
|
||||
* @param {*} wait
|
||||
* @returns
|
||||
*/
|
||||
export function throttle(func, wait) {
|
||||
let lastTime = 0;
|
||||
return function() {
|
||||
const context = this;
|
||||
const args = arguments;
|
||||
const now = new Date();
|
||||
if (now - lastTime >= wait) {
|
||||
func.apply(context, args);
|
||||
lastTime = now;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -100,17 +100,6 @@ export const getCurrentTime = (format)=> {
|
|||
if(format == 'MMDD'){
|
||||
return `${month}${day}`;
|
||||
}
|
||||
if(format == 'HH'){
|
||||
return `${hours}`;
|
||||
}
|
||||
if(format == 'HH+3'){
|
||||
//往后延时3个小时
|
||||
const hours = (now.getHours()+3).toString().padStart(2, '0');
|
||||
return `${hours}`
|
||||
}
|
||||
if(format == 'mm'){
|
||||
return `${minutes}`;
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -138,7 +138,7 @@ export const createWindow = async (type, data) => {
|
|||
wins_tool.setIgnoreMouseEvents(true, {forward: true}) // 忽略鼠标事件但是事件继续传递给窗口
|
||||
wins_tool.setAlwaysOnTop(true,'screen-saver') // 将窗口设置为顶层窗口
|
||||
wins_tool.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见
|
||||
wins_tool.webContents.openDevTools() // 打开调试工具
|
||||
// wins_tool.webContents.openDevTools() // 打开调试工具
|
||||
eventHandles(type, wins_tool) // 事件监听处理
|
||||
return wins_tool
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ export const createWindow = async (type, data) => {
|
|||
win.type = type // 唯一标识
|
||||
win.show()
|
||||
win.setFullScreen(true) // 设置窗口为全屏
|
||||
win.webContents.openDevTools() // 打开调试工具
|
||||
// win.webContents.openDevTools() // 打开调试工具
|
||||
eventHandles(type, win) // 事件监听处理
|
||||
winPdf=win
|
||||
break
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<template>
|
||||
<el-container class="class-reserv-wrap">
|
||||
<!-- <div class="class-reserv-tabs">
|
||||
<div class="class-reserv-tabs">
|
||||
<el-segmented v-model="tabActive" block :options="tabOptions" size="large" />
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="class-reserv-body">
|
||||
<template v-for="(item, index) in dataList" :key="index">
|
||||
<reserv-item
|
||||
:style="{'background-color': index%2==0?'#f5f5f5':''}"
|
||||
:item="item"
|
||||
v-if="item.bookImg"
|
||||
@open-edit="reservDialog.openDialog(item)"
|
||||
@delete-reserv="deleteReserv(item)"
|
||||
></reserv-item>
|
||||
<reserv-item-apt
|
||||
v-if="!item.bookImg"
|
||||
:style="{'background-color': index%2==0?'#f5f5f5':''}"
|
||||
:item="item"
|
||||
@open-edit="reservDialog.openDialog(item)"
|
||||
@delete-reserv="deleteReserv(item)"
|
||||
></reserv-item-apt>
|
||||
</template>
|
||||
<reserv-item
|
||||
v-for="(item, index) in activeDataList"
|
||||
v-show="tabActive === '进行中'"
|
||||
:key="index"
|
||||
:item="item"
|
||||
@open-edit="reservDialog.openDialog(item)"
|
||||
@delete-reserv="deleteReserv(item)"
|
||||
></reserv-item>
|
||||
<reserv-item
|
||||
v-for="(item, index) in doneDataList"
|
||||
v-show="tabActive === '已结束'"
|
||||
:key="index"
|
||||
:item="item"
|
||||
@open-edit="reservDialog.openDialog(item)"
|
||||
@delete-reserv="deleteReserv(item)"
|
||||
></reserv-item>
|
||||
</div>
|
||||
<reserv ref="reservDialog"></reserv>
|
||||
</el-container>
|
||||
|
@ -28,62 +28,44 @@
|
|||
<script setup>
|
||||
import { ref, onMounted, computed, watch } from 'vue'
|
||||
import { getSelfReserv } from '@/api/classManage'
|
||||
import { listClasscourseNew } from '@/api/teaching/classcourse' // api接口
|
||||
import ReservItem from '@/views/classManage/reserv-item.vue'
|
||||
import Reserv from '@/views/prepare/container/reserv.vue'
|
||||
import { useToolState } from '@/store/modules/tool'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import ReservItemApt from '@/views/classManage/reserv-item-apt.vue'
|
||||
import { sessionStore } from '@/utils/tool'
|
||||
const reservDialog = ref(null)
|
||||
const tabOptions = ref(['进行中', '已结束'])
|
||||
const tabActive = ref('进行中')
|
||||
const dataList = ref([])
|
||||
|
||||
const toolStore = useToolState()
|
||||
const userStore = useUserStore()
|
||||
|
||||
/*const activeDataList = computed(() => {
|
||||
const activeDataList = computed(() => {
|
||||
return dataList.value.filter((item) => {
|
||||
return item.status !== '已结束'
|
||||
})
|
||||
})*/
|
||||
|
||||
const props = defineProps({
|
||||
curNode: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
})
|
||||
const deleteReserv = (item) => {
|
||||
dataList.value = dataList.value.filter((is) => {
|
||||
return is.id !== item.id
|
||||
})
|
||||
}
|
||||
/*const doneDataList = computed(() => {
|
||||
const doneDataList = computed(() => {
|
||||
return dataList.value.filter((item) => {
|
||||
return item.status === '已结束'
|
||||
})
|
||||
})*/
|
||||
})
|
||||
// 获取数据
|
||||
const getData = () => {
|
||||
Promise.all([listClasscourseNew({teacherid: userStore.id,evalid: props.curNode.id,pageSize:1000}), getSelfReserv({ex2:props.curNode.id})]).then(([res1,res2])=>{
|
||||
let list = res2.data || []
|
||||
let list2 = res1.rows || []
|
||||
// list.sort((a,b) => { if(a.status=='上课中') return -1; else return 0 })
|
||||
list = list.concat(list2)
|
||||
list.sort((a,b) => { return new Date(b.createTime) - new Date(a.createTime) })
|
||||
dataList.value = list
|
||||
})
|
||||
/*getSelfReserv().then((res) => {
|
||||
getSelfReserv().then((res) => {
|
||||
const list = res.data || []
|
||||
list.sort((a,b) => { if(a.status=='上课中') return -1; else return 0 })
|
||||
dataList.value = list
|
||||
})*/
|
||||
})
|
||||
}
|
||||
const toolStore = useToolState()
|
||||
|
||||
watch(
|
||||
() => [dataList,toolStore.isToolWin,props.curNode],
|
||||
() => [dataList,toolStore.isToolWin],
|
||||
() => {
|
||||
console.log('====',toolStore)
|
||||
setTimeout(()=>{
|
||||
getData() // 加载数据
|
||||
},300)
|
||||
|
@ -99,14 +81,13 @@ onMounted(() => {
|
|||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
//padding: 15px 10px;
|
||||
padding: 15px 30px;
|
||||
.class-reserv-tabs {
|
||||
width: 30%;
|
||||
text-align: left;
|
||||
}
|
||||
.class-reserv-body {
|
||||
height: 100%;
|
||||
font-size: 12px;
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
padding: 10px 0;
|
||||
|
|
|
@ -1,127 +0,0 @@
|
|||
<template>
|
||||
<div class="class-reserv-item">
|
||||
<div class="class-reserv-item-body">
|
||||
{{ item.openDate }} {{ item.openTime }}
|
||||
</div>
|
||||
<div style="flex: 1;max-width: 400px">
|
||||
<span>{{item.caption}}</span>
|
||||
</div>
|
||||
<div class="class-reserv-item-tool" style="width: 200px;max-width: 300px">
|
||||
<el-tag v-if="item.status === 'close'" style="margin-right: 5px" type="success">已结束</el-tag>
|
||||
<el-tag v-if="item.status === 'open'" style="margin-right: 5px" type="danger">上课中</el-tag>
|
||||
<el-button v-if="item.status === 'open'" :disabled="toolStore.isToolWin" size="small" type="primary" @click="startClassR(item)"
|
||||
>继续上课</el-button
|
||||
>
|
||||
<!-- <el-button v-if="item.status === '未开始'" @click="openEdit">编辑</el-button>-->
|
||||
<el-button v-if="item.status === 'open'" size="small" type="info" @click="endClassR(item)"
|
||||
>下课</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="class-reserv-item-tool" style="width: 50px;">
|
||||
<!-- <el-button v-if="item.status!='open'" size="small" type="danger" @click="deleteReserv">删除</el-button>-->
|
||||
<el-tag>APT</el-tag>
|
||||
</div>
|
||||
<div style="min-width: 150px;"><span> 浏览:25955 点赞:26605</span></div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { useToolState } from '@/store/modules/tool'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import { createWindow } from '@/utils/tool'
|
||||
import { deleteSmartReserv, startClass, endClass } from '@/api/classManage'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { listEntpcourse } from '@/api/teaching/classwork'
|
||||
const emit = defineEmits(['openEdit', 'deleteReserv'])
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
})
|
||||
const basePath = import.meta.env.VITE_APP_BUILD_BASE_PATH
|
||||
const toolStore = useToolState() // 获取状态管理-tool
|
||||
const openEdit = () => {
|
||||
emit('openEdit', props.item)
|
||||
}
|
||||
const deleteReserv = () => {
|
||||
deleteSmartReserv([props.item.id]).then((res) => {
|
||||
if (res.data === true) {
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
emit('deleteReserv', props.item)
|
||||
}
|
||||
})
|
||||
}
|
||||
const startClassR = (item) => {
|
||||
// startClass(item.id).then((res) => {
|
||||
// if (res.data === true) {
|
||||
// item.status = '上课中'
|
||||
// openLesson()
|
||||
// }
|
||||
// })
|
||||
// item.status = '上课中'
|
||||
openLesson()
|
||||
}
|
||||
const endClassR = (item) => {
|
||||
/*endClass(item.id).then((res) => {
|
||||
if (res.data === true) {
|
||||
ElMessage({
|
||||
message: '下课成功',
|
||||
type: 'success'
|
||||
})
|
||||
item.status = '已结束'
|
||||
}
|
||||
})*/
|
||||
}
|
||||
// const toolStore = useToolState()
|
||||
let wins = null;
|
||||
// 上课-工具类悬浮
|
||||
const openLesson = () => {
|
||||
// startClass(props.item.id)
|
||||
/*listEntpcourse({
|
||||
evalid: props.item.ex2,
|
||||
edituserid: useUserStore().user.userId,
|
||||
pageSize: 500
|
||||
}).then(async res=>{
|
||||
if (res.rows[0].id) {
|
||||
wins = await createWindow('tool-sphere', { url: '/tool/sphere?entpcourseid=' + res.rows[0].id + "&reservId=" + props.item.id })
|
||||
}
|
||||
})*/
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.class-reserv-item {
|
||||
display: flex;
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
padding: 5px;
|
||||
margin-bottom: 10px;
|
||||
.class-reserv-item-img {
|
||||
width: 60px;
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.class-reserv-item-body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: left;
|
||||
padding-left: 5px;
|
||||
width: 120px;
|
||||
.class-reserv-item-title1 {
|
||||
flex: 1;
|
||||
label {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
.class-reserv-item-tool {
|
||||
margin-left: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,27 +1,34 @@
|
|||
<template>
|
||||
<div class="class-reserv-item">
|
||||
<div class="class-reserv-item-img">
|
||||
<img :src="basePath + item.bookImg" alt="封面" />
|
||||
</div>
|
||||
<div class="class-reserv-item-body">
|
||||
{{ item.classDay }} {{ item.startTime }}
|
||||
<div class="class-reserv-item-title1">
|
||||
<label>{{ item.className }}</label>
|
||||
<el-tag style="margin-left: 5px" type="primary"> {{ item.classType }}</el-tag>
|
||||
<el-tag style="margin-left: 5px" type="primary"> {{ item.classSubject }}</el-tag>
|
||||
</div>
|
||||
<div class="class-reserv-item-title2">
|
||||
{{ item.classDay }} {{ item.startTime }} ~ {{ item.classDay }} {{ item.endTime }}
|
||||
{{ item.createUserName }}老师
|
||||
</div>
|
||||
<div class="class-reserv-item-title3">
|
||||
<span v-for="(tag, index) in item.classItemList" :key="index" style="margin-left: 5px">
|
||||
{{ index === 0 ? tag.name : '、' + tag.name }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex: 1;max-width: 400px">
|
||||
<span v-for="(tag, index) in item.classItemList" :key="index">{{ index === 0 ? tag.name : '、' + tag.name }}</span>
|
||||
</div>
|
||||
<div class="class-reserv-item-tool" style="width: 200px;max-width: 300px">
|
||||
<el-tag v-if="item.status === '已结束'" style="margin-right: 5px" type="success">已结束</el-tag>
|
||||
<el-tag v-if="item.status === '上课中'" style="margin-right: 5px" type="danger">上课中</el-tag>
|
||||
<el-button v-if="item.status === '上课中'" :disabled="toolStore.isToolWin" size="small" type="primary" @click="startClassR(item)"
|
||||
>继续上课</el-button
|
||||
<div class="class-reserv-item-tool">
|
||||
<el-button v-if="item.status !== '已结束'" :disabled="toolStore.isToolWin" type="primary" @click="startClassR(item)"
|
||||
>{{item.status == '上课中'?'上课中':'上课'}}</el-button
|
||||
>
|
||||
<!-- <el-button v-if="item.status === '未开始'" @click="openEdit">编辑</el-button>-->
|
||||
<el-button v-if="item.status === '上课中'" size="small" type="info" @click="endClassR(item)"
|
||||
<el-button v-if="item.status === '未开始'" @click="openEdit">编辑</el-button>
|
||||
<!-- <el-button v-if="item.status === '上课中'" type="info" @click="endClassR(item)"
|
||||
>下课</el-button
|
||||
>
|
||||
>-->
|
||||
<el-button v-if="item.status!='上课中'" type="danger" @click="deleteReserv">删除</el-button>
|
||||
</div>
|
||||
<div class="class-reserv-item-tool" style="width: 50px;">
|
||||
<!-- <el-button v-if="item.status!='上课中'" size="small" type="danger" @click="deleteReserv">删除</el-button>-->
|
||||
<el-tag type="success">PPT</el-tag>
|
||||
</div>
|
||||
<div style="min-width: 150px;"></div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
|
@ -93,24 +100,25 @@ const endClassR = (item) => {
|
|||
</script>
|
||||
<style scoped lang="scss">
|
||||
.class-reserv-item {
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
padding: 5px;
|
||||
margin-bottom: 10px;
|
||||
.class-reserv-item-img {
|
||||
width: 60px;
|
||||
width: 80px;
|
||||
padding-left: 20px;
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.class-reserv-item-body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
text-align: left;
|
||||
padding-left: 5px;
|
||||
width: 120px;
|
||||
padding-left: 30px;
|
||||
font-size: 14px;
|
||||
.class-reserv-item-title1 {
|
||||
flex: 1;
|
||||
label {
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
<script setup>
|
||||
import { ref, onMounted, onUnmounted, computed, watch } from 'vue'
|
||||
import { listByDeadDate, listClassworkdata, listClassworkdataNew } from '@/api/classTask'
|
||||
import { listByDeadDate, listClassworkdata } from '@/api/classTask'
|
||||
|
||||
import TaskItem from '@/views/classTask/container/task-item.vue'
|
||||
// import ItemDialog from '@/views/classTask/container/item-dialog.vue'
|
||||
|
@ -72,7 +72,6 @@ import { getCurrentTime, getTomorrow } from '@/utils/date'
|
|||
import useUserStore from '@/store/modules/user'
|
||||
import useClassTaskStore from "@/store/modules/classTask";
|
||||
import {sessionStore, createWindow} from '@/utils/tool'
|
||||
import {throttle,debounce } from '@/utils/comm'
|
||||
|
||||
|
||||
const toolState = useToolState();
|
||||
|
@ -120,7 +119,7 @@ const getData = async () => {
|
|||
classWorkList.value = []
|
||||
loading.value = true
|
||||
// 1、班级列表
|
||||
//getClassList()
|
||||
getClassList()
|
||||
// 2、班级作业
|
||||
await getClassWorkList()
|
||||
// 3、班级学生作业 包含多个班级
|
||||
|
@ -141,11 +140,10 @@ 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,//学科
|
||||
|
@ -220,7 +218,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(','),
|
||||
|
@ -230,21 +228,7 @@ 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,
|
||||
|
@ -378,10 +362,6 @@ const closeDialog = () => {
|
|||
getStudentClassWorkDataPolling()
|
||||
}
|
||||
|
||||
const debounceOpenWin = debounce(() => {
|
||||
toolState.isTaskWin=true; // 设置打开批改窗口
|
||||
createWindow('open-taskwin',{url:'/teachClassTask'}); // 调用新窗口批改页面
|
||||
}, 1000);
|
||||
/**
|
||||
* 开启新批改弹窗
|
||||
* @param item 作业对象
|
||||
|
@ -389,10 +369,14 @@ const debounceOpenWin = debounce(() => {
|
|||
const onClickItem = (item) => {
|
||||
console.log('开启弹窗,关闭作业进度轮询')
|
||||
clearInterval(pollingST.value)
|
||||
// itemDialogRef.value.openDialog(item)
|
||||
|
||||
console.log('防抖开启弹窗')
|
||||
sessionStore.set('teachClassWorkItem', item); // 缓存点击的item
|
||||
debounceOpenWin();
|
||||
// 新跳转子窗口链接
|
||||
// 1、本地缓存item数据,2、打开子窗口 3、子窗口加载item数据
|
||||
// localStorage.setItem('teachClassWorkItem', JSON.stringify(item))
|
||||
sessionStore.set('teachClassWorkItem', item)
|
||||
toolState.isTaskWin=true //设置打开批改窗口
|
||||
createWindow('open-taskwin',{url:'/teachClassTask'})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
<el-table-column v-if="props.initDataProps.queryType!=='single'" label="推送配置" align="left" min-width="16%">
|
||||
<template #default="scope">
|
||||
<div style="display: flex">
|
||||
<el-button v-hasPermi="['teaching:classwork:edit']" link icon="Setting" :style="formatStyle(scope.row)" @click="scope.row.status == '10' ? openClassWorkConfigDialog(scope.row, -1,'item') : ''">{{scope.row.status == '10'? '推送' : '已推送'}}</el-button>
|
||||
<el-button link icon="Setting" @click="scope.row.status == '10' ? openClassWorkConfigDialog(scope.row, -1,'item') : ''" :style="formatStyle(scope.row)" v-hasPermi="['teaching:classwork:edit']">{{scope.row.status == '10'? '推送' : '已推送'}}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -149,103 +149,21 @@
|
|||
@click="submitWorkTitle('submit')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!-- 推送作业的配置对话框 -->
|
||||
<el-dialog v-model="workConfDialogOpen" title="作业布置推送配置" width="60%" append-to-body>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form ref="classWorkConfigFormRef" :model="classWorkConfigForm" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="班级" prop="grade">
|
||||
<el-scrollbar max-height="300px" style="width: 100%">
|
||||
<el-tree
|
||||
ref="treeRef" :props="defaultProps" :load="getLoad" node-key="id" highlight-current show-checkbox
|
||||
lazy @check="handleCheckChange" />
|
||||
</el-scrollbar>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="选中学生">
|
||||
<div style="max-height: 150px; overflow: auto">
|
||||
<template v-for="(item, index) in classWorkConfigForm.studentlist" :key="item" >
|
||||
<el-tag :label="item.studentid" size="large" closable style="margin: 3px" @close="handleClassDialogClassStudentRemove(item, index)">{{ item.name }}</el-tag>
|
||||
</template>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="完成要求">
|
||||
<el-radio-group v-model="classWorkConfigForm.feedtype">
|
||||
<el-radio label="必做">必做</el-radio>
|
||||
<el-radio label="选做">选做</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="截止日期">
|
||||
<el-date-picker v-model="classWorkConfigForm.deaddate" type="date" placeholder="选择日期"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="截止时间">
|
||||
<el-input-number v-model="classWorkConfigForm.deadhour" :min="8" :max="22"></el-input-number> 点
|
||||
<el-input-number v-model="classWorkConfigForm.deadmin" :min="0" :max="60" :step="15" style="margin-left: 10px"></el-input-number> 分
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="推荐用时">
|
||||
<el-input-number v-model="classWorkConfigForm.timelength" :min="1"></el-input-number>分钟
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="分值" v-show="false">
|
||||
<el-input-number v-model="classWorkConfigForm.weights" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div slot="footer" class="dialog-footer" style="text-align: right">
|
||||
<el-button @click="handleWorkConfigUpdate('cancel')">取消</el-button>
|
||||
<!-- <el-button type="primary" @click="handleTaskAssignToAllClassType()" :loading="classWorkToStudent_Loading">{{classWorkToStudent_Loading?'推送中……':'推送'}}</el-button> -->
|
||||
<el-button type="primary" @click="handleTaskAssignToAllClassType()" >{{'推送'}}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
||||
import { onMounted, ref, toRaw,watch, reactive, getCurrentInstance } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
import ChooseTextbook from '@/components/choose-textbook/index.vue'
|
||||
import { homeworklist, delClasswork } from '@/api/teaching/classwork'
|
||||
import { listEntpcoursework, listClassworkeval,updateClasswork,getEvaluationclue } from '@/api/classTask'
|
||||
import { listClassmain, listClassgroup } from '@/api/classManage/index'
|
||||
import { saveByClassWorkArray } from '@/api/teaching/classwork'
|
||||
import { listEntpcoursework, listClassworkeval,updateClasswork } from '@/api/classTask'
|
||||
|
||||
import { useGetHomework } from '@/hooks/useGetHomework'
|
||||
import { processList } from '@/hooks/useProcessList'
|
||||
import { uniqBy, groupBy } from 'lodash'
|
||||
|
||||
import { getCurrentTime } from '@/utils/date'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
const userStore = useUserStore().user
|
||||
|
@ -292,22 +210,6 @@ const workConfObj = reactive({
|
|||
quizlist: [], // 习题list
|
||||
});
|
||||
|
||||
// 推送相关
|
||||
const defaultProps = ref({
|
||||
children: 'children',
|
||||
label: 'label',
|
||||
isLeaf: 'leaf'
|
||||
});
|
||||
const gradeList = ref([]);// 学生节点
|
||||
const workConfDialogOpen = ref(false);// 推送配置弹窗
|
||||
const classWorkConfigForm = reactive({
|
||||
formRowsType: '',//
|
||||
formRowsList: null,
|
||||
//
|
||||
feedtype: '必做',
|
||||
studentlist: [], //需要推送的学生list
|
||||
}); // 推送作业配置
|
||||
|
||||
|
||||
// ---------------------------------------------------
|
||||
|
||||
|
@ -552,17 +454,13 @@ const handleWorkEdit = (row, index) =>{
|
|||
// 作业内容编辑-跳转到设计界面-传参
|
||||
let classtaskObj = reactive({
|
||||
id: '', //
|
||||
bookName: '', // 课程名称
|
||||
uniquekey: '', // 设计中的标题
|
||||
title: '', // 设计中的说明
|
||||
worktype: '', // 设计中的作业类型
|
||||
quizlist: [], // 设计中的试题列表
|
||||
chooseWorkLists: [],// 设计中的框架梳理list
|
||||
fileHomeworkList: [],// 设计中的常规作业list
|
||||
whiteboardObj: '',// 设计中的课堂展示对象
|
||||
})
|
||||
// 作业内容编辑-跳转到设计界面
|
||||
const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{
|
||||
const newHandleWorkEdit2ClassWorkQuizAdd =(row, index) =>{
|
||||
// this.newWorkSpace = true;
|
||||
// this.newWorkSpaceEdit = true;
|
||||
// this.currentTask = row;
|
||||
|
@ -587,15 +485,10 @@ const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{
|
|||
|
||||
if (listCourseWork.length > 0) {
|
||||
classtaskObj.id= row.id; //
|
||||
classtaskObj.bookObj = courseObj; // 教材对象
|
||||
classtaskObj.bookName = row.evaltitle? row.evalparenttitle+'/'+row.evaltitle: row.evalparenttitle// 课程名称:单元/章节: 单元
|
||||
classtaskObj.uniquekey= row.uniquekey; // 设计中的标题
|
||||
classtaskObj.title= row.title; // 设计中的说明
|
||||
classtaskObj.worktype= row.worktype; // 设计中的作业类型
|
||||
classtaskObj.quizlist= []; // 设计中的试题列表
|
||||
classtaskObj.chooseWorkLists = []; //设计中的 框架梳理list
|
||||
classtaskObj.fileHomeworkList = []; //设计中的 常规作业list
|
||||
classtaskObj.whiteboardObj = ''; //设计中的 课堂展示对象
|
||||
|
||||
|
||||
if (row.worktype == '框架梳理') {
|
||||
|
@ -605,16 +498,14 @@ const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{
|
|||
// queryParams.ppttype = '教材分析';
|
||||
// queryParams.title = '框架梳理';
|
||||
// queryParams.filetype = 'draw';
|
||||
const res = await getEvaluationclue(listCourseWork[0].id);
|
||||
if ( res.data==null || res.data==undefined ) {
|
||||
return;
|
||||
}
|
||||
console.log('res.data', res.data);
|
||||
// const res = await getEvaluationclue(listCourseWork[0].id);
|
||||
// if ( res.data==null || res.data==undefined ) {
|
||||
// return;
|
||||
// }
|
||||
// this.chooseWorkLists = [];
|
||||
res.data.worktype = '框架梳理';
|
||||
res.data.score = listCourseWork[0].score;
|
||||
classtaskObj.chooseWorkLists.push(res.data);
|
||||
//
|
||||
// res.data.worktype = '框架梳理';
|
||||
// res.data.score = listCourseWork[0].score;
|
||||
// this.chooseWorkLists.push(res.data);
|
||||
}
|
||||
else if (row.worktype == '习题训练') {
|
||||
const ids = listCourseWork.map(item => item.id).join(",");
|
||||
|
@ -622,6 +513,7 @@ const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{
|
|||
// for (var i=0; i<idres.rows.length; i++) {
|
||||
// idres.rows[i].titletext = idres.rows[i].title.replace(/<[^>]+>/g, '');
|
||||
// }
|
||||
|
||||
// 格式化试题
|
||||
if(idres.rows&&idres.rows.length > 0){
|
||||
processList(idres.rows);
|
||||
|
@ -635,418 +527,44 @@ const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{
|
|||
});
|
||||
|
||||
classtaskObj.quizlist = idres.rows;
|
||||
//
|
||||
// 跳转作业设计 页面
|
||||
router.push({
|
||||
path: '/newClassTask',
|
||||
query: {
|
||||
classtaskObj: JSON.stringify(classtaskObj),
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
else if (row.worktype == '课堂展示') {
|
||||
console.log('row.课堂展示', row.workcodes);
|
||||
const workcodes = JSON.parse(row.workcodes);
|
||||
classtaskObj.whiteboardObj = JSON.stringify(workcodes.json);
|
||||
//
|
||||
else if (this.classWorkForm.worktype == '课堂展示') {
|
||||
|
||||
// const workcodes = JSON.parse(this.currentTask.workcodes);
|
||||
// const jsonString = JSON.stringify(workcodes.json);
|
||||
|
||||
// await this.$nextTick();
|
||||
// this.isShowBoard = true
|
||||
// this.whiteboardObj = jsonString;
|
||||
}
|
||||
else if (row.worktype == '常规作业') {
|
||||
if(isJson(row.workcodes)){
|
||||
classtaskObj.fileHomeworkList = JSON.parse(row.workcodes);
|
||||
//
|
||||
}
|
||||
else if (this.classWorkForm.worktype == '常规作业') {
|
||||
// this.fileHomeworkList = [];
|
||||
// if(isJson(this.currentTask.workcodes)){
|
||||
// this.fileHomeworkList = JSON.parse(this.currentTask.workcodes);
|
||||
// }
|
||||
}
|
||||
|
||||
// 跳转 作业设计 进行编辑页面
|
||||
router.push({
|
||||
path: '/newClassTask',
|
||||
query: {
|
||||
classtaskObj: JSON.stringify(classtaskObj),
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
const isJson = (str) => {
|
||||
if (typeof str == 'string') {
|
||||
try {
|
||||
let obj = JSON.parse(str)
|
||||
if (typeof obj == 'object' && obj) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取班级
|
||||
const getGradeList = async() => {
|
||||
let { rows } = await listClassmain({
|
||||
classuserid: userStore.userId,
|
||||
pageSize: 100,
|
||||
status: 'open'
|
||||
})
|
||||
rows.forEach((item) => {
|
||||
item.label = item.caption
|
||||
item.level = 0
|
||||
item.leaf = false
|
||||
item.children = []
|
||||
item.classstudentlist = JSON.parse('[' + item.classstudentlist + ']')
|
||||
item.classstudentlist.forEach((el) => {
|
||||
el.classid = item.id
|
||||
})
|
||||
})
|
||||
return rows
|
||||
};
|
||||
// 获取节点下一级
|
||||
const getLoad = async (node, resolve) =>{
|
||||
// 获取一级节点 班级
|
||||
if (node.level == 0) {
|
||||
gradeList.value = await getGradeList()
|
||||
resolve(gradeList.value)
|
||||
}
|
||||
// 获取二级节点 小组
|
||||
if (node.level == 1) {
|
||||
listClassgroup({ classid: node.key, orderby: 'orderidx', pageSize: 100 }).then((res) => {
|
||||
if (res.rows.length > 0) {
|
||||
let ary = []
|
||||
res.rows.forEach((item) => {
|
||||
if (item.parentid === 0) {
|
||||
//studentGroup 小组学生 为三级节点
|
||||
let studentGroup = JSON.parse('[' + item.studentlist + ']')
|
||||
studentGroup.forEach((el) => {
|
||||
el.label = el.name
|
||||
el.leaf = true
|
||||
el.level = 2
|
||||
el.id = el.studentid
|
||||
el.classid = item.classid
|
||||
})
|
||||
ary.push({
|
||||
label: item.groupname,
|
||||
leaf: false,
|
||||
...item,
|
||||
level: 1,
|
||||
// children 小组学生 三级节点 这样就不用再从接口拿
|
||||
children: studentGroup
|
||||
})
|
||||
}
|
||||
})
|
||||
resolve(ary)
|
||||
} else {
|
||||
// 班级下面没有小组 直接取学生
|
||||
let students = node.data.classstudentlist
|
||||
students.forEach((item) => {
|
||||
item.label = item.name
|
||||
item.level = 2
|
||||
item.leaf = true
|
||||
})
|
||||
resolve(students)
|
||||
}
|
||||
})
|
||||
}
|
||||
// 三级节点 小组学生
|
||||
if (node.level == 2) {
|
||||
resolve(node.data.children)
|
||||
}
|
||||
}
|
||||
|
||||
//节点勾选后触发 拿学生
|
||||
const handleCheckChange = (data, checked) => {
|
||||
classWorkConfigForm.studentlist = [];
|
||||
// 选中节点集合
|
||||
let checkNodes = checked.checkedNodes
|
||||
let ary = []
|
||||
checkNodes.forEach((item) => {
|
||||
// 一级节点 班级
|
||||
if (item.level == 0) {
|
||||
ary = [...ary, ...item.classstudentlist]
|
||||
}
|
||||
// 二级节点 班级下面的小组
|
||||
if (item.level == 1) {
|
||||
ary = [...ary, ...item.children]
|
||||
}
|
||||
// 三级节点 小组下面的学生
|
||||
if (item.level == 2) {
|
||||
ary = [...ary, item]
|
||||
}
|
||||
})
|
||||
classWorkConfigForm.studentlist = uniqBy(ary, 'studentid')
|
||||
};
|
||||
// 从已经选中的学生中删除
|
||||
const handleClassDialogClassStudentRemove = (item,index) => {
|
||||
classWorkConfigForm.studentlist.splice(index, 1);
|
||||
// 同步删除 [班级、班级]小组]中对应的该学生
|
||||
proxy.$refs.treeRef.setChecked(item.id, false, true);
|
||||
//TODO 后续再看 ,待完善
|
||||
// const ids = this.$refs.treeRef.getCheckedKeys();
|
||||
// console.log(ids)
|
||||
// console.log(ids.filter((_item)=>_item == item.id),'???????')
|
||||
// if(ids&&ids.filter((_item)=>_item == item.id).length>0){
|
||||
// console.log(ids,'?====?')
|
||||
// console.log(item.id,'?=item.id===?')
|
||||
// // 个人多组的情况,再次删除该个人?为啥没删除掉呢
|
||||
// this.$refs.treeRef.setChecked(item.id, false, true);
|
||||
// // setCheckedKeys
|
||||
// }
|
||||
};
|
||||
|
||||
/**
|
||||
* 处理在作业推送前的任务配置
|
||||
*/
|
||||
const openClassWorkConfigDialog = (row, configindex, type) => {
|
||||
// 初始
|
||||
workConfDialogOpen.value = true;
|
||||
classWorkConfigForm.formRowsType = '';//
|
||||
classWorkConfigForm.formRowsList = null;
|
||||
if(type == 'list'){
|
||||
classWorkConfigForm.formRowsType = 'list';
|
||||
classWorkConfigForm.formRowsList = row;
|
||||
}else{
|
||||
classWorkConfigForm.formRowsType = 'item';
|
||||
classWorkConfigForm.formRowsList = [row];
|
||||
}
|
||||
// TODO 重复推送?待完善
|
||||
// if (configindex > -1) {
|
||||
// this.handleClassDialogConfigShow(configindex, 0)
|
||||
// }
|
||||
|
||||
classWorkConfigForm.deaddate = getCurrentTime('YYYY-MM-DD');
|
||||
classWorkConfigForm.deadhour = getCurrentTime('HH+3');//当前时间 往后延时3个小时;
|
||||
classWorkConfigForm.deadmin = getCurrentTime('mm');
|
||||
classWorkConfigForm.timelength = 1;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 推送配置:保存配置
|
||||
* @param key 'cancel' or 'submit'
|
||||
*/
|
||||
const handleWorkConfigUpdate = (key,row) => {
|
||||
if (key == 'cancel') {
|
||||
workConfDialogOpen.value = false;
|
||||
} else if (key == 'submit') {
|
||||
|
||||
// 2024-04-08, by jackyshen
|
||||
// 注意,这里的逻辑较复杂。不能以this.classWorkConfigForm.classlist为准,需要从选中的学生要找出班级列表
|
||||
var clist = [];
|
||||
var cidlist = [];
|
||||
for (var i=0; i< classWorkConfigForm.studentlist.length; i++) {
|
||||
if (cidlist.indexOf(classWorkConfigForm.studentlist[i].classid) == -1) {
|
||||
// 再找班级名称,为了在UI上能展示出哪个班级
|
||||
var clsname = '';
|
||||
for (var d = 0; d<gradeList.value.length; d++) {
|
||||
if (gradeList.value[d].id == classWorkConfigForm.studentlist[i].classid) {
|
||||
clsname = gradeList.value[d].caption;
|
||||
}
|
||||
}
|
||||
clist.push({id: classWorkConfigForm.studentlist[i].classid, caption: clsname});
|
||||
cidlist.push(classWorkConfigForm.studentlist[i].classid);
|
||||
}
|
||||
}
|
||||
|
||||
// 20240408,酉阳教委,207
|
||||
// 如果index > -1,则是已有的配置方案。删除后再添加
|
||||
// 为什么尼?
|
||||
// 因为存在多个班级的问题,在修改过程中,如果添加了新的班级学生,则需要删除原来的,再添加新的。
|
||||
// 好,就这么愉快的决定
|
||||
// if (classWorkConfigForm.index > -1) {
|
||||
// classWorkConfigForm.classWorkConfigList.splice(classWorkConfigForm.activeClassWorkIndex);
|
||||
// }
|
||||
// 处理小时和分钟
|
||||
var hh = classWorkConfigForm.deadhour;
|
||||
hh = "0"+hh;
|
||||
hh = hh.substr(hh.length-2, 2);
|
||||
var mm = classWorkConfigForm.deadmin;
|
||||
mm = "0"+mm;
|
||||
mm = mm.substr(mm.length-2, 2);
|
||||
|
||||
// 处理日期
|
||||
classWorkConfigForm.deaddate = '' + classWorkConfigForm.deaddate;
|
||||
if (isNaN(classWorkConfigForm.deaddate.substring(0,4))) {
|
||||
var dd = new Date(classWorkConfigForm.deaddate);
|
||||
var year = dd.getFullYear(); //年份
|
||||
var month = dd.getMonth() + 1; //月份(0-11)
|
||||
month = "0"+month;
|
||||
month = month.substr(month.length-2,2);
|
||||
var day = dd.getDate(); //天数(1到31)
|
||||
day = "0"+day;
|
||||
day = day.substr(day.length-2,2);
|
||||
|
||||
classWorkConfigForm.deaddate = year+'-'+month+'-'+day;
|
||||
}
|
||||
|
||||
classWorkConfigForm.classWorkConfigList = [];
|
||||
// 新建的配置方案
|
||||
for (var i=0; i<clist.length; i++) {
|
||||
classWorkConfigForm.classWorkConfigList.push({
|
||||
id: 0,
|
||||
classid: clist[i].id,
|
||||
classcaption: clist[i].caption, // 班级名称
|
||||
parentid: 0,
|
||||
worktype: '',
|
||||
workkey: classWorkConfigForm.workkey,
|
||||
worktag: '',
|
||||
entpcourseid: 0,
|
||||
evalid: 0,
|
||||
edusubject: '',
|
||||
edudegree: '',
|
||||
workdate: '',
|
||||
title: '',
|
||||
workcodes: '',
|
||||
studentlist: classWorkConfigForm.studentlist,
|
||||
timelength: classWorkConfigForm.timelength,
|
||||
weights: classWorkConfigForm.weights,
|
||||
feedtype: classWorkConfigForm.feedtype,
|
||||
deaddate: classWorkConfigForm.deaddate+' '+hh+":"+mm,
|
||||
});
|
||||
}
|
||||
|
||||
if(classWorkConfigForm.formRowsType == 'list'){
|
||||
// 一键推送:list推送
|
||||
for(var d=0;d<classWorkConfigForm.formRowsList.length;d++){
|
||||
classWorkConfigForm.rowid = classWorkConfigForm.formRowsList[d].id;
|
||||
|
||||
// 20240308,by jackyshen
|
||||
// 注意,这是要把 classWorkConfigForm.classWorkConfigList保存给taskList[i]
|
||||
// 这个 classWorkConfigForm.classWorkConfigList里面,包括了多个配置策略(多班级、多学生)
|
||||
for (var i=0; i<taskList.value.length; i++) {
|
||||
if (taskList.value[i].id == classWorkConfigForm.rowid) {
|
||||
taskList.value[i].taskconfig = classWorkConfigForm.classWorkConfigList;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
// 单个推送:item推送
|
||||
classWorkConfigForm.rowid = classWorkConfigForm.formRowsList[0].id;
|
||||
|
||||
// 20240308,by jackyshen
|
||||
// 注意,这是要把 classWorkConfigForm.classWorkConfigList保存给taskList[i]
|
||||
// 这个 classWorkConfigForm.classWorkConfigList里面,包括了多个配置策略(多班级、多学生)
|
||||
for (var i=0; i<taskList.value.length; i++) {
|
||||
if (taskList.value[i].id == classWorkConfigForm.rowid) {
|
||||
taskList.value[i].taskconfig = classWorkConfigForm.classWorkConfigList;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 重置
|
||||
classWorkConfigForm.id = 0;
|
||||
classWorkConfigForm.index = -1;
|
||||
classWorkConfigForm.selclassid = 0;
|
||||
classWorkConfigForm.classlist = [];
|
||||
classWorkConfigForm.studentlist = [];
|
||||
classWorkConfigForm.feedtype = '必做';
|
||||
classWorkConfigForm.workkey = '';
|
||||
classWorkConfigForm.selgroupid = 0;
|
||||
classWorkConfigForm.classGroups = [];
|
||||
classWorkConfigForm.availableStudents = [];
|
||||
classWorkConfigForm.deaddate = getCurrentTime('YYYY-MM-DD');
|
||||
classWorkConfigForm.deadhour = getCurrentTime('HH+3');
|
||||
classWorkConfigForm.deadmin = getCurrentTime('mm');
|
||||
classWorkConfigForm.timelength = 1;
|
||||
classWorkConfigForm.weights = 1;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 推送
|
||||
*/
|
||||
const handleTaskAssignToAllClassType = async() => {
|
||||
if(classWorkConfigForm.studentlist.length == 0){
|
||||
return proxy.$modal.msgWarning('请选择需要推送的学生!');
|
||||
}
|
||||
// this.classWorkToStudent_Loading = true;
|
||||
|
||||
// 保存配置
|
||||
handleWorkConfigUpdate('submit', '')
|
||||
const { chapterId } = await useGetHomework(courseObj.node)
|
||||
// this.entpcourseid = chapterId
|
||||
|
||||
console.log(taskList.value,'===============this.taskListthis.taskList')
|
||||
var ttt = [];
|
||||
for (var i=0; i<taskList.value.length; i++) {
|
||||
// 20240408, by jackyshen
|
||||
// 这里根据taskconfig.classWorkList来优化,其中包括了多个班级、多个学生
|
||||
for (var t=0; t<taskList.value[i].taskconfig.length; t++) {
|
||||
if (taskList.value[i].taskconfig[t].id == 0) {
|
||||
|
||||
ttt.push({
|
||||
id: 0,
|
||||
parentid: taskList.value[i].id,
|
||||
classid: taskList.value[i].taskconfig[t].classid,
|
||||
classcourseid: 0,
|
||||
entpcourseid: chapterId,
|
||||
studentlist: JSON.stringify(taskList.value[i].taskconfig[t].studentlist),
|
||||
feedback: taskList.value[i].taskconfig[t].feedtype,
|
||||
workkey: taskList.value[i].taskconfig[t].workkey,
|
||||
timelength: taskList.value[i].taskconfig[t].timelength,
|
||||
weights: taskList.value[i].taskconfig[t].weights,
|
||||
deaddate: taskList.value[i].taskconfig[t].deaddate,
|
||||
workdate: getCurrentTime('YYYY-MM-DD'),
|
||||
uniquekey: taskList.value[i].uniquekey,
|
||||
entpcourseworklist: '['+taskList.value[i].entpcourseworklist+']', // 当前任务所包含的题目,必须是JSON格式
|
||||
needMsgNotifine: 'false',
|
||||
msgkey: 'newclasswork',
|
||||
title: taskList.value[i].title,
|
||||
status:'1',
|
||||
msgcontent: '', // 这个在服务端里会写入classwork的json
|
||||
teachername: userStore.nickName,
|
||||
unixstamp: new Date().getTime(),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(ttt,'===============ttt')
|
||||
|
||||
if(ttt.length == 0){
|
||||
proxy.$modal.msgError('您还未进行作业配置,请配置后再推送');
|
||||
return;
|
||||
}
|
||||
|
||||
var wForm = {};
|
||||
wForm.classworkarray = JSON.stringify(ttt);
|
||||
saveByClassWorkArray(wForm).then(response => {
|
||||
console.log(response,'===============response');
|
||||
// this.classWorkToStudent_Loading = false;
|
||||
workConfDialogOpen.value = false;
|
||||
proxy.$modal.msgSuccess("作业推送成功");
|
||||
// 清空班级树状勾选项内容
|
||||
proxy.$refs.treeRef.setCheckedKeys([]);
|
||||
// 刷新作业布置页面
|
||||
nextTick(() => {
|
||||
getTaskList();
|
||||
})
|
||||
}).catch((error) =>{
|
||||
// this.classWorkToStudent_Loading = false;
|
||||
workConfDialogOpen.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 一键推送
|
||||
*/
|
||||
const handleTaskAssignToAllClass = () => {
|
||||
let rows = proxy.$refs.taskTable.getSelectionRows();
|
||||
if (rows.length > 0) {
|
||||
proxy.$modal.confirm('是否确认推送选中的学习任务?').then(()=> {
|
||||
}).then(() => {
|
||||
// 弹出配置窗口 ,让用户配置推送策略
|
||||
openClassWorkConfigDialog(rows, -1,'list')
|
||||
}).catch(() => {})
|
||||
}else{
|
||||
return proxy.$modal.alertWarning("请选择需要推送的任务!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设计作业
|
||||
*/
|
||||
const handleNewClassWorkDialog = () => {
|
||||
// 打开作业设计页面
|
||||
router.push({ path: '/newClassTask' });
|
||||
}
|
||||
|
||||
// 作业说明编辑-确认
|
||||
const submitWorkTitle = () => {
|
||||
if(currentWorkEdit.currentTask.title == currentWorkEdit.currentTitle){
|
||||
|
|
|
@ -121,7 +121,9 @@
|
|||
:max="classWorkFormScore.teacherRating[sIndex].maxScore"
|
||||
size="small"
|
||||
:disabled="
|
||||
(quItem.worktype == '单选题' || quItem.worktype == '多选题' || quItem.worktype == '判断题')
|
||||
(quItem.worktype == '单选题' || quItem.worktype == '多选题') &&
|
||||
stuItem.feedcontent == stuItem.rightanswer &&
|
||||
stuItem.feedcontent != ''
|
||||
? true
|
||||
: false
|
||||
"
|
||||
|
|
|
@ -33,13 +33,13 @@
|
|||
v-if="classWorkAnalysis.row.worktype == '习题训练'"
|
||||
:type="classWorkAnalysis.view == 'quizStats' ? 'success' : ''"
|
||||
@click="workHandle('quizStats')"
|
||||
>逐题分析</el-button
|
||||
>作业概况</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="classWorkAnalysis.row.worktype == '习题训练'"
|
||||
:type="classWorkAnalysis.view == 'report' ? 'success' : ''"
|
||||
@click="handleClassOverviewOpen('report')"
|
||||
>整体分析</el-button
|
||||
>作业报告</el-button
|
||||
>
|
||||
</el-button-group>
|
||||
</el-row>
|
||||
|
@ -81,17 +81,12 @@
|
|||
>
|
||||
<el-table-column type="index" label="序号" width="52" reserve-selection align="center" />
|
||||
<el-table-column label="姓名" prop="studentname" width="100" align="center" />
|
||||
<el-table-column :label="tableRadio.value==0?'提交状态':'提交时间'" prop="updatedate" width="170" align="center">
|
||||
<template #default="scope">
|
||||
<span v-if="tableRadio.value==0" style="color: #2196f3">未提交</span>
|
||||
<span v-if="tableRadio.value==1">{{ scope.row.updatedate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提交时间" prop="updatedate" width="170" align="center" />
|
||||
<el-table-column label="批阅状态" prop="teacherRating" align="center" width="120" sortable>
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.teacherRating == 0">
|
||||
<span v-if="tableRadio.value==1" style="color: #2196f3">待批阅</span>
|
||||
</template>
|
||||
<template v-if="scope.row.teacherRating == 0"
|
||||
><span style="color: #2196f3">待批阅</span></template
|
||||
>
|
||||
<!-- 1-优 2-优减 3-良 4-良减 5-差 -->
|
||||
<template v-if="scope.row.teacherRating == 1"
|
||||
><el-tag type="danger">优</el-tag></template
|
||||
|
@ -141,12 +136,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 逐题分析 -->
|
||||
<!-- 作业概况 -->
|
||||
<div v-else-if="classWorkAnalysis.view == 'quizStats'">
|
||||
<quiz-stats :active-data="classWorkActiveData" />
|
||||
</div>
|
||||
|
||||
<!-- 整体分析-->
|
||||
<!-- 作业报告-->
|
||||
<div v-else-if="classWorkAnalysis.view == 'report'" style="overflow-y: scroll">
|
||||
<!-- <ClassOverview :table-list="overviewData" :eval-id="courseObj.evalid"></ClassOverview> -->
|
||||
<ClassOverview :table-list="overviewData"></ClassOverview>
|
||||
|
@ -193,7 +188,7 @@ const tableRadio = reactive({
|
|||
const loading_dt_table = ref(false)
|
||||
const isopen_dtwk_table = ref(false)
|
||||
|
||||
// zdg: 逐题分析
|
||||
// zdg: 作业概况
|
||||
const classWorkActiveData = reactive({
|
||||
quizlist: [], // 当前习题列表
|
||||
studentList: [], // 当前课程-所有学生
|
||||
|
@ -354,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
|
||||
|
@ -367,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) + '%'
|
||||
|
@ -536,7 +531,7 @@ const escapeHtmlQuotes = (str) => {
|
|||
return result;
|
||||
}
|
||||
|
||||
//#region 逐题分析
|
||||
//#region 作业概况
|
||||
// 查看学生-作业概览
|
||||
const workHandle = (type) => {
|
||||
// 关闭右侧批阅ui
|
||||
|
@ -571,11 +566,11 @@ const getWorkFeedList = async() =>{
|
|||
//#endregion
|
||||
|
||||
|
||||
//#regin 整体分析
|
||||
//#regin 作业报告
|
||||
/*
|
||||
author: yangws
|
||||
time: 2024-8-06 16:35:33
|
||||
function: 整体分析的处理
|
||||
function:作业报告的处理
|
||||
*/
|
||||
const handleClassOverviewOpen = (type) =>{
|
||||
// 关闭右侧批阅ui
|
||||
|
@ -643,12 +638,12 @@ const closeDialog = () => {
|
|||
watch(classWorkAnalysis, (newVal, oldVal) => {
|
||||
if(newVal.view != 'quizStats'){
|
||||
console.log('关闭zdg: 定时执行')
|
||||
clearInterval(classWorkActiveData.timerId) // 关闭定时器 逐题分析的
|
||||
clearInterval(classWorkActiveData.timerId) // 关闭定时器 作业概况的
|
||||
}
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
clearInterval(classWorkActiveData.timerId) // 关闭定时器 逐题分析的
|
||||
clearInterval(classWorkActiveData.timerId) // 关闭定时器 作业概况的
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
<el-row class="top">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="作业类型:">
|
||||
<el-radio-group v-model="classWorkForm.worktype" @change="changeFormType">
|
||||
<el-radio-group v-model="formType" @change="changeFormType">
|
||||
<template v-for="(item) in listWorkType" :key="item">
|
||||
<el-radio :value="item" :disabled="props.isedit">{{ item }}</el-radio>
|
||||
<el-radio :value="item" >{{ item }}</el-radio>
|
||||
</template>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
@ -21,12 +21,12 @@
|
|||
<div v-if="classWorkForm.worktype == '课堂展示'" style="height: 100%; display: flex; flex-direction: column;">
|
||||
<div style="flex: 0 0 auto;">
|
||||
<el-form-item label="问题">
|
||||
<el-input v-model="classWorkForm.title" type="text" placeholder="请输入问题" />
|
||||
<el-input v-model="question" type="text" placeholder="请输入问题" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-loading="boardLoading" class="board-wrap" style="height: 100%; flex: 1; overflow: hidden;">
|
||||
<!-- <whiteboard v-if="isShowBoard" ref="boardref" :height="mainHeight - 150" :isShowSave="false" :data="whiteboardObj"/> -->
|
||||
<whiteboard ref="boardref" :height="mainHeight - 150" :isShowSave="false" :data="classWorkForm.whiteboardObj"/>
|
||||
<whiteboard ref="boardref" :height="mainHeight - 150" :isShowSave="false" :data="whiteboardObj"/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="el-form-work-list">
|
||||
|
@ -154,7 +154,7 @@
|
|||
</template>
|
||||
<template v-if="classWorkForm.worktype =='常规作业'">
|
||||
<div v-loading="fileLoading" class="upload-homework">
|
||||
<FileUpload v-model="classWorkForm.fileHomeworkList" :fileSize="800" :fileType="['mp3','mp4','doc','docx','xlsx','xls','pdf','ppt','pptx','jpg','jpeg','gif','png','txt']"/>
|
||||
<FileUpload v-model="fileHomeworkList" :fileSize="800" :fileType="['mp3','mp4','doc','docx','xlsx','xls','pdf','ppt','pptx','jpg','jpeg','gif','png','txt']"/>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
@ -180,7 +180,7 @@
|
|||
|
||||
<div v-if="classWorkForm.worktype!='习题训练'" :style="{'overflow': 'auto', 'border':'1px dotted blue','border-radius':'5px', 'background-color': '#f7f7f7'}">
|
||||
<div style="margin: 5px; background-color: white">
|
||||
<template v-for="(item) in classWorkForm.chooseWorkLists" :key="item.id">
|
||||
<template v-for="(item) in chooseWorkLists" :key="item.id">
|
||||
<div v-if="item.worktype==classWorkForm.worktype">
|
||||
<div class="choose-work">
|
||||
<div class="choose-work-title">{{ item.worktype }}</div>
|
||||
|
@ -252,7 +252,7 @@ import { useRouter } from 'vue-router'
|
|||
|
||||
import {listEntpcoursework, listEntpcourseworkNew, getEntpcoursework} from '@/api/education/entpCourseWork'
|
||||
import { addClassworkReturnId } from '@/api/teaching/classwork'
|
||||
import { updateClasswork, listEvaluationclue,readFile, listClassworkeval,delClassworkeval,addClassworkeval,updateClassworkeval } from '@/api/classTask'
|
||||
import { updateClasswork, listEvaluationclue,readFile, listClassworkeval,delClassworkeval,addClassworkeval } from '@/api/classTask'
|
||||
import { listEvaluation } from '@/api/subject'
|
||||
import { listEntpcoursefile } from '@/api/education/entpcoursefile'
|
||||
import { listKnowledgePoint } from "@/api/knowledge/knowledgePoint";
|
||||
|
@ -279,10 +279,6 @@ const props = defineProps({
|
|||
propsformobj: {
|
||||
type: Object,
|
||||
default: () =>({})
|
||||
},
|
||||
isedit: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -293,6 +289,11 @@ const openDialog = () => {
|
|||
isDialogOpen.value = true
|
||||
}
|
||||
const classWorkFormRef = ref(null);
|
||||
const formType = ref('习题训练')
|
||||
const newWorkSpaceEdit = ref(false); //修改学习任务
|
||||
// ---------------------------------------------------
|
||||
const listWorkType = ref(['习题训练', '框架梳理', '课堂展示', '常规作业']); //作业类型
|
||||
|
||||
const entpCourseWorkTypeList = ref([
|
||||
{value: 0, label: "不限"},
|
||||
{value: 1, label: "单选题"},
|
||||
|
@ -359,19 +360,17 @@ const workResource = reactive({
|
|||
}); // 作业资源
|
||||
let classWorkForm = reactive({
|
||||
id: cloneDeep(props.propsformobj.id),
|
||||
uniquekey: props.propsformobj.uniquekey?cloneDeep(props.propsformobj.uniquekey):'', // 作业唯一标识 作业名称
|
||||
uniquekey: cloneDeep(props.propsformobj.uniquekey), // 作业唯一标识 作业名称
|
||||
worktype: props.propsformobj.worktype?cloneDeep(props.propsformobj.worktype): '习题训练', //作业类型
|
||||
title: props.propsformobj.title?cloneDeep(props.propsformobj.title):'',// 作业说明
|
||||
quizlist: props.propsformobj.quizlist?cloneDeep(props.propsformobj.quizlist):[], // 作业习题列表内容
|
||||
chooseWorkLists: props.propsformobj.chooseWorkLists?cloneDeep(props.propsformobj.chooseWorkLists):[], // 作业框架梳理list
|
||||
fileHomeworkList: props.propsformobj.fileHomeworkList?cloneDeep(props.propsformobj.fileHomeworkList):[], // 常规作业文件列表
|
||||
whiteboardObj: props.propsformobj.whiteboardObj?cloneDeep(props.propsformobj.whiteboardObj):'', // 作业资源 - 课堂展示 白板
|
||||
quizlist: props.propsformobj.quizlist?cloneDeep(props.propsformobj.quizlist):[] // 作业习题列表内容
|
||||
}); // 提交的作业内容
|
||||
// ---------------------------------------------------
|
||||
const listWorkType = ref(['习题训练', '框架梳理', '课堂展示', '常规作业']); //作业类型
|
||||
|
||||
const chooseWorkLists = ref([]); // 框架梳理、?课堂展示
|
||||
const whiteboardObj = ref(''); // 作业资源 - 课堂展示 白板
|
||||
// 课堂展示-------
|
||||
const boardLoading = ref(false);
|
||||
const isShowBoard = ref(false); // 是否展示白板
|
||||
const question = ref(''); // 课堂展示 --问题说明
|
||||
const prevReadMsg = reactive({
|
||||
visible: false,
|
||||
type: ""
|
||||
|
@ -380,12 +379,14 @@ const prevReadMsg = reactive({
|
|||
const flowData = ref({})// 框架梳理
|
||||
//常规作业----------
|
||||
const fileLoading = ref(false); // 常规作业loading
|
||||
const fileHomeworkList = ref([]);// 常规作业
|
||||
|
||||
/***
|
||||
* 作业类型切换
|
||||
*/
|
||||
const changeFormType = (val) => {
|
||||
classWorkForm.worktype = val;
|
||||
console.log(val)
|
||||
classWorkForm.worktype = val;
|
||||
}
|
||||
|
||||
console.log(props.propsformobj)
|
||||
|
@ -627,7 +628,7 @@ const prevRead = async (item) => {
|
|||
// 把教学资源添加为作业
|
||||
const handleClassWorkAddOfResource = (work) => {
|
||||
// 当前资源下是否已存在
|
||||
let arrSole = classWorkForm.chooseWorkLists.filter((item) => {
|
||||
let arrSole = chooseWorkLists.value.filter((item) => {
|
||||
return item.worktype === classWorkForm.worktype
|
||||
})
|
||||
// 仅能添加一个
|
||||
|
@ -636,29 +637,25 @@ const handleClassWorkAddOfResource = (work) => {
|
|||
return;
|
||||
}
|
||||
//存入集合
|
||||
let arr = classWorkForm.chooseWorkLists.filter((item) => {
|
||||
let arr = chooseWorkLists.value.filter((item) => {
|
||||
return item.id === work.id
|
||||
})
|
||||
if (arr.length===0) {
|
||||
work.score = 1;
|
||||
classWorkForm.chooseWorkLists.push(work);
|
||||
chooseWorkLists.value.push(work);
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 右侧资源删除作业 非习题list
|
||||
* 删除作业
|
||||
*/
|
||||
const deleteClassWorkAddOfResource = (work) => {
|
||||
classWorkForm.chooseWorkLists.filter((item, index) => {
|
||||
chooseWorkLists.value.filter((item, index) => {
|
||||
if (item.id === work.id) {
|
||||
classWorkForm.chooseWorkLists.splice(index, 1);
|
||||
chooseWorkLists.value.splice(index, 1);
|
||||
return;
|
||||
}
|
||||
})
|
||||
}
|
||||
/** 右侧资源删除按钮 习题list */
|
||||
const handleClassWorkFormQuizRemove = (index) =>{
|
||||
classWorkForm.quizlist.splice(index, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -716,7 +713,8 @@ const handleClassWorkSave = async () => {
|
|||
let canvasJson = proxy.$refs.boardref.getCanvasJson()
|
||||
let canvasBase64 = await proxy.$refs.boardref.getCanvasBase64()
|
||||
// 课堂展示提交内容
|
||||
cform.title = classWorkForm.title;
|
||||
// cform.worktag = question.value;
|
||||
cform.title = question.value;
|
||||
cform.workcodes = JSON.stringify({json: canvasJson, base64: canvasBase64});
|
||||
cform.entpcourseworklist = JSON.stringify([{'id':-1, 'score': '10'}]);
|
||||
try {
|
||||
|
@ -729,8 +727,8 @@ const handleClassWorkSave = async () => {
|
|||
classWorkForm.quizlist = [], // 作业习题列表内容
|
||||
|
||||
// 情况选择的资源缓存
|
||||
classWorkForm.chooseWorkLists = []; // 框架梳理list
|
||||
classWorkForm.whiteboardObj = ''; // ? // 清空白板
|
||||
chooseWorkLists.value = [];
|
||||
whiteboardObj.value = ''; // ? // 清空白板
|
||||
// refresh the list
|
||||
//这里分离了,所以不需要更新表单数据了
|
||||
// this.getClassWorkAllList();
|
||||
|
@ -749,7 +747,7 @@ const handleClassWorkSave = async () => {
|
|||
}
|
||||
else if(classWorkForm.worktype === "常规作业"){
|
||||
fileLoading.value = true
|
||||
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
|
||||
cform.workcodes = JSON.stringify(fileHomeworkList.value);
|
||||
cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]);
|
||||
try {
|
||||
addClassworkReturnId(cform).then(() => {
|
||||
|
@ -761,9 +759,9 @@ const handleClassWorkSave = async () => {
|
|||
classWorkForm.quizlist = [], // 作业习题列表内容
|
||||
|
||||
// 情况选择的资源缓存
|
||||
classWorkForm.chooseWorkLists = []; // 框架梳理list
|
||||
classWorkForm.whiteboardObj = ''; // ? // 清空白板
|
||||
classWorkForm.fileHomeworkList = []; // 常规作业list
|
||||
chooseWorkLists.value = [];
|
||||
whiteboardObj.value = ''; // ? // 清空白板
|
||||
fileHomeworkList.value = []; // 常规作业list
|
||||
// refresh the list
|
||||
//这里分离了,所以不需要更新表单数据了
|
||||
// this.getClassWorkAllList();
|
||||
|
@ -790,7 +788,7 @@ const handleClassWorkSave = async () => {
|
|||
ll.push({'id': classWorkForm.quizlist[i].id, 'score': classWorkForm.quizlist[i].score});
|
||||
}
|
||||
}else if( classWorkForm.worktype === "框架梳理") {
|
||||
classWorkForm.chooseWorkLists.filter((item) => {
|
||||
chooseWorkLists.value.filter((item) => {
|
||||
if (item.worktype === classWorkForm.worktype) {
|
||||
ll.push({'id':item.id, 'score': item.score});
|
||||
}
|
||||
|
@ -814,8 +812,8 @@ const handleClassWorkSave = async () => {
|
|||
classWorkForm.quizlist = [], // 作业习题列表内容
|
||||
|
||||
// 情况选择的资源缓存
|
||||
classWorkForm.chooseWorkLists = [];
|
||||
classWorkForm.whiteboardObj = ''; // ? // 清空白板
|
||||
chooseWorkLists.value = [];
|
||||
whiteboardObj.value = ''; // ? // 清空白板
|
||||
// refresh the list
|
||||
//这里分离了,所以不需要更新表单数据了
|
||||
// this.getClassWorkAllList();
|
||||
|
@ -846,7 +844,7 @@ const editWork = async (cform) =>{
|
|||
// 不做校验
|
||||
|
||||
}else {
|
||||
if (classWorkForm.chooseWorkLists.length == 0) {
|
||||
if (chooseWorkLists.value.length == 0) {
|
||||
// 框架梳理
|
||||
ElMessage.error('请先添加作业资源!');
|
||||
return;
|
||||
|
@ -895,55 +893,74 @@ const editWork = async (cform) =>{
|
|||
}
|
||||
}
|
||||
|
||||
// 3.更新作业任务信息-判断最后更新了
|
||||
}
|
||||
else if (classWorkForm.worktype=='框架梳理') {
|
||||
// 1.先查询该workid下所有的id
|
||||
const wevalres = await listClassworkeval({'workid': classWorkForm.id});
|
||||
if (wevalres.rows.length == 0) {
|
||||
ElMessage.error('未找到原框架梳理任务,请或退出重试');
|
||||
return;
|
||||
// 3.更新作业任务信息
|
||||
// const evalid = this.homeworkLesson.length==0 ? '' : this.homeworkLesson.length==1 ? this.homeworkLesson[0] : this.homeworkLesson[1];
|
||||
// const formObj = {
|
||||
// id: this.currentTask.id,
|
||||
// uniquekey: this.classWorkForm.uniquekey, // 更新[作业名称]
|
||||
// // warn: 这里需确认是否可支持修改当前作业任务更换单元章节
|
||||
// //evalid = evalid, // 更新[作业范围]
|
||||
// }
|
||||
// let res = await updateClasswork(cform);
|
||||
let res = await updateClasswork(cform);
|
||||
if (res.code == 200) {
|
||||
ElMessage.success('更新成功');
|
||||
// 返回上一页
|
||||
router.back()
|
||||
}
|
||||
|
||||
// 2.更新作业任务下的框架梳理
|
||||
let needUplEval = false;
|
||||
if (classWorkForm.chooseWorkLists.length !== props.propsformobj.chooseWorkLists.length) {
|
||||
needUplEval = true;
|
||||
}else {
|
||||
// 只要有一个不一致则说明需要更新
|
||||
needUplEval = classWorkForm.chooseWorkLists.some(cur =>
|
||||
!props.propsformobj.chooseWorkLists.some(last =>
|
||||
last.id === cur.id && last.score === cur.score
|
||||
)
|
||||
);
|
||||
}
|
||||
if (needUplEval) {
|
||||
const uplParams = {
|
||||
id: wevalres.rows[0].id,
|
||||
entpcourseworkid: classWorkForm.chooseWorkLists[0].id,
|
||||
score: classWorkForm.chooseWorkLists[0].score,
|
||||
}
|
||||
// 更新作业任务下的框架梳理
|
||||
let res = await updateClassworkeval(uplParams);
|
||||
}
|
||||
}
|
||||
else if (classWorkForm.worktype=='课堂展示') {
|
||||
let canvasJson = proxy.$refs.boardref.getCanvasJson()
|
||||
let canvasBase64 = await proxy.$refs.boardref.getCanvasBase64()
|
||||
cform.workcodes = JSON.stringify({json: canvasJson, base64: canvasBase64});
|
||||
}
|
||||
else if (classWorkForm.worktype=='常规作业') {
|
||||
// 1.更新作业任务下的课堂展示内容 (这里未做校验, 直接将当前文件对象更新过去)
|
||||
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
|
||||
}
|
||||
|
||||
// 3.更新作业任务本身
|
||||
let res = await updateClasswork(cform);
|
||||
if (res.code == 200) {
|
||||
ElMessage.success('更新成功');
|
||||
// 返回上一页
|
||||
router.back()
|
||||
}
|
||||
// else if (classWorkForm.worktype=='框架梳理') {
|
||||
// // 1.先查询该workid下所有的id
|
||||
// const wevalres = await listClassworkeval({'workid': this.currentTask.id});
|
||||
// if (wevalres.rows.length == 0) {
|
||||
// ElMessage.error('未找到原框架梳理任务,请或退出重试');
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // 2.更新作业任务下的框架梳理
|
||||
// let needUplEval = false;
|
||||
// if (this.chooseWorkLists.length !== this.currentTask.entpcourseworklistarray.length) {
|
||||
// needUplEval = true;
|
||||
// }else {
|
||||
// // 只要有一个不一致则说明需要更新
|
||||
// needUplEval = this.chooseWorkLists.some(cur =>
|
||||
// !this.currentTask.entpcourseworklistarray.some(last =>
|
||||
// last.id === cur.id && last.score === cur.score
|
||||
// )
|
||||
// );
|
||||
// }
|
||||
// if (needUplEval) {
|
||||
// const uplParams = {
|
||||
// id: wevalres.rows[0].id,
|
||||
// entpcourseworkid: this.chooseWorkLists[0].id,
|
||||
// score: this.chooseWorkLists[0].score,
|
||||
// }
|
||||
// let res = await updateClassworkeval(uplParams);
|
||||
// }
|
||||
|
||||
// }else if (classWorkForm.worktype=='课堂展示') {
|
||||
|
||||
|
||||
// }else if (classWorkForm.worktype=='常规作业') {
|
||||
// // 1.更新作业任务下的课堂展示内容 (这里未做校验, 直接将当前文件对象更新过去)
|
||||
// classWorkParams.workcodes = JSON.stringify(this.fileHomeworkList);
|
||||
// }
|
||||
|
||||
// // 3.更新作业任务本身
|
||||
// let res = await updateClasswork(cform);
|
||||
// this.fileHomeworkList = [];
|
||||
// this.chooseWorkLists = [];
|
||||
|
||||
// // 4.操作完成后重新更新表单数据
|
||||
// //这里分离了,所以不需要更新表单数据了
|
||||
// // this.getClassWorkAllList();
|
||||
|
||||
// this.classWorkForm.worktype = "习题训练";
|
||||
// this.newWorkSpace = false;
|
||||
// this.newWorkSpaceEdit = false;
|
||||
// this.workEdit = false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -951,12 +968,7 @@ const editWork = async (cform) =>{
|
|||
onMounted(() => {
|
||||
})
|
||||
|
||||
watch(() => props.propsformobj.uniquekey, (newVal) => {
|
||||
console.log(props.propsformobj,'propsformobj')
|
||||
if(props.propsformobj.uniquekey){
|
||||
classWorkForm.uniquekey = props.propsformobj.uniquekey?cloneDeep(props.propsformobj.uniquekey):''; // 作业唯一标识 作业名称
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => props.bookobj.levelSecondId, (newVal) => {
|
||||
console.log(props.bookobj,'课程选择')
|
||||
// 习题资源
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<el-row class="c-warp" :gutter="10">
|
||||
<el-col class="left" :span="14">
|
||||
<el-col class="left" :span="12">
|
||||
<el-collapse class="c-item" v-model="activeTopic" accordion>
|
||||
<template v-for="(item, index) in dataList">
|
||||
<el-collapse-item class="collapse-item" :name="index+1" :id="'collapse-'+(index+1)">
|
||||
|
@ -54,9 +54,9 @@
|
|||
</template>
|
||||
</el-collapse>
|
||||
</el-col>
|
||||
<el-col class="right" :span="10">
|
||||
<el-col class="right" :span="12">
|
||||
<div class="c-item">
|
||||
<div class="title">提交情况</div>
|
||||
<div class="title">答题情况</div>
|
||||
<div class="respond">
|
||||
<el-space wrap>
|
||||
<!-- <template v-for="it in 11"> -->
|
||||
|
@ -114,9 +114,7 @@ colorArr = [
|
|||
]
|
||||
|
||||
// === 初始加载完 ===
|
||||
onMounted(() => {
|
||||
activeTopic.value = dataList.value.map((_, index) => index + 1);
|
||||
})
|
||||
onMounted(() => {})
|
||||
|
||||
// === 方法(methods) ===
|
||||
|
||||
|
@ -313,7 +311,7 @@ watchEffect(() => { initData() })
|
|||
background: #F2F3F5;
|
||||
height: 100%;
|
||||
margin: 0 !important;
|
||||
.left{padding-left: 0 !important; height: 100%;}
|
||||
.left{padding-left: 0 !important;}
|
||||
.right{padding-right: 0 !important;}
|
||||
.c-item{
|
||||
padding: 10px;
|
||||
|
@ -347,7 +345,6 @@ watchEffect(() => { initData() })
|
|||
}
|
||||
.t-left{width: 160px;text-align: left;}
|
||||
.c-respond{
|
||||
text-align: left;
|
||||
.el-tag{margin: 0 5px;}
|
||||
}
|
||||
}
|
||||
|
@ -362,7 +359,7 @@ watchEffect(() => { initData() })
|
|||
margin-bottom: 10px;
|
||||
}
|
||||
.respond{
|
||||
height: calc(100% - 65px);
|
||||
height: calc(70vh - 65px);
|
||||
overflow: auto;
|
||||
.el-space{padding: 5px;}
|
||||
.card-warp{
|
||||
|
|
|
@ -77,7 +77,6 @@ const props = defineProps({
|
|||
border-radius: 10px;
|
||||
padding: 10px 5px;
|
||||
margin-bottom: 10px;
|
||||
cursor: pointer;
|
||||
|
||||
.class-reserv-item-body {
|
||||
flex: 1;
|
||||
|
|
|
@ -15,16 +15,11 @@
|
|||
<!-- 标题 -->
|
||||
<el-row style="align-items: center; margin-bottom: 0px; flex: 0 0 auto">
|
||||
<el-col :span="12" style="padding-left: 20px; text-align: left;">
|
||||
<div v-if="!isOpenLeftBook" class="unit-top-left cursor-pointer" @click="onOpenLeftBook">
|
||||
<div class="unit-top-left" @click="isCollapse = !isCollapse">
|
||||
<i v-if="!isCollapse" class="iconfont icon-xiangzuo" style="color: blue;"></i>
|
||||
<span>课程目录</span>
|
||||
<i v-if="isCollapse" class="iconfont icon-xiangyou" style="color: blue;"></i>
|
||||
</div>
|
||||
<div v-else class="unit-top-left">
|
||||
<i class="iconfont icon-xiangzuo cursor-pointer" style="color: blue;" @click="goBack">返回上页</i>
|
||||
<span>课程:</span>
|
||||
<span>{{bookTitle}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="classtype-right">
|
||||
|
@ -35,13 +30,13 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<!-- 作业类型:内容 -->
|
||||
<task-type-view :bookobj="courseObj" :propsformobj="classWorkForm" :isedit="isOpenLeftBook" style="flex: 1; overflow: hidden;"/>
|
||||
<task-type-view :bookobj="courseObj" :propsformobj="classWorkForm" style="flex: 1; overflow: hidden;"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref, toRaw,watch, reactive, getCurrentInstance } from 'vue'
|
||||
import { onMounted, ref, toRaw,watch, reactive } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
|
||||
import ChooseTextbook from '@/components/choose-textbook/index.vue'
|
||||
|
@ -50,13 +45,8 @@ import { getCurrentTime } from '@/utils/date'
|
|||
import useUserStore from '@/store/modules/user'
|
||||
const userStore = useUserStore().user
|
||||
const route = useRoute();
|
||||
const router = useRouter()
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
const classtaskObj = route.query.classtaskObj;//作业布置的内容对象
|
||||
const bookTitle = ref(classtaskObj? JSON.parse(classtaskObj).bookName: '');// 课程名称
|
||||
const isOpenLeftBook = ref(classtaskObj? JSON.parse(classtaskObj).id ? true : false: false ); // 是否打开左侧目录
|
||||
const isCollapse = ref(isOpenLeftBook.value?true:false); // 是否展开左侧目录: false 默认展开,编辑状态关闭
|
||||
// ---------------------------------------------------
|
||||
const classWorkForm = reactive({
|
||||
id: classtaskObj? JSON.parse(classtaskObj).id : '', // 设计中的id
|
||||
|
@ -64,11 +54,9 @@ const classWorkForm = reactive({
|
|||
title: classtaskObj? JSON.parse(classtaskObj).title : '', // 设计中的说明
|
||||
worktype: classtaskObj? JSON.parse(classtaskObj).worktype : '', // 设计中的作业类型
|
||||
quizlist: classtaskObj? JSON.parse(classtaskObj).quizlist : [], // 设计中的试题列表
|
||||
chooseWorkLists: classtaskObj? JSON.parse(classtaskObj).chooseWorkLists : [],// 设计中的框架梳理list
|
||||
fileHomeworkList: classtaskObj? JSON.parse(classtaskObj).fileHomeworkList : [],// 设计中的常规文件作业list
|
||||
whiteboardObj: classtaskObj? JSON.parse(classtaskObj).whiteboardObj : '',// 设计中的 课堂展示 板书作业
|
||||
})
|
||||
|
||||
const isCollapse = ref(false)
|
||||
|
||||
const courseObj = reactive({
|
||||
// 课程相关参数: 教材id,单元id,章节id,课程名称
|
||||
|
@ -79,6 +67,7 @@ const courseObj = reactive({
|
|||
node: null, // 选择的课程节点
|
||||
//
|
||||
})
|
||||
|
||||
// ---------------------------------------------------
|
||||
|
||||
|
||||
|
@ -105,32 +94,16 @@ const getData = (data) => {
|
|||
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId}))
|
||||
}
|
||||
|
||||
const onOpenLeftBook = () => {
|
||||
if(isOpenLeftBook.value){
|
||||
// 编辑状态
|
||||
proxy.$modal.msgError(`当前为编辑状态不可选择课程!`);
|
||||
}else{
|
||||
// 新增状态
|
||||
isCollapse.value = !isCollapse.value
|
||||
}
|
||||
}
|
||||
// 返回上一页---返回布置页面
|
||||
const goBack = () =>{
|
||||
router.back()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 编辑状态下……更新课程信息
|
||||
if(classtaskObj&&JSON.parse(classtaskObj).bookObj){
|
||||
const bookobj = JSON.parse(classtaskObj).bookObj;
|
||||
courseObj.textbookId = bookobj.bookObj // 版本
|
||||
courseObj.levelFirstId = bookobj.levelFirstId // 单元
|
||||
courseObj.levelSecondId = bookobj.levelSecondId // 章节
|
||||
courseObj.coursetitle = bookobj.node.itemtitle // (单元/章节) 名称
|
||||
courseObj.node = bookobj.node; // 保存当前节点
|
||||
}
|
||||
// init()
|
||||
// sourceStore.getCreate()
|
||||
})
|
||||
|
||||
// const init = () => {
|
||||
// classWorkForm.uniquekey = userStore.edusubject+'-' + getCurrentTime('MMDD')+'-'+(1);
|
||||
|
||||
// }
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -147,10 +120,8 @@ onMounted(() => {
|
|||
width: 300px;
|
||||
min-height: 100%;
|
||||
}
|
||||
.cursor-pointer {
|
||||
cursor: pointer;// 鼠标变成小手可点样式
|
||||
}
|
||||
.unit-top-left {
|
||||
cursor: pointer;
|
||||
|
||||
.icon-xiangzuo {
|
||||
margin-right: 5px;
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
v-if="classWorkAnalysis.row.worktype == '习题训练'"
|
||||
:type="classWorkAnalysis.view == 'quizStats' ? 'success' : ''"
|
||||
@click="workHandle('quizStats')"
|
||||
>逐题分析</el-button
|
||||
>作业概况</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="classWorkAnalysis.row.worktype == '习题训练'"
|
||||
:type="classWorkAnalysis.view == 'report' ? 'success' : ''"
|
||||
@click="handleClassOverviewOpen('report')"
|
||||
>整体分析</el-button
|
||||
>作业报告</el-button
|
||||
>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
@ -71,17 +71,12 @@
|
|||
>
|
||||
<el-table-column type="index" label="序号" width="52" reserve-selection align="center" />
|
||||
<el-table-column label="姓名" prop="studentname" width="100" align="center" />
|
||||
<el-table-column :label="tableRadio.value==0?'提交状态':'提交时间'" prop="updatedate" width="170" align="center">
|
||||
<template #default="scope">
|
||||
<span v-if="tableRadio.value==0" style="color: #2196f3">未提交</span>
|
||||
<span v-if="tableRadio.value==1">{{ scope.row.updatedate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提交时间" prop="updatedate" width="170" align="center" />
|
||||
<el-table-column label="批阅状态" prop="teacherRating" align="center" width="120" sortable>
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.teacherRating == 0">
|
||||
<span v-if="tableRadio.value==1" style="color: #2196f3">待批阅</span>
|
||||
</template>
|
||||
<template v-if="scope.row.teacherRating == 0"
|
||||
><span style="color: #2196f3">待批阅</span></template
|
||||
>
|
||||
<!-- 1-优 2-优减 3-良 4-良减 5-差 -->
|
||||
<template v-if="scope.row.teacherRating == 1"
|
||||
><el-tag type="danger">优</el-tag></template
|
||||
|
@ -131,12 +126,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 逐题分析 -->
|
||||
<!-- 作业概况 -->
|
||||
<div v-else-if="classWorkAnalysis.view == 'quizStats'" style="width: 100%;">
|
||||
<quiz-stats :active-data="classWorkActiveData" style="width: 100%;height: 100%;"/>
|
||||
</div>
|
||||
|
||||
<!-- 整体分析-->
|
||||
<!-- 作业报告-->
|
||||
<div v-else-if="classWorkAnalysis.view == 'report'" style="width: 100%;overflow-y: scroll">
|
||||
<!-- <ClassOverview :table-list="overviewData" :eval-id="courseObj.evalid"></ClassOverview> -->
|
||||
<ClassOverview :table-list="overviewData" style="width: 100%;"></ClassOverview>
|
||||
|
@ -180,7 +175,7 @@ const tableRadio = reactive({
|
|||
const loading_dt_table = ref(false)
|
||||
const isopen_dtwk_table = ref(false)
|
||||
|
||||
// zdg: 逐题分析
|
||||
// zdg: 作业概况
|
||||
const classWorkActiveData = reactive({
|
||||
quizlist: [], // 当前习题列表
|
||||
studentList: [], // 当前课程-所有学生
|
||||
|
@ -346,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
|
||||
|
@ -359,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) + '%'
|
||||
|
@ -528,7 +523,7 @@ const escapeHtmlQuotes = (str) => {
|
|||
return result;
|
||||
}
|
||||
|
||||
//#region 逐题分析
|
||||
//#region 作业概况
|
||||
// 查看学生-作业概览
|
||||
const workHandle = (type) => {
|
||||
// 关闭右侧批阅ui
|
||||
|
@ -536,7 +531,6 @@ const workHandle = (type) => {
|
|||
classWorkAnalysis.view = type
|
||||
const isClose = type != 'quizStats' && !! classWorkActiveData.timerId
|
||||
const isOpen = type == 'quizStats' && !classWorkActiveData.timerId
|
||||
// 每次进来都重新调用一次
|
||||
if(type == 'quizStats') {
|
||||
getWorkFeedList();
|
||||
}
|
||||
|
@ -563,11 +557,11 @@ const getWorkFeedList = async() =>{
|
|||
//#endregion
|
||||
|
||||
|
||||
//#regin 整体分析
|
||||
//#regin 作业报告
|
||||
/*
|
||||
author: yangws
|
||||
time: 2024-8-06 16:35:33
|
||||
function: 整体分析的处理
|
||||
function:作业报告的处理
|
||||
*/
|
||||
const handleClassOverviewOpen = (type) =>{
|
||||
// 关闭右侧批阅ui
|
||||
|
@ -645,12 +639,12 @@ onMounted(() => {
|
|||
watch(classWorkAnalysis, (newVal, oldVal) => {
|
||||
if(newVal.view != 'quizStats'){
|
||||
console.log('关闭zdg: 定时执行')
|
||||
clearInterval(classWorkActiveData.timerId) // 关闭定时器 逐题分析的
|
||||
clearInterval(classWorkActiveData.timerId) // 关闭定时器 作业概况的
|
||||
}
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
clearInterval(classWorkActiveData.timerId) // 关闭定时器 逐题分析的
|
||||
clearInterval(classWorkActiveData.timerId) // 关闭定时器 作业概况的
|
||||
})
|
||||
|
||||
// defineExpose({
|
||||
|
|
|
@ -37,7 +37,6 @@ import { homeworklist } from '@/api/teaching/classwork'
|
|||
import { getCurrentTime, getTomorrow } from '@/utils/date'
|
||||
import {sessionStore, createWindow} from '@/utils/tool'
|
||||
import { useToolState } from '@/store/modules/tool'
|
||||
import {throttle,debounce } from '@/utils/comm'
|
||||
|
||||
const user = useUserStore().user
|
||||
const toolState = useToolState();
|
||||
|
@ -68,18 +67,14 @@ const getHomework = async () => {
|
|||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const debounceOpenWin = debounce(() => {
|
||||
toolState.isTaskWin=true; // 设置打开批改窗口
|
||||
createWindow('open-taskwin',{url:'/teachClassTask'}); // 调用新窗口批改页面
|
||||
}, 1000);
|
||||
|
||||
// 批改作业
|
||||
const onClickItem = (item) => {
|
||||
console.log('防抖开启弹窗')
|
||||
sessionStore.set('teachClassWorkItem', item); // 缓存点击的item
|
||||
debounceOpenWin();
|
||||
console.log('开启弹窗')
|
||||
// itemDialogRef.value.openDialog(item)
|
||||
// 调用新窗口批改页面
|
||||
sessionStore.set('teachClassWorkItem', item)
|
||||
toolState.isTaskWin=true //设置打开批改窗口
|
||||
createWindow('open-taskwin',{url:'/teachClassTask'})
|
||||
}
|
||||
|
||||
const tagType = (time) => {
|
||||
|
@ -135,7 +130,6 @@ watch(
|
|||
border-radius: 5px;
|
||||
margin-bottom: 10px;
|
||||
padding: 10px;
|
||||
cursor: pointer;
|
||||
|
||||
.class-left {
|
||||
flex-direction: column;
|
||||
|
|
|
@ -183,10 +183,10 @@ const clickMenu = ({isOuter, path, disabled, id}) =>{
|
|||
// 头部 教材分析打开外部链接需要当前章节ID
|
||||
const { id, rootid } = sessionStore.get('subject.curNode')
|
||||
if(fullPath.indexOf('?') == -1){
|
||||
fullPath += `?unitId=${id}&bookId=${rootid}`
|
||||
fullPath += `?unitId=${id}&bookeId=${rootid}`
|
||||
}
|
||||
else{
|
||||
fullPath += `&unitId=${id}&bookId=${rootid}`
|
||||
fullPath += `&unitId=${id}&bookeId=${rootid}`
|
||||
}
|
||||
}
|
||||
fullPath = fullPath.replaceAll('//', '/')
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="login-container">
|
||||
<div class="box-item desc">
|
||||
<div class="welcome">
|
||||
<p>欢迎登录 {{ homeTitle }}</p>
|
||||
<p>欢迎登录 {{homeTitle}}</p>
|
||||
</div>
|
||||
<img class="welcome-img" :src="leftBg2" />
|
||||
</div>
|
||||
|
@ -14,28 +14,46 @@
|
|||
<el-input v-model.trim="loginForm.username" placeholder="请输入用户名" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password" style="margin-bottom: 15px">
|
||||
<el-input v-model="loginForm.password" autocomplete="on" type="password" placeholder="请输入密码" />
|
||||
<el-input
|
||||
v-model="loginForm.password"
|
||||
autocomplete="on"
|
||||
type="password"
|
||||
placeholder="请输入密码"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div class="flex mb-5">
|
||||
<el-checkbox v-model="loginForm.rememberMe">记住密码</el-checkbox>
|
||||
<!-- <el-checkbox >阅读并同意《xxx》</el-checkbox> -->
|
||||
<el-checkbox v-model="loginForm.rememberMe" >记住密码</el-checkbox>
|
||||
<!-- <el-checkbox >阅读并同意《xxx》</el-checkbox> -->
|
||||
</div>
|
||||
|
||||
<el-form-item>
|
||||
<el-button :loading="btnLoading" class="btn" type="primary" @click="submitForm(formRef)">登录</el-button>
|
||||
<el-button :loading="btnLoading" class="btn" type="primary" @click="submitForm(formRef)"
|
||||
>登录</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<div class="flex mb-4" style="display: flex;justify-content: center;color: #ccc;cursor: pointer;">
|
||||
<a class="hover:text-sky-500" style="margin-right: 10px;" @click="RegisterModel(1)">注册账号</a>
|
||||
|
|
||||
<a class="hover:text-sky-500" style="margin-left: 10px;" @click="RegisterModel(2)">忘记密码</a>
|
||||
<a class="hover:text-sky-500" style="margin-right: 10px;" @click="RegisterModel(1)">注册账号</a>
|
||||
|
|
||||
<a class="hover:text-sky-500" style="margin-left: 10px;" @click="RegisterModel(2)">忘记密码</a>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog v-model="showDownLoading" width="500" :show-close="false" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false" align-center>
|
||||
<el-progress :text-inside="true" :stroke-width="22" :percentage="downloadProp" :show-text="false"
|
||||
status="success" />
|
||||
<el-dialog
|
||||
v-model="showDownLoading"
|
||||
width="500"
|
||||
:show-close="false"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
align-center
|
||||
>
|
||||
<el-progress
|
||||
:text-inside="true"
|
||||
:stroke-width="22"
|
||||
:percentage="downloadProp"
|
||||
:show-text="false"
|
||||
status="success"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!--选择学科-->
|
||||
<SelectSubject v-model="isSubject" :login-data="loginForm" />
|
||||
|
@ -51,7 +69,6 @@ import leftBg2 from '@/assets/images/login/left-bg2.png'
|
|||
import WindowTools from '@/components/window-tools/index.vue'
|
||||
import SelectSubject from '@/components/select-subject/index.vue'
|
||||
import Register from './components/Register.vue'
|
||||
import { sessionStore } from '@/utils/store'
|
||||
|
||||
const { session } = require('@electron/remote')
|
||||
const downloadProp = ref(0)
|
||||
|
@ -82,7 +99,7 @@ ipcRenderer.on('update-app-progress', (e, prop) => {
|
|||
showDownLoading.value = prop !== 100
|
||||
})
|
||||
// 打开弹窗
|
||||
const RegisterModel = type => {
|
||||
const RegisterModel = type =>{
|
||||
RegModel.value.OpenModel(type)
|
||||
}
|
||||
//登录
|
||||
|
@ -151,13 +168,6 @@ const setCookie = (name, value) => {
|
|||
|
||||
onMounted(() => {
|
||||
localStorage.clear()
|
||||
sessionStore.set('subject', {
|
||||
bookList: null,
|
||||
curBook: null,
|
||||
curNode: null,
|
||||
defaultExpandedKeys: [],
|
||||
subjectTree: []
|
||||
})
|
||||
getCookie()
|
||||
})
|
||||
</script>
|
||||
|
@ -169,7 +179,6 @@ onMounted(() => {
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
-webkit-app-region: drag;
|
||||
|
||||
.box-item {
|
||||
width: 444px;
|
||||
height: 520px;
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
<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>
|
||||
</div>
|
||||
<el-button type="primary" :icon="Refresh" round title="刷新" @click="getQrUrl()" />
|
||||
<!-- <el-button type="warning" :loading="dt.loadingDel" @click="removeClasscourse()">删除记录</el-button>-->
|
||||
</template>
|
||||
<!-- 手机登录 -->
|
||||
|
@ -81,22 +80,19 @@
|
|||
<script setup>
|
||||
// 功能说明:课程开始
|
||||
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 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_api from '@/api/apiService' // api接口
|
||||
import * as Http_Entpcoursefile from '@/api/education/entpcoursefile' // api接口
|
||||
import useUserStore from "@/store/modules/user" // 状态管理:user
|
||||
import CryptoJS from 'crypto-js'
|
||||
|
||||
let baseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
|
||||
const baseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
|
||||
const userStore = useUserStore()
|
||||
const visible = ref(false) // 是否打开窗口
|
||||
const myClassActive = ref({}) // 我的课件:准备上课的APT课件
|
||||
|
@ -193,9 +189,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
|
||||
});
|
||||
// 默认选中第一项
|
||||
|
@ -281,37 +277,13 @@ const classTeachingStart = async () => {
|
|||
}
|
||||
}
|
||||
// 获取二维码地址
|
||||
const getQrUrl = async() => {
|
||||
const getQrUrl = () => {
|
||||
const { classcourseid:id } = teacherForm.form
|
||||
const { userName, userId } = userStore.user
|
||||
const { userName } = userStore.user
|
||||
if (!id||!userName) return
|
||||
// 原始方法(需要wx登录)
|
||||
// const qrCodeUrl = `wxlogin?username=${userName}&nextaction=classteaching&id=${id}`
|
||||
// teacherForm.form.qrUrl = baseUrl + qrCodeUrl
|
||||
// baseUrl = 'https://localhost:7860'
|
||||
// token跳转
|
||||
let 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 = `${url}&_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 = `${url}&?_web=${enStrUrl}`
|
||||
}
|
||||
const qrCodeUrl = `wxlogin?username=${userName}&nextaction=classteaching&id=${id}`
|
||||
teacherForm.form.qrUrl = baseUrl + qrCodeUrl
|
||||
}
|
||||
// 定时器监听
|
||||
|
||||
// ================== 监听 =======================
|
||||
// im-chat: 聊天事件 {type, data}
|
||||
|
|
|
@ -86,16 +86,10 @@
|
|||
<span>布置</span>
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="item-popover-item">
|
||||
<el-button text @click="reSetHomeWork(item, index)">
|
||||
<i class="iconfont icon-bianji"></i>
|
||||
<span>编辑</span>
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="item-popover-item">
|
||||
<el-button text @click="deleteHomework(item)">
|
||||
<i class="iconfont icon-shanchu"></i>
|
||||
<span style="color: red;">删除</span>
|
||||
<span>删除</span>
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -116,7 +110,7 @@
|
|||
<div class="item-popover-item" v-if="userInfo.userId === Number(item.createUserId)">
|
||||
<el-button text @click="deleteTalk(item)">
|
||||
<i class="iconfont icon-shanchu"></i>
|
||||
<span style="color: red;">删除</span>
|
||||
<span>删除</span>
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="item-popover-item">
|
||||
|
@ -174,7 +168,7 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-reSet': null, 'on-delhomework': null,'on-filearg': null },
|
||||
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null,'on-filearg': null },
|
||||
data() {
|
||||
return {
|
||||
listenList: [],
|
||||
|
@ -281,10 +275,6 @@ export default {
|
|||
setHomeWork(item) {
|
||||
this.$emit('on-set', item)
|
||||
},
|
||||
// 编辑
|
||||
reSetHomeWork(item) {
|
||||
this.$emit('on-reSet', item)
|
||||
},
|
||||
// 删除作业
|
||||
deleteHomework(item){
|
||||
this.$emit('on-delhomework', item)
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
<div class="item-popover-item">
|
||||
<el-button text @click="deleteTalk(item)">
|
||||
<i class="iconfont icon-shanchu"></i>
|
||||
<span style="color: red;">删除</span>
|
||||
<span>删除</span>
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -102,11 +102,6 @@ import { deleteSmarttalk, updateSmarttalk, getPrepareById } from '@/api/file'
|
|||
import useUserStore from '@/store/modules/user'
|
||||
import outLink from '@/utils/linkConfig'
|
||||
import { sessionStore } from '@/utils/store'
|
||||
import { listClasscourseNew } from '@/api/teaching/classcourse'
|
||||
import { endClass, getSelfReserv } from '@/api/classManage'
|
||||
import { listEntpcourse } from '@/api/teaching/classwork'
|
||||
import { createWindow } from '@/utils/tool'
|
||||
import { defineExpose } from 'vue'
|
||||
|
||||
const { ipcRenderer } = window.electron || {}
|
||||
export default {
|
||||
|
@ -136,7 +131,6 @@ export default {
|
|||
default: ''
|
||||
}
|
||||
},
|
||||
expose: ['openFileWin'],
|
||||
emits: { 'on-start-class': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null,'on-filearg': null },
|
||||
data() {
|
||||
return {
|
||||
|
@ -148,87 +142,8 @@ export default {
|
|||
this.userInfo = useUserStore().user
|
||||
},
|
||||
methods: {
|
||||
getOpenCourse() {
|
||||
return Promise.all([listClasscourseNew({teacherid: this.userInfo.userId,status:"open",evalid: this.curNode.id,pageSize:1000}), getSelfReserv({ex2:this.curNode.id})]).then(([res1,res2])=>{
|
||||
let list2 = res1.rows || []
|
||||
let list = res2.data || []
|
||||
let one = list.find(item1 => {
|
||||
if (item1.status === "上课中") {
|
||||
return true
|
||||
}
|
||||
})
|
||||
if (one) {
|
||||
return one
|
||||
}
|
||||
if (list2.length>0) {
|
||||
one = list2[0]
|
||||
}
|
||||
return one
|
||||
})
|
||||
},
|
||||
clickStartClass(item) {
|
||||
this.getOpenCourse().then(res=>{
|
||||
if(!res){
|
||||
this.$emit('on-start-class', item)
|
||||
}else{
|
||||
ElMessageBox.alert('<strong>上次课程尚未结束,是否继续上课?</strong>', '', {
|
||||
// if you want to disable its autofocus
|
||||
// autofocus: false,
|
||||
confirmButtonText: '下课 ',
|
||||
cancelButtonText: '继续上课',
|
||||
showCancelButton: true,
|
||||
showClose: false,
|
||||
closeOnClickModal: true,
|
||||
distinguishCancelAndClose: true,
|
||||
dangerouslyUseHTMLString: true,
|
||||
cancelButtonClass: "el-button--primary",
|
||||
confirmButtonClass: "el-button--danger",
|
||||
center: true,
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm'){
|
||||
// 下课
|
||||
if (res.bookImg) {
|
||||
//PPT
|
||||
endClass(res.id).then((res1) => {
|
||||
if (res1.data === true) {
|
||||
ElMessage({
|
||||
message: '下课成功',
|
||||
type: 'success'
|
||||
})
|
||||
res.status = '已结束'
|
||||
done()
|
||||
}
|
||||
})
|
||||
}else {
|
||||
//APT
|
||||
}
|
||||
}
|
||||
if (action === 'cancel'){
|
||||
// 继续上课
|
||||
if (res.bookImg) {
|
||||
//PPT
|
||||
listEntpcourse({
|
||||
evalid: res.ex2,
|
||||
edituserid: useUserStore().user.userId,
|
||||
pageSize: 500
|
||||
}).then(async res1=>{
|
||||
if (res1.rows[0].id) {
|
||||
createWindow('tool-sphere', { url: '/tool/sphere?entpcourseid=' + res1.rows[0].id + "&reservId=" + res.id })
|
||||
done()
|
||||
}
|
||||
})
|
||||
}else {
|
||||
//APT
|
||||
}
|
||||
}
|
||||
if (action === 'close') {
|
||||
done()
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
})
|
||||
// this.$emit('on-start-class', item)
|
||||
this.$emit('on-start-class', item)
|
||||
},
|
||||
editTalk(item) {
|
||||
ElMessageBox.prompt('请输入新的标签', '添加标签', {
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
<kj-list-item
|
||||
v-for="(item, index) in currentKJFileList"
|
||||
:key="index"
|
||||
:ref="'kjItemRef'+item.id"
|
||||
:item="item"
|
||||
:index="index"
|
||||
:curNode="currentNode"
|
||||
|
@ -29,11 +28,42 @@
|
|||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="教学实录" name="教学实录" class="prepare-center-jxsl">
|
||||
<class-reserv v-if="activeAptTab==='教学实录'" :curNode="currentNode"></class-reserv>
|
||||
<class-reserv></class-reserv>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div class="page-right">
|
||||
<!-- <div class="header-top flex">
|
||||
<div class="textbook-img" @click="navtoPdf">
|
||||
<el-image style="width: 80px; height: 110px" :src="curBookImg" />
|
||||
<el-progress
|
||||
v-if="downloadNum > 0 && downloadNum < 100"
|
||||
style="position: absolute; left: 0; z-index: 999"
|
||||
type="circle"
|
||||
:percentage="downloadNum"
|
||||
/>
|
||||
</div>
|
||||
<div class="top-item">
|
||||
<el-button class="btn" @click="handleOutLink('standard')">课标研读</el-button>
|
||||
<el-button class="btn" @click="openReserv">预约课程</el-button>
|
||||
<el-button class="btn" @click="handleOutLink('gk')">高考研读</el-button>
|
||||
<el-button class="btn" @click="handleOutLink('aiModel')">教学大模型</el-button>
|
||||
</div>
|
||||
<el-button
|
||||
:type="!curClassReserv.id ? 'info' : 'primary'"
|
||||
:disabled="!curClassReserv.id || toolStore.isToolWin"
|
||||
class="to-class-btn"
|
||||
@click="openLesson"
|
||||
>
|
||||
<label
|
||||
><i class="iconfont icon-lingdang"></i
|
||||
>{{ curClassReserv.status == '上课中' ? '上课中' : '上课' }}</label
|
||||
>
|
||||
<label>{{ curClassReserv.classDay }} {{ getWeekday1(curClassReserv.classDay) }}</label>
|
||||
<label>{{ curClassReserv.startTime }}-{{ curClassReserv.endTime }}</label>
|
||||
</el-button>
|
||||
<div class="top-zoom-style"></div>
|
||||
</div>-->
|
||||
<div style="padding: 0 20px;height: 100%;">
|
||||
<el-tabs v-model="activeTab" class="prepare-tabs" >
|
||||
<el-tab-pane label="素材" name="素材">
|
||||
|
@ -86,20 +116,22 @@
|
|||
</el-checkbox-group>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="作业" name="作业">
|
||||
<div class="prepare-body-header">
|
||||
<!-- <div class="prepare-body-header">
|
||||
<div>
|
||||
<label style="font-size: 15px">共{{ currentWorkList.length }}个作业</label>
|
||||
<el-button size="small" @click="handleOutLink('homeWork')">作业设计</el-button>
|
||||
<el-button size="small" @click="handleOutLink('feedback')">作业反馈</el-button>
|
||||
<el-button size="small" @click="handleOutLink('homeWork')">布置作业</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="prepare-work-wrap">
|
||||
<file-list-item
|
||||
v-for="(item, index) in currentWorkList"
|
||||
:key="index"
|
||||
:item="item"
|
||||
:index="index"
|
||||
@on-move="onMoveSingleFile"
|
||||
@on-delete="deleteTalk"
|
||||
@on-set="openSet"
|
||||
@on-reSet="openReSet"
|
||||
@on-delhomework="delhomework"
|
||||
>
|
||||
</file-list-item>
|
||||
|
@ -273,29 +305,29 @@ export default {
|
|||
// },
|
||||
methods: {
|
||||
startClass(item) {
|
||||
// console.log(item, sessionStore)
|
||||
// 关闭状态,打开上课相关功能(已打开,忽略)
|
||||
const id = sessionStore.has('activeClass.id') ? sessionStore.get('activeClass.id') : null
|
||||
if (id && id == item.id) return ElMessage.warning('当前正在上课,请勿重复操作')
|
||||
// 当前上课-store
|
||||
sessionStore.set('activeClass', item)
|
||||
this.activeClass = item
|
||||
if(item.fileFlag === '课件') {
|
||||
this.openReserv()
|
||||
}
|
||||
if(item.fileFlag === 'apt') {
|
||||
this.$refs.calssRef.open(item.fileId)
|
||||
}
|
||||
// 当前上课-store
|
||||
sessionStore.set('activeClass', item)
|
||||
this.activeClass = item
|
||||
},
|
||||
closeChange() { // 上课弹窗被关闭-触发
|
||||
console.log('关闭上课弹窗')
|
||||
// this.activeClass = null
|
||||
this.activeClass = null
|
||||
sessionStore.delete('activeClass')
|
||||
},
|
||||
initReserv(id) {
|
||||
getClassInfo(id).then((res) => {
|
||||
this.curClassReserv = res.data
|
||||
this.openLesson(res.data.id);
|
||||
this.$refs['kjItemRef'+this.activeClass.id][0].openFileWin(this.activeClass);
|
||||
})
|
||||
},
|
||||
getBookPathFromServer() {
|
||||
|
@ -338,9 +370,6 @@ export default {
|
|||
createFile() {
|
||||
creatPPT(this.currentNode.itemtitle + '.pptx', this.uploadData).then((res) => {
|
||||
this.currentFileList.unshift(res.resData)
|
||||
setTimeout(()=>{
|
||||
this.$refs['kjItemRef'+res.resData.id][0].openFileWin(res.resData);
|
||||
},500)
|
||||
})
|
||||
},
|
||||
createAptFile() {
|
||||
|
@ -422,9 +451,6 @@ export default {
|
|||
fileShowName: this.currentNode.itemtitle + '.apt'
|
||||
}).then((res) => {
|
||||
this.currentFileList.unshift(res.resData)
|
||||
setTimeout(()=>{
|
||||
this.$refs['kjItemRef'+res.resData.id][0].openFileWin(res.resData);
|
||||
},500)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -570,7 +596,6 @@ export default {
|
|||
openReserv() {
|
||||
this.$refs['reservDialog'].openDialog()
|
||||
},
|
||||
|
||||
// 打开外部链接
|
||||
handleOutLink(key) {
|
||||
if (key == 'homeWork') {
|
||||
|
@ -584,15 +609,12 @@ export default {
|
|||
let unitId = this.uploadData.levelSecondId
|
||||
? this.uploadData.levelSecondId
|
||||
: this.uploadData.levelFirstId
|
||||
let bookId = this.uploadData.textbookId;
|
||||
if(fullPath.indexOf('?') == -1){
|
||||
fullPath += `?unitId=${unitId}&bookId=${bookId}&openDialog=newClassTask`
|
||||
}
|
||||
else{
|
||||
fullPath += `&unitId=${unitId}&bookId=${bookId}&openDialog=newClassTask`
|
||||
if (key == 'gk') {
|
||||
fullPath += `?unitId=${unitId}`
|
||||
} else {
|
||||
fullPath += `&unitId=${unitId}`
|
||||
}
|
||||
}
|
||||
|
||||
// 通知主进程
|
||||
ipcRenderer.send('openWindow', {
|
||||
key,
|
||||
|
@ -610,27 +632,6 @@ export default {
|
|||
this.row = row
|
||||
this.setDialog = true
|
||||
},
|
||||
// 打开作业编辑窗口
|
||||
openReSet(row) {
|
||||
// 新窗口打开标识
|
||||
this.isOpenHomework = true;
|
||||
// key 对应的 linkConfig.js 外部链接配置
|
||||
let configObj = outLink()['homeWork']
|
||||
let fullPath = configObj.fullPath
|
||||
|
||||
let unitId = this.uploadData.levelSecondId
|
||||
? this.uploadData.levelSecondId
|
||||
: this.uploadData.levelFirstId
|
||||
let bookId = this.uploadData.textbookId;
|
||||
fullPath += `&unitId=${unitId}&bookId=${bookId}&courseWorkId=${row.id}`
|
||||
|
||||
// 通知主进程
|
||||
ipcRenderer.send('openWindow', {
|
||||
key: 'homeWork',
|
||||
fullPath: fullPath,
|
||||
cookieData: { ...configObj.data }
|
||||
})
|
||||
},
|
||||
// 删除作业
|
||||
delhomework(item) {
|
||||
this.isLoading = true
|
||||
|
@ -873,7 +874,6 @@ export default {
|
|||
width: 100%;
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.prepare-body-main {
|
||||
flex: 1;
|
||||
|
|
|
@ -57,13 +57,6 @@
|
|||
</div>
|
||||
<div class="right-align">{{ state.user.createTime }}</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="left-align">
|
||||
<Paperclip class="Calendar"/>
|
||||
<span>版本编号</span>
|
||||
</div>
|
||||
<div class="right-align">v{{version}}</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</el-card>
|
||||
|
@ -90,15 +83,13 @@
|
|||
</template>
|
||||
|
||||
<script setup name="Profile">
|
||||
import { UserFilled, Cellphone, Message, Suitcase, Avatar, Calendar, Paperclip } from '@element-plus/icons-vue'
|
||||
import { UserFilled, Cellphone, Message, Suitcase, Avatar, Calendar } from '@element-plus/icons-vue'
|
||||
import { ref, reactive } from 'vue'
|
||||
import userAvatar from './userAvatar.vue'
|
||||
import userInfo from './userInfo.vue'
|
||||
import resetPwd from './resetPwd.vue'
|
||||
import { getUserProfile } from '@/api/system/user'
|
||||
import pkc from "../../../../../package.json"
|
||||
|
||||
const version = ref(pkc.version)
|
||||
const activeTab = ref('userinfo')
|
||||
const state = reactive({
|
||||
user: {},
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
@click="delRow(item)"
|
||||
>
|
||||
<i class="iconfont icon-shanchu"></i>
|
||||
<span style="color: red;">删除</span>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
<div class="item-popover-item" @click="downloadFile(item)">
|
||||
<i class="iconfont icon-xiazai"></i>
|
||||
|
|
|
@ -8,31 +8,25 @@
|
|||
<h3 class="title">{{ lesson }}</h3>
|
||||
<div class="grade">{{ usertore.edusubject }}</div>
|
||||
</div>
|
||||
<!-- <i class="iconfont icon-xiangyou" @click="showLeft = !showLeft"></i> -->
|
||||
<i class="iconfont icon-xiangyou" @click="showLeft = !showLeft"></i>
|
||||
</div>
|
||||
<div class="homework-list" v-loading="loading">
|
||||
<el-scrollbar height="360px">
|
||||
<ul>
|
||||
<!--资源-->
|
||||
<template v-for="item in resourceList" :key="item.id">
|
||||
<!--
|
||||
apt pptx 暂时不显示
|
||||
2024-10-10
|
||||
-->
|
||||
<li class="item flex" v-if="item.fileFlag != 'apt' && item.fileSuffix != 'pptx' && item.fileSuffix != 'ppt'">
|
||||
<div class="item-left flex" >
|
||||
<FileImage :size="50" :file-name="item.fileShowName" />
|
||||
<div class="item-info flex">
|
||||
<span class="item-name">{{ item.fileShowName }}</span>
|
||||
<div class="item-student">
|
||||
<span class="item-option">{{ item.fileFlag }}</span>
|
||||
<span>{{ item.fileSuffix }}</span>
|
||||
</div>
|
||||
<li class="item flex" v-for="item in resourceList" :key="item.id">
|
||||
<div class="item-left flex">
|
||||
<FileImage :size="50" :file-name="item.fileShowName" />
|
||||
<div class="item-info flex">
|
||||
<span class="item-name">{{ item.fileShowName }}</span>
|
||||
<div class="item-student">
|
||||
<span class="item-option">{{ item.fileFlag }}</span>
|
||||
<span>{{ item.fileSuffix }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-button color="#349d44" @click="openFileLink(item)">推送</el-button>
|
||||
</li>
|
||||
</template>
|
||||
</div>
|
||||
<el-button color="#349d44" @click="openFileLink(item)">推送</el-button>
|
||||
</li>
|
||||
<!--作业-->
|
||||
<li class="item flex" v-for="item in dataList" :key="item.id">
|
||||
<div class="item-left flex">
|
||||
|
@ -176,6 +170,7 @@ const openFileLink = async (item) =>{
|
|||
// 获取资源数据
|
||||
const getResource = () => {
|
||||
let querySearch = toRaw(toolStore.curSubjectNode).querySearch
|
||||
|
||||
querySearch.orderByColumn = 'uploadTime'
|
||||
querySearch.isAsc = 'desc'
|
||||
querySearch.pageSize = 500
|
||||
|
@ -222,6 +217,8 @@ onMounted(async () => {
|
|||
curNode.data = sessionStore.get('subject.curNode')
|
||||
getHomework()
|
||||
getResource()
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
@ -48,9 +48,9 @@ const props = defineProps({
|
|||
data: { // 数据
|
||||
type: Array,
|
||||
default: () => [
|
||||
{ label: '活动', prop: 'resource', icon: 'icon-kechengziyuan1' },
|
||||
// { label: '互动', prop: 'interact', icon: 'icon-hudong' },
|
||||
// { label: '窗口', prop: 'win', icon: 'icon-tubiaozhizuomobanyihuifu-' },
|
||||
{ label: '资源', prop: 'resource', icon: 'icon-kechengziyuan1' },
|
||||
{ label: '互动', prop: 'interact', icon: 'icon-hudong' },
|
||||
{ label: '窗口', prop: 'win', icon: 'icon-tubiaozhizuomobanyihuifu-' },
|
||||
{ label: '下课', prop: 'over', isExtra: true, icon: 'icon-a-lujing13357' },
|
||||
]
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ const clickHandel = (o, e) => {
|
|||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 10px;
|
||||
//min-height: 40vh;
|
||||
min-height: 40vh;
|
||||
min-width: 4em;
|
||||
border-radius: 4em;
|
||||
background-color: #121212;
|
||||
|
|
|
@ -220,13 +220,13 @@ const sideChange = async o => {
|
|||
await imChatRef.value?.imChatObj?.imChat?.sendMsgClosed() // 发送下课消息
|
||||
// const elMsg = ElMessage.warning({duration:0,message:'正在下课...'})
|
||||
const elMsg = ElLoading.service({lock: true, text: '正在下课...', background: 'rgba(0, 0, 0, 0.7)'})
|
||||
// toolStore.isToolWin = false
|
||||
toolStore.resetDef() // 重置状态
|
||||
await classManageApi.endClass(route.query.reservId)
|
||||
// 延迟2秒后关闭窗口,如果马上解散群,会导致群组不存在
|
||||
setTimeout(async() => {
|
||||
// toolStore.isToolWin = false
|
||||
toolStore.resetDef() // 重置状态
|
||||
await imChatRef.value?.deleteGroup() // 解散群
|
||||
await imChatRef.value?.logout() // 退出im
|
||||
await classManageApi.endClass(route.query.reservId)
|
||||
elMsg.close()
|
||||
ipcMsgSend('tool-sphere:close') // 关闭窗口
|
||||
}, 500);
|
||||
|
|
Loading…
Reference in New Issue