Browse Source

fix: 取消注释停止按钮

mjh 3 years ago
parent
commit
6afe800290

+ 6 - 7
src/views/CoderPage/ResultPage/CommitPage/components/CommitBoard.vue

@@ -47,11 +47,11 @@
           >详情
           </el-button>
           <el-divider direction="vertical"/>
-<!--          <el-button type="text" class="stop-record-button" -->
-<!--                     :disabled="scope.row.status!==`RUNNING`"-->
-<!--                     @click="handleStopRecordButtonClick(scope.row.id)">-->
-<!--            停止-->
-<!--          </el-button>-->
+          <el-button type="text" class="stop-record-button"
+                     :disabled="scope.row.status!==`RUNNING`"
+                     @click="handleStopRecordButtonClick(scope.row.id)">
+            停止
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -65,7 +65,6 @@
 
 <script>
 import {formatTimestamp, buildStatusToTagType, buildStatusToTagContent} from "@/utils/coder-utils";
-import PageHeader from "@/views/ProblemPage/components/PageHeader.vue";
 import RecordDetail from "@/views/CoderPage/ResultPage/CommitPage/RecordPage/RecordDetail";
 
 export default {
@@ -133,7 +132,7 @@ export default {
     },
     // 点击"停止"按钮,停止当前提交的运行;
     async handleStopRecordButtonClick(recordId) {
-      const res = (await this.$apis.stopRecordById(recordId)).data;
+      await this.$apis.stopRecordById(recordId);
       this.fetchData();
     },
   }