dedsudiyu недель назад: 2
Родитель
Сommit
41a1af597a

+ 4 - 4
src/views/safetyEducationExaminationNew/dataStatistics/components/dataReport/StudyHourStats.vue

@@ -52,7 +52,7 @@
           :value="dict.gradeNumber"
           :value="dict.gradeNumber"
         />
         />
       </el-select>
       </el-select>
-      <el-input v-model="queryParams.searchValue" placeholder="学号/姓名" size="small" prefix-icon="el-icon-search" style="width:210px" clearable />
+      <el-input v-model="queryParams.keyword" placeholder="学号/姓名" size="small" prefix-icon="el-icon-search" style="width:210px" clearable />
       <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
       <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
       <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
       <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
     </div>
     </div>
@@ -123,7 +123,7 @@ export default {
         personType:'',
         personType:'',
         deptId:'',
         deptId:'',
         gradeNumber:'',
         gradeNumber:'',
-        searchValue:'',
+        keyword:'',
       },
       },
       total:0,
       total:0,
     }
     }
@@ -166,7 +166,7 @@ export default {
         let obj = {
         let obj = {
           academicYear:this.valueYear,
           academicYear:this.valueYear,
           gradeNumber:this.queryParams.gradeNumber,
           gradeNumber:this.queryParams.gradeNumber,
-          searchValue:this.queryParams.searchValue,
+          keyword:this.queryParams.keyword,
         };
         };
         if(this.adminType == 1){
         if(this.adminType == 1){
           obj.deptId = this.queryParams.deptId;
           obj.deptId = this.queryParams.deptId;
@@ -361,7 +361,7 @@ export default {
         personType:'',
         personType:'',
         deptId:'',
         deptId:'',
         gradeNumber:'',
         gradeNumber:'',
-        searchValue:'',
+        keyword:'',
       });
       });
       this.examElStatisticsCreditHourList();
       this.examElStatisticsCreditHourList();
     },
     },

+ 4 - 4
src/views/safetyEducationExaminationNew/dataStatistics/components/regularExam/StudyHourStats.vue

@@ -52,7 +52,7 @@
           :value="dict.gradeNumber"
           :value="dict.gradeNumber"
         />
         />
       </el-select>
       </el-select>
-      <el-input v-model="queryParams.searchValue" placeholder="学号/姓名" size="small" prefix-icon="el-icon-search" style="width:210px" clearable />
+      <el-input v-model="queryParams.keyword" placeholder="学号/姓名" size="small" prefix-icon="el-icon-search" style="width:210px" clearable />
       <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
       <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
       <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
       <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
     </div>
     </div>
@@ -123,7 +123,7 @@ export default {
         personType:'',
         personType:'',
         deptId:'',
         deptId:'',
         gradeNumber:'',
         gradeNumber:'',
-        searchValue:'',
+        keyword:'',
       },
       },
       total:0,
       total:0,
     }
     }
@@ -166,7 +166,7 @@ export default {
         let obj = {
         let obj = {
           academicYear:this.valueYear,
           academicYear:this.valueYear,
           gradeNumber:this.queryParams.gradeNumber,
           gradeNumber:this.queryParams.gradeNumber,
-          searchValue:this.queryParams.searchValue,
+          keyword:this.queryParams.keyword,
         };
         };
         if(this.adminType == 1){
         if(this.adminType == 1){
           obj.deptId = this.queryParams.deptId;
           obj.deptId = this.queryParams.deptId;
@@ -361,7 +361,7 @@ export default {
         personType:'',
         personType:'',
         deptId:'',
         deptId:'',
         gradeNumber:'',
         gradeNumber:'',
-        searchValue:'',
+        keyword:'',
       });
       });
       this.examElStatisticsCreditHourList();
       this.examElStatisticsCreditHourList();
     },
     },

+ 29 - 3
src/views/safetyEducationExaminationNew/examManagement/examinationResult/academicPerformance.vue

@@ -10,7 +10,7 @@
             <!--<el-option label="未完成" value="0"/>-->
             <!--<el-option label="未完成" value="0"/>-->
           <!--</el-select>-->
           <!--</el-select>-->
         <!--</el-form-item>-->
         <!--</el-form-item>-->
-        <el-form-item label="" prop="deptId">
+        <el-form-item label="" prop="deptId" v-if="adminType == 1">
           <el-cascader
           <el-cascader
             style="width: 180px"
             style="width: 180px"
             v-model="queryParams.deptId"
             v-model="queryParams.deptId"
@@ -71,6 +71,9 @@
 
 
 <script>
 <script>
   import {
   import {
+    systemUserGetPost,
+  } from "@/api/basicsModules/index";
+  import {
     examElExamResultRewardPage,systemDeptCurrentDept,
     examElExamResultRewardPage,systemDeptCurrentDept,
   } from "@/api/safetyEducationExaminationNew/index";
   } from "@/api/safetyEducationExaminationNew/index";
   export default {
   export default {
@@ -80,6 +83,7 @@
     },
     },
     data() {
     data() {
       return {
       return {
+        adminType:0,
         //下拉列表数据
         //下拉列表数据
         optionListA:[],
         optionListA:[],
         //查询条件
         //查询条件
@@ -103,10 +107,27 @@
 
 
     },
     },
     mounted() {
     mounted() {
-      this.getList();
-      this.systemDeptCurrentDept();
+      this.systemUserGetPost();
     },
     },
     methods: {
     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.systemDeptCurrentDept();
+        });
+      },
       //导出
       //导出
       exportButton(){
       exportButton(){
         let self = this;
         let self = this;
@@ -143,6 +164,11 @@
       getList(){
       getList(){
         let obj = JSON.parse(JSON.stringify(this.queryParams))
         let obj = JSON.parse(JSON.stringify(this.queryParams))
         obj.examId = this.drawerPropsData.examId
         obj.examId = this.drawerPropsData.examId
+        if(this.adminType == 1){
+          obj.deptId = this.queryParams.deptId;
+        }else{
+          obj.deptId = localStorage.getItem('deptId');
+        }
         examElExamResultRewardPage(obj).then(response => {
         examElExamResultRewardPage(obj).then(response => {
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
           this.$set(this,'total',response.data.total);

+ 31 - 5
src/views/safetyEducationExaminationNew/examManagement/examinationResult/index.vue

@@ -15,7 +15,7 @@
               />
               />
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
-          <el-form-item label="" prop="deptId">
+          <el-form-item label="" prop="deptId" v-if="adminType == 1">
             <el-cascader
             <el-cascader
               style="width: 180px"
               style="width: 180px"
               v-model="queryParams.deptId"
               v-model="queryParams.deptId"
@@ -129,6 +129,9 @@
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
+  import {
+    systemUserGetPost,
+  } from "@/api/basicsModules/index";
   //import { getDicts } from "@/api/commonality/noPermission";
   //import { getDicts } from "@/api/commonality/noPermission";
   //import { systemUserSelect } from "@/api/commonality/permission";
   //import { systemUserSelect } from "@/api/commonality/permission";
   //import { getInfo } from "@/api/basicsModules/index";
   //import { getInfo } from "@/api/basicsModules/index";
@@ -146,6 +149,7 @@
     },
     },
     data () {
     data () {
       return {
       return {
+        adminType:0,
         tableButtonType:this.hasPermiDom(['exam:elExamResult:scorePage','exam:elExamResult:rewardPage',]),
         tableButtonType:this.hasPermiDom(['exam:elExamResult:scorePage','exam:elExamResult:rewardPage',]),
         //页面状态
         //页面状态
         pageType:1,
         pageType:1,
@@ -182,12 +186,29 @@
 
 
     },
     },
     mounted () {
     mounted () {
-      this.getList();
-      this.examElExamTypeList();
-      this.systemDeptCurrentDept();
-      this.systemUserGetAcademicYear();
+      this.systemUserGetPost();
     },
     },
     methods: {
     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.examElExamTypeList();
+          this.systemDeptCurrentDept();
+          this.systemUserGetAcademicYear();
+        });
+      },
       //导出
       //导出
       exportButton(){
       exportButton(){
         let self = this;
         let self = this;
@@ -245,6 +266,11 @@
           obj.startTime = "";
           obj.startTime = "";
           obj.endTime = "";
           obj.endTime = "";
         }
         }
+        if(this.adminType == 1){
+          obj.deptId = this.queryParams.deptId;
+        }else{
+          obj.deptId = localStorage.getItem('deptId');
+        }
         examElExamResultPage(obj).then(response => {
         examElExamResultPage(obj).then(response => {
 
 
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'dataList',response.data.records);

+ 32 - 6
src/views/safetyEducationExaminationNew/examManagement/examinationResult/viewGrades.vue

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