Bläddra i källkod

06/04 13:54

11
mo 5 år sedan
förälder
incheckning
24a6488799

+ 10 - 0
src/api/teacherManager.js

@@ -249,4 +249,14 @@ export function findTeacherCourseGroupsWithWeb (data) {
     method: 'get',
     params: data
   })
+}
+
+
+// 老师乐团课调账
+export function classGroupTeacherAdjust (data) {
+  return request({
+    url: api + '/courseSchedule/classGroupTeacherAdjust',
+    method: 'post',
+    data: qs.stringify(data)
+  })
 }

+ 72 - 8
src/views/teacherManager/teacherDetail/components/courseInfo.vue

@@ -2,7 +2,7 @@
   <div class='courseInfo'>
     <el-form :model="searchList"
              :inline='true'>
-      <el-form-item label="课程状态">
+      <el-form-item label="乐团状态">
         <el-select v-model.trim="searchList.status"
                    clearable>
           <el-option v-for="(item,index) in musicGroupStatus"
@@ -16,40 +16,63 @@
         <el-button type="danger"
                    @click='search'>搜索</el-button>
       </el-form-item>
+      <!-- <el-form-item>
+        <div class="newBand">课程交移</div>
+      </el-form-item> -->
     </el-form>
     <div class="tableWrap">
       <el-table :data='tableList'
+                @selection-change="handleSelectionChange"
                 :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+        <!-- <el-table-column type="selection"
+                         width="55">
+        </el-table-column> -->
         <el-table-column label="乐团编号"
+                         align="center"
                          prop="musicGroupId">
         </el-table-column>
         <el-table-column label="乐团名称"
+                         align="center"
                          prop="musicGroupName">
         </el-table-column>
         <el-table-column label="老师类型"
+                         align="center"
                          prop="jobType">
           <template slot-scope="scope">
             {{ scope.row.jobNature | jobNature }}
           </template>
         </el-table-column>
-        <el-table-column label="乐团职位">
+        <el-table-column label="乐团职位"
+                         align="center">
           <template slot-scope="scope">
             {{ scope.row.teacherRole | workType }}
           </template>
         </el-table-column>
-        <el-table-column label="执教班级">
+        <el-table-column label="执教班级"
+                         align="center">
           <template slot-scope="scope">
             {{ scope.row.classGroupNames | joinArray }}
           </template>
         </el-table-column>
-        <el-table-column label="乐团状态">
+        <el-table-column label="乐团状态"
+                         align="center">
           <template slot-scope="scope">
             {{ scope.row.status | musicGroupType }}
           </template>
         </el-table-column>
         <el-table-column label="出勤次数"
+                         align="center"
                          prop="attendanceNum">
         </el-table-column>
+        <el-table-column label="操作"
+                         align="center">
+          <template slot-scope="scope">
+            <div>
+              <el-button type="text"
+                         @click="resetCourse(scope.row)">操作</el-button>
+            </div>
+          </template>
+        </el-table-column>
       </el-table>
       <pagination :total="pageInfo.total"
                   :page.sync="pageInfo.page"
@@ -57,10 +80,33 @@
                   :page-sizes="pageInfo.page_size"
                   @pagination="getList" />
     </div>
+    <el-dialog title='课程移交'
+               :visible.sync="maskVisible"
+               width="600">
+      <el-form :model="maskForm">
+        <el-form-item label="选择老师">
+          <el-select v-model="maskForm.targetTeacherId"
+                     clearable
+                     filterable>
+            <el-option v-for="(item,index) in teacherList"
+                       :label="item.realName"
+                       :value="item.id"
+                       :key="index"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer"
+           class="dialog-footer">
+        <el-button @click="maskVisible = false">取 消</el-button>
+        <el-button type="primary"
+                   @click="submitReset">确定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
-import { getTeacherMusicClass } from '@/api/teacherManager'
+import { getTeacherMusicClass, classGroupTeacherAdjust } from '@/api/teacherManager'
+import { getTeacher } from "@/api/buildTeam";
 import { musicGroupStatus } from '@/utils/searchArray'
 import pagination from '@/components/Pagination/index'
 import store from '@/store'
@@ -78,13 +124,19 @@ export default {
         status: ''
       },
       musicGroupStatus,
+      teacherList: [],
       pageInfo: {
         // 分页规则
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 1, // 总条数
         page_size: [10, 20, 40, 50] // 选择限制显示条数
-      }
+      },
+      activeRow: null,
+      maskVisible: false,
+      maskForm: {
+        targetTeacherId: null
+      },
     }
   },
   activated () {
@@ -94,9 +146,16 @@ export default {
   },
   mounted () {
     this.getList()
-    this.musicGroupStatus = musicGroupStatus
+    this.musicGroupStatus = musicGroupStatus;
+    // 获取指导老师
+    getTeacher({}).then(res => {
+      if (res.code == 200) {
+        this.teacherList = res.data;
+      }
+    });
   },
   methods: {
+    handleSelectionChange (val) { },
     search () {
       this.pageInfo.page = 1;
       this.getList();
@@ -113,7 +172,12 @@ export default {
           this.pageInfo.total = res.data.total
         }
       })
-    }
+    },
+    resetCourse (row) {
+      this.activeRow = row;
+      this.maskVisible = true
+    },
+    submitReset () { }
   }
 }
 </script>

+ 2 - 2
vue.config.js

@@ -19,9 +19,9 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'https://online.dayaedu.com' //线上
 // let target = 'http://testadm.dayaedu.com/' //test环境
 // let target = 'http://192.168.3.27:8000' // 箭河
-// let target = 'http://192.168.3.28:8000' //邹璇
+let target = 'http://192.168.3.28:8000' //邹璇
 // let target = 'http://192.168.3.8:8000' //勇哥
-let target = 'http://admin.dayaedu.com' // 测试服
+// let target = 'http://admin.dayaedu.com' // 测试服
 // let target = 'http://192.168.3.48:8080' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {