mo hace 2 años
padre
commit
f62dbae1d3

+ 11 - 0
src/views/liveClassManager/api.js

@@ -403,3 +403,14 @@ export function getWaitShareStudent(data) {
     params: data
   });
 }
+
+
+// 获取回放列表
+export function getCourseVideoList(data) {
+  return request({
+    url: "/api-web/imLiveRoomVideo/queryList",
+    method: "get",
+    data,
+    params: data
+  });
+}

+ 4 - 1
src/views/liveClassManager/liveClassTwo/components/addShareStudentList.vue

@@ -356,7 +356,10 @@ export default {
       }
     },
     onCancel() {
-      this.$router.push("/liveClassManager");
+      this.$router.push({
+        path: "/business/liveCourseDetail",
+        query: { ...this.$route.query },
+      });
       this.$store.dispatch("delVisitedViews", this.$route);
     },
     async deteleBlack(row) {

+ 190 - 47
src/views/liveClassManager/liveClassTwo/components/courseAdjust.vue

@@ -78,52 +78,110 @@
         <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">
+                <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-button
-                type="text"
-                @click="startShare(scope.row)"
-                v-if="
-                  scope.row.id &&
-                  $helpers.permission('courseSchedule/updateCourseScheduleShareMode')
-                "
-                :disabled="scope.row.status == 'OVER'"
-                >分享</el-button
-              >
-              <el-button
-                type="text"
-                v-if="
-                  scope.row.id &&
-                  $helpers.permission('courseSchedule/classStartDateAdjust/liveReset')
-                "
-                :disabled="
-                  scope.row.status == 'OVER' || scope.row.shareMode == 'NO_SHARE'
-                "
-                @click="lookCode(scope.row)"
-                >二维码</el-button
-              >
-              <el-button
-                type="text"
-                v-if="
-                  scope.row.id &&
-                  $helpers.permission('courseShare/queryCourseSharedStudent')
-                "
-                :disabled="
-                  scope.row.status == 'OVER' || scope.row.shareMode !== 'PRIVATE'
-                "
-                @click="gotoShareList(scope.row)"
-                >分享列表</el-button
-              >
+                  <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>
@@ -328,13 +386,89 @@
         {{ 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, createLiveGroupShare } from "../../api";
+import { liveCourseList, createLiveGroupShare, getCourseVideoList } from "../../api";
 import { diffTimerFormMinute, addTimerFormMinute } from "@/utils/date";
 import { shareLiveTypeList } from "@/utils/searchArray";
 import { vaildStudentUrl } from "@/utils/validate";
@@ -410,13 +544,15 @@ export default {
       },
       startTime: "",
       shareModeForm: {
-        shareMode: "",
+        shareMode: "OPEN",
         courseId: "",
       },
       shareModeVisible: false,
       codeStatus: false,
       qrCodeUrl: "",
       actvieRow: { shareMode: "" },
+      payVisible: false,
+      videoVisible: false,
     };
   },
   mounted() {
@@ -656,6 +792,13 @@ export default {
         this.getList();
       } catch (e) {}
     },
+    async lookViedoList(row) {
+      try {
+        const res = await getCourseVideoList({ roomUid });
+      } catch (e) {
+        console.log(e);
+      }
+    },
   },
   computed: {
     nowTime() {

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

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

+ 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>