|
@@ -286,7 +286,6 @@ import {
|
|
|
getDepts,
|
|
|
getPosts,
|
|
|
} from "@/api/systemManage";
|
|
|
-import { findEducationTeacher } from "@/api/specialSetting";
|
|
|
import deepClone from "@/helpers/deep-clone";
|
|
|
// import Treeselect from '@riophae/vue-treeselect'
|
|
|
// import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
|
@@ -749,71 +748,7 @@ export default {
|
|
|
return reuslt[row.lockFlag];
|
|
|
}
|
|
|
},
|
|
|
- async checkStatus(data) {
|
|
|
- let status;
|
|
|
- await hasCourseGroupRelation({ employeeId: data.id }).then(
|
|
|
- async (res) => {
|
|
|
- if (res.code === 200) {
|
|
|
- if (res.data.hasCourseSchedule) {
|
|
|
- this.$message.error("请先交接指导老师课程");
|
|
|
- status = false;
|
|
|
- } else {
|
|
|
- if (res.data.hasCourseGroupRelation) {
|
|
|
- let userId = data.id;
|
|
|
- await findEducationTeacher({ userId }).then((res) => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.educationList = res.data;
|
|
|
- this.educationViseble = true;
|
|
|
- status = false;
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- // 1 要弹出
|
|
|
- status = true;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
|
|
|
- return status;
|
|
|
- },
|
|
|
- onStaffOperation(type, data) {
|
|
|
- const tempStatus = type == "RESET_PASSWORD" ? true : false;
|
|
|
- this.$confirm(
|
|
|
- `您确定${tempStatus ? "重置密码" : "修改员工状态"}?`,
|
|
|
- "提示",
|
|
|
- {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }
|
|
|
- )
|
|
|
- .then(async () => {
|
|
|
- if (type === "DEMISSION" && !data.demissionDate) {
|
|
|
- this.activeRow = data;
|
|
|
- // 1.点击的是离职按钮
|
|
|
- // 2.判断该考级是否存在乐团主管
|
|
|
- const status = await this.checkStatus(data);
|
|
|
- if (!status) {
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- employeeOperate({
|
|
|
- employeeId: data.id,
|
|
|
- operate: type,
|
|
|
- }).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success(tempStatus ? "重置密码成功" : "更改成功");
|
|
|
- this.roleStatus = false;
|
|
|
- this.getList();
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- })
|
|
|
- .catch((err) => {});
|
|
|
- },
|
|
|
submitEducation() {
|
|
|
// 发请求 提交信息
|
|
|
updateEducationTeacherId({
|