瀏覽代碼

提交一下 训练时长接一半

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

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

@@ -19,7 +19,7 @@ export const getPlanCourseNum = data => request2({
 
 })
 
-//
+// 获取训练时长
 export const getMusicGroupTrainPlan = data => request2({
   url: '/api-web/musicGroupTrainPlan/queryPlanPage',
   data: data,
@@ -76,3 +76,13 @@ export const getBasicInfo = data => request2({
   requestType:'form'
 
 })
+
+// 查询学员 师资
+export const getStudentAndTeacher = data => request2({
+  url: '/api-web/musicGroupRecord/queryStudentAndTeacher',
+  data ,
+  params:data,
+  method: 'get',
+  requestType:'form'
+
+})

+ 74 - 30
src/views/resetTeaming/components/archicesComponents/studentAndTeacher.vue

@@ -1,56 +1,84 @@
 <template>
   <div>
     <el-alert
-      title="学员分布"
+      title=""
       :closable="false"
       class="alert marginBtm22"
       type="info"
     >
-          <template slot="title">
+      <template slot="title">
         <div>
-            师资安排
-          <span style="color:red;font-weight:bold;">该乐团当前有 8 名学员在毕业年级</span>
+          学员分布
+          <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>
-
+    <div>
+      <el-row class="row">
+        <el-col class="col" :span="6" v-for="(item, index) in subject" :key="index">
+          <span class="col-title">{{ item.key }}:</span>
+          <span class="col-value">{{ item.value }}人</span>
+        </el-col>
+      </el-row>
+    </div>
     <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-row class="row">
+      <el-col class="col" :span="6" v-for="(item, index) in grade" :key="index">
+        <span  class="col-title">{{ item.key }}:</span>
+        <span class="col-value">{{ item.value }}人</span>
+      </el-col>
+    </el-row>
 
-    <el-alert  :closable="false" class="alert" type="info" >
+    <el-alert :closable="false" class="alert marginBtm22" 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>
+          师资安排
+          <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>
+    <el-row class="row">
+      <el-col class="col" :span="6" v-for="(item, index) in teacher" :key="index">
+        <span  class="col-title">{{ item.key }}:</span>
+        <span >{{ item.value }}</span>
+      </el-col>
+    </el-row>
   </div>
 </template>
+<script>
+import { getStudentAndTeacher } from "./api";
+export default {
+  data() {
+    return {
+      grade: [],
+      subject: [],
+      teacher: [],
+    };
+  },
+  async mounted() {
+    try {
+      const res = await getStudentAndTeacher({
+        musicGroupId: this.$route.query.id,
+      });
+      this.grade = res.data.grade;
+      this.subject = res.data.subject;
+      this.teacher = res.data.teacher;
+    } catch (e) {}
+  },
+};
+</script>
 <style lang="scss" scoped="scoped">
 .title {
   padding: 8px 16px;
@@ -61,4 +89,20 @@
 .marginBtm22 {
   margin-bottom: 22px;
 }
+.row {
+  padding: 8px 16px;
+  margin-bottom: 30px;
+  .col {
+    margin-bottom: 20px;
+    .col-title {
+      display: inline-block;
+      width: 120px;
+      text-align: right;
+    }
+   .col-value{
+     color: #14928a;
+     cursor: pointer;
+   }
+  }
+}
 </style>

+ 94 - 1
src/views/resetTeaming/components/archicesComponents/trainTimer.vue

@@ -1,5 +1,98 @@
 <template>
   <div>
-    训练时长
+    <el-alert title="" :closable="false" class="alert marginBtm22" 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>
+    <!-- 周期选择 -->
+    <save-form
+      :inline="true"
+      class="searchForm"
+      save-key="teamTrainTimer"
+      ref="searchForm"
+      :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>
+    </save-form>
   </div>
 </template>
+<script>
+import {getPlanCourseNum} from './api'
+export default {
+  data() {
+    return {
+      searchForm: {
+        year: "",
+        term: "",
+      },
+    };
+  },
+  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.getList()
+  },
+  methods: {
+    changeYear(val) {},
+    changeTerm(val) {},
+  async getList(){
+    try{
+      const res = await  getPlanCourseNum({musicGroupId:this.$route.query.id,year:this.searchForm.year,term:this.searchForm.term})
+    }catch(e){
+
+    }
+
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.marginBtm22 {
+  margin-bottom: 22px;
+}
+</style>

+ 9 - 9
src/views/resetTeaming/components/musicArchices.vue

@@ -7,7 +7,7 @@
         v-if="permission('/teamBaseInfo')"
         name="1"
       >
-        <baseInfo />
+        <baseInfo v-if="activeIndex==1"/>
       </el-tab-pane>
       <el-tab-pane
         label="学员&师资"
@@ -15,7 +15,7 @@
         v-if="permission('/teamBaseInfo')"
         name="2"
       >
-      <studentAndTeacher />
+      <studentAndTeacher v-if="activeIndex==2"/>
       </el-tab-pane>
       <el-tab-pane
         label="训练规划"
@@ -23,7 +23,7 @@
         v-if="permission('/teamBaseInfo')"
         name="3"
       >
-      <trainPlan />
+      <trainPlan v-if="activeIndex==3"/>
       </el-tab-pane>
       <el-tab-pane
         label="训练时长"
@@ -31,7 +31,7 @@
         v-if="permission('/teamBaseInfo')"
         name="4"
       >
-      <trainTimer />
+      <trainTimer  v-if="activeIndex==4"/>
       </el-tab-pane>
       <el-tab-pane
         label="作业情况"
@@ -39,7 +39,7 @@
         v-if="permission('/teamBaseInfo')"
         name="5"
       >
-      <workStatus />
+      <workStatus  v-if="activeIndex==5"/>
       </el-tab-pane>
       <el-tab-pane
         label="训练照片"
@@ -47,7 +47,7 @@
         v-if="permission('/teamBaseInfo')"
         name="6"
       >
-        <training-photos/>
+        <training-photos  v-if="activeIndex==6"/>
       </el-tab-pane>
       <el-tab-pane
         label="获奖证书"
@@ -55,7 +55,7 @@
         v-if="permission('/teamBaseInfo')"
         name="9"
       >
-        <photo-detail type="SHOW"/>
+        <photo-detail type="SHOW"  v-if="activeIndex==9"/>
       </el-tab-pane>
       <el-tab-pane
         label="乐团资讯"
@@ -63,7 +63,7 @@
         v-if="permission('/teamBaseInfo')"
         name="7"
       >
-      <teamInfo />
+      <teamInfo v-if="activeIndex==7"/>
       </el-tab-pane>
             <el-tab-pane
         label="满意度调查"
@@ -71,7 +71,7 @@
         v-if="permission('/teamBaseInfo')"
         name="8"
       >
-      <survey/>
+      <survey v-if="activeIndex==8"/>
       </el-tab-pane>
     </tab-router>
   </div>