| 
					
				 | 
			
			
				@@ -5,6 +5,7 @@ import { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   Checkbox, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   CheckboxGroup, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   DatePicker, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Dialog, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   Field, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   Icon, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   Picker, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -15,18 +16,52 @@ import { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   Sticky, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   Tag 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } from 'vant' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { defineComponent, reactive } from 'vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { defineComponent, onMounted, reactive } from 'vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { weekdays, weekFormat } from '../../create' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import styles from './index.module.less' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { forms } from '../../create' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import dayjs from 'dayjs' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { useRouter } from 'vue-router' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import OPopup from '@/components/o-popup' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import ClassList from '../../modal/class-list' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import request from '@/helpers/request' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { state } from '@/state' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   name: 'practice', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   setup() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const router = useRouter() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 查询没有设置指导老师的班级 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const getClasses = async (show = true) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const { data } = await request.post('/api-school/classGroup/page', { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          data: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            page: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            rows: 200, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            schoolId: state.user.data.school.id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            hasTeacher: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            orchestraType: 'DELIVERY' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 班级数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        forms.classList = data.rows || [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 判断没有设置伴学指导的班级 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (forms.classList.length > 0 && show) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          forms.status = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } catch { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const onSubmit = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 判断是否有班级没有设置伴学指导 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (forms.classList.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        forms.status = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if (forms.classType.length <= 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         showToast('请选择课程类型') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -59,6 +94,10 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       router.push('/practice-detail') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    onMounted(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      getClasses() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return () => ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <div class={styles.practice}> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <div class={styles.tips}> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -203,6 +242,42 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </Popup> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <Dialog 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          v-model:show={forms.status} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          message={`您有${forms.classList.length}个班级尚未指定伴学指导,请完成指定后再进行训练规划。`} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          messageAlign="left" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          confirmButtonText="去设置" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          cancelButtonText="暂不设置" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          showCancelButton 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          onConfirm={() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            forms.classStatus = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          {{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            title: () => ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <div class={styles.dialogTitle}> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <i></i> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                指定伴学指导 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </Dialog> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <OPopup 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          v-model:modelValue={forms.classStatus} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          position="bottom" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          style={{ background: '#F6F6F6' }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          destroy 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <ClassList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            classList={forms.classList} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            onClose={() => (forms.classStatus = false)} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            onConfirm={() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              getClasses(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </OPopup> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 |