lex-xin 4 gadi atpakaļ
vecāks
revīzija
180b8c482c
46 mainītis faili ar 2553 papildinājumiem un 618 dzēšanām
  1. 0 0
      dist/index.html
  2. 0 0
      dist/static/css/app.95a0c018.css
  3. 1 0
      dist/static/css/app.a3301cdf.css
  4. 0 0
      dist/static/css/chunk-3837e5ae.98ee72c2.css
  5. 0 0
      dist/static/js/app.5a244797.js
  6. 0 0
      dist/static/js/chunk-1341b691.27806c32.js
  7. 0 0
      dist/static/js/chunk-359433da.ff094258.js
  8. 0 0
      dist/static/js/chunk-3837e5ae.bdc99657.js
  9. 5 1
      src/App.vue
  10. 6 0
      src/components/remote-search/index.vue
  11. 2 0
      src/components/save-form/index.vue
  12. 12 6
      src/layout/components/TagsView.vue
  13. 2 0
      src/router/index.js
  14. 4 0
      src/router/notKeepAliveList.js
  15. 3 2
      src/store/modules/app.js
  16. 25 2
      src/store/modules/selects.js
  17. 0 1
      src/views/categroyManager/insideSetting/addressManager.vue
  18. 8 2
      src/views/main/abnormal/index.vue
  19. 21 0
      src/views/main/abnormal/title.vue
  20. 1 0
      src/views/main/api.js
  21. 179 60
      src/views/main/baseinfo/business.vue
  22. 216 53
      src/views/main/baseinfo/curriculum.vue
  23. 13 5
      src/views/main/baseinfo/hr.vue
  24. 169 104
      src/views/main/baseinfo/index.vue
  25. 229 59
      src/views/main/baseinfo/management.vue
  26. 132 0
      src/views/main/baseinfo/modals/searchHeader.vue
  27. 12 5
      src/views/main/baseinfo/operate.vue
  28. 217 87
      src/views/main/baseinfo/student.vue
  29. 106 0
      src/views/main/baseinfo/studentBaseinfo.vue
  30. 68 0
      src/views/main/baseinfo/surplusCourse.vue
  31. 68 0
      src/views/main/baseinfo/useCourse.vue
  32. 55 26
      src/views/main/constant.js
  33. 1 1
      src/views/main/reminders/index.vue
  34. 26 0
      src/views/serverDetail/api.js
  35. 125 0
      src/views/serverDetail/conponent/afterWork.vue
  36. 97 0
      src/views/serverDetail/conponent/outWork.vue
  37. 26 0
      src/views/serverDetail/conponent/serverMask.vue
  38. 383 0
      src/views/serverDetail/index.vue
  39. 31 4
      src/views/teacherManager/teacherDetail/components/courseInfo.vue
  40. 250 186
      src/views/teamDetail/componentCourse/compoundClass.vue
  41. 16 0
      src/views/teamDetail/componentCourse/resetClass.vue
  42. 25 8
      src/views/teamDetail/components/courseList.vue
  43. 2 2
      src/views/teamDetail/teamCourseList.vue
  44. 2 2
      src/views/teamDetail/teamDetailedList.vue
  45. 3 1
      src/views/workBenchManager/journal/model/leave.vue
  46. 12 1
      vue.config.js

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/index.html


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.95a0c018.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
dist/static/css/app.a3301cdf.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/chunk-3837e5ae.98ee72c2.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.5a244797.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-1341b691.27806c32.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-359433da.ff094258.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-3837e5ae.bdc99657.js


+ 5 - 1
src/App.vue

@@ -19,7 +19,11 @@ export default {
       isRouterAlive: true,
     };
   },
-  created() {},
+  created() {
+
+
+
+  },
   methods: {
     reloads() {
       this.isRouterAlive = false;

+ 6 - 0
src/components/remote-search/index.vue

@@ -31,7 +31,12 @@
 <script>
 const placeholder = {
   setTeachers: "请选择老师",
+<<<<<<< HEAD
   setEducations: "请选乐团主管"
+=======
+  setEducations: "请选乐团主管",
+  setEmploys:"请选择操作人"
+>>>>>>> origin/03/08IndexAtten
 };
 import { throttle, slice, uniqBy } from "lodash";
 import selects from "@/store/modules/selects";
@@ -131,6 +136,7 @@ export default {
       return {
         setTeachers: "teachers",
         setEducations: "educations",
+        setEmploys:'employs'
       };
     },
   },

+ 2 - 0
src/components/save-form/index.vue

@@ -26,6 +26,7 @@ export default {
   },
   methods: {
     setFormValue() {
+
       const searchs = new Searchs(this.saveKey || this.$route.path)
       this.searchs = searchs
       const active = searchs.get()
@@ -44,6 +45,7 @@ export default {
       evt.stopImmediatePropagation()
       evt.preventDefault()
       this.searchs.update(this.model, undefined, 'form')
+        console.log(  new Searchs().searchs)
       if (this.$listeners.submit) {
         this.$listeners.submit(evt)
       }

+ 12 - 6
src/layout/components/TagsView.vue

@@ -109,14 +109,19 @@ export default {
     },
     syncTagViewAndSaveForm() {
       const keys = this.$store.state.tagsView.visitedViews.map(
-        (item) => item.path
+        (item) => {
+          // console.log(item)
+          return item.path}
       );
       const searchs = new Searchs();
       const allSearch = searchs.getSearchs();
+
       const sks = Object.keys(allSearch);
+
       let route = this.$route;
       for (const item of sks) {
-        if (!(keys.includes(item) || keys.includes(allSearch[item].bind))) {
+        //|| (!(keys.includes(item)) &&
+        if ( keys.includes(allSearch[item].bind)){
           searchs.removeByKey(item);
         }
 
@@ -140,6 +145,7 @@ export default {
       }
       // console.log(this.$route)
       await this.$store.dispatch("addVisitedViews", route);
+
       this.syncTagViewAndSaveForm();
     },
     moveToCurrentTag() {
@@ -193,18 +199,18 @@ export default {
     closeMenu() {
       this.visible = false;
     },
-    changeTag(tag) {
-      console.log(tag);
-      activeKey = this.getSearchsByRealPath(tag);
+    async changeTag(tag) {
+      activeKey = await this.getSearchsByRealPath(tag);
     },
     getSearchsByRealPath(tag) {
       const searchs = new Searchs();
       let keyName = "";
 
-      console.log(searchs.searchs);
+
       for (const key in searchs.searchs) {
         if (Object.hasOwnProperty.call(searchs.searchs, key)) {
           const item = searchs.searchs[key];
+
           if (tag.path === key || item.bind === tag.path) {
             keyName = item.bind || tag.path;
           }

+ 2 - 0
src/router/index.js

@@ -382,6 +382,8 @@ export const asyncRoutes = {
   WithdrawalApplication:()=>import('@/views/withdrawal-application'),
   // 欠费学员列表
   ArrearageStudents: () => import('@/views/arrearage-students'),
+  // 服务指标明细
+  serverDetail:()=>import('@/views/serverDetail')
 }
 
 export default router

+ 4 - 0
src/router/notKeepAliveList.js

@@ -97,6 +97,10 @@ export default [
   '/business/auditFailed',
   '/business/resetTeaming', // 进行中修改
   '/business/teacherOperationUpdate',
+<<<<<<< HEAD
   '/business/ArrearageStudents'
+=======
+  '/operateManager/serverDetail', // 服务指标明细
+>>>>>>> origin/03/08IndexAtten
   // '/business/feeAudit',
 ]

+ 3 - 2
src/store/modules/app.js

@@ -15,6 +15,7 @@ const state = {
     musicPatrol: false,
     studentInfo: false,
     teacherInfo: false,
+    attendanceServe:false
   },
 }
 
@@ -38,10 +39,10 @@ const mutations = {
     state.device = device
   },
   COMMIT_DOT_STATUS: (state, status) => {
-    const { musicPatrol, studentInfo, teacherInfo } = status
+    const { musicPatrol, studentInfo, teacherInfo,attendanceServe } = status
     state.status = {
       ...status,
-      indexErrData: musicPatrol || studentInfo || teacherInfo
+      indexErrData: musicPatrol || studentInfo || teacherInfo || attendanceServe
     }
     toggleDot(state.status)
   }

+ 25 - 2
src/store/modules/selects.js

@@ -1,7 +1,7 @@
 /* eslint-disable no-empty */
 // import { branchQueryPage } from '@/api/specialSetting'
 import { getSubject, getTeacher,findEducationUsers,getEmployeeOrgan } from '@/api/buildTeam'
-import { getSchool } from '@/api/systemManage'
+import { getSchool,queryEmployByOrganId } from '@/api/systemManage'
 import { vipGroupCategory } from "@/api/vipSeting"
 import { findTechnician } from '@/api/repairManager'
 
@@ -26,7 +26,8 @@ export default {
     schools: [],
     vipGroupCategory: [],
     educations:[],
-    technician: []
+    technician: [],
+    employs:[],
   },
   mutations: {
     commit_branchs: (state, branchs) => {
@@ -57,6 +58,17 @@ export default {
     },
     commit_technician: (state, technician) => {
       state.technician = technician
+    },
+    commit_employs:(state,employs)=>{
+      state.employs = employs.map(emloys=>{
+        return {
+          ...emloys,
+          id:emloys.id,
+          userId:emloys.id,
+          userName:emloys.realName,
+          realName:emloys.realName
+        }
+      })
     }
   },
   actions: {
@@ -131,6 +143,17 @@ export default {
         loadings.commit_technician = false
       }
 
+    },
+    async setEmploys({commit,state},force){
+      if ((!state.employs.length || force === true) && !loadings.commit_employs) {
+        loadings.commit_employs = queryEmployByOrganId({rows:99999})
+        try {
+          const res = await loadings.commit_employs
+          commit('commit_employs', res.data.rows)
+        } catch (error) {}
+        loadings.commit_employs = false
+      }
+
     }
   }
 }

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

@@ -622,7 +622,6 @@ export default {
       });
     },
     openTeaching(type, row) {
-      console.log(row);
       // 重置数据
       // this.form = {
       //   id: null,

+ 8 - 2
src/views/main/abnormal/index.vue

@@ -40,7 +40,7 @@
     >
       <title-item
         :type="item[0].isError ? 'error' : 'warning'"
-        :data="item.map(title => ({name: title.desc, num: title.num}))"
+        :data="item.map(title => ({name: title.desc, num: title.num,errorType:title.errorType}))"
       >
         <span
           style="color: #14928A;"
@@ -110,11 +110,15 @@ export default {
           name: '日常行政',
           num: status.teacherInfo || false,
         },
+        ATTENDANCE_SERVE:{
+          name:'考勤及服务',
+          num: status.attendanceServe || false,
+        }
       }
     },
     permissionTags() {
       const url = 'getIndexErrData?errorType='
-      const permissions = ['MUSIC_PATROL', 'STUDENT_INFO', 'TEACHER_INFO']
+      const permissions = ['MUSIC_PATROL', 'STUDENT_INFO', 'TEACHER_INFO','ATTENDANCE_SERVE']
       return permissions.filter(item => {
         return this.permission(url + item)
       })
@@ -134,6 +138,7 @@ export default {
       return tags
     },
     activeList() {
+
       const list = this.listByType[this.activeKey] || []
       return list
     },
@@ -180,6 +185,7 @@ export default {
             ...row,
           }
         )
+
       }
       return Object.values(list)
     },

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

@@ -3,13 +3,27 @@
     <div>
       <span v-for="(item, index) in data" :key="index">
         <span>{{item.name}}</span>
+              <el-tooltip
+            v-if="descs[item.errorType]"
+            :content="descs[item.errorType]"
+            :open-delay="0.3"
+            placement="top"
+          >
+          <!-- color: #f56c6c -->
+            <i
+               class="el-icon-warning-outline"
+                style="font-size: 14px; "
+            />
+          </el-tooltip>
         <b>{{item.num}}</b>
       </span>
+
     </div>
     <slot/>
   </div>
 </template>
 <script>
+import { descs } from '../constant'
 export default {
   props: {
     type: {
@@ -20,6 +34,13 @@ export default {
       type: Array,
       default: []
     }
+  },
+  data(){
+    return{
+     descs
+    }
+  },
+  mounted(){
   }
 }
 </script>

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

@@ -4,6 +4,7 @@ import request2 from '@/utils/request2'
 export const getIndex = data => request2({
   url: '/api-web/newIndex',
   params: data,
+  loading: false,
   method: 'get',
 })
 export const getInspectionItem = data => request2({

+ 179 - 60
src/views/main/baseinfo/business.vue

@@ -1,109 +1,228 @@
-<template>
-  <el-card header="业务数据">
+<template
+>
+  <el-card header="">
+    <div slot="header" class="clearfix">
+      <searchHeader
+        v-if="mdate.length > 0"
+        :dates="mdate"
+        :title="'业务数据'"
+        :isShowQuert="false"
+        @changeValue="changeValue"
+      />
+    </div>
+
     <statistic class="statistic" :cols="0">
-      <statistic-item v-for="(item, key) in items" :key="key" :class="{active: active === key}" @click="active = key">
+      <statistic-item
+        v-for="(item, key) in items"
+        :key="key"
+        :class="{ active: active === key }"
+        @click="active = key"
+      >
         <span>
-          {{item.title}}
-          <el-tooltip v-if="item.desc" :content="item.desc" :open-delay=".3" placement="top">
-            <i style="margin-left: 5px;cursor: pointer;" class="el-icon-warning-outline"/>
+          {{ item.title }}
+          <el-tooltip
+            v-if="item.desc"
+            :content="item.desc"
+            :open-delay="0.3"
+            placement="top"
+          >
+            <i
+              style="margin-left: 5px; cursor: pointer"
+              class="el-icon-warning-outline"
+            />
           </el-tooltip>
         </span>
-        <span>
-          <count-to :endVal="item.percent" :decimals="2"/>%
-        </span>
+        <span> <count-to :endVal="item.percent" :decimals="2" />% </span>
       </statistic-item>
     </statistic>
-    <ve-histogram
-      style="width: 100%;"
+    <!--   :data-zoom="dataZoom" -->
+    <ve-line
+      style="width: 100%"
       height="350px"
       :data="chartData"
       :data-empty="dataEmpty"
-      :data-zoom="dataZoom"
       :extend="chartExtend"
-    ></ve-histogram>
+      :legend="legend"
+    ></ve-line>
   </el-card>
 </template>
 <script>
-import 'v-charts/lib/style.css'
-import 'echarts/lib/component/dataZoom'
-import countTo from 'vue-count-to'
-import veHistogram from 'v-charts/lib/histogram.common'
+import "v-charts/lib/style.css";
+import "echarts/lib/component/dataZoom";
+import countTo from "vue-count-to";
+import veLine from "v-charts/lib/line.common";
+import searchHeader from "./modals/searchHeader";
+import { getTimes } from "@/utils";
+import { getIndex } from "../api";
+import { descs, chioseNum } from "../constant";
+import { getNowDateAndSunday, getNowDateAndMonday } from "@/utils/date";
 export default {
-  props: ['data'],
+  props: ["data", "search"],
   components: {
-    've-histogram': veHistogram,
-    'count-to': countTo
+    "count-to": countTo,
+    "ve-line": veLine,
+    searchHeader,
   },
   computed: {
+    legend() {
+      return {
+        left: "10px",
+      };
+    },
     items() {
       return {
-        ACTIVATION_RATE: this.data['ACTIVATION_RATE'] || {},
-        HOMEWORK_CREATE_RATE: this.data['HOMEWORK_CREATE_RATE'] || {},
-        HOMEWORK_SUBMIT_RATE: this.data['HOMEWORK_SUBMIT_RATE'] || {},
-        HOMEWORK_COMMENT_RATE: this.data['HOMEWORK_COMMENT_RATE'] || {},
-      }
+        HOMEWORK_CREATE_RATE: this.data["HOMEWORK_CREATE_RATE"] || {},
+        HOMEWORK_SUBMIT_RATE: this.data["HOMEWORK_SUBMIT_RATE"] || {},
+        HOMEWORK_COMMENT_RATE: this.data["HOMEWORK_COMMENT_RATE"] || {},
+      };
     },
     chartExtend() {
       return {
+        series: {
+          smooth: false,
+        },
+        yAxis: {
+          //纵轴标尺固定
+          minInterval:1,
+          type: "value",
+          scale: true,
+          min: 0,
+          max:100,
+          axisLabel:{
+            formatter:'{value}%'
+          }
+        },
         tooltip: {
           axisPointer: {
-            type: 'shadow',
+            type: "shadow",
             shadowStyle: {
-              color: 'rgba(150,150,150,0.2)'
+              color: "rgba(150,150,150,0.2)",
             },
           },
-          formatter: item => {
-            return [item[0].axisValueLabel, ...item.map(d => `<br/>${d.marker}${d.seriesName}: ${d.value} %`)].join('')
-          }
-        }
-      }
+
+          formatter: (item) => {
+            return [
+              item[0].axisValueLabel,
+              ...item.map(
+                (d) => `<br/>${d.marker}${d.seriesName}: ${d.value} %`
+              ),
+            ].join("");
+          },
+        },
+      };
     },
     dataZoom() {
       return [
         {
-          type: 'slider',
-          start: 60,
-          end: 100
-        }
-      ]
+          grid: {
+            left: "0%",
+          },
+          type: "slider",
+          start: 40,
+          end: 100,
+        },
+      ];
     },
     chartData() {
-      const values = Object.values(this.items)
-      const months = {}
+      const values = Object.values(this.items);
+      const months = {};
       for (const item of values) {
-        for (const row of (item.indexMonthData || [])) {
-          const key = this.$helpers.dayjs(row.month).format('YYYY-MM-DD')
+        for (const row of item.indexMonthData || []) {
+          const key = this.$helpers.dayjs(row.month).format("YYYY-MM-DD");
           if (!months[key]) {
             months[key] = {
-              '日期': key,
-            }
+              日期: key + "/" + getNowDateAndSunday(key),
+            };
           }
-          months[key][item.title] = row.percent
+          months[key][item.title] = row.percent;
         }
       }
+
       return {
-        columns: ['日期', ...values.map(item => item.title)],
-        rows: Object.values(months)
-      }
+        columns: [
+          "日期",
+          ...values.map((item) => {
+            return item.title;
+          }),
+        ],
+        rows: Object.values(months),
+      };
     },
     dataEmpty() {
-      return !this.chartData.rows.length
+      return !this.chartData.rows.length;
     },
   },
-  data () {
+  data() {
     return {
-      active: 'ACTIVATION_RATE',
-    }
+      active: "ACTIVATION_RATE",
+      mdate: [],
+      loading: false,
+    };
   },
-}
+  mounted() {
+    let nowTiem = this.$helpers.dayjs(new Date()).format("YYYY-MM-DD");
+    let startTime = this.$helpers
+      .dayjs(getNowDateAndMonday(nowTiem))
+      .subtract(49, "day")
+      .format("YYYY-MM-DD");
+    let endTime = getNowDateAndSunday(nowTiem);
+    this.mdate = [startTime, endTime];
+    this.FetchDetail();
+  },
+  methods: {
+    changeValue(date) {
+      // 请求更改数据
+      this.mdate = date;
+      //  this.isDayOrMoth(date)
+      this.FetchDetail();
+    },
+    async FetchDetail() {
+      this.loading = true;
+      const data = this.data;
+      try {
+        const { dates, ...rest } = this.search;
+        const res = await getIndex({
+          ...rest,
+          ...getTimes(this.mdate, ["startDate", "endDate"]),
+          dataTypes:
+            "HOMEWORK_CREATE_RATE,HOMEWORK_SUBMIT_RATE,HOMEWORK_COMMENT_RATE",
+        });
+        for (const item of res.data) {
+          // 再循环一遍
+          for (const key in this.items) {
+            if (item.dataType == key) {
+              data[item.dataType] = {
+                ...item,
+                desc: descs[item.dataType],
+              };
+            }
+          }
+        }
+      } catch (error) {
+        console.log(error);
+      }
+      this.loading = false;
+      this.dataInfo = data;
+      this.$emit("resetDate", data);
+    },
+  },
+};
 </script>
 <style lang="less" scoped>
-  // .statistic{
-  //   /deep/ .statistic-content{
-  //     cursor: pointer;
-  //     &.active > span{
-  //       color: #14928a !important;
-  //     }
-  //   }
-  // }
+// .statistic{
+//   /deep/ .statistic-content{
+//     cursor: pointer;
+//     &.active > span{
+//       color: #14928a !important;
+//     }
+//   }
+// }
+.chioseBox {
+  position: absolute;
+  right: 20px;
+  z-index: 1000;
+}
+.wrap {
+  position: relative;
+}
 </style>

+ 216 - 53
src/views/main/baseinfo/curriculum.vue

@@ -1,92 +1,255 @@
-<template>
-  <el-card header="课程数据">
+<template v-loading="loading"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.8)">
+  <el-card>
+    <div slot="header" class="clearfix">
+      <searchHeader
+        :dates="mdate"
+        :title="'课程数据'"
+        @changeValue="changeValue"
+        :isShowQuert="true"
+      />
+    </div>
     <statistic class="statistic" :cols="0">
-      <statistic-item v-for="(item, key) in items" :key="key" :class="{active: active === key}" @click="active = key">
+      <statistic-item
+        v-for="(item, key) in items"
+        :key="key"
+        :class="{ active: active === key }"
+        @click="active = key"
+      >
         <span>
-          {{item.title}}
-          <el-tooltip v-if="item.desc" :content="item.desc" :open-delay=".3" placement="top">
-            <i style="margin-left: 5px;cursor: pointer;" class="el-icon-warning-outline"/>
+          {{ item.title }}
+          <el-tooltip
+            v-if="item.desc"
+            :content="item.desc"
+            :open-delay="0.3"
+            placement="top"
+          >
+            <i
+              style="margin-left: 5px; cursor: pointer"
+              class="el-icon-warning-outline"
+            />
           </el-tooltip>
         </span>
-        <span>
-          <count-to :endVal="item.percent"/>
-        </span>
+        <span> <count-to :endVal="item.percent" />节 </span>
       </statistic-item>
     </statistic>
-    <ve-line :settings="{
-        area: true,
-      }"
-      :data="chartData"
-      height="350px"
-      :data-empty="dataEmpty"
-      :data-zoom="dataZoom"
-    />
+    <div class="wrap">
+      <div class="chioseBox">
+        <el-radio-group v-model="timer" size="mini">
+          <el-radio-button label="day">按天</el-radio-button>
+          <el-radio-button label="month">按月</el-radio-button>
+        </el-radio-group>
+      </div>
+      <!-- :data-zoom="dataZoom" -->
+      <ve-line
+        :data="timer == 'day' ? chartData : chartDataForMoth"
+        height="350px"
+        :data-empty="dataEmpty"
+        :extend="chartExtend"
+        :legend="legend"
+      />
+    </div>
   </el-card>
 </template>
 <script>
-import 'echarts/lib/component/dataZoom'
-import countTo from 'vue-count-to'
-import veLine from 'v-charts/lib/line.common'
+import "echarts/lib/component/dataZoom";
+import countTo from "vue-count-to";
+import veLine from "v-charts/lib/line.common";
+import searchHeader from "./modals/searchHeader";
+import { getIndex } from "../api";
+import { getTimes } from "@/utils";
+import { descs, chioseNum } from "../constant";
 export default {
-  props: ['data'],
+  props: ["data", "search"],
   components: {
-    've-line': veLine,
-    'count-to': countTo
+    "ve-line": veLine,
+    "count-to": countTo,
+    searchHeader,
   },
   computed: {
+    legend() {
+      return {
+        left: "10px",
+      };
+    },
     items() {
       return {
-        MUSIC_GROUP_COURSE: this.data['MUSIC_GROUP_COURSE'] || {},
-        VIP_GROUP_COURSE: this.data['VIP_GROUP_COURSE'] || {},
-        PRACTICE_GROUP_COURSE: this.data['PRACTICE_GROUP_COURSE'] || {},
-      }
+        MUSIC_GROUP_COURSE: this.data["MUSIC_GROUP_COURSE"] || {},
+        VIP_GROUP_COURSE: this.data["VIP_GROUP_COURSE"] || {},
+        PRACTICE_GROUP_COURSE: this.data["PRACTICE_GROUP_COURSE"] || {},
+      };
     },
     dataZoom() {
       return [
         {
-          type: 'slider',
+          type: "slider",
           start: 50,
-          end: 100
-        }
-      ]
+          end: 100,
+        },
+      ];
     },
     chartData() {
-      const values = Object.values(this.items)
-      const months = {}
+      const values = Object.values(this.items);
+      const months = {};
       for (const item of values) {
-        for (const row of (item.indexMonthData || [])) {
-          const key = this.$helpers.dayjs(row.month).format('YYYY-MM-DD')
+        for (const row of item.indexMonthData || []) {
+          const key = this.$helpers.dayjs(row.month).format("YYYY-MM-DD");
           if (!months[key]) {
             months[key] = {
-              '日期': key,
-            }
+              日期: key,
+            };
           }
-          months[key][item.title] = row.percent
+          months[key][item.title] = row.percent;
         }
       }
       return {
-        columns: ['日期', ...values.map(item => item.title)],
-        rows: Object.values(months)
+        columns: ["日期", ...values.map((item) => item.title)],
+        rows: Object.values(months),
+      };
+    },
+    chartDataForMoth() {
+      const values = Object.values(this.items);
+      const months = {};
+      for (const item of values) {
+        for (const row of item.indexMonthData || []) {
+          const key = this.$helpers.dayjs(row.month).format("YYYY-MM");
+
+          if (!months[key]) {
+            months[key] = {
+              月份: key,
+            };
+            months[key][item.title] = row.percent;
+          } else {
+            if (months[key][item.title]) {
+              months[key][item.title] += parseFloat(row.percent);
+            } else {
+              months[key][item.title] = row.percent;
+            }
+          }
+        }
       }
+
+      return {
+        columns: ["月份", ...values.map((item) => item.title)],
+        rows: Object.values(months),
+      };
     },
     dataEmpty() {
-      return !this.chartData.rows.length
+      return !this.chartData.rows.length;
+    },
+    chartExtend() {
+      return {
+        series: {
+          smooth: false,
+        },
+        yAxis: {
+          //纵轴标尺固定
+          minInterval:1,
+          type: "value",
+          scale: true,
+          min: 0,
+            axisLabel:{
+            formatter:'{value}节'
+          }
+        },
+        tooltip: {
+          axisPointer: {
+            type: "shadow",
+            shadowStyle: {
+              color: "rgba(150,150,150,0.2)",
+            },
+          },
+
+          formatter: (item) => {
+            return [
+              item[0].axisValueLabel,
+              ...item.map(
+                (d) => `<br/>${d.marker}${d.seriesName}: ${d.value} %`
+              ),
+            ].join("");
+          },
+        },
+      };
     },
   },
-  data () {
+  data() {
     return {
-      active: 'MUSIC_GROUP_COURSE',
-    }
+      active: "MUSIC_GROUP_COURSE",
+      timer: "day",
+      mdate: this.search?.dates,
+      loading: false,
+    };
   },
-}
+  methods: {
+    changeValue(date) {
+      // 请求更改数据
+      this.mdate = date;
+      this.isDayOrMoth(date);
+      this.FetchDetail();
+    },
+    async FetchDetail() {
+      this.loading = true;
+      const data = this.data;
+      try {
+        const { dates, ...rest } = this.search;
+        const res = await getIndex({
+          ...rest,
+          ...getTimes(this.mdate, ["startDate", "endDate"]),
+          dataTypes:
+            "MUSIC_GROUP_COURSE,VIP_GROUP_COURSE,PRACTICE_GROUP_COURSE",
+        });
+        for (const item of res.data) {
+          // 再循环一遍
+          for (const key in this.items) {
+
+            if (item.dataType == key) {
+              data[item.dataType] = {
+                ...item,
+                desc: descs[item.dataType],
+              };
+            }
+          }
+        }
+      } catch (error) {
+        console.log(error);
+      }
+
+      this.loading = false;
+      this.dataInfo = data;
+      this.$emit("resetDate", data);
+    },
+    isDayOrMoth(arr) {
+
+      if (!arr || arr.length < 1) {
+        this.timer = "day";
+      } else {
+        const count = this.$helpers
+          .dayjs(arr[0])
+          .diff(this.$helpers.dayjs(arr[1]), "day");
+        Math.abs(count) > chioseNum
+          ? (this.timer = "month")
+          : (this.timer = "day");
+      }
+    },
+  },
+};
 </script>
 <style lang="less" scoped>
-  // .statistic{
-  //   /deep/ .statistic-content{
-  //     cursor: pointer;
-  //     &.active > span{
-  //       color: #14928a !important;
-  //     }
-  //   }
-  // }
+// .statistic{
+//   /deep/ .statistic-content{
+//     cursor: pointer;
+//     &.active > span{
+//       color: #14928a !important;
+//     }
+//   }
+// }
+.chioseBox {
+  position: absolute;
+  right: 20px;
+  z-index: 1000;
+}
+.wrap {
+  position: relative;
+}
 </style>

+ 13 - 5
src/views/main/baseinfo/hr.vue

@@ -1,5 +1,12 @@
 <template>
-  <el-card header="人事数据">
+  <el-card >
+      <div slot="header" class="clearfix">
+        <div class="box">
+          <span class='shape'></span>
+          <span>人事数据</span>
+        </div>
+
+      </div>
     <statistic class="statistic" :cols="0">
       <statistic-item v-for="(item, key) in items" :key="key" :class="{active: active === key}" @click="active = key">
         <span>
@@ -9,18 +16,18 @@
           </el-tooltip>
         </span>
         <span>
-          <count-to :endVal="item.percent"/>
+          <count-to :endVal="item.percent"/>
         </span>
       </statistic-item>
     </statistic>
-    <ve-histogram
+    <!-- <ve-histogram
       style="width: 100%;"
       height="350px"
       :data="chartData"
       :data-empty="dataEmpty"
       :data-zoom="dataZoom"
       :extend="chartExtend"
-    ></ve-histogram>
+    ></ve-histogram> -->
   </el-card>
 </template>
 <script>
@@ -33,13 +40,14 @@ export default {
     've-histogram': veHistogram,
     'count-to': countTo
   },
+  //     DIMISSION_NUM: this.data['DIMISSION_NUM'] || {},
   computed: {
     items() {
       return {
         TEACHER_NUM: this.data['TEACHER_NUM'] || {},
         FULL_TIME_NUM: this.data['FULL_TIME_NUM'] || {},
         PART_TIME_NUM: this.data['PART_TIME_NUM'] || {},
-        DIMISSION_NUM: this.data['DIMISSION_NUM'] || {},
+
       }
     },
     chartExtend() {

+ 169 - 104
src/views/main/baseinfo/index.vue

@@ -1,7 +1,15 @@
 <template>
-  <div class="container">
-    <save-form inline :model="search" @submit="FetchDetail" @reset="reset" saveKey="/main/main/baseInfo">
-      <el-form-item prop="year">
+  <div
+    class="container"
+  >
+    <save-form
+      inline
+      :model="search"
+      @submit="FetchDetail"
+      @reset="reset"
+      saveKey="/main/main/baseInfo"
+    >
+      <!-- <el-form-item prop="year">
         <el-date-picker
           v-model="search.dates"
           type="daterange"
@@ -12,7 +20,7 @@
           end-placeholder="结束日期"
           :picker-options="pickerOptions">
         </el-date-picker>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item prop="organId">
         <el-select
           clearable
@@ -20,59 +28,75 @@
           placeholder="请选择分部"
           v-model="search.organId"
         >
-          <el-option v-for="(item,index) in selects.branchs"
+          <el-option
+            v-for="(item, index) in selects.branchs"
             :key="index"
             :label="item.name"
-            :value="item.id"></el-option>
+            :value="item.id"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-button native-type="submit" type="primary">搜索</el-button>
       <el-button native-type="reset" type="danger">重置</el-button>
     </save-form>
-    <el-alert type="info" :closable="false" style="margin-bottom: 20px;">
+    <!-- <el-alert type="info" :closable="false" style="margin-bottom: 20px;">
       每日0点更新前一日数据
-    </el-alert>
-    <empty desc="暂无统计数据" v-if="isEmpty"/>
+    </el-alert> -->
+    <!-- 这里显示选项卡 -->
+    <empty desc="暂无统计数据" v-if="isEmpty" />
     <el-row v-else class="rows" :gutter="20">
-      <el-col :xs="24" :sm="24" :md="12">
-        <student :data="dataInfo"/>
+      <el-col :xs="24" :sm="24" :md="24" :lg="9" :xl="9">
+        <studentbaseinfo :data="dataInfo" />
       </el-col>
-      <el-col :xs="24" :sm="24" :md="12" :xl="12">
-        <management :data="dataInfo"/>
+      <el-col :xs="24" :sm="24" :md="24" :lg="6" :xl="6">
+        <operate :data="dataInfo" />
       </el-col>
-      <el-col :xs="24" :sm="24" :md="12">
-        <business :data="dataInfo"/>
+      <el-col :xs="24" :sm="24" :md="24" :lg="9" :xl="9">
+        <hrdata :data="dataInfo" />
       </el-col>
-      <el-col :xs="24" :sm="24" :md="12">
-        <curriculum :data="dataInfo"/>
+      <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
+        <surplusCourse :data="dataInfo" />
       </el-col>
-      <el-col :xs="24" :sm="24" :md="12">
-        <operate :data="dataInfo"/>
+      <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
+        <useCourse :data="dataInfo" />
       </el-col>
-      <el-col :xs="24" :sm="24" :md="12">
-        <hrdata :data="dataInfo"/>
+      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
+        <management :data="dataInfo" :search="search" @resetDate="resetDate" />
+      </el-col>
+      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
+        <business :data="dataInfo" :search="search" @resetDate="resetDate" />
       </el-col>
+        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+        <curriculum :data="dataInfo" :search="search" @resetDate="resetDate" />
+      </el-col>
+      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+        <student :data="dataInfo" :search="search" @resetDate="resetDate" />
+      </el-col>
+
+
+      <!-- <el-col :xs="24" :sm="24" :md="12">
+        <operate :data="dataInfo"/>
+      </el-col> -->
+      <!-- <el-col :xs="24" :sm="24" :md="12">
+        <hrdata :data="dataInfo"/>
+      </el-col> -->
     </el-row>
   </div>
 </template>
 <script>
-import { getIndex } from '../api'
-import operate from './operate'
-import business from './business'
-import management from './management'
-import hrdata from './hr'
-import student from './student'
-import curriculum from './curriculum'
-import { getTimes } from '@/utils'
-import { descs } from '../constant'
+import { getIndex } from "../api";
+import operate from "./operate";
+import business from "./business";
+import management from "./management";
+import hrdata from "./hr";
+import student from "./student";
+import curriculum from "./curriculum";
+import studentbaseinfo from "./studentBaseinfo";
+import surplusCourse from "./surplusCourse";
+import useCourse from "./useCourse";
+import { getTimes } from "@/utils";
+import { descs } from "../constant";
 
-const getInitDate = () => {
-  const end = new Date();
-  const start = new Date();
-  end.setTime(end.getTime() - 3600 * 1000 * 24 * 1);
-  start.setTime(start.getTime() - 3600 * 1000 * 24 * 8);
-  return [start, end]
-}
 export default {
   components: {
     operate,
@@ -81,104 +105,145 @@ export default {
     hrdata,
     student,
     curriculum,
+    studentbaseinfo,
+    surplusCourse,
+    useCourse,
   },
-  data () {
+  data() {
     return {
       pickerOptions: {
-          firstDayOfWeek: 1,
-        disabledDate: a => {
-          const { dayjs } = this.$helpers
-          return dayjs(a).isAfter(dayjs().subtract(1, 'day'))
+        disabledDate: (a) => {
+          const { dayjs } = this.$helpers;
+          return dayjs(a).isAfter(dayjs().subtract(1, "day"));
         },
-        shortcuts: [{
-          text: '最近一周',
-          onClick(picker) {
-            const end = new Date();
-            const start = new Date();
-            end.setTime(end.getTime() - 3600 * 1000 * 24 * 1);
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 8);
-            picker.$emit('pick', [start, end]);
-          }
-        }, {
-          text: '最近一个月',
-          onClick(picker) {
-            const end = new Date();
-            const start = new Date();
-            end.setTime(end.getTime() - 3600 * 1000 * 24 * 1);
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 31);
-            picker.$emit('pick', [start, end]);
-          }
-        }, {
-          text: '最近三个月',
-          onClick(picker) {
-            const end = new Date();
-            const start = new Date();
-            end.setTime(end.getTime() - 3600 * 1000 * 24 * 1);
-            start.setTime(start.getTime() - 3600 * 1000 * 24 * 91);
-            picker.$emit('pick', [start, end]);
-          }
-        }]
+        shortcuts: [
+          {
+            text: "最近一周",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              end.setTime(end.getTime() - 3600 * 1000 * 24 * 1);
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 8);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近一个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              end.setTime(end.getTime() - 3600 * 1000 * 24 * 1);
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 31);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近三个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              end.setTime(end.getTime() - 3600 * 1000 * 24 * 1);
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 91);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+        ],
       },
       search: {
-        dates: [],
-        organId: null
+        dates:[],
+        organId: null,
       },
       dataInfo: {},
       business: {},
-    }
+      loading: false,
+    };
   },
   computed: {
     isEmpty() {
-      return !Object.keys(this.dataInfo).length
-    }
+      return !Object.keys(this.dataInfo).length;
+    },
   },
-  created(){
-    this.$set(this.search, 'dates', getInitDate())
+  created() {
+
+
   },
-  mounted () {
-    this.FetchDetail()
-    //  this.reset() 和卧龙大佬商量过
-    this.$store.dispatch('setBranchs')
+  mounted() {
+     this.$set(this.search, "dates", this.getInitDate());
+    this.FetchDetail();
+    this.$store.dispatch("setBranchs");
   },
   methods: {
+    getInitDate() {
+      const end = this.$helpers
+        .dayjs(new Date())
+        .subtract(1, "day")
+        .format("YYYY-MM-DD");
+      const start = this.$helpers
+        .dayjs(new Date())
+        .subtract(1, "day")
+        .set("date", 1)
+        .format("YYYY-MM-DD");
+      return [start, end];
+    },
     reset() {
-      this.$set(this.search, 'dates', getInitDate())
-      this.$set(this.search, 'organId', null)
-      this.FetchDetail()
+      this.$set(this.search, "dates", this.getInitDate());
+      this.$set(this.search, "organId", null);
+      this.FetchDetail();
     },
     async FetchDetail() {
-      const data = {}
+      const data = {};
       try {
-        const {dates, ...rest} = this.search
+        const { dates, ...rest } = this.search;
         const res = await getIndex({
           ...rest,
-          ...getTimes(dates, ['startDate', 'endDate'])
-        })
+          ...getTimes(dates, ["startDate", "endDate"]),
+        });
         for (const item of res.data) {
           data[item.dataType] = {
             ...item,
-            desc: descs[item.dataType]
-          }
+            desc: descs[item.dataType],
+          };
         }
       } catch (error) {
-        console.log(error)
+        console.log(error);
       }
-      this.dataInfo = data
+      this.dataInfo = data;
     },
-  }
-}
+    resetDate(data) {
+      this.dataInfo = data;
+    },
+  },
+};
 </script>
 <style lang="less" scoped>
-  .container{
-    overflow: hidden;
-    .rows{
-      >div{
-        margin-bottom: 20px;
-      }
-    }
-    /deep/ .el-card__body .statistic {
-      margin-bottom: 15px;
-      padding: 0;
+.container {
+  overflow: hidden;
+  .rows {
+    > div {
+      margin-bottom: 20px;
     }
   }
+  /deep/ .el-card__body .statistic {
+    margin-bottom: 15px;
+    padding: 0;
+  }
+}
+/deep/.el-card__header {
+  padding: 0 20px !important;
+}
+</style>
+<style lang="scss">
+.box {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  height: 55px;
+  line-height: 55px;
+  .shape {
+    margin-right: 10px;
+    height: 18px;
+    width: 4px;
+    background-color: #14928a;
+  }
+}
 </style>

+ 229 - 59
src/views/main/baseinfo/management.vue

@@ -1,104 +1,274 @@
-<template>
-  <el-card header="经营数据">
+<template >
+  <el-card>
+    <div slot="header" class="clearfix">
+      <searchHeader
+        :dates="mdate"
+        :title="'经营数据'"
+        @changeValue="changeValue"
+        :isShowQuert="true"
+      />
+    </div>
     <statistic :col="5" class="statistic" :cols="0">
-      <statistic-item v-for="(item, key) in items" :key="key" :class="{active: active === key}" @click="active = key">
+      <statistic-item
+        v-for="(item, key) in items"
+        :key="key"
+        :class="{ active: active === key }"
+        @click="active = key"
+      >
         <span>
-          {{item.title}}
-          <el-tooltip v-if="item.desc" :content="item.desc" :open-delay=".3" placement="top">
-            <i style="margin-left: 5px;cursor: pointer;" class="el-icon-warning-outline"/>
+          {{ item.title }}
+          <el-tooltip
+            v-if="item.desc"
+            :content="item.desc"
+            :open-delay="0.3"
+            placement="top"
+          >
+            <i
+              style="margin-left: 5px; cursor: pointer"
+              class="el-icon-warning-outline"
+            />
           </el-tooltip>
         </span>
         <span>
-          <count-to :endVal="item.percent" :decimals="2"/>
+          <count-to :endVal="item.percent" :decimals="2" />
         </span>
       </statistic-item>
     </statistic>
-    <ve-line :settings="{
-        area: true,
-      }"
-      :data="chartData"
-      height="350px"
-      :data-empty="dataEmpty"
-      :data-zoom="dataZoom"
-      :extend="chartExtend"
-    />
+    <!-- 按月/按天 -->
+
+    <div class="wrap">
+      <div class="chioseBox">
+        <el-radio-group v-model="timer" size="mini">
+          <el-radio-button label="day">按天</el-radio-button>
+          <el-radio-button label="month">按月</el-radio-button>
+        </el-radio-group>
+      </div>
+      <!--   v-if="timer == 'day'"    DD-->
+      <ve-line
+        :data="timer == 'day' ? chartData : chartDataForMoth"
+        height="350px"
+        :data-empty="dataEmpty"
+        :extend="chartExtend"
+        :legend="legend"
+      />
+      <!-- <ve-line
+      v-else
+        :data-zoom="dataZoom"
+        :settings="{
+          area: true,
+        }"
+        :data="chartDataForMoth"
+        height="350px"
+        :data-empty="dataEmpty"
+        :data-zoom="dataZoom"
+        :extend="chartExtend"
+        :legend="legend"
+      /> -->
+    </div>
   </el-card>
 </template>
 <script>
-import 'echarts/lib/component/dataZoom'
-import countTo from 'vue-count-to'
-import veLine from 'v-charts/lib/line.common'
+import "echarts/lib/component/dataZoom";
+import countTo from "vue-count-to";
+import veLine from "v-charts/lib/line.common";
+import searchHeader from "./modals/searchHeader";
+import { getIndex } from "../api";
+import { getTimes } from "@/utils";
+import { descs, chioseNum } from "../constant";
+
 export default {
-  props: ['data'],
+  props: ["data", "search"],
   components: {
-    've-line': veLine,
-    'count-to': countTo
+    "ve-line": veLine,
+    "count-to": countTo,
+    searchHeader,
   },
   computed: {
+    legend() {
+      return {
+        left: "10px",
+      };
+    },
     items() {
       return {
-        FINANCE_AMOUNT: this.data['FINANCE_AMOUNT'] || {},
-        FINANCE_BALANCE_AMOUNT: this.data['FINANCE_BALANCE_AMOUNT'] || {},
-        FINANCE_PAY: this.data['FINANCE_PAY'] || {},
-      }
+        FINANCE_AMOUNT: this.data["FINANCE_AMOUNT"] || {},
+        FINANCE_BALANCE_AMOUNT: this.data["FINANCE_BALANCE_AMOUNT"] || {},
+        FINANCE_PAY: this.data["FINANCE_PAY"] || {},
+      };
     },
     chartExtend() {
       return {
+        series: {
+          smooth: false,
+        },
+        yAxis: {
+          //纵轴标尺固定
+          minInterval:1,
+          type: "value",
+          scale: true,
+          min: 0,
+          axisLabel: {
+            formatter: "{value}元",
+          },
+        },
         tooltip: {
-          formatter: item => {
-            return [item[0].axisValueLabel, ...item.map(d => {
-              return `<br/>${d.marker}${d.seriesName}: ${this.$helpers.numeral(d.value[1]).format('0,0.00')}`
-            })].join('')
-          }
-        }
-      }
+          formatter: (item) => {
+            return [
+              item[0].axisValueLabel,
+              ...item.map((d) => {
+                return `<br/>${d.marker}${
+                  d.seriesName
+                }: ${this.$helpers.numeral(d.value[1]).format("0,0.00")}`;
+              }),
+            ].join("");
+          },
+        },
+      };
     },
     dataZoom() {
       return [
         {
-          type: 'slider',
+          type: "slider",
           start: 50,
-          end: 100
-        }
-      ]
+          end: 100,
+          filterMode: "empty",
+        },
+      ];
     },
     chartData() {
-      const values = Object.values(this.items)
-      const months = {}
+      const values = Object.values(this.items);
+      const months = {};
       for (const item of values) {
-        for (const row of (item.indexMonthData || [])) {
-          const key = this.$helpers.dayjs(row.month).format('YYYY-MM-DD')
+        for (const row of item.indexMonthData || []) {
+          const key = this.$helpers.dayjs(row.month).format("YYYY-MM-DD");
           if (!months[key]) {
             months[key] = {
-              '日期': key,
-            }
+              日期: key,
+            };
           }
-          months[key][item.title] = row.percent
+          months[key][item.title] = row.percent;
         }
       }
       return {
-        columns: ['日期', ...values.map(item => item.title)],
-        rows: Object.values(months)
+        columns: ["日期", ...values.map((item) => item.title)],
+        rows: Object.values(months),
+        loading: true,
+      };
+    },
+    chartDataForMoth() {
+      const values = Object.values(this.items);
+      console.log(values);
+      const months = {};
+      for (const item of values) {
+        for (const row of item.indexMonthData || []) {
+          const key = this.$helpers.dayjs(row.month).format("YYYY-MM");
+
+          if (!months[key]) {
+            months[key] = {
+              月份: key,
+            };
+            months[key][item.title] = row.percent;
+          } else {
+            if (months[key][item.title]) {
+              months[key][item.title] += parseFloat(row.percent);
+            } else {
+              months[key][item.title] = row.percent;
+            }
+          }
+        }
       }
+
+      return {
+        columns: ["月份", ...values.map((item) => item.title)],
+        rows: Object.values(months),
+        loading: true,
+      };
     },
+
     dataEmpty() {
-      return !this.chartData.rows.length
+      return !this.chartData.rows.length;
     },
   },
-  data () {
+  data() {
     return {
-      active: 'SHOULD_INCOME_MONEY',
-    }
+      active: "SHOULD_INCOME_MONEY",
+      timer: "day",
+      mdate: this.search?.dates,
+      loading: false,
+    };
   },
-}
+  created() {
+    console.log(this.search?.dates);
+  },
+  methods: {
+    changeValue(date) {
+      // 请求更改数据
+      this.mdate = date;
+      this.isDayOrMoth(date);
+      this.FetchDetail();
+    },
+    async FetchDetail() {
+      this.loading = true;
+      const data = this.data;
+      try {
+        const { dates, ...rest } = this.search;
+        const res = await getIndex({
+          ...rest,
+          ...getTimes(this.mdate, ["startDate", "endDate"]),
+          dataTypes: "FINANCE_AMOUNT,FINANCE_BALANCE_AMOUNT,FINANCE_PAY",
+        });
+        for (const item of res.data) {
+          // 再循环一遍
+          for (const key in this.items) {
+            // console.log(key);
+            if (item.dataType == key) {
+              data[item.dataType] = {
+                ...item,
+                desc: descs[item.dataType],
+              };
+            }
+          }
+        }
+      } catch (error) {
+        console.log(error);
+      }
+      console.log(data);
+      this.dataInfo = data;
+      this.loading = false;
+      this.$emit("resetDate", data);
+    },
+
+    isDayOrMoth(arr) {
+      console.log(arr);
+      if (!arr || arr.length < 1) {
+        this.timer = "day";
+      } else {
+        const count = this.$helpers
+          .dayjs(arr[0])
+          .diff(this.$helpers.dayjs(arr[1]), "day");
+        Math.abs(count) > chioseNum
+          ? (this.timer = "month")
+          : (this.timer = "day");
+      }
+    },
+  },
+};
 </script>
 <style lang="less" scoped>
-  // .statistic{
-  //   /deep/ .statistic-content{
-  //     cursor: pointer;
-  //     &.active > span{
-  //       color: #14928a !important;
-  //     }
-  //   }
-  // }
+// .statistic{
+//   /deep/ .statistic-content{
+//     cursor: pointer;
+//     &.active > span{
+//       color: #14928a !important;
+//     }
+//   }
+// }
+.chioseBox {
+  position: absolute;
+  right: 20px;
+  z-index: 1000;
+}
+.wrap {
+  position: relative;
+}
 </style>

+ 132 - 0
src/views/main/baseinfo/modals/searchHeader.vue

@@ -0,0 +1,132 @@
+<template>
+  <div class="titleWrap">
+    <div class="box">
+      <span class="shape"></span>
+      <span>{{title}}</span>
+    </div>
+    <div class="right">
+      <el-radio-group v-model="timer" size="mini" @change="changeQuick" v-if="isShowQuert">
+        <el-radio-button label="month">本月</el-radio-button>
+        <el-radio-button label="year">本年度</el-radio-button>
+        <el-radio-button label="lastYear">去年</el-radio-button>
+      </el-radio-group>
+      <el-date-picker
+      v-if="isShowQuert"
+        v-model="date"
+        type="daterange"
+        style="width: 300px;padding: 0 10px"
+        range-separator="-"
+        start-placeholder="开始日期"
+        end-placeholder="结束日期"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+        size="mini"
+        @change="changeValue"
+     :picker-options="bigin()"
+      >
+      </el-date-picker>
+            <el-date-picker
+      v-else
+        v-model="date"
+        type="daterange"
+        style="width: 300px;padding: 0 10px"
+        range-separator="-"
+        start-placeholder="开始日期"
+        end-placeholder="结束日期"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+        size="mini"
+      @change="changeWeek"
+   :picker-options="bigin()"
+      >
+      </el-date-picker>
+
+
+    </div>
+  </div>
+</template>
+<script>
+import {
+  getNowDateAndSunday,
+  getNowDateAndMonday,
+} from "@/utils/date";
+export default {
+  props:['title','dates','isShowQuert'],
+  data() {
+    return {
+      timer: "",
+      date:this.dates,
+    };
+  },
+  methods: {
+    changeWeek(val){
+      this.date = [getNowDateAndMonday(val[0]),getNowDateAndSunday(val[1])]
+       this.submitDate( this.date)
+    },
+    changeValue(val) {
+       this.timer = ''
+       this.date = val;
+        this.submitDate( this.date)
+    },
+    changeQuick(val) {
+      let startDate;
+      let endDate;
+      if (val == "month") {
+        // 获取本月的第一天 获取本月的今天
+        startDate = this.$helpers
+          .dayjs(new Date())
+          .set("date", 1)
+          .format("YYYY-MM-DD");
+        endDate = this.$helpers.dayjs(new Date()).subtract(1, 'day').format("YYYY-MM-DD");
+        this.date = [startDate, endDate];
+        this.submitDate( this.date)
+      } else if (val == "year") {
+        startDate = this.$helpers
+          .dayjs(new Date())
+          .set("month", 0)
+          .set("date", 1)
+          .format("YYYY-MM-DD");
+        endDate = this.$helpers.dayjs(new Date()).subtract(1, 'day').format("YYYY-MM-DD");
+        this.date = [startDate, endDate];
+        this.submitDate( this.date)
+      } else if (val == "lastYear") {
+        startDate = this.$helpers
+          .dayjs(new Date())
+          .subtract(1, "year")
+          .set("month", 0)
+          .set("date", 1)
+          .format("YYYY-MM-DD");
+        endDate = this.$helpers
+          .dayjs()
+          .subtract(1, "year")
+          .endOf("year")
+          .format("YYYY-MM-DD");
+        this.date = [startDate, endDate];
+          this.submitDate( this.date)
+      }
+    },
+    submitDate(date){
+      this.$emit('changeValue',date)
+    },
+    bigin(){
+      let self = this;
+      return {
+        firstDayOfWeek: 1,
+        disabledDate(time) {
+            return time.getTime() >= Date.now()-24 * 60 * 60 * 1000;
+        },
+      };
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.titleWrap {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  .right {
+    margin-top: 15px;
+  }
+}
+</style>

+ 12 - 5
src/views/main/baseinfo/operate.vue

@@ -1,5 +1,12 @@
 <template>
-  <el-card header="运营数据">
+  <el-card >
+          <div slot="header" class="clearfix">
+        <div class="box">
+          <span class='shape'></span>
+          <span>运营数据</span>
+        </div>
+
+      </div>
     <statistic class="statistic" :cols="0">
       <statistic-item v-for="(item, key) in items" :key="key" :class="{active: active === key}" @click="active = key">
         <span>
@@ -9,18 +16,18 @@
           </el-tooltip>
         </span>
         <span>
-          <count-to :endVal="item.percent"/>
+          <count-to :endVal="item.percent"/>
         </span>
       </statistic-item>
     </statistic>
-    <ve-histogram
+    <!-- <ve-histogram
       style="width: 100%;"
       height="350px"
       :data="chartData"
       :data-empty="dataEmpty"
       :data-zoom="dataZoom"
       :extend="chartExtend"
-    ></ve-histogram>
+    ></ve-histogram> -->
   </el-card>
 </template>
 <script>
@@ -37,7 +44,7 @@ export default {
     items() {
       return {
         SCHOOL: this.data['SCHOOL'] || {},
-        MUSIC_GROUP_NUM: this.data['MUSIC_GROUP_NUM'] || {},
+        PROGRESS_MUSIC_GROUP_NUM: this.data['PROGRESS_MUSIC_GROUP_NUM'] || {},
       }
     },
     chartExtend() {

+ 217 - 87
src/views/main/baseinfo/student.vue

@@ -1,138 +1,268 @@
-<template>
+<template
+v-loading="loading"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.8)">
   <el-card>
     <div slot="header" class="clearfix">
-      <span>学员变动</span>
-      <el-button
-        @click="isHistogram = !isHistogram"
-        style="float: right; padding: 0px 0"
-        type="text"
-      >{{isHistogram ? '学员转化漏斗图' : '学员柱状图'}}</el-button>
+      <searchHeader
+        :dates="mdate"
+        :title="'学员变动'"
+        @changeValue="changeValue"
+        :isShowQuert="true"
+      />
     </div>
-    <statistic :col="5" class="statistic" :cols="0">
-      <statistic-item v-for="(item, key) in items" :key="key" :class="{active: active === key}" @click="active = key">
+    <statistic :col="6" class="statistic" :cols="0">
+      <statistic-item
+        v-for="(item, key) in items"
+        :key="key"
+        :class="{ active: active === key }"
+        @click="active = key"
+      >
         <span>
-          {{item.title}}
-          <el-tooltip v-if="item.desc" :content="item.desc" :open-delay=".3" placement="top">
-            <i style="margin-left: 5px;cursor: pointer;" class="el-icon-warning-outline"/>
+          {{ item.title }}
+          <el-tooltip
+            v-if="item.desc"
+            :content="item.desc"
+            :open-delay="0.3"
+            placement="top"
+          >
+            <i
+              style="margin-left: 5px; cursor: pointer"
+              class="el-icon-warning-outline"
+            />
           </el-tooltip>
         </span>
-        <span>
-          <count-to :endVal="item.percent"/>
-        </span>
-      </statistic-item>
-      <statistic-item>
-        <span>
-          {{data['STUDENT_CONVERSION'].title}}
-          <el-tooltip v-if="data['STUDENT_CONVERSION'].desc" :content="data['STUDENT_CONVERSION'].desc" :open-delay=".3" placement="top">
-            <i style="margin-left: 5px;cursor: pointer;" class="el-icon-warning-outline"/>
-          </el-tooltip>
-        </span>
-        <span>
-          <count-to :endVal="data['STUDENT_CONVERSION'].percent"/>%
-        </span>
+        <span> <count-to :endVal="item.percent" />人 </span>
       </statistic-item>
     </statistic>
-    <ve-histogram
-      style="width: 100%;"
-      height="350px"
-      :data="chartData"
-      :data-empty="dataEmpty"
-      :data-zoom="dataZoom"
-      :extend="chartExtend"
-       v-if="isHistogram"
-    ></ve-histogram>
-    <ve-funnel v-else style="width: 100%;" height="350px" :data="funnelData" :data-empty="dataEmpty"></ve-funnel>
+    <div class="wrap">
+      <div class="chioseBox">
+        <el-radio-group v-model="timer" size="mini">
+          <el-radio-button label="day">按天</el-radio-button>
+          <el-radio-button label="month">按月</el-radio-button>
+        </el-radio-group>
+      </div>
+      <!--  :data-zoom="dataZoom" -->
+      <ve-line
+        style="width: 100%"
+        height="350px"
+        :data="timer == 'day' ? chartData : chartDataForMoth"
+        :data-empty="dataEmpty"
+        :extend="chartExtend"
+        :legend="legend"
+      ></ve-line>
+    </div>
+    <!-- <ve-funnel v-else style="width: 100%;" height="350px" :data="funnelData" :data-empty="dataEmpty"></ve-funnel> -->
   </el-card>
 </template>
 <script>
-import countTo from 'vue-count-to'
-import veHistogram from 'v-charts/lib/histogram.common'
-import veFunnel from 'v-charts/lib/funnel.common'
+import countTo from "vue-count-to";
+import veLine from "v-charts/lib/line.common";
+import veFunnel from "v-charts/lib/funnel.common";
+import searchHeader from "./modals/searchHeader";
+import { getIndex } from "../api";
+import { getTimes } from "@/utils";
+import { descs, chioseNum } from "../constant";
 export default {
-  props: ['data'],
+  props: ["data", "search"],
   components: {
-    've-funnel': veFunnel,
-    've-histogram': veHistogram,
-    'count-to': countTo
+    "ve-funnel": veFunnel,
+      "ve-line": veLine,
+    "count-to": countTo,
+    searchHeader,
   },
   computed: {
+    legend() {
+      return {
+        left: "10px",
+      };
+    },
     items() {
       return {
-        MUSIC_GROUP_STUDENT: this.data['MUSIC_GROUP_STUDENT'] || {},
-        OTHER_STUDENT: this.data['OTHER_STUDENT'] || {},
-        NEWLY_STUDENT_NUM: this.data['NEWLY_STUDENT_NUM'] || {},
-        QUIT_MUSIC_GROUP_STUDENT_NUM: this.data['QUIT_MUSIC_GROUP_STUDENT_NUM'] || {},
-      }
+        ADD_STUDENT_REGISTRATION_NUM:
+          this.data["ADD_STUDENT_REGISTRATION_NUM"] || {},
+        MUSIC_GROUP_STUDENT: this.data["MUSIC_GROUP_STUDENT"] || {},
+        NEWLY_STUDENT_NUM: this.data["NEWLY_STUDENT_NUM"] || {},
+        QUIT_MUSIC_GROUP_STUDENT_NUM:
+          this.data["QUIT_MUSIC_GROUP_STUDENT_NUM"] || {},
+        VIP_PRACTICE_STUDENT_NUM: this.data["VIP_PRACTICE_STUDENT_NUM"] || {},
+        VIP_PRACTICE_ADD_STUDENT_NUM:
+          this.data["VIP_PRACTICE_ADD_STUDENT_NUM"] || {},
+      };
     },
     chartExtend() {
       return {
+          yAxis: {
+          //纵轴标尺固定
+          minInterval:1,
+          type: "value",
+          scale: true,
+          min: 0,
+            axisLabel:{
+            formatter:'{value}人'
+          }
+        },
+          series: {
+          smooth: false,
+        },
         tooltip: {
           axisPointer: {
-            type: 'shadow',
+            type: "shadow",
             shadowStyle: {
-              color: 'rgba(150,150,150,0.2)'
-            }
-          }
-        }
-      }
+              color: "rgba(150,150,150,0.2)",
+            },
+          },
+        },
+      };
     },
     dataZoom() {
       return [
         {
-          type: 'slider',
+          type: "slider",
           start: 60,
-          end: 100
-        }
-      ]
+          end: 100,
+        },
+      ];
     },
     chartData() {
-      const values = Object.values(this.items)
-      const months = {}
+      const values = Object.values(this.items);
+      const months = {};
       for (const item of values) {
-        for (const row of (item.indexMonthData || [])) {
-          const key = this.$helpers.dayjs(row.month).format('YYYY-MM-DD')
+        for (const row of item.indexMonthData || []) {
+          const key = this.$helpers.dayjs(row.month).format("YYYY-MM-DD");
           if (!months[key]) {
             months[key] = {
-              '日期': key,
-            }
+              日期: key,
+            };
           }
-          months[key][item.title] = row.percent
+          months[key][item.title] = row.percent;
         }
       }
       return {
-        columns: ['日期', ...values.map(item => item.title)],
-        rows: Object.values(months)
+        columns: ["日期", ...values.map((item) => item.title)],
+        rows: Object.values(months),
+      };
+    },
+    chartDataForMoth() {
+      const values = Object.values(this.items);
+      console.log(values);
+      const months = {};
+      for (const item of values) {
+        for (const row of item.indexMonthData || []) {
+          const key = this.$helpers.dayjs(row.month).format("YYYY-MM");
+
+          if (!months[key]) {
+            months[key] = {
+              月份: key,
+            };
+            months[key][item.title] = row.percent;
+          } else {
+            if (months[key][item.title]) {
+              months[key][item.title] += parseFloat(row.percent);
+            } else {
+              months[key][item.title] = row.percent;
+            }
+          }
+        }
       }
+
+      return {
+        columns: ["月份", ...values.map((item) => item.title)],
+        rows: Object.values(months),
+      };
     },
     funnelData() {
-      const { indexMonthData = [] } = this.data['STUDENT_CONVERSION'] || {}
+      const { indexMonthData = [] } = this.data["STUDENT_CONVERSION"] || {};
       return {
-        columns: ['类型', '数值'],
-        rows: indexMonthData.map(item => ({
-          '类型': item.title,
-          '数值': item.percent
-        }))
-      }
+        columns: ["类型", "数值"],
+        rows: indexMonthData.map((item) => ({
+          类型: item.title,
+          数值: item.percent,
+        })),
+      };
     },
     dataEmpty() {
-      return !this.chartData.rows.length
+      return !this.chartData.rows.length;
     },
   },
-  data () {
+  data() {
     return {
-      active: 'NEWLY_STUDENT_NUM',
+      active: "NEWLY_STUDENT_NUM",
       isHistogram: true,
-    }
+      timer: "day",
+      mdate: this.search?.dates,
+      loading: false,
+    };
   },
-}
+  methods: {
+    changeValue(date) {
+      // 请求更改数据
+      this.mdate = date;
+      this.isDayOrMoth(date);
+      this.FetchDetail();
+    },
+    async FetchDetail() {
+      this.loading = true;
+      const data = this.data;
+      try {
+        const { dates, ...rest } = this.search;
+        const res = await getIndex({
+          ...rest,
+          ...getTimes(this.mdate, ["startDate", "endDate"]),
+           dataTypes:'ADD_STUDENT_REGISTRATION_NUM,MUSIC_GROUP_STUDENT,NEWLY_STUDENT_NUM,QUIT_MUSIC_GROUP_STUDENT_NUM,VIP_PRACTICE_STUDENT_NUM,VIP_PRACTICE_ADD_STUDENT_NUM'
+        });
+        for (const item of res.data) {
+          // 再循环一遍
+          for (const key in this.items) {
+            // console.log(key);
+            if (item.dataType == key) {
+              data[item.dataType] = {
+                ...item,
+                desc: descs[item.dataType],
+              };
+            }
+          }
+        }
+      } catch (error) {
+        console.log(error);
+      }
+      console.log(data);
+      this.loading = false;
+      this.dataInfo = data;
+      this.$emit("resetDate", data);
+    },
+
+    isDayOrMoth(arr) {
+      console.log(arr);
+      if (!arr || arr.length < 1) {
+        this.timer = "day";
+      } else {
+        const count = this.$helpers
+          .dayjs(arr[0])
+          .diff(this.$helpers.dayjs(arr[1]), "day");
+        Math.abs(count) > chioseNum
+          ? (this.timer = "month")
+          : (this.timer = "day");
+      }
+    },
+  },
+};
 </script>
 <style lang="less" scoped>
-  // .statistic{
-  //   /deep/ .statistic-content{
-  //     cursor: pointer;
-  //     &.active > span{
-  //       color: #14928a !important;
-  //     }
-  //   }
-  // }
+// .statistic{
+//   /deep/ .statistic-content{
+//     cursor: pointer;
+//     &.active > span{
+//       color: #14928a !important;
+//     }
+//   }
+// }
+.chioseBox {
+  position: absolute;
+  right: 20px;
+  z-index: 1000;
+}
+.wrap {
+  position: relative;
+}
 </style>

+ 106 - 0
src/views/main/baseinfo/studentBaseinfo.vue

@@ -0,0 +1,106 @@
+<template>
+  <div>
+    <el-card>
+      <div slot="header" class="clearfix">
+        <div class="box">
+          <span class='shape'></span>
+          <span>学员数据</span>
+        </div>
+
+      </div>
+      <statistic :col="5" class="statistic" :cols="0">
+        <statistic-item
+          v-for="(item, key) in items"
+          :key="key"
+          :class="{ active: active === key }"
+          @click="active = key"
+        >
+          <span>
+            {{ item.title }}
+            <el-tooltip
+              v-if="item.desc"
+              :content="item.desc"
+              :open-delay="0.3"
+              placement="top"
+            >
+              <i
+                style="margin-left: 5px; cursor: pointer"
+                class="el-icon-warning-outline"
+              />
+            </el-tooltip>
+          </span>
+          <span>
+            <count-to :endVal="item.percent" />人
+          </span>
+        </statistic-item>
+
+        <statistic-item v-if='data["CHARGE_STUDENT_CHANGE_RATE"]'>
+          <span>
+            {{ data["CHARGE_STUDENT_CHANGE_RATE"].title }}
+            <el-tooltip
+              v-if="data['CHARGE_STUDENT_CHANGE_RATE'].desc"
+              :content="data['CHARGE_STUDENT_CHANGE_RATE'].desc"
+              :open-delay="0.3"
+              placement="top"
+            >
+              <i
+                style="margin-left: 5px; cursor: pointer"
+                class="el-icon-warning-outline"
+              />
+            </el-tooltip>
+          </span>
+          <span>
+            <count-to :endVal="data['CHARGE_STUDENT_CHANGE_RATE'].percent" />%
+          </span>
+        </statistic-item>
+           <statistic-item v-if='data["ACTIVATION_RATE"]'>
+          <span>
+            {{ data["ACTIVATION_RATE"].title }}
+            <el-tooltip
+              v-if="data['ACTIVATION_RATE'].desc"
+              :content="data['ACTIVATION_RATE'].desc"
+              :open-delay="0.3"
+              placement="top"
+            >
+              <i
+                style="margin-left: 5px; cursor: pointer"
+                class="el-icon-warning-outline"
+              />
+            </el-tooltip>
+          </span>
+          <span>
+            <count-to :endVal="data['ACTIVATION_RATE'].percent" />%
+          </span>
+        </statistic-item>
+      </statistic>
+    </el-card>
+  </div>
+</template>
+<script>
+import countTo from "vue-count-to";
+export default {
+  props: ["data"],
+  components: {
+    "count-to": countTo,
+  },
+  data() {
+    return {
+      active:''
+    };
+  },
+  computed: {
+    dataEmpty() {
+      return !this.chartData.rows.length;
+    },
+    //         CHARGE_STUDENT_CHANGE_RATE: this.data['CHARGE_STUDENT_CHANGE_RATE'] || {},
+    //    ACTIVATION_RATE: this.data['ACTIVATION_RATE'] || {},
+    items() {
+      return {
+        STUDENT_REGISTRATION_NUM: this.data['STUDENT_REGISTRATION_NUM'] || {},
+
+      }
+    },
+  },
+};
+</script>
+

+ 68 - 0
src/views/main/baseinfo/surplusCourse.vue

@@ -0,0 +1,68 @@
+<template>
+  <div>
+    <el-card>
+      <div slot="header" class="clearfix">
+        <div class="box">
+          <span class='shape'></span>
+          <span>剩余课时</span>
+        </div>
+
+      </div>
+      <statistic :col="5" class="statistic" :cols="0">
+        <statistic-item
+          v-for="(item, key) in items"
+          :key="key"
+          :class="{ active: active === key }"
+          @click="active = key"
+        >
+          <span>
+            {{ item.title }}
+            <el-tooltip
+              v-if="item.desc"
+              :content="item.desc"
+              :open-delay="0.3"
+              placement="top"
+            >
+              <i
+                style="margin-left: 5px; cursor: pointer"
+                class="el-icon-warning-outline"
+              />
+            </el-tooltip>
+          </span>
+          <span>
+            <count-to :endVal="item.percent" />节
+          </span>
+        </statistic-item>
+      </statistic>
+    </el-card>
+  </div>
+</template>
+<script>
+import countTo from "vue-count-to";
+export default {
+  props: ["data"],
+  components: {
+    "count-to": countTo,
+  },
+  data() {
+    return {
+      active:''
+    };
+  },
+  computed: {
+    dataEmpty() {
+      return !this.chartData.rows.length;
+    },
+    //         CHARGE_STUDENT_CHANGE_RATE: this.data['CHARGE_STUDENT_CHANGE_RATE'] || {},
+    //    ACTIVATION_RATE: this.data['ACTIVATION_RATE'] || {},
+    items() {
+      return {
+        SURPLUS_COURSE_NUM: this.data['SURPLUS_COURSE_NUM'] || {},
+        SURPLUS_MUSIC_COURSE_NUM: this.data['SURPLUS_MUSIC_COURSE_NUM'] || {},
+        SURPLUS_VIP_COURSE_NUM: this.data['SURPLUS_VIP_COURSE_NUM'] || {},
+        SURPLUS_PRACTICE_COURSE_NUM: this.data['SURPLUS_PRACTICE_COURSE_NUM'] || {},
+      }
+    },
+  },
+};
+</script>

+ 68 - 0
src/views/main/baseinfo/useCourse.vue

@@ -0,0 +1,68 @@
+<template>
+  <div>
+    <el-card>
+      <div slot="header" class="clearfix">
+        <div class="box">
+          <span class='shape'></span>
+          <span>已消耗课时</span>
+        </div>
+
+      </div>
+      <statistic :col="5" class="statistic" :cols="0">
+        <statistic-item
+          v-for="(item, key) in items"
+          :key="key"
+          :class="{ active: active === key }"
+          @click="active = key"
+        >
+          <span>
+            {{ item.title }}
+            <el-tooltip
+              v-if="item.desc"
+              :content="item.desc"
+              :open-delay="0.3"
+              placement="top"
+            >
+              <i
+                style="margin-left: 5px; cursor: pointer"
+                class="el-icon-warning-outline"
+              />
+            </el-tooltip>
+          </span>
+          <span>
+            <count-to :endVal="item.percent" />节
+          </span>
+        </statistic-item>
+      </statistic>
+    </el-card>
+  </div>
+</template>
+<script>
+import countTo from "vue-count-to";
+export default {
+  props: ["data"],
+  components: {
+    "count-to": countTo,
+  },
+  data() {
+    return {
+      active:''
+    };
+  },
+  computed: {
+    dataEmpty() {
+      return !this.chartData.rows.length;
+    },
+    //         CHARGE_STUDENT_CHANGE_RATE: this.data['CHARGE_STUDENT_CHANGE_RATE'] || {},
+    //    ACTIVATION_RATE: this.data['ACTIVATION_RATE'] || {},
+    items() {
+      return {
+        OVER_COURSE_NUM: this.data['OVER_COURSE_NUM'] || {},
+        OVER_MUSIC_COURSE_NUM: this.data['OVER_MUSIC_COURSE_NUM'] || {},
+        OVER_VIP_COURSE_NUM: this.data['OVER_VIP_COURSE_NUM'] || {},
+        OVER_PRACTICE_COURSE_NUM: this.data['OVER_PRACTICE_COURSE_NUM'] || {},
+      }
+    },
+  },
+};
+</script>

+ 55 - 26
src/views/main/constant.js

@@ -1,32 +1,49 @@
 import dayjs from 'dayjs'
 
 export const descs = {
-  SCHOOL: '截止到当日,【进行中】乐团的【合作单位】总数', // 合作单位
-  MUSIC_GROUP_NUM: '截止到当日,【进行中】乐团总数', // 乐团数量
-  MUSIC_GROUP_STUDENT: '截止到当日,【进行中】乐团【在读】学员总数,分部下去重', // 乐团学员
-  OTHER_STUDENT: '截止到当日,学员有剩余VIP/网管未上课时的人数总数,分部下去重', // 其他学员
-  ACTIVATION_RATE: '截止到当日,筹备中/进行中乐团在读学员和VIP/网管有课学员激活率', // 激活率
-  HOMEWORK_CREATE_RATE: '本月截止到当日服务指标的作业布置率', // 作业布置率
-  HOMEWORK_SUBMIT_RATE: '本月截止到当日已布置的作业学员提交率', // 作业提交率
-  HOMEWORK_COMMENT_RATE: '本月截止到当日学员已提交的作业老师点评率', // 作业点评率
-  SHOULD_INCOME_MONEY: '所有缴费项目应收金额总和', // 应收金额
-  ANTICIPATED_INCOME_MONEY: '已缴费但实际还未产生费用金额总和', // 预收金额
-  SHOULD_EXPEND_MONEY: '预计支出费用总和(暂无此数据)', // 预付金额
-  ANTICIPATED_EXPEND_MONEY: '应付金额总和(暂无此数据)', // 应付金额
-  REVENUE_MONEY: '营收金额总和', // 营收金额
-  TEACHER_NUM: '截止到当日,【非冻结】的老师总数', // 老师总数
-  FULL_TIME_NUM: '截止到当日,【非冻结】且工作类型为【全职】的老师总数', // 全职人数
-  PART_TIME_NUM: '截止到当日,【非冻结】且工作类型为【兼职】的老师总数', // 兼职人数
-  DIMISSION_NUM: '截止到当日,已冻结或将【离职时间】到筛选时间段内的老师总数', // 离职人数
-  NEWLY_STUDENT_NUM: '本年度截止到当日,新增的乐团【在读】学员总数(去重)', // 新增学员
-  QUIT_MUSIC_GROUP_STUDENT_NUM: '本年度截止到当日,乐团退团学员总数(去重)', // 退团学员
-  STUDENT_CONVERSION: '乐团预报名学员中正式报名缴费的学员购买VIP/网管课的转化率(不包括退团学员)', // 学员转化
-  MUSIC_GROUP_COURSE: '筛选时间段内,【已结束】乐团课程总数', // 乐团课
-  VIP_GROUP_COURSE: '筛选时间段内,【已结束】VIP课程总数', // VIP课
-  PRACTICE_GROUP_COURSE: '筛选时间段内,【已结束】网管课程总数', // 网管课
-  FINANCE_PAY: '筛选时间段内支出金额总和', // 财务支出
-  FINANCE_BALANCE_AMOUNT: '筛选时间段内余额消耗总和', // 余额收入
-  FINANCE_AMOUNT: '筛选时间段内现金收入总和', // 现金收入
+  STUDENT_REGISTRATION_NUM: '截止到昨日,系统注册学员总数',
+  CHARGE_STUDENT_CHANGE_RATE: '截止到昨日,注册学员现金付费率(有订单交易成功的都算,导入的也算)',
+  ACTIVATION_RATE: '截止到昨日,筹备中或进行中乐团在读学员和有VIP或网管课学员激活率',
+  SCHOOL: '截止到昨日,存在【进行中】乐团的【合作单位】总数',
+  PROGRESS_MUSIC_GROUP_NUM: '截止到昨日,【进行中】乐团总数',
+  TEACHER_NUM: '截止到昨日,非冻结,且离职时间在昨日之后的老师总数',
+  FULL_TIME_NUM: '截止到昨日,非冻结、离职时间在昨日之后,且工作类型为【全职】的老师总数',
+  PART_TIME_NUM: '截止到昨日,非冻结、离职时间在昨日之后,且工作类型为【兼职】的老师总数',
+  SURPLUS_COURSE_NUM: '截止到昨日,系统中【未开始】课程总数(乐团+VIP+网管)【不包括试听课】',
+  SURPLUS_MUSIC_COURSE_NUM: '截止到昨日,系统中【未开始】乐团课程总数',
+  SURPLUS_VIP_COURSE_NUM: '截止到昨日,系统中【未开始】VIP课程总数',
+  SURPLUS_PRACTICE_COURSE_NUM: '截止到昨日,系统中【未开始】网管课程总数',
+  OVER_COURSE_NUM: '截止到昨日,系统中【已结束】课程总数(乐团+VIP+网管)【不包括试听课】',
+  OVER_MUSIC_COURSE_NUM: '截止到昨日,系统中【已结束】乐团课程总数',
+  OVER_VIP_COURSE_NUM: '截止到昨日,系统中【已结束】VIP课程总数',
+  OVER_PRACTICE_COURSE_NUM: '截止到昨日,系统中【已结束】网管课程总数',
+  FINANCE_PAY: '筛选时间段内支出金额总和',
+  FINANCE_BALANCE_AMOUNT: '筛选时间段内余额消耗总和',
+  FINANCE_AMOUNT: '筛选时间段内现金收入总和',
+  HOMEWORK_CREATE_RATE: '筛选时间段内,服务指标作业总布置率',
+  HOMEWORK_SUBMIT_RATE: '筛选时间段内,已布置的作业学员总提交率(包括服务指标外的作业)',
+  HOMEWORK_COMMENT_RATE: '筛选时间段内,学员已提交的作业老师总点评率',
+  MUSIC_GROUP_COURSE: '筛选时间段内,乐团课程总数(未开始+已结束)',
+  VIP_GROUP_COURSE: '筛选时间段内,VIP课程总数(未开始+已结束)',
+  PRACTICE_GROUP_COURSE: '筛选时间段内,网管课程总数(未开始+已结束)',
+  ADD_STUDENT_REGISTRATION_NUM: '筛选时间段内,新注册学员总数',
+  MUSIC_GROUP_STUDENT: '筛选时间段中最后一日,【进行中】乐团【在读】学员总数,分部下去重',
+  NEWLY_STUDENT_NUM: '筛选时间段内,新增的【进行中】乐团【在读】学员总数(学员当前无在读乐团则记为新增)',
+  QUIT_MUSIC_GROUP_STUDENT_NUM: '筛选时间段内,乐团退团学员总数(学员无在读乐团,则记为退团)',
+  VIP_PRACTICE_STUDENT_NUM: '筛选时间段中最后一日,学员有剩余VIP或网管未上课时的总人数(分部下去重)',
+  VIP_PRACTICE_ADD_STUDENT_NUM: '筛选时间段内,新增的VIP/网管课付费学员总数',
+  MUSIC_PATROL_ITEM:'乐团主管提交的巡查表中有未勾选事项',
+  HIGH_CLASS_STUDENT_LESS_THAN_THREE:'基础技能班学员数量<3',
+  STUDENT_NOT_PAYMENT:'当前时间以前的缴费项目中学员未缴费',
+  STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP:'学员提交退团申请',
+  TEACHER_EXPECT_SALARY_BE_LOW:'老师预计课酬未达到系统设置的分部基本课酬标准',
+  INSPECTION_ITEM:'乐团主管未完成巡查计划安排',
+  INSPECTION_ITEM_PLAN:'乐团主管已安排的巡查任务未提交',
+  STUDENT_VISIT:'乐团主管未完成回访任务',
+  TEACHER_EXCEPTION_ATTENDANCE:'课程上有老师或学员考勤异常',
+  TEACHER_NOT_A_CLASS:'课程无老师考勤',
+  TEACHER_SERVE_ERROR:'服务指标生成的作业未布置',
+  WAIT_CREATE_PAYMENT_CALENDER:'缴费项目有效期结束前7天'
 }
 
 const dates = {
@@ -170,9 +187,21 @@ export const errorType = {
       ...dates
     },
   },
+  TEACHER_SERVE_ERROR: {
+    name: '服务指标异常',
+    isError: true,
+    always: true,
+    url: '/operateManager/serverDetail',
+    query: {
+      searchType: 'TEACHER_SERVE_ERROR',
+      unDone:1
+    },
+  }
 }
 
 export const matterTypes = {
   INSPECT: '下校巡查',
   VISIT: '学员回访',
 }
+
+export const chioseNum = 31

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

@@ -27,7 +27,7 @@
     >
       <title-item
         type="warning"
-        :data="[{name: item.desc, num: item.num}]"
+        :data="[{name: item.desc, num: item.num,errorType:item.errorType}]"
       >
         <span style="color: #14928A;">立即处理<i class="el-icon-d-arrow-right"/></span>
       </title-item>

+ 26 - 0
src/views/serverDetail/api.js

@@ -0,0 +1,26 @@
+import request2 from '@/utils/request2'
+
+export const getTeacherServeInfo = data => request2({
+  url: '/api-web/exercisesSituation/queryTeacherServeInfo',
+  params: data,
+  method: 'get',
+})
+
+// exercisesSituation/teacherServeRemindPush
+export const teacherServeRemindPush = data => request2({
+  url: '/api-web/exercisesSituation/teacherServeRemindPush',
+  data: data,
+  method: 'post',
+})
+
+export const getTeacherServeHomeworkDetail = data => request2({
+  url: '/api-web/exercisesSituation/queryTeacherServeHomeworkDetail',
+  params: data,
+  method: 'get',
+})
+
+export const getTeacherServeExtraDetail = data => request2({
+  url: '/api-web/exercisesSituation/queryTeacherServeExtraDetail',
+  params: data,
+  method: 'get',
+})

+ 125 - 0
src/views/serverDetail/conponent/afterWork.vue

@@ -0,0 +1,125 @@
+<template>
+  <div>
+    <el-table
+      style="width: 100%"
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      :data="tableList"
+    >
+      <el-table-column
+        align="center"
+        prop="id"
+        label="课程编号"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        prop="name"
+        label="服务课程"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        prop="groupType"
+        label="课程类型"
+      >
+      <template slot-scope="scope">
+        <div>
+          {{scope.row.groupType | coursesType}}
+        </div>
+      </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="studentNum"
+        label="学员数量"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        prop="subjectName"
+        label="专业"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        prop="status"
+        label="课程状态"
+      >
+      <template slot-scope="scope">
+        <div>
+          {{scope.row.status | coursesStatus}}
+        </div>
+      </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="homeworkExist"
+        label="是否布置作业"
+      >
+      <template slot-scope="scope">
+        <div>
+          {{scope.row.homeworkExist?'是':'否'}}
+        </div>
+      </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="getList"
+    />
+  </div>
+</template>
+<script>
+import pagination from "@/components/Pagination/index";
+import { getTeacherServeHomeworkDetail } from "../api";
+export default {
+  components: { pagination },
+  props: ["detail"],
+  data() {
+    return {
+      tableList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
+  },
+  mounted() {
+    // 获取分部
+
+    this.init();
+  },
+  methods: {
+    init() {
+      this.getList();
+    },
+    async getList() {
+      console.log(this.detail)
+      try {
+      const dayjs = this.$helpers.dayjs
+     const ruselt =  await getTeacherServeHomeworkDetail({
+          page: this.rules.page,
+          rows: this.rules.limit,
+          monday: dayjs(this.detail.monday).format("YYYY-MM-DD"),
+          sunday: dayjs(this.detail.sunday).format("YYYY-MM-DD"),
+          teacherId:this.detail.teacherId
+        });
+        this.tableList = ruselt.data.rows
+        this.rules.total = ruselt.data.total
+      } catch (e) {
+        console.log(e)
+      }
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {},
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 97 - 0
src/views/serverDetail/conponent/outWork.vue

@@ -0,0 +1,97 @@
+<template>
+  <div>
+    <el-table
+      style="width: 100%"
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      :data="tableList"
+    >
+      <el-table-column
+        align="center"
+        prop="userId"
+        label="学员编号"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        prop="username"
+        label="学员姓名"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        prop="subjectNames"
+        label="专业"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        prop="studentId"
+        label="是否布置作业"
+      >
+       <template slot-scope="scope">
+        <div>
+          {{scope.row.homeworkExist?'是':'否'}}
+        </div>
+      </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="getList"
+    />
+  </div>
+</template>
+<script>
+import pagination from "@/components/Pagination/index";
+import { getTeacherServeExtraDetail } from "../api";
+export default {
+  props:['detail'],
+    components:{pagination},
+  data() {
+    return {
+       tableList:[],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
+  },
+  mounted() {
+    // 获取分部
+    this.init();
+  },
+  methods: {
+    init() {
+      this.getList()
+    },
+    async getList() {
+      console.log(this.detail)
+      try {
+      const dayjs = this.$helpers.dayjs
+     const ruselt =  await getTeacherServeExtraDetail({
+          page: this.rules.page,
+          rows: this.rules.limit,
+          monday: dayjs(this.detail.monday).format("YYYY-MM-DD"),
+          sunday: dayjs(this.detail.sunday).format("YYYY-MM-DD"),
+          teacherId:this.detail.teacherId
+        });
+        this.tableList = ruselt.data.rows
+        this.rules.total = ruselt.data.total
+      } catch (e) {
+        console.log(e)
+      }
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {},
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 26 - 0
src/views/serverDetail/conponent/serverMask.vue

@@ -0,0 +1,26 @@
+<template>
+  <div>
+    <el-tabs v-model="activeName">
+      <el-tab-pane label="课后作业" name="first" lazy ><afterWork v-if="activeName=='first'" v-permission="'exercisesSituation/queryTeacherServeHomeworkDetail'" :detail='detail' /></el-tab-pane>
+      <el-tab-pane label="课外训练" name="second" lazy ><outWork  v-if="activeName=='second'" v-permission="'exercisesSituation/queryTeacherServeExtraDetail'" :detail='detail' /> </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+<script>
+import afterWork from './afterWork'
+import outWork from './outWork'
+export default {
+  props:['detail'],
+  components:{afterWork,outWork},
+  data() {
+    return {
+      activeName: "first",
+    };
+  },
+  mounted(){
+    console.log(this.detail)
+  }
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 383 - 0
src/views/serverDetail/index.vue

@@ -0,0 +1,383 @@
+<!--  -->
+<template>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div>
+      服务指标明细
+    </h2>
+    <!-- <filter-search
+        ref="filterSearch"
+        @reload="reloadSearch"
+        :keys="['searchType']"
+        :moreKeys="['organId']"
+      /> -->
+    <div class="m-core">
+      <save-form
+        :inline="true"
+        :model="searchForm"
+        @submit="search"
+        @reset="onReSet"
+        ref="form"
+      >
+        <el-form-item prop="organId">
+          <el-select
+            class="multiple"
+            v-model.trim="searchForm.organId"
+            filterable
+            clearable
+            placeholder="请选择分部"
+          >
+            <el-option
+              v-for="(item, index) in selects.branchs"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item prop="teacherId">
+          <remote-search
+            :commit="'setTeachers'"
+            v-model="searchForm.teacherId"
+          />
+        </el-form-item>
+        <el-form-item prop="unDone">
+          <el-select
+            class="multiple"
+            v-model.trim="searchForm.unDone"
+            clearable
+            placeholder="是否异常"
+          >
+            <el-option label="是" :value="1"></el-option>
+            <el-option label="否" :value="0"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item prop="reminded">
+          <el-select
+            class="multiple"
+            v-model.trim="searchForm.reminded"
+            clearable
+            placeholder="是否提醒"
+          >
+            <el-option label="是" :value="1"></el-option>
+            <el-option label="否" :value="0"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item prop="operatorId">
+          <remote-search
+            :commit="'setEmploys'"
+            v-model.trim="searchForm.operatorId"
+          />
+        </el-form-item>
+        <el-form-item>
+          <el-date-picker
+            style="width: 410px"
+            v-model.trim="orderDate"
+            type="daterange"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            :clearable="false"
+            @change="changeWeek"
+            :picker-options="bigin"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button native-type="submit" type="primary">搜索</el-button>
+          <el-button native-type="reset" type="danger">重置</el-button>
+        </el-form-item>
+      </save-form>
+      <div class="btnWraps" style="margin-bottom: 20px">
+        <el-button
+          type="primary"
+          v-permission="'exercisesSituation/teacherServeRemindPush'"
+          @click="remindTeachers"
+          >批量提醒</el-button
+        >
+      </div>
+      <div class="tableWrap">
+        <el-table
+          style="width: 100%"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column
+            type="selection"
+            width="55"
+            :selectable="checkSelectable"
+          >
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="organName"
+            label="分部"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="teacherId"
+            label="老师编号"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="teacherName"
+            label="老师姓名"
+          ></el-table-column>
+           <el-table-column
+            align="center"
+            prop="teacherName"
+            label="服务周期"
+            width="180px"
+          >
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.monday | dayjsFormat}}~{{scope.row.sunday | dayjsFormat}}
+            </div>
+          </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="homeworkNum"
+            label="课后作业(节)"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="exerciseNum"
+            label="课外作业(人)"
+          ></el-table-column>
+          <el-table-column align="center" prop="studentId" label="是否异常">
+            <template slot-scope="scope">
+              {{ scope.row.unDone ? "是" : "否" }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="remindDate"
+            label="提醒时间"
+          >
+          <template slot-scope="scope">
+            <div>
+            {{scope.row.remindDate | dateForMinFormat}}
+            </div>
+          </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="operatorName"
+            label="操作人"
+          ></el-table-column>
+          <el-table-column align="center" prop="studentId" label="操作" width="160px">
+            <template slot-scope="scope">
+              <div>
+                <el-button type="text" @click="gotoDteail(scope.row)"
+                  >查看</el-button
+                >
+                <el-button
+                  type="text"
+                  v-if="scope.row.unDone"
+                  v-permission="'exercisesSituation/teacherServeRemindPush'"
+                  @click="remindTeacher(scope.row)"
+                  >提醒老师</el-button
+                >
+              </div>
+            </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="getList"
+        />
+      </div>
+      <el-dialog
+        title="查看"
+        destroy-on-close
+        :close-on-click-modal="false"
+        :visible.sync="lookVisible"
+        v-if="lookVisible"
+      >
+        <serverMask
+          :detail="activeRow"
+          @close="lookVisible = false"
+          @submited="getList"
+        />
+        <span slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="lookVisible = false"
+            >确 定</el-button
+          >
+        </span>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import axios from "axios";
+import { getToken } from "@/utils/auth";
+import pagination from "@/components/Pagination/index";
+import serverMask from "./conponent/serverMask";
+import load from "@/utils/loading";
+import { getTeacherServeInfo, teacherServeRemindPush } from "./api";
+import { getTimes } from "@/utils";
+import { getNowDateAndSunday, getNowDateAndMonday } from "@/utils/date";
+export default {
+  components: { pagination, serverMask },
+  data() {
+    return {
+      searchForm: {
+        organId: "",
+        teacherId: "",
+        operatorId: "",
+        reminded: "",
+        unDone: "",
+        operatorId: "",
+      },
+      orderDate: [],
+      tableList: [],
+      organList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      lookVisible: false,
+      activeRow: null,
+      chioseList: [],
+    };
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    // 获取分部
+
+    this.init();
+  },
+  methods: {
+    init() {
+      this.$store.dispatch("setBranchs");
+      this.$store.dispatch("setEmploys");
+      this.getDefaultTime();
+      if (this.$route.query.searchType) {
+        this.searchForm.organId = this.$route.query.organId * 1 || "";
+        this.searchForm.unDone = this.$route.query.unDone || ""
+        const dayjs = this.$helpers.dayjs;
+        let nowDate = dayjs(new Date()).format("YYYY-MM-DD");
+        this.orderDate = [
+          getNowDateAndMonday(nowDate),
+          getNowDateAndSunday(nowDate),
+        ];
+      }
+
+      this.getList();
+    },
+    async getList() {
+
+      try {
+        const {orderDate, ...rest} = this.searchForm;
+        const result = await getTeacherServeInfo({
+          ...rest,
+          ...getTimes(this.orderDate, ["monday", "sunday"]),
+          rows: this.rules.limit,
+          page: this.rules.page,
+        });
+        this.rules.total = result.data.total;
+        this.tableList = result.data.rows;
+      } catch (e) {}
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.$refs.form.resetFields();
+      this.getDefaultTime();
+      this.search();
+    },
+    gotoDteail(row) {
+      this.activeRow = row;
+      this.lookVisible = true;
+    },
+    reloadSearch() {
+      this.getList();
+    },
+    getDefaultTime() {
+      const dayjs = this.$helpers.dayjs;
+      let nowDate = dayjs(new Date()).format("YYYY-MM-DD");
+      let lastWeek = dayjs(nowDate).subtract(1, "week").format("YYYY-MM-DD");
+      this.orderDate = [
+        getNowDateAndMonday(lastWeek),
+        getNowDateAndSunday(nowDate),
+      ];
+    },
+    changeWeek(val) {
+      if (val) {
+        this.orderDate =  [
+          getNowDateAndMonday(val[0]),
+          getNowDateAndSunday(val[1]),
+        ]
+      } else {
+        this.getDefaultTime();
+      }
+    },
+    remindTeacher(row) {
+      this.$confirm("是否给老师发送提醒?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(async () => {
+        try {
+          const result = await teacherServeRemindPush([row]);
+          this.getList();
+          this.$message.success("提醒成功");
+        } catch (e) {
+          console.log(e);
+        }
+      });
+    },
+    remindTeachers() {
+      if (this.chioseList.length <= 0) {
+        this.$message.error("请至少选择一条信息");
+        return;
+      }
+      this.$confirm("是否批量给老师发送提醒?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(async () => {
+        try {
+          const result = await teacherServeRemindPush(this.chioseList);
+          this.getList();
+          this.$message.success("提醒成功");
+        } catch (e) {
+          console.log(e);
+        }
+      });
+    },
+    checkSelectable(row) {
+      return row.unDone;
+    },
+    handleSelectionChange(arr) {
+      this.chioseList = arr;
+    },
+    bigin(){
+      let self = this;
+      return {
+        firstDayOfWeek: 1,
+        disabledDate(time) {
+            return time.getTime() >= Date.now();
+        },
+      };
+    }
+  },
+};
+</script>
+<style lang='scss' scoped>
+</style>

+ 31 - 4
src/views/teacherManager/teacherDetail/components/courseInfo.vue

@@ -1,6 +1,11 @@
 <template>
   <div class="courseInfo">
-    <save-form :model="searchList" :inline="true" @submit="search" save-key='teacherDetail-courseInfo'>
+    <save-form
+      :model="searchList"
+      :inline="true"
+      @submit="search"
+      save-key="teacherDetail-courseInfo"
+    >
       <el-form-item label="乐团状态">
         <el-select v-model.trim="searchList.status" clearable>
           <el-option
@@ -81,8 +86,8 @@
         </el-table-column>
       </el-table>
       <pagination
-      save-key='teacherDetail-courseInfo'
-      sync
+        save-key="teacherDetail-courseInfo"
+        sync
         :total.sync="pageInfo.total"
         :page.sync="pageInfo.page"
         :limit.sync="pageInfo.limit"
@@ -97,7 +102,7 @@
           prop="targetTeacherId"
           :rules="[{ required: true, message: '请选择老师', trigger: 'blur' }]"
         >
-            <remote-search
+          <remote-search
             :commit="'setTeachers'"
             v-model="maskForm.targetTeacherId"
           />
@@ -237,12 +242,34 @@ export default {
           obj.targetTeacherId = this.maskForm.targetTeacherId;
           obj.teacherId = this.teacherId;
           // obj.memo = this.maskForm.memo;
+
           classGroupTeacherAdjust(obj).then((res) => {
             if (res.code == 200) {
               this.maskVisible = false;
               this.$message.success("修改成功");
               this.getList();
             }
+            if (res.code == 206) {
+              this.$confirm(`当前课程课酬预计为0,是否继续`, "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              })
+                .then(() => {
+                  obj.allowZeroSalary = true;
+                  // obj.allowZeroSalary = true;
+                  classGroupTeacherAdjust(obj).then((res) => {
+                    if (res.code == 200) {
+                      this.maskVisible = false;
+                      this.$message.success("修改成功");
+                      this.getList();
+                    }
+                  });
+                })
+                .catch(() => {
+                  return;
+                });
+            }
           });
         }
       });

+ 250 - 186
src/views/teamDetail/componentCourse/compoundClass.vue

@@ -1,180 +1,213 @@
 <template>
   <div>
-    <el-form :model="maskForm"
-             class="maskForm"
-             ref="maskForm"
-             :rules="maskRules"
-             label-position="right"
-             label-width="120px"
-             :inline="true">
+    <el-form
+      :model="maskForm"
+      class="maskForm"
+      ref="maskForm"
+      :rules="maskRules"
+      label-position="right"
+      label-width="120px"
+      :inline="true"
+    >
       <el-row>
         <el-col :span="12">
-          <el-form-item label="课程名称"
-                        prop="teacher">
-            <el-input v-model.trim="maskForm.name"
-                      style="width:220px!important"
-                      placeholder="请输入课程名称"></el-input>
+          <el-form-item label="课程名称" prop="teacher">
+            <el-input
+              v-model.trim="maskForm.name"
+              style="width: 220px !important"
+              placeholder="请输入课程名称"
+            ></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
           <el-form-item>
-            <div style="width:220px!important">
-              <a href="#"
-                 class="studentTitle"
-                 @click="lookStudentList"> 学生列表>></a>
+            <div style="width: 220px !important">
+              <a href="#" class="studentTitle" @click="lookStudentList">
+                学生列表>></a
+              >
             </div>
           </el-form-item>
         </el-col>
-
       </el-row>
       <el-row>
         <el-col :span="12">
-          <el-form-item label="主教老师"
-                        prop="teacher">
-            <el-select v-model.trim="maskForm.teacher"
-                       style="width:220px!important"
-                       @change="changeTeacher"
-                       clearable
-                       filterable>
-              <el-option v-for="(item,index) in teacherList"
-                         :key="index"
-                         :value="item.id"
-                         :label="item.realName"></el-option>
+          <el-form-item label="主教老师" prop="teacher">
+            <el-select
+              v-model.trim="maskForm.teacher"
+              style="width: 220px !important"
+              @change="changeTeacher"
+              clearable
+              filterable
+            >
+              <el-option
+                v-for="(item, index) in teacherList"
+                :key="index"
+                :value="item.id"
+                :label="item.realName"
+              ></el-option>
             </el-select>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="助教老师"
-                        v-if="maskForm.type != 'MUSIC_NETWORK'&&maskForm.type != 'HIGH_ONLINE'&&maskForm.groupType == 'MUSIC'"
-                        prop="assistant">
-            <el-select v-model.trim="maskForm.assistant"
-                       style="width:220px!important"
-                       clearable
-                       filterable
-                       multiple
-                       collapse-tags>
-              <el-option v-for="(item,index) in teacherList"
-                         :key="index"
-                         :value="item.id"
-                         :label="item.realName"></el-option>
+          <el-form-item
+            label="助教老师"
+            v-if="
+              maskForm.type != 'MUSIC_NETWORK' &&
+              maskForm.type != 'HIGH_ONLINE' &&
+              maskForm.groupType == 'MUSIC'
+            "
+            prop="assistant"
+          >
+            <el-select
+              v-model.trim="maskForm.assistant"
+              style="width: 220px !important"
+              clearable
+              filterable
+              multiple
+              collapse-tags
+            >
+              <el-option
+                v-for="(item, index) in teacherList"
+                :key="index"
+                :value="item.id"
+                :label="item.realName"
+              ></el-option>
             </el-select>
           </el-form-item>
         </el-col>
       </el-row>
       <el-row>
-        <el-col :span='12'>
-          <el-form-item label="上课日期"
-                        prop="date">
-            <el-date-picker v-model.trim="maskForm.date"
-                            type="date"
-                            :picker-options="{
-                            firstDayOfWeek:1
-                          }"
-                            value-format="yyyy-MM-dd"
-                            placeholder="选择日期"></el-date-picker>
+        <el-col :span="12">
+          <el-form-item label="上课日期" prop="date">
+            <el-date-picker
+              v-model.trim="maskForm.date"
+              type="date"
+              :picker-options="{
+                firstDayOfWeek: 1,
+              }"
+              value-format="yyyy-MM-dd"
+              placeholder="选择日期"
+            ></el-date-picker>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="课程时长(分钟)"
-                        prop="timer">
-            <el-input type='number'
-                      :disabled='isDisabled'
-                      style="width:220px!important"
-                      v-model="maskForm.timer"></el-input>
+          <el-form-item label="课程时长(分钟)" prop="timer">
+            <el-input
+              type="number"
+              :disabled="isDisabled"
+              style="width: 220px !important"
+              v-model="maskForm.timer"
+            ></el-input>
           </el-form-item>
         </el-col>
       </el-row>
       <el-row>
         <el-col :span="12">
-          <el-form-item label="开始时间"
-                        prop="startTime">
-            <el-time-picker placeholder="起始时间"
-                            v-model.trim="maskForm.startTime"
-                            @change="changeStartTime"
-                            format='HH:mm'
-                            value-format='HH:mm'
-                            :picker-options="{
-                            selectableRange: '04:30:00 - 23:30:00'
-                            }"></el-time-picker>
+          <el-form-item label="开始时间" prop="startTime">
+            <el-time-picker
+              placeholder="起始时间"
+              v-model.trim="maskForm.startTime"
+              @change="changeStartTime"
+              format="HH:mm"
+              value-format="HH:mm"
+              :picker-options="{
+                selectableRange: '04:30:00 - 23:30:00',
+              }"
+            ></el-time-picker>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="结束时间"
-                        prop="endTime">
-            <el-time-picker placeholder="结束时间"
-                            v-model.trim="maskForm.endTime"
-                            disabled
-                            format='HH:mm'
-                            value-format='HH:mm'
-                            :picker-options="{
-                            start: '04:30',
-                            step: '00:05',
-                            end: '23:30',
-                            minTime: maskForm.startTime
-                          }"></el-time-picker>
+          <el-form-item label="结束时间" prop="endTime">
+            <el-time-picker
+              placeholder="结束时间"
+              v-model.trim="maskForm.endTime"
+              disabled
+              format="HH:mm"
+              value-format="HH:mm"
+              :picker-options="{
+                start: '04:30',
+                step: '00:05',
+                end: '23:30',
+                minTime: maskForm.startTime,
+              }"
+            ></el-time-picker>
           </el-form-item>
         </el-col>
       </el-row>
       <el-row>
         <el-col :span="12">
-          <el-form-item label="课程类型"
-                        v-if="maskForm.type == 'VIP'"
-                        prop="courseType">
-            <el-select clearable
-                       style="width:220px!important"
-                       v-model.trim="maskForm.teachMode">
-              <el-option label="线上课"
-                         value="ONLINE"></el-option>
-              <el-option label="线下课"
-                         value="OFFLINE"></el-option>
+          <el-form-item
+            label="课程类型"
+            v-if="maskForm.type == 'VIP'"
+            prop="courseType"
+          >
+            <el-select
+              clearable
+              style="width: 220px !important"
+              v-model.trim="maskForm.teachMode"
+            >
+              <el-option label="线上课" value="ONLINE"></el-option>
+              <el-option label="线下课" value="OFFLINE"></el-option>
             </el-select>
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="教学地点"
-                        v-if="maskForm.teachMode == 'OFFLINE'&&  maskForm.type == 'VIP'">
-            <el-select v-model.trim="maskForm.address"
-                       style="width:220px!important"
-                       filterable
-                       clearable>
-              <el-option v-for="(item,index) in schoolList"
-                         :key="index"
-                         :value="item.id"
-                         :label="item.name"></el-option>
+          <el-form-item
+            label="教学地点"
+            v-if="maskForm.teachMode == 'OFFLINE' && maskForm.type == 'VIP'"
+          >
+            <el-select
+              v-model.trim="maskForm.address"
+              style="width: 220px !important"
+              filterable
+              clearable
+            >
+              <el-option
+                v-for="(item, index) in schoolList"
+                :key="index"
+                :value="item.id"
+                :label="item.name"
+              ></el-option>
             </el-select>
           </el-form-item>
         </el-col>
       </el-row>
-
     </el-form>
-    <div slot="footer"
-         class="dialog-footer">
+    <div slot="footer" class="dialog-footer">
       <el-button @click="$listeners.closeReset">取 消</el-button>
-      <el-button type="primary"
-                 @click="submitResetClass">确 定</el-button>
+      <el-button type="primary" @click="submitResetClass">确 定</el-button>
     </div>
-    <el-dialog title="学员列表"
-               width="650px"
-               append-to-body
-               :visible.sync="studentListModalVisible"
-               destroy-on-close>
-      <viewStudentList :list="studentListModal"
-      :showOk='true'
-                       @close="studentListModalVisible = false" />
+    <el-dialog
+      title="学员列表"
+      width="650px"
+      append-to-body
+      :visible.sync="studentListModalVisible"
+      destroy-on-close
+    >
+      <viewStudentList
+        :list="studentListModal"
+        :showOk="true"
+        @close="studentListModalVisible = false"
+      />
     </el-dialog>
   </div>
 </template>
 <script>
-import { diffTimerFormMinute, addTimerFormMinute } from '@/utils/date'
-import { getTeacher, courseMerge, getCourseScheduleDetail,getCourseStudents } from "@/api/buildTeam";
-import viewStudentList from '../components/modals/view-student-list'
+import { diffTimerFormMinute, addTimerFormMinute } from "@/utils/date";
+import {
+  getTeacher,
+  courseMerge,
+  getCourseScheduleDetail,
+  getCourseStudents,
+} from "@/api/buildTeam";
+import viewStudentList from "../components/modals/view-student-list";
 import { getTeachSchool } from "@/api/teacherManager";
-import cleanDeep from 'clean-deep'
-import dayjs from 'dayjs';
+import cleanDeep from "clean-deep";
+import dayjs from "dayjs";
 export default {
-  props: ["show", "id", "isDisabled","idList"],
+  props: ["show", "id", "isDisabled", "idList"],
   components: { viewStudentList },
-  data () {
+  data() {
     return {
       courseVisible: false,
       studentListModalVisible: false,
@@ -185,34 +218,37 @@ export default {
         timer: null,
         startTime: null,
         endTime: null,
-        name: null
+        name: null,
       },
       maskRules: {
         name: [{ required: true, message: "请输入课程名称", trigger: "blur" }],
         teacher: [
-          { required: true, message: "请选择主教老师名称", trigger: "blur" }
+          { required: true, message: "请选择主教老师名称", trigger: "blur" },
         ],
         date: [{ required: true, message: "请选择上课时间", trigger: "blur" }],
-        startTime: [{ required: true, message: '请选择上课开始时间', trigger: 'blur' },],
-        endTime: [{ required: true, message: '请选择上课结束时间', trigger: 'blur' },],
+        startTime: [
+          { required: true, message: "请选择上课开始时间", trigger: "blur" },
+        ],
+        endTime: [
+          { required: true, message: "请选择上课结束时间", trigger: "blur" },
+        ],
       },
       teacherList: [],
       schoolList: [],
-      studentListModal: []
-    }
+      studentListModal: [],
+    };
   },
-  mounted () {
-    getTeacher().then(res => {
+  mounted() {
+    getTeacher().then((res) => {
       if (res.code == 200) {
         this.teacherList = res.data;
       }
     });
 
-    this.getDetail(this.id)
-
+    this.getDetail(this.id);
   },
   methods: {
-    submitResetClass () {
+    submitResetClass() {
       let maskForm = this.maskForm;
       if (!maskForm.startTime || !maskForm.endTime) {
         this.$message.error("请填写开始时间或结束时间");
@@ -221,20 +257,20 @@ export default {
       this.$confirm("是否确定?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
           let teachingTeacherIdList = maskForm.assistant.join(",");
           if (teachingTeacherIdList.length <= 0) {
             let teachingTeacherIdList = null;
           }
-             let arr = this.idList.split(',')
-        for(let i in arr){
-          if(arr[i] == this.id){
-            arr.splice(i,1)
+          let arr = this.idList.split(",");
+          for (let i in arr) {
+            if (arr[i] == this.id) {
+              arr.splice(i, 1);
+            }
           }
-        }
-        let ids = arr.join(',')
+          let ids = arr.join(",");
           let obj = {
             actualTeacherId: maskForm.teacher,
             startClassTimeStr: maskForm.startTime,
@@ -246,112 +282,140 @@ export default {
             groupType: maskForm.groupType,
             schoolId: this.maskForm.address,
             teachMode: this.maskForm.teachMode,
-            mergeCourseIds:ids
+            mergeCourseIds: ids,
           };
-          courseMerge(obj).then(res => {
+          courseMerge(obj).then((res) => {
             if (res.code == 200) {
               this.$message.success("修改成功");
               // this.$emit('getList')
-              this.$emit('closeReset')
+              this.$emit("closeReset");
               // this.getList();
               // this.courseVisible = false;
             }
+            if (res.code == 206) {
+              this.$confirm(`当前课程课酬预计为0,是否继续`, "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then((res) => {
+                obj.allowZeroSalary = true;
+                courseMerge(obj).then((res) => {
+                  if (res.code == 200) {
+                    this.$message.success("修改成功");
+                    // this.$emit('getList')
+                    this.$emit("closeReset");
+                    // this.getList();
+                    // this.courseVisible = false;
+                  }
+                });
+              });
+            }
           });
         })
-        .catch(() => { });
+        .catch(() => {});
     },
-    changeStartTime (val) {
-
-      this.$nextTick(res => {
-        console.log(addTimerFormMinute(this.maskForm.date, val, this.maskForm.timer))
+    changeStartTime(val) {
+      this.$nextTick((res) => {
+        console.log(
+          addTimerFormMinute(this.maskForm.date, val, this.maskForm.timer)
+        );
         if (val) {
-          this.$set(this.maskForm, 'endTime', addTimerFormMinute(this.maskForm.date, val, this.maskForm.timer))
+          this.$set(
+            this.maskForm,
+            "endTime",
+            addTimerFormMinute(this.maskForm.date, val, this.maskForm.timer)
+          );
         } else {
-          this.$set(this.maskForm, 'endTime', '')
+          this.$set(this.maskForm, "endTime", "");
         }
-
-      })
+      });
     },
-    changeTeacher (val) {
+    changeTeacher(val) {
       if (val) {
         getTeachSchool({
-          userId: val
-        }).then(res => {
+          userId: val,
+        }).then((res) => {
           if (res.code == 200) {
             this.schoolList = res.data;
           }
-        })
-        this.maskForm.address = ''
+        });
+        this.maskForm.address = "";
       }
     },
-    getDetail (id) {
-      getCourseScheduleDetail({ courseScheduleId: id }).then(res => {
+    getDetail(id) {
+      getCourseScheduleDetail({ courseScheduleId: id }).then((res) => {
         if (res.code == 200) {
-          console.log(res.data.groupType)
+          console.log(res.data.groupType);
           this.maskForm = {
             id: res.data.id,
             teacher: res.data.actualTeacherId,
             assistant: [],
-            date: dayjs(res.data.classDate).format('YYYY-MM-DD'),
-            startTime: dayjs(res.data.startClassTime).format('HH:mm'),
-            endTime: dayjs(res.data.endClassTime).format('HH:mm'),
+            date: dayjs(res.data.classDate).format("YYYY-MM-DD"),
+            startTime: dayjs(res.data.startClassTime).format("HH:mm"),
+            endTime: dayjs(res.data.endClassTime).format("HH:mm"),
             timer: null,
             type: res.data.type,
             groupType: res.data.groupType,
             schoolId: res.data.schoolId,
             teachMode: res.data.teachMode,
-            name: res.data.name
-          }
+            name: res.data.name,
+          };
           this.maskForm.assistant = [];
           for (let i in res.data.teachingTeachers) {
             if (res.data.teachingTeachers[i].teacherRole == "TEACHING") {
               this.maskForm.assistant.push(res.data.teachingTeachers[i].userId);
             }
           }
-          let time = diffTimerFormMinute(dayjs(res.data.classDate).format('YYYY-MM-DD'), dayjs(res.data.startClassTime).format('HH:mm'), dayjs(res.data.endClassTime).format('HH:mm'))
-          console.log(dayjs(res.data.startClassTime).format('HH:mm'))
+          let time = diffTimerFormMinute(
+            dayjs(res.data.classDate).format("YYYY-MM-DD"),
+            dayjs(res.data.startClassTime).format("HH:mm"),
+            dayjs(res.data.endClassTime).format("HH:mm")
+          );
+          console.log(dayjs(res.data.startClassTime).format("HH:mm"));
           this.maskForm.timer = time;
           if (this.maskForm.teacher) {
             getTeachSchool({
-              userId: this.maskForm.teacher
-            }).then(res => {
+              userId: this.maskForm.teacher,
+            }).then((res) => {
               if (res.code == 200) {
                 this.schoolList = res.data;
               }
-            })
+            });
           }
         }
-      })
+      });
     },
-    lookStudentList(){
-      getCourseStudents({courseIds:this.idList}).then(res=>{
-        if(res.code == 200){
+    lookStudentList() {
+      getCourseStudents({ courseIds: this.idList }).then((res) => {
+        if (res.code == 200) {
           this.studentListModal = res.data;
           this.studentListModalVisible = true;
         }
-      })
-    }
+      });
+    },
   },
 
   watch: {
-    id (val) {
+    id(val) {
       if (val) {
-        this.getDetail(val)
+        this.getDetail(val);
       }
     },
-    'maskForm.timer' (val) {
-      this.$nextTick(res => {
+    "maskForm.timer"(val) {
+      this.$nextTick((res) => {
         if (val) {
-          this.$set(this.maskForm, 'endTime', addTimerFormMinute(this.maskForm.date, this.maskForm.startTime, val))
+          this.$set(
+            this.maskForm,
+            "endTime",
+            addTimerFormMinute(this.maskForm.date, this.maskForm.startTime, val)
+          );
         } else {
-          this.$set(this.maskForm, 'endTime', '')
+          this.$set(this.maskForm, "endTime", "");
         }
-
-      })
-    }
-  }
-
-}
+      });
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
 /deep/.dialog-footer {

+ 16 - 0
src/views/teamDetail/componentCourse/resetClass.vue

@@ -234,6 +234,22 @@ export default {
               // this.getList();
               // this.courseVisible = false;
             }
+            if(res.code== 206){
+              this.$confirm(`当前课程课酬预计为0,是否继续`, "提示", {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }).then(res=>{
+                  obj.allowZeroSalary = true;
+                   resetCourse(cleanDeep(obj)).then(res=>{
+                     if(res.code == 200){
+                       this.$message.success("修改成功");
+              this.$emit("getList");
+              this.$emit("closeReset");
+                     }
+                   })
+                })
+            }
           });
         })
         .catch(() => {});

+ 25 - 8
src/views/teamDetail/components/courseList.vue

@@ -388,7 +388,7 @@ import { diffTimerFormMinute, addTimerFormMinute } from "@/utils/date";
 import { classTimeList, musicCourseType } from "@/utils/searchArray";
 import { getSchool } from "@/api/systemManage";
 import cleanDeep from "clean-deep";
-let that
+let that;
 export default {
   name: "tcourseList",
   data() {
@@ -481,7 +481,7 @@ export default {
   components: {
     pagination,
   },
-  created(){
+  created() {
     that = this;
   },
   mounted() {
@@ -701,12 +701,14 @@ export default {
         .catch(() => {});
     },
     submitResetClass() {
-
       let maskForm = this.maskForm;
-       let diff = dayjs(maskForm.date+' '+maskForm.startTime).diff(new Date,'second')
-      if(diff<=0){
+      let diff = dayjs(maskForm.date + " " + maskForm.startTime).diff(
+        new Date(),
+        "second"
+      );
+      if (diff <= 0) {
         this.$message.error("课程开始时间必须大于当前时间");
-        return
+        return;
       }
       if (!maskForm.startTime || !maskForm.endTime) {
         this.$message.error("请填写开始时间或结束时间");
@@ -739,6 +741,22 @@ export default {
               this.getList();
               this.courseVisible = false;
             }
+            if (res.code == 206) {
+              this.$confirm(`当前课程课酬预计为0,是否继续`, "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then((res) => {
+                obj.allowZeroSalary = true;
+                resetCourse(cleanDeep(obj)).then((res) => {
+                  if (res.code == 200) {
+                    this.$message.success("修改成功");
+                    this.getList();
+                    this.courseVisible = false;
+                  }
+                });
+              });
+            }
           });
         })
         .catch(() => {});
@@ -891,7 +909,6 @@ export default {
         },
       };
     },
-
   },
   filters: {
     studentCallName: (value) => {
@@ -914,7 +931,7 @@ export default {
       );
     },
   },
-    computed: {
+  computed: {
     nowTime() {
       // console.log(that.maskForm.date)
       let str = "04:30:00";

+ 2 - 2
src/views/teamDetail/teamCourseList.vue

@@ -75,8 +75,8 @@
             placeholder="课程组类型"
           >
             <el-option
-              v-for="(item, index) in courseListType"
-              :key="index"
+              v-for="(item) in courseListType"
+              :key="item.value"
               :value="item.value"
               :label="item.label"
             ></el-option>

+ 2 - 2
src/views/teamDetail/teamDetailedList.vue

@@ -107,7 +107,7 @@ export default {
       })
     },
     onCancel () {
-       this.$store.dispatch('delVisitedViews', this.$route) 
+       this.$store.dispatch('delVisitedViews', this.$route)
       this.$router.push({ path: '/business/teamDetail'})
     },
     okDetailList () {
@@ -231,4 +231,4 @@ export default {
 </script>
 
 <style lang="scss">
-</style>
+</style>

+ 3 - 1
src/views/workBenchManager/journal/model/leave.vue

@@ -153,9 +153,11 @@ export default {
                     if (res.code == 200) {
                         this.$message.success('处理成功')
                         this.$listeners.close()
-                    } else {
+                    }
+                    else {
                         this.$message.error(res.msg)
                     }
+
                 })
             }).catch(() => {
                 //

+ 12 - 1
vue.config.js

@@ -17,12 +17,21 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // http://47.99.212.176:8000
 // //  https://online.dayaedu.com
 // let target = 'https://online.dayaedu.com' //线上
+<<<<<<< HEAD
 let target = 'http://47.114.176.40:8000' //test环境
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.38:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
 // let target = 'http://47.114.176.40:8000' // 测试服
 // let target = 'http://dev.dayaedu.com/' // 乔
+=======
+// let target = 'http://192.168.3.139:8000' // 箭河
+// let target = 'http://192.168.3.38:8000' //邹璇
+// let target = 'http://192.168.3.57:8000' //勇哥
+// let target = 'http://dev.dayaedu.com' // 测试服
+let target = 'http://47.114.176.40:8000' //开发环境
+// let target = 'http://192.168.3.134' // 乔
+>>>>>>> origin/03/08IndexAtten
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**
@@ -61,8 +70,10 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       // http://47.99.212.176:8000
       // http://192.168.3.28:8000
+      // http://192.168.3.134
+      // http://47.114.176.40:8000
       '/api-auth': {
-        target: 'http://47.114.176.40:8000',
+        target: 'http://192.168.3.134',
         changeOrigin: true,
         pathRewrite: {
           '^api-auth': ''

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels