浏览代码

Merge branch 'master' of http://git.dayaedu.com/lex/orchestra-app

skyblued 2 年之前
父节点
当前提交
c2eb1c8fc6
共有 53 个文件被更改,包括 615 次插入219 次删除
  1. 4 2
      dist/project/companionTeacher.html
  2. 6 6
      dist/project/initiation.html
  3. 4 2
      dist/project/manageTeacher.html
  4. 6 6
      dist/project/preRegister.html
  5. 4 4
      dist/project/schoolRegister.html
  6. 4 2
      public/project/companionTeacher.html
  7. 7 7
      public/project/initiation.html
  8. 4 2
      public/project/manageTeacher.html
  9. 6 6
      public/project/preRegister.html
  10. 4 4
      public/project/schoolRegister.html
  11. 10 0
      src/components/o-dialog/index.module.less
  12. 1 0
      src/components/o-dialog/index.tsx
  13. 8 17
      src/helpers/native-message.ts
  14. 2 0
      src/school/approval-manage/batch-adjust.tsx
  15. 9 4
      src/school/attendance/components/teacher-attendDetail.tsx
  16. 1 0
      src/school/companion-teacher/companion-detail.module.less
  17. 1 1
      src/school/companion-teacher/companion-detail.tsx
  18. 2 0
      src/school/companion-teacher/companion-teacher-register.module.less
  19. 42 43
      src/school/companion-teacher/companion-teacher-register.tsx
  20. 1 0
      src/school/companion-teacher/index.module.less
  21. 3 1
      src/school/companion-teacher/index.tsx
  22. 2 2
      src/school/main.ts
  23. 4 0
      src/school/manage-teacher/manage-detail.module.less
  24. 3 3
      src/school/manage-teacher/manage-detail.tsx
  25. 37 34
      src/school/manage-teacher/manage-teacher-register.tsx
  26. 1 0
      src/school/mass-message/component/manage-list/index.module.less
  27. 1 0
      src/school/mass-message/component/student-list/index.module.less
  28. 1 0
      src/school/mass-message/component/teacher-list/teacher-list.module.less
  29. 1 1
      src/school/mass-message/component/teacher-list/teacher-list.tsx
  30. 4 3
      src/school/orchestra/create-orchestra/index.tsx
  31. 3 0
      src/school/orchestra/create-orchestra/select-teacher.module.less
  32. 1 1
      src/school/orchestra/create-orchestra/select-teacher.tsx
  33. 3 2
      src/school/orchestra/modal/student-list.tsx
  34. 11 6
      src/school/school-detail/eidt-school.tsx
  35. 1 0
      src/school/train-planning/component/course-preview/index.module.less
  36. 5 4
      src/school/train-planning/component/course-preview/index.tsx
  37. 2 0
      src/school/train-planning/component/practice/index.tsx
  38. 4 0
      src/school/train-planning/component/standard/index.module.less
  39. 2 0
      src/school/train-planning/component/standard/index.tsx
  40. 4 2
      src/student/music-group/pre-apply/component/apply.tsx
  41. 3 0
      src/student/music-group/pre-apply/index.module.less
  42. 1 0
      src/student/music-group/shop-address/address-operation.tsx
  43. 4 0
      src/student/my-orchestra/apply-withdrawal.module.less
  44. 2 2
      src/student/my-orchestra/apply-withdrawal.tsx
  45. 1 3
      src/teacher/attendance/index.tsx
  46. 11 11
      src/views/adapay/payment/index.tsx
  47. 63 0
      src/views/unit-test/model/answer-list/index.module.less
  48. 56 0
      src/views/unit-test/model/answer-list/index.tsx
  49. 53 0
      src/views/unit-test/model/choice-question/index.module.less
  50. 92 0
      src/views/unit-test/model/choice-question/index.tsx
  51. 0 17
      src/views/unit-test/unit-detail/index.module.less
  52. 98 21
      src/views/unit-test/unit-detail/index.tsx
  53. 12 0
      src/views/unit-test/unit.ts

+ 4 - 2
dist/project/companionTeacher.html

@@ -72,10 +72,12 @@
         <van-field required label="性别" name="gender" :rules="[{ required: true, message: '请选择性别' }]">
           <template #input>
             <van-radio-group checked-color="#FF8057" v-model="forms.gender" direction="horizontal">
-              <van-tag size="large" type="primary" :plain="!(forms.gender === 1)" color="#FF8057" class="radioSection">
+              <van-tag size="large" type="primary" :plain="!(forms.gender === 1)" color="#FF8057" class="radioSection"
+                round>
                 <van-radio class="radioItem" :name="1"></van-radio>男
               </van-tag>
-              <van-tag size="large" type="primary" :plain="!(forms.gender === 0)" color="#FF8057" class="radioSection">
+              <van-tag size="large" type="primary" :plain="!(forms.gender === 0)" color="#FF8057" class="radioSection"
+                round>
                 <van-radio class="radioItem" :name="0"></van-radio>女
               </van-tag>
             </van-radio-group>

+ 6 - 6
dist/project/initiation.html

@@ -198,11 +198,11 @@
           <template #input>
             <van-radio-group v-model="stu.sex" :disabled='checkPhone' checked-color="#FF8057" direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(stu.sex === 1)" :color="checkPhone ? '#ccc': '#FF8057'"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" :name="1"></van-radio>男生
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(stu.sex === 0)" :color="checkPhone ? '#ccc': '#FF8057'"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" :name="0"></van-radio>女生
               </van-tag>
             </van-radio-group>
@@ -230,11 +230,11 @@
             <van-radio-group v-model="stu.hasLearningExperience" :disabled='checkPhone' checked-color="#FF8057"
               direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(stu.hasLearningExperience === 1)"
-                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection" round>
                 <van-radio class="radioItem" :name="1"></van-radio>是
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(stu.hasLearningExperience === 0)"
-                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection" round>
                 <van-radio class="radioItem" :name="0"></van-radio>否
               </van-tag>
             </van-radio-group>
@@ -248,11 +248,11 @@
             <van-radio-group v-model="stu.joinParentMeeting" :disabled='checkPhone' checked-color="#FF8057"
               direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(stu.joinParentMeeting === 1)"
-                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection" round>
                 <van-radio class="radioItem" :name="1"></van-radio>是
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(stu.joinParentMeeting === 0)"
-                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection" round>
                 <van-radio class="radioItem" :name="0"></van-radio>否
               </van-tag>
             </van-radio-group>

+ 4 - 2
dist/project/manageTeacher.html

@@ -72,10 +72,12 @@
         <van-field required label="性别" name="gender" :rules="[{ required: true, message: '请选择性别' }]">
           <template #input>
             <van-radio-group checked-color="#64A9FF" v-model="forms.gender" direction="horizontal">
-              <van-tag size="large" type="primary" :plain="!(forms.gender === 1)" color="#64A9FF" class="radioSection">
+              <van-tag size="large" type="primary" :plain="!(forms.gender === 1)" color="#64A9FF" class="radioSection"
+                round>
                 <van-radio class="radioItem" :name="1"></van-radio>男
               </van-tag>
-              <van-tag size="large" type="primary" :plain="!(forms.gender === 0)" color="#64A9FF" class="radioSection">
+              <van-tag size="large" type="primary" :plain="!(forms.gender === 0)" color="#64A9FF" class="radioSection"
+                round>
                 <van-radio class="radioItem" :name="0"></van-radio>女
               </van-tag>
             </van-radio-group>

+ 6 - 6
dist/project/preRegister.html

@@ -198,11 +198,11 @@
           <template #input>
             <van-radio-group v-model="stu.sex" :disabled='checkPhone' checked-color="#9A64FF" direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(stu.sex === 1)" :color="checkPhone ? '#ccc': '#9A64FF'"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" :name="1"></van-radio>男生
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(stu.sex === 0)" :color="checkPhone ? '#ccc': '#9A64FF'"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" :name="0"></van-radio>女生
               </van-tag>
             </van-radio-group>
@@ -239,11 +239,11 @@
             <van-radio-group v-model="stu.instrumentsPrepareMode" :disabled='checkPhone' checked-color="#9A64FF"
               direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(stu.instrumentsPrepareMode === 'GROUP_PURCHASE')"
-                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection" round>
                 <van-radio class="radioItem" name="GROUP_PURCHASE"></van-radio>团购
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(stu.instrumentsPrepareMode === 'ONESELF')"
-                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection" round>
                 <van-radio class="radioItem" name="ONESELF"></van-radio>自备
               </van-tag>
             </van-radio-group>
@@ -256,11 +256,11 @@
             <van-radio-group v-model="stu.learningSystemPrepareMode" :disabled='checkPhone' checked-color="#9A64FF"
               direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(stu.learningSystemPrepareMode === 'GROUP_PURCHASE')"
-                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection" round>
                 <van-radio class="radioItem" name="GROUP_PURCHASE"></van-radio>团购
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(stu.learningSystemPrepareMode === 'ONESELF')"
-                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection" round>
                 <van-radio class="radioItem" name="ONESELF"></van-radio>自备
               </van-tag>
             </van-radio-group>

+ 4 - 4
dist/project/schoolRegister.html

@@ -60,11 +60,11 @@
           <template #input>
             <van-radio-group checked-color="#64A9FF" v-model="forms.schoolNature" direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(forms.schoolNature === 'PUBLIC')" color="#64A9FF"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" name="PUBLIC"></van-radio>公办
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(forms.schoolNature === 'PRIVATE')" color="#64A9FF"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" name="PRIVATE"></van-radio>民办
               </van-tag>
             </van-radio-group>
@@ -75,11 +75,11 @@
           <template #input>
             <van-radio-group checked-color="#64A9FF" v-model="forms.schoolSystem" direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(forms.schoolSystem === 'fiveYearSystem')" color="#64A9FF"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" name="fiveYearSystem"></van-radio>六年制
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(forms.schoolSystem === 'sixYearSystem')" color="#64A9FF"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" name="sixYearSystem"></van-radio>五年制
               </van-tag>
             </van-radio-group>

+ 4 - 2
public/project/companionTeacher.html

@@ -73,10 +73,12 @@
         <van-field required label="性别" name="gender" :rules="[{ required: true, message: '请选择性别' }]">
           <template #input>
             <van-radio-group checked-color="#FF8057" v-model="forms.gender" direction="horizontal">
-              <van-tag size="large" type="primary" :plain="!(forms.gender === 1)" color="#FF8057" class="radioSection">
+              <van-tag size="large" type="primary" :plain="!(forms.gender === 1)" color="#FF8057" class="radioSection"
+                round>
                 <van-radio class="radioItem" :name="1"></van-radio>男
               </van-tag>
-              <van-tag size="large" type="primary" :plain="!(forms.gender === 0)" color="#FF8057" class="radioSection">
+              <van-tag size="large" type="primary" :plain="!(forms.gender === 0)" color="#FF8057" class="radioSection"
+                round>
                 <van-radio class="radioItem" :name="0"></van-radio>女
               </van-tag>
             </van-radio-group>

+ 7 - 7
public/project/initiation.html

@@ -198,11 +198,11 @@
           <template #input>
             <van-radio-group v-model="stu.sex" :disabled='checkPhone' checked-color="#FF8057" direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(stu.sex === 1)" :color="checkPhone ? '#ccc': '#FF8057'"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" :name="1"></van-radio>男生
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(stu.sex === 0)" :color="checkPhone ? '#ccc': '#FF8057'"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" :name="0"></van-radio>女生
               </van-tag>
             </van-radio-group>
@@ -230,12 +230,12 @@
             <van-radio-group v-model="stu.hasLearningExperience" :disabled='checkPhone' checked-color="#FF8057"
               direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(stu.hasLearningExperience === 1)"
-                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection" round>
                 <van-radio class="radioItem" :name="1"></van-radio>是
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(stu.hasLearningExperience === 0)"
-                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection"
-                @click="() => stu.learningSubjectName = ''">
+                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection" @click="() => stu.learningSubjectName = ''"
+                round>
                 <van-radio class="radioItem" :name="0"></van-radio>否
               </van-tag>
             </van-radio-group>
@@ -249,11 +249,11 @@
             <van-radio-group v-model="stu.joinParentMeeting" :disabled='checkPhone' checked-color="#FF8057"
               direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(stu.joinParentMeeting === 1)"
-                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection" round>
                 <van-radio class="radioItem" :name="1"></van-radio>是
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(stu.joinParentMeeting === 0)"
-                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#FF8057'" class="radioSection" round>
                 <van-radio class="radioItem" :name="0"></van-radio>否
               </van-tag>
             </van-radio-group>

+ 4 - 2
public/project/manageTeacher.html

@@ -73,10 +73,12 @@
         <van-field required label="性别" name="gender" :rules="[{ required: true, message: '请选择性别' }]">
           <template #input>
             <van-radio-group checked-color="#64A9FF" v-model="forms.gender" direction="horizontal">
-              <van-tag size="large" type="primary" :plain="!(forms.gender === 1)" color="#64A9FF" class="radioSection">
+              <van-tag size="large" type="primary" :plain="!(forms.gender === 1)" color="#64A9FF" class="radioSection"
+                round>
                 <van-radio class="radioItem" :name="1"></van-radio>男
               </van-tag>
-              <van-tag size="large" type="primary" :plain="!(forms.gender === 0)" color="#64A9FF" class="radioSection">
+              <van-tag size="large" type="primary" :plain="!(forms.gender === 0)" color="#64A9FF" class="radioSection"
+                round>
                 <van-radio class="radioItem" :name="0"></van-radio>女
               </van-tag>
             </van-radio-group>

+ 6 - 6
public/project/preRegister.html

@@ -198,11 +198,11 @@
           <template #input>
             <van-radio-group v-model="stu.sex" :disabled='checkPhone' checked-color="#9A64FF" direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(stu.sex === 1)" :color="checkPhone ? '#ccc': '#9A64FF'"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" :name="1"></van-radio>男生
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(stu.sex === 0)" :color="checkPhone ? '#ccc': '#9A64FF'"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" :name="0"></van-radio>女生
               </van-tag>
             </van-radio-group>
@@ -239,11 +239,11 @@
             <van-radio-group v-model="stu.instrumentsPrepareMode" :disabled='checkPhone' checked-color="#9A64FF"
               direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(stu.instrumentsPrepareMode === 'GROUP_PURCHASE')"
-                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection" round>
                 <van-radio class="radioItem" name="GROUP_PURCHASE"></van-radio>团购
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(stu.instrumentsPrepareMode === 'ONESELF')"
-                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection" round>
                 <van-radio class="radioItem" name="ONESELF"></van-radio>自备
               </van-tag>
             </van-radio-group>
@@ -256,11 +256,11 @@
             <van-radio-group v-model="stu.learningSystemPrepareMode" :disabled='checkPhone' checked-color="#9A64FF"
               direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(stu.learningSystemPrepareMode === 'GROUP_PURCHASE')"
-                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection" round>
                 <van-radio class="radioItem" name="GROUP_PURCHASE"></van-radio>团购
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(stu.learningSystemPrepareMode === 'ONESELF')"
-                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection">
+                :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection" round>
                 <van-radio class="radioItem" name="ONESELF"></van-radio>自备
               </van-tag>
             </van-radio-group>

+ 4 - 4
public/project/schoolRegister.html

@@ -60,11 +60,11 @@
           <template #input>
             <van-radio-group checked-color="#64A9FF" v-model="forms.schoolNature" direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(forms.schoolNature === 'PUBLIC')" color="#64A9FF"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" name="PUBLIC"></van-radio>公办
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(forms.schoolNature === 'PRIVATE')" color="#64A9FF"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" name="PRIVATE"></van-radio>民办
               </van-tag>
             </van-radio-group>
@@ -75,11 +75,11 @@
           <template #input>
             <van-radio-group checked-color="#64A9FF" v-model="forms.schoolSystem" direction="horizontal">
               <van-tag size="large" type="primary" :plain="!(forms.schoolSystem === 'fiveYearSystem')" color="#64A9FF"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" name="fiveYearSystem"></van-radio>五年制
               </van-tag>
               <van-tag size="large" type="primary" :plain="!(forms.schoolSystem === 'sixYearSystem')" color="#64A9FF"
-                class="radioSection">
+                class="radioSection" round>
                 <van-radio class="radioItem" name="sixYearSystem"></van-radio>六年制
               </van-tag>
             </van-radio-group>

+ 10 - 0
src/components/o-dialog/index.module.less

@@ -16,3 +16,13 @@
   line-height: 25px;
   padding-bottom: 12px;
 }
+
+.oDialog {
+  :global {
+    .van-dialog__message {
+      font-size: 16px;
+      color: 333;
+      line-height: 22px;
+    }
+  }
+}

+ 1 - 0
src/components/o-dialog/index.tsx

@@ -53,6 +53,7 @@ export default defineComponent({
     )
     return () => (
       <Dialog
+        class={styles.oDialog}
         v-model:show={state.show}
         message={props.message}
         messageAlign={props.messageAlign}

+ 8 - 17
src/helpers/native-message.ts

@@ -27,21 +27,17 @@ window.postMessage = (message: IPostMessage) => {
 type CallBack = (evt?: IPostMessage) => void
 
 // eslint-disable-next-line @typescript-eslint/no-empty-function
-const loop = () => { }
+const loop = () => {}
 
 const calls: { [key: string]: CallBack | CallBack[] } = {}
 
 const browserInfo = browser()
 
 if (browserInfo.isApp) {
-  window.addEventListener('message', evt => {
+  window.addEventListener('message', (evt) => {
     try {
       console.log('message', evt.data)
-      const data = evt.data
-        ? typeof evt.data === 'object'
-          ? evt.data
-          : JSON.parse(evt.data)
-        : {}
+      const data = evt.data ? (typeof evt.data === 'object' ? evt.data : JSON.parse(evt.data)) : {}
       const uuid = data.content?.uuid || data.uuid
       // console.log(uuid, data.content, 'uuid')
       try {
@@ -55,9 +51,7 @@ if (browserInfo.isApp) {
         // console.log('data', data)
       }
       if (!uuid) {
-        const keys = Object.keys(calls).filter(
-          key => key.indexOf(data.api) === 0
-        )
+        const keys = Object.keys(calls).filter((key) => key.indexOf(data.api) === 0)
         // console.log(keys, 'keys')
         // console.log(data, 'data')
         for (const key of keys) {
@@ -85,7 +79,6 @@ export const postMessage = (data: IPostMessage, callback?: CallBack) => {
     calls[uuid] = callback || loop
     data.content = data.content ? { ...data.content, uuid } : { uuid }
     instance.postMessage(JSON.stringify(data))
-    console.log('send:', JSON.stringify(data))
   }
 }
 
@@ -111,15 +104,13 @@ export const removeListenerMessage = (api: string, callback: CallBack) => {
     const uuid = api
     if (Array.isArray(calls[uuid])) {
       const indexOf = (calls[uuid] as CallBack[]).indexOf(callback)
-        ; (calls[uuid] as CallBack[]).splice(indexOf, 1)
+      ;(calls[uuid] as CallBack[]).splice(indexOf, 1)
     }
   }
 }
 
-export const promisefiyPostMessage = (
-  data: IPostMessage
-): Promise<IPostMessage | undefined> => {
-  return new Promise(resolve => {
-    postMessage(data, res => resolve(res))
+export const promisefiyPostMessage = (data: IPostMessage): Promise<IPostMessage | undefined> => {
+  return new Promise((resolve) => {
+    postMessage(data, (res) => resolve(res))
   })
 }

+ 2 - 0
src/school/approval-manage/batch-adjust.tsx

@@ -143,6 +143,7 @@ export default defineComponent({
                     plain={!(forms.changeType === 1)}
                     color="#FF8057"
                     class={styles.radioSection}
+                    round
                   >
                     <Radio class={styles.radioItem} name={1}></Radio>提前
                   </Tag>
@@ -152,6 +153,7 @@ export default defineComponent({
                     plain={!(forms.changeType === 0)}
                     color="#FF8057"
                     class={styles.radioSection}
+                    round
                   >
                     <Radio class={styles.radioItem} name={0}></Radio>延后
                   </Tag>

+ 9 - 4
src/school/attendance/components/teacher-attendDetail.tsx

@@ -13,6 +13,7 @@ import dayjs from 'dayjs'
 import { useRoute, useRouter } from 'vue-router'
 import { state as globalState } from '@/state'
 import request from '@/helpers/request'
+import { postMessage } from '@/helpers/native-message'
 export default defineComponent({
   props: ['item'],
   name: 'teacher-attendDetail',
@@ -58,7 +59,7 @@ export default defineComponent({
         })
         closeSheet()
       } catch (e) {
-        showToast('发起聊天失败')
+        showToast('拨号失败')
         closeSheet()
       }
     }
@@ -83,14 +84,18 @@ export default defineComponent({
     })
 
     const setAddress = async (myPoint: string) => {
-      console.log(myPoint, attendanceScope.value)
+      if (!myPoint) {
+        showToast('当前暂无定位')
+        return
+      }
+
       try {
         await postMessage({
           api: 'sourseMapApi',
           content: {
             type: 'display',
-            orginPoint: teacherAttInfo.value.addressLongitudeLatitude,
-            myPoint,
+            orginPoint: teacherAttInfo.value.schoolLongitudeLatitude,
+            myPoint: myPoint,
             limitDistance: attendanceScope.value
           }
         })

+ 1 - 0
src/school/companion-teacher/companion-detail.module.less

@@ -11,6 +11,7 @@
   }
   .tagSubject {
     margin-right: 10px;
+    margin-bottom: 4px;
   }
 }
 .sectionCellGroup {

+ 1 - 1
src/school/companion-teacher/companion-detail.tsx

@@ -143,7 +143,7 @@ export default defineComponent({
                 title: () => (
                   <div class={styles.subjectContainer}>
                     <span>声部:</span>
-                    <div style={{ display: 'flex', alignItems: 'center' }}>
+                    <div style={{ display: 'flex', alignItems: 'center', flexWrap: 'wrap' }}>
                       {state.detail.subjectNames &&
                         state.detail.subjectNames.map((subject: any) => (
                           <Tag type="primary" class={styles.tagSubject}>

+ 2 - 0
src/school/companion-teacher/companion-teacher-register.module.less

@@ -134,6 +134,8 @@ span {
 
 .radioSection {
   position: relative;
+  min-width: 32px;
+  justify-content: center;
 }
 
 .radioItem {

+ 42 - 43
src/school/companion-teacher/companion-teacher-register.tsx

@@ -197,21 +197,18 @@ export default defineComponent({
         })
         state.columns = tempareas || []
 
-        const { data } = await request.post(
-          '/api-school/open/orchestraSubjectConfig/pageByOrchestraId',
-          {
-            data: {
-              page: 1,
-              rows: 50
-            }
+        const { data } = await request.post('/api-school/open/subjectBasicConfig/page', {
+          data: {
+            page: 1,
+            rows: 50
           }
-        )
+        })
 
         const rows = data.rows || []
         const tempSubjects: any = []
         rows.forEach((item: any) => {
           tempSubjects.push({
-            text: item.name,
+            text: item.subjectName,
             value: item.subjectId
           })
         })
@@ -262,40 +259,6 @@ export default defineComponent({
               maxlength={11}
               type="tel"
             ></Field>
-            <Field
-              required
-              label="验证码"
-              v-model={state.forms.smsValidCode}
-              name="smsValidCode"
-              rules={[{ required: true, message: '请输入验证码', trigger: 'onChange' }]}
-              placeholder="请输入验证码"
-              maxlength={6}
-              type="tel"
-            >
-              {{
-                button: () =>
-                  state.countDownStatus ? (
-                    <Button type="primary" round size="small" color="#ff8057" onClick={onSendCode}>
-                      发送验证码
-                    </Button>
-                  ) : (
-                    <Button
-                      type="default"
-                      round
-                      size="small"
-                      disabled
-                      style={{ minWidth: '60px' }}
-                      onClick={onSendCode}
-                    >
-                      {state.countDownTime + 's'}
-                    </Button>
-                  )
-              }}
-            </Field>
-            <div class={styles.phoneTips}>
-              <Icon name="warning" size="16" />
-              提示:手机号码将成为您管乐团老师端登录账号
-            </div>
 
             <Field
               required
@@ -333,6 +296,7 @@ export default defineComponent({
                       plain={!(state.forms.gender === 1)}
                       color="#FF8057"
                       class={styles.radioSection}
+                      round
                     >
                       <Radio class={styles.radioItem} name={1}></Radio>男
                     </Tag>
@@ -342,6 +306,7 @@ export default defineComponent({
                       plain={!(state.forms.gender === 0)}
                       color="#FF8057"
                       class={styles.radioSection}
+                      round
                     >
                       <Radio class={styles.radioItem} name={0}></Radio>女
                     </Tag>
@@ -475,6 +440,40 @@ export default defineComponent({
                 )
               }}
             </Field>
+            <Field
+              required
+              label="验证码"
+              v-model={state.forms.smsValidCode}
+              name="smsValidCode"
+              rules={[{ required: true, message: '请输入验证码', trigger: 'onChange' }]}
+              placeholder="请输入验证码"
+              maxlength={6}
+              type="tel"
+            >
+              {{
+                button: () =>
+                  state.countDownStatus ? (
+                    <Button type="primary" round size="small" color="#ff8057" onClick={onSendCode}>
+                      发送验证码
+                    </Button>
+                  ) : (
+                    <Button
+                      type="default"
+                      round
+                      size="small"
+                      disabled
+                      style={{ minWidth: '60px' }}
+                      onClick={onSendCode}
+                    >
+                      {state.countDownTime + 's'}
+                    </Button>
+                  )
+              }}
+            </Field>
+            <div class={styles.phoneTips}>
+              <Icon name="warning" size="16" />
+              提示:手机号码将成为您管乐团老师端登录账号
+            </div>
           </CellGroup>
 
           <div class={styles.protocol}>

+ 1 - 0
src/school/companion-teacher/index.module.less

@@ -12,6 +12,7 @@
   }
   .tagSubject {
     margin-right: 10px;
+    margin-bottom: 4px;
   }
 }
 

+ 3 - 1
src/school/companion-teacher/index.tsx

@@ -101,6 +101,8 @@ export default defineComponent({
           res.data.schoolId +
           '&name=' +
           res.data.schoolName
+
+        console.log(form.url)
       } catch {
         //
       }
@@ -355,7 +357,7 @@ export default defineComponent({
                     title: () => (
                       <div class={styles.subjectContainer}>
                         <span>声部:</span>
-                        <div style={{ display: 'flex', alignItems: 'center' }}>
+                        <div style={{ display: 'flex', alignItems: 'center', flexWrap: 'wrap' }}>
                           {item.subjectNames &&
                             item.subjectNames.length > 0 &&
                             item.subjectNames.map((subject: any) => (

+ 2 - 2
src/school/main.ts

@@ -30,8 +30,8 @@ postMessage(
     console.log(res, 'version')
   }
 )
-import Vconsole from 'vconsole'
-const vconsole = new Vconsole()
+// import Vconsole from 'vconsole'
+// const vconsole = new Vconsole()
 const paymentType = (window as any).paymentType // 浏览器设置
 if (browser().isTeacher || paymentType === 'TEACHER') {
   state.platformType = 'TEACHER'

+ 4 - 0
src/school/manage-teacher/manage-detail.module.less

@@ -4,6 +4,10 @@
   border-radius: 10px;
 }
 
+.manageTeacher {
+  --van-dialog-message-font-size: 16px !important;
+}
+
 .sectionCellGroup {
   :global {
     .van-cell {

+ 3 - 3
src/school/manage-teacher/manage-detail.tsx

@@ -16,7 +16,7 @@ export default defineComponent({
     const detail = ref<any>({})
     const state = reactive({
       menuStatus: false,
-      status: false
+      status: true
     })
     const getDetail = async () => {
       try {
@@ -58,7 +58,7 @@ export default defineComponent({
       getDetail()
     })
     return () => (
-      <>
+      <div class={styles.manageTeacher}>
         <OHeader />
 
         <CellGroup inset class={styles.detailCellGroup}>
@@ -165,7 +165,7 @@ export default defineComponent({
             )
           }}
         </Dialog>
-      </>
+      </div>
     )
   }
 })

+ 37 - 34
src/school/manage-teacher/manage-teacher-register.tsx

@@ -130,6 +130,7 @@ export default defineComponent({
           '/api-school/open/orchestraSubjectConfig/pageByOrchestraId',
           {
             data: {
+              orchestraId: state.id,
               page: 1,
               rows: 50
             }
@@ -191,40 +192,6 @@ export default defineComponent({
               maxlength={11}
               type="tel"
             ></Field>
-            <Field
-              required
-              label="验证码"
-              v-model={state.forms.smsValidCode}
-              name="smsValidCode"
-              rules={[{ required: true, message: '请输入验证码', trigger: 'onChange' }]}
-              placeholder="请输入验证码"
-              maxlength={6}
-              type="tel"
-            >
-              {{
-                button: () =>
-                  state.countDownStatus ? (
-                    <Button type="primary" round size="small" color="#64A9FF" onClick={onSendCode}>
-                      发送验证码
-                    </Button>
-                  ) : (
-                    <Button
-                      type="default"
-                      round
-                      size="small"
-                      disabled
-                      style={{ minWidth: '60px' }}
-                      onClick={onSendCode}
-                    >
-                      {state.countDownTime + 's'}
-                    </Button>
-                  )
-              }}
-            </Field>
-            <div class={styles.phoneTips}>
-              <Icon name="warning" size="16" />
-              提示:手机号码将成为您管乐团管理端登录账号
-            </div>
 
             <Field
               required
@@ -261,6 +228,7 @@ export default defineComponent({
                       plain={!(state.forms.gender === 1)}
                       color="#64A9FF"
                       class={styles.radioSection}
+                      round
                     >
                       <Radio class={styles.radioItem} name={1}></Radio>男
                     </Tag>
@@ -270,6 +238,7 @@ export default defineComponent({
                       plain={!(state.forms.gender === 0)}
                       color="#64A9FF"
                       class={styles.radioSection}
+                      round
                     >
                       <Radio class={styles.radioItem} name={0}></Radio>女
                     </Tag>
@@ -277,6 +246,40 @@ export default defineComponent({
                 )
               }}
             </Field>
+            <Field
+              required
+              label="验证码"
+              v-model={state.forms.smsValidCode}
+              name="smsValidCode"
+              rules={[{ required: true, message: '请输入验证码', trigger: 'onChange' }]}
+              placeholder="请输入验证码"
+              maxlength={6}
+              type="tel"
+            >
+              {{
+                button: () =>
+                  state.countDownStatus ? (
+                    <Button type="primary" round size="small" color="#64A9FF" onClick={onSendCode}>
+                      发送验证码
+                    </Button>
+                  ) : (
+                    <Button
+                      type="default"
+                      round
+                      size="small"
+                      disabled
+                      style={{ minWidth: '60px' }}
+                      onClick={onSendCode}
+                    >
+                      {state.countDownTime + 's'}
+                    </Button>
+                  )
+              }}
+            </Field>
+            <div class={styles.phoneTips}>
+              <Icon name="warning" size="16" />
+              提示:手机号码将成为您管乐团管理端登录账号
+            </div>
           </CellGroup>
 
           <div class={styles.protocol}>

+ 1 - 0
src/school/mass-message/component/manage-list/index.module.less

@@ -42,5 +42,6 @@
   }
   .tagSubject {
     margin-right: 10px;
+    margin-bottom: 4px;
   }
 }

+ 1 - 0
src/school/mass-message/component/student-list/index.module.less

@@ -42,5 +42,6 @@
   }
   .tagSubject {
     margin-right: 10px;
+    margin-bottom: 4px;
   }
 }

+ 1 - 0
src/school/mass-message/component/teacher-list/teacher-list.module.less

@@ -42,5 +42,6 @@
   }
   .tagSubject {
     margin-right: 10px;
+    margin-bottom: 4px;
   }
 }

+ 1 - 1
src/school/mass-message/component/teacher-list/teacher-list.tsx

@@ -197,7 +197,7 @@ export default defineComponent({
                       title: () => (
                         <div class={styles.subjectContainer}>
                           <span>声部:</span>
-                          <div style={{ display: 'flex', alignItems: 'center' }}>
+                          <div style={{ display: 'flex', alignItems: 'center', flexWrap: 'wrap' }}>
                             {item.subjectNames &&
                               item.subjectNames.map((subject: any) => (
                                 <Tag type="primary" class={styles.tagSubject}>

+ 4 - 3
src/school/orchestra/create-orchestra/index.tsx

@@ -69,9 +69,10 @@ export default defineComponent({
     const onSelectSubject = (ids: any) => {
       state.selectSubjectIds = [...ids]
       const temps: any = []
+      console.log(state.selectSubjects, '1212', state.subjectList)
       state.subjectList.forEach((item: any) => {
-        const index = state.selectSubjects.findIndex((select: any) => select.id === item.id)
-        if (ids.includes(item.id)) {
+        const index = state.selectSubjects.findIndex((select: any) => select.id === item.subjectId)
+        if (ids.includes(item.subjectId)) {
           // 判断是否在数据里,如果在则直接添加,不能重置数据
           if (index < 0) {
             temps.push({
@@ -83,7 +84,7 @@ export default defineComponent({
               students: [] as any // 选中的数据数
             })
           } else {
-            temps.push(state.selectSubjects.find((select: any) => select.id === item.id))
+            temps.push(state.selectSubjects.find((select: any) => select.id === item.subjectId))
           }
         }
       })

+ 3 - 0
src/school/orchestra/create-orchestra/select-teacher.module.less

@@ -1,3 +1,6 @@
+.selectTeacher {
+  --van-dialog-message-font-size: 16px !important;
+}
 .cellGroup {
   margin: 12px 13px;
   :global {

+ 1 - 1
src/school/orchestra/create-orchestra/select-teacher.tsx

@@ -78,7 +78,7 @@ export default defineComponent({
     }
 
     return () => (
-      <div>
+      <div class={styles.selectTeacher}>
         <OHeader title="选择老师" />
 
         <CellGroup inset class={styles.cellGroup}>

+ 3 - 2
src/school/orchestra/modal/student-list.tsx

@@ -57,6 +57,7 @@ export default defineComponent({
       oPopover: false,
       isLoad: false,
       classList: [
+        { text: '全部', value: -1 },
         { text: '一年级', value: 1 },
         { text: '二年级', value: 2 },
         { text: '三年级', value: 3 },
@@ -71,7 +72,7 @@ export default defineComponent({
       } as any,
       class: {
         id: null,
-        name: '年级'
+        name: '全部'
       } as any,
       list: [] as any,
       listState: {
@@ -100,7 +101,7 @@ export default defineComponent({
             ...state.params,
             subjectId: props.subjectId,
             orchestraId: state.orchestra.id,
-            currentGradeNum: state.class.id
+            currentGradeNum: state.class.id === -1 ? null : state.class.id
           }
         })
         state.listState.loading = false

+ 11 - 6
src/school/school-detail/eidt-school.tsx

@@ -10,7 +10,7 @@ import locIcon from './images/loc-icon.png'
 import request from '@/helpers/request'
 import { areas } from '@/helpers/area'
 import OUpload from '@/components/o-upload'
-import { postMessage } from '@/helpers/native-message'
+import { listenerMessage, postMessage } from '@/helpers/native-message'
 export default defineComponent({
   name: 'school-detail',
   setup() {
@@ -118,15 +118,13 @@ export default defineComponent({
     })
     const setAddress = async () => {
       try {
-        await postMessage(
+        postMessage(
           {
             api: 'sourseMapApi',
             content: { type: 'modify', orginPoint: forms.addressLongitudeLatitude }
           },
           (data: any) => {
-            console.log('---------')
-            console.log(data.content.nowPoint, data.content.address)
-            console.log('---------')
+            console.log(data.content.nowPoint, data.content.address, '------')
             forms.addressLongitudeLatitude = data.content.nowPoint
             forms.address = data.content.address
           }
@@ -135,10 +133,17 @@ export default defineComponent({
         console.log(e)
       }
     }
+
+    onMounted(() => {
+      listenerMessage('sourseMapApi', (data: any) => {
+        console.log(data.content.nowPoint, data.content.address)
+        forms.addressLongitudeLatitude = data.content.nowPoint
+        forms.address = data.content.address
+      })
+    })
     return () => (
       <>
         <div class={styles.schoolEidtWrap}>
-          <OHeader></OHeader>
           <div class={styles.eidtWrap}>
             <CellGroup inset>
               <div class={styles.schoolDtailWrap} onClick={setSchoolIcon}>

+ 1 - 0
src/school/train-planning/component/course-preview/index.module.less

@@ -18,6 +18,7 @@
 }
 
 .coursePreview {
+  --van-dialog-message-font-size: 16px !important;
 }
 .orchestraTabs {
   font-weight: 400;

+ 5 - 4
src/school/train-planning/component/course-preview/index.tsx

@@ -34,10 +34,11 @@ export default defineComponent({
     const courseTabsRef: any = ref()
 
     // 获取所有
-    const getClasses = async () => {
+    const getClasses = async (loading = true) => {
       try {
         const { data } = await request.post('/api-school/orchestra/trainingPlanListCache', {
           requestType: 'form',
+          hideLoading: !loading,
           data: {
             cacheId: route.query.cacheId
           }
@@ -171,9 +172,9 @@ export default defineComponent({
       } catch {
         //
         state.isClick = false
-        setTimeout(() => {
-          getClasses()
-        }, 1100)
+        getClasses(false)
+        // setTimeout(() => {
+        // }, 1100)
       }
     }
 

+ 2 - 0
src/school/train-planning/component/practice/index.tsx

@@ -200,6 +200,7 @@ export default defineComponent({
                     plain={!(forms.skipHoliday === 1)}
                     color="#FF8057"
                     class={styles.radioSection}
+                    round
                   >
                     <Radio class={styles.radioItem} name={1}></Radio>是
                   </Tag>
@@ -209,6 +210,7 @@ export default defineComponent({
                     plain={!(forms.skipHoliday === 0)}
                     color="#FF8057"
                     class={styles.radioSection}
+                    round
                   >
                     <Radio class={styles.radioItem} name={0}></Radio>否
                   </Tag>

+ 4 - 0
src/school/train-planning/component/standard/index.module.less

@@ -1,3 +1,7 @@
+.standard {
+  --van-dialog-message-font-size: 16px !important;
+}
+
 .tips {
   display: flex;
   align-items: center;

+ 2 - 0
src/school/train-planning/component/standard/index.tsx

@@ -239,6 +239,7 @@ export default defineComponent({
                     plain={!(forms.skipHoliday === 1)}
                     color="#FF8057"
                     class={styles.radioSection}
+                    round
                   >
                     <Radio class={styles.radioItem} name={1}></Radio>是
                   </Tag>
@@ -248,6 +249,7 @@ export default defineComponent({
                     plain={!(forms.skipHoliday === 0)}
                     color="#FF8057"
                     class={styles.radioSection}
+                    round
                   >
                     <Radio class={styles.radioItem} name={0}></Radio>否
                   </Tag>

+ 4 - 2
src/student/music-group/pre-apply/component/apply.tsx

@@ -197,7 +197,7 @@ export default defineComponent({
       // }
     })
     return () => (
-      <>
+      <div class={styles.preApplyC}>
         <Form validateFirst scrollToError onSubmit={onSubmit} ref="form" class={styles.form}>
           <div class={styles.applyTitle}>学生信息</div>
           <CellGroup inset class={styles.applyCellGroup}>
@@ -224,6 +224,7 @@ export default defineComponent({
                       type="primary"
                       plain={!(forms.sex === 1)}
                       class={styles.radioSection}
+                      round
                     >
                       <Radio class={styles.radioItem} name={1}></Radio>男生
                     </Tag>
@@ -232,6 +233,7 @@ export default defineComponent({
                       type="primary"
                       plain={!(forms.sex === 0)}
                       class={styles.radioSection}
+                      round
                     >
                       <Radio class={styles.radioItem} name={0}></Radio>女生
                     </Tag>
@@ -390,7 +392,7 @@ export default defineComponent({
             )
           }}
         </Dialog>
-      </>
+      </div>
     )
   }
 })

+ 3 - 0
src/student/music-group/pre-apply/index.module.less

@@ -311,6 +311,9 @@
   }
 }
 
+.preApplyC {
+  --van-dialog-message-font-size: 16px !important;
+}
 .dialogTitle {
   i {
     display: inline-block;

+ 1 - 0
src/student/music-group/shop-address/address-operation.tsx

@@ -127,6 +127,7 @@ export default defineComponent({
             placeholder="请输入收货人手机号"
             v-model={state.phoneNumber}
             maxlength={11}
+            type="tel"
             formatter={onFormatterInt}
           />
           <Field

+ 4 - 0
src/student/my-orchestra/apply-withdrawal.module.less

@@ -93,6 +93,10 @@
   }
 }
 
+.applyWithdrawal {
+  --van-dialog-message-font-size: 16px !important;
+}
+
 .dialogTitle {
   i {
     display: inline-block;

+ 2 - 2
src/student/my-orchestra/apply-withdrawal.tsx

@@ -71,7 +71,7 @@ export default defineComponent({
       getDetails()
     })
     return () => (
-      <>
+      <div class={styles.applyWithdrawal}>
         <div class={styles.headers}>
           <OHeader
             background={headColor.headBg}
@@ -133,7 +133,7 @@ export default defineComponent({
             )
           }}
         </Dialog>
-      </>
+      </div>
     )
   }
 })

+ 1 - 3
src/teacher/attendance/index.tsx

@@ -78,9 +78,7 @@ export default defineComponent({
         }
 
         forms.page = res.data.current + 1
-        for (let i = 0; i < 10; i++) {
-          list.value = list.value.concat(res.data.rows || [])
-        }
+        list.value = list.value.concat(res.data.rows || [])
 
         showContact.value = list.value.length > 0
         loading.value = false

+ 11 - 11
src/views/adapay/payment/index.tsx

@@ -14,7 +14,7 @@ export default defineComponent({
   emits: ['backOut', 'close', 'confirm'],
   setup(props, { slots, attrs, emit }) {
     const state = reactive({
-      payType: 'zfb',
+      payType: 'wx',
       pay_channel: ''
     })
     const onClose = () => {
@@ -89,29 +89,29 @@ export default defineComponent({
         <RadioGroup v-model={state.payType}>
           <CellGroup border={false}>
             <Cell
-              title="支付宝支付"
+              title="微信支付"
               border={false}
               center
               onClick={() => {
-                // alipay
-                state.payType = 'zfb'
+                // wx_lite
+                state.payType = 'wx'
               }}
               v-slots={{
-                icon: () => <Icon name="alipay" color="#009fe9" size={22} />,
-                'right-icon': () => <Radio name="zfb" />
+                icon: () => <Icon name="wechat-pay" color="#15c434" size={22} />,
+                'right-icon': () => <Radio name="wx" />
               }}
             ></Cell>
             <Cell
-              title="微信支付"
+              title="支付宝支付"
               border={false}
               center
               onClick={() => {
-                // wx_lite
-                state.payType = 'wx'
+                // alipay
+                state.payType = 'zfb'
               }}
               v-slots={{
-                icon: () => <Icon name="wechat-pay" color="#15c434" size={22} />,
-                'right-icon': () => <Radio name="wx" />
+                icon: () => <Icon name="alipay" color="#009fe9" size={22} />,
+                'right-icon': () => <Radio name="zfb" />
               }}
             ></Cell>
           </CellGroup>

+ 63 - 0
src/views/unit-test/model/answer-list/index.module.less

@@ -0,0 +1,63 @@
+.anserList {
+  min-height: 20vh;
+  padding: 20px 0;
+
+  .status {
+    display: flex;
+    align-items: center;
+    padding: 0 20px 30px;
+    span {
+      display: flex;
+      align-items: center;
+      font-size: 16px;
+      font-weight: 500;
+      color: #333333;
+      & + span {
+        margin-left: 30px;
+      }
+    }
+    i {
+      display: inline-block;
+      width: 18px;
+      height: 18px;
+      background-color: #eaeaea;
+      border-radius: 50%;
+      margin-right: 8px;
+    }
+  }
+
+  .aList {
+    margin: 0 10px;
+    :global {
+      .van-grid-item__content {
+        padding: 0 0 13px;
+      }
+    }
+    span {
+      display: inline-flex;
+      align-items: center;
+      justify-content: center;
+      width: 45px;
+      height: 45px;
+      background: #eaeaea;
+      font-size: 18px;
+      font-weight: 500;
+      color: #777777;
+      border-radius: 50%;
+    }
+
+    .answered {
+      background: #ff8057;
+      color: #fff;
+    }
+
+    .yes {
+      background-color: #71b0ff;
+      color: #fff;
+    }
+    .no {
+      background-color: #ff8486;
+      color: #fff;
+    }
+  }
+}

+ 56 - 0
src/views/unit-test/model/answer-list/index.tsx

@@ -0,0 +1,56 @@
+import { Grid, GridItem } from 'vant'
+import { defineComponent, PropType } from 'vue'
+import styles from './index.module.less'
+
+export default defineComponent({
+  name: 'answer-list',
+  props: {
+    value: {
+      type: Array,
+      default: []
+    },
+    answerList: {
+      type: Array,
+      default: () => []
+    },
+    statusList: {
+      type: Array,
+      default: () => [
+        {
+          text: '已答',
+          color: '#FF8057'
+        },
+        {
+          text: '未答',
+          color: '#EAEAEA'
+        }
+      ]
+    }
+  },
+  emits: ['select', 'update:value'],
+  setup(props, { emit }) {
+    return () => (
+      <div class={styles.anserList}>
+        <div class={styles.status}>
+          {props.statusList.map((item: any) => (
+            <span>
+              <i style={{ backgroundColor: item.color }}></i>
+              {item.text}
+            </span>
+          ))}
+        </div>
+
+        <Grid class={styles.aList} columnNum={6} border={false}>
+          {[1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 9, 0, 10].map((item: any) => {
+            // console.log(props.keys)
+            return (
+              <GridItem onClick={() => emit('select', item)}>
+                <span class={props.value.includes(item) && styles.active}>{item}</span>
+              </GridItem>
+            )
+          })}
+        </Grid>
+      </div>
+    )
+  }
+})

+ 53 - 0
src/views/unit-test/model/choice-question/index.module.less

@@ -0,0 +1,53 @@
+.unitSubject {
+  padding: 15px;
+  margin: 0 13px;
+  background-color: #fff;
+  overflow: hidden;
+  border-radius: 10px;
+}
+.unitSubjectTitle {
+  display: flex;
+  align-items: center;
+  flex-wrap: wrap;
+  font-size: 16px;
+  font-weight: 500;
+  color: #333333;
+  line-height: 26px;
+  .unitScore {
+    color: #777777;
+  }
+}
+.unitTitleImg {
+  padding-top: 20px;
+  padding-bottom: 10px;
+  width: 100%;
+}
+
+.unitAnswers {
+  padding-bottom: 30px;
+  .unitAnswer {
+    margin-top: 15px;
+    background: #f6f6f6;
+    border-radius: 8px;
+    padding: 15px 12px;
+    display: flex;
+    align-items: center;
+    font-size: 16px;
+    font-weight: 500;
+    color: #333333;
+    .option {
+      margin-right: 10px;
+    }
+    .value {
+      :global {
+        .van-image {
+          height: 38px;
+        }
+      }
+    }
+  }
+  .active {
+    background-color: #ffebdd;
+    color: #f67146;
+  }
+}

+ 92 - 0
src/views/unit-test/model/choice-question/index.tsx

@@ -0,0 +1,92 @@
+import { Tag, Image } from 'vant'
+import { defineComponent, PropType, reactive } from 'vue'
+import { labelOptions } from '../../unit'
+import styles from './index.module.less'
+
+export default defineComponent({
+  name: 'choice-question',
+  props: {
+    value: {
+      type: [String, Number, Array],
+      default: ''
+    },
+    type: {
+      type: String as PropType<'radio' | 'checkbox'>,
+      default: 'radio'
+    },
+    answers: {
+      type: Object,
+      default: {}
+    }
+  },
+  emits: ['update:value'],
+  setup(props, { emit }) {
+    const state = reactive({
+      options: [
+        {
+          index: 1,
+          value: 'Sol'
+        },
+        {
+          index: 2,
+          value: 'Sal'
+        },
+        {
+          index: 3,
+          value: 'La'
+        },
+        {
+          index: 4,
+          value: 'Si'
+        }
+      ]
+    })
+
+    const onSelect = (item: any) => {
+      if (props.type === 'checkbox') {
+        // 判断是否已选过
+        const value: any = props.value
+        if (value.includes(item.index)) {
+          const index = value.findIndex((v: any) => v === item.index)
+          value.splice(index, 1)
+          emit('update:value', [...value])
+        } else {
+          emit('update:value', [item.index, ...value])
+        }
+      } else {
+        emit('update:value', item.index)
+      }
+    }
+    return () => (
+      <div class={styles.unitSubject}>
+        <div class={styles.unitSubjectTitle}>
+          1、选出与方框内音符时值相同的节奏阶段 <span class={styles.unitScore}>(5分)</span>
+          <Tag type="primary">{props.type === 'radio' ? '单选题' : '多选题'}</Tag>
+        </div>
+        <Image
+          class={styles.unitTitleImg}
+          src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/dbb27307d428424c8efb9f26032cfa1a_mergeImage.png"
+        />
+
+        <div class={styles.unitAnswers}>
+          {/* styles.active */}
+          {state.options.map((item: any) => (
+            <div
+              class={[
+                styles.unitAnswer,
+                props.type === 'radio' && props.value === item.index && styles.active,
+                props.type === 'checkbox' &&
+                  (props.value as any).includes(item.index) &&
+                  styles.active
+              ]}
+              onClick={() => onSelect(item)}
+            >
+              <span class={styles.option}>{labelOptions[item.index]}.</span>
+              <div class={styles.value}>{item.value}</div>
+            </div>
+          ))}
+        </div>
+      </div>
+    )
+  }
+})

+ 0 - 17
src/views/unit-test/unit-detail/index.module.less

@@ -44,20 +44,3 @@
   flex-shrink: 0;
   margin-left: 18px;
 }
-
-.unitSubject {
-  padding: 15px;
-  margin: 0 13px;
-  background-color: #fff;
-  overflow: hidden;
-  border-radius: 10px;
-}
-.unitSubjectTitle {
-  font-size: 16px;
-  font-weight: 500;
-  color: #333333;
-  line-height: 26px;
-  .unitScore {
-    color: #777777;
-  }
-}

+ 98 - 21
src/views/unit-test/unit-detail/index.tsx

@@ -1,4 +1,15 @@
-import { Button, Cell, Icon, Image, Popup, Swipe, SwipeItem, Tag } from 'vant'
+import {
+  ActionSheet,
+  Button,
+  Cell,
+  CountDown,
+  Icon,
+  Image,
+  Popup,
+  Swipe,
+  SwipeItem,
+  Tag
+} from 'vant'
 import { defineComponent, reactive, ref } from 'vue'
 import { useRoute, useRouter } from 'vue-router'
 import NoticeStart from '../model/notice-start'
@@ -7,16 +18,28 @@ import iconQuestionNums from '../images/icon-question-nums.png'
 import iconCountDown from '../images/icon-count-down.png'
 import iconButtonList from '../images/icon-button-list.png'
 import OSticky from '@/components/o-sticky'
+import ChoiceQuestion from '../model/choice-question'
+import { useCountDown } from '@vant/use'
+import AnswerList from '../model/answer-list'
+import ODialog from '@/components/o-dialog'
 
 export default defineComponent({
   name: 'unit-detail',
   setup() {
     const route = useRoute()
     const router = useRouter()
+    const countDownRef = ref()
     const swipeRef = ref()
     const state = reactive({
-      visiableNotice: false
+      visiableNotice: false,
+      visiableAnswer: false,
+      currentIndex: 0,
+      questionList: [1, 2, 3, 4, 5],
+      answerList: {},
+      time: 30 * 60 * 1000,
+      visiableSure: false
     })
+
     return () => (
       <div class={styles.unitDetail}>
         <Cell center class={styles.unitSection}>
@@ -30,46 +53,88 @@ export default defineComponent({
                 </div>
                 <div class={styles.qNums}>
                   <Icon class={styles.icon} name={iconCountDown} />
-                  剩余时长:39:30
+                  剩余时长:
+                  <CountDown
+                    ref={countDownRef}
+                    time={state.time}
+                    format={'mm:ss'}
+                    autoStart={false}
+                  />
                 </div>
               </div>
             )
           }}
         </Cell>
 
-        <Swipe loop={false} showIndicators={false} ref={swipeRef} duration={300}>
-          <SwipeItem>
-            <div class={styles.unitSubject}>
-              <div class={styles.unitSubjectTitle}>
-                1、选出与方框内音符时值相同的节奏阶段 <span class={styles.unitScore}>(5分)</span>
-                <Tag type="primary">单选题</Tag>
-              </div>
-              <Image src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/dbb27307d428424c8efb9f26032cfa1a_mergeImage.png" />
-            </div>
-          </SwipeItem>
-          <SwipeItem>
-            <div class={styles.unitSubject}>
-              <Image src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/dbb27307d428424c8efb9f26032cfa1a_mergeImage.png" />
-            </div>
-          </SwipeItem>
+        <Swipe
+          loop={false}
+          showIndicators={false}
+          ref={swipeRef}
+          duration={300}
+          touchable={false}
+          lazyRender
+          initialSwipe={state.currentIndex}
+        >
+          {state.questionList.map((item: any) => (
+            <SwipeItem>
+              <ChoiceQuestion v-model:value={state.answerList[item]} type="checkbox" />
+            </SwipeItem>
+          ))}
         </Swipe>
 
         <OSticky position="bottom" background="white">
           <div class={['btnGroup btnMore']}>
+            {state.currentIndex > 0 && (
+              <Button
+                round
+                block
+                type="primary"
+                plain
+                onClick={() => {
+                  state.currentIndex -= 1
+                  swipeRef.value?.prev()
+                }}
+              >
+                上一题
+              </Button>
+            )}
             <Button
               block
               round
               type="primary"
               onClick={() => {
-                swipeRef.value.next()
+                if (state.questionList.length === state.currentIndex + 1) {
+                  state.visiableSure = true
+                } else {
+                  state.currentIndex += 1
+                  swipeRef.value?.next()
+                }
+                console.log(state.currentIndex)
               }}
             >
-              下一题
+              {state.questionList.length === state.currentIndex + 1 ? '测试完成' : '下一题'}
             </Button>
-            <Image src={iconButtonList} class={[styles.wapList, 'van-haptics-feedback']} />
+            <Image
+              src={iconButtonList}
+              class={[styles.wapList, 'van-haptics-feedback']}
+              onClick={() => (state.visiableAnswer = true)}
+            />
           </div>
         </OSticky>
 
+        {/* 题目集合 */}
+        <ActionSheet v-model:show={state.visiableAnswer} title="题目列表" safeAreaInsetBottom>
+          <AnswerList
+            value={[1, 3, 4]}
+            onSelect={(item: any) => {
+              // 跳转,并且跳过动画
+              swipeRef.value?.swipeTo(item, {
+                immediate: true
+              })
+            }}
+          />
+        </ActionSheet>
+
         {/* 测验须知 */}
         <Popup
           v-model:show={state.visiableNotice}
@@ -84,9 +149,21 @@ export default defineComponent({
             }}
             onConfirm={() => {
               console.log('start')
+              countDownRef.value.start()
+              state.visiableNotice = false
             }}
           />
         </Popup>
+
+        <ODialog
+          v-model:show={state.visiableSure}
+          title="测验完成"
+          message="确认本次测验的题目都完成了吗?\n提交后不可修改哦"
+          messageAlign="left"
+          showCancelButton
+          cancelButtonText="再等等"
+          confirmButtonText="确认完成"
+        />
       </div>
     )
   }

+ 12 - 0
src/views/unit-test/unit.ts

@@ -0,0 +1,12 @@
+export const labelOptions = {
+  1: 'A',
+  2: 'B',
+  3: 'C',
+  4: 'D',
+  5: 'E',
+  6: 'F',
+  7: 'G',
+  8: 'H',
+  9: 'I',
+  10: 'J'
+}