|
@@ -23,11 +23,12 @@
|
|
@click.native="detail(item)"
|
|
@click.native="detail(item)"
|
|
:name="item.customer && item.customer.name"
|
|
:name="item.customer && item.customer.name"
|
|
:avatar="item.customer && item.customer.photo"
|
|
:avatar="item.customer && item.customer.photo"
|
|
|
|
+ :user-name="item.customer && item.customer.username"
|
|
></student-card>
|
|
></student-card>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-card>
|
|
</el-card>
|
|
- <evaluation-empty v-else />
|
|
|
|
|
|
+ <evaluation-empty v-else/>
|
|
<pagination
|
|
<pagination
|
|
v-show="total > 0"
|
|
v-show="total > 0"
|
|
:total="total"
|
|
:total="total"
|
|
@@ -40,56 +41,56 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import { getStudents } from "@/api/webApi/back";
|
|
|
|
|
|
+import { getStudents } from '@/api/webApi/back'
|
|
|
|
|
|
- export default {
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- total: 0,
|
|
|
|
- dataList: [],
|
|
|
|
- queryParams: { pageNum: 1, pageSize: 50 },
|
|
|
|
- };
|
|
|
|
|
|
+export default {
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ total: 0,
|
|
|
|
+ dataList: [],
|
|
|
|
+ queryParams: { pageNum: 1, pageSize: 50 }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.getList()
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ classGradeChange(data) {
|
|
|
|
+ this.queryParams = { ...this.queryParams, ...data }
|
|
|
|
+ if (data.class && !data.clbum) return // 选了年级没有选班级
|
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
|
+ this.getList()
|
|
},
|
|
},
|
|
- created() {
|
|
|
|
- this.getList();
|
|
|
|
|
|
+ detail(user) {
|
|
|
|
+ const { customerCode, customer } = user
|
|
|
|
+ this.$router.push({ name: 'UserStatisticsInfo', query: { customerCode, userName: customer.name } })
|
|
},
|
|
},
|
|
- methods: {
|
|
|
|
- classGradeChange(data) {
|
|
|
|
- this.queryParams = { ...this.queryParams, ...data };
|
|
|
|
- if (data.class && !data.clbum) return; // 选了年级没有选班级
|
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
|
- this.getList();
|
|
|
|
- },
|
|
|
|
- detail(user) {
|
|
|
|
- this.$store.dispatch('settings/setStudent', user)
|
|
|
|
- this.$router.push({ name: "UserStatisticsInfo"});
|
|
|
|
- },
|
|
|
|
- getList() {
|
|
|
|
- //if (!classId) return;
|
|
|
|
- getStudents({
|
|
|
|
- classId: this.queryParams.clbum,
|
|
|
|
- pageNum: this.queryParams.pageNum,
|
|
|
|
- pageSize: this.queryParams.pageSize,
|
|
|
|
- }).then((rep) => {
|
|
|
|
- console.log(
|
|
|
|
- "getStudents by classId[" + this.queryParams.clbum + "] rep=",
|
|
|
|
- rep
|
|
|
|
- );
|
|
|
|
- if (rep.code == 200 || rep.code == 0) {
|
|
|
|
- this.dataList = rep.rows || rep.data;
|
|
|
|
- this.total = rep.total || 0;
|
|
|
|
- } else {
|
|
|
|
- this.msgError(rep.msg || "getStudents请求异常");
|
|
|
|
- }
|
|
|
|
- this.loading = false;
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- };
|
|
|
|
|
|
+ getList() {
|
|
|
|
+ //if (!classId) return;
|
|
|
|
+ getStudents({
|
|
|
|
+ classId: this.queryParams.clbum,
|
|
|
|
+ pageNum: this.queryParams.pageNum,
|
|
|
|
+ pageSize: this.queryParams.pageSize
|
|
|
|
+ }).then((rep) => {
|
|
|
|
+ console.log(
|
|
|
|
+ 'getStudents by classId[' + this.queryParams.clbum + '] rep=',
|
|
|
|
+ rep
|
|
|
|
+ )
|
|
|
|
+ if (rep.code == 200 || rep.code == 0) {
|
|
|
|
+ this.dataList = rep.rows || rep.data
|
|
|
|
+ this.total = rep.total || 0
|
|
|
|
+ } else {
|
|
|
|
+ this.msgError(rep.msg || 'getStudents请求异常')
|
|
|
|
+ }
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
- .el-col-99 {
|
|
|
|
- width: 10%;
|
|
|
|
- }
|
|
|
|
|
|
+.el-col-99 {
|
|
|
|
+ width: 10%;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|