Merge branch 'main' into zhuhao_dev

This commit is contained in:
朱浩 2024-10-11 15:00:23 +08:00
commit f209bc673f
23 changed files with 843 additions and 240 deletions

View File

@ -66,7 +66,7 @@
"xlsx": "^0.18.5", "xlsx": "^0.18.5",
"less": "^4.2.0", "less": "^4.2.0",
"less-loader": "^7.3.0", "less-loader": "^7.3.0",
"whiteboard_lyc": "^0.0.8" "whiteboard_lyc": "^0.1.3"
}, },
"devDependencies": { "devDependencies": {
"@electron-toolkit/eslint-config": "^1.0.2", "@electron-toolkit/eslint-config": "^1.0.2",

View File

@ -1,9 +1,9 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 2794390 */ font-family: "iconfont"; /* Project id 2794390 */
src: url('iconfont.woff2?t=1727403518918') format('woff2'), src: url('iconfont.woff2?t=1728543886557') format('woff2'),
url('iconfont.woff?t=1727403518918') format('woff'), url('iconfont.woff?t=1728543886557') format('woff'),
url('iconfont.ttf?t=1727403518918') format('truetype'), url('iconfont.ttf?t=1728543886557') format('truetype'),
url('iconfont.svg?t=1727403518918#iconfont') format('svg'); url('iconfont.svg?t=1728543886557#iconfont') format('svg');
} }
.iconfont { .iconfont {
@ -14,6 +14,18 @@
-moz-osx-font-smoothing: grayscale; -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 { .icon-a-1_jiaoxuefansi:before {
content: "\e6cd"; content: "\e6cd";
} }

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,27 @@
"css_prefix_text": "icon-", "css_prefix_text": "icon-",
"description": "", "description": "",
"glyphs": [ "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", "icon_id": "37027693",
"name": "教学反思", "name": "教学反思",

View File

@ -14,6 +14,12 @@
/> />
<missing-glyph /> <missing-glyph />
<glyph glyph-name="A1" unicode="&#58933;" 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="&#59119;" 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="&#59043;" 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="&#59085;" 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="a-1_jiaoxuefansi" unicode="&#59085;" 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="&#65711;" 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" /> <glyph glyph-name="iconfontzhizuobiaozhunbduan3-1" unicode="&#65711;" 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: 358 KiB

After

Width:  |  Height:  |  Size: 362 KiB

View File

@ -34,7 +34,7 @@ const getFileTypeIcon = () => {
gif: 'icon-gif', gif: 'icon-gif',
txt: 'icon-txt', txt: 'icon-txt',
rar: 'icon-rar', rar: 'icon-rar',
apt: 'icon-lunwen' apt: 'icon-A'
} }
if (iconObj[name]) { if (iconObj[name]) {
return '#' + iconObj[name] return '#' + iconObj[name]

View File

@ -60,10 +60,12 @@
<el-button>{{ type == 'design' ? '形状' : '工具' }}</el-button> <el-button>{{ type == 'design' ? '形状' : '工具' }}</el-button>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item command="square">正方形</el-dropdown-item>
<el-dropdown-item command="rectangle">矩形</el-dropdown-item> <el-dropdown-item command="rectangle">矩形</el-dropdown-item>
<el-dropdown-item command="diamond">菱形</el-dropdown-item> <el-dropdown-item command="diamond">菱形</el-dropdown-item>
<el-dropdown-item command="triangle">三角形</el-dropdown-item> <el-dropdown-item command="triangle">三角形</el-dropdown-item>
<el-dropdown-item command="circle">圆形</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="line">线段</el-dropdown-item>
<el-dropdown-item command="arrow">箭头</el-dropdown-item> <el-dropdown-item command="arrow">箭头</el-dropdown-item>
<template v-if="type != 'design'"> <template v-if="type != 'design'">
@ -397,7 +399,7 @@ const scroll = reactive({
// //
const showGrid = ref(false) const showGrid = ref(false)
// //
// const readonly = ref(false) const readonly = ref(false)
// //
const elReadonly = ref(false) const elReadonly = ref(false)
@ -675,8 +677,8 @@ const getCanvasBase64 = async () =>{
let base64 = await app.exportImage({ let base64 = await app.exportImage({
type: 'image/jpeg', type: 'image/jpeg',
renderBg: exportRenderBackground.value, renderBg: exportRenderBackground.value,
paddingX: 0, paddingX: 10,
paddingY: 0, paddingY: 10,
onlySelected: exportOnlySelected.value, onlySelected: exportOnlySelected.value,
backgroundColor: '#ffffff' backgroundColor: '#ffffff'
}) })

View File

@ -310,3 +310,44 @@ export function timeToStr(time,str = '时分秒', isPad = false) {
if (isPad) return `${h?toStr(h)+arr[0]:''}${m?toStr(m)+arr[1]:''}${toStr(s)}${arr[2]||''}` 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]||'':''}` 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;
}
};
}

View File

@ -100,6 +100,17 @@ export const getCurrentTime = (format)=> {
if(format == 'MMDD'){ if(format == 'MMDD'){
return `${month}${day}`; 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}`;
}
} }
/** /**
* *

View File

@ -72,6 +72,7 @@ import { getCurrentTime, getTomorrow } from '@/utils/date'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import useClassTaskStore from "@/store/modules/classTask"; import useClassTaskStore from "@/store/modules/classTask";
import {sessionStore, createWindow} from '@/utils/tool' import {sessionStore, createWindow} from '@/utils/tool'
import {throttle,debounce } from '@/utils/comm'
const toolState = useToolState(); const toolState = useToolState();
@ -377,7 +378,10 @@ const closeDialog = () => {
getStudentClassWorkDataPolling() getStudentClassWorkDataPolling()
} }
const openDialogTime = ref(null);// const debounceOpenWin = debounce(() => {
toolState.isTaskWin=true; //
createWindow('open-taskwin',{url:'/teachClassTask'}); //
}, 1000);
/** /**
* 开启新批改弹窗 * 开启新批改弹窗
* @param item 作业对象 * @param item 作业对象
@ -385,17 +389,10 @@ const openDialogTime = ref(null);//弹窗
const onClickItem = (item) => { const onClickItem = (item) => {
console.log('开启弹窗,关闭作业进度轮询') console.log('开启弹窗,关闭作业进度轮询')
clearInterval(pollingST.value) clearInterval(pollingST.value)
// itemDialogRef.value.openDialog(item)
if(openDialogTime.value) return; console.log('防抖开启弹窗')
clearTimeout(openDialogTime.value)
openDialogTime.value = setTimeout(() => {
openDialogTime.value = null;
toolState.isTaskWin=true; //
sessionStore.set('teachClassWorkItem', item); // item sessionStore.set('teachClassWorkItem', item); // item
// debounceOpenWin();
createWindow('open-taskwin',{url:'/teachClassTask'})
}, 1000)
} }

View File

@ -92,7 +92,7 @@
<el-table-column v-if="props.initDataProps.queryType!=='single'" label="推送配置" align="left" min-width="16%"> <el-table-column v-if="props.initDataProps.queryType!=='single'" label="推送配置" align="left" min-width="16%">
<template #default="scope"> <template #default="scope">
<div style="display: flex"> <div style="display: flex">
<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> <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>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -149,21 +149,103 @@
@click="submitWorkTitle('submit')"> </el-button> @click="submitWorkTitle('submit')"> </el-button>
</div> </div>
</el-dialog> </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>
</div> </div>
</template> </template>
<script setup> <script setup>
import { onMounted, ref, toRaw,watch, reactive, getCurrentInstance } from 'vue' import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import ChooseTextbook from '@/components/choose-textbook/index.vue' import ChooseTextbook from '@/components/choose-textbook/index.vue'
import { homeworklist, delClasswork } from '@/api/teaching/classwork' import { homeworklist, delClasswork } from '@/api/teaching/classwork'
import { listEntpcoursework, listClassworkeval,updateClasswork } from '@/api/classTask' import { listEntpcoursework, listClassworkeval,updateClasswork,getEvaluationclue } from '@/api/classTask'
import { listClassmain, listClassgroup } from '@/api/classManage/index'
import { saveByClassWorkArray } from '@/api/teaching/classwork'
import { useGetHomework } from '@/hooks/useGetHomework' import { useGetHomework } from '@/hooks/useGetHomework'
import { processList } from '@/hooks/useProcessList' import { processList } from '@/hooks/useProcessList'
import { uniqBy, groupBy } from 'lodash'
import { getCurrentTime } from '@/utils/date' import { getCurrentTime } from '@/utils/date'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
const userStore = useUserStore().user const userStore = useUserStore().user
@ -210,6 +292,22 @@ const workConfObj = reactive({
quizlist: [], // list 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
}); //
// --------------------------------------------------- // ---------------------------------------------------
@ -454,13 +552,17 @@ const handleWorkEdit = (row, index) =>{
// -- // --
let classtaskObj = reactive({ let classtaskObj = reactive({
id: '', // id: '', //
bookName: '', //
uniquekey: '', // uniquekey: '', //
title: '', // title: '', //
worktype: '', // worktype: '', //
quizlist: [], // quizlist: [], //
chooseWorkLists: [],// list
fileHomeworkList: [],// list
whiteboardObj: '',//
}) })
// - // -
const newHandleWorkEdit2ClassWorkQuizAdd =(row, index) =>{ const newHandleWorkEdit2ClassWorkQuizAdd = async (row, index) =>{
// this.newWorkSpace = true; // this.newWorkSpace = true;
// this.newWorkSpaceEdit = true; // this.newWorkSpaceEdit = true;
// this.currentTask = row; // this.currentTask = row;
@ -485,10 +587,15 @@ const newHandleWorkEdit2ClassWorkQuizAdd =(row, index) =>{
if (listCourseWork.length > 0) { if (listCourseWork.length > 0) {
classtaskObj.id= row.id; // classtaskObj.id= row.id; //
classtaskObj.bookObj = courseObj; //
classtaskObj.bookName = row.evaltitle? row.evalparenttitle+'/'+row.evaltitle: row.evalparenttitle// :/
classtaskObj.uniquekey= row.uniquekey; // classtaskObj.uniquekey= row.uniquekey; //
classtaskObj.title= row.title; // classtaskObj.title= row.title; //
classtaskObj.worktype= row.worktype; // classtaskObj.worktype= row.worktype; //
classtaskObj.quizlist= []; // classtaskObj.quizlist= []; //
classtaskObj.chooseWorkLists = []; // list
classtaskObj.fileHomeworkList = []; // list
classtaskObj.whiteboardObj = ''; //
if (row.worktype == '框架梳理') { if (row.worktype == '框架梳理') {
@ -498,14 +605,16 @@ const newHandleWorkEdit2ClassWorkQuizAdd =(row, index) =>{
// queryParams.ppttype = ''; // queryParams.ppttype = '';
// queryParams.title = ''; // queryParams.title = '';
// queryParams.filetype = 'draw'; // queryParams.filetype = 'draw';
// const res = await getEvaluationclue(listCourseWork[0].id); const res = await getEvaluationclue(listCourseWork[0].id);
// if ( res.data==null || res.data==undefined ) { if ( res.data==null || res.data==undefined ) {
// return; return;
// } }
console.log('res.data', res.data);
// this.chooseWorkLists = []; // this.chooseWorkLists = [];
// res.data.worktype = ''; res.data.worktype = '框架梳理';
// res.data.score = listCourseWork[0].score; res.data.score = listCourseWork[0].score;
// this.chooseWorkLists.push(res.data); classtaskObj.chooseWorkLists.push(res.data);
//
} }
else if (row.worktype == '习题训练') { else if (row.worktype == '习题训练') {
const ids = listCourseWork.map(item => item.id).join(","); const ids = listCourseWork.map(item => item.id).join(",");
@ -513,7 +622,6 @@ const newHandleWorkEdit2ClassWorkQuizAdd =(row, index) =>{
// for (var i=0; i<idres.rows.length; i++) { // for (var i=0; i<idres.rows.length; i++) {
// idres.rows[i].titletext = idres.rows[i].title.replace(/<[^>]+>/g, ''); // idres.rows[i].titletext = idres.rows[i].title.replace(/<[^>]+>/g, '');
// } // }
// //
if(idres.rows&&idres.rows.length > 0){ if(idres.rows&&idres.rows.length > 0){
processList(idres.rows); processList(idres.rows);
@ -527,43 +635,417 @@ const newHandleWorkEdit2ClassWorkQuizAdd =(row, index) =>{
}); });
classtaskObj.quizlist = idres.rows; classtaskObj.quizlist = idres.rows;
// //
}
})
}
else if (row.worktype == '课堂展示') {
console.log('row.课堂展示', row.workcodes);
const workcodes = JSON.parse(row.workcodes);
classtaskObj.whiteboardObj = JSON.stringify(workcodes.json);
//
}
else if (row.worktype == '常规作业') {
if(isJson(row.workcodes)){
classtaskObj.fileHomeworkList = JSON.parse(row.workcodes);
//
}
}
//
router.push({ router.push({
path: '/newClassTask', path: '/newClassTask',
query: { query: {
classtaskObj: JSON.stringify(classtaskObj), 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)
} }
}) })
} }
else if (this.classWorkForm.worktype == '课堂展示') { //
if (node.level == 2) {
// const workcodes = JSON.parse(this.currentTask.workcodes); resolve(node.data.children)
// const jsonString = JSON.stringify(workcodes.json);
// await this.$nextTick();
// this.isShowBoard = true
// this.whiteboardObj = jsonString;
} }
else if (this.classWorkForm.worktype == '常规作业') { }
// this.fileHomeworkList = [];
// if(isJson(this.currentTask.workcodes)){ //
// this.fileHomeworkList = JSON.parse(this.currentTask.workcodes); 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);
}
}
// 20240408207
// 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(); //131
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;
// 20240308by jackyshen
// classWorkConfigForm.classWorkConfigListtaskList[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;
// 20240308by jackyshen
// classWorkConfigForm.classWorkConfigListtaskList[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: '', // classworkjson
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 = () => { const submitWorkTitle = () => {

View File

@ -121,9 +121,7 @@
:max="classWorkFormScore.teacherRating[sIndex].maxScore" :max="classWorkFormScore.teacherRating[sIndex].maxScore"
size="small" size="small"
:disabled=" :disabled="
(quItem.worktype == '单选题' || quItem.worktype == '多选题') && (quItem.worktype == '单选题' || quItem.worktype == '多选题' || quItem.worktype == '判断题')
stuItem.feedcontent == stuItem.rightanswer &&
stuItem.feedcontent != ''
? true ? true
: false : false
" "

View File

@ -33,13 +33,13 @@
v-if="classWorkAnalysis.row.worktype == '习题训练'" v-if="classWorkAnalysis.row.worktype == '习题训练'"
:type="classWorkAnalysis.view == 'quizStats' ? 'success' : ''" :type="classWorkAnalysis.view == 'quizStats' ? 'success' : ''"
@click="workHandle('quizStats')" @click="workHandle('quizStats')"
>作业概况</el-button >逐题分析</el-button
> >
<el-button <el-button
v-if="classWorkAnalysis.row.worktype == '习题训练'" v-if="classWorkAnalysis.row.worktype == '习题训练'"
:type="classWorkAnalysis.view == 'report' ? 'success' : ''" :type="classWorkAnalysis.view == 'report' ? 'success' : ''"
@click="handleClassOverviewOpen('report')" @click="handleClassOverviewOpen('report')"
>作业报告</el-button >整体分析</el-button
> >
</el-button-group> </el-button-group>
</el-row> </el-row>
@ -81,12 +81,17 @@
> >
<el-table-column type="index" label="序号" width="52" reserve-selection align="center" /> <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="姓名" prop="studentname" width="100" align="center" />
<el-table-column label="提交时间" prop="updatedate" width="170" 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="teacherRating" align="center" width="120" sortable> <el-table-column label="批阅状态" prop="teacherRating" align="center" width="120" sortable>
<template #default="scope"> <template #default="scope">
<template v-if="scope.row.teacherRating == 0" <template v-if="scope.row.teacherRating == 0">
><span style="color: #2196f3">待批阅</span></template <span v-if="tableRadio.value==1" style="color: #2196f3">待批阅</span>
> </template>
<!-- 1- 2-优减 3- 4-良减 5- --> <!-- 1- 2-优减 3- 4-良减 5- -->
<template v-if="scope.row.teacherRating == 1" <template v-if="scope.row.teacherRating == 1"
><el-tag type="danger"></el-tag></template ><el-tag type="danger"></el-tag></template
@ -136,12 +141,12 @@
</div> </div>
</div> </div>
<!-- 作业概况 --> <!-- 逐题分析 -->
<div v-else-if="classWorkAnalysis.view == 'quizStats'"> <div v-else-if="classWorkAnalysis.view == 'quizStats'">
<quiz-stats :active-data="classWorkActiveData" /> <quiz-stats :active-data="classWorkActiveData" />
</div> </div>
<!-- 作业报告--> <!-- 整体分析-->
<div v-else-if="classWorkAnalysis.view == 'report'" style="overflow-y: scroll"> <div v-else-if="classWorkAnalysis.view == 'report'" style="overflow-y: scroll">
<!-- <ClassOverview :table-list="overviewData" :eval-id="courseObj.evalid"></ClassOverview> --> <!-- <ClassOverview :table-list="overviewData" :eval-id="courseObj.evalid"></ClassOverview> -->
<ClassOverview :table-list="overviewData"></ClassOverview> <ClassOverview :table-list="overviewData"></ClassOverview>
@ -188,7 +193,7 @@ const tableRadio = reactive({
const loading_dt_table = ref(false) const loading_dt_table = ref(false)
const isopen_dtwk_table = ref(false) const isopen_dtwk_table = ref(false)
// zdg: // zdg:
const classWorkActiveData = reactive({ const classWorkActiveData = reactive({
quizlist: [], // quizlist: [], //
studentList: [], // - studentList: [], // -
@ -531,7 +536,7 @@ const escapeHtmlQuotes = (str) => {
return result; return result;
} }
//#region //#region
// - // -
const workHandle = (type) => { const workHandle = (type) => {
// ui // ui
@ -566,11 +571,11 @@ const getWorkFeedList = async() =>{
//#endregion //#endregion
//#regin //#regin
/* /*
author: yangws author: yangws
time: 2024-8-06 16:35:33 time: 2024-8-06 16:35:33
function:作业报告的处理 function: 整体分析的处理
*/ */
const handleClassOverviewOpen = (type) =>{ const handleClassOverviewOpen = (type) =>{
// ui // ui
@ -638,12 +643,12 @@ const closeDialog = () => {
watch(classWorkAnalysis, (newVal, oldVal) => { watch(classWorkAnalysis, (newVal, oldVal) => {
if(newVal.view != 'quizStats'){ if(newVal.view != 'quizStats'){
console.log('关闭zdg: 定时执行') console.log('关闭zdg: 定时执行')
clearInterval(classWorkActiveData.timerId) // clearInterval(classWorkActiveData.timerId) //
} }
}) })
onUnmounted(() => { onUnmounted(() => {
clearInterval(classWorkActiveData.timerId) // clearInterval(classWorkActiveData.timerId) //
}) })
defineExpose({ defineExpose({

View File

@ -7,9 +7,9 @@
<el-row class="top"> <el-row class="top">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="作业类型:"> <el-form-item label="作业类型:">
<el-radio-group v-model="formType" @change="changeFormType"> <el-radio-group v-model="classWorkForm.worktype" @change="changeFormType">
<template v-for="(item) in listWorkType" :key="item"> <template v-for="(item) in listWorkType" :key="item">
<el-radio :value="item" >{{ item }}</el-radio> <el-radio :value="item" :disabled="props.isedit">{{ item }}</el-radio>
</template> </template>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
@ -21,12 +21,12 @@
<div v-if="classWorkForm.worktype == '课堂展示'" style="height: 100%; display: flex; flex-direction: column;"> <div v-if="classWorkForm.worktype == '课堂展示'" style="height: 100%; display: flex; flex-direction: column;">
<div style="flex: 0 0 auto;"> <div style="flex: 0 0 auto;">
<el-form-item label="问题"> <el-form-item label="问题">
<el-input v-model="question" type="text" placeholder="请输入问题" /> <el-input v-model="classWorkForm.title" type="text" placeholder="请输入问题" />
</el-form-item> </el-form-item>
</div> </div>
<div v-loading="boardLoading" class="board-wrap" style="height: 100%; flex: 1; overflow: hidden;"> <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 v-if="isShowBoard" ref="boardref" :height="mainHeight - 150" :isShowSave="false" :data="whiteboardObj"/> -->
<whiteboard ref="boardref" :height="mainHeight - 150" :isShowSave="false" :data="whiteboardObj"/> <whiteboard ref="boardref" :height="mainHeight - 150" :isShowSave="false" :data="classWorkForm.whiteboardObj"/>
</div> </div>
</div> </div>
<div v-else class="el-form-work-list"> <div v-else class="el-form-work-list">
@ -154,7 +154,7 @@
</template> </template>
<template v-if="classWorkForm.worktype =='常规作业'"> <template v-if="classWorkForm.worktype =='常规作业'">
<div v-loading="fileLoading" class="upload-homework"> <div v-loading="fileLoading" class="upload-homework">
<FileUpload v-model="fileHomeworkList" :fileSize="800" :fileType="['mp3','mp4','doc','docx','xlsx','xls','pdf','ppt','pptx','jpg','jpeg','gif','png','txt']"/> <FileUpload v-model="classWorkForm.fileHomeworkList" :fileSize="800" :fileType="['mp3','mp4','doc','docx','xlsx','xls','pdf','ppt','pptx','jpg','jpeg','gif','png','txt']"/>
</div> </div>
</template> </template>
</div> </div>
@ -180,7 +180,7 @@
<div v-if="classWorkForm.worktype!='习题训练'" :style="{'overflow': 'auto', 'border':'1px dotted blue','border-radius':'5px', 'background-color': '#f7f7f7'}"> <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"> <div style="margin: 5px; background-color: white">
<template v-for="(item) in chooseWorkLists" :key="item.id"> <template v-for="(item) in classWorkForm.chooseWorkLists" :key="item.id">
<div v-if="item.worktype==classWorkForm.worktype"> <div v-if="item.worktype==classWorkForm.worktype">
<div class="choose-work"> <div class="choose-work">
<div class="choose-work-title">{{ item.worktype }}</div> <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 {listEntpcoursework, listEntpcourseworkNew, getEntpcoursework} from '@/api/education/entpCourseWork'
import { addClassworkReturnId } from '@/api/teaching/classwork' import { addClassworkReturnId } from '@/api/teaching/classwork'
import { updateClasswork, listEvaluationclue,readFile, listClassworkeval,delClassworkeval,addClassworkeval } from '@/api/classTask' import { updateClasswork, listEvaluationclue,readFile, listClassworkeval,delClassworkeval,addClassworkeval,updateClassworkeval } from '@/api/classTask'
import { listEvaluation } from '@/api/subject' import { listEvaluation } from '@/api/subject'
import { listEntpcoursefile } from '@/api/education/entpcoursefile' import { listEntpcoursefile } from '@/api/education/entpcoursefile'
import { listKnowledgePoint } from "@/api/knowledge/knowledgePoint"; import { listKnowledgePoint } from "@/api/knowledge/knowledgePoint";
@ -279,6 +279,10 @@ const props = defineProps({
propsformobj: { propsformobj: {
type: Object, type: Object,
default: () =>({}) default: () =>({})
},
isedit: {
type: Boolean,
default: false
} }
}) })
@ -289,11 +293,6 @@ const openDialog = () => {
isDialogOpen.value = true isDialogOpen.value = true
} }
const classWorkFormRef = ref(null); const classWorkFormRef = ref(null);
const formType = ref('习题训练')
const newWorkSpaceEdit = ref(false); //
// ---------------------------------------------------
const listWorkType = ref(['习题训练', '框架梳理', '课堂展示', '常规作业']); //
const entpCourseWorkTypeList = ref([ const entpCourseWorkTypeList = ref([
{value: 0, label: "不限"}, {value: 0, label: "不限"},
{value: 1, label: "单选题"}, {value: 1, label: "单选题"},
@ -360,17 +359,19 @@ const workResource = reactive({
}); // }); //
let classWorkForm = reactive({ let classWorkForm = reactive({
id: cloneDeep(props.propsformobj.id), id: cloneDeep(props.propsformobj.id),
uniquekey: cloneDeep(props.propsformobj.uniquekey), // uniquekey: props.propsformobj.uniquekey?cloneDeep(props.propsformobj.uniquekey):'', //
worktype: props.propsformobj.worktype?cloneDeep(props.propsformobj.worktype): '习题训练', // worktype: props.propsformobj.worktype?cloneDeep(props.propsformobj.worktype): '习题训练', //
title: props.propsformobj.title?cloneDeep(props.propsformobj.title):'',// title: props.propsformobj.title?cloneDeep(props.propsformobj.title):'',//
quizlist: props.propsformobj.quizlist?cloneDeep(props.propsformobj.quizlist):[] // 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):'', // -
}); // }); //
const chooseWorkLists = ref([]); // // ---------------------------------------------------
const whiteboardObj = ref(''); // - const listWorkType = ref(['习题训练', '框架梳理', '课堂展示', '常规作业']); //
// ------- // -------
const boardLoading = ref(false); const boardLoading = ref(false);
const isShowBoard = ref(false); //
const question = ref(''); // --
const prevReadMsg = reactive({ const prevReadMsg = reactive({
visible: false, visible: false,
type: "" type: ""
@ -379,13 +380,11 @@ const prevReadMsg = reactive({
const flowData = ref({})// const flowData = ref({})//
//---------- //----------
const fileLoading = ref(false); // loading const fileLoading = ref(false); // loading
const fileHomeworkList = ref([]);//
/*** /***
* 作业类型切换 * 作业类型切换
*/ */
const changeFormType = (val) => { const changeFormType = (val) => {
console.log(val)
classWorkForm.worktype = val; classWorkForm.worktype = val;
} }
@ -628,7 +627,7 @@ const prevRead = async (item) => {
// //
const handleClassWorkAddOfResource = (work) => { const handleClassWorkAddOfResource = (work) => {
// //
let arrSole = chooseWorkLists.value.filter((item) => { let arrSole = classWorkForm.chooseWorkLists.filter((item) => {
return item.worktype === classWorkForm.worktype return item.worktype === classWorkForm.worktype
}) })
// //
@ -637,25 +636,29 @@ const handleClassWorkAddOfResource = (work) => {
return; return;
} }
// //
let arr = chooseWorkLists.value.filter((item) => { let arr = classWorkForm.chooseWorkLists.filter((item) => {
return item.id === work.id return item.id === work.id
}) })
if (arr.length===0) { if (arr.length===0) {
work.score = 1; work.score = 1;
chooseWorkLists.value.push(work); classWorkForm.chooseWorkLists.push(work);
} }
}; };
/** /**
* 删除作业 * 右侧资源删除作业 非习题list
*/ */
const deleteClassWorkAddOfResource = (work) => { const deleteClassWorkAddOfResource = (work) => {
chooseWorkLists.value.filter((item, index) => { classWorkForm.chooseWorkLists.filter((item, index) => {
if (item.id === work.id) { if (item.id === work.id) {
chooseWorkLists.value.splice(index, 1); classWorkForm.chooseWorkLists.splice(index, 1);
return; return;
} }
}) })
} }
/** 右侧资源删除按钮 习题list */
const handleClassWorkFormQuizRemove = (index) =>{
classWorkForm.quizlist.splice(index, 1);
}
@ -713,8 +716,7 @@ const handleClassWorkSave = async () => {
let canvasJson = proxy.$refs.boardref.getCanvasJson() let canvasJson = proxy.$refs.boardref.getCanvasJson()
let canvasBase64 = await proxy.$refs.boardref.getCanvasBase64() let canvasBase64 = await proxy.$refs.boardref.getCanvasBase64()
// //
// cform.worktag = question.value; cform.title = classWorkForm.title;
cform.title = question.value;
cform.workcodes = JSON.stringify({json: canvasJson, base64: canvasBase64}); cform.workcodes = JSON.stringify({json: canvasJson, base64: canvasBase64});
cform.entpcourseworklist = JSON.stringify([{'id':-1, 'score': '10'}]); cform.entpcourseworklist = JSON.stringify([{'id':-1, 'score': '10'}]);
try { try {
@ -727,8 +729,8 @@ const handleClassWorkSave = async () => {
classWorkForm.quizlist = [], // classWorkForm.quizlist = [], //
// //
chooseWorkLists.value = []; classWorkForm.chooseWorkLists = []; // list
whiteboardObj.value = ''; // ? // classWorkForm.whiteboardObj = ''; // ? //
// refresh the list // refresh the list
// //
// this.getClassWorkAllList(); // this.getClassWorkAllList();
@ -747,7 +749,7 @@ const handleClassWorkSave = async () => {
} }
else if(classWorkForm.worktype === "常规作业"){ else if(classWorkForm.worktype === "常规作业"){
fileLoading.value = true fileLoading.value = true
cform.workcodes = JSON.stringify(fileHomeworkList.value); cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]); cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]);
try { try {
addClassworkReturnId(cform).then(() => { addClassworkReturnId(cform).then(() => {
@ -759,9 +761,9 @@ const handleClassWorkSave = async () => {
classWorkForm.quizlist = [], // classWorkForm.quizlist = [], //
// //
chooseWorkLists.value = []; classWorkForm.chooseWorkLists = []; // list
whiteboardObj.value = ''; // ? // classWorkForm.whiteboardObj = ''; // ? //
fileHomeworkList.value = []; // list classWorkForm.fileHomeworkList = []; // list
// refresh the list // refresh the list
// //
// this.getClassWorkAllList(); // this.getClassWorkAllList();
@ -788,7 +790,7 @@ const handleClassWorkSave = async () => {
ll.push({'id': classWorkForm.quizlist[i].id, 'score': classWorkForm.quizlist[i].score}); ll.push({'id': classWorkForm.quizlist[i].id, 'score': classWorkForm.quizlist[i].score});
} }
}else if( classWorkForm.worktype === "框架梳理") { }else if( classWorkForm.worktype === "框架梳理") {
chooseWorkLists.value.filter((item) => { classWorkForm.chooseWorkLists.filter((item) => {
if (item.worktype === classWorkForm.worktype) { if (item.worktype === classWorkForm.worktype) {
ll.push({'id':item.id, 'score': item.score}); ll.push({'id':item.id, 'score': item.score});
} }
@ -812,8 +814,8 @@ const handleClassWorkSave = async () => {
classWorkForm.quizlist = [], // classWorkForm.quizlist = [], //
// //
chooseWorkLists.value = []; classWorkForm.chooseWorkLists = [];
whiteboardObj.value = ''; // ? // classWorkForm.whiteboardObj = ''; // ? //
// refresh the list // refresh the list
// //
// this.getClassWorkAllList(); // this.getClassWorkAllList();
@ -844,7 +846,7 @@ const editWork = async (cform) =>{
// //
}else { }else {
if (chooseWorkLists.value.length == 0) { if (classWorkForm.chooseWorkLists.length == 0) {
// //
ElMessage.error('请先添加作业资源!'); ElMessage.error('请先添加作业资源!');
return; return;
@ -893,74 +895,55 @@ const editWork = async (cform) =>{
} }
} }
// 3. // 3.-
// const evalid = this.homeworkLesson.length==0 ? '' : this.homeworkLesson.length==1 ? this.homeworkLesson[0] : this.homeworkLesson[1]; }
// const formObj = { else if (classWorkForm.worktype=='框架梳理') {
// id: this.currentTask.id, // 1.workidid
// uniquekey: this.classWorkForm.uniquekey, // [] const wevalres = await listClassworkeval({'workid': classWorkForm.id});
// // warn: if (wevalres.rows.length == 0) {
// //evalid = evalid, // [] ElMessage.error('未找到原框架梳理任务,请或退出重试');
// } return;
// let res = await updateClasswork(cform); }
// 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); let res = await updateClasswork(cform);
if (res.code == 200) { if (res.code == 200) {
ElMessage.success('更新成功'); ElMessage.success('更新成功');
// //
router.back() router.back()
} }
}
// else if (classWorkForm.worktype=='') {
// // 1.workidid
// 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;
} }
@ -968,7 +951,12 @@ const editWork = async (cform) =>{
onMounted(() => { 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) => { watch(() => props.bookobj.levelSecondId, (newVal) => {
console.log(props.bookobj,'课程选择') console.log(props.bookobj,'课程选择')
// //

View File

@ -1,6 +1,6 @@
<template> <template>
<el-row class="c-warp" :gutter="10"> <el-row class="c-warp" :gutter="10">
<el-col class="left" :span="12"> <el-col class="left" :span="14">
<el-collapse class="c-item" v-model="activeTopic" accordion> <el-collapse class="c-item" v-model="activeTopic" accordion>
<template v-for="(item, index) in dataList"> <template v-for="(item, index) in dataList">
<el-collapse-item class="collapse-item" :name="index+1" :id="'collapse-'+(index+1)"> <el-collapse-item class="collapse-item" :name="index+1" :id="'collapse-'+(index+1)">
@ -54,9 +54,9 @@
</template> </template>
</el-collapse> </el-collapse>
</el-col> </el-col>
<el-col class="right" :span="12"> <el-col class="right" :span="10">
<div class="c-item"> <div class="c-item">
<div class="title">答题情况</div> <div class="title">提交情况</div>
<div class="respond"> <div class="respond">
<el-space wrap> <el-space wrap>
<!-- <template v-for="it in 11"> --> <!-- <template v-for="it in 11"> -->
@ -114,7 +114,9 @@ colorArr = [
] ]
// === === // === ===
onMounted(() => {}) onMounted(() => {
activeTopic.value = dataList.value.map((_, index) => index + 1);
})
// === (methods) === // === (methods) ===
@ -311,7 +313,7 @@ watchEffect(() => { initData() })
background: #F2F3F5; background: #F2F3F5;
height: 100%; height: 100%;
margin: 0 !important; margin: 0 !important;
.left{padding-left: 0 !important;} .left{padding-left: 0 !important; height: 100%;}
.right{padding-right: 0 !important;} .right{padding-right: 0 !important;}
.c-item{ .c-item{
padding: 10px; padding: 10px;
@ -360,7 +362,7 @@ watchEffect(() => { initData() })
margin-bottom: 10px; margin-bottom: 10px;
} }
.respond{ .respond{
height: calc(70vh - 65px); height: calc(100% - 65px);
overflow: auto; overflow: auto;
.el-space{padding: 5px;} .el-space{padding: 5px;}
.card-warp{ .card-warp{

View File

@ -77,6 +77,7 @@ const props = defineProps({
border-radius: 10px; border-radius: 10px;
padding: 10px 5px; padding: 10px 5px;
margin-bottom: 10px; margin-bottom: 10px;
cursor: pointer;
.class-reserv-item-body { .class-reserv-item-body {
flex: 1; flex: 1;

View File

@ -15,11 +15,16 @@
<!-- 标题 --> <!-- 标题 -->
<el-row style="align-items: center; margin-bottom: 0px; flex: 0 0 auto"> <el-row style="align-items: center; margin-bottom: 0px; flex: 0 0 auto">
<el-col :span="12" style="padding-left: 20px; text-align: left;"> <el-col :span="12" style="padding-left: 20px; text-align: left;">
<div class="unit-top-left" @click="isCollapse = !isCollapse"> <div v-if="!isOpenLeftBook" class="unit-top-left cursor-pointer" @click="onOpenLeftBook">
<i v-if="!isCollapse" class="iconfont icon-xiangzuo" style="color: blue;"></i> <i v-if="!isCollapse" class="iconfont icon-xiangzuo" style="color: blue;"></i>
<span>课程目录</span> <span>课程目录</span>
<i v-if="isCollapse" class="iconfont icon-xiangyou" style="color: blue;"></i> <i v-if="isCollapse" class="iconfont icon-xiangyou" style="color: blue;"></i>
</div> </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>
<el-col :span="12"> <el-col :span="12">
<div class="classtype-right"> <div class="classtype-right">
@ -30,13 +35,13 @@
</el-col> </el-col>
</el-row> </el-row>
<!-- 作业类型:内容 --> <!-- 作业类型:内容 -->
<task-type-view :bookobj="courseObj" :propsformobj="classWorkForm" style="flex: 1; overflow: hidden;"/> <task-type-view :bookobj="courseObj" :propsformobj="classWorkForm" :isedit="isOpenLeftBook" style="flex: 1; overflow: hidden;"/>
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import { onMounted, ref, toRaw,watch, reactive } from 'vue' import { onMounted, ref, toRaw,watch, reactive, getCurrentInstance } from 'vue'
import { useRouter, useRoute } from 'vue-router' import { useRouter, useRoute } from 'vue-router'
import ChooseTextbook from '@/components/choose-textbook/index.vue' import ChooseTextbook from '@/components/choose-textbook/index.vue'
@ -45,8 +50,13 @@ import { getCurrentTime } from '@/utils/date'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
const userStore = useUserStore().user const userStore = useUserStore().user
const route = useRoute(); const route = useRoute();
const router = useRouter()
const { proxy } = getCurrentInstance()
const classtaskObj = route.query.classtaskObj;// 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({ const classWorkForm = reactive({
id: classtaskObj? JSON.parse(classtaskObj).id : '', // id id: classtaskObj? JSON.parse(classtaskObj).id : '', // id
@ -54,9 +64,11 @@ const classWorkForm = reactive({
title: classtaskObj? JSON.parse(classtaskObj).title : '', // title: classtaskObj? JSON.parse(classtaskObj).title : '', //
worktype: classtaskObj? JSON.parse(classtaskObj).worktype : '', // worktype: classtaskObj? JSON.parse(classtaskObj).worktype : '', //
quizlist: classtaskObj? JSON.parse(classtaskObj).quizlist : [], // 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({ const courseObj = reactive({
// : id,id,id, // : id,id,id,
@ -67,7 +79,6 @@ const courseObj = reactive({
node: null, // node: null, //
// //
}) })
// --------------------------------------------------- // ---------------------------------------------------
@ -94,16 +105,32 @@ const getData = (data) => {
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId})) 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(() => { onMounted(() => {
// init() //
// sourceStore.getCreate() 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; //
}
}) })
// const init = () => {
// classWorkForm.uniquekey = userStore.edusubject+'-' + getCurrentTime('MMDD')+'-'+(1);
// }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -120,8 +147,10 @@ onMounted(() => {
width: 300px; width: 300px;
min-height: 100%; min-height: 100%;
} }
.cursor-pointer {
cursor: pointer;//
}
.unit-top-left { .unit-top-left {
cursor: pointer;
.icon-xiangzuo { .icon-xiangzuo {
margin-right: 5px; margin-right: 5px;

View File

@ -23,13 +23,13 @@
v-if="classWorkAnalysis.row.worktype == '习题训练'" v-if="classWorkAnalysis.row.worktype == '习题训练'"
:type="classWorkAnalysis.view == 'quizStats' ? 'success' : ''" :type="classWorkAnalysis.view == 'quizStats' ? 'success' : ''"
@click="workHandle('quizStats')" @click="workHandle('quizStats')"
>作业概况</el-button >逐题分析</el-button
> >
<el-button <el-button
v-if="classWorkAnalysis.row.worktype == '习题训练'" v-if="classWorkAnalysis.row.worktype == '习题训练'"
:type="classWorkAnalysis.view == 'report' ? 'success' : ''" :type="classWorkAnalysis.view == 'report' ? 'success' : ''"
@click="handleClassOverviewOpen('report')" @click="handleClassOverviewOpen('report')"
>作业报告</el-button >整体分析</el-button
> >
</el-button-group> </el-button-group>
</div> </div>
@ -71,12 +71,17 @@
> >
<el-table-column type="index" label="序号" width="52" reserve-selection align="center" /> <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="姓名" prop="studentname" width="100" align="center" />
<el-table-column label="提交时间" prop="updatedate" width="170" 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="teacherRating" align="center" width="120" sortable> <el-table-column label="批阅状态" prop="teacherRating" align="center" width="120" sortable>
<template #default="scope"> <template #default="scope">
<template v-if="scope.row.teacherRating == 0" <template v-if="scope.row.teacherRating == 0">
><span style="color: #2196f3">待批阅</span></template <span v-if="tableRadio.value==1" style="color: #2196f3">待批阅</span>
> </template>
<!-- 1- 2-优减 3- 4-良减 5- --> <!-- 1- 2-优减 3- 4-良减 5- -->
<template v-if="scope.row.teacherRating == 1" <template v-if="scope.row.teacherRating == 1"
><el-tag type="danger"></el-tag></template ><el-tag type="danger"></el-tag></template
@ -126,12 +131,12 @@
</div> </div>
</div> </div>
<!-- 作业概况 --> <!-- 逐题分析 -->
<div v-else-if="classWorkAnalysis.view == 'quizStats'" style="width: 100%;"> <div v-else-if="classWorkAnalysis.view == 'quizStats'" style="width: 100%;">
<quiz-stats :active-data="classWorkActiveData" style="width: 100%;height: 100%;"/> <quiz-stats :active-data="classWorkActiveData" style="width: 100%;height: 100%;"/>
</div> </div>
<!-- 作业报告--> <!-- 整体分析-->
<div v-else-if="classWorkAnalysis.view == 'report'" style="width: 100%;overflow-y: scroll"> <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" :eval-id="courseObj.evalid"></ClassOverview> -->
<ClassOverview :table-list="overviewData" style="width: 100%;"></ClassOverview> <ClassOverview :table-list="overviewData" style="width: 100%;"></ClassOverview>
@ -175,7 +180,7 @@ const tableRadio = reactive({
const loading_dt_table = ref(false) const loading_dt_table = ref(false)
const isopen_dtwk_table = ref(false) const isopen_dtwk_table = ref(false)
// zdg: // zdg:
const classWorkActiveData = reactive({ const classWorkActiveData = reactive({
quizlist: [], // quizlist: [], //
studentList: [], // - studentList: [], // -
@ -523,7 +528,7 @@ const escapeHtmlQuotes = (str) => {
return result; return result;
} }
//#region //#region
// - // -
const workHandle = (type) => { const workHandle = (type) => {
// ui // ui
@ -558,11 +563,11 @@ const getWorkFeedList = async() =>{
//#endregion //#endregion
//#regin //#regin
/* /*
author: yangws author: yangws
time: 2024-8-06 16:35:33 time: 2024-8-06 16:35:33
function:作业报告的处理 function: 整体分析的处理
*/ */
const handleClassOverviewOpen = (type) =>{ const handleClassOverviewOpen = (type) =>{
// ui // ui
@ -640,12 +645,12 @@ onMounted(() => {
watch(classWorkAnalysis, (newVal, oldVal) => { watch(classWorkAnalysis, (newVal, oldVal) => {
if(newVal.view != 'quizStats'){ if(newVal.view != 'quizStats'){
console.log('关闭zdg: 定时执行') console.log('关闭zdg: 定时执行')
clearInterval(classWorkActiveData.timerId) // clearInterval(classWorkActiveData.timerId) //
} }
}) })
onUnmounted(() => { onUnmounted(() => {
clearInterval(classWorkActiveData.timerId) // clearInterval(classWorkActiveData.timerId) //
}) })
// defineExpose({ // defineExpose({

View File

@ -37,6 +37,7 @@ import { homeworklist } from '@/api/teaching/classwork'
import { getCurrentTime, getTomorrow } from '@/utils/date' import { getCurrentTime, getTomorrow } from '@/utils/date'
import {sessionStore, createWindow} from '@/utils/tool' import {sessionStore, createWindow} from '@/utils/tool'
import { useToolState } from '@/store/modules/tool' import { useToolState } from '@/store/modules/tool'
import {throttle,debounce } from '@/utils/comm'
const user = useUserStore().user const user = useUserStore().user
const toolState = useToolState(); const toolState = useToolState();
@ -68,19 +69,17 @@ const getHomework = async () => {
} }
} }
const openDialogTime = ref(null);//
const debounceOpenWin = debounce(() => {
toolState.isTaskWin=true; //
createWindow('open-taskwin',{url:'/teachClassTask'}); //
}, 1000);
// //
const onClickItem = (item) => { const onClickItem = (item) => {
console.log('开启弹窗') console.log('防抖开启弹窗')
if(openDialogTime.value) return;
clearTimeout(openDialogTime.value)
openDialogTime.value = setTimeout(() => {
openDialogTime.value = null;
toolState.isTaskWin=true; //
sessionStore.set('teachClassWorkItem', item); // item sessionStore.set('teachClassWorkItem', item); // item
// debounceOpenWin();
createWindow('open-taskwin',{url:'/teachClassTask'})
}, 1000)
} }
const tagType = (time) => { const tagType = (time) => {
@ -136,6 +135,7 @@ watch(
border-radius: 5px; border-radius: 5px;
margin-bottom: 10px; margin-bottom: 10px;
padding: 10px; padding: 10px;
cursor: pointer;
.class-left { .class-left {
flex-direction: column; flex-direction: column;

View File

@ -8,13 +8,18 @@
<h3 class="title">{{ lesson }}</h3> <h3 class="title">{{ lesson }}</h3>
<div class="grade">{{ usertore.edusubject }}</div> <div class="grade">{{ usertore.edusubject }}</div>
</div> </div>
<i class="iconfont icon-xiangyou" @click="showLeft = !showLeft"></i> <!-- <i class="iconfont icon-xiangyou" @click="showLeft = !showLeft"></i> -->
</div> </div>
<div class="homework-list" v-loading="loading"> <div class="homework-list" v-loading="loading">
<el-scrollbar height="360px"> <el-scrollbar height="360px">
<ul> <ul>
<!--资源--> <!--资源-->
<li class="item flex" v-for="item in resourceList" :key="item.id"> <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" > <div class="item-left flex" >
<FileImage :size="50" :file-name="item.fileShowName" /> <FileImage :size="50" :file-name="item.fileShowName" />
<div class="item-info flex"> <div class="item-info flex">
@ -27,6 +32,7 @@
</div> </div>
<el-button color="#349d44" @click="openFileLink(item)">推送</el-button> <el-button color="#349d44" @click="openFileLink(item)">推送</el-button>
</li> </li>
</template>
<!--作业--> <!--作业-->
<li class="item flex" v-for="item in dataList" :key="item.id"> <li class="item flex" v-for="item in dataList" :key="item.id">
<div class="item-left flex"> <div class="item-left flex">
@ -170,7 +176,6 @@ const openFileLink = async (item) =>{
// //
const getResource = () => { const getResource = () => {
let querySearch = toRaw(toolStore.curSubjectNode).querySearch let querySearch = toRaw(toolStore.curSubjectNode).querySearch
querySearch.orderByColumn = 'uploadTime' querySearch.orderByColumn = 'uploadTime'
querySearch.isAsc = 'desc' querySearch.isAsc = 'desc'
querySearch.pageSize = 500 querySearch.pageSize = 500
@ -217,8 +222,6 @@ onMounted(async () => {
curNode.data = sessionStore.get('subject.curNode') curNode.data = sessionStore.get('subject.curNode')
getHomework() getHomework()
getResource() getResource()
}) })
</script> </script>