From ef46e4b78e81418a831d4f7f21eb24d2fd4d35e1 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 25 Dec 2021 15:08:54 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises
---
src/views/trainExam/singleperformance.vue | 39 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 38 insertions(+), 1 deletions(-)
diff --git a/src/views/trainExam/singleperformance.vue b/src/views/trainExam/singleperformance.vue
index 893ddc5..2eaa39a 100644
--- a/src/views/trainExam/singleperformance.vue
+++ b/src/views/trainExam/singleperformance.vue
@@ -23,6 +23,7 @@
:table-loading="questionBankLoading"
:data="questionBankData"
ref="questionBankCrud"
+ @sort-change="sortChange"
:permission="permissionList"
:page.sync="questionBankPage"
@on-load="questionBankOnLoad"
@@ -149,6 +150,8 @@
// title: '成绩',
align: "center",
height: "auto",
+ sort:"",
+ sortName:"",
calcHeight: 80,
tip: false,
searchShow: true,
@@ -396,6 +399,10 @@
label: "考试中",
value: 3,
},
+ {
+ label: "缺考",
+ value: 4,
+ },
],
width: 90,
// 表单新增时是否禁止
@@ -422,6 +429,7 @@
label: "理论成绩",
prop: "theoryGrade",
slot: true,
+ sortable: true,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
@@ -440,6 +448,7 @@
label: "实操成绩",
prop: "learnGrade",
slot: true,
+ sortable: true,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
@@ -461,6 +470,7 @@
label: "总成绩",
prop: "allGrade",
slot: true,
+ sortable: true,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
@@ -489,7 +499,7 @@
slot: true,
search: true,
searchSpan: 4,
- width: 110,
+ // width: 110,
width: 68,
dicData: [
{
@@ -570,6 +580,27 @@
query: obj,
});
},
+ //排序
+ sortChange(value) {
+ if(value.order=="ascending"){
+ this.sort = "asc";
+ }
+ if(value.order=="descending"){
+ this.sort = "desc";
+ }
+ this.sortName = value.prop;
+ //字段匹配
+ if(value.prop=="theoryGrade"){
+ this.sortName = "theory_grade";
+ }
+ if(value.prop=="learnGrade"){
+ this.sortName = "learn_grade";
+ }
+ if(value.prop=="allGrade"){
+ this.sortName = "all_grade";
+ }
+ this.questionBankOnLoad(this.questionBankPage);
+ },
questionBankOnLoad(page, params = {}) {
//判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩
var that = this;
@@ -593,6 +624,12 @@
}
that.questionBankLoading = false;
params["examType"] = 2;
+ if(this.sort){
+ params["sort"] = this.sort;
+ }
+ if(this.sortName){
+ params["sortName"] = this.sortName;
+ }
getList(
page.currentPage,
page.pageSize,
--
Gitblit v1.9.3