Parcourir la source

01/26 乐团巡查

mo il y a 4 ans
Parent
commit
a58d575320

+ 2 - 0
debug.log

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

+ 3 - 1
src/router/index.js

@@ -369,7 +369,9 @@ export const asyncRoutes = {
   // 学生考情列表
   stuRecodeManager:()=>import('@/views/stuRecodeManager'),
   // 乐团班级列表
-  teamCLassList:()=>import('@/views/teamDetail/teamClassList')
+  teamCLassList:()=>import('@/views/teamDetail/teamClassList'),
+  // 乐团主管日程详情
+  scheduleDetail:()=>import('@/views/main/teamSchedule/scheduleDetail'),
 }
 
 export default router

+ 1 - 0
src/router/notKeepAliveList.js

@@ -81,4 +81,5 @@ export default [
   '/business/vipDetail', // vip查看
   '/contentManager/contentManager', // 内容管理
   '/business/teamCLassList', // 班级列表
+  '/main/scheduleDetail',
 ]

+ 4 - 0
src/utils/utils.js

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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