更新前端
This commit is contained in:
parent
f9dfb54a8b
commit
1bcf272433
|
@ -8,8 +8,8 @@
|
|||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="api" />
|
||||
<module name="JudgeServer" />
|
||||
<module name="DataBackup" />
|
||||
<module name="JudgeServer" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
|
|
|
@ -255,7 +255,7 @@ public class ProblemServiceImpl extends ServiceImpl<ProblemMapper, Problem> impl
|
|||
}
|
||||
}
|
||||
} else {
|
||||
newProblemCaseList.add(problemCase);
|
||||
newProblemCaseList.add(problemCase.setPid(pid));
|
||||
}
|
||||
if (problemCase.getScore() != null) {
|
||||
sumScore += problemCase.getScore();
|
||||
|
|
|
@ -27,11 +27,11 @@ export default {
|
|||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isOpen: false,
|
||||
};
|
||||
isOpen: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -73,7 +73,7 @@ footer {
|
|||
transition: 0.2s;
|
||||
}
|
||||
footer:hover {
|
||||
background-color: #f9fafc;
|
||||
background-color: #ebeef5;
|
||||
}
|
||||
.rotate {
|
||||
transform: rotate(180deg);
|
||||
|
|
|
@ -124,9 +124,6 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style>
|
||||
.auto-textarea-wrapper .auto-textarea-input {
|
||||
height: 450px !important;
|
||||
}
|
||||
.markdown-body pre {
|
||||
display: block;
|
||||
border-radius: 3px !important;
|
||||
|
@ -138,6 +135,9 @@ export default {
|
|||
background: #f8f8f9 !important;
|
||||
white-space: pre !important;
|
||||
}
|
||||
.auto-textarea-wrapper .auto-textarea-block {
|
||||
white-space: pre-wrap !important;
|
||||
}
|
||||
.markdown-body pre code {
|
||||
line-height: 26px !important;
|
||||
}
|
||||
|
|
|
@ -216,7 +216,7 @@
|
|||
v-for="(example, index) in problem.examples"
|
||||
:key="'example' + index"
|
||||
>
|
||||
<Accordion :title="'Example' + (index + 1)">
|
||||
<Accordion :title="'Example' + (index + 1)" :isOpen="index == 0">
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
|
@ -420,7 +420,7 @@
|
|||
v-for="(sample, index) in problemSamples"
|
||||
:key="'sample' + index"
|
||||
>
|
||||
<Accordion :title="'Sample' + (index + 1)">
|
||||
<Accordion :title="'Sample' + (index + 1)" :isOpen="index == 0">
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
|
@ -795,6 +795,7 @@ export default {
|
|||
this.problemTags = res.data.data;
|
||||
});
|
||||
} else {
|
||||
this.addExample();
|
||||
this.title = 'Create Problem';
|
||||
for (let item of this.allLanguage) {
|
||||
this.problemLanguages.push(item.name);
|
||||
|
@ -926,10 +927,8 @@ export default {
|
|||
}
|
||||
myMessage.success('上传测试数据包成功');
|
||||
let fileList = response.data.fileList;
|
||||
let averSorce = null;
|
||||
if (this.problem.ioScore) {
|
||||
averSorce = (this.problem.ioScore / fileList.length).toFixed(0);
|
||||
}
|
||||
let averSorce = (100 / fileList.length).toFixed(0);
|
||||
|
||||
for (let file of fileList) {
|
||||
if (averSorce) {
|
||||
file.score = averSorce;
|
||||
|
@ -937,6 +936,7 @@ export default {
|
|||
if (!file.output && this.problem.spj) {
|
||||
file.output = '-';
|
||||
}
|
||||
file.pid = this.problem.id;
|
||||
}
|
||||
this.problem.testCaseScore = fileList;
|
||||
this.testCaseUploaded = true;
|
||||
|
|
|
@ -328,6 +328,7 @@ export default {
|
|||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/deep/ .el-dialog__body {
|
||||
padding: 0px 20px;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="flex-container">
|
||||
<div>
|
||||
<div id="problem-main">
|
||||
<!--problem main-->
|
||||
<el-row>
|
||||
|
@ -153,7 +153,7 @@
|
|||
<p class="title">Hint</p>
|
||||
<el-card dis-hover>
|
||||
<div
|
||||
class="hint-content"
|
||||
class="hint-content markdown-body"
|
||||
v-html="problemData.problem.hint"
|
||||
v-katex
|
||||
v-highlight
|
||||
|
@ -365,7 +365,7 @@ import {
|
|||
import { pie, largePie } from './chartData';
|
||||
import api from '@/common/api';
|
||||
import myMessage from '@/common/message';
|
||||
|
||||
import { addCodeBtn } from '@/common/codeblock';
|
||||
// 只显示这些状态的图形占用
|
||||
const filtedStatus = ['wa', 'ce', 'ac', 'tle', 'mle', 're', 'pe'];
|
||||
|
||||
|
@ -509,6 +509,9 @@ export default {
|
|||
if (codeTemplate && codeTemplate[this.language]) {
|
||||
this.code = codeTemplate[this.language];
|
||||
}
|
||||
this.$nextTick((_) => {
|
||||
addCodeBtn();
|
||||
});
|
||||
},
|
||||
() => {}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue