heyang 10 månader sedan
förälder
incheckning
57d452146c

+ 18 - 0
src/api/index.js

@@ -108,6 +108,24 @@ export function securityBigViewCheckOptionCharts(data) {
         data: data
         data: data
     })
     })
 }
 }
+//隐患统计
+export function securityBigViewCheckOptionChartDetails(data) {
+    return request({
+        url: 'security/bigView/checkOptionChartDetails',
+        method: 'post',
+        data: data
+    })
+}
+//隐患统计-隐患类型
+export function securityCheckOptionList(query) {
+    return request({
+        url: 'security/checkOption/list',
+        method: 'get',
+        params: query
+    })
+}
+
+
 
 
 
 
 
 

+ 1 - 1
src/views/courtyardManage/courtyardHome.vue

@@ -429,7 +429,7 @@ export default {
     //隐患统计
     //隐患统计
     securityBigViewCheckOptionCharts(){
     securityBigViewCheckOptionCharts(){
       let self=this;
       let self=this;
-      securityBigViewCheckOptionCharts({}).then(response => {
+      securityBigViewCheckOptionCharts({remark:'index'}).then(response => {
         if (response.code == 200) {
         if (response.code == 200) {
           let dataX=[];
           let dataX=[];
           let dataCount=[];
           let dataCount=[];

+ 49 - 23
src/views/courtyardManage/dangerDetail.vue

@@ -14,8 +14,15 @@
     <div class="main_b">
     <div class="main_b">
       <!--查询条件-->
       <!--查询条件-->
       <el-form :model="editForm" ref="queryParams" class="form-box" :inline="true" style="margin:20px;">
       <el-form :model="editForm" ref="queryParams" class="form-box" :inline="true" style="margin:20px;">
+        <el-form-item label="实验室" prop="dangerId" label-width="98px">
+          <el-input
+              maxLength="30"
+              v-model="queryParams.searchValue"
+              placeholder="实验室/房间号"
+          />
+        </el-form-item>
         <el-form-item label="隐患类型" prop="dangerId" label-width="98px">
         <el-form-item label="隐患类型" prop="dangerId" label-width="98px">
-          <el-select v-model="editForm.optionId" popper-class="select-big-data" placeholder="请选择隐患类型">
+          <el-select v-model="queryParams.id" popper-class="select-big-data" placeholder="请选择隐患类型">
             <el-option
             <el-option
                 v-for="item in dangerList"
                 v-for="item in dangerList"
                 :key="item.id"
                 :key="item.id"
@@ -24,16 +31,6 @@
             </el-option>
             </el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
-        <el-form-item label="实验室" prop="dangerId" label-width="98px">
-          <el-select v-model="editForm.subId" popper-class="select-big-data" placeholder="请选择实验室">
-            <el-option
-                v-for="item in labList"
-                :key="item.id"
-                :label="item.name"
-                :value="item.id">
-            </el-option>
-          </el-select>
-        </el-form-item>
         <el-form-item label="日期" prop="dateRange" label-width="68px">
         <el-form-item label="日期" prop="dateRange" label-width="68px">
           <el-date-picker
           <el-date-picker
               popper-class="select-big-data-time"
               popper-class="select-big-data-time"
@@ -48,13 +45,13 @@
           ></el-date-picker>
           ></el-date-picker>
         </el-form-item>
         </el-form-item>
         <el-form-item label-width="0">
         <el-form-item label-width="0">
-          <el-button type="primary" @click.native.prevent="onSearch" native-type="submit">查询</el-button>
-          <el-button @click="resetForm('searchForm')">重置</el-button>
+          <el-button type="primary" @click.native.prevent="handleQuery" native-type="submit">查询</el-button>
+          <el-button @click="resetQuery">重置</el-button>
         </el-form-item>
         </el-form-item>
       </el-form>
       </el-form>
       <!--列表-->
       <!--列表-->
-      <el-table :data="tableData"  style="width: 100%" height="420" :row-class-name="tableRowClassName">
-        <el-table-column align="center" header-align='center' type="index" :index="indexMethod" label="序号" width="60"></el-table-column>
+      <el-table :data="dataList"  style="width: 100%" height="420" :row-class-name="tableRowClassName">
+        <el-table-column label="序号" type="index" align="center" width="50"></el-table-column>
         <el-table-column align="center" header-align='center' prop="optionName" label="隐患类型"></el-table-column>
         <el-table-column align="center" header-align='center' prop="optionName" label="隐患类型"></el-table-column>
         <el-table-column align="center" header-align='center' prop="subName" label="实验室名称"></el-table-column>
         <el-table-column align="center" header-align='center' prop="subName" label="实验室名称"></el-table-column>
         <el-table-column align="center" header-align='center' prop="typeName" label="安全分类"></el-table-column>
         <el-table-column align="center" header-align='center' prop="typeName" label="安全分类"></el-table-column>
@@ -66,8 +63,8 @@
           background
           background
           @current-change="handleCurrentChange"
           @current-change="handleCurrentChange"
           :page-sizes="[10, 20, 30, 40]"
           :page-sizes="[10, 20, 30, 40]"
-          :current-page.sync="editForm.pageNum"
-          :page-size="editForm.pageSize"
+          :current-page.sync="queryParams.pageNum"
+          :page-size="queryParams.pageSize"
           layout="total,prev, pager, next"
           layout="total,prev, pager, next"
           :total="totalNum">
           :total="totalNum">
       </el-pagination>
       </el-pagination>
@@ -84,7 +81,11 @@ import {
   optionCharts, optionLabCharts
   optionCharts, optionLabCharts
 } from "../../api/http"
 } from "../../api/http"
 import Header from '@/components/header.vue'
 import Header from '@/components/header.vue'
-import {laboratoryBigViewSubHazardList, laboratoryBigViewSubUserCount} from "@/api";
+import {
+  laboratoryBigViewSubHazardList,
+  laboratoryBigViewSubUserCount,
+  securityBigViewCheckOptionChartDetails, securityCheckOptionList
+} from "@/api/index";
 export default {
 export default {
   components: {
   components: {
     Header
     Header
@@ -114,7 +115,7 @@ export default {
       queryParams:{
       queryParams:{
         page:1,
         page:1,
         pageSize:10,
         pageSize:10,
-        smallTypeValue:'',
+        id:'',
         searchValue:'',
         searchValue:'',
       },
       },
       dataList:[],
       dataList:[],
@@ -123,6 +124,7 @@ export default {
   },
   },
   mounted() {
   mounted() {
     this.getList();
     this.getList();
+    this.securityCheckOptionList();
     // this.checkOptionList()
     // this.checkOptionList()
     // this.departmentsList()
     // this.departmentsList()
     // this.getSubjectDict()
     // this.getSubjectDict()
@@ -133,15 +135,39 @@ export default {
     getList(){
     getList(){
       this.$set(this,'loading',true);
       this.$set(this,'loading',true);
       let obj = JSON.parse(JSON.stringify(this.queryParams))
       let obj = JSON.parse(JSON.stringify(this.queryParams))
-      laboratoryBigViewSubHazardList(obj).then(response => {
+      if(this.dateRange[0]){
+        obj.startDate = this.dateRange[0]+'T00:00:00'
+        obj.endDate = this.dateRange[1]+'T23:59:59'
+      }else{
+        obj.startDate = "";
+        obj.endDate = "";
+      }
+      securityBigViewCheckOptionChartDetails(obj).then(response => {
         this.$set(this,'loading',false);
         this.$set(this,'loading',false);
         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);
       });
       });
     },
     },
-
-
-
+    //查询按钮
+    handleQuery(){
+      this.$set(this.queryParams,'page',1);
+      this.getList();
+    },
+    //重置按钮
+    resetQuery(){
+      this.$set(this,'queryParams',{
+        page:1,
+        pageSize:10,
+        id:'',
+        searchValue:'',
+      });
+      this.getList();
+    },
+    securityCheckOptionList(){
+      securityCheckOptionList().then(response => {
+        this.$set(this,'dangerList',response.data);
+      });
+    },
 
 
     btnFun(index){
     btnFun(index){
       this.currentIndex = index
       this.currentIndex = index