浏览代码

声部修改和驳回显示

1
mo 4 年之前
父节点
当前提交
4955a59d32

+ 33 - 17
src/views/teamBuild/components/soundSetComponents/soundSetCore.vue

@@ -214,29 +214,16 @@ export default {
            this.changeActiveSound(activeSound.join(","));
         } else {
           if (this.teamStatus == "newTeam" && type && section) {
-            getDefaultSubject({
-              chargeTypeId: type,
-              organId: section,
-              number: 1,
-            }).then((res) => {
-              if (res.code == 200) {
-                let activeSound = [];
-                this.activeSoundList = res.data.map((item) => {
-                  activeSound.push(item.id);
-                  return this.initSound(item);
-                });
-                this.activeSound = activeSound;
-                this.chioseActiveSound = activeSound;
-                this.changeActiveSound(activeSound.join(","));
-              }
-            });
+              this.getDefaultSubject()
           } else {
             this.teamid = this.$route.query.id;
             if (this.teamid) {
               findMusicGroupSubjectInfo({ musicGroupId: this.teamid }).then(
                 (res) => {
                   if (res.code == 200) {
-                    let activeSound = [];
+                   // 如果没有一个声部 则请求默认声部
+                    if(res.data?.musicGroupSubjectPlans>0){
+                             let activeSound = [];
                     this.activeSoundList = res.data?.musicGroupSubjectPlans.map(
                       (item) => {
                         activeSound.push(item.subjectId);
@@ -284,6 +271,12 @@ export default {
                         }
                       }
                     });
+                    }else{
+                      this.getDefaultSubject()
+                    }
+
+
+                    // 这里开始
                   }
                 }
               );
@@ -297,6 +290,29 @@ export default {
         }
       });
     },
+    getDefaultSubject(){
+      this.topfor = JSON.parse(
+          sessionStorage.getItem(`${this.$route.query.id}base`)
+        );
+            let type = this.topfor.type;
+      let section = this.topfor.section;
+       getDefaultSubject({
+              chargeTypeId: type,
+              organId: section,
+              number: 1,
+            }).then((res) => {
+              if (res.code == 200) {
+                let activeSound = [];
+                this.activeSoundList = res.data.map((item) => {
+                  activeSound.push(item.id);
+                  return this.initSound(item);
+                });
+                this.activeSound = activeSound;
+                this.chioseActiveSound = activeSound;
+                this.changeActiveSound(activeSound.join(","));
+              }
+            });
+    },
     lookCheck(val) {
       this.checkList = [...new Set(val)];
     },

+ 9 - 0
src/views/teamBuild/components/teamJournal.vue

@@ -33,7 +33,9 @@
 
         >
           <template slot-scope="scope">
+
            {{ scope.row.event }}
+           <span style="color:red">{{getMemo(scope.row)}}</span>
           </template>
         </el-table-column>
       </el-table>
@@ -77,6 +79,13 @@ export default {
           this.processList = res.data;
         }
       })
+    },
+    getMemo(row){
+      if(row.memo && !row.memo.includes("{")){
+        return row.memo
+      }else{
+        return ''
+      }
     }
   }
 };