|
@@ -36,44 +36,47 @@ export default defineComponent({
|
|
|
uniDetail: {} as any
|
|
|
})
|
|
|
const showTip = ref(false)
|
|
|
- const getList = async () => {
|
|
|
- data.loading = true
|
|
|
- try {
|
|
|
- const res: any = await request.post(
|
|
|
- state.platformApi + '/courseSchedule/queryUnitExamination',
|
|
|
- {
|
|
|
- requestType: 'form',
|
|
|
- data: {
|
|
|
- lessonCoursewareId: route.query.lessonCoursewareId,
|
|
|
- classGroupId: forms.value.classGroupId
|
|
|
- }
|
|
|
- }
|
|
|
- )
|
|
|
- // classGroupId: forms.value.classGroupId
|
|
|
- data.list = res.data || []
|
|
|
- } catch (error) {}
|
|
|
+ // const getList = async () => {
|
|
|
+ // data.loading = true
|
|
|
+ // try {
|
|
|
+ // const res: any = await request.post(
|
|
|
+ // state.platformApi + '/courseSchedule/queryUnitExamination',
|
|
|
+ // {
|
|
|
+ // requestType: 'form',
|
|
|
+ // data: {
|
|
|
+ // lessonCoursewareId: route.query.lessonCoursewareId,
|
|
|
+ // classGroupId: forms.value.classGroupId
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // )
|
|
|
+ // // classGroupId: forms.value.classGroupId
|
|
|
+ // data.list = res.data || []
|
|
|
+ // } catch (error) {}
|
|
|
|
|
|
- data.loading = false
|
|
|
- }
|
|
|
+ // data.loading = false
|
|
|
+ // }
|
|
|
|
|
|
const getClassDetail = async () => {
|
|
|
try {
|
|
|
- const res = await request.get(
|
|
|
+ const { data } = await request.get(
|
|
|
state.platformApi + `/classGroup/detail/${forms.value.classGroupId}`
|
|
|
)
|
|
|
- forms.value.preStudentNum = res.data.preStudentNum
|
|
|
+ forms.value.preStudentNum = data.preStudentNum || 0
|
|
|
+ forms.value.orchestraName = data.orchestraName
|
|
|
+ forms.value.classGroupName = data.name
|
|
|
} catch (e) {
|
|
|
console.log(e)
|
|
|
}
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
forms.value = { ...JSON.parse(sessionStorage.getItem('unit-create') || '{}') } as any
|
|
|
+ console.log(forms.value)
|
|
|
if (!forms.value.classGroupId) {
|
|
|
showToast('请选择班级')
|
|
|
return
|
|
|
}
|
|
|
getClassDetail()
|
|
|
- getList()
|
|
|
+ // getList()
|
|
|
getStudentUni()
|
|
|
})
|
|
|
const getStudentUni = async () => {
|