|
|
@@ -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 {
|
|
|
@@ -100,7 +99,6 @@ export default {
|
|
|
this.$apis.getCommitByCommitId(this.commitId)
|
|
|
.then(_res => {
|
|
|
this.commit = _res.data.res;
|
|
|
- console.log("commit", this.commit);
|
|
|
}).catch(_err => {
|
|
|
console.log(_err);
|
|
|
|
|
|
@@ -133,8 +131,13 @@ export default {
|
|
|
},
|
|
|
// 点击"停止"按钮,停止当前提交的运行;
|
|
|
async handleStopRecordButtonClick(recordId) {
|
|
|
- const res = (await this.$apis.stopRecordById(recordId)).data;
|
|
|
- this.fetchData();
|
|
|
+ const response = await this.$apis.stopRecordById(recordId);
|
|
|
+ if (response.data.res) {
|
|
|
+ this.$message.success(`记录${recordId}被用户手动停止`);
|
|
|
+ setTimeout(() => this.fetchData(), 0);
|
|
|
+ } else {
|
|
|
+ this.$message.error(response.data);
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
};
|