|
@@ -14,6 +14,7 @@ import { useRoute, useRouter } from 'vue-router'
|
|
import { state as globalState } from '@/state'
|
|
import { state as globalState } from '@/state'
|
|
import request from '@/helpers/request'
|
|
import request from '@/helpers/request'
|
|
import { postMessage } from '@/helpers/native-message'
|
|
import { postMessage } from '@/helpers/native-message'
|
|
|
|
+import { teacherAttType } from '@/constant/index'
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
props: ['item'],
|
|
props: ['item'],
|
|
name: 'teacher-attendDetail',
|
|
name: 'teacher-attendDetail',
|
|
@@ -86,7 +87,7 @@ export default defineComponent({
|
|
|
|
|
|
const setAddress = async (myPoint: string) => {
|
|
const setAddress = async (myPoint: string) => {
|
|
if (!myPoint) {
|
|
if (!myPoint) {
|
|
- showToast('当前暂无定位')
|
|
|
|
|
|
+ // showToast('当前暂无定位')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
@@ -179,7 +180,9 @@ export default defineComponent({
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<p class={styles.signTime}>
|
|
<p class={styles.signTime}>
|
|
- {teacherAttInfo.value?.signInTime ? '签到时间' : ''}
|
|
|
|
|
|
+ {teacherAttInfo.value?.signInTime
|
|
|
|
+ ? teacherAttType[teacherAttInfo.value?.signInStatus]
|
|
|
|
+ : ''}
|
|
|
|
|
|
{teacherAttInfo.value?.signInTime ? (
|
|
{teacherAttInfo.value?.signInTime ? (
|
|
<span>{dayjs(teacherAttInfo.value?.signInTime).format('HH:mm:ss')}</span>
|
|
<span>{dayjs(teacherAttInfo.value?.signInTime).format('HH:mm:ss')}</span>
|
|
@@ -214,21 +217,27 @@ export default defineComponent({
|
|
setAddress(teacherAttInfo.value.signInLongitudeLatitude)
|
|
setAddress(teacherAttInfo.value.signInLongitudeLatitude)
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
- <p>
|
|
|
|
- {teacherAttInfo.value?.signInLongitudeLatitudeStatus === 'NORMAL'
|
|
|
|
- ? '考勤范围内'
|
|
|
|
- : '考勤范围外'}
|
|
|
|
- </p>
|
|
|
|
- <p
|
|
|
|
- class={[
|
|
|
|
- styles.locP,
|
|
|
|
- teacherAttInfo.value?.signInLongitudeLatitudeStatus === 'NORMAL'
|
|
|
|
- ? styles.pass
|
|
|
|
- : styles.error
|
|
|
|
- ]}
|
|
|
|
- >
|
|
|
|
- 查看定位 <Icon name="arrow" class={styles.arrow}></Icon>
|
|
|
|
- </p>
|
|
|
|
|
|
+ {teacherAttInfo.value.signInLongitudeLatitude ? (
|
|
|
|
+ <p>
|
|
|
|
+ {teacherAttInfo.value?.signInLongitudeLatitudeStatus === 'NORMAL'
|
|
|
|
+ ? '考勤范围内'
|
|
|
|
+ : '考勤范围外'}
|
|
|
|
+ </p>
|
|
|
|
+ ) : (
|
|
|
|
+ <p>暂无定位</p>
|
|
|
|
+ )}
|
|
|
|
+ {teacherAttInfo.value.signInLongitudeLatitude ? (
|
|
|
|
+ <p
|
|
|
|
+ class={[
|
|
|
|
+ styles.locP,
|
|
|
|
+ teacherAttInfo.value?.signInLongitudeLatitudeStatus === 'NORMAL'
|
|
|
|
+ ? styles.pass
|
|
|
|
+ : styles.error
|
|
|
|
+ ]}
|
|
|
|
+ >
|
|
|
|
+ 查看定位 <Icon name="arrow" class={styles.arrow}></Icon>
|
|
|
|
+ </p>
|
|
|
|
+ ) : null}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -250,7 +259,9 @@ export default defineComponent({
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<p class={styles.signTime}>
|
|
<p class={styles.signTime}>
|
|
- {teacherAttInfo.value?.signOutTime ? '签退时间' : ''}
|
|
|
|
|
|
+ {teacherAttInfo.value?.signOutTime
|
|
|
|
+ ? teacherAttType[teacherAttInfo.value?.signOutStatus]
|
|
|
|
+ : ''}
|
|
|
|
|
|
{teacherAttInfo.value?.signOutTime ? (
|
|
{teacherAttInfo.value?.signOutTime ? (
|
|
<span>{dayjs(teacherAttInfo.value?.signOutTime).format('HH:mm:ss')}</span>
|
|
<span>{dayjs(teacherAttInfo.value?.signOutTime).format('HH:mm:ss')}</span>
|
|
@@ -285,22 +296,28 @@ export default defineComponent({
|
|
setAddress(teacherAttInfo.value.signOutLongitudeLatitude)
|
|
setAddress(teacherAttInfo.value.signOutLongitudeLatitude)
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
- <p>
|
|
|
|
- {' '}
|
|
|
|
- {teacherAttInfo.value?.signOutLongitudeLatitudeStatus === 'NORMAL'
|
|
|
|
- ? '考勤范围内'
|
|
|
|
- : '考勤范围外'}
|
|
|
|
- </p>
|
|
|
|
- <p
|
|
|
|
- class={[
|
|
|
|
- styles.locP,
|
|
|
|
- teacherAttInfo.value?.signOutLongitudeLatitudeStatus === 'NORMAL'
|
|
|
|
- ? styles.pass
|
|
|
|
- : styles.error
|
|
|
|
- ]}
|
|
|
|
- >
|
|
|
|
- 查看定位 <Icon name="arrow" class={styles.arrow}></Icon>
|
|
|
|
- </p>
|
|
|
|
|
|
+ {teacherAttInfo.value.signOutLongitudeLatitude ? (
|
|
|
|
+ <>
|
|
|
|
+ <p>
|
|
|
|
+ {' '}
|
|
|
|
+ {teacherAttInfo.value?.signOutLongitudeLatitudeStatus === 'NORMAL'
|
|
|
|
+ ? '考勤范围内'
|
|
|
|
+ : '考勤范围外'}
|
|
|
|
+ </p>
|
|
|
|
+ <p
|
|
|
|
+ class={[
|
|
|
|
+ styles.locP,
|
|
|
|
+ teacherAttInfo.value?.signOutLongitudeLatitudeStatus === 'NORMAL'
|
|
|
|
+ ? styles.pass
|
|
|
|
+ : styles.error
|
|
|
|
+ ]}
|
|
|
|
+ >
|
|
|
|
+ 查看定位 <Icon name="arrow" class={styles.arrow}></Icon>
|
|
|
|
+ </p>
|
|
|
|
+ </>
|
|
|
|
+ ) : (
|
|
|
|
+ <p>暂无定位</p>
|
|
|
|
+ )}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|