|
@@ -1,69 +1,68 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<el-form :inline="true" class="workForm" style="padding: 0 25px">
|
|
|
- <el-form-item label="学生总数" >
|
|
|
+ <el-form-item label="学生总数">
|
|
|
<!-- <el-input disabled
|
|
|
:value="studentNum"></el-input> -->
|
|
|
- <div class="inputStyle">{{studentNum}}</div>
|
|
|
+ <div class="inputStyle">{{ studentNum }}</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="实际上课学生数">
|
|
|
<!-- <el-input disabled
|
|
|
:value="signInNum"></el-input> -->
|
|
|
- <div class="inputStyle">{{signInNum}}</div>
|
|
|
+ <div class="inputStyle">{{ signInNum }}</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="请假学生数">
|
|
|
<!-- <el-input disabled
|
|
|
:value="leaveNum"></el-input> -->
|
|
|
- <div class="inputStyle">{{leaveNum}}</div>
|
|
|
+ <div class="inputStyle">{{ leaveNum }}</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="旷课学生数">
|
|
|
<!-- <el-input disabled
|
|
|
:value="leaveNum"></el-input> -->
|
|
|
- <div class="inputStyle">{{truantNum}}</div>
|
|
|
+ <div class="inputStyle">{{ truantNum }}</div>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="tableWrap">
|
|
|
- <el-table :data='tableList'
|
|
|
- :header-cell-style="{background:'#EDEEF0',color:'#444'}">
|
|
|
- <el-table-column align='center'
|
|
|
- prop="username"
|
|
|
- label="学生姓名">
|
|
|
+ <el-table
|
|
|
+ :data="tableList"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ >
|
|
|
+ <el-table-column align="center" prop="username" label="学生姓名">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{scope.row.username}}
|
|
|
- <span >({{scope.row.userId}})</span>
|
|
|
- <!-- style="color: #f56c6c" -->
|
|
|
+ {{ scope.row.username }}
|
|
|
+ <span>({{ scope.row.userId }})</span>
|
|
|
+ <!-- style="color: #f56c6c" -->
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop="phone"
|
|
|
- label="手机号">
|
|
|
+ <el-table-column align="center" prop="phone" label="手机号">
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop="signInTime"
|
|
|
- label="签到时间">
|
|
|
+ <el-table-column align="center" prop="signInTime" label="签到时间">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{scope.row.signInTime | dateForMinFormat}}
|
|
|
+ {{ scope.row.signInTime | dateForMinFormat }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop="signOutTime"
|
|
|
- label="签退时间">
|
|
|
+ <el-table-column align="center" prop="signOutTime" label="签退时间">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{scope.row.signOutTime | dateForMinFormat}}
|
|
|
+ {{ scope.row.signOutTime | dateForMinFormat }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop="status"
|
|
|
- label="考勤状态">
|
|
|
+ <el-table-column align="center" prop="status" label="考勤状态">
|
|
|
<template slot-scope="scope">
|
|
|
- <div v-if="scope.row.courseSchedule && scope.row.courseSchedule.status != 'NOT_START'">
|
|
|
- <p v-if="scope.row.status">{{scope.row.status | studentRecord}}</p>
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ scope.row.courseSchedule &&
|
|
|
+ scope.row.courseSchedule.status != 'NOT_START'
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <p v-if="scope.row.status">
|
|
|
+ {{ scope.row.status | studentRecord }}
|
|
|
+ </p>
|
|
|
<p v-else>未签到</p>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -73,24 +72,42 @@
|
|
|
<div>{{ scope.row.visitFlag | yesOrNo }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align='center'
|
|
|
- prop="ctrls"
|
|
|
- v-if="permission('visit/add?page=teamCourseList')"
|
|
|
- label="操作">
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="ctrls"
|
|
|
+ label="操作"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- @click="addVisit(scope.row)"
|
|
|
- >新增回访</el-button>
|
|
|
+ <div>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ @click="addVisit(scope.row)"
|
|
|
+ v-if="!scope.row.visitFlag&&permission('visit/add?page=teamCourseList')"
|
|
|
+ >新增回访</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ @click="lookVisit(scope.row)"
|
|
|
+ v-if="(scope.row.visitFlag)&&permission('visit/queryPage?page=teamCourseList')"
|
|
|
+ >查看回访</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <pagination :total="rules.total"
|
|
|
- :page.sync="rules.page"
|
|
|
- :limit.sync="rules.limit"
|
|
|
- @pagination="getList" />
|
|
|
+ <pagination
|
|
|
+ :total="rules.total"
|
|
|
+ :page.sync="rules.page"
|
|
|
+ :limit.sync="rules.limit"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <el-dialog title="新增回访" width="500px" :visible.sync="visitVisible" append-to-body>
|
|
|
+ <el-dialog
|
|
|
+ title="新增回访"
|
|
|
+ width="500px"
|
|
|
+ :visible.sync="visitVisible"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
<visit
|
|
|
v-if="visitVisible && detail"
|
|
|
:detail="detail"
|
|
@@ -103,14 +120,14 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { findStudentAttendance, sumStudentAttendance } from '@/api/buildTeam'
|
|
|
-import pagination from '@/components/Pagination/index'
|
|
|
-import { permission } from '@/utils/directivePage'
|
|
|
-import visit from '@/views/withdrawal-application/modals/visit'
|
|
|
+import { findStudentAttendance, sumStudentAttendance } from "@/api/buildTeam";
|
|
|
+import pagination from "@/components/Pagination/index";
|
|
|
+import { permission } from "@/utils/directivePage";
|
|
|
+import visit from "@/views/withdrawal-application/modals/visit";
|
|
|
export default {
|
|
|
- props: ['courseScheduleId','isMainGo'],
|
|
|
+ props: ["courseScheduleId", "isMainGo"],
|
|
|
components: { pagination, visit },
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
tableList: [],
|
|
|
visitVisible: false,
|
|
@@ -124,48 +141,54 @@ export default {
|
|
|
studentNum: null,
|
|
|
signInNum: null,
|
|
|
leaveNum: null,
|
|
|
- truantNum: null
|
|
|
- }
|
|
|
+ truantNum: null,
|
|
|
+ };
|
|
|
},
|
|
|
- mounted () {
|
|
|
- this.init()
|
|
|
+ mounted() {
|
|
|
+ this.init();
|
|
|
},
|
|
|
- activated () {
|
|
|
- this.init()
|
|
|
+ activated() {
|
|
|
+ this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
permission,
|
|
|
- init () {
|
|
|
- console.log(this.courseScheduleId)
|
|
|
- this.getList()
|
|
|
+ init() {
|
|
|
+ console.log(this.courseScheduleId);
|
|
|
+ this.getList();
|
|
|
|
|
|
// 发请求获取学生签到信息
|
|
|
},
|
|
|
addVisit(row) {
|
|
|
- this.visitVisible = true
|
|
|
- this.detail = row
|
|
|
+ this.visitVisible = true;
|
|
|
+ this.detail = row;
|
|
|
},
|
|
|
- getList () {
|
|
|
+ lookVisit(row){
|
|
|
+ this.$router.push({path:'/studentManager/returnVisitList',query:{search:row.id}})
|
|
|
+ },
|
|
|
+ getList() {
|
|
|
findStudentAttendance({
|
|
|
- search: this.courseScheduleId, rows: this.rules.limit,
|
|
|
+ search: this.courseScheduleId,
|
|
|
+ rows: this.rules.limit,
|
|
|
page: this.rules.page,
|
|
|
- }).then(res => {
|
|
|
+ }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.tableList = res.data.rows;
|
|
|
- this.rules.total = res.data.total
|
|
|
+ this.rules.total = res.data.total;
|
|
|
}
|
|
|
- })
|
|
|
- sumStudentAttendance({ courseScheduleId: this.courseScheduleId }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.studentNum = res.data.studentNum;
|
|
|
- this.signInNum = res.data.signInNum;
|
|
|
- this.leaveNum = res.data.leaveNum
|
|
|
- this.truantNum = res.data.truantNum
|
|
|
+ });
|
|
|
+ sumStudentAttendance({ courseScheduleId: this.courseScheduleId }).then(
|
|
|
+ (res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.studentNum = res.data.studentNum;
|
|
|
+ this.signInNum = res.data.signInNum;
|
|
|
+ this.leaveNum = res.data.leaveNum;
|
|
|
+ this.truantNum = res.data.truantNum;
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.inputStyle {
|
|
@@ -173,7 +196,7 @@ export default {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.workForm {
|
|
|
- /deep/.el-form-item {
|
|
|
+ /deep/.el-form-item {
|
|
|
margin-bottom: 10px !important;
|
|
|
}
|
|
|
}
|