|
@@ -22,6 +22,7 @@ export default defineComponent({
|
|
|
const gotoStudentDetail = () => {
|
|
|
// router.push({ path: '/student-att-day', query: { time: teacherAttInfo.value.time } })
|
|
|
}
|
|
|
+ const attendanceScope = ref(0)
|
|
|
const teacherAttInfo = ref({} as any)
|
|
|
const platformApi = ref(globalState.platformApi)
|
|
|
const showContact = ref(false)
|
|
@@ -52,7 +53,7 @@ export default defineComponent({
|
|
|
await postMessage({
|
|
|
api: 'callPhone',
|
|
|
content: {
|
|
|
- phone: teacherAttInfo.value.phone
|
|
|
+ phone: teacherAttInfo.value.teacherPhone
|
|
|
}
|
|
|
})
|
|
|
closeSheet()
|
|
@@ -68,6 +69,11 @@ export default defineComponent({
|
|
|
{}
|
|
|
)
|
|
|
teacherAttInfo.value = res.data
|
|
|
+ res.data.sysParamConfigs.forEach((item: any) => {
|
|
|
+ if (item.paramName == 'scope_of_attendance') {
|
|
|
+ attendanceScope.value = item.paramValue
|
|
|
+ }
|
|
|
+ })
|
|
|
} catch (e) {
|
|
|
console.log(e)
|
|
|
}
|
|
@@ -75,6 +81,23 @@ export default defineComponent({
|
|
|
onMounted(() => {
|
|
|
getCourseAtt()
|
|
|
})
|
|
|
+
|
|
|
+ const setAddress = async (myPoint: string) => {
|
|
|
+ console.log(myPoint, attendanceScope.value)
|
|
|
+ try {
|
|
|
+ await postMessage({
|
|
|
+ api: 'getAppAuth',
|
|
|
+ content: {
|
|
|
+ type: 'getPoint',
|
|
|
+ orginPoint: teacherAttInfo.value.addressLongitudeLatitude,
|
|
|
+ myPoint,
|
|
|
+ limitDistance: attendanceScope.value
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e)
|
|
|
+ }
|
|
|
+ }
|
|
|
return () => (
|
|
|
<>
|
|
|
<OHeader></OHeader>
|
|
@@ -170,8 +193,15 @@ export default defineComponent({
|
|
|
/>
|
|
|
</div>
|
|
|
<div class={styles.attRang}>
|
|
|
- <p>考勤范围内</p>
|
|
|
+ <p>
|
|
|
+ {teacherAttInfo.value?.signInLongitudeLatitudeStatus === 'NORMAL'
|
|
|
+ ? '考勤范围内'
|
|
|
+ : '考勤范围外'}
|
|
|
+ </p>
|
|
|
<p
|
|
|
+ onClick={() => {
|
|
|
+ setAddress(teacherAttInfo.value.signInLongitudeLatitude)
|
|
|
+ }}
|
|
|
class={[
|
|
|
styles.locP,
|
|
|
teacherAttInfo.value?.signInLongitudeLatitudeStatus === 'NORMAL'
|
|
@@ -213,20 +243,34 @@ export default defineComponent({
|
|
|
</div>
|
|
|
<div
|
|
|
class={
|
|
|
- teacherAttInfo.value?.signOutStatus === 'NORMAL' ? styles.passWrap : styles.goWrap
|
|
|
+ teacherAttInfo.value?.signOutLongitudeLatitudeStatus === 'NORMAL'
|
|
|
+ ? styles.passWrap
|
|
|
+ : styles.goWrap
|
|
|
}
|
|
|
>
|
|
|
<div class={styles.attInfoDot}>
|
|
|
<div class={styles.attInfoDotTitle}>
|
|
|
<span>签退定位</span>
|
|
|
<img
|
|
|
- src={teacherAttInfo.value?.signOutStatus === 'NORMAL' ? successIcon : errorIcon}
|
|
|
+ src={
|
|
|
+ teacherAttInfo.value?.signOutLongitudeLatitudeStatus === 'NORMAL'
|
|
|
+ ? successIcon
|
|
|
+ : errorIcon
|
|
|
+ }
|
|
|
alt=""
|
|
|
/>
|
|
|
</div>
|
|
|
<div class={styles.attRang}>
|
|
|
- <p>考勤范围内</p>
|
|
|
+ <p>
|
|
|
+ {' '}
|
|
|
+ {teacherAttInfo.value?.signInLongitudeLatitudeStatus === 'NORMAL'
|
|
|
+ ? '考勤范围内'
|
|
|
+ : '考勤范围外'}
|
|
|
+ </p>
|
|
|
<p
|
|
|
+ onClick={() => {
|
|
|
+ setAddress(teacherAttInfo.value.signOutLongitudeLatitude)
|
|
|
+ }}
|
|
|
class={[
|
|
|
styles.locP,
|
|
|
teacherAttInfo.value?.signInLongitudeLatitudeStatus === 'NORMAL'
|