From 8eb67756e266eb7456e63e378f7d7755eea3f826 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 19 Aug 2021 17:58:19 +0800
Subject: [PATCH] 通知公告,工作汇报,保安员查询,考试报名列表,成绩查询菜单权限控制
---
src/views/applyexam/index.vue | 17 +++++++-
src/views/workreport/data.js | 4 +-
src/views/workreport/workreport.vue | 36 ++++++++++-------
src/views/desk/notice.vue | 45 +++++-----------------
src/views/workreport/workreply.vue | 4 +-
src/views/exam/singleperformance.vue | 14 ++++++
6 files changed, 63 insertions(+), 57 deletions(-)
diff --git a/src/views/applyexam/index.vue b/src/views/applyexam/index.vue
index f28acc2..5dc92cf 100644
--- a/src/views/applyexam/index.vue
+++ b/src/views/applyexam/index.vue
@@ -65,7 +65,7 @@
plain
icon="el-icon-folder-checked"
@click="handleBatchExam"
-
+ v-if="permission.applyexam_exam"
>生成考试
</el-button>
<!-- v-if="examPersission" -->
@@ -74,6 +74,7 @@
size="small"
plain
icon="el-icon-folder-checked"
+ v-if="permission.applyexam_import"
@click="handleImport"
>清册导入
</el-button>
@@ -84,6 +85,7 @@
:type="type"
size="small"
icon="el-icon-refresh-left"
+ v-if="permission.applyexam_cancel"
:disabled="row.isApply == 2"
@click="handleCancel(row)"
>取消报名
@@ -101,7 +103,7 @@
:type="type"
size="small"
icon="el-icon-receiving"
- v-if="row.candidateNo!=''"
+ v-if="permission.applyexam_print && row.candidateNo!=''"
@click="handlePrint(row)"
>准考证打印
</el-button>
@@ -179,7 +181,7 @@
addExam
} from "@/api/examapi/applyexam";
import { mapState } from "vuex";
-
+import { mapGetters } from "vuex";
var DIC = {
applyStatus: [
{
@@ -757,6 +759,15 @@
...mapState({
userInfo: (state) => state.user.userInfo,
}),
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(null, false),
+ viewBtn: this.vaildData(this.permission.applyexam_view, false),
+ delBtn: this.vaildData(null, false),
+ editBtn: this.vaildData(null, false),
+ };
+ },
ids() {
let ids = [];
this.questionBankSelectionList.forEach((ele) => {
diff --git a/src/views/desk/notice.vue b/src/views/desk/notice.vue
index 02fda40..9814f0c 100644
--- a/src/views/desk/notice.vue
+++ b/src/views/desk/notice.vue
@@ -26,6 +26,7 @@
type="danger"
size="small"
icon="el-icon-delete"
+ v-if="permission.notice_delete"
plain
@click="handleDelete"
>删 除
@@ -36,7 +37,11 @@
<el-tag>{{ row.categoryName }}</el-tag>
</template>
<template slot-scope="{ type, size, row }" slot="menu">
- <el-button :size="size" :type="type" @click="handleUploadPage(row)"
+ <el-button
+ :size="size"
+ :type="type"
+ v-if="permission.notice_upload"
+ @click="handleUploadPage(row)"
>附件上传
</el-button>
<!-- <el-button
@@ -208,13 +213,13 @@
};
},
computed: {
- ...mapGetters(["permission"]),
+ ...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
- addBtn: this.vaildData(this.permissionAdd, true),
- viewBtn: this.vaildData(this.permissionView, true),
- delBtn: this.vaildData(this.permissionDelete, true),
- editBtn: this.vaildData(this.permissionEdit, true),
+ addBtn: this.vaildData(this.permission.notice_add, false),
+ viewBtn: this.vaildData(this.permission.notice_view, false),
+ delBtn: this.vaildData(this.permission.notice_delete, false),
+ editBtn: this.vaildData(this.permission.notice_edit, false),
};
},
ids() {
@@ -241,12 +246,6 @@
? (that.deptCategory = true)
: (that.deptCategory = false);
- // if (that.deptCategory) {
- that.permissionAdd = this.permission.notice_add;
- that.permissionView = this.permission.notice_view;
- that.permissionDelete = this.permission.notice_delete;
- that.permissionEdit = this.permission.notice_edit;
- // }
});
},
//跳转到附件列表页面
@@ -385,18 +384,8 @@
? (that.deptCategory = true)
: (that.deptCategory = false);
- // if (that.deptCategory) {
- that.permissionAdd = this.permission.notice_add;
- that.permissionView = this.permission.notice_view;
- that.permissionDelete = this.permission.notice_delete;
- that.permissionEdit = this.permission.notice_edit;
- // }
-
const { releaseTimeRange } = this.query;
- // if (that.deptCategory) {
- // params["deptId"] = this.deptId;
params["jurisdiction"] = this.jurisdiction;
- // }
let values = {
...params,
};
@@ -414,18 +403,6 @@
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
- // this.data.forEach((item) => {
- // if (item.category == 2) {
- // that.option.addBtn = false;
- // that.option.editBtn = false;
- // that.option.delBtn = false;
- // }
- // if (item.category == 1) {
- // that.option.addBtn = true;
- // that.option.editBtn = true;
- // that.option.delBtn = true;
- // }
- // });
this.loading = false;
this.selectionClear();
});
diff --git a/src/views/exam/singleperformance.vue b/src/views/exam/singleperformance.vue
index 6528b4e..91e50c7 100644
--- a/src/views/exam/singleperformance.vue
+++ b/src/views/exam/singleperformance.vue
@@ -47,6 +47,7 @@
icon="el-icon-collection"
class="start-kaoshi"
:disabled="row.qualified==1"
+ v-if="permission.singleperformance_print"
@click="securityPrint(row)"
>保安证打印
</el-button>
@@ -82,7 +83,7 @@
<script>
import { getList, update } from "@/api/examapi/performance";
-
+import { mapGetters } from "vuex";
export default {
data() {
var validatePass = (rule, value, callback) => {
@@ -412,6 +413,17 @@
questionBankSelectionList: [],
};
},
+ computed:{
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.user_add, false),
+ viewBtn: this.vaildData(null, false),
+ delBtn: this.vaildData(null, false),
+ editBtn: this.vaildData(this.permission.user_edit, false),
+ };
+ },
+ },
created() {},
mounted() {},
methods: {
diff --git a/src/views/workreport/data.js b/src/views/workreport/data.js
index f6c663c..b089e58 100644
--- a/src/views/workreport/data.js
+++ b/src/views/workreport/data.js
@@ -21,7 +21,7 @@
label: "汇报类别",
prop: "category",
type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=workReportCategory",
+ // dicUrl: "/api/blade-system/dict-biz/dictionary?code=workReportCategory",
cascaderItem: ["receivedIds"],
props: {
label: "dictValue",
@@ -78,7 +78,7 @@
span: 24,
type: "tree",
// lazy: true,
- dicUrl: "/api/blade-system/dept/lazy-tree-user-app?type={{key}}",
+ // dicUrl: "/api/blade-system/dept/lazy-tree-user-app?type={{key}}",
hide: true,
props: {
label: "title",
diff --git a/src/views/workreport/workreply.vue b/src/views/workreport/workreply.vue
index a2e2f51..be8e826 100644
--- a/src/views/workreport/workreply.vue
+++ b/src/views/workreport/workreply.vue
@@ -99,9 +99,9 @@
permissionList() {
return {
addBtn: this.vaildData(null, false),
- viewBtn: this.vaildData(this.permission.notice_view, false),
+ viewBtn: this.vaildData(this.permission.workreply_view, false),
delBtn: this.vaildData(null, false),
- editBtn: this.vaildData(this.permission.notice_edit, false),
+ editBtn: this.vaildData(this.permission.workreply_edit, false),
};
},
ids() {
diff --git a/src/views/workreport/workreport.vue b/src/views/workreport/workreport.vue
index e4ff2c3..581b500 100644
--- a/src/views/workreport/workreport.vue
+++ b/src/views/workreport/workreport.vue
@@ -42,6 +42,7 @@
<script>
import { workreportColumn } from "./data";
+import { mapState } from "vuex";
import {
getListPage,
remove,
@@ -98,10 +99,10 @@
...mapGetters(["permission"]),
permissionList() {
return {
- addBtn: this.vaildData(this.permission.notice_add, false),
- viewBtn: this.vaildData(this.permission.notice_view, false),
- delBtn: this.vaildData(this.permission.notice_delete, false),
- editBtn: this.vaildData(this.permission.notice_edit, false),
+ addBtn: this.vaildData(this.permission.workreport_add, false),
+ viewBtn: this.vaildData(this.permission.workreport_view, false),
+ delBtn: this.vaildData(this.permission.workreport_delete, false),
+ editBtn: this.vaildData(this.permission.workreport_edit, false),
};
},
ids() {
@@ -111,6 +112,9 @@
});
return ids.join(",");
},
+ ...mapState({
+ userInfo: (state) => state.user.userInfo,
+ }),
},
mounted() {},
methods: {
@@ -241,23 +245,25 @@
? (that.deptCategory = true)
: (that.deptCategory = false);
- // const { releaseTimeRange } = this.query;
- // if (that.deptCategory) {
+ //1:保安公司 2:公安 3:培训公司
+ if(deptCategory == 1 || deptCategory == 3){
+ const column = that.findObject(that.option.column, "category");
+ column.dicUrl = "/api/blade-system/dict-biz/dictionary?code=securityWorkReportCategory";
+ const columnReceivedIds = that.findObject(that.option.column, "receivedIds");
+ columnReceivedIds.dicUrl = "/api/blade-system/dept/lazy-tree-users?type={{key}}&deptId="+that.userInfo.dept_id;
+ }
+ if(deptCategory == 2){
+ const column = that.findObject(that.option.column, "category");
+ column.dicUrl = "/api/blade-system/dict-biz/dictionary?code=workReportCategory";
+ const columnReceivedIds = that.findObject(that.option.column, "receivedIds");
+ columnReceivedIds.dicUrl = "/api/blade-system/dept/lazy-tree-users?type={{key}}&deptId="+that.userInfo.dept_id;
+ }
params["deptId"] = this.deptId;
params["userId"] = this.userId;
// }
let values = {
...params,
};
- // if (releaseTimeRange) {
- // values = {
- // ...params,
- // startTime: releaseTimeRange[0],
- // endTime: releaseTimeRange[1],
- // ...this.query,
- // };
- // values.releaseTimeRange = null;
- // }
this.loading = true;
getListPage(page.currentPage, page.pageSize, values).then((res) => {
const data = res.data.data;
--
Gitblit v1.9.3