|
@@ -135,33 +135,23 @@ export default defineComponent({
|
|
|
getList()
|
|
|
}
|
|
|
const checkOrchestra = (val: any) => {
|
|
|
- console.log(val)
|
|
|
- console.log('🚀 ~ file: index.tsx:146 ~ checkOrchestra ~ state.actions', state.actions)
|
|
|
-
|
|
|
- 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 changeOrchestra = (val: any) => {
|
|
|
- console.log('changeOrchestra', val)
|
|
|
- }
|
|
|
-
|
|
|
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()
|
|
|
}
|
|
|
const getOrchestraList = async () => {
|
|
|
- // const schoolId = globalState.user.data.schoolInfos
|
|
|
- // .map((item) => {
|
|
|
- // return item.id
|
|
|
- // })
|
|
|
- // .join(',')
|
|
|
try {
|
|
|
const res = await request.post(`${platformApi.value}/orchestra/page`, {
|
|
|
data: { page: 1, rows: 9999, status: 'DONE' }
|
|
@@ -309,10 +299,10 @@ export default defineComponent({
|
|
|
</List>
|
|
|
</OFullRefresh>
|
|
|
) : (
|
|
|
- <OEmpty></OEmpty>
|
|
|
+ <OEmpty tips="暂无练习记录" />
|
|
|
)}
|
|
|
|
|
|
- <Popup v-model:show={state.showPopoverTime} position="bottom" style="{ height: '30%' }">
|
|
|
+ <Popup v-model:show={state.showPopoverTime} position="bottom" round>
|
|
|
<DatePicker
|
|
|
onCancel={() => {
|
|
|
state.showPopoverTime = false
|
|
@@ -326,33 +316,38 @@ export default defineComponent({
|
|
|
/>
|
|
|
</Popup>
|
|
|
|
|
|
- <ActionSheet
|
|
|
+ {/* <ActionSheet
|
|
|
v-model:show={state.showPopoverOrchestra}
|
|
|
title="选择乐团"
|
|
|
actions={state.actions}
|
|
|
onSelect={checkOrchestra}
|
|
|
- ></ActionSheet>
|
|
|
- {/* <Popup v-model:show={state.showPopoverOrchestra} position="bottom" round>
|
|
|
+ ></ActionSheet> */}
|
|
|
+ <Popup v-model:show={state.showPopoverOrchestra} position="bottom" round>
|
|
|
<Picker
|
|
|
columns={state.actions}
|
|
|
onCancel={() => (state.showPopoverOrchestra = false)}
|
|
|
onConfirm={(val: any) => checkOrchestra(val)}
|
|
|
- onChange={(val: any) => {
|
|
|
- console.log('改变')
|
|
|
- changeOrchestra(val)
|
|
|
- }}
|
|
|
- columnsFieldNames={{ text: 'name', value: 'id' }}
|
|
|
+ columnsFieldNames={{ text: 'name', value: 'value' }}
|
|
|
/>
|
|
|
- </Popup> */}
|
|
|
+ </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>
|
|
|
|
|
|
- <ActionSheet
|
|
|
+ {/* <ActionSheet
|
|
|
style={{ height: '40%' }}
|
|
|
close-on-click-action
|
|
|
v-model:show={state.showPopoverSubject}
|
|
|
title="选择声部"
|
|
|
actions={state.subjects}
|
|
|
onSelect={checkSubject}
|
|
|
- ></ActionSheet>
|
|
|
+ ></ActionSheet> */}
|
|
|
</div>
|
|
|
)
|
|
|
}
|