Browse Source

怎么下载作答

chenken 6 years ago
parent
commit
4a92f1a854
2 changed files with 20 additions and 1 deletions
  1. 1 1
      src/modules/oe/style/common.css
  2. 19 0
      src/modules/oe/views/examScheduling.vue

+ 1 - 1
src/modules/oe/style/common.css

@@ -22,7 +22,7 @@
 }
 .el-main-padding {
   padding-top: 2px;
-  padding-left: 5px;
+  padding-left: 0;
 }
 .operateRow {
   margin-top: 2px;

+ 19 - 0
src/modules/oe/views/examScheduling.vue

@@ -216,6 +216,22 @@
                     </el-button>
                   </el-col>
                 </el-row>
+                <el-row class="operateRow">
+                  <el-col :span="24">
+                    <el-button
+                      plain
+                      type="primary"
+                      size="mini"
+                      icon="el-icon-download"
+                      @click="downloadAnswer(scope.row.offlineFileUrl)"
+                      v-if="
+                        scope.row.examType == 'OFFLINE' &&
+                          scope.row.offlineFileUrl
+                      "
+                      >下载作答
+                    </el-button>
+                  </el-col>
+                </el-row>
               </template>
             </el-table-column>
           </el-table>
@@ -594,6 +610,9 @@ export default {
     cleanOfflineFile() {
       this.$refs.offlineFileInput.value = "";
       this.offlineAnswerFile = "";
+    },
+    downloadAnswer(offlineFileUrl) {
+      window.open(offlineFileUrl);
     }
   },
   created() {}