@@ -140,6 +145,7 @@ import { editListItem } from '@/hooks/useClassTask'
import MyQuestion from '@/views/classTask/newClassTaskAssign/myQuestion/index.vue'
import SchoolQuestion from '@/views/classTask/newClassTaskAssign/schoolQuestion/index.vue'
import SearchQuestion from '@/views/classTask/newClassTaskAssign/searchQuestion/index.vue'
+import ExperimentQuestion from "@/views/classTask/newClassTaskAssign/experimentQuestion/index.vue";
import whiteboard from '@/components/whiteboard/whiteboard.vue'
import FileUpload from "@/components/FileUpload/index.vue";
import Right from './Right/index.vue'
@@ -258,6 +264,16 @@ watch(() => props.currentCourse, (newVal, oldVal) => {
}
console.log(newVal,'newval');
},{deep:true})
+
+// ------------科学实验
+const getExpObj = (obj)=>{
+ // obj:{
+ // fileurl: "https://phet.colorado.edu/sims/html/number-compare/latest/number-compare_zh_CN.html"
+ // label: "数量比较"
+ // subject: "math"
+ // }
+ classWorkForm.fileHomeworkList = [obj];
+}
//---------作业设计---
const handleItemClick = (itemName) => {
console.log('itemName', itemName);
@@ -582,6 +598,32 @@ const handleClassWorkFormQuizRemove = (index) =>{
fileLoading.value = false
}
}
+ else if(classWorkForm.worktype === "科学实验"){
+ if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请选择科学实验的课程!'});
+ cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
+ cform.entpcourseworklist = JSON.stringify([{'id':-3, 'score': '10'}]);
+ try {
+ console.log(cform,'科学实验')
+ addClassworkReturnId(cform).then((res) => {
+ ElMessage({ type: 'success', message: '作业设计成功!'});
+ // 重置提交表单
+ classWorkForm.worktype = "科学实验";
+ classWorkForm.uniquekey = ''; // props.propsformobj.uniquekey, // 作业唯一标识 作业名称
+ classWorkForm.title = "";
+ classWorkForm.quizlist = [], // 作业习题列表内容
+
+ // 情况选择的资源缓存
+ classWorkForm.chooseWorkLists = []; // 框架梳理list
+ classWorkForm.whiteboardObj = ''; // ? // 清空白板
+ classWorkForm.fileHomeworkList = []; // 常规作业list
+ classWorkForm.id = res
+ emits('getData',classWorkForm)
+ // TODO 科学实验 待完善
+ })
+ } finally{
+ //
+ }
+ }
else {
// 正常新任务
var ll = [];
@@ -667,7 +709,10 @@ const editWork = async (cform) =>{
}else{
if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请上传常规作业附件!'});
}
- }else {
+ }else if( classWorkForm.worktype == '科学实验') {
+ if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请选择科学实验科目!'});
+ }
+ else {
if (classWorkForm.chooseWorkLists.length == 0) {
// 框架梳理
ElMessage.error('请先添加作业资源!');
@@ -759,6 +804,10 @@ const editWork = async (cform) =>{
// 1.更新作业任务下的课堂展示内容 (这里未做校验, 直接将当前文件对象更新过去)
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
}
+ else if (classWorkForm.worktype=='科学实验') { //TODO 注意,fileHomeworkList字段与常规作业共用
+ // 1.更新作业任务下的课堂展示内容 (这里未做校验, 直接将当前文件对象更新过去)
+ cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
+ }
// 3.更新作业任务本身
let res = await updateClasswork(cform);
@@ -865,6 +914,11 @@ const editWork = async (cform) =>{
padding: 20px;
box-sizing: border-box;
}
+
+ .experiment-homework{
+ padding: 15px;
+ height: 100%;
+ }
}
.page-right {
overflow: hidden;
diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/questToPPTist/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/questToPPTist/index.vue
index 2d7e448..156da53 100644
--- a/src/renderer/src/views/classTask/newClassTaskAssign/questToPPTist/index.vue
+++ b/src/renderer/src/views/classTask/newClassTaskAssign/questToPPTist/index.vue
@@ -6,9 +6,9 @@
-
+
diff --git a/src/renderer/src/views/model/index.vue b/src/renderer/src/views/model/index.vue
index 4bc6ebb..dd15098 100644
--- a/src/renderer/src/views/model/index.vue
+++ b/src/renderer/src/views/model/index.vue
@@ -98,10 +98,13 @@ import progressDialog from '@/views/teachingDesign/container/progress-dialog.vue
import msgUtils from "@/plugins/modal";
import * as commUtils from "@/utils/comm";
import * as Api_server from "@/api/apiService"; // 学科名字文生图
+import useClassTaskStore from '@/store/modules/classTask'
+
const router = useRouter()
const userStore = useUserStore().user // 用户信息
const currentNode = ref({})
const refs = ref([]);
+const classTaskStore = useClassTaskStore();
const collectRef = (key) => {
return (el) => {
@@ -513,7 +516,9 @@ const changeClass = async (type, row, other) => {
}
// 页面加载
-onMounted(() => {
+onMounted(async () => {
+ // 更新第三方题型题类
+ await classTaskStore.initJYInfo(userStore);
})
diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue
index af02b1e..2196474 100644
--- a/src/renderer/src/views/prepare/index.vue
+++ b/src/renderer/src/views/prepare/index.vue
@@ -10,7 +10,7 @@
新建文枢课件
AI一键生成
-
+ 打开宫格
导入PPT