dedsudiyu 7 meses atrás
pai
commit
8b1ee6a981

+ 2 - 2
src/api/safetyCheck/indexDemoOne.js

@@ -424,9 +424,9 @@ export function securityDataStatisticsList(data) {
   })
 }
 // 检查计划-计划明细列表
-export function securityCheckStatisticsCheckList(data) {
+export function securityCheckDetailsCheckList(data) {
   return request({
-    url: '/security/checkStatistics/checkList',
+    url: '/security/checkDetails/checkList',
     method: 'post',
     data: data
   })

+ 10 - 5
src/views/safetyCheck/components/initiateInspect/initiateInspect.vue

@@ -4,11 +4,11 @@
     <div class="page-top-title-box">
       <!--开始检查/检查详情/隐患整改/整改详情/复查验证/复查详情-->
       <p class="page-top-title-name-p">{{initiateInspectData.orderTitle}}</p>
-      <p class="page-top-title-edit-p" @click="submitForm(1)" v-if="projectData.checkStatus != 1">保存草稿</p>
-      <p class="page-top-title-edit-p" @click="submitForm(2)" v-if="projectData.checkStatus != 1">继续检查</p>
-      <p class="page-top-title-add-p" @click="submitForm(3)" v-if="projectData.checkStatus != 1">提交查看</p>
+      <p class="page-top-title-edit-p" @click="submitForm(1)" v-if="!lookInfoType&&projectData.checkStatus != 1">保存草稿</p>
+      <p class="page-top-title-edit-p" @click="submitForm(2)" v-if="!lookInfoType&&projectData.checkStatus != 1">继续检查</p>
+      <p class="page-top-title-add-p" @click="submitForm(3)" v-if="!lookInfoType&&projectData.checkStatus != 1">提交查看</p>
       <p class="page-top-title-out-p" @click="backPage">返回</p>
-      <p class="page-top-title-add-p" @click="submitForm(4)" v-if="initiateInspectData.orderType == 3||initiateInspectData.orderType == 5">提交</p>
+      <p class="page-top-title-add-p" @click="submitForm(4)" v-if="!lookInfoType&&(initiateInspectData.orderType == 3||initiateInspectData.orderType == 5)">提交</p>
     </div>
     <div class="content-box">
       <!--校级角标-->
@@ -180,12 +180,17 @@
                   </div>
                 </div>
               </el-form-item>
-              <el-form-item label="检查结果" prop="checkFlag" v-if="lookInfoType||projectData.checkStatus == 1">
+              <el-form-item label="检查结果" prop="checkFlag" v-if="lookInfoType&&projectData.checkStatus == 1">
                 <div class="check-button-border-box">
                   <p>{{projectData.checkFlag == 0?'不符合':'符合'}}</p>
                   <img src="@/assets/ZDimages/safetyCheck/icom_xjjc_jcjc@1x.png">
                 </div>
               </el-form-item>
+              <el-form-item label="检查结果" prop="checkFlag" v-if="lookInfoType&&projectData.checkStatus != 1">
+                <div class="check-button-border-box" style="border:1px solid #999!important;color:#666!important;">
+                  <p>待检查</p>
+                </div>
+              </el-form-item>
             </div>
           </div>
           <!--第一次检查时选择不符合时展示-->

+ 102 - 106
src/views/safetyCheck/components/inspectStatistics.vue

@@ -11,10 +11,9 @@
           <el-form :model="queryParams" class="form-box" ref="queryForm"
                    :inline="true" style="width:100%;">
             <div class="table-school-college-toggle-box">
-              <p :class="manageStatus==null?'p-check':''" @click="tableCheck(null)">全部</p>
-              <p :class="manageStatus==0?'p-check':''" @click="tableCheck(0)">待检查</p>
-              <p :class="manageStatus==1?'p-check':''" @click="tableCheck(1)">检查中</p>
-              <p :class="manageStatus==2?'p-check':''" @click="tableCheck(2)">已检查</p>
+              <p :class="checkStatus==null?'p-check':''" @click="tableCheck(null)">全部</p>
+              <p :class="checkStatus==0?'p-check':''" @click="tableCheck(0)">待检查</p>
+              <p :class="checkStatus==1?'p-check':''" @click="tableCheck(1)">已检查</p>
             </div>
             <el-form-item label="" prop="hazardCheckPro">
               <el-input
@@ -27,7 +26,7 @@
             <el-form-item label="" prop="deptId">
               <el-select v-model="queryParams.deptId" placeholder="学院单位" style="width: 120px">
                 <el-option
-                  v-for="dict in optionList"
+                  v-for="dict in deptOption"
                   :key="dict.deptId"
                   :label="dict.deptName"
                   :value="dict.deptId"
@@ -50,26 +49,23 @@
                 style="width: 120px"
               />
             </el-form-item>
-            <el-form-item label="" prop="planTitle">
+            <el-form-item label="" prop="hazardCheckName">
               <el-input
                 maxLength="30"
-                v-model="queryParams.planTitle"
-                placeholder="计划标题"
+                v-model="queryParams.hazardCheckName"
+                placeholder="检查名称"
                 style="width: 150px"
               />
             </el-form-item>
-            <el-form-item label="" prop="state">
-              <el-date-picker
-                :clearable="false"
-                v-model="dateRange"
-                size="small"
-                style="width: 240px"
-                value-format="yyyy-MM-dd"
-                type="daterange"
-                range-separator="-"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-              ></el-date-picker>
+            <el-form-item label="" prop="checkFlag">
+              <el-select v-model="queryParams.checkFlag" placeholder="检查结果" style="width: 120px">
+                <el-option
+                  v-for="dict in optionList"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                />
+              </el-select>
             </el-form-item>
             <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
             <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
@@ -79,28 +75,60 @@
           </el-form>
         </div>
         <div class="page-content-box" style="padding-top:0;">
-          <el-table class="table-box" v-loading="loading" border :data="dataList" @selection-change="handleSelectionChange" :row-key="getRowKeys">
+          <el-table class="table-box" ref="table-box" v-loading="loading" border :data="dataList"
+                    @selection-change="handleSelectionChange" :row-key="getRowKeys" @sort-change="sortChange">
             <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
             <el-table-column label="序号" type="index" width="60"/>
-            <el-table-column label="实验室" prop="name"  width="180" show-overflow-tooltip/>
-            <el-table-column label="检查项" prop="content" width="200" show-overflow-tooltip/>
-            <el-table-column label="检查状态" prop="state" width="100" show-overflow-tooltip>
+            <el-table-column label="检查名称" prop="checkName"  width="200" show-overflow-tooltip/>
+            <el-table-column label="实验室" prop="subName"  width="200" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.subName}}{{scope.row.roomNum}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="检查项" prop="content" width="280" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.hazardCheckCode}}{{scope.row.hazardCheckName}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="检查状态" prop="checkStatus" width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.checkStatus==0?'待检查':'已检查'}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="检查人" prop="checkUserName" width="80" show-overflow-tooltip/>
+            <el-table-column label="检查结果" prop="checkFlag" width="100" show-overflow-tooltip>
               <template slot-scope="scope">
+                <span v-if="scope.row.checkStatus!=0">{{scope.row.checkFlag?'符合':'不符合'}}</span>
               </template>
             </el-table-column>
-            <el-table-column label="检查人" prop="content" width="120" show-overflow-tooltip/>
-            <el-table-column label="检查结果" prop="content" width="120" show-overflow-tooltip/>
-            <el-table-column label="检查时间" prop="content" width="120" show-overflow-tooltip/>
-            <el-table-column label="整改状态" prop="content" width="120" show-overflow-tooltip/>
-            <el-table-column label="整改人" prop="content" width="120" show-overflow-tooltip/>
-            <el-table-column label="整改时间" prop="content" width="120" show-overflow-tooltip/>
-            <el-table-column label="复查状态" prop="state" width="100" show-overflow-tooltip>
+            <el-table-column label="检查时间" sortable="custom" prop="checkTime" width="150" show-overflow-tooltip>
               <template slot-scope="scope">
+                <span>{{ parseTime(scope.row.checkTime,"{y}-{m}-{d} {h}:{i}") }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="复查人" prop="content" width="120" show-overflow-tooltip/>
-            <el-table-column label="复查结果" prop="content" width="120" show-overflow-tooltip/>
-            <el-table-column label="操作" width="80" show-overflow-tooltip >
+            <el-table-column label="整改状态" prop="rectifyStatus" width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span v-if="scope.row.checkStatus!=0&&!scope.row.checkFlag">{{scope.row.rectifyStatus==1?'已完成':(scope.row.rectifyStatus==2?'待整改':(scope.row.rectifyStatus==4?'暂无法整改':''))}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="整改人" prop="rectifyName" width="90" show-overflow-tooltip/>
+            <el-table-column label="整改时间" sortable="custom" prop="rectifyTime" width="150" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{ parseTime(scope.row.rectifyTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="复查状态" prop="reviewStatus" width="80" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span v-if="scope.row.checkStatus!=0&&!scope.row.checkFlag&&scope.row.rectifyStatus!=2">{{scope.row.reviewStatus==1?'已复查':(scope.row.reviewStatus==0?'待复查':'')}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="复查人" prop="reviewName" width="80" show-overflow-tooltip/>
+            <el-table-column label="复查结果" prop="examineResult" width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.examineResult==1?'复查完毕':(scope.row.examineResult==0?'退回整改':'')}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" width="100" show-overflow-tooltip >
               <template slot-scope="scope">
                 <div class="table-button-box">
                   <p class="table-button-null"></p>
@@ -108,6 +136,7 @@
                      @click="tableButton(2,scope.row)"
 
                   >详情</p>
+                  <p class="table-button-null"></p>
                 </div>
               </template>
             </el-table-column>
@@ -122,7 +151,7 @@
         </div>
       </div>
     </div>
-    <initiateInspect v-if="pageType == 2"></initiateInspect>
+    <initiateInspect v-if="pageType == 2" :initiateInspectData="initiateInspectData"></initiateInspect>
   </div>
 </template>
 
@@ -132,7 +161,7 @@
   } from '@/api/commonality/permission'
 //import { getDicts } from "@/api/commonality/noPermission";
 //import { systemUserSelect } from "@/api/commonality/permission";
-import { securityCheckStatisticsCheckList } from "@/api/safetyCheck/indexDemoOne";
+import { securityCheckDetailsCheckList } from "@/api/safetyCheck/indexDemoOne";
 import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
 import exportComponent from '@/components/exportComponent/exportComponent'
 export default {
@@ -149,7 +178,7 @@ export default {
       tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
       //导出配置
       exportConfig:{
-        api:'/chemical/chemical/export',             //导出接口地址
+        api:'/security/checkDetails/export  ',             //导出接口地址
         ids:'',                                       //勾选导出,勾选的IDS
         fileName:'化学品信息',                         //导出文件的命名
         screenData:{},
@@ -157,28 +186,31 @@ export default {
       //页面状态
       pageType:1,
       //状态选项卡
-      manageStatus:1,
+      checkStatus:null,
       //页面遮罩
       loading:false,
       //下拉列表数据
-      optionList:[],
+      deptOption:[],
+      optionList:[{value:1,label:'符合'},{value:0,label:'不符合'}],
       //查询条件
       queryParams:{
         page:1,
         pageSize:20,
-        myRelated:1,
         hazardCheckPro:"",
         deptId :null,
         subName :"",
         personnel :"",
-        planTitle :"",
+        hazardCheckName :"",
+        checkFlag :null,
+        columnName :"",
+        sort :"",
       },
-      //时间数据
-      dateRange:[],
       //列表数据
       dataList:[],
       //数据数量
       total:0,
+      //子组件数据
+      initiateInspectData:{},
     }
   },
   created(){
@@ -190,16 +222,11 @@ export default {
   methods:{
     //选项卡切换
     tableCheck(type){
-      if (this.manageStatus !== type){
-        this.$set(this,'manageStatus',type);
+      if (this.checkStatus !== type){
+        this.$set(this,'checkStatus',type);
         this.resetQuery();
       }
     },
-    //与我相关按钮
-    topRightClickType(){
-      this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
-      this.handleQuery();
-    },
     // 返回按钮
     backPage(){
       this.$parent.tableButton(6);
@@ -211,42 +238,45 @@ export default {
     },
     //重置按钮
     resetQuery(){
-      this.$set(this,'dateRange',[])
+      this.$refs['table-box'].clearSelection();
+      this.$set(this.exportConfig,'ids','');
       this.$set(this,'queryParams',{
         page:1,
         pageSize:20,
-        myRelated:1,
         hazardCheckPro:"",
         deptId :null,
         subName :"",
         personnel :"",
-        planTitle :"",
+        hazardCheckName :"",
+        checkFlag :null,
+        columnName :"",
+        sort :"",
       });
       this.getList();
     },
     getRowKeys(row) {
-      return row.id
+      return row.setOptionId
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.$set(this.exportConfig,'ids',selection.map(item => item.setOptionId));
+    },
+    //时间排序方法
+    sortChange(val){
+      this.$set(this.queryParams,'columnName',val.prop);
+      this.$set(this.queryParams,'sort',val.order=='ascending'?'asc':(val.order=='descending'?'desc':''));
+      this.handleQuery();
     },
     //获取数据列表
     getList(){
       this.$set(this,'loading',true);
       let obj = JSON.parse(JSON.stringify(this.queryParams))
-      if(this.dateRange[0]){
-        obj.startTime = this.dateRange[0]+'T00:00:00'
-        obj.endTime = this.dateRange[1]+'T23:59:59'
-      }else{
-        obj.startTime = "";
-        obj.endTime = "";
-      }
       obj.planId = this.propsData.planId
-      obj.manageStatus = this.manageStatus
-      securityCheckStatisticsCheckList(obj).then(response => {
+      obj.checkStatus = this.checkStatus
+      this.$set(this.exportConfig,'customKey','planId');
+      this.$set(this.exportConfig,'customValue',obj.planId);
+      this.$set(this.exportConfig,'screenData',obj);
+      securityCheckDetailsCheckList(obj).then(response => {
         this.$set(this,'loading',false);
         this.$set(this,'dataList',response.data.records);
         this.$set(this,'total',response.data.total);
@@ -255,49 +285,15 @@ export default {
     //操作按钮
     tableButton(type,row){
       let self = this;
-      if(type == 1){
-        //新增
-        this.$set(this,'pageType',2);
-        this.$set(this,'propsData',{});
-      }else if(type == 2){
+      if(type == 2){
         //详情
         this.$set(this,'pageType',2);
         let obj = JSON.parse(JSON.stringify(row))
         obj.showType = true;
-        this.$set(this,'propsData',obj);
-      }else if(type == 3){
-        //编辑
-        this.$set(this,'pageType',2);
-        let obj = JSON.parse(JSON.stringify(row))
-        obj.showType = false;
-        this.$set(this,'propsData',obj);
-      }else if(type == 4){
-        //删除
-        this.$confirm('是否确认删除?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-        }).then(() => {
-          deleteFunction({id:row.id}).then(response => {
-            self.msgSuccess(response.message)
-            self.getList();
-          });
-        }).catch(() => {});
-      }else if(type == 5){
-        //启用&停用
-        let text = row.state  ? "停用" : "启用";
-        this.$confirm('是否确认' + text + '?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-        }).then(() => {
-          stateFunction({id:row.id,state:!row.state,}).then(response => {
-            self.msgSuccess(response.message)
-            self.getList();
-          });
-        }).catch(() => {});
+        obj.orderTitle = '检查详情';
+        obj.orderType = '2';
+        console.log('row',row)
+        this.$set(this,'initiateInspectData',obj);
       }else if(type == 6){
         //返回并刷新
         this.$set(this,'pageType',1);
@@ -307,7 +303,7 @@ export default {
     //学院列表
     getDeptDropList() {
       getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
-        this.$set(this, 'optionList', response.data)
+        this.$set(this, 'deptOption', response.data)
       })
     },
   },