dedsudiyu 2 år sedan
förälder
incheckning
056e02e2cc
2 ändrade filer med 41 tillägg och 7 borttagningar
  1. 9 0
      src/api/safetyCheck/index.js
  2. 32 7
      src/views/safetyCheck/startInspection/index.vue

+ 9 - 0
src/api/safetyCheck/index.js

@@ -727,3 +727,12 @@ export function getRectifyNotificationView(id){
 //下载-告知书
 //下载-检查材料
 //批量下载-检查材料
+
+//获取权限范围(巡查/自查)
+export function getGentle(query){
+  return request({
+    url: '/zd-security/checkSet/getGentle',
+    method: 'get',
+    params: query
+  })
+}

+ 32 - 7
src/views/safetyCheck/startInspection/index.vue

@@ -79,8 +79,12 @@
               <el-form-item label="检查类型" prop="checkType">
                 <el-select v-model="addForm.checkType" placeholder="请选择检查类型"
                            disabled style="width: 500px">
-                  <el-option :key="1" label="校院巡查" :value="1"></el-option>
-                  <el-option :key="2" label="实验室自查" :value="2"></el-option>
+                  <el-option
+                    v-for="item in checkTypeList"
+                    :key="item.key"
+                    :label="item.label"
+                    :value="item.key">
+                  </el-option>
                 </el-select>
               </el-form-item>
               <el-form-item label="计划周期" prop="dateRange">
@@ -218,7 +222,7 @@
   import lookImgDialog from '@/components/lookImgDialog/lookImgDialog.vue'
   import { listDepartments,listbuildings } from "@/api/system/dept";
   import { buildBySubList,getCheckPlanBySubId,findCheckManage,checkOptionList,
-           checkManageUpdate,checkManageAdd,countHazardNum } from "@/api/safetyCheck/index";
+           checkManageUpdate,checkManageAdd,countHazardNum,getGentle } from "@/api/safetyCheck/index";
   export default {
     name: 'index',
     components: {
@@ -237,6 +241,8 @@
             return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择今天的
           }
         },
+        //检查类型
+        checkTypeList:[{ key:1, label:"校院巡查", },{ key:2, label:"实验室自查", }],
         //学院列表
         deptSelectList:[],
         //楼栋列表
@@ -313,6 +319,10 @@
         //自主输入与列表选择相关数据
         planList:[],
         planType:1,//1手动 2选择
+        //权限范围
+        adminGentle:false,
+        applyGentle:false,
+        myApplyGentle:false,
       }
     },
     created(){
@@ -321,8 +331,17 @@
     mounted(){
       this.checkOptionList();
       this.listDepartments();
+      this.getGentle();
     },
     methods:{
+      //获取权限范围
+      getGentle(){
+        getGentle().then(response => {
+          this.$set(this,'adminGentle',response.data.adminGentle);
+          this.$set(this,'applyGentle',response.data.applyGentle);
+          this.$set(this,'myApplyGentle',response.data.myApplyGentle);
+        });
+      },
       //提交按钮
       upDataButton(type){
         this.$refs["addForm"].validate(valid => {
@@ -591,9 +610,15 @@
       planButton(type){
         this.initializationAddFormData();
         this.$set(this,'planType',type);
-        //判断如果是手动输入-检查类型为实验室自查
-        if(this.planType==1){
-          this.addForm.checkType=2;
+        if(type == 1){
+          this.$set(this.addForm,'checkType',2);
+          this.$set(this,'checkTypeList',[{
+            key:2,
+            label:"实验室自查",
+          }]);
+        }else if(type == 2){
+          this.$set(this.addForm,'checkType',null);
+          this.$set(this,'checkTypeList',[{ key:1, label:"校院巡查", },{ key:2, label:"实验室自查", }]);
         }
       },
       //查询详情
@@ -648,7 +673,7 @@
           title:"",
           checkResult:"",
           rectifyNotice:"",
-          checkType:"",
+          checkType:2,
           dateRange:[],
           rectifyDeadline:"",
           checkHazardDtoList:[],