Ver Fonte

提交测试

1
mo há 3 anos atrás
pai
commit
7db854a530

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

@@ -56,3 +56,13 @@ export const deteleMusicGroupTrainPlan = data =>request2({
   method: 'post',
   requestType:'form'
 })
+
+// 获取乐团训练规划异常规划
+export const getExceptionPlan = data => request2({
+  url: '/api-web/musicGroupTrainPlan/queryExceptionPlan',
+  data: data,
+  params: {},
+  method: 'post',
+  requestType:'json'
+
+})

+ 43 - 29
src/views/resetTeaming/components/archicesComponents/trainPlan.vue

@@ -107,9 +107,11 @@
           >
             {{ item.index }}
             <div class="timeline">
-              <h4 class="time">{{ item.timer|| '暂无课程时间' }}</h4>
+              <h4 class="time">{{ item.timer || "暂无课程时间" }}</h4>
               <p class="cuorseType">{{ item.courseType }}</p>
-              <p class="concat"> <Tooltip :content="item.plan.value || '暂无规划'" /></p>
+              <p class="concat">
+                <Tooltip :content="item.plan.value || '暂无规划'" />
+              </p>
               <el-button
                 class="button"
                 :disabled="!item.plan.value || !item.timer"
@@ -156,12 +158,18 @@
 </template>
 <script>
 import { getMusicGroupAllClass } from "@/api/buildTeam";
-import { getCourseType, getPlanCourseNum, getMusicGroupTrainPlan,deteleMusicGroupTrainPlan } from "./api";
+import {
+  getCourseType,
+  getPlanCourseNum,
+  getMusicGroupTrainPlan,
+  deteleMusicGroupTrainPlan,
+  getExceptionPlan
+} from "./api";
 import { filterCourseType } from "@/constant/index";
 import addplan from "./modals/addPlan";
-import Tooltip from '@/components/Tooltip/index'
+import Tooltip from "@/components/Tooltip/index";
 export default {
-  components: { addplan ,Tooltip},
+  components: { addplan, Tooltip },
   data() {
     return {
       searchForm: {
@@ -177,11 +185,11 @@ export default {
       planTitle: "",
       planVisible: false,
       currentIndex: 0,
-      addIndex:0,
-      resetIndex:0,
+      addIndex: 0,
+      resetIndex: 0,
       maxPlansNum: 0,
       isAdd: false,
-      activeItem:null
+      activeItem: null,
     };
   },
   created() {
@@ -310,7 +318,7 @@ export default {
             timestamp = dayjs(dayStr).valueOf();
 
             return {
-              num:index + 1,
+              num: index + 1,
               timer: time,
               index: `第${index + 1}次训练`,
               courseType: filterCourseType[this.searchForm.courseScheduleType],
@@ -330,7 +338,7 @@ export default {
           // 规划多 课少
           this.planList = res2.data.musicGroupTrainPlans.map((item, index) => {
             return {
-              num:index + 1,
+              num: index + 1,
               timer: null,
               index: `第${index + 1}次训练`,
               courseType: filterCourseType[this.searchForm.courseScheduleType],
@@ -354,6 +362,11 @@ export default {
       } catch (e) {
         console.log(e);
       }
+
+      try {
+      const res = await getExceptionPlan(obj)
+
+      }catch(e){}
     },
     // 删除尚未接完
     detelePlan(item) {
@@ -363,30 +376,31 @@ export default {
         type: "warning",
       })
         .then(async () => {
-          try{
-            // const res
-          }catch(e){
-
+          try {
+            const res = await deteleMusicGroupTrainPlan({ id: item.plan.id });
+            this.$message.success("删除成功");
+            let obj = {
+              classGroupId: this.searchForm.classGroupId,
+              musicGroupId: this.teamid,
+              term: this.searchForm.term,
+              year: this.searchForm.year,
+              courseScheduleType: this.searchForm.courseScheduleType,
+            };
+            this.getList(obj);
+          } catch (e) {
+            console.log(e);
           }
-          deteleMusicGroupTrainPlan({ orderId: row.id }).then((res) => {
-            if (res.code === 200) {
-              this.$message.success("删除成功");
-              this.getList();
-              // this.routeOrderStatus = false;
-            }
-          });
         })
         .catch();
     },
     // 修改
-    resetPlan(item){
-        this.planTitle = "修改训练规划";
-        this.isAdd = false;
-        this.activeItem = item;
-        this.currentIndex = item.num;
-        this.planVisible = true;
-
-    }
+    resetPlan(item) {
+      this.planTitle = "修改训练规划";
+      this.isAdd = false;
+      this.activeItem = item;
+      this.currentIndex = item.num;
+      this.planVisible = true;
+    },
   },
   watch: {
     "searchForm.classGroupId"(val) {

+ 2 - 2
vue.config.js

@@ -19,8 +19,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.148:8000' //邹璇
 // let target = 'http://192.168.3.112:8000' //勇哥
-// let target = 'http://dev.dayaedu.com' // 开发环境
-let target = 'https://test.dayaedu.com' //测试环境
+let target = 'http://dev.dayaedu.com' // 开发环境
+// let target = 'https://test.dayaedu.com' //测试环境
 // let target = 'http://192.168.3.134' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {