|
@@ -2,27 +2,14 @@ import OEmpty from '@/components/o-empty'
|
|
|
import OHeader from '@/components/o-header'
|
|
|
import OSearch from '@/components/o-search'
|
|
|
import OSticky from '@/components/o-sticky'
|
|
|
-import {
|
|
|
- ActionSheet,
|
|
|
- Button,
|
|
|
- Cell,
|
|
|
- CellGroup,
|
|
|
- Dialog,
|
|
|
- Icon,
|
|
|
- Image,
|
|
|
- List,
|
|
|
- showToast,
|
|
|
- Tab,
|
|
|
- Tabs
|
|
|
-} from 'vant'
|
|
|
+import { Dialog, Icon, Tab, Tabs } from 'vant'
|
|
|
import { defineComponent, onMounted, reactive, ref } from 'vue'
|
|
|
import questIcon from '@/school/images/quest-icon.png'
|
|
|
import styles from './index.module.less'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
import UnitListItem from './models/unit-list-item'
|
|
|
import UnitStudentList from './models/unit-student-list'
|
|
|
-import OFullRefresh from '@/components/o-full-refresh'
|
|
|
-//
|
|
|
+import { state } from '@/state'
|
|
|
import request from '@/helpers/request'
|
|
|
export default defineComponent({
|
|
|
name: 'unitDetail',
|
|
@@ -32,14 +19,21 @@ export default defineComponent({
|
|
|
const form = reactive({})
|
|
|
const refreshing = ref(false)
|
|
|
const loading = ref(false)
|
|
|
+ const platformApi = state.platformApi
|
|
|
const activeName = ref('one')
|
|
|
+ const info = ref({} as any)
|
|
|
const showTip = ref(false)
|
|
|
const getDetail = async () => {
|
|
|
try {
|
|
|
- const res = await request.get('/api-teacher/unitExamination/detail', {
|
|
|
- params: { unitExaminationId: route.query.id }
|
|
|
+ const res = await request.post(`${platformApi}/classGroupUnitExamination/detail`, {
|
|
|
+ data: { classGroupUnitExaminationId: route.query.id },
|
|
|
+ requestType: 'form'
|
|
|
})
|
|
|
- } catch (e) {}
|
|
|
+ info.value = res.data
|
|
|
+ console.log('🚀 ~ file: unitDetail.tsx:45 ~ getDetail ~ info.value', info.value)
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e)
|
|
|
+ }
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
getDetail()
|
|
@@ -47,7 +41,7 @@ export default defineComponent({
|
|
|
|
|
|
return () => (
|
|
|
<div class={styles.unitDetail}>
|
|
|
- <UnitListItem></UnitListItem>
|
|
|
+ <UnitListItem item={info.value}></UnitListItem>
|
|
|
<div class={styles.tabsWrap}>
|
|
|
<Icon
|
|
|
class={styles.tabsWrapIcon}
|