From 37f12b6bb28cba67aa64457df4390cf43f3f4290 Mon Sep 17 00:00:00 2001 From: virusdefender Date: Sat, 20 Aug 2016 14:26:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E9=83=A8=E5=88=86=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=92=8C=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/admin/src/App.vue | 4 + .../src/components/problem/createProblem.vue | 30 ++++---- frontend/admin/src/components/problem/spj.vue | 9 +++ .../admin/src/components/utils/codeMirror.vue | 67 ++++++++++++++++- frontend/admin/src/components/utils/help.vue | 5 +- .../admin/src/components/utils/helpLink.vue | 14 ++++ .../{problem => utils}/problemSample.vue | 19 +++-- .../admin/src/components/utils/tagInput.vue | 12 +-- .../{problem => utils}/testCaseMgnt.vue | 74 ++++++++++++------- frontend/admin/src/locales.js | 6 +- 10 files changed, 184 insertions(+), 56 deletions(-) create mode 100644 frontend/admin/src/components/problem/spj.vue create mode 100644 frontend/admin/src/components/utils/helpLink.vue rename frontend/admin/src/components/{problem => utils}/problemSample.vue (86%) rename frontend/admin/src/components/{problem => utils}/testCaseMgnt.vue (52%) diff --git a/frontend/admin/src/App.vue b/frontend/admin/src/App.vue index f21c58b..5325594 100644 --- a/frontend/admin/src/App.vue +++ b/frontend/admin/src/App.vue @@ -24,6 +24,10 @@ @import "../../static/css/bootstrap.css"; @import "../../static/css/todc-bootstrap.css"; + label { + font-size: 16px; + } + \ No newline at end of file diff --git a/frontend/admin/src/components/problem/spj.vue b/frontend/admin/src/components/problem/spj.vue new file mode 100644 index 0000000..8504d1f --- /dev/null +++ b/frontend/admin/src/components/problem/spj.vue @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/frontend/admin/src/components/utils/codeMirror.vue b/frontend/admin/src/components/utils/codeMirror.vue index 8fb6e24..109a3dc 100644 --- a/frontend/admin/src/components/utils/codeMirror.vue +++ b/frontend/admin/src/components/utils/codeMirror.vue @@ -1,27 +1,82 @@ @@ -42,4 +97,8 @@ position: relative; outline: none; } + + #language-radio { + margin: 5px; + } \ No newline at end of file diff --git a/frontend/admin/src/components/utils/help.vue b/frontend/admin/src/components/utils/help.vue index 8dea8c1..efa0520 100644 --- a/frontend/admin/src/components/utils/help.vue +++ b/frontend/admin/src/components/utils/help.vue @@ -12,7 +12,10 @@ export default({ props: { - name: "" + name: { + type: String, + required: true + } }, methods: { translate() { diff --git a/frontend/admin/src/components/utils/helpLink.vue b/frontend/admin/src/components/utils/helpLink.vue new file mode 100644 index 0000000..c31f42e --- /dev/null +++ b/frontend/admin/src/components/utils/helpLink.vue @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/frontend/admin/src/components/problem/problemSample.vue b/frontend/admin/src/components/utils/problemSample.vue similarity index 86% rename from frontend/admin/src/components/problem/problemSample.vue rename to frontend/admin/src/components/utils/problemSample.vue index b445cea..600f842 100644 --- a/frontend/admin/src/components/problem/problemSample.vue +++ b/frontend/admin/src/components/utils/problemSample.vue @@ -18,13 +18,13 @@
- +

{{ $t("problem.sample") }}{{ $t("adminUtils.input") }}

- +

{{ $t("problem.sample") }}{{ $t("adminUtils.output") }}

@@ -36,9 +36,10 @@ - \ No newline at end of file diff --git a/frontend/admin/src/components/utils/tagInput.vue b/frontend/admin/src/components/utils/tagInput.vue index 8fed324..da7e646 100644 --- a/frontend/admin/src/components/utils/tagInput.vue +++ b/frontend/admin/src/components/utils/tagInput.vue @@ -19,12 +19,14 @@ props: { tagList: { type: Array, + required: false, default: ()=>{ return [] } }, tagAutoCompleteList: { type: Array, + required: false, default: ()=>{ return [] } @@ -32,20 +34,20 @@ }, data () { return { - text: '', + text: "", } }, methods: { addTag (text) { - if (text.trim() != '') { + if (text.trim() != "" && this.tagList.indexOf(text.trim()) == -1) { var count = this.tagList.length; this.tagList.$set(count, text); - this.text = '' } + this.text = "" }, delTag (index, way) { if (way) { - if (index >= 0 && this.text == '') { + if (index >= 0 && this.text == "") { this.tagList.splice(index, 1) } } else { @@ -110,4 +112,4 @@ .tags-transition { transition: all .3s ease; } - \ No newline at end of file + diff --git a/frontend/admin/src/components/problem/testCaseMgnt.vue b/frontend/admin/src/components/utils/testCaseMgnt.vue similarity index 52% rename from frontend/admin/src/components/problem/testCaseMgnt.vue rename to frontend/admin/src/components/utils/testCaseMgnt.vue index dcaf74b..18fa4f3 100644 --- a/frontend/admin/src/components/problem/testCaseMgnt.vue +++ b/frontend/admin/src/components/utils/testCaseMgnt.vue @@ -2,21 +2,29 @@
-
- {{ $t("problem.OIMode") }} -
- -
-
- {{ uploadProgress }} % + +
+
+

{{ $t("problem.mode") }}

+
+ {{ $t("problem.ACMMode") }} + {{ $t("problem.OIMode") }} +
+
+
+ +
+

{{ $t("problem.uploadProgress") }}

+
+
+ {{ uploadProgress }} % +
@@ -31,7 +39,8 @@ {{ $index + 1 }} {{ testCase.input_name }} {{ testCase.output_name }} - + +
@@ -47,18 +56,34 @@