chenken 6 년 전
부모
커밋
72b9bb7b9a

+ 0 - 1
src/modules/oe/component/commonExport.vue

@@ -3,7 +3,6 @@
     <el-button
       v-show="!exportLoading"
       @click="exportData"
-      type="primary"
       size="small"
       icon="el-icon-download"
       plain

+ 11 - 11
src/modules/oe/routes/routes.js

@@ -17,57 +17,57 @@ export default [
     component: examPaperDetail //考卷详情
   },
   {
-    path: "/questions", //首页
+    path: "/oe", //首页
     meta: { auth: false },
     component: Home,
     children: [
       {
-        path: "/oe/absent",
+        path: "absent",
         name: "absent",
         component: absent //缺考登记
       },
       {
-        path: "/oe/awaitingAudit",
+        path: "awaitingAudit",
         name: "awaitingAudit",
         component: awaitingAudit //监考待审
       },
       {
-        path: "/oe/alreadyAudited",
+        path: "alreadyAudited",
         name: "alreadyAudited",
         component: alreadyAudited //监考已审
       },
       {
-        path: "/oe/reexamine",
+        path: "reexamine",
         name: "reexamine",
         component: reexamine //重考列表
       },
       {
-        path: "/oe/illegalityNameList",
+        path: "illegalityNameList",
         name: "illegalityNameList",
         component: illegalityNameList //违纪名单
       },
       {
-        path: "/oe/scoreStatistics",
+        path: "scoreStatistics",
         name: "scoreStatistics",
         component: scoreStatistics //成绩统计
       },
       {
-        path: "/oe/examDetail",
+        path: "examDetail",
         name: "examDetail",
         component: examDetail //考试详情
       },
       {
-        path: "/oe/examScheduling",
+        path: "examScheduling",
         name: "examScheduling",
         component: examScheduling //考试进度详情
       },
       {
-        path: "/oe/captureDetail/:examRecordDataId",
+        path: "captureDetail/:examRecordDataId",
         name: "captureDetail",
         component: captureDetail //抓拍详情
       },
       {
-        path: "/oe/examSummary",
+        path: "examSummary",
         name: "examSummary",
         component: examSummary //考试概览
       }

+ 1 - 2
src/modules/oe/views/awaitingAudit.vue

@@ -113,7 +113,7 @@
               class="button_left"
               v-show="currentPagePrivileges.PANEING_BATCHAUDIT"
             >
-              <el-button type="primary" size="small">
+              <el-button size="small">
                 批量审核 <i class="el-icon-arrow-down el-icon--right"></i>
               </el-button>
               <el-dropdown-menu slot="dropdown">
@@ -424,7 +424,6 @@ export default {
      * 当前页改变时触发
      */
     handleCurrentChange(val) {
-      debugger;
       this.form.pageNo = val;
       this.search();
     },

+ 2 - 3
src/modules/oe/views/examPaperDetail.vue

@@ -164,15 +164,14 @@ export default {
         groupCode: this.examRecordData.examRecord.paperType,
         questionId: questionId
       };
-      var _this = this;
       this.$http
         .post("/api/ecs_ques/default_question/question", params)
-        .then(function success(response) {
+        .then(response => {
           var question = response.data.masterVersion;
           var questionUnitList = question.questionUnitList;
           var num = questionUnitList.length;
           for (var i = 0; i < questionUnitList.length; i++) {
-            _this.reOrderOptions(questionUnitList[i], order - num + 1);
+            this.reOrderOptions(questionUnitList[i], order - num + 1);
             num--;
           }
           var questionList = questionWrapper.questionList;

+ 11 - 6
src/modules/oe/views/examScheduling.vue

@@ -96,6 +96,8 @@
             </el-table-column>
             <el-table-column sortable label="采集人" prop="infoCollector">
             </el-table-column>
+            <el-table-column sortable label="采集人1" prop="canUpload">
+            </el-table-column>
             <el-table-column fixed="right" sortable label="完成状态">
               <template slot-scope="scope">
                 <span
@@ -127,7 +129,7 @@
                       type="primary"
                       icon="el-icon-view"
                       @click="previewPaper(scope.row.examStudentId)"
-                      v-if="form.examType == 'OFFLINE'"
+                      v-if="scope.row.examType == 'OFFLINE'"
                       >查看考题
                     </el-button>
                   </el-col>
@@ -139,7 +141,7 @@
                       type="success"
                       icon="el-icon-download"
                       @click="exportPaper(scope.row.examStudentId)"
-                      v-if="form.examType == 'OFFLINE'"
+                      v-if="scope.row.examType == 'OFFLINE'"
                       >下载考题
                     </el-button>
                   </el-col>
@@ -151,7 +153,10 @@
                       type="warning"
                       icon="el-icon-upload2"
                       @click="openUploadAnswerDialog(scope.row.examStudentId)"
-                      v-if="form.examType == 'OFFLINE'"
+                      v-if="
+                        scope.row.examType == 'OFFLINE' &&
+                          scope.row.canUploadAttachment
+                      "
                       >上传作答
                     </el-button>
                   </el-col>
@@ -300,7 +305,8 @@ export default {
         .post("/api/ecs_oe_admin/exam/student/all/list", this.form)
         .then(response => {
           if (response.data) {
-            this.tableData = response.data.content;
+            var dataList = response.data.content;
+            this.tableData = dataList;
             this.total = response.data.totalElements;
           } else {
             this.tableData = [];
@@ -337,8 +343,7 @@ export default {
             var examRecordList = response.data;
             if (examRecordList && examRecordList.length > 0) {
               window.open(
-                "http://192.168.10.39:8868/#/preview_paper/" +
-                  examRecordList[0].basePaperId
+                "/questions/preview_paper/" + examRecordList[0].basePaperId
               );
             } else {
               this.$message({

+ 124 - 11
src/modules/oe/views/scoreStatistics.vue

@@ -29,12 +29,21 @@
             <el-button size="small" icon="el-icon-refresh" @click="resetForm">
               重置
             </el-button>
-            <commonExportVue
-              v-show="currentPagePrivileges.SCORE_STATICS_EXPORT"
-              :form="form"
-              :exportUrl="exportUrl"
-              :exportFileName="exportFileName"
-            ></commonExportVue>
+            <el-button
+              size="small"
+              icon="el-icon-refresh"
+              @click="openExportDialog"
+              v-show="!exportLoading"
+            >
+              导出
+            </el-button>
+            <el-button
+              size="small"
+              icon="el-icon-download"
+              :loading="true"
+              v-show="exportLoading"
+              >导出数据中...
+            </el-button>
           </div>
         </el-col>
       </el-row>
@@ -94,23 +103,59 @@
             >
             </el-pagination></div></el-col
       ></el-row>
+      <el-dialog title="导出方式选择" :visible.sync="dialogExportTypeVisible">
+        <el-row>
+          <el-col :span="24">
+            <el-radio v-model="exportType" label="ALL">全部导出</el-radio>
+            <el-radio v-model="exportType" label="BATCH">分批导出</el-radio>
+          </el-col>
+        </el-row>
+        <el-row class="margin-top-10" v-show="exportType == 'BATCH'">
+          <el-col :span="4">导出区间</el-col>
+          <el-col :span="9">
+            <el-input
+              size="small"
+              v-model="form.startLimit"
+              placeholder="下限"
+            ></el-input>
+          </el-col>
+          <el-col :span="2" style="text-align:center;color:#c0c4cc;">——</el-col>
+          <el-col :span="9">
+            <el-input
+              size="small"
+              v-model="form.endLimit"
+              placeholder="上限"
+            ></el-input>
+          </el-col>
+        </el-row>
+        <el-row class="margin-top-20">
+          <el-col :span="24">
+            <el-button type="primary" plain @click="exportData">确定</el-button>
+            <el-button plain @click="dialogExportTypeVisible = false">
+              取消
+            </el-button>
+          </el-col>
+        </el-row>
+      </el-dialog>
     </el-main>
   </el-container>
 </template>
 <script>
 import { mapState } from "vuex";
 import commonFormVue from "../component/commonForm.vue";
-import commonExportVue from "../component/commonExport.vue";
+//import commonExportVue from "../component/commonExport.vue";
 import { DISCIPLINE_TYPE_LIST } from "../constants/constants";
 import pagePrivilege from "../mixin/pagePrivilege.js";
 export default {
-  components: { commonFormVue, commonExportVue },
+  components: { commonFormVue },
   mixins: [pagePrivilege],
   data() {
     return {
       disciplineTypeList: DISCIPLINE_TYPE_LIST,
       total: 0,
       tableLoading: false,
+      dialogExportTypeVisible: false,
+      exportLoading: false,
       form: {
         examRecordDataId: null,
         hasStranger: null,
@@ -129,7 +174,9 @@ export default {
         isWarn: null,
         pageNo: 1,
         pageSize: 10,
-        finished: ""
+        finished: "",
+        startLimit: "",
+        endLimit: ""
       },
 
       getExamCondition: {
@@ -144,7 +191,8 @@ export default {
       exportFileName: "成绩统计",
       currentPagePrivileges: {
         SCORE_STATICS_EXPORT: false //导出
-      }
+      },
+      exportType: "ALL"
     };
   },
   computed: {
@@ -170,7 +218,9 @@ export default {
         isWarn: null,
         pageNo: 1,
         pageSize: 10,
-        finished: ""
+        finished: "",
+        startLimit: "",
+        endLimit: ""
       };
     },
     search() {
@@ -211,6 +261,66 @@ export default {
      */
     handleCurrentChange() {
       this.search();
+    },
+    openExportDialog() {
+      if (!this.form.examId) {
+        this.$notify({
+          title: "警告",
+          message: "请选择考试批次",
+          type: "warning",
+          duration: 1000
+        });
+        return false;
+      }
+      this.dialogExportTypeVisible = true;
+      this.exportType = "ALL";
+      this.form.startLimit = "";
+      this.form.endLimit = "";
+    },
+    exportData() {
+      this.$http
+        .post("/api/ecs_oe_admin/exam/record/detail/check", this.form)
+        .then(response => {
+          if (response.data > 0) {
+            this.$confirm("成绩统计存在待审数据,是否继续导出?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              this.dialogExportTypeVisible = false;
+              this._exportData();
+            });
+          } else {
+            this.dialogExportTypeVisible = false;
+            this._exportData();
+          }
+        });
+    },
+    _exportData() {
+      this.exportLoading = true;
+      this.$http
+        .get(this.exportUrl, {
+          params: {
+            query: this.form
+          },
+          responseType: "arraybuffer"
+        })
+        .then(response => {
+          if (response.data) {
+            var blob = new Blob([response.data], {
+              type:
+                "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
+            });
+            var url = URL.createObjectURL(blob);
+            var a = document.createElement("a");
+            a.href = url;
+            a.download = this.exportFileName + ".xlsx";
+            a.target = "_blank";
+            a.click();
+            URL.revokeObjectURL(url);
+          }
+          this.exportLoading = false;
+        });
     }
   },
   created() {}
@@ -223,4 +333,7 @@ export default {
 .margin-top-10 {
   margin-top: 10px;
 }
+.margin-top-20 {
+  margin-top: 20px;
+}
 </style>