Jelajahi Sumber

更新优化

lex 1 tahun lalu
induk
melakukan
66c4aacbbb

+ 23 - 19
src/views/knowledge-library/model/anser-title/index.tsx

@@ -1,9 +1,9 @@
-import { Tag, Image, Icon } from 'vant'
-import { computed, defineComponent } from 'vue'
-import { QuestionType, QuestionTypeName } from '../../unit'
-import styles from './index.module.less'
-import iconPassCheck from '../../images/icon-pass-check.png'
-import UnitAudio from '../unit-audio'
+import { Tag, Image, Icon } from 'vant';
+import { computed, defineComponent } from 'vue';
+import { QuestionType, QuestionTypeName } from '../../unit';
+import styles from './index.module.less';
+import iconPassCheck from '../../images/icon-pass-check.png';
+import UnitAudio from '../unit-audio';
 
 export default defineComponent({
   name: 'answer-title',
@@ -38,30 +38,31 @@ export default defineComponent({
   setup(props) {
     const answerTypeName = computed(() => {
       if (props.answerType === QuestionType.CHECKBOX) {
-        return QuestionTypeName.CHECKBOX
+        return QuestionTypeName.CHECKBOX;
       } else if (props.answerType === QuestionType.LINK) {
-        return QuestionTypeName.LINK
+        return QuestionTypeName.LINK;
       } else if (props.answerType === QuestionType.SORT) {
-        return QuestionTypeName.SORT
+        return QuestionTypeName.SORT;
       } else if (props.answerType === QuestionType.PLAY) {
-        return QuestionTypeName.PLAY
+        return QuestionTypeName.PLAY;
       }
-      return QuestionTypeName.RADIO
-    })
+      return QuestionTypeName.RADIO;
+    });
 
     const mediaUrls = computed(() =>
       props.extra.mediaUrls ? props.extra.mediaUrls.split(',') : ''
-    )
+    );
     return () => (
       <>
         <div class={styles.unitSubjectTitle}>
-          {props.index}、{props.name} <span class={styles.unitScore}>({props.score || 0}分)</span>
+          {props.index}、{props.name}
+          {/* <span class={styles.unitScore}>({props.score || 0}分)</span> */}
           <Tag
             type="primary"
             style={{
+              marginLeft: '8px',
               lineHeight: '20px'
-            }}
-          >
+            }}>
             {answerTypeName.value}
           </Tag>
         </div>
@@ -83,7 +84,10 @@ export default defineComponent({
                       {url.substr(-3) === 'mp3' ? (
                         <UnitAudio src={url} class={styles.valueAudio} />
                       ) : (
-                        <Image class={[styles.unitTitleImg, 'answerTitleImg']} src={url} />
+                        <Image
+                          class={[styles.unitTitleImg, 'answerTitleImg']}
+                          src={url}
+                        />
                       )}
                     </>
                   )
@@ -93,6 +97,6 @@ export default defineComponent({
           ''
         )}
       </>
-    )
+    );
   }
-})
+});

+ 1 - 1
src/views/knowledge-library/model/result-finish/index.tsx

@@ -55,7 +55,7 @@ export default defineComponent({
     /** 是否显示关闭 */
     closeable: {
       type: Boolean,
-      default: true
+      default: false
     }
   },
   emits: ['close', 'conform'],

+ 1 - 1
src/views/knowledge-library/unit-detail.tsx

@@ -42,7 +42,7 @@ export default defineComponent({
           '/edu-app/studentUnitExamination/checkKnowledgePointIds',
           {
             params: {
-              lessonCoursewareId: forms.detailId
+              knowledgePointIds: forms.detailId
             }
           }
         );

+ 1 - 1
src/views/knowledge-library/wroing-book/woring-stat/echarts.ts

@@ -96,7 +96,7 @@ export const lineChartOption = {
   },
   yAxis: {
     type: 'category',
-    data: ['多选题', '排序题', '单选题', '连连看']
+    data: ['连连看', '单选题', '排序题', '多选题']
   },
   dataZoom: [{ type: 'inside', throttle: 100 }],
   toolbox: { feature: { saveAsImage: { show: false } } }

+ 1 - 1
src/views/student-register/index.tsx

@@ -514,7 +514,7 @@ export default defineComponent({
         />
 
         {/* 是否在微信中打开 */}
-        <OWxTip />
+        {/* <OWxTip /> */}
       </div>
     );
   }

+ 23 - 2
src/views/student-register/register-modal/index.module.less

@@ -29,7 +29,7 @@
 
   :global {
     .van-cell {
-      padding: 16px 16px;
+      padding: 14px 14px;
 
     }
 
@@ -38,7 +38,7 @@
       font-weight: 600;
       color: #5B2C03;
       line-height: 22px;
-      margin-bottom: 10px;
+      margin-bottom: 8px;
     }
 
     .van-field__control {
@@ -66,4 +66,25 @@
   font-weight: 600;
   color: #5B2C03 !important;
   line-height: 22px;
+}
+
+.radioSection {
+  position: relative;
+  min-width: 32px;
+  justify-content: center;
+  padding-left: 14px;
+  padding-right: 14px;
+}
+
+.radioItem {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  opacity: 0;
+}
+
+.radioSection+.radioSection {
+  margin-left: 12px;
 }

+ 62 - 4
src/views/student-register/register-modal/index.tsx

@@ -1,7 +1,18 @@
 import { computed, defineComponent, nextTick, reactive, ref } from 'vue';
 import styles from './index.module.less';
 import infoTitle from '../images/info-title.png';
-import { Button, CountDown, Field, Form, Picker, Popup, showToast } from 'vant';
+import {
+  Button,
+  CountDown,
+  Field,
+  Form,
+  Picker,
+  Popup,
+  Radio,
+  RadioGroup,
+  Tag,
+  showToast
+} from 'vant';
 import MProtocol from '@/components/m-protocol';
 import MImgCode from '@/components/m-img-code';
 import { checkPhone } from '@/helpers/utils';
@@ -79,7 +90,8 @@ export default defineComponent({
       extra: {
         nickname: '',
         currentGradeNum: '',
-        currentClass: ''
+        currentClass: '',
+        gender: 1
       },
       grant_type: 'password',
       loginType: 'SMS',
@@ -121,7 +133,10 @@ export default defineComponent({
           requestType: 'form',
           data: {
             ...res,
-            extra: JSON.stringify({ ...extra, schoolId: props.schoolId })
+            extra: JSON.stringify({
+              ...extra,
+              schoolId: props.schoolId
+            })
           }
         });
 
@@ -170,7 +185,7 @@ export default defineComponent({
             type="tel"
             autocomplete="off"
             v-model={studentInfo.username}
-            maxlength={11}>
+            maxlength={14}>
             {{
               label: () => (
                 <div>
@@ -222,6 +237,49 @@ export default defineComponent({
           />
           <Field
             clearable
+            label="学生性别"
+            placeholder="请选择性别"
+            autocomplete="off"
+            // v-model={studentInfo.extra.nickname}
+          >
+            {{
+              input: () => (
+                <RadioGroup
+                  checked-color="#ffcb75"
+                  v-model={studentInfo.extra.gender}
+                  direction="horizontal">
+                  <Tag
+                    size="large"
+                    type="primary"
+                    color={
+                      !(studentInfo.extra.gender === 1) ? '#EAEAEA' : '#ffcb75'
+                    }
+                    textColor={
+                      !(studentInfo.extra.gender === 1) ? '#AAA' : '#5B2C03'
+                    }
+                    class={styles.radioSection}
+                    round>
+                    <Radio class={styles.radioItem} name={1}></Radio>男
+                  </Tag>
+                  <Tag
+                    size="large"
+                    type="primary"
+                    color={
+                      !(studentInfo.extra.gender === 0) ? '#EAEAEA' : '#ffcb75'
+                    }
+                    textColor={
+                      !(studentInfo.extra.gender === 0) ? '#AAA' : '#5B2C03'
+                    }
+                    class={styles.radioSection}
+                    round>
+                    <Radio class={styles.radioItem} name={0}></Radio>女
+                  </Tag>
+                </RadioGroup>
+              )
+            }}
+          </Field>
+          <Field
+            clearable
             label="所在年级"
             placeholder="请选择年级"
             isLink