|
@@ -12,7 +12,8 @@ import {
|
|
|
PullRefresh,
|
|
|
ActionSheet,
|
|
|
showToast,
|
|
|
- Sticky
|
|
|
+ Sticky,
|
|
|
+ Picker
|
|
|
} from 'vant'
|
|
|
import { defineComponent, reactive, ref, onMounted, watch } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
@@ -102,17 +103,19 @@ export default defineComponent({
|
|
|
getList()
|
|
|
}
|
|
|
const checkOrchestra = (val: any) => {
|
|
|
- forms.orchestraId = val.value
|
|
|
- forms.orchestraName = val.name
|
|
|
+ const selectedOptions = val.selectedOptions[0] || {}
|
|
|
+ forms.orchestraId = selectedOptions.value
|
|
|
+ forms.orchestraName = selectedOptions.name
|
|
|
state.showPopoverOrchestra = false
|
|
|
refreshing.value = true
|
|
|
getList()
|
|
|
}
|
|
|
|
|
|
const checkSubject = (val: any) => {
|
|
|
- forms.subjectId = val.value
|
|
|
- forms.subjectName = val.name
|
|
|
- console.log(val, forms)
|
|
|
+ const selectedOptions = val.selectedOptions[0] || {}
|
|
|
+ forms.subjectId = selectedOptions.value
|
|
|
+ forms.subjectName = selectedOptions.name
|
|
|
+ state.showPopoverSubject = false
|
|
|
refreshing.value = true
|
|
|
getList()
|
|
|
}
|
|
@@ -179,35 +182,37 @@ export default defineComponent({
|
|
|
<div class={styles.chioseWrap}>
|
|
|
<div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
|
|
|
<div
|
|
|
- class={styles.searchBand}
|
|
|
+ class={[styles.searchBand, styles.orchestraBand]}
|
|
|
onClick={() => {
|
|
|
state.showPopoverTime = true
|
|
|
}}
|
|
|
>
|
|
|
- {forms.timeName}
|
|
|
+ <p> {forms.timeName} </p>
|
|
|
<Icon name={state.showPopoverTime ? 'arrow-up' : 'arrow-down'} />
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
|
|
|
<div
|
|
|
- class={styles.searchBand}
|
|
|
+ class={[styles.searchBand, styles.orchestraBand]}
|
|
|
onClick={() => {
|
|
|
state.showPopoverOrchestra = true
|
|
|
}}
|
|
|
>
|
|
|
- {forms.orchestraName}
|
|
|
+ <p> {forms.orchestraName}</p>
|
|
|
+
|
|
|
<Icon name={state.showPopoverOrchestra ? 'arrow-up' : 'arrow-down'} />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
|
|
|
<div
|
|
|
- class={styles.searchBand}
|
|
|
+ class={[styles.searchBand, styles.orchestraBand]}
|
|
|
onClick={() => {
|
|
|
state.showPopoverSubject = true
|
|
|
}}
|
|
|
>
|
|
|
- {forms.subjectName}
|
|
|
+ <p> {forms.subjectName}</p>
|
|
|
+
|
|
|
<Icon name={state.showPopoverSubject ? 'arrow-up' : 'arrow-down'} />
|
|
|
</div>
|
|
|
</div>
|
|
@@ -251,7 +256,7 @@ export default defineComponent({
|
|
|
/>
|
|
|
</Popup>
|
|
|
|
|
|
- <ActionSheet
|
|
|
+ {/* <ActionSheet
|
|
|
v-model:show={state.showPopoverOrchestra}
|
|
|
title="选择乐团"
|
|
|
actions={state.actions}
|
|
@@ -265,7 +270,24 @@ export default defineComponent({
|
|
|
title="选择声部"
|
|
|
actions={state.subjects}
|
|
|
onSelect={checkSubject}
|
|
|
- ></ActionSheet>
|
|
|
+ ></ActionSheet> */}
|
|
|
+ <Popup v-model:show={state.showPopoverOrchestra} position="bottom" round>
|
|
|
+ <Picker
|
|
|
+ columns={state.actions}
|
|
|
+ onCancel={() => (state.showPopoverOrchestra = false)}
|
|
|
+ onConfirm={(val: any) => checkOrchestra(val)}
|
|
|
+ columnsFieldNames={{ text: 'name', value: 'value' }}
|
|
|
+ />
|
|
|
+ </Popup>
|
|
|
+
|
|
|
+ <Popup v-model:show={state.showPopoverSubject} position="bottom" round>
|
|
|
+ <Picker
|
|
|
+ columns={state.subjects}
|
|
|
+ onCancel={() => (state.showPopoverSubject = false)}
|
|
|
+ onConfirm={(val: any) => checkSubject(val)}
|
|
|
+ columnsFieldNames={{ text: 'name', value: 'value' }}
|
|
|
+ />
|
|
|
+ </Popup>
|
|
|
</div>
|
|
|
)
|
|
|
}
|