heyang 11 月之前
父節點
當前提交
57c09078fe

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

@@ -99,3 +99,48 @@ export function laboratorySubRelInfoGetListByDeptId(data){
     data: data
   })
 }
+
+//数据统计-按检查内容查询列表
+export function dataStatisticsContentList(query) {
+  return request({
+    url: '/security/DataStatistics/contentList',
+    method: 'get',
+    params: query
+  })
+}
+//数据统计-按检查内容头部数据汇总
+export function dataStatisticsContentListTop(query) {
+  return request({
+    url: '/security/DataStatistics/hazardContentTop',
+    method: 'get',
+    params: query
+  })
+}
+
+/***************************随手拍***************************/
+
+//随手拍-上报记录-列表
+export function securityCheckClapList(query) {
+  return request({
+    url: '/zd-security/checkClap/list',
+    method: 'get',
+    params: query
+  })
+}
+
+//随手拍-上报记录-提交
+export function checkClapAdd(data) {
+  return request({
+    url: '/zd-security/checkClap/add',
+    method: 'post',
+    data: data
+  })
+}
+//随手拍-上报记录-上报记录
+export function checkClapMylist(query) {
+  return request({
+    url: '/zd-security/checkClap/mylist',
+    method: 'get',
+    params: query
+  })
+}

+ 18 - 17
src/views/safetyCheck/dataStatistics/checkIndexStatistics.vue

@@ -18,9 +18,9 @@
                      v-model="queryParams.subId" :remote-method="getSubList">
             <el-option
               v-for="item in subSelectList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id">
+              :key="item.subId"
+              :label="item.subName"
+              :value="item.subId">
             </el-option>
           </el-select>
         </el-form-item>
@@ -169,20 +169,21 @@ import {
       getList(){
         let obj = JSON.parse(JSON.stringify(this.queryParams))
         let objTop = JSON.parse(JSON.stringify(this.queryParams))
-        if(this.dateRange[0]){
-          obj.beginTime = this.dateRange[0];
-          objTop.beginTime = this.dateRange[0];
-        }else{
-          obj.beginTime = "";
-          objTop.beginTime = "";
-        }
-        if(this.dateRange[1]){
-          obj.endTime = this.dateRange[1];
-          objTop.endTime = this.dateRange[1];
-        }else{
-          obj.endTime = "";
-          objTop.endTime = "";
-        }
+
+        // if(this.dateRange[0]){
+        //   obj.beginTime=this.dateRange[0]+'T00:00:00';
+        //   obj.endTime=this.dateRange[1]+'T23:59:59';
+        //
+        //   objTop.beginTime=this.dateRange[0]+'T00:00:00';
+        //   objTop.endTime=this.dateRange[1]+'T23:59:59';
+        // }else{
+        //   obj.beginTime== "";
+        //   obj.endTime== "";
+        //   objTop.beginTime== "";
+        //   objTop.endTime== "";
+        // }
+
+
         delete objTop.page
         delete objTop.pageSize
         if(this.userFlg){

+ 16 - 17
src/views/safetyCheck/dataStatistics/inspectContent.vue

@@ -7,9 +7,9 @@
           <el-select v-model="queryParams.hazardTypeMode" clearable placeholder="全部检查内容">
             <el-option
               v-for="item in materialTypeList"
-              :key="item.dictValue"
-              :label="item.dictLabel"
-              :value="item.dictValue">
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
             </el-option>
           </el-select>
         </el-form-item>
@@ -27,9 +27,9 @@
           <el-select v-model="queryParams.subId" placeholder="请选择实验室">
             <el-option
               v-for="item in subjectOptions"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id">
+              :key="item.subId"
+              :label="item.subName"
+              :value="item.subId">
             </el-option>
           </el-select>
         </el-form-item>
@@ -85,7 +85,12 @@
 
 <script>
   import { listDepartments } from "@/apiDemo/system/dept";
-  import { dataStatisticsContentList,dataStatisticsContentListTop } from "@/apiDemo/safetyCheck/index";
+  import { getDicts } from "@/api/commonality/noPermission";
+  import {
+    dataStatisticsContentList,
+    dataStatisticsContentListTop,
+    laboratorySubRelInfoGetListByDeptId
+  } from '@/api/safetyCheck/index'
   import { dangerList } from '@/apiDemo/gasManage3_0/gasManage'
   import { subjectDictList } from '@/apiDemo/laboratory/record'
   //            V3
@@ -140,10 +145,9 @@
       },
       //获取危险源类型
       dangerList(){
-        let _this=this;
-        dangerList().then( response => {
-          let res=response.rows;
-          _this.materialTypeList=res;
+        let self=this;
+        getDicts('lab_hazard_type').then(response => {
+          this.$set(this,'materialTypeList',response.data);
         });
       },
       // 节点单击事件
@@ -154,13 +158,8 @@
       /** 查询实验室字典列表 */
       getSubjectDictList (deptId) {
         this.subjectOptions = null;
-        this.loading = true;
-        let params = {};
-        params.deptId = deptId;
-        this.queryParams.subId = "";
-        subjectDictList(params).then(response => {
+        laboratorySubRelInfoGetListByDeptId({deptIds:[deptId],subName:''}).then(response => {
           this.subjectOptions = response.data;
-          this.loading = false;
         });
       },
       //获取数据列表

+ 34 - 24
src/views/safetyCheck/snapshotManagement/index.vue

@@ -81,11 +81,11 @@
               {{scope.row.rectifyStatus==0?'待整改':(scope.row.rectifyStatus==1?'已整改':(scope.row.rectifyStatus==2?'暂无法整改':''))}}
             </template>
           </el-table-column>
-          <el-table-column label="操作" align="center" prop="deptName" width="70">
+          <el-table-column label="操作" align="center" prop="deptName" width="100">
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
-                <p class="table-button-p" @click="goPage(3,scope.row)" v-hasPermi="['safety:rectifyClap:query']">详情</p>
+                <p class="table-button-p" @click="goPage(3,scope.row)" v-hasPermiRouter="['safety:rectifyClap:query']">详情</p>
                 <p class="table-button-null"></p>
               </div>
             </template>
@@ -131,9 +131,9 @@
               :loading="dialogLoading">
               <el-option
                 v-for="item in dialogSubList"
-                :key="item.id"
-                :label="item.name"
-                :value="item.id">
+                :key="item.subId"
+                :label="item.subName"
+                :value="item.subId">
               </el-option>
             </el-select>
           </el-form-item>
@@ -180,12 +180,12 @@
 </template>
 
 <script>
-  import { securityCheckClapList,checkClapAdd } from '@/apiDemo/safetyCheck/index'
-  import { getSubjectDictByViolation } from "@/apiDemo/laboratory/violation";
-  import { listDepartments } from "@/apiDemo/system/dept";
+  import { securityCheckClapList,checkClapAdd } from '@/api/safetyCheck/index'
   import listPage from './listPage.vue'
   import infoPage from './infoPage.vue'
   import { getToken } from "@/utils/auth";
+  import { getDeptDropList } from '@/api/commonality/permission'
+  import { laboratorySubRelInfoGetListByDeptId } from '@/api/safetyCheck'
   export default {
     name: 'index',
     components: {
@@ -197,7 +197,7 @@
         loading:false,
         uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
         headers: {
-          Authorization: "Bearer " + getToken(),
+          Authorization:getToken(),
         },
         pageType:1,
         deptSelectList:[],
@@ -312,15 +312,12 @@
       //获取数据列表
       getList(){
         let obj = JSON.parse(JSON.stringify(this.queryParams))
-        if(this.dateRange[0]){
-          obj.beginTime = this.dateRange[0]
-        }else{
-          obj.beginTime = ""
-        }
-        if(this.dateRange[1]){
-          obj.endTime = this.dateRange[1]
-        }else{
-          obj.endTime = ""
+        if(this.dateRange[0]) {
+          obj.beginTime=this.dateRange[0]+'T00:00:00';
+          obj.endTime=this.dateRange[1]+'T23:59:59';
+        } else {
+          obj.beginTime='';
+          obj.endTime='';
         }
         let self = this;
         setTimeout(function(){
@@ -429,7 +426,8 @@
         let obj = {
           deptId:val,
         }
-        getSubjectDictByViolation(obj).then(response => {
+
+        laboratorySubRelInfoGetListByDeptId({deptIds:[val],subName:''}).then(response => {
           this.$set(this,'dialogSubListData',response.data);
           this.$set(this,'dialogSubList',response.data);
           for(let i=0;i<self.deptSelectList.length;i++){
@@ -440,13 +438,25 @@
           this.$set(this.addDialogForm,'subId','');
           this.$set(this.addDialogForm,'subName','');
         });
+
+        // getSubjectDictByViolation(obj).then(response => {
+        //   this.$set(this,'dialogSubListData',response.data);
+        //   this.$set(this,'dialogSubList',response.data);
+        //   for(let i=0;i<self.deptSelectList.length;i++){
+        //     if(val == self.deptSelectList[i].deptId){
+        //       self.$set(self.addDialogForm,'deptName',self.deptSelectList[i].deptName);
+        //     }
+        //   }
+        //   this.$set(this.addDialogForm,'subId','');
+        //   this.$set(this.addDialogForm,'subName','');
+        // });
       },
       //实验室选中
       dialogSubChange(val){
         let self = this;
         for(let i=0;i<self.dialogSubList.length;i++){
-          if(val == self.dialogSubList[i].id){
-            self.$set(self.addDialogForm,'subName',self.dialogSubList[i].name);
+          if(val == self.dialogSubList[i].subId){
+            self.$set(self.addDialogForm,'subName',self.dialogSubList[i].subName);
           }
         }
       },
@@ -455,7 +465,7 @@
         let self = this;
         let list = [];
         for(let i=0;i<self.dialogSubListData.length;i++){
-          if(self.dialogSubListData[i].name.indexOf(val) != -1){
+          if(self.dialogSubListData[i].subName.indexOf(val) != -1){
             list.push(self.dialogSubListData[i]);
           }
         }
@@ -463,8 +473,8 @@
       },
       //获取学院列表
       listDepartments(){
-        listDepartments().then(response => {
-          this.deptSelectList = response.data;
+        getDeptDropList({deptName:"",level:2,deptType:1}).then(response => {
+          this.$set(this, 'deptSelectList', response.data)
         });
       },
     }

+ 12 - 13
src/views/safetyCheck/snapshotManagement/listPage.vue

@@ -105,9 +105,9 @@
 </template>
 
 <script>
-  import { listDepartments } from "@/apiDemo/system/dept";
-  import { checkClapMylist } from '@/apiDemo/safetyCheck/index'
+  import { checkClapMylist } from '@/api/safetyCheck/index'
   import infoPage from './infoPage.vue'
+  import { getDeptDropList } from '@/api/commonality/permission'
   export default {
     name: 'listPage',
     components: {
@@ -183,16 +183,15 @@
       //获取数据列表
       getList(){
         let obj = JSON.parse(JSON.stringify(this.queryParams))
-        if(this.dateRange[0]){
-          obj.beginTime = this.dateRange[0]
-        }else{
-          obj.beginTime = ""
-        }
-        if(this.dateRange[1]){
-          obj.endTime = this.dateRange[1]
-        }else{
-          obj.endTime = ""
+
+        if(this.dateRange[0]) {
+          obj.beginDate=this.dateRange[0]+'T00:00:00';
+          obj.endDate=this.dateRange[1]+'T23:59:59';
+        } else {
+          obj.beginDate='';
+          obj.endDate='';
         }
+
         checkClapMylist(obj).then(response => {
           this.total = response.data.total;
           this.tableList = response.data.records;
@@ -219,8 +218,8 @@
       },
       //获取学院列表
       listDepartments(){
-        listDepartments().then(response => {
-          this.deptSelectList = response.data;
+        getDeptDropList({deptName:"",level:2,deptType:1}).then(response => {
+          this.$set(this, 'deptSelectList', response.data)
         });
       },
     }