From cc26ea4780859c36be79b5811c06d4a6a60977e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com>
Date: Sun, 29 Sep 2024 15:36:43 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=B8=83=E7=BD=AE=EF=BC=8C?=
=?UTF-8?q?=E6=A8=A1=E7=89=88=E7=BC=96=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/classTask/classTaskAssign.vue | 5 ++-
.../container/newTask/taskTypeView.vue | 16 +++++--
.../src/views/classTask/newClassTask.vue | 42 +++++++++++++------
3 files changed, 47 insertions(+), 16 deletions(-)
diff --git a/src/renderer/src/views/classTask/classTaskAssign.vue b/src/renderer/src/views/classTask/classTaskAssign.vue
index d5738a9..8c3ac06 100644
--- a/src/renderer/src/views/classTask/classTaskAssign.vue
+++ b/src/renderer/src/views/classTask/classTaskAssign.vue
@@ -454,6 +454,7 @@ const handleWorkEdit = (row, index) =>{
// 作业内容编辑-跳转到设计界面-传参
let classtaskObj = reactive({
id: '', //
+ bookName: '', // 课程名称
uniquekey: '', // 设计中的标题
title: '', // 设计中的说明
worktype: '', // 设计中的作业类型
@@ -485,6 +486,7 @@ const newHandleWorkEdit2ClassWorkQuizAdd =(row, index) =>{
if (listCourseWork.length > 0) {
classtaskObj.id= row.id; //
+ classtaskObj.bookName = row.evaltitle? row.evalparenttitle+'/'+row.evaltitle: row.evalparenttitle// 课程名称:单元/章节: 单元
classtaskObj.uniquekey= row.uniquekey; // 设计中的标题
classtaskObj.title= row.title; // 设计中的说明
classtaskObj.worktype= row.worktype; // 设计中的作业类型
@@ -527,7 +529,8 @@ const newHandleWorkEdit2ClassWorkQuizAdd =(row, index) =>{
});
classtaskObj.quizlist = idres.rows;
- // 跳转作业设计 页面
+ // 跳转 作业设计 进行编辑页面
+ classtaskObj.bookObj = courseObj; // 教材对象
router.push({
path: '/newClassTask',
query: {
diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue
index ca338fc..eb534ae 100644
--- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue
+++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue
@@ -9,7 +9,7 @@
- {{ item }}
+ {{ item }}
@@ -279,6 +279,10 @@ const props = defineProps({
propsformobj: {
type: Object,
default: () =>({})
+ },
+ isedit: {
+ type: Boolean,
+ default: false
}
})
@@ -360,7 +364,7 @@ const workResource = reactive({
}); // 作业资源
let classWorkForm = reactive({
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): '习题训练', //作业类型
title: props.propsformobj.title?cloneDeep(props.propsformobj.title):'',// 作业说明
quizlist: props.propsformobj.quizlist?cloneDeep(props.propsformobj.quizlist):[] // 作业习题列表内容
@@ -902,6 +906,7 @@ const editWork = async (cform) =>{
// //evalid = evalid, // 更新[作业范围]
// }
// let res = await updateClasswork(cform);
+ // console.log('更新作业任务信息', cform);
let res = await updateClasswork(cform);
if (res.code == 200) {
ElMessage.success('更新成功');
@@ -968,7 +973,12 @@ const editWork = async (cform) =>{
onMounted(() => {
})
-
+watch(() => props.propsformobj.uniquekey, (newVal) => {
+ console.log(props.propsformobj,'propsformobj')
+ if(props.propsformobj.uniquekey){
+ classWorkForm.uniquekey = props.propsformobj.uniquekey?cloneDeep(props.propsformobj.uniquekey):''; // 作业唯一标识 作业名称
+ }
+})
watch(() => props.bookobj.levelSecondId, (newVal) => {
console.log(props.bookobj,'课程选择')
// 习题资源
diff --git a/src/renderer/src/views/classTask/newClassTask.vue b/src/renderer/src/views/classTask/newClassTask.vue
index 1ad78e5..dd75352 100644
--- a/src/renderer/src/views/classTask/newClassTask.vue
+++ b/src/renderer/src/views/classTask/newClassTask.vue
@@ -15,11 +15,15 @@
-
+
课程目录
+
+ 课程:
+ {{bookTitle}}
+
@@ -30,13 +34,13 @@
-
+