| 
					
				 | 
			
			
				@@ -10,6 +10,7 @@ import { defineComponent, onMounted, reactive, ref, watch } from 'vue'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import styles from '../index.module.less'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import CSelect from '/src/components/CSelect'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { addClass, getConfiguredSubjects } from '../api'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { api_getCurrentGradeYear } from '../../studentList/api'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   props: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     activeRow: { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -43,6 +44,7 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       currentClass: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       subjectId: null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const gradeYearList = ref([] as any); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const subjectList = ref([] as any); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const submitForms = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       foemsRef.value.validate(async (error: any) => { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -63,6 +65,25 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const getYearList = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const { data } = await api_getCurrentGradeYear({}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const temp = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            label: data + 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            value: data + 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            label: data, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            value: data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        gradeYearList.value = temp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } catch { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const getConfigSubject = async () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const { data } = await getConfiguredSubjects({ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -94,6 +115,10 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    onMounted(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      getYearList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return () => ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <div class={[styles.addClass]}> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <NForm label-placement="left" model={createClassForm} ref={foemsRef}> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -108,11 +133,9 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <CSelect 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               {...({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 style: { width: '400px' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                options: props.gradeYearList, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                options: gradeYearList.value, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 placeholder: '选择学年', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                clearable: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                labelField: 'name', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                valueField: 'id' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                clearable: true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               } as any)} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               v-model:value={createClassForm.gradeYear}></CSelect> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </NFormItem> 
			 |