mo 3 роки тому
батько
коміт
c13e53130e

+ 1 - 0
src/views/resetTeaming/components/archicesComponents/api.js

@@ -185,3 +185,4 @@ export const resetQuestion = data => request2({
 
 })
 
+

+ 34 - 11
src/views/resetTeaming/components/archicesComponents/trainPlan.vue

@@ -10,13 +10,18 @@
         <div class="alerTitle">
           <div class="shapeWrap">
             <span class="shape"></span>
-            <p style="margin-right: 5px">师资安排</p>
-            <span style="color: red; font-weight: bold">
-              该乐团声部课剩余 2 课时、合奏课 4 课时未进行教学规划</span
-            >
+            <p style="margin-right: 5px; width: 80px">训练规划</p>
+            <span style="color: red; font-weight: bold" class="planMsg">
+              <overflow-text
+                :text="exceptionPlan || ''"
+                width="100%"
+              ></overflow-text>
+            </span>
           </div>
 
-          <el-button type="text" @click="addPlan">+新增训练规划</el-button>
+          <el-button type="text" style="width: 100px" @click="addPlan"
+            >+新增训练规划</el-button
+          >
         </div>
       </template>
     </el-alert>
@@ -171,6 +176,7 @@ import { filterCourseType } from "@/constant/index";
 import addplan from "./modals/addPlan";
 import Tooltip from "@/components/Tooltip/index";
 export default {
+  props: ["planDtosList"],
   components: { addplan, Tooltip },
   data() {
     return {
@@ -205,6 +211,17 @@ export default {
       this.searchForm.term = "1";
     }
   },
+  computed: {
+    exceptionPlan() {
+      let str = "该乐团当前学期";
+      this.planDtosList.forEach((plan) => {
+        str += `${plan.classGroupName}班${filterCourseType[plan.scheduleType]}${
+          plan.num
+        }次; `;
+      });
+      return str;
+    },
+  },
   mounted() {
     this.teamid = this.$route.query.id;
     this.getMusicClass();
@@ -303,7 +320,9 @@ export default {
       this.getList(obj);
     },
     async getList(obj) {
+
       try {
+            await this.$emit('getPlanError',{year:this.searchForm.year,term:this.searchForm.term})
         const res2 = await getMusicGroupTrainPlan(obj);
         let dayjs = this.$helpers.dayjs;
         let timestamp;
@@ -365,9 +384,7 @@ export default {
         console.log(e);
       }
 
-      try {
-        const res = await getExceptionPlan(obj);
-      } catch (e) {}
+
     },
     // 删除尚未接完
     detelePlan(item) {
@@ -498,7 +515,6 @@ export default {
   }
 }
 /deep/.alerTitle {
-  width: 100%;
   display: flex;
   flex-direction: row;
   justify-content: space-between;
@@ -507,10 +523,12 @@ export default {
   }
 }
 .shapeWrap {
+  flex: 1;
   display: flex;
   flex-direction: row;
   justify-content: flex-start;
   align-items: center;
+  overflow: hidden;
   .shape {
     position: relative;
     top: -1px;
@@ -521,6 +539,13 @@ export default {
     background-color: #14928a;
     z-index: 500;
   }
+  .planMsg {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    flex-grow: 1;
+    width: 500px;
+  }
 }
 /deep/.el-alert__content {
   flex: 1;
@@ -528,6 +553,4 @@ export default {
 .searchForm {
   padding: 0 16px;
 }
-
-
 </style>

+ 66 - 27
src/views/resetTeaming/components/musicArchices.vue

@@ -7,23 +7,28 @@
         v-if="permission('/teamBaseInfo')"
         name="1"
       >
-        <baseInfo v-if="activeIndex==1"/>
+        <baseInfo v-if="activeIndex == 1" />
       </el-tab-pane>
-      <el-tab-pane
-        label="学员&师资"
-        lazy
-        v-if="permission('/teamBaseInfo')"
-        name="2"
-      >
-      <studentAndTeacher v-if="activeIndex==2"/>
+      <el-tab-pane lazy v-if="permission('/teamBaseInfo')" name="2">
+        <el-badge
+          slot="label"
+          class="badge"
+          is-dot
+          :hidden="!planDtosList.length>0"
+          >学员&师资</el-badge
+        >
+        <studentAndTeacher v-if="activeIndex == 2" />
       </el-tab-pane>
-      <el-tab-pane
-        label="训练规划"
-        lazy
-        v-if="permission('/teamBaseInfo')"
-        name="3"
-      >
-      <trainPlan v-if="activeIndex==3"/>
+      <el-tab-pane lazy v-if="permission('/teamBaseInfo')" name="3">
+        <el-badge
+          slot="label"
+          class="badge"
+          is-dot
+          :hidden="!planDtosList.length>0"
+
+          >训练规划</el-badge
+        >
+        <trainPlan :planDtosList="planDtosList" v-if="activeIndex == 3"  @getPlanError="getPlanError"/>
       </el-tab-pane>
       <el-tab-pane
         label="训练时长"
@@ -31,7 +36,7 @@
         v-if="permission('/teamBaseInfo')"
         name="4"
       >
-      <trainTimer  v-if="activeIndex==4"/>
+        <trainTimer v-if="activeIndex == 4" />
       </el-tab-pane>
       <el-tab-pane
         label="作业情况"
@@ -39,7 +44,7 @@
         v-if="permission('/teamBaseInfo')"
         name="5"
       >
-      <workStatus  v-if="activeIndex==5"/>
+        <workStatus v-if="activeIndex == 5" />
       </el-tab-pane>
       <el-tab-pane
         label="训练照片"
@@ -47,7 +52,7 @@
         v-if="permission('/teamBaseInfo')"
         name="6"
       >
-        <training-photos  v-if="activeIndex==6"/>
+        <training-photos v-if="activeIndex == 6" />
       </el-tab-pane>
       <el-tab-pane
         label="获奖证书"
@@ -55,7 +60,7 @@
         v-if="permission('/teamBaseInfo')"
         name="9"
       >
-        <photo-detail type="SHOW"  v-if="activeIndex==9"/>
+        <photo-detail type="SHOW" v-if="activeIndex == 9" />
       </el-tab-pane>
       <el-tab-pane
         label="乐团资讯"
@@ -63,23 +68,23 @@
         v-if="permission('/teamBaseInfo')"
         name="7"
       >
-      <teamInfo v-if="activeIndex==7"/>
+        <teamInfo v-if="activeIndex == 7" />
       </el-tab-pane>
-            <el-tab-pane
+      <el-tab-pane
         label="满意度调查"
         lazy
         v-if="permission('/teamBaseInfo')"
         name="8"
       >
-      <survey v-if="activeIndex==8"/>
+        <survey v-if="activeIndex == 8" />
       </el-tab-pane>
     </tab-router>
   </div>
 </template>
 <script>
 import { permission } from "@/utils/directivePage";
-import trainingPhotos from './training-photos'
-import photoDetail from '@/views/photo-detail'
+import trainingPhotos from "./training-photos";
+import photoDetail from "@/views/photo-detail";
 import baseInfo from "./archicesComponents/baseInfo";
 import certificate from "./archicesComponents/certificate";
 import studentAndTeacher from "./archicesComponents/studentAndTeacher";
@@ -88,10 +93,11 @@ import teamInfo from "./archicesComponents/teamInfo";
 import trainPlan from "./archicesComponents/trainPlan";
 import trainTimer from "./archicesComponents/trainTimer";
 import workStatus from "./archicesComponents/workStatus";
+import { getExceptionPlan } from './archicesComponents/api'
 export default {
   components: {
-    'training-photos': trainingPhotos,
-    'photo-detail': photoDetail,
+    "training-photos": trainingPhotos,
+    "photo-detail": photoDetail,
     baseInfo,
     certificate,
     studentAndTeacher,
@@ -104,15 +110,48 @@ export default {
   data() {
     return {
       activeIndex: "training-photos",
+    planDtosList:[],
+    year:'',
+    term:''
     };
   },
-  mounted() {},
+  mounted() {
+        let date = new Date();
+    this.year = String(date.getFullYear());
+    // console.log('year',date.getFullYear())
+    let month = date.getMonth() + 1;
+    if (month > 3 && month < 8) {
+      this.term = "0";
+    } else {
+      this.term = "1";
+    }
+    this.getPlanError();
+  },
   methods: {
     permission(str) {
       return permission(str);
     },
+   async getPlanError(obj) {
+     if(obj){
+       this.year = obj.year
+       this.term = obj.term
+     }
+     try{
+       const res = await getExceptionPlan({musicGroupId:this.$route.query.id,year:this.year,term:this.term})
+       this.planDtosList = res.data.waitCourseTrainPlanDtos
+     }catch(e){
+       console.log(e)
+     }
+
+   },
   },
 };
 </script>
 <style lang="scss" scoped>
+.badge {
+  /deep/.el-badge__content.is-fixed.is-dot {
+    top: 9px;
+    right: 2px;
+  }
+}
 </style>