|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div id="problem-detail-body">
|
|
|
- <el-card>
|
|
|
+ <el-card style="background: none; box-shadow:none;border: none">
|
|
|
<template #header>
|
|
|
<page-header>
|
|
|
<template #actions>
|
|
|
@@ -28,81 +28,89 @@
|
|
|
删除题目
|
|
|
</el-button>
|
|
|
</template>
|
|
|
- <el-button @click="getBack">
|
|
|
- <el-icon><Back /></el-icon>
|
|
|
+ <el-button @click="getBack" style="border: none;background: none;">
|
|
|
+ <el-icon :size="22"><Back /></el-icon>
|
|
|
</el-button>
|
|
|
- {{ problem.name }}
|
|
|
+ <span style="font-size: 36px;font-family: 'Inter',sans-serif;margin-left: 15px">{{ problem.name }}</span>
|
|
|
</page-header>
|
|
|
</template>
|
|
|
|
|
|
- <paper shadow="sm" style="margin-bottom: 20px">
|
|
|
- <el-descriptions>
|
|
|
- <el-descriptions-item
|
|
|
- label="题目名称:"
|
|
|
- label-class-name="label-bold"
|
|
|
- >
|
|
|
- {{ problem.name }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item
|
|
|
- label="题目类型:"
|
|
|
- label-class-name="label-bold"
|
|
|
- >
|
|
|
- {{ typeTagContent }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item
|
|
|
- label="上传者:"
|
|
|
- label-class-name="label-bold"
|
|
|
- >
|
|
|
- {{ problem.creator ? problem.creator.username : "系统" }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item
|
|
|
- label="上传时间:"
|
|
|
- label-class-name="label-bold"
|
|
|
- >
|
|
|
- {{ formatTimestamp(problem.createdAt) }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item
|
|
|
- :span="3"
|
|
|
- label="题目描述:"
|
|
|
- label-class-name="label-bold"
|
|
|
- >
|
|
|
- {{ problem.description }}
|
|
|
- </el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- </paper>
|
|
|
+ <el-descriptions class="problem-description">
|
|
|
+ <el-descriptions-item
|
|
|
+ label="题目名称:"
|
|
|
+ label-class-name="label-bold"
|
|
|
+ >
|
|
|
+ {{ problem.name }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item
|
|
|
+ label="题目类型:"
|
|
|
+ label-class-name="label-bold"
|
|
|
+ >
|
|
|
+ {{ typeTagContent }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item
|
|
|
+ label="上传者:"
|
|
|
+ label-class-name="label-bold"
|
|
|
+ >
|
|
|
+ {{ problem.creator ? problem.creator.username : "系统" }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item
|
|
|
+ label="上传时间:"
|
|
|
+ label-class-name="label-bold"
|
|
|
+ >
|
|
|
+ {{ formatTimestamp(problem.createdAt) }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item
|
|
|
+ :span="3"
|
|
|
+ label="题目描述:"
|
|
|
+ label-class-name="label-bold"
|
|
|
+ >
|
|
|
+ {{ problem.description }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+
|
|
|
+ <el-card
|
|
|
+ class="son-card"
|
|
|
+ style="background: none; box-shadow:none;border: none;margin-top: 15px;margin-bottom: 30px">
|
|
|
+ <template #header>
|
|
|
+ <span style="color:black;font-size: 24px;font-family: 'Inter',sans-serif">文件列表</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <div class="fill-card top-divide">
|
|
|
+ <el-table :data="files">
|
|
|
+ <el-table-column label="文件名称">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.path }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="类型" width="200">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.type }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="220">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="text"
|
|
|
+ @click="onGetDetail(scope.row.path)"
|
|
|
+ >
|
|
|
+ 查看详情
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="text"
|
|
|
+ @click="onDialogUpdate(scope.row.path)"
|
|
|
+ >
|
|
|
+ 更新文件
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </el-card>
|
|
|
|
|
|
- <div class="fill-card top-divide">
|
|
|
- <el-table :data="files">
|
|
|
- <el-table-column label="文件列表">
|
|
|
- <template #default="scope">
|
|
|
- <span>{{ scope.row.path }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="类型" width="120">
|
|
|
- <template #default="scope">
|
|
|
- <span>{{ scope.row.type }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" width="220">
|
|
|
- <template #default="scope">
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="text"
|
|
|
- @click="onGetDetail(scope.row.path)"
|
|
|
- >
|
|
|
- 查看详情
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="text"
|
|
|
- @click="onDialogUpdate(scope.row.path)"
|
|
|
- >
|
|
|
- 更新文件
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
</el-card>
|
|
|
|
|
|
<el-dialog v-model="dialog.delete" title="确认删除题目">
|
|
|
@@ -168,7 +176,6 @@
|
|
|
|
|
|
<script>
|
|
|
import PageHeader from "./components/PageHeader.vue";
|
|
|
-import Paper from "./components/Paper.vue";
|
|
|
import {mapGetters} from "vuex";
|
|
|
import {errorMessage, formatTimestamp, problemTypeToTagContent} from "@/utils/coder-utils";
|
|
|
import {ElMessage} from "element-plus";
|
|
|
@@ -177,7 +184,6 @@ export default {
|
|
|
name: "ProblemDetail",
|
|
|
layout: "dashboard",
|
|
|
components: {
|
|
|
- Paper,
|
|
|
PageHeader,
|
|
|
},
|
|
|
data() {
|
|
|
@@ -364,7 +370,7 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss">
|
|
|
+<style lang="scss" scoped>
|
|
|
#problem-detail-body {
|
|
|
margin: 40px 10vw 80px 10vw;
|
|
|
min-height: calc(100vh - 100px);
|
|
|
@@ -373,4 +379,25 @@ export default {
|
|
|
font-weight: bold;
|
|
|
font-size: 15px;
|
|
|
}
|
|
|
+
|
|
|
+::v-deep .el-card__header {
|
|
|
+ border-bottom: 1px solid black;
|
|
|
+ padding-top: 0;
|
|
|
+ padding-bottom: 0;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .son-card .el-card__header {
|
|
|
+ border-bottom: none;
|
|
|
+ padding-bottom: 0;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .label-bold {
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .problem-description .el-descriptions__body{
|
|
|
+ font-size: 16px;
|
|
|
+ background-color: #F8F9FB; //样式穿透,覆盖原本的样式
|
|
|
+}
|
|
|
</style>
|