From 7c124560b27add087b4aa8fc457de1e84f950d9c Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 23 Nov 2021 15:19:33 +0800
Subject: [PATCH] 样式 (1:搜索按钮放入右侧,2:隐藏表格显影按钮,3:页码改为(15,30,50,100))
---
src/views/exam/singleperformance.vue | 127 ++++++++++++++++++++++++------------------
1 files changed, 73 insertions(+), 54 deletions(-)
diff --git a/src/views/exam/singleperformance.vue b/src/views/exam/singleperformance.vue
index 8f4ed78..2818aa9 100644
--- a/src/views/exam/singleperformance.vue
+++ b/src/views/exam/singleperformance.vue
@@ -1,15 +1,20 @@
/*
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-18 21:02:10
+ * @Last Modified by: liu
+ * @Last Modified time: 2021-11-23 14:18:07
* 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 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
v-model="obj"
class="company-box"
@@ -37,7 +42,15 @@
{{ row.learnGrade == -1 ? "" : row.allGrade }}
</template>
<template slot-scope="{ row }" slot="qualified">
- {{ row.learnGrade == -1 ? "" : row.qualified == 0?"合格":row.qualified==1?"不合格":'' }}
+ {{
+ row.learnGrade == -1
+ ? ""
+ : row.qualified == 0
+ ? "合格"
+ : row.qualified == 1
+ ? "不合格"
+ : ""
+ }}
</template>
<template slot-scope="{ row }" slot="menu">
@@ -46,7 +59,7 @@
size="mini"
icon="el-icon-collection"
class="start-kaoshi"
- :disabled="row.qualified==1"
+ :disabled="row.qualified == 1"
v-if="permission.singleperformance_print"
@click="securityPrint(row)"
>保安证打印
@@ -134,6 +147,7 @@
menu: true,
menuWidth: 136,
labelWidth: 120,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "考试名称",
@@ -141,7 +155,7 @@
search: true,
searchSpan: 4,
slot: true,
- viewDisplay:false,
+ viewDisplay: false,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
@@ -162,7 +176,7 @@
},
],
// overHidden:true,
- width:230,
+ width: 230,
},
{
label: "用户名",
@@ -189,7 +203,7 @@
trigger: "blur",
},
],
- width:160,
+ width: 160,
},
{
label: "所属公司",
@@ -221,7 +235,7 @@
trigger: "blur",
},
],
- width:250,
+ width: 250,
},
{
label: "考试开始时间",
@@ -342,26 +356,28 @@
],
},
{
- label: "总成绩",
- prop: "allGrade",
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [{
- required: true,
- message: "请输入考试名称",
- trigger: "blur"
- }]
+ label: "总成绩",
+ prop: "allGrade",
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入考试名称",
+ trigger: "blur",
+ },
+ ],
},
{
label: "是否合格",
@@ -413,12 +429,13 @@
pageSize: 10,
currentPage: 1,
total: 16,
+ ...this.$store.state.control.changePageSize,
},
questionBankQuery: {},
questionBankSelectionList: [],
};
},
- computed:{
+ computed: {
...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
@@ -426,7 +443,10 @@
viewBtn: this.vaildData(null, false),
delBtn: this.vaildData(null, false),
editBtn: this.vaildData(this.permission.user_edit, false),
- excelBtn: this.vaildData(this.permission.singleperformance_export, false),
+ excelBtn: this.vaildData(
+ this.permission.singleperformance_export,
+ false
+ ),
};
},
},
@@ -449,31 +469,30 @@
var roleIds = this.userInfo.role_id.split(",");
roleIds.forEach((roleId) => {
getRoleDetail(roleId).then((res) => {
- var roleAlias = res.data.data.roleAlias;
- if (
- roleAlias == "保安公司管理员" ||
- roleAlias == "保安" ||
- roleAlias == "未持证保安"
- ) {
- //如果是保安公司管理员
- params["deptId"] = that.userInfo.dept_id;
- }
+ var roleAlias = res.data.data.roleAlias;
+ if (
+ roleAlias == "保安公司管理员" ||
+ roleAlias == "保安" ||
+ roleAlias == "未持证保安"
+ ) {
+ //如果是保安公司管理员
+ params["deptId"] = that.userInfo.dept_id;
+ }
+ that.questionBankLoading = false;
+ params["examType"] = 1;
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ that.questionBankPage.total = data.total;
+ that.questionBankData = data.records;
that.questionBankLoading = false;
- params["examType"] = 1;
- getList(
- page.currentPage,
- page.pageSize,
- Object.assign(params, this.query)
- ).then((res) => {
- const data = res.data.data;
- that.questionBankPage.total = data.total;
- that.questionBankData = data.records;
- that.questionBankLoading = false;
- that.questionBankSelectionClear();
- });
- })
+ that.questionBankSelectionClear();
+ });
+ });
});
-
},
questionBankSelectionClear() {
this.questionBankSelectionList = [];
--
Gitblit v1.9.3