shmily1213 il y a 1 mois
Parent
commit
8c26260e92

+ 5 - 1
src/pagesStudy/pages/start-exam/start-exam.vue

@@ -146,6 +146,7 @@ const beforeQuit = () => {
   if (!isReady.value) {
     return;
   }
+  stopTime();
   const msg = mode === EnumExamMode.PRACTICE ? '当前练习未完成,确认退出?' : '当前考试未完成,确认退出?';
   uni.$ie.showModal({
     title: '提示',
@@ -153,6 +154,8 @@ const beforeQuit = () => {
   }).then(confirm => {
     if (confirm) {
       handleSubmit(true);
+    } else {
+      startTime();
     }
   });
 };
@@ -284,7 +287,8 @@ const handleSubmit = (tempSave: boolean = false) => {
         };
       }),
       examineeId: examineerData.value.examineeId,
-      isDone: isAllDone.value
+      isDone: isAllDone.value,
+      duration: isExamMode.value ? examDuration.value : practiceDuration.value
     } as Study.ExamPaperSubmit;
     if (!isExamMode.value) {
       params.duration = practiceDuration.value;

+ 16 - 10
src/pagesStudy/pages/targeted-setting/targeted-setting.vue

@@ -6,7 +6,7 @@
         <text class="text-32 text-fore-title font-bold">添加定向院校</text>
         <text class="ml-10 text-32 text-fore-light">({{ directedSchoolList.length }}/3)</text>
       </view>
-      <view class="text-24 text-primary">添加后无法更改</view>
+      <view class="text-24 text-fore-light">添加后无法更改</view>
     </view>
     <view class="px-48 pt-52 pb-32 flex items-center justify-between">
       <view class="text-32 text-fore-title font-bold">我的定向院校</view>
@@ -16,8 +16,8 @@
       </view> -->
     </view>
     <view v-if="hasDirectedSchool" class="px-30">
-      <l-drag ref="dragRef" :list="directedSchoolList" :column="1" gridHeight="104px" :touchHandle="touchHandle" ghost handle
-        @change="changeSort">
+      <l-drag ref="dragRef" :list="directedSchoolList" :column="1" gridHeight="104px" :touchHandle="touchHandle" ghost
+        handle @change="changeSort">
         <!-- // 每一项的插槽 grid 的 content 您传入的数据 -->
         <template #grid="{ active, content, index }">
           <!-- // grid.active 是否为当前拖拽项目 根据自己需要写样式 -->
@@ -82,6 +82,7 @@ const handleSetDirectedSchool = async (item: DirectedSchool, index: number) => {
   directedSchoolList.value.unshift(item);
   save(directedSchoolList.value);
 }
+const dragRef = ref();
 const handleAdd = () => {
   transferTo('/pagesStudy/pages/targeted-add/targeted-add', {
     data: {
@@ -89,17 +90,22 @@ const handleAdd = () => {
     }
   }).then(async res => {
     if (res) {
-      directedSchoolList.value.push({
-        ...res,
-        code: (res as SelectedUniversityMajor).universityId
-      } as DirectedSchool);
+
       setTimeout(() => {
-        save(directedSchoolList.value);
-      }, 300);
+        dragRef.value.push({
+          ...res,
+          code: (res as SelectedUniversityMajor).universityId
+        } as DirectedSchool);
+        // directedSchoolList.value = [...directedSchoolList.value, {
+        //   ...res,
+        //   code: (res as SelectedUniversityMajor).universityId
+        // } as DirectedSchool];
+        // save(directedSchoolList.value);
+      }, 500);
     }
   });
 }
-const dragRef = ref();
+
 const changeSort = (e: any) => {
   const list = e.map((item: any) => item.content);
   save(list);

+ 9 - 3
src/pagesSystem/pages/edit-profile/edit-profile.vue

@@ -80,11 +80,9 @@
 
         <content-card v-if="form.examType === 'OHS' || form.examType === 'SVS'" title="职业技能成绩">
           <uv-form-item label="职业技能" prop="name">
-            <uv-input v-model="scores.chinese" border="none" placeholder="请输入" placeholderClass="text-30"
+            <uv-input v-model="scores.skill" border="none" placeholder="请输入" placeholderClass="text-30"
               font-size="30rpx" :custom-style="customStyle">
             </uv-input>
-            <ie-image v-if="form.examType === 'OHS'" slot="right" src="/pagesSystem/static/image/icon/icon-lock.png"
-              custom-class="w-24 h-30" mode="aspectFill" />
           </uv-form-item>
         </content-card>
 
@@ -189,10 +187,18 @@ const handleSendSuccess = (_phone: string, _code: string, _uuid: string) => {
   phoneForm.value.uuid = _uuid;
 }
 const handleChangePhone = async () => {
+  if (phoneForm.value.phone.trim() === '') {
+    uni.$ie.showToast('请输入新手机号');
+    return;
+  }
   if (phoneForm.value.code.trim() === '') {
     uni.$ie.showToast('请输入验证码');
     return;
   }
+  if (phoneForm.value.phone === userInfo.value.phonenumber) {
+    uni.$ie.showToast('新手机号不能与旧手机号相同');
+    return;
+  }
   uni.$ie.showLoading();
   const valid = await validateSms({
     code: phoneForm.value.code,

+ 1 - 0
src/types/user.ts

@@ -102,6 +102,7 @@ export interface Scores {
   history?: number;
   mathematics?: number;
   political?: number;
+  skill?: number; // 职业技能成绩
 }
 
 export interface SmsRequestDTO {