Browse Source

教学伴奏添加参数

lex 9 months ago
parent
commit
f750178344
1 changed files with 12 additions and 14 deletions
  1. 12 14
      src/views/accompaniment/index.vue

+ 12 - 14
src/views/accompaniment/index.vue

@@ -54,7 +54,7 @@
             placeholder="请选择声部"
           >
             <el-option
-              v-for="item in selects.subjects"
+              v-for="item in subjectList"
               :value="item.id"
               :label="item.name"
               :key="item.id"
@@ -278,9 +278,7 @@ import { getToken } from "@/utils/auth";
 import deepClone from "@/helpers/deep-clone/";
 import Tooltip from "@/components/Tooltip/index";
 import { Export } from "@/utils/downLoadFile";
-import {
-  getSubject
-} from "@/api/buildTeam";
+import { getSubject } from "@/api/buildTeam";
 import qs from "qs";
 import cleanDeep from "clean-deep";
 export default {
@@ -326,6 +324,7 @@ export default {
       detail: null,
       visible: false,
       muiscVisible: false,
+      subjectList: [],
       tree: [],
       treeProps: {
         value: "id",
@@ -357,24 +356,23 @@ export default {
         this.tree
       );
     }
-    this.$store.dispatch("setSubjects");
-
-
+    // this.$store.dispatch("setSubjects");
+    await this.getSubjectList();
 
     this.$store.dispatch("setBranchs");
     await this.FetchList();
 
     // 点击Cascader  label选中
-
-    this.getSubjectList()
   },
   methods: {
-    getSubjectList() {
+    async getSubjectList() {
       try {
-        const {data} = await getSubject({
-            rows: 9999,
-            tenantId: "1"
-          });
+        const { data } = await getSubject({
+          rows: 9999,
+          cbsFlag: true,
+          tenantId: "1"
+        });
+        this.subjectList = data || [];
       } catch {
         //
       }