Commit 4ba24a18 authored by chenfenglei's avatar chenfenglei

班级列表排序

parent 9589855c
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
type="selection" type="selection"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column label="用户" className="f-c" width="150" sortable> <el-table-column label="用户" className="f-c" width="150" sortable sort-by="scope.row.user_id">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="scope.row.avatar" style="width: 40px;height: 40px;border-radius: 50px"> {{scope.row.nickname}}(ID:{{scope.row.user_id}}) <img :src="scope.row.avatar" style="width: 40px;height: 40px;border-radius: 50px"> {{scope.row.nickname}}(ID:{{scope.row.user_id}})
</template> </template>
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="最后登录时间" sortable width="140"> label="最后登录时间" sortable width="140" sort-by="scope.row.last_login_at">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.last_login_at }} {{ scope.row.last_login_at }}
</template> </template>
...@@ -159,25 +159,25 @@ ...@@ -159,25 +159,25 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="课包查看次数" sortable width="140"> label="课包查看次数" sortable width="140" sort-by="scope.row.watch_course_num">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.watch_course_num }} {{ scope.row.watch_course_num }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="学习时长(分)" sortable width="150"> label="学习时长(分)" sortable width="150" sort-by="Math.round(scope.row.watch_course_time / 60 * 100) / 100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ Math.round(scope.row.watch_course_time / 60 * 100) / 100}} {{ Math.round(scope.row.watch_course_time / 60 * 100) / 100}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="作业率" sortable> label="作业率" sortable sort-by="scope.row.work_rate">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.work_rate | percent}} {{ scope.row.work_rate | percent}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="打卡率" sortable> label="打卡率" sortable sort-by="scope.row.clock_rate">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.clock_rate | percent}} {{ scope.row.clock_rate | percent}}
</template> </template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment