Prechádzať zdrojové kódy

Merge branch 'Nov16thResetMusic' into online

mo 4 rokov pred
rodič
commit
d6f96e2952

+ 8 - 0
src/api/buildTeam.js

@@ -1369,3 +1369,11 @@ export function getSubjectGoodsAndInfoPreview (data) {
     params: data
   })
 }
+// 获取调整详情
+export function queryCourseAdjustDetail (data) {
+  return request({
+    url: api + '/courseSchedule/queryCourseAdjustDetail',
+    method: 'post',
+    data: qs.stringify(data)
+  })
+}

+ 31 - 3
src/views/categroyManager/insideSetting/adminOperation.vue

@@ -16,10 +16,20 @@
           <el-input type="textarea"
                     v-model.trim="result.roleDesc"></el-input>
         </el-form-item>
+        <el-form-item label="搜索">
+          <el-input style="width:212px"
+                    v-model.trim="seachRoleValue"></el-input>
+          <el-button style="margin-left: 10px"
+                     type="danger"
+                     @click="seachRoles">搜索</el-button>
+          <el-button type="primary"
+                     @click="onReSetRole">重置</el-button>
+        </el-form-item>
         <el-form-item label="基本权限">
           <el-checkbox :indeterminate="isIndeterminate"
                        @change="onCheckAll"
                        v-model.trim="checkAll">全选</el-checkbox>
+
           <el-tree :data="data"
                    show-checkbox
                    node-key="id"
@@ -71,8 +81,10 @@ export default {
       },
       checkAll: false,
       splice: [],
+      silderList: [],
       allChildIds: [], // 所有子编号
-      slideCount: 0
+      slideCount: 0,
+      seachRoleValue: '' //权限搜索字段
     }
   },
   mounted () {
@@ -130,16 +142,17 @@ export default {
       let silderList = await getSilder({ hid: 0 })
       let tempData = []
       if (silderList.code == 200) {
+        this.silderList = silderList.data
         tempData = this.setTableData(silderList.data)
 
         this.data = tempData
+        console.log(this.data)
       }
       // console.log(this.pageType)
       if (this.pageType == 'update') {
         let roleInfo = await getRoleInfo({ id: this.id })
         if (roleInfo.code == 200) {
           let roleData = roleInfo.data
-          console.log(roleData)
           // 是否是全部选中
           this.checkAll = roleData.menuIds.length >= this.slideCount
           // 是否是半选
@@ -229,6 +242,21 @@ export default {
           page: this.$route.query.page
         }
       })
+    },
+    filterRole(list) {
+      return list.filter(item => {
+        if (item.children) {
+          item.children = this.filterRole(item.children)
+        }
+        return item.label.indexOf(this.seachRoleValue) > -1
+      })
+    },
+    seachRoles () {
+      this.data = this.filterRole(this.data)
+    },
+    onReSetRole () {
+      this.seachRoleValue = ''
+      this.data = this.setTableData(this.silderList)
     }
   }
 }
@@ -263,4 +291,4 @@ export default {
 /deep/.el-tree-node__content {
   height: 40px !important;
 }
-</style>
+</style>

+ 133 - 0
src/views/teamDetail/componentCourse/addCompound.vue

@@ -0,0 +1,133 @@
+<template>
+  <div class="fixedBox">
+    <el-card>
+      <div class="boxWrap">
+        <p>临时合课列表<span style="color:red;"> {{compoundList.length}} </span></p>
+        <el-popover placement="top"
+                    trigger="click">
+          <el-button type="text"
+                     style="float:right"
+                     @click="clearCom">清空课表</el-button>
+          <div>
+            <el-radio-group v-model="radio">
+              <el-table :data="dataList"
+                        height='300px'
+                        :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+                <el-table-column align='center'
+                                 label="主课">
+                  <template slot-scope="scope">
+
+                    <el-radio :label="scope.row.id"></el-radio>
+
+                  </template>
+                </el-table-column>
+                <el-table-column align='center'
+                                 width="180px"
+                                 label="课程名称"
+                                 prop="name"></el-table-column>
+                <el-table-column align="center"
+                                 label="课程类型">
+                  <template slot-scope="scope">
+                    <div>{{ scope.row.type | coursesType}}</div>
+                  </template>
+                </el-table-column>
+                <el-table-column align="center"
+                                 width="180px"
+                                 prop="teacherName"
+                                 label="指导老师">
+                  <template slot-scope="scope">
+                    <div>
+                      {{scope.row.teacherName}}({{scope.row.actualTeacherId}})
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column align="center"
+                                 width="200px"
+                                 label="上课时间">
+                  <template slot-scope="scope">{{ scope.row.startClassTime ? scope.row.startClassTime.substr(0, 16) : '' }}-{{ scope.row.endClassTime ? scope.row.endClassTime.substr(11,5) : ''}}</template>
+                </el-table-column>
+                <el-table-column align="center"
+                                 label="操作">
+                  <template slot-scope="scope">
+                    <el-button type="text"
+                               @click="cancleCom(scope.row)">取消</el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-radio-group>
+          </div>
+          <el-button type="primary"
+                     size="mini"
+                     style="float:right;margin-top:20px;"
+                     @click="submitClass">确定</el-button>
+          <i class="el-icon-copy-document"
+             slot="reference"></i>
+        </el-popover>
+
+      </div>
+    </el-card>
+  </div>
+  </div>
+</template>
+<script>
+export default {
+  props: ['compoundList'],
+  data () {
+    return {
+      radio: '',
+      dataList: this.compoundList
+    }
+  },
+  methods: {
+    cancleCom (row) {
+      console.log('来了')
+      this.$emit('cancleCompound', row)
+    },
+    clearCom () {
+      this.$emit('clearCom')
+    },
+    submitClass () {
+      if (!this.radio) {
+        this.$message.error('请选择一节主课')
+        return
+      }
+      let arr = []
+      this.dataList.forEach(com => {
+        arr.push(com.type)
+      })
+      arr = [... new Set(arr)]
+      if (arr.length != 1) {
+        this.$message.error('请选择相同的课程类型')
+        return
+      }
+    }
+  },
+  watch: {
+    compoundList (val) {
+      console.log(val)
+      this.dataList = val
+
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.fixedBox {
+  position: fixed;
+  bottom: 20px;
+  right: 10px;
+  z-index: 100;
+  width: 200px;
+  background-color: #fff;
+  font-size: 14px;
+  .boxWrap {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    i {
+      font-size: 18px;
+      cursor: pointer;
+    }
+  }
+}
+</style>

+ 94 - 0
src/views/teamDetail/componentCourse/infoMsg.vue

@@ -0,0 +1,94 @@
+<template>
+  <div>
+    <el-collapse v-model="activeName"
+                 v-if="dataList.length > 0"
+                 accordion>
+      <el-collapse-item v-for="
+                 (item,index)
+                 in
+                 dataList"
+                        :key="index"
+                        :title="getTitle(item)"
+                        :name="index">
+        <el-form :inline='true'>
+          <el-form-item label="课程名称"
+                        style="width:300px">
+            <div>{{item.name}}</div>
+          </el-form-item>
+          <el-form-item label="主教老师"
+                        style="width:300px">
+            <div>{{item.actualTeacherName}}</div>
+          </el-form-item>
+          <br>
+          <el-form-item label="助教老师"
+                        style="width:300px">
+            <div>{{item.teacherName}}</div>
+          </el-form-item>
+          <el-form-item label="上课时间"
+                        style="width:300px">
+            <div>{{ item.startClassTime ? item.startClassTime.substr(0, 16) : '' }}-{{ item.endClassTime ? item.endClassTime.substr(11,5) : ''}}</div>
+          </el-form-item>
+          <br>
+          <el-form-item label="课程时长"
+                        style="width:300px">
+            <div>{{getTimers(item)}}分钟</div>
+          </el-form-item>
+          <el-form-item label="课程类型"
+                        style="width:300px">
+            <div>{{item.teachMode| teachMode}}</div>
+          </el-form-item>
+        </el-form>
+      </el-collapse-item>
+    </el-collapse>
+    <div v-if="dataList.length <= 0"
+         class="noBox">
+      <p>暂无调整记录</p>
+    </div>
+  </div>
+</template>
+<script>
+import { diffTimerFormMinute, addTimerFormMinute } from '@/utils/date'
+import dayjs from 'dayjs';
+import {
+  queryCourseAdjustDetail,
+} from "@/api/buildTeam";
+export default {
+  props: ['courseScheduleId'],
+  data () {
+    return {
+      activeName: '',
+      dataList: []
+    }
+  },
+  mounted () {
+    queryCourseAdjustDetail({ courseScheduleId: this.courseScheduleId }).then(res => {
+      if (res.code == 200) {
+        if (res.data) {
+          this.dataList = res.data
+        }
+      }
+    })
+    console.log(this.courseScheduleId)
+  },
+  methods: {
+    getTitle (item) {
+      return item.operatorName + '在' + item.auditTime + '修改了'
+    },
+    getTimers (item) {
+      return diffTimerFormMinute(dayjs(item.classDate).format('YYYY-MM-DD'), dayjs(item.startClassTime).format('HH:mm'), dayjs(item.endClassTime).format('HH:mm'))
+    }
+  },
+  computed: {
+
+  }
+}
+</script>
+<style lang="scss" scoped>
+.noBox {
+  min-height: 200px;
+  p {
+    text-align: center;
+    margin-top: 120px;
+  }
+}
+</style>

+ 0 - 1
src/views/teamDetail/componentCourse/resetClass.vue

@@ -195,7 +195,6 @@ export default {
     changeStartTime (val) {
 
       this.$nextTick(res => {
-        console.log(this.maskForm.date, val, this.maskForm.timer)
         console.log(addTimerFormMinute(this.maskForm.date, val, this.maskForm.timer))
         if (val) {
           this.$set(this.maskForm, 'endTime', addTimerFormMinute(this.maskForm.date, val, this.maskForm.timer))

+ 1 - 1
src/views/teamDetail/components/resetClass.vue

@@ -51,7 +51,7 @@
           </el-table-column>
           <el-table-column align="center"
                            prop="studentNum"
-                           label="班级人数">
+                           label="班级人数(实际/预计)">
             <template slot-scope="scope">
               <div>{{scope.row.studentNum+'/'+scope.row.expectStudentNum}}</div>
             </template>

+ 63 - 17
src/views/teamDetail/teamCourseList.vue

@@ -206,19 +206,6 @@
               <div>{{ scope.row.status | coursesStatus }}</div>
             </template>
           </el-table-column>
-          <!-- <el-table-column align="center"
-                           label="是否签到">
-            <template slot-scope="scope">
-              <div>{{ scope.row.isSignIn | attendanceType}}</div>
-            </template>
-          </el-table-column> -->
-          <!-- <el-table-column align="center"
-                           label="是否签退"
-                           fixed="right">
-            <template slot-scope="scope">
-              <div>{{ scope.row.isSignOut | attendanceOutType}}</div>
-            </template>
-          </el-table-column> -->
           <el-table-column align="center"
                            prop="isCallNames"
                            label="是否点名"
@@ -249,6 +236,13 @@
                            v-if="permission('courseSchedule/classStartDateAdjust?hight')"
                            @click="resetClass(scope.row)">调整</el-button>
                 <el-button type="text"
+                           @click="addCompound(scope.row)"
+                           v-if="(scope.row.groupType=='MUSIC'&&scope.row.type!='MUSIC_NETWORK'&&scope.row.type!='HIGH_ONLINE'&&scope.row.status=='NOT_START'&&!isAddCom(scope.row))">添加合班</el-button>
+                <el-button type="
+                           text"
+                           v-if="isAddCom(scope.row)"
+                           @click="cancleCompound(scope.row)">取消合班</el-button>
+                <el-button type="text"
                            v-if="
                            scope.row.status=='OVER'
                            &&
@@ -320,7 +314,17 @@
         <el-form-item label="上课时长">
 
           <div class="inputStyle"
-               :class=" (maskForm.attendClassTime <= 120)?'':'red'">{{ maskForm.attendClassTime>=0?maskForm.attendClassTime:0+'分钟'}}</div>
+               :class=" (maskForm.attendClassTime <= 120)?'':'red'">{{ (maskForm.attendClassTime>=0?maskForm.attendClassTime:0)}}分钟 <el-tooltip placement="top"
+                        popper-class="mTooltip">
+              <div slot="content">
+                学员和老师同时在教室里的时长。
+              </div>
+              <!-- <img :src="imageIcon" class="micon el-tooltip" style="width:8px height:8px" alt /> -->
+              <i class="el-icon-question micon el-tooltip"
+                 style="font-size: 18px; color: #F56C6C"
+                 v-permission="'export/teacherSalary'"></i>
+            </el-tooltip>
+          </div>
         </el-form-item>
 
       </el-form>
@@ -363,6 +367,14 @@
             <courseEvaluate :courseScheduleId="maskForm.id"></courseEvaluate>
           </div>
         </el-tab-pane>
+        <el-tab-pane label="调整记录"
+                     v-if="permission('courseSchedule/queryCourseAdjustDetail')"
+                     name="five">
+          <div v-if="activeName == 'five'">
+            <infoMsg :courseScheduleId="maskForm.id"></infoMsg>
+          </div>
+        </el-tab-pane>
+        <!-- infoMsg -->
       </el-tabs>
     </el-dialog>
     <el-dialog :visible.sync="show"
@@ -372,6 +384,9 @@
                   @getList='getList'
                   :id='id' />
     </el-dialog>
+    <addCompound :compoundList='compoundList'
+                 @clearCom='clearCom'
+                 @cancleCompound='cancleCompound' />
   </div>
 </template>
 <script>
@@ -396,6 +411,8 @@ import { getToken } from "@/utils/auth";
 import load from "@/utils/loading";
 import resetClass from './componentCourse/resetClass'
 import teacherList from './componentCourse/teacherList'
+import addCompound from './componentCourse/addCompound'
+import infoMsg from './componentCourse/infoMsg'
 let nowTime = new Date();
 nowTime =
   nowTime.getFullYear() +
@@ -439,8 +456,8 @@ export default {
       maskForm: {},
       activeName: "first",
       id: null,
-      show: false
-      // classList: []
+      show: false,
+      compoundList: []
     };
   },
   components: {
@@ -450,7 +467,9 @@ export default {
     studentWork,
     courseEvaluate,
     resetClass,
-    teacherList
+    teacherList,
+    addCompound,
+    infoMsg
   },
   activated () {
     this.init();
@@ -669,6 +688,33 @@ export default {
         })
         .catch(() => { });
     },
+    addCompound (row) {
+      this.compoundList.push(row)
+      this.compoundList = [...new Set(this.compoundList)]
+    },
+    isAddCom (row) {
+      let flag = false
+      this.compoundList.forEach(com => {
+        if (com.id == row.id) {
+          flag = true
+        }
+      })
+      return flag
+    },
+    cancleCompound (row) {
+      let indexNum = null
+      this.compoundList.forEach((com, index) => {
+        if (com.id == row.id) {
+          indexNum = index
+        }
+      })
+      if (indexNum + '') {
+        this.compoundList.splice(indexNum, 1)
+      }
+    },
+    clearCom () {
+      this.compoundList = []
+    }
 
   },
   filters: {