dedsudiyu 7 months ago
parent
commit
b4f5ab3a7f

+ 49 - 0
src/api/safetyCheck/indexDemoOne.js

@@ -796,6 +796,55 @@ export function securityCheckDangerApprove (data) {
     data: data
   })
 }
+/**************************** 整改通知/整改报告 ****************************/
+//整改通知-列表
+export function securityRectifyNoticeList (data) {
+  return request({
+    url: '/security/rectifyNotice/list',
+    method: 'post',
+    data: data
+  })
+}
+//整改通知-查看
+export function securityRectifyNoticeGetRectifyAdviceNoteView(query) {
+  return request({
+    url: '/security/rectifyNotice/getRectifyAdviceNoteView',
+    method: 'get',
+    params: query
+  })
+}
+//整改通知-整改情况列表
+export function securityCheckDangerNoPermissList(data) {
+  return request({
+    url: '/security/checkDanger/noPermissList',
+    method: 'post',
+    data: data
+  })
+}
+//整改报告-列表
+export function securityRectifyReportList (data) {
+  return request({
+    url: '/security/rectifyReport/list',
+    method: 'post',
+    data: data
+  })
+}
+//整改报告-提交
+export function securityRectifyReportUpdate (data) {
+  return request({
+    url: '/security/rectifyReport/update',
+    method: 'post',
+    data: data
+  })
+}
+//整改报告-查看
+export function securityRectifyReportGetRectifyReportView (query) {
+  return request({
+    url: '/security/rectifyReport/getRectifyReportView',
+    method: 'get',
+    params: query
+  })
+}
 /**************************** 安全检查-公共部分 ****************************/
 // 查询用户身份-校级管理员/院级管理员/督导组成员
 export function securityDataStatisticsGetUserIdentity(query) {

File diff suppressed because it is too large
+ 218 - 59
src/views/safetyCheck/components/noticeDom.vue


File diff suppressed because it is too large
+ 154 - 37
src/views/safetyCheck/components/rectificationReportDom.vue


+ 5 - 6
src/views/safetyCheck/safetyHazard/inspectHazard/index.vue

@@ -24,7 +24,7 @@
           <p></p>
         </div>
       </div>
-      <div class="page-form-title-box" style="border:none;" :class="advancedType?'page-advanced-form-title-box':''">
+      <div class="page-form-title-box" style="border:none;">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
           <el-form-item label="" prop="planTitle">
@@ -110,16 +110,16 @@
       <div class="page-content-box" style="padding-top:0;">
         <el-table class="table-box" v-loading="loading" border :data="dataList">
           <el-table-column label="序号" type="index" width="60"/>
-          <el-table-column label="计划标题" prop="planTitle" width="250" show-overflow-tooltip/>
+          <el-table-column label="计划标题" prop="planTitle" width="220" show-overflow-tooltip/>
           <el-table-column label="检查类型" prop="checkTypeName" width="100" show-overflow-tooltip/>
-          <el-table-column label="不符合项" prop="hazardCheckName" width="250" show-overflow-tooltip>
+          <el-table-column label="不符合项" prop="hazardCheckName" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{scope.row.hazardCheckName}} {{scope.row.hazardCheckName}}</span>
             </template>
           </el-table-column>
           <el-table-column label="实验室" prop="subName" width="220" show-overflow-tooltip/>
           <el-table-column label="整改期限" prop="rectifyDeadline" width="130" show-overflow-tooltip/>
-          <el-table-column label="整改状态" prop="rectifyStatus" width="130" show-overflow-tooltip>
+          <el-table-column label="整改状态" prop="rectifyStatus" width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{scope.row.rectifyStatus == 1?'已完成':(scope.row.rectifyStatus == 2?'待整改':(scope.row.rectifyStatus == 3?'待复核':(scope.row.rectifyStatus == 4?'暂无法整改':'')))}}</span>
             </template>
@@ -130,7 +130,7 @@
               <span>{{ parseTime(scope.row.rectifyTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="复查结果" prop="reviewStatus" width="130" show-overflow-tooltip>
+          <el-table-column label="复查结果" prop="reviewStatus" width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{ scope.row.reviewStatus ==1 ?'已复查':(scope.row.reviewStatus ==0 ?'未复查':'') }}</span>
             </template>
@@ -210,7 +210,6 @@
         },
         //时间数据
         dateRange:[],
-        advancedType:false,
         //列表数据
         dataList:[],
         //数据数量

+ 100 - 154
src/views/safetyCheck/safetyHazard/rectificationNotice/index.vue

@@ -2,15 +2,15 @@
 <template>
   <div class="app-container rectificationNotice">
     <div class="page-container rectificationNoticePage" v-if="pageType === 1">
-      <div class="page-form-title-box" :class="advancedType?'page-advanced-form-title-box':''">
+      <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
-          <div class="table-school-college-toggle-box" v-if="schoolStanding">
-            <p :class="schoolCollegeType==1?'p-check':''" @click="schoolCollegeToggle(1)">校级检查</p>
-            <p :class="schoolCollegeType==2?'p-check':''" @click="schoolCollegeToggle(2)">学院自查</p>
+          <div class="table-school-college-toggle-box">
+            <p :class="checkCategory==1?'p-check':''" @click="schoolCollegeToggle(1)">校级检查</p>
+            <p :class="checkCategory==2?'p-check':''" @click="schoolCollegeToggle(2)">学院自查</p>
           </div>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="状态" :style="schoolStanding?'width:175px':'width:175px'">
+          <el-form-item label="" prop="rectifyStatus">
+            <el-select v-model="queryParams.rectifyStatus" placeholder="状态" style="width:180px;">
               <el-option
                 v-for="dict in optionList"
                 :key="dict.value"
@@ -19,61 +19,25 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="学院单位" :style="schoolStanding?'width:180px':'width:175px'">
+          <el-form-item label="" prop="deptId">
+            <el-select v-model="queryParams.deptId" placeholder="学院单位" style="width:180px;">
               <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="安全分类" :style="schoolStanding?'width:180px':'width:175px'">
-              <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
+                v-for="dict in deptOption"
+                :key="dict.deptId"
+                :label="dict.deptName"
+                :value="dict.deptId"
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="安全分级" :style="schoolStanding?'width:180px':'width:175px'">
-              <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
-            <el-input
-              maxLength="30"
-              v-model="queryParams.queryParamsData1"
-              placeholder="实验室/房间号"
-              :style="schoolStanding?'width:185px':'width:175px'"
-            />
-          </el-form-item>
-          <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
-            <el-input
-              maxLength="30"
-              v-model="queryParams.queryParamsData1"
-              placeholder="实验室负责人"
-              :style="schoolStanding?'width:185px':'width:170px'"
-            />
-          </el-form-item>
-          <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
+          <el-form-item label="" prop="planTitle">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
+              v-model="queryParams.planTitle"
               placeholder="计划标题"
-              :style="schoolStanding?'width:185px':'width:175px'"
+              style="width:180px;"
             />
           </el-form-item>
-          <el-form-item label="" prop="state" v-if="advancedType">
+          <el-form-item label="" prop="state">
             <el-date-picker
               :clearable="false"
               v-model="dateRange"
@@ -86,45 +50,34 @@
               end-placeholder="结束日期"
             ></el-date-picker>
           </el-form-item>
-          <!--与我相关-->
-          <div class="form-button-max-big-box-me">
-            <div class="form-button-big-box-me">
-              <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
-                <p class="text-p-me">与我相关</p>
-                <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
-              </div>
-            </div>
-          </div>
           <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
           <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
-          <p class="page-save-common-style-button" style="display: inline-block;margin-left:10px;" @click="searchToggle">{{advancedType?'普通搜索':'高级搜索'}}</p>
           <p class="page-submit-common-style-button"
-             :style="advancedType?'float: right;display: inline-block;margin-right:10px;':'float: right;display: inline-block;'"
+             style="float: right;display: inline-block;margin-right:10px;"
              @click="allDownload">批量下载</p>
         </el-form>
       </div>
       <div class="page-content-box">
-        <el-table class="table-box" v-loading="loading" border :data="dataList" ref="multipleTable" @selection-change="handleSelectionChange"  :row-key="getRowKeys">
+        <el-table class="table-box" v-loading="loading" border :data="dataList" ref="multipleTable"
+                  @selection-change="handleSelectionChange"  :row-key="getRowKeys">
           <el-table-column type="selection" width="50" align="center" :reserve-selection="true"/>
-          <el-table-column label="通知书编号" prop="name" width="150"  show-overflow-tooltip/>
-          <el-table-column label="计划标题" prop="name" width="280"  show-overflow-tooltip/>
-          <el-table-column label="检查名称" prop="content" width="150" show-overflow-tooltip/>
-          <el-table-column label="学院单位" prop="content" width="150" show-overflow-tooltip/>
-          <el-table-column label="实验室" prop="content" width="220" show-overflow-tooltip/>
-          <el-table-column label="负责人" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="下发时间" prop="createTime" width="150" show-overflow-tooltip>
+          <el-table-column label="通知书编号" prop="noticeNum" width="150"  show-overflow-tooltip/>
+          <el-table-column label="学院单位" prop="deptName" width="180" show-overflow-tooltip/>
+          <el-table-column label="计划标题" prop="planTitle" show-overflow-tooltip/>
+          <el-table-column label="检查批次" prop="checkName" width="150" show-overflow-tooltip/>
+          <el-table-column label="下发时间" prop="createTime" width="180" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="整改期限" prop="createTime" width="130" show-overflow-tooltip>
+          <el-table-column label="整改期限" prop="rectifyDeadline" width="180" show-overflow-tooltip>
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+              <span>{{ parseTime(scope.row.rectifyDeadline,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="状态" prop="state" width="100" show-overflow-tooltip>
+          <el-table-column label="整改状态" prop="state" width="120" show-overflow-tooltip>
             <template slot-scope="scope">
-
+              {{scope.row.rectifyStatus?'已完成':'未完成'}}
             </template>
           </el-table-column>
           <el-table-column label="操作" width="200" show-overflow-tooltip >
@@ -132,15 +85,15 @@
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
-                   @click="tableButton(2,scope.row)"
+                   @click="tableButton(1,scope.row)"
 
                 >查看</p>
                 <p class="table-button-p"
-                   @click="tableButton(3,scope.row)"
+                   @click="downloadButton(scope.row)"
 
                 >下载</p>
                 <p class="table-button-p"
-                   @click="tableButton(4,scope.row)"
+                   @click="tableButton(2,scope.row)"
 
                 >整改情况</p>
                 <p class="table-button-null"></p>
@@ -158,43 +111,59 @@
       </div>
     </div>
     <list-page :propsData="propsData" v-if="pageType === 2"></list-page>
+    <el-dialog class="rectificationNotice-dialog" title='整改通知书' width="836px" append-to-body
+               :visible.sync="propsNoticeDomType" v-if="propsNoticeDomType" @close="dialogOff()"
+               :close-on-click-modal="false" :close-on-press-escape="false">
+      <div class="scrollbar-box" style="height:600px;">
+        <noticeDom :propsNoticeDomData="propsNoticeDomData"></noticeDom>
+      </div>
+      <div slot="footer" class="dialog-footer dialog-footer-box">
+        <p class="dialog-footer-button-null"></p>
+        <p class="dialog-footer-button-info" @click="dialogOff()">取消</p>
+        <p class="dialog-footer-button-primary" @click="dialogSubmit">下载</p>
+        <p class="dialog-footer-button-null"></p>
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
+  import {
+    getDeptDropList,
+  } from '@/api/commonality/permission'
+  import {
+    securityRectifyNoticeList,
+  } from "@/api/safetyCheck/indexDemoOne";
   import listPage from "./listPage.vue";
+  import noticeDom from '@/views/safetyCheck/components/noticeDom.vue'
   export default {
     name: 'index',
     components: {
-     listPage
+      listPage,
+      noticeDom
     },
     data () {
       return {
         tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
         //页面状态
-        pageType:2,
+        pageType:1,
         //页面遮罩
         loading:false,
-        //下拉列表数据
-        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        //状态下拉列表
+        optionList:[{value:0,label:'未完成'},{value:1,label:'已完成'}],
+        //学院列表
+        deptOption:[],
         //查询条件
         queryParams:{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          rectifyStatus:null,
+          planTitle:"",
+          deptId :null,
         },
         //时间数据
         dateRange:[],
-        //搜索模式切换
-        advancedType:false,
-        //校级身份
-        schoolStanding:true,
         //校院级状态
-        schoolCollegeType:1,
+        checkCategory:1,
         //列表数据
         dataList:[],
         //数据数量
@@ -203,30 +172,24 @@
         ids:[],
         //组件传参
         propsData:{},
+        propsNoticeDomType:false,
+        propsNoticeDomData:{},
       }
     },
     created () {
-
+      this.getDeptDropList();
     },
     mounted () {
-      //this.getList();
+      this.getList();
     },
     methods: {
       //检查/自查切换
       schoolCollegeToggle(type){
-        if(this.schoolCollegeType !== type){
-          this.$set(this,'schoolCollegeType',type);
+        if(this.checkCategory !== type){
+          this.$set(this,'checkCategory',type);
+          this.resetQuery();
         }
       },
-      //搜索模式切换
-      searchToggle(){
-        this.$set(this,'advancedType',!this.advancedType);
-      },
-      //与我相关按钮
-      topRightClickType(){
-        this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
-        this.handleQuery();
-      },
       //查询按钮
       handleQuery(){
         this.$set(this.queryParams,'page',1);
@@ -238,9 +201,9 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          rectifyStatus:null,
+          planTitle:"",
+          deptId :null,
         });
         this.getList();
       },
@@ -255,7 +218,8 @@
           obj.startTime = "";
           obj.endTime = "";
         }
-        getListFunction(obj).then(response => {
+        obj.checkCategory = this.checkCategory;
+        securityRectifyNoticeList(obj).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
@@ -265,65 +229,41 @@
       tableButton(type,row){
         let self = this;
         if(type == 1){
-          //新增
-          this.$set(this,'pageType',2);
-          this.$set(this,'propsData',{});
+          //查看
+          this.$set(this,'propsNoticeDomData',{
+            noticeId:row.noticeId,
+            checkCategory:this.checkCategory,
+          })
+          this.$set(this,'propsNoticeDomType',true)
         }else 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,'propsData',{
+            noticeId:row.noticeId
+          });
           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(() => {});
         }else if(type == 6){
           //返回并刷新
           this.$set(this,'pageType',1);
           this.getList();
         }
       },
+      dialogSubmit(){
+        this.downloadButton(this.propsNoticeDomData);
+      },
+      dialogOff(){
+        this.$set(this,'propsNoticeDomType',false)
+      },
       /*===记录勾选数据===
         需要再el-table 添加  :row-key="getRowKeys"
         需要在selection 添加 :reserve-selection="true"
       */
       getRowKeys(row) {
-        return row.id
+        return row.noticeId
       },
       // 多选框选中数据
       handleSelectionChange(selection) {
         this.selectedNum = selection.length;
-        this.ids = selection.map(item => item.id)
+        this.ids = selection.map(item => item.noticeId)
       },
       // 批量下载
       allDownload(){
@@ -338,13 +278,19 @@
           type: "warning"
         }).then(function() {
           let text = self.ids+'';
-          self.downloadGet('/zd-security/checkRectify/genReport/zip?idListStr='+text+'&fileUrl='+localStorage.getItem('fileBrowseEnvironment'), '批量报告下载.zip')
+          self.downloadGet('/security/rectifyNotice/genRectifyNote/zip?idListStr='+text+'&fileUrl='+localStorage.getItem('fileBrowseEnvironment'), '批量通知下载.zip')
+          self.$refs['multipleTable'].clearSelection();
         }).then(() => {
         }).catch(() => {});
       },
       // 单个下载按钮
       downloadButton(row){
-        this.downloadGet('/zd-security/checkRectify/genReport?id='+row.id+'&fileUrl='+localStorage.getItem('fileBrowseEnvironment'), row.title+'(整改报告).docx')
+        this.downloadGet('/security/rectifyNotice/getRectifyAdviceNote?noticeId='+row.noticeId+'&fileUrl='+localStorage.getItem('fileBrowseEnvironment'), '整改通知('+row.noticeNum+').docx')
+      },//学院下拉列表
+      getDeptDropList(){
+        getDeptDropList({level: 2, deptType: 1 }).then(response => {
+          this.$set(this,'deptOption',response.data);
+        });
       },
     },
   }

+ 186 - 139
src/views/safetyCheck/safetyHazard/rectificationNotice/listPage.vue

@@ -1,17 +1,17 @@
 <!--整改情况-->
 <template>
   <div class="page-container rectificationNotice-listPage">
-    <div class="page-container checkItem">
+    <div class="page-container checkItem" v-if="pageType == 1">
       <div class="page-top-title-box">
         <p class="page-top-title-name-p">整改情况</p>
         <p class="page-top-title-out-p" @click="backPage">返回</p>
       </div>
       <div class="content-box scrollbar-box">
-        <div class="page-form-title-box" style="border:none;" :class="advancedType?'page-advanced-form-title-box':''">
+        <div class="page-form-title-box" style="border:none;">
           <el-form :model="queryParams" class="form-box" ref="queryForm"
                    :inline="true" style="width:100%;">
-            <el-form-item label="" prop="queryParamsData2">
-              <el-select v-model="queryParams.queryParamsData2" placeholder="检查状态" style="width: 180px">
+            <el-form-item label="" prop="rectifyStatus">
+              <el-select v-model="queryParams.rectifyStatus" placeholder="全部" style="width: 130px">
                 <el-option
                   v-for="dict in optionList"
                   :key="dict.value"
@@ -20,76 +20,75 @@
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="queryParamsData2">
-              <el-select v-model="queryParams.queryParamsData2" placeholder="检查类型" style="width: 180px">
-                <el-option
-                  v-for="dict in optionList"
-                  :key="dict.value"
-                  :label="dict.label"
-                  :value="dict.value"
-                />
-              </el-select>
+            <el-form-item label="" prop="planTitle">
+              <el-input
+                maxLength="30"
+                v-model="queryParams.planTitle"
+                placeholder="计划标题"
+                style="width: 130px"
+              />
             </el-form-item>
-            <el-form-item label="" prop="queryParamsData2">
-              <el-select v-model="queryParams.queryParamsData2" placeholder="一级指标" style="width: 180px">
-                <el-option
-                  v-for="dict in optionList"
-                  :key="dict.value"
-                  :label="dict.label"
-                  :value="dict.value"
-                />
-              </el-select>
+            <el-form-item label="" prop="hazardCheckPro">
+              <el-cascader
+                style="width: 130px"
+                placeholder="检查指标"
+                v-model="queryParams.hazardCheckPro"
+                filterable
+                :show-all-levels="false"
+                :options="cascaderData"
+                :props="{ value: 'id', label: 'labelName',emitPath:false }"
+              ></el-cascader>
+            </el-form-item>
+            <el-form-item label="" prop="hazardCheckName">
+              <el-input
+                maxLength="30"
+                v-model="queryParams.hazardCheckName"
+                placeholder="模糊搜索检查指标项"
+                style="width: 160px"
+              />
             </el-form-item>
-            <el-form-item label="" prop="queryParamsData2">
-              <el-select v-model="queryParams.queryParamsData2" placeholder="学院单位" style="width: 180px">
+            <el-form-item label="" prop="deptId">
+              <el-select v-model="queryParams.deptId" placeholder="学院单位" style="width: 130px">
                 <el-option
-                  v-for="dict in optionList"
-                  :key="dict.value"
-                  :label="dict.label"
-                  :value="dict.value"
+                  v-for="dict in deptOption"
+                  :key="dict.deptId"
+                  :label="dict.deptName"
+                  :value="dict.deptId"
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="queryParamsData2">
-              <el-select v-model="queryParams.queryParamsData2" placeholder="楼栋" style="width: 180px">
+            <el-form-item label="" prop="levelId">
+              <el-select v-model="queryParams.levelId" placeholder="安全分级" style="width: 130px">
                 <el-option
-                  v-for="dict in optionList"
-                  :key="dict.value"
-                  :label="dict.label"
-                  :value="dict.value"
+                  v-for="dict in levelOption"
+                  :key="dict.levelId"
+                  :label="dict.levelName"
+                  :value="dict.levelId"
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
+            <el-form-item label="" prop="searchValue">
               <el-input
                 maxLength="30"
-                v-model="queryParams.queryParamsData1"
+                v-model="queryParams.searchValue"
                 placeholder="实验室/房间号"
-                style="width: 190px"
+                style="width: 140px"
               />
             </el-form-item>
-            <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
+            <el-form-item label="" prop="rectifyName">
               <el-input
                 maxLength="30"
-                v-model="queryParams.queryParamsData1"
-                placeholder="计划标题"
-                style="width: 190px"
-              />
-            </el-form-item>
-            <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
-              <el-input
-                maxLength="30"
-                v-model="queryParams.queryParamsData1"
+                v-model="queryParams.rectifyName"
                 placeholder="整改人"
-                style="width: 190px"
+                style="width: 130px"
               />
             </el-form-item>
-            <el-form-item label="" prop="state" v-if="advancedType">
+            <el-form-item label="" prop="state">
               <el-date-picker
                 :clearable="false"
                 v-model="dateRange"
                 size="small"
-                style="width: 330px"
+                style="width: 220px"
                 value-format="yyyy-MM-dd"
                 type="daterange"
                 range-separator="-"
@@ -97,50 +96,43 @@
                 end-placeholder="结束日期"
               ></el-date-picker>
             </el-form-item>
-            <!--与我相关-->
-            <div class="form-button-max-big-box-me">
-              <div class="form-button-big-box-me">
-                <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
-                  <p class="text-p-me">与我相关</p>
-                  <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
-                </div>
-              </div>
-            </div>
             <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
             <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
-            <p class="page-save-common-style-button" style="display: inline-block;margin-left:10px;" @click="searchToggle">{{advancedType?'普通搜索':'高级搜索'}}</p>
           </el-form>
         </div>
         <div class="page-content-box" style="padding-top:0;">
           <el-table class="table-box" v-loading="loading" border :data="dataList">
             <el-table-column label="序号" type="index" width="60"/>
-            <el-table-column label="计划标题" prop="name"  show-overflow-tooltip/>
-            <el-table-column label="不符合项" prop="content" width="260" show-overflow-tooltip/>
-            <el-table-column label="实验室" prop="content" width="200" show-overflow-tooltip/>
-            <el-table-column label="整改期限" prop="createTime" width="130" show-overflow-tooltip>
+            <el-table-column label="计划标题" prop="planTitle"  show-overflow-tooltip/>
+            <el-table-column label="不符合项" prop="content" width="260" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.hazardCheckName}} {{scope.row.hazardCheckName}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="实验室" prop="subName" width="200" show-overflow-tooltip/>
+            <el-table-column label="整改期限" prop="rectifyDeadline" width="130" show-overflow-tooltip/>
+            <el-table-column label="整改状态" prop="rectifyStatus" width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+                <span>{{scope.row.rectifyStatus == 1?'已完成':(scope.row.rectifyStatus == 2?'待整改':(scope.row.rectifyStatus == 3?'待复核':(scope.row.rectifyStatus == 4?'暂无法整改':'')))}}</span>
               </template>
             </el-table-column>
-            <el-table-column label="整改状态" prop="content" width="100" show-overflow-tooltip/>
-            <el-table-column label="整改人" prop="content" width="100" show-overflow-tooltip/>
-            <el-table-column label="整改时间" prop="createTime" width="150" show-overflow-tooltip>
+            <el-table-column label="整改人" prop="rectifyName" width="100" show-overflow-tooltip/>
+            <el-table-column label="整改时间" prop="rectifyTime" width="150" show-overflow-tooltip>
               <template slot-scope="scope">
-                <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+                <span>{{ parseTime(scope.row.rectifyTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="复查结果" prop="reviewStatus" width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{ scope.row.reviewStatus ==1 ?'已复查':(scope.row.reviewStatus ==0 ?'未复查':'') }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="复查结果" prop="content" width="100" show-overflow-tooltip/>
             <el-table-column label="操作" width="100" show-overflow-tooltip >
               <template slot-scope="scope">
                 <div class="table-button-box">
                   <p class="table-button-null"></p>
                   <p class="table-button-p"
-                     @click="tableButton(2,scope.row)"
-
-                  >整改</p>
-                  <p class="table-button-p"
-                     @click="tableButton(2,scope.row)"
-
+                     @click="tableButton(1,scope.row)"
                   >详情</p>
                   <p class="table-button-null"></p>
                 </div>
@@ -157,15 +149,25 @@
         </div>
       </div>
     </div>
+    <initiateInspect v-if="pageType == 2" :initiateInspectData="initiateInspectData"></initiateInspect>
   </div>
 </template>
 
 <script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
+  import {
+    getDeptDropList,
+    laboratoryClassLevelGetList,
+  } from '@/api/commonality/permission'
+  import {
+    securityCheckOptionList,
+    securityCheckDangerNoPermissList,
+  } from "@/api/safetyCheck/indexDemoOne";
+  import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
   export default {
     name: 'listPage',
+    components: {
+      initiateInspect
+    },
     props:{
       propsData:{},
     },
@@ -176,41 +178,43 @@
         pageType:1,
         //页面遮罩
         loading:false,
-        //下拉列表数据
-        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        optionList:[{value:null,label:'全部'},{value:2,label:'待整改'},{value:1,label:'已整改'},{value:4,label:'暂无法整改'},{value:5,label:'多次整改未完成'},],
+        //学院列表
+        deptOption:[],
+        //分级下拉列表
+        levelOption:[],
+        //检查项下拉列表
+        cascaderData:[],
         //查询条件
         queryParams:{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          rectifyStatus:null,
+          planTitle:"",
+          hazardCheckPro :null,
+          hazardCheckName :"",
+          deptId :null,
+          levelId :null,
+          searchValue :"",
         },
         //时间数据
         dateRange:[],
-        advancedType:false,
         //列表数据
         dataList:[],
         //数据数量
         total:0,
+        initiateInspectData:{},
       }
     },
     created(){
-
+      this.getDeptDropList();
+      this.laboratoryClassLevelGetList();
+      this.securityCheckOptionList();
     },
     mounted(){
-
+      this.getList();
     },
     methods:{
-      //搜索模式切换
-      searchToggle(){
-        this.$set(this,'advancedType',!this.advancedType);
-      },
-      //与我相关按钮
-      topRightClickType(){
-        this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
-        this.handleQuery();
-      },
       // 返回按钮
       backPage(){
         this.$parent.tableButton(6);
@@ -226,9 +230,13 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          rectifyStatus:null,
+          planTitle:"",
+          hazardCheckPro :null,
+          hazardCheckName :"",
+          deptId :null,
+          levelId :null,
+          searchValue :"",
         });
         this.getList();
       },
@@ -243,7 +251,8 @@
           obj.startTime = "";
           obj.endTime = "";
         }
-        getListFunction(obj).then(response => {
+        obj.noticeId = this.propsData.noticeId
+        securityCheckDangerNoPermissList(obj).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
@@ -253,54 +262,92 @@
       tableButton(type,row){
         let self = this;
         if(type == 1){
-          //新增
-          this.$set(this,'pageType',2);
-          this.$set(this,'propsData',{});
-        }else 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';
+          this.$set(this,'initiateInspectData',obj);
         }else if(type == 6){
           //返回并刷新
           this.$set(this,'pageType',1);
           this.getList();
         }
       },
+      //学院列表
+      getDeptDropList() {
+        getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
+          this.$set(this, 'deptOption', response.data)
+        })
+      },
+      //分级下拉列表
+      laboratoryClassLevelGetList(){
+        laboratoryClassLevelGetList({}).then(response => {
+          this.$set(this,'levelOption',response.data);
+        });
+      },
+      //检查项列表
+      securityCheckOptionList() {
+        securityCheckOptionList({}).then(response => {
+          let list = this.getCascaderData(JSON.parse(JSON.stringify(response.data)),3)
+          this.$nextTick(()=>{
+            this.$set(this, 'cascaderData', list)
+          })
+        })
+      },
+      //检查项格式处理
+      getCascaderData(list,type) {
+        let self = this
+        for (let i = 0; i < list.length; i++) {
+          list[i].labelName = list[i].code ? list[i].code + ' ' + list[i].name : list[i].name
+          if(list[i].level == type){
+            delete list[i].children
+          }else if (list[i].children) {
+            if (list[i].children[0]) {
+              list[i].children = self.getCascaderData(list[i].children,type)
+            } else {
+              list.splice(i, 1)
+              i--
+            }
+          } else {
+            list.splice(i, 1)
+            i--
+          }
+        }
+        for (let i = 0; i < list.length; i++) {
+          list[i].labelName = list[i].code ? list[i].code + ' ' + list[i].name : list[i].name
+          if(list[i].level == type){
+            delete list[i].children
+          }else if (list[i].children) {
+            if (list[i].children[0]) {
+              list[i].children = self.getCascaderData(list[i].children,type)
+            } else {
+              list.splice(i, 1)
+              i--
+            }
+          } else {
+            list.splice(i, 1)
+            i--
+          }
+        }
+        for (let i = 0; i < list.length; i++) {
+          list[i].labelName = list[i].code ? list[i].code + ' ' + list[i].name : list[i].name
+          if(list[i].level == type){
+            delete list[i].children
+          }else if (list[i].children) {
+            if (list[i].children[0]) {
+              list[i].children = self.getCascaderData(list[i].children,type)
+            } else {
+              list.splice(i, 1)
+              i--
+            }
+          } else {
+            list.splice(i, 1)
+            i--
+          }
+        }
+        return list
+      },
     },
   }
 </script>

+ 114 - 135
src/views/safetyCheck/safetyHazard/rectificationReport/index.vue

@@ -2,15 +2,15 @@
 <template>
   <div class="app-container rectificationReport">
     <div class="page-container rectificationReportPage" v-if="pageType === 1">
-      <div class="page-form-title-box" :class="advancedType?'page-advanced-form-title-box':''">
+      <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
-          <div class="table-school-college-toggle-box" v-if="schoolStanding">
-            <p :class="schoolCollegeType==1?'p-check':''" @click="schoolCollegeToggle(1)">校级检查</p>
-            <p :class="schoolCollegeType==2?'p-check':''" @click="schoolCollegeToggle(2)">学院自查</p>
+          <div class="table-school-college-toggle-box">
+            <p :class="checkCategory==1?'p-check':''" @click="schoolCollegeToggle(1)">校级检查</p>
+            <p :class="checkCategory==2?'p-check':''" @click="schoolCollegeToggle(2)">学院自查</p>
           </div>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="学院单位" :style="schoolStanding?'width:170px':'width:205px'">
+          <el-form-item label="" prop="isApprove">
+            <el-select v-model="queryParams.isApprove" placeholder="状态" style="width:180px;">
               <el-option
                 v-for="dict in optionList"
                 :key="dict.value"
@@ -19,51 +19,25 @@
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="安全分类" :style="schoolStanding?'width:170px':'width:205px'">
+          <el-form-item label="" prop="deptId">
+            <el-select v-model="queryParams.deptId" placeholder="学院单位" style="width:180px;">
               <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="安全分级" :style="schoolStanding?'width:170px':'width:205px'">
-              <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
+                v-for="dict in deptOption"
+                :key="dict.deptId"
+                :label="dict.deptName"
+                :value="dict.deptId"
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData1">
-            <el-input
-              maxLength="30"
-              v-model="queryParams.queryParamsData1"
-              placeholder="实验室/房间号"
-              :style="schoolStanding?'width:170px':'width:205px'"
-            />
-          </el-form-item>
-          <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
+          <el-form-item label="" prop="planTitle">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
-              placeholder="实验室负责人"
-              :style="schoolStanding?'width:170px':'width:205px'"
-            />
-          </el-form-item>
-          <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
-            <el-input
-              maxLength="30"
-              v-model="queryParams.queryParamsData1"
+              v-model="queryParams.planTitle"
               placeholder="计划标题"
-              :style="schoolStanding?'width:170px':'width:205px'"
+              style="width:180px;"
             />
           </el-form-item>
-          <el-form-item label="" prop="state" v-if="advancedType">
+          <el-form-item label="" prop="state">
             <el-date-picker
               :clearable="false"
               v-model="dateRange"
@@ -76,51 +50,49 @@
               end-placeholder="结束日期"
             ></el-date-picker>
           </el-form-item>
-          <!--与我相关-->
-          <div class="form-button-max-big-box-me">
-            <div class="form-button-big-box-me">
-              <div :class="queryParams.myRelated==1?'checkDiv-me':''" @click="topRightClickType">
-                <p class="text-p-me">与我相关</p>
-                <p class="el-icon-check icon-p-me" v-if="queryParams.myRelated==1"></p>
-              </div>
-            </div>
-          </div>
           <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
           <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
-          <p class="page-save-common-style-button" style="display: inline-block;margin-left:10px;" @click="searchToggle">{{advancedType?'普通搜索':'高级搜索'}}</p>
           <p class="page-submit-common-style-button"
-             :style="advancedType?'float: right;display: inline-block;margin-right:10px;':'float: right;display: inline-block;'"
+             style="float: right;display: inline-block;margin-right:10px;"
              @click="allDownload">批量下载</p>
         </el-form>
       </div>
       <div class="page-content-box">
         <el-table class="table-box" v-loading="loading" border :data="dataList" ref="multipleTable" @selection-change="handleSelectionChange"  :row-key="getRowKeys">
           <el-table-column type="selection" width="50" align="center" :reserve-selection="true"/>
-          <el-table-column label="通知书编号" prop="name" width="150"  show-overflow-tooltip/>
-          <el-table-column label="计划标题" prop="name" width="280"  show-overflow-tooltip/>
-          <el-table-column label="检查名称" prop="content" width="150" show-overflow-tooltip/>
-          <el-table-column label="学院单位" prop="content" width="230" show-overflow-tooltip/>
-          <el-table-column label="实验室" prop="content" width="220" show-overflow-tooltip/>
-          <el-table-column label="负责人" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="完成时间" prop="createTime" width="150" show-overflow-tooltip>
+          <el-table-column label="编号" prop="reportNum" width="150"  show-overflow-tooltip/>
+          <el-table-column label="学院单位" prop="deptName" width="180" show-overflow-tooltip/>
+          <el-table-column label="计划标题" prop="planTitle"  show-overflow-tooltip/>
+          <el-table-column label="检查名称" prop="checkName" width="150" show-overflow-tooltip/>
+          <el-table-column label="完成时间" prop="createTime" width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="操作" width="200" show-overflow-tooltip >
+          <el-table-column label="状态" prop="isApprove" width="120" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{ scope.row.isApprove?'已提交':'未提交'}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" width="260" show-overflow-tooltip >
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
-                   @click="tableButton(2,scope.row)"
+                   @click="tableButton(1,scope.row)"
 
                 >查看</p>
                 <p class="table-button-p"
-                   @click="tableButton(3,scope.row)"
+                   v-if="!scope.row.isApprove&&scope.row.showSubmit"
+                   @click="tableButton(2,scope.row)"
+
+                >提交</p>
+                <p class="table-button-p"
+                   @click="downloadButton(scope.row)"
 
                 >下载</p>
                 <p class="table-button-p"
-                   @click="tableButton(4,scope.row)"
+                   @click="tableButton(3,scope.row)"
 
                 >整改情况</p>
                 <p class="table-button-null"></p>
@@ -137,19 +109,38 @@
         />
       </div>
     </div>
-    <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
+    <list-page :propsData="propsData" v-if="pageType === 2"></list-page>
+    <el-dialog class="rectificationNotice-dialog" title='整改通知书' width="836px" append-to-body
+               :visible.sync="propsReportDomType" v-if="propsReportDomType" @close="dialogOff()"
+               :close-on-click-modal="false" :close-on-press-escape="false">
+      <div class="scrollbar-box" style="height:600px;">
+        <rectificationReportDom :propsReportDomData="propsReportDomData"></rectificationReportDom>
+      </div>
+      <div slot="footer" class="dialog-footer dialog-footer-box">
+        <p class="dialog-footer-button-null"></p>
+        <p class="dialog-footer-button-info" @click="dialogOff()">取消</p>
+        <p class="dialog-footer-button-primary" @click="dialogSubmit">下载</p>
+        <p class="dialog-footer-button-null"></p>
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
-  //import addPage from "./addPage.vue";
+  import {
+    getDeptDropList,
+  } from '@/api/commonality/permission'
+  import {
+    securityRectifyReportList,
+    securityRectifyReportUpdate
+  } from "@/api/safetyCheck/indexDemoOne";
+  import listPage from "./listPage.vue";
+  import rectificationReportDom from '@/views/safetyCheck/components/rectificationReportDom.vue'
   export default {
     name: 'index',
-    //components: {
-    //  addPage
-    //},
+    components: {
+      listPage,
+      rectificationReportDom
+    },
     data () {
       return {
         tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
@@ -157,24 +148,22 @@
         pageType:1,
         //页面遮罩
         loading:false,
-        //下拉列表数据
-        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        //状态下拉列表
+        optionList:[{value:0,label:'未提交'},{value:1,label:'已提交'}],
+        //学院列表
+        deptOption:[],
         //查询条件
         queryParams:{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          isApprove:null,
+          planTitle:"",
+          deptId :null,
         },
         //时间数据
         dateRange:[],
-        //搜索模式切换
-        advancedType:false,
-        //校级身份
-        schoolStanding:true,
         //校院级状态
-        schoolCollegeType:1,
+        checkCategory:1,
         //列表数据
         dataList:[],
         //数据数量
@@ -183,30 +172,24 @@
         ids:[],
         //组件传参
         propsData:{},
+        propsReportDomData:{},
+        propsReportDomType:false,
       }
     },
     created () {
-
+      this.getDeptDropList();
     },
     mounted () {
-      //this.getList();
+      this.getList();
     },
     methods: {
       //检查/自查切换
       schoolCollegeToggle(type){
-        if(this.schoolCollegeType !== type){
-          this.$set(this,'schoolCollegeType',type);
+        if(this.checkCategory !== type){
+          this.$set(this,'checkCategory',type);
+          this.resetQuery();
         }
       },
-      //搜索模式切换
-      searchToggle(){
-        this.$set(this,'advancedType',!this.advancedType);
-      },
-      //与我相关按钮
-      topRightClickType(){
-        this.$set(this.queryParams,'myRelated',this.queryParams.myRelated==1?0:1);
-        this.handleQuery();
-      },
       //查询按钮
       handleQuery(){
         this.$set(this.queryParams,'page',1);
@@ -218,9 +201,9 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          isApprove:null,
+          planTitle:"",
+          deptId :null,
         });
         this.getList();
       },
@@ -235,7 +218,8 @@
           obj.startTime = "";
           obj.endTime = "";
         }
-        getListFunction(obj).then(response => {
+        obj.checkCategory = this.checkCategory;
+        securityRectifyReportList(obj).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
@@ -245,65 +229,54 @@
       tableButton(type,row){
         let self = this;
         if(type == 1){
-          //新增
-          this.$set(this,'pageType',2);
-          this.$set(this,'propsData',{});
+          //查看
+          this.$set(this,'propsReportDomData',{
+            reportId:row.reportId,
+            checkCategory:this.checkCategory,
+          })
+          this.$set(this,'propsReportDomType',true)
         }else 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 + '?', "警告", {
+          //提交
+          this.$confirm('是否确认提交?', "警告", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
             type: "warning"
           }).then(function() {
           }).then(() => {
-            stateFunction({id:row.id,state:!row.state,}).then(response => {
+            securityRectifyReportUpdate({reportId:row.reportId,isApprove:1}).then(response => {
               self.msgSuccess(response.message)
               self.getList();
             });
           }).catch(() => {});
+        }else if(type == 3){
+          //整改情况
+          this.$set(this,'propsData',{
+            reportId:row.reportId
+          });
+          this.$set(this,'pageType',2);
         }else if(type == 6){
           //返回并刷新
           this.$set(this,'pageType',1);
           this.getList();
         }
       },
+      dialogSubmit(){
+        this.downloadButton(this.propsReportDomData);
+      },
+      dialogOff(){
+        this.$set(this,'propsReportDomType',false)
+      },
       /*===记录勾选数据===
         需要再el-table 添加  :row-key="getRowKeys"
         需要在selection 添加 :reserve-selection="true"
       */
       getRowKeys(row) {
-        return row.id
+        return row.reportId
       },
       // 多选框选中数据
       handleSelectionChange(selection) {
         this.selectedNum = selection.length;
-        this.ids = selection.map(item => item.id)
+        this.ids = selection.map(item => item.reportId)
       },
       // 批量下载
       allDownload(){
@@ -318,13 +291,19 @@
           type: "warning"
         }).then(function() {
           let text = self.ids+'';
-          self.downloadGet('/zd-security/checkRectify/genReport/zip?idListStr='+text+'&fileUrl='+localStorage.getItem('fileBrowseEnvironment'), '批量报告下载.zip')
+          self.downloadGet('/security/rectifyReport/genReport/zip?idListStr='+text+'&fileUrl='+localStorage.getItem('fileBrowseEnvironment'), '批量报告下载.zip')
+          self.$refs['multipleTable'].clearSelection();
         }).then(() => {
         }).catch(() => {});
       },
       // 单个下载按钮
       downloadButton(row){
-        this.downloadGet('/zd-security/checkRectify/genReport?id='+row.id+'&fileUrl='+localStorage.getItem('fileBrowseEnvironment'), row.title+'(整改报告).docx')
+        this.downloadGet('/security/rectifyReport/getRectifyReport?reportId='+row.reportId+'&fileUrl='+localStorage.getItem('fileBrowseEnvironment'), '整改报告('+row.reportNum+').docx')
+      },
+      getDeptDropList(){
+        getDeptDropList({level: 2, deptType: 1 }).then(response => {
+          this.$set(this,'deptOption',response.data);
+        });
       },
     },
   }

+ 433 - 0
src/views/safetyCheck/safetyHazard/rectificationReport/listPage.vue

@@ -0,0 +1,433 @@
+<!--整改情况-->
+<template>
+  <div class="page-container rectificationNotice-listPage">
+    <div class="page-container checkItem" v-if="pageType == 1">
+      <div class="page-top-title-box">
+        <p class="page-top-title-name-p">整改情况</p>
+        <p class="page-top-title-out-p" @click="backPage">返回</p>
+      </div>
+      <div class="content-box scrollbar-box">
+        <div class="page-form-title-box" style="border:none;">
+          <el-form :model="queryParams" class="form-box" ref="queryForm"
+                   :inline="true" style="width:100%;">
+            <el-form-item label="" prop="rectifyStatus">
+              <el-select v-model="queryParams.rectifyStatus" placeholder="全部" style="width: 130px">
+                <el-option
+                  v-for="dict in optionList"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="planTitle">
+              <el-input
+                maxLength="30"
+                v-model="queryParams.planTitle"
+                placeholder="计划标题"
+                style="width: 130px"
+              />
+            </el-form-item>
+            <el-form-item label="" prop="hazardCheckPro">
+              <el-cascader
+                style="width: 130px"
+                placeholder="检查指标"
+                v-model="queryParams.hazardCheckPro"
+                filterable
+                :show-all-levels="false"
+                :options="cascaderData"
+                :props="{ value: 'id', label: 'labelName',emitPath:false }"
+              ></el-cascader>
+            </el-form-item>
+            <el-form-item label="" prop="hazardCheckName">
+              <el-input
+                maxLength="30"
+                v-model="queryParams.hazardCheckName"
+                placeholder="模糊搜索检查指标项"
+                style="width: 160px"
+              />
+            </el-form-item>
+            <el-form-item label="" prop="deptId">
+              <el-select v-model="queryParams.deptId" placeholder="学院单位" style="width: 130px">
+                <el-option
+                  v-for="dict in deptOption"
+                  :key="dict.deptId"
+                  :label="dict.deptName"
+                  :value="dict.deptId"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="levelId">
+              <el-select v-model="queryParams.levelId" placeholder="安全分级" style="width: 130px">
+                <el-option
+                  v-for="dict in levelOption"
+                  :key="dict.levelId"
+                  :label="dict.levelName"
+                  :value="dict.levelId"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="searchValue">
+              <el-input
+                maxLength="30"
+                v-model="queryParams.searchValue"
+                placeholder="实验室/房间号"
+                style="width: 140px"
+              />
+            </el-form-item>
+            <el-form-item label="" prop="rectifyName">
+              <el-input
+                maxLength="30"
+                v-model="queryParams.rectifyName"
+                placeholder="整改人"
+                style="width: 130px"
+              />
+            </el-form-item>
+            <el-form-item label="" prop="state">
+              <el-date-picker
+                :clearable="false"
+                v-model="dateRange"
+                size="small"
+                style="width: 220px"
+                value-format="yyyy-MM-dd"
+                type="daterange"
+                range-separator="-"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+              ></el-date-picker>
+            </el-form-item>
+            <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+            <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+          </el-form>
+        </div>
+        <div class="page-content-box" style="padding-top:0;">
+          <el-table class="table-box" v-loading="loading" border :data="dataList">
+            <el-table-column label="序号" type="index" width="60"/>
+            <el-table-column label="计划标题" prop="planTitle"  show-overflow-tooltip/>
+            <el-table-column label="不符合项" prop="content" width="260" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.hazardCheckName}} {{scope.row.hazardCheckName}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="实验室" prop="subName" width="200" show-overflow-tooltip/>
+            <el-table-column label="整改期限" prop="rectifyDeadline" width="130" show-overflow-tooltip/>
+            <el-table-column label="整改状态" prop="rectifyStatus" width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.rectifyStatus == 1?'已完成':(scope.row.rectifyStatus == 2?'待整改':(scope.row.rectifyStatus == 3?'待复核':(scope.row.rectifyStatus == 4?'暂无法整改':'')))}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="整改人" prop="rectifyName" width="100" show-overflow-tooltip/>
+            <el-table-column label="整改时间" 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="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{ scope.row.reviewStatus ==1 ?'已复查':(scope.row.reviewStatus ==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>
+                  <p class="table-button-p"
+                     @click="tableButton(1,scope.row)"
+                  >详情</p>
+                  <p class="table-button-null"></p>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination :page-sizes="[20, 30, 40, 50]"
+                      v-show="total>0"
+                      :total="total"
+                      :page.sync="queryParams.page"
+                      :limit.sync="queryParams.pageSize"
+                      @pagination="getList"
+          />
+        </div>
+      </div>
+    </div>
+    <initiateInspect v-if="pageType == 2" :initiateInspectData="initiateInspectData"></initiateInspect>
+  </div>
+</template>
+
+<script>
+  import {
+    getDeptDropList,
+    laboratoryClassLevelGetList,
+  } from '@/api/commonality/permission'
+  import {
+    securityCheckOptionList,
+    securityCheckDangerNoPermissList,
+  } from "@/api/safetyCheck/indexDemoOne";
+  import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
+  export default {
+    name: 'listPage',
+    components: {
+      initiateInspect
+    },
+    props:{
+      propsData:{},
+    },
+    data(){
+      return{
+        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        //页面状态
+        pageType:1,
+        //页面遮罩
+        loading:false,
+        optionList:[{value:null,label:'全部'},{value:2,label:'待整改'},{value:1,label:'已整改'},{value:4,label:'暂无法整改'},{value:5,label:'多次整改未完成'},],
+        //学院列表
+        deptOption:[],
+        //分级下拉列表
+        levelOption:[],
+        //检查项下拉列表
+        cascaderData:[],
+        //查询条件
+        queryParams:{
+          page:1,
+          pageSize:20,
+          rectifyStatus:null,
+          planTitle:"",
+          hazardCheckPro :null,
+          hazardCheckName :"",
+          deptId :null,
+          levelId :null,
+          searchValue :"",
+        },
+        //时间数据
+        dateRange:[],
+        //列表数据
+        dataList:[],
+        //数据数量
+        total:0,
+        initiateInspectData:{},
+      }
+    },
+    created(){
+      this.getDeptDropList();
+      this.laboratoryClassLevelGetList();
+      this.securityCheckOptionList();
+    },
+    mounted(){
+      this.getList();
+    },
+    methods:{
+      // 返回按钮
+      backPage(){
+        this.$parent.tableButton(6);
+      },
+      //查询按钮
+      handleQuery(){
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      //重置按钮
+      resetQuery(){
+        this.$set(this,'dateRange',[])
+        this.$set(this,'queryParams',{
+          page:1,
+          pageSize:20,
+          rectifyStatus:null,
+          planTitle:"",
+          hazardCheckPro :null,
+          hazardCheckName :"",
+          deptId :null,
+          levelId :null,
+          searchValue :"",
+        });
+        this.getList();
+      },
+      //获取数据列表
+      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.reportId = this.propsData.reportId
+        securityCheckDangerNoPermissList(obj).then(response => {
+          this.$set(this,'loading',false);
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
+      },
+      //操作按钮
+      tableButton(type,row){
+        let self = this;
+        if(type == 1){
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = true;
+          obj.orderTitle = '整改详情';
+          obj.orderType = '4';
+          this.$set(this,'initiateInspectData',obj);
+        }else if(type == 6){
+          //返回并刷新
+          this.$set(this,'pageType',1);
+          this.getList();
+        }
+      },
+      //学院列表
+      getDeptDropList() {
+        getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
+          this.$set(this, 'deptOption', response.data)
+        })
+      },
+      //分级下拉列表
+      laboratoryClassLevelGetList(){
+        laboratoryClassLevelGetList({}).then(response => {
+          this.$set(this,'levelOption',response.data);
+        });
+      },
+      //检查项列表
+      securityCheckOptionList() {
+        securityCheckOptionList({}).then(response => {
+          let list = this.getCascaderData(JSON.parse(JSON.stringify(response.data)),3)
+          this.$nextTick(()=>{
+            this.$set(this, 'cascaderData', list)
+          })
+        })
+      },
+      //检查项格式处理
+      getCascaderData(list,type) {
+        let self = this
+        for (let i = 0; i < list.length; i++) {
+          list[i].labelName = list[i].code ? list[i].code + ' ' + list[i].name : list[i].name
+          if(list[i].level == type){
+            delete list[i].children
+          }else if (list[i].children) {
+            if (list[i].children[0]) {
+              list[i].children = self.getCascaderData(list[i].children,type)
+            } else {
+              list.splice(i, 1)
+              i--
+            }
+          } else {
+            list.splice(i, 1)
+            i--
+          }
+        }
+        for (let i = 0; i < list.length; i++) {
+          list[i].labelName = list[i].code ? list[i].code + ' ' + list[i].name : list[i].name
+          if(list[i].level == type){
+            delete list[i].children
+          }else if (list[i].children) {
+            if (list[i].children[0]) {
+              list[i].children = self.getCascaderData(list[i].children,type)
+            } else {
+              list.splice(i, 1)
+              i--
+            }
+          } else {
+            list.splice(i, 1)
+            i--
+          }
+        }
+        for (let i = 0; i < list.length; i++) {
+          list[i].labelName = list[i].code ? list[i].code + ' ' + list[i].name : list[i].name
+          if(list[i].level == type){
+            delete list[i].children
+          }else if (list[i].children) {
+            if (list[i].children[0]) {
+              list[i].children = self.getCascaderData(list[i].children,type)
+            } else {
+              list.splice(i, 1)
+              i--
+            }
+          } else {
+            list.splice(i, 1)
+            i--
+          }
+        }
+        return list
+      },
+    },
+  }
+</script>
+
+<style scoped lang="scss">
+  .rectificationNotice-listPage{
+    .content-box{
+      flex:1;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+      .table-school-college-toggle-box{
+        overflow: hidden;
+        display: inline-block;
+        margin-right:10px;
+        p{
+          display: inline-block;
+          text-align: center;
+          width:80px;
+          line-height:40px;
+          height:40px;
+          color:#333;
+          background-color: #fff;
+          border:1px solid #E0E0E0;
+          font-size:14px;
+          cursor: pointer;
+        }
+        p:nth-child(1){
+          border-top-left-radius: 4px;
+          border-bottom-left-radius: 4px;
+          /*border-right:none;*/
+        }
+        p:nth-child(4){
+          border-top-right-radius: 4px;
+          border-bottom-right-radius: 4px;
+          /*border-left:none;*/
+        }
+        .p-check{
+          border:1px solid #0183FA;
+          background-color: #0183FA;
+          color:#fff;
+        }
+      }
+      .form-button-max-big-box-me{
+        display: inline-block;
+        overflow: hidden;
+        margin-right:10px;
+        .form-button-big-box-me{
+          display: flex;
+          div{
+            position: relative;
+            height:40px;
+            width:100px;
+            line-height: 40px;
+            text-align: center;
+            color:#999;
+            font-size:14px;
+            border:1px solid #999;
+            border-radius:4px;
+            font-weight:500;
+            cursor: pointer;
+            .icon-p-me{
+              width:15px;
+              height:15px;
+              line-height:15px;
+              text-align: center;
+              position: absolute;
+              right:0;
+              bottom:0;
+              color:#fff;
+              background: #0183fa;
+              border-top-left-radius:4px;
+            }
+          }
+          .checkDiv-me{
+            color:#0183FA!important;
+            border:1px solid #0183FA!important;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 4 - 4
src/views/safetyCheck/safetyHazard/selfInspectionHazard/index.vue

@@ -110,16 +110,16 @@
       <div class="page-content-box" style="padding-top:0;">
         <el-table class="table-box" v-loading="loading" border :data="dataList">
           <el-table-column label="序号" type="index" width="60"/>
-          <el-table-column label="计划标题" prop="planTitle" width="250" show-overflow-tooltip/>
+          <el-table-column label="计划标题" prop="planTitle" width="220" show-overflow-tooltip/>
           <el-table-column label="检查类型" prop="checkTypeName" width="100" show-overflow-tooltip/>
-          <el-table-column label="不符合项" prop="hazardCheckName" width="250" show-overflow-tooltip>
+          <el-table-column label="不符合项" prop="hazardCheckName" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{scope.row.hazardCheckName}} {{scope.row.hazardCheckName}}</span>
             </template>
           </el-table-column>
           <el-table-column label="实验室" prop="subName" width="220" show-overflow-tooltip/>
           <el-table-column label="整改期限" prop="rectifyDeadline" width="130" show-overflow-tooltip/>
-          <el-table-column label="整改状态" prop="rectifyStatus" width="130" show-overflow-tooltip>
+          <el-table-column label="整改状态" prop="rectifyStatus" width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{scope.row.rectifyStatus == 1?'已完成':(scope.row.rectifyStatus == 2?'待整改':(scope.row.rectifyStatus == 3?'待复核':(scope.row.rectifyStatus == 4?'暂无法整改':'')))}}</span>
             </template>
@@ -130,7 +130,7 @@
               <span>{{ parseTime(scope.row.rectifyTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="复查结果" prop="reviewStatus" width="130" show-overflow-tooltip>
+          <el-table-column label="复查结果" prop="reviewStatus" width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{ scope.row.reviewStatus ==1 ?'已复查':(scope.row.reviewStatus ==0 ?'未复查':'') }}</span>
             </template>