|
@@ -109,15 +109,23 @@ export default defineComponent({
|
|
|
const cList = data || [];
|
|
|
const gradeList: any = [];
|
|
|
const popSelectOptions: any = [];
|
|
|
+ // getLastClassRecode()
|
|
|
cList.forEach((item: any, index: number) => {
|
|
|
- if (index === 0) {
|
|
|
- const temp = item.classGroupList[0];
|
|
|
- forms.classSelect = {
|
|
|
- currentGradeNum: item.currentGradeNum,
|
|
|
- currentClass: temp.id,
|
|
|
- name: temp.name
|
|
|
- };
|
|
|
- }
|
|
|
+ // if (index === 0) {
|
|
|
+ // const temp = item.classGroupList[0];
|
|
|
+
|
|
|
+ // if(forms.classSelect.currentClass){
|
|
|
+ // return
|
|
|
+ // }else{
|
|
|
+ // forms.classSelect = {
|
|
|
+ // currentGradeNum: item.currentGradeNum,
|
|
|
+ // currentClass: temp.id,
|
|
|
+ // name: temp.name
|
|
|
+ // };
|
|
|
+ // console.log(forms.classSelect.currentClass,'getClassList')
|
|
|
+ // }
|
|
|
+
|
|
|
+ // }
|
|
|
|
|
|
const classList: any = [];
|
|
|
item.classGroupList.forEach((i: any) => {
|
|
@@ -153,15 +161,12 @@ export default defineComponent({
|
|
|
rows: 1,
|
|
|
teacherId: userStore.getUserInfo.id
|
|
|
});
|
|
|
- console.log(data.rows[0],'设置了Rows')
|
|
|
if(data.rows.length >0 && data.rows[0]){
|
|
|
- forms.classSelect.classGroupId = data.rows[0].classGroupId;
|
|
|
- forms.classSelect.classGroupName = data.rows[0].classGroupName;
|
|
|
- console.log('设置了=======>')
|
|
|
+ forms.classSelect.currentClass = data.rows[0].classGroupId;
|
|
|
+ forms.classSelect.name = data.rows[0].classGroupName;
|
|
|
}
|
|
|
- console.log(data,'getLastClassRecode')
|
|
|
}
|
|
|
- getLastClassRecode()
|
|
|
+
|
|
|
|
|
|
const getCourseSchedulePage = async () => {
|
|
|
forms.classLoading = true;
|
|
@@ -209,7 +214,7 @@ export default defineComponent({
|
|
|
|
|
|
onMounted(async () => {
|
|
|
await getClassList();
|
|
|
-
|
|
|
+ await getLastClassRecode()
|
|
|
await catchStore.getSubjects();
|
|
|
|
|
|
await getCourseSchedulePage();
|