|
|
@@ -4,7 +4,7 @@
|
|
|
<div class="page-form-title-box">
|
|
|
<el-form :model="queryParams" class="form-box" ref="queryForm"
|
|
|
:inline="true" style="width:100%;">
|
|
|
- <el-form-item label="" prop="deptId">
|
|
|
+ <el-form-item label="" prop="deptId" v-if="adminType == 1">
|
|
|
<el-cascader
|
|
|
style="width: 180px"
|
|
|
v-model="queryParams.deptId"
|
|
|
@@ -128,6 +128,9 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
+ systemUserGetPost,
|
|
|
+ } from "@/api/basicsModules/index";
|
|
|
+ import {
|
|
|
systemUserGetCategories,systemUserGetAcademicYear,
|
|
|
examElExamResultScorePage,examElExamResultScorePageType,systemDeptCurrentDept,
|
|
|
} from "@/api/safetyEducationExaminationNew/index";
|
|
|
@@ -142,6 +145,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ adminType:0,
|
|
|
//下拉列表数据
|
|
|
optionListA:[],
|
|
|
optionListB:[],
|
|
|
@@ -174,13 +178,30 @@
|
|
|
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getList();
|
|
|
- this.examElExamResultScorePageType();
|
|
|
- this.systemDeptCurrentDept();
|
|
|
- this.systemUserGetCategories();
|
|
|
- this.systemUserGetAcademicYear();
|
|
|
+ this.systemUserGetPost();
|
|
|
},
|
|
|
methods: {
|
|
|
+ //查询当前登录用户身份-校级/院级
|
|
|
+ systemUserGetPost(){
|
|
|
+ systemUserGetPost({}).then(response => {
|
|
|
+ for(let i=0;i<response.data.length;i++){
|
|
|
+ if(response.data[i].postCode == 'school_level_admin'){
|
|
|
+ if(response.data[i].isPost){
|
|
|
+ this.$set(this,'adminType','1');
|
|
|
+ }
|
|
|
+ }else if(response.data[i].postCode == 'college_admin'){
|
|
|
+ if(response.data[i].isPost){
|
|
|
+ this.$set(this,'adminType','2');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.getList();
|
|
|
+ this.examElExamResultScorePageType();
|
|
|
+ this.systemDeptCurrentDept();
|
|
|
+ this.systemUserGetCategories();
|
|
|
+ this.systemUserGetAcademicYear();
|
|
|
+ });
|
|
|
+ },
|
|
|
//导出
|
|
|
exportButton(){
|
|
|
let self = this;
|
|
|
@@ -227,6 +248,11 @@
|
|
|
getList(){
|
|
|
let obj = JSON.parse(JSON.stringify(this.queryParams))
|
|
|
obj.examId = this.drawerPropsData.examId
|
|
|
+ if(this.adminType == 1){
|
|
|
+ obj.deptId = this.queryParams.deptId;
|
|
|
+ }else{
|
|
|
+ obj.deptId = localStorage.getItem('deptId');
|
|
|
+ }
|
|
|
examElExamResultScorePage(obj).then(response => {
|
|
|
this.$set(this,'dataList',response.data.records);
|
|
|
this.$set(this,'total',response.data.total);
|