Quellcode durchsuchen

提交若没有班级和课清楚异常规划

1
mo vor 3 Jahren
Ursprung
Commit
bc5b0062d3

+ 2 - 3
src/views/resetTeaming/components/archicesComponents/baseInfo.vue

@@ -33,9 +33,8 @@
         >{{ baseInfo.schoolName }}
       </descriptions-item>
       <descriptions-item label="衔接老师:">
-        {{ baseInfo.transactionTeacherName }}/{{
-          baseInfo.transactionTeacherPhone
-        }}</descriptions-item
+        {{[baseInfo.transactionTeacherName,baseInfo.transactionTeacherPhone].join('/')  }}
+ </descriptions-item
       >
       <descriptions-item label="乐队指导:"
         >{{ baseInfo.directorUserName }}

+ 18 - 10
src/views/resetTeaming/components/archicesComponents/trainPlan.vue

@@ -103,7 +103,7 @@
       </el-form-item>
     </save-form>
     <div class="timerWrap">
-      <div class="timerList" v-if="planList.length>0">
+      <div class="timerList" v-if="planList.length > 0">
         <el-timeline>
           <!--   timestamp="2018/4/12"  :timestamp="item.timestamp" -->
           <!-- {timer:time,index:`第${index+1}次训练`,courseType:filterCourseType[val],timestamp:timestamp} -->
@@ -142,9 +142,9 @@
           </el-timeline-item>
         </el-timeline>
       </div>
-        <div v-else>
-      <empty desc="暂无规划" />
-    </div>
+      <div v-else>
+        <empty desc="暂无规划" />
+      </div>
     </div>
     <el-dialog
       :title="planTitle"
@@ -230,8 +230,8 @@ export default {
           filterCourseType[plan.scheduleType]
         }训练规划与课时数不符; `;
       });
-      if(this.planDtosList.length<=0&&this.planDtosList1.length<=0){
-        str=""
+      if (this.planDtosList.length <= 0 && this.planDtosList1.length <= 0) {
+        str = "";
       }
 
       return str;
@@ -249,8 +249,12 @@ export default {
         if (res.code == 200) {
           this.classList = res.data;
           if (this.classList.length < 1) {
-            this.planList=[]
+            this.planList = [];
             this.$message.error("当前乐团暂无班级");
+            this.$emit("getPlanError", {
+              year: this.searchForm.year,
+              term: this.searchForm.term,
+            });
             return;
           }
           this.searchForm.classGroupId = this.classList[0].id;
@@ -258,14 +262,18 @@ export default {
       });
     },
     async getCourseList(obj) {
+      this.courseTypeList = [];
       try {
         this.searchForm.courseScheduleType = "";
         const res = await getCourseType(obj);
         if (!res.data || res.data.length <= 0) {
-                this.planList=[]
+          this.planList = [];
           this.$message.error("当前班级暂无课程");
+         this.$emit("getPlanError", {
+            year: this.searchForm.year,
+            term: this.searchForm.term,
+          });
         } else {
-          this.courseTypeList = [];
           res.data.forEach((course) => {
             if (filterCourseType[course]) {
               this.courseTypeList.push({
@@ -349,7 +357,7 @@ export default {
         let musicGroupTrainPlans = res2.data.musicGroupTrainPlans;
         if (classDates.length < 1) {
           this.$message.error("当前学期该班级暂无此类型课程");
-                this.planList=[]
+          this.planList = [];
           return;
         }