浏览代码

更新显示

lex-xin 3 年之前
父节点
当前提交
fbce9328af

+ 1 - 11
src/api/buildTeam.js

@@ -1539,15 +1539,6 @@ export function updateStudentInstrument(data) {
   })
 }
 
-// 获取
-
-export function findUserByRole(data) {
-  return request2({
-    url: api + `/organization/getOrganRole`,
-    method: 'get',
-    params:data,
-  })
-}
 // 发送缴费提醒
 export function sendWaitRenewMessage(data) {
   return request2({
@@ -1655,5 +1646,4 @@ export function getOrganRole(data) {
     method: 'get',
     params:data
   })
-}
-
+}

+ 2 - 3
src/views/HumanResources/index.vue

@@ -486,7 +486,6 @@ import {
   employeeInfo,
   helpCenterContentModify,
   helpCenterContentDelete,
-  queryEmployeeByRole,
 } from "@/api/appTenant";
 import { getEmployeeOrgan, getSubject } from "@/api/buildTeam";
 import { subjectListTree } from "@/api/specialSetting";
@@ -587,8 +586,8 @@ export default {
     },
   },
   async mounted() {
-    let res = await queryEmployeeByRole({ roleId: 40 });
-    this.roleList = res.data || [];
+    await this.$store.dispatch("setOrganRole");
+    this.roleList = this.selects.roles.hrId;
     this.getList();
     // this.getTreeList()
     getEmployeeOrgan().then((res) => {

+ 0 - 65
src/views/OAMananger/index.vue

@@ -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({

+ 2 - 2
src/views/buildVip/index.vue

@@ -670,7 +670,7 @@ import {
   findTeacherByOrganId,
   getSubject,
   getPracticeApplySubjects,
-  findUserByRole,
+  getOrganRole,
 } from "@/api/buildTeam";
 import {
   vipGroupCategory,
@@ -2130,7 +2130,7 @@ export default {
         });
         // 获取乐团主管
         try {
-          const ruselt = await findUserByRole({
+          const ruselt = await getOrganRole({
             id: val,
           });
           this.educationList = ruselt?.data?.educationId;

+ 2 - 2
src/views/categroyManager/insideSetting/branchManager.vue

@@ -356,7 +356,7 @@ import {
 import cleanDeep from "clean-deep";
 import { isvalidPhone } from "@/utils/validate";
 import { Export } from "@/utils/downLoadFile";
-import { findUserByRole } from "@/api/buildTeam";
+import { getOrganRole } from "@/api/buildTeam";
 
 import qs from "qs";
 let validPhone = (rule, value, callback) => {
@@ -610,7 +610,7 @@ export default {
       this.form.educationUserId = null;
       if (val) {
         try {
-          const ruselt = await findUserByRole({
+          const ruselt = await getOrganRole({
             id: val,
           });
           this.educationList = ruselt?.data?.educationId;

+ 2 - 0
src/views/categroyManager/insideSetting/modals/handover.vue

@@ -87,12 +87,14 @@ export default {
           }
         }
       }
+      console.log(data)
       return data
     }
   },
   async mounted() {
     this.$store.dispatch('setBranchs')
     this.$store.dispatch('setTechnician')
+    // await this.$store.dispatch("setOrganRole");
     this.FetchDetail()
   },
   methods: {

+ 4 - 10
src/views/categroyManager/insideSetting/staffManager.vue

@@ -519,7 +519,7 @@
             filterable
           >
             <el-option
-              v-for="item in educationList"
+              v-for="item in selects.roles.educationId"
               :key="item.userId"
               :label="item.userName"
               :value="item.userId"
@@ -550,7 +550,6 @@ import {
   getPosts,
 } from "@/api/systemManage";
 import { userRole } from "./api";
-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'
@@ -574,7 +573,6 @@ export default {
       roleResetList: [],
       organList: [],
       tableList: [],
-      educationList: [],
       deptList: [],
       deptSmallList: [],
       postList: [],
@@ -1023,13 +1021,9 @@ export default {
             } 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;
-                  }
-                });
+                await this.$store.dispatch("setOrganRole");
+                this.educationViseble = true;
+                status = false;
               } else {
                 // 1 要弹出
                 status = true;

+ 4 - 9
src/views/categroyManager/insideSetting/staffPlatManager.vue

@@ -549,8 +549,7 @@ import {
   getDepts,
   getPosts,
 } from "@/api/systemManage";
-import { userRole } from "./api";
-import { findEducationTeacher } from "@/api/specialSetting";
+// import { userRole } from "./api";
 import deepClone from "@/helpers/deep-clone";
 // import Treeselect from '@riophae/vue-treeselect'
 // import '@riophae/vue-treeselect/dist/vue-treeselect.css'
@@ -1023,13 +1022,9 @@ export default {
             } 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;
-                  }
-                });
+                await this.$store.dispatch("setOrganRole");
+                this.educationViseble = true;
+                status = false;
               } else {
                 // 1 要弹出
                 status = true;

+ 5 - 9
src/views/repairManager/repairList.vue

@@ -47,7 +47,7 @@
             filterable
           >
             <el-option
-              v-for="(item, index) in employeeList"
+              v-for="(item, index) in selects.roles.repairId"
               :label="item.userName"
               :value="item.userId"
               :key="index"
@@ -432,7 +432,6 @@ import { Export } from '@/utils/downLoadFile'
 import qs from 'qs'
 import { getTimes } from "@/utils";
 import {
-  findAllTechnician,
   studentRepairList,
   repairSuccess,
 } from "@/api/repairManager";
@@ -450,7 +449,6 @@ export default {
         exemptionAmount: "",
       },
       repairVisible: false,
-      employeeList: [],
       tableList: [],
       rules: {
         // 分页规则
@@ -470,7 +468,7 @@ export default {
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
+  async mounted() {
     if (this.$route.query.studentInstrumentId) {
       this.searchForm = {
         ...this.searchForm,
@@ -478,11 +476,9 @@ export default {
       };
       this.$router.replace("/otherManager/repairList");
     }
-    findAllTechnician().then((res) => {
-      if (res.code == 200) {
-        this.employeeList = res.data;
-      }
-    });
+
+    await this.$store.dispatch("setOrganRole");
+
     this.$store.dispatch("setBranchs");
     // 获取声部
     getSoundTree({ tenantId: 1, rows: 9999 }).then((res) => {

+ 3 - 20
src/views/teamBuild/components/teamBaseInfo.vue

@@ -427,11 +427,10 @@ import {
   musicGroupOpenPay,
   extensionPayment,
   extensionApplyExpire,
-  findUserByRole,
+  getOrganRole,
   getTeacher,
   createTeam,
 } from "@/api/buildTeam";
-import { findTechnician } from "@/api/repairManager";
 import dayjs from "dayjs";
 import merge from "webpack-merge";
 import { queryByOrganId, getSchool } from "@/api/systemManage";
@@ -789,37 +788,21 @@ export default {
       //     this.addList = res.data;
       //   }
       // });
-      // 获取维修技师
-      // findTechnician().then((res) => {
-      //   if (res.code == 200) {
-      //     this.technician = res.data;
-      //   }
-      // });
       // 获取乐团主管
       try {
-        const ruselt = await findUserByRole({
+        const ruselt = await getOrganRole({
           id: val,
         });
         // 乐团主管
         this.educationList = ruselt?.data?.educationId;
         // 维修技师
-      this.technician =ruselt?.data?.repairId
+        this.technician =ruselt?.data?.repairId
         // this.bossList = ruselt?.data?.TEAM_TEACHER;
              // 衔接老师
         this.transactionList = ruselt?.data?.joinTeacherId;
       } catch (e) {
         console.log(e);
       }
-      // 获取运营主管
-      // try {
-      //   const ruselt = await findUserByRole({
-      //     organId: val,
-      //     employeeRole: "TEAM_TEACHER",
-      //   });
-      //   this.bossList = ruselt.data;
-      // } catch (e) {
-      //   console.log(e);
-      // }
       // 获取指导老师
       getTeacher({ organId: val }).then((res) => {
         if (res.code == 200) {