Ver Fonte

添加用户加入课程类型[购买][分享]

lex há 2 anos atrás
pai
commit
7b7f22c03b

+ 10 - 5
src/constant/index.js

@@ -592,9 +592,14 @@ export const problemType = {
   OTHER: "其他"
 };
 
-
 export const shareLiveType = {
-  NO_SHARE:'未分享',
-  OPEN:'公开',
-  PRIVATE:'私密'
-}
+  NO_SHARE: "未分享",
+  OPEN: "公开",
+  PRIVATE: "私密"
+};
+
+// 加入课程类型
+export const joinCourseType = {
+  PURCHASE: "购买",
+  SHARE: "分享"
+};

+ 4 - 0
src/utils/vueFilter.js

@@ -945,3 +945,7 @@ Vue.filter("liveState", value => {
   };
   return obj[value];
 });
+
+Vue.filter("joinCourseType", value => {
+  return constant.joinCourseType[value];
+});

+ 35 - 24
src/views/stuRecodeManager/index.vue

@@ -19,7 +19,7 @@
             clearable
             type="number"
             @keydown.enter.native="
-              (e) => {
+              e => {
                 e.target.blur();
                 $refs.searchForm.save();
                 search();
@@ -59,8 +59,8 @@
             v-model.trim="searchForm.musicGroupId"
             type="number"
             clearable
-           @keydown.enter.native="
-              (e) => {
+            @keydown.enter.native="
+              e => {
                 e.target.blur();
                 $refs.searchForm.save();
                 search();
@@ -74,7 +74,7 @@
             v-model.trim="searchForm.courseScheduleId"
             clearable
             @keydown.enter.native="
-              (e) => {
+              e => {
                 e.target.blur();
                 $refs.searchForm.save();
                 search();
@@ -153,8 +153,8 @@
             @click="onExport"
             type="primary"
             v-permission="'export/studentCourseAttendance'"
-
-            >导出</el-button>
+            >导出</el-button
+          >
         </el-form-item>
       </save-form>
       <div class="tableWrap">
@@ -178,7 +178,8 @@
               <div>
                 {{ scope.row.username }}
                 <p style="color: #f56c6c">
-                  (<copy-text>{{ scope.row.userId }}</copy-text>)
+                  (<copy-text>{{ scope.row.userId }}</copy-text
+                  >)
                 </p>
               </div>
             </template>
@@ -321,13 +322,20 @@
               <div
                 v-if="
                   scope.row.courseSchedule &&
-                  scope.row.courseSchedule.status != 'NOT_START'
+                    scope.row.courseSchedule.status != 'NOT_START'
                 "
               >
                 {{ scope.row.status | clockingIn }}
               </div>
             </template>
           </el-table-column>
+          <el-table-column align="center" label="来源">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.joinCourseType | joinCourseType }}
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             fixed="right"
@@ -340,7 +348,7 @@
                   type="text"
                   v-if="
                     permission(getFullPermission('visit/add')) &&
-                    !scope.row.visitFlag
+                      !scope.row.visitFlag
                   "
                   @click="addVisit(scope.row)"
                   >新增回访</el-button
@@ -350,7 +358,7 @@
                   @click="lookVisit(scope.row)"
                   v-if="
                     scope.row.visitFlag &&
-                    permission(getFullPermission('visit/queryPage'))
+                      permission(getFullPermission('visit/queryPage'))
                   "
                   >查看回访</el-button
                 >
@@ -412,7 +420,7 @@ export default {
         courseScheduleType: "",
         organId: "",
         visitFlag: "",
-        dates: [],
+        dates: []
       },
 
       courseType,
@@ -426,8 +434,8 @@ export default {
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 0, // 总条数
-        page_size: [10, 20, 40, 50], // 选择限制显示条数
-      },
+        page_size: [10, 20, 40, 50] // 选择限制显示条数
+      }
     };
   },
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -474,7 +482,11 @@ export default {
         page: this.rules.page,
         rows: this.rules.limit,
         ids: this.$route.query.ids,
-        ...getTimes(dates, ["startDateOfCourse", "endDateOfCourse"], "YYYY-MM-DD"),
+        ...getTimes(
+          dates,
+          ["startDateOfCourse", "endDateOfCourse"],
+          "YYYY-MM-DD"
+        )
       };
       await Export(
         this,
@@ -482,7 +494,7 @@ export default {
           url: "/api-web/export/studentCourseAttendance",
           fileName: "学生考勤列表.xls",
           method: "post",
-          params: qs.stringify(cleanDeep(obj)),
+          params: qs.stringify(cleanDeep(obj))
         },
         "您确定导出学员考勤列表?"
       );
@@ -497,7 +509,7 @@ export default {
           dates,
           ["startDateOfCourse", "endDateOfCourse"],
           "YYYY-MM-DD"
-        ),
+        )
       };
 
       // let obj = {
@@ -511,8 +523,8 @@ export default {
       //   ),
       // };
       findStudentAttendance(obj, {
-        ids: this.$route.query.ids,
-      }).then((res) => {
+        ids: this.$route.query.ids
+      }).then(res => {
         if (res.code == 200) {
           this.tableList = res.data.rows;
           this.rules.total = res.data.total;
@@ -532,7 +544,7 @@ export default {
           status: undefined,
           visitFlag: undefined,
           start: undefined,
-          end: undefined,
+          end: undefined
         });
       }
     },
@@ -549,11 +561,10 @@ export default {
     lookVisit(row) {
       this.$router.push({
         path: "/studentManager/returnVisitList",
-        query: { search: row.id,tabrouter:'2' },
+        query: { search: row.id, tabrouter: "2" }
       });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
-</style>
+<style lang="scss" scoped></style>

+ 172 - 139
src/views/studentManager/components/studentRecord.vue

@@ -1,102 +1,107 @@
 <template>
   <div>
     <!-- 搜索类型 -->
-     <save-form
-        :inline="true"
-        ref="searchForm"
-        :model="searchForm"
-        @submit="search"
-        @reset="onReSet"
-        save-key='studentDetail-studentRecord'
-      >
-        <el-form-item prop="teacherId">
-          <remote-search :commit='"setTeachers"' v-model='searchForm.teacherId'    :isForzenWithQueryCondition="true"/>
-        </el-form-item>
-        <el-form-item prop="musicGroupId">
-          <el-input
-            v-model.trim="searchForm.musicGroupId"
-            clearable
-                @keyup.enter.native="
-              (e) => {
-                e.target.blur();
-                $refs.searchForm.save();
-                search();
-              }
-            "
-            placeholder="乐团编号"
-          ></el-input>
-        </el-form-item>
-        <el-form-item prop="courseScheduleId">
-          <el-input
-            v-model.trim="searchForm.courseScheduleId"
-            clearable
-             @keyup.enter.native="
-              (e) => {
-                e.target.blur();
-                $refs.searchForm.save();
-                search();
-              }
-            "
-            placeholder="课程编号"
-          ></el-input>
-        </el-form-item>
-        <el-form-item prop="groupType">
-          <el-select
-            v-model.trim="searchForm.groupType"
-            placeholder="请选择课程组类型"
-          >
-            <el-option
-              v-for="(item, index) in courseListType"
-              :key="index"
-              :value="item.value"
-              :label="item.label"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-         <el-form-item prop="courseScheduleType">
-          <el-select
-            v-model.trim="searchForm.courseScheduleType"
-            clearable
-            placeholder="请选择课程类型"
-          >
-            <el-option
-              v-for="(item, index) in courseType"
-              :key="index"
-              :value="item.value"
-              :label="item.label"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item prop="status">
-          <el-select
-            v-model.trim="searchForm.status"
-            placeholder="请选择考勤状态"
-          >
-            <el-option
-              v-for="(item, index) in attendanceStatus"
-              :key="index"
-              :value="item.value"
-              :label="item.label"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-            <el-form-item prop="dates" >
-          <el-date-picker
-            v-model="dates"
-            type="daterange"
-            style="width: 405px;"
-            range-separator="至"
-            start-placeholder="课程开始日期"
-            end-placeholder="课程结束日期">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item>
-          <el-button native-type="submit" type="danger">搜索</el-button>
-          <el-button native-type="reset" type="primary">重置</el-button>
-        </el-form-item>
-      </save-form>
+    <save-form
+      :inline="true"
+      ref="searchForm"
+      :model="searchForm"
+      @submit="search"
+      @reset="onReSet"
+      save-key="studentDetail-studentRecord"
+    >
+      <el-form-item prop="teacherId">
+        <remote-search
+          :commit="'setTeachers'"
+          v-model="searchForm.teacherId"
+          :isForzenWithQueryCondition="true"
+        />
+      </el-form-item>
+      <el-form-item prop="musicGroupId">
+        <el-input
+          v-model.trim="searchForm.musicGroupId"
+          clearable
+          @keyup.enter.native="
+            e => {
+              e.target.blur();
+              $refs.searchForm.save();
+              search();
+            }
+          "
+          placeholder="乐团编号"
+        ></el-input>
+      </el-form-item>
+      <el-form-item prop="courseScheduleId">
+        <el-input
+          v-model.trim="searchForm.courseScheduleId"
+          clearable
+          @keyup.enter.native="
+            e => {
+              e.target.blur();
+              $refs.searchForm.save();
+              search();
+            }
+          "
+          placeholder="课程编号"
+        ></el-input>
+      </el-form-item>
+      <el-form-item prop="groupType">
+        <el-select
+          v-model.trim="searchForm.groupType"
+          placeholder="请选择课程组类型"
+        >
+          <el-option
+            v-for="(item, index) in courseListType"
+            :key="index"
+            :value="item.value"
+            :label="item.label"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="courseScheduleType">
+        <el-select
+          v-model.trim="searchForm.courseScheduleType"
+          clearable
+          placeholder="请选择课程类型"
+        >
+          <el-option
+            v-for="(item, index) in courseType"
+            :key="index"
+            :value="item.value"
+            :label="item.label"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="status">
+        <el-select
+          v-model.trim="searchForm.status"
+          placeholder="请选择考勤状态"
+        >
+          <el-option
+            v-for="(item, index) in attendanceStatus"
+            :key="index"
+            :value="item.value"
+            :label="item.label"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="dates">
+        <el-date-picker
+          v-model="dates"
+          type="daterange"
+          style="width: 405px;"
+          range-separator="至"
+          start-placeholder="课程开始日期"
+          end-placeholder="课程结束日期"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button native-type="submit" type="danger">搜索</el-button>
+        <el-button native-type="reset" type="primary">重置</el-button>
+      </el-form-item>
+    </save-form>
     <div class="tableWrap">
-        <div class="tableWrap">
+      <div class="tableWrap">
         <el-table
           style="width: 100%"
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
@@ -131,27 +136,23 @@
               </p>
             </template>
           </el-table-column>
-          <el-table-column
-            align="center"
-            prop="musicGroupId"
-            label="乐团编号"
-          >
-          <template slot-scope="scope">
-            <div>
-              <copy-text>{{ scope.row.musicGroupId }}</copy-text>
-            </div>
-          </template>
+          <el-table-column align="center" prop="musicGroupId" label="乐团编号">
+            <template slot-scope="scope">
+              <div>
+                <copy-text>{{ scope.row.musicGroupId }}</copy-text>
+              </div>
+            </template>
           </el-table-column>
           <el-table-column
             align="center"
             prop="courseScheduleId"
             label="课程编号"
           >
-              <template slot-scope="scope">
-            <div>
-              <copy-text>{{ scope.row.courseScheduleId }}</copy-text>
-            </div>
-          </template>
+            <template slot-scope="scope">
+              <div>
+                <copy-text>{{ scope.row.courseScheduleId }}</copy-text>
+              </div>
+            </template>
           </el-table-column>
 
           <el-table-column
@@ -167,10 +168,15 @@
             <template slot-scope="scope">
               <div>
                 {{ scope.row.courseSchedule.classDate | dayjsFormat }}
+                {{
+                  scope.row.courseSchedule.startClassTime | dayjsFormatMinute
+                }}-{{
+                  scope.row.courseSchedule.endClassTime | dayjsFormatMinute
+                }}
               </div>
             </template>
           </el-table-column>
-          <el-table-column
+          <!-- <el-table-column
             align="center"
             prop="startClassTime"
             label="上课时间"
@@ -184,7 +190,7 @@
                 }}
               </div>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column
             align="center"
             prop="startClassTime"
@@ -208,14 +214,26 @@
             </template>
           </el-table-column>
           <el-table-column align="center" label="合并类型">
-              <template slot-scope="scope">
-                <div>
-                  <!-- {{ scope.row.courseSchedule.newCourseId > 0 ? '是' : '否' }} -->
-                  {{ scope.row.courseSchedule.newCourseId > 0 && scope.row.courseSchedule.newCourseId == scope.row.courseScheduleId ? '合并课' : null }}
-                  {{ scope.row.courseSchedule.newCourseId > 0 && scope.row.courseSchedule.newCourseId != scope.row.courseScheduleId ? '被合并课' : null }}
-                </div>
-              </template>
-            </el-table-column>
+            <template slot-scope="scope">
+              <div>
+                <!-- {{ scope.row.courseSchedule.newCourseId > 0 ? '是' : '否' }} -->
+                {{
+                  scope.row.courseSchedule.newCourseId > 0 &&
+                  scope.row.courseSchedule.newCourseId ==
+                    scope.row.courseScheduleId
+                    ? "合并课"
+                    : null
+                }}
+                {{
+                  scope.row.courseSchedule.newCourseId > 0 &&
+                  scope.row.courseSchedule.newCourseId !=
+                    scope.row.courseScheduleId
+                    ? "被合并课"
+                    : null
+                }}
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column align="center" label="签到时间" width="180px">
             <template slot-scope="scope">
               <div>
@@ -238,29 +256,41 @@
           </el-table-column>
           <el-table-column align="center" label="考勤状态">
             <template slot-scope="scope">
-              <div v-if="scope.row.courseSchedule && scope.row.courseSchedule.status != 'NOT_START'">
+              <div
+                v-if="
+                  scope.row.courseSchedule &&
+                    scope.row.courseSchedule.status != 'NOT_START'
+                "
+              >
                 {{ scope.row.status | clockingIn }}
               </div>
             </template>
           </el-table-column>
-             <el-table-column align="center" label="教学模式">
+          <el-table-column align="center" label="教学模式">
             <template slot-scope="scope">
               <div>
                 {{ scope.row.courseSchedule.teachMode | teachMode }}
               </div>
             </template>
           </el-table-column>
+          <el-table-column align="center" label="来源">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.joinCourseType | joinCourseType }}
+              </div>
+            </template>
+          </el-table-column>
         </el-table>
         <pagination
           sync
-           save-key='studentDetail-studentRecord'
+          save-key="studentDetail-studentRecord"
           :total.sync="pageInfo.total"
           :page.sync="pageInfo.page"
           :limit.sync="pageInfo.limit"
           :page-sizes="pageInfo.page_size"
           @pagination="getList"
         />
-        </div>
+      </div>
     </div>
   </div>
 </template>
@@ -271,12 +301,12 @@ import { getTimes } from "@/utils";
 import {
   courseType,
   courseListType,
-  attendanceStatus,
+  attendanceStatus
 } from "@/utils/searchArray";
 export default {
   name: "studentRecord",
   components: { pagination },
-  data () {
+  data() {
     return {
       searchForm: {
         studentID: "",
@@ -284,13 +314,13 @@ export default {
         musicGroupId: "",
         courseScheduleId: "",
         status: "",
-        teacherId:'',
-        courseScheduleType:''
+        teacherId: "",
+        courseScheduleType: ""
       },
-      dates:[],
+      dates: [],
       searchLsit: [],
       tableList: [],
-         courseType,
+      courseType,
       courseListType,
       attendanceStatus,
       pageInfo: {
@@ -302,25 +332,29 @@ export default {
       }
     };
   },
-  mounted () {
+  mounted() {
     this.searchForm.studentID = this.$route.query.userId;
     this.getList();
   },
-  activated () {
+  activated() {
     this.searchForm.studentID = this.$route.query.userId;
     this.getList();
   },
   methods: {
-    search () {
+    search() {
       this.pageInfo.page = 1;
       this.getList();
     },
-    getList () {
-        let obj = {
+    getList() {
+      let obj = {
         page: this.pageInfo.page,
         rows: this.pageInfo.limit,
         ...this.searchForm,
-        ...getTimes(this.dates, ["startDateOfCourse", "endDateOfCourse"],'YYYY-MM-DD'),
+        ...getTimes(
+          this.dates,
+          ["startDateOfCourse", "endDateOfCourse"],
+          "YYYY-MM-DD"
+        )
       };
       findStudentAttendance(obj).then(res => {
         if (res.code == 200) {
@@ -329,7 +363,7 @@ export default {
         }
       });
     },
-    onReSet () {
+    onReSet() {
       // 重置搜索
       this.$refs.searchForm.resetFields();
       this.searchForm.studentId = this.$route.query.userId;
@@ -338,5 +372,4 @@ export default {
   }
 };
 </script>
-<style lang="scss">
-</style>
+<style lang="scss"></style>

+ 35 - 25
src/views/teamDetail/componentCourse/studentRollCall.vue

@@ -57,10 +57,13 @@
             <div
               v-if="
                 scope.row.courseSchedule &&
-                scope.row.courseSchedule.status != 'NOT_START'
+                  scope.row.courseSchedule.status != 'NOT_START'
               "
             >
-              <p v-if="scope.row.status" :class="scope.row.status == 'NORMAL'?'green':'red'">
+              <p
+                v-if="scope.row.status"
+                :class="scope.row.status == 'NORMAL' ? 'green' : 'red'"
+              >
                 {{ scope.row.status | studentRecord }}
               </p>
               <p v-else>未签到</p>
@@ -72,26 +75,31 @@
             <div>{{ scope.row.visitFlag | yesOrNo }}</div>
           </template>
         </el-table-column>
-                <!-- <el-table-column align="center" prop="leaveNum" label="本月请假次数"></el-table-column> -->
-        <el-table-column
-          align="center"
-          prop="ctrls"
-          label="操作"
-        >
+        <el-table-column align="center" label="来源">
+          <template slot-scope="scope">
+            <div>{{ scope.row.joinCourseType | joinCourseType }}</div>
+          </template>
+        </el-table-column>
+        <!-- <el-table-column align="center" prop="leaveNum" label="本月请假次数"></el-table-column> -->
+        <el-table-column align="center" prop="ctrls" label="操作">
           <template slot-scope="scope">
             <div>
               <el-button
-
                 type="text"
                 @click="addVisit(scope.row)"
-                v-if="!scope.row.visitFlag&&permission('visit/add?page=teamCourseList')"
+                v-if="
+                  !scope.row.visitFlag &&
+                    permission('visit/add?page=teamCourseList')
+                "
                 >新增回访</el-button
               >
-                <el-button
-
+              <el-button
                 type="text"
                 @click="lookVisit(scope.row)"
-                v-if="(scope.row.visitFlag)&&permission('visit/queryPage?page=teamCourseList')"
+                v-if="
+                  scope.row.visitFlag &&
+                    permission('visit/queryPage?page=teamCourseList')
+                "
                 >查看回访</el-button
               >
             </div>
@@ -139,12 +147,12 @@ export default {
         // 分页规则
         limit: 10, // 限制显示条数
         page: 1, // 当前页
-        total: 0, // 总条数
+        total: 0 // 总条数
       },
       studentNum: null,
       signInNum: null,
       leaveNum: null,
-      truantNum: null,
+      truantNum: null
     };
   },
   mounted() {
@@ -164,23 +172,26 @@ export default {
       this.visitVisible = true;
       this.detail = row;
     },
-    lookVisit(row){
-      console.log({search:row.id,tabrouter:'2'})
-      this.$router.push({path:'/studentManager/returnVisitList',query:{search:row.id,tabrouter:'2'}}) 
+    lookVisit(row) {
+      console.log({ search: row.id, tabrouter: "2" });
+      this.$router.push({
+        path: "/studentManager/returnVisitList",
+        query: { search: row.id, tabrouter: "2" }
+      });
     },
     getList() {
       findStudentAttendance({
         search: this.courseScheduleId,
         rows: this.rules.limit,
-        page: this.rules.page,
-      }).then((res) => {
+        page: this.rules.page
+      }).then(res => {
         if (res.code == 200) {
           this.tableList = res.data.rows;
           this.rules.total = res.data.total;
         }
       });
       sumStudentAttendance({ courseScheduleId: this.courseScheduleId }).then(
-        (res) => {
+        res => {
           if (res.code == 200) {
             this.studentNum = res.data.studentNum;
             this.signInNum = res.data.signInNum;
@@ -189,8 +200,8 @@ export default {
           }
         }
       );
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>
@@ -210,7 +221,6 @@ export default {
   color: var(--color-primary);
 }
 .orgin {
-  color: #E6A23C;
+  color: #e6a23c;
 }
 </style>
-