Browse Source

细节修改

zhangjie 2 năm trước cách đây
mục cha
commit
6f8179b597

+ 3 - 4
src/assets/styles/pages.scss

@@ -272,10 +272,10 @@
 
   &-cont {
     position: absolute;
-    top: 0;
+    top: 50px;
     left: 0;
     right: 0;
-    bottom: 50px;
+    bottom: 0;
     z-index: 7;
     overflow: hidden;
     &-disabled::before {
@@ -301,12 +301,11 @@
   &-action {
     position: absolute;
     width: 100%;
-    bottom: 0;
+    top: 0;
     height: 50px;
     z-index: 8;
     background-color: #fff;
     padding: 10px;
-    text-align: right;
   }
 }
 

+ 2 - 1
src/components/ImageListPreviewDialog.vue

@@ -2,6 +2,7 @@
   <div class="image-list-preview-dialog">
     <el-dialog
       :visible.sync="modalIsShow"
+      class="page-dialog"
       title="图片预览"
       top="10vh"
       width="50%"
@@ -10,7 +11,7 @@
       append-to-body
       @open="visibleChange"
     >
-      <div class="image-preview-list">
+      <div class="image-preview-list part-box part-box-pad mb-0">
         <div
           v-for="(imgUrl, index) in imageList"
           :key="imgUrl"

+ 2 - 2
src/modules/base/components/ModifyOrganization.vue

@@ -26,7 +26,7 @@
           clearable
         ></el-input>
       </el-form-item>
-      <el-form-item v-if="orgTypes.length" prop="type" label="机构类型:">
+      <!-- <el-form-item v-if="orgTypes.length" prop="type" label="机构类型:">
         <el-select
           v-model="modalForm.type"
           style="width: 100%;"
@@ -40,7 +40,7 @@
             :label="item.name"
           ></el-option>
         </el-select>
-      </el-form-item>
+      </el-form-item> -->
       <!-- <el-form-item label="启用/禁用:">
           <el-switch
             v-model="modalForm.enable"

+ 3 - 3
src/modules/base/views/OrganizationManage.vue

@@ -27,7 +27,7 @@
       <div class="org-tree-head">
         <div>机构名称</div>
         <div>操作</div>
-        <div>机构类型</div>
+        <!-- <div>机构类型</div> -->
       </div>
       <el-tree
         :data="orgs"
@@ -39,9 +39,9 @@
         <span class="custom-tree-node" slot-scope="{ node, data }">
           <span>{{ node.label }}</span>
           <div class="org-edit">
-            <div class="org-type">
+            <!-- <div class="org-type">
               {{ data.type | orgTypeFilter }}
-            </div>
+            </div> -->
             <div class="org-actions" v-if="data.type === 'SCHOOL'">
               <el-button
                 v-if="checkPrivilege('link', 'Add')"

+ 1 - 1
src/modules/base/views/SystemSetting.vue

@@ -5,7 +5,7 @@
         ref="modalFormComp"
         :model="modalForm"
         :rules="rules"
-        label-width="150px"
+        label-width="160px"
       >
         <el-form-item prop="openOcr" label="是否开启OCR识别:">
           <el-radio-group v-model="modalForm.openOcr">

+ 57 - 10
src/modules/record/components/LibraryDialog.vue

@@ -67,11 +67,13 @@
           <div v-if="curPagePapers.length" class="data-check-content-page">
             <el-button
               :type="curPagePaperIndex === 0 ? 'primary' : 'default'"
+              :disabled="isSwitchFb"
               @click="switchCurPage(0)"
               >正面</el-button
             >
             <el-button
               :type="curPagePaperIndex === 1 ? 'primary' : 'default'"
+              :disabled="isSwitchFb"
               @click="switchCurPage(1)"
               >反面</el-button
             >
@@ -99,6 +101,35 @@
       :page-data="curPage"
       @confirm="toBind"
     ></relate-student-dialog>
+    <!-- ocr-result -->
+    <el-dialog
+      class="page-dialog"
+      :visible.sync="ocrResultDialogIsShow"
+      title="OCR识别结果"
+      top="10vh"
+      width="500px"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      append-to-body
+    >
+      <div class="part-box part-box-pad mb-0">
+        <el-table :data="ocrResult">
+          <el-table-column prop="result" label="结果"></el-table-column>
+          <el-table-column class-name="action-column" label="操作" width="80">
+            <template slot-scope="scope">
+              <el-button
+                class="btn-primary"
+                type="text"
+                @click="selectOcrResule(scope.row)"
+              >
+                <span class="cont-link">选择</span>
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div slot="footer"></div>
+    </el-dialog>
   </div>
 </template>
 
@@ -171,11 +202,13 @@ export default {
       curPagePaperIndex: 0,
       curPagePaper: { url: "" },
       lastPaperScanTaskId: "",
+      isSwitchFb: false,
       // ocr
       isSetOcrSet: false,
       openOcr: false,
       ocrArea: { x: null, y: null, width: null, height: null },
-      ocrResult: []
+      ocrResult: [],
+      ocrResultDialogIsShow: false
     };
   },
   computed: {
@@ -242,11 +275,17 @@ export default {
     toSelectTaskStd() {
       this.$refs.RelateStudentDialog.open();
     },
-    switchCurPage(curPagePaperIndex) {
+    async switchCurPage(curPagePaperIndex) {
+      if (this.isSwitchFb) return;
       this.curPagePaperIndex = curPagePaperIndex;
       this.curPagePaper = {
         url: this.curPagePapers[this.curPagePaperIndex]
       };
+      if (this.openOcr) {
+        this.isSwitchFb = true;
+        await this.getOrcResult().catch(() => {});
+        this.isSwitchFb = false;
+      }
     },
     async getUndoPageList() {
       const data = await studentUnbindTaskListPage({ ...this.filterData });
@@ -275,12 +314,11 @@ export default {
       this.curPagePapers = this.curPage.fileUrls;
       this.switchCurPage(this.curPagePaperIndex);
 
-      if (this.openOcr) {
-        this.getOrcResult();
-      } else {
-        if (this.lastPaperScanTaskId !== this.curPage.paperScanTaskId) {
-          this.getStudentList();
-        }
+      if (
+        !this.openOcr &&
+        this.lastPaperScanTaskId !== this.curPage.paperScanTaskId
+      ) {
+        this.getStudentList();
       }
     },
 
@@ -336,14 +374,23 @@ export default {
         ...this.ocrArea
       });
       if (res && res.length) {
-        this.ocrResult = res;
         if (res.length === 1) {
           this.studentNameOrNo = res[0];
         } else {
-          // todo:选择一个结果
+          this.ocrResult = res.map(result => {
+            return {
+              result
+            };
+          });
+          this.ocrResultDialogIsShow = true;
         }
       }
       this.getStudentList();
+    },
+    selectOcrResule(cont) {
+      this.studentNameOrNo = cont.result;
+      this.getStudentList();
+      this.ocrResultDialogIsShow = false;
     }
   }
 };

+ 26 - 21
src/modules/record/components/LibraryStateDialog.vue

@@ -1,34 +1,39 @@
 <template>
   <el-dialog
-    class="library-state-dialog"
+    class="library-state-dialog page-dialog"
     :visible.sync="modalIsShow"
     title="绑定详情"
     top="10vh"
-    width="700px"
+    width="740px"
     :close-on-click-modal="false"
     :close-on-press-escape="false"
     append-to-body
     @open="visibleChange"
   >
-    <el-table ref="TableList" :data="dataList">
-      <el-table-column type="index" label="序号" width="70"></el-table-column>
-      <el-table-column prop="bindUserName" label="绑定员"></el-table-column>
-      <el-table-column
-        prop="boundCount"
-        label="已绑量"
-        width="120"
-      ></el-table-column>
-      <el-table-column
-        prop="bindingCount"
-        label="绑定中"
-        width="120"
-      ></el-table-column>
-      <el-table-column class-name="action-column" label="操作" width="100">
-        <el-button class="btn-primary" type="text" @click="toRelease(scope.row)"
-          >释放任务</el-button
-        >
-      </el-table-column>
-    </el-table>
+    <div class="part-box part-box-pad mb-0">
+      <el-table ref="TableList" :data="dataList">
+        <el-table-column type="index" label="序号" width="70"></el-table-column>
+        <el-table-column prop="bindUserName" label="绑定员"></el-table-column>
+        <el-table-column
+          prop="boundCount"
+          label="已绑量"
+          width="120"
+        ></el-table-column>
+        <el-table-column
+          prop="bindingCount"
+          label="绑定中"
+          width="120"
+        ></el-table-column>
+        <el-table-column class-name="action-column" label="操作" width="100">
+          <el-button
+            class="btn-primary"
+            type="text"
+            @click="toRelease(scope.row)"
+            >释放任务</el-button
+          >
+        </el-table-column>
+      </el-table>
+    </div>
   </el-dialog>
 </template>
 

+ 3 - 3
src/modules/record/components/ScanTaskDetailDialog.vue

@@ -17,7 +17,7 @@
           width="70"
           :index="indexMethod"
         ></el-table-column>
-        <el-table-column prop="studentNmae" label="姓名"></el-table-column>
+        <el-table-column prop="studentName" label="姓名"></el-table-column>
         <el-table-column prop="studentCode" label="学号"></el-table-column>
         <el-table-column prop="courseName" label="课程"></el-table-column>
         <el-table-column prop="teacherName" label="任课老师"></el-table-column>
@@ -27,11 +27,11 @@
           label="扫描张数"
           width="120"
         ></el-table-column>
-        <el-table-column
+        <!-- <el-table-column
           prop="checkName"
           label="数据检查员"
           width="120"
-        ></el-table-column>
+        ></el-table-column> -->
       </el-table>
       <div class="part-page">
         <el-pagination

+ 3 - 2
src/modules/record/views/ScanTaskManage.vue

@@ -116,14 +116,15 @@
               class="btn-primary"
               type="text"
               @click="toShowProgress(scope.row)"
-              >{{ scope.row.bindProgress || 0 }}%</el-button
             >
+              <span class="cont-link">{{ scope.row.bindProgress || 0 }}%</span>
+            </el-button>
           </template>
         </el-table-column>
         <el-table-column
           class-name="action-column"
           label="操作"
-          width="170"
+          width="160"
           fixed="right"
         >
           <template slot-scope="scope">