瀏覽代碼

Merge branch '03/03GRADE' into 11/24SAAS

lex 2 年之前
父節點
當前提交
c5199823f2

+ 12 - 0
src/constant/index.js

@@ -591,3 +591,15 @@ export const problemType = {
   PROFESSIONAL_ABILITY: "专业能力",
   OTHER: "其他"
 };
+
+export const shareLiveType = {
+  NO_SHARE: "未分享",
+  OPEN: "公开",
+  PRIVATE: "私密"
+};
+
+// 加入课程类型
+export const joinCourseType = {
+  PURCHASE: "购买",
+  SHARE: "分享"
+};

+ 12 - 0
src/store/modules/permission.js

@@ -672,6 +672,18 @@ function setDetailRoute(accessedRoutes) {
           }
         },
         {
+          name: "直播分享学员",
+          path: "liveShareStudentList",
+          component: () => import("@/views/liveClassManager/liveClassTwo/components/addShareStudentList"),
+          hidden: true,
+          meta: {
+            noCache: "1",
+            title: "直播分享学员",
+            belongTopMenu: "/business",
+            activeMenu: "/liveClassManager"
+          }
+        },
+        {
           name: "学员缴费设置",
           path: "studentPaySet",
           component: () =>

+ 3 - 1
src/utils/searchArray.js

@@ -31,7 +31,8 @@ import {
   levelStatus,
   evaluateStatus,
   problemType,
-  schoolUserType
+  schoolUserType,
+  shareLiveType
 } from "../constant";
 // 课程类型
 let tenantConfig = sessionStorage.getItem("tenantConfig");
@@ -902,6 +903,7 @@ export const levelStatusList = getValueForKey(levelStatus);
 export const evaluateStatusList = getValueForKey(evaluateStatus);
 export const problemTypeList = getValueForKey(problemType);
 export const schoolUserTypeList = getValueForKey(schoolUserType);
+export const shareLiveTypeList = getValueForKey(shareLiveType)
 //downListType
 function getValueForKey(obj) {
   let arr = [];

+ 6 - 0
src/utils/vueFilter.js

@@ -226,6 +226,8 @@ Vue.filter("feedbackTypeFilter", val => constant.feedbackTypeAll[val]);
 Vue.filter("feedbackTypeDescFilter", val => constant.feedbackTypeDesc[val]);
 // 小小训练营状态
 Vue.filter("campStateListFilter", val => constant.campState[val]);
+// 直播课分享
+Vue.filter("shareLiveTypeFilter", val => constant.shareLiveType[val]);
 
 // 时间处理
 Vue.filter("timer", value => {
@@ -943,3 +945,7 @@ Vue.filter("liveState", value => {
   };
   return obj[value];
 });
+
+Vue.filter("joinCourseType", value => {
+  return constant.joinCourseType[value];
+});

+ 68 - 1
src/views/liveClassManager/api.js

@@ -346,4 +346,71 @@ export function delLiveGroup(data) {
   });
 }
 
-// vipGroupManage/delLiveGroup
+// 开始加权限
+// 创建直播课分享
+export function createLiveGroupShare(data) {
+  return request({
+    url: "/api-web/courseSchedule/updateCourseScheduleShareMode",
+    method: "POST",
+    data
+  });
+}
+
+
+// 查询已分享的学员
+export function getLiveGroupShareStudent(data) {
+  return request({
+    url: "/api-web/courseShare/queryCourseSharedStudent",
+    method: "get",
+    data,
+    params: data
+  });
+}
+
+// 添加分享学员  courseShare/saveCourseShare
+export function addShareStudent(data) {
+  return request({
+    url: "/api-web/courseShare/saveCourseShare",
+    method: "post",
+    data,
+  });
+}
+// 一件添加
+export function addShareStudentQuite(data) {
+  return request({
+    url: "/api-web/courseShare/saveCourseShareByOne",
+    method: "post",
+    data,
+  });
+}
+
+// 删除分享学员
+export function deleteShareStudent(data) {
+  return request({
+    url: "/api-web/courseShare/deleteShareStudent",
+    method: "post",
+    data,
+  });
+}
+
+
+// 直播课可分享的学员
+export function getWaitShareStudent(data) {
+  return request({
+    url: "/api-web/courseShare/queryAllCourseShareStudent",
+    method: "get",
+    data,
+    params: data
+  });
+}
+
+
+// 获取回放列表
+export function getCourseVideoList(data) {
+  return request({
+    url: "/api-web/imLiveRoomVideo/queryList",
+    method: "get",
+    data,
+    params: data
+  });
+}

+ 0 - 4
src/views/liveClassManager/liveClassManager.vue

@@ -138,10 +138,6 @@ export default {
       }).then(res => {
         if (res.code == 200) {
           this.subjectList = [
-            {
-              id: -1,
-              name: "乐理"
-            },
             ...res.data
           ];
         }

+ 492 - 0
src/views/liveClassManager/liveClassTwo/components/addShareStudentList.vue

@@ -0,0 +1,492 @@
+<template>
+  <div class="m-container">
+    <!-- -->
+    <h2>
+      <el-page-header
+        @back="onCancel"
+        :content="$route.query.name + '分享名单'"
+      ></el-page-header>
+    </h2>
+    <div class="m-core">
+      <el-form :inline="true" :model="searchForm">
+        <el-form-item>
+          <el-input
+            v-model.trim="searchForm.search"
+            clearable
+            @keyup.enter.native="search"
+            placeholder="学员名/编号/手机号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item prop="organIdList">
+          <select-all
+            class="multiple"
+            clearable
+            filterable
+            collapse-tags
+            multiple
+            v-model.trim="searchForm.organIdList"
+            placeholder="请选择分部"
+            @change="onBranchChange"
+          >
+            <el-option
+              v-for="(item, index) in selects.branchs"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </select-all>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            multiple
+            collapse-tags
+            v-model.trim="searchForm.cooperationOrganId"
+            clearable
+            filterable
+            placeholder="请选择合作单位"
+            :disabled="searchForm.organIdList.length <= 0"
+          >
+            <el-option
+              v-for="(item, index) in cooperationList"
+              :key="index"
+              :value="item.id"
+              :label="item.name"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            multiple
+            collapse-tags
+            :disabled="searchForm.organIdList.length <= 0"
+            v-model.trim="searchForm.musicGroupId"
+            clearable
+            filterable
+            placeholder="请选择乐团"
+          >
+            <el-option
+              v-for="(item, index) in teamList"
+              :key="index"
+              :value="item.id"
+              :label="item.name"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item prop="subjectId">
+          <el-select
+            v-model="searchForm.subjectId"
+            clearable
+            filterable
+            placeholder="请选择声部"
+          >
+            <el-option
+              v-for="item in selects.subjects"
+              :value="item.id"
+              :label="item.name"
+              :key="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            multiple
+            collapse-tags
+            v-model.trim="searchForm.groupList"
+            clearable
+            filterable
+            placeholder="请选择群聊"
+          >
+            <el-option
+              v-for="(item, index) in groupList"
+              :key="index"
+              :value="item.id"
+              :label="item.name"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="search" type="primary">搜索</el-button>
+          <el-button @click="onReSet" type="danger">重置</el-button>
+        </el-form-item>
+      </el-form>
+      <div class="btnWrap">
+        <auth auths="courseShare/saveCourseShare">
+          <el-button @click="addBlack" type="primary" style="margin-bottom: 10px"
+            >添加学员</el-button
+          >
+        </auth>
+        <auth auths="courseShare/importStudent">
+          <el-button type="primary" @click="() => (importVisible = true)">导入</el-button>
+        </auth>
+
+        <auth auths="courseShare/deleteShareStudent">
+          <el-button @click="removes" type="danger" style="margin-bottom: 10px"
+            >删除学员</el-button
+          >
+        </auth>
+      </div>
+
+      <div class="tableWrap">
+        <el-table
+          style="width: 100%"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+          @selection-change="handleSelectionChange"
+          @select="onTableSelect"
+          ref="multipleSelection"
+        >
+          <el-table-column type="selection" width="55"> </el-table-column>
+          <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="organName" label="分部"></el-table-column>
+          <el-table-column
+            align="center"
+            prop="subjectName"
+            label="声部"
+          ></el-table-column>
+
+          <el-table-column
+            align="center"
+            prop="parentsPhone"
+            label="手机号"
+          ></el-table-column>
+          <el-table-column align="center" prop="studentId" label="操作">
+            <template slot-scope="scope">
+              <div>
+                <auth auths="courseShare/deleteShareStudent">
+                  <el-button type="text" @click="deteleBlack(scope.row)">删除</el-button>
+                </auth>
+              </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>
+    </div>
+    <addShareStudentModel @getList="getList" ref="addStudentModel" />
+    <el-dialog title="导入" width="400px" :visible.sync="importVisible">
+      <div class="importWrap">
+        <el-button type="primary" @click="() => downImport()">下载模板</el-button>
+
+        <el-upload
+          v-permission="'courseShare/importStudent'"
+          action="/api-web/courseShare/importStudent"
+          :show-file-list="false"
+          :before-upload="beforeUpload"
+          accept=".xlsx,.xls"
+          :data="{
+            courseId: $route.query.courseId,
+          }"
+          :headers="headers"
+          :on-error="handleError"
+          :on-success="handleSuccess"
+        >
+          <el-button type="primary" style="margin-left: 20px"> 导入学员 </el-button>
+        </el-upload>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="importVisible = false">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { getLiveGroupShareStudent, deleteShareStudent } from "../../api";
+
+import pagination from "@/components/Pagination/index";
+import addShareStudentModel from "../../modals/addShareStudentModel";
+import { getGroupList } from "@/views/groupChatManager/api";
+import { queryByOrganId } from "@/api/systemManage";
+import { getTeamList } from "@/api/teamServer";
+import { getToken, getTenantId } from "@/utils/auth";
+import load from "@/utils/loading";
+export default {
+  name: "liveAddStudentList",
+  //
+  components: { pagination, addShareStudentModel },
+  data() {
+    return {
+      headers: { Authorization: getToken(), tenantId: getTenantId() },
+      searchForm: {
+        search: "",
+        organIdList: [],
+        cooperationOrganId: [],
+        musicGroupId: [],
+        groupList: [],
+      },
+      tableList: [],
+      organList: [],
+      cooperationList: [],
+      groupList: [],
+      teamList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      addMuiscVisible: false,
+      multipleSelection: [],
+      chioseIdList: [],
+      isNewPage: false,
+      lookVisible: false,
+      activeRow: { sendFlag: false },
+      importVisible: false,
+    };
+  },
+
+  mounted() {
+    this.$store.dispatch("setSubjects");
+    this.$store.dispatch("setBranchs");
+    this.getGroupList();
+    this.getList();
+  },
+  methods: {
+    downImport() {
+      window.location.href =
+        "https://daya-docs.ks3-cn-beijing.ksyuncs.com/%E7%9B%B4%E6%92%AD%E8%AF%BE-%E5%88%86%E4%BA%AB%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx";
+    },
+    async getGroupList() {
+      const res = await getGroupList({ page: 1, rows: 9999 });
+      this.groupList = res.data.rows;
+    },
+    async getList() {
+      try {
+        const {
+          organIdList,
+          cooperationOrganId,
+          musicGroupId,
+          groupList,
+          ...rest
+        } = this.searchForm;
+        const res = await getLiveGroupShareStudent({
+          organIds: organIdList.join(","),
+          schoolIds: cooperationOrganId.join(","),
+          teamIds: musicGroupId.join(","),
+          groupIds: groupList.join(","),
+          ...rest,
+          page: this.rules.page,
+          rows: this.rules.limit,
+          courseId: this.$route.query.courseId,
+        });
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+        let idList = this.chioseIdList.map((group) => {
+          return group.userId;
+        });
+        this.isNewPage = true;
+        this.$nextTick(() => {
+          this.tableList.forEach((course) => {
+            if (idList.indexOf(course.userId) != -1) {
+              this.$refs.multipleSelection.toggleRowSelection(course, true);
+            }
+          });
+          this.isNewPage = false;
+        });
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      (this.searchForm = {
+        search: "",
+        organIdList: [],
+        cooperationOrganId: [],
+        musicGroupId: [],
+        groupList: [],
+      }),
+        this.clearCom();
+      this.search();
+    },
+    handleSelectionChange(val) {
+      if (val.length > 0) {
+        this.chioseIdList = this.chioseIdList.concat(val);
+        this.chioseIdList = this.$helpers.lodash.uniqBy(this.chioseIdList, "userId");
+      } else {
+        if (this.isNewPage) return;
+        let idList = this.chioseIdList.map((group) => {
+          return group.userId;
+        });
+        this.$nextTick(() => {
+          let tableIdList = [];
+          this.tableList.forEach((group) => {
+            tableIdList.push(group.userId);
+            if (idList.indexOf(group.userId) != -1) {
+              this.$refs.multipleSelection.toggleRowSelection(group, false);
+            }
+          });
+          this.chioseIdList = this.$helpers.lodash.remove(
+            this.chioseIdList,
+            function (item) {
+              return tableIdList.indexOf(item.userId) == -1;
+            }
+          );
+          if (this.chioseIdList.length <= 0) {
+            this.clearCom();
+          }
+        });
+      }
+    },
+    clearCom() {
+      this.chioseIdList = [];
+      this.$refs.multipleSelection.clearSelection();
+    },
+    onTableSelect(rows, row) {
+      let idList = this.chioseIdList.map((group) => {
+        return group.userId;
+      });
+      if (idList.indexOf(row.userId) != -1) {
+        this.chioseIdList.splice(idList.indexOf(row.userId), 1);
+        if (this.chioseIdList.length <= 0) {
+          this.clearCom();
+        }
+      }
+    },
+    onCancel() {
+      this.$router.push({
+        path: "/business/liveCourseDetail",
+        query: { ...this.$route.query },
+      });
+      this.$store.dispatch("delVisitedViews", this.$route);
+    },
+    async deteleBlack(row) {
+      this.$confirm(`你确定将${row.username}移除分享列表?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          try {
+            const res = await deleteShareStudent({
+              courseId: this.$route.query.courseId,
+              userIds: [row.userId],
+            });
+            this.getList();
+            this.clearCom();
+          } catch (e) {
+            console.log(e);
+          }
+        })
+        .catch();
+    },
+    addBlack() {
+      this.$refs.addStudentModel.openDioag({
+        courseId: this.$route.query.courseId,
+      });
+    },
+    removes() {
+      if (!this.chioseIdList || this.chioseIdList.length <= 0) {
+        this.$message.error("请至少选择一名学员");
+        return;
+      }
+      let str = this.chioseIdList
+        .map((group) => {
+          return group.username;
+        })
+        .join(",");
+      this.$confirm(`你确定将${str}移除分享列表?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          let idList = this.chioseIdList.map((group) => {
+            return group.userId;
+          });
+          try {
+            const res = await deleteShareStudent({
+              courseId: this.$route.query.courseId,
+              userIds: idList,
+            });
+            this.$message.success("删除成功");
+            this.getList();
+            this.clearCom();
+          } catch (e) {
+            console.log(e);
+          }
+        })
+        .catch();
+    },
+    async onBranchChange(val) {
+      this.searchForm.cooperationOrganId = null;
+      this.searchForm.musicGroupId = null;
+      // this.searchForm.cooperationOrganId = [];
+      this.$set(this.searchForm, "cooperationOrganId", []);
+      if (val && val.length > 0) {
+        let organId = val.join(",");
+        try {
+          await queryByOrganId({ organId }).then((res) => {
+            if (res.code == 200) {
+              this.cooperationList = res.data;
+            }
+          });
+
+          await getTeamList({ organId, page: 1, rows: 9999 }).then((res) => {
+            if (res.code == 200) {
+              this.teamList = res.data.rows;
+            }
+          });
+        } catch (e) {
+          console.log(e);
+        }
+      }
+    },
+    beforeUpload(file) {
+      //  (file.type)
+      // const isJPG = file.type === '.xlsx' || file.type === '.xls';
+      // // const isLt2M = file.size / 1024 / 1024 < 2;
+      // if (!isJPG) {
+      //   this.$message.error('上传头像图片只能是 JPG 格式!');
+      // }
+      // return isJPG;
+      // this.goodsLoading = true
+      load.startLoading();
+    },
+    handleSuccess(response, file, fileList) {
+      // 导入商品
+      // 报表导出
+      load.endLoading();
+      if (response.code == 200) {
+        this.$message.success("导入成功");
+        this.importVisible = false;
+        this.getList();
+      } else {
+        this.$message.error(response.msg);
+      }
+    },
+    handleError(err, file, fileList) {
+      load.endLoading();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.w100 {
+  width: 100%;
+}
+.btnWrap {
+  justify-content: flex-start;
+}
+.importWrap {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+</style>

+ 556 - 99
src/views/liveClassManager/liveClassTwo/components/courseAdjust.vue

@@ -1,14 +1,53 @@
 <!--  -->
 <template>
   <div>
-    <el-button type="primary" style="margin-bottom: 12px;" @click="onAdjustment">批量调整</el-button>
+    <save-form
+      :inline="true"
+      class="searchForm"
+      save-key="liveClassManager-courseAdjust"
+      @submit="search"
+      @reset="onReSet"
+      :model="searchForm"
+      ref="searchForm"
+    >
+      <el-form-item prop="shareMode">
+        <el-select
+          v-model="searchForm.shareMode"
+          filterable
+          clearable
+          placeholder="请选择分享方式"
+        >
+          <el-option
+            v-for="(item, index) in shareModeList"
+            :key="index"
+            :label="item.label"
+            :value="item.value"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="search" type="danger">搜索</el-button>
+        <el-button type="primary" native-type="reset">重置</el-button>
+      </el-form-item>
+    </save-form>
+    <el-button type="primary" style="margin-bottom: 12px" @click="onAdjustment"
+      >批量调整</el-button
+    >
     <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" :selectable="isDisabled" width="55"></el-table-column>
+      <el-table
+        style="width: 100%"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+        :data="tableList"
+        @selection-change="handleSelectionChange"
+      >
+        <el-table-column
+          type="selection"
+          :selectable="isDisabled"
+          width="55"
+        ></el-table-column>
         <el-table-column align="center" label="课程编号">
           <template slot-scope="scope">
-            <div>{{ scope.row.id || '' }}</div>
+            <div>{{ scope.row.id || "" }}</div>
           </template>
         </el-table-column>
         <el-table-column align="center" label="课程名称">
@@ -24,20 +63,130 @@
         <el-table-column align="center" prop="classDate" label="上课日期">
           <template slot-scope="scope">
             {{ scope.row.classDate | dayjsFormat }}
-            {{ scope.row.startClassTime | dayjsFormat('HH:mm') }}~{{ scope.row.endClassTime | dayjsFormat('HH:mm') }}
+            {{ scope.row.startClassTime | dayjsFormat("HH:mm") }}~{{
+              scope.row.endClassTime | dayjsFormat("HH:mm")
+            }}
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="分享状态">
+          <template slot-scope="scope">
+            <div>{{ scope.row.shareMode | shareLiveTypeFilter }}</div>
           </template>
         </el-table-column>
         <!-- <el-table-column align="center" prop="startClassTime" label="开始时间"></el-table-column>
         <el-table-column align="center" prop="endClassTime" label="结束时间"></el-table-column> -->
-        <el-table-column label="操作" width="180" align="center">
+        <el-table-column label="操作" align="center">
           <template slot-scope="scope">
             <div>
-              <el-button type="text" v-if="scope.row.id &&
-                !scope.row.isSettlement && scope.row.status != 'UNDERWAY' &&
-                $helpers.permission(
-                  'courseSchedule/classStartDateAdjust/liveReset'
-                )
-                " @click="resetClass(scope.row)">调整</el-button>
+              <el-dropdown
+                trigger="click"
+                placement="bottom"
+                :hide-on-click="false"
+                v-if="scope.row.id"
+              >
+                <span class="el-dropdown-link">
+                  操作<i class="el-icon-arrow-down el-icon--right"></i>
+                </span>
+                <el-dropdown-menu slot="dropdown" style="width: 100px">
+                  <el-dropdown-item
+                    style="width: 100px"
+                    v-if="
+                      scope.row.id &&
+                      !scope.row.isSettlement &&
+                      scope.row.status != 'UNDERWAY' &&
+                      $helpers.permission('courseSchedule/classStartDateAdjust/liveReset')
+                    "
+                    @click.native="resetClass(scope.row)"
+                  >
+                    <el-button type="text">调整</el-button>
+                  </el-dropdown-item>
+                  <el-dropdown-item
+                    style="width: 100px"
+                    @click.native="
+                      () => {
+                        if (scope.row.status == 'OVER') {
+                          return;
+                        } else {
+                          startShare(scope.row);
+                        }
+                      }
+                    "
+                    v-if="
+                      scope.row.id &&
+                      $helpers.permission('courseSchedule/updateCourseScheduleShareMode')
+                    "
+                  >
+                    <el-button type="text" :disabled="scope.row.status == 'OVER'"
+                      >分享</el-button
+                    >
+                  </el-dropdown-item>
+                  <el-dropdown-item
+                    v-if="
+                      scope.row.id &&
+                      $helpers.permission('courseSchedule/classStartDateAdjust/liveReset')
+                    "
+                    @click.native="
+                      () => {
+                        if (
+                          scope.row.status == 'OVER' ||
+                          scope.row.shareMode == 'NO_SHARE'
+                        ) {
+                          return;
+                        } else {
+                          lookCode(scope.row);
+                        }
+                      }
+                    "
+                  >
+                    <el-button
+                      type="text"
+                      :disabled="
+                        scope.row.status == 'OVER' || scope.row.shareMode == 'NO_SHARE'
+                      "
+                      >二维码</el-button
+                    >
+                  </el-dropdown-item>
+
+                  <el-dropdown-item
+                    v-if="
+                      scope.row.id &&
+                      $helpers.permission('courseShare/queryCourseSharedStudent')
+                    "
+                    @click.native="
+                      () => {
+                        if (
+                          scope.row.status == 'OVER' ||
+                          scope.row.shareMode !== 'PRIVATE'
+                        ) {
+                          return;
+                        } else {
+                          gotoShareList(scope.row);
+                        }
+                      }
+                    "
+                  >
+                    <el-button
+                      type="text"
+                      :disabled="
+                        scope.row.status == 'OVER' || scope.row.shareMode !== 'PRIVATE'
+                      "
+                      >分享列表</el-button
+                    >
+                  </el-dropdown-item>
+
+                  <el-dropdown-item
+                    @click.native="lookViedoList(scope.row)"
+                    v-if="
+                      scope.row.videoNum > 0 &&
+                      $helpers.permission('courseShare/queryCourseSharedStudent')
+                    "
+                  >
+                    <el-button type="text">回放</el-button>
+                  </el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+
+              <!--  -->
             </div>
           </template>
         </el-table-column>
@@ -45,8 +194,14 @@
     </div>
 
     <el-dialog :title="adjustmentName" width="800px" :visible.sync="adjustmentVisible">
-      <el-form :model="adjustmentForm" label-position="right" label-width="120px" ref="adjustmentForm"
-        :rules="adjustmentRules" :inline="true">
+      <el-form
+        :model="adjustmentForm"
+        label-position="right"
+        label-width="120px"
+        ref="adjustmentForm"
+        :rules="adjustmentRules"
+        :inline="true"
+      >
         <el-form-item label="已选择课时数">
           <el-input disabled v-model.trim="adjustmentForm.count"></el-input>
         </el-form-item>
@@ -64,36 +219,78 @@
         </el-form-item> -->
         <br />
         <el-form-item label="排课起始时间" prop="courseTime">
-          <el-date-picker v-model.trim="adjustmentForm.courseTime" :picker-options="pickerOptions()"
-            style="width:200px!important;" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
-          <el-checkbox style="margin-left:10px;" v-model.trim="adjustmentForm.checked">是否跳过节假日</el-checkbox>
+          <el-date-picker
+            v-model.trim="adjustmentForm.courseTime"
+            :picker-options="pickerOptions()"
+            style="width: 200px !important"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择日期"
+          ></el-date-picker>
+          <el-checkbox style="margin-left: 10px" v-model.trim="adjustmentForm.checked"
+            >是否跳过节假日</el-checkbox
+          >
         </el-form-item>
       </el-form>
       <div class="WeekWrap">
-        <h3 style="margin-bottom:20px;">
+        <h3 style="margin-bottom: 20px">
           循环次数
-          <el-button type="text" style="margin-left:10px;" @click="addWeek">添加</el-button>
+          <el-button type="text" style="margin-left: 10px" @click="addWeek"
+            >添加</el-button
+          >
         </h3>
-        <div class="countWrap" style="margin-bottom:10px;">
-          <div class="countItem" style="margin-bottom:20px;" v-for="(item, index) in weekList" :key="index">
+        <div class="countWrap" style="margin-bottom: 10px">
+          <div
+            class="countItem"
+            style="margin-bottom: 20px"
+            v-for="(item, index) in weekList"
+            :key="index"
+          >
             <span>循环周期:</span>
             <el-select v-model.trim="item.dayOfWeek" filterable clearable>
-              <el-option v-for="(item, index) in weekDateList" :key="index" :label="item.label"
-                :value="item.value"></el-option>
+              <el-option
+                v-for="(item, index) in weekDateList"
+                :key="index"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
             </el-select>
-            <span style="margin-left:10px;">开始时间</span>
-            <el-time-picker style="margin-left:10px;" placeholder v-model.trim="item.startClassTime" @change="val => {
-              changeStartTimes(val, item);
-            }" format="HH:mm" value-format="HH:mm" :picker-options="{
-  selectableRange: '06:00:00 - 21:00:00'
-}"></el-time-picker>
-            <span style="margin-left:10px;">结束时间</span>
-            <el-time-picker style="margin-left:10px;" placeholder v-model.trim="item.endClassTime" format="HH:mm"
-              value-format="HH:mm" disabled :picker-options="{
-                selectableRange: '06:00:00 - 21:00:00'
-              }"></el-time-picker>
-            <el-button style="margin-left:10px;" type="danger" :disabled="index < 1" @click="removeWeek(item)"
-              icon="el-icon-delete" circle></el-button>
+            <span style="margin-left: 10px">开始时间</span>
+            <el-time-picker
+              style="margin-left: 10px"
+              placeholder
+              v-model.trim="item.startClassTime"
+              @change="
+                (val) => {
+                  changeStartTimes(val, item);
+                }
+              "
+              format="HH:mm"
+              value-format="HH:mm"
+              :picker-options="{
+                selectableRange: '06:00:00 - 21:00:00',
+              }"
+            ></el-time-picker>
+            <span style="margin-left: 10px">结束时间</span>
+            <el-time-picker
+              style="margin-left: 10px"
+              placeholder
+              v-model.trim="item.endClassTime"
+              format="HH:mm"
+              value-format="HH:mm"
+              disabled
+              :picker-options="{
+                selectableRange: '06:00:00 - 21:00:00',
+              }"
+            ></el-time-picker>
+            <el-button
+              style="margin-left: 10px"
+              type="danger"
+              :disabled="index < 1"
+              @click="removeWeek(item)"
+              icon="el-icon-delete"
+              circle
+            ></el-button>
           </div>
         </div>
       </div>
@@ -103,21 +300,50 @@
       </div>
     </el-dialog>
 
-    <el-dialog title="课程调整" width="400px" :before-close="handleClose" :visible.sync="courseVisible">
-      <el-form :model="maskForm" class="maskForm" ref="maskForm" :rules="maskRules" label-position="right"
-        label-width="80px" :inline="true">
+    <el-dialog
+      title="课程调整"
+      width="400px"
+      :before-close="handleClose"
+      :visible.sync="courseVisible"
+    >
+      <el-form
+        :model="maskForm"
+        class="maskForm"
+        ref="maskForm"
+        :rules="maskRules"
+        label-position="right"
+        label-width="80px"
+        :inline="true"
+      >
         <el-form-item label="上课日期" prop="date">
-          <el-date-picker v-model.trim="maskForm.date" type="date" :picker-options="coursesDate()"
-            value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
+          <el-date-picker
+            v-model.trim="maskForm.date"
+            type="date"
+            :picker-options="coursesDate()"
+            value-format="yyyy-MM-dd"
+            placeholder="选择日期"
+          ></el-date-picker>
         </el-form-item>
         <el-form-item label="开始时间" prop="startTime">
-          <el-time-picker placeholder="起始时间" v-model.trim="startTime" @change="changeStartTime" format="HH:mm"
-            value-format="HH:mm" :picker-options="{
-              selectableRange: `${nowTime} - 23:30:00`
-            }"></el-time-picker>
+          <el-time-picker
+            placeholder="起始时间"
+            v-model.trim="startTime"
+            @change="changeStartTime"
+            format="HH:mm"
+            value-format="HH:mm"
+            :picker-options="{
+              selectableRange: `${nowTime} - 23:30:00`,
+            }"
+          ></el-time-picker>
         </el-form-item>
         <el-form-item label="结束时间" prop="endTime">
-          <el-time-picker placeholder="结束时间" format="HH:mm" value-format="HH:mm" v-model="maskForm.endTime" disabled>
+          <el-time-picker
+            placeholder="结束时间"
+            format="HH:mm"
+            value-format="HH:mm"
+            v-model="maskForm.endTime"
+            disabled
+          >
           </el-time-picker>
         </el-form-item>
         <!--v-if="maskForm.teachMode=='OFFLINE'"-->
@@ -138,19 +364,134 @@
         <el-button type="primary" @click="submitResetClass">确 定</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog title="分享模式" width="400px" :visible.sync="shareModeVisible">
+      <el-form
+        :model="shareModeForm"
+        class="maskForm"
+        ref="shareModeForm"
+        label-position="right"
+        label-width="80px"
+        :inline="true"
+      >
+        <el-form-item label="分享模式" prop="shareMode">
+          <el-radio-group v-model="shareModeForm.shareMode">
+            <el-radio label="OPEN">公开</el-radio>
+            <el-radio label="PRIVATE">私密</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="shareModeVisible = false">取 消</el-button>
+        <el-button type="primary" @click="createShareCode">确 定</el-button>
+      </div>
+    </el-dialog>
+    <qr-code v-model="codeStatus" title="二维码" :codeUrl="qrCodeUrl">
+      <div class="codeType">
+        {{ actvieRow.shareMode == "OPEN" ? "公开二维码" : "私密二维码" }}
+      </div>
+    </qr-code>
+
+    <el-dialog
+      :visible.sync="payVisible"
+      v-if="payVisible"
+      width="500px"
+      title="直播回放"
+    >
+      <div class="lineWrap">
+        <div
+          class="linkItem"
+          v-for="(item, index) in videoList"
+          :key="index"
+          @click="opneVideo(item)"
+        >
+          <div class="linkItemWrap">
+            <!-- <video width="110px" :src="item.url"></video> -->
+            <img width="110px" :src="videoPlace" alt="" />
+            <i class="el-icon-video-play linkIcon"></i>
+          </div>
+
+          <p :underline="false" type="text" class="lineTitle">
+            {{ item.endTime | dateForMinFormat }}
+          </p>
+        </div>
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <!-- <el-button @click="payVisible = false">取 消</el-button> -->
+        <el-button type="primary" @click="payVisible = false">确 定</el-button>
+      </div></el-dialog
+    >
+    <el-dialog
+      :title="activeVideo.endTime | dateForMinFormat"
+      width="680px"
+      append-to-body
+      :visible.sync="videoVisible"
+      v-if="videoVisible"
+    >
+      <!-- activeUrl -->
+      <div class="activeVideoWrap">
+        <vue-core-video-player
+          v-if="activeVideo.os == 'mobile' && activeVideo.videoType != 'm3u8'"
+          style="width: 480px"
+          :src="activeVideo.url"
+          ref="dialogVideo"
+        >
+          您的浏览器不支持视频播放
+        </vue-core-video-player>
+        <vue-core-video-player
+          v-if="activeVideo.os == 'mobile' && activeVideo.videoType == 'm3u8'"
+          style="width: 480px"
+          :src="activeVideo.url"
+          ref="dialogVideo"
+          :core="HLSCore"
+        >
+          您的浏览器不支持视频播放
+        </vue-core-video-player>
+        <vue-core-video-player
+          v-if="activeVideo.os == 'client'"
+          style="width: 640px"
+          :src="activeVideo.url"
+          ref="dialogVideo"
+          :core="HLSCore"
+        >
+          您的浏览器不支持视频播放
+        </vue-core-video-player>
+        <vue-core-video-player
+          v-if="activeVideo.os == 'pc'"
+          style="width: 640px"
+          :src="activeVideo.url"
+          ref="dialogVideo"
+        >
+          您的浏览器不支持视频播放
+        </vue-core-video-player>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import { resetCourse } from "@/api/buildTeam";
 import { vipCourseAdjust } from "@/api/vipSeting";
-import { liveCourseList } from '../../api'
+import { liveCourseList, createLiveGroupShare, getCourseVideoList } from "../../api";
 import { diffTimerFormMinute, addTimerFormMinute } from "@/utils/date";
-import dayjs from 'dayjs';
+import { shareLiveTypeList } from "@/utils/searchArray";
+import { vaildStudentUrl } from "@/utils/validate";
+import dayjs from "dayjs";
+import qrCode from "@/components/QrCode/index";
+import videoPlace from "../../images/video-place.png";
+import HLSCore from "@core-player/playcore-hls";
 export default {
+  components: {
+    qrCode,
+  },
   data() {
     return {
-      id: this.$route.query.id,
+      shareModeList: shareLiveTypeList,
+      searchForm: {
+        id: this.$route.query.id,
+        shareMode: "",
+      },
       adjustmentName: "",
       tableList: [],
       rules: {
@@ -158,7 +499,7 @@ export default {
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 0, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
       chioseVipList: [],
       activeList: [],
@@ -170,14 +511,14 @@ export default {
         addCount: "",
         courseType: "ONLINE",
         fee: "",
-        address: ""
+        address: "",
       },
       adjustmentRules: {
         courseTime: [{ required: true, message: "请选择开始时间" }],
         addCount: [{ required: true, message: "请输入加课次数" }],
         courseType: [{ required: true, message: "请选择课程类型" }],
         fee: [{ required: true, message: "请输入费用" }],
-        address: [{ required: true, message: "请选择教学地点" }]
+        address: [{ required: true, message: "请选择教学地点" }],
       },
       weekDateList: [
         { value: "1", label: "星期一" },
@@ -186,15 +527,15 @@ export default {
         { value: "4", label: "星期四" },
         { value: "5", label: "星期五" },
         { value: "6", label: "星期六" },
-        { value: "7", label: "星期日" }
+        { value: "7", label: "星期日" },
       ],
       weekList: [
         {
           dayOfWeek: "",
           startTime: "",
           endTime: "",
-          moid: new Date().getTime()
-        }
+          moid: new Date().getTime(),
+        },
       ],
       courseVisible: false,
       maskForm: {
@@ -203,34 +544,66 @@ export default {
         endTime: "",
         id: "",
         address: "",
-        teachMode: ""
+        teachMode: "",
       },
       maskRules: {
-        date: [{ required: true, message: "请选择上课时间", trigger: "blur" }]
+        date: [{ required: true, message: "请选择上课时间", trigger: "blur" }],
       },
       startTime: "",
+      shareModeForm: {
+        shareMode: "OPEN",
+        courseId: "",
+      },
+      shareModeVisible: false,
+      codeStatus: false,
+      qrCodeUrl: "",
+      actvieRow: { shareMode: "" },
+      payVisible: false,
+      videoVisible: false,
+      videoList: [],
+      videoPlace,
+      HLSCore,
     };
   },
   mounted() {
     this.getList();
   },
   methods: {
+    lookCode(row) {
+      this.actvieRow = row;
+      this.qrCodeUrl =
+        vaildStudentUrl() + `/mlive/?courseId=${row.id}&isLogin=true#/login`;
+      this.codeStatus = true;
+    },
+    gotoShareList(row) {
+      this.$router.push({
+        path: "/business/liveShareStudentList",
+        query: { ...this.$route.query, courseId: row.id },
+      });
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.$refs.searchForm.resetFields();
+      (this.searchForm.id = this.$route.query.id), this.search();
+    },
     async getList() {
       try {
         const { data } = await liveCourseList({
-          liveGroupId: this.id,
+          liveGroupId: this.searchForm.id,
           rows: this.rules.limit,
           page: this.rules.page,
-        })
+          ...this.searchForm,
+        });
         this.tableList = data.list;
         // this.rules.total = data.pageInfo.total;
         this.courseTime = data.singleClassMinutes;
-
-      } catch {
-      }
+      } catch {}
     },
     isDisabled(row, index) {
-      if (row.isSettlement || !row.id || row.status == 'UNDERWAY') {
+      if (row.isSettlement || !row.id || row.status == "UNDERWAY") {
         return false;
       } else {
         return true;
@@ -242,7 +615,7 @@ export default {
         dayOfWeek: "",
         startClassTime: "",
         endClassTime: "",
-        id: new Date()
+        id: new Date(),
       });
     },
     // 删除循环周
@@ -270,9 +643,9 @@ export default {
       let self = this;
       return {
         firstDayOfWeek: 1,
-        disabledDate: time => {
+        disabledDate: (time) => {
           return time.getTime() + 86400000 <= new Date().getTime();
-        }
+        },
       };
     },
     pickerOptions(dateStr) {
@@ -280,7 +653,7 @@ export default {
         firstDayOfWeek: 1,
         disabledDate(time) {
           return time.getTime() + 86400000 <= new Date().getTime();
-        }
+        },
       };
     },
     resetClass(row) {
@@ -306,7 +679,7 @@ export default {
         endTime: "",
         id: "",
         address: "",
-        teachMode: ""
+        teachMode: "",
       };
       this.$refs["maskForm"].resetFields();
     },
@@ -316,9 +689,7 @@ export default {
         this.$message.error("请填写修改时间");
         return;
       }
-      let classTime = this.maskForm.date
-        ? new Date(this.maskForm.date)
-        : new Date();
+      let classTime = this.maskForm.date ? new Date(this.maskForm.date) : new Date();
       let ymd =
         classTime.getFullYear() +
         "-" +
@@ -336,9 +707,9 @@ export default {
         classDate: this.maskForm.date,
         schoolId: this.maskForm.address || null,
         teachMode: this.maskForm.teachMode || null,
-        groupType: "LIVE"
+        groupType: "LIVE",
       };
-      resetCourse(obj).then(res => {
+      resetCourse(obj).then((res) => {
         if (res.code == 200) {
           this.$message.success("修改成功");
           this.courseVisible = false;
@@ -349,7 +720,7 @@ export default {
       });
     },
     submitAdjustment() {
-      this.$refs["adjustmentForm"].validate(item => {
+      this.$refs["adjustmentForm"].validate((item) => {
         if (item) {
           let week = this.weekList;
           if (!week[0] || !week[0].startClassTime || !week[0].dayOfWeek) {
@@ -359,7 +730,7 @@ export default {
           // 开始
           let obj = {};
           obj.courseCreateStartTime = this.adjustmentForm.courseTime;
-          let idArr = this.activeList.map(item => {
+          let idArr = this.activeList.map((item) => {
             return item.id;
           });
 
@@ -369,9 +740,9 @@ export default {
           obj.holiday = this.adjustmentForm.checked;
           obj.teachMode = this.adjustmentForm.courseType || null;
           obj.groupType = "LIVE";
-          obj.vipGroupId = this.id;
+          obj.vipGroupId = this.searchForm.id;
           obj.schoolId = this.adjustmentForm.address || null;
-          vipCourseAdjust(obj).then(res => {
+          vipCourseAdjust(obj).then((res) => {
             if (res.code == 200) {
               this.$message.success("恭喜您修改成功");
               this.adjustmentVisible = false;
@@ -382,7 +753,7 @@ export default {
       });
     },
     changeStartTime(val) {
-      this.$nextTick(res => {
+      this.$nextTick((res) => {
         if (val) {
           this.$set(
             this.maskForm,
@@ -398,14 +769,10 @@ export default {
       });
     },
     changeStartTimes(val, item) {
-      this.$nextTick(res => {
+      this.$nextTick((res) => {
         if (val) {
           let str = dayjs(new Date()).format("YYYY-MM-DD");
-          this.$set(
-            item,
-            "endClassTime",
-            addTimerFormMinute(str, val, this.courseTime)
-          );
+          this.$set(item, "endClassTime", addTimerFormMinute(str, val, this.courseTime));
         } else {
           this.$set(item, "endClassTime", "");
         }
@@ -415,6 +782,50 @@ export default {
         }
       });
     },
+    startShare(row) {
+      this.actvieRow = row;
+      this.shareModeForm.courseId = row.id;
+      console.log(row.shareMode, "row.shareMode");
+      this.shareModeForm.shareMode = row.shareMode || "OPEN";
+      if (row.shareMode == "NO_SHARE") {
+        this.shareModeForm.shareMode = "OPEN";
+      }
+      this.shareModeVisible = true;
+    },
+    async createShareCode() {
+      try {
+        const res = await createLiveGroupShare({
+          ...this.shareModeForm,
+          shareMode: this.shareModeForm.shareMode,
+        });
+
+        this.shareModeVisible = false;
+        this.$message.success("创建成功");
+        if (this.shareModeForm.shareMode == "PRIVATE") {
+          this.actvieRow.shareMode = "PRIVATE";
+          this.gotoShareList(this.actvieRow);
+        }
+        if (this.shareModeForm.shareMode == "OPEN") {
+          this.actvieRow.shareMode = "OPEN";
+          this.lookCode(this.actvieRow);
+        }
+        this.getList();
+      } catch (e) {}
+    },
+    opneVideo(row) {
+      console.log(row, "opneVideo");
+      this.activeVideo = row;
+      this.videoVisible = true;
+    },
+    async lookViedoList(row) {
+      try {
+        const res = await getCourseVideoList({ roomUid: row.liveRoomId });
+        this.videoList = res.data;
+        this.payVisible = true;
+      } catch (e) {
+        console.log(e);
+      }
+    },
   },
   computed: {
     nowTime() {
@@ -425,7 +836,7 @@ export default {
       }
 
       return str;
-    }
+    },
   },
   filters: {
     formatterTime(val) {
@@ -438,21 +849,19 @@ export default {
       return result;
     },
     formatterStatus(val) {
-      let arr = [
-        "未开始",
-        "报名中",
-        "进行中",
-        "取消",
-        "已结束",
-        "报名结束",
-        "暂停"
-      ];
+      let arr = ["未开始", "报名中", "进行中", "取消", "已结束", "报名结束", "暂停"];
       return arr[val];
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>
+.codeType {
+  text-align: center;
+  font-weight: 600;
+  font-size: 16px;
+  margin-bottom: 10px;
+}
 ::v-deep .el-dropdown-link {
   cursor: pointer;
   color: var(--color-primary);
@@ -473,7 +882,6 @@ export default {
 }
 
 .resetClassForm {
-
   ::v-deep .el-date-editor.el-input,
   ::v-deep .el-date-editor.el-input__inner {
     width: 180px !important;
@@ -481,7 +889,6 @@ export default {
 }
 
 .countWrap {
-
   ::v-deep .el-date-editor.el-input,
   ::v-deep .el-date-editor.el-input__inner {
     width: 100px !important;
@@ -500,4 +907,54 @@ export default {
   justify-content: flex-start;
   align-items: center;
 }
+
+.lineWrap {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  flex-wrap: wrap;
+
+  .linkItem {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    margin-right: 5px;
+    cursor: pointer;
+    position: relative;
+    &:hover {
+      color: var(--color-primary);
+      .lineTitle {
+        color: var(--color-primary);
+        font-weight: bold;
+      }
+    }
+    .linkItemWrap {
+      position: relative;
+      .linkIcon {
+        font-size: 25px;
+        position: absolute;
+        top: 50%;
+        margin-top: -13px;
+        left: 50%;
+        margin-left: -13px;
+        color: #fff;
+      }
+    }
+  }
+  .lineTitle {
+    height: 40px;
+    line-height: 40px;
+    color: rgba(102, 102, 102, 0.9);
+    padding: 0 17px;
+    overflow: hidden;
+    margin-bottom: 10px;
+    position: relative;
+    border-radius: 4px;
+  }
+}
+.activeVideoWrap {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
 </style>

+ 92 - 34
src/views/liveClassManager/liveClassTwo/components/studentList.vue

@@ -1,8 +1,40 @@
 <!--  -->
 <template>
   <div>
+    <save-form
+      :inline="true"
+      class="searchForm"
+      save-key="liveClassManager-studentList"
+      @submit="search"
+      @reset="onReSet"
+      :model="searchForm"
+      ref="searchForm"
+    >
+      <el-form-item prop="search">
+        <el-input
+          v-model.trim="searchForm.search"
+          clearable
+          @keyup.enter.native="
+            (e) => {
+              e.target.blur();
+              $refs.searchForm.save();
+              search();
+            }
+          "
+          placeholder="姓名/编号/手机号"
+        ></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="search" type="danger">搜索</el-button>
+        <el-button type="primary" native-type="reset">重置</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
+        style="width: 100%"
+        :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+        :data="tableList"
+      >
         <el-table-column align="center" prop="studentId" label="编号"></el-table-column>
         <el-table-column align="center" prop="organName" label="分部"></el-table-column>
         <el-table-column align="center" label="学员姓名" prop="studentName">
@@ -30,40 +62,53 @@
           <template slot-scope="scope">
             <div>
               <auth auths="/liveBlackList">
-                <el-button type="text" v-if="scope.row.studentStatus == 0 || scope.row.studentStatus == 3
-                  " @click="lookFee(scope)">退学</el-button>
+                <el-button
+                  type="text"
+                  v-if="scope.row.studentStatus == 0 || scope.row.studentStatus == 3"
+                  @click="lookFee(scope)"
+                  >退学</el-button
+                >
               </auth>
 
               <el-button type="text" @click="onDetail(scope.row)">查看订单</el-button>
-
             </div>
           </template>
         </el-table-column>
       </el-table>
-      <pagination sync saveKey="liveClass-courseOverview" :total.sync="rules.total" :page.sync="rules.page"
-        :limit.sync="rules.limit" :page-sizes="rules.page_size" @pagination="getStudents" />
+      <pagination
+        sync
+        saveKey="liveClassManager-studentList"
+        :total.sync="rules.total"
+        :page.sync="rules.page"
+        :limit.sync="rules.limit"
+        :page-sizes="rules.page_size"
+        @pagination="getStudents"
+      />
     </div>
   </div>
 </template>
 
 <script>
-import { liveStudentList, leaveSchool, getStudentSurplusCourseFee } from '../../api';
+import { liveStudentList, leaveSchool, getStudentSurplusCourseFee } from "../../api";
 import pagination from "@/components/Pagination/index";
 export default {
   components: {
-    pagination
+    pagination,
   },
   data() {
     return {
       id: this.$route.query.id,
       tableList: [],
+      searchForm: {
+        search: "",
+      },
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 0, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
-      }
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
     };
   },
   mounted() {
@@ -71,23 +116,32 @@ export default {
   },
   methods: {
     onDetail(row) {
-      console.log(row, '111')
+      console.log(row, "111");
       this.$router.push({
-        path: '/orderManager/income',
+        path: "/orderManager/income",
         query: {
-          orderNo: row.orderNo
-        }
-      })
+          orderNo: row.orderNo,
+        },
+      });
+    },
+    search() {
+      this.rules.page = 1;
+      this.getStudents();
+    },
+    onReSet() {
+      this.$refs.searchForm.resetFields();
+      (this.searchForm.id = this.$route.query.id), this.search();
     },
     async getStudents() {
       try {
         const { data } = await liveStudentList({
           liveGroupId: this.id,
           page: this.rules.page,
-          rows: this.rules.limit
-        })
-        console.log(data, 'data')
-        this.tableList = data.rows
+          rows: this.rules.limit,
+          ...this.searchForm,
+        });
+        console.log(data, "data");
+        this.tableList = data.rows;
         for (let i in this.tableList) {
           this.tableList[i].fee = 0;
           this.tableList[i].visible = false;
@@ -101,7 +155,7 @@ export default {
       let studentId = scope.row.studentId;
       let vipGroupId = this.id;
       let amount = scope.row.fee;
-      await leaveSchool({ studentId, vipGroupId, amount }).then(res => {
+      await leaveSchool({ studentId, vipGroupId, amount }).then((res) => {
         if (res.code == 200) {
           this.$message.success("退学成功");
           this.getStudents();
@@ -109,14 +163,14 @@ export default {
         if (res.code == 206) {
           this.$confirm(res.msg, "提示", {
             confirmButtonText: "确定",
-            cancelButtonText: "取消"
+            cancelButtonText: "取消",
           }).then(() => {
             leaveSchool({
               studentId,
               vipGroupId,
               amount,
-              confirmReturnActivityGive: true
-            }).then(res => {
+              confirmReturnActivityGive: true,
+            }).then((res) => {
               if (res.code == 200) {
                 this.$message.success("退学成功");
                 this.getStudents();
@@ -127,12 +181,16 @@ export default {
       });
     },
     lookFee(scope) {
-      this.$confirm(`是否确认将该学员退学?<p style="color: red;marginTop:20px">如需退款请在OA中操作</p>`, "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        dangerouslyUseHTMLString: true,
-        type: "warning"
-      })
+      this.$confirm(
+        `是否确认将该学员退学?<p style="color: red;marginTop:20px">如需退款请在OA中操作</p>`,
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          dangerouslyUseHTMLString: true,
+          type: "warning",
+        }
+      )
         .then(async () => {
           let id = scope.row.studentId;
           if (scope.row.studentStatus == 3) {
@@ -140,15 +198,15 @@ export default {
           } else {
             const { data } = await getStudentSurplusCourseFee({
               studentId: id,
-              vipGroupId: this.id
-            })
+              vipGroupId: this.id,
+            });
             scope.row.fee = data.suplusCourseFee;
             this.leaveSchool(scope);
           }
         })
-        .catch(() => { });
-    }
-  }
+        .catch(() => {});
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>

+ 415 - 0
src/views/liveClassManager/modals/addShareStudentModel.vue

@@ -0,0 +1,415 @@
+<template>
+  <div>
+    <el-dialog
+      width="1000px"
+      title="添加学员"
+      :visible.sync="lookVisible"
+      :before-close="onClose"
+      append-to-body
+    >
+      <div>
+        <el-form :inline="true" :model="searchForm">
+          <el-form :inline="true" :model="searchForm">
+            <el-form-item>
+              <el-input
+                v-model.trim="searchForm.search"
+                clearable
+                @keyup.enter.native="search"
+                placeholder="学员名/编号/手机号"
+              ></el-input>
+            </el-form-item>
+            <el-form-item prop="organIdList">
+              <select-all
+                class="multiple"
+                clearable
+                filterable
+                collapse-tags
+                multiple
+                v-model.trim="searchForm.organIdList"
+                placeholder="请选择分部"
+                @change="onBranchChange"
+              >
+                <el-option
+                  v-for="(item, index) in selects.branchs"
+                  :key="index"
+                  :label="item.name"
+                  :value="item.id"
+                ></el-option>
+              </select-all>
+            </el-form-item>
+            <el-form-item>
+              <el-select
+                multiple
+                collapse-tags
+                v-model.trim="searchForm.cooperationOrganId"
+                clearable
+                filterable
+                placeholder="请选择合作单位"
+                :disabled="searchForm.organIdList.length <= 0"
+              >
+                <el-option
+                  v-for="(item, index) in cooperationList"
+                  :key="index"
+                  :value="item.id"
+                  :label="item.name"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item>
+              <el-select
+                multiple
+                collapse-tags
+                :disabled="searchForm.organIdList.length <= 0"
+                v-model.trim="searchForm.musicGroupId"
+                clearable
+                filterable
+                placeholder="请选择乐团"
+              >
+                <el-option
+                  v-for="(item, index) in teamList"
+                  :key="index"
+                  :value="item.id"
+                  :label="item.name"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+
+            <el-form-item prop="subjectId">
+              <el-select
+                v-model="searchForm.subjectId"
+                clearable
+                filterable
+                placeholder="请选择声部"
+              >
+                <el-option
+                  v-for="item in selects.subjects"
+                  :value="item.id"
+                  :label="item.name"
+                  :key="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item>
+              <el-select
+                multiple
+                collapse-tags
+                v-model.trim="searchForm.groupList"
+                clearable
+                filterable
+                placeholder="请选择群聊"
+              >
+                <el-option
+                  v-for="(item, index) in groupList"
+                  :key="index"
+                  :value="item.id"
+                  :label="item.name"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item>
+              <el-button @click="search" type="primary">搜索</el-button>
+              <el-button @click="onReSet" type="danger">重置</el-button>
+            </el-form-item>
+          </el-form>
+        </el-form>
+        <auth auths="courseShare/saveCourseShareByOne">
+          <el-button @click="addAllStudent" type="primary" style="margin-bottom: 10px"
+            >一键添加</el-button
+          >
+        </auth>
+        <div class="tableWrap">
+          <el-table
+            style="width: 100%"
+            :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+            :data="tableList"
+            @selection-change="handleSelectionChange"
+            @select="onTableSelect"
+            ref="multipleSelection"
+          >
+            <el-table-column type="selection" width="55"> </el-table-column>
+            <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="parentsPhone" label="手机号">
+            </el-table-column>
+            <el-table-column align="center" prop="subjectName" label="声部">
+            </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>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submit">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { addShareStudent, getWaitShareStudent, addShareStudentQuite } from "../api";
+import pagination from "@/components/Pagination/index";
+import { getGroupList } from "@/views/groupChatManager/api";
+import { queryByOrganId } from "@/api/systemManage";
+import { getTeamList } from "@/api/teamServer";
+export default {
+  name: "eidtPostMsg",
+  components: { pagination },
+  data() {
+    return {
+      searchForm: {
+        search: "",
+        organIdList: [],
+        cooperationOrganId: [],
+        musicGroupId: [],
+        groupList: [],
+      },
+      tableList: [],
+      organList: [],
+      cooperationList: [],
+      groupList: [],
+      teamList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+      addMuiscVisible: false,
+      multipleSelection: [],
+      chioseIdList: [],
+      isNewPage: false,
+      lookVisible: false,
+      activeRow: { sendFlag: false },
+    };
+  },
+
+  mounted() {
+    this.$store.dispatch("setSubjects");
+    this.$store.dispatch("setBranchs");
+    this.getGroupList();
+  },
+  methods: {
+    async getGroupList() {
+      const res = await getGroupList({ page: 1, rows: 9999 });
+      this.groupList = res.data.rows;
+    },
+    async getList() {
+      try {
+        const {
+          organIdList,
+          cooperationOrganId,
+          musicGroupId,
+          groupList,
+          ...rest
+        } = this.searchForm;
+        const res = await getWaitShareStudent({
+          organIds: organIdList.join(","),
+          schoolIds: cooperationOrganId.join(","),
+          teamIds: musicGroupId.join(","),
+          groupIds: groupList.join(","),
+          ...rest,
+          page: this.rules.page,
+          rows: this.rules.limit,
+          courseId: this.activeRow.courseId,
+        });
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+        let idList = this.chioseIdList.map((group) => {
+          return group.userId;
+        });
+        this.isNewPage = true;
+        this.$nextTick(() => {
+          this.tableList.forEach((course) => {
+            if (idList.indexOf(course.userId) != -1) {
+              this.$refs.multipleSelection.toggleRowSelection(course, true);
+            }
+          });
+          this.isNewPage = false;
+        });
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      (this.searchForm = {
+        search: "",
+        organIdList: [],
+        cooperationOrganId: [],
+        musicGroupId: [],
+        groupList: [],
+      }),
+        this.clearCom();
+      this.search();
+      this.clearCom();
+      this.search();
+    },
+    async submit() {
+      if (!this.chioseIdList || this.chioseIdList.length <= 0) {
+        this.$message.error("请至少选择一名学生");
+        return;
+      }
+
+      try {
+        let idList = this.chioseIdList.map((group) => {
+          return group.userId;
+        });
+        const res = await addShareStudent({
+          userIds: idList,
+          courseId: this.activeRow.courseId,
+        });
+        this.$message.success("添加成功");
+        this.$emit("getList");
+        this.onClose();
+      } catch (e) {
+        console.log(e);
+      }
+
+      // 开始  addGroupMessageList
+      /**
+       *
+
+       */
+      console.log(this.chioseIdList);
+    },
+    handleSelectionChange(val) {
+      if (val.length > 0) {
+        this.chioseIdList = this.chioseIdList.concat(val);
+        this.chioseIdList = this.$helpers.lodash.uniqBy(this.chioseIdList, "userId");
+      } else {
+        if (this.isNewPage) return;
+        let idList = this.chioseIdList.map((group) => {
+          return group.userId;
+        });
+        this.$nextTick(() => {
+          let tableIdList = [];
+          this.tableList.forEach((group) => {
+            tableIdList.push(group.userId);
+            if (idList.indexOf(group.userId) != -1) {
+              this.$refs.multipleSelection.toggleRowSelection(group, false);
+            }
+          });
+          this.chioseIdList = this.$helpers.lodash.remove(
+            this.chioseIdList,
+            function (item) {
+              return tableIdList.indexOf(item.userId) == -1;
+            }
+          );
+          if (this.chioseIdList.length <= 0) {
+            this.clearCom();
+          }
+        });
+      }
+    },
+    clearCom() {
+      this.chioseIdList = [];
+      this.$refs.multipleSelection.clearSelection();
+    },
+    onTableSelect(rows, row) {
+      let idList = this.chioseIdList.map((group) => {
+        return group.userId;
+      });
+      if (idList.indexOf(row.userId) != -1) {
+        this.chioseIdList.splice(idList.indexOf(row.userId), 1);
+        if (this.chioseIdList.length <= 0) {
+          this.clearCom();
+        }
+      }
+    },
+    onClose() {
+      this.clearCom();
+      this.searchForm.search = "";
+      this.lookVisible = false;
+    },
+    openDioag(row) {
+      this.activeRow = row;
+      this.lookVisible = true;
+      this.getList();
+    },
+    async onBranchChange(val) {
+      // this.searchForm.cooperationOrganId = [];
+      this.$set(this.searchForm, "cooperationOrganId", []);
+      if (val && val.length > 0) {
+        let organId = val.join(",");
+        try {
+          await queryByOrganId({ organId }).then((res) => {
+            if (res.code == 200) {
+              this.cooperationList = res.data;
+            }
+          });
+
+          await getTeamList({ organId, page: 1, rows: 9999 }).then((res) => {
+            if (res.code == 200) {
+              this.teamList = res.data.rows;
+            }
+          });
+        } catch (e) {
+          console.log(e);
+        }
+      }
+    },
+    async addAllStudent() {
+      const {
+        organIdList,
+        cooperationOrganId,
+        musicGroupId,
+        groupList,
+        ...rest
+      } = this.searchForm;
+      if (
+        !organIdList.join(",") &&
+        !cooperationOrganId.join(",") &&
+        !musicGroupId.join(",") &&
+        !groupList.join(",") &&
+        !this.searchForm.search &&
+        !subjectId
+      ) {
+        this.$message.error("请至少选择一个搜索条件");
+        return;
+      }
+      try {
+        await this.$confirm("确认后当前所选条件下所有学生都可观看直播", "提示", {
+          type: "warning",
+        });
+
+        const res = await addShareStudentQuite({
+          organIds: organIdList.join(","),
+          schoolIds: cooperationOrganId.join(","),
+          teamIds: musicGroupId.join(","),
+          groupIds: groupList.join(","),
+          ...rest,
+          courseId: this.activeRow.courseId,
+        });
+        this.$message.success("添加成功");
+        this.$emit("getList");
+        this.onClose();
+      } catch (e) {}
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.w100 {
+  width: 100%;
+}
+.btnWrap {
+  justify-content: flex-start;
+}
+</style>

+ 2 - 1
src/views/liveClassManager/modals/addStudentModel.vue

@@ -385,7 +385,8 @@ export default {
         !cooperationOrganId.join(",") &&
         !musicGroupId.join(",") &&
         !groupList.join(",") &&
-        !this.searchForm.search
+        !this.searchForm.search &&
+        !subjectId
       ) {
         this.$message.error("请至少选择一个搜索条件");
         return;

+ 103 - 160
src/views/resetTeaming/components/payInfoDetail.vue

@@ -28,11 +28,7 @@
                     placeholder="请选择计价标准"
                   >
                     <el-option label="按学生" value="STUDENT"> </el-option>
-                    <el-option
-                      label="按老师"
-                      value="TEACHER"
-                      :disabled="!teamCourse"
-                    >
+                    <el-option label="按老师" value="TEACHER" :disabled="!teamCourse">
                     </el-option>
                   </el-select>
                 </el-form-item>
@@ -42,7 +38,7 @@
                   class="checkBtn"
                   :class="[
                     teamCourse ? 'active' : '',
-                    teamCourseDisabled ? 'disabled' : ''
+                    teamCourseDisabled ? 'disabled' : '',
                   ]"
                   :style="{ opacity: teamCourseDisabled ? '0.5' : '1' }"
                   @click.prevent="
@@ -58,10 +54,7 @@
                         form.calenderFeeType = 'STUDENT';
                       }
                       // 会员收费 创建续费 默认选中,不可取消选中
-                      if (
-                        courseViewType == 2 &&
-                        $route.query.team_status == 'PROGRESS'
-                      ) {
+                      if (courseViewType == 2 && $route.query.team_status == 'PROGRESS') {
                         member = false;
                         memberDisabled = false;
                         if (teamCourse) {
@@ -93,10 +86,7 @@
                 </div>
                 <div
                   class="checkBtn"
-                  :class="[
-                    member ? 'active' : '',
-                    memberDisabled ? 'disabled' : ''
-                  ]"
+                  :class="[member ? 'active' : '', memberDisabled ? 'disabled' : '']"
                   :style="{ opacity: memberDisabled ? '0.5' : '1' }"
                   @click.prevent="
                     () => {
@@ -122,15 +112,10 @@
                 </div>
                 <div
                   v-if="
-                    isShowLeBao &&
-                      tenantId == 1 &&
-                      $route.query.team_status != 'PROGRESS'
+                    isShowLeBao && tenantId == 1 && $route.query.team_status != 'PROGRESS'
                   "
                   class="checkBtn"
-                  :class="[
-                    leBao ? 'active' : '',
-                    leBaoDisabled ? 'disabled' : ''
-                  ]"
+                  :class="[leBao ? 'active' : '', leBaoDisabled ? 'disabled' : '']"
                   :style="{ opacity: leBaoDisabled ? '0.5' : '1' }"
                   @click.prevent="
                     () => {
@@ -158,7 +143,7 @@
                   class="checkBtn"
                   :class="[
                     teamActive ? 'active' : '',
-                    teamActiveDisabled ? 'disabled' : ''
+                    teamActiveDisabled ? 'disabled' : '',
                   ]"
                   :style="{ opacity: teamActiveDisabled ? '0.5' : '1' }"
                   @click.prevent="
@@ -190,9 +175,7 @@
               <payTeamCourse
                 :form="form"
                 :charges="charges"
-                :courseUnitPriceSettingsByType="
-                  organizationCourseUnitPriceSettingsByType
-                "
+                :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
                 v-if="teamCourse"
                 @create="addExtraClass"
                 @remove="removeExtraClass"
@@ -220,9 +203,7 @@
               />
               <paySchoolInfo
                 :form="form"
-                :courseUnitPriceSettingsByType="
-                  organizationCourseUnitPriceSettingsByType
-                "
+                :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
                 :teamCourse="teamCourse"
                 :member="member"
                 :teamActive="teamActive"
@@ -232,10 +213,7 @@
                 @checkType="checkType"
               />
               <backMoney
-                v-if="
-                  $route.query.payUserType == 'SCHOOL' &&
-                    form.currentTotalAmount > 0
-                "
+                v-if="$route.query.payUserType == 'SCHOOL' && form.currentTotalAmount > 0"
                 :form="form"
               />
             </div>
@@ -254,8 +232,8 @@
                       {
                         required: true,
                         message: '请选择缴费时间',
-                        trigger: 'blur'
-                      }
+                        trigger: 'blur',
+                      },
                     ]"
                     ref="paymentDate"
                   >
@@ -333,8 +311,8 @@
                       {
                         required: true,
                         message: '请输入备注',
-                        trigger: 'blur'
-                      }
+                        trigger: 'blur',
+                      },
                     ]"
                     ref="memo"
                   >
@@ -373,10 +351,10 @@
           <div
             v-if="
               !teamCourse &&
-                !member &&
-                !leBao &&
-                !teamActive &&
-                $route.query.team_status == 'PROGRESS'
+              !member &&
+              !leBao &&
+              !teamActive &&
+              $route.query.team_status == 'PROGRESS'
             "
           >
             <empty desc="暂无缴费项目配置" />
@@ -437,7 +415,7 @@ import dayjs from "dayjs";
 import subjectPreview from "@/views/resetTeaming/modals/subject-preview";
 import {
   chargeTypeList,
-  musicGroupOrganizationCourseSettingsQueryPage
+  musicGroupOrganizationCourseSettingsQueryPage,
 } from "@/api/specialSetting";
 import { getSysTenantConfig } from "@/views/courseRulersManager/api";
 import { sysConfigList } from "@/api/generalSettings";
@@ -446,12 +424,12 @@ import {
   getAllmemberRank,
   musicGroupcreateCalender,
   musicGroupresetCalender,
-  getAutoActivationFlag
+  getAutoActivationFlag,
 } from "../api";
 import {
   getMusicGroupPaymentCalenderDetail,
   findMusicGroupSubjectInfo,
-  getAgreement
+  getAgreement,
 } from "@/api/buildTeam";
 import { vipGroupActivity } from "@/api/vipSeting";
 export default {
@@ -462,7 +440,7 @@ export default {
     payTeamActive,
     subjectPreview,
     paySchoolInfo,
-    backMoney
+    backMoney,
   },
   data() {
     return {
@@ -478,8 +456,8 @@ export default {
             actualAmount: "",
             memberRankSettingId: "",
             optionalFlag: null,
-            autoActivationFlag: false
-          }
+            autoActivationFlag: false,
+          },
         ],
         leBaoList: [{}],
         activeList: [{}],
@@ -493,12 +471,12 @@ export default {
         calenderFeeJson: {
           discountTotal: "",
           allTotal: "",
-          sutdentNumber: ""
+          sutdentNumber: "",
         },
         calenderFeeType: "STUDENT",
         musicGroupCalenderRefundPeriods: [{ refundDate: "", refundAmount: "" }],
         currentTotalAmount: 0,
-        contractUrl: ""
+        contractUrl: "",
       },
       teamCourse: false,
       member: false,
@@ -528,7 +506,7 @@ export default {
         minHalfYearFee: null,
         maxHalfYearFee: null,
         minYearFee: null,
-        maxYearFee: null
+        maxYearFee: null,
       },
       dialogSubjectVisible: false, // 预览
       dialogSubjectList: [],
@@ -537,7 +515,7 @@ export default {
       tenantId: null,
       isField: false,
       showAutoActivationFlag: false,
-      initDetail: false
+      initDetail: false,
     };
   },
   mounted() {
@@ -561,19 +539,13 @@ export default {
     async init() {
       this.organId = this.musicGroup?.organId;
       this.courseViewType = this.baseInfo?.musicGroup?.courseViewType;
-      if (
-        this.courseViewType != 2 &&
-        this.$route.query.team_status == "DRAFT"
-      ) {
+      if (this.courseViewType != 2 && this.$route.query.team_status == "DRAFT") {
         // 课程团的创建缴费
         this.teamCourse = true;
         // 现在课程团不在
         // this.teamCourseDisabled = true;
         this.form.paymentType = "MUSIC_APPLY";
-      } else if (
-        this.courseViewType == 2 &&
-        this.$route.query.team_status == "DRAFT"
-      ) {
+      } else if (this.courseViewType == 2 && this.$route.query.team_status == "DRAFT") {
         // 会员团的创建缴费
         this.member = true;
         this.memberDisabled = true;
@@ -606,8 +578,8 @@ export default {
         // 说明是修改  查缴项目详情
         this.initDetail = true;
         await getMusicGroupPaymentCalenderDetail({
-          id: this.$route.query.calenderId
-        }).then(res => {
+          id: this.$route.query.calenderId,
+        }).then((res) => {
           if (res.code == 200) {
             if (res.data?.calender?.musicGroupOrganizationCourseSettingId) {
               this.form.leixing = "1";
@@ -624,15 +596,11 @@ export default {
             ) {
               this.$set(this.form, "paymentDate", [
                 res.data?.calender?.startPaymentDate,
-                res.data?.calender?.deadlinePaymentDate
+                res.data?.calender?.deadlinePaymentDate,
               ]);
             }
 
-            this.$set(
-              this.form,
-              "contractUrl",
-              res.data?.calender?.contractUrl
-            );
+            this.$set(this.form, "contractUrl", res.data?.calender?.contractUrl);
             this.$set(this.form, "memo", res.data?.calender?.memo);
 
             this.$set(
@@ -643,19 +611,14 @@ export default {
             this.$set(
               this.form,
               "isShowMusicInsuranceForPay",
-              res.data?.calender?.paymentItemShowState
-                ?.isShowMusicInsuranceForPay
+              res.data?.calender?.paymentItemShowState?.isShowMusicInsuranceForPay
             );
             this.$set(
               this.form,
               "isShowVipCourseForPay",
               res.data?.calender?.paymentItemShowState?.isShowVipCourseForPay
             );
-            this.$set(
-              this.form,
-              "isShowSalePrice",
-              res.data?.calender?.isShowSalePrice
-            );
+            this.$set(this.form, "isShowSalePrice", res.data?.calender?.isShowSalePrice);
             this.$set(
               this.form,
               "isShowMusicCourseForPay",
@@ -682,11 +645,7 @@ export default {
                 this.$set(this.form, "eclass", res.data?.course);
                 console.log([...res.data?.course], "res.data?.course");
                 this.initDetail = true;
-                this.$set(
-                  this.form,
-                  "payUserType",
-                  res.data?.calender?.payUserType
-                );
+                this.$set(this.form, "payUserType", res.data?.calender?.payUserType);
 
                 this.$set(
                   this.form,
@@ -728,7 +687,7 @@ export default {
               this.teamActive = true;
 
               this.$set(this.form, "activeList", res.data.activity);
-              this.form.activeList.forEach(active => {
+              this.form.activeList.forEach((active) => {
                 active.vipGroupCategoryNames = active.categoryName;
               });
             }
@@ -746,8 +705,8 @@ export default {
         page: 1,
         status: "PROGRESS",
         activityChannel: 1,
-        enable: true
-      }).then(res => {
+        enable: true,
+      }).then((res) => {
         if (res.code == 200) {
           this.activeList = res.data.rows;
           if (this.activeList.length <= 0) {
@@ -769,11 +728,9 @@ export default {
       try {
         const res = await sysConfigList({ group: "DEFAULT" });
         const paramName = "cloud_price_range";
-        res.data.forEach(item => {
+        res.data.forEach((item) => {
           if (item.paramName == paramName) {
-            const itemValue = item.paranValue
-              ? JSON.parse(item.paranValue)
-              : null;
+            const itemValue = item.paranValue ? JSON.parse(item.paranValue) : null;
             if (itemValue) {
               this.rulesForm = itemValue;
             }
@@ -787,7 +744,7 @@ export default {
       try {
         const res = await getSysTenantConfig({ group: "MUSIC_REPAIR" });
         this.leBaoInfo = res.data;
-        res.data.forEach(element => {
+        res.data.forEach((element) => {
           if (element.id == 188) {
             this.isShowLeBao = !!element.paranValue;
           }
@@ -815,9 +772,9 @@ export default {
         const res = await musicGroupOrganizationCourseSettingsQueryPage({
           row: 9999,
           courseViewType,
-          organId
+          organId,
         });
-        const ids = res.data.rows.map(item => item.id);
+        const ids = res.data.rows.map((item) => item.id);
         if (!ids.includes(this.form.musicGroupOrganizationCourseSettingId)) {
           this.$set(this.form, "musicGroupOrganizationCourseSettingId", null);
         }
@@ -843,13 +800,13 @@ export default {
         this.$store.dispatch("delVisitedViews", this.$route);
         this.$router.push({
           path: "/business/resetTeaming",
-          query
+          query,
         });
       } else if (query.type == "look") {
         this.$store.dispatch("delVisitedViews", this.$route);
         this.$router.push({
           path: "/business/resetTeaming",
-          query
+          query,
         });
       } else if (
         query.type == "teamDraft" ||
@@ -859,7 +816,7 @@ export default {
         this.$store.dispatch("delVisitedViews", this.$route);
         this.$router.push({
           path: "/business/resetTeaming",
-          query
+          query,
         });
       }
     },
@@ -874,7 +831,7 @@ export default {
       );
       const _ = {};
       const list = (this.organizationCourseUnitPriceSettings || []).filter(
-        item =>
+        (item) =>
           organId &&
           organId == item.organId &&
           courseViewType != null &&
@@ -914,9 +871,7 @@ export default {
           if (item.isStudentOptional) {
             first += item.courseCurrentPrice;
           } else {
-            const floorMoney = Math.floor(
-              item.courseCurrentPrice / this.cycles.length
-            );
+            const floorMoney = Math.floor(item.courseCurrentPrice / this.cycles.length);
             const remainder = item.courseCurrentPrice % this.cycles.length;
             first += floorMoney + remainder;
             other += floorMoney;
@@ -944,33 +899,35 @@ export default {
       this.$set(
         this.form,
         "activeList",
-        this.form.activeList.filter(item => !!item)
+        this.form.activeList.filter((item) => !!item)
       );
     },
     removeExtraClass(index) {
       this.form.eclass[index] = null;
-      this.$set(this.form, "eclass", this.form.eclass.filter(item => !!item));
+      this.$set(
+        this.form,
+        "eclass",
+        this.form.eclass.filter((item) => !!item)
+      );
       // this.form.eclass = this.form.eclass.filter((item) => !!item);
     },
     async onPreview() {
       // 开始预览
       const musicGroupId = this.$route.query.id;
-      await findMusicGroupSubjectInfo({ musicGroupId: musicGroupId }).then(
-        res => {
-          if (res.code == 200) {
-            this.dialogSubjectList = res.data.musicGroupSubjectPlans;
-            // 默认预览第一个
-            if (this.dialogSubjectList.length <= 0) {
-              this.$message.error("请先设置声部信息");
-              return;
-            }
-            this.activeName = this.dialogSubjectList[0].subjectId.toString();
-            this.dialogSubjectVisible = true;
-          } else {
-            this.$message.warning("没有可预览的声部");
+      await findMusicGroupSubjectInfo({ musicGroupId: musicGroupId }).then((res) => {
+        if (res.code == 200) {
+          this.dialogSubjectList = res.data.musicGroupSubjectPlans;
+          // 默认预览第一个
+          if (this.dialogSubjectList.length <= 0) {
+            this.$message.error("请先设置声部信息");
+            return;
           }
+          this.activeName = this.dialogSubjectList[0].subjectId.toString();
+          this.dialogSubjectVisible = true;
+        } else {
+          this.$message.warning("没有可预览的声部");
         }
-      );
+      });
     },
     checkType() {
       this.$refs.form.validate();
@@ -986,7 +943,7 @@ export default {
               {
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",
-                type: "warning"
+                type: "warning",
               }
             )
               .then(() => {
@@ -1006,12 +963,12 @@ export default {
       });
     },
     onSubmit() {
-      this.$refs.form.validate(async isok => {
+      this.$refs.form.validate(async (isok) => {
         if (isok) {
           let obj = this.fommatDate();
           if (obj.payUserType == "SCHOOL") {
             let total = 0;
-            this.form.musicGroupCalenderRefundPeriods.forEach(item => {
+            this.form.musicGroupCalenderRefundPeriods.forEach((item) => {
               total += item.refundAmount * 1;
             });
             if (total != this.form.currentTotalAmount) {
@@ -1032,7 +989,7 @@ export default {
                   res.msg || `当前乐团存在未排课的缴费项目,请再次确认操作`,
                   "提示",
                   {
-                    type: "warning"
+                    type: "warning",
                   }
                 );
                 obj.confirmCreate = true;
@@ -1055,7 +1012,7 @@ export default {
                   res.msg || `当前乐团存在未排课的缴费项目,请再次确认操作`,
                   "提示",
                   {
-                    type: "warning"
+                    type: "warning",
                   }
                 );
                 obj.confirmCreate = true;
@@ -1087,7 +1044,7 @@ export default {
           // 值有start,center,end,nearest,当前显示在视图区域中间
           block: "center",
           // 值有auto、instant,smooth,缓动动画(当前是慢速的)
-          behavior: "smooth"
+          behavior: "smooth",
         });
         break; // 跳出循环了
       }
@@ -1100,18 +1057,17 @@ export default {
       let tmpActiveList = form.activeList?.length > 0 ? form.activeList : [];
       let activeList = [];
       if (tmpActiveList.length > 0) {
-        tmpActiveList.forEach(active => {
+        tmpActiveList.forEach((active) => {
           if (active.activityId) {
             active.categoryName = active.vipGroupCategoryNames;
             activeList.push(active);
           }
         });
       }
-      let memberObj =
-        form.memberList?.length > 0 ? { ...form.memberList[0] } : null;
+      let memberObj = form.memberList?.length > 0 ? { ...form.memberList[0] } : null;
       // 获取会员名称
       if (memberObj) {
-        this.memberRankList.forEach(item => {
+        this.memberRankList.forEach((item) => {
           if (item.id == memberObj.memberRankSettingId) {
             memberObj.name = item.name;
           }
@@ -1121,7 +1077,7 @@ export default {
       let tempCourseList = form.eclass?.length > 0 ? form.eclass : [];
       let courseList = [];
       if (tempCourseList.length > 0) {
-        tempCourseList.forEach(course => {
+        tempCourseList.forEach((course) => {
           if (course.courseType) {
             course.isStudentOptional = true;
             courseList.push(course);
@@ -1133,7 +1089,7 @@ export default {
         musicGroup: this.musicGroup,
         paymentCalender: {
           calender: {
-            isShowSalePrice: form.isShowSalePrice
+            isShowSalePrice: form.isShowSalePrice,
           },
           activity: [...activeList], // 小班课
           course: courseList, // 课程
@@ -1144,12 +1100,12 @@ export default {
             this.isShowLeBao &&
             this.$route.query.team_status != "PROGRESS"
               ? { ...form.leBaoList[0], optionalFlag: false }
-              : null // 乐保
+              : null, // 乐保
         },
         isShowMemberForPay: form.isShowMemberForPay,
         isShowMusicInsuranceForPay: form.isShowMusicInsuranceForPay,
         isShowVipCourseForPay: form.isShowVipCourseForPay,
-        isShowMusicCourseForPay: form.isShowMusicCourseForPay
+        isShowMusicCourseForPay: form.isShowMusicCourseForPay,
       };
     },
     fommatDate() {
@@ -1164,9 +1120,7 @@ export default {
           calenderActivityList:
             this.form.activeList?.length > 0 ? this.form.activeList : null,
           musicRepair:
-            this.form.leBaoList?.length > 0
-              ? { ...this.form.leBaoList[0] }
-              : null,
+            this.form.leBaoList?.length > 0 ? { ...this.form.leBaoList[0] } : null,
           calenderMember:
             this.form.memberList?.length > 0 &&
             this.form.memberList[0]?.memberRankSettingId
@@ -1179,9 +1133,9 @@ export default {
             isShowMemberForPay: this.form.isShowMemberForPay,
             isShowMusicInsuranceForPay: this.form.isShowMusicInsuranceForPay,
             isShowVipCourseForPay: this.form.isShowVipCourseForPay,
-            isShowMusicCourseForPay: this.form.isShowMusicCourseForPay
+            isShowMusicCourseForPay: this.form.isShowMusicCourseForPay,
           }),
-          isShowSalePrice: this.form.isShowSalePrice
+          isShowSalePrice: this.form.isShowSalePrice,
         };
       } else {
         let calenderFeeJson = this.form.calenderFeeJson;
@@ -1199,9 +1153,7 @@ export default {
           calenderActivityList:
             this.form.activeList?.length > 0 ? this.form.activeList : null,
           musicRepair:
-            this.form.leBaoList?.length > 0
-              ? { ...this.form.leBaoList[0] }
-              : null,
+            this.form.leBaoList?.length > 0 ? { ...this.form.leBaoList[0] } : null,
           calenderMember:
             this.form.memberList?.length > 0 &&
             this.form.memberList[0]?.memberRankSettingId
@@ -1214,14 +1166,13 @@ export default {
             isShowMemberForPay: this.form.isShowMemberForPay,
             isShowMusicInsuranceForPay: this.form.isShowMusicInsuranceForPay,
             isShowVipCourseForPay: this.form.isShowVipCourseForPay,
-            isShowMusicCourseForPay: this.form.isShowMusicCourseForPay
+            isShowMusicCourseForPay: this.form.isShowMusicCourseForPay,
           }),
           calenderFeeType: this.form.calenderFeeType,
           calenderFeeJson: JSON.stringify(calenderFeeJson),
-          musicGroupCalenderRefundPeriods: this.form
-            .musicGroupCalenderRefundPeriods,
+          musicGroupCalenderRefundPeriods: this.form.musicGroupCalenderRefundPeriods,
           currentTotalAmount: this.form.currentTotalAmount,
-          contractUrl: this.form.contractUrl
+          contractUrl: this.form.contractUrl,
         };
       }
     },
@@ -1240,8 +1191,7 @@ export default {
       this.form.calenderFeeJson.allTotal = val;
       if (this.form.calenderFeeJson.discountTotal) {
         this.form.currentTotalAmount =
-          this.form.calenderFeeJson.allTotal -
-          this.form.calenderFeeJson.discountTotal;
+          this.form.calenderFeeJson.allTotal - this.form.calenderFeeJson.discountTotal;
       } else {
         this.form.currentTotalAmount = this.form.calenderFeeJson.allTotal;
       }
@@ -1250,7 +1200,7 @@ export default {
     },
     currentTotalAmount(val) {
       this.$set(this.form, "currentTotalAmount", val);
-    }
+    },
   },
   watch: {
     teamCourse(val) {
@@ -1284,19 +1234,19 @@ export default {
           return;
         } else {
           let arr = [];
-          newValue.forEach(item => {
+          newValue.forEach((item) => {
             arr.push({
               courseType: item.courseType,
               teacherNumber: 0,
               courseNumber: 0,
-              courseCurrentPrice: 0
+              courseCurrentPrice: 0,
             });
           });
 
           this.$set(this.form, "teacherFeeList", arr);
         }
       },
-      deep: true
+      deep: true,
     },
     // "form.calenderFeeType"(val, oldValue) {
     //   if (val == "TEACHER" && !oldValue) {
@@ -1322,12 +1272,12 @@ export default {
       console.log(val, oldValue, this.initDetail);
       if (val == "TEACHER" && !this.initDetail) {
         let arr = [];
-        this.form.eclass.forEach(item => {
+        this.form.eclass.forEach((item) => {
           arr.push({
             courseType: item.courseType,
             teacherNumber: 0,
             courseNumber: 0,
-            courseCurrentPrice: 0
+            courseCurrentPrice: 0,
           });
         });
 
@@ -1340,11 +1290,11 @@ export default {
       if (val && !this.isSetCourseSettingsId) {
         try {
           const res = await queryByMusicGroupOrganizationCourseSettingsId({
-            id: val
+            id: val,
           });
-          let CourseSettingDetail = res.data.map(course => {
+          let CourseSettingDetail = res.data.map((course) => {
             return {
-              ...course
+              ...course,
             };
           });
           this.$set(this.form, "eclass", res.data);
@@ -1359,11 +1309,7 @@ export default {
       this.cycle = {};
 
       if (val != "1") {
-        this.$set(
-          this.form,
-          "musicGroupOrganizationCourseSettingId",
-          undefined
-        );
+        this.$set(this.form, "musicGroupOrganizationCourseSettingId", undefined);
       }
 
       // this.$set(this.cycle, "paymentAmount", undefined);
@@ -1375,10 +1321,7 @@ export default {
       }
       this.isSetCourseSettingsId = false;
 
-      if (
-        this.courseViewType == 2 &&
-        this.$route.query.team_status == "PROGRESS"
-      ) {
+      if (this.courseViewType == 2 && this.$route.query.team_status == "PROGRESS") {
         this.memberDisabled = false;
         if (val === "1") {
           // 会员收费 创建续费 默认选中,不可取消选中
@@ -1393,7 +1336,7 @@ export default {
           }
         }
       }
-    }
+    },
   },
   computed: {
     musicGroup() {
@@ -1401,8 +1344,8 @@ export default {
     },
     Eclass() {
       return JSON.parse(JSON.stringify(this.form.eclass));
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>

+ 32 - 46
src/views/stuRecodeManager/index.vue

@@ -59,7 +59,7 @@
             v-model.trim="searchForm.musicGroupId"
             type="number"
             clearable
-           @keydown.enter.native="
+            @keydown.enter.native="
               (e) => {
                 e.target.blur();
                 $refs.searchForm.save();
@@ -85,10 +85,7 @@
           ></el-input>
         </el-form-item>
         <el-form-item prop="groupType">
-          <el-select
-            v-model.trim="searchForm.groupType"
-            placeholder="请选择课程组类型"
-          >
+          <el-select v-model.trim="searchForm.groupType" placeholder="请选择课程组类型">
             <el-option
               v-for="(item, index) in courseListType"
               :key="index"
@@ -153,8 +150,8 @@
             @click="onExport"
             type="primary"
             v-permission="'export/studentCourseAttendance'"
-
-            >导出</el-button>
+            >导出</el-button
+          >
         </el-form-item>
       </save-form>
       <div class="tableWrap">
@@ -168,17 +165,13 @@
             prop="courseSchedule.organization.name"
             label="分部"
           ></el-table-column>
-          <el-table-column
-            align="center"
-            prop="username"
-            label="学生姓名"
-            width="110px"
-          >
+          <el-table-column align="center" prop="username" label="学生姓名" width="110px">
             <template slot-scope="scope">
               <div>
                 {{ scope.row.username }}
                 <p style="color: #f56c6c">
-                  (<copy-text>{{ scope.row.userId }}</copy-text>)
+                  (<copy-text>{{ scope.row.userId }}</copy-text
+                  >)
                 </p>
               </div>
             </template>
@@ -204,11 +197,7 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column
-            align="center"
-            prop="courseScheduleId"
-            label="课程编号"
-          >
+          <el-table-column align="center" prop="courseScheduleId" label="课程编号">
             <template slot-scope="scope">
               <div>
                 <copy-text>{{ scope.row.courseScheduleId }}</copy-text>
@@ -232,22 +221,14 @@
               </div>
             </template>
           </el-table-column> -->
-          <el-table-column
-            align="center"
-            prop="startClassTime"
-            label="课程组类型"
-          >
+          <el-table-column align="center" prop="startClassTime" label="课程组类型">
             <template slot-scope="scope">
               <div>
                 {{ scope.row.groupType | coursesType }}
               </div>
             </template>
           </el-table-column>
-          <el-table-column
-            align="center"
-            prop="startClassTime"
-            label="课程类型"
-          >
+          <el-table-column align="center" prop="startClassTime" label="课程类型">
             <template slot-scope="scope">
               <div>
                 {{ scope.row.courseSchedule.type | coursesType }}
@@ -260,15 +241,13 @@
                 <!-- {{ scope.row.courseSchedule.newCourseId > 0 ? "是" : "否" }} -->
                 {{
                   scope.row.courseSchedule.newCourseId > 0 &&
-                  scope.row.courseSchedule.newCourseId ==
-                    scope.row.courseScheduleId
+                  scope.row.courseSchedule.newCourseId == scope.row.courseScheduleId
                     ? "合并课"
                     : null
                 }}
                 {{
                   scope.row.courseSchedule.newCourseId > 0 &&
-                  scope.row.courseSchedule.newCourseId !=
-                    scope.row.courseScheduleId
+                  scope.row.courseSchedule.newCourseId != scope.row.courseScheduleId
                     ? "被合并课"
                     : null
                 }}
@@ -284,9 +263,7 @@
             <template slot-scope="scope">
               <div>
                 {{ scope.row.courseSchedule.classDate | dayjsFormat }}
-                {{
-                  scope.row.courseSchedule.startClassTime | dayjsFormatMinute
-                }}-{{
+                {{ scope.row.courseSchedule.startClassTime | dayjsFormatMinute }}-{{
                   scope.row.courseSchedule.endClassTime | dayjsFormatMinute
                 }}
               </div>
@@ -328,6 +305,13 @@
               </div>
             </template>
           </el-table-column>
+          <el-table-column align="center" label="来源">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.joinCourseType | joinCourseType }}
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             fixed="right"
@@ -339,8 +323,7 @@
                 <el-button
                   type="text"
                   v-if="
-                    permission(getFullPermission('visit/add')) &&
-                    !scope.row.visitFlag
+                    permission(getFullPermission('visit/add')) && !scope.row.visitFlag
                   "
                   @click="addVisit(scope.row)"
                   >新增回访</el-button
@@ -468,6 +451,10 @@ export default {
     },
     // 导出
     async onExport() {
+      if (this.searchForm.studentID > 999999999) {
+        this.$message.error("学生编号不能大于999999999");
+        return;
+      }
       const { dates, ...rest } = this.searchForm;
       let obj = {
         ...rest,
@@ -488,16 +475,16 @@ export default {
       );
     },
     getList() {
+      if (this.searchForm.studentID > 999999999) {
+        this.$message.error("学生编号不能大于999999999");
+        return;
+      }
       const { dates, ...rest } = this.searchForm;
       let obj = {
         ...rest,
         page: this.rules.page,
         rows: this.rules.limit,
-        ...getTimes(
-          dates,
-          ["startDateOfCourse", "endDateOfCourse"],
-          "YYYY-MM-DD"
-        ),
+        ...getTimes(dates, ["startDateOfCourse", "endDateOfCourse"], "YYYY-MM-DD"),
       };
 
       // let obj = {
@@ -549,11 +536,10 @@ export default {
     lookVisit(row) {
       this.$router.push({
         path: "/studentManager/returnVisitList",
-        query: { search: row.id,tabrouter:'2' },
+        query: { search: row.id, tabrouter: "2" },
       });
     },
   },
 };
 </script>
-<style lang='scss' scoped>
-</style>
+<style lang="scss" scoped></style>

+ 172 - 139
src/views/studentManager/components/studentRecord.vue

@@ -1,102 +1,107 @@
 <template>
   <div>
     <!-- 搜索类型 -->
-     <save-form
-        :inline="true"
-        ref="searchForm"
-        :model="searchForm"
-        @submit="search"
-        @reset="onReSet"
-        save-key='studentDetail-studentRecord'
-      >
-        <el-form-item prop="teacherId">
-          <remote-search :commit='"setTeachers"' v-model='searchForm.teacherId'    :isForzenWithQueryCondition="true"/>
-        </el-form-item>
-        <el-form-item prop="musicGroupId">
-          <el-input
-            v-model.trim="searchForm.musicGroupId"
-            clearable
-                @keyup.enter.native="
-              (e) => {
-                e.target.blur();
-                $refs.searchForm.save();
-                search();
-              }
-            "
-            placeholder="乐团编号"
-          ></el-input>
-        </el-form-item>
-        <el-form-item prop="courseScheduleId">
-          <el-input
-            v-model.trim="searchForm.courseScheduleId"
-            clearable
-             @keyup.enter.native="
-              (e) => {
-                e.target.blur();
-                $refs.searchForm.save();
-                search();
-              }
-            "
-            placeholder="课程编号"
-          ></el-input>
-        </el-form-item>
-        <el-form-item prop="groupType">
-          <el-select
-            v-model.trim="searchForm.groupType"
-            placeholder="请选择课程组类型"
-          >
-            <el-option
-              v-for="(item, index) in courseListType"
-              :key="index"
-              :value="item.value"
-              :label="item.label"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-         <el-form-item prop="courseScheduleType">
-          <el-select
-            v-model.trim="searchForm.courseScheduleType"
-            clearable
-            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 prop="status">
-          <el-select
-            v-model.trim="searchForm.status"
-            placeholder="请选择考勤状态"
-          >
-            <el-option
-              v-for="(item, index) in attendanceStatus"
-              :key="index"
-              :value="item.value"
-              :label="item.label"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-            <el-form-item prop="dates" >
-          <el-date-picker
-            v-model="dates"
-            type="daterange"
-            style="width: 405px;"
-            range-separator="至"
-            start-placeholder="课程开始日期"
-            end-placeholder="课程结束日期">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item>
-          <el-button native-type="submit" type="danger">搜索</el-button>
-          <el-button native-type="reset" type="primary">重置</el-button>
-        </el-form-item>
-      </save-form>
+    <save-form
+      :inline="true"
+      ref="searchForm"
+      :model="searchForm"
+      @submit="search"
+      @reset="onReSet"
+      save-key="studentDetail-studentRecord"
+    >
+      <el-form-item prop="teacherId">
+        <remote-search
+          :commit="'setTeachers'"
+          v-model="searchForm.teacherId"
+          :isForzenWithQueryCondition="true"
+        />
+      </el-form-item>
+      <el-form-item prop="musicGroupId">
+        <el-input
+          v-model.trim="searchForm.musicGroupId"
+          clearable
+          @keyup.enter.native="
+            e => {
+              e.target.blur();
+              $refs.searchForm.save();
+              search();
+            }
+          "
+          placeholder="乐团编号"
+        ></el-input>
+      </el-form-item>
+      <el-form-item prop="courseScheduleId">
+        <el-input
+          v-model.trim="searchForm.courseScheduleId"
+          clearable
+          @keyup.enter.native="
+            e => {
+              e.target.blur();
+              $refs.searchForm.save();
+              search();
+            }
+          "
+          placeholder="课程编号"
+        ></el-input>
+      </el-form-item>
+      <el-form-item prop="groupType">
+        <el-select
+          v-model.trim="searchForm.groupType"
+          placeholder="请选择课程组类型"
+        >
+          <el-option
+            v-for="(item, index) in courseListType"
+            :key="index"
+            :value="item.value"
+            :label="item.label"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="courseScheduleType">
+        <el-select
+          v-model.trim="searchForm.courseScheduleType"
+          clearable
+          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 prop="status">
+        <el-select
+          v-model.trim="searchForm.status"
+          placeholder="请选择考勤状态"
+        >
+          <el-option
+            v-for="(item, index) in attendanceStatus"
+            :key="index"
+            :value="item.value"
+            :label="item.label"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="dates">
+        <el-date-picker
+          v-model="dates"
+          type="daterange"
+          style="width: 405px;"
+          range-separator="至"
+          start-placeholder="课程开始日期"
+          end-placeholder="课程结束日期"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button native-type="submit" type="danger">搜索</el-button>
+        <el-button native-type="reset" type="primary">重置</el-button>
+      </el-form-item>
+    </save-form>
     <div class="tableWrap">
-        <div class="tableWrap">
+      <div class="tableWrap">
         <el-table
           style="width: 100%"
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
@@ -131,27 +136,23 @@
               </p>
             </template>
           </el-table-column>
-          <el-table-column
-            align="center"
-            prop="musicGroupId"
-            label="乐团编号"
-          >
-          <template slot-scope="scope">
-            <div>
-              <copy-text>{{ scope.row.musicGroupId }}</copy-text>
-            </div>
-          </template>
+          <el-table-column align="center" prop="musicGroupId" label="乐团编号">
+            <template slot-scope="scope">
+              <div>
+                <copy-text>{{ scope.row.musicGroupId }}</copy-text>
+              </div>
+            </template>
           </el-table-column>
           <el-table-column
             align="center"
             prop="courseScheduleId"
             label="课程编号"
           >
-              <template slot-scope="scope">
-            <div>
-              <copy-text>{{ scope.row.courseScheduleId }}</copy-text>
-            </div>
-          </template>
+            <template slot-scope="scope">
+              <div>
+                <copy-text>{{ scope.row.courseScheduleId }}</copy-text>
+              </div>
+            </template>
           </el-table-column>
 
           <el-table-column
@@ -167,10 +168,15 @@
             <template slot-scope="scope">
               <div>
                 {{ scope.row.courseSchedule.classDate | dayjsFormat }}
+                {{
+                  scope.row.courseSchedule.startClassTime | dayjsFormatMinute
+                }}-{{
+                  scope.row.courseSchedule.endClassTime | dayjsFormatMinute
+                }}
               </div>
             </template>
           </el-table-column>
-          <el-table-column
+          <!-- <el-table-column
             align="center"
             prop="startClassTime"
             label="上课时间"
@@ -184,7 +190,7 @@
                 }}
               </div>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column
             align="center"
             prop="startClassTime"
@@ -208,14 +214,26 @@
             </template>
           </el-table-column>
           <el-table-column align="center" label="合并类型">
-              <template slot-scope="scope">
-                <div>
-                  <!-- {{ scope.row.courseSchedule.newCourseId > 0 ? '是' : '否' }} -->
-                  {{ scope.row.courseSchedule.newCourseId > 0 && scope.row.courseSchedule.newCourseId == scope.row.courseScheduleId ? '合并课' : null }}
-                  {{ scope.row.courseSchedule.newCourseId > 0 && scope.row.courseSchedule.newCourseId != scope.row.courseScheduleId ? '被合并课' : null }}
-                </div>
-              </template>
-            </el-table-column>
+            <template slot-scope="scope">
+              <div>
+                <!-- {{ scope.row.courseSchedule.newCourseId > 0 ? '是' : '否' }} -->
+                {{
+                  scope.row.courseSchedule.newCourseId > 0 &&
+                  scope.row.courseSchedule.newCourseId ==
+                    scope.row.courseScheduleId
+                    ? "合并课"
+                    : null
+                }}
+                {{
+                  scope.row.courseSchedule.newCourseId > 0 &&
+                  scope.row.courseSchedule.newCourseId !=
+                    scope.row.courseScheduleId
+                    ? "被合并课"
+                    : null
+                }}
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column align="center" label="签到时间" width="180px">
             <template slot-scope="scope">
               <div>
@@ -238,29 +256,41 @@
           </el-table-column>
           <el-table-column align="center" label="考勤状态">
             <template slot-scope="scope">
-              <div v-if="scope.row.courseSchedule && scope.row.courseSchedule.status != 'NOT_START'">
+              <div
+                v-if="
+                  scope.row.courseSchedule &&
+                    scope.row.courseSchedule.status != 'NOT_START'
+                "
+              >
                 {{ scope.row.status | clockingIn }}
               </div>
             </template>
           </el-table-column>
-             <el-table-column align="center" label="教学模式">
+          <el-table-column align="center" label="教学模式">
             <template slot-scope="scope">
               <div>
                 {{ scope.row.courseSchedule.teachMode | teachMode }}
               </div>
             </template>
           </el-table-column>
+          <el-table-column align="center" label="来源">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.joinCourseType | joinCourseType }}
+              </div>
+            </template>
+          </el-table-column>
         </el-table>
         <pagination
           sync
-           save-key='studentDetail-studentRecord'
+          save-key="studentDetail-studentRecord"
           :total.sync="pageInfo.total"
           :page.sync="pageInfo.page"
           :limit.sync="pageInfo.limit"
           :page-sizes="pageInfo.page_size"
           @pagination="getList"
         />
-        </div>
+      </div>
     </div>
   </div>
 </template>
@@ -271,12 +301,12 @@ import { getTimes } from "@/utils";
 import {
   courseType,
   courseListType,
-  attendanceStatus,
+  attendanceStatus
 } from "@/utils/searchArray";
 export default {
   name: "studentRecord",
   components: { pagination },
-  data () {
+  data() {
     return {
       searchForm: {
         studentID: "",
@@ -284,13 +314,13 @@ export default {
         musicGroupId: "",
         courseScheduleId: "",
         status: "",
-        teacherId:'',
-        courseScheduleType:''
+        teacherId: "",
+        courseScheduleType: ""
       },
-      dates:[],
+      dates: [],
       searchLsit: [],
       tableList: [],
-         courseType,
+      courseType,
       courseListType,
       attendanceStatus,
       pageInfo: {
@@ -302,25 +332,29 @@ export default {
       }
     };
   },
-  mounted () {
+  mounted() {
     this.searchForm.studentID = this.$route.query.userId;
     this.getList();
   },
-  activated () {
+  activated() {
     this.searchForm.studentID = this.$route.query.userId;
     this.getList();
   },
   methods: {
-    search () {
+    search() {
       this.pageInfo.page = 1;
       this.getList();
     },
-    getList () {
-        let obj = {
+    getList() {
+      let obj = {
         page: this.pageInfo.page,
         rows: this.pageInfo.limit,
         ...this.searchForm,
-        ...getTimes(this.dates, ["startDateOfCourse", "endDateOfCourse"],'YYYY-MM-DD'),
+        ...getTimes(
+          this.dates,
+          ["startDateOfCourse", "endDateOfCourse"],
+          "YYYY-MM-DD"
+        )
       };
       findStudentAttendance(obj).then(res => {
         if (res.code == 200) {
@@ -329,7 +363,7 @@ export default {
         }
       });
     },
-    onReSet () {
+    onReSet() {
       // 重置搜索
       this.$refs.searchForm.resetFields();
       this.searchForm.studentId = this.$route.query.userId;
@@ -338,5 +372,4 @@ export default {
   }
 };
 </script>
-<style lang="scss">
-</style>
+<style lang="scss"></style>

+ 53 - 163
src/views/teamBuild/signupList.vue

@@ -4,12 +4,7 @@
       <div>
         <div style="display: flex; justify-content: space-between">
           <div
-            style="
-              display: flex;
-              margin-bottom: 15px;
-              font-size: 18px;
-              font-weight: 400;
-            "
+            style="display: flex; margin-bottom: 15px; font-size: 18px; font-weight: 400"
           >
             <p style="margin-right: 10px" v-if="applyExpireDate">
               报名截止时间:{{ applyExpireDate | formatTimer }}
@@ -70,10 +65,7 @@
           </div>
 
           <!-- 家长会 -->
-          <auth
-            :auths="['musicGroup/sendParentMeetingNotice']"
-            v-if="status == 'PAY'"
-          >
+          <auth :auths="['musicGroup/sendParentMeetingNotice']" v-if="status == 'PAY'">
             <div class="newBand" @click="meetingStatus = true">家长会通知</div>
           </auth>
           <div
@@ -106,11 +98,7 @@
           </div>
           <div class="newBand" @click="onCreateQRCode('detail')">缴费详情</div>
           <auth :auths="'studentRegistration/queryPreApplyList/4263'">
-            <div
-              class="newBand"
-              style="margin-right: 0"
-              @click="forecastVisible = true"
-            >
+            <div class="newBand" style="margin-right: 0" @click="forecastVisible = true">
               预报名名单
             </div>
           </auth>
@@ -153,11 +141,7 @@
                 :data="leftList"
                 :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
               >
-                <el-table-column
-                  label="乐团声部"
-                  prop="subjectName"
-                  align="center"
-                >
+                <el-table-column label="乐团声部" prop="subjectName" align="center">
                 </el-table-column>
                 <el-table-column
                   label="计划招生"
@@ -175,11 +159,7 @@
                     </div>
                   </template>
                 </el-table-column>
-                <el-table-column
-                  label="已报名"
-                  prop="applyStudentNum"
-                  align="center"
-                >
+                <el-table-column label="已报名" prop="applyStudentNum" align="center">
                 </el-table-column>
                 <el-table-column label="已缴费" prop="payNum" align="center">
                   <template slot-scope="scope">
@@ -243,9 +223,7 @@
                     <p>
                       购买云教练人数
                       <el-tooltip placement="top" popper-class="mTooltip">
-                        <div slot="content">
-                          已缴费学员中购买了云教练系统的学员总数
-                        </div>
+                        <div slot="content">已缴费学员中购买了云教练系统的学员总数</div>
                         <i
                           class="el-icon-question"
                           style="font-size: 18px; color: #f56c6c"
@@ -284,21 +262,13 @@
                   </template>
                   <template slot-scope="scope">
                     <div>
-                      <el-button
-                        type="text"
-                        @click="getCheckNum(scope.row, 'noCloud')"
-                        >{{
-                          scope.row.noCloudTeacherStudentNumOfNormal
-                        }}</el-button
-                      >
+                      <el-button type="text" @click="getCheckNum(scope.row, 'noCloud')">{{
+                        scope.row.noCloudTeacherStudentNumOfNormal
+                      }}</el-button>
                     </div>
                   </template>
                 </el-table-column>
-                <el-table-column
-                  label="收费金额"
-                  prop="totalAmount"
-                  align="center"
-                >
+                <el-table-column label="收费金额" prop="totalAmount" align="center">
                   <template slot-scope="scope">
                     <div>{{ scope.row.totalAmount | moneyFormat }}元</div>
                   </template>
@@ -332,9 +302,7 @@
                 v-permission="'musicGroup/updateExpectedStudentNum'"
                 style="margin-right: 20px; margin-top: 20px"
               >
-                <p style="color: red">
-                  收费总额:{{ allSubjectTotal | moneyFormat }}元
-                </p>
+                <p style="color: red">收费总额:{{ allSubjectTotal | moneyFormat }}元</p>
                 <el-button
                   v-show="
                     !isEdit &&
@@ -353,11 +321,7 @@
           </auth>
         </div>
       </div>
-      <el-dialog
-        title="选择合并乐团"
-        :visible.sync="mergeVisible"
-        width="950px"
-      >
+      <el-dialog title="选择合并乐团" :visible.sync="mergeVisible" width="950px">
         <mergeMusic
           v-if="mergeVisible"
           style="padding: 0 20px"
@@ -366,21 +330,10 @@
           @submited="getList"
         />
       </el-dialog>
-      <el-dialog
-        title="时间数据统计"
-        :visible.sync="newForecastVisible"
-        width="1100px"
-      >
-        <newForecastList
-          v-if="newForecastVisible"
-          @close="newForecastVisible = false"
-        />
+      <el-dialog title="时间数据统计" :visible.sync="newForecastVisible" width="1100px">
+        <newForecastList v-if="newForecastVisible" @close="newForecastVisible = false" />
       </el-dialog>
-      <el-dialog
-        title="预报名名单"
-        :visible.sync="forecastVisible"
-        width="1150px"
-      >
+      <el-dialog title="预报名名单" :visible.sync="forecastVisible" width="1150px">
         <forecastList v-if="forecastVisible" @close="forecastVisible = false" />
       </el-dialog>
       <!--  stepImgs: {
@@ -389,12 +342,7 @@
       }, -->
     </div>
     <div class="searchList">
-      <save-form
-        :inline="true"
-        :model="searchFrom"
-        @submit="search"
-        @reset="onReset"
-      >
+      <save-form :inline="true" :model="searchFrom" @submit="search" @reset="onReset">
         <el-form-item>
           <el-select
             v-model.trim="searchFrom.subject"
@@ -520,8 +468,13 @@
         </el-form-item>
       </save-form>
     </div>
-    <div class="btnList" style="margin-bottom: 20px"   v-if="status == 'PAY'">
-      <el-button type="primary" @click="onDownload" v-permission="'import/downloadTemplate4907'">下载模板</el-button>
+    <div class="btnList" style="margin-bottom: 20px" v-if="status == 'PAY'">
+      <el-button
+        type="primary"
+        @click="onDownload"
+        v-permission="'import/downloadTemplate4907'"
+        >下载模板</el-button
+      >
       <el-upload
         v-permission="'import/studentToMusicGroup'"
         style="display: inline-block; margin-left: 10px"
@@ -543,11 +496,7 @@
         :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
         @selection-change="handleSelectionChange"
       >
-        <el-table-column
-          type="selection"
-          width="55"
-          :selectable="checkboxSelect"
-        >
+        <el-table-column type="selection" width="55" :selectable="checkboxSelect">
         </el-table-column>
         <el-table-column type="expand">
           <template slot-scope="props">
@@ -555,9 +504,7 @@
               <el-row style="margin-left: 64px">
                 <el-col :span="4">
                   <el-form-item label="入团年份">
-                    <span>
-                      {{ props.row.createTime | dayjsFormat("YYYY年") }}</span
-                    >
+                    <span> {{ props.row.createTime | dayjsFormat("YYYY年") }}</span>
                   </el-form-item>
                 </el-col>
                 <el-col :span="4">
@@ -582,18 +529,10 @@
                   <!-- <el-form-item> -->
                   <!-- <template slot="label"> -->
                   <div class="hiddenwrap">
-                    <p
-                      style="
-                        position: relative;
-                        display: flex;
-                        align-items: center;
-                      "
-                    >
+                    <p style="position: relative; display: flex; align-items: center">
                       解除限制
                       <el-tooltip placement="top" popper-class="mTooltip">
-                        <div slot="content">
-                          学员是否受到不购买团练宝的缴费限制
-                        </div>
+                        <div slot="content">学员是否受到不购买团练宝的缴费限制</div>
                         <i
                           class="el-icon-question"
                           style="font-size: 18px; color: #f56c6c"
@@ -619,12 +558,7 @@
             </el-form>
           </template>
         </el-table-column>
-        <el-table-column
-          label="姓名"
-          prop="studentName"
-          align="center"
-          width="150px"
-        >
+        <el-table-column label="姓名" prop="studentName" align="center" width="150px">
           <template slot-scope="scope">
             <div>
               <p class="courseYellow left">
@@ -661,9 +595,7 @@
         <el-table-column label="年级班级" align="center">
           <template slot-scope="scope">
             <div v-if="gradeListObj[scope.row.currentGrade]">
-              {{
-                gradeListObj[scope.row.currentGrade] + scope.row.currentClass
-              }}
+              {{ gradeListObj[scope.row.currentGrade] + scope.row.currentClass }}
             </div>
           </template>
         </el-table-column>
@@ -683,11 +615,7 @@
         </el-table-column> -->
         <!-- <el-table-column label="报名专业" prop="subjectName" align="center">
         </el-table-column> -->
-        <el-table-column
-          label="调剂专业"
-          prop="actualSubjectName"
-          align="center"
-        >
+        <el-table-column label="调剂专业" prop="actualSubjectName" align="center">
           <template slot-scope="scope">
             <div>
               <p>
@@ -707,11 +635,7 @@
         </el-table-column>
         <!-- visited -->
         <!-- v-show='status == "PAY"' -->
-        <el-table-column
-          label="报名缴费/订单状态"
-          prop="paymentStatus"
-          align="center"
-        >
+        <el-table-column label="报名缴费/订单状态" prop="paymentStatus" align="center">
           <template slot-scope="scope">
             <div>
               <p>{{ scope.row.paymentStatus | paymentStatus }}</p>
@@ -727,11 +651,7 @@
             </div>
           </template>
         </el-table-column> -->
-        <el-table-column
-          label="是否购买会员"
-          prop="hasCloudTeacher"
-          align="center"
-        >
+        <el-table-column label="是否购买会员" prop="hasCloudTeacher" align="center">
           <template slot-scope="scope">
             <div>
               {{ scope.row.hasCloudTeacher == 1 ? "是" : "否" }}
@@ -812,17 +732,13 @@
                 :auths="'studentRegistration/queryFeeDetail'"
                 v-show="scope.row.paymentStatus == 2"
               >
-                <el-button type="text" @click="lookdetail(scope.row)"
-                  >查看</el-button
-                >
+                <el-button type="text" @click="lookdetail(scope.row)">查看</el-button>
               </auth>
               <auth
                 :auths="'musicGroupQuit/apply2'"
                 v-show="scope.row.paymentStatus == 2 && isManage"
               >
-                <el-button type="text" @click="quitTeam(scope.row)"
-                  >退团</el-button
-                >
+                <el-button type="text" @click="quitTeam(scope.row)">退团</el-button>
               </auth>
               <!-- <auth
                 :auths="'musicGroupQuit/directQuitMusicGroup3'"
@@ -832,13 +748,8 @@
                   >退团</el-button
                 >
               </auth> -->
-              <auth
-                :auths="'visit/add/teamSignupList'"
-                v-if="scope.row.visitNum <= 0"
-              >
-                <el-button type="text" @click="addVisit(scope.row)"
-                  >新增回访</el-button
-                >
+              <auth :auths="'visit/add/teamSignupList'" v-if="scope.row.visitNum <= 0">
+                <el-button type="text" @click="addVisit(scope.row)">新增回访</el-button>
               </auth>
               <auth
                 :auths="'subjectChange/getStudentOriginal'"
@@ -852,8 +763,7 @@
               <!--  -->
               <auth
                 v-show="
-                  scope.row.payingStatus == 2 &&
-                  scope.row.noneNeedCloudTeacher == 0
+                  scope.row.payingStatus == 2 && scope.row.noneNeedCloudTeacher == 0
                 "
                 :auths="'studentRegistration/setNoneCloudTeacher'"
               >
@@ -875,9 +785,7 @@
       </el-table>
       <div
         style="margin-top: 10px; margin-bottom: 10px"
-        v-show="
-          status == 'APPLY' || status == 'PROGRESS' || status == 'PREPARE'
-        "
+        v-show="status == 'APPLY' || status == 'PROGRESS' || status == 'PREPARE'"
       >
         <el-button @click="onSelectAll">全选/取消</el-button>
         <auth :auths="'studentRegistration/openPayment'">
@@ -949,10 +857,7 @@
           @click="onExtendPayment('extendForm', isPay)"
           >确 定</el-button
         >
-        <el-button
-          v-else
-          type="primary"
-          @click="onExtendPayment('extendForm', isPay)"
+        <el-button v-else type="primary" @click="onExtendPayment('extendForm', isPay)"
           >确 定</el-button
         >
       </div>
@@ -977,9 +882,7 @@
         </el-col>
       </el-row>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="orderVisible = false"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="orderVisible = false">确 定</el-button>
       </div>
     </el-dialog>
 
@@ -1010,9 +913,7 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="paymentStatus = false">取 消</el-button>
-        <el-button type="primary" @click="onStartPayment('paymentForm')"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="onStartPayment('paymentForm')">确 定</el-button>
       </div>
     </el-dialog>
 
@@ -1037,9 +938,7 @@
               <p>退还课程费用:缴费总额-已结束课时单价之和</p>
               <p>退还乐器费用:报名缴费时缴纳的乐器费用(团购、租金)</p>
               <p>退还教辅费用:报名缴费时缴费的教辅费用</p>
-              <p v-if="$helpers.tenantId == 1">
-                退还乐保费用:报名缴费时缴费的乐保费用
-              </p>
+              <p v-if="$helpers.tenantId == 1">退还乐保费用:报名缴费时缴费的乐保费用</p>
             </div>
             <el-button
               type="text"
@@ -1263,21 +1162,15 @@ export default {
         expireDate: null,
       },
       extendRule: {
-        expireDate: [
-          { required: true, message: "请选择延长时间", trigger: "change" },
-        ],
+        expireDate: [{ required: true, message: "请选择延长时间", trigger: "change" }],
       },
       quitRules: {
         isCloudTeacherAmount: [{ required: true, message: "请输入云教练费用" }],
         cloudTeacherAmount: [
           { required: true, message: "请输入云教练金额", trigger: "blur" },
         ],
-        isRefundCourseFee: [
-          { required: true, message: "请选择是否退还课程费用" },
-        ],
-        isRefundInstrumentFee: [
-          { required: true, message: "选择是否退还乐器费用" },
-        ],
+        isRefundCourseFee: [{ required: true, message: "请选择是否退还课程费用" }],
+        isRefundInstrumentFee: [{ required: true, message: "选择是否退还乐器费用" }],
         isRefundTeachingAssistantsFee: [
           { required: true, message: "选择是否退还教辅费用" },
         ],
@@ -1378,9 +1271,7 @@ export default {
       this.pickerOptions = this.beginDate(new Date());
       // checkCanReg
       try {
-        this.ischeckCanReg = await (
-          await checkCanReg({ musicGroupId: this.id })
-        ).data;
+        this.ischeckCanReg = await (await checkCanReg({ musicGroupId: this.id })).data;
       } catch (e) {
         console.log(e);
       }
@@ -1439,18 +1330,18 @@ export default {
       load.endLoading();
       if (response.code == 200) {
         this.$message.success("导入成功");
-        this.getList()
+        this.getList();
       } else if (response.code == 0) {
         let str = this.fomatStr(response.msg);
         this.$alert(str, "导入结果", {
           confirmButtonText: "确定",
           dangerouslyUseHTMLString: true,
           callback: (action) => {
-            this.getList()
+            this.getList();
           },
         });
       } else {
-        console.log('response',response)
+        console.log("response", response);
         this.$message.error(response.msg);
       }
     },
@@ -1862,8 +1753,7 @@ export default {
                 this.extendPaymentStatus = false;
                 getTeamBaseInfo({ musicGroupId: this.id }).then((res) => {
                   if (res.code == 200) {
-                    this.paymentExpireDate =
-                      res.data.musicGroup.paymentExpireDate;
+                    this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
                   }
                 });
               } else {
@@ -1891,7 +1781,7 @@ export default {
               item.name = "云教练";
             } else if (item.type == "COURSE") {
               item.name = "课程";
-            }else if(item.type == "ORGAN_SHARE_PROFIT"){
+            } else if (item.type == "ORGAN_SHARE_PROFIT") {
               item.name = "乐器分润";
             }
             if (courseType[item.type]) {
@@ -1992,8 +1882,8 @@ export default {
                 reason: this.quitForm.reason,
                 isRefundCourseFee: this.quitForm.isRefundCourseFee,
                 isRefundInstrumentFee: this.quitForm.isRefundInstrumentFee,
-                isRefundTeachingAssistantsFee:
-                  this.quitForm.isRefundTeachingAssistantsFee,
+                isRefundTeachingAssistantsFee: this.quitForm
+                  .isRefundTeachingAssistantsFee,
                 maintenanceFee: this.quitForm.maintenanceFee,
                 isRefundMemberFee: this.quitForm.isRefundMemberFee,
               };

+ 162 - 65
src/views/teamDetail/componentCourse/resetClass.vue

@@ -1,60 +1,148 @@
 <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-form-item label="主教老师" v-if="maskForm.type == 'VIP'" prop="teacher">
-        <remote-search :commit="'setTeachers'" v-model="maskForm.teacher" @change="changeTeacher" :width="220" />
+      <el-form-item
+        label="主教老师"
+        v-if="maskForm.type == 'VIP'"
+        prop="teacher"
+      >
+        <remote-search
+          :commit="'setTeachers'"
+          v-model="maskForm.teacher"
+          @change="changeTeacher"
+          :width="220"
+        />
       </el-form-item>
       <el-form-item label="主教老师" v-else prop="teacher">
-        <remote-search :commit="'setTeachers'" v-model="maskForm.teacher" :width="220" />
+        <remote-search
+          :commit="'setTeachers'"
+          v-model="maskForm.teacher"
+          :width="220"
+        />
       </el-form-item>
-      <el-form-item label="助教老师" v-if="maskForm.type != 'MUSIC_NETWORK' &&
-        maskForm.type != 'HIGH_ONLINE' &&
-        maskForm.groupType == 'MUSIC'
-        " prop="assistant">
-        <remote-search :commit="'setTeachers'" v-model="maskForm.assistant" :width="220" :multiple="true" />
+      <el-form-item
+        label="助教老师"
+        v-if="
+          maskForm.type != 'MUSIC_NETWORK' &&
+            maskForm.type != 'HIGH_ONLINE' &&
+            maskForm.groupType == 'MUSIC'
+        "
+        prop="assistant"
+      >
+        <remote-search
+          :commit="'setTeachers'"
+          v-model="maskForm.assistant"
+          :width="220"
+          :multiple="true"
+        />
       </el-form-item>
       <el-form-item label="上课日期" prop="date">
-        <el-date-picker v-model.trim="maskForm.date" type="date" :picker-options="bigin" value-format="yyyy-MM-dd"
-          placeholder="选择日期" clearable></el-date-picker>
+        <el-date-picker
+          v-model.trim="maskForm.date"
+          type="date"
+          :picker-options="bigin"
+          value-format="yyyy-MM-dd"
+          placeholder="选择日期"
+          clearable
+        ></el-date-picker>
       </el-form-item>
       <el-form-item label="课程时长" prop="timer">
-        <el-select v-model="maskForm.timer" @change="changeTime" style="width: 220px !important" clearable>
-          <el-option v-for="(item, index) in typeTimeList" :key="index" :disabled="item > baseTimer ? true : false"
-            :value="parseInt(item)" :label="item"></el-option>
+        <el-select
+          v-model="maskForm.timer"
+          @change="changeTime"
+          style="width: 220px !important"
+          clearable
+        >
+          <el-option
+            v-for="(item, index) in typeTimeList"
+            :key="index"
+            :disabled="item > baseTimer ? true : false"
+            :value="parseInt(item)"
+            :label="item"
+          ></el-option>
         </el-select>
       </el-form-item>
       <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: `06:00:00 - 23:30:00`,
-          }" clearable></el-time-picker>
+        <el-time-picker
+          placeholder="起始时间"
+          v-model.trim="maskForm.startTime"
+          @change="changeStartTime"
+          format="HH:mm"
+          value-format="HH:mm"
+          :picker-options="{
+            selectableRange: `06:00:00 - 23:30:00`
+          }"
+          clearable
+        ></el-time-picker>
       </el-form-item>
       <el-form-item label="结束时间" prop="endTime">
-        <el-time-picker placeholder="结束时间" v-model.trim="maskForm.endTime" disabled format="HH:mm" value-format="HH:mm"
+        <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,
-          }" clearable></el-time-picker>
+            minTime: maskForm.startTime
+          }"
+          clearable
+        ></el-time-picker>
       </el-form-item>
-      <el-form-item label="课程类型" v-if="maskForm.type == 'VIP'" prop="courseType">
-        <el-select clearable @change="typeChange" style="width: 220px !important" v-model.trim="maskForm.teachMode">
+      <el-form-item
+        label="课程类型"
+        v-if="maskForm.type == 'VIP'"
+        prop="courseType"
+      >
+        <el-select
+          clearable
+          @change="typeChange"
+          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-form-item label="课程类型" v-if="maskForm.type == 'HIGH' || maskForm.type == 'HIGH_ONLINE'" prop="courseType">
-        <el-select clearable @change="typeChangeHight" style="width: 220px !important" v-model.trim="maskForm.teachMode">
+      <el-form-item
+        label="课程类型"
+        v-if="maskForm.type == 'HIGH' || maskForm.type == 'HIGH_ONLINE'"
+        prop="courseType"
+      >
+        <el-select
+          clearable
+          @change="typeChangeHight"
+          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-form-item label="教学地点" v-if="maskForm.teachMode == 'OFFLINE'">
-        <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
+          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-form>
@@ -70,9 +158,9 @@ import {
   getTeacher,
   resetCourse,
   getCourseScheduleDetail,
-  getOrganCourseDurationSettings,
+  getOrganCourseDurationSettings
 } from "@/api/buildTeam";
-import { vipGroupCategory } from '@/api/vipSeting'
+import { vipGroupCategory } from "@/api/vipSeting";
 import { getTeachSchool } from "@/api/teacherManager";
 import { getSchool } from "@/api/systemManage";
 import cleanDeep from "clean-deep";
@@ -90,20 +178,26 @@ export default {
         date: null,
         timer: null,
         startTime: null,
-        endTime: null,
+        endTime: null
       },
       maskRules: {
-        teacher: [{ required: true, message: "请选择主教老师名称", trigger: "blur" }],
+        teacher: [
+          { 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: [],
       typeTimeList: [],
       courseTimeList: {},
       organId: "",
-      bigin: this.beginDate(),
+      bigin: this.beginDate()
     };
   },
   created() {
@@ -137,7 +231,7 @@ export default {
       this.$confirm("是否确定?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           let teachingTeacherIdList = maskForm.assistant.join(",");
@@ -147,16 +241,19 @@ export default {
           let obj = {
             actualTeacherId: maskForm.teacher,
             startClassTimeStr: maskForm.startTime,
-            endClassTimeStr: maskForm.groupType == "MUSIC" ? maskForm.endTime : null,
+            endClassTimeStr:
+              maskForm.groupType == "MUSIC" || maskForm.groupType == "LIVE"
+                ? maskForm.endTime
+                : null,
             id: maskForm.id,
             teachingTeacherIdList,
             classDate: maskForm.date,
             type: maskForm.type,
             groupType: maskForm.groupType,
             schoolId: this.maskForm.address,
-            teachMode: this.maskForm.teachMode,
+            teachMode: this.maskForm.teachMode
           };
-          resetCourse(cleanDeep(obj)).then((res) => {
+          resetCourse(cleanDeep(obj)).then(res => {
             if (res.code == 200) {
               this.$message.success("修改成功");
               this.$emit("getList");
@@ -168,10 +265,10 @@ export default {
               this.$confirm(`当前课程课酬预计为0,是否继续`, "提示", {
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",
-                type: "warning",
-              }).then((res) => {
+                type: "warning"
+              }).then(res => {
                 obj.allowZeroSalary = true;
-                resetCourse(cleanDeep(obj)).then((res) => {
+                resetCourse(cleanDeep(obj)).then(res => {
                   if (res.code == 200) {
                     this.$message.success("修改成功");
                     this.$emit("getList");
@@ -182,7 +279,7 @@ export default {
             }
           });
         })
-        .catch(() => { });
+        .catch(() => {});
     },
     typeChange() {
       this.$set(this.maskForm, "address", null);
@@ -197,7 +294,7 @@ export default {
       }
     },
     changeStartTime(val) {
-      this.$nextTick((res) => {
+      this.$nextTick(res => {
         if (val) {
           this.$set(
             this.maskForm,
@@ -210,7 +307,7 @@ export default {
       });
     },
     changeTime(val) {
-      this.$nextTick((res) => {
+      this.$nextTick(res => {
         this.maskForm.endTime = addTimerFormMinute(
           this.maskForm.date,
           this.maskForm.startTime,
@@ -221,8 +318,8 @@ export default {
     changeTeacher(val) {
       if (val) {
         getTeachSchool({
-          userId: val,
-        }).then((res) => {
+          userId: val
+        }).then(res => {
           if (res.code == 200) {
             this.schoolList = res.data;
           }
@@ -231,7 +328,7 @@ export default {
       }
     },
     getDetail(id) {
-      getCourseScheduleDetail({ courseScheduleId: id }).then(async (res) => {
+      getCourseScheduleDetail({ courseScheduleId: id }).then(async res => {
         if (res.code == 200) {
           this.maskForm = {
             id: res.data.id,
@@ -244,7 +341,7 @@ export default {
             type: res.data.type,
             groupType: res.data.groupType,
             address: res.data.schoolId,
-            teachMode: res.data.teachMode,
+            teachMode: res.data.teachMode
           };
           for (let key in this.courseTimeList) {
             if (key == row.courseScheduleType) {
@@ -263,7 +360,7 @@ export default {
           if (res.data.groupType == "MUSIC") {
             try {
               const res = await getOrganCourseDurationSettings({
-                organId: this.organId,
+                organId: this.organId
               });
               this.courseTimeList = res.data;
               for (let key in this.courseTimeList) {
@@ -271,30 +368,30 @@ export default {
                   this.typeTimeList = this.courseTimeList[key].split(",");
                 }
               }
-            } catch (e) { }
-          } else if (res.data.groupType == 'LIVE') {
+            } catch (e) {}
+          } else if (res.data.groupType == "LIVE") {
             try {
               const { data } = await vipGroupCategory({
-                groupType: 'LIVE',
+                groupType: "LIVE"
               });
-              console.log(data, 'data')
+              console.log(data, "data");
               data.forEach(liveItem => {
-                this.typeTimeList.push(liveItem.singleClassMinutes)
-              })
-            } catch (e) { }
+                this.typeTimeList.push(liveItem.singleClassMinutes);
+              });
+            } catch (e) {}
           }
           this.baseTimer = time;
           this.maskForm.timer = time;
           if (this.maskForm.teacher && this.maskForm.type == "VIP") {
             getTeachSchool({
-              userId: this.maskForm.teacher,
-            }).then((res) => {
+              userId: this.maskForm.teacher
+            }).then(res => {
               if (res.code == 200) {
                 this.schoolList = res.data;
               }
             });
           } else {
-            getSchool({ organId: res.data.organId }).then((res) => {
+            getSchool({ organId: res.data.organId }).then(res => {
               if (res.code == 200) {
                 this.schoolList = res.data;
               }
@@ -309,9 +406,9 @@ export default {
         disabledDate(time) {
           return time.getTime() + 86400000 <= new Date().getTime();
           //开始时间不选时,结束时间最大值小于等于当天
-        },
+        }
       };
-    },
+    }
   },
 
   watch: {
@@ -321,7 +418,7 @@ export default {
       }
     },
     "maskForm.timer"(val) {
-      this.$nextTick((res) => {
+      this.$nextTick(res => {
         if (val) {
           this.$set(
             this.maskForm,
@@ -332,8 +429,8 @@ export default {
           this.$set(this.maskForm, "endTime", "");
         }
       });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>

+ 35 - 25
src/views/teamDetail/componentCourse/studentRollCall.vue

@@ -57,10 +57,13 @@
             <div
               v-if="
                 scope.row.courseSchedule &&
-                scope.row.courseSchedule.status != 'NOT_START'
+                  scope.row.courseSchedule.status != 'NOT_START'
               "
             >
-              <p v-if="scope.row.status" :class="scope.row.status == 'NORMAL'?'green':'red'">
+              <p
+                v-if="scope.row.status"
+                :class="scope.row.status == 'NORMAL' ? 'green' : 'red'"
+              >
                 {{ scope.row.status | studentRecord }}
               </p>
               <p v-else>未签到</p>
@@ -72,26 +75,31 @@
             <div>{{ scope.row.visitFlag | yesOrNo }}</div>
           </template>
         </el-table-column>
-                <!-- <el-table-column align="center" prop="leaveNum" label="本月请假次数"></el-table-column> -->
-        <el-table-column
-          align="center"
-          prop="ctrls"
-          label="操作"
-        >
+        <el-table-column align="center" label="来源">
+          <template slot-scope="scope">
+            <div>{{ scope.row.joinCourseType | joinCourseType }}</div>
+          </template>
+        </el-table-column>
+        <!-- <el-table-column align="center" prop="leaveNum" label="本月请假次数"></el-table-column> -->
+        <el-table-column align="center" prop="ctrls" label="操作">
           <template slot-scope="scope">
             <div>
               <el-button
-
                 type="text"
                 @click="addVisit(scope.row)"
-                v-if="!scope.row.visitFlag&&permission('visit/add?page=teamCourseList')"
+                v-if="
+                  !scope.row.visitFlag &&
+                    permission('visit/add?page=teamCourseList')
+                "
                 >新增回访</el-button
               >
-                <el-button
-
+              <el-button
                 type="text"
                 @click="lookVisit(scope.row)"
-                v-if="(scope.row.visitFlag)&&permission('visit/queryPage?page=teamCourseList')"
+                v-if="
+                  scope.row.visitFlag &&
+                    permission('visit/queryPage?page=teamCourseList')
+                "
                 >查看回访</el-button
               >
             </div>
@@ -139,12 +147,12 @@ export default {
         // 分页规则
         limit: 10, // 限制显示条数
         page: 1, // 当前页
-        total: 0, // 总条数
+        total: 0 // 总条数
       },
       studentNum: null,
       signInNum: null,
       leaveNum: null,
-      truantNum: null,
+      truantNum: null
     };
   },
   mounted() {
@@ -164,23 +172,26 @@ export default {
       this.visitVisible = true;
       this.detail = row;
     },
-    lookVisit(row){
-      console.log({search:row.id,tabrouter:'2'})
-      this.$router.push({path:'/studentManager/returnVisitList',query:{search:row.id,tabrouter:'2'}}) 
+    lookVisit(row) {
+      console.log({ search: row.id, tabrouter: "2" });
+      this.$router.push({
+        path: "/studentManager/returnVisitList",
+        query: { search: row.id, tabrouter: "2" }
+      });
     },
     getList() {
       findStudentAttendance({
         search: this.courseScheduleId,
         rows: this.rules.limit,
-        page: this.rules.page,
-      }).then((res) => {
+        page: this.rules.page
+      }).then(res => {
         if (res.code == 200) {
           this.tableList = res.data.rows;
           this.rules.total = res.data.total;
         }
       });
       sumStudentAttendance({ courseScheduleId: this.courseScheduleId }).then(
-        (res) => {
+        res => {
           if (res.code == 200) {
             this.studentNum = res.data.studentNum;
             this.signInNum = res.data.signInNum;
@@ -189,8 +200,8 @@ export default {
           }
         }
       );
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>
@@ -210,7 +221,6 @@ export default {
   color: var(--color-primary);
 }
 .orgin {
-  color: #E6A23C;
+  color: #e6a23c;
 }
 </style>
-

+ 1 - 1
vue.config.js

@@ -18,7 +18,7 @@ const name = defaultSettings.title || "管乐迷后台管理系统"; // page tit
 // let target = "https://online.dayaedu.com"; //线上
 // let target = 'http://192.168.3.20:8000' //邹璇
 // let target = 'http://192.168.3.161:8000' //勇哥
-// let target = "http://192.168.3.143:8000"; //
+// let target = "http://192.168.3.14:8005"; // 原谅
 let target = "https://test.dayaedu.com"; //测试环境
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {