瀏覽代碼

乐团档案

1
mo 4 年之前
父節點
當前提交
fa019d4805

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

@@ -0,0 +1,30 @@
+import request2 from '@/utils/request2'
+export const getCourseType = data => request2({
+  url: '/api-web/musicGroupTrainPlan/queryCourseType',
+  data: data,
+  params: {},
+  method: 'post',
+  requestType:'json'
+
+})
+//   requestType: 'form'
+
+// musicGroupTrainPlan/queryPlanCourseNum
+export const getPlanCourseNum = data => request2({
+  url: '/api-web/musicGroupTrainPlan/queryPlanCourseNum',
+  data: data,
+  params: {},
+  method: 'post',
+  requestType:'json'
+
+})
+
+//
+export const getMusicGroupTrainPlan = data => request2({
+  url: '/api-web/musicGroupTrainPlan/queryPlanPage',
+  data: data,
+  params: {},
+  method: 'post',
+  requestType:'json'
+
+})

+ 4 - 9
src/views/resetTeaming/components/archicesComponents/baseInfo.vue

@@ -17,16 +17,11 @@
     </descriptions>
     <el-alert title="联系人" :closable="false" class="alert" type="info" />
 
-    <descriptions :column="3" >
-      <descriptions-item label="联系人:">
-      </descriptions-item>
+    <descriptions :column="3">
+      <descriptions-item label="联系人:"> </descriptions-item>
       <descriptions-item label="职位:"> 2021-07-09</descriptions-item>
       <descriptions-item label="手机号:"> 2021-07-09</descriptions-item>
-    </descriptions>
-
-     <descriptions :column="3" class="marginBtm22">
-      <descriptions-item label="乐队指导:">
-      </descriptions-item>
+      <descriptions-item label="乐队指导:"> </descriptions-item>
       <descriptions-item label="乐团主管:"> 2021-07-09</descriptions-item>
     </descriptions>
   </div>
@@ -34,7 +29,7 @@
 <script>
 export default {};
 </script>
-<style lang="scss">
+<style lang="scss" scoped="scoped">
 .marginBtm22 {
   margin-bottom: 22px;
 }

+ 92 - 0
src/views/resetTeaming/components/archicesComponents/modals/addPlan.vue

@@ -0,0 +1,92 @@
+<template>
+  <div>
+    <el-form  :inline="true" :model.sync="form">
+      <el-form-item prop="year" label="年份">
+        <el-date-picker
+          v-model="form.year"
+          type="year"
+          value-format="yyyy"
+          placeholder="选择年"
+          :clearable="false"
+          :disabled="true"
+           style="width: 180px!important"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item prop="term" label="学期">
+        <el-select
+          :disabled="true"
+          class="multiple"
+          filterable
+          style="width: 180px !important"
+          v-model.trim="form.term"
+          placeholder="请选择学期"
+
+        >
+          <el-option value="0" label="上学期"></el-option>
+          <el-option value="1" label="下学期"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="classGroupId" label="班级">
+        <el-select
+          :disabled="true"
+          v-model.trim="form.classGroupId"
+          filterable
+          placeholder="请选择班级"
+           style="width: 180px!important"
+        >
+          <el-option
+            v-for="(item, index) in classList1"
+            :key="index"
+            :value="item.id"
+            :label="item.name"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        label="课程类型"
+        prop="courseType"
+        :rules="[
+          { required: true, message: '请选择课程类型', trigger: 'blur' },
+        ]"
+      >
+        <el-select
+          :disabled="
+           true
+          "
+           style="width: 180px!important"
+          class="multiple"
+          v-model.trim="form.courseType"
+          filterable
+          placeholder="课程类型"
+        >
+          <el-option
+            v-for="(item, index) in courseTypeList1"
+            :key="index"
+            :label="item.label"
+            :value="item.value"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+<script>
+
+export default {
+  props:['form','classList','courseTypeList'],
+  data() {
+    return {};
+  },
+  computed:{
+    classList1(){
+      return this.classList
+    },
+    courseTypeList1(){
+      return this.courseTypeList
+    }
+  }
+};
+</script>
+<style lang="scss" scoped="scoped">
+</style>

+ 60 - 1
src/views/resetTeaming/components/archicesComponents/studentAndTeacher.vue

@@ -1,5 +1,64 @@
 <template>
   <div>
-    学员&师资
+    <el-alert
+      title="学员分布"
+      :closable="false"
+      class="alert marginBtm22"
+      type="info"
+    >
+          <template slot="title">
+        <div>
+            师资安排
+          <span style="color:red;font-weight:bold;">该乐团当前有 8 名学员在毕业年级</span>
+        </div>
+      </template>
+
+    </el-alert>
+    <p class="title">声部分布</p>
+    <el-divider class="divider"></el-divider>
+    <descriptions :column="6" class="marginBtm22">
+      <descriptions-item label="长笛:"> </descriptions-item>
+      <descriptions-item label="沙克斯"> 2021-07-09</descriptions-item>
+    </descriptions>
+
+    <p class="title">年级分布</p>
+    <el-divider class="divider"></el-divider>
+    <descriptions class="marginBtm22">
+      <descriptions-item label="长笛:"> </descriptions-item>
+      <descriptions-item label="沙克斯"> 2021-07-09</descriptions-item>
+      <descriptions-item label="沙克斯"> 2021-07-09</descriptions-item>
+    </descriptions>
+
+    <el-alert  :closable="false" class="alert" type="info" >
+      <template slot="title">
+        <div>
+            师资安排
+               <el-tooltip placement="top" popper-class="mTooltip">
+          <div slot="content">师资安排中第一位为主教老师</div>
+          <i
+            class="el-icon-question micon el-tooltip"
+            style="font-size: 18px; color: #f56c6c"
+            v-permission="'export/teacherSalary'"
+          ></i>
+        </el-tooltip>
+        </div>
+      </template>
+    </el-alert>
+    <descriptions class="marginBtm22">
+      <descriptions-item label="长笛:"> </descriptions-item>
+      <descriptions-item label="沙克斯"> 2021-07-09</descriptions-item>
+      <descriptions-item label="沙克斯"> 2021-07-09</descriptions-item>
+    </descriptions>
   </div>
 </template>
+<style lang="scss" scoped="scoped">
+.title {
+  padding: 8px 16px;
+}
+.divider {
+  margin-top: 0 !important;
+}
+.marginBtm22 {
+  margin-bottom: 22px;
+}
+</style>

+ 359 - 1
src/views/resetTeaming/components/archicesComponents/trainPlan.vue

@@ -1,5 +1,363 @@
 <template>
   <div>
-    训练规划
+    <el-alert
+      title="训练规划"
+      :closable="false"
+      class="alert marginBtm22"
+      type="info"
+    >
+      <template slot="title">
+        <div class="alerTitle">
+          <p>
+            师资安排
+            <span style="color: red; font-weight: bold"
+              >该乐团声部课剩余 2 课时、合奏课 4 课时未进行教学规划</span
+            >
+          </p>
+          <el-button type="text" @click="addPlan">+新增训练规划</el-button>
+        </div>
+      </template>
+    </el-alert>
+    <save-form
+      :inline="true"
+      class="searchForm"
+      save-key="teamTrainPlan"
+      ref="searchForm"
+      @submit="search"
+      @reset="onReSet"
+      :model.sync="searchForm"
+    >
+      <el-form-item prop="year" label="年份">
+        <el-date-picker
+           style="width: 180px!important"
+          v-model="searchForm.year"
+          type="year"
+          value-format="yyyy"
+          placeholder="选择年"
+          :clearable="false"
+          @change="changeYear"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item prop="term" label="学期">
+        <el-select
+          :disabled="!searchForm.year"
+          class="multiple"
+          filterable
+          style="width: 180px !important"
+          v-model.trim="searchForm.term"
+          placeholder="请选择学期"
+          @change="changeTerm"
+        >
+          <el-option value="0" label="上学期"></el-option>
+          <el-option value="1" label="下学期"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="classGroupId" label="班级">
+        <el-select
+          :disabled="!searchForm.term || !searchForm.year"
+          v-model.trim="searchForm.classGroupId"
+          filterable
+          placeholder="请选择班级"
+        >
+          <el-option
+            v-for="(item, index) in classList"
+            :key="index"
+            :value="item.id"
+            :label="item.name"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        label="课程类型"
+        prop="courseType"
+        :rules="[
+          { required: true, message: '请选择课程类型', trigger: 'blur' },
+        ]"
+      >
+        <el-select
+          :disabled="
+            !searchForm.term || !searchForm.year || !searchForm.classGroupId
+          "
+           style="width: 180px !important"
+          class="multiple"
+          v-model.trim="searchForm.courseType"
+          filterable
+          placeholder="课程类型"
+        >
+          <el-option
+            v-for="(item, index) in courseTypeList"
+            :key="index"
+            :label="item.label"
+            :value="item.value"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+
+    </save-form>
+    <div class="timerWrap">
+      <div class="timerList">
+        <el-timeline>
+          <!--   timestamp="2018/4/12"  :timestamp="item.timestamp" -->
+          <!-- {timer:time,index:`第${index+1}次训练`,courseType:filterCourseType[val],timestamp:timestamp} -->
+          <el-timeline-item v-for="item in planList"
+            :key="item.timestamp"
+            placement="top"
+            :hide-timestamp="true"
+          >
+            {{item.index}}
+            <div class="timeline">
+              <h4 class="time">{{item.timer}}</h4>
+              <p class="cuorseType">{{item.courseType}}</p>
+              <p class="concat">{{item.plan}}</p>
+              <el-button class="button" :disabled='!item.plan' type="text">修改</el-button>
+            </div>
+          </el-timeline-item>
+        </el-timeline>
+      </div>
+    </div>
+          <el-dialog :title="planTitle" :visible.sync="planVisible" width="1100px" v-if="planVisible">
+            <addplan :form="{...searchForm}" :courseTypeList='courseTypeList' :classList="classList"/>
+        </el-dialog>
   </div>
 </template>
+<script>
+import { getMusicGroupAllClass } from "@/api/buildTeam";
+import { getCourseType, getPlanCourseNum,getMusicGroupTrainPlan } from "./api";
+import { filterCourseType } from "@/constant/index";
+import addplan from './modals/addPlan'
+export default {
+  components:{addplan},
+  data() {
+    return {
+      searchForm: {
+        year: "",
+        classGroupId: "",
+        term: "",
+        courseScheduleType: "",
+        musicGroupId: "",
+        courseType: "",
+      },
+      classList: [],
+      courseTypeList: [],
+      planList:[],
+      planTitle:'',
+      planVisible:false
+    };
+  },
+  created() {
+    let date = new Date();
+    this.searchForm.year = String(date.getFullYear());
+    // console.log('year',date.getFullYear())
+    let month = date.getMonth() + 1;
+    if (month > 3 && month < 8) {
+      this.searchForm.term = "0";
+    } else {
+      this.searchForm.term = "1";
+    }
+  },
+  mounted() {
+    this.teamid = this.$route.query.id;
+    this.getMusicClass();
+  },
+  methods: {
+    search() {},
+    onReSet() {},
+    getMusicClass() {
+      getMusicGroupAllClass({ musicGroupId: this.teamid }).then((res) => {
+        if (res.code == 200) {
+          this.classList = res.data;
+          if (this.classList.length < 1) {
+            this.$message.error("当前乐团暂无班级");
+            return;
+          }
+          this.searchForm.classGroupId = this.classList[0].id;
+        }
+      });
+    },
+    async getCourseList(obj) {
+      try {
+        this.searchForm.courseType = "";
+        const res = await getCourseType(obj);
+        if (!res.data || res.data.length <= 0) {
+          this.$message.error("当前学期暂无课程类型");
+        } else {
+          this.courseTypeList = [];
+          res.data.forEach((course) => {
+            if (filterCourseType[course]) {
+              this.courseTypeList.push({
+                label: filterCourseType[course],
+                value: course,
+              });
+            }
+          });
+          this.searchForm.courseType = this.courseTypeList[0].value;
+        }
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    changeYear(val) {
+      if (val) {
+        if (this.searchForm.classGroupId && this.searchForm.term) {
+          let obj = {
+            classGroupId: this.searchForm.classGroupId,
+            musicGroupId: this.teamid,
+            term: this.searchForm.term,
+            year: val,
+          };
+          this.getCourseList(obj);
+        }
+      } else {
+        this.searchForm.courseType = "";
+      }
+    },
+    changeTerm(val) {
+      if (val) {
+        if (this.searchForm.classGroupId && this.searchForm.year) {
+          let obj = {
+            classGroupId: this.searchForm.classGroupId,
+            musicGroupId: this.teamid,
+            term: val,
+            year: this.searchForm.year,
+          };
+          this.getCourseList(obj);
+        }
+      } else {
+        this.searchForm.courseType = "";
+      }
+    },
+    addPlan(){
+      this.planTitle = '新增训练规划'
+      this.planVisible = true
+    }
+  },
+  watch: {
+    "searchForm.classGroupId"(val) {
+      if (val) {
+        if (this.searchForm.year && this.searchForm.term) {
+          let obj = {
+            classGroupId: val,
+            musicGroupId: this.teamid,
+            term: this.searchForm.term,
+            year: this.searchForm.year,
+          };
+          this.getCourseList(obj);
+        }
+      } else {
+        this.searchForm.courseType = "";
+      }
+    },
+    "searchForm.courseType": {
+      immediate: true,
+      async handler(val) {
+        if (
+          val &&
+          this.teamid &&
+          this.searchForm.term &&
+          this.searchForm.year &&
+          this.searchForm.classGroupId
+        ) {
+          // 请求列表接口
+
+          try {
+            // const res = await getPlanCourseNum({
+            //   classGroupId: this.searchForm.classGroupId,
+            //   musicGroupId: this.teamid,
+            //   term: this.searchForm.term,
+            //   year: this.searchForm.year,
+            //   courseScheduleType:val
+            // });
+            const res2 = await getMusicGroupTrainPlan({
+              classGroupId: this.searchForm.classGroupId,
+              musicGroupId: this.teamid,
+              term: this.searchForm.term,
+              year: this.searchForm.year,
+              courseScheduleType:val
+            })
+            let dayjs = this.$helpers.dayjs
+              let timestamp;
+            this.planList = res2.data.classDates.map((time,index)=>{
+                  let dayStr = time.substring(0, 19)
+                  timestamp = dayjs(dayStr).valueOf()
+              return {timer:time,index:`第${index+1}次训练`,courseType:filterCourseType[val],timestamp:timestamp}
+            });
+
+          } catch (e) {
+            console.log(e);
+          }
+        }
+      },
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.marginBtm22 {
+  margin-bottom: 22px;
+}
+.timerWrap {
+  position: relative;
+
+  // .topDot {
+  //   width: 30px;
+  //   height: 30px;
+  //   background-color: red;
+  //   position: absolute;
+  //   top: 0;
+  //   left: 50%;
+  //   margin-left: -15px;
+  // }
+  // .bottomDot {
+  //   position: absolute;
+  //   width: 30px;
+  //   height: 30px;
+  //   background-color: blue;
+  //   bottom: 0;
+  //   left: 50%;
+  //   margin-left: -15px;
+  // }
+  .timerList {
+    padding: 30px 16px;
+    overflow: auto;
+    height: 300px;
+    .timeline {
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+      width: 100%;
+      .time {
+        width: 200px;
+      }
+      .cuorseType {
+        width: 120px;
+        text-align: center;
+      }
+      .concat {
+        flex: 1;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .button {
+        width: 100px;
+      }
+    }
+  }
+}
+/deep/.alerTitle {
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  .el-button {
+    padding: 0 20px !important;
+  }
+}
+/deep/.el-alert__content {
+  flex: 1;
+}
+.searchForm {
+  padding: 0 16px;
+}
+</style>

+ 3 - 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 = {
@@ -125,6 +125,7 @@ module.exports = {
   chainWebpack (config) {
     config.plugins.delete('preload') // TODO: need test
     config.plugins.delete('prefetch') // TODO: need test
+    config.resolve.symlinks(true);
 
     // set svg-sprite-loader
     config.module