From dfab34be7b7456714b57b96e49c95725c3815da5 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 28 Sep 2021 16:56:08 +0800
Subject: [PATCH] 权限
---
src/views/securityUnit/localCompany.vue | 10
src/store/modules/user.js | 2
src/views/securityGuard/securityGuard.vue | 42
src/views/exam/examPayment.vue | 262 +++---
src/views/trainExam/performance.vue | 200 +++--
src/views/trainExam/singleperformance.vue | 171 +++-
src/views/securityGuard/data.js | 1177 +++++++++++++++++----------------
src/views/securityUnit/data.js | 100 ++
src/views/securityAnalysis/child/dispatch.vue | 22
src/views/securityAnalysis/index.vue | 5
src/views/dispatch/dispatch.vue | 92 ++
11 files changed, 1,156 insertions(+), 927 deletions(-)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 3bcbcc3..4a4cbcb 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -204,7 +204,7 @@
}
}
doItOnce(ele, "考试管理", "成绩查看");
- doItOnce(ele, "培训管理", "培训考试报名");
+ doItOnce(ele, "培训管理", "培训考试成绩查看");
addPath(ele, true);
});
commit('SET_MENU_ALL', menu)
diff --git a/src/views/dispatch/dispatch.vue b/src/views/dispatch/dispatch.vue
index e3800af..8513015 100644
--- a/src/views/dispatch/dispatch.vue
+++ b/src/views/dispatch/dispatch.vue
@@ -112,6 +112,15 @@
import { mapState } from "vuex";
export default {
data() {
+ var phones = (rule, value, callback) => {
+ window.yanzhengphons =
+ /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/;
+ if (!yanzhengphons.test(value)) {
+ callback(new Error("请输入正确电话"));
+ } else {
+ callback();
+ }
+ };
return {
typeTABS: {}, //标签页
deptId: "",
@@ -218,7 +227,14 @@
searchSpan: 4,
width: 210,
// span: 12,
- labelWidth: 118,
+ labelWidth: 138,
+ rules: [
+ {
+ required: true,
+ message: "请输入名称",
+ trigger: "click",
+ },
+ ],
},
{
label: "保安公司",
@@ -242,7 +258,7 @@
trigger: "click",
},
],
- labelWidth: 118,
+ labelWidth: 138,
width: 230,
searchLabelWidth: 80,
search: true,
@@ -260,7 +276,7 @@
searchSpan: 4,
overHidden: true,
// span: 12,
- labelWidth: 118,
+ labelWidth: 138,
},
{
label: "合同生效时间",
@@ -293,7 +309,7 @@
search: true,
searchSpan: 4,
overHidden: true,
- labelWidth: 118,
+ labelWidth: 138,
type: "tree",
dicUrl: "/api/jurisdiction/lazy-tree",
props: {
@@ -319,7 +335,7 @@
editDisplay: false,
viewDisplay: false,
overHidden: true,
- labelWidth: 118,
+ labelWidth: 138,
type: "tree",
dicUrl: "/api/jurisdiction/lazy-tree",
props: {
@@ -339,40 +355,96 @@
// {
// label: " 派遣人数",
// prop: "num",
- // labelWidth: 118,
+ // labelWidth: 138,
+ // },
+ // {
+ // label: "合同生效时间",
+ // prop: "releaseTimeRange",
+ // type: "date",
+ // format: "yyyy-MM-dd",
+ // valueFormat: "yyyy-MM-dd",
+ // searchValue: [this.getStartTime(), this.getEndTime()],
+ // // searchRange: true,
+ // searchSpan: 5,
+ // searchLabelWidth: 110,
+ // hide: true,
+ // value: [this.getStartTime(), this.getEndTime()],
+ // // addDisplay: false,
+ // // editDisplay: false,
+ // // viewDisplay: false,
+ // range: true,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入时间",
+ // trigger: "blur",
+ // },
+ // ],
// },
{
label: "合同开始时间",
prop: "startTime",
- labelWidth: 118,
+ labelWidth: 138,
type: "date",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
// search: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择开始时间",
+ trigger: "click",
+ },
+ ],
// searchSpan: 4,
// overHidden: true
},
{
label: "合同结束时间",
prop: "endTime",
- labelWidth: 118,
+ labelWidth: 138,
type: "date",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
// search: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择结束时间",
+ trigger: "click",
+ },
+ ],
// searchSpan: 4,
// overHidden: true
},
{
label: " 负责人",
prop: "linkman",
- labelWidth: 118,
+ labelWidth: 138,
+ rules: [
+ {
+ required: true,
+ message: "请输入负责人",
+ trigger: "click",
+ },
+ ],
},
{
label: "负责人联系方式",
prop: "phone",
- labelWidth: 118,
+ labelWidth: 138,
width: 110,
+ rules: [
+ {
+ required: true,
+ message: "请输入联系方式",
+ trigger: "click",
+ },
+ {
+ validator: phones,
+ trigger: ["change", "blur"],
+ },
+ ],
},
],
},
diff --git a/src/views/exam/examPayment.vue b/src/views/exam/examPayment.vue
index 6ea508b..e19ccd6 100644
--- a/src/views/exam/examPayment.vue
+++ b/src/views/exam/examPayment.vue
@@ -1,8 +1,8 @@
/*
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-18 19:44:47
+ * @Last Modified by: liu
+ * @Last Modified time: 2021-09-28 11:45:28
* menu-name 考试缴费管理
*/
<template>
@@ -28,6 +28,7 @@
@size-change="questionBankSizeChange"
@row-del="rowDel"
@row-update="questionBankRowUpdate"
+ @refresh-change="refreshChange"
>
<template slot-scope="{ row }" slot="sex">
<el-tag v-if="row.sex == 1">男</el-tag>
@@ -61,13 +62,13 @@
<template slot-scope="{ row }" slot="menu">
<el-button
- style="display:none"
+ style="display: none"
type="text"
size="mini"
icon="el-icon-collection"
class="start-kaoshi"
v-if="permission.performance_print"
- :disabled="row.qualified==1"
+ :disabled="row.qualified == 1"
@click="securityPrint(row)"
>保安证打印
</el-button>
@@ -75,11 +76,11 @@
</avue-crud>
<el-dialog
- title="缴费凭证批量上传"
- append-to-body
- :visible.sync="excelBox"
- width="555px"
- >
+ title="缴费凭证批量上传"
+ append-to-body
+ :visible.sync="excelBox"
+ width="555px"
+ >
<avue-form
:option="excelOption"
v-model="excelForm"
@@ -94,7 +95,7 @@
</template>
<script>
-import { getExamPaymentList, update,remove } from "@/api/exam/examPayment";
+import { getExamPaymentList, update, remove } from "@/api/exam/examPayment";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
@@ -128,107 +129,107 @@
labelWidth: 120,
column: [
- // {
- // label: "缴费类型",
- // prop: "type",
- // dicData:[
- // {
- // label:"公司缴费",
- // value: 1
- // },
- // {
- // label:"个人缴费",
- // value: 2
- // }
- // ],
- // searchSpan: 4,
- // search: true,
- // type: "select",
- // },
+ // {
+ // label: "缴费类型",
+ // prop: "type",
+ // dicData:[
+ // {
+ // label:"公司缴费",
+ // value: 1
+ // },
+ // {
+ // label:"个人缴费",
+ // value: 2
+ // }
+ // ],
+ // searchSpan: 4,
+ // search: true,
+ // type: "select",
+ // },
+ {
+ label: "缴费人",
+ prop: "realName",
+ search: true,
+ searchSpan: 4,
+ },
+ {
+ label: "身份证号",
+ prop: "idCardNo",
+ search: true,
+ searchSpan: 4,
+ },
+ {
+ label: "性别",
+ prop: "sex",
+ slot: true,
+ dicData: [
{
- label: "缴费人",
- prop: "realName",
- search:true,
- searchSpan:4,
+ label: "男",
+ value: 1,
},
{
- label: "身份证号",
- prop: "idCardNo",
- search:true,
- searchSpan:4,
+ label: "女",
+ value: 2,
},
+ ],
+ },
+ {
+ label: "联系方式",
+ prop: "phone",
+ },
+ {
+ label: "所在单位",
+ prop: "deptName",
+ search: true,
+ searchSpan: 6,
+ },
+ // {
+ // label: "缴费状态",
+ // prop: "paymentStatus",
+ // searchSpan: 4,
+ // search: true,
+ // dicData: [
+ // {
+ // label:"已缴费",
+ // value:1
+ // },
+ // {
+ // label:"未缴费",
+ // value:2
+ // },
+ // {
+ // label:"部分缴费",
+ // value:3
+ // },
+ // ],
+ // type: "select",
+ // },
+ {
+ label: "缴费凭证",
+ prop: "certificateUrl",
+ overHidden: true,
+ type: "upload",
+ listType: "picture-img",
+ },
+ {
+ label: "缴费时间",
+ prop: "paymentTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ labelWidth: 120,
+ searchSpan: 4,
+ // search: true,
+ overHidden: true,
+ rules: [
{
- label: "性别",
- prop: "sex",
- slot:true,
- dicData: [
- {
- label:"男",
- value:1
- },
- {
- label:"女",
- value:2
- }
- ],
+ required: true,
+ message: "请输入时间",
+ trigger: "click",
},
- {
- label: "联系方式",
- prop: "phone",
- },
- {
- label: "所在单位",
- prop: "deptName",
- search:true,
- searchSpan:6,
- },
- // {
- // label: "缴费状态",
- // prop: "paymentStatus",
- // searchSpan: 4,
- // search: true,
- // dicData: [
- // {
- // label:"已缴费",
- // value:1
- // },
- // {
- // label:"未缴费",
- // value:2
- // },
- // {
- // label:"部分缴费",
- // value:3
- // },
- // ],
- // type: "select",
- // },
- {
- label: "缴费凭证",
- prop: "certificateUrl",
- overHidden: true,
- type: "upload",
- listType: "picture-img",
- },
- {
- label: "缴费时间",
- prop: "paymentTime",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- labelWidth: 120,
- searchSpan: 4,
- // search: true,
- overHidden: true,
- rules: [
- {
- required: true,
- message: "请输入时间",
- trigger: "click",
- },
- ],
- },
- ],
+ ],
+ },
+ ],
},
questionBankSearch: {},
questionBankLoading: true,
@@ -256,13 +257,14 @@
res: "data",
},
tip: "请上传 zip 压缩文件",
- action: "/api/blade-resource/oss/endpoint/put-file-exam-payment-zip",
- }
+ action:
+ "/api/blade-resource/oss/endpoint/put-file-exam-payment-zip",
+ },
],
},
};
},
- computed:{
+ computed: {
...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
@@ -281,37 +283,23 @@
//判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩
var that = this;
//获取当前登录人员的角色信息
- 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;
- }
- that.questionBankLoading = false;
- params["examType"] = 1;
- getExamPaymentList(
- 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();
- });
- })
+ if (this.userInfo.role_name == "保安公司管理员") {
+ params["deptId"] = this.userInfo.dept_id;
+ }
+ getExamPaymentList(
+ 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();
});
-
},
- rowDel(row) {
+ rowDel(row) {
this.$confirm("确定删除当前缴费数据?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@@ -384,7 +372,7 @@
done();
},
refreshChange() {
- this.questionBankOnLoad(this.page, this.query);
+ this.questionBankOnLoad(this.questionBankPage, this.questionBankQuery);
},
},
};
diff --git a/src/views/securityAnalysis/child/dispatch.vue b/src/views/securityAnalysis/child/dispatch.vue
index f82a5b6..455326f 100644
--- a/src/views/securityAnalysis/child/dispatch.vue
+++ b/src/views/securityAnalysis/child/dispatch.vue
@@ -73,17 +73,17 @@
// span: 12,
labelWidth: 118,
},
- {
- label: "派遣单位地址",
- prop: "address",
- search: false,
- searchLabelWidth: 110,
- overHidden: true,
- searchSpan: 4,
- width: 210,
- // span: 12,
- labelWidth: 118,
- },
+ // {
+ // label: "派遣单位地址",
+ // prop: "address",
+ // search: false,
+ // searchLabelWidth: 110,
+ // overHidden: true,
+ // searchSpan: 4,
+ // width: 210,
+ // // span: 12,
+ // labelWidth: 118,
+ // },
{
label: "保安公司",
prop: "deptName",
diff --git a/src/views/securityAnalysis/index.vue b/src/views/securityAnalysis/index.vue
index 19fdec0..ed69d55 100644
--- a/src/views/securityAnalysis/index.vue
+++ b/src/views/securityAnalysis/index.vue
@@ -257,7 +257,10 @@
myTool1: {
show: true,
title: "",
- icon: "image://img/table.png",
+ // icon: "path://M432.45,595.444c0,2.177-4.661,6.82-11.305,6.82c-6.475,0-11.306-4.567-11.306-6.82s4.852-6.812,11.306-6.812C427.841,588.632,432.452,593.191,432.45,595.444L432.45,595.444z M421.155,589.876c-3.009,0-5.448,2.495-5.448,5.572s2.439,5.572,5.448,5.572c3.01,0,5.449-2.495,5.449-5.572C426.604,592.371,424.165,589.876,421.155,589.876L421.155,589.876z M421.146,591.891c-1.916,0-3.47,1.589-3.47,3.549c0,1.959,1.554,3.548,3.47,3.548s3.469-1.589,3.469-3.548C424.614,593.479,423.062,591.891,421.146,591.891L421.146,591.891zM421.146,591.891",
+ // icon: "image://http://echarts.baidu.com/images/favicon.png",
+ icon: "image://http://223.82.109.183:2080/img/table.png",
+ // icon: "M271.68 304.64h472a32 32 0 1 0 0-64h-472a32 32 0 0 0 0 64z m0 234.88h408.64a32 32 0 0 0 0-64H271.68a32 32 0 1 0 0 64z m0 198.4h376.64a32 32 0 1 0 0-64H271.68a32 32 0 0 0 0 64z",
onclick: function () {
that.dialogVisible = true;
that.sees = id;
diff --git a/src/views/securityGuard/data.js b/src/views/securityGuard/data.js
index 2df2cec..e947cfa 100644
--- a/src/views/securityGuard/data.js
+++ b/src/views/securityGuard/data.js
@@ -1,314 +1,314 @@
//保安员基本信息
export var securityBaseInfoColumn = [{
- label: "",
- labelWidth: "20",
- type: 'title',
- prop: "title",
- span: 24,
- styles: {
- fontSize: '24px'
- }
- },
- {
- label: "所属保安公司",
- prop: "deptId",
- type: "tree",
- dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
- // dicUrl: "/api/blade-system/dept/lazy-tree?parentId=0",
- props: {
- label: "title",
- value: "id",
- },
- disabled: true,
- span: 24,
- },
- {
- label: "登录账号",
- prop: "account",
- disabled: true
- },
- {
- label: "用户姓名",
- prop: "realName",
- disabled: true,
- },
- {
- label: "用户昵称",
- prop: "name",
- disabled: true
- },
- {
- label: "手机号码",
- prop: "phone",
- disabled: true
- },
- {
- label: "电子邮箱",
- prop: "email",
- disabled: true
- },
- {
- label: "身份证号",
- prop: "cardid",
- disabled: true
- },
- {
- label: "籍贯",
- prop: "nativeplace",
- disabled: true
- },
- {
- label: "民族",
- prop: "nation",
- disabled: true
- },
- {
- label: "是否持证",
- prop: "hold",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage",
- props: {
- label: "dictValue",
- value: "dictKey",
- },
- type: "select",
- disabled: true
- },
- {
- label: "保安员证编号",
- prop: "securitynumber",
- disabled: true
- },
- {
- label: "所属辖区",
- prop: "jurisdiction",
- // multiple: true,
- type: "tree",
- dicUrl: "/api/jurisdiction/lazy-tree",
- props: {
- label: "title",
- value: "id",
- },
- disabled: true
- },
- {
- label: "最高学历",
- prop: "education",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- slot: true,
- disabled: true
- },
- {
- label: "政治面貌",
- prop: "politicaloutlook",
- disabled: true
- },
- {
- label: "身高",
- prop: "height",
- disabled: true
- },
- {
- label: "联系地址",
- prop: "address",
- disabled: true
- },
- {
- label: "户口所在地",
- prop: "registered",
- disabled: true
- },
- {
- label: "入职时间",
- prop: "rtime",
- type: 'date',
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- disabled: true
- },
- {
- label: "用户性别",
- prop: "sex",
- type: "select",
- dicData: [{
- label: "男",
- value: 1
- },
- {
- label: "女",
- value: 2
- },
- {
- label: "未知",
- value: 3
- }
- ],
- disabled: true
- },
- {
- label: "用户生日",
- type: "date",
- prop: "birthday",
- disabled: true
+ label: "",
+ labelWidth: "20",
+ type: 'title',
+ prop: "title",
+ span: 24,
+ styles: {
+ fontSize: '24px'
}
+},
+{
+ label: "所属保安公司",
+ prop: "deptId",
+ type: "tree",
+ dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
+ // dicUrl: "/api/blade-system/dept/lazy-tree?parentId=0",
+ props: {
+ label: "title",
+ value: "id",
+ },
+ disabled: true,
+ span: 24,
+},
+{
+ label: "登录账号",
+ prop: "account",
+ disabled: true
+},
+{
+ label: "用户姓名",
+ prop: "realName",
+ disabled: true,
+},
+{
+ label: "用户昵称",
+ prop: "name",
+ disabled: true
+},
+{
+ label: "手机号码",
+ prop: "phone",
+ disabled: true
+},
+{
+ label: "电子邮箱",
+ prop: "email",
+ disabled: true
+},
+{
+ label: "身份证号",
+ prop: "cardid",
+ disabled: true
+},
+{
+ label: "籍贯",
+ prop: "nativeplace",
+ disabled: true
+},
+{
+ label: "民族",
+ prop: "nation",
+ disabled: true
+},
+{
+ label: "是否持证",
+ prop: "hold",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ type: "select",
+ disabled: true
+},
+{
+ label: "保安员证编号",
+ prop: "securitynumber",
+ disabled: true
+},
+{
+ label: "所属辖区",
+ prop: "jurisdiction",
+ // multiple: true,
+ type: "tree",
+ dicUrl: "/api/jurisdiction/lazy-tree",
+ props: {
+ label: "title",
+ value: "id",
+ },
+ disabled: true
+},
+{
+ label: "最高学历",
+ prop: "education",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ slot: true,
+ disabled: true
+},
+{
+ label: "政治面貌",
+ prop: "politicaloutlook",
+ disabled: true
+},
+{
+ label: "身高",
+ prop: "height",
+ disabled: true
+},
+{
+ label: "联系地址",
+ prop: "address",
+ disabled: true
+},
+{
+ label: "户口所在地",
+ prop: "registered",
+ disabled: true
+},
+{
+ label: "入职时间",
+ prop: "rtime",
+ type: 'date',
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ disabled: true
+},
+{
+ label: "用户性别",
+ prop: "sex",
+ type: "select",
+ dicData: [{
+ label: "男",
+ value: 1
+ },
+ {
+ label: "女",
+ value: 2
+ },
+ {
+ label: "未知",
+ value: 3
+ }
+ ],
+ disabled: true
+},
+{
+ label: "用户生日",
+ type: "date",
+ prop: "birthday",
+ disabled: true
+}
]
export var securityBaseInfoColumns = [{
- label: "所属保安单位",
- prop: "tenantId",
- type: "tree",
- dicUrl: "/api/blade-system/tenant/select",
- props: {
- label: "tenantName",
- value: "tenantId"
- },
- disabled: true,
- span: 24,
+ label: "所属保安单位",
+ prop: "tenantId",
+ type: "tree",
+ dicUrl: "/api/blade-system/tenant/select",
+ props: {
+ label: "tenantName",
+ value: "tenantId"
+ },
+ disabled: true,
+ span: 24,
+},
+{
+ label: "登录账号",
+ prop: "account",
+ disabled: true
+},
+{
+ label: "用户姓名",
+ prop: "realName",
+ rules: [{
+ required: true,
+ message: "请输入用户姓名",
+ trigger: "blur"
+ }, {
+ min: 2,
+ max: 5,
+ message: '姓名长度在2到5个字符'
+ }]
+},
+{
+ label: "用户昵称",
+ prop: "name"
+},
+{
+ label: "手机号码",
+ prop: "phone",
+ overHidden: true,
+ rules: [{
+ required: true,
+ message: "请输入手机号",
+ trigger: "blur"
+ }]
+},
+{
+ label: "电子邮箱",
+ prop: "email",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "身份证号",
+ prop: "cardid",
+ hide: true,
+ overHidden: true,
+ rules: [{
+ required: true,
+ message: "请输入身份证号",
+ trigger: "blur"
+ }]
+},
+{
+ label: "籍贯",
+ prop: "nativeplace",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "民族",
+ prop: "nation",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "最高学历",
+ prop: "education",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请选择学历",
+ trigger: "blur"
+ }]
+},
+{
+ label: "政治面貌",
+ prop: "politicaloutlook",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "身高",
+ prop: "height",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "联系地址",
+ prop: "address",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "户口所在地",
+ prop: "registered",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "入职时间",
+ prop: "rtime",
+ type: 'date',
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "用户性别",
+ prop: "sex",
+ type: "select",
+ dicData: [{
+ label: "男",
+ value: 1
},
{
- label: "登录账号",
- prop: "account",
- disabled: true
+ label: "女",
+ value: 2
},
{
- label: "用户姓名",
- prop: "realName",
- rules: [{
- required: true,
- message: "请输入用户姓名",
- trigger: "blur"
- }, {
- min: 2,
- max: 5,
- message: '姓名长度在2到5个字符'
- }]
- },
- {
- label: "用户昵称",
- prop: "name"
- },
- {
- label: "手机号码",
- prop: "phone",
- overHidden: true,
- rules: [{
- required: true,
- message: "请输入手机号",
- trigger: "blur"
- }]
- },
- {
- label: "电子邮箱",
- prop: "email",
- hide: true,
- overHidden: true
- },
- {
- label: "身份证号",
- prop: "cardid",
- hide: true,
- overHidden: true,
- rules: [{
- required: true,
- message: "请输入身份证号",
- trigger: "blur"
- }]
- },
- {
- label: "籍贯",
- prop: "nativeplace",
- hide: true,
- overHidden: true
- },
- {
- label: "民族",
- prop: "nation",
- hide: true,
- overHidden: true
- },
- {
- label: "最高学历",
- prop: "education",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- slot: true,
- rules: [{
- required: true,
- message: "请选择学历",
- trigger: "blur"
- }]
- },
- {
- label: "政治面貌",
- prop: "politicaloutlook",
- hide: true,
- overHidden: true
- },
- {
- label: "身高",
- prop: "height",
- hide: true,
- overHidden: true
- },
- {
- label: "联系地址",
- prop: "address",
- hide: true,
- overHidden: true
- },
- {
- label: "户口所在地",
- prop: "registered",
- hide: true,
- overHidden: true
- },
- {
- label: "入职时间",
- prop: "rtime",
- type: 'date',
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- hide: true,
- overHidden: true
- },
- {
- label: "用户性别",
- prop: "sex",
- type: "select",
- dicData: [{
- label: "男",
- value: 1
- },
- {
- label: "女",
- value: 2
- },
- {
- label: "未知",
- value: 3
- }
- ],
- hide: true
- },
- {
- label: "用户生日",
- type: "date",
- prop: "birthday",
- hide: true
+ label: "未知",
+ value: 3
}
+ ],
+ hide: true
+},
+{
+ label: "用户生日",
+ type: "date",
+ prop: "birthday",
+ hide: true
+}
]
@@ -400,62 +400,62 @@
//表现
export var trackRecordColumn = [{
- label: "id",
- prop: "id",
- hide: true,
- editDisplay: false,
- addDisplay: false
- }, {
- label: '时间',
- type: 'date',
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- prop: "time",
- formslot: true,
+ label: "id",
+ prop: "id",
+ hide: true,
+ editDisplay: false,
+ addDisplay: false
+}, {
+ label: '时间',
+ type: 'date',
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ prop: "time",
+ formslot: true,
+},
+// {
+// label: '工作态度',
+// prop: "workingattitude",
+// formslot: true,
+// },
+{
+ label: '工作表现',
+ prop: "achievements",
+ formslot: true,
+}, {
+ label: '表现评定',
+ prop: "score",
+ type: "select",
+ // dicUrl: "/api/blade-system/dict-biz/dictionary?code=scoreType",
+ // props: {
+ // label: "dictValue",
+ // value: "dictKey"
+ // },
+ dicData: [{
+ label: "优秀",
+ value: 0
},
- // {
- // label: '工作态度',
- // prop: "workingattitude",
- // formslot: true,
- // },
{
- label: '工作表现',
- prop: "achievements",
- formslot: true,
- }, {
- label: '表现评定',
- prop: "score",
- type: "select",
- // dicUrl: "/api/blade-system/dict-biz/dictionary?code=scoreType",
- // props: {
- // label: "dictValue",
- // value: "dictKey"
- // },
- dicData: [{
- label: "优秀",
- value: 0
- },
- {
- label: "良好",
- value: 1
- },
- {
- label: "一般",
- value: 2
- },
- {
- label: "差",
- value: 3
- },
- ],
- dataType: "number",
- slot: true,
- rules: [{
- required: true,
- message: "请选择表现",
- trigger: "blur"
- }]
- }
+ label: "良好",
+ value: 1
+ },
+ {
+ label: "一般",
+ value: 2
+ },
+ {
+ label: "差",
+ value: 3
+ },
+ ],
+ dataType: "number",
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请选择表现",
+ trigger: "blur"
+ }]
+}
// {
// label: '服务公司',
// prop: "departmentName",
@@ -465,244 +465,259 @@
export var securityFormPageColumn = [{
- label: "姓名",
- prop: "realName",
- search: true,
- searchSpan: 3,
- width: 60,
- searchLabelWidth: 50,
- display: false
+ label: "姓名",
+ prop: "realName",
+ search: true,
+ searchSpan: 3,
+ width: 60,
+ searchLabelWidth: 50,
+ display: false
+},
+{
+ label: "所属保安公司",
+ searchLabelWidth: "110",
+ // prop: "deptName",
+ prop: "deptId",
+ type: "tree",
+ dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
+ props: {
+ label: "title",
+ value: "id",
+ },
+ // hide: true,
+ slot: true,
+ searchSpan: 5,
+ display: false,
+ search: true,
+ minWidth: 260
+},
+// {
+// label: "所属保安公司",
+// searchLabelWidth: "110",
+// prop: "deptName",
+// // type: "tree",
+// // dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
+// // props: {
+// // label: "title",
+// // value: "id",
+// // },
+// // slot: true,
+// // searchSpan: 5,
+// display: false,
+// // search: true,
+// minWidth: 260
+// },
+{
+ label: "性别",
+ prop: "sex",
+ width: 80,
+ type: "select",
+ dicData: [{
+ label: "男",
+ value: 1,
},
{
- label: "所属保安公司",
- searchLabelWidth: "110",
- // prop: "deptName",
- prop: "deptId",
- type: "tree",
- dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
- props: {
- label: "title",
- value: "id",
- },
- // hide: true,
- slot: true,
- searchSpan: 5,
- display: false,
- search: true,
- minWidth: 260
+ label: "女",
+ value: 2,
},
- // {
- // label: "所属保安公司",
- // searchLabelWidth: "110",
- // prop: "deptName",
- // // type: "tree",
- // // dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
- // // props: {
- // // label: "title",
- // // value: "id",
- // // },
- // // slot: true,
- // // searchSpan: 5,
- // display: false,
- // // search: true,
- // minWidth: 260
- // },
- {
- label: "性别",
- prop: "sex",
- width: 80,
- type: "select",
- dicData: [{
- label: "男",
- value: 1,
- },
- {
- label: "女",
- value: 2,
- },
- // {
- // label: "未知",
- // value: 3,
- // },
- ],
- display: false
- },
- {
- label: "身份证号码",
- prop: "cardid",
- search: true,
- searchLabelWidth: 90,
- searchSpan: 5,
- minWidth: 140,
- display: false
- },
+ // {
+ // label: "未知",
+ // value: 3,
+ // },
+ ],
+ display: false
+},
+{
+ label: "身份证号码",
+ prop: "cardid",
+ search: true,
+ searchLabelWidth: 90,
+ searchSpan: 5,
+ minWidth: 140,
+ display: false
+},
- {
- label: "籍贯",
- prop: "nativeplace",
- hide: true,
- display: false
- },
- {
- label: "民族",
- prop: "nation",
- hide: true,
- width: 55,
- display: false
- },
+{
+ label: "籍贯",
+ prop: "nativeplace",
+ hide: true,
+ display: false
+},
+{
+ label: "民族",
+ prop: "nation",
+ hide: true,
+ width: 55,
+ display: false
+},
- {
- label: "出生日期",
- prop: "birthday",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- display: false,
- hide: true,
+{
+ label: "出生日期",
+ prop: "birthday",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ display: false,
+ hide: true,
+},
+{
+ label: "年龄",
+ prop: "age",
+ width: 55,
+ display: false
+},
+{
+ label: "学历",
+ prop: "education",
+ display: false,
+ width: 90,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
},
- {
- label: "年龄",
- prop: "age",
- width: 55,
- display: false
- },
- {
- label: "学历",
- prop: "education",
- display: false,
- width: 90,
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
- props: {
- label: "dictValue",
- value: "dictKey"
+ type: "select",
+ // hide: true,
+ rules: [{
+ required: true,
+ message: "请选择学历",
+ trigger: "blur"
+ }],
+},
+{
+ label: "联系电话",
+ prop: "phone",
+ minWidth: 100,
+ display: false
+},
+{
+ label: "健康状态",
+ prop: "healstats",
+ hide: true,
+ display: false
+},
+{
+ label: "保安证编号",
+ prop: "securitynumber",
+ search: true,
+ searchLabelWidth: 90,
+ minWidth: 105,
+ searchSpan: 4,
+ addDisplay: false,
+ editDisplay: false,
+ // hide: true,
+},
+{
+ label: "入职时间",
+ prop: "rtime",
+ hide: true,
+ display: false
+},
+// {
+// label: "是否派遣",
+// prop: "dispatch",
+// // hide: true,
+// type: 'select',
+// // display: false,
+// dicData: [
+// {
+// label: '未派遣',
+// value: 1
+// }, {
+// label: '已派遣',
+// value: 0
+// }
+// ]
+// },
+{
+ label: '是否派遣',
+ prop: 'dispatch',
+ type: 'select',
+ editDisplay: false,
+ addDisplay: false,
+ dicData: [{
+ label: '未派遣',
+ value: '1'
+ }, {
+ label: '已派遣',
+ value: '0'
+ }]
+},
+{
+ label: "是否持证",
+ prop: "hold",
+ slot: true,
+ search: true,
+ searchSpan: 3,
+ width: 69,
+ type: "select",
+ dicData: [
+ {
+ label: "是",
+ value: "1",
},
- type: "select",
- // hide: true,
- rules: [{
- required: true,
- message: "请选择学历",
- trigger: "blur"
- }],
- },
- {
- label: "联系电话",
- prop: "phone",
- minWidth: 100,
- display: false
- },
- {
- label: "健康状态",
- prop: "healstats",
- hide: true,
- display: false
- },
- {
- label: "保安证编号",
- prop: "securitynumber",
- search: true,
- searchLabelWidth: 90,
- minWidth: 105,
- searchSpan: 4,
- addDisplay: false,
- editDisplay: false,
- // hide: true,
- },
- {
- label: "入职时间",
- prop: "rtime",
- hide: true,
- display: false
- },
- // {
- // label: "是否派遣",
- // prop: "dispatch",
- // // hide: true,
- // type: 'select',
- // // display: false,
- // dicData: [
- // {
- // label: '未派遣',
- // value: 1
- // }, {
- // label: '已派遣',
- // value: 0
- // }
- // ]
+ {
+ label: "否",
+ value: "2",
+ },
+ {
+ label: "已吊销",
+ value: "3",
+ },
+ ],
+ display: false,
+ // dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage",
+ // props: {
+ // label: "dictValue",
+ // value: "dictKey"
// },
- {
- label: '是否派遣',
- prop: 'dispatch',
- type: 'select',
- editDisplay: false,
- addDisplay: false,
- dicData: [{
- label: '未派遣',
- value: '1'
- }, {
- label: '已派遣',
- value: '0'
- }]
- },
- {
- label: "是否持证",
- prop: "hold",
- slot: true,
- search: true,
- searchSpan: 3,
- width: 69,
- display: false,
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- type: "select",
- rules: [{
- required: true,
- message: "请选择",
- trigger: "blur"
- }],
- },
+ // type: "select",
+ rules: [{
+ required: true,
+ message: "请选择",
+ trigger: "blur"
+ }],
+},
- // {
- // label: "入职时间",
- // prop: "rtime",
- // type: "datetime",
- // format: "yyyy-MM-dd",
- // valueFormat: "yyyy-MM-dd",
- // searchRange: true,
- // searchSpan: 6,
- // hide: true,
- // addDisplay: false,
- // editDisplay: false,
- // viewDisplay: false,
- // search: true,
- // rules: [{
- // required: true,
- // message: "请输入时间",
- // trigger: "blur"
- // }]
- // },
- {
- label: "在职状态",
- prop: "status",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=workerState",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- searchValue: 1,
- display: false,
- hide: true,
- searchSpan: 3,
- width: 80,
- search: true,
- rules: [{
- required: true,
- message: "请选择在职状态",
- trigger: "blur"
- }]
+// {
+// label: "入职时间",
+// prop: "rtime",
+// type: "datetime",
+// format: "yyyy-MM-dd",
+// valueFormat: "yyyy-MM-dd",
+// searchRange: true,
+// searchSpan: 6,
+// hide: true,
+// addDisplay: false,
+// editDisplay: false,
+// viewDisplay: false,
+// search: true,
+// rules: [{
+// required: true,
+// message: "请输入时间",
+// trigger: "blur"
+// }]
+// },
+{
+ label: "在职状态",
+ prop: "status",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=workerState",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
},
+ dataType: "number",
+ searchValue: 1,
+ display: false,
+ hide: true,
+ searchSpan: 3,
+ width: 80,
+ search: true,
+ rules: [{
+ required: true,
+ message: "请选择在职状态",
+ trigger: "blur"
+ }]
+},
]
\ No newline at end of file
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index 9ebf584..c58388a 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -310,7 +310,6 @@
import { mapState } from "vuex";
export default {
-
data() {
const validatePass = (rule, value, callback) => {
if (value === "") {
@@ -352,8 +351,8 @@
callback();
}
};
- console.log(this.userInfo,123);
-
+ console.log(this.userInfo, 123);
+
return {
securityid: "",
excelBox1: false,
@@ -375,7 +374,7 @@
res: "data",
},
tip: "请上传 .xls,.xlsx 标准格式文件",
- action: "/api/blade-user/import-user?deptId="+this.deptIds,
+ action: "/api/blade-user/import-user?deptId=" + this.deptIds,
},
{
label: "模板下载",
@@ -422,7 +421,7 @@
},
roleId: "1412226235153731586",
deptId: "1413470343230877697",
- deptIds:"",
+ deptIds: "",
platformPage: {
pageSize: 10,
currentPage: 1,
@@ -616,12 +615,26 @@
{
label: "是否持证",
prop: "hold",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage",
- props: {
- label: "dictValue",
- value: "dictKey",
- },
+ // dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage",
+ // props: {
+ // label: "dictValue",
+ // value: "dictKey",
+ // },
type: "select",
+ dicData: [
+ {
+ label: "是",
+ value: "1",
+ },
+ {
+ label: "否",
+ value: "2",
+ },
+ {
+ label: "已吊销",
+ value: "3",
+ },
+ ],
rules: [
{
required: true,
@@ -1368,11 +1381,12 @@
params["deptId"] = that.userInfo.dept_id;
//导入action 修改
- const importColumn = that.findObject(that.excelOption1.column, "excelFile");
+ const importColumn = that.findObject(
+ that.excelOption1.column,
+ "excelFile"
+ );
importColumn.action =
- "/api/blade-user/import-user?deptId="+this.deptIds;
-
-
+ "/api/blade-user/import-user?deptId=" + this.deptIds;
} else if (roleAlias == "公安管理员") {
params["jurisdiction"] = that.userInfo.jurisdiction;
var columnDept = that.findObject(that.option.column, "deptId");
diff --git a/src/views/securityUnit/data.js b/src/views/securityUnit/data.js
index 9aa7a6a..026374d 100644
--- a/src/views/securityUnit/data.js
+++ b/src/views/securityUnit/data.js
@@ -1,3 +1,30 @@
+var numbers = (rule, value, callback) => {
+ window.yanzhengnumbers = /^[0-9]+.?[0-9]*$/;
+ if (!yanzhengnumbers.test(value)) {
+ callback(new Error('请输入数字'));
+ } else {
+ callback();
+ }
+};
+
+var phones = (rule, value, callback) => {
+ window.yanzhengphons = /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/;
+ if (!yanzhengphons.test(value)) {
+ callback(new Error('请输入正确电话'));
+ } else {
+ callback();
+ }
+};
+
+var cardids = (rule, value, callback) => {
+ window.yanzhengphons = /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
+ if (!yanzhengphons.test(value)) {
+ callback(new Error('请输入正确身份证'));
+ } else {
+ callback();
+ }
+};
+
var DIC = [
{
label: '招聘中',
@@ -68,7 +95,7 @@
width: 120,
// search: true,
searchSpan: 4,
- searchLabelWidth: 100
+ searchLabelWidth: 100,
},
{
@@ -304,7 +331,10 @@
required: true,
message: "请输入法定代表人电话",
trigger: "blur"
- }]
+ },
+ {
+ validator: phones, trigger: ['change', 'blur']
+ },]
}, {
label: "联系人",
prop: "contacts",
@@ -325,6 +355,9 @@
required: true,
message: "请输入联系电话",
trigger: "blur"
+ },
+ {
+ validator: phones, trigger: ['change', 'blur']
}]
},
// {
@@ -368,11 +401,6 @@
prop: "capital",
labelWidth: w,
span: s,
- rules: [{
- required: true,
- message: "请输入实缴资本",
- trigger: "blur"
- }]
},
{
label: "组织机构代码",
@@ -408,17 +436,17 @@
trigger: "blur"
}]
},
- {
- label: "企业类型",
- prop: "enterprises",
- labelWidth: w,
- span: s,
- rules: [{
- required: true,
- message: "请输入企业类型",
- trigger: "blur"
- }]
- },
+ // {
+ // label: "企业类型",
+ // prop: "enterprises",
+ // labelWidth: w,
+ // span: s,
+ // rules: [{
+ // required: true,
+ // message: "请输入企业类型",
+ // trigger: "blur"
+ // }]
+ // },
{
label: "注册地址",
prop: "address",
@@ -441,17 +469,17 @@
trigger: "blur"
}]
},
- {
- label: "所属地区",
- prop: "region",
- labelWidth: w,
- span: s,
- rules: [{
- required: true,
- message: "请输入所属地区",
- trigger: "blur"
- }]
- },
+ // {
+ // label: "所属地区",
+ // prop: "region",
+ // labelWidth: w,
+ // span: s,
+ // rules: [{
+ // required: true,
+ // message: "请输入所属地区",
+ // trigger: "blur"
+ // }]
+ // },
{
label: "登记机关",
prop: "registration",
@@ -567,7 +595,7 @@
span: s,
rules: [{
required: true,
- message: "请输入法定代表人",
+ message: "请输入出资时间",
trigger: "blur"
}]
}, {
@@ -579,6 +607,9 @@
required: true,
message: "请输入身份证",
trigger: "blur"
+ },
+ {
+ validator: cardids, trigger: ['change', 'blur']
}]
}, {
label: "联系电话",
@@ -589,6 +620,9 @@
required: true,
message: "请输入联系电话",
trigger: "blur"
+ },
+ {
+ validator: phones, trigger: ['change', 'blur']
}]
},
]
@@ -664,6 +698,9 @@
required: true,
message: "请输入身份证",
trigger: "blur"
+ },
+ {
+ validator: cardids, trigger: ['change', 'blur']
}]
}, {
label: "联系电话",
@@ -674,6 +711,9 @@
required: true,
message: "请输入联系电话",
trigger: "blur"
+ },
+ {
+ validator: phones, trigger: ['change', 'blur']
}]
}
// , {
diff --git a/src/views/securityUnit/localCompany.vue b/src/views/securityUnit/localCompany.vue
index 2e8c84a..e521465 100644
--- a/src/views/securityUnit/localCompany.vue
+++ b/src/views/securityUnit/localCompany.vue
@@ -505,8 +505,12 @@
}
console.log(d);
for (var k in d) {
- if (d[k] == "" || d[k] == undefined) {
- console.log(k);
+ if (d[k].prop == "capital") {
+ continue;
+ }
+ let iisit0 = d[k] == "" || d[k] == undefined;
+ if (iisit0) {
+ console.log(d[k]);
this.$message.warning("请检查表单是否填写完整!");
return;
}
@@ -631,7 +635,7 @@
haveID() {
// console.log(this.haveID);
if (this.haveID != undefined) {
- if (this.haveID.length > 5) {
+ if (this.haveID.length > 0) {
//统一社会信用代码判断
this.noshehuibianma = 1;
} else {
diff --git a/src/views/trainExam/performance.vue b/src/views/trainExam/performance.vue
index dc7adac..f66c85d 100644
--- a/src/views/trainExam/performance.vue
+++ b/src/views/trainExam/performance.vue
@@ -1,8 +1,8 @@
/*
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-18 19:44:47
+ * @Last Modified by: liu
+ * @Last Modified time: 2021-09-28 15:03:18
* menu-name 成绩管理
*/
<template>
@@ -27,18 +27,29 @@
@current-change="questionBankCurrentChange"
@size-change="questionBankSizeChange"
@row-update="questionBankRowUpdate"
+ @refresh-change="refreshChange"
>
<template slot-scope="{ row }" slot="theoryGrade">
{{ row.theoryGrade == -1 ? "" : row.theoryGrade }}
</template>
- <template slot-scope="{ row }" slot="learnGrade">
+ <template slot-scope="{ row }" slot="learnGrade">
{{ row.learnGrade == -1 ? "暂未录入" : row.learnGrade }}
</template>
<template slot-scope="{ row }" slot="allGrade">
{{ row.allGrade == -1 ? "" : row.allGrade }}
</template>
<template slot-scope="{ row }" slot="qualified">
- {{ row.qualified == -1 ? "" : row.qualified==0?"合格":row.qualified==1?"不合格":row.qualified==3?"缺考,成绩无效":'' }}
+ {{
+ row.qualified == -1
+ ? ""
+ : row.qualified == 0
+ ? "合格"
+ : row.qualified == 1
+ ? "不合格"
+ : row.qualified == 3
+ ? "缺考,成绩无效"
+ : ""
+ }}
</template>
<!-- 自定义按钮 -->
@@ -67,13 +78,13 @@
</template>
<template slot-scope="{ type, size, row }" slot="menu">
- <el-button
- icon="el-icon-s-flag"
- @click="absent(row)"
- :size="size"
- :type="type"
- >缺考标记</el-button
- >
+ <el-button
+ icon="el-icon-s-flag"
+ @click="absent(row)"
+ :size="size"
+ :type="type"
+ >缺考标记</el-button
+ >
</template>
</avue-crud>
@@ -102,7 +113,7 @@
</template>
<script>
-import { getList, update,updateAbsent } from "@/api/examapi/performance";
+import { getList, update, updateAbsent } from "@/api/examapi/performance";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
export default {
@@ -151,7 +162,7 @@
dialogClickModal: false,
// 操作栏宽度
menu: true,
- menuWidth: 136,
+ menuWidth: 215,
labelWidth: 120,
column: [
@@ -161,7 +172,7 @@
search: true,
searchSpan: 4,
slot: true,
- viewDisplay:true,
+ viewDisplay: true,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
@@ -182,11 +193,41 @@
trigger: "blur",
},
],
- width:250,
+ width: 210,
// overHidden:true,
},
{
- label: "用户名",
+ label: "姓名",
+ prop: "securityName",
+ search: true,
+ searchSpan: 3,
+ slot: true,
+ viewDisplay: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ viewDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入试卷名称",
+ trigger: "blur",
+ },
+ ],
+ width: 80,
+ // overHidden:true,
+ },
+ {
+ label: "身份证号",
prop: "account",
search: true,
searchSpan: 4,
@@ -210,7 +251,7 @@
trigger: "blur",
},
],
- width:160,
+ width: 140,
},
{
label: "所属公司",
@@ -242,7 +283,7 @@
trigger: "blur",
},
],
- width:230,
+ width: 230,
},
{
label: "考试开始时间",
@@ -251,7 +292,7 @@
// span: 24,
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
- width: 160,
+ width: 140,
slot: true,
// 表单新增时是否禁止
addDisabled: false,
@@ -273,7 +314,7 @@
// span: 24,
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
- width: 160,
+ width: 140,
slot: true,
// 表单新增时是否禁止
addDisabled: false,
@@ -294,7 +335,8 @@
type: "select",
slot: true,
search: true,
- searchSpan: 4,
+ searchSpan: 3,
+ width: 60,
dicData: [
{
label: "发布成绩",
@@ -363,26 +405,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: "是否合格",
@@ -390,7 +434,7 @@
type: "select",
slot: true,
search: true,
- searchSpan: 4,
+ searchSpan: 3,
dicData: [
{
label: "合格",
@@ -409,6 +453,7 @@
value: 3,
},
],
+ width: 110,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
@@ -497,15 +542,24 @@
},
created() {},
mounted() {},
- computed:{
+ computed: {
...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
addBtn: this.vaildData(null, false),
- viewBtn: this.vaildData(this.permission.trainExam_performance_view, false),
+ viewBtn: this.vaildData(
+ this.permission.trainExam_performance_view,
+ false
+ ),
delBtn: this.vaildData(null, false),
- editBtn: this.vaildData(this.permission.trainExam_performance_edit, false),
- excelBtn: this.vaildData(this.permission.trainExam_performance_export, false),
+ editBtn: this.vaildData(
+ this.permission.trainExam_performance_edit,
+ false
+ ),
+ excelBtn: this.vaildData(
+ this.permission.trainExam_performance_export,
+ false
+ ),
};
},
},
@@ -517,36 +571,30 @@
var roleIds = this.userInfo.role_id.split(",");
roleIds.forEach((roleId) => {
getRoleDetail(roleId).then((res) => {
- var roleAlias = res.data.data.roleAlias;
- if (
- roleAlias == "保安公司管理员" ||
- roleAlias == "保安"
- ) {
- //如果是保安公司管理员
- params["deptId"] = that.userInfo.dept_id;
- }
- if (
- roleAlias == "培训公司管理员"
- ) {
- //如果是培训公司管理员
- params["trainUnitId"] = that.userInfo.dept_id;
- }
+ var roleAlias = res.data.data.roleAlias;
+ if (roleAlias == "保安公司管理员" || roleAlias == "保安") {
+ //如果是保安公司管理员
+ params["deptId"] = that.userInfo.dept_id;
+ }
+ if (roleAlias == "培训公司管理员") {
+ //如果是培训公司管理员
+ params["trainUnitId"] = that.userInfo.dept_id;
+ }
+ that.questionBankLoading = false;
+ params["examType"] = 2;
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.questionBankQuery)
+ ).then((res) => {
+ const data = res.data.data;
+ that.questionBankPage.total = data.total;
+ that.questionBankData = data.records;
that.questionBankLoading = false;
- params["examType"] = 2;
- 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();
+ });
+ });
});
-
},
//缺考标记
absent(row, done, loading) {
@@ -600,7 +648,7 @@
update({
theoryGrade: row.theoryGrade,
learnGrade: row.learnGrade,
- examId:row.examId,
+ examId: row.examId,
id: row.id,
}).then(
() => {
@@ -630,7 +678,7 @@
done();
},
refreshChange() {
- this.questionBankOnLoad(this.page, this.query);
+ this.questionBankOnLoad(this.questionBankPage, this.questionBankQuery);
},
},
};
diff --git a/src/views/trainExam/singleperformance.vue b/src/views/trainExam/singleperformance.vue
index 9dde61d..35a3aa1 100644
--- a/src/views/trainExam/singleperformance.vue
+++ b/src/views/trainExam/singleperformance.vue
@@ -1,8 +1,8 @@
/*
* @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-09-28 15:06:04
* menu-name 成绩查看
*/
<template>
@@ -27,6 +27,7 @@
@current-change="questionBankCurrentChange"
@size-change="questionBankSizeChange"
@row-update="questionBankRowUpdate"
+ @refresh-change="refreshChange"
>
<template slot-scope="{ row }" slot="learnGrade">
{{ row.learnGrade == -1 ? "暂未录入" : row.learnGrade }}
@@ -38,7 +39,17 @@
{{ row.allGrade == -1 ? "" : row.allGrade }}
</template>
<template slot-scope="{ row }" slot="qualified">
- {{ row.qualified == -1 ? "" : row.qualified==0?"合格":row.qualified==1?"不合格":row.qualified==3?"缺考,成绩无效":'' }}
+ {{
+ row.qualified == -1
+ ? ""
+ : row.qualified == 0
+ ? "合格"
+ : row.qualified == 1
+ ? "不合格"
+ : row.qualified == 3
+ ? "缺考,成绩无效"
+ : ""
+ }}
</template>
<template slot-scope="{ row }" slot="menu">
@@ -47,7 +58,7 @@
size="mini"
icon="el-icon-collection"
class="start-kaoshi"
- :disabled="row.qualified==1"
+ :disabled="row.qualified == 1"
@click="securityPrint(row)"
>保安证打印
</el-button>
@@ -139,9 +150,9 @@
label: "考试名称",
prop: "examName",
search: true,
- searchSpan: 5,
+ searchSpan: 4,
slot: true,
- viewDisplay:false,
+ viewDisplay: false,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
@@ -162,10 +173,40 @@
},
],
// overHidden:true,
- width:250,
+ width: 210,
},
{
- label: "用户名",
+ label: "姓名",
+ prop: "securityName",
+ search: true,
+ searchSpan: 3,
+ slot: true,
+ viewDisplay: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ viewDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入试卷名称",
+ trigger: "blur",
+ },
+ ],
+ width: 80,
+ // overHidden:true,
+ },
+ {
+ label: "身份证号",
prop: "account",
search: true,
searchSpan: 4,
@@ -189,7 +230,7 @@
trigger: "blur",
},
],
- width:160,
+ width: 160,
},
{
label: "所属公司",
@@ -221,7 +262,7 @@
trigger: "blur",
},
],
- width:230,
+ width: 230,
},
{
label: "考试开始时间",
@@ -230,7 +271,7 @@
// span: 24,
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
- width: 160,
+ width: 140,
slot: true,
// 表单新增时是否禁止
addDisabled: false,
@@ -252,7 +293,7 @@
// span: 24,
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
- width: 160,
+ width: 140,
slot: true,
// 表单新增时是否禁止
addDisabled: false,
@@ -284,6 +325,7 @@
value: 3,
},
],
+ width: 60,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
@@ -342,26 +384,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: "是否合格",
@@ -370,6 +414,7 @@
slot: true,
search: true,
searchSpan: 3,
+ width: 110,
dicData: [
{
label: "合格",
@@ -420,10 +465,10 @@
},
created() {
// console.log(this.$route.query,111);
- this.questionBankSearch['examName'] = this.$route.query.examName;
+ this.questionBankSearch["examName"] = this.$route.query.examName;
},
mounted() {},
- computed:{
+ computed: {
...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
@@ -431,7 +476,10 @@
viewBtn: this.vaildData(null, false),
delBtn: this.vaildData(null, false),
editBtn: this.vaildData(null, false),
- excelBtn: this.vaildData(this.permission.trainExam_performance_export, false),
+ excelBtn: this.vaildData(
+ this.permission.trainExam_performance_export,
+ false
+ ),
};
},
},
@@ -453,36 +501,30 @@
params = this.questionBankSearch;
roleIds.forEach((roleId) => {
getRoleDetail(roleId).then((res) => {
- var roleAlias = res.data.data.roleAlias;
- if (
- roleAlias == "保安公司管理员" ||
- roleAlias == "保安"
- ) {
- //如果是保安公司管理员
- params["deptId"] = that.userInfo.dept_id;
- }
- if (
- roleAlias == "培训公司管理员"
- ) {
- //如果是培训公司管理员
- params["trainUnitId"] = that.userInfo.dept_id;
- }
+ var roleAlias = res.data.data.roleAlias;
+ if (roleAlias == "保安公司管理员" || roleAlias == "保安") {
+ //如果是保安公司管理员
+ params["deptId"] = that.userInfo.dept_id;
+ }
+ if (roleAlias == "培训公司管理员") {
+ //如果是培训公司管理员
+ params["trainUnitId"] = that.userInfo.dept_id;
+ }
+ that.questionBankLoading = false;
+ params["examType"] = 2;
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.questionBankQuery)
+ ).then((res) => {
+ const data = res.data.data;
+ that.questionBankPage.total = data.total;
+ that.questionBankData = data.records;
that.questionBankLoading = false;
- params["examType"] = 2;
- 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 = [];
@@ -528,6 +570,9 @@
}
);
},
+ refreshChange() {
+ this.questionBankOnLoad(this.questionBankPage, this.questionBankQuery);
+ },
},
};
</script>
--
Gitblit v1.9.3