|
|
@@ -400,7 +400,7 @@
|
|
|
<span>{{ lang.ssAddInterCla }}</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <div class="dia_box_item2">
|
|
|
+ <div class="dia_box_item2" v-loading="addInterestClaLoading">
|
|
|
<div class="addcla_box_item">
|
|
|
<span>{{ lang.ssInterClaNameColon }}</span>
|
|
|
<el-input
|
|
|
@@ -556,7 +556,7 @@
|
|
|
|
|
|
<div class="pop-upBox">
|
|
|
<el-dialog :visible.sync="popBoxdia" width="480px" :show-close="false">
|
|
|
- <div class="msgCon">
|
|
|
+ <div class="msgCon" v-loading="isLoading">
|
|
|
<img
|
|
|
style="width: 20px;"
|
|
|
v-if="deltypy == 7 || deltypy == 8"
|
|
|
@@ -695,7 +695,7 @@ export default {
|
|
|
tab0Loading: false,
|
|
|
tab1Loading: false,
|
|
|
tab2Loading: false,
|
|
|
-
|
|
|
+ addInterestClaLoading: false,
|
|
|
deleteClassStudentoneId: {}, // 兴趣班移除学生信息
|
|
|
|
|
|
|
|
|
@@ -875,13 +875,14 @@ export default {
|
|
|
type: "success"
|
|
|
});
|
|
|
this.popBoxdia = false;
|
|
|
-
|
|
|
+ this.isLoading = false;
|
|
|
this.$emit("getGrade", this.delClaidtype);
|
|
|
this.refresh();
|
|
|
this.delClaid = "";
|
|
|
this.deltypy = 0;
|
|
|
})
|
|
|
.catch(err => {
|
|
|
+ this.isLoading = false;
|
|
|
this.$message.error(this.lang.Deletefailed);
|
|
|
console.error(err);
|
|
|
});
|
|
|
@@ -1016,6 +1017,7 @@ export default {
|
|
|
this.moveClaVisible = false;
|
|
|
this.moveClaCascaderDataPath = [];
|
|
|
this.popBoxdia = false;
|
|
|
+ this.isLoading = false;
|
|
|
this.$emit("getGrade");
|
|
|
this.refresh();
|
|
|
})
|
|
|
@@ -1025,9 +1027,12 @@ export default {
|
|
|
message: this.lang.ssMoveStuFail,
|
|
|
type: "error"
|
|
|
});
|
|
|
+ this.isLoading = false;
|
|
|
});
|
|
|
})
|
|
|
- .catch(() => {});
|
|
|
+ .catch(() => {
|
|
|
+ this.isLoading = false;
|
|
|
+ });
|
|
|
// })
|
|
|
// .catch(() => {});
|
|
|
},
|
|
|
@@ -1073,10 +1078,12 @@ export default {
|
|
|
});
|
|
|
|
|
|
this.popBoxdia = false;
|
|
|
+ this.isLoading = false;
|
|
|
this.refresh();
|
|
|
this.$emit("getGrade");
|
|
|
})
|
|
|
.catch(err => {
|
|
|
+ this.isLoading = false;
|
|
|
console.error(err);
|
|
|
this.$message({
|
|
|
message: this.lang.ssRemoveStuFail,
|
|
|
@@ -1107,7 +1114,11 @@ export default {
|
|
|
this.deleteClassStudentoneId = val;
|
|
|
},
|
|
|
confirmDeleteClassStudentone() {
|
|
|
- this.popBoxdia = false;
|
|
|
+ if (this.isLoading) {
|
|
|
+ this.$message.warning(this.lang.ssRemoving);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.isLoading = true;
|
|
|
let params = [{ uid: this.deleteClassStudentoneId.userid, cid: this.activeId }];
|
|
|
this.ajax
|
|
|
.post(this.$store.state.api + "deleteClassStudent", params)
|
|
|
@@ -1118,11 +1129,14 @@ export default {
|
|
|
type: "success"
|
|
|
});
|
|
|
this.popBoxdia = false;
|
|
|
+ this.isLoading = false;
|
|
|
this.deleteClassStudentoneId = {};
|
|
|
this.refresh();
|
|
|
this.$emit("getGrade");
|
|
|
})
|
|
|
.catch(err => {
|
|
|
+ this.isLoading = false;
|
|
|
+ this.popBoxdia = false;
|
|
|
this.$message({
|
|
|
message: this.lang.ssRemoveStuFail,
|
|
|
type: "error"
|
|
|
@@ -1157,11 +1171,13 @@ export default {
|
|
|
});
|
|
|
Promise.all(promises)
|
|
|
.then(() => {
|
|
|
+ this.isLoading = false;
|
|
|
this.popBoxdia = false;
|
|
|
this.deltypy = 7;
|
|
|
this.popBoxdia = true;
|
|
|
})
|
|
|
.catch(err => {
|
|
|
+ this.isLoading = false;
|
|
|
console.error(err);
|
|
|
this.$message({
|
|
|
message: this.lang.ssResetPwdPartErr,
|
|
|
@@ -1222,12 +1238,14 @@ export default {
|
|
|
// type: "success",
|
|
|
// });
|
|
|
this.popBoxdia = false;
|
|
|
+ this.isLoading = false;
|
|
|
this.deltypy = 8;
|
|
|
this.popBoxdia = true;
|
|
|
// this.$refs.msgboxref.dialogVisible = true;
|
|
|
})
|
|
|
.catch(err => {
|
|
|
this.popBoxdia = false;
|
|
|
+ this.isLoading = false;
|
|
|
this.$message({
|
|
|
message: this.lang.ssResetPwdFail,
|
|
|
type: "error"
|
|
|
@@ -1248,21 +1266,51 @@ export default {
|
|
|
// 判断使用单删onedelstu ,twodelstu批量删除
|
|
|
confirmDelStu() {
|
|
|
if (this.deltypy == 1) {
|
|
|
+ if (this.isLoading) {
|
|
|
+ this.$message.warning(this.lang.ssDeleting);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.isLoading = true;
|
|
|
this.onedelstu();
|
|
|
this.addOp3('1', "", { type: "student_delete" }, "success")
|
|
|
} else if (this.deltypy == 2) {
|
|
|
+ if (this.isLoading) {
|
|
|
+ this.$message.warning(this.lang.ssDeleting);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.isLoading = true;
|
|
|
this.twodelstu();
|
|
|
this.addOp3('1', "", { type: "student_delete" }, "success")
|
|
|
} else if (this.deltypy == 3) {
|
|
|
+ if (this.isLoading) {
|
|
|
+ this.$message.warning(this.lang.ssDeletingClass);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.isLoading = true;
|
|
|
this.confirmdeleteCla();
|
|
|
this.addOp3('1', "", { type: "class_delete" }, "success")
|
|
|
} else if (this.deltypy == 4) {
|
|
|
+ if (this.isLoading) {
|
|
|
+ this.$message.warning(this.lang.ssRemovingStu);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.isLoading = true;
|
|
|
this.confirmRemove();
|
|
|
this.addOp3('1', "", { type: "student_remove" }, "success")
|
|
|
} else if (this.deltypy == 5) {
|
|
|
+ if (this.isLoading) {
|
|
|
+ this.$message.warning(this.lang.ssResettingPwd);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.isLoading = true;
|
|
|
this.confirmrestpsd();
|
|
|
this.addOp3('1', "", { type: "student_reset_password" }, "success")
|
|
|
} else if (this.deltypy == 6) {
|
|
|
+ if (this.isLoading) {
|
|
|
+ this.$message.warning(this.lang.ssResettingPwd);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.isLoading = true;
|
|
|
this.confirminPassword();
|
|
|
this.addOp3('1', "", { type: "student_reset_password" }, "success")
|
|
|
} else if (this.deltypy == 7) {
|
|
|
@@ -1271,9 +1319,19 @@ export default {
|
|
|
} else if (this.deltypy == 8) {
|
|
|
this.popBoxdia = false;
|
|
|
} else if (this.deltypy == 9) {
|
|
|
+ if (this.isLoading) {
|
|
|
+ this.$message.warning(this.lang.ssMoving);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.isLoading = true;
|
|
|
this.confirmMoveClaEditStu();
|
|
|
this.addOp3('1', "", { type: "student_move" }, "success")
|
|
|
} else if (this.deltypy == 10) {
|
|
|
+ if (this.isLoading) {
|
|
|
+ this.$message.warning(this.lang.ssEditingStu);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.isLoading = true;
|
|
|
this.update_Student(this.EditStubox);
|
|
|
this.addOp3('1', "", { type: "student_edit" }, "success")
|
|
|
} else if (this.deltypy == 11) {
|
|
|
@@ -1290,6 +1348,7 @@ export default {
|
|
|
// this.getAllStudent();
|
|
|
this.delStuinfo = {};
|
|
|
this.popBoxdia = false;
|
|
|
+ this.isLoading = false;
|
|
|
this.$emit("getGrade");
|
|
|
|
|
|
this.refresh();
|
|
|
@@ -1299,6 +1358,7 @@ export default {
|
|
|
});
|
|
|
})
|
|
|
.catch(err => {
|
|
|
+ this.isLoading = false;
|
|
|
console.error(err);
|
|
|
this.popBoxdia = false;
|
|
|
this.$message({
|
|
|
@@ -1315,6 +1375,7 @@ export default {
|
|
|
.then(() => {
|
|
|
this.refresh();
|
|
|
this.popBoxdia = false;
|
|
|
+ this.isLoading = false;
|
|
|
this.cancelAllSelection();
|
|
|
this.$emit("getGrade");
|
|
|
this.$message({
|
|
|
@@ -1328,6 +1389,9 @@ export default {
|
|
|
message: this.lang.ssPartDelFail,
|
|
|
type: "error"
|
|
|
});
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.isLoading = false;
|
|
|
});
|
|
|
},
|
|
|
// 删除学生Promise
|
|
|
@@ -1350,6 +1414,7 @@ export default {
|
|
|
closeDia() {
|
|
|
this.delStuinfo = {};
|
|
|
this.popBoxdia = false;
|
|
|
+ this.isLoading = false;
|
|
|
},
|
|
|
// 移动班级学生级联选中数据路径改变
|
|
|
handlemoveChangecascader(val) {
|
|
|
@@ -1415,6 +1480,11 @@ export default {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
+ if (this.addInterestClaLoading) {
|
|
|
+ this.$message.warning(this.lang.ssAddingInterCla);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.addInterestClaLoading = true;
|
|
|
//新增班级
|
|
|
let params = [
|
|
|
{
|
|
|
@@ -1429,6 +1499,7 @@ export default {
|
|
|
this.ajax
|
|
|
.post(this.$store.state.api + "addClassgraNew", params)
|
|
|
.then(res => {
|
|
|
+ this.addInterestClaLoading = false;
|
|
|
if (res.data[0] && res.data[0][0].classname == 1) {
|
|
|
this.$message({
|
|
|
message: this.lang.Cannotsameothercla,
|
|
|
@@ -1446,6 +1517,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
+ this.addInterestClaLoading = false;
|
|
|
this.$message({
|
|
|
message: this.lang.Additionfailed,
|
|
|
type: "error"
|
|
|
@@ -1521,12 +1593,13 @@ export default {
|
|
|
this.refresh();
|
|
|
this.$emit("getGrade");
|
|
|
this.popBoxdia = false;
|
|
|
+ this.isLoading = false;
|
|
|
this.EditStubox = "";
|
|
|
this.stuEditInfo = {};
|
|
|
this.cascaderDataPath = [];
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- // this.isLoading = false;
|
|
|
+ this.isLoading = false;
|
|
|
this.$message({
|
|
|
message: this.lang.Modificationfailed,
|
|
|
type: "error"
|