浏览代码

处理速度计算更新

Michael Wang 6 年之前
父节点
当前提交
eff650908b
共有 1 个文件被更改,包括 11 次插入11 次删除
  1. 11 11
      src/views/index.vue

+ 11 - 11
src/views/index.vue

@@ -208,17 +208,6 @@ export default {
       const photoFile = fs.readFileSync(studentPhotoPath);
       const rootOrgId = localStorage.getItem("rootOrgId");
 
-      {
-        // 执行过程中的元信息
-        this.reqNum = window.requestInProcessingTotal;
-        this.faceppConcurrencyErrorNum = window.faceppConcurrencyErrorNum;
-        this.faceppConcurrencyErrorNumPerMinute =
-          window.faceppConcurrencyErrorNumPerMinute;
-        this.processSpeed =
-          (this.successNum + this.errorNum - this.skipNum) /
-          (Date.now() - this.startProcessTime);
-      }
-
       //生成新名称
       let serverPhotoPath = null;
       const upyunPhotoPath = (() => {
@@ -263,6 +252,17 @@ export default {
         };
         await this.saveStudentFaceInfoByPut(photoInfo);
         this.finishOnePhotoSuccess("处理成功", studentPhotoPath);
+
+        {
+          // 执行过程中的元信息
+          this.reqNum = window.requestInProcessingTotal;
+          this.faceppConcurrencyErrorNum = window.faceppConcurrencyErrorNum;
+          this.faceppConcurrencyErrorNumPerMinute =
+            window.faceppConcurrencyErrorNumPerMinute;
+          this.processSpeed =
+            (this.successNum + this.errorNum - this.skipNum) /
+            (Date.now() - this.startProcessTime);
+        }
       } catch (err) {
         console.log(err);
         this.finishOnePhotoFail(err, studentPhotoPath);