Sfoglia il codice sorgente

更新乐团主管

lex-xin 3 anni fa
parent
commit
9e207e09ed

+ 9 - 3
src/components/remote-search/index.vue

@@ -60,8 +60,14 @@ export default {
   },
   methods: {
     async getList() {
-      await this.$store.dispatch(this.commit);
-      this.list = this.selects[this.enumer[this.commit]];
+      // 处理乐团主管数据请求
+      const commit = this.commit == 'setEducations' ? 'setOrganRole' : this.commit
+      await this.$store.dispatch(commit);
+      if(commit == 'setOrganRole') {
+        this.list = this.selects.roles[this.enumer[commit]];
+      } else {
+        this.list = this.selects[this.enumer[commit]];
+      }
       const data = {};
       for (const item of this.list) {
         data[item.userId] = item;
@@ -133,7 +139,7 @@ export default {
     enumer() {
       return {
         setTeachers: "teachers",
-        setEducations: "educations",
+        setOrganRole: "educationId",
         setEmploys:'employs'
       };
     },

+ 18 - 1
src/store/modules/selects.js

@@ -142,7 +142,24 @@ export default {
         loadings.commit_roles = getOrganRole()
         try {
           const res = await loadings.commit_roles
-          commit('commit_roles', res.data)
+          const tempArr = []
+          const tempData = res.data
+          // 初始化数据
+          for(let i in tempData) {
+            tempArr[i] = []
+            if(tempData[i]) {
+              for(let t in tempData[i]) {
+                tempArr[i].push({
+                  value: t,
+                  label: tempData[i][t],
+                  userName: tempData[i][t],
+                  userId: t,
+                })
+              }
+            }
+          }
+          console.log(tempArr, 'tempArr')
+          commit('commit_roles', tempArr)
         } catch (error) { }
         loadings.commit_roles = false
       }

+ 6 - 13
src/views/accompanyManager/accompanys.vue

@@ -422,7 +422,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="指导老师" v-else="isMultiple">
+        <el-form-item label="指导老师" v-else>
           <el-select v-model.trim="teacherForm.teacher" filterable clearable>
             <el-option
               v-for="(item, index) in teacherList"
@@ -439,10 +439,10 @@
             clearable
           >
             <el-option
-              v-for="(item, index) in educationList"
+              v-for="(item, index) in selects.roles.educationId"
               :key="index"
-              :value="item.userId"
-              :label="item.userName"
+              :value="item.value"
+              :label="item.label"
             ></el-option>
           </el-select>
         </el-form-item>
@@ -656,7 +656,6 @@ import {
   batchAddCourses,
   getPracticeApplySubjects,
   batchUpdateCourseSchedule,
-  findEducationUsers,
   updateTeacherAttendance,
   updateCoursesExpireDate,
   updateCoursesExpireDateOnlyNormal,
@@ -785,7 +784,6 @@ export default {
         { value: "7", label: "星期日" },
       ],
       activeList: [],
-      educationList: [],
       timers: null,
       markAttendance: {
         // 考勤状态
@@ -810,7 +808,8 @@ export default {
   created() {
     that = this;
   },
-  mounted() {
+  async mounted() {
+    await this.$store.dispatch("setOrganRole");
     this.init();
   },
   methods: {
@@ -824,12 +823,6 @@ export default {
         this.$route.query.coursesStartDate +
         "至" +
         this.$route.query.coursesExpireDate;
-      //  获取乐团主管
-      findEducationUsers().then((res) => {
-        if (res.code == 200) {
-          this.educationList = res.data;
-        }
-      });
 
       //   <!-- 状态 指导老师 活动方案-->
       getTeacher({ organId: this.organId }).then((res) => {

+ 1 - 11
src/views/buildVip/index.vue

@@ -669,7 +669,6 @@
 import {
   findTeacherByOrganId,
   getSubject,
-  findEducationUsers,
   getPracticeApplySubjects,
   findUserByRole,
 } from "@/api/buildTeam";
@@ -694,7 +693,7 @@ export default {
   name: "buildVip",
   data() {
     return {
-      title: "VIP/乐理课申请",
+      title: "VIP申请",
       dialogFormVisible: false,
       labelPosition: "right",
       courseType: "",
@@ -2142,16 +2141,7 @@ export default {
         } catch (e) {
           console.log(e);
         }
-        /**
-         *
         // 乐团主管
-        this.educationList = ruselt?.data?.educationId;
-         */
-        // findEducationUsers({ organId: val }).then((res) => {
-        //   if (res.code == 200) {
-        //     this.educationList = res.data;
-        //   }
-        // });
         // 如果是网管课 则获取网管课单价
         if (this.courseType == "PRACTICE") {
           getPracticeGroupSellPrice({ organId: val }).then((res) => {

+ 1 - 3
src/views/businessManager/orderManager/salesList.vue

@@ -421,9 +421,7 @@ import {
 } from "@/api/orderManager";
 import { queryByOrganId } from "@/api/systemManage";
 import {
-  getEmployeeOrgan,
-  getCooperation,
-  findEducationUsers,
+  getCooperation
 } from "@/api/buildTeam";
 import { paymentChannelStatus } from "@/utils/searchArray";
 import { Export } from "@/utils/downLoadFile";

+ 0 - 1
src/views/categroyManager/insideSetting/staffManager.vue

@@ -552,7 +552,6 @@ import {
 import { userRole } from "./api";
 import { findEducationTeacher } from "@/api/specialSetting";
 import deepClone from "@/helpers/deep-clone";
-import { findEducationUsers } from "@/api/buildTeam";
 // import Treeselect from '@riophae/vue-treeselect'
 // import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 import Tooltip from "@/components/Tooltip/index";

+ 0 - 1
src/views/categroyManager/insideSetting/staffPlatManager.vue

@@ -552,7 +552,6 @@ import {
 import { userRole } from "./api";
 import { findEducationTeacher } from "@/api/specialSetting";
 import deepClone from "@/helpers/deep-clone";
-import { findEducationUsers } from "@/api/buildTeam";
 // import Treeselect from '@riophae/vue-treeselect'
 // import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 import Tooltip from "@/components/Tooltip/index";

+ 0 - 8
src/views/evaluateManager/networkList.vue

@@ -427,7 +427,6 @@ import { practiceGroupType } from "@/utils/searchArray";
 import {
   getTeacher,
   getEmployeeOrgan,
-  findEducationUsers,
   getPracticeGroup,
   getReviewInfo,
   updateReviewInfo,
@@ -455,7 +454,6 @@ export default {
       practiceGroupType: practiceGroupType,
       organList: [],
       teacherList: [],
-      educationList: [],
       tableData: [],
       rules: {
         // 分页规则
@@ -516,12 +514,6 @@ export default {
           this.organList = res.data;
         }
       });
-      // 获取教务
-      findEducationUsers().then((res) => {
-        if (res.code == 200) {
-          this.educationList = res.data;
-        }
-      });
 
       this.getList();
     },

+ 3 - 24
src/views/evaluateManager/vipEvaluateList.vue

@@ -60,7 +60,7 @@
           placeholder="乐团主管"
         >
           <el-option
-            v-for="(item, index) in educationList"
+            v-for="(item, index) in selects.roles.educationId"
             :key="index"
             :value="item.userId"
             :label="item.userName"
@@ -370,9 +370,6 @@ import axios from "axios";
 import pagination from "@/components/Pagination/index";
 import { practiceGroupType } from "@/utils/searchArray";
 import {
-  getTeacher,
-  getEmployeeOrgan,
-  findEducationUsers,
   getReviewInfo,
   updateReviewInfo,
   getVipGroup,
@@ -419,8 +416,9 @@ export default {
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
+  async mounted() {
     this.$store.dispatch("setBranchs");
+    await this.$store.dispatch("setOrganRole");
     this.init();
   },
   activated() {
@@ -449,25 +447,6 @@ export default {
         console.log(this.searchForm.month);
       }
 
-      // 获取指导老师
-      // getTeacher({}).then((res) => {
-      //   if (res.code == 200) {
-      //     this.teacherList = res.data;
-      //   }
-      // });
-      // 获取分部
-      getEmployeeOrgan().then((res) => {
-        if (res.code == 200) {
-          this.organList = res.data;
-        }
-      });
-      // 获取教务
-      findEducationUsers().then((res) => {
-        if (res.code == 200) {
-          this.educationList = res.data;
-        }
-      });
-
       this.getList();
     },
     getList() {

+ 2 - 9
src/views/indexErrDataRecord/components/patrol.vue

@@ -70,7 +70,7 @@
             placeholder="请选择乐团主管"
           >
             <el-option
-              v-for="(item, index) in educationList"
+              v-for="(item, index) in selects.roles.educationId"
               :key="index"
               :label="item.userName"
               :value="item.userId"
@@ -297,7 +297,6 @@ import pagination from "@/components/Pagination/index";
 import LookDetail from "@/views/musicInspection/modals/lookDetail";
 import dayjs from "dayjs";
 import { inspectionItemPlan, updateMemo } from "@/views/musicInspection/api";
-import { findEducationUsers } from "@/api/buildTeam";
 import { queryByOrganId } from "@/api/systemManage";
 import { getTeamList } from "@/api/teamServer";
 import { getTimes } from "@/utils";
@@ -309,7 +308,6 @@ export default {
   components: { pagination, LookDetail, gpsLoction },
   data() {
     return {
-      educationList: [],
       cooperationList: [],
       musicGroupList: [],
       activeRow: null,
@@ -355,13 +353,8 @@ export default {
     this.getList();
     // 分部
     await this.$store.dispatch("setBranchs");
+    await this.$store.dispatch("setOrganRole");
 
-    //  获取乐团主管
-    await findEducationUsers().then((res) => {
-      if (res.code == 200) {
-        this.educationList = res.data;
-      }
-    });
 
     // 乐团列表 {只查询进行中的乐团}
     // await getTeamList({ musicGroupStatus: 'PROGRESS', rows: 9999 }).then(res => {

+ 2 - 10
src/views/musicInspection/index.vue

@@ -69,7 +69,7 @@
             placeholder="请选择乐团主管"
           >
             <el-option
-              v-for="(item, index) in educationList"
+              v-for="(item, index) in selects.roles.educationId"
               :key="index"
               :label="item.userName"
               :value="item.userId"
@@ -297,7 +297,6 @@ import LookDetail from "./modals/lookDetail";
 import dayjs from "dayjs";
 import { inspectionItemPlan, updateMemo } from "./api";
 import { conclusionList } from "@/utils/searchArray";
-import { findEducationUsers } from "@/api/buildTeam";
 import { queryByOrganId } from "@/api/systemManage";
 import { getTeamList } from "@/api/teamServer";
 import { getTimes } from "@/utils";
@@ -308,7 +307,6 @@ export default {
   data() {
     return {
       conclusionList: conclusionList,
-      educationList: [],
       cooperationList: [],
       musicGroupList: [],
       activeRow: null,
@@ -354,13 +352,7 @@ export default {
     this.getList();
     // 分部
     await this.$store.dispatch("setBranchs");
-
-    //  获取乐团主管
-    await findEducationUsers().then((res) => {
-      if (res.code == 200) {
-        this.educationList = res.data;
-      }
-    });
+    await this.$store.dispatch("setOrganRole");
 
     // 乐团列表 {只查询进行中的乐团}
     // await getTeamList({ musicGroupStatus: 'PROGRESS', rows: 9999 }).then(res => {

+ 1 - 1
src/views/resetTeaming/modals/giveMemberModel.vue

@@ -101,7 +101,7 @@ export default {
             // // 二维码页面, 唤起支付页面
             const { orderNo, sign, amount, orderBody, orderSubject } = res.data.payMap
             this.orderNo = orderNo
-            this.codeUrl = vaildStudentUrl() + '/#/payCenter?orderNo=' + orderNo + '&sign=' + sign + '&amount=' + amount + '&payType=' + payForm.payType + '&orderBody=' + orderBody + '&orderSubject=' + orderSubject + '&platform=tenant'
+            this.codeUrl = vaildStudentUrl() + '/#/payCenter?orderNo=' + orderNo + '&sign=' + sign + '&amount=' + amount + '&payType=' + payForm.payType + '&orderBody=' + orderBody + '&orderSubject=' + orderSubject + '&platform=cloudTeacherOrder'
             console.log(this.codeUrl, 'codeUrl')
             this.payMentVisible = true
           } catch(e) {}

+ 1 - 6
src/views/vipClass/vipReset.vue

@@ -647,12 +647,7 @@ export default {
       if (query.searchForm) {
         this.FsearchForm = query.searchForm;
       }
-      //  获取乐团主管
-      // findEducationUsers().then(res => {
-      //   if (res.code == 200) {
-      //     this.educationList = res.data;
-      //   }
-      // });
+
       getEmployeeOrgan().then(res => {
         if (res.code == 200) {
           this.organList = res.data;