Browse Source

Merge branch 'Inspection' into online

wolyshaw 4 years ago
parent
commit
ab8dbbd379

+ 5 - 4
debug.log

@@ -1,4 +1,5 @@
-[0118/174310.352:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
-[0119/094348.688:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
-[0122/094436.708:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
-[0122/182558.432:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
+[0118/174310.352:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统锟揭诧拷锟斤拷指锟斤拷锟斤拷路锟斤拷锟斤拷 (0x3)
+[0119/094348.688:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统锟揭诧拷锟斤拷指锟斤拷锟斤拷路锟斤拷锟斤拷 (0x3)
+[0122/094436.708:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统锟揭诧拷锟斤拷指锟斤拷锟斤拷路锟斤拷锟斤拷 (0x3)
+[0125/095157.852:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统锟揭诧拷锟斤拷指锟斤拷锟斤拷路锟斤拷锟斤拷 (0x3)
+[0126/093517.085:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统锟揭诧拷锟斤拷指锟斤拷锟斤拷路锟斤拷锟斤拷 (0x3)

+ 6 - 4
src/api/buildTeam.js

@@ -898,11 +898,13 @@ export function updateStudentFee (data) {
 }
 // -----[-]
 // 获取学员签到列表
-export function findStudentAttendance (data) {
-  return request({
+export function findStudentAttendance (data, postData) {
+  return request2({
     url: api + '/studentAttendance/findStudentAttendance',
-    method: 'get',
-    params: data
+    method: postData ? 'post' : 'get',
+    params: data,
+    data: postData,
+    requestType: 'form'
   })
 }
 

File diff suppressed because it is too large
+ 0 - 0
src/components/filter-search/icon.svg


+ 61 - 0
src/components/filter-search/index.vue

@@ -0,0 +1,61 @@
+<template>
+  <div class="filter-search" v-if="$route.query[this.searchKey]">
+    <img src="./icon.svg"/>
+    <span>{{desced}}</span>
+    <i class="el-icon-circle-close" @click="close"/>
+  </div>
+</template>
+<script>
+import { errorType } from '@/views/main/constant'
+export default {
+  name: 'filter-search',
+  props: {
+    desc: {
+      type: String,
+      default: '已筛选部分数据'
+    },
+    searchKey: {
+      type: String,
+      default: 'search'
+    }
+  },
+  computed: {
+    desced() {
+      const { name } = errorType[this.$route.query.filter_type] || {}
+      return name ? `仅显示: ${name}` : this.desc
+    }
+  },
+  methods: {
+    close() {
+      this.$router.replace({
+        query: {
+          ...this.$route.query,
+          [this.searchKey]: undefined,
+          filter_type: undefined,
+        }
+      })
+      this.$emit('reload')
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .filter-search{
+    font-size: 14px;
+    margin-left: 10px;
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+    color: #e6a23c;
+    >img{
+      width: 20px;
+      height: auto;
+    }
+    >span{
+      margin: 0 6px
+    }
+    >i{
+      font-size: 16px;
+    }
+  }
+</style>

+ 2 - 0
src/components/install.js

@@ -16,6 +16,7 @@ import tabRouter from '@/components/tab-router'
 import empty from '@/components/empty'
 import autoHeight from '@/components/auto-height'
 import auth from '@/components/Auth'
+import filterSearch from '@/components/filter-search'
 
 export default {
   install(Vue) {
@@ -32,5 +33,6 @@ export default {
     Vue.component(empty.name, empty)
     Vue.component(autoHeight.name, autoHeight)
     Vue.component(auth.name, auth)
+    Vue.component(filterSearch.name, filterSearch)
   }
 }

+ 5 - 1
src/router/index.js

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

+ 2 - 0
src/router/notKeepAliveList.js

@@ -83,4 +83,6 @@ export default [
   '/contentManager/contentOperation', // 内容编辑
   '/business/teamCLassList', // 班级列表
   '/business/musicInspection', // 乐团巡查
+  '/main/scheduleDetail',
+  '/business/WithdrawalApplication', // 退团申请
 ]

+ 4 - 0
src/utils/utils.js

@@ -112,3 +112,7 @@ export const getCourseType=(type)=>{
   }
   return arr
 }
+// 清除路由连接
+export const resetQuery=(that,obj)=>{
+  that.$router.replace({query:{...that.$route.query,...obj}})
+}

+ 36 - 11
src/views/main/abnormal/index.vue

@@ -20,15 +20,14 @@
     </save-form>
     <div class="tags">
       <el-badge
-        :hidden="listByType[item.type].length === 0"
-        :value="listByType[item.type].length"
-        :max="99"
+        :hidden="item.num === 0"
+        is-dot
         v-for="(item, index) in tags"
         :key="index"
       >
         <el-tag
           :effect="activeKey === item.type ? 'dark' : 'plain'"
-          @click="activeKey = item.type"
+          @click="changeTag(item.type)"
         >{{item.name}}</el-tag>
       </el-badge>
     </div>
@@ -40,7 +39,19 @@
       :key="index"
       :data="item.map(title => ({name: title.desc, num: title.num}))"
     >
-      <el-button type="text">立即处理<i class="el-icon-d-arrow-right"/></el-button>
+      <el-button
+        type="text"
+        v-if="item[0].url && item[0].result || item[0].always"
+        @click="$router.push({
+          path: item[0].url,
+          query: {
+            ...item[0].query,
+            tag: $route.query.tag,
+            filter_type: item[0].errorType,
+            [item[0].resultKey]: item[0].resultKey ? (item[0].result || []).join(',') : undefined
+          }
+        })" :disabled="!item[0].result.length && !item[0].always"
+      >立即处理<i class="el-icon-d-arrow-right"/></el-button>
     </title-item>
   </div>
 </template>
@@ -55,7 +66,6 @@ export default {
   },
   data() {
     return {
-      activeKey: '',
       search: {
         organIds: []
       },
@@ -64,11 +74,18 @@ export default {
     }
   },
   computed: {
-    tags() {
-      const tags = this.list.map(item => ({name: item.desc, type: item.errorType}))
-      if (tags.length && !this.activeKey) {
-        this.activeKey = tags[0].type
+    activeKey() {
+      let key = ''
+      const { tag } = this.$route.query
+      if (tag) {
+        key = tag
+      } else if (this.tags[0]) {
+        key = this.tags[0].type
       }
+      return key
+    },
+    tags() {
+      const tags = this.list.map(item => ({name: item.desc, type: item.errorType, num: item.num}))
       return tags
     },
     activeList() {
@@ -81,6 +98,14 @@ export default {
     this.$store.dispatch('setBranchs')
   },
   methods: {
+    changeTag(type) {
+      this.$router.replace({
+        query: {
+          ...this.$route.query,
+          tag: type
+        }
+      })
+    },
     formatData(data) {
       const list = {}
       for (const item of data) {
@@ -92,7 +117,7 @@ export default {
         list[key].push(
           {
             ...item,
-            isError: row.isError
+            ...row,
           }
         )
       }

+ 4 - 0
src/views/main/abnormal/title.vue

@@ -34,9 +34,13 @@ export default {
   justify-content: space-between;
   padding-right: 10px;
   font-weight: bold;
+  transition: all .3s;
   b{
     font-size: 18px;
   }
+  &:hover{
+    background-color: rgba(0, 0, 0, .06);
+  }
   &.error {
     b{
       color: #ED6F62;

+ 28 - 0
src/views/main/api.js

@@ -33,6 +33,34 @@ export const resetInspectionItem = data => request2({
   requestType:'form'
 })
 
+// 获取乐团主管巡查任务
+export const getInspectionItemPlan =data => request2({
+  url: '/api-web/inspectionItemPlan/queryPage',
+  params: data,
+  method: 'get',
+})
+// 获取乐团主管乐团
+export const getMusicGroup =data => request2({
+  url: '/api-web/inspectionItemPlan/getMusicGroup',
+  params: data,
+  method: 'get',
+})
+// 添加乐团主管巡查任务
+export const addInspectionItemPlan = data => request2({
+  url: '/api-web/inspectionItemPlan/add',
+  data: data,
+  method: 'post',
+  requestType:'form'
+})
+
+// 修改乐团主管巡查任务
+export const resetInspectionItemPlan = data => request2({
+  url: '/api-web/inspectionItemPlan/update',
+  data: data,
+  method: 'post',
+  requestType:'form'
+})
+
 // 添加巡查任务
 export const inspectionAdd = data => request2({
   url: '/api-web/inspection/add',

+ 69 - 8
src/views/main/constant.js

@@ -26,39 +26,100 @@ export const descs = {
 
 export const errorType = {
   MUSIC_PATROL_ITEM: {
+    name: '乐团巡查事项异常',
     isError: false,
+    url: '/business/musicInspection',
+    resultKey: 'ids',
   },
   HIGH_CLASS_STUDENT_LESS_THAN_THREE: {
+    name: '基础技能班学员数量异常',
     isError: true,
+    url: '/business/teamDetail',
+    resultKey: 'search',
   },
   STUDENT_NOT_PAYMENT: {
+    name: '学员未缴费',
     isError: true,
+    url: '/business/teamDetail',
+    resultKey: 'search',
   },
   STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP: {
-    isError: true
+    name: '学员退团申请',
+    isError: true,
+    url: '/business/WithdrawalApplication',
+    resultKey: 'ids',
   },
   WAIT_CREATE_PAYMENT_CALENDER: {
-    isError: true
+    name: '待创建缴费项目',
+    isError: true,
+    url: '/business/teamDetail',
+    resultKey: 'search',
   },
   COURSE_TRUANT_STUDENT_NUM: {
-    isError: true
+    name: '学员考情异常旷课',
+    isError: true,
+    url: '/operateManager/stuRecodeManager',
+    resultKey: 'ids',
   },
   COURSE_LEAVE_STUDENT_NUM: {
+    name: '学员请假',
     isError: true,
-    parent: 'COURSE_TRUANT_STUDENT_NUM'
+    url: '/operateManager/stuRecodeManager',
+    resultKey: 'ids',
   },
   TEACHER_EXCEPTION_ATTENDANCE: {
-    isError: true
+    name: '老师考勤异常',
+    isError: true,
+    url: '/operateManager/recodeList',
+    resultKey: 'teacherAttendanceId',
   },
   TEACHER_NOT_A_CLASS: {
+    name: '未签到签退',
     isError: true,
-    parent: 'TEACHER_EXCEPTION_ATTENDANCE'
+    url: '/operateManager/recodeList',
+    resultKey: 'teacherAttendanceId',
   },
   TEACHER_LEAVE: {
-    isError: false
+    name: '老师请假',
+    isError: false,
+    url: '/journal/journal',
+    resultKey: 'search',
+    query: {
+      tabrouter: 'LEAVE'
+    }
   },
   TEACHER_EXPECT_SALARY_BE_LOW: {
-    isError: false
+    name: '预计课酬较低',
+    isError: false,
+    url: '/operateManager/operationalList',
+    always: true,
+    query: {
+      lowSalary: 1
+    }
+  },
+  INSPECTION_ITEM: {
+    name: '乐团巡查任务未计划',
+    isError: true,
+    url: '/main/main',
+    resultKey: 'ids',
+    query: {
+      tabrouter: 'teamSchedule'
+    }
+  },
+  INSPECTION_ITEM_PLAN: {
+    name: '乐团巡查任务未提交',
+    isError: true,
+    url: '/business/musicInspection',
+    resultKey: 'ids',
+  },
+  STUDENT_VISIT: {
+    name: '回访任务未完成',
+    isError: true,
+    url: '/main/main',
+    resultKey: 'ids',
+    query: {
+      tabrouter: 'teamSchedule'
+    }
   },
 }
 

+ 37 - 189
src/views/main/index.vue

@@ -1,202 +1,50 @@
 <template>
   <div class="m-container">
-    <h2 v-permission="'/main/main/allData/826'">
-      <div class="squrt"></div>首页
+    <h2>
+      <div class="squrt"></div>控制台 <filter-search v-if="$route.query.tabrouter === 'teamSchedule'" searchKey="ids" @reload="getList"/>
     </h2>
-    <div class="m-core"
-         v-permission="'/main/main/allData/826'">
-      <div class="itemWrap">
-        <div class="item">
-          <h4>
-            <p>分部乐团数</p> <img src=""
-                 alt="">
-          </h4>
-          <div class="infos">
-            <div class="info">
-              <p class="sub">全部</p>
-              <p class='msg'> {{ dataInfo.mdTotal }}</p>
-            </div>
-            <div class="info">
-              <p class="sub">筹备中</p>
-              <p class='msg'>{{ dataInfo.prepare_num_ }}</p>
-            </div>
-            <div class="info">
-              <p class="sub">进行中</p>
-              <p class='msg'>{{ dataInfo.progress_num_ }}</p>
-            </div>
-            <div class="info">
-              <p class="sub">已完成</p>
-              <p class='msg'>{{ dataInfo.pause_num_ }}</p>
-            </div>
-          </div>
-        </div>
-        <!--  -->
-        <div class="item"
-             v-permission="'main/monthIncome'">
-          <h4>
-            <p>本月收入</p>
-            <img src=""
-                 alt="">
-          </h4>
-          <div class="infos">
-            <div class="info">
-              <p class="sub">收入笔数</p>
-              <p class='msg'>{{ dataInfo.incomeMap && dataInfo.incomeMap.total >= 0 ? dataInfo.incomeMap.total : '--' }}</p>
-            </div>
-            <div class="info">
-              <p class="sub">收入金额</p>
-              <p class='msg'>{{ dataInfo.incomeMap && dataInfo.incomeMap.total_num_ >= 0 ? dataInfo.incomeMap.total_num_ : '--' }}</p>
-            </div>
-          </div>
-        </div>
-
-        <div class="item"
-             v-permission="'main/monthExpenditure'">
-          <h4>
-            <p>本月支出</p>
-            <img src=""
-                 alt="">
-          </h4>
-          <div class="infos">
-            <div class="info">
-              <p class="sub">支出笔数</p>
-              <p class='msg'>{{ dataInfo.incomeExpendMap && dataInfo.incomeExpendMap.expend_num_ >= 0 ? dataInfo.incomeExpendMap.expend_num_ : '--' }}</p>
-            </div>
-            <div class="info">
-              <p class="sub">支出金额</p>
-              <p class='msg'>{{ dataInfo.incomeExpendMap && dataInfo.incomeExpendMap.expend_total_ >= 0 ? dataInfo.incomeExpendMap.expend_total_ : '--' }}</p>
-            </div>
-          </div>
-        </div>
-
-        <div class="item">
-          <h4>
-            <p>分部老师数</p>
-            <img src=""
-                 alt="">
-          </h4>
-          <div class="infos">
-            <div class="info">
-              <p class="sub">总计</p>
-              <p class='msg'>{{ dataInfo.teacherDatas && dataInfo.teacherDatas.total >= 0 ? dataInfo.teacherDatas.total : '--' }}</p>
-            </div>
-            <div class="info">
-              <p class="sub">全职人数</p>
-              <p class='msg'>{{ dataInfo.teacherDatas && dataInfo.teacherDatas.full_time_num_ >= 0 ? dataInfo.teacherDatas.full_time_num_ : '--' }}</p>
-            </div>
-            <div class="info">
-              <p class="sub">兼职人数</p>
-              <p class='msg'>{{ dataInfo.teacherDatas && dataInfo.teacherDatas.part_time_num_ >= 0 ? dataInfo.teacherDatas.part_time_num_ : '--' }}</p>
-            </div>
-          </div>
-        </div>
-
-        <div class="item">
-          <h4>
-            <p>VIP课数</p>
-            <img src=""
-                 alt="">
-          </h4>
-          <div class="infos">
-            <div class="info">
-              <p class="sub">总计</p>
-              <p class='msg'>
-                {{ dataInfo.vdTotal }}
-              </p>
-            </div>
-            <div class="info">
-              <p class="sub">进行中</p>
-              <p class='msg'>{{ dataInfo.applying_num_ }}</p>
-            </div>
-            <div class="info">
-              <p class="sub">已完成</p>
-              <p class='msg'>{{ dataInfo.finished_num_ }}</p>
-            </div>
-          </div>
-        </div>
-
-        <div class="item">
-          <h4>
-            <p>试听课</p>
-            <img src=""
-                 alt="">
-          </h4>
-          <div class="infos">
-            <div class="info">
-              <p class="sub">总计</p>
-              <p class='msg'>{{ dataInfo.ddTotal }}</p>
-            </div>
-            <div class="info">
-              <p class="sub">已预约</p>
-              <p class='msg'>{{ dataInfo.booked_num_ }}</p>
-            </div>
-            <div class="info">
-              <p class="sub">未完成</p>
-              <p class='msg'>{{ dataInfo.unbooked_num_ }}</p>
-            </div>
-          </div>
-        </div>
-
-        <div class="item">
-          <h4>
-            <p>分部学生数</p>
-            <img src=""
-                 alt="">
-          </h4>
-          <div class="infos">
-            <div class="info">
-              <p class="sub">总计</p>
-              <p class='msg'>{{ dataInfo.studentDatas && dataInfo.studentDatas.total_num_ >= 0 ? dataInfo.studentDatas.total_num_ : '--' }}</p>
-            </div>
-            <div class="info">
-              <p class="sub">本月新增</p>
-              <p class='msg'>{{ dataInfo.studentDatas && dataInfo.studentDatas.new_num_ >= 0 ? dataInfo.studentDatas.new_num_ : '--' }}</p>
-            </div>
-            <div class="info">
-              <p class="sub">本月退团</p>
-              <p class='msg'>{{ dataInfo.studentDatas && dataInfo.studentDatas.quit_num_ >= 0 ? dataInfo.studentDatas.quit_num_ : '--' }}</p>
-            </div>
-          </div>
-        </div>
-
-        <div class="item">
-          <h4>
-            <p>本月预计上课</p>
-            <img src=""
-                 alt="">
-          </h4>
-          <div class="infos">
-            <div class="info">
-              <p class="sub">乐团课</p>
-              <p class='msg'>{{ dataInfo.musicGroupNum >= 0 ? dataInfo.musicGroupNum : '--' }}</p>
-            </div>
-            <div class="info">
-              <p class="sub">VIP课</p>
-              <p class='msg'>{{ dataInfo.vipGroupNum >= 0 ? dataInfo.vipGroupNum : '--' }}</p>
-            </div>
-            <div class="info">
-              <p class="sub">试听课</p>
-              <p class='msg'>{{ dataInfo.demoGroupNum >= 0 ? dataInfo.demoGroupNum : '--' }}</p>
-            </div>
-          </div>
-        </div>
-
-      </div>
+    <div class="m-core">
+      <tab-router v-permission="'newIndex'">
+        <el-tab-pane lazy label="基本信息" name="baseinfo">
+          <baseinfo/>
+        </el-tab-pane>
+        <el-tab-pane lazy label="异常处理" name="abnormal">
+          <abnormal/>
+        </el-tab-pane>
+        <el-tab-pane lazy label="事项提醒" name="reminders">
+          <reminders/>
+        </el-tab-pane>
+        <el-tab-pane lazy label="【乐团主管】日程安排" name="teamSchedule">
+          <teamSchedule />
+        </el-tab-pane>
+        <el-tab-pane lazy label="【分部经理】日程安排" name="ScheduleBranch">
+          <ScheduleBranch/>
+        </el-tab-pane>
+      </tab-router>
     </div>
   </div>
 </template>
 <script>
-import { getIndex } from '@/api/user'
+import baseinfo from './baseinfo'
+import abnormal from './abnormal'
+import teamSchedule from './teamSchedule'
+import ScheduleBranch from './schedule-branch'
+import reminders from './reminders'
 export default {
   name: 'Main',
-  data () {
-    return {
-      dataInfo: {}
-    }
+  components: {
+    baseinfo,
+    abnormal,
+    teamSchedule,
+    ScheduleBranch,
+    reminders,
   },
-  mounted () {
-    this.__init();
-
+  watch: {
+    '$route.query'(newValue, oldValue) {
+      if (newValue.tabrouter !== oldValue.tabrouter) {
+        this.$forceUpdate()
+      }
+    }
   },
   methods: {
     __init () {

+ 1 - 1
src/views/main/reminders/index.vue

@@ -31,7 +31,7 @@
         query: {
           search: (item.result || []).join(',')
         }
-      })" type="text">立即处理<i class="el-icon-d-arrow-right"/></el-button>
+      })" :disabled="item.result ?  !item.result.length : !item.result" type="text">立即处理<i class="el-icon-d-arrow-right"/></el-button>
     </title-item>
   </div>
 </template>

+ 13 - 8
src/views/main/schedule-branch/modals/create.vue

@@ -12,6 +12,7 @@
               clearable
               filterable
               v-model="form.organId"
+              :disabled="!isCreate"
               placeholder="请选择分部"
             >
               <el-option v-for="(item,index) in selects.branchs"
@@ -29,6 +30,7 @@
           >
             <el-date-picker
               v-model="form.month"
+              :disabled="!isCreate"
               type="month"
               placeholder="请选择工作周期">
             </el-date-picker>
@@ -46,18 +48,19 @@
               clearable
               filterable
               v-model="groupItem.userId"
+              :disabled="!isCreate"
               placeholder="请选择乐团主管"
             >
               <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 +74,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 +87,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,13 +126,13 @@
       <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>
 </template>
 <script>
-import { findTechnician } from '@/api/repairManager'
+import { queryEmployByOrganId } from '@/api/systemManage'
 import { matterTypes } from '@/views/main/constant'
 import { objectToOptions } from '@/utils'
 import { createRandom } from '@/helpers/uuidv4'
@@ -164,8 +168,9 @@ export default {
     async 'form.organId'() {
       if (this.form.organId) {
         try {
-          const res = await findTechnician({
-            organId: this.form.organId
+          const res = await queryEmployByOrganId({
+            organId: this.form.organId,
+            rows: 999
           })
           this.technicians = res.data
           this.$set(this.form, 'group', group.map(item => ({...item, userId: ''})))

+ 165 - 0
src/views/main/teamSchedule/compontent/taskInfo.vue

@@ -0,0 +1,165 @@
+<template>
+  <div>
+    <el-form :model="taskForm" ref="form" label-width="100px">
+      <el-form-item
+        label="日期"
+        :rules="[{ required: true, message: '请选择日期' }]"
+        prop="date"
+      >
+        <el-date-picker
+          style="width: 410px"
+          v-model="taskForm.date"
+          value-format="yyyy-MM-dd"
+          type="date"
+          :picker-options="rangeDate(rangeStart, rangeEnd)"
+          placeholder="选择日期"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item
+        label="开始时间"
+        :rules="[{ required: true, message: '请选择开始时间' }]"
+        prop="startTimer"
+      >
+        <el-time-picker
+          style="width: 410px"
+          @change="changeStartTime"
+          v-model="taskForm.startTimer"
+          format="HH:mm"
+          value-format="HH:mm:ss"
+          placeholder="选择时间范围"
+          :picker-options="{
+            selectableRange: `04:00:00-23:59:00`,
+          }"
+        >
+        </el-time-picker>
+      </el-form-item>
+      <el-form-item
+        label="结束时间"
+        :rules="[{ required: true, message: '请选择结束时间' }]"
+        prop="endTimer"
+      >
+        <el-time-picker
+          style="width: 410px"
+          v-model="taskForm.endTimer"
+          format="HH:mm"
+          value-format="HH:mm:ss"
+          placeholder="选择时间范围"
+          :picker-options="{
+            selectableRange: `${taskForm.startTimer}-23:59:00`,
+          }"
+        >
+        </el-time-picker>
+      </el-form-item>
+      <el-form-item
+        label="乐团"
+        :rules="[{ required: true, message: '请选择乐团' }]"
+        prop="musicGroupId"
+      >
+        <el-select
+          v-model="taskForm.musicGroupId"
+          clearable
+          filterable
+          style="width: 410px !important"
+        >
+          <el-option
+            :label="item.name"
+            :value="item.id"
+            v-for="(item, index) in MusicGroupList"
+            :key="index"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+<script>
+import { addInspectionItemPlan, resetInspectionItemPlan } from "../../api";
+import dayjs from "dayjs";
+export default {
+  props: ["taskInfo", "rangeStart", "rangeEnd", "MusicGroupList", "itemId"],
+  data() {
+    return {
+      taskForm: {
+        date: "",
+        endTimer:'',
+        startTimer: '',
+        musicGroupId: "",
+      },
+    };
+  },
+  mounted() {
+    if (this.taskInfo) {
+      console.log(this.taskInfo);
+      this.taskForm.date = this.taskInfo.planStart;
+      this.taskForm.startTimer = dayjs(this.taskInfo.planStart).format('HH:mm:ss')
+      this.taskForm.endTimer = dayjs(this.taskInfo.planEnd).format('HH:mm:ss');
+      // console.log( dayjs(this.taskForm.planStart),this.taskForm.planEnd )
+      this.taskForm.musicGroupId = this.taskInfo.musicGroupId;
+    }
+  },
+  methods: {
+    rangeDate(start, end) {
+      return {
+        firstDayOfWeek: 1,
+        disabledDate(time) {
+          if (end && start) {
+            return (
+              new Date(end).getTime() - 86400000 <= time.getTime() ||
+              new Date().getTime() - 86400000 >= time.getTime()
+            );
+          }
+        },
+      };
+    },
+    submitInfo(val) {
+      this.$refs.form.validate(async (res) => {
+        if (res) {
+          let planStart =
+            dayjs(this.taskForm.date).format("YYYY-MM-DD") +
+            " " +
+           this.taskForm.startTimer;
+          let planEnd =
+            dayjs(this.taskForm.date).format("YYYY-MM-DD") +
+            " " +
+           this.taskForm.endTimer;
+          if (val) {
+            console.log("提交修改");
+            try {
+              const result = await resetInspectionItemPlan({
+                musicGroupId: this.taskForm.musicGroupId,
+                planStart,
+                planEnd,
+                itemId: this.itemId,
+                id: this.taskInfo.id,
+              });
+                this.$message.success("提交成功");
+              this.$emit("refreshList", this.taskForm.date);
+            } catch (e) {
+              console.log(e);
+            }
+            // 修改
+          } else {
+            // 新增
+            try {
+              const result = await addInspectionItemPlan({
+                musicGroupId: this.taskForm.musicGroupId,
+                planStart,
+                planEnd,
+                itemId: this.itemId,
+              });
+              this.$message.success("提交成功");
+              this.$emit("refreshList", this.taskForm.date);
+            } catch (e) {}
+          }
+        }
+      });
+    },
+    changeStartTime(val) {
+      this.taskForm.endTimer = "";
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 111 - 0
src/views/main/teamSchedule/compontent/taskList.vue

@@ -0,0 +1,111 @@
+<template>
+  <div>
+    <el-table
+      style="width: 100%"
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      :data="tableList"
+    >
+      <el-table-column align="center" prop="studentId" label="事项"
+        ><template>
+          <div>下校巡查</div>
+        </template></el-table-column
+      >
+      <el-table-column align="center" prop="studentId" label="时间">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.planStart }}-{{
+              scope.row.planEnd | dayjsFormatMinute
+            }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="cooperationName"
+        label="合作单位"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        prop="musicGroupName"
+        label="乐团"
+      ></el-table-column>
+      <el-table-column align="center" prop="studentId" label="是否完成">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.status > 0 ? "已完成" : "未完成" }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="studentId" label="操作">
+        <template slot-scope="scope">
+          <auth :auths="['inspectionItemPlan/update']">
+            <div>
+              <el-button type="text" :disabled="!!scope.row.status" @click="resetList(scope.row)"
+                >修改日程</el-button
+              >
+            </div>
+          </auth>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      save-key="teamSchedule-taskList"
+      sync
+      :total.sync="rules.total"
+      :page.sync="rules.page"
+      :limit.sync="rules.limit"
+      :page-sizes="rules.page_size"
+      @pagination="getList"
+    />
+  </div>
+</template>
+<script>
+import pagination from "@/components/Pagination/index";
+import { getInspectionItemPlan } from "../../api";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      tableList: [],
+      rangeStart: "",
+      rangeEnd: "",
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
+  },
+  mounted() {
+    this.rangeStart = this.$route.query.startTime;
+    this.rangeEnd = this.$route.query.endTime;
+    this.userId = this.$route.query.teacher;
+    this.getList();
+  },
+  methods: {
+    async getList() {
+      try {
+        const result = await getInspectionItemPlan({
+          startTime: this.rangeStart,
+          endTime: this.rangeEnd,
+          userId: this.userId,
+          page: this.rules.page,
+          rows: this.rules.limit,
+        });
+        this.tableList = result.data.rows;
+        this.rules.total = result.data.total;
+        this.$emit('getTotal', result.data.total)
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    resetList(row){
+      this.$emit('resetSchedule',row)
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 43 - 16
src/views/main/teamSchedule/index.vue

@@ -107,7 +107,15 @@
       <el-table-column align="center" prop="studentId" label="操作">
         <template slot-scope="scope">
           <div>
-            <el-button type="text"  @click="gotoHander(scope.row)">安排日程</el-button>
+            <el-button
+              type="text"
+              v-if="scope.row.item == 'INSPECT'"
+              @click="gotoHander(scope.row)"
+              >安排日程</el-button
+            >
+            <el-button type="text" v-else @click="gotoHander(scope.row)"
+              >回访记录</el-button
+            >
             <auth :auths="['inspectionItem/update']">
               <el-button
                 type="text"
@@ -130,15 +138,12 @@
       @pagination="getList"
     />
     <el-dialog title="处理方式" width="700px" :visible.sync="handleVisible">
-      <el-form :model="handleForm">
-        <el-form-item label="请填写处理方式" prop="memo">
-          <el-input
-            type="textarea"
-            :rows="3"
-            v-model="handleForm.memo"
-          ></el-input>
-        </el-form-item>
-      </el-form>
+      <el-input
+        type="textarea"
+        :rows="3"
+        v-model="handleForm.memo"
+        placeholder="请填写处理方式"
+      ></el-input>
       <div slot="footer" class="dialog-footer">
         <el-button @click="handleVisible = false">取 消</el-button>
         <el-button type="primary" @click="submitHandle">确 定</el-button>
@@ -150,6 +155,7 @@
 import { getInspectionItem, resetInspectionItem } from "../api";
 import { permission } from "@/utils/directivePage";
 import pagination from "@/components/Pagination/index";
+import dayjs from "dayjs";
 export default {
   components: { pagination },
   data() {
@@ -158,6 +164,7 @@ export default {
         userId: "",
         organId: "",
         month: "",
+        ids:''
       },
       handleForm: {
         memo: "",
@@ -175,6 +182,11 @@ export default {
     };
   },
   mounted() {
+    if(this.$route.query.ids){
+      this.searchForm.ids = this.$route.query.ids
+    }else{
+       this.searchForm.ids = ''
+    }
     this.$store.dispatch("setBranchs");
     this.getList();
   },
@@ -183,8 +195,8 @@ export default {
       return permission(str);
     },
     onReSet() {
-      this.rules.page = 1;
       this.$refs.searchForm.resetFields();
+      this.search();
     },
     search() {
       this.rules.page = 1;
@@ -210,16 +222,31 @@ export default {
       console.log(this.handleForm);
       try {
         const res = await resetInspectionItem(this.handleForm);
-        this.$message.success('提交成功')
-        this.getList()
+        this.$message.success("提交成功");
+        this.getList();
         console.log(res);
       } catch (e) {
         console.log(e);
       }
     },
-    gotoHander(row){
-
-    }
+    gotoHander(row) {
+      let startTime = dayjs(row.month).startOf("month").format("YYYY-MM-DD");
+      let endTime = dayjs(row.month).endOf("month").format("YYYY-MM-DD");
+      if (row.item == "VISIT") {
+        // 学员回访
+        // 跳到回访页面 搜索条件 教务老师 时间范围
+        this.$router.push({
+          path: "/business/returnVisitList",
+          query: { teacher: row.userName, timer: [startTIme, endTIme] },
+        });
+      } else {
+        // 下校巡查
+        this.$router.push({
+          path: "/main/scheduleDetail",
+          query: { teacher: row.userId, startTime, endTime,name:row.userName,organId:row.organId,itemId:row.id,times:row.times},
+        });
+      }
+    },
   },
 };
 </script>

+ 419 - 0
src/views/main/teamSchedule/scheduleDetail.vue

@@ -0,0 +1,419 @@
+<template>
+  <div class="m-container">
+    <h2>
+      <el-page-header @back="onCancel" :content="title"></el-page-header>
+      <!-- <div class="squrt" /> -->
+    </h2>
+    <el-date-picker
+      v-model="week"
+      type="week"
+      format="yyyy-MM 第 WW 周"
+      value-format="yyyy-MM-dd"
+      placeholder="选择周"
+      @change="changeWeek"
+      :picker-options="{
+        firstDayOfWeek: 1,
+      }"
+    >
+    </el-date-picker>
+    <div class="taskList">
+      <div class="teamDot dotBtn" draggable="true">下校巡查</div>
+      <p>任务数量:<span :style="times>activeTotal?'color:red':''">{{activeTotal}}</span>/<span>{{times}}</span></p>
+    </div>
+    <div class="timeWrap">
+      <div class="weekDotList">
+        <!-- @click="setWeekDotList(item, index)" -->
+        <div class="weekDot" v-for="(item, index) in weekList" :key="index">
+          <p class="week">{{ item.week }}</p>
+          <p class="date">{{ item.dateStr }}</p>
+        </div>
+      </div>
+      <div class="timer" @drop="drop" @dragover="dragOver($event)">
+        <div class="imgWrap" v-drag>
+          <img :src="timerImg" />
+          <div v-for="(item, index) in taskList" :key="index + 'new'">
+            <el-popover placement="top" trigger="hover">
+              <p>巡查日期:{{ item.planStart | dayjsFormat }}</p>
+              <p>
+                巡查时间:{{ item.planStart | dayjsFormatMinute }}~{{
+                  item.planEnd | dayjsFormatMinute
+                }}
+              </p>
+              <p>巡查乐团:{{ item.musicGroupName }}</p>
+              <div
+                slot="reference"
+                :style="item.style"
+                class="teamDot dot"
+                @click="resetSchedule(item)"
+              >
+                下校巡查
+              </div>
+            </el-popover>
+          </div>
+        </div>
+      </div>
+    </div>
+    <el-dialog
+      :title="isNew ? '新增下校巡查' : '修改下校巡查'"
+      width="600px"
+      :visible.sync="taskStatus"
+      v-if="taskStatus"
+    >
+      <taskinfo
+        :taskInfo="activeTask"
+        ref="taskinfo"
+        :rangeStart="rangeStart"
+        :rangeEnd="rangeEnd"
+        :MusicGroupList="MusicGroupList"
+        :itemId="itemId"
+        @refreshList="refreshList"
+      />
+      <div slot="footer" style="margin-top: 20px" class="dialog-footer">
+        <el-button @click="taskStatus = false">取 消</el-button>
+        <el-button type="primary" v-if="isNew" @click="submitInfo(0)"
+          >确 定</el-button
+        >
+        <el-button type="primary" v-else @click="submitInfo(1)"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
+    <taskList ref="taskList" @resetSchedule="resetSchedule" @getTotal='getTotal'/>
+  </div>
+</template>
+<script>
+import dayjs from "dayjs";
+import { getInspectionItemPlan, getMusicGroup } from "../api";
+import taskinfo from "./compontent/taskInfo";
+import taskList from "./compontent/taskList";
+import { permission } from "@/utils/directivePage";
+import {
+  setDate,
+  getNowDateAndSunday,
+  getNowDateAndMonday,
+  getWeekDay,
+} from "@/utils/date";
+export default {
+  components: {
+    taskinfo,
+    taskList,
+  },
+  data() {
+    return {
+      timerImg: require("@/views/teacherManager/teacherDetail/components/weekUitl/weekTimer.png"),
+      active: -1,
+      week: new Date(),
+      weekList: [],
+      startTime: "",
+      endTime: "",
+      taskList: [],
+      weekDay: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
+      tableTime: "",
+      title: "",
+      userId: "",
+      taskStatus: false,
+      activeTask: null,
+      isNew: false,
+      rangeStart: "",
+      rangeEnd: "",
+      organId: "",
+      MusicGroupList: [],
+      times:'',
+      activeTotal:''
+    };
+  },
+  async mounted() {
+    this.init();
+    // 获取乐团
+    try {
+      const ruselt = await getMusicGroup({ organId: this.organId });
+      this.MusicGroupList = ruselt.data;
+    } catch (e) {}
+  },
+  methods: {
+    init() {
+      this.times = this.$route.query.times
+      this.itemId = this.$route.query.itemId;
+      this.organId = this.$route.query.organId;
+      this.rangeStart = this.$route.query.startTime;
+      this.rangeEnd = this.$route.query.endTime;
+      this.week = this.$route.query.startTime;
+      this.userId = this.$route.query.teacher;
+      this.startTime = this.$route.query.startTime;
+      let titleMoth = dayjs(this.startTime).format("MM");
+      this.title = `${this.$route.query.name}${titleMoth}月下校巡查安排`;
+      this.getCalendatList();
+      this.setWeekList();
+    },
+    setStartTimeAndEndTime(date) {
+      this.startTime = getNowDateAndMonday(date);
+      if (this.active === -1) {
+        this.active = 0;
+        this.tableTime = this.startTime;
+      }
+      this.endTime = getNowDateAndSunday(date);
+    },
+    async getCalendatList() {
+      // console.log(this.$route.query.startTIme)
+      // 获取本周的周一和周日 以及这一周得课
+      this.setStartTimeAndEndTime(this.week);
+      try {
+        const result = await getInspectionItemPlan({
+          startTime: this.startTime,
+          endTime: this.endTime,
+          userId: this.userId,
+          page: 1,
+          rows: 9999,
+        });
+        this.dataList = result.data.rows;
+        for (let i in this.dataList) {
+          this.setCourseTime(this.dataList[i]);
+          this.taskList.push(this.dataList[i]);
+        }
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    setCourseTime(row) {
+      let startMinutes = this.getMinutes(row.planStart.split(" ")[1]);
+      let endMinutes = this.getMinutes(row.planEnd.split(" ")[1]);
+      let width = (endMinutes - startMinutes) * 1.8;
+      let left = startMinutes - 240 > 0 ? (startMinutes - 240) * 1.8 + 17 : 17;
+      let top =
+        getWeekDay(row.planStart) === 1
+          ? 40
+          : getWeekDay(row.planStart) * 60 - 16;
+      row.style = {
+        width: width + "px",
+        top: top + "px",
+        left: left + "px",
+      };
+    },
+    getMinutes(str) {
+      return parseInt(str.split(":")[0]) * 60 + parseInt(str.split(":")[1]);
+    },
+    setWeekList() {
+      this.weekList = [];
+      let startTime = new Date(this.startTime.replace(/-/g, "/"));
+
+      startTime.setTime(startTime.getTime() - 1000 * 60 * 60 * 24);
+      for (let i = 0; i < 7; i++) {
+        startTime.setTime(startTime.getTime() + 1000 * 60 * 60 * 24);
+        // startTime.setTime(startTime.getTime() - 1000 * 60 * 60 * 24)
+        this.weekList.push({
+          week: this.weekDay[i],
+          dateStr: startTime.getMonth() + 1 + "月" + startTime.getDate() + "日",
+          date: setDate(startTime),
+        });
+      }
+    },
+    setWeekDotList(item, index) {
+      this.active = index;
+      this.tableTime = item.date;
+    },
+    changeWeek(val) {
+      this.week = val;
+      this.active = -1;
+      this.getCalendatList();
+      this.setWeekList();
+      this.$refs.taskList.getList();
+    },
+    onCancel() {
+      this.$router.push({
+        path: "/main/main",
+        query: { tabrouter: "teamSchedule" },
+      });
+    },
+
+    drop(e, name) {
+      this.isNew = true;
+      this.activeTask = null;
+      this.taskStatus = true;
+    },
+    dragOver(event) {
+      event.preventDefault();
+    },
+    submitInfo(val) {
+      // 新增修改提交
+      this.$refs.taskinfo.submitInfo(val);
+    },
+    refreshList(date) {
+      // 根据这个时间刷新
+
+      this.taskStatus = false;
+      this.changeWeek(date);
+    },
+    resetSchedule(row) {
+      // 判断是否有权限
+      if (permission("inspectionItemPlan/update")) {
+        this.isNew = false;
+        this.activeTask = row;
+        this.taskStatus = true;
+      }
+    },
+    getTotal(val){
+      this.activeTotal = val
+    }
+  },
+
+  directives: {
+    drag(el) {
+      // 拖拽大图片移动
+      let oDiv = el; //当前元素
+      let self = this; //上下文
+      oDiv.onmousedown = function (e) {
+        //鼠标按下,计算当前元素距离可视区的距离
+        let disX = e.clientX - oDiv.offsetLeft;
+        let disY = e.clientY - oDiv.offsetTop;
+        let wrapW = document.querySelector(".timer").offsetWidth;
+        let imgW = document.querySelector(".imgWrap").offsetWidth;
+        document.onmousemove = function (e) {
+          //通过事件委托,计算移动的距离
+          let l = e.clientX - disX;
+          let t = e.clientY - disY;
+          //移动当前元素
+
+          if (l > 0) {
+            l = 0;
+          } else if (l < -(imgW - wrapW) + 2) {
+            l = -(imgW - wrapW) + 2;
+          }
+
+          oDiv.style.left = l + "px";
+          // oDiv.style.top = t + "px";
+        };
+        document.onmouseup = function (e) {
+          document.onmousemove = null;
+          document.onmouseup = null;
+        };
+        return false;
+      };
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.taskList {
+  margin-top: 10px;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  .dotBtn {
+    cursor: pointer;
+    padding: 0 10px;
+    color: #fff;
+    font-size: 14px;
+    line-height: 25px;
+    border-radius: 3px;
+    margin-right: 20px;
+  }
+}
+.teamDot {
+  background: linear-gradient(
+    to left,
+    rgba(90, 121, 246, 0.75),
+    rgba(90, 121, 246, 1)
+  );
+}
+
+.timeWrap {
+  margin-top: 20px;
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  .timer {
+    width: 1478px;
+    overflow: auto;
+    position: relative;
+    .imgWrap {
+      width: 2194px;
+      position: relative;
+      z-index: 1;
+      img {
+        width: 2194px;
+        position: relative;
+        z-index: 1;
+      }
+      .dot {
+        -moz-user-select: none; /*火狐*/
+        -webkit-user-select: none; /*webkit浏览器*/
+        -ms-user-select: none; /*IE10*/
+        user-select: none;
+        cursor: pointer;
+        position: absolute;
+        min-width: 75px;
+        height: 25px;
+        color: #fff;
+        font-size: 14px;
+        line-height: 25px;
+        padding-left: 5px;
+        z-index: 10;
+        top: 40px;
+        right: 0;
+        border-radius: 3px;
+      }
+      .vipDot {
+        background: linear-gradient(
+          to left,
+          rgba(42, 174, 166, 0.75),
+          rgba(42, 174, 166, 1)
+        );
+      }
+      .newDot {
+        background: linear-gradient(
+          to left,
+          rgba(52, 177, 246, 0.75),
+          rgba(52, 177, 246, 1)
+        );
+      }
+    }
+  }
+  .weekDotList {
+    margin: 24px 10px 0 0;
+    width: 70px;
+    display: flex;
+    flex-direction: column;
+    background-color: #fff;
+
+    .weekDot {
+      cursor: pointer;
+      -moz-user-select: none; /*火狐*/
+      -webkit-user-select: none; /*webkit浏览器*/
+      -ms-user-select: none; /*IE10*/
+      user-select: none;
+      width: 70px;
+      height: 60px;
+      background-color: #fff;
+      color: #fff;
+      padding: 10px 0 10px 10px;
+      border-radius: 5px;
+      color: #000;
+      p {
+        font-size: 12px;
+        line-height: 20px;
+      }
+      .week {
+        font-size: 12px;
+        color: #999;
+      }
+      .date {
+        font-size: 12px;
+        color: #333;
+      }
+    }
+    .weekDot.active {
+      background-color: rgba(19, 129, 122, 1);
+      color: #fff !important;
+      border-radius: 5px;
+      .week {
+        font-size: 12px;
+        color: #fff;
+      }
+      .date {
+        font-size: 14px;
+        color: #fff;
+      }
+    }
+  }
+}
+</style>

+ 1 - 0
src/views/musicInspection/index.vue

@@ -3,6 +3,7 @@
     <div class="m-container">
         <h2>
             <div class="squrt"></div>乐团巡查
+            <filter-search @reload="getList" searchKey="ids" />
         </h2>
         <div class="m-core">
             <save-form :inline="true" ref="searchForm" @submit="search" @reset="onReSet" :model="searchForm">

+ 24 - 0
src/views/operationalEarly/operationalList.vue

@@ -38,6 +38,23 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item>
+          <el-select
+            v-model.trim="searchForm.lowSalary"
+            placeholder="请选择是否预警"
+            clearable
+            filterable
+          >
+            <el-option
+              value="0"
+              label="否"
+            ></el-option>
+            <el-option
+              value="1"
+              label="是"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
           <el-input v-model="searchForm.minSalary" type="number" placeholder="预警课酬大于"></el-input>
         </el-form-item>
         <el-form-item>
@@ -168,6 +185,7 @@ export default {
         monthStr: nowMonth,
         userId: null,
         maxSalary: null,
+        lowSalary: null,
       },
       tableList: [{}],
       organList: [],
@@ -188,6 +206,11 @@ export default {
     //     this.organList = res.data;
     //   }
     // })
+    const { lowSalary } = this.$route.query
+    let string = String(lowSalary)
+    if (string) {
+      this.$set(this.searchForm, 'lowSalary', string)
+    }
     this.$store.dispatch("setBranchs");
     // 获取老师列表
     // getTeacher({ organId: this.organId }).then(res => {
@@ -208,6 +231,7 @@ export default {
         monthStr: null,
         userId: null,
         maxSalary: null,
+        lowSalary: null,
       };
       this.getList();
     },

+ 42 - 15
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
@@ -273,6 +273,7 @@ import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import qs from "qs";
+import cleanDeep from 'clean-deep'
 import { getTeacher, getEmployeeOrgan } from "@/api/buildTeam";
 import { queryTeacherAttendances } from "@/api/recodeManager";
 import { jobNature, courseType } from "@/utils/searchArray";
@@ -299,7 +300,7 @@ export default {
       detail: null,
       appealVisible: false,
       jobNature: jobNature, // 工作类型
-      courseTime: [nowTime, nowTime],
+      courseTime: [],
       courseType,
       // teacherList: [],
       tableList: [],
@@ -313,6 +314,17 @@ export default {
       },
     };
   },
+  computed: {
+    isEmptyQuery() {
+      return !Object.keys(cleanDeep({
+        ...this.searchForm,
+        courseTime: this.courseTime,
+      })).length && !this.teacherAttendanceId
+    },
+    teacherAttendanceId() {
+      return this.$route.query.teacherAttendanceId
+    }
+  },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
@@ -329,6 +341,9 @@ export default {
     //   }
     // });
     this.$store.dispatch("setBranchs");
+    if (!this.teacherAttendanceId) {
+      this.courseTime = [nowTime, nowTime]
+    }
     this.init();
   },
   activated() {
@@ -338,15 +353,31 @@ export default {
     init() {
       this.getList();
     },
-    getList() {
-      let obj = { page: this.rules.page, rows: this.rules.limit };
+    getSearchValues() {
+      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];
-      } else {
-        this.$message.error("请选择搜索时间");
-        return;
+      }
+
+      return obj
+    },
+    reloadSearch() {
+      if (this.isEmptyQuery) {
+        this.courseTime = [nowTime, nowTime]
+      }
+      this.getList()
+    },
+    getList() {
+      let obj = this.getSearchValues()
+      if (this.isEmptyQuery) {
+        this.$message.error("请至少选择一个条件");
+        return
       }
       queryTeacherAttendances(obj).then((res) => {
         if (res.code == 200) {
@@ -389,14 +420,10 @@ export default {
       } catch (error) {}
     },
     onExport() {
-      let obj = { page: this.rules.page, rows: this.rules.limit };
-      Object.assign(obj, this.searchForm);
-      if (this.courseTime && this.courseTime.length > 0) {
-        obj.courseStartDate = this.courseTime[0];
-        obj.courseEndDate = this.courseTime[1];
-      } else {
-        this.$message.error("请选择搜索时间");
-        return;
+      let obj = this.getSearchValues()
+      if (this.isEmptyQuery) {
+        this.$message.error("请至少选择一个条件");
+        return
       }
       let url = "/api-web/export/queryTeacherAttendances";
       const options = {

+ 9 - 0
src/views/returnVisitManager/returnVisitList.vue

@@ -181,6 +181,8 @@ import { getEmployeeOrgan } from "@/api/buildTeam";
 import { getVisitList } from "./api.js";
 import cleanDeep from "clean-deep";
 import { getTimes } from "@/utils";
+import { resetQuery } from "@/utils/utils";
+
 export default {
   components: { pagination },
   data() {
@@ -214,6 +216,11 @@ export default {
     //   }
     // });
     this.$store.dispatch("setBranchs");
+
+    if(this.$route.query){
+      this.searchForm.teacher = this.$route.query.teacher
+      this.searchForm.timer = this.$route.query.timer
+    }
     this.getList();
   },
   activated() {
@@ -225,6 +232,8 @@ export default {
       this.searchForm.purpose = val[1];
     },
     search() {
+      // this.$router.replace({query:{...this.$route.query,timer:undefined,teacher:undefined}})
+      resetQuery(this,{timer:undefined,teacher:undefined})
       this.rules.page = 1;
       this.getList();
     },

+ 10 - 4
src/views/stuRecodeManager/index.vue

@@ -3,7 +3,7 @@
   <div class="m-container">
     <h2>
       <div class="squrt"></div>
-      学生考勤列表
+      学生考勤列表 <filter-search @reload="getList" searchKey="ids"/>
     </h2>
     <div class="m-core">
       <save-form
@@ -307,7 +307,7 @@ export default {
     return {
       searchForm: {
         studentID: "",
-        groupType: "MUSIC",
+        groupType: "",
         musicGroupId: "",
         courseScheduleId: "",
         status: "",
@@ -336,9 +336,12 @@ export default {
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
-    if (this.searchForm.dates?.length < 1) {
+    if (this.searchForm.dates?.length < 1 && !this.$route.query.ids) {
         this.searchForm.dates = [new Date(),new Date()]
     }
+    if (!this.$route.query.ids) {
+      this.$set(this.searchForm, 'groupType', 'MUSIC')
+    }
     this.init();
   },
 
@@ -354,6 +357,7 @@ export default {
         ...rest,
         page: this.rules.page,
         rows: this.rules.limit,
+        ids: this.$route.query.ids,
         ...getTimes(dates, ["classStartDate", "classEndDate"],  "YYYY-MM-DD"),
       };
       await Export(this, {
@@ -382,7 +386,9 @@ export default {
       //     "YYYY-MM-DD"
       //   ),
       // };
-      findStudentAttendance(obj).then((res) => {
+      findStudentAttendance(obj, {
+        ids: this.$route.query.ids,
+      }).then((res) => {
         if (res.code == 200) {
           this.tableList = res.data.rows;
           this.rules.total = res.data.total;

+ 3 - 6
src/views/teacherManager/teacherDetail/components/weeklyCalendar.vue

@@ -67,7 +67,7 @@
 </template>
 <script>
 import { superFindCourseSchedules } from "@/api/buildTeam";
-import { setDate, getCurrentMonthFirst, getCurrentMonthLast, getNowDateAndSunday, getNowDateAndMonday, getWeekDay } from "@/utils/date"
+import { setDate, getNowDateAndSunday, getNowDateAndMonday, getWeekDay } from "@/utils/date"
 import resetList from './resetComponent'
 export default {
   components: { resetList },
@@ -100,6 +100,7 @@ export default {
   },
   methods: {
     setStartTimeAndEndTime (date) {
+      console.log(setDate(date))
       this.startTime = getNowDateAndMonday(setDate(date))
       if (this.active === -1) {
         this.active = 0
@@ -178,12 +179,9 @@ export default {
   },
   directives: {
     drag (el) {
+      // 拖拽大图片移动
       let oDiv = el; //当前元素
       let self = this; //上下文
-      //禁止选择网页上的文字
-      // document.onselectstart = function () {
-      //   return false;
-      // };
       oDiv.onmousedown = function (e) {
         //鼠标按下,计算当前元素距离可视区的距离
         let disX = e.clientX - oDiv.offsetLeft;
@@ -209,7 +207,6 @@ export default {
           document.onmousemove = null;
           document.onmouseup = null;
         };
-        //return false不加的话可能导致黏连,就是拖到一个地方时div粘在鼠标上不下来,相当于onmouseup失效
         return false;
       };
     }

+ 2 - 11
src/views/teamDetail/teamList.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="m-container">
     <h2>
-      <div class="squrt"></div>乐团列表
+      <div class="squrt"></div>乐团列表 <filter-search @reload="getList"/>
     </h2>
     <div class="m-core">
       <div class="btnList" style="margin-bottom: 20px">
@@ -337,7 +337,6 @@ export default {
     closeStudens
   },
   mounted () {
-    // this.$set(this.topForm, 'teamName', this.$route.query.search)
     this.init();
   },
   activated () {
@@ -369,15 +368,6 @@ export default {
     reset () {
       this.rules.page = 1;
       this.$refs['topForm'].resetFields();
-      // if (this.$route.query.search) {
-      //   this.$router.replace({
-      //     path: this.$route.path,
-      //     query: {
-      //       ...this.$route.query,
-      //       search: undefined
-      //     }
-      //   })
-      // }
       this.getList()
     },
     search () {
@@ -392,6 +382,7 @@ export default {
         chargeTypeId: this.topForm.payType || null,
         musicGroupName: this.topForm.teamName || null,
         musicGroupStatus: this.topForm.status || null,
+        musicGroupId: this.$route.query.search
       }).then(res => {
         if (res.code == 200) {
           this.tableData = res.data.rows

+ 8 - 0
src/views/withdrawal-application/api.js

@@ -0,0 +1,8 @@
+import request from '@/utils/request2'
+
+export const musicGroupQuitQeryPage = data => {
+  return request({
+    url: '/api-web/musicGroupQuit/queryPage',
+    params: data
+  })
+}

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

@@ -0,0 +1,173 @@
+<template>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div>退团申请列表 <filter-search @reload="FetchList" searchKey="ids"/>
+    </h2>
+    <div class="m-core">
+      <save-form
+        :inline="true"
+        @submit="submit"
+        @reset="onReSet"
+        ref="searchForm"
+        :model.sync="searchForm"
+      >
+        <el-form-item>
+          <el-input
+            v-model.trim="searchForm.search"
+            clearable
+            placeholder="学员(乐团)编号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button native-type="submit" type="danger">搜索</el-button>
+          <el-button native-type="reset" type="primary">重置</el-button>
+        </el-form-item>
+      </save-form>
+      <el-table
+        :data="list"
+        style="width: 100%"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      >
+        <el-table-column
+          prop="userId"
+          label="学员编号"
+        >
+          <copy-text slot-scope="scope">{{scope.row.userId}}</copy-text>
+        </el-table-column>
+        <el-table-column
+          prop="userId"
+          label="学员姓名"
+        >
+          <copy-text slot-scope="scope">{{scope.row.user.username}}</copy-text>
+        </el-table-column>
+        <el-table-column
+          prop="musicGroupId"
+          label="所属乐团"
+        >
+          <copy-text slot-scope="scope">{{scope.row.musicGroup.name}}</copy-text>
+        </el-table-column>
+        <el-table-column
+          prop="createTime"
+          label="申请时间"
+        ></el-table-column>
+        <el-table-column
+          prop="userComment"
+          label="退团原因"
+        >
+          <overflow-text width="100%" slot-scope="scope" :text="scope.row.userComment"></overflow-text>
+        </el-table-column>
+        <el-table-column
+          align="center"
+          fixed="right"
+          width="160px;"
+          label="操作"
+          v-if="permission('musicGroupQuit/quitMusicGroup/quit') || permission('musicGroupQuit/quitMusicGroup/quit-only')"
+        >
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              v-if="permission('musicGroupQuit/quitMusicGroup/quit')"
+              :disabled="scope.row.status != 'PROCESSING'"
+              @click="quieTeamMask(scope.row)"
+            >退团退费</el-button>
+            <el-button
+              type="text"
+              v-if="permission('musicGroupQuit/quitMusicGroup/quit-only')"
+              :disabled="scope.row.status != 'PROCESSING'"
+              @click="quieTeam(scope.row)"
+            >退团</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        sync
+        :total.sync="rules.total"
+        :page.sync="rules.page"
+        :limit.sync="rules.limit"
+        :page-sizes="rules.page_size"
+        @pagination="FetchList"
+      />
+    </div>
+    <el-dialog title="退团退费" width="640px" :visible.sync="quitVisible">
+      <quitModal
+        v-if="quitVisible && detail"
+        :detail="detail"
+        @close="quitVisible = false"
+        @submited="FetchList"
+      />
+    </el-dialog>
+    <el-dialog title="退团" width="640px" :visible.sync="quitOnlyVisible">
+      <quitOnlyModal
+        v-if="quitOnlyVisible && detail"
+        :detail="detail"
+        @close="quitOnlyVisible = false"
+        @submited="FetchList"
+      />
+    </el-dialog>
+  </div>
+</template>
+<script>
+import pagination from "@/components/Pagination/index";
+import { permission } from '@/utils/directivePage'
+import quitModal from './modals/quit'
+import quitOnlyModal from './modals/quitOnly'
+import { musicGroupQuitQeryPage } from './api'
+const initSearch = {
+  search: ''
+}
+export default {
+  components: { pagination, quitModal, quitOnlyModal },
+  data() {
+    return {
+      quitVisible: false,
+      quitOnlyVisible: false,
+      detail: null,
+      list: [],
+      searchForm: {
+        ...initSearch
+      },
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    }
+  },
+  mounted() {
+    this.FetchList()
+  },
+  methods: {
+    permission,
+    submit() {
+      this.rules.page = 1
+      this.FetchList()
+    },
+    onReSet() {
+      this.searchForm = {...initSearch}
+      this.submit();
+    },
+    quieTeamMask(row) {
+      this.quitVisible = true
+      this.detail = row
+    },
+    quieTeam(row) {
+      this.quitOnlyVisible = true
+      this.detail = row
+    },
+    async FetchList() {
+      try {
+        const res = await musicGroupQuitQeryPage({
+          page: this.rules.page,
+          rows: this.rules.limit,
+          ids: this.$route.query.ids,
+          ...this.searchForm,
+        })
+        this.rules.total = res.data.total;
+        this.list = res.data.rows
+      } catch (error) {}
+    }
+  }
+}
+</script>

+ 104 - 0
src/views/withdrawal-application/modals/quit.vue

@@ -0,0 +1,104 @@
+<template>
+  <div>
+    <el-form :model="quitForm" ref="quitForm" :rules="quitRules" label-width="110px">
+      <el-form-item label="审核状态" prop="status">
+        <el-radio v-model.trim="quitForm.status" label="APPROVED"
+          >通过</el-radio
+        >
+        <el-radio v-model.trim="quitForm.status" label="DENIED"
+          >拒绝</el-radio
+        >
+      </el-form-item>
+      <el-form-item label="退还课程费用" prop="isRefundCourseFee">
+        <el-radio v-model.trim="quitForm.isRefundCourseFee" :label="true"
+          >是</el-radio
+        >
+        <el-radio v-model.trim="quitForm.isRefundCourseFee" :label="false"
+          >否</el-radio
+        >
+      </el-form-item>
+      <el-form-item label="退还乐器费用" prop="isRefundInstrumentFee">
+        <el-radio v-model.trim="quitForm.isRefundInstrumentFee" :label="true"
+          >是</el-radio
+        >
+        <el-radio v-model.trim="quitForm.isRefundInstrumentFee" :label="false"
+          >否</el-radio
+        >
+      </el-form-item>
+      <el-form-item label="退还教辅费用" prop="isRefundTeachingAssistantsFee">
+        <el-radio
+          v-model.trim="quitForm.isRefundTeachingAssistantsFee"
+          :label="true"
+          >是</el-radio
+        >
+        <el-radio
+          v-model.trim="quitForm.isRefundTeachingAssistantsFee"
+          :label="false"
+          >否</el-radio
+        >
+      </el-form-item>
+      <el-form-item label="退团原因" prop="reason">
+        <el-input type="textarea" v-model.trim="quitForm.reason" placeholder="请填写退团退费原因"></el-input>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer" style="text-align: right;">
+      <el-button @click="$emit('close')">取 消</el-button>
+      <el-button type="primary" @click="submit">确 定</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import { quitMusicGroup } from '@/api/journal'
+export default {
+  props: ['detail'],
+  data() {
+    return {
+      quitForm: {
+        status: '',
+        isRefundCourseFee: null,
+        isRefundInstrumentFee: null,
+        isRefundTeachingAssistantsFee: null,
+        reason: null,
+      },
+    }
+  },
+  computed: {
+    quitRules() {
+      const required = this.quitForm.status === 'APPROVED'
+      return {
+        status: [{ required: true, message: "请选择审核状态" }],
+        isRefundCourseFee: [
+          { required, message: "请选择是否退还课程费用" },
+        ],
+        isRefundInstrumentFee: [
+          { required, message: "选择是否退还乐器费用" },
+        ],
+        isRefundTeachingAssistantsFee: [
+          { required, message: "选择是否退还教辅费用" },
+        ],
+        reason: [{ required: true, message: "请填写退团退费原因" }],
+      }
+    }
+  },
+  methods: {
+    submit() {
+      this.$refs.quitForm.validate(async valid => {
+        if (valid) {
+          try {
+            await this.$confirm("是否确定提交?", "提示", {
+              type: 'warning',
+            })
+            await quitMusicGroup({
+              id: this.detail.id,
+              ...this.quitForm
+            })
+            this.$emit('close')
+            this.$emit('submited')
+            this.$message.success("提交成功")
+          } catch (error) {}
+        }
+      })
+    }
+  }
+}
+</script>

+ 63 - 0
src/views/withdrawal-application/modals/quitOnly.vue

@@ -0,0 +1,63 @@
+<template>
+  <div>
+    <el-form :model="quitForm" ref="quitForm" :rules="quitRules">
+      <el-form-item label="审核状态" prop="status">
+        <el-radio v-model.trim="quitForm.status" label="APPROVED"
+          >通过</el-radio
+        >
+        <el-radio v-model.trim="quitForm.status" label="DENIED"
+          >拒绝</el-radio
+        >
+      </el-form-item>
+      <el-form-item label="退团原因" prop="reason">
+        <el-input type="textarea" v-model.trim="quitForm.reason" placeholder="请填写退团退费原因"></el-input>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer" style="text-align: right;">
+      <el-button @click="$emit('close')">取 消</el-button>
+      <el-button type="primary" @click="submit">确 定</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import { quitMusicGroup } from '@/api/journal'
+export default {
+  props: ['detail'],
+  data() {
+    return {
+      quitForm: {
+        status: '',
+        isRefundCourseFee: false,
+        isRefundInstrumentFee: false,
+        isRefundTeachingAssistantsFee: false,
+        reason: null,
+      },
+      quitRules: {
+        status: [{ required: true, message: "请选择审核状态" }],
+        reason: [{ required: true, message: "请填写退团退费原因" }],
+      },
+    }
+  },
+  methods: {
+    submit() {
+      this.$refs.quitForm.validate(async valid => {
+        if (valid) {
+          try {
+            await this.$confirm("是否确定退团?", "提示", {
+              type: 'warning',
+            })
+            await quitMusicGroup({
+              musicGroupId: this.detail.musicGroupId,
+              userId: this.detail.userId,
+              ...this.quitForm
+            })
+            this.$emit('close')
+            this.$emit('submited')
+            this.$message.success("退团成功")
+          } catch (error) {}
+        }
+      })
+    }
+  }
+}
+</script>

Some files were not shown because too many files changed in this diff