update frontend

This commit is contained in:
Himit_ZH 2022-01-14 21:37:30 +08:00
parent 29f212e236
commit aa106875c7
4 changed files with 30 additions and 17 deletions

View File

@ -2,7 +2,7 @@ import Vue from 'vue'
let messageInstance = null;
const message=function(type,msg,duration=4000){
const message=function(type,msg,duration=3000){
if(messageInstance !=null){
messageInstance.close()
}

View File

@ -200,9 +200,9 @@ export const m = {
Interactive_Judge:'Interactive Judge',
Special_Judge_Code: 'Special Judge Program Code',
Interactive_Judge_Code:'Interactive Judge Program Code',
General_Judge_Mode_Tips:'1. General Judge: the contestant program reads the problem standard input file, executes the code logic to obtain the contestant\'s output, and compares the contents of the problem standard output file to obtain the problem judgment result',
Special_Judge_Mode_Tips:'2. Special Judge: the output results required by the problem may not be unique, and different results are allowed. Therefore, a special program is needed to read standard output, player output and standard input, and compare them to obtain the final judgment result',
Interactive_Judge_Mode_Tips:'3. Interactive Judge: the standard output of the interactive program is written to the standard input of the player program through the interactive channel, and the standard output of the player program is written to the standard input of the interactive program through the interactive channel. Both need to flush the output buffer',
General_Judge_Mode_Tips:'General Judge: the contestant program reads the problem standard input file, executes the code logic to obtain the contestant\'s output, and compares the contents of the problem standard output file to obtain the problem judgment result',
Special_Judge_Mode_Tips:'Special Judge: the output results required by the problem may not be unique, and different results are allowed. Therefore, a special program is needed to read standard output, player output and standard input, and compare them to obtain the final judgment result',
Interactive_Judge_Mode_Tips:'Interactive Judge: the standard output of the interactive program is written to the standard input of the player program through the interactive channel, and the standard output of the player program is written to the standard input of the interactive program through the interactive channel. Both need to flush the output buffer',
Use_Special_Judge: 'Use Special Judge',
SPJ_Language: 'SPJ Program Language',
Interactive_Language:'Interactive Program Langugae',

View File

@ -199,9 +199,9 @@ export const m = {
Interactive_Judge:'交互判题',
Special_Judge_Code:'特殊判题程序代码',
Interactive_Judge_Code:'交互判题程序代码',
General_Judge_Mode_Tips:'1. 普通判题:选手程序读取题目标准输入文件,执行代码逻辑得到选手输出,对比题目标准输出文件内容得到判题结果',
Special_Judge_Mode_Tips:'2. 特殊判题:题目要求的输出结果可能不唯一,允许不同结果存在,所以需要一个特殊程序读取标准输出、选手输出和标准输入,进行对比得出最终判题结果',
Interactive_Judge_Mode_Tips:'3. 交互判题:交互程序的标准输出通过交互通道写到选手程序标准输入,选手程序的标准输出通过交互通道写到交互程序的标准输入,两者需要刷新输出缓冲区',
General_Judge_Mode_Tips:'普通判题:选手程序读取题目标准输入文件,执行代码逻辑得到选手输出,对比题目标准输出文件内容得到判题结果',
Special_Judge_Mode_Tips:'特殊判题:题目要求的输出结果可能不唯一,允许不同结果存在,所以需要一个特殊程序读取标准输出、选手输出和标准输入,进行对比得出最终判题结果',
Interactive_Judge_Mode_Tips:'交互判题:交互程序的标准输出通过交互通道写到选手程序标准输入,选手程序的标准输出通过交互通道写到交互程序的标准输入,两者需要刷新输出缓冲区',
Interactive_Language:'交互判题程序语言',
SPJ_Language: '特殊判题程序语言',
Compile: '编译',

View File

@ -369,9 +369,9 @@
<div class="panel-title home-title">
{{ $t('m.Judge_Mode') }}
<el-popover placement="right" trigger="hover">
<p>{{ $t('m.General_Judge_Mode_Tips') }}</p>
<p>{{ $t('m.Special_Judge_Mode_Tips') }}</p>
<p>{{ $t('m.Interactive_Judge_Mode_Tips') }}</p>
<p>1. {{ $t('m.General_Judge_Mode_Tips') }}</p>
<p>2. {{ $t('m.Special_Judge_Mode_Tips') }}</p>
<p>3. {{ $t('m.Interactive_Judge_Mode_Tips') }}</p>
<i slot="reference" class="el-icon-question"></i>
</el-popover>
</div>
@ -967,18 +967,31 @@ export default {
switchMode(mode) {
let modeName = 'General_Judge';
let modeTips = 'General_Judge_Mode_Tips';
if (mode == 'spj') {
modeName = 'Special_Judge';
modeTips = 'Special_Judge_Mode_Tips';
} else if (mode == 'interactive') {
modeName = 'Interactive_Judge';
modeTips = 'Interactive_Judge_Mode_Tips';
}
this.$alert(
this.$i18n.t('m.Change_Judge_Mode'),
this.$i18n.t('m.' + modeName),
{
confirmButtonText: this.$i18n.t('m.OK'),
}
);
const h = this.$createElement;
this.$msgbox({
title: this.$i18n.t('m.' + modeName),
message: h('div', null, [
h(
'p',
{ style: 'text-align: center;font-weight:bolder;color:red' },
this.$i18n.t('m.Change_Judge_Mode')
),
h('br', null, null),
h(
'p',
{ style: 'font-weight:bolder' },
this.$i18n.t('m.' + modeTips)
),
]),
});
},
querySearch(queryString, cb) {
var ojName = 'ME';