Compare commits
6 Commits
18370129df
...
f7a3aa6e53
Author | SHA1 | Date |
---|---|---|
白了个白 | f7a3aa6e53 | |
白了个白 | 1488d7cc03 | |
白了个白 | 045b44b833 | |
baigl | b47a3bb63a | |
白了个白 | 5e954bab0b | |
白了个白 | 7322056dad |
|
@ -61,12 +61,25 @@ const checkList = ref([])// 当前年级对应学科的课程,
|
|||
// 获取基础的学科
|
||||
const getSubject = () => {
|
||||
//没有学科则不进行下面的步骤
|
||||
if(!userStore.subject) return
|
||||
listEvaluation({ itemkey: 'subject', pageSize: 500 }).then((res) => {
|
||||
const arr = userStore.subject.split(',')
|
||||
subjectList.value = res.rows.filter(item => arr.includes(String(item.id))).map(items => items)
|
||||
console.log(subjectList,'subjectList');
|
||||
// if(!userStore.subject) return
|
||||
// listEvaluation({ itemkey: 'subject', pageSize: 500 }).then((res) => {
|
||||
// const arr = userStore.subject.split(',')
|
||||
// subjectList.value = res.rows.filter(item => arr.includes(String(item.id))).map(items => items)
|
||||
// console.log(subjectList,'subjectList');
|
||||
// })
|
||||
//这里获取死数据 学科list
|
||||
const edustageList = ['小学','初中','高中'];
|
||||
const subList = ['数学','物理','化学','生物','科学'];
|
||||
edustageList.forEach((item) => {
|
||||
subList.forEach((subItems) => {
|
||||
subjectList.value.push({
|
||||
edustage: item,
|
||||
edusubject: subItems,
|
||||
itemtitle: subItems
|
||||
})
|
||||
})
|
||||
})
|
||||
console.log(subjectList,'subjectList');
|
||||
// 默认读取一个学科
|
||||
handleUserEduStage(useClassTaskStore().experimentObj.edustage)
|
||||
}
|
||||
|
|
|
@ -200,7 +200,7 @@ const fileLoading = ref(false); // 常规作业loading
|
|||
|
||||
onMounted(() => {
|
||||
console.log("----onMounted-------")
|
||||
currentRow.value = {id:0};
|
||||
currentRow.value.id = 0
|
||||
if(propsQueryCourseObj){
|
||||
if(JSON.parse(propsQueryCourseObj)){
|
||||
courseObj.textbookId = JSON.parse(propsQueryCourseObj).bookObj // 版本
|
||||
|
@ -235,7 +235,7 @@ const isInToMyQuestion = () => {
|
|||
if(useClassTaskStores.isOpenQuestUploadView){
|
||||
useClassTaskStores.isOpenQuestUploadView = false;
|
||||
|
||||
currentRow.value = {id:1}; // 作业设计
|
||||
currentRow.value.id = 1; // 作业设计
|
||||
activeAptTab.value = "个人题库";
|
||||
//提交内容清空 重置
|
||||
classWorkForm.id = 0;
|
||||
|
@ -282,7 +282,7 @@ const handleItemClick = (itemName) => {
|
|||
return;
|
||||
}
|
||||
|
||||
currentRow.value = {id:1}; // 作业设计
|
||||
currentRow.value.id = 1; // 作业设计
|
||||
/**
|
||||
* 智能推荐?AI设计作业?
|
||||
* 习题训练: 自主搜题 校本题库 个人题库
|
||||
|
@ -325,7 +325,7 @@ const initHomeWork = async()=> {
|
|||
|
||||
const handleNewAllClass = () => {
|
||||
taskTable.value.setCurrentRow({});// 清除表格选中项背景色
|
||||
currentRow.value = {id:0}; // 作业设计
|
||||
currentRow.value.id = 0; // 作业设计
|
||||
//--------
|
||||
classWorkForm.id = 0;
|
||||
classWorkForm.uniquekey = ""; // 作业唯一标识 作业名称
|
||||
|
@ -352,7 +352,7 @@ const handleDelete =() => {
|
|||
return delClasswork(ids.join(','));
|
||||
}).then(() => {
|
||||
taskTable.value.setCurrentRow({});// 清除表格选中项背景色
|
||||
currentRow.value = {id:0}; // 作业设计
|
||||
currentRow.value.id = 0; // 作业设计
|
||||
taskList.value = [];
|
||||
// initHomeWork();
|
||||
setTimeout(() => {
|
||||
|
@ -446,7 +446,7 @@ const handleCurrentChange = (val) => {
|
|||
|
||||
console.log(val,'???????????')
|
||||
if(val && val.id >0 ) {
|
||||
currentRow.value = val;
|
||||
currentRow.value.id = 1;
|
||||
classWorkForm.worktype = val.worktype; //作业类型
|
||||
editListItem(val, courseObj).then((obj) => {
|
||||
if(obj){
|
||||
|
@ -670,9 +670,9 @@ const handleClassWorkFormQuizRemove = (index) =>{
|
|||
console.log('该清空左侧列表数据了');
|
||||
// 清空左侧 选中的布置列表 并刷新列表
|
||||
if(isShow.value){
|
||||
currentRow.value = {id:1};
|
||||
currentRow.value.id = 1;
|
||||
}else{
|
||||
currentRow.value = {id:0};
|
||||
currentRow.value.id = 0;
|
||||
}
|
||||
initHomeWork();
|
||||
|
||||
|
@ -814,7 +814,11 @@ const editWork = async (cform) =>{
|
|||
if (res.code == 200) {
|
||||
ElMessage.success('更新成功');
|
||||
// 清空左侧 选中的布置列表 并刷新列表
|
||||
currentRow.value = {id:0};
|
||||
if(isShow.value){
|
||||
currentRow.value.id = 1;
|
||||
}else{
|
||||
currentRow.value.id = 0;
|
||||
}
|
||||
initHomeWork();
|
||||
// // 返回上一页
|
||||
// router.back()
|
||||
|
|
Loading…
Reference in New Issue