xiatian %!s(int64=5) %!d(string=hai) anos
pai
achega
a4aadb36e7
Modificáronse 1 ficheiros con 26 adicións e 2 borrados
  1. 26 2
      src/modules/marking/views/MarkWork.vue

+ 26 - 2
src/modules/marking/views/MarkWork.vue

@@ -105,6 +105,15 @@
                       更多 <i class="el-icon-arrow-down el-icon--right"></i>
                     </el-button>
                     <el-dropdown-menu slot="dropdown">
+                      <el-dropdown-item v-if="scope.row.status == 1">
+                        <el-button
+                          @click="appendPaper(scope.row)"
+                          type="primary"
+                          size="mini"
+                          plain
+                          >追加试卷</el-button
+                        >
+                      </el-dropdown-item>
                       <el-dropdown-item v-if="scope.row.status == 2">
                         <el-button
                           @click="recreate(scope.row)"
@@ -279,7 +288,8 @@ export default {
       statusList: [
         { code: 0, name: "创建中" },
         { code: 1, name: "创建成功" },
-        { code: 2, name: "创建失败" }
+        { code: 2, name: "创建失败" },
+        { code: 3, name: "追加中" }
       ],
       examSelect: [],
       tableData: [],
@@ -334,11 +344,25 @@ export default {
         return "未结束";
       }
     },
+
+    appendPaper(row) {
+      this.loading = true;
+      this.$http
+        .put(DATA_PROCESS_API + "/markWorks/append-paper/" + row.id)
+        .then(() => {
+          this.$notify({
+            message: "操作成功",
+            type: "success"
+          });
+          this.initMarkWorkData();
+          this.loading = false;
+        });
+    },
     recreate(row) {
       this.loading = true;
       this.$http.put(DATA_PROCESS_API + "/markWorks/" + row.id).then(() => {
         this.$notify({
-          message: "评卷工作保存成功",
+          message: "操作成功",
           type: "success"
         });
         this.initMarkWorkData();