Browse Source

Merge branch 'dev' of http://git.dayaedu.com/huangqiyong/classroom into staging

黄琪勇 7 months ago
parent
commit
3f651ec0b9

+ 4 - 0
dist/index.html

@@ -1,6 +1,10 @@
 <!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="renderer" content="webkit"/><meta name="force-rendering" content="webkit"/><link rel="icon" href="/favicon.ico"/><title>乐教通</title><script>if (!!window.ActiveXObject || "ActiveXObject" in window) {
             window.location.href = "./ieIncompatible/index.html"
+<<<<<<< HEAD
          }</script><script defer="defer" src="/js/chunk-vendors.5249fc2d.js"></script><script defer="defer" src="/js/app.5fcca0dd.js"></script><link href="/css/app.2ae84a6b.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but classroom doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><style>.firstLoading {
+=======
+         }</script><script defer="defer" src="/js/chunk-vendors.806b057d.js"></script><script defer="defer" src="/js/app.8885c6f2.js"></script><link href="/css/app.2ae84a6b.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but classroom doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><style>.firstLoading {
+>>>>>>> e257df6c55dd42389a78248ad54022dd9114f40f
                position: fixed;
                left: 50%;
                top: 50%;

File diff suppressed because it is too large
+ 0 - 0
dist/js/879.e32abae8.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.8885c6f2.js


+ 7 - 0
src/api/cloudPractice.api.ts

@@ -29,6 +29,13 @@ export const queryPage2_gym = (data: any) => {
    })
 }
 
+export const cbsDetail_gym = (id: number) => {
+   return httpAxios_gym.axioseRquest({
+      method: "get",
+      url: `/api-teacher/musicSheet/cbsDetail/${id}`
+   })
+}
+
 /**
  * 管乐团
  */

+ 1 - 1
src/libs/instruments.ts

@@ -63,7 +63,7 @@ const instruments: any = {
    "Soprano Saxophone": "高音萨克斯管",
    "Alto Saxophone": "中音萨克斯管",
    "Tenor Saxophone": "次中音萨克斯管",
-   "Baritone Saxophone": "低音萨克斯管",
+   "Baritone Saxophone": "低音萨克斯管",
    Piccolo: "短笛",
    Flute: "长笛",
    Recorder: "竖笛",

+ 65 - 6
src/views/cloudPractice/cloudPractice.tsx

@@ -12,7 +12,7 @@ import iconBtnPlay from "../../img/cloudPractice/icon-btn-play.png"
 import btnSubmit from "../../img/cloudPractice/btn-submit.png"
 import iconTransfer from "../../img/cloudPractice/icon-transfer.png"
 import iconDownload from "../../img/cloudPractice/icon-download.png"
-import { httpAjaxErrMsg } from "@/plugin/httpAjax"
+import { httpAjax, httpAjaxErrMsg } from "@/plugin/httpAjax"
 import {
    queryPage2_gym,
    queryPage2_gyt,
@@ -23,7 +23,8 @@ import {
    queryTree_gym,
    queryTree_gyt,
    queryTree_klx,
-   selectCondition_klx
+   selectCondition_klx,
+   cbsDetail_gym
 } from "@/api/cloudPractice.api"
 import axios from "axios"
 import { getInstrumentName } from "@/libs/instruments"
@@ -190,7 +191,8 @@ export default defineComponent({
                state.subjectList = result.map((item: any) => {
                   return {
                      label: item.name,
-                     value: item.id
+                     value: item.id,
+                     instrumentIds: item.instrumentIds
                   }
                })
 
@@ -276,7 +278,8 @@ export default defineComponent({
                state.subjectList = result.map((item: any) => {
                   return {
                      label: item.name,
-                     value: item.id
+                     value: item.id,
+                     instrumentIds: item.instrumentIds
                   }
                })
 
@@ -402,7 +405,8 @@ export default defineComponent({
                state.subjectList = result.map((item: any) => {
                   return {
                      label: item.name,
-                     value: item.id
+                     value: item.id,
+                     instrumentIds: item.instrumentIds
                   }
                })
 
@@ -795,10 +799,36 @@ export default defineComponent({
             }
          }
 
-         const defaultShowStaff = partColumns.value.find((item: any) => item.value === state.selectedPartIndex)
+         // gym 现在单独处理 管乐迷根据查询条件来筛选谱面
+         let defaultShowStaff
+         if (userStoreHook.roles === "GYM") {
+            // 这里筛选当前的声轨
+            const soundCodes = await filterSoundCodes()
+            if (soundCodes) {
+               const soundCodesArr = soundCodes.split(",").map((code: string) => {
+                  return code
+                     .toLowerCase()
+                     .replace(/^\d+|\d+$/g, "")
+                     .trim()
+               })
+               defaultShowStaff = partColumns.value.find((item: any) =>
+                  soundCodesArr.includes(
+                     item.track &&
+                        item.track
+                           .toLowerCase()
+                           .replace(/^\d+|\d+$/g, "")
+                           .trim()
+                  )
+               )
+            }
+            defaultShowStaff || (defaultShowStaff = partColumns.value.find((item: any) => item.value === state.selectedPartIndex))
+         } else {
+            defaultShowStaff = partColumns.value.find((item: any) => item.value === state.selectedPartIndex)
+         }
          state.selectedPartName = defaultShowStaff?.instrumentName
          state.selectedTrack = defaultShowStaff?.track
          state.partXmlIndex = defaultShowStaff?.xmlIndex
+         state.selectedPartIndex = defaultShowStaff?.value
          if (row.isScoreRender && row.defaultScoreRender) {
             state.musicPdfUrl = row?.musicPdfUrl || ""
          } else {
@@ -1002,6 +1032,35 @@ export default defineComponent({
          }
       }
 
+      // 根据当前选中的声部和曲目筛选出对应的声轨
+      async function filterSoundCodes() {
+         const { instrumentIds } =
+            state.subjectList.find((item: any) => {
+               return item.value === state.subjectId
+            }) || {}
+         if (instrumentIds) {
+            const { id } = state.list[state.listActive] || {}
+            //  GYM,GYT,KLX 区分   查询声部数据
+            let cbsDetails: any = []
+            if (userStoreHook.roles === "GYM") {
+               const resData = await httpAjax(cbsDetail_gym, id)
+               if (resData.code === 200) {
+                  cbsDetails = resData.data.musicalInstruments
+               }
+            } else if (userStoreHook.roles === "GYT") {
+               //
+            } else if (userStoreHook.roles === "KLX") {
+               //
+            }
+            const { code } =
+               cbsDetails.find((item: any) => {
+                  return instrumentIds == item.id
+               }) || {}
+            return code
+         }
+         return undefined
+      }
+
       // 白板的批注打开时暂停播放
       watch(
          () => [whitePenShow.value, penShow.value],

Some files were not shown because too many files changed in this diff