|
@@ -10,15 +10,17 @@ import {
|
|
|
List,
|
|
|
PullRefresh,
|
|
|
ActionSheet,
|
|
|
- showToast
|
|
|
+ showToast,
|
|
|
+ Sticky
|
|
|
} from 'vant'
|
|
|
-import { defineComponent, reactive, ref, onMounted } from 'vue'
|
|
|
+import { defineComponent, reactive, ref, onMounted, watch } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
import styles from './timer-bang.module.less'
|
|
|
import request from '@/helpers/request'
|
|
|
import { state as globalState } from '@/state'
|
|
|
import RankItem from '../modals/rank-item'
|
|
|
export default defineComponent({
|
|
|
+ props: ['toHeight'],
|
|
|
emits: ['setTime'],
|
|
|
name: 'day-bang',
|
|
|
setup(props, { slots, attrs, emit }) {
|
|
@@ -32,7 +34,7 @@ export default defineComponent({
|
|
|
currentDate: [dayjs().format('YYYY'), dayjs().format('MM')]
|
|
|
})
|
|
|
const forms = reactive({
|
|
|
- time: state.currentDate[0] + '' + state.currentDate[1],
|
|
|
+ practiceMonth: state.currentDate[0] + '' + state.currentDate[1],
|
|
|
timeName: state.currentDate[0] + '年' + state.currentDate[1] + '月',
|
|
|
orchestraId: '',
|
|
|
orchestraName: '全部乐团',
|
|
@@ -50,7 +52,14 @@ export default defineComponent({
|
|
|
const finished = ref(false)
|
|
|
const showContact = ref(false)
|
|
|
const list = ref([])
|
|
|
-
|
|
|
+ const toTop = ref(props.toHeight)
|
|
|
+ console.log(props.toHeight)
|
|
|
+ watch(
|
|
|
+ () => props.toHeight,
|
|
|
+ (val: number) => {
|
|
|
+ toTop.value = val
|
|
|
+ }
|
|
|
+ )
|
|
|
const getList = async () => {
|
|
|
loading.value = true
|
|
|
try {
|
|
@@ -86,7 +95,7 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
const checkTimer = (val: any) => {
|
|
|
- forms.time = val.selectedValues[0] + val.selectedValues[1]
|
|
|
+ forms.practiceMonth = val.selectedValues[0] + val.selectedValues[1]
|
|
|
forms.timeName = val.selectedValues[0] + '年' + val.selectedValues[1] + '月'
|
|
|
state.showPopoverTime = false
|
|
|
emit('setTime', forms.timeName)
|
|
@@ -148,6 +157,7 @@ export default defineComponent({
|
|
|
showToast(message)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
getSubjects()
|
|
|
getOrchestraList()
|
|
@@ -164,43 +174,44 @@ export default defineComponent({
|
|
|
return () => (
|
|
|
<>
|
|
|
{/* <OSticky position="top" background="#FFF"> */}
|
|
|
-
|
|
|
- <div class={styles.chioseWrap}>
|
|
|
- <div style={{ padding: '0 13px', background: '#FFF' }}>
|
|
|
- <div
|
|
|
- class={styles.searchBand}
|
|
|
- onClick={() => {
|
|
|
- state.showPopoverTime = true
|
|
|
- }}
|
|
|
- >
|
|
|
- {forms.timeName}
|
|
|
- <Icon name={state.showPopoverTime ? 'arrow-up' : 'arrow-down'} />
|
|
|
+ <Sticky offsetTop={toTop.value}>
|
|
|
+ <div class={styles.chioseWrap}>
|
|
|
+ <div style={{ padding: '0 13px', background: '#FFF' }}>
|
|
|
+ <div
|
|
|
+ class={styles.searchBand}
|
|
|
+ onClick={() => {
|
|
|
+ state.showPopoverTime = true
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {forms.timeName}
|
|
|
+ <Icon name={state.showPopoverTime ? 'arrow-up' : 'arrow-down'} />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <div style={{ padding: '0 13px', background: '#FFF' }}>
|
|
|
- <div
|
|
|
- class={styles.searchBand}
|
|
|
- onClick={() => {
|
|
|
- state.showPopoverOrchestra = true
|
|
|
- }}
|
|
|
- >
|
|
|
- {forms.orchestraName}
|
|
|
- <Icon name={state.showPopoverOrchestra ? 'arrow-up' : 'arrow-down'} />
|
|
|
+ <div style={{ padding: '0 13px', background: '#FFF' }}>
|
|
|
+ <div
|
|
|
+ class={styles.searchBand}
|
|
|
+ onClick={() => {
|
|
|
+ state.showPopoverOrchestra = true
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {forms.orchestraName}
|
|
|
+ <Icon name={state.showPopoverOrchestra ? 'arrow-up' : 'arrow-down'} />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div style={{ padding: '0 13px', background: '#FFF' }}>
|
|
|
- <div
|
|
|
- class={styles.searchBand}
|
|
|
- onClick={() => {
|
|
|
- state.showPopoverSubject = true
|
|
|
- }}
|
|
|
- >
|
|
|
- {forms.subjectName}
|
|
|
- <Icon name={state.showPopoverSubject ? 'arrow-up' : 'arrow-down'} />
|
|
|
+ <div style={{ padding: '0 13px', background: '#FFF' }}>
|
|
|
+ <div
|
|
|
+ class={styles.searchBand}
|
|
|
+ onClick={() => {
|
|
|
+ state.showPopoverSubject = true
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {forms.subjectName}
|
|
|
+ <Icon name={state.showPopoverSubject ? 'arrow-up' : 'arrow-down'} />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </Sticky>
|
|
|
{/* </OSticky> */}
|
|
|
|
|
|
{showContact.value ? (
|