Compare commits
29 Commits
16b574a167
...
6de43cbab3
Author | SHA1 | Date |
---|---|---|
朱浩 | 6de43cbab3 | |
朱浩 | 9552e75f18 | |
baigl | 83c377fd9e | |
白了个白 | a8c823030b | |
白了个白 | cc2606d507 | |
yangws | a83cbc2ba2 | |
小杨 | a521010392 | |
白了个白 | b132bb5813 | |
baigl | 09575b9896 | |
白了个白 | 436cde508c | |
白了个白 | 0e42ce08e1 | |
baigl | be4f9d2499 | |
白了个白 | 6a8b0f82e8 | |
白了个白 | d290be9320 | |
朱浩 | 670c457a9f | |
yangws | 16761d3fc8 | |
小杨 | 03b5eccab0 | |
baigl | add2a3e621 | |
白了个白 | f18d0c0e5e | |
白了个白 | e57e643f67 | |
朱浩 | 39aa3b157d | |
白了个白 | 1a9f98e6c9 | |
白了个白 | e53731ac3f | |
白了个白 | a1002a1f40 | |
白了个白 | 7c539614fd | |
朱浩 | ae433b7520 | |
白了个白 | 2b25924213 | |
白了个白 | f3d59ca8ee | |
白了个白 | 6163fb06f9 |
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "aix-win",
|
"name": "aix-win",
|
||||||
"version": "2.1.9",
|
"version": "2.1.12",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "example.com",
|
"author": "example.com",
|
||||||
|
|
|
@ -246,8 +246,10 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) {
|
||||||
/*创建新的ppt文件*/
|
/*创建新的ppt文件*/
|
||||||
ipcMain.on('creat-ai-file-default', (e, { name, url, uploadData, cookie }) => {
|
ipcMain.on('creat-ai-file-default', (e, { name, url, uploadData, cookie }) => {
|
||||||
createFolder('tempFile').then(async () => {
|
createFolder('tempFile').then(async () => {
|
||||||
|
let lastname = decodeURIComponent(url);
|
||||||
|
name = lastname.substring(lastname.lastIndexOf("/")+1)
|
||||||
let path = appTempFilePath + name.replace(/[\\/:*?"<>|]/, '')
|
let path = appTempFilePath + name.replace(/[\\/:*?"<>|]/, '')
|
||||||
let {type,item} = await downloadFile(url,name)
|
let {type,item} = await downloadFiles(url,name)
|
||||||
if (type==="成功") {
|
if (type==="成功") {
|
||||||
let fileType = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
|
let fileType = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
|
||||||
let formData = new FormData()
|
let formData = new FormData()
|
||||||
|
@ -279,7 +281,8 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
function downloadFile(url,fileName) {
|
function downloadFiles(url,fileName) {
|
||||||
|
console.log(url,fileName)
|
||||||
return new Promise((resolve, reject)=>{
|
return new Promise((resolve, reject)=>{
|
||||||
const browserWindow = BrowserWindow.getFocusedWindow()
|
const browserWindow = BrowserWindow.getFocusedWindow()
|
||||||
const id = manager.download({
|
const id = manager.download({
|
||||||
|
|
|
@ -62,8 +62,8 @@ const props = defineProps({
|
||||||
entpcourseid: {
|
entpcourseid: {
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
row: {
|
rows: {
|
||||||
default: ''
|
default: []
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -225,32 +225,34 @@ const onSubmit = (formEl) => {
|
||||||
let ary = []
|
let ary = []
|
||||||
for (const value in gradeObj) {
|
for (const value in gradeObj) {
|
||||||
//这些参数 参照AIx web端 作业推送
|
//这些参数 参照AIx web端 作业推送
|
||||||
let obj = {
|
for (var i = 0; i < props.rows.length; i++) {
|
||||||
id: 0,
|
let obj = {
|
||||||
parentid: props.row.id,
|
id: 0,
|
||||||
classid: value,
|
parentid: props.rows[i].id,
|
||||||
classcourseid: 0, // 课堂id-ppt为字符串不能使用
|
classid: value,
|
||||||
classReservId: classRoomId, // 课堂id
|
classcourseid: 0, // 课堂id-ppt为字符串不能使用
|
||||||
entpcourseid: props.entpcourseid,
|
classReservId: classRoomId, // 课堂id
|
||||||
studentlist: JSON.stringify(gradeObj[value]),
|
entpcourseid: props.entpcourseid,
|
||||||
feedback: form.feedback,
|
studentlist: JSON.stringify(gradeObj[value]),
|
||||||
workkey: '',
|
feedback: form.feedback,
|
||||||
timelength: form.timelength,
|
workkey: '',
|
||||||
weights: 1,
|
timelength: form.timelength,
|
||||||
deaddate: form.deaddate,
|
weights: 1,
|
||||||
workdate: getCurrentTime('YYYY-MM-DD'),
|
deaddate: form.deaddate,
|
||||||
uniquekey: props.row.uniquekey,
|
workdate: getCurrentTime('YYYY-MM-DD'),
|
||||||
entpcourseworklist: '[' + props.row.entpcourseworklist + ']',
|
uniquekey: props.rows[i].uniquekey,
|
||||||
needMsgNotifine: 'false',
|
entpcourseworklist: '[' + props.rows[i].entpcourseworklist + ']',
|
||||||
msgkey: 'newclasswork',
|
needMsgNotifine: 'false',
|
||||||
title: '作业任务',
|
msgkey: 'newclasswork',
|
||||||
msgcontent: '',
|
title: '作业任务',
|
||||||
teachername: userInfo.nickName,
|
msgcontent: '',
|
||||||
unixstamp: new Date().getTime(),
|
teachername: userInfo.nickName,
|
||||||
worktype: props.row.worktype,
|
unixstamp: new Date().getTime(),
|
||||||
status: '1'
|
worktype: props.rows[i].worktype,
|
||||||
|
status: '1'
|
||||||
|
}
|
||||||
|
ary.push(obj)
|
||||||
}
|
}
|
||||||
ary.push(obj)
|
|
||||||
}
|
}
|
||||||
setLoading.value = true
|
setLoading.value = true
|
||||||
saveByClassWorkArray({
|
saveByClassWorkArray({
|
||||||
|
@ -284,8 +286,9 @@ const cloneDialog = (formEl) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 默认当前
|
// 默认当前 改为 延后3小时后截止
|
||||||
form.deaddate = getCurrentTime('YYYY-MM-DD HH:mm')
|
// form.deaddate = getCurrentTime('YYYY-MM-DD HH:mm')
|
||||||
|
form.deaddate = `${getCurrentTime('YYYY-MM-DD')} ${getCurrentTime('HH+3')}:${getCurrentTime('mm')}`;
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,117 @@
|
||||||
|
import { listEntpcoursework,getEvaluationclue } from '@/api/classTask';
|
||||||
|
import { processList } from '@/hooks/useProcessList';
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 编辑作业配置
|
||||||
|
* @param {*} row
|
||||||
|
*/
|
||||||
|
export const editListItem = (row, courseObj) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
// 作业内容编辑-跳转到设计界面-传参
|
||||||
|
let classtaskObj = {
|
||||||
|
id: '', //
|
||||||
|
bookName: '', // 课程名称
|
||||||
|
uniquekey: '', // 设计中的标题
|
||||||
|
title: '', // 设计中的说明
|
||||||
|
worktype: '', // 设计中的作业类型
|
||||||
|
quizlist: [], // 设计中的试题列表
|
||||||
|
chooseWorkLists: [],// 设计中的框架梳理list
|
||||||
|
fileHomeworkList: [],// 设计中的常规作业list
|
||||||
|
whiteboardObj: '',// 设计中的课堂展示对象
|
||||||
|
};
|
||||||
|
console.log('编辑的行', row);
|
||||||
|
|
||||||
|
//重新更新[新任务]中右侧列表数据
|
||||||
|
var listCourseWork = [];
|
||||||
|
for (var i=0; i < row.entpcourseworklistarray.length; i++) {
|
||||||
|
listCourseWork.push(row.entpcourseworklistarray[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (listCourseWork.length > 0) {
|
||||||
|
classtaskObj.id= row.id; //
|
||||||
|
classtaskObj.bookObj = courseObj; // 教材对象
|
||||||
|
classtaskObj.bookName = row.evaltitle? row.evalparenttitle? row.evalparenttitle+'/'+row.evaltitle : 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 == '框架梳理') {
|
||||||
|
// 框架梳理对应只有一个内容
|
||||||
|
getEvaluationclue(listCourseWork[0].id).then(res => {
|
||||||
|
if ( res.data==null || res.data==undefined ) {
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
res.data.worktype = '框架梳理';
|
||||||
|
res.data.score = listCourseWork[0].score;
|
||||||
|
classtaskObj.chooseWorkLists.push(res.data);
|
||||||
|
//
|
||||||
|
// console.log('框架梳理', classtaskObj);
|
||||||
|
return resolve(classtaskObj);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (row.worktype == '习题训练') {
|
||||||
|
const ids = listCourseWork.map(item => item.id).join(",");
|
||||||
|
listEntpcoursework({ids: ids, pageSize: 50}).then(idres => {
|
||||||
|
// 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);
|
||||||
|
//重新将task中的分值更新
|
||||||
|
row.entpcourseworklistarray.forEach(item => {
|
||||||
|
const quizItem = idres.rows.find(quiz => quiz.id === item.id);
|
||||||
|
if (quizItem) {
|
||||||
|
quizItem.score = item.score;
|
||||||
|
quizItem.scoreOrigin = item.score;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
classtaskObj.quizlist = idres.rows;
|
||||||
|
//
|
||||||
|
// console.log('习题训练', classtaskObj);
|
||||||
|
return resolve(classtaskObj);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else if (row.worktype == '课堂展示') {
|
||||||
|
console.log('row.课堂展示', row.workcodes);
|
||||||
|
const workcodes = JSON.parse(row.workcodes);
|
||||||
|
classtaskObj.whiteboardObj = JSON.stringify(workcodes.json);
|
||||||
|
//
|
||||||
|
// console.log('课堂展示', classtaskObj);
|
||||||
|
return resolve(classtaskObj);
|
||||||
|
}
|
||||||
|
else if (row.worktype == '常规作业') {
|
||||||
|
if(isJson(row.workcodes)){
|
||||||
|
classtaskObj.fileHomeworkList = JSON.parse(row.workcodes);
|
||||||
|
//
|
||||||
|
// console.log('常规作业', classtaskObj);
|
||||||
|
return resolve(classtaskObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -71,6 +71,7 @@ const getHomeWorkList = async () => {
|
||||||
return await homeworklist({
|
return await homeworklist({
|
||||||
entpcourseid: chapterId,
|
entpcourseid: chapterId,
|
||||||
edituserid: userStore.user.userId,
|
edituserid: userStore.user.userId,
|
||||||
|
orderby: "timestamp DESC",
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
status: '10'
|
status: '10'
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
@ -79,7 +80,25 @@ const getHomeWorkList = async () => {
|
||||||
for (var i = 0; i < res.rows.length; i++) {
|
for (var i = 0; i < res.rows.length; i++) {
|
||||||
res.rows[i].taskconfig = []
|
res.rows[i].taskconfig = []
|
||||||
|
|
||||||
// 找child
|
// 处理任务类型的UI
|
||||||
|
// if (res.rows[i].worktype == '学习目标定位') {
|
||||||
|
// res.rows[i].workclass = 'success';
|
||||||
|
// res.rows[i].workcodesList = JSON.parse(res.rows[i].workcodes);
|
||||||
|
// } else
|
||||||
|
// 课标研读 目标设定 教材研读 框架梳理 学科定位 TODO 后续接入在添加
|
||||||
|
if (res.rows[i].worktype == '课堂展示') {
|
||||||
|
res.rows[i].workclass = 'primary';
|
||||||
|
} else if (res.rows[i].worktype == '框架梳理') {
|
||||||
|
res.rows[i].workclass = 'warning';
|
||||||
|
} else if (res.rows[i].worktype == '常规作业') {
|
||||||
|
res.rows[i].workclass = 'info';
|
||||||
|
} else if (res.rows[i].worktype == '习题训练') {
|
||||||
|
res.rows[i].workclass = 'danger';
|
||||||
|
} else {
|
||||||
|
res.rows[i].workclass = 'primary';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 找child
|
||||||
for (var j = 0; j < res.rows.length; j++) {
|
for (var j = 0; j < res.rows.length; j++) {
|
||||||
if (res.rows[j].parentid == res.rows[i].id) {
|
if (res.rows[j].parentid == res.rows[i].id) {
|
||||||
var ss = []
|
var ss = []
|
||||||
|
|
|
@ -1,27 +1,49 @@
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { getSignature } from "./index";
|
import { getSignature } from "./index";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
let appId = "01ec9aa3";
|
let appId = "01ec9aa3";
|
||||||
let secret = "M2QxMDAxMjYyYTEzODMwMGRkZTQ4NmUy";
|
let secret = "M2QxMDAxMjYyYTEzODMwMGRkZTQ4NmUy";
|
||||||
let timestamp = Math.floor(Date.now() / 1000);
|
let timestamp = Math.floor(Date.now() / 1000);
|
||||||
let signature = getSignature(appId, secret, timestamp);
|
let signature = getSignature(appId, secret, timestamp);
|
||||||
|
let req = (url, type, data)=>{
|
||||||
|
let config = {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
appId: appId,
|
||||||
|
timestamp: timestamp,
|
||||||
|
signature: signature,
|
||||||
|
},
|
||||||
|
url: url,
|
||||||
|
method: type,
|
||||||
|
}
|
||||||
|
if (type === "GET") {
|
||||||
|
config.params = data;
|
||||||
|
} else {
|
||||||
|
config.data = data;
|
||||||
|
}
|
||||||
|
return request(config)
|
||||||
|
}
|
||||||
|
|
||||||
const instance = axios.create({
|
/*const instance = axios.create({
|
||||||
baseURL: "",
|
// baseURL: import.meta.env.VITE_APP_ENV === "development"?"/parth":import.meta.env.VITE_APP_BASE_API,
|
||||||
|
baseURL: "/dev-api",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
'Authorization': 'Bearer ' + getToken(),
|
||||||
appId: appId,
|
appId: appId,
|
||||||
timestamp: timestamp,
|
timestamp: timestamp,
|
||||||
signature: signature,
|
signature: signature,
|
||||||
},
|
},
|
||||||
});
|
});*/
|
||||||
|
|
||||||
const createOutline = async (data) => {
|
const createOutline = async (data) => {
|
||||||
console.log("createOutline data:", data);
|
console.log("createOutline data:", data);
|
||||||
try {
|
try {
|
||||||
const response = await instance.post(
|
const response = await req(
|
||||||
"/parth/api/aippt/createOutline",
|
"/api/aippt/createOutline",
|
||||||
|
"POST",
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
console.log("createOutline response:", response);
|
console.log("createOutline response:", response);
|
||||||
|
@ -36,7 +58,7 @@ const createOutline = async (data) => {
|
||||||
};
|
};
|
||||||
const getBackGround = async () => {
|
const getBackGround = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await instance.get("/parth/api/aippt/themeList");
|
const response = await req("/api/aippt/themeList", "GET");
|
||||||
return response.data;
|
return response.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("请求失败:", error);
|
console.error("请求失败:", error);
|
||||||
|
@ -45,7 +67,7 @@ const getBackGround = async () => {
|
||||||
};
|
};
|
||||||
const createPPT = async (data) => {
|
const createPPT = async (data) => {
|
||||||
try {
|
try {
|
||||||
const response = await instance.post("/parth/api/aippt/create", data);
|
const response = await req("/api/aippt/create", "POST", data);
|
||||||
console.log("createOutline response:", response);
|
console.log("createOutline response:", response);
|
||||||
|
|
||||||
return response.data;
|
return response.data;
|
||||||
|
@ -56,7 +78,7 @@ const createPPT = async (data) => {
|
||||||
};
|
};
|
||||||
const createByOutline = async (data) => {
|
const createByOutline = async (data) => {
|
||||||
try {
|
try {
|
||||||
const response = await instance.post("/parth/api/aippt/createByOutline", data);
|
const response = await req("/api/aippt/createByOutline","POST", data);
|
||||||
console.log("createByOutline response:", response);
|
console.log("createByOutline response:", response);
|
||||||
|
|
||||||
return response.data;
|
return response.data;
|
||||||
|
@ -67,7 +89,7 @@ const createByOutline = async (data) => {
|
||||||
};
|
};
|
||||||
const getProgress = async (id) => {
|
const getProgress = async (id) => {
|
||||||
try {
|
try {
|
||||||
const response = await instance.get(`/parth/api/aippt/progress?sid=${id}`);
|
const response = await req(`/api/aippt/progress?sid=${id}`, "GET");
|
||||||
return response.data;
|
return response.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("请求失败:", error);
|
console.error("请求失败:", error);
|
||||||
|
@ -75,4 +97,4 @@ const getProgress = async (id) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export { instance, createOutline, getBackGround, createPPT, getProgress, createByOutline };
|
export { createOutline, getBackGround, createPPT, getProgress, createByOutline };
|
||||||
|
|
|
@ -58,17 +58,17 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, onUnmounted, computed, watch } from 'vue'
|
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/classTask/task-item.vue'
|
import TaskItem from '@/views/classTask/container/classTask/task-item.vue'
|
||||||
// import ItemDialog from '@/views/classTask/container/item-dialog.vue'
|
// import ItemDialog from '@/views/classTask/container/item-dialog.vue'
|
||||||
import { useToolState } from '@/store/modules/tool'
|
import { useToolState } from '@/store/modules/tool'
|
||||||
import { getCurrentTime, getTomorrow } from '@/utils/date'
|
import { getCurrentTime } 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 {createWindow} from '@/utils/tool'
|
import {createWindow} from '@/utils/tool'
|
||||||
import {sessionStore} from '@/utils/store'
|
import {sessionStore} from '@/utils/store'
|
||||||
import {throttle,debounce } from '@/utils/comm'
|
import {debounce } from '@/utils/comm'
|
||||||
|
|
||||||
|
|
||||||
const toolState = useToolState();
|
const toolState = useToolState();
|
||||||
|
@ -141,67 +141,80 @@ const getClassWorkList = async () => {
|
||||||
{
|
{
|
||||||
// 班级作业数据,包含多个班级 homeworklist
|
// 班级作业数据,包含多个班级 homeworklist
|
||||||
const response = await listByDeadDate({
|
const response = await listByDeadDate({
|
||||||
//classidarray: classTaskStore.classListIds.join(','),
|
|
||||||
edituserid: userStore.userId, // 老师的id
|
edituserid: userStore.userId, // 老师的id
|
||||||
edustage: userStore.edustage, // 学段
|
edustage: userStore.edustage, // 学段
|
||||||
edusubject: userStore.edusubject,//学科
|
edusubject: userStore.edusubject,//学科
|
||||||
deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期
|
// deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期 弃用
|
||||||
|
deaddate: EndDate.value,// 进行中:明天,已结束:选择的日期
|
||||||
status: '1', // 作业状态:1-已发布
|
status: '1', // 作业状态:1-已发布
|
||||||
// orderby: 'concat(deaddate,uniquekey) DESC',
|
|
||||||
orderby: 'deaddate DESC',
|
orderby: 'deaddate DESC',
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
})
|
})
|
||||||
|
|
||||||
for (var i = 0; i < response.rows.length; i++) {
|
/**
|
||||||
|
* 2024-10-17 由于 后面截止时间加了 时分,特加判断
|
||||||
|
* 1、进行中、以前是以明天判断。现改为传当天的日期,并根据当前日期的时分与截止日期进行判断,
|
||||||
|
* 2、已结束、以前默认是以明天判断。现依然以明天为判断,并根据当前日期时分大于截止日期时分判断。
|
||||||
|
*/
|
||||||
|
let list = [];
|
||||||
|
if(tabActive.value === '进行中'){
|
||||||
|
// 进行中 当前日期时间 小于 截止 日期时间
|
||||||
|
list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate); // 进行中
|
||||||
|
}else{
|
||||||
|
list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate); // 已结束
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for (var i = 0; i < list.length; i++) {
|
||||||
// 初始化部分新增字段值
|
// 初始化部分新增字段值
|
||||||
response.rows[i].workdatalist = []
|
list[i].workdatalist = []
|
||||||
response.rows[i].workdatacount = 0 // 人数
|
list[i].workdatacount = 0 // 人数
|
||||||
response.rows[i].workdatalistVisible = false
|
list[i].workdatalistVisible = false
|
||||||
response.rows[i].workdatafeedbackcount = 0 // 已交人数
|
list[i].workdatafeedbackcount = 0 // 已交人数
|
||||||
response.rows[i].feedtimelength = 0
|
list[i].feedtimelength = 0
|
||||||
response.rows[i].rightAnswerCount = 0
|
list[i].rightAnswerCount = 0
|
||||||
response.rows[i].scoingRate = 0 + '%' // 得分率
|
list[i].scoingRate = 0 + '%' // 得分率
|
||||||
response.rows[i].averagetime = 0 // 平均用时
|
list[i].averagetime = 0 // 平均用时
|
||||||
|
|
||||||
// ----------------------------------------------
|
// ----------------------------------------------
|
||||||
// 处理任务类型的UI
|
// 处理任务类型的UI
|
||||||
if (response.rows[i].worktype == '学习目标定位') {
|
if (list[i].worktype == '学习目标定位') {
|
||||||
response.rows[i].workclass = 'success'
|
list[i].workclass = 'success'
|
||||||
response.rows[i].workcodesList = JSON.parse(response.rows[i].workcodes)
|
list[i].workcodesList = JSON.parse(list[i].workcodes)
|
||||||
} else if (response.rows[i].worktype == '教材研读') {
|
} else if (list[i].worktype == '教材研读') {
|
||||||
response.rows[i].workclass = 'primary'
|
list[i].workclass = 'primary'
|
||||||
} else if (response.rows[i].worktype == '框架梳理') {
|
} else if (list[i].worktype == '框架梳理') {
|
||||||
response.rows[i].workclass = 'warning'
|
list[i].workclass = 'warning'
|
||||||
} else if (response.rows[i].worktype == '学科定位') {
|
} else if (list[i].worktype == '学科定位') {
|
||||||
response.rows[i].workclass = 'info'
|
list[i].workclass = 'info'
|
||||||
} else if (response.rows[i].worktype == '习题训练') {
|
} else if (list[i].worktype == '习题训练') {
|
||||||
response.rows[i].workclass = 'danger'
|
list[i].workclass = 'danger'
|
||||||
} else {
|
} else {
|
||||||
response.rows[i].workclass = ''
|
list[i].workclass = ''
|
||||||
}
|
}
|
||||||
// 如果是习题训练任务,则检查一共有多少道
|
// 如果是习题训练任务,则检查一共有多少道
|
||||||
if (response.rows[i].entpcourseworklist != '') {
|
if (list[i].entpcourseworklist != '') {
|
||||||
response.rows[i].entpcourseworklistarray = JSON.parse(
|
list[i].entpcourseworklistarray = JSON.parse(
|
||||||
'[' + response.rows[i].entpcourseworklist + ']'
|
'[' + list[i].entpcourseworklist + ']'
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
response.rows[i].entpcourseworklistarray = []
|
list[i].entpcourseworklistarray = []
|
||||||
}
|
}
|
||||||
// 根据 classworkdatastudentids 初始化判断分配的人数
|
// 根据 classworkdatastudentids 初始化判断分配的人数
|
||||||
if (
|
if (
|
||||||
response.rows[i].classworkdatastudentids != '' &&
|
list[i].classworkdatastudentids != '' &&
|
||||||
response.rows[i].classworkdatastudentids != null &&
|
list[i].classworkdatastudentids != null &&
|
||||||
response.rows[i].classworkdatastudentids != 'null'
|
list[i].classworkdatastudentids != 'null'
|
||||||
) {
|
) {
|
||||||
const stuList = JSON.parse('[' + response.rows[i].classworkdatastudentids + ']')
|
const stuList = JSON.parse('[' + list[i].classworkdatastudentids + ']')
|
||||||
response.rows[i].workdatacount = stuList.length
|
list[i].workdatacount = stuList.length
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 显示分配人数(workdatacount)>0 的
|
// 显示分配人数(workdatacount)>0 的
|
||||||
if (response.rows && response.rows.length > 0) {
|
if (list && list.length > 0) {
|
||||||
classWorkList.value = response.rows && response.rows.filter((item) => item.workdatacount > 0)
|
classWorkList.value = list && list.filter((item) => item.workdatacount > 0)
|
||||||
//TODO: 这里没分页,貌似这个 total 不重要,后续看
|
//TODO: 这里没分页,貌似这个 total 不重要,后续看
|
||||||
total.value = response.total
|
total.value = 0
|
||||||
}else{
|
}else{
|
||||||
classWorkList.value = []
|
classWorkList.value = []
|
||||||
total.value = 0
|
total.value = 0
|
||||||
|
@ -222,6 +235,7 @@ const getStudentClassWorkData = async() => {
|
||||||
// classids: classTaskStore.classListIds.join(','),
|
// classids: classTaskStore.classListIds.join(','),
|
||||||
// edusubject: userStore.edusubject,//学科
|
// edusubject: userStore.edusubject,//学科
|
||||||
// deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期
|
// deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期
|
||||||
|
// deaddate: EndDate.value,// 进行中:明天,已结束:选择的日期
|
||||||
// //status: '1', // 作业状态:1-已发布
|
// //status: '1', // 作业状态:1-已发布
|
||||||
// orderby: "deaddate DESC",// TODO: 这里是否加 deaddate 的排序,后续看
|
// orderby: "deaddate DESC",// TODO: 这里是否加 deaddate 的排序,后续看
|
||||||
// pageSize: 1000,
|
// pageSize: 1000,
|
||||||
|
@ -407,13 +421,28 @@ const getStudentVisible = async () => {
|
||||||
edituserid: userStore.userId, // 老师的id
|
edituserid: userStore.userId, // 老师的id
|
||||||
edustage: userStore.edustage,// 学段
|
edustage: userStore.edustage,// 学段
|
||||||
edusubject: userStore.edusubject,//学科
|
edusubject: userStore.edusubject,//学科
|
||||||
deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期
|
// deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,// 进行中:明天,已结束:选择的日期
|
||||||
|
deaddate: EndDate.value,// 进行中:明天,已结束:选择的日期
|
||||||
status: '1', // 作业状态:1-已发布
|
status: '1', // 作业状态:1-已发布
|
||||||
// orderby: 'concat(deaddate,uniquekey) DESC',
|
// orderby: 'concat(deaddate,uniquekey) DESC',
|
||||||
orderby: 'deaddate DESC',
|
orderby: 'deaddate DESC',
|
||||||
pageSize: 100
|
pageSize: 100
|
||||||
})
|
})
|
||||||
const curWorkList = response.rows
|
|
||||||
|
/**
|
||||||
|
* 2024-10-17 由于 后面截止时间加了 时分,特加判断
|
||||||
|
* 1、进行中、以前是以明天判断。现改为传当天的日期,并根据当前日期的时分与截止日期进行判断,
|
||||||
|
* 2、已结束、以前默认是以明天判断。现依然以明天为判断,并根据当前日期时分大于截止日期时分判断。
|
||||||
|
*/
|
||||||
|
let list = [];
|
||||||
|
if(tabActive.value === '进行中'){
|
||||||
|
// 进行中 当前日期时间 小于 截止 日期时间
|
||||||
|
list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate); // 进行中
|
||||||
|
}else{
|
||||||
|
list = response.rows&&response.rows.filter(item => item.deaddate && getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate); // 已结束
|
||||||
|
}
|
||||||
|
|
||||||
|
const curWorkList = list
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* warn: 这里仅更新了finishpercent(进度条), 且当前作业布置推送新任务时, curWorkList中会查到新的任务与当前页面中this.classWorkList长度不一致,
|
* warn: 这里仅更新了finishpercent(进度条), 且当前作业布置推送新任务时, curWorkList中会查到新的任务与当前页面中this.classWorkList长度不一致,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -74,8 +74,8 @@ function initChart() {
|
||||||
position: 'top',
|
position: 'top',
|
||||||
formatter: params => {
|
formatter: params => {
|
||||||
const value = dataList.value[params.dataIndex].value;
|
const value = dataList.value[params.dataIndex].value;
|
||||||
const percentage = ((value / total) * 100).toFixed(2); // 计算百分比并保留两位小数
|
const percentage = value ? ((value / total) * 100).toFixed() : 0; // 计算百分比并保留两位小数
|
||||||
return `${percentage}%`; // 显示为百分比形式
|
return `${value}人 ${percentage}%`; // 显示为百分比形式
|
||||||
},
|
},
|
||||||
color: '#333',
|
color: '#333',
|
||||||
fontSize: 12
|
fontSize: 12
|
||||||
|
|
|
@ -125,7 +125,7 @@ onMounted(() => {
|
||||||
|
|
||||||
|
|
||||||
watch(() => props.bookobj.levelSecondId, (newVal) => {
|
watch(() => props.bookobj.levelSecondId, (newVal) => {
|
||||||
console.log(props.bookobj,'课程选择')
|
// console.log(props.bookobj,'课程选择')
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -266,6 +266,10 @@ const props = defineProps({
|
||||||
isedit: {
|
isedit: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
isback:{
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -737,14 +741,16 @@ const handleClassWorkSave = async () => {
|
||||||
//这里分离了,所以不需要更新表单数据了
|
//这里分离了,所以不需要更新表单数据了
|
||||||
// this.getClassWorkAllList();
|
// this.getClassWorkAllList();
|
||||||
|
|
||||||
// TODO 后续看是否跳转到 作业布置页面
|
|
||||||
|
|
||||||
//TODO 下面3个后续看是啥
|
|
||||||
// this.newWorkSpace = false;
|
|
||||||
// this.newWorkSpaceEdit = false;
|
|
||||||
// this.workEdit = false;
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(props.isback){
|
||||||
|
// 其他页面进入的 返回上一页
|
||||||
|
router.back();
|
||||||
|
}else{
|
||||||
|
// 首页进入的,跳转到作业布置页面
|
||||||
|
router.push({ path: '/classTaskAssign' });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -976,3 +982,4 @@ watch(() => props.bookobj.levelSecondId, (newVal) => {
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<style src="@/assets/styles/JYStyle.css"></style>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<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 v-if="!isOpenLeftBook" class="unit-top-left cursor-pointer" @click="onOpenLeftBook">
|
<div v-if="!isOpenLeftBook" class="unit-top-left cursor-pointer" @click="onOpenLeftBook">
|
||||||
|
<i v-if="isback" class="iconfont icon-xiangzuo cursor-pointer" style="color: blue;" @click="goBack">返回上页</i>
|
||||||
<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>
|
||||||
|
@ -35,7 +36,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 作业类型:内容 -->
|
<!-- 作业类型:内容 -->
|
||||||
<task-type-view :bookobj="courseObj" :propsformobj="classWorkForm" :isedit="isOpenLeftBook" style="flex: 1; overflow: hidden;"/>
|
<task-type-view :bookobj="courseObj" :isback="isback" :propsformobj="classWorkForm" :isedit="isOpenLeftBook" style="flex: 1; overflow: hidden;"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -53,6 +54,7 @@ const route = useRoute();
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
|
||||||
|
const isback = ref(route.query.isBack?true:false);
|
||||||
const classtaskObj = route.query.classtaskObj;//作业布置的内容对象
|
const classtaskObj = route.query.classtaskObj;//作业布置的内容对象
|
||||||
const bookTitle = ref(classtaskObj? JSON.parse(classtaskObj).bookName: '');// 课程名称
|
const bookTitle = ref(classtaskObj? JSON.parse(classtaskObj).bookName: '');// 课程名称
|
||||||
const isOpenLeftBook = ref(classtaskObj? JSON.parse(classtaskObj).id ? true : false: false ); // 是否打开左侧目录
|
const isOpenLeftBook = ref(classtaskObj? JSON.parse(classtaskObj).id ? true : false: false ); // 是否打开左侧目录
|
||||||
|
@ -183,3 +185,4 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<style src="@/assets/styles/JYStyle.css"></style>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<span class="name">{{ item.uniquekey }}</span>
|
<span class="name">{{ item.uniquekey }}</span>
|
||||||
<el-tag class="tag" round :type="tagType(item.deaddate)" effect="dark" size="small">{{
|
<el-tag class="tag" round :type="tagType(item.deaddate)" effect="dark" size="small">{{
|
||||||
getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate ? '已结束' : '进行中' }}</el-tag>
|
getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate ? '已结束' : '进行中' }}</el-tag>
|
||||||
|
<el-tag :type="item.workclass" size="large">{{ item.worktype }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div class="class-time">{{ item.classcaption }} | 截止时间:{{ item.deaddate }} </div>
|
<div class="class-time">{{ item.classcaption }} | 截止时间:{{ item.deaddate }} </div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,11 +51,27 @@ const getHomework = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const { edustage, edusubject } = user
|
const { edustage, edusubject } = user
|
||||||
try {
|
try {
|
||||||
const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, deaddate: getTomorrow(), status: '1', orderby: 'uniquekey DESC', pageSize: 500 })
|
const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, deaddate: getTomorrow(), status: '1', orderby: 'deaddate DESC', pageSize: 500 })
|
||||||
// 只展示进行中的
|
// 只展示进行中的
|
||||||
// homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate)
|
homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate) // 当前日期的时分与截止日期进行判断
|
||||||
homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getTomorrow() <= item.deaddate) //大于今天的才算进行中
|
// homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getTomorrow() <= item.deaddate) //大于今天的才算进行中 弃用
|
||||||
homeworkList.value.forEach((item) => {
|
homeworkList.value.forEach((item) => {
|
||||||
|
// 处理任务类型的UI
|
||||||
|
if (item.worktype == '学习目标定位') {
|
||||||
|
item.workclass = 'success'
|
||||||
|
item.workcodesList = JSON.parse(item.workcodes)
|
||||||
|
} else if (item.worktype == '教材研读') {
|
||||||
|
item.workclass = 'primary'
|
||||||
|
} else if (item.worktype == '框架梳理') {
|
||||||
|
item.workclass = 'warning'
|
||||||
|
} else if (item.worktype == '学科定位') {
|
||||||
|
item.workclass = 'info'
|
||||||
|
} else if (item.worktype == '习题训练') {
|
||||||
|
item.workclass = 'danger'
|
||||||
|
} else {
|
||||||
|
item.workclass = ''
|
||||||
|
}
|
||||||
|
|
||||||
item.workdatacount = JSON.parse('[' + item.classworkdatastudentids + ']').length
|
item.workdatacount = JSON.parse('[' + item.classworkdatastudentids + ']').length
|
||||||
// 如果是习题训练任务,则检查一共有多少道
|
// 如果是习题训练任务,则检查一共有多少道
|
||||||
if (item.entpcourseworklist != '') {
|
if (item.entpcourseworklist != '') {
|
||||||
|
|
|
@ -113,17 +113,17 @@ const menuList = [{
|
||||||
{
|
{
|
||||||
name: '作业设计',
|
name: '作业设计',
|
||||||
icon: '#icon-zuoyesheji',
|
icon: '#icon-zuoyesheji',
|
||||||
isOuter: true,
|
// isOuter: true,
|
||||||
path: '/teaching/classtaskassign?titleName=作业布置&openDialog=newClassTask',
|
// path: '/teaching/classtaskassign?titleName=作业布置&openDialog=newClassTask',
|
||||||
// path: '/newClassTask',
|
path: '/newClassTask',
|
||||||
id: '2-1'
|
id: '2-1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '作业布置',
|
name: '作业布置',
|
||||||
icon: '#icon-zuoyebuzhi',
|
icon: '#icon-zuoyebuzhi',
|
||||||
isOuter: true,
|
// isOuter: true,
|
||||||
path: '/teaching/classtaskassign?titleName=作业布置',
|
// path: '/teaching/classtaskassign?titleName=作业布置',
|
||||||
// path: '/classTaskAssign',
|
path: '/classTaskAssign',
|
||||||
id: '2-2'
|
id: '2-2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -178,7 +178,7 @@ const getBackground = () => {
|
||||||
treeData.value = [];
|
treeData.value = [];
|
||||||
getBackGround().then((res) => {
|
getBackGround().then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
backGroundList.value = res.data;
|
backGroundList.value = res;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -222,14 +222,14 @@ const outlineCreatePPT = () => {
|
||||||
activeStep.value = 4
|
activeStep.value = 4
|
||||||
|
|
||||||
const checkProgress = () => {
|
const checkProgress = () => {
|
||||||
getProgress(res.data.sid).then((response) => {
|
getProgress(res.sid).then((response) => {
|
||||||
percentage.value = response.data.process;
|
percentage.value = response.process;
|
||||||
if (response.data && response.data.pptUrl && response.data.pptUrl.length > 4) {
|
if (response && response.pptUrl && response.pptUrl.length > 4) {
|
||||||
console.log('PPT',response)
|
console.log('PPT',response)
|
||||||
// window.location.href = response.data.pptUrl;
|
// window.location.href = response.data.pptUrl;
|
||||||
//发消息到主进程,携带名称和URL,将URL下载下来后复制到文件列表并上传到服务
|
//发消息到主进程,携带名称和URL,将URL下载下来后复制到文件列表并上传到服务
|
||||||
// let url = "https://bjcdn.openstorage.cn/xinghuo-privatedata/%2Ftmp/apiTempFiledf28bf990a4c40ffb7477ed4b65392c27232357022409613439/%E3%80%8A%E9%9D%99%E5%A5%B3%E3%80%8B%E6%B7%B1%E5%BA%A6%E8%A7%A3%E8%AF%BB%E4%B8%8E%E7%A0%94%E7%A9%B6.pptx"
|
// let url = "https://bjcdn.openstorage.cn/xinghuo-privatedata/%2Ftmp/apiTempFiledf28bf990a4c40ffb7477ed4b65392c27232357022409613439/%E3%80%8A%E9%9D%99%E5%A5%B3%E3%80%8B%E6%B7%B1%E5%BA%A6%E8%A7%A3%E8%AF%BB%E4%B8%8E%E7%A0%94%E7%A9%B6.pptx"
|
||||||
creatAIPPT(props.currentNode.itemtitle + '.pptx',response.data.pptUrl, props.uploadData).then((res) => {
|
creatAIPPT(props.currentNode.itemtitle + '.pptx',response.pptUrl, props.uploadData).then((res) => {
|
||||||
emit('addSuccess',res)
|
emit('addSuccess',res)
|
||||||
})
|
})
|
||||||
ElMessage.success("生成成功");
|
ElMessage.success("生成成功");
|
||||||
|
|
|
@ -22,7 +22,8 @@
|
||||||
<div class="prepare-item-info-message">
|
<div class="prepare-item-info-message">
|
||||||
<div style="width: 60px">
|
<div style="width: 60px">
|
||||||
<template v-if="item.uniquekey">
|
<template v-if="item.uniquekey">
|
||||||
{{ item.worktype }}
|
<!-- {{ item.worktype }} -->
|
||||||
|
<el-tag :type="item.workclass" size="large">{{ item.worktype }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-icon
|
<el-icon
|
||||||
|
|
|
@ -95,7 +95,8 @@
|
||||||
<div class="prepare-body-header">
|
<div class="prepare-body-header">
|
||||||
<div>
|
<div>
|
||||||
<label style="font-size: 15px">共{{ currentWorkList.length }}个作业</label>
|
<label style="font-size: 15px">共{{ currentWorkList.length }}个作业</label>
|
||||||
<el-button size="small" @click="handleOutLink('homeWork')">作业设计</el-button>
|
<!-- <el-button size="small" @click="handleOutLink('homeWork')">作业设计</el-button> -->
|
||||||
|
<el-button size="small" @click="goNewClassTask()">作业设计</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="prepare-work-wrap">
|
<div class="prepare-work-wrap">
|
||||||
|
@ -105,7 +106,7 @@
|
||||||
:item="item"
|
:item="item"
|
||||||
:index="index"
|
:index="index"
|
||||||
@on-set="openSet"
|
@on-set="openSet"
|
||||||
@on-reSet="openReSet"
|
@on-reSet="openReSet"
|
||||||
@on-delhomework="delhomework"
|
@on-delhomework="delhomework"
|
||||||
>
|
>
|
||||||
</file-list-item>
|
</file-list-item>
|
||||||
|
@ -126,7 +127,7 @@
|
||||||
</div>
|
</div>
|
||||||
<MoveFile v-model="isMoveDialogOpen" @on-submit="chooseMoveCata" />
|
<MoveFile v-model="isMoveDialogOpen" @on-submit="chooseMoveCata" />
|
||||||
<uploadDialog v-model="isDialogOpen" @submit-file="submitFile" />
|
<uploadDialog v-model="isDialogOpen" @submit-file="submitFile" />
|
||||||
<SetHomework v-model="setDialog" :entpcourseid="entpcourseid" :row="row" />
|
<SetHomework v-model="setDialog" :entpcourseid="entpcourseid" :rows="rows" />
|
||||||
</div>
|
</div>
|
||||||
<reserv
|
<reserv
|
||||||
ref="reservDialog"
|
ref="reservDialog"
|
||||||
|
@ -171,6 +172,7 @@ import { delClasswork, listEntpcourse } from '@/api/teaching/classwork'
|
||||||
import { updateClasscourse } from '@/api/teaching/classcourse'
|
import { updateClasscourse } from '@/api/teaching/classcourse'
|
||||||
import { getClassInfo, getSelfReserv, endClass } from '@/api/classManage'
|
import { getClassInfo, getSelfReserv, endClass } from '@/api/classManage'
|
||||||
import { useGetHomework } from '@/hooks/useGetHomework'
|
import { useGetHomework } from '@/hooks/useGetHomework'
|
||||||
|
import { editListItem } from '@/hooks/useClassTask'
|
||||||
import { addEntpcoursefileReturnId } from '@/api/education/entpcoursefile'
|
import { addEntpcoursefileReturnId } from '@/api/education/entpcoursefile'
|
||||||
import ClassReserv from '@/views/classManage/classReserv.vue'
|
import ClassReserv from '@/views/classManage/classReserv.vue'
|
||||||
import classStart from './container/class-start.vue' // 预备上课
|
import classStart from './container/class-start.vue' // 预备上课
|
||||||
|
@ -229,7 +231,7 @@ export default {
|
||||||
entpcourseid: '',
|
entpcourseid: '',
|
||||||
// 布置作业弹窗
|
// 布置作业弹窗
|
||||||
setDialog: false,
|
setDialog: false,
|
||||||
row: '',
|
rows: '',
|
||||||
isOpenHomework: false,
|
isOpenHomework: false,
|
||||||
// 当前上课课程
|
// 当前上课课程
|
||||||
activeClass: null,
|
activeClass: null,
|
||||||
|
@ -655,34 +657,44 @@ export default {
|
||||||
this.$refs['reservDialog'].openDialog()
|
this.$refs['reservDialog'].openDialog()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 打开外部链接
|
// 打开外部链接
|
||||||
handleOutLink(key) {
|
// handleOutLink(key) {
|
||||||
if (key == 'homeWork') {
|
// if (key == 'homeWork') {
|
||||||
this.isOpenHomework = true
|
// this.isOpenHomework = true
|
||||||
}
|
// }
|
||||||
// key 对应的 linkConfig.js 外部链接配置
|
// // key 对应的 linkConfig.js 外部链接配置
|
||||||
let configObj = outLink()[key]
|
// let configObj = outLink()[key]
|
||||||
let fullPath = configObj.fullPath
|
// let fullPath = configObj.fullPath
|
||||||
//打开作业 高考 url增加unitId 章节ID
|
// //打开作业 高考 url增加unitId 章节ID
|
||||||
if (key != 'standard' && key != 'aiModel') {
|
// if (key != 'standard' && key != 'aiModel') {
|
||||||
let unitId = this.uploadData.levelSecondId
|
// let unitId = this.uploadData.levelSecondId
|
||||||
? this.uploadData.levelSecondId
|
// ? this.uploadData.levelSecondId
|
||||||
: this.uploadData.levelFirstId
|
// : this.uploadData.levelFirstId
|
||||||
let bookId = this.uploadData.textbookId;
|
// let bookId = this.uploadData.textbookId;
|
||||||
if(fullPath.indexOf('?') == -1){
|
// if(fullPath.indexOf('?') == -1){
|
||||||
fullPath += `?unitId=${unitId}&bookId=${bookId}&openDialog=newClassTask`
|
// fullPath += `?unitId=${unitId}&bookId=${bookId}&openDialog=newClassTask`
|
||||||
}
|
// }
|
||||||
else{
|
// else{
|
||||||
fullPath += `&unitId=${unitId}&bookId=${bookId}&openDialog=newClassTask`
|
// fullPath += `&unitId=${unitId}&bookId=${bookId}&openDialog=newClassTask`
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 通知主进程
|
// // 通知主进程
|
||||||
ipcRenderer.send('openWindow', {
|
// ipcRenderer.send('openWindow', {
|
||||||
key,
|
// key,
|
||||||
fullPath: fullPath,
|
// fullPath: fullPath,
|
||||||
cookieData: { ...configObj.data }
|
// cookieData: { ...configObj.data }
|
||||||
})
|
// })
|
||||||
|
// },
|
||||||
|
// 前往作业设计页面
|
||||||
|
goNewClassTask(){
|
||||||
|
// router.push({ path: '/newClassTask' });
|
||||||
|
this.$router.push({
|
||||||
|
path: '/newClassTask',
|
||||||
|
query: {
|
||||||
|
isBack: true,
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getWeekday1(date) {
|
getWeekday1(date) {
|
||||||
const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
|
const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
|
||||||
|
@ -691,29 +703,51 @@ export default {
|
||||||
},
|
},
|
||||||
// 打开布置作业窗口
|
// 打开布置作业窗口
|
||||||
openSet(row) {
|
openSet(row) {
|
||||||
this.row = row
|
// 布置推送:row 这里是单个,转为list
|
||||||
|
this.rows = [row]
|
||||||
this.setDialog = true
|
this.setDialog = true
|
||||||
},
|
},
|
||||||
// 打开作业编辑窗口
|
// 打开作业编辑窗口
|
||||||
openReSet(row) {
|
openReSet(row) {
|
||||||
// 新窗口打开标识
|
//跳转 作业设计 编辑页面
|
||||||
this.isOpenHomework = true;
|
const courseObj = {
|
||||||
// key 对应的 linkConfig.js 外部链接配置
|
textbookId: this.uploadData.textbookId,
|
||||||
let configObj = outLink()['homeWork']
|
levelFirstId: this.uploadData.levelFirstId,
|
||||||
let fullPath = configObj.fullPath
|
levelSecondId: this.uploadData.levelSecondId,
|
||||||
|
coursetitle: this.currentNode.itemtitle, // (单元/章节) 名称,
|
||||||
|
node: this.currentNode, // 选择的课程节点
|
||||||
|
}
|
||||||
|
console.log('courseObj', courseObj)
|
||||||
|
editListItem(row, courseObj).then((obj) => {
|
||||||
|
if(obj){
|
||||||
|
//前往作业设计
|
||||||
|
this.$router.push({
|
||||||
|
path: '/newClassTask',
|
||||||
|
query: {
|
||||||
|
classtaskObj: JSON.stringify(obj),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//---------------------
|
||||||
|
// 暂时弃用 外链 新窗口打开标识
|
||||||
|
// this.isOpenHomework = true;
|
||||||
|
// // key 对应的 linkConfig.js 外部链接配置
|
||||||
|
// let configObj = outLink()['homeWork']
|
||||||
|
// let fullPath = configObj.fullPath
|
||||||
|
|
||||||
let unitId = this.uploadData.levelSecondId
|
// let unitId = this.uploadData.levelSecondId
|
||||||
? this.uploadData.levelSecondId
|
// ? this.uploadData.levelSecondId
|
||||||
: this.uploadData.levelFirstId
|
// : this.uploadData.levelFirstId
|
||||||
let bookId = this.uploadData.textbookId;
|
// let bookId = this.uploadData.textbookId;
|
||||||
fullPath += `&unitId=${unitId}&bookId=${bookId}&courseWorkId=${row.id}`
|
// fullPath += `&unitId=${unitId}&bookId=${bookId}&courseWorkId=${row.id}`
|
||||||
|
|
||||||
// 通知主进程
|
// // 通知主进程
|
||||||
ipcRenderer.send('openWindow', {
|
// ipcRenderer.send('openWindow', {
|
||||||
key: 'homeWork',
|
// key: 'homeWork',
|
||||||
fullPath: fullPath,
|
// fullPath: fullPath,
|
||||||
cookieData: { ...configObj.data }
|
// cookieData: { ...configObj.data }
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
// 删除作业
|
// 删除作业
|
||||||
delhomework(item) {
|
delhomework(item) {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<el-image class="imges" :src="bookInfo ? bookInfo.avartar : ''" />
|
<el-image class="imges" :src="bookInfo ? bookInfo.avartar : ''" />
|
||||||
</div>
|
</div>
|
||||||
<div class="stand-head-right">
|
<div class="stand-head-right">
|
||||||
<div class="stand-head-right-tit">{{bookInfo ? bookInfo.bookName : ''}}</div>
|
<div class="stand-head-right-tit">{{bookInfo ? bookInfo.itemtitle : ''}}</div>
|
||||||
<i class="iconfont icon-yidongdaozu stand-head-right-icon" @click="dialogVisible = true"></i>
|
<i class="iconfont icon-yidongdaozu stand-head-right-icon" @click="dialogVisible = true"></i>
|
||||||
<div class="stand-head-right-row">
|
<div class="stand-head-right-row">
|
||||||
<div class="stand-head-right-row-time">更新2024.9.10</div>
|
<div class="stand-head-right-row-time">更新2024.9.10</div>
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
<div class="booklist">
|
<div class="booklist">
|
||||||
<div :class="{'item': true,'active': booksel === idx}" v-for="item,idx in bookList" :key="idx" @click="bookChange(item,idx)">
|
<div :class="{'item': true,'active': booksel === idx}" v-for="item,idx in bookList" :key="idx" @click="bookChange(item,idx)">
|
||||||
<el-image class="bookimg" :src="item.avartar" />
|
<el-image class="bookimg" :src="item.avartar" />
|
||||||
<div class="bookname">{{item.bookName}}</div>
|
<div class="bookname">{{item.itemtitle}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -173,7 +173,7 @@ const selectHandel = (value) => {
|
||||||
}
|
}
|
||||||
//保存json文件
|
//保存json文件
|
||||||
const saveJSON = (data) => {
|
const saveJSON = (data) => {
|
||||||
|
|
||||||
let filename = ''
|
let filename = ''
|
||||||
// const data = {
|
// const data = {
|
||||||
// name: 'txt',
|
// name: 'txt',
|
||||||
|
@ -247,11 +247,12 @@ const getAllSubject = async () => {
|
||||||
rows && rows.map(item => {
|
rows && rows.map(item => {
|
||||||
if(edustage === item.edustage && item.edusubject === edusubject){
|
if(edustage === item.edustage && item.edusubject === edusubject){
|
||||||
bookInfo.value = {...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: bookNameFormat(item.edustage,item.edusubject)}
|
bookInfo.value = {...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: bookNameFormat(item.edustage,item.edusubject)}
|
||||||
}
|
if(item.fileurl !== ''){
|
||||||
if(item.fileurl !== ''){
|
bookList.value.push(bookInfo.value)
|
||||||
bookList.value.push({...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: bookNameFormat(item.edustage,item.edusubject)})
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
console.log(bookList)
|
||||||
const textselidx = bookList.value.findIndex(item => item.edustage === edustage && item.edusubject === edusubject)
|
const textselidx = bookList.value.findIndex(item => item.edustage === edustage && item.edusubject === edusubject)
|
||||||
booksel.value = textselidx
|
booksel.value = textselidx
|
||||||
const filePath = import.meta.env.VITE_APP_RES_FILE_PATH + bookList.value[textselidx].fileurl.replace('.txt','.pdf')
|
const filePath = import.meta.env.VITE_APP_RES_FILE_PATH + bookList.value[textselidx].fileurl.replace('.txt','.pdf')
|
||||||
|
@ -282,7 +283,7 @@ onMounted(async () => {
|
||||||
const searchh = searchref.value.offsetHeight;
|
const searchh = searchref.value.offsetHeight;
|
||||||
listHeight.value = Math.floor(cardH) - Math.floor(headh) - Math.floor(searchh) - 60;
|
listHeight.value = Math.floor(cardH) - Math.floor(headh) - Math.floor(searchh) - 60;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
if(cardref.value && headref.value){
|
if(cardref.value && headref.value){
|
||||||
const cardH = cardref.value.offsetHeight;
|
const cardH = cardref.value.offsetHeight;
|
||||||
|
@ -333,9 +334,9 @@ onMounted(async () => {
|
||||||
console.log('转换后整体文字------',StartStr + midStr + EndStr);
|
console.log('转换后整体文字------',StartStr + midStr + EndStr);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// const isDev = process.env.NODE_ENV == 'development'
|
// const isDev = process.env.NODE_ENV == 'development'
|
||||||
// if (isDev)
|
// if (isDev)
|
||||||
// pdfUrl.value = '/'+getStaticUrl('aaa.pdf', 'user', 'selfFile', true)
|
// pdfUrl.value = '/'+getStaticUrl('aaa.pdf', 'user', 'selfFile', true)
|
||||||
// else
|
// else
|
||||||
// pdfUrl.value = getStaticUrl(route.query.path, 'user', 'selfFile', true)
|
// pdfUrl.value = getStaticUrl(route.query.path, 'user', 'selfFile', true)
|
||||||
|
@ -552,4 +553,4 @@ onMounted(async () => {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<el-image class="imges" :src="bookInfo ? bookInfo.avartar : ''" />
|
<el-image class="imges" :src="bookInfo ? bookInfo.avartar : ''" />
|
||||||
</div>
|
</div>
|
||||||
<div class="stand-head-right">
|
<div class="stand-head-right">
|
||||||
<div class="stand-head-right-tit">{{bookInfo ? bookInfo.bookName: ''}}</div>
|
<div class="stand-head-right-tit">{{bookInfo ? bookInfo.itemtitle: ''}}</div>
|
||||||
<i class="iconfont icon-yidongdaozu stand-head-right-icon" @click="dialogVisible = true"></i>
|
<i class="iconfont icon-yidongdaozu stand-head-right-icon" @click="dialogVisible = true"></i>
|
||||||
<div class="stand-head-right-row">
|
<div class="stand-head-right-row">
|
||||||
<div class="stand-head-right-row-time">更新2024.9.10</div>
|
<div class="stand-head-right-row-time">更新2024.9.10</div>
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
<div class="booklist">
|
<div class="booklist">
|
||||||
<div :class="{'item': true,'active': booksel === idx}" v-for="item,idx in bookList" :key="idx" @click="bookChange(item,idx)">
|
<div :class="{'item': true,'active': booksel === idx}" v-for="item,idx in bookList" :key="idx" @click="bookChange(item,idx)">
|
||||||
<el-image class="bookimg" :src="item.avartar" />
|
<el-image class="bookimg" :src="item.avartar" />
|
||||||
<div class="bookname">{{item.bookName}}</div>
|
<div class="bookname">{{item.itemtitle}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -175,7 +175,7 @@ const selectHandel = (value) => {
|
||||||
}
|
}
|
||||||
//保存json文件
|
//保存json文件
|
||||||
const saveJSON = (data) => {
|
const saveJSON = (data) => {
|
||||||
|
|
||||||
let filename = ''
|
let filename = ''
|
||||||
// const data = {
|
// const data = {
|
||||||
// name: 'txt',
|
// name: 'txt',
|
||||||
|
@ -249,7 +249,11 @@ const getAllSubject = async () => {
|
||||||
const dataList = [];
|
const dataList = [];
|
||||||
rows && rows.map((item,idx) => {
|
rows && rows.map((item,idx) => {
|
||||||
if(item.fileurl !== ''){
|
if(item.fileurl !== ''){
|
||||||
dataList.push({...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: item.fileurl.replace('.txt','')})
|
let infos = {...item,avartar: import.meta.env.VITE_APP_BUILD_BASE_PATH + item.avartar,bookName: item.fileurl.replace('.txt','')}
|
||||||
|
if(infos.itemgroup==="校本课程") {
|
||||||
|
infos.avartar = item.avartar
|
||||||
|
}
|
||||||
|
dataList.push(infos)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
bookList.value = dataList
|
bookList.value = dataList
|
||||||
|
@ -265,7 +269,7 @@ const getAllSubject = async () => {
|
||||||
bookInfo.value = {...dataList[0]}
|
bookInfo.value = {...dataList[0]}
|
||||||
filePath += dataList[0].fileurl.replace('.txt','.pdf')
|
filePath += dataList[0].fileurl.replace('.txt','.pdf')
|
||||||
}
|
}
|
||||||
await loadPdfAnimation(filePath)
|
await loadPdfAnimation(filePath)
|
||||||
}else{
|
}else{
|
||||||
bookInfo.value = {...dataList[0]}
|
bookInfo.value = {...dataList[0]}
|
||||||
filePath += dataList[0].fileurl.replace('.txt','.pdf')
|
filePath += dataList[0].fileurl.replace('.txt','.pdf')
|
||||||
|
@ -295,7 +299,7 @@ onMounted(async () => {
|
||||||
const searchh = searchref.value.offsetHeight;
|
const searchh = searchref.value.offsetHeight;
|
||||||
listHeight.value = Math.floor(cardH) - Math.floor(headh) - Math.floor(searchh) - 60;
|
listHeight.value = Math.floor(cardH) - Math.floor(headh) - Math.floor(searchh) - 60;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
if(cardref.value && headref.value){
|
if(cardref.value && headref.value){
|
||||||
const cardH = cardref.value.offsetHeight;
|
const cardH = cardref.value.offsetHeight;
|
||||||
|
@ -346,9 +350,9 @@ onMounted(async () => {
|
||||||
console.log('转换后整体文字------',StartStr + midStr + EndStr);
|
console.log('转换后整体文字------',StartStr + midStr + EndStr);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// const isDev = process.env.NODE_ENV == 'development'
|
// const isDev = process.env.NODE_ENV == 'development'
|
||||||
// if (isDev)
|
// if (isDev)
|
||||||
// pdfUrl.value = '/'+getStaticUrl('aaa.pdf', 'user', 'selfFile', true)
|
// pdfUrl.value = '/'+getStaticUrl('aaa.pdf', 'user', 'selfFile', true)
|
||||||
// else
|
// else
|
||||||
// pdfUrl.value = getStaticUrl(route.query.path, 'user', 'selfFile', true)
|
// pdfUrl.value = getStaticUrl(route.query.path, 'user', 'selfFile', true)
|
||||||
|
@ -570,4 +574,4 @@ onMounted(async () => {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-button color="#349d44" @click="sendHomework(item)">推送</el-button>
|
<el-button color="#349d44" @click="sendHomework(item,'item')">推送</el-button>
|
||||||
</li>
|
</li>
|
||||||
<div class="no-data flex" v-if="!dataList.length && !resourceList.length">
|
<div class="no-data flex" v-if="!dataList.length && !resourceList.length">
|
||||||
<i class="iconfont icon-zanwushuju"></i>
|
<i class="iconfont icon-zanwushuju"></i>
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
<SetHomework v-model="setDialog" :title="'推送作业'" :entpcourseid="entpcourseid" :row="curRow"
|
<SetHomework v-model="setDialog" :title="'推送作业'" :entpcourseid="entpcourseid" :rows="curRow"
|
||||||
@on-close="closeHomework" @on-success="successHomework"/>
|
@on-close="closeHomework" @on-success="successHomework"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="homework flex" v-else>
|
<div class="homework flex" v-else>
|
||||||
|
@ -110,8 +110,11 @@ const curNode = reactive({
|
||||||
data: {}
|
data: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const sendHomework = (row) => {
|
const sendHomework = (row,type) => {
|
||||||
curRow.value = row
|
if(type == 'item'){
|
||||||
|
// 布置推送单个作业
|
||||||
|
curRow.value = [row]
|
||||||
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
ipcMsgSend('tool-sphere:set:ignore', false)
|
ipcMsgSend('tool-sphere:set:ignore', false)
|
||||||
}, 200)
|
}, 200)
|
||||||
|
|
Loading…
Reference in New Issue