Browse Source

Merge branch 'Inspection' of http://git.dayaedu.com/molingzhide/dy-admin-manager into Inspection

mo 4 years ago
parent
commit
f351f5732b

+ 6 - 2
src/components/filter-search/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="filter-search" v-if="$route.query.search">
+  <div class="filter-search" v-if="$route.query[this.searchKey]">
     <img src="./icon.svg"/>
     <span>{{desc}}</span>
     <i class="el-icon-circle-close" @click="close"/>
@@ -12,6 +12,10 @@ export default {
     desc: {
       type: String,
       default: '已筛选部分数据'
+    },
+    searchKey: {
+      type: String,
+      default: 'search'
     }
   },
   methods: {
@@ -19,7 +23,7 @@ export default {
       this.$router.replace({
         query: {
           ...this.$route.query,
-          search: undefined,
+          [this.searchKey]: undefined,
         }
       })
       this.$emit('reload')

+ 2 - 0
src/router/index.js

@@ -372,6 +372,8 @@ export const asyncRoutes = {
   teamCLassList:()=>import('@/views/teamDetail/teamClassList'),
   // 乐团主管日程详情
   scheduleDetail:()=>import('@/views/main/teamSchedule/scheduleDetail'),
+  // 乐团班级列表
+  WithdrawalApplication:()=>import('@/views/withdrawal-application'),
 }
 
 export default router

+ 1 - 0
src/router/notKeepAliveList.js

@@ -82,4 +82,5 @@ export default [
   '/contentManager/contentManager', // 内容管理
   '/business/teamCLassList', // 班级列表
   '/main/scheduleDetail',
+  '/business/WithdrawalApplication', // 退团申请
 ]

+ 2 - 2
src/views/main/constant.js

@@ -63,12 +63,12 @@ export const errorType = {
   TEACHER_EXCEPTION_ATTENDANCE: {
     isError: true,
     url: '/operateManager/recodeList',
-    resultKey: 'search',
+    resultKey: 'teacherAttendanceId',
   },
   TEACHER_NOT_A_CLASS: {
     isError: true,
     url: '/operateManager/recodeList',
-    resultKey: 'search',
+    resultKey: 'teacherAttendanceId',
   },
   TEACHER_LEAVE: {
     isError: false,

+ 6 - 5
src/views/main/schedule-branch/modals/create.vue

@@ -51,13 +51,13 @@
               <el-option v-for="(item,index) in technicians"
                 :key="index"
                 :label="item.realName"
+                :disabled="form.group.map(m => m.userId).includes(item.userId)"
                 :value="item.userId"></el-option>
             </el-select>
           </el-form-item>
         </el-col>
         <template v-for="(matterItem, matterIndex) in groupItem.matter">
-          <el-col :offset="matterIndex === 0 ? 0 : 6" :span="6" :key="groupIndex + '-' + matterIndex">
-            {{groupIndex + '-' + matterIndex}}
+          <el-col :offset="matterIndex === 0 ? 0 : 6" :span="6" :key="groupIndex + '-' + matterIndex + '1'">
             <el-form-item
               :label="'任务事项' + (matterIndex + 1)"
               :prop="`group.${groupIndex}.matter.${matterIndex}.item`"
@@ -71,11 +71,12 @@
                 <el-option v-for="(item,index) in matterTypesOptions"
                   :key="index"
                   :label="item.label"
+                  :disabled="groupItem.matter.map(m => m.item).includes(item.value)"
                   :value="item.value"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="6" :key="groupIndex + '-' + matterIndex">
+          <el-col :span="6" :key="groupIndex + '-' + matterIndex + '2'">
             <el-form-item
               :label="'任务次数' + (matterIndex + 1)"
               :prop="`group.${groupIndex}.matter.${matterIndex}.times`"
@@ -83,7 +84,7 @@
               <el-input clearable v-model="matterItem.times" placeholder="请输入次数" />
             </el-form-item>
           </el-col>
-          <el-col :span="6" :key="groupIndex + '-' + matterIndex">
+          <el-col :span="6" :key="groupIndex + '-' + matterIndex + '3'">
             <div class="ctrl">
               <span>
                 <el-tooltip content="添加任务" placement="top" :open-delay=".5">
@@ -122,7 +123,7 @@
       <el-button v-if="isCreate" @click="createGroup" plain block style="width: 100%">添加乐团主管</el-button>
     </el-form>
     <div slot="footer" style="text-align: right;margin-top: 20px;">
-      <el-button>取消</el-button>
+      <el-button @click="$emit('close')">取消</el-button>
       <el-button type="primary" @click="submit">确认</el-button>
     </div>
   </div>

+ 20 - 5
src/views/recodeManager/recodeList.vue

@@ -3,7 +3,7 @@
   <div class="m-container">
     <h2>
       <div class="squrt"></div>
-      老师考勤列表
+      老师考勤列表 <filter-search @reload="reloadSearch" searchKey="teacherAttendanceId"/>
     </h2>
     <div class="m-core">
       <save-form
@@ -249,7 +249,7 @@ export default {
         signInStatus: null,
         signOutStatus: null,
       },
-      courseTime: [nowTime, nowTime],
+      courseTime: [],
       courseType,
       // teacherList: [],
       tableList: [],
@@ -265,7 +265,13 @@ export default {
   },
   computed: {
     isEmptyQuery() {
-      return !Object.keys(cleanDeep({...this.searchForm})).length
+      return !Object.keys(cleanDeep({
+        ...this.searchForm,
+        courseTime: this.courseTime,
+      })).length && !this.teacherAttendanceId
+    },
+    teacherAttendanceId() {
+      return this.$route.query.teacherAttendanceId
     }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -283,8 +289,10 @@ export default {
     //     this.organList = res.data;
     //   }
     // });
-    this.$set(this.searchForm, 'search', this.$route.query.search)
     this.$store.dispatch("setBranchs");
+    if (!this.teacherAttendanceId) {
+      this.courseTime = [nowTime, nowTime]
+    }
     this.init();
   },
   activated() {
@@ -298,15 +306,22 @@ export default {
       let obj = {
         page: this.rules.page,
         rows: this.rules.limit,
+        teacherAttendanceId: this.teacherAttendanceId,
       };
       Object.assign(obj, this.searchForm);
       if (this.courseTime && this.courseTime.length > 0) {
         obj.courseStartDate = this.courseTime[0];
         obj.courseEndDate = this.courseTime[1];
       }
-      console.log(obj, this.$route.query.search)
+
       return obj
     },
+    reloadSearch() {
+      if (this.isEmptyQuery) {
+        this.courseTime = [nowTime, nowTime]
+      }
+      this.getList()
+    },
     getList() {
       let obj = this.getSearchValues()
       if (this.isEmptyQuery) {

+ 8 - 0
src/views/withdrawal-application/index.vue

@@ -0,0 +1,8 @@
+<template>
+  <div>withdrawal-application</div>
+</template>
+<script>
+export default {
+
+}
+</script>