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 | 0 | \ No newline at end of file |
src/views/examinationPaper/add.vue
| ... | ... | @@ -117,8 +117,7 @@ |
| 117 | 117 | type="text" |
| 118 | 118 | placeholder="请输入答题卡类型名称" |
| 119 | 119 | v-model.trim="answerTypeName" |
| 120 | - maxlength="10" | |
| 121 | - show-word-limit | |
| 120 | + :maxlength="10" | |
| 122 | 121 | > |
| 123 | 122 | </el-input> |
| 124 | 123 | </p> |
| ... | ... | @@ -502,7 +501,7 @@ export default { |
| 502 | 501 | gradeList: [], //年级 |
| 503 | 502 | subjectList: [], //科目 |
| 504 | 503 | answerTypeList: [], //测验类型 |
| 505 | - answerTypeName: [], //测验类型名称 | |
| 504 | + answerTypeName: "", //测验类型名称 | |
| 506 | 505 | form: { |
| 507 | 506 | //答题卡详情 |
| 508 | 507 | title: "", |
| ... | ... | @@ -787,6 +786,16 @@ export default { |
| 787 | 786 | this.$message.error("请填写测验名称!"); |
| 788 | 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 | 800 | const { data, status, info } = await this.$request.addPaperType({ |
| 792 | 801 | tag: this.answerTypeName, | ... | ... |
src/views/examinationPaper/edit.vue
| ... | ... | @@ -6,9 +6,11 @@ |
| 6 | 6 | </template> |
| 7 | 7 | </back-box> |
| 8 | 8 | <div class="content"> |
| 9 | - <p class="tips"> | |
| 9 | + <p class="tips" v-if="paperModifyLog.modifiedTime"> | |
| 10 | 10 | <i class="fa fa-bell-o"></i> |
| 11 | - {{`${form.modifiedTime} ${form.realName}`}}老师修改了答案 | |
| 11 | + {{ | |
| 12 | + `${paperModifyLog.modifiedTime} ${paperModifyLog.realName}` | |
| 13 | + }}老师修改了答案 | |
| 12 | 14 | </p> |
| 13 | 15 | <div class="answer-title"> |
| 14 | 16 | <p class="name">{{ form.title }}</p> |
| ... | ... | @@ -116,10 +118,13 @@ export default { |
| 116 | 118 | examsDuration: 90, |
| 117 | 119 | gradeName: "", |
| 118 | 120 | share: 1, |
| 119 | - realName:"", | |
| 120 | - modifiedTime:"", | |
| 121 | + | |
| 121 | 122 | questionList: [], |
| 122 | 123 | }, |
| 124 | + paperModifyLog: { | |
| 125 | + realName: "", | |
| 126 | + modifiedTime: "", | |
| 127 | + }, | |
| 123 | 128 | }; |
| 124 | 129 | }, |
| 125 | 130 | computed: { |
| ... | ... | @@ -209,11 +214,13 @@ export default { |
| 209 | 214 | let valid = ""; |
| 210 | 215 | this.form.questionList.map((item, index) => { |
| 211 | 216 | if (!item.questionTitle) { |
| 212 | - valid += ((index + 1)+'、'); | |
| 217 | + valid += index + 1 + "、"; | |
| 213 | 218 | } |
| 214 | 219 | }); |
| 215 | 220 | if (valid) { |
| 216 | - this.$message.error(`大题名称不能为空,请检查第${valid.slice(0,-1)}题!`); | |
| 221 | + this.$message.error( | |
| 222 | + `大题名称不能为空,请检查第${valid.slice(0, -1)}题!` | |
| 223 | + ); | |
| 217 | 224 | return; |
| 218 | 225 | } |
| 219 | 226 | let questionList = this.form.questionList.map((item) => { |
| ... | ... | @@ -245,7 +252,10 @@ export default { |
| 245 | 252 | this.form.questionList.map((item) => { |
| 246 | 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 | 259 | } else { |
| 250 | 260 | this.$message.error(info); |
| 251 | 261 | } | ... | ... |