Commit c0026d5fcc03788be0c26a689f09b15e04c95a40

Authored by 梁保满
1 parent 391f66b9

科目修改,学生调班

src/assets/css/base.css
... ... @@ -21,7 +21,7 @@ a {
21 21 }
22 22  
23 23 input[type="number"] {
24   - -moz-appearance: textfield;
  24 + appearance: textfield;
25 25 }
26 26 input[type="number"]::-webkit-inner-spin-button,
27 27 input[type="number"]::-webkit-outer-spin-button {
... ...
src/views/standard/setUp/clazz.vue
... ... @@ -233,6 +233,9 @@ export default {
233 233 diaSubject: function (val) {
234 234 if (!val) {
235 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 385 item.checked = false;
383 386 },
384 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 393 item.checked = false;
390 394 const { status, info } = await this.$request.updateSubject({
391 395 subjectName: item.value,
... ... @@ -393,11 +397,10 @@ export default {
393 397 });
394 398 if (status === 0) {
395 399 this.$message.success(info);
396   - let idx = this.subjectNames.findIndex((sub) => item == sub);
397 400 this.subjectNames.splice(idx, 1, item.value);
398 401 item.default = item.value;
399 402 } else {
400   - item.checked = true;
  403 + item.value = item.default
401 404 this.$message.error(info);
402 405 }
403 406 },
... ...
src/views/standard/setUp/student.vue
... ... @@ -533,10 +533,10 @@ export default {
533 533 function () {
534 534 this.$refs.formStuCla.validate(async (valid) => {
535 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 540 const { data, status, info } =
541 541 await this.$request.studentChangeClass({
542 542 studentId: this.formStuCla.studentId,
... ...