|
@@ -12,7 +12,8 @@ import {
|
|
|
PullRefresh,
|
|
|
showToast,
|
|
|
Dialog,
|
|
|
- Image
|
|
|
+ Image,
|
|
|
+ NoticeBar
|
|
|
} from 'vant'
|
|
|
import OFullRefresh from '@/components/o-full-refresh'
|
|
|
import DetailItem from './modals/detail-item'
|
|
@@ -60,7 +61,7 @@ export default defineComponent({
|
|
|
page: 1,
|
|
|
rows: 20,
|
|
|
userId: route.query.id,
|
|
|
- clientType: 'STUDENT'
|
|
|
+ clientType: globalState.platformType
|
|
|
})
|
|
|
const showTip = ref(false)
|
|
|
const minDate = ref(new Date(dayjs().subtract(10, 'year').format('YYYY-MM-DD')))
|
|
@@ -108,15 +109,32 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
const getDetail = async () => {
|
|
|
- try {
|
|
|
- const res = await request.get(`/api-backend/student/detail/${state.id}`)
|
|
|
- console.log(res)
|
|
|
- infoDetail.value = { ...res.data }
|
|
|
- } catch (e: any) {
|
|
|
- // console.log(e, 'e')
|
|
|
- const message = e.message
|
|
|
- // showToast(message)
|
|
|
+ if(globalState.platformType === 'TEACHER'){
|
|
|
+ try {
|
|
|
+ const res = await request.post(`${platformApi.value}/teacher/detail`, {
|
|
|
+ data:{
|
|
|
+ teacherId: state.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ infoDetail.value = { ...res.data }
|
|
|
+ infoDetail.value.subjectNames = res.data.subjectName.split(',')
|
|
|
+ } catch (e: any) {
|
|
|
+ // console.log(e, 'e')
|
|
|
+ const message = e.message
|
|
|
+ // showToast(message)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ try {
|
|
|
+ const res = await request.get(`/api-backend/student/detail/${state.id}`)
|
|
|
+ console.log(res)
|
|
|
+ infoDetail.value = { ...res.data }
|
|
|
+ } catch (e: any) {
|
|
|
+ // console.log(e, 'e')
|
|
|
+ const message = e.message
|
|
|
+ // showToast(message)
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
const topWrap = ref()
|
|
|
const topWrapHeight = ref(0)
|
|
@@ -197,9 +215,15 @@ export default defineComponent({
|
|
|
</div>
|
|
|
<div class={styles.infoMsg}>
|
|
|
<p>{infoDetail.value.nickname}</p>
|
|
|
- <div class={styles.tag}>
|
|
|
- {infoDetail.value.subjectNames ? infoDetail.value.subjectNames : '暂无声部'}
|
|
|
- </div>
|
|
|
+ {globalState.platformType === 'TEACHER' ? <NoticeBar class={styles.teacherSubject}>
|
|
|
+ {infoDetail.value?.subjectNames?.map((item: any) => {
|
|
|
+ return <div class={styles.tag}>{item}</div>
|
|
|
+ })}
|
|
|
+ </NoticeBar> : (
|
|
|
+ <div class={styles.tag}>
|
|
|
+ {infoDetail.value.subjectNames ? infoDetail.value.subjectNames : '暂无声部'}
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class={styles.topInfoRight}>
|
|
@@ -320,7 +344,7 @@ export default defineComponent({
|
|
|
default: () => (
|
|
|
<div class={styles.DialogConent}>
|
|
|
<p>
|
|
|
- 练习数据是学员通过云教练自主练习的数据统计,可根据时间段查询学员的练习天数和练习时长{' '}
|
|
|
+ 练习数据是{globalState.platformType == 'TEACHER' ? '' : '学员'}通过云教练自主练习的数据统计,可根据时间段查询{globalState.platformType == 'TEACHER' ? '' : '学员'}的练习天数和练习时长{' '}
|
|
|
</p>
|
|
|
<p>练习天数:当天有曲目播放或测评记录即算练习</p>
|
|
|
<p>练习时长:曲目播放和曲目测评的时长总和</p>
|