|
@@ -3,7 +3,7 @@ import OHeader from '@/components/o-header'
|
|
|
import OSearch from '@/components/o-search'
|
|
|
import OSticky from '@/components/o-sticky'
|
|
|
import { ActionSheet, Button, Cell, CellGroup, Icon, Image, List, Popup } from 'vant'
|
|
|
-import { defineComponent, onMounted, reactive } from 'vue'
|
|
|
+import { defineComponent, onMounted, reactive, TransitionGroup } from 'vue'
|
|
|
import styles from './index.module.less'
|
|
|
import iconEdit from './images/icon-edit.png'
|
|
|
import { useRouter } from 'vue-router'
|
|
@@ -214,88 +214,95 @@ export default defineComponent({
|
|
|
<source src="horse.ogg" type="audio/ogg" />
|
|
|
您的浏览器不支持该音频格式。
|
|
|
</audio> */}
|
|
|
- {form.list.map((item: any) => (
|
|
|
- <CellGroup inset class={styles.cellGroup} border={false}>
|
|
|
- <Cell
|
|
|
- center
|
|
|
- // isLink
|
|
|
- clickable={false}
|
|
|
- titleStyle={{ flex: '1 auto' }}
|
|
|
- valueClass={[
|
|
|
- styles['no-start'],
|
|
|
- item.status === 'A_PASS' && styles.pass,
|
|
|
- item.status === 'B_NO_PASS' && styles['no-pass']
|
|
|
- ]}
|
|
|
- >
|
|
|
- {{
|
|
|
- icon: () => <Image src={iconEdit} class={styles.img} />,
|
|
|
- title: () => (
|
|
|
- <div class={[styles.unitTitle, 'van-ellipsis']}>{item.name}</div>
|
|
|
- ),
|
|
|
- value: () => unitTestStatus[item.status]
|
|
|
- }}
|
|
|
- </Cell>
|
|
|
- <Cell center class={styles.unitSection}>
|
|
|
- {{
|
|
|
- title: () => (
|
|
|
- <div class={styles.unitInformation}>
|
|
|
- <div>
|
|
|
- <div class={styles.name}>{item.orchestraName}</div>
|
|
|
- <div class={styles.endTime}>
|
|
|
- 截止时间:
|
|
|
- {dayjs(item.expiryDate || new Date()).format('YYYY-MM-DD HH:mm')}
|
|
|
+ <TransitionGroup name="van-fade">
|
|
|
+ {form.list.map((item: any) => (
|
|
|
+ <CellGroup inset class={styles.cellGroup} border={false}>
|
|
|
+ <Cell
|
|
|
+ center
|
|
|
+ // isLink
|
|
|
+ clickable={false}
|
|
|
+ titleStyle={{ flex: '1 auto' }}
|
|
|
+ valueClass={[
|
|
|
+ styles['no-start'],
|
|
|
+ item.status === 'A_PASS' && styles.pass,
|
|
|
+ item.status === 'B_NO_PASS' && styles['no-pass']
|
|
|
+ ]}
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ icon: () => <Image src={iconEdit} class={styles.img} />,
|
|
|
+ title: () => (
|
|
|
+ <div class={[styles.unitTitle, 'van-ellipsis']}>{item.name}</div>
|
|
|
+ ),
|
|
|
+ value: () => unitTestStatus[item.status]
|
|
|
+ }}
|
|
|
+ </Cell>
|
|
|
+ <Cell center class={styles.unitSection}>
|
|
|
+ {{
|
|
|
+ title: () => (
|
|
|
+ <div class={styles.unitInformation}>
|
|
|
+ <div>
|
|
|
+ <div class={styles.name}>{item.orchestraName}</div>
|
|
|
+ <div class={styles.endTime}>
|
|
|
+ 截止时间:
|
|
|
+ {dayjs(item.expiryDate || new Date()).format('YYYY-MM-DD HH:mm')}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ {item.status === 'A_PASS' || item.status === 'B_NO_PASS' ? (
|
|
|
+ <span>
|
|
|
+ {item.score || 0}
|
|
|
+ <i>分</i>
|
|
|
+ </span>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )}
|
|
|
</div>
|
|
|
- {item.status === 'A_PASS' || item.status === 'B_NO_PASS' ? (
|
|
|
- <span>
|
|
|
- {item.score || 0}
|
|
|
- <i>分</i>
|
|
|
- </span>
|
|
|
- ) : (
|
|
|
- ''
|
|
|
- )}
|
|
|
- </div>
|
|
|
- ),
|
|
|
+ ),
|
|
|
|
|
|
- label: () => (
|
|
|
- <div class={styles.unitBtnGroup}>
|
|
|
- <Button
|
|
|
- color="#FFF0E6"
|
|
|
- round
|
|
|
- block
|
|
|
- style={{ color: '#F67146' }}
|
|
|
- onClick={() => {
|
|
|
- router.push({
|
|
|
- path: '/test-exercise',
|
|
|
- query: {
|
|
|
- id: item.unitExaminationId
|
|
|
- }
|
|
|
- })
|
|
|
- }}
|
|
|
- >
|
|
|
- 练习模式
|
|
|
- </Button>
|
|
|
- {item.status === 'A_PASS' || item.status === 'B_NO_PASS' ? (
|
|
|
- <Button type="primary" round block onClick={() => onUnitTestLook(item)}>
|
|
|
- 查看测验
|
|
|
- </Button>
|
|
|
- ) : (
|
|
|
+ label: () => (
|
|
|
+ <div class={styles.unitBtnGroup}>
|
|
|
<Button
|
|
|
- type="primary"
|
|
|
+ color="#FFF0E6"
|
|
|
round
|
|
|
block
|
|
|
- disabled={dayjs().isAfter(dayjs(item.expiryDate))}
|
|
|
- onClick={() => onUnitTestStart(item)}
|
|
|
+ style={{ color: '#F67146' }}
|
|
|
+ onClick={() => {
|
|
|
+ router.push({
|
|
|
+ path: '/test-exercise',
|
|
|
+ query: {
|
|
|
+ id: item.unitExaminationId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}
|
|
|
>
|
|
|
- {item.status === 'C_ING' ? '继续测验' : '开始测验'}
|
|
|
+ 练习模式
|
|
|
</Button>
|
|
|
- )}
|
|
|
- </div>
|
|
|
- )
|
|
|
- }}
|
|
|
- </Cell>
|
|
|
- </CellGroup>
|
|
|
- ))}
|
|
|
+ {item.status === 'A_PASS' || item.status === 'B_NO_PASS' ? (
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ round
|
|
|
+ block
|
|
|
+ onClick={() => onUnitTestLook(item)}
|
|
|
+ >
|
|
|
+ 查看测验
|
|
|
+ </Button>
|
|
|
+ ) : (
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ round
|
|
|
+ block
|
|
|
+ disabled={dayjs().isAfter(dayjs(item.expiryDate))}
|
|
|
+ onClick={() => onUnitTestStart(item)}
|
|
|
+ >
|
|
|
+ {item.status === 'C_ING' ? '继续测验' : '开始测验'}
|
|
|
+ </Button>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </Cell>
|
|
|
+ </CellGroup>
|
|
|
+ ))}
|
|
|
+ </TransitionGroup>
|
|
|
</List>
|
|
|
</OFullRefresh>
|
|
|
) : (
|