|
@@ -1,15 +1,4 @@
|
|
|
-import {
|
|
|
- closeToast,
|
|
|
- Icon,
|
|
|
- Loading,
|
|
|
- Popup,
|
|
|
- showDialog,
|
|
|
- showToast,
|
|
|
- Slider,
|
|
|
- Swipe,
|
|
|
- SwipeInstance,
|
|
|
- SwipeItem
|
|
|
-} from 'vant'
|
|
|
+import { closeToast, Icon, Popup, showDialog } from 'vant'
|
|
|
import {
|
|
|
defineComponent,
|
|
|
onMounted,
|
|
@@ -19,16 +8,15 @@ import {
|
|
|
ref,
|
|
|
watch,
|
|
|
Transition,
|
|
|
- TransitionGroup,
|
|
|
- onBeforeUnmount
|
|
|
+ computed
|
|
|
} from 'vue'
|
|
|
import iconBack from './image/back.svg'
|
|
|
import styles from './index.module.less'
|
|
|
import 'plyr/dist/plyr.css'
|
|
|
import request from '@/helpers/request'
|
|
|
import { state } from '@/state'
|
|
|
-import { useRoute, useRouter } from 'vue-router'
|
|
|
-import { listenerMessage, postMessage, promisefiyPostMessage } from '@/helpers/native-message'
|
|
|
+import { useRoute } from 'vue-router'
|
|
|
+import { postMessage, promisefiyPostMessage } from '@/helpers/native-message'
|
|
|
import MusicScore from './component/musicScore'
|
|
|
import iconMenu from './image/icon-menu.svg'
|
|
|
import iconDian from './image/icon-dian.svg'
|
|
@@ -36,46 +24,32 @@ import iconTouping from './image/icon-touping.svg'
|
|
|
import iconPoint from './image/icon-point.svg'
|
|
|
import iconUp from './image/icon-up.svg'
|
|
|
import iconDown from './image/icon-down.svg'
|
|
|
-import iconMore from './image/icon-more.png'
|
|
|
import Points from './component/points'
|
|
|
-import { browser, getSecondRPM } from '@/helpers/utils'
|
|
|
+import { browser } from '@/helpers/utils'
|
|
|
import { Vue3Lottie } from 'vue3-lottie'
|
|
|
import playLoadData from './datas/data.json'
|
|
|
-import { usePageVisibility, useRect } from '@vant/use'
|
|
|
+import { usePageVisibility } from '@vant/use'
|
|
|
import PlayRecordTime from './playRecordTime'
|
|
|
-import VideoPlay from './component/video-play'
|
|
|
-import {
|
|
|
- Pagination,
|
|
|
- Navigation,
|
|
|
- Virtual,
|
|
|
- EffectFade,
|
|
|
- EffectFlip,
|
|
|
- EffectCreative,
|
|
|
- Lazy
|
|
|
-} from 'swiper'
|
|
|
-import { Swiper, SwiperSlide } from 'swiper/vue'
|
|
|
-import 'swiper/less'
|
|
|
-import 'swiper/less/effect-fade'
|
|
|
-import 'swiper/less/effect-flip'
|
|
|
-import 'swiper/less/effect-creative'
|
|
|
import { handleCheckVip } from '../hook/useFee'
|
|
|
import OGuide from '@/components/o-guide'
|
|
|
import Tool, { ToolItem, ToolType } from './component/tool'
|
|
|
-import Tools from './component/tools/pen'
|
|
|
import Pen from './component/tools/pen'
|
|
|
import iconPen from './image/icon-pen.png'
|
|
|
-import { useThrottle, useThrottleFn, useDebounceFn } from '@vueuse/core'
|
|
|
+import VideoItem from './component/video-item'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'CoursewarePlay',
|
|
|
setup() {
|
|
|
const pageVisibility = usePageVisibility()
|
|
|
/** 页面显示和隐藏 */
|
|
|
- watch(() => pageVisibility.value, (value) => {
|
|
|
- if (value == 'hidden') {
|
|
|
- handleStop()
|
|
|
+ watch(
|
|
|
+ () => pageVisibility.value,
|
|
|
+ (value) => {
|
|
|
+ if (value == 'hidden') {
|
|
|
+ handleStop()
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
+ )
|
|
|
/** 设置播放容器 16:9 */
|
|
|
const parentContainer = reactive({
|
|
|
width: '100vw'
|
|
@@ -135,7 +109,6 @@ export default defineComponent({
|
|
|
})
|
|
|
|
|
|
const route = useRoute()
|
|
|
- const router = useRouter()
|
|
|
const headeRef = ref()
|
|
|
const data = reactive({
|
|
|
detail: null,
|
|
@@ -144,7 +117,10 @@ export default defineComponent({
|
|
|
showHead: true,
|
|
|
isCourse: false,
|
|
|
isRecordPlay: false,
|
|
|
- videoRefs: {}
|
|
|
+ videoRefs: {},
|
|
|
+
|
|
|
+ videoState: 'init' as 'init' | 'play',
|
|
|
+ animationState: 'start' as 'start' | 'end'
|
|
|
})
|
|
|
const activeData = reactive({
|
|
|
isAutoPlay: true, // 是否自动播放
|
|
@@ -268,6 +244,9 @@ export default defineComponent({
|
|
|
type: 'fullscreen'
|
|
|
}
|
|
|
})
|
|
|
+ setTimeout(() => {
|
|
|
+ data.animationState = 'end'
|
|
|
+ }, 500)
|
|
|
})
|
|
|
}
|
|
|
const getDetail = async () => {
|
|
@@ -290,7 +269,7 @@ export default defineComponent({
|
|
|
showDialog({
|
|
|
title: '温馨提示',
|
|
|
message: '课件已锁定'
|
|
|
- }).then((value) => {
|
|
|
+ }).then(() => {
|
|
|
goback()
|
|
|
})
|
|
|
return
|
|
@@ -327,7 +306,9 @@ export default defineComponent({
|
|
|
})
|
|
|
getItemList()
|
|
|
}
|
|
|
- } catch (error) {}
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// ifram事件处理
|
|
@@ -354,7 +335,6 @@ export default defineComponent({
|
|
|
getDetail()
|
|
|
getCourseSchedule()
|
|
|
window.addEventListener('message', iframeHandle)
|
|
|
-
|
|
|
})
|
|
|
|
|
|
const playRef = ref()
|
|
@@ -362,7 +342,9 @@ export default defineComponent({
|
|
|
const goback = () => {
|
|
|
try {
|
|
|
playRef.value?.handleOut()
|
|
|
- } catch (error) {}
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error)
|
|
|
+ }
|
|
|
postMessage({ api: 'goBack' })
|
|
|
}
|
|
|
|
|
@@ -380,7 +362,7 @@ export default defineComponent({
|
|
|
|
|
|
const stopVideo = (el: HTMLVideoElement) => {
|
|
|
return new Promise((resolve) => {
|
|
|
- if(el.paused) return resolve(true)
|
|
|
+ if (el.paused) return resolve(true)
|
|
|
el.onpause = () => {
|
|
|
console.log('暂停')
|
|
|
resolve(true)
|
|
@@ -416,7 +398,6 @@ export default defineComponent({
|
|
|
closeToast()
|
|
|
activeData.timer = setTimeout(() => {
|
|
|
activeData.model = false
|
|
|
- Object.values(data.videoRefs).map((n: any) => n?.toggleHideControl(false))
|
|
|
}, 4000)
|
|
|
}
|
|
|
/** 立即收起所有的模态框 */
|
|
@@ -424,11 +405,9 @@ export default defineComponent({
|
|
|
clearTimeout(activeData.timer)
|
|
|
closeToast()
|
|
|
activeData.model = false
|
|
|
- Object.values(data.videoRefs).map((n: any) => n?.toggleHideControl(false))
|
|
|
}
|
|
|
const toggleModel = (type = true) => {
|
|
|
activeData.model = type
|
|
|
- Object.values(data.videoRefs).map((n: any) => n?.toggleHideControl(type))
|
|
|
}
|
|
|
|
|
|
// 去点名,签退
|
|
@@ -445,31 +424,12 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
// 双击
|
|
|
- const handleDbClick = (item: any) => {
|
|
|
- if (item && item.type === 'VIDEO') {
|
|
|
- const videoEle: HTMLVideoElement = item.videoEle
|
|
|
- if (videoEle) {
|
|
|
- if (videoEle?.paused) {
|
|
|
- closeToast()
|
|
|
- videoEle.play()
|
|
|
- } else {
|
|
|
- showToast('已暂停')
|
|
|
- videoEle.pause()
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 切换播放
|
|
|
- const togglePlay = (m: any, isPlay: boolean) => {
|
|
|
- if (isPlay) {
|
|
|
- m.videoEle?.play()
|
|
|
- } else {
|
|
|
- m.videoEle?.pause()
|
|
|
+ const handleDbClick = () => {
|
|
|
+ if (activeVideoItem.value.type === 'VIDEO') {
|
|
|
+ handleStop()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- const showIndex = ref(-4)
|
|
|
const effectIndex = ref(0)
|
|
|
const effects = [
|
|
|
{
|
|
@@ -535,6 +495,8 @@ export default defineComponent({
|
|
|
// 如果是当前正在播放 或者是视频最后一个
|
|
|
if (popupData.activeIndex == index) return
|
|
|
await handleStop()
|
|
|
+ data.animationState = 'start'
|
|
|
+ data.videoState = 'init'
|
|
|
clearTimeout(acitveTimer.value)
|
|
|
checkedAnimation(popupData.activeIndex, index)
|
|
|
nextTick(() => {
|
|
@@ -562,33 +524,20 @@ export default defineComponent({
|
|
|
clearTimeout(activeData.timer)
|
|
|
closeToast()
|
|
|
item.autoPlay = true
|
|
|
- nextTick(() => {
|
|
|
- item.videoEle?.play()
|
|
|
- })
|
|
|
+ data.animationState = 'end'
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- activeData.isAnimation ? 800 : 0
|
|
|
+ activeData.isAnimation ? 850 : 0
|
|
|
)
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- const onChangeSwiper = useDebounceFn((type: string, itemActive?: any) => {
|
|
|
- if (type === 'up') {
|
|
|
- handlePreAndNext('up')
|
|
|
- }
|
|
|
- if (type === 'down') {
|
|
|
- handlePreAndNext('down')
|
|
|
- }
|
|
|
- if (type === 'change') {
|
|
|
- popupData.open = false
|
|
|
- toggleMaterial(itemActive)
|
|
|
- }
|
|
|
- }, 200)
|
|
|
/** 是否有转场动画 */
|
|
|
const checkedAnimation = (index: number, nextIndex?: number) => {
|
|
|
+ nextIndex = nextIndex ? nextIndex : index + 1;
|
|
|
const item = data.itemList[index]
|
|
|
- const nextItem = data.itemList[nextIndex!]
|
|
|
+ const nextItem = data.itemList[nextIndex]
|
|
|
if (nextItem) {
|
|
|
if (nextItem.knowledgePointId != item.knowledgePointId) {
|
|
|
activeData.isAnimation = true
|
|
@@ -596,9 +545,9 @@ export default defineComponent({
|
|
|
}
|
|
|
const videoEle = item.videoEle
|
|
|
const nextVideo = nextItem.videoEle
|
|
|
- if (videoEle && videoEle.duration < 8 && index < nextIndex!) {
|
|
|
+ if (videoEle && videoEle.duration < 8 && index < nextIndex) {
|
|
|
activeData.isAnimation = false
|
|
|
- } else if (nextVideo && nextVideo.duration < 8 && index > nextIndex!) {
|
|
|
+ } else if (nextVideo && nextVideo.duration < 8 && index > nextIndex) {
|
|
|
activeData.isAnimation = false
|
|
|
} else {
|
|
|
activeData.isAnimation = true
|
|
@@ -658,68 +607,87 @@ export default defineComponent({
|
|
|
toggleModel()
|
|
|
}
|
|
|
|
|
|
+ const activeVideoItem = computed(() => {
|
|
|
+ const item = data.itemList[popupData.activeIndex]
|
|
|
+ if (item && item.type && item.type.toLocaleUpperCase() === 'VIDEO') {
|
|
|
+ return item
|
|
|
+ }
|
|
|
+ return {}
|
|
|
+ })
|
|
|
+
|
|
|
return () => (
|
|
|
<div id="playContent" class={styles.playContent}>
|
|
|
<div
|
|
|
+ class={styles.coursewarePlay}
|
|
|
+ style={{ width: parentContainer.width }}
|
|
|
onClick={() => {
|
|
|
clearTimeout(activeData.timer)
|
|
|
+ if (Date.now() - activeData.nowTime < 300) {
|
|
|
+ activeData.model = false
|
|
|
+ handleDbClick()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ activeData.nowTime = Date.now()
|
|
|
activeData.model = !activeData.model
|
|
|
- Object.values(data.videoRefs).map((n: any) => n?.toggleHideControl(activeData.model))
|
|
|
}}
|
|
|
>
|
|
|
- <div
|
|
|
- class={styles.coursewarePlay}
|
|
|
- style={{ width: parentContainer.width }}
|
|
|
- onClick={(e: Event) => {
|
|
|
- e.stopPropagation()
|
|
|
- setModelOpen()
|
|
|
- }}
|
|
|
- >
|
|
|
- <div class={styles.wraps}>
|
|
|
- {data.itemList.map((m: any, mIndex: number) => {
|
|
|
- const isRenderItem = Math.abs(popupData.activeIndex - mIndex) < 2
|
|
|
- const isRender = Math.abs(popupData.playIndex - mIndex) < 2
|
|
|
- const isEmtry = popupData.activeIndex != mIndex
|
|
|
- // 判断是否是当前选中的元素
|
|
|
- const activeEle = popupData.playIndex === mIndex ? true : false
|
|
|
-
|
|
|
- return isRenderItem ? (
|
|
|
- <div
|
|
|
- key={'index' + mIndex}
|
|
|
- data-id={'data' + mIndex}
|
|
|
- class={[
|
|
|
- styles.itemDiv,
|
|
|
- activeEle && styles.itemActive,
|
|
|
- activeData.isAnimation && styles.acitveAnimation,
|
|
|
- isRenderItem ? styles.show : styles.hide
|
|
|
- ]}
|
|
|
- style={
|
|
|
- mIndex < popupData.activeIndex
|
|
|
- ? effects[effectIndex.value].prev
|
|
|
- : mIndex > popupData.activeIndex
|
|
|
- ? effects[effectIndex.value].next
|
|
|
- : {}
|
|
|
- }
|
|
|
- onClick={(e: Event) => {
|
|
|
- e.stopPropagation()
|
|
|
- clearTimeout(activeData.timer)
|
|
|
- if (Date.now() - activeData.nowTime < 300) {
|
|
|
- handleDbClick(m)
|
|
|
- return
|
|
|
- }
|
|
|
- activeData.nowTime = Date.now()
|
|
|
- activeData.timer = setTimeout(() => {
|
|
|
- activeData.model = !activeData.model
|
|
|
- Object.values(data.videoRefs).map((n: any) =>
|
|
|
- n?.toggleHideControl(activeData.model)
|
|
|
- )
|
|
|
- if (activeData.model) {
|
|
|
- setModelOpen()
|
|
|
- }
|
|
|
- }, 300)
|
|
|
- }}
|
|
|
- >
|
|
|
- {m.type === 'VIDEO' && (
|
|
|
+ <div class={styles.wraps}>
|
|
|
+ <div
|
|
|
+ style={{
|
|
|
+ zIndex: 15,
|
|
|
+ opacity:
|
|
|
+ activeVideoItem.value.type &&
|
|
|
+ data.animationState === 'end' &&
|
|
|
+ data.videoState === 'play'
|
|
|
+ ? 1
|
|
|
+ : 0
|
|
|
+ }}
|
|
|
+ class={styles.itemDiv}
|
|
|
+ >
|
|
|
+ <VideoItem
|
|
|
+ item={activeVideoItem.value}
|
|
|
+ activeModel={activeData.model}
|
|
|
+ onClose={setModelOpen}
|
|
|
+ onPlay={() => {
|
|
|
+ data.videoState = 'play'
|
|
|
+ }}
|
|
|
+ onPause={() => {
|
|
|
+ clearTimeout(activeData.timer)
|
|
|
+ activeData.model = true
|
|
|
+ }}
|
|
|
+ onEnded={() => {
|
|
|
+ const _index = popupData.activeIndex + 1
|
|
|
+ if (_index < data.itemList.length) {
|
|
|
+ handleSwipeChange(_index)
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ {data.itemList.map((m: any, mIndex: number) => {
|
|
|
+ const isRenderItem = Math.abs(popupData.activeIndex - mIndex) < 2
|
|
|
+ const isRender = Math.abs(popupData.playIndex - mIndex) < 2
|
|
|
+ // 判断是否是当前选中的元素
|
|
|
+ const activeEle = popupData.playIndex === mIndex ? true : false
|
|
|
+
|
|
|
+ return isRenderItem ? (
|
|
|
+ <div
|
|
|
+ key={'index' + mIndex}
|
|
|
+ data-id={'data' + mIndex}
|
|
|
+ class={[
|
|
|
+ styles.itemDiv,
|
|
|
+ activeEle && styles.itemActive,
|
|
|
+ activeData.isAnimation && styles.acitveAnimation,
|
|
|
+ isRenderItem ? styles.show : styles.hide
|
|
|
+ ]}
|
|
|
+ style={
|
|
|
+ mIndex < popupData.activeIndex
|
|
|
+ ? effects[effectIndex.value].prev
|
|
|
+ : mIndex > popupData.activeIndex
|
|
|
+ ? effects[effectIndex.value].next
|
|
|
+ : {}
|
|
|
+ }
|
|
|
+ >
|
|
|
+ {/* {m.type === 'VIDEO' && (
|
|
|
<>
|
|
|
<VideoPlay
|
|
|
ref={(v: any) => (data.videoRefs[mIndex] = v)}
|
|
@@ -764,116 +732,116 @@ export default defineComponent({
|
|
|
)}
|
|
|
</Transition>
|
|
|
</>
|
|
|
- )}
|
|
|
- {m.type === "VIDEO" && isEmtry && (
|
|
|
- <div class={styles.loadWrap}>
|
|
|
- <Vue3Lottie animationData={playLoadData}></Vue3Lottie>
|
|
|
- </div>
|
|
|
- )}
|
|
|
- {isRender && m.type === 'IMG' && <img src={m.content} />}
|
|
|
- {isRender && m.type === 'SONG' && (
|
|
|
- <MusicScore
|
|
|
- activeModel={activeData.model}
|
|
|
- data-vid={m.id}
|
|
|
- music={m}
|
|
|
- onSetIframe={(el: any) => {
|
|
|
- m.iframeRef = el
|
|
|
- }}
|
|
|
- />
|
|
|
- )}
|
|
|
- </div>
|
|
|
- ) : (
|
|
|
- ''
|
|
|
- )
|
|
|
- })}
|
|
|
- </div>
|
|
|
- <Transition name="right">
|
|
|
- {activeData.model && (
|
|
|
- <div
|
|
|
- class={styles.rightFixedBtns}
|
|
|
- onClick={(e: Event) => {
|
|
|
- e.stopPropagation()
|
|
|
- clearTimeout(activeData.timer)
|
|
|
- }}
|
|
|
- >
|
|
|
- <div class={styles.btnsWrap}>
|
|
|
- <div
|
|
|
- class={[styles.fullBtn, styles.point]}
|
|
|
- onClick={() => (popupData.open = true)}
|
|
|
- >
|
|
|
- <img src={iconMenu} />
|
|
|
- <span>知识点</span>
|
|
|
- </div>
|
|
|
+ )} */}
|
|
|
+ <Transition name="van-fade">
|
|
|
+ {m.type === 'VIDEO' &&
|
|
|
+ data.animationState !== 'end' &&
|
|
|
+ data.videoState != 'play' && (
|
|
|
+ <div class={styles.loadWrap}>
|
|
|
+ <Vue3Lottie animationData={playLoadData}></Vue3Lottie>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </Transition>
|
|
|
+ {isRender && m.type === 'IMG' && <img src={m.content} />}
|
|
|
+ {isRender && m.type === 'SONG' && (
|
|
|
+ <MusicScore
|
|
|
+ activeModel={activeData.model}
|
|
|
+ data-vid={m.id}
|
|
|
+ music={m}
|
|
|
+ onSetIframe={(el: any) => {
|
|
|
+ m.iframeRef = el
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )
|
|
|
+ })}
|
|
|
+ </div>
|
|
|
+ <Transition name="right">
|
|
|
+ {activeData.model && (
|
|
|
+ <div
|
|
|
+ class={styles.rightFixedBtns}
|
|
|
+ onClick={(e: Event) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ clearTimeout(activeData.timer)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <div class={styles.btnsWrap}>
|
|
|
+ <div
|
|
|
+ class={[styles.fullBtn, styles.point]}
|
|
|
+ onClick={() => (popupData.open = true)}
|
|
|
+ >
|
|
|
+ <img src={iconMenu} />
|
|
|
+ <span>知识点</span>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class={[styles.btnsWrap, styles.btnsBottom]}>
|
|
|
- {/* <div class={styles.fullBtn} onClick={() => (popupData.guideOpen = true)}>
|
|
|
+ <div class={[styles.btnsWrap, styles.btnsBottom]}>
|
|
|
+ {/* <div class={styles.fullBtn} onClick={() => (popupData.guideOpen = true)}>
|
|
|
<img src={iconTouping} />
|
|
|
<span>投屏</span>
|
|
|
</div> */}
|
|
|
- {data.isCourse && (
|
|
|
- <>
|
|
|
- <div
|
|
|
- class={styles.fullBtn}
|
|
|
- onClick={() => gotoRollCall('student_roll_call')}
|
|
|
- >
|
|
|
- <img src={iconDian} />
|
|
|
- <span>点名</span>
|
|
|
- </div>
|
|
|
- <div class={styles.fullBtn} onClick={() => gotoRollCall('sign_out')}>
|
|
|
- <img src={iconPoint} />
|
|
|
- <span>签退</span>
|
|
|
- </div>
|
|
|
- </>
|
|
|
- )}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- )}
|
|
|
- </Transition>
|
|
|
-
|
|
|
- <Transition name="left">
|
|
|
- {activeData.model && (
|
|
|
- <div class={styles.leftFixedBtns} onClick={(e: Event) => e.stopPropagation()}>
|
|
|
- {popupData.activeIndex != 0 && (
|
|
|
- <div class={[styles.btnsWrap, styles.prePoint]}>
|
|
|
- <div
|
|
|
- class={styles.fullBtn}
|
|
|
- onClick={() => {
|
|
|
- // useThrottleFn(() => {
|
|
|
- // handlePreAndNext('up')
|
|
|
- // }, 300)
|
|
|
- // onChangeSwiper('up')
|
|
|
- handlePreAndNext('up')
|
|
|
- }}
|
|
|
- >
|
|
|
- <img src={iconUp} />
|
|
|
- <span style={{ textAlign: 'center' }}>上一个</span>
|
|
|
+ {data.isCourse && (
|
|
|
+ <>
|
|
|
+ <div class={styles.fullBtn} onClick={() => gotoRollCall('student_roll_call')}>
|
|
|
+ <img src={iconDian} />
|
|
|
+ <span>点名</span>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- )}
|
|
|
- {popupData.activeIndex != data.itemList.length - 1 && (
|
|
|
- <div class={styles.btnsWrap}>
|
|
|
- <div
|
|
|
- class={styles.fullBtn}
|
|
|
- onClick={() => {
|
|
|
- // console.log('click down')
|
|
|
- // useThrottleFn(() => {
|
|
|
- // console.log('click down pass')
|
|
|
- // handlePreAndNext('down')
|
|
|
- // }, 300)
|
|
|
- // onChangeSwiper('down')
|
|
|
- handlePreAndNext('down')
|
|
|
- }}
|
|
|
- >
|
|
|
- <span style={{ textAlign: 'center' }}>下一个</span>
|
|
|
- <img src={iconDown} />
|
|
|
+ <div class={styles.fullBtn} onClick={() => gotoRollCall('sign_out')}>
|
|
|
+ <img src={iconPoint} />
|
|
|
+ <span>签退</span>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </>
|
|
|
)}
|
|
|
</div>
|
|
|
- )}
|
|
|
- </Transition>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </Transition>
|
|
|
+
|
|
|
+ <Transition name="left">
|
|
|
+ {activeData.model && (
|
|
|
+ <div class={styles.leftFixedBtns} onClick={(e: Event) => e.stopPropagation()}>
|
|
|
+ {popupData.activeIndex != 0 && (
|
|
|
+ <div class={[styles.btnsWrap, styles.prePoint]}>
|
|
|
+ <div
|
|
|
+ class={styles.fullBtn}
|
|
|
+ onClick={() => {
|
|
|
+ // useThrottleFn(() => {
|
|
|
+ // handlePreAndNext('up')
|
|
|
+ // }, 300)
|
|
|
+ // onChangeSwiper('up')
|
|
|
+ handlePreAndNext('up')
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <img src={iconUp} />
|
|
|
+ <span style={{ textAlign: 'center' }}>上一个</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ {popupData.activeIndex != data.itemList.length - 1 && (
|
|
|
+ <div class={styles.btnsWrap}>
|
|
|
+ <div
|
|
|
+ class={styles.fullBtn}
|
|
|
+ onClick={() => {
|
|
|
+ // console.log('click down')
|
|
|
+ // useThrottleFn(() => {
|
|
|
+ // console.log('click down pass')
|
|
|
+ // handlePreAndNext('down')
|
|
|
+ // }, 300)
|
|
|
+ // onChangeSwiper('down')
|
|
|
+ handlePreAndNext('down')
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <span style={{ textAlign: 'center' }}>下一个</span>
|
|
|
+ <img src={iconDown} />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </Transition>
|
|
|
</div>
|
|
|
|
|
|
<div
|