From 21c7375b7b38ebf2c8a2ca8fbf6fe9fb4f28250f Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 12 Jan 2022 10:59:40 +0800
Subject: [PATCH] 新增公司注册机公司注册审核
---
src/views/trainExam/singleperformance.vue | 66 +++++++++++++++++++++++++++++----
1 files changed, 58 insertions(+), 8 deletions(-)
diff --git a/src/views/trainExam/singleperformance.vue b/src/views/trainExam/singleperformance.vue
index c0075b2..2eaa39a 100644
--- a/src/views/trainExam/singleperformance.vue
+++ b/src/views/trainExam/singleperformance.vue
@@ -2,14 +2,19 @@
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
* @Last Modified by: liu
- * @Last Modified time: 2021-10-26 15:38:19
+ * @Last Modified time: 2021-12-10 10:01:11
* menu-name 成绩查看
*/
<template>
<el-row class="morpheus-box-score">
<el-col :span="24">
<el-card>
- <div class="exam-card-body">
+ <div
+ :class="[
+ 'exam-card-body',
+ $store.state.control.windowWidth >= 1024 ? 'tooRowSearch' : '',
+ ]"
+ >
<avue-crud
v-model="obj"
class="company-box"
@@ -18,6 +23,7 @@
:table-loading="questionBankLoading"
:data="questionBankData"
ref="questionBankCrud"
+ @sort-change="sortChange"
:permission="permissionList"
:page.sync="questionBankPage"
@on-load="questionBankOnLoad"
@@ -144,6 +150,8 @@
// title: '成绩',
align: "center",
height: "auto",
+ sort:"",
+ sortName:"",
calcHeight: 80,
tip: false,
searchShow: true,
@@ -156,6 +164,7 @@
menu: false,
menuWidth: 136,
labelWidth: 120,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "考试时间",
@@ -187,6 +196,7 @@
prop: "examName",
search: true,
searchSpan: 5,
+ searchLabelWidth: 80,
slot: true,
viewDisplay: false,
// 表单新增时是否禁止
@@ -216,6 +226,7 @@
prop: "securityName",
search: true,
searchSpan: 3,
+ searchLabelWidth: 50,
slot: true,
viewDisplay: true,
// 表单新增时是否禁止
@@ -245,7 +256,7 @@
label: "身份证号",
prop: "account",
search: true,
- searchSpan: 4,
+ searchSpan: 5,
slot: true,
// 表单新增时是否禁止
addDisabled: false,
@@ -378,7 +389,7 @@
type: "select",
slot: true,
search: true,
- searchSpan: 3,
+ searchSpan: 4,
dicData: [
{
label: "发布成绩",
@@ -387,6 +398,10 @@
{
label: "考试中",
value: 3,
+ },
+ {
+ label: "缺考",
+ value: 4,
},
],
width: 90,
@@ -414,6 +429,7 @@
label: "理论成绩",
prop: "theoryGrade",
slot: true,
+ sortable: true,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
@@ -432,6 +448,7 @@
label: "实操成绩",
prop: "learnGrade",
slot: true,
+ sortable: true,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
@@ -453,6 +470,7 @@
label: "总成绩",
prop: "allGrade",
slot: true,
+ sortable: true,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
@@ -480,8 +498,8 @@
type: "select",
slot: true,
search: true,
- searchSpan: 3,
- width: 110,
+ searchSpan: 4,
+ // width: 110,
width: 68,
dicData: [
{
@@ -525,7 +543,8 @@
questionBankPage: {
pageSize: 10,
currentPage: 1,
- total: 16,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
},
questionBankQuery: {},
questionBankSelectionList: [],
@@ -561,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;
@@ -570,7 +610,11 @@
roleIds.forEach((roleId) => {
getRoleDetail(roleId).then((res) => {
var roleAlias = res.data.data.roleAlias;
- if (roleAlias == "保安公司管理员" || roleAlias == "保安") {
+ if (
+ roleAlias == "保安公司管理员" ||
+ roleAlias == "保安" ||
+ roleAlias == "分公司管理员"
+ ) {
//如果是保安公司管理员
params["deptId"] = that.userInfo.dept_id;
}
@@ -580,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