Pārlūkot izejas kodu

Merge branch 'ol_12_30' into online

wolyshaw 4 gadi atpakaļ
vecāks
revīzija
11f88aa06a

+ 1 - 0
debug.log

@@ -8,3 +8,4 @@
 [1223/094343.219:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
 [1224/093236.399:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
 [1225/094724.194:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
+[1230/094024.562:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)

+ 26 - 5
src/views/setSilder/addSilder.vue

@@ -1,10 +1,16 @@
 <template>
   <div class="slider-container">
-    <el-button @click='onOperation("create")'
-               style="position: fixed; z-index: 100;">添加按钮</el-button>
+    <div style="position: fixed; z-index: 100; top: 100px;left: 185px;right: 30px">
+      <el-input placeholder="请输入关键词" v-model="keyword" clearable>
+        <el-button
+          @click='onOperation("create")'
+          slot="append"
+        >添加按钮</el-button>
+      </el-input>
+    </div>
 
-    <el-table :data="tableList"
-              style="width: 100%;margin-bottom: 20px;"
+    <el-table :data="tableListFilter"
+              style="width: 100%;margin-bottom: 20px;margin-top: 40px;"
               row-key="id"
               border
               :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
@@ -158,10 +164,13 @@
 </template>
 <script>
 import { addSilder, getSilder, deleteSilder, resetSilder } from '@/api/silder'
+import { debounce } from 'lodash'
 export default {
   name: 'addSilder',
   data () {
     return {
+      keyword: '',
+      tableListFilter: [],
       tableList: [], // 数据列表
       cascaderList: [], // 父级元素
       formLabelWidth: '100px',
@@ -210,6 +219,18 @@ export default {
         ]
       }
      */
+    filterList(list, key) {
+      return list.filter(item => {
+        const isVisible = (
+          (item.name || '').indexOf(key) > -1 ||
+          (item.memo || '').indexOf(key) > -1 ||
+          (item.memo || '').indexOf(key) > -1 ||
+          (item.permission || '').indexOf(key) > -1
+        )
+        const child = this.filterList(item.children || [], key)
+        return isVisible || child.length
+      })
+    },
     onOperation (type, row) {
       this.branchStatus = true
       this.operationType = type
@@ -350,4 +371,4 @@ export default {
     margin-top: 20px;
   }
 }
-</style>
+</style>

+ 10 - 1
src/views/stuRecodeManager/index.vue

@@ -233,7 +233,16 @@
               </div>
             </template>
           </el-table-column>
-
+          <el-table-column
+            align="center"
+            label="是否被合并"
+          >
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.courseSchedule.newCourseId > 0 ? '是' : '否' }}
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             prop="startClassTime"

+ 7 - 0
src/views/studentManager/components/studentRecord.vue

@@ -194,6 +194,13 @@
               </div>
             </template>
           </el-table-column>
+          <el-table-column align="center" label="是否被合并">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.courseSchedule.newCourseId > 0 ? '是' : '否' }}
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column align="center" label="签到时间" width="180px">
             <template slot-scope="scope">
               <div>

+ 57 - 41
src/views/studentManager/components/teamAndcourse.vue

@@ -5,7 +5,12 @@
                 :header-cell-style="{background:'#EDEEF0',color:'#444'}">
         <el-table-column align="center"
                          prop="musicGroupId"
-                         label="乐团编号"></el-table-column>
+                         width="180px"
+                         label="乐团编号">
+          <template slot-scope="scope">
+            <copy-text>{{ scope.row.musicGroupId }}</copy-text>
+          </template>
+        </el-table-column>
         <el-table-column align="center"
                          prop="joinMusicGroupDate"
                          label="入团时间">
@@ -13,7 +18,8 @@
         </el-table-column>
         <el-table-column align="center"
                          prop="musicGroupName"
-                         label="乐团名称"></el-table-column>
+                         label="乐团名称">
+        </el-table-column>
         <el-table-column align="center"
                          label="乐团状态">
           <template slot-scope="scope">{{ scope.row.musicGroupStatus | musicGroupType }}</template>
@@ -53,7 +59,7 @@
                          label="操作">
           <template slot-scope="scope">
             <el-button @click="onCourse(scope.row)"
-                       v-permission="'studentManage/findStudentCourses'"
+                       v-permission="'studentAttendance/findStudentAttendance'"
                        type="text">排课详情</el-button>
           </template>
         </el-table-column>
@@ -71,10 +77,10 @@
               class="searchForm"
               v-model.trim="searchForm">
         <el-form-item>
-          <el-select v-model.trim="searchForm.classGroupType"
+          <el-select v-model.trim="searchForm.courseScheduleType"
                     clearable
                     filterable
-                    placeholder="课程类型">
+                    placeholder="请选择课程类型">
             <el-option v-for="(item, index) in courseArray"
                       :key="index"
                       :label="item.label"
@@ -92,7 +98,11 @@
                       :value="item.value"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item>
+        <!-- 换接口做修改 -->
+        <el-form-item prop="teacherId">
+          <remote-search :commit='"setTeachers"' v-model='searchForm.teacherId' />
+        </el-form-item>
+        <!-- <el-form-item>
           <el-input placeholder="班级名称"
                     @keyup.enter.native="search"
                     v-model.trim="searchForm.classGroupName"></el-input>
@@ -101,47 +111,54 @@
           <el-input placeholder="老师姓名"
                     @keyup.enter.native="search"
                     v-model.trim="searchForm.teacherName"></el-input>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item>
-          <div @click="search"
-              class="searchBtn">搜索</div>
+          <el-button type="danger" @click="search">搜索</el-button>
         </el-form-item>
       </el-form>
-      <!-- 查询列表 -->
-      <!-- <div v-if="coursesShow" class="searchWrap">
-        <p>查询条件:</p>
-        <div class="searchItem"
-            @click="closeSearch(item)"
-            v-for="(item,index) in searchLsit" :key="index">
-          {{ item.key }}
-          <i class="el-icon-close"></i>
-        </div>
-      </div>-->
         <div v-if="coursesShow"
             class="tableWrap">
           <el-table :data="coursesInfo"
                     :header-cell-style="{background:'#EDEEF0',color:'#444'}">
             <el-table-column align="center"
-                            prop="classGroupId"
-                            label="编号"></el-table-column>
+                            prop="courseScheduleId"
+                            label="课程编号">
+              <template slot-scope="scope">
+                <copy-text>{{ scope.row.courseScheduleId }}</copy-text>
+              </template>
+            </el-table-column>
             <el-table-column align="center"
-                            prop="courseDate"
-                            label="时间">
-              <template slot-scope="scope">{{ scope.row.courseDate | dateForMinFormat }}</template>
+                            width="180px"
+                            label="上课时间">
+              <template slot-scope="scope">
+                {{ scope.row.courseSchedule.classDate | dayjsFormat }} 
+                {{
+                  scope.row.courseSchedule.startClassTime | dayjsFormatMinute
+                }}-{{
+                  scope.row.courseSchedule.endClassTime | dayjsFormatMinute
+                }}
+              </template>
             </el-table-column>
             <el-table-column align="center"
-                            prop="classGroupName"
-                            label="班级名称"></el-table-column>
+                            prop="courseSchedule.name"
+                            label="课程名称"></el-table-column>
             <el-table-column align="center"
                             label="课程类型">
-              <template slot-scope="scope">{{ scope.row.classGroupType | coursesType }}</template>
+              <template slot-scope="scope">{{ scope.row.courseSchedule.type | coursesType }}</template>
             </el-table-column>
             <el-table-column align="center"
                             label="课程状态">
-              <template slot-scope="scope">{{ scope.row.courseStatus | coursesStatus }}</template>
+              <template slot-scope="scope">{{ scope.row.courseSchedule.status | coursesStatus }}</template>
+            </el-table-column>
+            <el-table-column align="center" label="是否被合并">
+              <template slot-scope="scope">
+                <div>
+                  {{ scope.row.courseSchedule.newCourseId > 0 ? '是' : '否' }}
+                </div>
+              </template>
             </el-table-column>
             <el-table-column align="center"
-                            prop="teacherName"
+                            prop="courseSchedule.teacherName"
                             label="老师姓名"></el-table-column>
           </el-table>
           <pagination :total="pageInfo.total"
@@ -157,7 +174,7 @@
 <script>
 import pagination from "@/components/Pagination/index";
 import {musicCourseType} from "@/utils/searchArray"
-
+import { findStudentAttendance } from "@/api/buildTeam";
 import {
   findStudentMusicGroups,
   findStudentCourses
@@ -173,12 +190,11 @@ export default {
       coursesShow: false, // 排课列表是否显示
       searchLsit: [],
       searchForm: {
-        studentId: null,
+        studentID: null,
         musicGroupId: null,
-        classGroupType: null,
+        courseScheduleType: null,
         courseStatus: null,
-        classGroupName: null,
-        teacherName: null
+        teacherId: null
       },
       courseArray: musicCourseType,
       courseStatus: [
@@ -197,12 +213,12 @@ export default {
   },
   mounted () {
     this.userId = this.$route.query.userId;
-    this.searchForm.studentId = this.$route.query.userId;
+    this.searchForm.studentID = this.$route.query.userId;
     this.__init();
   },
   activated () {
     this.userId = this.$route.query.userId;
-    this.searchForm.studentId = this.$route.query.userId;
+    this.searchForm.studentID = this.$route.query.userId;
     this.__init();
   },
   methods: {
@@ -216,12 +232,11 @@ export default {
     onCourse (row) {
       this.coursesShow = true;
       this.searchForm = {
-        studentId: this.$route.query.userId,
+        studentID: this.$route.query.userId,
         musicGroupId: row.musicGroupId,
-        classGroupType: null,
+        courseScheduleType: null,
         courseStatus: null,
-        classGroupName: null,
-        teacherName: null
+        teacherId: null
       };
       this.getStudentCourses();
     },
@@ -233,7 +248,8 @@ export default {
       let params = this.searchForm;
       params.rows = this.pageInfo.limit;
       params.page = this.pageInfo.page;
-      findStudentCourses(params).then(res => {
+      console.log(params)
+      findStudentAttendance(params).then(res => {
         if (res.code == 200) {
           this.coursesInfo = res.data.rows;
           this.pageInfo.total = res.data.total;

+ 7 - 7
src/views/teamDetail/componentCourse/addCompound.vue

@@ -114,17 +114,17 @@ export default {
         this.$message.error('请选择一节主课')
         return
       }
-      let arr = []
+      // let arr = []
       let idList = []
       this.dataList.forEach(com => {
-        arr.push(com.type)
+        // arr.push(com.type)
             idList.push(com.id)
       })
-      arr = [... new Set(arr)]
-      if (arr.length != 1) {
-        this.$message.error('请选择相同的课程类型')
-        return
-      }
+      // arr = [... new Set(arr)]
+      // if (arr.length != 1) {
+      //   this.$message.error('请选择相同的课程类型')
+      //   return
+      // }
       if (this.dataList.length <= 1) {
         this.$message.error('请至少选择2节课程')
         return

+ 55 - 6
src/views/teamDetail/components/modals/course-time-detail.vue

@@ -3,7 +3,7 @@
     :data="list"
     :header-cell-style="{background:'#EDEEF0',color:'#444'}"
   >
-    <el-table-column
+    <!-- <el-table-column
       prop="type"
       label="课程类型"
       align="center"
@@ -11,12 +11,50 @@
       <template slot-scope="scope">
         {{courseType[scope.row.type]}}
       </template>
+    </el-table-column> -->
+    <el-table-column
+      prop="userId"
+      label="学生编号"
+      align="center"
+    >
+      <template slot-scope="scope">
+        <copy-text>{{scope.row.userId}}</copy-text>
+      </template>
+    </el-table-column>
+    <el-table-column
+      prop="username"
+      label="学生姓名"
+      width="120"
+      align="center"
+     >
+      <template slot-scope="scope">
+        <copy-text>{{scope.row.username}}</copy-text>
+      </template>
+    </el-table-column>
+    <el-table-column
+      prop="phone"
+      label="学生手机号"
+      width="140"
+      align="center"
+     >
+      <template slot-scope="scope">
+        <copy-text>{{scope.row.phone}}</copy-text>
+      </template>
     </el-table-column>
     <el-table-column
+      v-for="item in extra"
+      :key="item.key"
+      :label="courseType[item.key]"
+    >
+      <template slot-scope="scope">
+        {{scope.row.mapDtos[item.key]}}
+      </template>
+    </el-table-column>
+    <!-- <el-table-column
       prop="time"
       label="剩余时长(分)"
       align="center"
-    />
+    /> -->
   </el-table>
 </template>
 
@@ -28,20 +66,31 @@ export default {
   data() {
     return {
       courseType,
-      list: []
+      list: [],
+      extra: []
     }
   },
   mounted() {
     this.FetchDetail()
   },
   methods: {
+    array2object(list = []) {
+      const data = {}
+      for (const item of list) {
+        data[item.key] = item.value
+      }
+      return data
+    },
     async FetchDetail() {
       try {
         const res = await queryStudentSubTotalCourseTimes({
-          userId: this.detail.userId,
-          musicGroupId: this.detail.musicGroupId,
+          musicGroupId: this.$route.query.id,
         })
-        this.list = Object.keys(res.data).map(item => ({type: item, time: res.data[item]}))
+        this.list = res.data.map(item => ({...item, mapDtos: this.array2object(item.mapDtos)}))
+        if (res.data[0]) {
+          this.extra = res.data[0].mapDtos
+        }
+        // this.list = Object.keys(res.data).map(item => ({type: item, time: res.data[item]}))
       } catch (error) {}
     }
   }

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

@@ -770,7 +770,7 @@ export default {
     },
     setType(type) {
       this.courseTypeList = getCourseType(type);
-      console.log(this.courseTypeList);
+      this.activeSoundList = this.soundList
     },
     // 新增班级
     addNewClass(type) {
@@ -903,7 +903,6 @@ export default {
         this.activeSoundList = this.soundList.filter((sound) => {
           return arr.indexOf(sound.id + "") != -1;
         });
-        console.log(this.activeSoundList);
       } else {
         this.activeSoundList = this.soundList;
         this.getNoClassStudent(row.type);

+ 22 - 22
src/views/teamDetail/components/studentList.vue

@@ -15,17 +15,27 @@
         <span>{{studentListInfo.add}}</span>
       </statistic-item>
       <statistic-item>
-        <div class="newStudent"
-             style="margin-bottom:10px;"
-             v-permission="'studentRegistration/insertStudent'"
-             @click="addStudentVisible = true">新增学员</div>
-        <!-- <div class="newStudent"
-             style="margin-bottom:10px;"
-             v-permission="'teamDetails/studentList/QRCode/822'"
-             @click="onCreateQRCode">报名连接</div> -->
-        <div class="newStudent"
-             v-permission="'/studentSignin'"
-             @click="gotoSignin">点名总览</div>
+        <div style="display: flex;">
+          <div>
+            <div class="newStudent"
+              style="margin-bottom:10px;"
+              v-permission="'studentRegistration/insertStudent'"
+              @click="addStudentVisible = true">新增学员</div>
+          <!-- <div class="newStudent"
+              style="margin-bottom:10px;"
+              v-permission="'teamDetails/studentList/QRCode/822'"
+              @click="onCreateQRCode">报名连接</div> -->
+            <div class="newStudent"
+              v-permission="'/studentSignin'"
+              @click="gotoSignin">点名总览</div>
+          </div>
+          <div style="margin-left: 10px;">
+            <div class="newStudent"
+              style="margin-bottom:10px;"
+              v-permission="'studentManage/queryStudentSubTotalCourseTimes'"
+              @click="viewTimer">剩余时长明细</div>
+          </div>
+        </div>
       </statistic-item>
     </statistic>
 
@@ -188,11 +198,6 @@
                          label="缴费金额"
                          prop="courseFee"></el-table-column> -->
         <el-table-column align="center"
-                         prop="subTotalCourseTime"
-                         label="剩余时长(分)"
-                         width="125">
-                         </el-table-column>
-        <el-table-column align="center"
                          label="报名缴费">
           <template slot-scope="scope">
             <div>{{ scope.row.paymentStatus | studentPays}}</div>
@@ -219,9 +224,6 @@
           <template slot-scope="scope">
             <div>
               <el-button type="text"
-                         v-if="permission('studentManage/queryStudentSubTotalCourseTimes')"
-                         @click="viewTimer(scope.row)">课程时长</el-button>
-              <el-button type="text"
                          v-if="permission('studentManage/queryStudentClassGroup')&&scope.row.studentStatus != 'QUIT'"
                          @click="lookClass(scope.row)">查看班级</el-button>
 
@@ -431,10 +433,8 @@
     <el-dialog
       :visible.sync="timesVisible"
       title="查看剩余可排课时长"
-      width="500px"
     >
       <times-view
-        :detail="timerDetail"
         v-if="timesVisible"
         @close="timesVisible = false"
       />
@@ -810,7 +810,7 @@ export default {
   },
   methods: {
     viewTimer(row) {
-      this.timerDetail = row
+      // this.timerDetail = row
       this.timesVisible = true
     },
     permission (str) {