|
@@ -1,8 +1,21 @@
|
|
|
<template>
|
|
|
- <div class="m-container">
|
|
|
+ <div class="m-container">
|
|
|
<h2>
|
|
|
- <el-page-header @back="onCancel" :content="$route.query.name"></el-page-header>
|
|
|
+ <el-page-header
|
|
|
+ @back="onCancel"
|
|
|
+ :content="$route.query.name"
|
|
|
+ ></el-page-header>
|
|
|
</h2>
|
|
|
+ <div class="msg">
|
|
|
+ 学生端展示:
|
|
|
+ <el-switch
|
|
|
+ v-model="isShowRecordOfStudent"
|
|
|
+ @change="changeSwitch"
|
|
|
+ :disabled="!permission('musicGroupRecord/settingStudentIsShow')"
|
|
|
+ active-color="#14928a"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ </div>
|
|
|
<tab-router v-model="activeIndex" ref="tab" searchKey="musicArchices">
|
|
|
<el-tab-pane
|
|
|
label="基本信息"
|
|
@@ -12,26 +25,30 @@
|
|
|
>
|
|
|
<baseInfo v-if="activeIndex == 1" />
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane lazy v-if="permission('/archicesStudeentAndTEacher')" name="2">
|
|
|
- <el-badge
|
|
|
- slot="label"
|
|
|
- class="badge"
|
|
|
- is-dot
|
|
|
- :hidden="graduateNum<=0"
|
|
|
+ <el-tab-pane
|
|
|
+ lazy
|
|
|
+ v-if="permission('/archicesStudeentAndTEacher')"
|
|
|
+ name="2"
|
|
|
+ >
|
|
|
+ <el-badge slot="label" class="badge" is-dot :hidden="graduateNum <= 0"
|
|
|
>学员&师资</el-badge
|
|
|
>
|
|
|
- <studentAndTeacher v-if="activeIndex == 2" :graduateNum="graduateNum"/>
|
|
|
+ <studentAndTeacher v-if="activeIndex == 2" :graduateNum="graduateNum" />
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane lazy v-if="permission('/archicesTrainPlan')" name="3">
|
|
|
<el-badge
|
|
|
slot="label"
|
|
|
class="badge"
|
|
|
is-dot
|
|
|
- :hidden="!planDtosList.length>0&&!planDtosList1.length>0"
|
|
|
-
|
|
|
+ :hidden="!planDtosList.length > 0 && !planDtosList1.length > 0"
|
|
|
>训练规划</el-badge
|
|
|
>
|
|
|
- <trainPlan :planDtosList="planDtosList" :planDtosList1="planDtosList1" v-if="activeIndex == 3" @getPlanError="getPlanError"/>
|
|
|
+ <trainPlan
|
|
|
+ :planDtosList="planDtosList"
|
|
|
+ :planDtosList1="planDtosList1"
|
|
|
+ v-if="activeIndex == 3"
|
|
|
+ @getPlanError="getPlanError"
|
|
|
+ />
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane
|
|
|
label="训练时长"
|
|
@@ -104,8 +121,8 @@ import teamInfo from "./archicesComponents/teamInfo";
|
|
|
import trainPlan from "./archicesComponents/trainPlan";
|
|
|
import trainTimer from "./archicesComponents/trainTimer";
|
|
|
import workStatus from "./archicesComponents/workStatus";
|
|
|
-import performance from './archicesComponents/performance'
|
|
|
-import { getExceptionPlan } from './archicesComponents/api'
|
|
|
+import performance from "./archicesComponents/performance";
|
|
|
+import { getExceptionPlan,settingStudentIsShow } from "./archicesComponents/api";
|
|
|
export default {
|
|
|
components: {
|
|
|
"training-photos": trainingPhotos,
|
|
@@ -118,21 +135,22 @@ export default {
|
|
|
trainPlan,
|
|
|
trainTimer,
|
|
|
workStatus,
|
|
|
- performance
|
|
|
+ performance,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
activeIndex: "training-photos",
|
|
|
- planDtosList:[],
|
|
|
- planDtosList1:[],
|
|
|
- year:'',
|
|
|
- term:'',
|
|
|
- graduateNum:0,
|
|
|
- teamName:''
|
|
|
+ planDtosList: [],
|
|
|
+ planDtosList1: [],
|
|
|
+ year: "",
|
|
|
+ term: "",
|
|
|
+ graduateNum: 0,
|
|
|
+ teamName: "",
|
|
|
+ isShowRecordOfStudent: false,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- let date = new Date();
|
|
|
+ let date = new Date();
|
|
|
this.year = String(date.getFullYear());
|
|
|
// console.log('year',date.getFullYear())
|
|
|
let month = date.getMonth() + 1;
|
|
@@ -147,33 +165,64 @@ export default {
|
|
|
permission(str) {
|
|
|
return permission(str);
|
|
|
},
|
|
|
- async getPlanError(obj) {
|
|
|
- if(obj){
|
|
|
- this.year = obj.year
|
|
|
- this.term = obj.term
|
|
|
- }
|
|
|
+ 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;
|
|
|
+ this.planDtosList1 = res.data.waitCourseTrainPlanDtos1;
|
|
|
+ this.graduateNum = res.data.graduateNum;
|
|
|
+ this.isShowRecordOfStudent = res.data.isShowRecordOfStudent
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onCancel() {
|
|
|
+ this.$store.dispatch("delVisitedViews", this.$route);
|
|
|
+ this.$router.push({
|
|
|
+ path: "/business/resetTeaming",
|
|
|
+ query: { ...this.$route.query },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async changeSwitch(val) {
|
|
|
+ // 修改 学生端展示
|
|
|
try{
|
|
|
- const res = await getExceptionPlan({musicGroupId:this.$route.query.id,year:this.year,term:this.term})
|
|
|
- this.planDtosList = res.data.waitCourseTrainPlanDtos
|
|
|
- this.planDtosList1= res.data.waitCourseTrainPlanDtos1
|
|
|
- this.graduateNum = res.data.graduateNum
|
|
|
+ const res = await settingStudentIsShow({musicGroupId:this.$route.query.id,isShowRecordOfStudent:val})
|
|
|
+ this.$message.success('修改成功')
|
|
|
+ this.getPlanError()
|
|
|
}catch(e){
|
|
|
console.log(e)
|
|
|
}
|
|
|
|
|
|
},
|
|
|
- onCancel(){
|
|
|
- this.$store.dispatch("delVisitedViews", this.$route);
|
|
|
- this.$router.push({ path: "/business/resetTeaming",query:{...this.$route.query} });
|
|
|
- }
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+.m-container {
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
.badge {
|
|
|
/deep/.el-badge__content.is-fixed.is-dot {
|
|
|
top: 9px;
|
|
|
right: 2px;
|
|
|
}
|
|
|
}
|
|
|
+.msg {
|
|
|
+ align-items: center;
|
|
|
+ text-align: right;
|
|
|
+ // color: #777;
|
|
|
+ cursor: pointer;
|
|
|
+ position: absolute;
|
|
|
+ top: 34px;
|
|
|
+ right: 40px;
|
|
|
+ z-index: 990;
|
|
|
+}
|
|
|
</style>
|