lex hace 2 años
padre
commit
3e57097211
Se han modificado 2 ficheros con 26 adiciones y 44 borrados
  1. 1 14
      src/school/manage-teacher/index.tsx
  2. 25 30
      src/views/exercise-record/index.tsx

+ 1 - 14
src/school/manage-teacher/index.tsx

@@ -52,8 +52,7 @@ export default defineComponent({
         page: 1,
         rows: 20
       },
-      isClick: false,
-      paramValue: '2'
+      isClick: false
     })
 
     const getList = async () => {
@@ -106,18 +105,6 @@ export default defineComponent({
 
     onMounted(async () => {
       getList()
-
-      try {
-        const { data } = await request.get('/api-school/open/paramConfig/queryByParamName', {
-          requestType: 'form',
-          params: {
-            paramName: 'qr_code_expire_hours'
-          }
-        })
-        form.paramValue = data.paramValue
-      } catch {
-        //
-      }
     })
     return () => (
       <div class={!form.listState.dataShow && 'emptyRootContainer'}>

+ 25 - 30
src/views/exercise-record/index.tsx

@@ -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>
     )
   }