Browse Source

Merge branch '0601Action' into dev

mo 4 years ago
parent
commit
45b0c149db

+ 2 - 0
src/router/index.js

@@ -421,6 +421,8 @@ export const asyncRoutes = {
   childrensDay:()=>import('@/views/childrensDay'),
   // 考级详情
   childrensdayDetail:()=>import('@/views/childrensDay/detail'),
+  // 异常数据
+  indexErrDataRecord:()=>import('@/views/indexErrDataRecord')
 }
 
 export default router

+ 29 - 0
src/views/indexErrDataRecord/api.js

@@ -0,0 +1,29 @@
+import request2 from '@/utils/request2'
+
+// 乐团巡查事项异常
+export const getErrInspectionData = data => request2({
+  url: '/api-web/indexErrDataRecord/queryErrInspectionData',
+  params: data,
+  method: 'get',
+})
+
+// 回访任务未完成异常
+export const getErrStudentVisit = data => request2({
+  url: '/api-web/indexErrDataRecord/queryErrStudentVisit',
+  params: data,
+  method: 'get',
+})
+
+// 考勤异常
+export const getHistoryErrCourse = data => request2({
+  url: '/api-web/indexErrDataRecord/queryHistoryErrCourseData',
+  params: data,
+  method: 'get',
+})
+
+// 异常总数
+export const getIndexErrData = data => request2({
+  url: '/api-web/indexErrDataRecord/queryRecord',
+  params: data,
+  method: 'get',
+})

+ 744 - 0
src/views/indexErrDataRecord/components/errorCourse.vue

@@ -0,0 +1,744 @@
+<template>
+  <div>
+    <div class="m-core">
+      <!-- 搜索类型 -->
+      <save-form
+        :inline="true"
+        class="searchForm"
+        @submit="search"
+        @reset="reset"
+        ref="searchForm"
+        :model.sync="searchForm"
+         :saveKey="`indexErrDataRecord-${searchType}`"
+      >
+        <el-form-item>
+          <el-input
+            type="number"
+            v-model.trim="searchForm.courseIdSearch"
+            clearable
+            placeholder="课程编号"
+          />
+        </el-form-item>
+        <el-form-item>
+          <remote-search
+            :commit="'setTeachers'"
+            v-model="searchForm.teacherIdList"
+          />
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model.trim="searchForm.courseType"
+            clearable
+            filterable
+            placeholder="课程类型"
+          >
+            <el-option
+              v-for="(item, index) in courseType"
+              :key="index"
+              :value="item.value"
+              :label="item.label"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model.trim="searchForm.courseStatus"
+            clearable
+            filterable
+            placeholder="课程状态"
+          >
+            <el-option label="未开始" value="NOT_START"></el-option>
+            <el-option label="进行中" value="UNDERWAY"></el-option>
+            <el-option label="已结束" value="OVER"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-date-picker
+            v-model.trim="searchForm.timer"
+            type="daterange"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="上课开始日期"
+            end-placeholder="上课结束日期"
+            :picker-options="{
+              firstDayOfWeek: 1,
+            }"
+          ></el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            :type="isSearch ? 'primary' : 'info'"
+            icon="el-icon-circle-plus-outline"
+            @click="showMove = true"
+            >更多选项</el-button
+          >
+        </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="tableWrap">
+        <el-table
+          :data="tableList"
+          ref="tableList"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          row-key="id"
+        >
+          >
+
+          <el-table-column
+            align="center"
+            prop="organName"
+            label="分部名称"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            width="170px"
+            prop="musicGroupId"
+            label="乐团/课程组编号"
+          >
+            <template slot-scope="scope">
+              <el-button type="text" @click="gotoCourse(scope.row)">
+                <copy-text>{{ scope.row.musicGroupId }}</copy-text>
+              </el-button>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="id"
+            width="100px"
+            label="课程编号"
+          >
+            <template slot-scope="scope">
+              <copy-text>{{ scope.row.id }}</copy-text>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" width="200px" label="上课时间">
+            <template slot-scope="scope"
+              >{{
+                scope.row.startClassTime
+                  ? scope.row.startClassTime.substr(0, 16)
+                  : ""
+              }}-{{
+                scope.row.endClassTime
+                  ? scope.row.endClassTime.substr(11, 5)
+                  : ""
+              }}</template
+            >
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="subjectName"
+            label="声部"
+          ></el-table-column>
+          <el-table-column prop="name" width="150px" label="课程名称">
+            <template slot-scope="scope">
+              <copy-text>{{ scope.row.name }}</copy-text>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" width="150px" label="课程类型">
+            <template slot-scope="scope">
+              <div>{{ scope.row.type | coursesType }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="教学模式">
+            <template slot-scope="scope">
+              <div>{{ scope.row.teachMode | teachMode }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="teacherName"
+            width="110"
+            label="主教老师"
+          ></el-table-column>
+          <el-table-column align="center" prop="schoolName" label="教学点">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.schoolName ? scope.row.schoolName : "网络教室" }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="courseScheduleStatus"
+            label="课程状态"
+          >
+            <template slot-scope="scope">
+              <div>{{ scope.row.status | coursesStatus }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="考勤申诉">
+            <template slot-scope="scope">
+              <div>{{ scope.row.isComplaints == 1 ? "是" : "否" }}</div>
+            </template>
+          </el-table-column>
+
+          <el-table-column align="center" prop="isLock" label="是否冻结">
+            <template slot-scope="scope">{{
+              scope.row.isLock ? "是" : "否"
+            }}</template>
+          </el-table-column>
+          <el-table-column align="center" label="异常产生时间">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.generateTime }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="异常处理时间">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.dealTime }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="isCallNames"
+            label="是否点名"
+            fixed="right"
+          >
+            <template slot-scope="scope">{{
+              scope.row.isCallNames ? "是" : "否"
+            }}</template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            label="详情"
+            fixed="right"
+            width="220px"
+          >
+            <template slot-scope="scope">
+              <div>
+                <auth auths="/teamCourseList">
+                  <el-button type="text" @click="lookDetail(scope.row)"
+                    >查看</el-button
+                  >
+                </auth>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          :total.sync="rules.total"
+          :page.sync="rules.page"
+          :limit.sync="rules.limit"
+          :page-sizes="rules.page_size"
+          @pagination="getList"
+           :saveKey="`indexErrDataRecord-${searchType}`"
+          sync
+        />
+      </div>
+    </div>
+    <el-dialog
+      title="更多选项"
+      :visible.sync="showMove"
+      v-if="showMove"
+      width="700px"
+    >
+      <el-form
+        :inline="true"
+        class="searchForm"
+        @submit="search"
+        @reset="reset"
+        ref="searchForm2"
+        :model.sync="searchForm"
+        label-width="120px"
+      >
+        <el-form-item label="课程组编号/名称" prop="search">
+          <el-input
+            style="width: 180px"
+            v-model.trim="searchForm.search"
+            clearable
+            placeholder="课程组编号/课程名称"
+          />
+        </el-form-item>
+        <el-form-item label="教学点" prop="schoolId">
+          <el-select
+            style="width: 180px"
+            v-model.trim="searchForm.schoolId"
+            clearable
+            filterable
+            placeholder="请选择教学点"
+          >
+            <el-option
+              v-for="(item, index) in selects.schools"
+              :key="index"
+              :value="item.id"
+              :label="item.name"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="分部" prop="organIdList">
+          <el-select
+            style="width: 180px"
+            class="multiple"
+            v-model.trim="searchForm.organIdList"
+            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 label="课程组类型" prop="groupType">
+          <el-select
+            style="width: 180px"
+            v-model.trim="searchForm.groupType"
+            clearable
+            filterable
+            placeholder="课程组类型"
+          >
+            <el-option
+              v-for="item in courseListType"
+              :key="item.value"
+              :value="item.value"
+              :label="item.label"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="教学模式" prop="teachMode">
+          <el-select
+            style="width: 180px"
+            v-model.trim="searchForm.teachMode"
+            clearable
+            filterable
+            placeholder="教学模式"
+          >
+            <el-option label="线上课" value="ONLINE"></el-option>
+            <el-option label="线下课" value="OFFLINE"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="合并课类型" prop="mergeCourseType">
+          <el-select
+            style="width: 180px"
+            v-model.trim="searchForm.mergeCourseType"
+            clearable
+            filterable
+            placeholder="合并课程类型"
+          >
+            <el-option
+              v-for="(item, index) in mergeCourseTypeOptions"
+              :key="index"
+              :value="item.value"
+              :label="item.label"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="老师类型" prop="teachType">
+          <el-select
+            style="width: 180px"
+            v-model.trim="searchForm.teachType"
+            clearable
+            filterable
+            placeholder="老师类型"
+          >
+            <el-option
+              v-for="item in workTypeOptions"
+              :key="item.label"
+              :label="item.label"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="是否点名" prop="isCallNames">
+          <el-select
+            style="width: 180px"
+            v-model.trim="searchForm.isCallNames"
+            clearable
+            filterable
+            placeholder="是否点名"
+          >
+            <el-option label="是" value="1"></el-option>
+            <el-option label="否" value="0"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="创建日期" prop="creatTimer">
+          <el-date-picker
+            v-model.trim="searchForm.creatTimer"
+            type="daterange"
+            value-format="yyyy-MM-dd"
+            range-separator="-"
+            start-placeholder="创建开始日期"
+            end-placeholder="创建结束日期"
+            :picker-options="{
+              firstDayOfWeek: 1,
+            }"
+          ></el-date-picker>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="cancleMore">取 消</el-button>
+        <el-button type="primary" @click="okMore">确 定</el-button>
+      </span>
+    </el-dialog>
+    <!-- showMove -->
+  </div>
+</template>
+<script>
+import pagination from "@/components/Pagination/index";
+import {
+  superFindCourseSchedules,
+  cleanAttendance,
+  cancelCourseMerge,
+} from "@/api/buildTeam";
+import { bathDelete } from "@/api/vipSeting";
+import { workType, mergeCourseType } from "@/constant";
+import { objectToOptions, getTimes } from "@/utils";
+import { getTeacherPersonalAttendanceDetail } from "@/api/teacherManager";
+import { courseType, courseListType } from "@/utils/searchArray";
+import { permission } from "@/utils/directivePage";
+import { getHistoryErrCourse } from "../api";
+let nowTime = new Date();
+nowTime =
+  nowTime.getFullYear() +
+  "-" +
+  (nowTime.getMonth() + 1) +
+  "-" +
+  nowTime.getDate();
+
+const initSearch = {
+  teachMode: null, // 教学模式
+  organIdList: null,
+  courseStatus: null,
+  courseType: null,
+  timer: [], // 时间
+  class: null,
+  teachType: null,
+  mergeCourseType: null,
+  isCallNames: null, // 是否点名
+  search: null, // 乐团名称 编号 vip课名称
+  teacherIdList: null, // 老师编号
+  schoolId: null, // 教学点编号
+  creatTimer: [],
+  courseIdSearch: null,
+};
+export default {
+  props:['searchType'],
+  data() {
+    return {
+      classVisible: false,
+      timerVisible: false,
+      courseVisible: false,
+      locationVisible: false,
+      courseType: courseType,
+      mergeCourseType,
+      courseListType: courseListType,
+      searchForm: { ...initSearch },
+      tableList: [],
+      searchLsit: [],
+      organList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      teacherList: [],
+      schoolList: [],
+      maskForm: {},
+      activeName: "first",
+      id: null,
+      show: false,
+      compoundList: [],
+      deleteList: [],
+      isMainGo: false,
+      isDetele: false,
+      showMove: false,
+    };
+  },
+  components: {
+    pagination,
+  },
+  created() {
+    // this.searchForm.timer = [nowTime, nowTime];
+  },
+  computed: {
+    workTypeOptions() {
+      return objectToOptions(workType);
+    },
+    mergeCourseTypeOptions() {
+      return objectToOptions(mergeCourseType);
+    },
+    isSearch() {
+      return (
+        this.searchForm.search ||
+        this.searchForm.schoolId ||
+        this.searchForm.organIdList ||
+        this.searchForm.groupType ||
+        this.searchForm.teachMode ||
+        this.searchForm.mergeCourseType ||
+        this.searchForm.teachType ||
+        this.searchForm.isCallNames ||
+        this.searchForm.creatTimer?.length > 0
+      );
+    },
+  },
+  mounted() {
+    const { query } = this.$route;
+    if (query.start || query.end) {
+      this.searchForm.timer = [query.start, query.end];
+    } else {
+      let flag = false;
+      for (let item in this.searchForm) {
+        if (typeof this.searchForm[item] == "object") {
+          // 对象或者数组
+          if (this.searchForm[item]?.length > 0) {
+            flag = true;
+          }
+        } else {
+          if (this.searchForm[item]) {
+            flag = true;
+          }
+        }
+      }
+      if (!flag) {
+        this.searchForm.timer = [];
+      }
+    }
+    // 课程时间段异常,不需要时间搜索
+    if (query.searchType == "COURSE_TIME_ERROR") {
+      this.searchForm.timer = [];
+    }
+
+    if (query.organId) {
+      this.searchForm.organIdList = Number(query.organId);
+    }
+    this.$store.dispatch("setBranchs");
+    this.$store.dispatch("setTeachers");
+    this.$store.dispatch("setSchools");
+
+    this.init();
+  },
+  methods: {
+    init() {
+      this.getList();
+    },
+    setTimeForSearch() {
+      const { query } = this.$route;
+      if (query.start || query.end) {
+        this.searchForm.timer = [query.start, query.end];
+      } else {
+        this.searchForm.timer = [];
+      }
+    },
+    permission(str, parent) {
+      return permission(str, parent);
+    },
+    reloadSearch(notSetTime) {
+      if (!notSetTime) {
+        this.searchForm.timer = [nowTime, nowTime];
+      }
+      this.rules.page = 1;
+      this.getList();
+    },
+
+    reset() {
+      this.searchForm = { ...initSearch };
+      this.search();
+    },
+    search() {
+      this.rules.page = 1;
+      this.$refs.searchForm.save(this.searchForm);
+      this.getList();
+    },
+    common(row) {
+      this.searchForm = {
+        ...initSearch,
+        timer: [],
+        courseIdSearch: row.newCourseId,
+      };
+      this.search();
+    },
+    getSearchForm() {
+      let searchForm = this.searchForm;
+      if (!searchForm.timer || searchForm.timer.length <= 0) {
+        searchForm.timer = [];
+        // this.$message.error("请选择时间段");
+        // return;
+      }
+      if (!searchForm.creatTimer || searchForm.creatTimer.length <= 0) {
+        searchForm.creatTimer = [];
+      }
+      let count = 0;
+      for (let item in searchForm) {
+        if (searchForm[item] && !Array.isArray(searchForm[item])) {
+          count++;
+        } else if (
+          Array.isArray(searchForm[item]) &&
+          searchForm[item].length > 0
+        ) {
+          count++;
+        }
+      }
+      //  课程时间段异常,不需要时间搜索,则课表列表搜索可以不要条件搜索
+      // if (count <= 0) {
+      //   this.$message.error("请至少选择一个搜索条件");
+      //   return false;
+      // }
+      const { creatTimer, timer, ...rest } = searchForm;
+      return {
+        ...rest,
+        page: this.rules.page,
+        rows: this.rules.limit,
+        searchType: this.searchType,
+        ...getTimes(creatTimer, ["createStartDate", "createEndDate"]),
+        ...getTimes(timer, ["startTime", "endTime"]),
+      };
+    },
+    async getList() {
+      if (!this.getSearchForm()) {
+        return;
+      }
+
+      try {
+        const res = await getHistoryErrCourse(this.getSearchForm());
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+      } catch (e) {
+        console.log(e);
+      }
+
+      // superFindCourseSchedules(this.getSearchForm()).then((res) => {
+      //   if (res.code == 200) {
+      //     this.tableList = res.data.rows;
+      //     this.rules.total = res.data.total;
+      //     let idList = this.deleteList.map((course) => {
+      //       return course.id;
+      //     });
+      //     this.isDetele = true;
+      //     this.$nextTick(() => {
+      //       this.tableList.forEach((course) => {
+      //         if (idList.indexOf(course.id) != -1) {
+      //           this.$refs.tableList.toggleRowSelection(course, true);
+      //         }
+      //       });
+      //       this.isDetele = false;
+      //     });
+
+      //     // let arr = this.$helpers.lodash.differenceWith( this.tableList, this.deleteList,'id')
+      //   }
+      // });
+    },
+    lookDetail(row) {
+
+      this.$router.push({path:'/teamCourseList',query:{courseIdSearch:row.id}})
+      // this.maskForm = row;
+      // 发请求 获取详情 row.id
+      // this.maskForm = row;
+      // this.activeName = "first";
+      // this.classVisible = true;
+      // getTeacherPersonalAttendanceDetail({ courseScheduleId: row.id }).then(
+      //   (res) => {
+      //     if (res.code == 200) {
+      //       this.maskForm = { ...this.maskForm, ...res.data };
+      //       this.maskForm.id = row.id;
+      //       this.activeName = "first";
+      //       this.classVisible = true;
+      //       this.isMainGo = this.$refs.filterSearch?.show;
+      //     }
+      //   }
+      // );
+    },
+
+    resetClass(row) {
+      this.id = row.id;
+      this.show = true;
+    },
+    closeReset() {
+      this.show = false;
+    },
+    gotoCourse(row) {
+      if (row.groupType == "MUSIC") {
+        this.$router.push({
+          path: "/teamList",
+          query: { search: row.musicGroupId },
+        });
+      } else if (row.groupType == "VIP") {
+        this.$router.push({
+          path: "/vipManager/vipList",
+          query: { search: row.musicGroupId },
+        });
+      } else if (row.groupType == "PRACTICE") {
+        this.$router.push({
+          path: "/accompanyManager/accompany",
+          query: { search: row.musicGroupId },
+        });
+      }
+    },
+  },
+  filters: {
+    isCall(val) {
+      if (val == 0) {
+        return "未点名";
+      } else if (val == 1) {
+        return "已点名";
+      }
+    },
+  },
+  watch: {
+    classVisible(val) {
+      if (!val) {
+        this.activeName = null;
+      }
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.visible {
+  visibility: hidden;
+}
+.cl-container {
+  .topFrom {
+    margin: 20px 30px 0;
+    .classlist {
+      display: flex;
+      flex-direction: row;
+      justify-content: flex-start;
+      align-items: center;
+      ul {
+        li {
+          list-style: none;
+        }
+      }
+    }
+  }
+  .searchForm {
+    margin: 0 30px;
+  }
+}
+.btnWraps {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  div {
+    margin-right: 20px;
+  }
+}
+.inputStyle {
+  width: 180px;
+}
+.red {
+  color: red;
+}
+.green {
+  color: #14928a;
+}
+
+.exportBtn {
+  background: #13817a;
+}
+.newBand {
+  margin-top: 30px;
+}
+</style>

+ 250 - 0
src/views/indexErrDataRecord/components/historyError.vue

@@ -0,0 +1,250 @@
+<template>
+  <div>
+    <save-form
+      :inline="true"
+      :model="searchForm"
+      ref="searchForm"
+      @submit="search"
+      @reset="onReSet"
+      saveKey="indexErrDataRecord-historyError"
+    >
+      <el-form-item prop="organIds">
+        <el-select
+          class="multiple"
+          v-model.trim="searchForm.organIds"
+          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="timer">
+        <el-date-picker
+          v-model.trim="searchForm.timer"
+          type="daterange"
+          value-format="yyyy-MM-dd"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="{
+            firstDayOfWeek: 1,
+          }"
+        ></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-button type="primary" v-if="permission('export/exportIndexHistoryErrData')" @click="exportIndexErr">导出</el-button>
+      </el-form-item>
+    </save-form>
+    <el-table
+      style="width: 100%"
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      :data="tableList"
+    >
+      <el-table-column align="center" prop="month" label="日期">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.generateTime }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="organName" label="分部">
+        <template slot-scope="scope">
+          <div>
+            <copy-text>{{ scope.row.organName }}</copy-text>
+          </div>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        align="center"
+        prop="userName"
+        label="乐团巡查事项异常剩余/总数"
+      >
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.musicPatrolItemSurplus?scope.row.musicPatrolItemSurplus:'0'}} / {{ scope.row.musicPatrolItem?scope.row.musicPatrolItem:'0'}}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="item"
+        label="乐团巡查任务未提交剩余/总数"
+      >
+        <template slot-scope="scope">
+          <div>
+             {{ scope.row.inspectionItemPlanSurplus?scope.row.inspectionItemPlanSurplus:'0'}} / {{ scope.row.inspectionItemPlan?scope.row.inspectionItemPlan:'0'}}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="times"
+        label="回访任务未完成剩余/总数"
+      >
+           <template slot-scope="scope">
+          <div>
+             {{ scope.row.studentVisitSurplus?scope.row.studentVisitSurplus:'0'}} / {{ scope.row.studentVisit?scope.row.studentVisit:'0'}}
+          </div>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        align="center"
+        prop="plannedTimes"
+        label="课程考勤异常剩余/总数"
+      >
+            <template slot-scope="scope">
+          <div>
+             {{ scope.row.teacherExceptionAttendanceSurplus?scope.row.teacherExceptionAttendanceSurplus:'0'}} / {{scope.row.teacherExceptionAttendance?scope.row.teacherExceptionAttendance:'0'}}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="submittedTimes"
+        label="课程异常剩余/总数"
+      >
+        <template slot-scope="scope">
+          <div
+
+          >
+            {{ scope.row.teacherNotAClassSurplus?scope.row.teacherNotAClassSurplus:'0'}} / {{ scope.row.teacherNotAClass?scope.row.teacherNotAClass:'0'}}
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      sync
+      :total.sync="rules.total"
+       saveKey="indexErrDataRecord-historyError"
+      :page.sync="rules.page"
+      :limit.sync="rules.limit"
+      :page-sizes="rules.page_size"
+      @pagination="getList"
+    />
+  </div>
+</template>
+<script>
+// import { getInspectionItem, resetInspectionItem } from "../api";
+import { permission } from "@/utils/directivePage";
+import pagination from "@/components/Pagination/index";
+import { getIndexErrData } from "../api";
+import dayjs from "dayjs";
+import { getTimes } from "@/utils";
+import { Export } from "@/utils/downLoadFile";
+export default {
+  props: ["searchType"],
+  components: { pagination },
+  data() {
+    return {
+      searchForm: {
+        organIds: "",
+        timer: [],
+      },
+      tableList: [],
+      handleVisible: false,
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
+  },
+  mounted() {
+    this.$store.dispatch("setBranchs");
+    this.getList();
+  },
+  methods: {
+    permission(str) {
+      return permission(str);
+    },
+    onReSet() {
+      this.$refs.searchForm.resetFields();
+      this.search();
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    async getList() {
+      let { timer, ...rest } = this.searchForm;
+      let params = {
+        ...rest,
+        page: this.rules.page,
+        rows: this.rules.limit,
+        ...getTimes(timer, ["startDate", "endDate"]),
+        searchType: this.searchType,
+      };
+      try {
+        const res = await getIndexErrData(params);
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    resetLine(row) {
+      let { id, memo } = row;
+      this.handleForm = { id, memo };
+      this.handleVisible = true;
+    },
+    // async submitHandle() {
+    //   try {
+    //     const res = await resetInspectionItem(this.handleForm);
+    //     this.$message.success("提交成功");
+    //     this.getList();
+    //     this.handleVisible = false;
+    //   } catch (e) {
+    //     console.log(e);
+    //   }
+    // },
+    gotoHander(row) {
+      let startTime = dayjs(row.month).startOf("month").format("YYYY-MM-DD");
+      let endTime = dayjs(row.month).endOf("month").format("YYYY-MM-DD");
+      if (row.item == "VISIT") {
+        // 学员回访
+        // 跳到回访页面 搜索条件 教务老师 时间范围
+        this.$router.push({
+          path: "/studentManager/returnVisitList",
+          query: { teacher: row.userName, timer: [startTime, endTime] },
+        });
+      } else {
+        // 下校巡查
+        this.$router.push({
+          path: "/main/scheduleDetail",
+          query: {
+            teacher: row.userId,
+            startTime,
+            endTime,
+            name: row.userName,
+            organId: row.organId,
+            itemId: row.id,
+            times: row.times,
+          },
+        });
+      }
+    },
+    exportIndexErr(){
+         Export(this, {
+          url: '/api-web/export/exportIndexHistoryErrData',
+          fileName: '首页历史异常统计.xls',
+          method: 'post',
+          params:qs.stringify({...this.searchForm})
+        }, '您确定导出首页历史异常统计?')
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 467 - 0
src/views/indexErrDataRecord/components/patrol.vue

@@ -0,0 +1,467 @@
+ <!--  -->
+<template>
+  <div>
+    <!-- <h2> class="m-container"
+      <div class="squrt"></div>
+      乐团巡查
+      <filter-search
+        :keys="['searchType']"
+        :moreKeys="['organId', 'start', 'end']"
+        @reload="reloadSearch"
+      />
+    </h2> -->
+    <div class="m-core">
+      <save-form
+        :inline="true"
+        ref="searchForm"
+        @submit="search"
+        @reset="onReSet"
+        :model="searchForm"
+        :saveKey="`indexErrDataRecord-${searchType}`"
+      >
+        <el-form-item prop="search">
+          <el-input
+            type="text"
+            placeholder="请输入乐团名称"
+            clearable
+            v-model="searchForm.search"
+          />
+        </el-form-item>
+        <el-form-item prop="organId">
+          <el-select
+            class="multiple"
+            v-model.trim="searchForm.organId"
+            filterable
+            clearable
+            @change="onBranchChange"
+            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="cooperationOrganId">
+          <el-select
+            class="multiple"
+            :disabled="!searchForm.organId"
+            v-model.trim="searchForm.cooperationOrganId"
+            filterable
+            clearable
+            placeholder="请选择合作单位"
+          >
+            <el-option
+              v-for="(item, index) in cooperationList"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item prop="userId">
+          <el-select
+            class="multiple"
+            v-model.trim="searchForm.userId"
+            filterable
+            clearable
+            placeholder="请选择乐团主管"
+          >
+            <el-option
+              v-for="(item, index) in educationList"
+              :key="index"
+              :label="item.userName"
+              :value="item.userId"
+            >
+              <span style="float: left">{{ item.userName }}</span>
+              <span style="float: right; color: #8492a6; font-size: 13px">{{
+                item.userId
+              }}</span>
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item prop="createTimer">
+          <el-date-picker
+            v-model.trim="searchForm.createTimer"
+            type="daterange"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            start-placeholder="巡查开始日期"
+            end-placeholder="巡查结束日期"
+            :picker-options="{ firstDayOfWeek: 1 }"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="danger" native-type="submit">搜索</el-button>
+          <el-button native-type="reset" type="primary">重置</el-button>
+        </el-form-item>
+      </save-form>
+      <div class="tableWrap">
+        <el-table
+          style="width: 100%"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+        >
+          <el-table-column
+            align="center"
+            prop="id"
+            width="120px"
+            label="巡查编号"
+          >
+          </el-table-column>
+          <el-table-column align="center" label="所属分部">
+            <template slot-scope="scope">
+              {{ scope.row.organName }}(<copy-text>{{
+                scope.row.organId
+              }}</copy-text
+              >)
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="cooperationName"
+            label="合作单位"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="musicGroupName"
+            label="巡查乐团"
+          >
+            <template slot-scope="scope">
+              {{ scope.row.musicGroupName }}(<copy-text>{{
+                scope.row.musicGroupId
+              }}</copy-text
+              >)
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="乐团主管">
+            <template slot-scope="scope">
+              {{ scope.row.realName }}(<copy-text>{{
+                scope.row.userId
+              }}</copy-text
+              >)
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="巡查项目异常">
+            <template slot-scope="scope">
+              {{ scope.row.conclusionStatus ? "异常" : "正常" }}
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop="subject" label="巡查时间">
+            <template slot-scope="scope">
+              {{ dayjs(scope.row.planStart).format("YYYY-MM-DD HH:mm") }}~
+              {{ dayjs(scope.row.planEnd).format("HH:mm") }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="submitedTime"
+            label="提交时间"
+          ></el-table-column>
+          <el-table-column align="center" prop="status" label="提交状态">
+            <template slot-scope="scope">
+              {{ scope.row.status | statusFormat }}
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="处理方式">
+            <template slot-scope="scope">
+              <overflow-text
+                width="100%"
+                :text="scope.row.memo"
+              ></overflow-text>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="异常产生时间">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.generateTime }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="异常处理时间">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.dealTime }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" width="250px" label="操作" v-if="searchType =='MUSIC_PATROL_ITEM'">
+            <template slot-scope="scope">
+              <auth
+                auths="inspectionItemPlanConclusion/getPlanConclusion/4403"
+                v-if="scope.row.status != 0"
+              >
+                <el-button type="text" @click="onLook(scope.row)"
+                  >查看</el-button
+                >
+              </auth>
+              <auth
+                auths="inspectionItemPlanConclusion/GPS-INFO/4404"
+                v-if="scope.row.status != 0"
+              >
+                <el-button type="text" @click="onGPS(scope.row)"
+                  >GPS定位</el-button
+                >
+              </auth>
+              <auth
+                auths="inspectionItemPlanConclusion/exportPlanConclusion/4405"
+                v-if="scope.row.status != 0"
+              >
+                <el-button type="text" @click="onExport(scope.row)"
+                  >下载</el-button
+                >
+              </auth>
+              <!-- <auth
+                auths="inspectionItemPlan/updateMemo"
+                v-if="scope.row.conclusionStatus == 1 || scope.row.status == 0"
+              >
+                <el-button type="text" @click="handleClick(scope.row)"
+                  >立即处理</el-button
+                >
+              </auth> -->
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+        :saveKey="`indexErrDataRecord-${searchType}`"
+          :total.sync="pageInfo.total"
+          sync
+          :page.sync="pageInfo.page"
+          :limit.sync="pageInfo.limit"
+          :page-sizes="pageInfo.page_size"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+
+    <el-dialog title="乐团巡查表" :visible.sync="tableStatus" width="1200px">
+      <look-detail v-if="tableStatus" :detail="planDetail" />
+    </el-dialog>
+
+    <el-dialog
+      title="GPS定位"
+      :visible.sync="gpsVisible"
+      width="1000px"
+      append-to-body
+    >
+      <gpsLoction v-if="gpsVisible" :activeRow="activeRow" />
+    </el-dialog>
+
+    <el-dialog
+      title="处理方式"
+      :visible.sync="handleStatus"
+      @close="handleClose('ruleForm')"
+      width="500px"
+    >
+      <el-form :model="handleForm" label-position="top" ref="ruleForm">
+        <el-form-item
+          label="处理方式"
+          prop="memo"
+          :rules="[
+            { required: true, message: '请输入处理方式', trigger: 'blur' },
+          ]"
+        >
+          <el-input type="textarea" v-model.trim="handleForm.memo"></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="handleStatus = false">取 消</el-button>
+        <el-button @click="onHandleSubmit('ruleForm')" type="primary"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/Pagination/index";
+import LookDetail from "@/views/musicInspection/modals/lookDetail";
+import dayjs from "dayjs";
+import { inspectionItemPlan, updateMemo } from "@/views/musicInspection/api";
+import { findEducationUsers } from "@/api/buildTeam";
+import { queryByOrganId } from "@/api/systemManage";
+import { getTeamList } from "@/api/teamServer";
+import { getTimes } from "@/utils";
+import { Export } from "@/utils/downLoadFile";
+import gpsLoction from "@/views/teamDetail/componentCourse/gpsLocation";
+import { getErrInspectionData } from "../api";
+export default {
+  props: ["searchType"],
+  components: { pagination, LookDetail, gpsLoction },
+  data() {
+    return {
+      educationList: [],
+      cooperationList: [],
+      musicGroupList: [],
+      activeRow: null,
+      planDetail: null,
+      searchForm: {
+        search: null,
+        organId: null,
+        userId: null,
+        // musicGroupId: null,
+        conclusionStatus: null,
+        cooperationOrganId: null,
+        createTimer: [],
+      },
+      tableList: [],
+      pageInfo: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      handleStatus: false,
+      handleForm: {
+        id: null,
+        memo: null,
+      },
+      tableStatus: false,
+      gpsVisible: false,
+    };
+  },
+  async mounted() {
+    const { query } = this.$route;
+    if (query.organId) {
+      this.searchForm.organId = query.organId;
+    }
+    if (query.conclusionStatus) {
+      this.searchForm.conclusionStatus = Number(query.conclusionStatus);
+    }
+    if (query.start && query.end) {
+      this.searchForm.createTimer = [query.start, query.end];
+    }
+    this.getList();
+    // 分部
+    await this.$store.dispatch("setBranchs");
+
+    //  获取乐团主管
+    await findEducationUsers().then((res) => {
+      if (res.code == 200) {
+        this.educationList = res.data;
+      }
+    });
+
+    // 乐团列表 {只查询进行中的乐团}
+    // await getTeamList({ musicGroupStatus: 'PROGRESS', rows: 9999 }).then(res => {
+    //     if(res.code == 200) {
+    //         this.musicGroupList = res.data.rows
+    //     }
+    // })
+  },
+  methods: {
+    dayjs,
+    reloadSearch() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    async getList() {
+      // console.log(this.searchType)
+      try {
+        let { createTimer, ...rest } = this.searchForm;
+        let params = {
+          ...rest,
+          page: this.pageInfo.page,
+          rows: this.pageInfo.limit,
+          searchType: this.searchType,
+          ...getTimes(createTimer, ["startTime", "endTime"]),
+        };
+        const res = await getErrInspectionData(params);
+        this.tableList = res.data.rows;
+        this.pageInfo.total = res.data.total;
+      } catch (err) {}
+    },
+    reloadSearch() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onLook(row) {
+      this.planDetail = row;
+      this.tableStatus = true;
+    },
+    onGPS(row) {
+      this.activeRow = {
+        schoolLongitudeLatitude: row.schoolGps,
+        signOutLongitudeLatitude: row.submitedGps,
+      };
+      this.gpsVisible = true;
+    },
+    async onExport(row) {
+      await Export(
+        this,
+        {
+          url: "/api-web/inspectionItemPlanConclusion/exportPlanConclusion",
+          fileName: "巡查结果.xls",
+          method: "get",
+          params: {
+            planId: row.id,
+          },
+        },
+        "您确定导出巡查结果?"
+      );
+    },
+    async onBranchChange(value) {
+      if (!value) {
+        this.cooperationList = [];
+        this.searchForm.cooperationOrganId = null;
+        return;
+      }
+      // 合作单位
+      await queryByOrganId({ organId: value }).then((res) => {
+        if (res.code == 200) {
+          this.cooperationList = res.data;
+        }
+      });
+    },
+    search() {
+      this.pageInfo.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.$refs["searchForm"].resetFields();
+      this.pageInfo.page = 1;
+      this.getList();
+    },
+    handleClick(row) {
+      this.handleForm.id = row.id;
+      this.handleForm.memo = row.memo;
+      this.handleStatus = true;
+    },
+    onHandleSubmit(formName) {
+      this.$refs[formName].validate(async (valid) => {
+        if (valid) {
+          console.log(this.handleForm);
+          try {
+            await updateMemo(this.handleForm);
+            this.$message.success("处理成功");
+            this.getList();
+            this.handleStatus = false;
+          } catch (err) {}
+        }
+      });
+    },
+    handleClose(formName) {
+      this.$refs[formName].resetFields();
+    },
+  },
+  filters: {
+    statusFormat(value) {
+      let template = ["未提交", "正常", "异常"];
+      return template[value];
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+/deep/.el-dialog__body {
+  // padding: 10px 20px;
+}
+/deep/.description-title {
+  margin: 0 !important;
+}
+</style>

+ 289 - 0
src/views/indexErrDataRecord/components/visitError.vue

@@ -0,0 +1,289 @@
+<template>
+  <div>
+    <save-form
+      :inline="true"
+      :model="searchForm"
+      ref="searchForm"
+      @submit="search"
+      @reset="onReSet"
+      :saveKey="`indexErrDataRecord-${searchType}`"
+    >
+      <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="userId">
+        <remote-search :commit="'setEducations'" v-model="searchForm.userId" />
+      </el-form-item>
+      <el-form-item prop="month">
+        <el-date-picker
+          v-model="searchForm.month"
+          value-format="yyyy-MM"
+          type="monthrange"
+          start-placeholder="开始周期"
+          end-placeholder="结束周期"
+          style="width: 220px"
+        >
+        </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>
+    <el-table
+      style="width: 100%"
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      :data="tableList"
+    >
+      <el-table-column align="center" prop="organName" label="分部">
+        <template slot-scope="scope">
+          <div>
+            <copy-text>{{ scope.row.organName }}</copy-text>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="month" label="工作周期">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.month | dayjsFormatWeek }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="userName" label="乐团主管">
+        <template slot-scope="scope">
+          <div>
+            <copy-text>{{ scope.row.userName }}</copy-text>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="item" label="任务事项">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.item | inspectionItemFormat }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="times"
+        label="任务次数"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        prop="plannedTimes"
+        label="已安排日程次数"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        prop="submittedTimes"
+        label="已提交任务数"
+      >
+        <template slot-scope="scope">
+          <div
+            :style="
+              scope.row.times > scope.row.submittedTimes ? 'color:red' : ''
+            "
+          >
+            {{ scope.row.submittedTimes }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="memo" label="处理意见" width="220">
+        <template slot-scope="scope">
+          <overflow-text :text="scope.row.memo"></overflow-text>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="异常产生时间">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.generateTime }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="异常处理时间">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.dealTime }}
+          </div>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column align="center" prop="studentId" label="操作">
+        <template slot-scope="scope">
+          <div>
+             <auth v-if="scope.row.item == 'INSPECT'" auths="/teamSchedule/scheduleDetail">
+              <el-button type="text" @click="gotoHander(scope.row)"
+                >安排日程</el-button
+              >
+            </auth>
+            <auth v-if="scope.row.item != 'INSPECT'"  auths="/returnVisitList">
+            <el-button type="text"  @click="gotoHander(scope.row)"
+              >回访记录</el-button
+            >
+            </auth>
+             <auth :auths="['inspectionItem/update']">
+              <el-button
+                type="text"
+                :disabled="scope.row.times < scope.row.submittedTimes"
+                @click="resetLine(scope.row)"
+                >立即处理</el-button
+              >
+            </auth>
+          </div>
+        </template>
+      </el-table-column> -->
+    </el-table>
+    <pagination
+      sync
+      :total.sync="rules.total"
+       :saveKey="`indexErrDataRecord-${searchType}`"
+      :page.sync="rules.page"
+      :limit.sync="rules.limit"
+      :page-sizes="rules.page_size"
+      @pagination="getList"
+    />
+    <!-- <el-dialog title="处理方式" width="700px" :visible.sync="handleVisible">
+      <el-input
+        type="textarea"
+        :rows="3"
+        v-model="handleForm.memo"
+        placeholder="请填写处理方式"
+      ></el-input>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="handleVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitHandle">确 定</el-button>
+      </div>
+    </el-dialog> -->
+  </div>
+</template>
+<script>
+// import { getInspectionItem, resetInspectionItem } from "../api";
+import { permission } from "@/utils/directivePage";
+import pagination from "@/components/Pagination/index";
+import { getErrStudentVisit } from "../api";
+import dayjs from "dayjs";
+import { getTimes } from "@/utils";
+export default {
+  props: ["searchType"],
+  components: { pagination },
+  data() {
+    return {
+      searchForm: {
+        userId: "",
+        organId: "",
+        month: [],
+        searchType: "",
+      },
+      handleForm: {
+        memo: "",
+        searchType: "",
+      },
+      tableList: [],
+      handleVisible: false,
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
+  },
+  mounted() {
+    const { query } = this.$route;
+    if (query.organId) {
+      this.searchForm.organId = query.organId;
+    }
+    if (query.start && query.end) {
+      this.searchForm.month = [query.start, query.end];
+    }
+    this.$store.dispatch("setBranchs");
+    this.getList();
+  },
+  methods: {
+    permission(str) {
+      return permission(str);
+    },
+    onReSet() {
+      this.$refs.searchForm.resetFields();
+      this.search();
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    async getList() {
+      let { month, ...rest } = this.searchForm;
+      let params = {
+        ...rest,
+        page: this.rules.page,
+        rows: this.rules.limit,
+        ...getTimes(month, ["startTime", "endTime"], "YYYY-MM"),
+        searchType: this.searchType,
+      };
+      try {
+        const res = await getErrStudentVisit(params);
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    resetLine(row) {
+      let { id, memo } = row;
+      this.handleForm = { id, memo };
+      this.handleVisible = true;
+    },
+    // async submitHandle() {
+    //   try {
+    //     const res = await resetInspectionItem(this.handleForm);
+    //     this.$message.success("提交成功");
+    //     this.getList();
+    //     this.handleVisible = false;
+    //   } catch (e) {
+    //     console.log(e);
+    //   }
+    // },
+    gotoHander(row) {
+      let startTime = dayjs(row.month).startOf("month").format("YYYY-MM-DD");
+      let endTime = dayjs(row.month).endOf("month").format("YYYY-MM-DD");
+      if (row.item == "VISIT") {
+        // 学员回访
+        // 跳到回访页面 搜索条件 教务老师 时间范围
+        this.$router.push({
+          path: "/studentManager/returnVisitList",
+          query: { teacher: row.userName, timer: [startTime, endTime] },
+        });
+      } else {
+        // 下校巡查
+        this.$router.push({
+          path: "/main/scheduleDetail",
+          query: {
+            teacher: row.userId,
+            startTime,
+            endTime,
+            name: row.userName,
+            organId: row.organId,
+            itemId: row.id,
+            times: row.times,
+          },
+        });
+      }
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 94 - 0
src/views/indexErrDataRecord/index.vue

@@ -0,0 +1,94 @@
+ <template>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div>
+      异常数据查询
+      <!-- <filter-search
+        v-if="$route.query.tabrouter === 'teamSchedule'"
+        :keys="['searchType']"
+        :moreKeys="['organId']"
+        @reload="reloadItem"
+      /> -->
+    </h2>
+    <div class="m-core">
+      <tab-router @change="changeKey">
+              <el-tab-pane
+          v-if="permission('/indexErrDataRecord/historyError')"
+          lazy
+          label="异常数据查询汇总"
+          name="historyError"
+        >
+          <historyError v-if="activeKey === 'historyError'"  />
+        </el-tab-pane>
+        <el-tab-pane
+          v-if="permission('/indexErrDataRecord/patrol')"
+          lazy
+          label="乐团巡查事项异常"
+          name="patrol"
+        >
+          <patrol v-if="activeKey === 'patrol'"  searchType='MUSIC_PATROL_ITEM'/>
+        </el-tab-pane>
+        <el-tab-pane
+          v-if="permission('/indexErrDataRecord/inspection')"
+          lazy
+          label="乐团巡查任务未提交"
+          name="inspection"
+        >
+        <patrol v-if="activeKey === 'inspection'"  searchType='INSPECTION_ITEM_PLAN'/>
+        </el-tab-pane>
+        <el-tab-pane
+          v-if="permission('/indexErrDataRecord/studentvisit')"
+          lazy
+          label="回访任务未完成"
+          name="studentvisit"
+        >
+          <visitError v-if="activeKey === 'studentvisit'" searchType='STUDENT_VISIT'/>
+        </el-tab-pane>
+        <el-tab-pane
+          v-if="permission('/indexErrDataRecord/errattendance')"
+          lazy
+          label="课程考勤异常"
+          name="errattendance"
+        >
+          <errorCourse v-if="activeKey === 'errattendance'"   searchType="ERR_ATTENDANCE"/>
+        </el-tab-pane>
+        <el-tab-pane
+          v-if="permission('/indexErrDataRecord/noattendance')"
+          lazy
+          label="课程异常"
+          name="noattendance"
+        >
+          <errorCourse v-if="activeKey === 'noattendance'"   searchType="NO_ATTENDANCE" />
+        </el-tab-pane>
+      </tab-router>
+    </div>
+  </div>
+</template>
+<script>
+import { permission } from "@/utils/directivePage";
+import patrol from './components/patrol'
+import visitError from './components/visitError'
+import errorCourse from './components/errorCourse'
+import historyError from './components/historyError'
+export default {
+  name: "indexErrDataRecord",
+  components:{patrol,visitError,errorCourse,historyError},
+  data() {
+    return {
+      activeKey: "",
+    };
+  },
+  methods: {
+    permission,
+    changeKey(val) {
+      this.activeKey = val;
+    },
+    reloadItem() {
+      console.log("调用");
+      if (this.$refs.teamSchedule) {
+        this.$refs.teamSchedule.getList();
+      }
+    },
+  },
+};
+</script>

+ 5 - 0
src/views/teamDetail/teamCourseList.vue

@@ -935,6 +935,9 @@ export default {
   },
   mounted() {
     const { query } = this.$route;
+    if(query.courseIdSearch){
+      this.searchForm.courseIdSearch = query.courseIdSearch
+    }
     if (query.start || query.end) {
       this.searchForm.timer = [query.start, query.end];
     } else {
@@ -947,10 +950,12 @@ export default {
           }
         } else {
           if (this.searchForm[item]) {
+             this.searchForm.timer = [];
             flag = true;
           }
         }
       }
+       console.log('flag',flag,this.searchForm.timer)
       if (!flag) {
         this.searchForm.timer = [nowTime, nowTime];
       }