| | |
| | | </el-tabs> |
| | | <div style="display: flex; flex-direction: row-reverse"> |
| | | <div style="width: 300px"> |
| | | <el-input |
| | | placeholder="按班级名称搜索" |
| | | v-model="data.keyword" |
| | | class="input-with-select" |
| | | size="small" |
| | | > |
| | | <el-button |
| | | slot="append" |
| | | icon="el-icon-search" |
| | | @click="fetchData" |
| | | ></el-button> |
| | | <el-input placeholder="按班级名称搜索" v-model="data.keyword" class="input-with-select" size="small"> |
| | | <el-button slot="append" icon="el-icon-search" @click="fetchData"></el-button> |
| | | </el-input> |
| | | </div> |
| | | </div> |
| | | <div style="height: calc(100vh - 248px)"> |
| | | <el-table |
| | | v-loading="listLoading" |
| | | :data="list" |
| | | element-loading-text="Loading" |
| | | fit |
| | | v-if="activeName == 'all'" |
| | | height="100%" |
| | | > |
| | | <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" fit v-if="activeName == 'all'" |
| | | height="100%"> |
| | | <el-table-column label="班级名称"> |
| | | <template slot-scope="scope"> |
| | | <el-link type="primary" :underline="false">{{ |
| | |
| | | concatenateArray(scope.row.team.sessionStaffs) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="handleExport(scope.row)"> |
| | | 导出 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-table |
| | | v-loading="listLoading" |
| | | :data="list" |
| | | element-loading-text="Loading" |
| | | fit |
| | | height="100%" |
| | | v-else |
| | | > |
| | | <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" fit height="100%" v-else> |
| | | <el-table-column label="班级名称"> |
| | | <template slot-scope="scope">{{ scope.row.name }} </template> |
| | | </el-table-column> |
| | |
| | | </el-table> |
| | | </div> |
| | | <div> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="data.pageIn.index + 1" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :page-size="data.pageIn.size" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | | > |
| | | <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" |
| | | :current-page="data.pageIn.index + 1" :page-sizes="[10, 20, 30, 40]" :page-size="data.pageIn.size" |
| | | layout="total, sizes, prev, pager, next, jumper" :total="total"> |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog title="导出" :visible.sync="dialogVisible" width="50%"> |
| | | <el-form ref="form" :model="form" label-width="180px"> |
| | | <el-form-item label="日期范围"> |
| | | <el-date-picker v-model="form.dateRange" type="daterange" range-separator="至" start-placeholder="开始日期" |
| | | end-placeholder="结束日期" value-format="yyyy-MM-dd"></el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="confirmExport">导 出</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | form: { |
| | | dateRange: [], |
| | | teamId: "", |
| | | name: "", |
| | | }, |
| | | list: null, |
| | | listLoading: true, |
| | | activeName: "all", |
| | |
| | | this.fetchData(); |
| | | }, |
| | | methods: { |
| | | handleExport(row) { |
| | | this.form.dateRange = []; |
| | | this.form.teamId = row.team.id; |
| | | this.form.name = row.team.name; |
| | | this.dialogVisible = true; |
| | | }, |
| | | confirmExport() { |
| | | this.download('exportSignIn?teamId=' + this.form.teamId + '&startTime=' + this.form.dateRange[0] + '&endTime=' + this.form.dateRange[1], { |
| | | }, `${this.form.name}上课签到表.xlsx`) |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.data.pageIn.size = val; |
| | | this.fetchData("pageIn"); |