浏览代码

优化工作台

lex-xin 4 年之前
父节点
当前提交
cd886b7953

+ 1 - 0
src/router/notKeepAliveList.js

@@ -26,4 +26,5 @@ export default [
   '/business/attendanceList',
   '/business/returnVisitList',
   '/business/levelManager',
+  '/matchManager/matchManager'
 ]

+ 5 - 6
src/views/matchManager/index.vue

@@ -5,7 +5,7 @@
       <div class="squrt"></div>比赛管理
     </h2>
     <div class="m-core">
-      <el-form :inline="true" ref="searchForm" :model="searchForm">
+      <save-form :inline="true" ref="searchForm" @submit="search" @reset="onReSet" :model="searchForm">
         <el-form-item prop="search">
           <el-input v-model.trim="searchForm.search"
                     @keyup.enter.native="search"
@@ -75,12 +75,10 @@
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-button type="danger"
-                     @click="search">搜索</el-button>
-          <el-button @click="onReSet"
-                     type="primary">重置</el-button>
+          <el-button type="danger" native-type="submit">搜索</el-button>
+          <el-button native-type="reset" type="primary">重置</el-button>
         </el-form-item>
-      </el-form>
+      </save-form>
       <div class="tableWrap">
         <el-table style="width: 100%"
                   :header-cell-style="{background:'#EDEEF0',color:'#444'}"
@@ -141,6 +139,7 @@
             </template>
           </el-table-column>
           <el-table-column align="center"
+                           width="120px"
                            label="操作">
             <template slot-scope="scope">
               <div>

+ 6 - 16
src/views/workBenchManager/classFeesIsOk.vue

@@ -44,7 +44,7 @@
             placeholder="请选择分部"
           >
             <el-option
-              v-for="(item, index) in organList"
+              v-for="(item, index) in selects.branchs"
               :key="index"
               :label="item.name"
               :value="item.id"
@@ -75,7 +75,7 @@
             filterable
           >
             <el-option
-              v-for="(item, index) in teacherList"
+              v-for="(item, index) in selects.teachers"
               :label="item.realName"
               :value="item.id"
               :key="index"
@@ -349,7 +349,6 @@ import axios from "axios";
 import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
-import { getTeacher, getEmployeeOrgan } from "@/api/buildTeam";
 import {
   findIsSettlementCourseSalarys,
   openSalaryConfirm,
@@ -382,9 +381,7 @@ export default {
       },
       isOpen: null,
       activeRow: null,
-      teacherList: [],
       tableList: [],
-      organList: [],
       groupTypeList: courseListType,
       rules: {
         // 分页规则
@@ -398,17 +395,10 @@ export default {
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
-    getTeacher().then((res) => {
-      if (res.code == 200) {
-        this.teacherList = res.data;
-      }
-    });
-    getEmployeeOrgan().then((res) => {
-      if (res.code == 200) {
-        this.organList = res.data;
-      }
-    });
+  async mounted() {
+    await this.$store.dispatch('setBranchs')
+
+    await this.$store.dispatch('setTeachers')
     // 获取分部
     this.init();
   },

+ 3 - 10
src/views/workBenchManager/payAppeal.vue

@@ -22,7 +22,7 @@
             placeholder="请选择分部"
           >
             <el-option
-              v-for="(item, index) in organList"
+              v-for="(item, index) in selects.branchs"
               :key="index"
               :label="item.name"
               :value="item.id"
@@ -237,7 +237,6 @@ import axios from "axios";
 import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
-import { getEmployeeOrgan } from "@/api/buildTeam";
 import { permission } from "@/utils/directivePage";
 import {
   queryTeacherAttendanceComplaints,
@@ -256,7 +255,6 @@ export default {
       },
       teacherList: [],
       tableList: [],
-      organList: [],
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
@@ -280,13 +278,8 @@ export default {
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
-    getEmployeeOrgan().then((res) => {
-      if (res.code == 200) {
-        this.organList = res.data;
-      }
-    });
-    // 获取分部
+  async mounted() {
+    await this.$store.dispatch('setBranchs')
 
     this.init();
   },

+ 6 - 16
src/views/workBenchManager/requestProcessing.vue

@@ -24,7 +24,7 @@
             placeholder="请选择分部"
           >
             <el-option
-              v-for="(item, index) in organList"
+              v-for="(item, index) in selects.branchs"
               :key="index"
               :label="item.name"
               :value="item.id"
@@ -39,7 +39,7 @@
             filterable
           >
             <el-option
-              v-for="(item, index) in teacherList"
+              v-for="(item, index) in selects.teachers"
               :label="item.realName"
               :value="item.id"
               :key="index"
@@ -210,7 +210,6 @@ import axios from "axios";
 import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
-import { getTeacher, getEmployeeOrgan } from "@/api/buildTeam";
 import {
   teacherSalaryComplaints,
   teacherSalaryComplaintsDetail,
@@ -227,9 +226,7 @@ export default {
         teacherId: null,
         organId: null,
       },
-      teacherList: [],
       tableList: [],
-      organList: [],
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
@@ -251,17 +248,10 @@ export default {
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
-    getTeacher().then((res) => {
-      if (res.code == 200) {
-        this.teacherList = res.data;
-      }
-    });
-    getEmployeeOrgan().then((res) => {
-      if (res.code == 200) {
-        this.organList = res.data;
-      }
-    });
+  async mounted() {
+    await this.$store.dispatch('setBranchs')
+
+    await this.$store.dispatch('setTeachers')
     // 获取分部
     this.init();
   },