Commit c0026d5fcc03788be0c26a689f09b15e04c95a40
1 parent
391f66b9
科目修改,学生调班
Showing
3 changed files
with
14 additions
and
11 deletions
src/assets/css/base.css
@@ -21,7 +21,7 @@ a { | @@ -21,7 +21,7 @@ a { | ||
21 | } | 21 | } |
22 | 22 | ||
23 | input[type="number"] { | 23 | input[type="number"] { |
24 | - -moz-appearance: textfield; | 24 | + appearance: textfield; |
25 | } | 25 | } |
26 | input[type="number"]::-webkit-inner-spin-button, | 26 | input[type="number"]::-webkit-inner-spin-button, |
27 | input[type="number"]::-webkit-outer-spin-button { | 27 | input[type="number"]::-webkit-outer-spin-button { |
src/views/standard/setUp/clazz.vue
@@ -233,6 +233,9 @@ export default { | @@ -233,6 +233,9 @@ export default { | ||
233 | diaSubject: function (val) { | 233 | diaSubject: function (val) { |
234 | if (!val) { | 234 | if (!val) { |
235 | this.subjectName = ""; | 235 | this.subjectName = ""; |
236 | + this.subjectList.map((item) => { | ||
237 | + item.checked = false; | ||
238 | + }); | ||
236 | } | 239 | } |
237 | }, | 240 | }, |
238 | }, | 241 | }, |
@@ -382,10 +385,11 @@ export default { | @@ -382,10 +385,11 @@ export default { | ||
382 | item.checked = false; | 385 | item.checked = false; |
383 | }, | 386 | }, |
384 | async _EditSub(item) { | 387 | async _EditSub(item) { |
385 | - if (this.subjects.includes(item.value)) { | ||
386 | - this.$message.warning("科目已存在,请重新填写~"); | ||
387 | - return; | ||
388 | - } | 388 | + // if (this.subjects.includes(item.value)) { |
389 | + // this.$message.warning("科目已存在,请重新填写~"); | ||
390 | + // return; | ||
391 | + // } | ||
392 | + let idx = this.subjectNames.findIndex((sub) => item.default == sub); | ||
389 | item.checked = false; | 393 | item.checked = false; |
390 | const { status, info } = await this.$request.updateSubject({ | 394 | const { status, info } = await this.$request.updateSubject({ |
391 | subjectName: item.value, | 395 | subjectName: item.value, |
@@ -393,11 +397,10 @@ export default { | @@ -393,11 +397,10 @@ export default { | ||
393 | }); | 397 | }); |
394 | if (status === 0) { | 398 | if (status === 0) { |
395 | this.$message.success(info); | 399 | this.$message.success(info); |
396 | - let idx = this.subjectNames.findIndex((sub) => item == sub); | ||
397 | this.subjectNames.splice(idx, 1, item.value); | 400 | this.subjectNames.splice(idx, 1, item.value); |
398 | item.default = item.value; | 401 | item.default = item.value; |
399 | } else { | 402 | } else { |
400 | - item.checked = true; | 403 | + item.value = item.default |
401 | this.$message.error(info); | 404 | this.$message.error(info); |
402 | } | 405 | } |
403 | }, | 406 | }, |
src/views/standard/setUp/student.vue
@@ -533,10 +533,10 @@ export default { | @@ -533,10 +533,10 @@ export default { | ||
533 | function () { | 533 | function () { |
534 | this.$refs.formStuCla.validate(async (valid) => { | 534 | this.$refs.formStuCla.validate(async (valid) => { |
535 | if (valid) { | 535 | if (valid) { |
536 | - if (this.formStuCla.classId == this.formStuCla.oldClassId) { | ||
537 | - this.$message.warning("班级无变更~"); | ||
538 | - return; | ||
539 | - } | 536 | + // if (this.formStuCla.classId == this.formStuCla.oldClassId) { |
537 | + // this.$message.warning("班级无变更~"); | ||
538 | + // return; | ||
539 | + // } | ||
540 | const { data, status, info } = | 540 | const { data, status, info } = |
541 | await this.$request.studentChangeClass({ | 541 | await this.$request.studentChangeClass({ |
542 | studentId: this.formStuCla.studentId, | 542 | studentId: this.formStuCla.studentId, |