Commit 4ad1ef0783291e39097819927e079436c0f258d1
1 parent
f26ecfa4
类型添加验证
Showing
3 changed files
with
29 additions
and
16 deletions
E/system-commandline-sentinel-files/dotnet-suggest-registration-git-credential-manager-core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null deleted
| 1 | -Exception during registration: | ||
| 2 | -System.ComponentModel.Win32Exception (0x80004005): 系统找不到指定的文件。 | ||
| 3 | - 在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) | ||
| 4 | - 在 System.Diagnostics.Process.Start() | ||
| 5 | - 在 System.CommandLine.Invocation.Process.StartProcess(String command, String args, String workingDir, Action`1 stdOut, Action`1 stdErr, ValueTuple`2[] environmentVariables) | ||
| 6 | - 在 System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__10_1>d.MoveNext() | ||
| 7 | \ No newline at end of file | 0 | \ No newline at end of file |
src/views/examinationPaper/add.vue
| @@ -117,8 +117,7 @@ | @@ -117,8 +117,7 @@ | ||
| 117 | type="text" | 117 | type="text" |
| 118 | placeholder="请输入答题卡类型名称" | 118 | placeholder="请输入答题卡类型名称" |
| 119 | v-model.trim="answerTypeName" | 119 | v-model.trim="answerTypeName" |
| 120 | - maxlength="10" | ||
| 121 | - show-word-limit | 120 | + :maxlength="10" |
| 122 | > | 121 | > |
| 123 | </el-input> | 122 | </el-input> |
| 124 | </p> | 123 | </p> |
| @@ -502,7 +501,7 @@ export default { | @@ -502,7 +501,7 @@ export default { | ||
| 502 | gradeList: [], //年级 | 501 | gradeList: [], //年级 |
| 503 | subjectList: [], //科目 | 502 | subjectList: [], //科目 |
| 504 | answerTypeList: [], //测验类型 | 503 | answerTypeList: [], //测验类型 |
| 505 | - answerTypeName: [], //测验类型名称 | 504 | + answerTypeName: "", //测验类型名称 |
| 506 | form: { | 505 | form: { |
| 507 | //答题卡详情 | 506 | //答题卡详情 |
| 508 | title: "", | 507 | title: "", |
| @@ -787,6 +786,16 @@ export default { | @@ -787,6 +786,16 @@ export default { | ||
| 787 | this.$message.error("请填写测验名称!"); | 786 | this.$message.error("请填写测验名称!"); |
| 788 | return; | 787 | return; |
| 789 | } | 788 | } |
| 789 | + let isRepeat = false | ||
| 790 | + this.answerTypeList.map(item=>{ | ||
| 791 | + if(item.typeName == this.answerTypeName){ | ||
| 792 | + isRepeat = true | ||
| 793 | + } | ||
| 794 | + }) | ||
| 795 | + if(isRepeat){ | ||
| 796 | + this.$message.error("类型已存在请重新填写!"); | ||
| 797 | + return; | ||
| 798 | + } | ||
| 790 | //添加测验类型 | 799 | //添加测验类型 |
| 791 | const { data, status, info } = await this.$request.addPaperType({ | 800 | const { data, status, info } = await this.$request.addPaperType({ |
| 792 | tag: this.answerTypeName, | 801 | tag: this.answerTypeName, |
src/views/examinationPaper/edit.vue
| @@ -6,9 +6,11 @@ | @@ -6,9 +6,11 @@ | ||
| 6 | </template> | 6 | </template> |
| 7 | </back-box> | 7 | </back-box> |
| 8 | <div class="content"> | 8 | <div class="content"> |
| 9 | - <p class="tips"> | 9 | + <p class="tips" v-if="paperModifyLog.modifiedTime"> |
| 10 | <i class="fa fa-bell-o"></i> | 10 | <i class="fa fa-bell-o"></i> |
| 11 | - {{`${form.modifiedTime} ${form.realName}`}}老师修改了答案 | 11 | + {{ |
| 12 | + `${paperModifyLog.modifiedTime} ${paperModifyLog.realName}` | ||
| 13 | + }}老师修改了答案 | ||
| 12 | </p> | 14 | </p> |
| 13 | <div class="answer-title"> | 15 | <div class="answer-title"> |
| 14 | <p class="name">{{ form.title }}</p> | 16 | <p class="name">{{ form.title }}</p> |
| @@ -116,10 +118,13 @@ export default { | @@ -116,10 +118,13 @@ export default { | ||
| 116 | examsDuration: 90, | 118 | examsDuration: 90, |
| 117 | gradeName: "", | 119 | gradeName: "", |
| 118 | share: 1, | 120 | share: 1, |
| 119 | - realName:"", | ||
| 120 | - modifiedTime:"", | 121 | + |
| 121 | questionList: [], | 122 | questionList: [], |
| 122 | }, | 123 | }, |
| 124 | + paperModifyLog: { | ||
| 125 | + realName: "", | ||
| 126 | + modifiedTime: "", | ||
| 127 | + }, | ||
| 123 | }; | 128 | }; |
| 124 | }, | 129 | }, |
| 125 | computed: { | 130 | computed: { |
| @@ -209,11 +214,13 @@ export default { | @@ -209,11 +214,13 @@ export default { | ||
| 209 | let valid = ""; | 214 | let valid = ""; |
| 210 | this.form.questionList.map((item, index) => { | 215 | this.form.questionList.map((item, index) => { |
| 211 | if (!item.questionTitle) { | 216 | if (!item.questionTitle) { |
| 212 | - valid += ((index + 1)+'、'); | 217 | + valid += index + 1 + "、"; |
| 213 | } | 218 | } |
| 214 | }); | 219 | }); |
| 215 | if (valid) { | 220 | if (valid) { |
| 216 | - this.$message.error(`大题名称不能为空,请检查第${valid.slice(0,-1)}题!`); | 221 | + this.$message.error( |
| 222 | + `大题名称不能为空,请检查第${valid.slice(0, -1)}题!` | ||
| 223 | + ); | ||
| 217 | return; | 224 | return; |
| 218 | } | 225 | } |
| 219 | let questionList = this.form.questionList.map((item) => { | 226 | let questionList = this.form.questionList.map((item) => { |
| @@ -245,7 +252,10 @@ export default { | @@ -245,7 +252,10 @@ export default { | ||
| 245 | this.form.questionList.map((item) => { | 252 | this.form.questionList.map((item) => { |
| 246 | item.score = ""; | 253 | item.score = ""; |
| 247 | }); | 254 | }); |
| 248 | - this.paperModifyLog ={...this.paperModifyLog,...this.form.paperModifyLog} | 255 | + this.paperModifyLog = { |
| 256 | + ...this.paperModifyLog, | ||
| 257 | + ...this.form.paperModifyLog, | ||
| 258 | + }; | ||
| 249 | } else { | 259 | } else { |
| 250 | this.$message.error(info); | 260 | this.$message.error(info); |
| 251 | } | 261 | } |