dedsudiyu лет назад: 2
Родитель
Сommit
e3f054c050
21 измененных файлов с 749 добавлено и 229 удалено
  1. 113 24
      src/api/safetyCheck/index.js
  2. 9 4
      src/views/safetyCheck/checkConfiguration/checkUserPage.vue
  3. 58 6
      src/views/safetyCheck/checkConfiguration/configDialog.vue
  4. 10 5
      src/views/safetyCheck/checkConfiguration/rectificationUserPage.vue
  5. 2 0
      src/views/safetyCheck/checkItemLibrary/index.vue
  6. 2 0
      src/views/safetyCheck/laboratorySelfTest/selfInspectionManagement/index.vue
  7. 2 0
      src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/index.vue
  8. 2 0
      src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/listPage.vue
  9. 4 2
      src/views/safetyCheck/rectificationReport/index.vue
  10. 2 0
      src/views/safetyCheck/safetyHazard/batchAudit.vue
  11. 2 0
      src/views/safetyCheck/safetyHazard/cannotListPage.vue
  12. 2 0
      src/views/safetyCheck/safetyHazard/departmentListPage.vue
  13. 2 0
      src/views/safetyCheck/safetyHazard/schoolListPage.vue
  14. 239 58
      src/views/safetyCheck/schoolInspection/inspectionGroup/addDialog.vue
  15. 75 28
      src/views/safetyCheck/schoolInspection/inspectionGroup/index.vue
  16. 2 0
      src/views/safetyCheck/schoolInspection/inspectionManagement/index.vue
  17. 33 10
      src/views/safetyCheck/schoolInspection/inspectionPlan/addDialog.vue
  18. 101 43
      src/views/safetyCheck/schoolInspection/inspectionPlan/index.vue
  19. 81 45
      src/views/safetyCheck/schoolInspection/inspectionPlan/listPage.vue
  20. 4 2
      src/views/safetyCheck/snapshotManagement/index.vue
  21. 4 2
      src/views/safetyCheck/snapshotManagement/listPage.vue

+ 113 - 24
src/api/safetyCheck/index.js

@@ -100,17 +100,6 @@ export function collegCheckHiddenCountByType(query) {
   })
 }
 
-/***************************检查计划***************************/
-
-//检查计划-列表
-export function checkPlanList(data) {
-  return request({
-    url: '/zd-security/checkPlan/list',
-    method: 'post',
-    data: data
-  })
-}
-
 /***************************随手拍***************************/
 
 //随手拍-上报记录-列表
@@ -227,43 +216,143 @@ export function checkStaffList(query) {
   })
 }
 
+//检查配置 检查人员/整改人员-查询当前配置
+export function checkSet(query) {
+  return request({
+    url: '/zd-security/checkSet/list',
+    method: 'get',
+    params: query
+  })
+}
 
+//检查配置 检查人员/整改人员-保存当前配置
+export function checkSetAdd(data) {
+  return request({
+    url: '/zd-security/checkSet/add',
+    method: 'post',
+    data: data
+  })
+}
 
+/***************************检查计划***************************/
 
+//检查计划-列表
+export function checkPlanList(data) {
+  return request({
+    url: '/zd-security/checkPlan/list',
+    method: 'post',
+    data: data
+  })
+}
 
+//检查计划-根据计划ID查询管理列表
+export function findByCheckPlanId(data) {
+  return request({
+    url: '/zd-security/checkManage/findByCheckPlanId',
+    method: 'post',
+    data: data
+  })
+}
 
+//检查计划-根据计划ID删除
+export function checkPlanDelete(query) {
+  return request({
+    url: '/zd-security/checkPlan/delete',
+    method: 'delete',
+    params: query
+  })
+}
 
-// 查询安全准入资格列表
-export function listGroup(query) {
+//检查计划-查询历史计划标题列表
+export function getHistoryPlanTitles(query) {
   return request({
-    url: '/laboratory/group/list',
+    url: '/zd-security/checkPlan/getHistoryPlanTitles',
     method: 'get',
     params: query
   })
 }
 
-// 新增安全准入资格
-export function addGroup(data) {
+/***************************校院巡察组***************************/
+
+//校院巡察组-分页获取校院巡查组列表
+export function checkGroupList(data) {
   return request({
-    url: '/laboratory/group',
+    url: '/zd-security/checkGroup/list',
     method: 'post',
     data: data
   })
 }
 
-// 修改安全准入资格
-export function updateGroup(data) {
+//校院巡察组-通过id查询巡查组详情
+export function checkGroupFind(query) {
   return request({
-    url: '/laboratory/group',
+    url: '/zd-security/checkGroup/find',
+    method: 'get',
+    params: query
+  })
+}
+
+//校院巡察组-启用-停用巡查组
+export function checkGroupEnable(query) {
+  return request({
+    url: '/zd-security/checkGroup/enable',
     method: 'put',
+    params: query
+  })
+}
+
+//校院巡察组-通过id删除巡查组
+export function checkGroupDelete(query) {
+  return request({
+    url: '/zd-security/checkGroup/delete',
+    method: 'delete',
+    params: query
+  })
+}
+//校院巡察组-新增
+export function checkGroupAdd(data) {
+  return request({
+    url: '/zd-security/checkGroup/add',
+    method: 'post',
     data: data
   })
 }
 
-// 删除安全准入资格
-export function delGroup(id) {
+//校院巡察组-编辑
+export function checkGroupUpdate(data) {
   return request({
-    url: '/laboratory/group/' + id,
-    method: 'delete'
+    url: '/zd-security/checkGroup/update',
+    method: 'put',
+    data: data
+  })
+}
+
+//校院巡察组-获取巡察组下拉列表
+export function findGroupList(data) {
+  return request({
+    url: '/zd-security/checkGroup/findGroupList',
+    method: 'post',
+    data: data
+  })
+}
+//校院巡察组-获取巡察组下拉列表ID获取巡查组人员
+
+
+
+
+
+
+/***************************通用接口***************************/
+
+//通用接口-人员查询(过滤已选/未选)
+export function findUserList(data) {
+  return request({
+    url: '/zd-system/user/findUserList',
+    method: 'post',
+    data: data
   })
 }
+
+
+
+

+ 9 - 4
src/views/safetyCheck/checkConfiguration/checkUserPage.vue

@@ -47,7 +47,7 @@
                 :limit.sync="queryParams.pageSize"
                 @pagination="getList"
     />
-    <configDialog v-if="configDialogType" :configDialogData="configDialogData"></configDialog>
+    <configDialog v-if="configDialogType" :configDialogData="queryParams"></configDialog>
   </div>
 </template>
 
@@ -72,6 +72,7 @@
         queryParams:{
           pageNum:1,
           pageSize:20,
+          staffType:1,
           searchValue:"",
           deptId:""
         },
@@ -94,13 +95,16 @@
           this.$set(this,'configDialogType',true);
         }else if(type == 2){
           this.$set(this,'configDialogType',false);
+        }else if(type == 3){
+          this.getList();
+          this.$set(this,'configDialogType',false);
         }
       },
       //获取数据列表
       getList(){
-        checkStaffList(this.queryParamsData).then(response => {
-          this.total = response.total;
-          this.tableList = response.rows;
+        checkStaffList(this.queryParams).then(response => {
+          this.total = response.data.total;
+          this.tableList = response.data.records;
         });
       },
       /** 搜索按钮操作 */
@@ -113,6 +117,7 @@
         this.$set(this,'queryParams',{
           pageNum:1,
           pageSize:20,
+          staffType:1,
           searchValue:"",
           deptId:""
         });

+ 58 - 6
src/views/safetyCheck/checkConfiguration/configDialog.vue

@@ -1,13 +1,13 @@
 <template>
   <el-dialog class="configDialog"
-             :title="configDialogData.configType==1?'检查人员配置':'整改人员配置'" :visible.sync="configDialogType" v-if="configDialogType"
+             :title="configDialogData.staffType==1?'检查人员配置':'整改人员配置'" :visible.sync="configDialogType" v-if="configDialogType"
              @close="addDialogAllOff" width="1303px" append-to-body>
     <div class="configDialog-box" v-if="configPageType == 1">
       <div class="configDialog-content-box">
         <div class="configDialog-content-min-box">
           <p class="configDialog-content-min-title">实验室检查人员配置:</p>
           <div class="configDialog-content-min-checkbox">
-            <el-checkbox-group v-model="data1" @change="checkboxChange">
+            <el-checkbox-group v-model="checkDataList" @change="checkboxChange">
               <el-checkbox style="width:170px;margin-right:70px;"
                            v-for="item in checkList" :value="item.key" :label="item.key" :key="item.key">{{item.label}}</el-checkbox>
             </el-checkbox-group>
@@ -24,7 +24,7 @@
       <div class="dialog-footer-box">
         <p class="dialog-footer-button-null"></p>
         <p class="dialog-footer-button-info" @click="addDialogOff">取消</p>
-        <p class="dialog-footer-button-primary">确定</p>
+        <p class="dialog-footer-button-primary" @click="upDataButton">确定</p>
         <p class="dialog-footer-button-null"></p>
       </div>
     </div>
@@ -151,7 +151,7 @@
       </div>
       <div class="dialog-footer-box">
         <p class="dialog-footer-button-null"></p>
-        <p class="dialog-footer-button-info" @click="addDialogOff">{{configPageType==1?'取消':'返回'}}</p>
+        <p class="dialog-footer-button-info" @click="addDialogOff">返回</p>
         <p class="dialog-footer-button-primary">确定</p>
         <p class="dialog-footer-button-null"></p>
       </div>
@@ -160,6 +160,7 @@
 </template>
 
 <script>
+  import { checkSet,checkSetAdd } from '@/api/safetyCheck/index'
   export default {
     name: 'configDialog',
     props:{
@@ -169,7 +170,7 @@
       return{
         configDialogType:true,
         configPageType:1,
-        data1:[],
+        checkDataList:[],
         checkList:[
           {
             key:"1",
@@ -215,9 +216,60 @@
 
     },
     mounted(){
-
+      this.checkSet();
     },
     methods:{
+      //提交
+      upDataButton(){
+        let self = this;
+        let obj = {
+          staffType:this.configDialogData.staffType,
+          setSubjectLead:false,
+          setSubjectSafety:false,
+          setTeacher:false,
+          setStudent:false,
+          sysUserVoList:[],
+        };
+        for(let i=0;i<self.checkDataList.length;i++){
+          if(self.checkDataList[i] == '1'){
+            obj.setSubjectLead = true;
+          }else if(self.checkDataList[i] == '2'){
+            obj.setSubjectSafety = true;
+          }else if(self.checkDataList[i] == '3'){
+            obj.setTeacher = true;
+          }else if(self.checkDataList[i] == '4'){
+            obj.setStudent = true;
+          }
+        }
+        checkSetAdd(obj).then(response => {
+          this.msgSuccess(response.msg);
+          this.$parent.configButton(3)
+        })
+      },
+      //获取配置
+      checkSet(){
+        checkSet({staffType:this.configDialogData.staffType}).then(response => {
+          let list = [];
+          if(response.data.setSubjectLead){
+            //实验室负责人
+            list.push('1');
+          }
+          if(response.data.setSubjectSafety){
+            //实验室安全责任人
+            list.push('2');
+          }
+          if(response.data.setTeacher){
+            //全部老师
+            list.push('3');
+          }
+          if(response.data.setStudent){
+            //全部学生
+            list.push('4');
+            this.$set(this,'checkType',true);
+          }
+          this.$set(this,'checkDataList',list);
+        });
+      },
       //人员选择
       configUserButton(type){
         if(this.configPageType != type){

+ 10 - 5
src/views/safetyCheck/checkConfiguration/rectificationUserPage.vue

@@ -28,7 +28,7 @@
           <p class="inquire-button-one"
              style="width:100px;"
              @click="configButton(1)"
-          >检查者配置</p>
+          >整改者配置</p>
         </el-col>
       </el-form-item>
     </el-form>
@@ -47,7 +47,7 @@
                 :limit.sync="queryParams.pageSize"
                 @pagination="getList"
     />
-    <configDialog v-if="configDialogType" :configDialogData="configDialogData"></configDialog>
+    <configDialog v-if="configDialogType" :configDialogData="queryParams"></configDialog>
   </div>
 </template>
 
@@ -71,6 +71,7 @@
         deptSelectList:[],
         queryParams:{
           pageNum:1,
+          staffType:2,
           pageSize:20,
           searchValue:"",
           deptId:""
@@ -93,13 +94,16 @@
           this.$set(this,'configDialogType',true);
         }else if(type == 2){
           this.$set(this,'configDialogType',false);
+        }else if(type == 3){
+          this.getList();
+          this.$set(this,'configDialogType',false);
         }
       },
       //获取数据列表
       getList(){
-        checkStaffList(this.queryParamsData).then(response => {
-          this.total = response.total;
-          this.tableList = response.rows;
+        checkStaffList(this.queryParams).then(response => {
+          this.total = response.data.total;
+          this.tableList = response.data.records;
         });
       },
       /** 搜索按钮操作 */
@@ -111,6 +115,7 @@
       resetQuery() {
         this.$set(this,'queryParams',{
           pageNum:1,
+          staffType:2,
           pageSize:20,
           searchValue:"",
           deptId:""

+ 2 - 0
src/views/safetyCheck/checkItemLibrary/index.vue

@@ -65,9 +65,11 @@
         <el-table-column label="操作" width="180">
           <template slot-scope="scope">
             <div class="table-button-box">
+              <p class="table-button-null"></p>
               <p class="table-button-p" v-if="scope.row.level != 3" @click="addDialogOpen(2,scope.row)">新增</p>
               <p class="table-button-p" @click="addDialogOpen(3,scope.row)">编辑</p>
               <p class="table-button-p" @click="delItem(scope.row)">删除</p>
+              <p class="table-button-null"></p>
             </div>
           </template>
         </el-table-column>

+ 2 - 0
src/views/safetyCheck/laboratorySelfTest/selfInspectionManagement/index.vue

@@ -86,11 +86,13 @@
           <el-table-column label="操作" align="center" prop="deptName" width="230">
             <template slot-scope="scope">
               <div class="table-button-box">
+                <p class="table-button-null"></p>
                 <p class="table-button-p" @click="goAddPage(3)">详情</p>
                 <p class="table-button-p" @click="goAddPage(2)">开始检查</p>
                 <p class="table-button-p">编辑</p>
                 <p class="table-button-p" @click="lookDocumentButton(1,scope.row)">整改报告</p>
                 <p class="table-button-p" @click="lookDocumentListButton(1,scope.row)">查看附件</p>
+                <p class="table-button-null"></p>
               </div>
             </template>
           </el-table-column>

+ 2 - 0
src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/index.vue

@@ -73,11 +73,13 @@
           <el-table-column label="操作" align="center" prop="deptName" width="200">
             <template slot-scope="scope">
               <div class="table-button-box">
+                <p class="table-button-null"></p>
                 <p class="table-button-p" @click="addDialogOpen(2,scope.row)">编辑</p>
                 <p class="table-button-p">删除</p>
                 <p class="table-button-p" @click="addDialogOpen(3,scope.row)">详情</p>
                 <p class="table-button-p" @click="goPage(2,scope.row)">自查管理</p>
                 <p class="table-button-p" @click="lookDocumentListButton(1,scope.row)">查看附件</p>
+                <p class="table-button-null"></p>
               </div>
             </template>
           </el-table-column>

+ 2 - 0
src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/listPage.vue

@@ -81,11 +81,13 @@
           <el-table-column label="操作" align="center" prop="deptName" width="230">
             <template slot-scope="scope">
               <div class="table-button-box">
+                <p class="table-button-null"></p>
                 <p class="table-button-p" @click="goAddPage(3)">详情</p>
                 <p class="table-button-p" @click="goAddPage(2)">开始检查</p>
                 <p class="table-button-p">编辑</p>
                 <p class="table-button-p" @click="lookDocumentButton(1,scope.row)">整改报告</p>
                 <p class="table-button-p" @click="lookDocumentListButton(1,scope.row)">查看附件</p>
+                <p class="table-button-null"></p>
               </div>
             </template>
           </el-table-column>

+ 4 - 2
src/views/safetyCheck/rectificationReport/index.vue

@@ -64,9 +64,11 @@
         <el-table-column label="操作" align="center" prop="deptName" width="200">
           <template slot-scope="scope">
             <div class="table-button-box">
+              <p class="table-button-null"></p>
               <p class="table-button-p" @click="addDialogOpen(true)">检查详情</p>
               <p class="table-button-p" @click="lookDocumentButton(1,scope.row)">查看</p>
               <p class="table-button-p" @click="downloadButton(scope.row)">下载</p>
+              <p class="table-button-null"></p>
             </div>
           </template>
         </el-table-column>
@@ -179,8 +181,8 @@
           obj.endTime = ""
         }
         checkRectifyList(obj).then(response => {
-          this.total = response.total;
-          this.tableList = response.rows;
+          this.total = response.data.total;
+          this.tableList = response.data.records;
         });
       },
       /** 搜索按钮操作 */

+ 2 - 0
src/views/safetyCheck/safetyHazard/batchAudit.vue

@@ -49,7 +49,9 @@
           <el-table-column label="操作" align="center" prop="deptName" width="80">
             <template slot-scope="scope">
               <div class="table-button-box">
+                <p class="table-button-null"></p>
                 <p class="table-button-p" @click="addDialogOpen(true,scope.row)">详情</p>
+                <p class="table-button-null"></p>
               </div>
             </template>
           </el-table-column>

+ 2 - 0
src/views/safetyCheck/safetyHazard/cannotListPage.vue

@@ -53,7 +53,9 @@
         <el-table-column label="操作" align="center" prop="deptName" width="80">
           <template slot-scope="scope">
             <div class="table-button-box">
+              <p class="table-button-null"></p>
               <p class="table-button-p" @click="addDialogOpen(true,scope.row)">详情</p>
+              <p class="table-button-null"></p>
             </div>
           </template>
         </el-table-column>

+ 2 - 0
src/views/safetyCheck/safetyHazard/departmentListPage.vue

@@ -85,7 +85,9 @@
           <el-table-column label="操作" align="center" prop="deptName" width="80">
             <template slot-scope="scope">
               <div class="table-button-box">
+                <p class="table-button-null"></p>
                 <p class="table-button-p" @click="addDialogOpen(true,scope.row)">详情</p>
+                <p class="table-button-null"></p>
               </div>
             </template>
           </el-table-column>

+ 2 - 0
src/views/safetyCheck/safetyHazard/schoolListPage.vue

@@ -85,7 +85,9 @@
           <el-table-column label="操作" align="center" prop="deptName" width="80">
             <template slot-scope="scope">
               <div class="table-button-box">
+                <p class="table-button-null"></p>
                 <p class="table-button-p" @click="addDialogOpen(true,scope.row)">详情</p>
+                <p class="table-button-null"></p>
               </div>
             </template>
           </el-table-column>

+ 239 - 58
src/views/safetyCheck/schoolInspection/inspectionGroup/addDialog.vue

@@ -4,31 +4,31 @@
              @close="addDialogAllOff" width="1303px" append-to-body>
     <div class="add-max-box" v-if="addDialogBoxType == 1">
       <el-form  :model="dialogForm" :rules="rules" label-width="100px" class="add-form-box">
-        <el-form-item label="是否启用:" prop="data1">
+        <el-form-item label="是否启用:" prop="enable">
           <el-switch
             v-if="!lookInfoType"
-            @click.native="changeIsNeedCaptcha(dialogForm.data1)"
+            @click.native="changeIsNeedCaptcha(dialogForm.enable)"
             class="switch captcha-img"
             :active-value="1"
             :inactive-value="0"
             active-color="#0183FA"
             inactive-color="#999"
-            v-model="dialogForm.data1"
+            v-model="dialogForm.enable"
             active-text="启用"
             inactive-text="停用"
           ></el-switch>
-          <p v-if="lookInfoType" :class="dialogForm.data1==1?'switchFontColor':''" style="line-height:40px;">{{dialogForm.data1==1?'启用':'停用'}}</p>
+          <p v-if="lookInfoType" :class="dialogForm.enable==1?'switchFontColor':''" style="line-height:40px;">{{dialogForm.enable==1?'启用':'停用'}}</p>
         </el-form-item>
-        <el-form-item label="巡查组名称:" prop="data2">
-          <el-input :disabled="lookInfoType" v-model="dialogForm.data2" placeholder="未选择指标" maxLength="10" style="width:450px;"/>
+        <el-form-item label="巡查组名称:" prop="groupName">
+          <el-input :disabled="lookInfoType" v-model="dialogForm.groupName" placeholder="请输入巡查组名称" maxLength="20" style="width:450px;"/>
         </el-form-item>
-        <el-form-item label="巡查层级:" prop="data3">
-          <el-select :disabled="lookInfoType" v-model="dialogForm.data3" placeholder="请选择检查范围" style="width:450px;">
+        <el-form-item label="巡查层级:" prop="checkLevel">
+          <el-select :disabled="lookInfoType" v-model="dialogForm.checkLevel" placeholder="请选择巡查层级" style="width:450px;">
             <el-option
               v-for="item in dialogRangeOptions"
-              :key="item.value"
+              :key="item.key"
               :label="item.label"
-              :value="item.value">
+              :value="item.key">
             </el-option>
           </el-select>
         </el-form-item>
@@ -38,13 +38,14 @@
           <img src="@/assets/ZDimages/safetyCheck/icon_xyxc_cy.png">
           <p class="dialog-table-title-p">巡查成员</p>
           <p v-if="!lookInfoType" class="inquire-button-one dialog-table-title-button" @click="dialogClickType(2)">+ 添加</p>
+          <p v-if="lookInfoType" class="dialog-table-title-text">{{dialogTableList[0]?dialogTableList.length+'人':'0人'}}</p>
         </div>
         <el-table border :data="dialogTableList">
           <el-table-column label="序号" align="center"  type="index" width="140"/>
-          <el-table-column label="姓名" align="center" prop="deptName" show-overflow-tooltip/>
-          <el-table-column label="工号" align="center" prop="deptName" show-overflow-tooltip/>
+          <el-table-column label="姓名" align="center" prop="name" show-overflow-tooltip/>
+          <el-table-column label="工号" align="center" prop="jobNum" show-overflow-tooltip/>
           <el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip/>
-          <el-table-column label="是否启用" align="center" prop="deptName" width="150">
+          <el-table-column label="是否启用" align="center" prop="enable" width="150">
             <template slot-scope="scope">
               <el-switch
                 v-if="!lookInfoType"
@@ -54,11 +55,11 @@
                 :inactive-value="0"
                 active-color="#0183FA"
                 inactive-color="#999"
-                v-model="scope.row.deptName"
+                v-model="scope.row.enable"
                 active-text="启用"
                 inactive-text="停用"
               ></el-switch>
-              <p v-if="lookInfoType" :class="scope.row.deptName==1?'switchFontColor':''">{{scope.row.deptName==1?'启用':'停用'}}</p>
+              <p v-if="lookInfoType" :class="scope.row.enable==1?'switchFontColor':''">{{scope.row.enable==1?'启用':'停用'}}</p>
             </template>
           </el-table-column>
           <el-table-column label="操作" align="center" prop="deptName" width="150" v-if="!lookInfoType">
@@ -85,15 +86,15 @@
               <el-select v-model="userQueryParamsLeft.deptId" clearable placeholder="选择部门" style="width: 110px">
                 <el-option
                   v-for="item in deptSelectList"
-                  :key="item.key"
-                  :label="item.label"
-                  :value="item.key">
+                  :key="item.deptId"
+                  :label="item.deptName"
+                  :value="item.deptId">
                 </el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="" prop="searchValue" class="form-index">
               <el-input
-                maxLength="30"
+                maxLength="20"
                 v-model="userQueryParamsLeft.searchValue"
                 placeholder="搜索姓名/工号"
                 clearable
@@ -105,17 +106,18 @@
               <p class="reset-button-one" @click="userResetQueryLeft" style="width:60px;">重置</p>
             </el-form-item>
           </el-form>
-          <el-table  border :data="userTableListLeft" @selection-change="userChangeLeft" :row-key="getRowKeys">
+          <el-table ref="leftUserTable" border :data="userTableListLeft" @selection-change="userChangeLeft" :row-key="getRowKeys">
             <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
-            <el-table-column label="姓名" align="center" prop="deptName" show-overflow-tooltip/>
-            <el-table-column label="工号" align="center" prop="deptName" show-overflow-tooltip width="150"/>
+            <el-table-column label="姓名" align="center" prop="nickName" show-overflow-tooltip/>
+            <el-table-column label="工号" align="center" prop="userName" show-overflow-tooltip width="150"/>
             <el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="168"/>
           </el-table>
-          <pagination :page-sizes="[20, 30, 40, 50]"
+          <pagination layout="total, prev, pager, next, jumper"
                       v-show="userTotalLeft>0"
                       :total="userTotalLeft"
-                      :page.sync="userTableListLeft.pageNum"
-                      :limit.sync="userTableListLeft.pageSize"
+                      :pager-count="5"
+                      :page.sync="userQueryParamsLeft.pageNum"
+                      :limit.sync="userQueryParamsLeft.pageSize"
                       @pagination="userGetListLeft"/>
         </div>
       </div>
@@ -134,15 +136,15 @@
               <el-select v-model="userQueryParamsRight.deptId" clearable placeholder="选择部门" style="width: 110px">
                 <el-option
                   v-for="item in deptSelectList"
-                  :key="item.key"
-                  :label="item.label"
-                  :value="item.key">
+                  :key="item.deptId"
+                  :label="item.deptName"
+                  :value="item.deptId">
                 </el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="" prop="searchValue" class="form-index">
               <el-input
-                maxLength="30"
+                maxLength="20"
                 v-model="userQueryParamsRight.searchValue"
                 placeholder="搜索姓名/工号"
                 clearable
@@ -154,17 +156,18 @@
               <p class="reset-button-one" @click="userResetQueryRight" style="width:60px;">重置</p>
             </el-form-item>
           </el-form>
-          <el-table  border :data="userTableListRight" @selection-change="userChangeRight" :row-key="getRowKeys">
+          <el-table ref="rightUserTable" border :data="userTableListRight" @selection-change="userChangeRight" :row-key="getRowKeys">
             <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
-            <el-table-column label="姓名" align="center" prop="deptName" show-overflow-tooltip/>
-            <el-table-column label="工号" align="center" prop="deptName" show-overflow-tooltip width="150"/>
+            <el-table-column label="姓名" align="center" prop="nickName" show-overflow-tooltip/>
+            <el-table-column label="工号" align="center" prop="userName" show-overflow-tooltip width="150"/>
             <el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="168"/>
           </el-table>
-          <pagination :page-sizes="[20, 30, 40, 50]"
+          <pagination layout="total, prev, pager, next, jumper"
                       v-show="userTotalRight>0"
                       :total="userTotalRight"
-                      :page.sync="userTableListRight.pageNum"
-                      :limit.sync="userTableListRight.pageSize"
+                      :pager-count="5"
+                      :page.sync="userQueryParamsRight.pageNum"
+                      :limit.sync="userQueryParamsRight.pageSize"
                       @pagination="userGetListRight"/>
         </div>
       </div>
@@ -172,7 +175,7 @@
     <div slot="footer" class="dialog-footer dialog-footer-box" style="display: flex">
       <p class="dialog-footer-button-null"></p>
       <p class="dialog-footer-button-info" @click="addDialogOff">{{addDialogBoxType==1?'取消':'返回'}}</p>
-      <p class="dialog-footer-button-primary" v-if="!lookInfoType">确定</p>
+      <p class="dialog-footer-button-primary" v-if="!lookInfoType" @click="addUserButton">确定</p>
       <p class="dialog-footer-button-null"></p>
     </div>
 
@@ -180,6 +183,8 @@
 </template>
 
 <script>
+  import { listDepartments } from "@/api/system/dept";
+  import { checkGroupFind,findUserList,checkGroupAdd,checkGroupUpdate } from '@/api/safetyCheck/index'
   export default {
     name: 'addDialog',
     props:{
@@ -191,40 +196,50 @@
         addDialogType:true,
         addDialogBoxType:1,
         lookInfoType:false,
-        dialogForm:{},
-        dialogRangeOptions:[],
+        dialogForm:{
+          enable:1,
+          groupName:"",
+          checkLevel:"",
+        },
         //层级
+        dialogRangeOptions:[{key:1,label:"校级"},{key:2,label:"院级"}],
+        //院系
         deptSelectList:[],
         //选中巡查人员列表
-        dialogTableList:[{userId:1,deptName:1},{userId:2,deptName:2},{userId:3},{userId:4},{userId:5},{userId:6},{userId:7},{userId:8},{userId:9},{userId:10}],
-
+        dialogTableList:[],
+        //选中页面人员列表数据
+        dialogTableDataList:[],
         //弹窗内容状态
         userQueryParamsLeft:{
+          pageNum: 1,
+          pageSize: 20,
           deptId:"",
           searchValue:"",
         },
-        userTableListLeft:[{}],
+        userTableListLeft:[],
         userTotalLeft:0,
         userNumLeft:0,
         userIdsLeft:[],
         userQueryParamsRight:{
+          pageNum: 1,
+          pageSize: 20,
           deptId:"",
           searchValue:"",
         },
-        userTableListRight:[{}],
+        userTableListRight:[],
         userTotalRight:0,
         userNumRight:0,
         userIdsRight:[],
         // 表单校验
         rules: {
-          data1: [
+          enable: [
             { required: true, message: "请选择是否启用", trigger: "change" },
           ],
-          data2: [
+          groupName: [
             { required: true, message: "请输入巡查组名称", trigger: "change" },
             { required: true, message: "请输入巡查组名称", validator: this.spaceJudgment, trigger: "change" },
           ],
-          data4: [
+          checkLevel: [
             { required: true, message: "请选择巡查层级", trigger: "change" },
           ],
         },
@@ -236,13 +251,24 @@
       if(this.addDialogData.addType){
         //新增
       }else{
-        //编辑
+        //详情-编辑
+        this.checkGroupFind();
       }
     },
     mounted(){
-
+      this.listDepartments();
     },
     methods:{
+      //获取详情
+      checkGroupFind(){
+        checkGroupFind({id:this.addDialogData.id}).then(response => {
+          this.$set(this.dialogForm,'id',response.data.id?response.data.id:'');
+          this.$set(this.dialogForm,'enable',response.data.enable);
+          this.$set(this.dialogForm,'groupName',response.data.groupName);
+          this.$set(this.dialogForm,'checkLevel',response.data.checkLevel);
+          this.$set(this,'dialogTableList',response.data.checkGroupMemberList);
+        });
+      },
       //弹窗关闭
       addDialogAllOff(){
         this.$parent.addDialogOpen(4)
@@ -254,9 +280,93 @@
           this.dialogClickType(1);
         }
       },
+      //添加人员
+      addUserButton(){
+        let self = this;
+        if(this.addDialogBoxType == 1){
+          if(this.dialogForm.id){
+            //编辑
+            let obj = this.dialogForm;
+            obj.checkGroupMemberList = this.dialogTableList
+            checkGroupUpdate(obj).then(response => {
+              this.msgSuccess(response.msg);
+              this.$parent.addDialogOpen(5)
+            })
+          }else{
+            //新增
+            let obj = this.dialogForm;
+            obj.checkGroupMemberList = this.dialogTableList
+            checkGroupAdd(obj).then(response => {
+              this.msgSuccess(response.msg);
+              this.$parent.addDialogOpen(5)
+            })
+          }
+        }else{
+          let list = [];
+          let newObj = {};
+          for(let o=0;o<self.dialogTableDataList.length;o++){
+            let num = 0;
+            for(let i=0;i<self.dialogTableList.length;i++){
+              if(self.dialogTableList[i].userId == self.dialogTableDataList[o].userId){
+                num++
+                newObj = JSON.parse(JSON.stringify(self.dialogTableList[i]))
+              }
+            }
+            if(num == 0){
+              let obj = {
+                userId:self.dialogTableDataList[o].userId,
+                name:self.dialogTableDataList[o].name,
+                jobNum:self.dialogTableDataList[o].jobNum,
+                deptName:self.dialogTableDataList[o].deptName,
+                deptId:self.dialogTableDataList[o].deptId,
+                userType:self.dialogTableDataList[o].userType,
+                enable:1,
+              };
+              list.push(obj)
+            }else{
+              let obj = {
+                userId:self.dialogTableDataList[o].userId,
+                name:self.dialogTableDataList[o].name,
+                jobNum:self.dialogTableDataList[o].jobNum,
+                deptName:self.dialogTableDataList[o].deptName,
+                deptId:self.dialogTableDataList[o].deptId,
+                userType:self.dialogTableDataList[o].userType,
+                enable:newObj.enable,
+              };
+              list.push(obj)
+            }
+          }
+          this.$set(this,'dialogTableList',list);
+          this.dialogClickType(1);
+        }
+      },
       //弹窗状态切换
-      dialogClickType(type,item){
-        this.$set(this,'addDialogBoxType',type);
+      dialogClickType(type){
+        let self = this;
+        if(type == 2){
+          this.$set(self,'dialogTableDataList',JSON.parse(JSON.stringify(this.dialogTableList)));
+          let leftObj = JSON.parse(JSON.stringify(this.userQueryParamsLeft));
+          let rightObj = JSON.parse(JSON.stringify(this.userQueryParamsRight));
+          rightObj.userIds = [];
+          leftObj.selectedUserIds = [];
+          for(let i=0;i<self.dialogTableDataList.length;i++){
+            leftObj.selectedUserIds.push(self.dialogTableDataList[i].userId);
+            rightObj.userIds.push(self.dialogTableDataList[i].userId);
+          }
+          if(rightObj.userIds[0]){
+            findUserList(rightObj).then(response => {
+              this.userTotalRight = response.total;
+              this.userTableListRight = response.rows;
+            });
+          }
+          findUserList(leftObj).then(response => {
+            this.userTotalLeft = response.total;
+            this.userTableListLeft = response.rows;
+          });
+          this.$set(this,'addDialogBoxType',type);
+        }else{
+          this.$set(this,'addDialogBoxType',type);
+        }
       },
       //删除弹窗列表
       delTable(row){
@@ -275,12 +385,26 @@
       },
       //重置
       userResetQueryLeft(){
-        this.$set(this,'userQueryParamsLeft',{ searchValue:"", });
+        this.$set(this,'userQueryParamsLeft',{
+          pageNum: 1,
+          pageSize: 20,
+          deptId:"",
+          searchValue:"",
+        });
         this.userHandleQueryLeft();
       },
       //查询接口
       userGetListLeft(){
-
+        let self = this;
+        let leftObj = JSON.parse(JSON.stringify(this.userQueryParamsLeft));
+        leftObj.selectedUserIds = [];
+        for(let i=0;i<self.dialogTableDataList.length;i++){
+          leftObj.selectedUserIds.push(self.dialogTableDataList[i].userId);
+        }
+        findUserList(leftObj).then(response => {
+          this.userTotalLeft = response.total;
+          this.userTableListLeft = response.rows;
+        });
       },
       //查询
       userHandleQueryRight(){
@@ -290,10 +414,8 @@
       //重置
       userResetQueryRight(){
         this.$set(this,'userQueryParamsRight',{
-          pageNum:1,
-          pageSize:20,
-          classType:"",
-          classified:"",
+          pageNum: 1,
+          pageSize: 20,
           deptId:"",
           searchValue:"",
         });
@@ -301,18 +423,66 @@
       },
       //查询接口
       userGetListRight(){
-
+        let self = this;
+        let rightObj = JSON.parse(JSON.stringify(this.userQueryParamsRight));
+        rightObj.userIds = [];
+        for(let i=0;i<self.dialogTableDataList.length;i++){
+          rightObj.userIds.push(self.dialogTableDataList[i].userId);
+        }
+        findUserList(rightObj).then(response => {
+          this.userTotalRight = response.total;
+          this.userTableListRight = response.rows;
+        });
       },
+      //穿梭按钮
       userArrowButton(type){
+        let self = this;
         if(type == 1){
+          //右至左
           if(this.userIdsRight[0]){
-
+            let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
+            for(let i=0;i<self.userIdsRight.length;i++){
+              for(let s=0;s<list.length;s++){
+                if(self.userIdsRight[i] == list[s].userId){
+                  list.splice(s,1);
+                  s--
+                }
+              }
+            }
+            this.$set(this,'dialogTableDataList',list);
+            this.userGetListLeft();
+            this.userGetListRight();
+          }else{
+            this.msgError('请先勾选右侧列表')
           }
         }else if(type == 2){
+          //左至右
           if(this.userIdsLeft[0]){
-
+            let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
+            for(let i=0;i<self.userIdsLeft.length;i++){
+              for(let o=0;o<self.userTableListLeft.length;o++){
+                if(self.userIdsLeft[i] == self.userTableListLeft[o].userId){
+                  let obj = {
+                    userId:self.userTableListLeft[o].userId,
+                    name:self.userTableListLeft[o].nickName,
+                    jobNum:self.userTableListLeft[o].userName,
+                    deptName:self.userTableListLeft[o].deptName,
+                    deptId:self.userTableListLeft[o].deptId,
+                    userType:self.userTableListLeft[o].userType,
+                  }
+                  list.push(obj);
+                }
+              }
+            }
+            this.$set(this,'dialogTableDataList',list);
+            this.userGetListLeft();
+            this.userGetListRight();
+          }else{
+            this.msgError('请先勾选左侧列表')
           }
         }
+        this.$refs.leftUserTable.clearSelection();
+        this.$refs.rightUserTable.clearSelection();
       },
       /*===记录勾选数据===
         需要再el-table 添加  :row-key="getRowKeys"
@@ -336,6 +506,12 @@
         data = data == 1?0:1;
         this.$forceUpdate()
       },
+      //获取学院列表
+      listDepartments(){
+        listDepartments().then(response => {
+          this.deptSelectList = response.data;
+        });
+      },
     }
   }
 </script>
@@ -454,6 +630,11 @@
             line-height:28px;
             margin:10px 26px;
           }
+          .dialog-table-title-text{
+            height:30px;
+            line-height:28px;
+            margin:10px 26px;
+          }
         }
         .switch .el-switch__label {
           position: absolute;

+ 75 - 28
src/views/safetyCheck/schoolInspection/inspectionGroup/index.vue

@@ -12,8 +12,8 @@
             style="width: 200px"
           />
         </el-form-item>
-        <el-form-item label="巡查层级" prop="data1">
-          <el-select v-model="queryParams.data1" clearable placeholder="请选择层级" style="width: 150px">
+        <el-form-item label="巡查层级" prop="checkLevel">
+          <el-select v-model="queryParams.checkLevel" clearable placeholder="请选择层级" style="width: 150px">
             <el-option
               v-for="item in optionsOne"
               :key="item.key"
@@ -22,8 +22,8 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="状态" prop="data2" label-width="60px">
-          <el-select v-model="queryParams.data2" clearable placeholder="请选择状态" style="width: 150px">
+        <el-form-item label="状态" prop="enable" label-width="60px">
+          <el-select v-model="queryParams.enable" clearable placeholder="请选择状态" style="width: 150px">
             <el-option
               v-for="item in optionsTwo"
               :key="item.key"
@@ -49,16 +49,18 @@
     <div class="content-box">
       <el-table  border :data="tableList" ref="multipleTable">
         <el-table-column label="序号"  width="60" align="center"  type="index"/>
-        <el-table-column label="巡查组名称" align="center" prop="hardwareNum" show-overflow-tooltip/>
-        <el-table-column label="巡查层级" align="center" prop="deptName" show-overflow-tooltip width="200"/>
-        <el-table-column label="成员人数" align="center" prop="deptName" show-overflow-tooltip width="150"/>
-        <el-table-column label="是否启用" align="center" prop="deptName" show-overflow-tooltip width="185">
+        <el-table-column label="巡查组名称" align="center" prop="groupName" show-overflow-tooltip/>
+        <el-table-column label="巡查层级" align="center" prop="checkLevel" show-overflow-tooltip width="200">
+          <template slot-scope="scope">{{scope.row.checkLevel==1?'校级':(scope.row.checkLevel==2?'院级':'')}}</template>
+        </el-table-column>
+        <el-table-column label="成员人数" align="center" prop="peopleNum" show-overflow-tooltip width="150"/>
+        <el-table-column label="是否启用" align="center" prop="enable" show-overflow-tooltip width="185">
           <template slot-scope="scope">
             <div style="width:70px;margin-left:50px;">
               <el-switch
                 @click.native="switchClick(scope.row)"
                 class="switch"
-                v-model="scope.row.exhaustType"
+                v-model="scope.row.enable"
                 :active-value="1"
                 :inactive-value="0"
                 active-color="#0183FA"
@@ -70,15 +72,19 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column label="操作人" align="center" prop="deptName" show-overflow-tooltip width="150"/>
-        <el-table-column label="操作时间" align="center" prop="deptName" show-overflow-tooltip width="250"/>
+        <el-table-column label="操作人" align="center" prop="deptName" show-overflow-tooltip width="150">
+          <template slot-scope="scope">{{scope.row.updateName?scope.row.updateName:scope.row.createName}}</template>
+        </el-table-column>
+        <el-table-column label="操作时间" align="center" prop="updateTime" show-overflow-tooltip width="250">
+          <template slot-scope="scope">{{scope.row.updateTime?scope.row.updateTime:scope.row.createTime}}</template>
+        </el-table-column>
         <el-table-column label="操作" align="center" prop="deptName" width="200">
           <template slot-scope="scope">
             <div class="table-button-box">
               <p class="table-button-null"></p>
               <p class="table-button-p" @click="addDialogOpen(3,scope.row)">详情</p>
               <p class="table-button-p" @click="addDialogOpen(2,scope.row)">编辑</p>
-              <p class="table-button-p">删除</p>
+              <p class="table-button-p" @click="deleteObj(scope.row)">删除</p>
               <p class="table-button-null"></p>
             </div>
           </template>
@@ -98,6 +104,7 @@
 
 <script>
   import addDialog from './addDialog.vue'
+  import { checkGroupList,checkGroupDelete,checkGroupEnable } from '@/api/safetyCheck/index'
   export default {
     name: 'index',
     components: {
@@ -107,18 +114,24 @@
       return{
         addDialogType:false,
         addDialogData:{},
-        queryParams:{},
-        tableList:[{}],
+        queryParams:{
+          pageNum:1,
+          pageSize:20,
+          searchValue:"",
+          checkLevel:"",
+          enable:"",
+        },
+        tableList:[],
         total:0,
         optionsOne:[{key:1,label:"校级"},{key:2,label:"院级"}],
-        optionsTwo:[{key:1,label:"启用"},{key:0,label:"停用"}],
+        optionsTwo:[{key:0,label:"启用"},{key:1,label:"停用"}],
       }
     },
     created(){
 
     },
     mounted(){
-
+      this.getList();
     },
     methods:{
       //弹窗开启
@@ -126,15 +139,16 @@
         if(type==1){
           this.$set(this,'addDialogData',{
             title:"新增巡察组",
-            addType:false,
+            addType:true,
             lookInfoType:false,
           })
           this.$set(this,'addDialogType',true)
         }else if(type == 2){
           this.$set(this,'addDialogData',{
             title:"编辑巡察组",
-            addType:true,
+            addType:false,
             lookInfoType:false,
+            id:data.id
           })
           this.$set(this,'addDialogType',true)
         }else if(type == 3){
@@ -142,24 +156,42 @@
             title:"巡察组详情",
             addType:false,
             lookInfoType:true,
+            id:data.id
           })
           this.$set(this,'addDialogType',true)
+        }else if(type == 5){
+          this.getList();
+          this.$set(this,'addDialogType',false)
         }else{
           this.$set(this,'addDialogType',false)
         }
       },
       // 开关
-      switchClick(){
-
+      switchClick(data){
+        console.log('data',data);
+        let self = this;
+        this.$confirm('是否确认'+(data.enable==1?'停用':'启用')+'?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          let obj = {
+            checkGroupId:data.id,
+            enable:data.enable==1?0:1
+          };
+          checkGroupEnable(obj).then(response => {
+            self.msgSuccess(response.msg)
+            self.getList();
+          });
+        }).then(() => {
+        }).catch(() => {});
       },
       //获取数据列表
       getList(){
-        // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-        // this.queryParamsData.type = 'RFID_RECOGNIZER';
-        // listHardware(this.queryParamsData).then(response => {
-        //   this.total = response.total;
-        //   this.tableList = response.rows;
-        // });
+        checkGroupList(this.queryParams).then(response => {
+          this.total = response.data.total;
+          this.tableList = response.data.records;
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -172,11 +204,26 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          data1:"",
-          data2:"",
+          checkLevel:"",
+          enable:"",
         });
         this.handleQuery();
       },
+      //删除
+      deleteObj(data){
+        let self = this;
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          checkGroupDelete({id:data.id}).then(response => {
+            self.msgSuccess(response.msg)
+            self.getList();
+          });
+        }).then(() => {
+        }).catch(() => {});
+      },
     }
   }
 </script>

+ 2 - 0
src/views/safetyCheck/schoolInspection/inspectionManagement/index.vue

@@ -86,11 +86,13 @@
           <el-table-column label="操作" align="center" prop="deptName" width="230">
             <template slot-scope="scope">
               <div class="table-button-box">
+                <p class="table-button-null"></p>
                 <p class="table-button-p" @click="goAddPage(3)">详情</p>
                 <p class="table-button-p" @click="goAddPage(2)">开始检查</p>
                 <p class="table-button-p">编辑</p>
                 <p class="table-button-p" @click="lookDocumentButton(1,scope.row)">整改报告</p>
                 <p class="table-button-p" @click="lookDocumentListButton(1,scope.row)">查看附件</p>
+                <p class="table-button-null"></p>
               </div>
             </template>
           </el-table-column>

+ 33 - 10
src/views/safetyCheck/schoolInspection/inspectionPlan/addDialog.vue

@@ -105,12 +105,12 @@
           <el-form-item label="巡察组:" prop="data6">
             <div class="dialog-table-max-box">
               <div v-if="!lookInfoType">
-                <el-select v-model="dialogForm.data6" placeholder="请选择">
+                <el-select v-model="dialogForm.data6" placeholder="请选择" @change="groupChange">
                   <el-option
                     v-for="item in dialogOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
+                    :key="item.id"
+                    :label="item.groupName"
+                    :value="item.id">
                   </el-option>
                 </el-select>
               </div>
@@ -488,6 +488,7 @@
 
 <script>
   import { getToken } from "@/utils/auth";
+  import { getHistoryPlanTitles,findGroupList,checkGroupFind } from '@/api/safetyCheck/index'
   export default {
     name: 'addDialog',
     props:{
@@ -510,7 +511,7 @@
           }
         },
         //标题快选数据
-        quickSelectionList:['校级开学检查', '院级开学检查', '月度安全检查', '季度安全检查', '年度安全检查', '专项检查', '紧急检查','校级开学检查', '院级开学检查', '月度安全检查', '季度安全检查', '年度安全检查', '专项检查', '紧急检查','校级开学检查', '院级开学检查', '月度安全检查', '季度安全检查', '年度安全检查', '专项检查', '紧急检查',],
+        quickSelectionList:[],
         //巡察组列表
         dialogOptions:[],
         //上传文件名称暂存
@@ -527,7 +528,7 @@
           }
         ],
         //选中巡查人员列表
-        dialogTableList:[{userId:1},{userId:2},{userId:3},{userId:4},{userId:5},{userId:6},{userId:7},{userId:8},{userId:9},{userId:10}],
+        dialogTableList:[],
         //巡查范围列表
         dialogRangeOptions:[{label:"全校",value:"1"},{label:"学院",value:"2"},{label:"实验室",value:"3"}],
         //巡查院系数量
@@ -622,16 +623,38 @@
     created(){
       this.$set(this,'addDialogTitle',this.addDialogData.title);
       this.$set(this,'lookInfoType',this.addDialogData.lookInfoType);
-      if(this.addDialogData.addType){
-        //新增
-      }else{
+
+      if(!this.addDialogData.addType){
         //编辑
+      }else{
+        //新增
       }
     },
     mounted(){
-
+      this.initializationInterface();
     },
     methods:{
+      //初始化接口
+      initializationInterface(){
+        //获取历史标题
+        getHistoryPlanTitles().then(response => {
+          let list = ['校级开学检查', '院级开学检查', '月度安全检查', '季度安全检查', '年度安全检查', '专项检查', '紧急检查'];
+          for(let i=0;i<response.data.length;i++){
+            list.push(response.data[i].title);
+          }
+          this.$set(this,'quickSelectionList',list);
+        });
+        //获取巡察组
+        findGroupList({checkLevel:0}).then(response => {
+          this.$set(this,'dialogOptions',response.data);
+        });
+      },
+      //选中巡察组
+      groupChange(val){
+        checkGroupFind({id:val}).then(response => {
+          this.$set(this,'dialogTableList',response.data.checkGroupMemberList);
+        });
+      },
       /*===================================弹窗相关===================================*/
       //弹窗关闭
       addDialogAllOff(){

+ 101 - 43
src/views/safetyCheck/schoolInspection/inspectionPlan/index.vue

@@ -6,21 +6,21 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.buttonType==1?'checkDiv':''" @click="topLeftClickType(1)">
+              <div :class="queryParams.checkStatus==0?'checkDiv':''" @click="topLeftClickType(0)">
                 <p class="text-p">全部</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==1"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==0"></p>
               </div>
-              <div :class="queryParams.buttonType==2?'checkDiv':''" @click="topLeftClickType(2)">
+              <div :class="queryParams.checkStatus==1?'checkDiv':''" @click="topLeftClickType(1)">
                 <p class="text-p">待检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==2"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==1"></p>
               </div>
-              <div :class="queryParams.buttonType==3?'checkDiv':''" @click="topLeftClickType(3)">
+              <div :class="queryParams.checkStatus==2?'checkDiv':''" @click="topLeftClickType(2)">
                 <p class="text-p">检查中</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==3"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==2"></p>
               </div>
-              <div :class="queryParams.buttonType==4?'checkDiv':''" @click="topLeftClickType(4)">
+              <div :class="queryParams.checkStatus==3?'checkDiv':''" @click="topLeftClickType(3)">
                 <p class="text-p">已检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==4"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==3"></p>
               </div>
             </div>
           </div>
@@ -63,21 +63,35 @@
       <div class="content-box">
         <el-table  border :data="tableList" ref="multipleTable" @sort-change="sortChange">
           <el-table-column label="序号" align="center"  type="index" width="60" />
-          <el-table-column label="计划标题" align="center" prop="deptName" show-overflow-tooltip/>
-          <el-table-column label="检查范围" align="center" prop="deptName" show-overflow-tooltip width="120"/>
-          <el-table-column label="检查周期" align="center" prop="deptName" show-overflow-tooltip width="280"/>
-          <el-table-column label="检查状态" align="center" prop="deptName" show-overflow-tooltip width="130"/>
-          <el-table-column label="检查进度" align="center" prop="deptName" show-overflow-tooltip width="220"/>
-          <el-table-column label="创建人" align="center" prop="deptName" show-overflow-tooltip width="130"/>
-          <el-table-column label="创建时间" sortable align="center" prop="deptName" show-overflow-tooltip width="157"/>
+          <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip/>
+          <el-table-column label="检查范围" align="center" prop="checkRange" show-overflow-tooltip width="120">
+            <template slot-scope="scope">
+              <p>{{scope.row.checkRange==1?'全校':(scope.row.checkRange==2?'学院':(scope.row.checkRange==3?'实验室':''))}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="检查周期" align="center" prop="cycleStartTime" show-overflow-tooltip width="280">
+            <template slot-scope="scope">
+              <p>{{scope.row.cycleStartTime}}至{{scope.row.cycleEndTime}}<span style="color:#EE0606;margin-left:15px;" v-if="scope.row.isOverdue==1">已逾期</span></p>
+            </template>
+          </el-table-column>
+          <el-table-column label="检查状态" align="center" prop="checkStatus" show-overflow-tooltip width="130">
+            <template slot-scope="scope">
+              <p :class="scope.row.checkStatus==1?'checkStatus-color-1':(scope.row.checkStatus==2?'checkStatus-color-2':(scope.row.checkStatus==3?'checkStatus-color-3':''))">{{scope.row.checkStatus==1?'未开始':(scope.row.checkStatus==2?'进行中':(scope.row.checkStatus==3?'已结束':''))}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="检查进度" align="center" prop="checkSchedule" show-overflow-tooltip width="220"/>
+          <el-table-column label="创建人" align="center" prop="createName" show-overflow-tooltip width="130"/>
+          <el-table-column label="创建时间" sortable="custom" align="center" prop="createTime" show-overflow-tooltip width="157"/>
           <el-table-column label="操作" align="center" prop="deptName" width="200">
             <template slot-scope="scope">
               <div class="table-button-box">
-                <p class="table-button-p" @click="addDialogOpen(2,scope.row)">编辑</p>
-                <p class="table-button-p">删除</p>
-                <p class="table-button-p" @click="addDialogOpen(3,scope.row)">详情</p>
-                <p class="table-button-p" @click="goPage(2,scope.row)">巡查管理</p>
-                <p class="table-button-p" @click="lookDocumentListButton(1,scope.row)">查看附件</p>
+                <p class="table-button-null"></p>
+                <p class="table-button-p" v-if="scope.row.checkStatus==1" @click="addDialogOpen(2,scope.row)">编辑</p>
+                <p class="table-button-p" v-if="scope.row.checkStatus==1" @click="deleteObj(scope.row)">删除</p>
+                <p class="table-button-p" v-if="scope.row.checkStatus!=1" @click="addDialogOpen(3,scope.row)">详情</p>
+                <p class="table-button-p" v-if="scope.row.checkStatus!=1" @click="goPage(2,scope.row)">巡查管理</p>
+                <p class="table-button-p" v-if="scope.row.isAttachment == 1" @click="lookDocumentListButton(1,scope.row)">查看附件</p>
+                <p class="table-button-null"></p>
               </div>
             </template>
           </el-table-column>
@@ -91,7 +105,7 @@
         />
       </div>
     </div>
-    <list-page v-if="pageType == 2"></list-page>
+    <list-page v-if="pageType == 2" :propsListPageData="propsListPageData"></list-page>
     <add-dialog v-if="addDialogType" :addDialogData="addDialogData"></add-dialog>
     <lookDocumentListDialog v-if="lookDocumentListType" :propsLookDocumentListData="propsLookDocumentListData"></lookDocumentListDialog>
   </div>
@@ -101,7 +115,7 @@
   import addDialog from './addDialog.vue'
   import listPage from './listPage.vue'
   import lookDocumentListDialog from '@/components/lookDocumentDialog/lookDocumentListDialog.vue'
-  import { checkPlanList } from '@/api/safetyCheck/index'
+  import { checkPlanList,checkPlanDelete } from '@/api/safetyCheck/index'
   export default {
     name: 'index',
     components: {
@@ -114,19 +128,19 @@
         //子组件数据
         lookDocumentListType:false,
         propsLookDocumentListData:{},
+        propsListPageData:{},
         addDialogType:false,
         addDialogData:{},
         pageType:1,
         queryParams:{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
+          checkStatus:0,
+          createTimeSort:0,
           searchValue:"",
-          data1:""
         },
         dateRange:[],
-        tableList:[{}],
+        tableList:[],
         total:0,
       }
     },
@@ -134,13 +148,18 @@
 
     },
     mounted(){
-
+      this.getList();
     },
     methods:{
       //切换页面
-      goPage(type){
+      goPage(type,data){
         if(this.pageType != type){
-          this.$set(this,'pageType',type);
+          if(type == 2){
+            this.$set(this,'propsListPageData',data);
+            this.$set(this,'pageType',type);
+          }else{
+            this.$set(this,'pageType',type);
+          }
         }
       },
       //弹窗开启
@@ -149,21 +168,21 @@
           this.$set(this,'addDialogData',{
             title:"创建巡查计划",
             lookInfoType:false,
-            addType:false,
+            addType:true,
           })
           this.$set(this,'addDialogType',true);
         }else if(type==2){
           this.$set(this,'addDialogData',{
             title:"编辑巡查计划",
             lookInfoType:false,
-            addType:true,
+            addType:false,
           })
           this.$set(this,'addDialogType',true);
         }else if(type==3){
           this.$set(this,'addDialogData',{
             title:"巡查计划详情",
             lookInfoType:true,
-            addType:true,
+            addType:false,
           })
           this.$set(this,'addDialogType',true);
         }else if(type==4){
@@ -172,22 +191,34 @@
       },
       //范围选择
       topLeftClickType(type){
-        if(this.queryParams.buttonType != type){
-          this.$set(this.queryParams,'buttonType',type);
+        if(this.queryParams.checkStatus != type){
+          this.$set(this.queryParams,'checkStatus',type);
           this.getList();
         }
       },
       //时间排序方法
       sortChange(val){
-        //ascending 上    descending 下    null  无
-        console.log('val',val.order)
-        this.$set(this.queryParams,'timeType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+        if(val.prop == 'createTime'){
+          this.$set(this.queryParams,'createTimeSort',val.order=='ascending'?'1':(val.order=='descending'?'2':'0'));
+          this.getList();
+        }
       },
       //获取数据列表
       getList(){
-        checkPlanList(this.queryParamsData).then(response => {
-          this.total = response.total;
-          this.tableList = response.rows;
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.cycleStartTime = this.dateRange[0];
+        }else{
+          obj.cycleStartTime = "";
+        }
+        if(this.dateRange[1]){
+          obj.cycleEndTime = this.dateRange[1];
+        }else{
+          obj.cycleEndTime = "";
+        }
+        checkPlanList(obj).then(response => {
+          this.total = response.data.total;
+          this.tableList = response.data.records;
         });
       },
       /** 搜索按钮操作 */
@@ -201,13 +232,27 @@
         this.$set(this,'queryParams',{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
+          checkStatus:0,
+          createTimeSort:0,
           searchValue:"",
-          data1:""
         });
         this.handleQuery();
       },
+      //删除
+      deleteObj(obj){
+        let self = this;
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          checkPlanDelete({id:obj.id}).then(response => {
+            self.msgSuccess(response.msg)
+            self.getList();
+          })
+        }).then(() => {
+        }).catch(() => {});
+      },
       /*==========上传相关==========*/
 
       handleAvatarSuccess(res) {
@@ -264,6 +309,10 @@
     flex-direction: column;
     overflow: hidden;
     .inspectionPlan-page{
+      flex: 1;
+      display: flex !important;
+      flex-direction: column;
+      overflow: hidden;
       .title-box{
         padding-top:20px;
         border-bottom:1px solid #dedede;
@@ -310,6 +359,15 @@
         flex-direction: column;
         padding:20px;
         overflow: hidden;
+        .checkStatus-color-1{
+          color:#0183FA;
+        }
+        .checkStatus-color-2{
+          color:#EE0606;
+        }
+        .checkStatus-color-3{
+          color:#23B303;
+        }
       }
     }
   }

+ 81 - 45
src/views/safetyCheck/schoolInspection/inspectionPlan/listPage.vue

@@ -6,21 +6,21 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.buttonType==1?'checkDiv':''" @click="topLeftClickType(1)">
+              <div :class="queryParams.manageStatus=='-1'?'checkDiv':''" @click="topLeftClickType('-1')">
                 <p class="text-p">全部</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==1"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus=='-1'"></p>
               </div>
-              <div :class="queryParams.buttonType==2?'checkDiv':''" @click="topLeftClickType(2)">
+              <div :class="queryParams.manageStatus==0?'checkDiv':''" @click="topLeftClickType(0)">
                 <p class="text-p">待检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==2"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus==0"></p>
               </div>
-              <div :class="queryParams.buttonType==3?'checkDiv':''" @click="topLeftClickType(3)">
+              <div :class="queryParams.manageStatus==1?'checkDiv':''" @click="topLeftClickType(1)">
                 <p class="text-p">检查中</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==3"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus==1"></p>
               </div>
-              <div :class="queryParams.buttonType==4?'checkDiv':''" @click="topLeftClickType(4)">
+              <div :class="queryParams.manageStatus==2?'checkDiv':''" @click="topLeftClickType(2)">
                 <p class="text-p">已检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==4"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus==2"></p>
               </div>
             </div>
           </div>
@@ -33,8 +33,8 @@
               style="width: 250px"
             />
           </el-form-item>
-          <el-form-item label="学院" prop="data1" label-width="50px">
-            <el-select v-model="queryParams.data1" clearable placeholder="请选择学院" style="width: 150px">
+          <el-form-item label="学院" prop="deptId" label-width="50px">
+            <el-select v-model="queryParams.deptId" clearable placeholder="请选择学院" style="width: 150px">
               <el-option
                 v-for="item in optionsOne"
                 :key="item.key"
@@ -68,24 +68,38 @@
       <div class="content-box">
         <el-table  border :data="tableList" ref="multipleTable" @sort-change="sortChange">
           <el-table-column label="序号" align="center"  type="index" width="60" />
-          <el-table-column label="计划标题" align="center" prop="hardwareNum" show-overflow-tooltip width="250"/>
-          <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip width="220"/>
-          <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip width="150"/>
-          <el-table-column label="检查状态" align="center" prop="deptName" show-overflow-tooltip width="90"/>
-          <el-table-column label="检查者" align="center" prop="deptName" show-overflow-tooltip width="100"/>
-          <el-table-column label="检查结果" align="center" prop="deptName" show-overflow-tooltip width="80"/>
-          <el-table-column label="隐患数" align="center" prop="deptName" show-overflow-tooltip width="80"/>
-          <el-table-column label="整改进度" align="center" prop="deptName" show-overflow-tooltip width="200"/>
-          <el-table-column label="任务周期" align="center" prop="deptName" show-overflow-tooltip width="270"/>
-          <el-table-column label="检查时间" sortable align="center" prop="deptName" show-overflow-tooltip width="157"/>
+          <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip width="250"/>
+          <el-table-column label="实验室" align="center" prop="subjectName" show-overflow-tooltip width="220"/>
+          <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="150"/>
+          <el-table-column label="检查状态" align="center" prop="manageStatus" show-overflow-tooltip width="90">
+            <template slot-scope="scope">
+              <p :class="scope.row.manageStatus==0?'manageStatus-color-1':(scope.row.manageStatus==1?'manageStatus-color-2':(scope.row.manageStatus==2?'manageStatus-color-3':''))">{{scope.row.manageStatus==0?'待检查':(scope.row.manageStatus==1?'检查中':(scope.row.manageStatus==2?'已检查':''))}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="检查者" align="center" prop="checkUser" show-overflow-tooltip width="100"/>
+          <el-table-column label="检查结果" align="center" prop="checkResult" show-overflow-tooltip width="80">
+            <template slot-scope="scope">
+              <p>{{scope.row.checkResult==0?'不符合':(scope.row.checkResult==1?'符合':'')}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="隐患数" align="center" prop="dangerNum" show-overflow-tooltip width="80"/>
+          <el-table-column label="整改进度" align="center" prop="rectifySchedule" show-overflow-tooltip width="200"/>
+          <el-table-column label="任务周期" align="center" prop="startTime" show-overflow-tooltip width="270">
+            <template slot-scope="scope">
+              <p>{{scope.row.cycleStartTime}}至{{scope.row.cycleEndTime}}<span style="color:#EE0606;margin-left:15px;" v-if="scope.row.isOverdue==1">已逾期</span></p>
+            </template>
+          </el-table-column>
+          <el-table-column label="检查时间" sortable="custom" align="center" prop="checkTime" show-overflow-tooltip width="157"/>
           <el-table-column label="操作" align="center" prop="deptName" width="230">
             <template slot-scope="scope">
               <div class="table-button-box">
-                <p class="table-button-p" @click="goAddPage(3)">详情</p>
-                <p class="table-button-p" @click="goAddPage(2)">开始检查</p>
-                <p class="table-button-p">编辑</p>
-                <p class="table-button-p" @click="lookDocumentButton(1,scope.row)">整改报告</p>
-                <p class="table-button-p" @click="lookDocumentListButton(1,scope.row)">查看附件</p>
+                <p class="table-button-null"></p>
+                <p class="table-button-p" v-if="scope.row.manageStatus!=0" @click="goAddPage(3)">详情</p>
+                <p class="table-button-p" v-if="scope.row.manageStatus==0">编辑</p>
+                <p class="table-button-p" v-if="scope.row.manageStatus==0" @click="goAddPage(2)">开始检查</p>
+                <p class="table-button-p" v-if="scope.row.manageStatus==2" @click="lookDocumentButton(1,scope.row)">整改报告</p>
+                <p class="table-button-p" v-if="scope.row.isAttachment == 1" @click="lookDocumentListButton(1,scope.row)">查看附件</p>
+                <p class="table-button-null"></p>
               </div>
             </template>
           </el-table-column>
@@ -107,12 +121,16 @@
 </template>
 
 <script>
+  import { findByCheckPlanId } from '@/api/safetyCheck/index'
   import addPage from './addPage.vue'
   import infoPage from '@/views/safetyCheck/components/infoPage/infoPage.vue'
   import lookDocumentDialog from '@/components/lookDocumentDialog/lookDocumentDialog.vue'
   import lookDocumentListDialog from '@/components/lookDocumentDialog/lookDocumentListDialog.vue'
   export default {
     name: 'index',
+    props:{
+      propsListPageData:{},
+    },
     components: {
       addPage,
       infoPage,
@@ -130,11 +148,10 @@
         queryParams:{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          myType:0,
-          timeType:0,
+          manageStatus:'-1',
+          checkTimeSort:0,
           searchValue:"",
-          data1:""
+          deptId:""
         },
         dateRange:[],
         tableList:[{}],
@@ -147,7 +164,7 @@
 
     },
     mounted(){
-
+      this.getList();
     },
     methods:{
       //返回按钮
@@ -160,25 +177,36 @@
       },
       //时间排序方法
       sortChange(val){
-        //ascending 上    descending 下    null  无
-        console.log('val',val.order)
-        this.$set(this.queryParams,'timeType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+        if(val.prop == 'checkTime'){
+          this.$set(this.queryParams,'checkTimeSort',val.order=='ascending'?'1':(val.order=='descending'?'2':"0"));
+          this.getList();
+        }
       },
       //范围选择
       topLeftClickType(type){
-        if(this.queryParams.buttonType != type){
-          this.$set(this.queryParams,'buttonType',type);
+        if(this.queryParams.manageStatus != type){
+          this.$set(this.queryParams,'manageStatus',type);
           this.getList();
         }
       },
       //获取数据列表
       getList(){
-        // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-        // this.queryParamsData.type = 'RFID_RECOGNIZER';
-        // listHardware(this.queryParamsData).then(response => {
-        //   this.total = response.total;
-        //   this.tableList = response.rows;
-        // });
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        obj.checkPlanId = this.propsListPageData.id;
+        if(this.dateRange[0]){
+          obj.startTime = this.dateRange[0];
+        }else{
+          obj.startTime = "";
+        }
+        if(this.dateRange[1]){
+          obj.endTime = this.dateRange[1];
+        }else{
+          obj.endTime = "";
+        }
+        findByCheckPlanId(obj).then(response => {
+          this.total = response.data.total;
+          this.tableList = response.data.records;
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -191,11 +219,10 @@
         this.$set(this,'queryParams',{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
-          myType:0,
+          manageStatus:'-1',
+          checkTimeSort:0,
           searchValue:"",
-          data1:""
+          deptId:""
         });
         this.handleQuery();
       },
@@ -285,6 +312,15 @@
         flex-direction: column;
         padding:20px;
         overflow: hidden;
+        .manageStatus-color-1{
+          color:#0183FA;
+        }
+        .manageStatus-color-2{
+          color:#EE0606;
+        }
+        .manageStatus-color-3{
+          color:#23B303;
+        }
       }
     }
   }

+ 4 - 2
src/views/safetyCheck/snapshotManagement/index.vue

@@ -95,7 +95,9 @@
           <el-table-column label="操作" align="center" prop="deptName" width="70">
             <template slot-scope="scope">
               <div class="table-button-box">
+                <p class="table-button-null"></p>
                 <p class="table-button-p" @click="goPage(3,scope.row)">详情</p>
+                <p class="table-button-null"></p>
               </div>
             </template>
           </el-table-column>
@@ -304,8 +306,8 @@
           obj.endTime = ""
         }
         securityCheckClapList(obj).then(response => {
-          this.total = response.total;
-          this.tableList = response.rows;
+          this.total = response.data.total;
+          this.tableList = response.data.records;
         });
       },
       /** 搜索按钮操作 */

+ 4 - 2
src/views/safetyCheck/snapshotManagement/listPage.vue

@@ -88,7 +88,9 @@
           <el-table-column label="操作" align="center" prop="deptName" width="70">
             <template slot-scope="scope">
               <div class="table-button-box">
+                <p class="table-button-null"></p>
                 <p class="table-button-p" @click="goPage(3,scope.row)">详情</p>
+                <p class="table-button-null"></p>
               </div>
             </template>
           </el-table-column>
@@ -196,8 +198,8 @@
           obj.endTime = ""
         }
         checkClapMylist(obj).then(response => {
-          this.total = response.total;
-          this.tableList = response.rows;
+          this.total = response.data.total;
+          this.tableList = response.data.records;
         });
       },
       /** 搜索按钮操作 */