dedsudiyu 5 months ago
parent
commit
61fc60a015
100 changed files with 10275 additions and 7365 deletions
  1. 5 5
      .env.production
  2. 4 1
      README.md
  3. 38 0
      package-lock.json
  4. 1 0
      package.json
  5. 4 4
      src/api/commonality/permission.js
  6. 36 16
      src/api/hierarchicalControl/index.js
  7. 177 0
      src/api/hierarchicalControl/indexDemo.js
  8. 24 0
      src/api/integratedManagement/index.js
  9. 723 167
      src/api/safetyCheck/index.js
  10. 0 653
      src/api/safetyCheck/indexDemoOne.js
  11. 0 1
      src/api/safetyCheck/indexDemoTwo.js
  12. 0 375
      src/api/safetyCheck/indexTow.js
  13. 8 8
      src/components/ZDcomponents/advancedSearch.vue
  14. 2 1
      src/components/audioPlayer/audioPlayer.vue
  15. 0 461
      src/components/lookDocumentDialog/components/informDom.vue
  16. 0 422
      src/components/lookDocumentDialog/components/noticeDom.vue
  17. 0 359
      src/components/lookDocumentDialog/components/rectificationReportDom.vue
  18. 0 179
      src/components/lookDocumentDialog/lookDocumentDataDialog.vue
  19. 0 317
      src/components/lookDocumentDialog/lookDocumentListDialog.vue
  20. 13 0
      src/store/modules/user.js
  21. 21 0
      src/utils/request.js
  22. 2 2
      src/views/basicsModules/login.vue
  23. 1 1
      src/views/basicsModules/mine.vue
  24. 1 9
      src/views/basicsModules/ssoLogin.vue
  25. 63 24
      src/views/chemicalManage/basicManagement/chemicalsCabinetManage/addPage.vue
  26. 1 1
      src/views/chemicalManage/inventoryManagement/inventoryStatistics/infoPage.vue
  27. 1 1
      src/views/chemicalManage/useLedger/index.vue
  28. 24 5
      src/views/emergencyManagement/performEvacuation/performEvacuationHome.vue
  29. 0 448
      src/views/hierarchicalControl/conditionsSettings/addPage.vue
  30. 0 261
      src/views/hierarchicalControl/conditionsSettings/index.vue
  31. 0 276
      src/views/hierarchicalControl/executeResult/index.vue
  32. 0 108
      src/views/hierarchicalControl/executeResult/infoPage.vue
  33. 929 0
      src/views/hierarchicalControl/gradeManage/addPage.vue
  34. 422 0
      src/views/hierarchicalControl/gradeManage/index.vue
  35. 190 0
      src/views/hierarchicalControl/gradeManage/userList.vue
  36. 301 0
      src/views/hierarchicalControl/gradeManageRecord/index.vue
  37. 297 0
      src/views/hierarchicalControl/gradeManageRecord/infoPage.vue
  38. 76 0
      src/views/hierarchicalControl/gradeManageRecord/previewPage.vue
  39. 444 0
      src/views/hierarchicalControl/gradeManageWork/addPage.vue
  40. 288 0
      src/views/hierarchicalControl/gradeManageWork/index.vue
  41. 0 284
      src/views/hierarchicalControl/workExecute/index.vue
  42. 0 167
      src/views/hierarchicalControl/workExecute/infoPage.vue
  43. 1 1
      src/views/integratedManagement/laboratoryManagement/hazard/addLaboratory.vue
  44. 1 1
      src/views/integratedManagement/laboratoryManagement/safetyInfoCategory/addSafetyInfoConfig.vue
  45. 80 10
      src/views/integratedManagement/laboratoryManagement/safetyInfoCategory/safetyInfoCategory.vue
  46. 1 0
      src/views/integratedManagement/laboratoryManagement/safetyInfoCategory/safetyInfoConfig.vue
  47. 2 4
      src/views/integratedManagement/laboratoryManagement/subject/addSubject.vue
  48. 597 6
      src/views/integratedManagement/laboratoryManagement/subject/index.vue
  49. 1 1
      src/views/integratedManagement/personnelManage/post/index.vue
  50. 3 3
      src/views/integratedManagement/personnelManage/studentInfo/index.vue
  51. 3 3
      src/views/integratedManagement/personnelManage/teacherInfo/index.vue
  52. 2 2
      src/views/iotDevice/hardwareManagement/hardwareEquipment/index.vue
  53. 301 172
      src/views/safetyCheck/collegeInspect/hiddenDangersReview/index.vue
  54. 270 167
      src/views/safetyCheck/collegeInspect/selfInspectionManage/index.vue
  55. 28 24
      src/views/safetyCheck/collegeInspect/selfInspectionProject/index.vue
  56. 277 0
      src/views/safetyCheck/collegeWorktable/annualHiddenDistribution.vue
  57. 266 0
      src/views/safetyCheck/collegeWorktable/annualSecureInspect.vue
  58. 37 11
      src/views/safetyCheck/collegeWorktable/coverageRateEcharts.vue
  59. 44 19
      src/views/safetyCheck/collegeWorktable/dataScreening.vue
  60. 32 15
      src/views/safetyCheck/collegeWorktable/dataScreeningChart.vue
  61. 45 40
      src/views/safetyCheck/collegeWorktable/hiddenDangerStatisticsEcharts.vue
  62. 158 48
      src/views/safetyCheck/collegeWorktable/index.vue
  63. 34 28
      src/views/safetyCheck/collegeWorktable/inspectionStatisticsEcharts.vue
  64. 29 7
      src/views/safetyCheck/collegeWorktable/rectificationFinish.vue
  65. 238 188
      src/views/safetyCheck/components/checkItem.vue
  66. 170 0
      src/views/safetyCheck/components/exportComponent/exportComponent.vue
  67. 166 68
      src/views/safetyCheck/components/initiateInspect/historyRecordsComponent.vue
  68. 322 146
      src/views/safetyCheck/components/initiateInspect/initiateInspect.vue
  69. 75 42
      src/views/safetyCheck/components/initiateInspect/recheckComponent.vue
  70. 63 53
      src/views/safetyCheck/components/initiateInspect/rectificationComponent.vue
  71. 132 122
      src/views/safetyCheck/components/inspectStatistics.vue
  72. 38 64
      src/views/safetyCheck/components/inspectionItemsStatistics.vue
  73. 219 60
      src/views/safetyCheck/components/noticeDom.vue
  74. 27 12
      src/views/safetyCheck/components/projectAddPage.vue
  75. 167 38
      src/views/safetyCheck/components/rectificationReportDom.vue
  76. 75 29
      src/views/safetyCheck/components/snapshotInfo.vue
  77. 459 0
      src/views/safetyCheck/components/snapshotRectificationComponent.vue
  78. 25 18
      src/views/safetyCheck/components/subDialog.vue
  79. 106 68
      src/views/safetyCheck/dataStatistics/hiddenDangerStatistics.vue
  80. 15 10
      src/views/safetyCheck/dataStatistics/index.vue
  81. 0 289
      src/views/safetyCheck/inspectJob/index.vue
  82. 2 2
      src/views/safetyCheck/inspectProject/inspectProjectAccording/addPage.vue
  83. 8 6
      src/views/safetyCheck/inspectProject/inspectProjectAccording/index.vue
  84. 3 1
      src/views/safetyCheck/inspectProject/inspectProjectAccording/itemCheckComponent.vue
  85. 17 9
      src/views/safetyCheck/inspectProject/inspectProjectTable/index.vue
  86. 0 290
      src/views/safetyCheck/inspectReport/index.vue
  87. 27 25
      src/views/safetyCheck/inspectSupervisorGroup/addPage.vue
  88. 10 12
      src/views/safetyCheck/inspectSupervisorGroup/index.vue
  89. 8 2
      src/views/safetyCheck/inspectSupervisorGroup/userCheckComponent.vue
  90. 50 50
      src/views/safetyCheck/safetyHazard/inspectHazard/index.vue
  91. 169 137
      src/views/safetyCheck/safetyHazard/rectificationNotice/index.vue
  92. 186 140
      src/views/safetyCheck/safetyHazard/rectificationNotice/listPage.vue
  93. 187 122
      src/views/safetyCheck/safetyHazard/rectificationReport/index.vue
  94. 437 0
      src/views/safetyCheck/safetyHazard/rectificationReport/listPage.vue
  95. 49 48
      src/views/safetyCheck/safetyHazard/selfInspectionHazard/index.vue
  96. 8 3
      src/views/safetyCheck/safetyHazard/snapshotHazard/index.vue
  97. 105 26
      src/views/safetyCheck/schoolInspect/inspectManage/index.vue
  98. 14 12
      src/views/safetyCheck/schoolInspect/inspectProject/index.vue
  99. 390 155
      src/views/safetyCheck/schoolInspect/reviewManage/index.vue
  100. 0 0
      src/views/safetyCheck/schoolWorktable/annualHiddenDistribution.vue

+ 5 - 5
.env.production

@@ -23,13 +23,13 @@ VUE_APP_VERSION_DIFFERENCE_FIELD = 'kuangYeDaXue_nanHu'
 # ####################外网接口配置####################
 
 # 现场
-# VUE_APP_BASE_API = '172.16.0.65/api'
+# VUE_APP_BASE_API = 'labcontrol.nwafu.edu.cn/api'
 
 # 1.8外网地址
-VUE_APP_BASE_API = 'lab.zjznai.com/labTest'
+# VUE_APP_BASE_API = 'lab.zjznai.com/labTest'
 
 # 43外网地址
-# VUE_APP_BASE_API = 'lab.zjznai.com/labapp'
+VUE_APP_BASE_API = 'lab.zjznai.con/labapp43'
 
 # 开发人员地址
 # VUE_APP_BASE_API = '192.168.1.24:8080'
@@ -40,10 +40,10 @@ VUE_APP_BASE_API = 'lab.zjznai.com/labTest'
 # VUE_APP_BASE_LOCAL_API = '172.16.0.65/api'
 
 # 1.8内网地址
-VUE_APP_BASE_LOCAL_API = '192.168.1.8/api'
+# VUE_APP_BASE_LOCAL_API = '192.168.1.8/api'
 
 # 43内网地址
-# VUE_APP_BASE_LOCAL_API = '192.168.1.43/api'
+VUE_APP_BASE_LOCAL_API = '192.168.1.43/api'
 
 # 开发人员地址
 # VUE_APP_BASE_LOCAL_API = '192.168.1.24:8080'

+ 4 - 1
README.md

@@ -139,6 +139,9 @@
 >##### 修改时务必注意版本分支关系,从底层开始迭代
 
     ├─master基础分支(于2024/7/30号封版,用于西农项目验收)
-    ├─versions-aqjc_fjfl(新版 安全检查-分级分类)
+    ├─VERSIONS-FenJiFenLei(新版分类分级-包含电子信息牌图片导出)
+    │  └─SCHOOL-XiBeiNongLin(山西农大版本分支包含分类分级信息牌导出功能)
+    ├─VERSIONS-AnQuanJianCha(新版安全检查)
+    │  └─SCHOOL-XiBeiNongLin(用于西农现场部署)
     ├─leb-web-dev(当前正在开发的分支)
     ├─leb-web-test(测试分支)

+ 38 - 0
package-lock.json

@@ -3137,6 +3137,11 @@
         }
       }
     },
+    "base64-arraybuffer": {
+      "version": "1.0.2",
+      "resolved": "https://mirrors.huaweicloud.com/repository/npm/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
+      "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ=="
+    },
     "base64-js": {
       "version": "1.5.1",
       "resolved": "https://registry.nlark.com/base64-js/download/base64-js-1.5.1.tgz?cache=0&sync_timestamp=1624607950711&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbase64-js%2Fdownload%2Fbase64-js-1.5.1.tgz",
@@ -4810,6 +4815,14 @@
         "timsort": "^0.3.0"
       }
     },
+    "css-line-break": {
+      "version": "2.1.0",
+      "resolved": "https://mirrors.huaweicloud.com/repository/npm/css-line-break/-/css-line-break-2.1.0.tgz",
+      "integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
+      "requires": {
+        "utrie": "^1.0.2"
+      }
+    },
     "css-loader": {
       "version": "3.6.0",
       "resolved": "https://registry.npmmirror.com/css-loader/download/css-loader-3.6.0.tgz?cache=0&sync_timestamp=1635967924209&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcss-loader%2Fdownload%2Fcss-loader-3.6.0.tgz",
@@ -7411,6 +7424,15 @@
         }
       }
     },
+    "html2canvas": {
+      "version": "1.4.1",
+      "resolved": "https://mirrors.huaweicloud.com/repository/npm/html2canvas/-/html2canvas-1.4.1.tgz",
+      "integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==",
+      "requires": {
+        "css-line-break": "^2.1.0",
+        "text-segmentation": "^1.0.3"
+      }
+    },
     "htmlparser2": {
       "version": "6.1.0",
       "resolved": "https://registry.npmmirror.com/htmlparser2/download/htmlparser2-6.1.0.tgz?cache=0&sync_timestamp=1636640945377&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fhtmlparser2%2Fdownload%2Fhtmlparser2-6.1.0.tgz",
@@ -14751,6 +14773,14 @@
         }
       }
     },
+    "text-segmentation": {
+      "version": "1.0.3",
+      "resolved": "https://mirrors.huaweicloud.com/repository/npm/text-segmentation/-/text-segmentation-1.0.3.tgz",
+      "integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
+      "requires": {
+        "utrie": "^1.0.2"
+      }
+    },
     "text-table": {
       "version": "0.2.0",
       "resolved": "https://registry.nlark.com/text-table/download/text-table-0.2.0.tgz",
@@ -15366,6 +15396,14 @@
       "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
       "dev": true
     },
+    "utrie": {
+      "version": "1.0.2",
+      "resolved": "https://mirrors.huaweicloud.com/repository/npm/utrie/-/utrie-1.0.2.tgz",
+      "integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
+      "requires": {
+        "base64-arraybuffer": "^1.0.2"
+      }
+    },
     "uuid": {
       "version": "3.4.0",
       "resolved": "https://registry.npmmirror.com/uuid/download/uuid-3.4.0.tgz",

+ 1 - 0
package.json

@@ -52,6 +52,7 @@
     "flv.js": "^1.6.2",
     "fuse.js": "6.4.3",
     "highlight.js": "9.18.5",
+    "html2canvas": "^1.4.1",
     "install": "^0.13.0",
     "js-base64": "^3.7.2",
     "js-beautify": "^1.14.9",

+ 4 - 4
src/api/commonality/permission.js

@@ -452,7 +452,7 @@ export function laboratoryClassMoldGetList(data) {
 // 查询安全分级列表(不带分页)
 export function laboratoryClassLevelGetList(data) {
   return request({
-    url: '/laboratory/classLevel/getList',
+    url: '/laboratory/levelConfig/getWebLevelTitleList',
     method: 'post',
     data: data
   })
@@ -461,7 +461,7 @@ export function laboratoryClassLevelGetList(data) {
 // 查询安全分类列表(不带分页)
 export function laboratoryClassTypeGetList(data) {
   return request({
-    url: '/laboratory/classType/getList',
+    url: '/laboratory/typeConfig/getWebList',
     method: 'post',
     data: data
   })
@@ -638,9 +638,9 @@ export function systemUserEditUser(data) {
   })
 }
 //实验室危险源类型下拉列表
-export function laboratorySubRelInfoGetHazardTypeList(query) {
+export function systemSubjectTags(query) {
   return request({
-    url: '/laboratory/subRelInfo/getHazardTypeList',
+    url: '/system/subject/tags',
     method: 'get',
     params: query
   })

+ 36 - 16
src/api/hierarchicalControl/index.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 
-// 分级管控-列表
+//分级管控-条件设置-列表
 export function laboratoryGradeManageList(data) {
   return request({
     url: '/laboratory/gradeManage/list',
@@ -8,8 +8,15 @@ export function laboratoryGradeManageList(data) {
     data: data
   })
 }
-
-// 分级管控-新增
+//分级管控-条件设置-人员列表
+export function systemUserSelectByPage(data) {
+  return request({
+    url: '/system/user/selectByPage',
+    method: 'post',
+    data: data
+  })
+}
+//分级管控-条件设置-新增
 export function laboratoryGradeManageAdd(data) {
   return request({
     url: '/laboratory/gradeManage/add',
@@ -17,8 +24,7 @@ export function laboratoryGradeManageAdd(data) {
     data: data
   })
 }
-
-// 分级管控-修改
+//分级管控-条件设置-编辑
 export function laboratoryGradeManageUpdate(data) {
   return request({
     url: '/laboratory/gradeManage/update',
@@ -26,28 +32,42 @@ export function laboratoryGradeManageUpdate(data) {
     data: data
   })
 }
-
-// 分级管控-执行
-export function laboratoryGradeManageExecute(data) {
+//分级管控-条件设置-详情
+export function laboratoryGradeManageDetail(query) {
   return request({
-    url: '/laboratory/gradeManage/execute',
+    url: '/laboratory/gradeManage/detail',
+    method: 'get',
+    params: query
+  })
+}
+//分级管控-条件设置-详情
+export function laboratoryGradeManageDelete(data) {
+  return request({
+    url: '/laboratory/gradeManage/delete',
     method: 'post',
     data: data
   })
 }
-
-// 分级管控-详情
-export function laboratoryGradeManageDetail(query) {
+// 查询分级控管理列表
+export function gradeManageWorkList(query) {
   return request({
-    url: '/laboratory/gradeManage/detail',
+    url: '/laboratory/gradeManageWork/list',
     method: 'get',
     params: query
   })
 }
-// 分级管控-删除
-export function laboratoryGradeManageDelete(query) {
+// 查询管控执行记录列表
+export function laboratoryGradeManageRecordList(data) {
   return request({
-    url: '/laboratory/gradeManage/delete',
+    url: '/laboratory/gradeManageRecord/list',
+    method: 'post',
+    data: data
+  })
+}
+// 管控执行记录详情
+export function laboratoryGradeManageWorkDetail(query) {
+  return request({
+    url: '/laboratory/gradeManageWork/detail',
     method: 'get',
     params: query
   })

+ 177 - 0
src/api/hierarchicalControl/indexDemo.js

@@ -0,0 +1,177 @@
+import request from '@/utils/request'
+
+// 查询分级��控管理列表
+export function listGradeManage(query) {
+  return request({
+    url: '/laboratory/gradeManage/list',
+    method: 'get',
+    params: query
+  })
+}
+// 查询分级��控管理详细
+export function getGradeManage(id) {
+  return request({
+    url: '/laboratory/gradeManage/' + id,
+    method: 'get'
+  })
+}
+// 删除分级��控管理
+export function delGradeManage(id) {
+  return request({
+    url: '/laboratory/gradeManage/' + id,
+    method: 'delete'
+  })
+}
+// 新增分级��控管理
+export function addGradeManage(data) {
+  return request({
+    url: '/laboratory/gradeManage',
+    method: 'post',
+    data: data
+  })
+}
+// 修改分级��控管理
+export function updateGradeManage(data) {
+  return request({
+    url: '/laboratory/gradeManage',
+    method: 'put',
+    data: data
+  })
+}
+//化学品存放页面-获取当前账号学院数据
+export function filterDept(query) {
+  return request({
+    url: '/system/dept/filterDept',
+    method: 'get',
+    params: query
+  })
+}
+// 查询安全分级所有列表(不带分页)
+export function listClassifiedAll(query) {
+  return request({
+    url: '/laboratory/classified/listAll',
+    method: 'get',
+    params: query
+  })
+}
+// 查询安全分级类型列表(不带分页)
+export function listClasstypeAll(query) {
+  return request({
+    url: '/laboratory/classtype/listAll',
+    method: 'get',
+    params: query
+  })
+}
+// 查询实验室类型列表
+export function labMoldQueryOption(data) {
+  return request({
+    url: '/laboratory/labMold/queryOption',
+    method: 'post',
+    data: data
+  })
+}
+
+//获取实验室列表
+export function listInfo(query) {
+  return request({
+    url: '/laboratory/subject/listInfo',
+    method: 'get',
+    params: query
+  })
+}
+// 删除实验室类型
+export function queryOption(data) {
+  return request({
+    url: '/laboratory/labMold/queryOption/',
+    method: 'post',
+    data: data
+  })
+}
+// 查询用户列表
+export function listUser(query) {
+  return request({
+    url: '/system/user/getNotAuthList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询院系列表
+export function listDepartments() {
+  return request({
+    url: '/system/dept/departments/list',
+    method: 'get'
+  })
+}
+//获取职位列表
+export function optionselect(query) {
+  return request({
+    url: '/system/post/optionselect',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询管控执行记录列表
+export function listGradeManageRecord(query) {
+  return request({
+    url: '/laboratory/gradeManageRecord/list',
+    method: 'get',
+    params: query
+  })
+}
+// 查询管控执行记录详细
+export function getGradeManageRecord(id) {
+  return request({
+    url: '/laboratory/gradeManageRecord/' + id,
+    method: 'get'
+  })
+}
+// 删除管控执行记录
+export function delGradeManageRecord(id) {
+  return request({
+    url: '/laboratory/gradeManageRecord/' + id,
+    method: 'delete'
+  })
+}
+// 新增管控执行记录
+export function addGradeManageRecord(data) {
+  return request({
+    url: '/laboratory/gradeManageRecord',
+    method: 'post',
+    data: data
+  })
+}
+// 修改管控执行记录
+export function updateGradeManageRecord(data) {
+  return request({
+    url: '/laboratory/gradeManageRecord',
+    method: 'put',
+    data: data
+  })
+}
+
+//查询分级管控管理工作详情
+export function gradeManageWorkInfo(recordId) {
+  return request({
+    url: '/laboratory/gradeManageWork/'+recordId,
+    method: 'get',
+  })
+}
+// 查询分级控管理工作-完成
+export function gradeManageWorkFinish(data) {
+  return request({
+    url: '/laboratory/gradeManageWork/finish',
+    method: 'post',
+    data: data
+  })
+}
+
+// 查询分级控管理列表
+export function gradeManageWorkList(query) {
+  return request({
+    url: '/laboratory/gradeManageWork/list',
+    method: 'get',
+    params: query
+  })
+}

+ 24 - 0
src/api/integratedManagement/index.js

@@ -367,6 +367,14 @@ export function laboratorySubRelInfoUpdateByControl(data) {
     data: data
   })
 }
+//实验室-信息牌下载-获取信息牌配置信息
+export function laboratoryBoardExportBoardInfo(query) {
+  return request({
+    url: '/laboratory/board/exportBoardInfo',
+    method: 'get',
+    params: query
+  })
+}
 //实验室-排序修改
 export function laboratorySubRelInfoUpdateBySort(data) {
   return request({
@@ -399,6 +407,14 @@ export function laboratoryUserAuthAuthTypeList(query) {
     params: query
   })
 }
+//分级配置-列表查询时接口
+export function laboratoryLevelConfigGetLevelTitleList(data) {
+  return request({
+    url: '/laboratory/levelConfig/getLevelTitleList',
+    method: 'post',
+    data: data
+  })
+}
 //分级配置-列表
 export function laboratoryLevelConfigGetList(data) {
   return request({
@@ -821,3 +837,11 @@ export function laboratorySubPassOutCheckedSubList(data) {
     data: data
   })
 }
+//获取安全类目最大排序
+export function laboratoryBoardGetBrandInOrder(query) {
+  return request({
+    url: '/laboratory/board/getBrandInOrder',
+    method: 'get',
+    params: query
+  })
+}

File diff suppressed because it is too large
+ 723 - 167
src/api/safetyCheck/index.js


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

@@ -1,653 +0,0 @@
-import request from '@/utils/request'
-
-/**************************** 检查项相关 ****************************/
-//检查项目表-列表
-export function securityCheckOptionList(data) {
-  return request({
-    url: '/security/checkOption/list',
-    method: 'post',
-    data: data
-  })
-}
-//检查项目表-修改
-export function securityCheckOptionUpdate(data) {
-  return request({
-    url: '/security/checkOption/update',
-    method: 'post',
-    data: data
-  })
-}
-//检查项目表-新增
-export function securityCheckOptionAdd(data) {
-  return request({
-    url: '/security/checkOption/add',
-    method: 'post',
-    data: data
-  })
-}
-//检查项目表-删除
-export function securityCheckOptionDelete(data) {
-  return request({
-    url: '/security/checkOption/delete',
-    method: 'post',
-    data: data
-  })
-}
-//检查项目表-批量删除
-export function securityCheckOptionBatchDelete(data) {
-  return request({
-    url: '/security/checkOption/batchDelete',
-    method: 'post',
-    data: data
-  })
-}
-
-/**************************** 督导组相关 ****************************/
-
-/* 通用接口-人员查询(过滤已选/未选)
-   deptId:学院ID
-   searchValue:姓名/工号
-   filtType:1,//1.过滤 2.不过滤
-   selectedUserIds:[],//过滤用户IDS
-   userIds:[],//不过滤用户IDS
-   page:1,
-   pageSize:2,
-*/
-export function findUserList(data) {
-  return request({
-    url: '/system/user/findUserList',
-    method: 'post',
-    data: data
-  })
-}
-//督导组-列表
-export function securityCheckGroupList(data) {
-  return request({
-    url: '/security/checkGroup/list',
-    method: 'post',
-    data: data
-  })
-}
-//督导组-详情
-export function securityCheckGroupDetail(query) {
-  return request({
-    url: '/security/checkGroup/detail',
-    method: 'get',
-    params: query
-  })
-}
-//督导组-删除
-export function securityCheckGroupDelete(data) {
-  return request({
-    url: '/security/checkGroup/delete',
-    method: 'post',
-    data: data
-  })
-}
-//督导组-启用/停用
-export function securityCheckGroupEnable(data) {
-  return request({
-    url: '/security/checkGroup/enable',
-    method: 'post',
-    data: data
-  })
-}
-//督导组-人员-启用/停用
-export function securityCheckGroupUserEnable(data) {
-  return request({
-    url: '/security/checkGroup/userEnable',
-    method: 'post',
-    data: data
-  })
-}
-//督导组-新增
-export function securityCheckGroupAdd(data) {
-  return request({
-    url: '/security/checkGroup/add',
-    method: 'post',
-    data: data
-  })
-}
-//督导组-修改
-export function securityCheckGroupUpdate(data) {
-  return request({
-    url: '/security/checkGroup/update',
-    method: 'post',
-    data: data
-  })
-}
-
-/**************************** 随手拍 ****************************/
-
-//随手拍-列表
-export function securityCheckPhotoMyList(data) {
-  return request({
-    url: '/security/checkPhoto/myList',
-    method: 'post',
-    data: data
-  })
-}
-//随手拍-详情
-export function securityCheckPhotoDetail(query) {
-  return request({
-    url: '/security/checkPhoto/detail',
-    method: 'get',
-    params: query
-  })
-}
-//随手拍-新增
-export function securityCheckPhotoMyAdd(data) {
-  return request({
-    url: '/security/checkPhoto/myAdd',
-    method: 'post',
-    data: data
-  })
-}
-//随手拍-删除
-export function securityCheckPhotoDelete(data) {
-  return request({
-    url: '/security/checkPhoto/delete',
-    method: 'post',
-    data: data
-  })
-}
-//随手拍-隐患列表
-export function securityCheckPhotoList(data) {
-  return request({
-    url: '/security/checkPhoto/list',
-    method: 'post',
-    data: data
-  })
-}
-//随手拍-隐患整改
-export function securityCheckPhotoUpdate(data) {
-  return request({
-    url: '/security/checkPhoto/update',
-    method: 'post',
-    data: data
-  })
-}
-
-/**************************** 检查依据 ****************************/
-
-//检查依据-列表
-export function securityCheckBasisList(data) {
-  return request({
-    url: '/security/checkBasis/list',
-    method: 'post',
-    data: data
-  })
-}
-//检查依据-新增
-export function securityCheckBasisAdd(data) {
-  return request({
-    url: '/security/checkBasis/add',
-    method: 'post',
-    data: data
-  })
-}
-//检查依据-编辑
-export function securityCheckBasisUpdate(data) {
-  return request({
-    url: '/security/checkBasis/update',
-    method: 'post',
-    data: data
-  })
-}
-//检查依据-详情
-export function securityCheckBasisDetail(query) {
-  return request({
-    url: '/security/checkBasis/detail',
-    method: 'get',
-    params: query
-  })
-}
-//检查依据-删除
-export function securityCheckBasisDelete(data) {
-  return request({
-    url: '/security/checkBasis/delete',
-    method: 'post',
-    data: data
-  })
-}
-//检查依据-检查指标下拉列表 level级别123 parentId父类ID
-export function securityCheckOptionSelList(data) {
-  return request({
-    url: '/security/checkOption/selList',
-    method: 'post',
-    data: data
-  })
-}
-//检查依据-查询穿梭框数据 id父级ID 一级与二级 notIds未选中的
-export function securityCheckOptionShuttleList(data) {
-  return request({
-    url: '/security/checkOption/shuttleList',
-    method: 'post',
-    data: data
-  })
-}
-//检查依据-查询穿梭框数据 id父级ID 一级与二级 ids选中的
-export function securityCheckOptionShuttleRightList(data) {
-  return request({
-    url: '/security/checkOption/shuttleRightList',
-    method: 'post',
-    data: data
-  })
-}
-
-/**************************** 检查计划 ****************************/
-//检查计划-列表
-export function securityCheckPlanList(data) {
-  return request({
-    url: '/security/checkPlan/list',
-    method: 'post',
-    data: data
-  })
-}
-//检查计划-新增
-export function securityCheckPlanAdd(data) {
-  return request({
-    url: '/security/checkPlan/add',
-    method: 'post',
-    data: data
-  })
-}
-//检查计划-编辑
-export function securityCheckPlanUpdate(data) {
-  return request({
-    url: '/security/checkPlan/update',
-    method: 'post',
-    data: data
-  })
-}
-//检查计划-详情
-export function securityCheckPlanFindCheckPlan(query) {
-  return request({
-    url: '/security/checkPlan/findCheckPlan',
-    method: 'get',
-    params: query
-  })
-}
-//检查计划-查询全校实验室数量
-export function laboratorySubRelInfoGetAllSubNum(query) {
-  return request({
-    url: '/laboratory/subRelInfo/getAllSubNum',
-    method: 'get',
-    params: query
-  })
-}
-//检查计划-实验室查询穿梭框
-export function laboratorySubRelInfoConditionSubjectInfo(data) {
-  return request({
-    url: '/laboratory/subRelInfo/conditionSubjectInfo',
-    method: 'post',
-    data: data
-  })
-}
-//检查计划-历史标题列表
-export function checkPlanGetHistoryPlanTitles(query) {
-  return request({
-    url: '/security/checkPlan/getHistoryPlanTitles',
-    method: 'get',
-    params: query
-  })
-}
-//检查计划-删除历史标题 checkPlanId
-export function checkPlanHideHistoryPlanTitle(query) {
-  return request({
-    url: '/security/checkPlan/hideHistoryPlanTitle',
-    method: 'get',
-    params: query
-  })
-}
-/**************************** 检查管理/自查管理 ****************************/
-//检查管理/自查管理-计划列表
-export function securityCheckPlanTitleList(data) {
-  return request({
-    url: '/security/checkPlan/titleList',
-    method: 'post',
-    data: data
-  })
-}
-//检查管理/自查管理-计划下实验室列表
-export function securityCheckManageList(data) {
-  return request({
-    url: '/security/checkManage/list',
-    method: 'post',
-    data: data
-  })
-}
-//检查管理/自查管理-计划下-实验室下-检查项列表
-export function securityCheckSetOptionList(data) {
-  return request({
-    url: '/security/checkSetOption/list',
-    method: 'post',
-    data: data
-  })
-}
-//检查管理/自查管理-开始检查计划详情
-export function securityCheckPlanCheckInfo(data) {
-  return request({
-    url: '/security/checkPlan/checkInfo',
-    method: 'post',
-    data: data
-  })
-}
-//检查管理/自查管理-查询计划内实验室下未检查的检查项
-export function securityCheckSetOptionUnCheckList(data) {
-  return request({
-    url: '/security/checkSetOption/unCheckList',
-    method: 'post',
-    data: data
-  })
-}
-//检查管理/自查管理-开始检查第一次提交
-export function securityRecordCheckCommit(data) {
-  return request({
-    url: '/security/record/checkCommit',
-    method: 'post',
-    data: data
-  })
-}
-//检查管理/自查管理-流程详情
-export function securityCheckDangerDetailList(query) {
-  return request({
-    url: '/security/checkDanger/getDangerId/'+query.managerId+'/'+query.setOptionId,
-    method: 'get',
-  })
-}
-
-/**************************** 安全检查-数据统计 ****************************/
-// 数据统计列表
-export function securityDataStatisticsList(data) {
-  return request({
-    url: '/security/dataStatistics/list',
-    method: 'post',
-    data: data
-  })
-}
-// 检查计划-计划明细列表
-export function securityCheckStatisticsCheckList(data) {
-  return request({
-    url: '/security/checkStatistics/checkList',
-    method: 'post',
-    data: data
-  })
-}
-// 隐患统计柱状图
-export function securityHazardReportColumnPicture (data) {
-  return request({
-    url: '/security/hazardReport/columnPicture',
-    method: 'post',
-    data: data
-  })
-}
-// 各单位隐患整改统计-表头部参数
-export function reportHazardReportOneHazardGaugeOutfit (query) {
-  return request({
-    url: '/report/hazardReport/oneHazardGaugeOutfit',
-    method: 'get',
-    params: query
-  })
-}
-// 各单位隐患整改统计-列表-校级
-export function reportHazardReportDeptList (data) {
-  return request({
-    url: '/report/hazardReport/deptList',
-    method: 'post',
-    data: data
-  })
-}
-// 各单位隐患整改统计-头部数据-校级
-export function reportHazardReportDeptTop (data) {
-  return request({
-    url: '/report/hazardReport/deptTop',
-    method: 'post',
-    data: data
-  })
-}
-// 各单位隐患整改统计-查询是否有更新数据-校级
-export function securityCheckDangerTodayDangerList (query) {
-  return request({
-    url: '/security/checkDanger/todayDangerList',
-    method: 'get',
-    params: query
-  })
-}
-// 各单位隐患整改统计-更细数据-校级
-export function reportHazardReportItemsDeptRefresh (query) {
-  return request({
-    url: '/report/hazardReport/itemsDeptRefresh',
-    method: 'get',
-    params: query
-  })
-}
-// 一级检查项隐患分布-列表-校级
-export function reportHazardReportOneItemsScatter (data) {
-  return request({
-    url: '/report/hazardReport/oneItemsScatter',
-    method: 'post',
-    data: data
-  })
-}
-// 一级检查项隐患分布-头部数据-校级
-export function reportHazardReportOneItemsScatterTop (data) {
-  return request({
-    url: '/report/hazardReport/oneItemsScatterTop',
-    method: 'post',
-    data: data
-  })
-}
-
-// 检查项统计-一级指标隐患分布 饼图
-export function reportHazardItemsOneReportPie (data) {
-  return request({
-    url: '/report/hazardItems/oneReportPie',
-    method: 'post',
-    data: data
-  })
-}
-// 检查项统计-一级隐患列表
-export function reportHazardItemsOneReportList (data) {
-  return request({
-    url: '/report/hazardItems/oneReportList',
-    method: 'post',
-    data: data
-  })
-}
-// 检查项统计-一级隐患数据刷新
-export function reportHazardItemsOneReportRefresh (query) {
-  return request({
-    url: '/report/hazardItems/oneReportRefresh',
-    method: 'get',
-    params: query
-  })
-}
-// 检查项统计-二级隐患数据刷新
-export function securityHazardReportTwoReportRefresh (query) {
-  return request({
-    url: '/security/hazardReport/twoReportRefresh',
-    method: 'get',
-    params: query
-  })
-}
-// 检查项统计-三级隐患数据刷新
-export function reportHazardItemsThreeReportRefresh (query) {
-  return request({
-    url: '/report/hazardItems/threeReportRefresh',
-    method: 'get',
-    params: query
-  })
-}
-
-// 检查项统计-二级指标隐患分布 饼图
-export function reportHazardItemsTwoReportPie (data) {
-  return request({
-    url: '/report/hazardItems/twoReportPie',
-    method: 'post',
-    data: data
-  })
-}
-// 检查项统计-二级隐患列表
-export function reportHazardItemsTwoReportList (data) {
-  return request({
-    url: '/report/hazardItems/twoReportList',
-    method: 'post',
-    data: data
-  })
-}
-// 检查项统计-三级指标隐患分布 饼图
-export function reportHazardItemsThreeReportPie (data) {
-  return request({
-    url: '/report/hazardItems/threeReportPie',
-    method: 'post',
-    data: data
-  })
-}
-// 检查项统计-三级隐患列表
-export function reportHazardItemsThreeReportList (data) {
-  return request({
-    url: '/report/hazardItems/threeReportList',
-    method: 'post',
-    data: data
-  })
-}
-// 一级检查项隐患分布-列表-院级
-export function reportHazardItemsOneReportListCollege (data) {
-  return request({
-    url: '/report/hazardItems/oneReportListCollege',
-    method: 'post',
-    data: data
-  })
-}
-// 一级检查项隐患分布-头部数据-院级
-export function reportHazardItemsOneReportPieCollege (data) {
-  return request({
-    url: '/report/hazardItems/oneReportPieCollege',
-    method: 'post',
-    data: data
-  })
-}
-// 二级检查项隐患分布-列表-院级
-export function reportHazardItemsTwoReportListCollege (data) {
-  return request({
-    url: '/report/hazardItems/twoReportListCollege',
-    method: 'post',
-    data: data
-  })
-}
-// 二级检查项隐患分布-头部数据-院级
-export function reportHazardItemsTwoReportPieCollege (data) {
-  return request({
-    url: '/report/hazardItems/twoReportPieCollege',
-    method: 'post',
-    data: data
-  })
-}
-// 三级检查项隐患分布-列表-院级
-export function reportHazardItemsThreeReportListCollege (data) {
-  return request({
-    url: '/report/hazardItems/threeReportListCollege',
-    method: 'post',
-    data: data
-  })
-}
-// 三级检查项隐患分布-头部数据-院级
-export function reportHazardItemsThreeReportPieCollege (data) {
-  return request({
-    url: '/report/hazardItems/threeReportPieCollege',
-    method: 'post',
-    data: data
-  })
-}
-//隐患统计-隐患统计-列表-院级
-export function reportHazardReportDeptListCollege  (data) {
-  return request({
-    url: '/report/hazardReport/deptListCollege ',
-    method: 'post',
-    data: data
-  })
-}
-//隐患统计-隐患统计-头部-院级
-export function reportHazardReportDeptTopCollege (data) {
-  return request({
-    url: '/report/hazardReport/deptTopCollege',
-    method: 'post',
-    data: data
-  })
-}
-//隐患统计-一级检查项分布-列表-院级
-export function reportHazardReportOneItemsScatterCollege (data) {
-  return request({
-    url: '/report/hazardReport/oneItemsScatterCollege',
-    method: 'post',
-    data: data
-  })
-}
-//隐患统计-一级检查项分布-头部-院级
-export function reportHazardReportOneItemsScatterCollegeTop (data) {
-  return request({
-    url: '/report/hazardReport/oneItemsScatterCollegeTop',
-    method: 'post',
-    data: data
-  })
-}
-/**************************** 安全隐患 ****************************/
-// 检查隐患/自查隐患-列表
-export function securityCheckDangerList (data) {
-  return request({
-    url: '/security/checkDanger/list',
-    method: 'post',
-    data: data
-  })
-}
-/**************************** 安全检查-公共部分 ****************************/
-// 查询用户身份-校级管理员/院级管理员/督导组成员
-export function securityDataStatisticsGetUserIdentity(query) {
-  return request({
-    url: '/security/dataStatistics/getUserIdentity',
-    method: 'get',
-    params: query
-  })
-}
-// 根据检查项与实验室 查询触发次数 subId实验室ID hazardCheckId检查项ID
-export function securityCheckPhotoGetCheckNumBySub(query) {
-  return request({
-    url: '/security/checkPhoto/getCheckNumBySub',
-    method: 'get',
-    params: query
-  })
-}
-// 检查依据-下拉列表
-export function securityCheckBasisGetList(data) {
-  return request({
-    url: '/security/checkBasis/getList',
-    method: 'post',
-    data: data
-  })
-}
-// 督导组模糊查询下拉列表
-export function securityCheckGroupFindGroupList(data) {
-  return request({
-    url: '/security/checkGroup/findGroupList',
-    method: 'post',
-    data: data
-  })
-}
-//督导组成员查询
-export function securityCheckGroupMemberGroupMemberList(data) {
-  return request({
-    url: '/security/checkGroupMember/groupMemberList',
-    method: 'post',
-    data: data
-  })
-}
-
-//计划内督导组成员查询
-export function securityMemberPlanMemberList(data) {
-  return request({
-    url: '/security/member/planMemberList',
-    method: 'post',
-    data: data
-  })
-}

+ 0 - 1
src/api/safetyCheck/indexDemoTwo.js

@@ -1 +0,0 @@
-import request from '@/utils/request'

+ 0 - 375
src/api/safetyCheck/indexTow.js

@@ -1,375 +0,0 @@
-import request from '@/utils/request'
-
-/***************************检查计划***************************/
-
-//检查计划-列表
-//自查任务-列表
-export function checkPlanList(data) {
-  return request({
-    url: '/zd-security/checkPlan/list',
-    method: 'post',
-    data: data
-  })
-}
-//检查计划-根据计划ID删除
-//自查任务-根据计划ID删除
-export function checkPlanDelete(query) {
-  return request({
-    url: '/zd-security/checkPlan/delete',
-    method: 'delete',
-    params: query
-  })
-}
-//附件列表查询-通过计划ID查询附件列表
-export function getFindByCheckPlanId(query) {
-  return request({
-    url: '/zd-security/upload/findByCheckPlanId',
-    method: 'get',
-    params: query
-  })
-}
-//检查计划-根据计划ID查询管理列表
-//自查任务-根据计划ID查询管理列表
-export function findByCheckPlanId(data) {
-  return request({
-    url: '/zd-security/checkManage/findByCheckPlanId',
-    method: 'post',
-    data: data
-  })
-}
-// 查询校级下实验室数量
-export function laboratorySubRelInfoGetAllSubNum(query) {
-  return request({
-    url: '/laboratory/subRelInfo/getAllSubNum',
-    method: 'get',
-    params: query
-  })
-}
-// 检查范围,选择学院,查询学院信息和实验室数量
-export function laboratorySubRelInfoConditionCollegeInfo(query) {
-  return request({
-    url: '/laboratory/subRelInfo/conditionCollegeInfo',
-    method: 'get',
-    params: query
-  })
-}
-// 检查计划-查询选中院系下的实验室列表
-export function laboratorySubRelInfoGetRelListByCondition(data) {
-  return request({
-    url: '/laboratory/subRelInfo/getRelListByCondition',
-    method: 'post',
-    data: data
-  })
-}
-// 检查计划-查询选中院系下的实验室列表
-export function laboratorySubRelInfoConditionSubjectInfo(data) {
-  return request({
-    url: '/laboratory/subRelInfo/conditionSubjectInfo',
-    method: 'post',
-    data: data
-  })
-}
-// 检查计划-专项检查查询危化品穿梭框内容
-export function laboratoryHazardQueryHazardList(data) {
-  return request({
-    url: '/laboratory/hazard/queryHazardList',
-    method: 'post',
-    data: data
-  })
-}
-
-//通用接口-人员查询(过滤已选/未选)
-export function findUserList(data) {
-  return request({
-    url: '/system/user/findUserList',
-    method: 'post',
-    data: data
-  })
-}
-//检查计划-新增计划
-//自查任务-新增计划
-export function checkPlanAdd(data) {
-  return request({
-    url: '/zd-security/checkPlan/add',
-    method: 'post',
-    data: data
-  })
-}
-//检查计划-计划详情
-//自查任务-计划详情
-export function findCheckPlan(query) {
-  return request({
-    url: '/zd-security/checkPlan/findCheckPlan',
-    method: 'get',
-    params: query
-  })
-}
-//检查计划-修改计划
-//自查任务-修改计划
-export function checkPlanUpdate(data) {
-  return request({
-    url: '/zd-security/checkPlan/update',
-    method: 'post',
-    data: data
-  })
-}
-//校院巡察组-通过id查询巡查组详情
-export function checkGroupFind(query) {
-  return request({
-    url: '/zd-security/checkGroup/find',
-    method: 'get',
-    params: query
-  })
-}
-//检查计划-查询历史计划标题列表
-//自查任务-查询历史计划标题列表
-export function getHistoryPlanTitles(query) {
-  return request({
-    url: '/zd-security/checkPlan/getHistoryPlanTitles',
-    method: 'get',
-    params: query
-  })
-}
-
-//工作台-查询是否院级用户
-export function isSCollege(query) {
-  return request({
-    url: '/zd-security/collegCheck/isSCollege',
-    method: 'get',
-    params: query
-  })
-}
-//检查计划-根据ID隐藏历史标题
-export function hideHistoryPlanTitle(query) {
-  return request({
-    url: '/zd-security/checkPlan/hideHistoryPlanTitle',
-    method: 'get',
-    params: query
-  })
-}
-//通用接口-设备确定提交
-export function haveHazardInSub(data) {
-  return request({
-    url: '/laboratory/hazard/haveHazardInSub',
-    method: 'post',
-    data: data
-  })
-}
-//项目检查库-树状列表
-export function checkOptionList(query) {
-  return request({
-    url: '/zd-security/checkOption/list',
-    method: 'get',
-    params: query
-  })
-}
-//检查计划-查询管理详情接口
-//自查任务-查询管理详情接口
-//自查任务-查询管理计划详情接口
-//自查任务-查询管理任务详情接口
-export function findCheckManage(query) {
-  return request({
-    url: '/zd-security/checkManage/findCheckManage',
-    method: 'get',
-    params: query
-  })
-}
-//检查计划-查询管理保存/提交
-//自查任务-查询管理保存/提交
-export function checkManageUpdate(data) {
-  return request({
-    url: '/zd-security/checkManage/update',
-    method: 'put',
-    data: data
-  })
-}
-//通用接口-查询检查项再特定实验室发生历史次数
-export function countHazardNum(query) {
-  return request({
-    url: '/zd-security/checkHazard/countHazardNum',
-    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 checkGroupList(data) {
-  return request({
-    url: '/zd-security/checkGroup/list',
-    method: 'post',
-    data: data
-  })
-}
-//校院巡察组-新增
-export function checkGroupAdd(data) {
-  return request({
-    url: '/zd-security/checkGroup/add',
-    method: 'post',
-    data: data
-  })
-}
-
-//校院巡察组-编辑
-export function checkGroupUpdate(data) {
-  return request({
-    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 getCheckPlanBySubId(query) {
-  return request({
-    url: '/zd-security/checkManage/getCheckPlanBySubId',
-    method: 'get',
-    params: query
-  })
-}
-
-//开展检查-提交
-export function checkManageAdd(data) {
-  return request({
-    url: '/zd-security/checkManage/add',
-    method: 'post',
-    data: data
-  })
-}
-//获取权限范围(巡查/自查)
-export function getGentle(query){
-  return request({
-    url: '/zd-security/checkSet/getGentle',
-    method: 'get',
-    params: query
-  })
-}
-
-//通用接口-根据实验室id分类查询实验室内设备
-export function getHazardInfoBySubId(query) {
-  return request({
-    url: '/laboratory/hazard/getHazardInfoBySubId',
-    method: 'get',
-    params: query
-  })
-}
-//通用接口-根据选择的设备id生成检查项
-export function getHazardInfoByJoinIds(query) {
-  return request({
-    url: '/security/checkManage/getHazardInfoByJoinIds',
-    method: 'get',
-    params: query
-  })
-}
-
-//检查计划-查询管理列表
-//自查任务-查询管理列表
-export function checkManageList(data) {
-  return request({
-    url: '/security/checkManage/list',
-    method: 'post',
-    data: data
-  })
-}
-//安全隐患-隐患详情
-export function getHazardById(query) {
-  return request({
-    url: '/zd-security/checkHazard/getHazardById',
-    method: 'get',
-    params: query
-  })
-}
-//安全隐患-隐患整改-隐患审核
-export function addOrApprove(data) {
-  return request({
-    url: '/zd-security/checkRectify/addOrApprove',
-    method: 'post',
-    data: data
-  })
-}
-
-//待整改
-export function rectifyList(query) {
-  return request({
-    url: '/zd-security/checkHazard/rectifyList',
-    method: 'get',
-    params: query
-  })
-}
-//待复核
-export function recheckList(query) {
-  return request({
-    url: '/zd-security/checkHazard/recheckList',
-    method: 'get',
-    params: query
-  })
-}
-//已完成
-export function overList(query) {
-  return request({
-    url: '/zd-security/checkHazard/overList',
-    method: 'get',
-    params: query
-  })
-}
-
-//安全隐患-校院巡察/批量审核列表
-export function batchApprovalList(query) {
-  return request({
-    url: '/zd-security/checkHazard/batchApprovalList',
-    method: 'get',
-    params: query
-  })
-}
-
-//安全隐患-批量审核
-export function batchApprove(data) {
-  return request({
-    url: '/zd-security/checkRectify/batchApprove',
-    method: 'post',
-    data: data
-  })
-}
-
-//安全隐患-暂无法整改列表数据
-export function unableRectifyList(query) {
-  return request({
-    url: '/zd-security/checkHazard/unableRectifyList',
-    method: 'get',
-    params: query
-  })
-}
-
-//整改报告-列表
-export function checkRectifyList(query) {
-  return request({
-    url: '/zd-security/checkRectify/list',
-    method: 'get',
-    params: query
-  })
-}

+ 8 - 8
src/components/ZDcomponents/advancedSearch.vue

@@ -85,15 +85,15 @@ searchClick(type,data){
         </el-date-picker>
       </el-form-item>
       <el-form-item>
-        <p class="inquire-button-one" @click="buttonClick(1)">查询</p>
-        <p class="reset-button-one" @click="buttonClick(2)">重置</p>
+        <p class="page-inquire-common-style-button" @click="buttonClick(1)">查询</p>
+        <p class="page-reset-common-style-button" @click="buttonClick(2)">重置</p>
       </el-form-item>
       <el-form-item>
         <p class="advanced-button" @click="stateSwitch">高级搜索</p>
       </el-form-item>
       <el-form-item style="float: right" v-for="item in searchData.buttonList" >
-        <p v-if="item.type == 1 && !item.hasPermi" class="inquire-button-one" style="width:120px;" @click="buttonClick(item.parameter)">{{item.name}}</p>
-        <p v-if="item.type == 1 && item.hasPermi" class="inquire-button-one" v-hasPermiRouter="item.hasPermi" style="width:120px;" @click="buttonClick(item.parameter)">{{item.name}}</p>
+        <p v-if="item.type == 1 && !item.hasPermi" class="page-add-common-style-button" style="width:120px;" @click="buttonClick(item.parameter)">{{item.name}}</p>
+        <p v-if="item.type == 1 && item.hasPermi" class="page-add-common-style-button" v-hasPermiRouter="item.hasPermi" style="width:120px;" @click="buttonClick(item.parameter)">{{item.name}}</p>
         <div style="float: right;" v-if="item.type == 2">
           <el-dropdown @command="commandButton" v-hasPermiRouter="item.hasPermi">
             <div class="form-dropdown-box">
@@ -139,14 +139,14 @@ searchClick(type,data){
     <div class="advanced-max-big-box" v-if="searchState">
       <div class="left-advanced-box"></div>
       <div class="center-advanced-box">
-        <p class="inquire-button-one" @click="buttonClick(1)">查询</p>
-        <p class="reset-button-one" @click="buttonClick(2)">重置</p>
+        <p class="page-inquire-common-style-button" @click="buttonClick(1)">查询</p>
+        <p class="page-reset-common-style-button" @click="buttonClick(2)">重置</p>
       </div>
       <div class="right-advanced-box">
         <span class="ordinary-button" @click="stateSwitch">普通搜索</span>
       </div>
       <div v-for="item in searchData.buttonList">
-        <p v-if="item.type == 1" class="inquire-button-one"
+        <p v-if="item.type == 1" class="page-add-common-style-button"
            v-hasPermiRouter="item.hasPermi" style="width:120px;float: right;" @click="buttonClick(item.parameter)">{{item.name}}</p>
         <div style="float: right;" v-if="item.type == 2">
           <el-dropdown @command="commandButton" v-hasPermiRouter="item.hasPermi">
@@ -239,7 +239,7 @@ searchClick(type,data){
 
 <style lang="scss" scoped>
   .advancedSearchMaxBigBox{
-    margin:0 20px;
+    margin:20px 20px 0;
     .advanced-button{
       margin:0 20px;
       cursor: pointer;

+ 2 - 1
src/components/audioPlayer/audioPlayer.vue

@@ -123,7 +123,8 @@
         )
         if (myVid != null) {
           myVid.oncanplay = function () {
-            that.duration = that.transTime(myVid.duration) // 计算音频时长
+
+            that.duration = that.transTime(myVid.duration)=='NaN:NaN'?'0:00':that.transTime(myVid.duration) // 计算音频时长
           }
           myVid.volume = 1 // 设置音量100%
         }

File diff suppressed because it is too large
+ 0 - 461
src/components/lookDocumentDialog/components/informDom.vue


File diff suppressed because it is too large
+ 0 - 422
src/components/lookDocumentDialog/components/noticeDom.vue


File diff suppressed because it is too large
+ 0 - 359
src/components/lookDocumentDialog/components/rectificationReportDom.vue


+ 0 - 179
src/components/lookDocumentDialog/lookDocumentDataDialog.vue

@@ -1,179 +0,0 @@
-<!--
-    查看单个文档
-    <lookDocumentDataDialog v-if="lookDocumentType" :propsLookDocumentData="propsLookDocumentData"></lookDocumentDataDialog>
-
-    import lookDocumentDataDialog from '@/components/lookDocumentDialog/lookDocumentDataDialog.vue'
-
-    components: {
-      lookDocumentDataDialog
-    },
-
-    data(){
-      return{
-        //子组件数据
-        lookDocumentType:false,
-        propsLookDocumentData:{},
-      }
-    }
-
-    //查看单个文档
-    lookDocumentButton(type,row){
-      if(type==1){
-        this.$set(this,'propsLookDocumentData',{
-          title:"整改报告",
-          type:1,
-          id:row.id,
-          name:row.title
-        });
-        this.$set(this,'lookDocumentType',true);
-      }else{
-        this.$set(this,'lookDocumentType',false);
-      }
-    },
--->
-<template>
-  <el-dialog class="lookDocumentDataDialog" :title="lookDocumentTitle"
-             :class="fullScreenType?'lookDocumentDataDialog-fullScreen':''"
-             :visible.sync="lookDocumentType" v-if="lookDocumentType"
-             @close="outLook"
-             width="834px" height="645px" append-to-body>
-    <div class="lookDocumentDataDialog-page scrollbar-box">
-      <rectificationReportDom v-if="documentType == 1" :propsRectificationReportData="propsRectificationReportData"></rectificationReportDom>
-      <noticeDom v-if="documentType == 2" :propsNoticeDomData="propsNoticeDomData"></noticeDom>
-      <informDom v-if="documentType == 3" :propsInformDomData="propsInformDomData"></informDom>
-    </div>
-    <p class="positionButton" @click="fullScreenButton">{{fullScreenType?'退出':'全屏'}}</p>
-    <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="outLook">取消</p>
-      <p class="dialog-footer-button-primary" @click="downloadButton">下载</p>
-      <p class="dialog-footer-button-null"></p>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-  import rectificationReportDom from './components/rectificationReportDom.vue'
-  import noticeDom from './components/noticeDom.vue'
-  import informDom from './components/informDom.vue'
-  export default {
-    name: 'lookDocumentDataDialog',
-    props:{
-      propsLookDocumentData:{},
-    },
-    components: {
-      rectificationReportDom,
-      noticeDom,
-      informDom
-    },
-    data(){
-      return{
-        //全屏状态
-        fullScreenType:false,
-        lookDocumentType:true,
-        lookDocumentTitle:"",
-        lookDocumentSrc:"",
-        documentType:null,//1.整改报告 2.通知书 3.告知书,
-        //整改报告
-        propsRectificationReportData:{},
-        //通知书
-        propsNoticeDomData:{},
-        //告知书
-        propsInformDomData:{},
-      }
-    },
-    created(){
-      this.$set(this,'lookDocumentTitle',this.propsLookDocumentData.title);
-      if(this.propsLookDocumentData.type == 1){
-        this.$set(this.propsRectificationReportData,'id',this.propsLookDocumentData.id)
-        this.$set(this,'documentType',1)
-      }else if(this.propsLookDocumentData.type == 2){
-        this.$set(this.propsNoticeDomData,'id',this.propsLookDocumentData.id)
-        this.$set(this,'documentType',2)
-      }else if(this.propsLookDocumentData.type == 3){
-        this.$set(this.propsInformDomData,'id',this.propsLookDocumentData.id)
-        this.$set(this,'documentType',3)
-      }
-    },
-    mounted(){
-
-    },
-    methods:{
-      // 返回按钮
-      outLook(){
-        this.$parent.lookDocumentButton(2)
-      },
-      // 下载按钮
-      downloadButton(){
-        if(this.documentType == 1){
-          this.downloadGet('/zd-security/checkRectify/genReport?id='+this.propsLookDocumentData.id+'&fileUrl='+localStorage.getItem('fileBrowseEnvironment'),this.propsLookDocumentData.name+'(整改报告).docx');
-        }else if(this.documentType == 2){
-          this.downloadGet('/zd-security/checkManage/getRectifyAdviceNote?checkMangeId='+this.propsLookDocumentData.id+'&fileUrl='+localStorage.getItem('fileBrowseEnvironment'),this.propsLookDocumentData.name+'(整改通知书).docx');
-        }else if(this.documentType == 3){
-          this.downloadGet('/zd-security/checkManage/getRectifyNotification?checkMangeId='+this.propsLookDocumentData.id+'&fileUrl='+localStorage.getItem('fileBrowseEnvironment'),this.propsLookDocumentData.name+'(整改告知书).docx');
-        }
-      },
-      fullScreenButton(){
-        this.fullScreenType = !this.fullScreenType
-      },
-      //打开新窗口
-      goPage(){
-        window.open(this.lookDocumentSrc)
-      },
-    }
-  }
-</script>
-
-<style scoped lang="scss">
-  .lookDocumentDataDialog{
-    .lookDocumentDataDialog-page{
-      display: flex;
-      flex-direction: column;
-      flex:1;
-      height:645px;
-      position: relative;
-    }
-    .positionButton{
-      position: absolute;
-      top:15px;
-      right: 15px;
-      border:1px solid #0183fa;
-      border-radius:4px;
-      line-height:30px;
-      width:60px;
-      text-align: center;
-      cursor: pointer;
-      color:#0183fa;
-      background-color: #fff;
-    }
-    .positionButton:hover{
-      background-color:#0183fa;
-      color:#fff;
-    }
-  }
-  .lookDocumentDataDialog-fullScreen{
-    background-color: #666;
-    .positionButton{
-      top:25px;
-      right: 15px;
-    }
-    ::v-deep .el-dialog{
-      width:100% !important;
-      height:100% !important;
-      box-shadow: none;
-    }
-    ::v-deep .el-dialog__header{
-      display: none;
-    }
-    ::v-deep .el-dialog__body{
-      height:100% !important;
-      background-color: #666;
-      .lookDocumentDataDialog-page{
-        height:100%;
-      }
-    }
-    ::v-deep .el-dialog__footer{
-      display: none;
-    }
-  }
-</style>

+ 0 - 317
src/components/lookDocumentDialog/lookDocumentListDialog.vue

@@ -1,317 +0,0 @@
-<!--
-    查看多个文档
-
-    import lookDocumentListDialog from '@/components/lookDocumentDialog/lookDocumentListDialog.vue'
-
-    components: {
-      lookDocumentListDialog
-    },
-
-    <lookDocumentListDialog v-if="lookDocumentListType" :propsLookDocumentListData="propsLookDocumentListData"></lookDocumentListDialog>
-
-      //查看多个文档
-      lookDocumentListButton(type){
-        if(type==1){
-          this.$set(this,'propsLookDocumentListData',{
-            title:"查看附件",
-            list:this.addForm.data7
-          });
-          this.$set(this,'lookDocumentListType',true);
-        }else{
-          this.$set(this,'lookDocumentListType',false);
-        }
-      },
--->
-<template>
-  <el-dialog class="lookDocumentListDialog" :title="lookDocumentListTitle"
-             :visible.sync="lookDocumentListType" v-if="lookDocumentListType"
-             @close="outLook"
-             width="1500px" height="700" append-to-body>
-    <div class="lookDocumentListDialog-page">
-      <div class="left-box">
-        <div class="left-title-box">
-          <img src="@/assets/ZDimages/safetyCheck/icon_dr_wj.png">
-          <p>材料附件</p>
-          <p class="button-p" @click="allDownloadButton">全部下载</p>
-        </div>
-        <div class="left-for-box scrollbar-box">
-          <p class="left-for-p" v-for="(iframeItem,iframeIndex) in lookDocumentList" :key="iframeIndex"
-             @click="lookDocumentListCheck(iframeIndex)"
-             :class="lookDocumentListIndex == iframeIndex?'check-p':''">{{iframeItem.name}}</p>
-        </div>
-      </div>
-      <div class="center-border"></div>
-      <div class="right-box">
-        <vue-office-docx
-          style="width:1030px;"
-          v-if="officeType === 'docx'&&!officeNullType"
-          :src="lookUrl"
-          @rendered="renderedHandler"
-          @error="errorHandler"
-        />
-        <vue-office-excel
-          style="width:1030px;"
-          v-if="officeType === 'excel'&&!officeNullType"
-          :src="lookUrl"
-          @rendered="renderedHandler"
-          @error="errorHandler"
-        />
-        <vue-office-pdf
-          style="width:1030px;"
-          v-if="officeType === 'pdf'&&!officeNullType"
-          :src="lookUrl"
-          @rendered="renderedHandler"
-          @error="errorHandler"
-        />
-        <p v-if="officeNullType" class="office-null-text">加载失败...</p>
-      </div>
-    </div>
-    <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="outLook">取消</p>
-      <p class="dialog-footer-button-primary" @click="downloadButton">下载</p>
-      <p class="dialog-footer-button-null"></p>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-  //引入VueOfficeDocx组件
-  import VueOfficeDocx from '@vue-office/docx'
-  import '@vue-office/docx/lib/index.css'
-  //引入VueOfficeExcel组件
-  import VueOfficeExcel from '@vue-office/excel'
-  import '@vue-office/excel/lib/index.css'
-  //引入VueOfficePdf组件
-  import VueOfficePdf from '@vue-office/pdf'
-  import axios from 'axios'
-  import saveAs from 'file-saver'
-  import JSZip from 'jszip'
-  export default {
-    name: 'lookDocumentListDialog',
-    props:{
-      propsLookDocumentListData:{},
-    },
-    components: {
-      VueOfficeDocx,
-      VueOfficeExcel,
-      VueOfficePdf
-    },
-    data(){
-      return{
-        lookDocumentListType:true,
-        lookDocumentListTitle:"",
-        lookDocumentList:[],
-        lookDocumentSrc:"",
-        lookDocumentListIndex:0,
-        //文档类型
-        officeType:null,
-        //开关
-        officeNullType:true,
-        //文档地址
-        lookUrl:"",
-        fileBrowseEnvironment:localStorage.getItem('fileBrowseEnvironment'),
-      }
-    },
-    created(){
-      this.$set(this,'lookDocumentListTitle',this.propsLookDocumentListData.title);
-      this.$set(this,'lookDocumentList',this.propsLookDocumentListData.list);
-      this.lookDocumentListCheck(0);
-    },
-    mounted(){
-
-    },
-    methods:{
-      //全部下载
-      allDownloadButton(){
-        // 初始化一个zip打包对象
-        let zip = new JSZip()
-        var promises = [];
-        this.lookDocumentList.forEach(item => {
-          const promise = this.getFile(item.url).then(data => {
-            console.log(data)
-            zip.file(item.name, data, { binary: true });
-          });
-          promises.push(promise);
-        });
-        Promise.all(promises).then(() => {
-          zip.generateAsync({ type: "blob" }).then(content => {
-            // 生成二进制流
-            saveAs(content, '材料附件.zip')
-            this.msgSuccess('操作成功')
-          });
-        });
-      },
-      getFile(url){
-        return new Promise((resolve, reject) => {
-          axios({
-            method: "get",
-            url:this.fileBrowseEnvironment+url,
-            responseType: "blob"
-          })
-            .then(data => {
-              resolve(data.data);
-            })
-            .catch(error => {
-              reject(error.toString());
-            });
-        });
-      },
-      // 切换按钮
-      lookDocumentListCheck(val){
-        let type = '';
-        if(this.lookDocumentList[val].url.split('.')[1] == 'docx'){
-          type = 'docx'
-        }else if(this.lookDocumentList[val].url.split('.')[1] == 'xlsx'){
-          type = 'excel'
-        }else if(this.lookDocumentList[val].url.split('.')[1] == 'pdf'){
-          type = 'pdf'
-        }
-        let url = this.fileBrowseEnvironment + this.lookDocumentList[val].url;
-        this.$set(this,'lookUrl',url);
-        this.$set(this,'lookDocumentListIndex',val);
-        this.$set(this,'officeType',type);
-        this.$set(this,'officeNullType',false);
-      },
-      // 返回按钮
-      outLook(){
-        this.$parent.lookDocumentListButton(2)
-      },
-      // 下载按钮
-      downloadButton(){
-        let name = this.lookDocumentList[this.lookDocumentListIndex].name.split('.')[0];
-        let type = this.lookDocumentList[this.lookDocumentListIndex].name.split('.')[1];
-        let url = this.fileBrowseEnvironment + this.lookDocumentList[this.lookDocumentListIndex].url;
-        const oReq = new XMLHttpRequest()
-        oReq.open('GET', url, true)// URL 为下载的URL地址
-        oReq.responseType = 'blob'
-        oReq.onload = function() {
-          const file = new Blob([oReq.response], {
-            type: 'blob'
-          })
-          saveAs(file, name+'.'+type) // fileName为文件名
-        }
-        oReq.send()
-      },
-      //文件加载成功
-      renderedHandler() {
-        console.log("渲染完成")
-        this.$set(this,'officeNullType',false);
-      },
-      //文件加载失败
-      errorHandler() {
-        console.log("渲染失败")
-        this.$set(this,'officeNullType',true);
-      },
-    }
-  }
-</script>
-
-<style scoped lang="scss">
-  .lookDocumentListDialog{
-    .lookDocumentListDialog-page{
-      display: flex;
-      flex:1;
-      height:645px;
-      overflow: hidden;
-      padding:0 50px;
-      .left-box{
-        display: flex;
-        flex-direction: column;
-        overflow: hidden;
-        width:265px;
-        .left-title-box{
-          padding-bottom:20px;
-          display: flex;
-          width:230px;
-          border-bottom:1px dashed #D8D8D8;
-          img{
-            width:16px;
-            height:13px;
-            margin:13px 15px 13px 0;
-          }
-          p:nth-child(2){
-            flex:1;
-            line-height:40px;
-            font-size:16px;
-            color:#0183FA;
-          }
-          .button-p{
-            padding:0 10px;
-            margin-top:5px;
-            height:30px;
-            line-height:30px;
-            font-size:14px;
-            color:#0183FA;
-            border:1px solid #0183FA;
-            border-radius:4px;
-            cursor: pointer;
-          }
-          .button-p:hover{
-            color:#fff;
-            border:1px solid #0183FA;
-            background-color: #0183FA;
-          }
-        }
-        .left-for-box{
-          flex:1;
-          .left-for-p{
-            padding:0 10px;
-            width:230px;
-            line-height:40px;
-            margin-top:10px;
-            font-size:16px;
-            color:#333;
-            display:block;
-            overflow:hidden;
-            text-overflow:ellipsis;
-            white-space:nowrap;
-            cursor: pointer;
-          }
-          .check-p{
-            background-color:rgba(1,131,250,0.2);
-            color:#0183FA;
-          }
-        }
-      }
-      .center-border{
-        border-right:1px dashed #D8D8D8;
-      }
-      .right-box{
-        flex:1;
-        display: flex;
-        margin-left:57px;
-        position: relative;
-        .positionButton{
-          position: absolute;
-          top:15px;
-          right: 35px;
-          border:1px solid #0183fa;
-          border-radius:4px;
-          line-height:30px;
-          width:60px;
-          text-align: center;
-          cursor: pointer;
-          color:#0183fa;
-          background-color: #fff;
-        }
-        .iframe{
-          flex:1;
-        }
-      }
-      .out-button{
-        width:60px;
-        line-height:30px;
-        color:#999;
-        background-color: #dedede;
-        border-radius:4px;
-        text-align: center;
-        cursor: pointer;
-        position: absolute;
-        top:17px;
-        right:17px;
-        z-index:99999;
-      }
-    }
-  }
-</style>

+ 13 - 0
src/store/modules/user.js

@@ -114,7 +114,20 @@ const user = {
             commit('SET_NAME', user.userName)
             commit('SET_AVATAR', avatar)
             localStorage.setItem('userId',user.userId);
+            localStorage.setItem('deptId',user.deptId);
+            localStorage.setItem('deptName',user.deptName);
             localStorage.setItem('user',JSON.stringify(user));
+            //判定校院级管理员身份
+            if(user.postCode == 'school_level_admin'){
+              //校级管理员
+              localStorage.setItem('adminIdentity','school');
+            }else if(user.postCode == 'college_admin'){
+              //院级管理员
+              localStorage.setItem('adminIdentity','college');
+            }else{
+              //非管理员身份
+              localStorage.removeItem('adminIdentity');
+            }
             commit('SET_ROLES', ['placeholder'])
             if(res.data.data[0] == "*:*:*"){
               commit('SET_PERMISSIONS', res.data.data)

+ 21 - 0
src/utils/request.js

@@ -81,6 +81,18 @@ service.interceptors.response.use(res => {
       router.replace({
         path: '/403'
       })
+    }else if(code == 429){
+      if(!messageData){
+        messageData = Message({
+          message: '服务器繁忙,请稍后重试',
+          type: 'error',
+          offset:100
+        })
+        setTimeout(function(){
+          messageData = null
+        },1000);
+      }
+      return Promise.reject(new Error(msg))
     } else if (code === 500) {
       if(!messageData){
         messageData = Message({
@@ -162,6 +174,15 @@ service.interceptors.response.use(res => {
             return
           }).catch(() => {});
         }
+      }else if(message.substr(message.length - 3) == 429){
+        messageData = Message({
+          message: '服务器繁忙,请稍后重试',
+          type: 'error',
+          offset:100
+        })
+        setTimeout(function(){
+          messageData = null
+        },1000);
       }else{
         messageData = Message({
           message: message,

+ 2 - 2
src/views/basicsModules/login.vue

@@ -399,7 +399,7 @@ export default {
               this.getExploitConfig();
               this.getHomeConfig();
               // localStorage.setItem('initPage',res.data.skipHomePage);
-              if(res.data.reset_password){
+              if(res.data.isInitPasswd){
                 this.$confirm('账号当前登录密码为默认密码,是否现在修改?', "提示", {
                   confirmButtonText: "确定",
                   cancelButtonText: "取消",
@@ -469,7 +469,7 @@ export default {
                 this.getExploitConfig();
                 this.getHomeConfig();
                 // localStorage.setItem('initPage',res.data.skipHomePage);
-                if(res.data.reset_password){
+                if(res.data.isInitPasswd){
                   this.$confirm('账号当前登录密码为默认密码,是否现在修改?', "提示", {
                     confirmButtonText: "确定",
                     cancelButtonText: "取消",

+ 1 - 1
src/views/basicsModules/mine.vue

@@ -61,7 +61,7 @@
             <p :class="buttonType == '1'?'bottomColor':''">基本资料</p>
             <p :class="buttonType == '1'?'bottomBack':''"></p>
           </div>
-          <div class="title-button-min-box" @click="buttonTypeClick(2)" v-if="user.userType === 0">
+          <div class="title-button-min-box" @click="buttonTypeClick(2)">
             <p :class="buttonType == '2'?'bottomColor':''">安全设置</p>
             <p :class="buttonType == '2'?'bottomBack':''"></p>
           </div>

+ 1 - 9
src/views/basicsModules/ssoLogin.vue

@@ -65,15 +65,7 @@
           });
         }
       } else {
-        this.$alert('参数异常!', '提示', {
-          confirmButtonText: '确定',
-          callback: action => {
-            localStorage.removeItem('serviceType');
-            store.dispatch('LogOut').then(() => {
-              window.location.href = process.env.VUE_APP_OUT_URL;
-            })
-          }
-        });
+        window.location.href = process.env.VUE_APP_OUT_URL;
       }
       localStorage.setItem('windowHref', window.location.href)
     },

+ 63 - 24
src/views/chemicalManage/basicManagement/chemicalsCabinetManage/addPage.vue

@@ -13,26 +13,48 @@
             <el-input v-model="newData.cabinetName" placeholder="请输入化学品柜名称" maxLength="20" style="width:500px;"></el-input>
           </el-form-item>
           <el-form-item label="学院:" prop="deptId">
-            <el-select v-model="newData.deptId" @change="deptChange" placeholder="请选择所属学院" style="width: 500px">
+            <el-select
+              v-model="newData.deptId"
+              filterable
+              remote
+              clearable
+              reserve-keyword
+              @change="(val)=>deptChange()"
+              @clear="deptClearClick"
+              placeholder="请选择所属学院"
+              style="width: 500px"
+              :remote-method="(val)=>deptSelect(val)">
               <el-option
                 v-for="item in deptOptions"
                 :key="item.deptId"
                 :label="item.deptName"
-                :value="item.deptId"
-              />
+                :value="item.deptId">
+              </el-option>
             </el-select>
+
           </el-form-item>
         </div>
         <div class="form-max-box">
           <el-form-item label="实验室:" prop="subId">
-            <el-select v-model="newData.subId" @change="subChange" placeholder="请选择实验室" style="width: 500px">
+            <el-select
+              v-model="newData.subId"
+              filterable
+              remote
+              clearable
+              reserve-keyword
+              @change="(val)=>subChange(val)"
+              @clear="subClearClick"
+              placeholder="请选择实验室"
+              style="width: 500px"
+              :remote-method="(val)=>subSelect(val)">
               <el-option
                 v-for="item in subOptions"
                 :key="item.subId"
                 :label="item.subName"
-                :value="item.subId"
-              />
+                :value="item.subId">
+              </el-option>
             </el-select>
+
           </el-form-item>
           <!--<el-form-item label="摄像头:" prop="cameraId">-->
             <!--<el-select v-model="newData.cameraId" placeholder="请选择摄像头" style="width: 500px">-->
@@ -173,7 +195,11 @@
 
 <script>
   import { getDeptDropList, systemUserSelect,iotDeviceFindByType } from '@/api/commonality/permission'
-  import { laboratorySubRelInfoGetRelList } from '@/api/commonality/noPermission'
+  import {
+    laboratorySubRelInfoGetRelList,
+    laboratorySubRelInfoList,
+    systemSubjectGetList
+  } from '@/api/commonality/noPermission'
   import {
     chemicalCabinetAdd, chemicalCabinetGetLockList,
     chemicalCabinetUpdate,
@@ -312,8 +338,7 @@
     mounted(){
       let self=this;
       this.initialize();
-      this.getDeptDropList();
-
+      this.deptSelect('')
 
     },
     methods:{
@@ -471,12 +496,7 @@
           }
         });
       },
-      //查询学院列表
-      getDeptDropList(){
-        getDeptDropList({deptName:"",level:2,deptType:1}).then(response => {
-          this.$set(this, 'deptOptions', response.data)
-        });
-      },
+
       //学院选中
       deptChange(){
         this.$set(this.newData,'subId','');
@@ -495,19 +515,25 @@
             this.$set(this.newData, 'deptName', this.deptOptions[i].deptName)
           }
         }
-        this.laboratorySubRelInfoGetRelList(this.newData.deptId,'');
+        this.subSelect('');
+      },
+      //学院清空触发
+      deptClearClick(){
       },
-      //根据学院id查询实验室列表
-      laboratorySubRelInfoGetRelList(deptId,subId){
+      //学院查询
+      deptSelect(query){
         let obj = {
-          deptId:deptId,
-          subId:subId,
-          subName:'',
+          level:'2',
+          deptType:'1',
+          deptName:query,
         }
-        laboratorySubRelInfoGetRelList(obj).then(response => {
-          this.subOptions = response.data;
+        getDeptDropList(obj).then(response => {
+          this.$set(this, 'deptOptions', response.data)
         });
       },
+
+
+
       //实验室选中
       subChange(val){
         let list = [];
@@ -557,6 +583,20 @@
         })
         this.iotDeviceFindByType(this.newData.subId);
       },
+      //实验室清空触发
+      subClearClick(){
+      },
+      //实验室查询
+      subSelect(query){
+        let obj = {
+          deptId:this.newData.deptId,
+          subId:'',
+          searchValue:query,
+        }
+        laboratorySubRelInfoGetRelList(obj).then(response => {
+          this.subOptions = response.data;
+        });
+      },
       //人员选中触发
       userSelectClick(val,index){
         let self = this;
@@ -670,7 +710,6 @@
       },
       //删除柜门
       deleteItemButton(index,item){
-        console.log(item)
         let self=this;
         if(this.newData.cabinetDoorModelList.length ==1){
           this.msgError('最少添加1个柜门')

+ 1 - 1
src/views/chemicalManage/inventoryManagement/inventoryStatistics/infoPage.vue

@@ -8,7 +8,7 @@
       <div class="content-box-left scrollbar-box">
         <li class="chemical-name">{{newData.stock.chemicalName}}<p class="chemical-state">{{newData.stock.statusStr}}</p></li>
         <li>{{newData.stock.chemicalShape==1?'固体':'液体'}}/{{newData.stock.chemicalPurity}}/{{newData.stock.casNum}}</li>
-        <li>类别:{{newData.stock.chemicalCategoryName}}<p class="control-state">{{newData.stock.chemicalLevel?'管控':'非管控'}}</p></li>
+        <li>类别:{{newData.stock.chemicalCategoryName}}<p class="control-state">{{newData.stock.chemicalLevel == 1?'管控':'非管控'}}</p></li>
         <li>编码:{{newData.stock.tagCode}}</li>
         <li>RFID标签:{{newData.stock.rfidCode}}</li>
         <li>规格:{{newData.stock.specNum}}{{newData.stock.specUnit}}/{{newData.stock.packUnit}}</li>

+ 1 - 1
src/views/chemicalManage/useLedger/index.vue

@@ -193,7 +193,7 @@
         //楼栋楼层
         buildFloorOptions:[],
         //级别
-        levelOptions:[{value:1,label:'管控'},{value:0,label:'非管控'}],
+        levelOptions:[{value:1,label:'管控'},{value:2,label:'非管控'}],
         //类别
         categoryOptions:[],
         cabinetOptions:[],

+ 24 - 5
src/views/emergencyManagement/performEvacuation/performEvacuationHome.vue

@@ -1451,14 +1451,33 @@
             }
           }
           .content-select-box{
-            width:158px;
-            position: relative;
+            width:128px;
+            height: 534px;
+            margin-right:30px;
+            display: flex;
+            overflow: hidden;
+            .for-select-box::-webkit-scrollbar{
+              width: 6px!important;     /*高宽分别对应横竖滚动条的尺寸*/
+              height: 6px!important;
+            }
+            .for-select-box::-webkit-scrollbar-thumb{
+              border-radius: 5px!important;
+              -webkit-box-shadow: inset 0 0 5px #116e8e!important;
+              background: #116e8e!important;
+            }
+            .for-select-box::-webkit-scrollbar-track{
+              -webkit-box-shadow: inset 0 0 5px rgba(255,255,255,0)!important;
+              border-radius: 0!important;
+              background: rgba(255,255,255,0)!important;
+            }
             .for-select-box{
-              position: absolute;
-              bottom:31px;
-              left:59px;
+              flex:1;
+              margin: 0 0 51px 29px;
+              padding-right:30px;
               display: flex;
               flex-direction: column-reverse;
+              align-items: flex-end;
+              overflow-y: scroll;
               .for-select-p:nth-child(1){
                 border-bottom:1px solid #19667e;
                 border-bottom-left-radius:4px;

+ 0 - 448
src/views/hierarchicalControl/conditionsSettings/addPage.vue

@@ -1,448 +0,0 @@
-<template>
-  <div class="page-container conditionsSettings-addPage">
-    <div class="page-top-title-box">
-      <p class="page-top-title-name-p">{{newData.id?'编辑':'新增'}}</p>
-      <p class="page-top-title-out-p" @click="backPage">返回</p>
-      <p class="page-top-title-add-p" @click="submitForm">提交</p>
-    </div>
-    <div class="content-box scrollbar-box">
-      <el-form class="add-form-box" :model="newData" ref="form" :rules="rules" label-width="110px">
-        <div style="margin-top:20px;">
-          <el-form-item label="管控名称" prop="name">
-            <el-input v-model="newData.name" placeholder="请输入管控名称" maxLength="20" style="width:260px;"></el-input>
-          </el-form-item>
-          <el-form-item label="二级单位" prop="deptId">
-            <el-select v-model="newData.deptId" placeholder="请选择二级单位" style="width: 260px">
-              <el-option
-                v-for="dict in deptOptions"
-                :key="dict.deptId"
-                :label="dict.deptName"
-                :value="dict.deptId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-        </div>
-        <div>
-          <el-form-item label="安全分类" prop="typeId">
-            <el-select v-model="newData.typeId" placeholder="请选择安全分类" style="width: 260px">
-              <el-option
-                v-for="dict in typeList"
-                :key="dict.typeId"
-                :label="dict.typeName"
-                :value="dict.typeId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="安全分级" prop="levelId">
-            <el-select v-model="newData.levelId" placeholder="请选择安全分级" style="width: 260px">
-              <el-option
-                v-for="dict in levelList"
-                :key="dict.levelId"
-                :label="dict.levelName"
-                :value="dict.levelId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-        </div>
-        <div>
-          <el-form-item label="执行周期" prop="way">
-            <el-select v-model="newData.way" placeholder="请选择执行周期" style="width: 260px">
-              <el-option
-                v-for="dict in cycleOptions"
-                :key="dict.key"
-                :label="dict.value"
-                :value="dict.key"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="执行方式" prop="cycle">
-            <el-select v-model="newData.cycle" placeholder="请选择执行方式" style="width: 260px">
-              <el-option
-                v-for="dict in wayOptions"
-                :key="dict.key"
-                :label="dict.value"
-                :value="dict.key"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-        </div>
-        <div>
-          <el-form-item label="执行人员" prop="executionUserId">
-            <el-select
-              style="width:260px;"
-              v-model="newData.executionUserId"
-              filterable
-              remote
-              clearable
-              reserve-keyword
-              @change="userChange"
-              placeholder="请输入姓名/工号/手机号"
-              :remote-method="userSelectList">
-              <el-option
-                v-for="item in optionsUser"
-                :key="item.userId"
-                :label="item.userName"
-                :value="item.userId">
-              </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="截止日期" prop="deadline">
-            <el-date-picker
-              style="width:260px;"
-              value-format="yyyy-MM-dd"
-              v-model="newData.deadline"
-              type="date"
-              placeholder="选择日期">
-            </el-date-picker>
-          </el-form-item>
-        </div>
-        <div>
-          <el-form-item label="实验室" prop="subId">
-            <el-select
-              style="width:260px;"
-              v-model="newData.subId"
-              filterable
-              remote
-              clearable
-              reserve-keyword
-              @change="selectChange"
-              @clear="selectClear"
-              placeholder="请选择实验地点"
-              :remote-method="subjectList">
-              <el-option
-                v-for="item in laboratoryOptions"
-                :key="item.subId"
-                :label="item.subName"
-                :value="item.subId">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </div>
-        <el-form-item label="管控描述" prop="manageDes">
-          <el-input type="textarea" resize="none" style="width:630px;" show-word-limit
-                    :rows="4"
-                    v-model="newData.manageDes" placeholder="请输入管控描述" maxlength="100"/>
-        </el-form-item>
-        <!--<el-form-item label="执行人员" prop="userList">-->
-        <!--<div class="max-big-user-box" style="width:1400px;">-->
-        <!--<div class="for-user-box" style="display: inline-block;border:1px solid #0045AF;border-radius:4px;padding:0 10px;margin:5px 20px 5px 0;"-->
-        <!--v-for="(item,index) in newData.userList" :key="index">-->
-        <!--<div class="for-user-min-box" style="display: flex;">-->
-        <!--<p class="user-name-p" style="width:200px;line-height:30px;font-size:14px;color:#0045AF;">{{item.userName}}</p>-->
-        <!--<p class="user-del-button el-icon-error"  style="cursor: pointer;line-height:30px;color:#999;" @click="delUser(index)"></p>-->
-        <!--</div>-->
-        <!--</div>-->
-        <!--</div>-->
-        <!--<p class="add-button-p" style="margin:5px 0 0 0;cursor: pointer;text-align: center;font-size:14px;border-radius:4px;width:140px;line-height:30px;color:#0183FA;border:1px solid #0183FA;" @click="shadeOpen" v-if="!newData.userList[9]">添加人员</p>-->
-        <!--</el-form-item>-->
-      </el-form>
-    </div>
-    <el-dialog class="conditionsSettings-dialog" title='添加人员' width="460px" append-to-body
-               :visible.sync="shadeType" v-if="shadeType" @close="dialogOff()"
-               :close-on-click-modal="false" :close-on-press-escape="false">
-      <div>
-        <el-form :model="shadeForm" ref="shadeForm" :inline="true" :rules="shadeRules">
-          <el-form-item label="人员查询" prop="userId" class="form-item" label-width="90px">
-            <el-select
-              style="width:300px;"
-              v-model="shadeForm.userId"
-              filterable
-              remote
-              clearable
-              reserve-keyword
-              @change="userChange"
-              placeholder="请输入姓名/工号/手机号"
-              :remote-method="userSelectList">
-              <el-option
-                v-for="item in optionsUser"
-                :key="item.userId"
-                :label="item.userName"
-                :value="item.userId">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-form>
-      </div>
-      <div slot="footer" class="dialog-footer dialog-footer-box">
-        <p class="dialog-footer-button-null"></p>
-        <p class="dialog-footer-button-info" @click="shadeOut()">取消</p>
-        <p class="dialog-footer-button-primary" @click="shadeUp">提交</p>
-        <p class="dialog-footer-button-null"></p>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-  import {
-    getDeptDropList,
-    laboratoryClassTypeGetList,
-    laboratoryClassLevelGetList,
-    systemUserSelect,
-    subjectList
-  } from '@/api/commonality/permission'
-  import { laboratoryGradeManageAdd,laboratoryGradeManageUpdate } from "@/api/hierarchicalControl/index";
-  export default {
-    name: 'addPage',
-    props: {
-      propsData: {}
-    },
-    data() {
-      return {
-        newData: {
-          name: '',
-          manageDes: '',
-          deptId: '',
-          typeId: '',
-          levelId: '',
-          executionUserId: '',
-          subId:'',
-          subName:'',
-          deadline:'',
-        },
-        //下拉列表数据
-        deptOptions: [],
-        typeList: [],
-        levelList: [],
-        way:'',
-        cycle:'',
-        wayOptions: [{value:'单人执行',key:'1'},{value:'执行多人',key:'2'}],
-        cycleOptions: [{value:'一天',key:'1'},{value:'一周',key:'2'},{value:'一月',key:'3'},{value:'季度',key:'4'},{value:'半年',key:'5'},{value:'一年',key:'6'},],
-        rules: {
-          name: [
-            { required: true, message: '请输入管控名称', trigger: 'blur' },
-            { required: true, message: '请输入管控名称', validator: this.spaceJudgment, trigger: 'blur' }
-          ],
-          manageDes: [
-            { required: true, message: '请输入管控描述', trigger: 'blur' },
-            { required: true, message: '请输入管控描述', validator: this.spaceJudgment, trigger: 'blur' }
-          ],
-          deptId: [
-            { required: true, message: '请选择二级单位', trigger: 'blur' }
-          ],
-          typeId: [
-            { required: true, message: '请选择安全分类', trigger: 'blur' }
-          ],
-          way: [
-            { required: true, message: '请选择执行周期', trigger: 'blur' }
-          ],
-          cycle: [
-            { required: true, message: '请选择执行方式', trigger: 'blur' }
-          ],
-          levelId: [
-            { required: true, message: '请选择安全分级', trigger: 'blur' }
-          ],
-          deadline: [
-            { required: true, message: '请选择截止日期', trigger: 'blur' }
-          ],
-          executionUserId: [
-            { required: true, message: '请选择执行人员', trigger: 'blur' }
-          ]
-        },
-        shadeRules: {
-          userId: [
-            { required: true, message: '请选择人员', trigger: 'blur' }
-          ]
-        },
-        shadeType: false,
-        // 人员查询列表
-        userName: '',
-        userId: '',
-        optionsUser: [],
-        shadeForm: {},
-        laboratoryOptions:[],
-      }
-    },
-    created() {
-      this.getDeptDropList()
-      this.laboratoryClassTypeGetList()
-      this.laboratoryClassLevelGetList()
-    },
-    mounted() {
-      if(this.propsData.id){
-        this.$set(this,'newData',this.propsData);
-        this.$set(this,'optionsUser',[{
-          userId:this.propsData.executionUserId,
-          userName:this.propsData.executionUser,
-        }]);
-        this.$set(this,'laboratoryOptions',[{
-          subId:this.propsData.subId,
-          subName:this.propsData.subName,
-        }]);
-        this.$set(this.newData,'way',"1");
-        this.$set(this.newData,'cycle',"1");
-      }
-    },
-    methods: {
-      //懒加载实验室
-      subjectList(e){
-        subjectList({subName:e}).then(response => {
-          this.laboratoryOptions = response.data;
-        });
-      },
-      //实验室选择
-      selectChange(e){
-        let self = this;
-        for(let i=0;i<self.laboratoryOptions.length;i++){
-          if(self.laboratoryOptions[i].subId == e){
-            self.$set(self.newData,"subId",self.laboratoryOptions[i].subId);
-            self.$set(self.newData,"subName",self.laboratoryOptions[i].subName);
-          }
-        }
-      },
-      selectClear(){
-        this.$set(this.newData,"subId",'');
-        this.$set(this.newData,"subName",'');
-      },
-      // 返回按钮
-      backPage() {
-        this.$parent.tableButton(6)
-      },
-      /** 提交按钮 */
-      submitForm() {
-        let self = this;
-        this.$refs['form'].validate(valid => {
-          if (valid) {
-            let obj = {
-              name: this.newData.name, //管控名称
-              deptId: this.newData.deptId, //二级单位ID
-              typeId: this.newData.typeId, //分类ID
-              levelId: this.newData.levelId, //分级ID
-              executionUserId: this.newData.executionUserId, //执行人员ID
-              subId: this.newData.subId, //执行人员ID
-              subName: this.newData.subName, //执行人员ID
-              deadline: this.newData.deadline, //执行人员ID
-              manageDes: this.newData.manageDes //管控描述
-            }
-            this.deptOptions.forEach((item)=>{
-              if(item.deptId == self.newData.deptId){
-                obj.deptName = item.deptName
-              }
-            })
-            this.typeList.forEach((item)=>{
-              if(item.typeId == self.newData.typeId){
-                obj.typeName = item.typeName
-              }
-            })
-            this.levelList.forEach((item)=>{
-              if(item.levelId == self.newData.levelId){
-                obj.levelName = item.levelName
-              }
-            })
-            this.optionsUser.forEach((item)=>{
-              if(item.userId == self.newData.executionUserId){
-                obj.executionUser = item.userName
-              }
-            })
-            if(this.newData.id){
-              obj.id = this.newData.id;
-              laboratoryGradeManageUpdate(obj).then(response => {
-                this.msgSuccess(response.message)
-                this.backPage();
-              })
-            }else{
-              laboratoryGradeManageAdd(obj).then(response => {
-                this.msgSuccess(response.message)
-                this.backPage();
-              })
-            }
-          }
-        })
-      },
-      /** 查询二级单位列表 */
-      getDeptDropList() {
-        getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
-          this.$set(this, 'deptOptions', response.data)
-        })
-      },
-      //查询安全分级
-      laboratoryClassLevelGetList() {
-        laboratoryClassLevelGetList({}).then(response => {
-          this.$set(this, 'levelList', response.data)
-        })
-      },
-      //查询安全分类
-      laboratoryClassTypeGetList() {
-        laboratoryClassTypeGetList({}).then(response => {
-          this.$set(this, 'typeList', response.data)
-        })
-      },
-      //弹层开启
-      shadeOpen() {
-        this.$set(this, 'userName', '')
-        this.$set(this, 'userId', '')
-        this.$set(this.shadeForm, 'userId', '')
-        this.$set(this, 'optionsUser', [])
-        this.$set(this, 'shadeType', true)
-      },
-      //关闭弹层
-      shadeOut() {
-        this.$set(this, 'userName', '')
-        this.$set(this, 'userId', '')
-        this.$set(this.shadeForm, 'userId', '')
-        this.$set(this, 'optionsUser', [])
-        this.$set(this, 'shadeType', false)
-      },
-      //弹窗确定
-      shadeUp() {
-        let self = this
-        this.$refs['shadeForm'].validate(valid => {
-          if (valid) {
-            for (let i = 0; i < self.newData.userList.length; i++) {
-              if (self.newData.userList[i].userId == this.userId) {
-                this.msgError('人员已存在')
-                return
-              }
-            }
-            this.newData.userList.push({
-              userName: this.userName,
-              userId: this.userId
-            })
-            this.shadeOut()
-          }
-        })
-      },
-      //人员选择
-      userChange(val) {
-        let self = this
-        for (let i = 0; i < self.optionsUser.length; i++) {
-          if (self.optionsUser[i].userId == val) {
-            this.$set(this, 'userName', self.optionsUser[i].userName)
-            this.$set(this, 'userId', self.optionsUser[i].userId)
-          }
-        }
-      },
-      //查询
-      userSelectList(query) {
-        if (query !== '' && query.length > 1) {
-          systemUserSelect({
-            'searchValue': query,
-            'userType': ''
-          }).then(response => {
-            this.$set(this, 'optionsUser', response.data)
-          })
-        } else {
-          this.$set(this, 'optionsUser', [])
-        }
-      },
-      delUser(index) {
-        this.newData.userList.splice(index, 1)
-      }
-    }
-  }
-</script>
-
-<style scoped lang="scss">
-  .conditionsSettings-addPage {
-    .content-box {
-      flex: 1;
-      display: flex;
-      padding: 20px;
-      .add-form-box {
-        .el-form-item {
-          display: inline-block;
-        }
-      }
-    }
-  }
-</style>

+ 0 - 261
src/views/hierarchicalControl/conditionsSettings/index.vue

@@ -1,261 +0,0 @@
-<!-- 条件设置 -->
-<template>
-  <div class="app-container conditionsSettings">
-    <div class="page-container conditionsSettingsPage" v-if="pageType === 1">
-      <div class="page-form-title-box">
-        <el-form :model="queryParams" class="form-box" ref="queryForm"
-                 :inline="true" style="width:100%;">
-          <el-form-item label="" prop="name">
-            <el-input
-              maxLength="30"
-              v-model="queryParams.name"
-              placeholder="管控名称"
-              style="width: 200px"
-            />
-          </el-form-item>
-          <el-form-item label="" prop="deptId">
-            <el-select v-model="queryParams.deptId" placeholder="二级单位" style="width: 200px">
-              <el-option
-                v-for="dict in deptOptions"
-                :key="dict.deptId"
-                :label="dict.deptName"
-                :value="dict.deptId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="typeId">
-            <el-select v-model="queryParams.typeId" placeholder="安全分类" style="width: 200px">
-              <el-option
-                v-for="dict in typeList"
-                :key="dict.typeId"
-                :label="dict.typeName"
-                :value="dict.typeId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="levelId">
-            <el-select v-model="queryParams.levelId" placeholder="安全分级" style="width: 200px">
-              <el-option
-                v-for="dict in levelList"
-                :key="dict.levelId"
-                :label="dict.levelName"
-                :value="dict.levelId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
-          <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
-          <p class="page-add-common-style-button"
-             style="float: right;"
-             @click="tableButton(1)"
-          >新增</p>
-        </el-form>
-      </div>
-      <div class="page-content-box">
-        <el-table class="table-box" v-loading="loading" border :data="dataList">
-          <el-table-column label="管控名称" prop="name"  show-overflow-tooltip/>
-          <el-table-column label="二级单位" prop="deptName" width="160" show-overflow-tooltip/>
-          <el-table-column label="安全分类" prop="typeName" width="160" show-overflow-tooltip/>
-          <el-table-column label="安全分级" prop="levelName" width="160" show-overflow-tooltip/>
-          <el-table-column label="执行状态" prop="status" width="100" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <span :class="scope.row.status == 1?'colorA':'colorB'">{{scope.row.status == 1?'已执行':'未执行'}}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="创建人" prop="createUser" width="160" show-overflow-tooltip/>
-          <el-table-column label="实验室" prop="subName" width="160" show-overflow-tooltip>
-            <template slot-scope="scope">{{scope.row.subName?scope.row.subName:'--'}}</template>
-          </el-table-column>
-          <el-table-column label="创建时间" prop="createTime" width="150" 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="deadline" width="150" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <span>{{ scope.row.deadline?parseTime(scope.row.deadline,"{y}-{m}-{d}"):'--' }}</span>
-              <span style="margin-left:5px;color:red;" v-if="scope.row.deadlineNum&&deadlineNum>scope.row.deadlineNum">已逾期</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="操作" width="140" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <div class="table-button-box">
-                <p class="table-button-null"></p>
-                <p class="table-button-p"
-                   v-if="scope.row.status == 0"
-                   @click="tableButton(2,scope.row)"
-                >编辑</p>
-                <p class="table-button-p"
-                   v-if="scope.row.status == 0"
-                   @click="tableButton(3,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>
-    <add-page :propsData="propsData" v-if="pageType === 2"></add-page>
-  </div>
-</template>
-<script>
-  import {
-    getDeptDropList,
-    laboratoryClassTypeGetList,
-    laboratoryClassLevelGetList,
-  } from '@/api/commonality/permission'
-  import { laboratoryGradeManageList,laboratoryGradeManageDelete } from "@/api/hierarchicalControl/index";
-  import addPage from "./addPage.vue";
-  export default {
-    name: 'index',
-    components: {
-     addPage
-    },
-    data () {
-      return {
-        //页面状态
-        pageType:1,
-        //页面遮罩
-        loading:false,
-        //下拉列表数据
-        deptOptions:[],
-        typeList:[],
-        levelList:[],
-        //查询条件
-        queryParams:{
-          page:1,
-          pageSize:20,
-          name:"",
-          deptId :null,
-          typeId :null,
-          levelId :null,
-        },
-        //列表数据
-        dataList:[],
-        //数据数量
-        total:0,
-        //组件传参
-        propsData:{},
-        deadlineNum:null,
-      }
-    },
-    created () {
-
-    },
-    mounted () {
-      const now = new Date();
-      let yy = now.getFullYear()+'-'+now.getMonth()+'-'+now.getDate()
-      this.$set(this,'deadlineNum',new Date(yy).getTime());
-      this.getDeptDropList();
-      this.laboratoryClassTypeGetList();
-      this.laboratoryClassLevelGetList();
-      this.getList();
-    },
-    methods: {
-      //查询按钮
-      handleQuery(){
-        this.$set(this.queryParams,'page',1);
-        this.getList();
-      },
-      //重置按钮
-      resetQuery(){
-        this.$set(this,'dateRange',[])
-        this.$set(this,'queryParams',{
-          page:1,
-          pageSize:20,
-          name:"",
-          deptId :null,
-          typeId :null,
-          levelId :null,
-        });
-        this.getList();
-      },
-      //获取数据列表
-      getList(){
-        laboratoryGradeManageList(this.queryParams).then(response => {
-          //返回时间戳
-          for(let i=0;i<response.data.records.length;i++){
-            if(response.data.records[i].deadline){
-              response.data.records[i].deadlineNum = new Date(response.data.records[i].deadline).getTime()
-            }else{
-              response.data.records[i].deadlineNum = 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);
-          this.$set(this,'propsData',{});
-        }else if(type == 2){
-          //编辑
-          this.$set(this,'pageType',2);
-          let obj = JSON.parse(JSON.stringify(row))
-          obj.showType = false;
-          this.$set(this,'propsData',obj);
-        }else if(type == 3){
-          //删除
-          this.$confirm('是否确认删除?', "警告", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(function() {
-          }).then(() => {
-            laboratoryGradeManageDelete({manageId:row.id}).then(response => {
-              self.msgSuccess(response.message)
-              self.getList();
-            });
-          }).catch(() => {});
-        }else if(type == 6){
-          //返回并刷新
-          this.$set(this,'pageType',1);
-          this.getList();
-        }
-      },
-      /** 查询二级单位列表 */
-      getDeptDropList() {
-        getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
-          this.$set(this, 'deptOptions', response.data)
-        })
-      },
-      //查询安全分级
-      laboratoryClassLevelGetList() {
-        laboratoryClassLevelGetList({}).then(response => {
-          this.$set(this, 'levelList', response.data)
-        })
-      },
-      //查询安全分类
-      laboratoryClassTypeGetList() {
-        laboratoryClassTypeGetList({}).then(response => {
-          this.$set(this, 'typeList', response.data)
-        })
-      },
-    },
-  }
-</script>
-<style scoped lang="scss">
-  .conditionsSettings{
-    .conditionsSettingsPage{
-
-      .colorA{
-        color:#0183FA;
-      }
-      .colorB{
-        color: #c88400;
-      }
-    }
-  }
-</style>

+ 0 - 276
src/views/hierarchicalControl/executeResult/index.vue

@@ -1,276 +0,0 @@
-<!-- 执行结果 -->
-<template>
-  <div class="app-container executeResult">
-    <div class="page-container executeResultPage" v-if="pageType === 1">
-      <div class="page-form-title-box">
-        <el-form :model="queryParams" class="form-box" ref="queryForm"
-                 :inline="true" style="width:100%;">
-          <el-form-item label="" prop="name">
-            <el-input
-              maxLength="30"
-              v-model="queryParams.name"
-              placeholder="管控名称"
-              style="width: 200px"
-            />
-          </el-form-item>
-          <el-form-item label="" prop="deptId">
-            <el-select v-model="queryParams.deptId" placeholder="二级单位" style="width: 200px">
-              <el-option
-                v-for="dict in deptOptions"
-                :key="dict.deptId"
-                :label="dict.deptName"
-                :value="dict.deptId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="typeId">
-            <el-select v-model="queryParams.typeId" placeholder="安全分类" style="width: 200px">
-              <el-option
-                v-for="dict in typeList"
-                :key="dict.typeId"
-                :label="dict.typeName"
-                :value="dict.typeId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="levelId">
-            <el-select v-model="queryParams.levelId" placeholder="安全分级" style="width: 200px">
-              <el-option
-                v-for="dict in levelList"
-                :key="dict.levelId"
-                :label="dict.levelName"
-                :value="dict.levelId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
-          <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
-        </el-form>
-      </div>
-      <div class="page-content-box">
-        <el-table class="table-box" v-loading="loading" border :data="dataList">
-          <el-table-column label="管控名称" prop="name"  show-overflow-tooltip/>
-          <el-table-column label="二级单位" prop="deptName" width="160" show-overflow-tooltip/>
-          <el-table-column label="安全分类" prop="typeName" width="160" show-overflow-tooltip/>
-          <el-table-column label="安全分级" prop="levelName" width="160" show-overflow-tooltip/>
-          <el-table-column label="执行状态" prop="status" width="100" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <span :class="scope.row.status == 1?'colorA':'colorB'">{{scope.row.status == 1?'已执行':'未执行'}}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="执行人" prop="executionUser" width="160" show-overflow-tooltip/>
-          <el-table-column label="实验室" prop="subName" width="160" show-overflow-tooltip>
-            <template slot-scope="scope">{{scope.row.subName?scope.row.subName:'--'}}</template>
-          </el-table-column>
-          <el-table-column label="执行时间" prop="executionTime" width="150" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.executionTime,"{y}-{m}-{d} {h}:{i}") }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="截止时间" prop="deadline" width="150" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <span>{{ scope.row.deadline?parseTime(scope.row.deadline,"{y}-{m}-{d}"):'--' }}</span>
-              <span style="margin-left:5px;color:red;" v-if="scope.row.deadlineNum&&deadlineNum>scope.row.deadlineNum">已逾期</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="操作" width="140" 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-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>
-    <info-page :propsData="propsData" v-if="pageType === 2"></info-page>
-  </div>
-</template>
-<script>
-  import {
-    getDeptDropList,
-    laboratoryClassTypeGetList,
-    laboratoryClassLevelGetList,
-  } from '@/api/commonality/permission'
-  import { laboratoryGradeManageList } from "@/api/hierarchicalControl/index";
-  import infoPage from "./infoPage.vue";
-  export default {
-    name: 'index',
-    components: {
-      infoPage
-    },
-    data () {
-      return {
-        //页面状态
-        pageType:1,
-        //页面遮罩
-        loading:false,
-        //下拉列表数据
-        deptOptions:[],
-        typeList:[],
-        levelList:[],
-        //查询条件
-        queryParams:{
-          page:1,
-          pageSize:20,
-          name:"",
-          deptId :null,
-          typeId :null,
-          levelId :null,
-          status :1,
-        },
-        //时间数据
-        dateRange:[],
-        //列表数据
-        dataList:[],
-        //数据数量
-        total:0,
-        //组件传参
-        propsData:{},
-        deadlineNum:null,
-      }
-    },
-    created () {
-
-    },
-    mounted () {
-      const now = new Date();
-      let yy = now.getFullYear()+'-'+now.getMonth()+'-'+now.getDate()
-      this.$set(this,'deadlineNum',new Date(yy).getTime());
-      this.getDeptDropList();
-      this.laboratoryClassTypeGetList();
-      this.laboratoryClassLevelGetList();
-      this.getList();
-    },
-    methods: {
-      //查询按钮
-      handleQuery(){
-        this.$set(this.queryParams,'page',1);
-        this.getList();
-      },
-      //重置按钮
-      resetQuery(){
-        this.$set(this,'dateRange',[])
-        this.$set(this,'queryParams',{
-          page:1,
-          pageSize:20,
-          name:"",
-          deptId :null,
-          typeId :null,
-          levelId :null,
-          status :1,
-        });
-        this.getList();
-      },
-      //获取数据列表
-      getList(){
-        laboratoryGradeManageList(this.queryParams).then(response => {
-          //返回时间戳
-          for(let i=0;i<response.data.records.length;i++){
-            if(response.data.records[i].deadline){
-              response.data.records[i].deadlineNum = new Date(response.data.records[i].deadline).getTime()
-            }else{
-              response.data.records[i].deadlineNum = 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);
-          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(() => {});
-        }else if(type == 6){
-          //返回并刷新
-          this.$set(this,'pageType',1);
-          this.getList();
-        }
-      },
-      /** 查询二级单位列表 */
-      getDeptDropList() {
-        getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
-          this.$set(this, 'deptOptions', response.data)
-        })
-      },
-      //查询安全分级
-      laboratoryClassLevelGetList() {
-        laboratoryClassLevelGetList({}).then(response => {
-          this.$set(this, 'levelList', response.data)
-        })
-      },
-      //查询安全分类
-      laboratoryClassTypeGetList() {
-        laboratoryClassTypeGetList({}).then(response => {
-          this.$set(this, 'typeList', response.data)
-        })
-      },
-    },
-  }
-</script>
-<style scoped lang="scss">
-  .executeResult{
-    .executeResultPage{
-
-      .colorA{
-        color:#0183FA;
-      }
-      .colorB{
-        color: #c88400;
-      }
-    }
-  }
-</style>

+ 0 - 108
src/views/hierarchicalControl/executeResult/infoPage.vue

@@ -1,108 +0,0 @@
-<template>
-  <div class="page-container executeResult-infoPage">
-    <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">
-      <el-form class="add-form-box">
-        <div class="text-max-box">
-          <p>管控名称:</p>
-          <p>{{newData.name}}</p>
-        </div>
-        <div class="text-max-box">
-          <p>管控描述:</p>
-          <p>{{newData.manageDes}}</p>
-        </div>
-        <div class="text-max-box">
-          <p>二级单位:</p>
-          <p>{{newData.deptName}}</p>
-        </div>
-        <div class="text-max-box">
-          <p>安全分类:</p>
-          <p>{{newData.typeName}}</p>
-        </div>
-        <div class="text-max-box">
-          <p>安全分级:</p>
-          <p>{{newData.levelName}}</p>
-        </div>
-        <div class="text-max-box">
-          <p>状态:</p>
-          <p :class="newData.status == 1?'colorA':'colorB'">{{newData.status == 1?'已执行':'未执行'}}</p>
-        </div>
-        <div class="text-max-box" v-if="newData.status == 1">
-          <p>执行人:</p>
-          <p>{{newData.executionUser}}</p>
-        </div>
-        <div class="text-max-box" v-if="newData.status == 1">
-          <p>执行时间:</p>
-          <p>{{parseTime(newData.executionTime,"{y}-{m}-{d} {h}:{i}")}}</p>
-        </div>
-        <div class="text-max-box" v-if="newData.status == 1">
-          <p>执行备注:</p>
-          <p>{{newData.remark}}</p>
-        </div>
-      </el-form>
-    </div>
-  </div>
-</template>
-
-<script>
-  export default {
-    name: 'infoPage',
-    props:{
-      propsData:{},
-    },
-    data(){
-      return{
-        newData:{},
-      }
-    },
-    created(){
-
-    },
-    mounted(){
-      if(this.propsData.id){
-        this.$set(this,'newData',this.propsData);
-      }
-    },
-    methods:{
-      // 返回按钮
-      backPage(){
-        this.$parent.tableButton(6);
-      },
-    },
-  }
-</script>
-
-<style scoped lang="scss">
-  .executeResult-infoPage{
-    .content-box{
-      flex:1;
-      display: flex;
-      padding:20px;
-      .text-max-box{
-        display: flex;
-        p{
-          font-size: 16px;
-          line-height:40px;
-        }
-        p:nth-child(1){
-          width:120px;
-          text-align: right;
-        }
-        p:nth-child(2){
-          width:1200px;
-          line-height:20px;
-          padding:10px 0;
-        }
-        .colorA{
-          color:#0183FA;
-        }
-        .colorB{
-          color: #c88400;
-        }
-      }
-    }
-  }
-</style>

+ 929 - 0
src/views/hierarchicalControl/gradeManage/addPage.vue

@@ -0,0 +1,929 @@
+<!--新增/编辑管控-->
+<template>
+    <div class="gradeManage-addPage">
+      <el-form v-if="pageType == 1" class="gradeManage-addPage-min scrollbar-box" :model="form" ref="form" :rules="rules">
+        <div class="top-max-box">
+          <div class="top-title-box">
+            <p class="color_one">基本信息</p>
+            <p class="page-out-common-style-button" @click="backPage">返回</p>
+          </div>
+          <div class="info-max-box">
+            <el-form-item label="管控名称" prop="name" label-width="80px" style="margin-bottom:20px;">
+              <el-input
+                style="width:180px;"
+                maxlength="15"
+                v-model="form.name"
+                placeholder="请输入管控名称"
+                clearable
+                size="small"
+              />
+            </el-form-item>
+            <el-form-item label="学院" prop="deptId" label-width="80px" style="margin-bottom:20px;">
+              <el-select v-model="form.deptId" placeholder="请选择学院" clearable style="width:180px;" @change="deptChange">
+                <el-option
+                  v-for="dict in deptList"
+                  :key="dict.deptId"
+                  :label="dict.deptName"
+                  :value="dict.deptId"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="实验室类型" prop="moldId" label-width="100px" style="margin-bottom:20px;">
+              <el-select v-model="form.moldId" placeholder="请选择实验室类型" clearable style="width:180px;">
+                <el-option
+                  v-for="dict in moldIdOptionList"
+                  :key="dict.moldId"
+                  :label="dict.moldName"
+                  :value="dict.moldId"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="安全分类" prop="typeId" label-width="80px" style="margin-bottom:20px;">
+              <el-select v-model="form.typeId" placeholder="请选择安全分类" clearable style="width:180px;">
+                <el-option
+                  v-for="dict in typeList"
+                  :key="dict.typeId"
+                  :label="dict.typeName"
+                  :value="dict.typeId"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="安全分级" prop="levelId" label-width="80px" style="margin-bottom:20px;">
+              <el-select v-model="form.levelId" placeholder="请选择安全分级" clearable style="width:180px;">
+                <el-option
+                  v-for="dict in levelList"
+                  :key="dict.levelId"
+                  :label="dict.levelName"
+                  :value="dict.levelId"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="状态" prop="status" label-width="80px" style="margin-bottom:20px;">
+              <el-switch
+                class="switch captcha-img"
+                :active-value="1"
+                :inactive-value="0"
+                active-color="#0183FA"
+                inactive-color="#999"
+                v-model="form.status"
+                active-text="开"
+                inactive-text="关"
+              >
+              </el-switch>
+            </el-form-item>
+          </div>
+        </div>
+        <div class="bottom-max-box" v-for="(item,index) in form.ruleList" :key="index">
+          <div class="top-title-box" v-if="index == 0">
+            <p class="color_one">管控规则</p>
+          </div>
+          <div class="list-info-max-box">
+            <div class="list-info-top-box">
+              <el-form-item label="规则名称" :prop="'ruleList.'+ index +'.name'" :rules="rules.ruleName" label-width="100px" class="list-info-top-item">
+                <el-input
+                  maxlength="15"
+                  style="width:240px;"
+                  v-model="item.name"
+                  placeholder="请输入名称"
+                  clearable
+                  size="small"
+                />
+              </el-form-item>
+              <el-form-item label="规则描述" :prop="'ruleList.'+ index +'.remark'" :rules="rules.remark" label-width="100px" class="list-info-top-item">
+                <el-input
+                  maxlength="30"
+                  style="width:240px;"
+                  v-model="item.remark"
+                  placeholder="请输入规则描述"
+                  clearable
+                  size="small"
+                />
+              </el-form-item>
+              <p class="list-info-top-del el-icon-delete" v-if="index != 0" @click="delFormBigList(index)"></p>
+            </div>
+            <div class="list-info-bottom-box"
+                 style="position: relative;border-bottom:1px dashed #dedede;"
+                 v-for="(minItem,minIndex) in item.ruleUserList" :key="minIndex">
+              <div style="margin-bottom:20px;">
+                <el-form-item label="确认周期" :prop="'ruleList.'+ index +'.ruleUserList.'+ minIndex +'.cycle'" :rules="rules.cycle" class="info-for-min-box" label-width="100px">
+                  <el-select v-model="minItem.cycle" placeholder="请选择确认周期" clearable @change="(e)=>cycleChange(item,minIndex,e,)" style="width:240px;">
+                    <el-option
+                      v-for="dict in minItem.cycleList"
+                      :key="dict"
+                      :label="dict"
+                      :value="dict"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="确认人员" :prop="'ruleList.'+ index +'.ruleUserList.'+ minIndex +'.type'" :rules="rules.type" class="info-for-min-box" label-width="100px">
+                  <el-select v-model="minItem.type" placeholder="请选择确认人员" clearable @change="(e)=>userTypeClick(e,minItem)" style="width:240px;">
+                    <el-option label="实验室负责人" :value="1" />
+                    <el-option label="实验室准入人员" :value="4" />
+                    <el-option label="当天进入实验室人员" :value="2" />
+                    <el-option label="选择人员" :value="3" />
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="选择人员" v-if="minItem.type == 3" :prop="'ruleList.'+ index +'.ruleUserList.'+ minIndex +'.userIds'" :rules="rules.userIds" label-width="100px" class="info-for-min-box">
+                  <p class="subjectButton" @click="userClick(index,minIndex)">{{minItem.userIds[0]?'已选择'+minItem.userList.length+'人':'选择人员'}}</p>
+                </el-form-item>
+              </div>
+              <div style="position: relative;margin-bottom:30px;">
+                <el-form-item label="执行方式" :prop="'ruleList.'+ index +'.ruleUserList.'+ minIndex +'.isAll'" :rules="rules.isAll" class="info-for-min-box" label-width="80px">
+                  <el-radio-group v-model="minItem.isAll" style="width:240px;">
+                    <el-radio :label="1" style="width:90px;margin:3px 0 0 10px;">多人执行</el-radio>
+                    <el-radio :label="0" style="width:90px;margin:3px 0 0 10px;">单人执行</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+                <el-form-item label="需要上传材料" :prop="'ruleList.'+ index +'.ruleUserList.'+ minIndex +'.isUpload'" :rules="rules.isUpload" class="info-for-min-box" label-width="148px">
+                  <el-radio-group v-model="minItem.isUpload" style="width:240px;">
+                    <el-radio :label="1" style="width:60px;margin:3px 0 0 10px;">是</el-radio>
+                    <el-radio :label="0" style="width:60px;margin:3px 0 0 10px;">否</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+                <el-tooltip placement="top" v-if="minItem.isUpload == 1" style="margin-left:10px;">
+                  <div slot="content">文档格式包含: pdf / doc / docx / ppt / pptx
+                    <br/>视频格式包含: mp4
+                    <br/>图片格式包含: png / jpeg / gif
+                  </div>
+                  <p class="el-icon-question" style="color:#999;font-size:20px;position: absolute;left:680px;top:11px;"></p>
+                </el-tooltip>
+                <el-form-item label="文件格式" v-if="minItem.isUpload == 1"
+                              :prop="'ruleList.'+ index +'.ruleUserList.'+ minIndex +'.fileFormat'" :rules="rules.fileFormat" class="info-for-min-box" label-width="90px">
+                  <el-checkbox-group v-model="minItem.fileFormat" style="width:240px;">
+                    <el-checkbox label="1" style="width:60px;margin:0 0 0 10px;">文档</el-checkbox>
+                    <el-checkbox label="2" style="width:60px;margin:0 0 0 10px;">视频</el-checkbox>
+                    <el-checkbox label="3" style="width:60px;margin:0 0 0 10px;">图片</el-checkbox>
+                  </el-checkbox-group>
+                </el-form-item>
+              </div>
+              <p class="info-for-min-del el-icon-delete" style="position:absolute;top:50%;right:40px;margin-top:-10px;font-size:24px;" v-if="item.ruleUserList[1]" @click="delFormMinList(item,minIndex)"></p>
+            </div>
+            <p class="add-user-button reset-button-one" style="cursor: pointer" @click="addFormMinList(item)">+ 新增确认人员</p>
+          </div>
+        </div>
+        <p class="addBigButton" style="cursor: pointer" @click="addFormBigList">+ 新增管控规则</p>
+        <div class="add-button-bottom-box">
+          <p class="page-reset-common-style-button" @click="backPage">取消</p>
+          <p class="page-inquire-common-style-button" @click="submitForm">保存</p>
+        </div>
+      </el-form>
+      <div v-if="pageType == 2" class="user-list-page">
+        <div class="title-top-box">
+          <p>选择人员</p>
+          <p class="el-icon-close" @click="outUserClick"></p>
+        </div>
+        <div class="button-top-box">
+          <p></p>
+          <p class="page-add-common-style-button" style="cursor: pointer" @click="addUser">+ 新增管控人员</p>
+          <p class="page-inquire-common-style-button" @click="okUserClick">确定</p>
+        </div>
+        <div class="table-user-list-box">
+          <el-table class="table-box" border :data="tableUserListMin">
+            <el-table-column label="身份" align="left" prop="positionName"/>
+            <el-table-column label="名称" align="left" prop="userName"/>
+            <el-table-column label="联系方式" align="left" prop="mobile"/>
+            <el-table-column label="学院" align="left" prop="deptName"/>
+            <el-table-column label="专业" align="left" prop="majorName">
+              <template slot-scope="scope">
+                {{scope.row.majorName ? scope.row.majorName : '--'}}
+              </template>
+            </el-table-column>
+            <el-table-column label="班级" align="left" prop="grade">
+              <template slot-scope="scope">
+                {{scope.row.gradeName ? scope.row.gradeName : '--'}}
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="130">
+              <template slot-scope="scope">
+                <div class="table-button-box">
+                  <p class="table-button-null"></p>
+                  <p class="table-button-p" @click="delItem(scope.row)">删除</p>
+                  <p class="table-button-null"></p>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination :page-sizes="[20, 30, 40, 50]"
+            style="margin-top:10px;"
+            :total="total"
+            layout="total, prev, pager, next, jumper"
+            :page.sync="queryParams.pageNum"
+            :limit.sync="queryParams.pageSize"
+            @pagination="pageLit"
+          />
+        </div>
+      </div>
+      <user-list ref="userOpen"></user-list>
+    </div>
+</template>
+
+<script>
+  import {
+    laboratoryGradeManageDetail,
+    systemUserSelectByPage,
+    laboratoryGradeManageAdd,
+    laboratoryGradeManageUpdate,
+  } from "@/api/hierarchicalControl/index";
+  import {
+    getDeptDropList,
+    laboratoryClassLevelGetList,
+    laboratoryClassTypeGetList,
+    laboratoryClassMoldGetList,
+  } from '@/api/commonality/permission'
+  import userList from "./userList.vue"
+  export default {
+    name: "addPage",
+    components: {
+      userList
+    },
+    props:{
+      propsType:{},
+      propsId:{},
+    },
+    data() {
+      return {
+        pageType:1,
+        // 页面状态
+        subjectOpen:false,
+        //时间选择器数据
+        createTimeDate: [],
+        form:{
+          name:"",//名称
+          deptId:'',
+          deptName:"",//学院
+          subs:[],//选中实验室列表
+          ruleList:[//添加选项
+            {
+              name:"",//名称
+              remark:"",//规则描述
+              ruleUserList:[
+                {
+                  type:"",//人员类型 1 实验室负责人,2 当天进入实验室人员,3 选择人员
+                  isAll:"",
+                  isUpload:"",//需要上传材料(0 否,1 是)
+                  fileFormat:[],
+                  cycle:"",//确认周期一天,一周,一月,一年
+                  cycleList:['一天','一周','一月','季度','半年','一年'],
+                  userIds:"",//选择人员id(多个逗号分隔,type=3时有效)
+                  userList:[]
+                }
+              ]
+            }
+          ]
+        },
+        // 表单校验
+        rules: {
+          name: [
+            { required: true, message: "请输入管控名称", trigger: "blur" },
+            { required: true, message: "请输入管控名称", validator: this.spaceJudgment, trigger: "blur" }
+          ],
+          ruleName:[
+            { required: true, message: "请输入规则名称", trigger: "blur" },
+            { required: true, message: "请输入规则名称", validator: this.spaceJudgment, trigger: "blur" }
+          ],
+          deptId: [
+            { required: true, message: "请选择学院", trigger: "blur" }
+          ],
+          subs: [
+            { required: true, message: "请选择实验室", trigger: "blur" }
+          ],
+          remark: [
+            { required: true, message: "请输入规则描述", trigger: "blur" },
+            { required: true, message: "请输入规则描述", validator: this.spaceJudgment, trigger: "blur" }
+          ],
+          type: [
+            { required: true, message: "请选择确认人员", trigger: "blur" }
+          ],
+          isAll: [
+            { required: true, message: "请选择执行方式", trigger: "blur" }
+          ],
+          isUpload: [
+            { required: true, message: "请选择是否需要上传材料", trigger: "blur" }
+          ],
+          cycle: [
+            { required: true, message: "请选择确认周期", trigger: "blur" }
+          ],
+          userIds: [
+            { required: true, message: "请选择人员", trigger: "blur" }
+          ],
+          fileFormat: [
+            { required: true, message: "请选择文件格式", trigger: "blur" }
+          ],
+        },
+        //时间限制
+        cycleList:['一天','一周','一月','季度','半年','一年'],
+        //用户选择index
+        userBigIndex:"",
+        userMinIndex:"",
+        //学院数据
+        deptList:[],
+        //实验室类型
+        moldIdOptionList:[],
+        //分类数据
+        typeList:[],
+        //分级数据
+        levelList:[],
+        //table人员列表数据
+        tableUserIds:[],
+        tableUserList:[],
+        tableUserListMin:[],
+        total:0,
+        queryParams:{
+          pageNum:1,
+          pageSize:20,
+        }
+      }
+    },
+    created() {
+
+    },
+    mounted(){
+      this.getDeptDropList();
+      this.laboratoryClassLevelGetList();
+      this.laboratoryClassTypeGetList();
+      this.laboratoryClassMoldGetList();
+      if(this.propsType){
+        this.laboratoryGradeManageDetail();
+      }
+    },
+    methods: {
+      delItem(item){
+        let self = this;
+        for(let i=0;i<self.tableUserList.length;i++){
+          if(self.tableUserList[i].userId == item.userId){
+            self.tableUserList.splice(i,1);
+            self.pageLit();
+            break
+          }
+        }
+      },
+      //翻页处理
+      pageLit(){
+        let self = this;
+        let num = (this.queryParams.pageNum - 1) * this.queryParams.pageSize;
+        let maxNum = num+10;
+        let list = [];
+        for(let i = num ;i<self.tableUserList.length;i++){
+          if(i<maxNum){
+            list.push(self.tableUserList[i]);
+          }
+        }
+        this.$set(this,'tableUserListMin',list);
+        this.$set(this,'total',this.tableUserList.length);
+      },
+      //获取学院
+      getDeptDropList(){
+        getDeptDropList({level: 2, deptType: 1 }).then(response => {
+          this.$set(this,'deptList',response.data);
+        });
+      },
+      //选中学院
+      deptChange(e){
+        let self = this;
+        for(let i=0;i<self.deptList.length;i++){
+          if(e == self.deptList[i].deptId){
+            this.form.deptName = self.deptList[i].deptName;
+            this.form.deptId = self.deptList[i].deptId;
+          }
+        }
+      },
+      //选中周期
+      cycleChange(item,minIndex,e){
+        this.$forceUpdate()
+        let num = 0;
+        for(let i=0;i<item.ruleUserList.length;i++){
+          if(item.ruleUserList[i].cycle == e){
+            num++
+          }
+        }
+        if(num>1){
+          item.ruleUserList[minIndex].cycle = '';
+          this.msgError('同一个规则下确认周期不能相同')
+        }
+      },
+      laboratoryClassMoldGetList(){
+        laboratoryClassMoldGetList({}).then(response=>{
+          if(response.code==200){
+            this.$set(this,'moldIdOptionList',response.data);
+          }
+        })
+      },
+      //查询安全分级
+      laboratoryClassLevelGetList(){
+        laboratoryClassLevelGetList({}).then(response=>{
+          if(response.code==200){
+            this.$set(this,'levelList',response.data);
+          }
+        })
+      },
+      //查询安全分类
+      laboratoryClassTypeGetList(){
+        laboratoryClassTypeGetList({}).then(response=>{
+          if(response.code==200){
+            this.$set(this,'typeList',response.data);
+          }
+        });
+      },
+      //获取数据详情
+      laboratoryGradeManageDetail(){
+        let self = this;
+        laboratoryGradeManageDetail({manageId:this.propsId}).then(response=>{
+          let userIds = "";
+          for(let i=0;i<response.data.ruleList.length;i++){
+            for(let o=0;o<response.data.ruleList[i].ruleUserList.length;o++){
+              userIds = userIds + response.data.ruleList[i].ruleUserList[o].userIds + ',';
+              this.$set(response.data.ruleList[i].ruleUserList[o],'userList',[]);
+              if (response.data.ruleList[i].ruleUserList[o].isUpload == 1 && response.data.ruleList[i].ruleUserList[o].fileFormat){
+                this.$set(response.data.ruleList[i].ruleUserList[o],'fileFormat',response.data.ruleList[i].ruleUserList[o].fileFormat.split(','));
+              }else{
+                this.$set(response.data.ruleList[i].ruleUserList[o],'fileFormat',[]);
+              }
+              if(response.data.ruleList[i].ruleUserList[o].type == 2){
+                response.data.ruleList[i].ruleUserList[o].cycleList = ['一天'];
+              }else{
+                response.data.ruleList[i].ruleUserList[o].cycleList = ['一天','一周','一月','季度','半年','一年'];
+              }
+            }
+          }
+          this.$set(this,'form',response.data);
+          //获取选中人员列表
+          let userData = {
+            pageNum:1,
+            pageSize: 1000,
+            paramIds:userIds
+          }
+          systemUserSelectByPage(userData).then(response => {
+            for(let a=0;a<response.data.records.length;a++){
+              for(let i=0;i<self.form.ruleList.length;i++){
+                for(let o=0;o<self.form.ruleList[i].ruleUserList.length;o++){
+                  let text = response.data.records[a].userId + '';
+                  if (self.form.ruleList[i].ruleUserList[o].userIds.indexOf(text) != -1){
+                    self.form.ruleList[i].ruleUserList[o].userList.push(response.data.records[a]);
+                  }
+                }
+              }
+            }
+          });
+        });
+      },
+      //接收人员列表数据
+      takeUserData(ids,data){
+        let self = this;
+        for(let i=0;i<data.length;i++){
+          self.tableUserList.push(data[i]);
+        }
+        // this.$set(this.form.ruleList[this.userBigIndex].ruleUserList[this.userMinIndex],'userIds',ids);
+        // this.$set(this.form.ruleList[this.userBigIndex].ruleUserList[this.userMinIndex],'userList',data);
+        this.$refs.userOpen.show();
+        this.pageLit();
+      },
+      outUserClick(){
+        this.pageType = 1;
+      },
+      addUser(){
+        let self = this;
+        let list = [];
+        for (let i=0;i<self.tableUserList.length;i++) {
+          list.push(self.tableUserList[i].userId);
+        }
+        if(this.tableUserList[0]){
+          // this.$refs.userOpen.show(this.tableUserList);
+          this.$refs.userOpen.show(list);
+        }else{
+          this.$refs.userOpen.show();
+        }
+      },
+      //选择人员
+      userClick(index,minIndex){
+        this.pageType = 2;
+        this.$set(this,'userBigIndex',index);
+        this.$set(this,'userMinIndex',minIndex);
+        this.$set(this,'tableUserList',JSON.parse(JSON.stringify(this.form.ruleList[this.userBigIndex].ruleUserList[this.userMinIndex].userList)))
+        this.pageLit();
+        // this.$set(this,'userBigIndex',index);
+        // this.$set(this,'userMinIndex',minIndex);
+        // if(this.form.ruleList[this.userBigIndex].ruleUserList[this.userMinIndex].userIds[0]){
+        //   this.$refs.userOpen.show(this.form.ruleList[this.userBigIndex].ruleUserList[this.userMinIndex].userList);
+        // }else{
+        //   this.$refs.userOpen.show();
+        // }
+      },
+      //确定选择人员
+      okUserClick(){
+        let self = this;
+        let ids = [];
+        for(let i=0;i<self.tableUserList.length;i++){
+          ids.push(self.tableUserList[i].userId);
+        }
+        this.$set(this.form.ruleList[this.userBigIndex].ruleUserList[this.userMinIndex],'userIds',JSON.parse(JSON.stringify(ids)));
+        this.$set(this.form.ruleList[this.userBigIndex].ruleUserList[this.userMinIndex],'userList',JSON.parse(JSON.stringify(this.tableUserList)));
+        this.pageType = 1;
+      },
+      //页面切换按钮
+      pageTypeClick(type){
+        if(this.pageType != type){
+          if(type == 1){
+            this.pageType = 1;
+          }else if(type == 2){
+            this.pageType = 2;
+          }
+        }
+      },
+      //提交按钮
+      submitForm(type) {
+        let self = this;
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            //检测是否有多选人员
+            for(let i=0;i<self.form.ruleList.length;i++){
+              let type1 = 0;
+              let type2 = 0;
+              for(let o=0;o<self.form.ruleList[i].ruleUserList.length;o++){
+                if(self.form.ruleList[i].ruleUserList[o].type == 1){
+                  type1++
+                }else if(self.form.ruleList[i].ruleUserList[o].type == 2){
+                  type2++
+                }
+              }
+              if(type1>1){
+                this.msgError('名称为:'+self.form.ruleList[i].name+'的管控规则下,无法添加多条实验室负责人');
+                return
+              }
+              if(type2>1){
+                this.msgError('名称为:'+self.form.ruleList[i].name+'的管控规则下,无法添加多条当天进入实验室人员');
+                return
+              }
+            }
+            let form = JSON.parse(JSON.stringify(self.form));
+            for(let i=0;i<form.ruleList.length;i++){
+              for(let o=0;o<form.ruleList[i].ruleUserList.length;o++){
+                form.ruleList[i].ruleUserList[o].userIds = form.ruleList[i].ruleUserList[o].userIds + '';
+                if(form.ruleList[i].ruleUserList[o].isUpload == 1){
+                  form.ruleList[i].ruleUserList[o].fileFormat = form.ruleList[i].ruleUserList[o].fileFormat + '';
+                }else {
+                  form.ruleList[i].ruleUserList[o].fileFormat = '';
+                }
+              }
+            }
+            if(form.id){
+              this.laboratoryGradeManageUpdate(form);
+            }else{
+              this.laboratoryGradeManageAdd(form);
+            }
+          }
+        });
+      },
+      //编辑接口
+      laboratoryGradeManageUpdate(obj){
+        laboratoryGradeManageUpdate(obj).then(response=>{
+          this.msgSuccess("操作成功");
+          this.$parent.clickPageType(1);
+        });
+      },
+      //新增接口
+      laboratoryGradeManageAdd(obj){
+        laboratoryGradeManageAdd(obj).then(response=>{
+          this.msgSuccess("操作成功");
+          this.$parent.clickPageType(1);
+        });
+      },
+      //返回
+      backPage(){
+        this.$parent.clickPageType(1);
+      },
+      //新增管控规则
+      addFormBigList(){
+        if(this.form.ruleList[9]){
+          this.msgError('管控规则最大数量为10条')
+          return
+        }
+        let obj = {
+          name:"",
+          remark:"",
+          ruleUserList:[
+            {
+              type:"",//人员类型 1 实验室负责人,2 当天进入实验室人员,3 选择人员
+              isAll:"",
+              isUpload:"",//需要上传材料(0 否,1 是)
+              fileFormat:[],
+              cycle:"",//确认周期一天,一周,一月,一年
+              cycleList:['一天','一周','一月','季度','半年','一年'],
+              userIds:"",//选择人员id(多个逗号分隔,type=3时有效)
+              userList:[]
+            }
+          ]
+        }
+        this.form.ruleList.push(obj);
+        this.$forceUpdate();
+      },
+      //删除管控规则
+      delFormBigList(index){
+        this.form.ruleList.splice(index,1);
+        this.$forceUpdate();
+      },
+      //添加人员选项
+      addFormMinList(item){
+        if(item.ruleUserList[9]){
+          this.msgError('管控规则下确认人员最多10人')
+          return
+        }
+        let obj = {
+          type:"",//人员类型 1 实验室负责人,2 当天进入实验室人员,3 选择人员
+          isAll:"",
+          isUpload:"",//需要上传材料(0 否,1 是)
+          fileFormat:[],
+          cycle:"",//确认周期一天,一周,一月,一年
+          cycleList:['一天','一周','一月','季度','半年','一年'],
+          userIds:"",//选择人员id(多个逗号分隔,type=3时有效)
+          userList:[]
+        }
+        item.ruleUserList.push(obj);
+        this.$forceUpdate();
+      },
+      //删除人员选项
+      delFormMinList(item,minIndex){
+        item.ruleUserList.splice(minIndex,1);
+        this.$forceUpdate();
+      },
+      //选择人员类型
+      userTypeClick(e,minItem){
+        if(e == 2){
+          let list = ['一天'];
+          this.$set(minItem,'cycleList',list);
+          this.$set(minItem,'cycle','一天');
+        }else{
+          let list = ['一天','一周','一月','季度','半年','一年'];
+          this.$set(minItem,'cycleList',list);
+        }
+        // this.$set(this.form.ruleList[index].ruleUserList[minIndex],'cycle','一天');
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .gradeManage-addPage{
+    flex:1;
+    display: flex!important;
+    flex-direction: column;
+    overflow: hidden;
+    /*padding:0 20px!important;*/
+    *{
+      margin:0
+    }
+    .gradeManage-addPage-min{
+      .top-max-box{
+        padding:0 20px;
+        margin:5px 20px 20px 10px;
+        box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
+        border-radius:10px;
+        .top-title-box{
+          display: flex;
+          border-bottom:1px solid #dedede;
+          p:nth-child(1){
+            flex:1;
+            line-height:80px;
+            font-size:18px;
+            color:#0045af;
+            font-weight:700;
+          }
+          p:nth-child(2){
+            width:100px;
+            margin:20px 0;
+          }
+          p:nth-child(3){
+            width:100px;
+            margin:20px 0 0 20px;
+          }
+        }
+        .info-max-box{
+          padding:30px 0;
+          display: flex;
+          flex-wrap: wrap;
+          .subjectButton{
+            cursor:pointer;
+            display: inline-block;
+            text-align: center;
+            width: 220px;
+            height: 38px;
+            line-height:38px;
+            border-radius: 4px;
+            border: 1px solid #DCDFE6;
+            color:#999;
+            font-size: 14px;
+            font-weight:500;
+            background:#ffffff;
+            margin:0;
+          }
+          .subjectButton:hover{
+            color:#0183FA;
+            background:rgba(1,131,250,0.1);
+            border: 1px solid #0183FA;
+          }
+        }
+      }
+      .bottom-max-box{
+        margin:5px 20px 20px 10px;
+        padding:0 20px 20px;
+        box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
+        border-radius:10px;
+        .top-title-box{
+          display: flex;
+          border-bottom:1px solid #dedede;
+          p:nth-child(1){
+            flex:1;
+            line-height:80px;
+            font-size:18px;
+            color:#0045af;
+            font-weight:700;
+          }
+          p:nth-child(2){
+            width:100px;
+            margin:20px 0;
+          }
+          p:nth-child(3){
+            width:100px;
+            margin:20px 0 0 20px;
+          }
+        }
+        .list-info-max-box{
+          border-radius:10px;
+          .list-info-top-box{
+            padding: 30px 0;
+            border-bottom:1px solid #dedede;
+            .list-info-top-item{
+              display: inline-block;
+              margin-bottom: 20px;
+            }
+            .list-info-top-del{
+              display: inline-block;
+              margin-left:40px;
+              cursor: pointer;
+              color:#999;
+            }
+          }
+          .list-info-bottom-box{
+            padding:30px 0 0;
+            .info-for-min-box{
+              display: inline-block;
+            }
+            .info-for-min-del{
+              display: inline-block;
+              margin-left:20px;
+              cursor: pointer;
+              color:#999;
+            }
+            .subjectButton{
+              cursor:pointer;
+              display: inline-block;
+              text-align: center;
+              width: 220px;
+              height: 38px;
+              line-height:38px;
+              border-radius: 4px;
+              border: 1px solid #DCDFE6;
+              color:#999;
+              font-size: 14px;
+              font-weight:500;
+              background:#ffffff;
+              margin:0;
+            }
+            .subjectButton:hover{
+              color:#0183FA;
+              background:rgba(1,131,250,0.1);
+              border: 1px solid #0183FA;
+            }
+          }
+          .add-user-button{
+            margin:30px auto 0;
+            width:200px;
+            display: block;
+            border:none;
+            color:#0183FA;
+          }
+        }
+      }
+      .addBigButton{
+        width: 400px;
+        height: 40px;
+        margin:30px auto 0;
+        line-height:40px;
+        border-radius: 6px;
+        border:1px dashed #dedede;
+        color:#333;
+        font-size:14px;
+        background:#fff;
+        cursor: pointer;
+        text-align: center;
+        font-weight:700;
+      }
+      .add-button-bottom-box{
+        width:260px;
+        margin:30px auto;
+        display: flex;
+        p:nth-child(1){
+          display: block;
+          width:120px;
+          margin-right:20px;
+        }
+        p:nth-child(2){
+          display: block;
+          width:120px;
+        }
+      }
+    }
+    .user-list-page{
+      flex:1;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+      /*padding:0 20px;*/
+      margin:5px 20px 20px 10px;
+      box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
+      border-radius:10px;
+      .title-top-box{
+        display: flex;
+        border-bottom:1px solid #dedede;
+        p:nth-child(1){
+          flex:1;
+          line-height:80px;
+          font-size:18px;
+          color:#0045af;
+          margin-left:30px;
+        }
+        p:nth-child(2){
+          font-size:24px;
+          width:40px;
+          line-height:40px;
+          color:#999;
+          text-align: center;
+          cursor: pointer;
+          margin:20px 30px;
+          border-radius:50%;
+        }
+        p:nth-child(2):hover{
+          background: #999;
+          color:#fff;
+        }
+      }
+      .button-top-box{
+        display: flex;
+        p:nth-child(1){
+          flex:1;
+        }
+        p:nth-child(2){
+          width:140px;
+          margin:20px 0;
+        }
+        p:nth-child(3){
+          margin:20px;
+        }
+      }
+      .table-user-list-box{
+        margin:0 20px 20px;
+        overflow: hidden;
+        flex:1;
+        display:flex;
+        flex-direction: column
+      }
+    }
+    ::v-deep {
+      .switch {
+        .el-switch{
+          height:26px;
+          line-height: 26px;
+        }
+        .el-switch__label {
+          position: absolute;
+          display: none;
+          color: #fff !important;
+        }
+        .el-switch__label--right {
+          z-index: 1;
+        }
+        .el-switch__label--right span{
+          margin-left: 4px;
+        }
+        .el-switch__label--left {
+          z-index: 1;
+        }
+        .el-switch__label--left span{
+          margin-left: 30px;
+        }
+        .el-switch__label.is-active {
+          display: block;
+        }
+        .el-switch__core{
+          width:60px!important;
+        }
+        .el-switch__core:after{
+          top: 1px;
+          left: 2px;
+        }
+        .el-switch.is-checked .el-switch__core::after{
+          margin-left:-39px;
+        }
+      }
+    }
+  }
+</style>

+ 422 - 0
src/views/hierarchicalControl/gradeManage/index.vue

@@ -0,0 +1,422 @@
+<!--分级管控管理-->
+<template>
+  <div class="gradeManage">
+    <div class="app-container" v-if="pageType == 1">
+      <div class="page-container gradeManage-page">
+        <div class="page-form-title-box">
+          <el-form :model="queryParams" class="form-box" ref="queryForm"
+                   :inline="true" style="width:100%;">
+            <el-form-item label="" prop="searchValue">
+              <el-input
+                maxLength="30"
+                v-model="queryParams.searchValue"
+                placeholder="请输入名称/学院"
+                style="width: 200px"
+              />
+            </el-form-item>
+            <el-form-item label="" prop="deptId">
+              <el-select v-model="queryParams.deptId" placeholder="请选择学院" style="width: 200px">
+                <el-option
+                  v-for="dict in deptIdOptionList"
+                  :key="dict.deptId"
+                  :label="dict.deptName"
+                  :value="dict.deptId"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="typeId">
+              <el-select v-model="queryParams.typeId" placeholder="请选择安全分类" style="width: 200px">
+                <el-option
+                  v-for="dict in typeOptionList"
+                  :key="dict.typeId"
+                  :label="dict.typeName"
+                  :value="dict.typeId"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="level">
+              <el-select v-model="queryParams.level" placeholder="请选择安全分级" style="width: 200px">
+                <el-option
+                  v-for="dict in levelOptionList"
+                  :key="dict.levelId"
+                  :label="dict.levelName"
+                  :value="dict.levelId"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="state">
+              <el-select v-model="queryParams.state" placeholder="请选择状态" style="width: 200px">
+                <el-option
+                  v-for="dict in statusOptionList"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="moldId">
+              <el-select v-model="queryParams.moldId" placeholder="请选择类型" style="width: 200px">
+                <el-option
+                  v-for="dict in moldIdOptionList"
+                  :key="dict.moldId"
+                  :label="dict.moldName"
+                  :value="dict.moldId"
+                />
+              </el-select>
+            </el-form-item>
+            <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+            <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+            <p class="page-add-common-style-button"
+               style="float: right;"
+               @click="clickPageType(2)"
+               v-hasPermiRouter="['laboratory:gradeManage:add']"
+            >新增</p>
+          </el-form>
+        </div>
+        <div class="page-content-box">
+          <el-table class="table-box" v-loading="loading" border :data="dataList">
+            <!--<el-table-column type="selection" width="55" align="center" />-->
+            <el-table-column label="管控名称" align="left" prop="name" show-overflow-tooltip/>
+            <el-table-column label="学院" align="left" prop="deptName" width="149" show-overflow-tooltip/>
+            <el-table-column label="实验室类型" align="left" prop="moldName" width="149">
+              <template slot-scope="scope">{{scope.row.moldName?scope.row.moldName:'--'}}</template>
+            </el-table-column>
+            <el-table-column label="安全分类" align="left" prop="typeName" width="130">
+              <template slot-scope="scope">{{scope.row.typeName?scope.row.typeName:'--'}}</template>
+            </el-table-column>
+            <el-table-column label="安全分级" align="left" prop="levelName" width="130">
+              <template slot-scope="scope">{{scope.row.levelName?scope.row.levelName:'--'}}</template>
+            </el-table-column>
+            <el-table-column label="管控规则数" align="left" prop="ruleNum" width="130"/>
+            <el-table-column label="状态" align="left" prop="status" width="149">
+              <template slot-scope="scope">
+                <span :class="scope.row.status == 1?'tableTypeColorA':(scope.row.status == 0?'tableTypeColorB':'')">{{scope.row.status == 1?'开启':(scope.row.status == 0?'关闭':'')}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="编辑人" align="left" prop="createName" width="149"/>
+            <el-table-column label="编辑时间" align="left" prop="createTime" width="179"/>
+            <!--<el-table-column label="适配实验室数" align="left" prop="subNum" />-->
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160px" v-if="tableButtonType">
+              <template slot-scope="scope">
+                <div class="table-button-box">
+                  <p class="table-button-null"></p>
+                  <p class="table-button-p"
+                     @click="clickPageType(3,scope.row)"
+                     v-hasPermiAnd="['laboratory:gradeManage:query','laboratory:gradeManage:edit']"
+                  >编辑</p>
+                  <p class="table-button-p"
+                     @click="handleDelete(scope.row)"
+                     v-hasPermi="['laboratory:gradeManage:remove']"
+                  >删除</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>
+    <!-- 新增编辑 -->
+    <add-page v-if="pageType == 2" :propsType="propsType" :propsId="propsId"></add-page>
+  </div>
+</template>
+
+<script>
+  import {
+    getGradeManage,
+    addGradeManage,
+    updateGradeManage,
+  } from "@/api/hierarchicalControl/indexDemo";
+  import {
+    laboratoryGradeManageDelete,
+  } from "@/api/hierarchicalControl/index";
+  import {
+    getDeptDropList,
+    laboratoryClassLevelGetList,
+    laboratoryClassTypeGetList,
+    laboratoryClassMoldGetList,
+  } from '@/api/commonality/permission'
+  import {
+    laboratoryGradeManageList
+  } from "@/api/hierarchicalControl/index";
+  import addPage from "./addPage.vue"
+
+  export default {
+    name: "GradeManage",
+    components: {
+      addPage,
+    },
+    data() {
+      return {
+        tableButtonType:this.hasPermiDom(['laboratory:gradeManage:query','laboratory:gradeManage:edit','laboratory:gradeManage:remove']),
+        //页面状态
+        pageType:1,
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 分级管控管理表格数据
+        dataList: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 查询参数
+        queryParams: {
+          page: 1,
+          pageSize:20,
+          searchValue: null,
+          status:null,
+          typeId:null,
+          level:null,
+        },
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {
+        },
+        // //分类数据
+        typeList:[],
+        // //分级数据
+        levelList:[],
+        propsType:false,
+        propsId:{},
+        //学院
+        deptIdOptionList:[],
+        //安全分类
+        typeOptionList:[],
+        //安全分级
+        levelOptionList:[],
+        //状态
+        statusOptionList:[{label:"开启",value:"1"},{label:"关闭",value:"0"},],
+        //类型
+        moldIdOptionList:[],
+        //高级搜索组件参数
+        searchData:{
+          buttonList:[
+            {
+              name:"新增",
+              parameter:"add",
+              type:"1", //按钮类型 1.按钮 2.导入 3.导出
+              hasPermi:['laboratory:gradeManage:add'] // 权限字段
+            },
+          ],
+          searchList:[
+            {
+              name:"关键字",//名称
+              key:"searchValue",//键名 用于返回数据
+              value:"",//内容
+              placeholder:"请输入名称/学院",//输入提示
+              level:"1",//1.普通搜索 2.高级搜索  普通搜索默认会在高级搜索时显示
+              type:"1",//类型 1.input 2.select 3.TimePicker
+              universal:'10',//input 最大长度
+            },
+            {
+              name:"学院",//名称
+              key:"deptId",//键名 用于返回数据
+              value:"",//内容
+              placeholder:"请选择学院",//输入提示
+              level:"1",//1.普通搜索 2.高级搜索  普通搜索默认会在高级搜索时显示
+              type:"2",//类型 1.input 2.select 3.TimePicker
+              universal:[],//select列表数据
+            },
+            {
+              name:"安全分类",//名称
+              key:"typeId",//键名 用于返回数据
+              value:"",//内容
+              placeholder:"请选择安全分类",//输入提示
+              level:"1",//1.普通搜索 2.高级搜索  普通搜索默认会在高级搜索时显示
+              type:"2",//类型 1.input 2.select 3.TimePicker
+              universal:[],//select列表数据
+            },
+            {
+              name:"安全分级",//名称
+              key:"level",//键名 用于返回数据
+              value:"",//内容
+              placeholder:"请选择安全分级",//输入提示
+              level:"1",//1.普通搜索 2.高级搜索  普通搜索默认会在高级搜索时显示
+              type:"2",//类型 1.input 2.select 3.TimePicker
+              universal:[],//select列表数据
+            },
+            {
+              name:"状态",//名称
+              key:"status",//键名 用于返回数据
+              value:"",//内容
+              placeholder:"请选择状态",//输入提示
+              level:"2",//1.普通搜索 2.高级搜索  普通搜索默认会在高级搜索时显示
+              type:"2",//类型 1.input 2.select 3.TimePicker
+              universal:[
+                {label:"开启",value:"1"},{label:"关闭",value:"0"},
+              ],//select列表数据
+            },
+            {
+              name:"类型",//名称
+              key:"moldId",//键名 用于返回数据
+              value:"",//内容
+              placeholder:"请选择类型",//输入提示
+              level:"2",//1.普通搜索 2.高级搜索  普通搜索默认会在高级搜索时显示
+              type:"2",//类型 1.input 2.select 3.TimePicker
+              universal:[],//select列表数据
+            },
+          ]
+
+        }
+      };
+    },
+    created() {
+
+    },
+    mounted(){
+      this.laboratoryClassLevelGetList();
+      this.laboratoryClassTypeGetList();
+      this.getDeptDropList();
+      this.laboratoryClassMoldGetList();
+      this.getList();
+    },
+    methods: {
+      //获取实验室类型
+      laboratoryClassMoldGetList(){
+        laboratoryClassMoldGetList({}).then(response => {
+          this.$set(this,'moldIdOptionList',response.data);
+        });
+      },
+      //获取学院
+      getDeptDropList(){
+        getDeptDropList({level: 2, deptType: 1 }).then(response => {
+          this.$set(this,'deptIdOptionList',response.data);
+        });
+      },
+      //查询安全分级
+      laboratoryClassLevelGetList(){
+        laboratoryClassLevelGetList({}).then(response=>{
+          this.$set(this,'levelOptionList',response.data);
+        })
+      },
+      //查询安全分类
+      laboratoryClassTypeGetList(){
+        laboratoryClassTypeGetList({}).then(response=>{
+          this.$set(this,'typeOptionList',response.data);
+        });
+      },
+      //页面切换
+      clickPageType(type,row){
+        if(this.pageType != type){
+          if(type == 1){
+            this.getList();
+            this.pageType = 1;
+          }else if(type == 2){
+            this.pageType = 2;
+            this.propsType = false;
+          }else if(type == 3){
+            this.pageType = 2;
+            this.propsType = true;
+            this.propsId = row.id;
+          }
+        }
+      },
+      /** 查询分级管控管理列表 */
+      getList() {
+        this.$set(this,'loading',true);
+        laboratoryGradeManageList(this.queryParams).then( response => {
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+          this.$set(this,'loading',false);
+        });
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          id: null,
+          deptId: null,
+          deptName: null,
+          userId: null,
+          createBy: null,
+          createTime: null,
+          updateBy: null,
+          updateTime: null,
+          remark: null,
+          level: null,
+          typeId: null,
+          subIds: null
+        };
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.$set(this,'queryParams',{
+          searchValue:'',
+          deptId:null,
+          typeId:null,
+          level:null,
+          status:null,
+          moldId:null,
+        })
+        this.handleQuery();
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        let self = this;
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          self.laboratoryGradeManageDelete(row);
+        }).then(() => {
+        }).catch(() => {});
+      },
+      laboratoryGradeManageDelete(row){
+        laboratoryGradeManageDelete({id:row.id}).then( response => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        });
+      },
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .gradeManage{
+    flex:1;
+    display: flex;
+    overflow: hidden;
+    .gradeManage-page{
+      .button-box{
+        margin:0 auto;
+        width:190px;
+        display: flex;
+      }
+      .tableTypeColorA{
+        color:#2AA408;
+      }
+      .tableTypeColorB{
+        color:#FF3131;
+      }
+    }
+  }
+</style>

+ 190 - 0
src/views/hierarchicalControl/gradeManage/userList.vue

@@ -0,0 +1,190 @@
+<!--分级管控/人员列表-->
+<template>
+  <div class="userList" v-if="userOpen">
+    <el-dialog title="选择用户" :visible.sync="userOpen" width="1500px" append-to-body :close-on-click-modal="false">
+      <div class="gradeManage-userList" style="height:626px;display: flex;flex-direction: column">
+        <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
+          <el-form-item label="关键字" prop="searchValue" label-width="80px">
+            <el-input
+              style="width:200px;"
+              maxlength="10"
+              v-model="queryParams.searchValue"
+              placeholder="请输入名称/联系方式"
+              clearable
+              size="small"
+            />
+          </el-form-item>
+          <el-form-item label="学院" prop="deptId" label-width="50px">
+            <el-select style="width:200px;" v-model="queryParams.deptId" placeholder="请选择学院" clearable>
+              <el-option
+                v-for="dict in deptList"
+                :key="dict.deptId"
+                :label="dict.deptName"
+                :value="dict.deptId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <p class="page-inquire-common-style-button" style="margin-right:10px;" @click="handleQuery">查询</p>
+            <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+          </el-form-item>
+        </el-form>
+        <div class="sheet-expand-box" style="height:40px;display:flex;background:rgba(1,131,250,0.1);border-radius: 5px;margin-bottom:18px;font-size:14px;">
+          <i class="el-icon-warning" style="color:#0045AF;margin:10px 16px 0 14px;height:20px;width:20px;font-size:20px;display: block;"></i>
+          <p class="color_99" style="margin:0;width:132px;font-size:14px;height:40px;line-height:40px;">已选择 {{selectedNum}} 项</p>
+          <p class="color_one cursor_hover" style="color:#0045af;margin:0;width:60px;font-size:14px;height:40px;line-height:40px;margin-right:20px;" @click="selectPage">全选本页</p>
+          <p class="color_warn cursor_hover" style="color:#ffa312;margin:0;width:60px;font-size:14px;height:40px;line-height:40px;margin-right:20px;" @click="clearSelection">清除选项</p>
+        </div>
+        <el-table class="table-box" v-loading="loading" border :data="userList" @selection-change="handleSelectionChange" ref="multipleTable" :row-key="getRowKeys">
+          <el-table-column type="selection" width="55" :reserve-selection="true" align="center" />
+          <el-table-column label="姓名" align="left" prop="userName" />
+          <el-table-column label="身份" align="left" prop="positionName" />
+          <el-table-column label="工号/学号" align="left" prop="userName" />
+          <el-table-column label="联系方式" align="left" prop="phonenumber" />
+          <el-table-column label="学院" align="left" prop="dept.deptName" />
+        </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 style="margin-top:30px;padding-top:20px;display: flex;border-top:1px solid #dedede">
+          <p style="flex:1;"></p>
+          <p style="margin-right:20px;" class="page-reset-common-style-button" @click="show(2)">取消</p>
+          <p class="page-inquire-common-style-button" @click="okButton">确定</p>
+        </div>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    getDeptDropList,
+    systemUserSelectByPage,
+  } from '@/api/commonality/permission'
+  export default {
+    name: "userList",
+    data() {
+      return {
+        userOpen:false,
+        loading:false,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        queryParams:{
+          page:1,
+          pageSize:20,
+          searchValue:"",
+          deptId:null,
+        },
+        userList:[],
+        //已选中数量
+        selectedNum:0,
+        //已选中
+        ids:[],
+        idData:[],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        //分类数据
+        typeList:[],
+        //分级数据
+        levelList:[],
+        addUserList:[],
+        deptList:[],
+      }
+    },
+    created(){
+
+    },
+    mounted(){
+      this.getDeptDropList();
+    },
+    methods:{
+      //确定按钮
+      okButton(){
+        if(!this.ids[0]){
+          this.msgError("请勾选人员")
+          return
+        }
+        this.$parent.takeUserData(this.ids,this.idData);
+      },
+      show(data){
+        let self = this;
+        this.resetQuery();
+        this.getDeptDropList();
+        this.userOpen = !this.userOpen;
+        if(data){
+          this.addUserList = data;
+        }
+        self.getList();
+      },
+      //获取学院
+      getDeptDropList(){
+        getDeptDropList({level: 2, deptType: 1 }).then(response => {
+          this.$set(this,'deptList',response.data);
+        });
+      },
+      //获取数据列表
+      getList(){
+        this.$set(this,'loading',true);
+        let obj = JSON.parse(JSON.stringify(this.queryParams));
+        obj.ids = this.addUserList[0]?this.addUserList:null;
+        obj.include = true;
+        systemUserSelectByPage(obj).then(response => {
+          this.$set(this,'userList',response.data.records);
+          this.$set(this,'total',response.data.total);
+          this.$set(this,'loading',false);
+        });
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.page = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        // this.resetForm("queryForm");
+        this.queryParams.searchValue = "";
+        this.queryParams.deptId = null;
+        this.handleQuery();
+      },
+      /*===记录勾选数据===
+        需要再el-table 添加  :row-key="getRowKeys"
+        需要在selection 添加 :reserve-selection="true"
+      */
+      getRowKeys(row) {
+        return row.userId
+      },
+      //选择本页
+      selectPage(){
+        this.$refs.multipleTable.toggleAllSelection()
+      },
+      //清除选择
+      clearSelection(){
+        this.$refs.multipleTable.clearSelection()
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.selectedNum = selection.length;
+        this.ids = selection.map(item => item.userId);
+        this.idData = selection.map(item => item);
+        this.single = selection.length!==1
+        this.multiple = !selection.length
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .userList{
+    height:700px;
+    display: flex!important;
+    flex-direction: column;
+  }
+</style>

+ 301 - 0
src/views/hierarchicalControl/gradeManageRecord/index.vue

@@ -0,0 +1,301 @@
+<!--分级管控执行-->
+<template>
+  <div class="app-container gradeManageRecord">
+    <div class="page-container gradeManageRecord-page" v-if="pageType == 1">
+      <div class="page-form-title-box">
+        <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" v-show="showSearch" label-width="70px">
+          <el-form-item label="" prop="searchValue" label-width="60px">
+            <el-input
+              style="width:150px;"
+              v-model="queryParams.searchValue"
+              placeholder="规则名称"
+              size="small"
+            />
+          </el-form-item>
+          <el-form-item label="" prop="deptId" label-width="46px">
+            <el-select v-model="queryParams.deptId" placeholder="请选择学院" clearable style="width:150px;">
+              <el-option
+                v-for="dict in deptIdOptionList"
+                :key="dict.deptId"
+                :label="dict.deptName"
+                :value="dict.deptId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="typeId">
+            <el-select v-model="queryParams.typeId" placeholder="请选择安全分类" clearable style="width:150px;">
+              <el-option
+                v-for="dict in typeOptionList"
+                :key="dict.typeId"
+                :label="dict.typeName"
+                :value="dict.typeId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="level">
+            <el-select v-model="queryParams.level" placeholder="请选择安全分级" clearable style="width:150px;">
+              <el-option
+                v-for="dict in levelOptionList"
+                :key="dict.levelId"
+                :label="dict.levelName"
+                :value="dict.levelId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="cycle">
+            <el-select v-model="queryParams.cycle" placeholder="请选择执行周期" clearable style="width:150px;">
+              <el-option
+                v-for="dict in cycleList"
+                :key="dict"
+                :label="dict"
+                :value="dict"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="status" label-width="40px">
+            <el-select v-model="queryParams.status" placeholder="请选择执行状态" clearable style="width:150px;">
+              <el-option label="未执行" value="0" />
+              <el-option label="已执行" value="2" />
+            </el-select>
+          </el-form-item>
+          <!--<el-form-item label="执行时间" prop="carryTime">-->
+          <!--<el-date-picker-->
+          <!--:clearable="false"-->
+          <!--v-model="createTimeDate"-->
+          <!--size="small"-->
+          <!--style="width: 240px"-->
+          <!--value-format="yyyy-MM-dd"-->
+          <!--type="daterange"-->
+          <!--range-separator="-"-->
+          <!--start-placeholder="开始日期"-->
+          <!--end-placeholder="结束日期"-->
+          <!--&gt;</el-date-picker>-->
+          <!--</el-form-item>-->
+          <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-item>
+        </el-form>
+      </div>
+      <div class="page-content-box">
+        <el-table class="table-box" v-loading="loading" border :data="gradeManageRecordList">
+          <el-table-column label="实验室" align="center" prop="subName" width="199" show-overflow-tooltip/>
+          <el-table-column label="规则名称" align="center" prop="ruleName" show-overflow-tooltip/>
+          <el-table-column label="类型" align="center" prop="moldName" width="149"/>
+          <el-table-column label="安全分类" align="center" prop="typeName" width="130"/>
+          <el-table-column label="安全分级" align="center" prop="levelName" width="130"/>
+          <el-table-column label="学院" align="center" prop="deptName" width="130" show-overflow-tooltip/>
+          <el-table-column label="执行周期" align="center" prop="cycle" width="149"/>
+          <el-table-column label="状态" align="center" prop="status"width="149">
+            <template slot-scope="scope">
+              <span :class="scope.row.status==2?'tableTypeColorA':''">{{scope.row.status==0?'未执行':(scope.row.status==2?'已执行':'')}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="执行时间" align="center" prop="carryTime" width="150">
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.carryTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" v-if="tableButtonType">
+            <template slot-scope="scope">
+              <div class="table-button-box">
+                <p class="table-button-null"></p>
+                <p class="table-button-p"
+                   @click="pageTypeClick(2,scope.row)"
+                   v-hasPermi="['laboratory:gradeManageRecord:query']"
+                >详情</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.pageNum"
+                    :limit.sync="queryParams.pageSize"
+                    @pagination="getList"
+        />
+      </div>
+    </div>
+    <info-page v-if="pageType == 2" :recordId="recordId"></info-page>
+  </div>
+</template>
+
+<script>
+import {
+  laboratoryGradeManageRecordList
+} from "@/api/hierarchicalControl/index";
+import {
+  getDeptDropList,
+  laboratoryClassLevelGetList,
+  laboratoryClassTypeGetList,
+} from '@/api/commonality/permission'
+import infoPage from "./infoPage.vue"
+export default {
+  name: "GradeManageRecord",
+  components: {
+    infoPage
+  },
+  data() {
+    return {
+      tableButtonType:this.hasPermiDom(['laboratory:gradeManageRecord:query']),
+      //页面状态
+      pageType:1,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 管控执行记录表格数据
+      gradeManageRecordList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize:20,
+        searchValue: null,
+        deptId: null,
+        status: null,
+      },
+      createTimeDate:[],
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      },
+      recordId:"",
+      //学院列表
+      deptIdOptionList:[],
+      levelOptionList:[],
+      typeOptionList:[],
+      cycleList:['一天','一周','一月','季度','半年','一年'],
+    };
+  },
+  created() {
+    this.getList();
+  },
+  mounted(){
+    this.getDeptDropList();
+    this.laboratoryClassLevelGetList();
+    this.laboratoryClassTypeGetList();
+  },
+  methods: {
+    //查询安全分级
+    laboratoryClassLevelGetList(){
+      laboratoryClassLevelGetList({}).then(response=>{
+        if(response.code==200){
+          this.$set(this,'levelOptionList',response.data);
+        }
+      })
+    },
+    //查询安全分类
+    laboratoryClassTypeGetList(){
+      laboratoryClassTypeGetList({}).then(response=>{
+        if(response.code==200){
+          this.$set(this,'typeOptionList',response.data);
+        }
+      });
+    },
+    pageTypeClick(type,row){
+      if(this.pageType != type){
+        if(type == 1){
+          this.pageType = 1;
+        }else if(type == 2){
+          this.recordId = row.id;
+          this.pageType = 2;
+        }
+      }
+    },
+    /** 查询管控执行记录列表 */
+    getList() {
+      if(this.createTimeDate[0]){
+        this.queryParams.statTime = this.createTimeDate[0];
+        this.queryParams.endTime = this.createTimeDate[1];
+      }else {
+        this.queryParams.statTime = null
+        this.queryParams.endTime = null
+      }
+      this.loading = true;
+      laboratoryGradeManageRecordList(this.queryParams).then( response => {
+        this.$set(this,'gradeManageRecordList',response.data.records);
+        this.$set(this,'total',response.data.total);
+        this.loading = false;
+      });
+    },
+    //获取学院
+    getDeptDropList(){
+      getDeptDropList({level: 2, deptType: 1 }).then(response => {
+        this.$set(this,'deptIdOptionList',response.data);
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        deptId: null,
+        deptName: null,
+        userId: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null,
+        ruleId: null,
+        ruleName: null,
+        subId: null,
+        joinUserId: null,
+        userPosition: null,
+        status: 0,
+        carryTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.createTimeDate = []
+      // this.resetForm("queryForm");
+      this.$set(this,'queryParams',{
+        pageNum: 1,
+        pageSize:20,
+        searchValue: "",
+        deptId: "",
+        status: "",
+        endTime:"",
+        statTime:"",
+      });
+      this.handleQuery();
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+  .gradeManageRecord{
+    .gradeManageRecord-page{
+      .tableTypeColorA{
+        color:#2AA408;
+      }
+    }
+  }
+</style>

+ 297 - 0
src/views/hierarchicalControl/gradeManageRecord/infoPage.vue

@@ -0,0 +1,297 @@
+<template>
+  <div class="gradeManageRecord-infoPage" v-if="infoData">
+    <div class="gradeManageRecord-infoPage-min">
+      <div class="title-max-box">
+        <p>基本信息</p>
+        <p class="page-out-common-style-button" @click="backPage">返回</p>
+      </div>
+      <div class="top-subject-box">
+        <p :style="'color:'+infoData.fiedColor+';border:1px solid ;'+infoData.fiedColor+';'">{{infoData.levelName}}</p>
+        <p>{{infoData.subName}}{{infoData.roomNum?'('+infoData.roomNum+')':''}}</p>
+        <p>{{infoData.typeName}}</p>
+      </div>
+      <div class="top-info-box">
+        <div class="info-text-box">
+          <div>
+            <p>学院:</p>
+            <p>{{infoData.deptName}}</p>
+          </div>
+        </div>
+        <div class="info-text-box">
+          <div>
+            <p>执行周期:</p>
+            <p>{{infoData.cycle}}</p>
+          </div>
+        </div>
+        <div class="info-text-box">
+          <div>
+            <p>执行方式:</p>
+            <p>{{infoData.status==0?'未执行':(infoData.status==2?'已执行':'')}}</p>
+          </div>
+        </div>
+        <div class="info-text-box">
+          <div>
+            <p>执行截止时间:</p>
+            <p :class="infoData.status == 0?'tableTypeColorA':''">{{parseTime(infoData.endDate,"{y}-{m}-{d} {h}:{i}")}}</p>
+          </div>
+        </div>
+      </div>
+      <div class="top-info-box">
+        <div class="info-text-box">
+          <div>
+            <p>规则名称:</p>
+            <p>{{infoData.ruleName}}</p>
+          </div>
+        </div>
+        <div class="info-text-box">
+          <div>
+            <p>规则描述:</p>
+            <p>{{infoData.ruleRemark}}</p>
+          </div>
+        </div>
+      </div>
+      <div class="title-max-box">
+        <p>执行信息</p>
+      </div>
+      <div class="bottom-item-box bottom-item-box-one" v-if="infoData.status == 0">
+        <p>指定执行人员:</p>
+        <p>{{infoData.allUserName}}</p>
+      </div>
+      <div class="bottom-item-box bottom-item-box-one" v-if="infoData.status == 2">
+        <p>执行时间:</p>
+        <p>{{parseTime(infoData.detail.createTime,"{y}-{m}-{d} {h}:{i}")}}</p>
+      </div>
+      <div class="bottom-item-box" v-if="infoData.status == 2">
+        <p>执行人:</p>
+        <p>{{infoData.detail.createName}}</p>
+      </div>
+      <div class="bottom-item-box" v-if="infoData.status == 2">
+        <p>身份:</p>
+        <p>{{infoData.userPosition}}</p>
+      </div>
+      <div class="bottom-item-box" v-if="infoData.status == 2">
+        <p>执行描述:</p>
+        <p>{{infoData.detail.remark}}</p>
+      </div>
+      <div class="bottom-for-box" v-if="infoData.status == 2">
+        <p class="left-name-p">执行材料:</p>
+        <div class="right-max-box" v-if="infoData.detail.imgUrl">
+          <p v-for="(item,index) in infoData.detail.imgUrlList" :key="index">{{item.name}} <span @click="fullScreenViewClick(infoData.detail.imgUrlList,index)">查看</span></p>
+        </div>
+      </div>
+    </div>
+    <fullScreenView :fullScreenViewProps="fullScreenViewProps" ref="fullScreenView"></fullScreenView>
+  </div>
+</template>
+
+<script>
+  import {
+    laboratoryGradeManageWorkDetail
+  } from "@/api/hierarchicalControl/index";
+  import fullScreenView from "@/components/fullScreenView/fullScreenView.vue";
+  export default {
+    name: "infoPage",
+    components: {
+      fullScreenView
+    },
+    props:{
+      recordId:{},
+    },
+    data() {
+      return {
+        iframeSrc:"",
+        iframeIndex:0,
+        infoData:null,
+        fullScreenViewProps:[],
+      }
+    },
+    created() {
+
+    },
+    mounted(){
+      this.laboratoryGradeManageWorkDetail();
+    },
+    methods: {
+      //照片预览
+      fullScreenViewClick(list, index) {
+        let newList = [];
+        for(let i=0;i<list.length;i++){
+          newList.push(list[i].url)
+        }
+        this.$set(this, 'fullScreenViewProps', newList)
+        this.$refs['fullScreenView'].initialize(index)
+      },
+      laboratoryGradeManageWorkDetail(){
+        laboratoryGradeManageWorkDetail({id:this.recordId}).then( response => {
+          if(response.data.detail){
+            if(response.data.detail.imgUrl){
+              response.data.detail.imgUrlList = [];
+              let nameList = response.data.detail.imgName.split(',')
+              let urlList = response.data.detail.imgUrl.split(',')
+              for(let i=0;i<urlList.length;i++){
+                if(urlList[i] !='' && urlList[i] != undefined){
+                  let obj = {
+                    name:nameList[i],
+                    url:urlList[i],
+                  };
+                  response.data.detail.imgUrlList.push(obj)
+                }
+              }
+              if(response.data.detail.imgUrlList[0]){
+                this.iframeSrc = this.urlJudge(response.data.detail.imgUrlList[0].url)
+                this.iframeIndex = 0;
+              }
+            }
+          }
+          this.infoData = response.data;
+        });
+      },
+      //返回
+      backPage(){
+        this.$parent.pageTypeClick(1);
+      },
+    }
+
+  }
+</script>
+
+<style lang="scss" scoped>
+  .gradeManageRecord-infoPage{
+    flex:1;
+    display: flex!important;
+    flex-direction: column;
+    .gradeManageRecord-infoPage-min{
+      flex:1;
+      display: flex!important;
+      flex-direction: column;
+
+    }
+    *{
+      margin:0;
+      padding:0;
+    }
+    .title-max-box{
+      display: flex;
+      border-bottom:1px solid #dedede;
+      padding: 0 20px;
+      p:nth-child(1){
+        flex:1;
+        font-size:18px;
+        line-height:80px;
+        color:#0045AF;
+      }
+      p:nth-child(2){
+        margin-top:20px;
+      }
+    }
+    .top-subject-box{
+      display: flex;
+      margin:30px 0 0 50px;
+      p:nth-child(1){
+        line-height:30px;
+        padding:0 16px;
+        border-radius:6px;
+        font-size:14px;
+        font-weight:500;
+        margin-right:18px;
+      }
+      p:nth-child(2){
+        line-height:30px;
+        font-size:16px;
+        color:#333;
+        margin-right:18px;
+      }
+      p:nth-child(3){
+        line-height:30px;
+        font-size:14px;
+        color:#333;
+        font-weight:500;
+      }
+    }
+    .top-info-box{
+      display: flex;
+      .info-text-box{
+        /*display: inline-block;*/
+        flex:1;
+        /*width:280px;*/
+        margin-top:30px;
+        div{
+          display: flex;
+          p{
+            font-size:14px;
+            font-weight: 500;
+          }
+          p:nth-child(1){
+            width:120px;
+            text-align: right;
+            color:#999;
+          }
+          p:nth-child(2){
+            flex:1;
+            color:#333;
+          }
+          .tableTypeColorA{
+            color:#FF6464!important;
+          }
+        }
+      }
+    }
+    .bottom-item-box-one{
+      margin-top:30px;
+    }
+    .bottom-item-box{
+      display: flex;
+      margin-bottom:20px;
+      p{
+        font-size:14px;
+        font-weight:500;
+      }
+      p:nth-child(1){
+        width:120px;
+        text-align: right;
+        color: #999;
+      }
+      p:nth-child(2){
+        flex:1;
+        color:#333;
+      }
+    }
+    .bottom-for-box{
+      display: flex;
+      .left-name-p{
+        width:120px;
+        text-align: right;
+        line-height:30px;
+        font-weight: 500;
+        font-size:14px;
+        color:#999999;
+      }
+      .right-max-box{
+        flex:1;
+        p{
+          font-weight: 500;
+          line-height:30px;
+          font-size:14px;
+          color:#0183FA;
+          span{
+            cursor: pointer;
+            margin-left:40px;
+          }
+        }
+        .colorA{
+          background: rgba(204,230,254,1);
+          color:#0183FA;
+        }
+        .colorB{
+          background: #e0e0e0;
+          color:#999;
+        }
+      }
+    }
+    .iframe-box{
+      margin:20px 40px;
+      width:1100px;
+      height:800px;
+    }
+  }
+</style>

+ 76 - 0
src/views/hierarchicalControl/gradeManageRecord/previewPage.vue

@@ -0,0 +1,76 @@
+<template>
+  <div class="previewPage">
+    <div class="title-box">
+      <p>{{previewData.name}}</p>
+      <p class="reset-button-one" @click="backPage">返回</p>
+    </div>
+    <div class="info-box" v-if="iframeSrc">
+      <iframe
+        class="iframe"
+        :src="iframeSrc" scrolling="auto" frameborder="0">
+      </iframe>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: "previewPage",
+    props:{
+      previewData:{},
+    },
+    data(){
+      return{
+        iframeSrc:"",
+      }
+    },
+    mounted(){
+      this.iframeSrcFunction();
+    },
+    methods: {
+      iframeSrcFunction(){
+        this.iframeSrc = this.urlJudge(this.previewData.url);
+      },
+      // 返回按钮
+      backPage(){
+        this.$parent.pageTypeClickMin(1);
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .previewPage{
+    flex:1;
+    display: flex!important;
+    flex-direction: column;
+    border-radius:10px;
+    *{
+      margin:0;
+    }
+    .title-box{
+      display: flex;
+      border-bottom:1px solid #dedede;
+      p:nth-child(1){
+        flex:1;
+        font-size:18px;
+        line-height:80px;
+        color:#0045AF;
+        padding-left:20px;
+      }
+      p:nth-child(2){
+        margin:20px;
+      }
+    }
+    .info-box{
+      margin:20px;
+      overflow-y: scroll;
+      flex:1;
+      display: flex;
+      flex-direction: column;
+      iframe{
+        flex:1;
+      }
+    }
+  }
+</style>

+ 444 - 0
src/views/hierarchicalControl/gradeManageWork/addPage.vue

@@ -0,0 +1,444 @@
+<template>
+  <div class="gradeManageRecord-addPage">
+    <div class="title-max-big-box">
+      <p>基本信息</p>
+      <p class="page-submit-common-style-button" @click="buttonClick">提交</p>
+      <p class="page-out-common-style-button" style="margin:20px 0 0 20px;" @click="backPage">返回</p>
+    </div>
+    <div class="gradeManageRecord-addPage-min scrollbar-box">
+      <div class="top-subject-box">
+        <p :style="'color:'+addData.bigItem.levelColor+';border:1px solid '+addData.bigItem.levelColor+';'" v-if="addData.bigItem.levelName">{{addData.bigItem.levelName}}</p>
+        <p style="font-weight:700;">{{addData.bigItem.subName}}{{addData.bigItem.roomNum?'('+addData.bigItem.roomNum+')':''}}</p>
+        <p>{{addData.bigItem.typeName}}</p>
+      </div>
+      <div class="top-info-box">
+        <div class="info-text-box">
+          <div>
+            <p>学院:</p>
+            <p>{{addData.bigItem.deptName}}</p>
+          </div>
+        </div>
+        <div class="info-text-box">
+          <div>
+            <p>执行周期:</p>
+            <p>{{addData.minItem.cycle}}</p>
+          </div>
+        </div>
+        <div class="info-text-box">
+          <div>
+            <p>执行方式:</p>
+            <p>{{addData.minItem.isAll == 1?'多人执行':(addData.minItem.isAll == 0?'单人执行':'')}}</p>
+          </div>
+        </div>
+        <div class="info-text-box">
+          <div>
+            <p>执行截止时间:</p>
+            <p :class="addData.minItem.status == 0?'tableTypeColorA':''">{{addData.minItem.endDate}}</p>
+          </div>
+        </div>
+      </div>
+      <div class="top-info-box">
+        <div class="info-text-box">
+          <div>
+            <p>规则名称:</p>
+            <p>{{addData.minItem.ruleName}}</p>
+          </div>
+        </div>
+        <div class="info-text-box">
+          <div>
+            <p>规则描述:</p>
+            <p>{{addData.minItem.ruleRemark}}</p>
+          </div>
+        </div>
+      </div>
+      <p class="title-max-box">执行信息</p>
+      <el-form class="add-form-box" :model="form" ref="form" :rules="rules">
+        <el-form-item label="执行描述" prop="textarea" label-width="80px" style="margin:30px 0 0">
+          <el-input
+            style="width:500px;"
+            type="textarea"
+            resize="none"
+            maxLength="50"
+            :rows="6"
+            placeholder="请输入执行描述"
+            v-model="form.textarea">
+          </el-input>
+        </el-form-item>
+        <el-form-item label="执行材料" prop="list" label-width="80px" style="margin-top:30px;" v-if="addData.minItem.isUpload == 1">
+          <div class="upload-max-box">
+            <div class="left-upload-box">
+              <el-upload
+                class="upload-demo"
+                :action="uploadImgUrl"
+                :show-file-list="false"
+                drag
+                multiple
+                :on-success="(res)=>handleAvatarSuccess(res)"
+                :headers="headers"
+                :before-upload="beforeAvatarUpload">
+                <i class="el-icon-upload" style="color:#CCE6FE;margin-top:40px;"></i>
+                <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+              </el-upload>
+            </div>
+            <div class="right-upload-box">
+              <p v-if="documentType">文件请上传 pdf / doc / docx / ppt / pptx格式</p>
+              <p v-if="videoType">视频请上传 mp4</p>
+              <p v-if="pictureType">图片请上传 png / jpeg / gif 格式</p>
+            </div>
+          </div>
+        </el-form-item>
+        <div class="right-for-max-box">
+          <div class="right-for-min-box" v-for="(item,index) in form.list" :key="index">
+            <p>{{item.name}}</p>
+            <p @click="fullScreenViewClick(form.list,index)">查看</p>
+            <p @click="delItem(index)">删除</p>
+          </div>
+        </div>
+      </el-form>
+    </div>
+    <fullScreenView :fullScreenViewProps="fullScreenViewProps" ref="fullScreenView"></fullScreenView>
+  </div>
+</template>
+
+<script>
+  import {
+    gradeManageWorkFinish
+  } from "@/api/hierarchicalControl/indexDemo";
+  import fullScreenView from "@/components/fullScreenView/fullScreenView.vue";
+  import { getToken } from "@/utils/auth";
+  export default {
+    name: "addPage",
+    components: {
+      fullScreenView,
+    },
+    props:{
+      addData:{},
+    },
+    data() {
+      return {
+        uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
+        headers: {
+          Authorization: getToken(),
+        },
+        upDataName:[],
+        form:{
+          textarea:"",
+          list:[],
+        },
+        // 表单校验
+        rules: {
+          textarea: [
+            { required: true, message: "请输入执行描述", trigger: "blur" },
+            { required: true, message: "请输入执行描述", validator: this.spaceJudgment, trigger: "blur" }
+          ],
+          list: [
+            { required: true, message: "请上传执行材料", trigger: "blur" },
+            { required: true, message: "请上传执行材料", validator: this.spaceJudgment, trigger: "blur" }
+          ],
+        },
+        previewData:{},
+        documentType:false,
+        videoType:false,
+        pictureType:false,
+        indexOfList:[],
+        fullScreenViewProps:[],
+      }
+    },
+    created() {
+      // this.$set(this,'form',this.addData.detail)
+    },
+    mounted(){
+      let self = this;
+      let list = this.addData.minItem.fileFormat.split(',');
+      for(let i=0;i<list.length;i++){
+        if(list[i] == '1'){
+          self.documentType = true;
+          self.indexOfList.push('application/pdf');
+          self.indexOfList.push('application/msword');
+          self.indexOfList.push('application/vnd.openxmlformats-officedocument.wordprocessingml.document');
+          self.indexOfList.push('application/vnd.ms-powerpoint');
+          self.indexOfList.push('application/vnd.openxmlformats-officedocument.presentationml.presentation');
+        }else if(list[i] == '2'){
+          self.videoType = true;
+          self.indexOfList.push('video/mp4');
+        }else if(list[i] == '3'){
+          self.pictureType = true;
+          self.indexOfList.push('image/png');
+          self.indexOfList.push('image/jpeg');
+          self.indexOfList.push('image/gif');
+        }
+      }
+    },
+    methods: {
+      //提交
+      buttonClick(){
+        let self = this;
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            this.$confirm('是否确认提交?', "警告", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(function() {
+              let obj = {
+                subId:self.addData.bigItem.subId,
+                ruleId:self.addData.minItem.ruleId,
+                ruleUserId:self.addData.minItem.ruleUserId,
+                isUpload:self.addData.minItem.isUpload,
+                endDate:self.addData.minItem.endDate,
+                detail:{
+                  remark:self.form.textarea,
+                  imgUrl:"",
+                  imgName:"",
+                },
+                ruleType:self.addData.minItem.ruleType
+              };
+              if(self.form.list[0]){
+                for(let i=0;i<self.form.list.length;i++){
+                  obj.detail.imgUrl = obj.detail.imgUrl + self.form.list[i].url + ','
+                  obj.detail.imgName = obj.detail.imgName + self.form.list[i].name + ','
+                }
+              }
+              gradeManageWorkFinish(obj).then( response => {
+                self.msgSuccess("操作成功");
+                self.$parent.pageTypeClick(1);
+              });
+            }).then(() => {
+            }).catch(() => {});
+          }
+        });
+      },
+      //照片预览
+      fullScreenViewClick(list, index) {
+        let newList = [];
+        for(let i=0;i<list.length;i++){
+          newList.push(list[i].url)
+        }
+        this.$set(this, 'fullScreenViewProps', newList)
+        this.$refs['fullScreenView'].initialize(index)
+      },
+      //返回
+      backPage(){
+        this.$parent.pageTypeClick(1);
+      },
+      //删除上传项
+      delItem(index){
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+        }).then(() => {
+          this.form.list.splice(index,1);
+          this.$forceUpdate();
+        }).catch(() => {});
+      },
+      //上传相关
+      handleAvatarSuccess(res) {
+        if(this.form.list.length>4){
+          this.$message.error('最多上传5个文件');
+          return
+        }
+        let obj ={
+          name:this.upDataName,
+          url:res.data.url,
+        };
+        this.form.list.push(obj);
+        this.$forceUpdate()
+      },
+      beforeAvatarUpload(file) {
+        let type = false;
+        if(this.indexOfList.indexOf(file.type) == -1){
+          this.$message.error('上传文件格式错误');
+          type = false;
+        }else{
+          if(this.form.list.length>4){
+            this.$message.error('最多上传5个文件');
+            type = false;
+          }else{
+            this.upDataName = file.name;
+            type = true;
+          }
+        }
+        if(this.form.list.length>4){
+          this.$message.error('最多上传5个文件');
+          type = false;
+        }
+        return type;
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .gradeManageRecord-addPage{
+    flex:1;
+    display: flex!important;
+    flex-direction: column;
+    overflow: hidden;
+    *{
+      margin:0;
+      padding:0;
+    }
+    .title-max-big-box{
+      display: flex;
+      border-bottom:1px solid #dedede;
+      padding:0 20px!important;
+      p:nth-child(1){
+        flex:1;
+        font-size:18px;
+        line-height:80px;
+        color:#0045AF;
+      }
+      p:nth-child(2){
+        margin-top:20px;
+      }
+    }
+    .gradeManageRecord-addPage-min{
+      flex:1;
+      display: flex!important;
+      flex-direction: column;
+      border-radius:10px;
+      .title-max-box{
+        display: flex;
+        border-bottom:1px solid #dedede;
+        padding:0 20px!important;
+        p:nth-child(1){
+          flex:1;
+          font-size:18px;
+          line-height:80px;
+          color:#0045AF;
+        }
+        p:nth-child(2){
+          margin-top:20px;
+        }
+      }
+      .add-form-box{
+        padding:0 20px!important;
+
+      }
+      .top-subject-box{
+        display: flex;
+        margin:30px 0 0 50px;
+        padding:0 20px!important;
+        p:nth-child(1){
+          line-height:30px;
+          padding:0 16px;
+          border-radius:6px;
+          font-size:14px;
+          font-weight:500;
+          margin-right:18px;
+        }
+        p:nth-child(2){
+          line-height:30px;
+          font-size:16px;
+          color:#333;
+          margin-right:18px;
+        }
+        p:nth-child(3){
+          line-height:30px;
+          font-size:14px;
+          color:#333;
+          font-weight:500;
+        }
+      }
+      .top-info-box{
+        display: flex;
+        padding:0 20px!important;
+        .info-text-box{
+          /*display: inline-block;*/
+          flex:1;
+          /*width:280px;*/
+          margin-top:30px;
+          div{
+            display: flex;
+            p{
+              font-size:14px;
+              font-weight: 500;
+            }
+            p:nth-child(1){
+              width:120px;
+              text-align: right;
+              color:#999;
+            }
+            p:nth-child(2){
+              flex:1;
+              color:#333;
+            }
+            .tableTypeColorA{
+              color:#FF6464!important;
+            }
+          }
+        }
+      }
+      .title-max-box{
+        font-size:18px;
+        line-height:80px;
+        color:#0045AF;
+        border-bottom:1px solid #dedede;
+      }
+      .avatar-uploader{
+        .left-button{
+          width:200px;
+        }
+      }
+      .right-for-max-box{
+        margin:30px 0 0 80px;
+        overflow: hidden;
+        .right-for-min-box{
+          padding:0 11px;
+          margin:0 20px 20px 0;
+          border-radius:4px;
+          display: flex;
+          p{
+            font-weight:500;
+            font-size:12px;
+          }
+          p:nth-child(1){
+            width:300px;
+            color:#333;
+            display:block;
+            overflow:hidden;
+            text-overflow:ellipsis;
+            white-space:nowrap;
+          }
+          p:nth-child(2){
+            color:#0183FA;
+            margin:0 30px 0 60px;
+            cursor: pointer;
+          }
+          p:nth-child(3){
+            color:#0183FA;
+            cursor: pointer;
+
+          }
+        }
+      }
+      .bottom-button{
+        display: flex;
+        margin:40px auto;
+        p{
+          font-size:14px;
+        }
+        p:nth-child(1){
+          margin-right:30px;
+        }
+      }
+      .upload-max-box{
+        display: flex;
+        .right-upload-box{
+          margin-left:30px;
+          color:#9E9E9E;
+          font-size:14px;
+          font-weight:500;
+          padding-top:50px;
+          p{
+            margin:0;
+            line-height:30px;
+          }
+
+        }
+      }
+    }
+  }
+</style>

+ 288 - 0
src/views/hierarchicalControl/gradeManageWork/index.vue

@@ -0,0 +1,288 @@
+<!--分级管控工作-->
+<template>
+  <div class="app-container gradeManageRecord">
+    <div class="page-container gradeManageRecord-page " v-if="pageType == 1">
+      <div class="page-form-title-box">
+        <el-form :model="queryParams" ref="queryForm" style="padding-bottom:20px;margin-bottom:20px;" :inline="true" v-show="showSearch" label-width="80px">
+          <el-form-item label="" prop="subName" label-width="60px">
+            <el-input
+              style="width:150px;"
+              v-model="queryParams.subName"
+              placeholder="实验室名称"
+              size="small"
+            />
+          </el-form-item>
+          <el-form-item label="" prop="deptId" label-width="56px">
+            <el-select v-model="queryParams.deptId" placeholder="请选择学院" clearable style="width:150px;">
+              <el-option
+                v-for="dict in deptIdOptionList"
+                :key="dict.deptId"
+                :label="dict.deptName"
+                :value="dict.deptId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="typeId">
+            <el-select v-model="queryParams.typeId" placeholder="请选择安全分类" clearable style="width:150px;">
+              <el-option
+                v-for="dict in typeOptionList"
+                :key="dict.typeId"
+                :label="dict.typeName"
+                :value="dict.typeId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="level">
+            <el-select v-model="queryParams.level" placeholder="请选择安全分级" clearable style="width:150px;">
+              <el-option
+                v-for="dict in levelOptionList"
+                :key="dict.levelId"
+                :label="dict.levelName"
+                :value="dict.levelId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="cycle">
+            <el-select v-model="queryParams.cycle" placeholder="请选择执行周期" clearable style="width:150px;">
+              <el-option
+                v-for="dict in cycleList"
+                :key="dict"
+                :label="dict"
+                :value="dict"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <p class="page-inquire-common-style-button" style="margin:0 20px;" @click="handleQuery">查询</p>
+            <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div class="for-max-big-box scrollbar-box">
+        <img v-if="!gradeManageList[0]" src="@/assets/ZDimages/basicsModules/null-data-1.png" style="width:300px;margin:200px auto;display: block">
+        <div class="for-max-box" v-for="(item,index) in gradeManageList" :key="index">
+          <div class="for-title-box">
+            <div class="for-title-type-box" :style="'color:'+item.levelColor+';border:1px solid '+item.levelColor+';'" v-if="item.levelName">
+              <p>{{item.levelName}}</p>
+            </div>
+            <p class="for-title-name-p">{{item.subName}}{{item.roomNum?'('+item.roomNum+')':''}}</p>
+            <p class="for-title-dept-p">学院:{{item.deptName}}</p>
+          </div>
+          <el-table :data="item.detailList" border class="table-box">
+            <el-table-column label="规则名称" align="left" prop="ruleName" />
+            <el-table-column label="执行周期" align="left" prop="cycle" width="230"/>
+            <el-table-column label="截止执行时间" align="left" prop="carryTime" width="300">
+              <template slot-scope="scope">{{scope.row.endDate?scope.row.endDate:'-'}}</template>
+            </el-table-column>
+            <el-table-column label="操作" align="left" prop="text1" width="110">
+              <template slot-scope="scope">
+                <div class="table-button-box">
+                  <p class="table-button-null"></p>
+                  <p class="table-button-p" @click="pageTypeClick(2,item,scope.row)">完成</p>
+                  <p class="table-button-null"></p>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </div>
+    <add-page v-if="pageType == 2" :addData="addData"></add-page>
+  </div>
+</template>
+
+<script>
+import {
+  gradeManageWorkList,
+} from "@/api/hierarchicalControl/index";
+import {
+  getDeptDropList,
+  laboratoryClassLevelGetList,
+  laboratoryClassTypeGetList,
+} from '@/api/commonality/permission'
+import addPage from "./addPage.vue"
+export default {
+  name: "GradeManageWork",
+  components: {
+    addPage
+  },
+  data() {
+    return {
+      pageType:1,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 分级��控管理表格数据
+      gradeManageList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        deptId: null,
+        deptName: null,
+        userId: null,
+        level: null,
+        typeId: null,
+        subIds: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      },
+      //提交传参
+      addData:{},
+      recordId:"",
+      deptIdOptionList:[],
+      levelOptionList:[],
+      typeOptionList:[],
+      cycleList:['一天','一周','一月','季度','半年','一年'],
+    };
+  },
+  created() {
+    this.gradeManageWorkList();
+    this.getDeptDropList();
+    this.laboratoryClassLevelGetList();
+    this.laboratoryClassTypeGetList();
+  },
+  methods: {
+    //获取学院
+    getDeptDropList(){
+      getDeptDropList({level: 2, deptType: 1 }).then(response => {
+        this.$set(this,'deptIdOptionList',response.data);
+      });
+    },
+    //查询安全分级
+    laboratoryClassLevelGetList(){
+      laboratoryClassLevelGetList({}).then(response=>{
+        if(response.code==200){
+          this.$set(this,'levelOptionList',response.data);
+        }
+      })
+    },
+    //查询安全分类
+    laboratoryClassTypeGetList(){
+      laboratoryClassTypeGetList({}).then(response=>{
+        if(response.code==200){
+          this.$set(this,'typeOptionList',response.data);
+        }
+      });
+    },
+    handleQuery() {
+      this.gradeManageWorkList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.createTimeDate = []
+      // this.resetForm("queryForm");
+      this.$set(this,'queryParams',{
+        subName: "",
+        deptId: "",
+        typeId: "",
+        level:"",
+        cycle:"",
+      });
+      this.handleQuery();
+    },
+    gradeManageWorkList(){
+      gradeManageWorkList(this.queryParams).then( response => {
+        this.$set(this,'gradeManageList',response.data);
+      });
+    },
+    pageTypeClick(type,item,row){
+      if(this.pageType != type){
+        if(type == 1){
+          this.pageType = 1;
+          this.gradeManageWorkList();
+        }else if(type == 2){
+          let obj = {
+            bigItem:item,
+            minItem:row
+          };
+          this.addData = JSON.parse(JSON.stringify(obj));
+          this.pageType = 2;
+        }
+      }
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+  .gradeManageRecord{
+    .top-button-box{
+      display: flex;
+      background: #CCE6FE ;
+      border-radius:10px;
+      height:60px;
+      margin:5px 20px 0 10px;
+      p{
+        line-height: 60px;
+        font-size:14px;
+        font-weight:500;
+        color:#0183FA;
+      }
+      p:nth-child(1){
+        flex:1;
+        margin-left:28px;
+      }
+      p:nth-child(2){
+        cursor: pointer;
+      }
+      i:nth-child(3){
+        line-height: 60px;
+        color:#0256FF ;
+        font-size:22px;
+        margin:0 33px;
+        cursor: pointer;
+      }
+    }
+    .gradeManageRecord-page{
+      .for-max-big-box{
+        padding:20px;
+        .for-max-box{
+          .for-title-box{
+            display: flex;
+            margin-bottom:20px;
+            .for-title-type-box{
+              padding:0 20px;
+              border-radius:4px;
+              margin-right:20px;
+              p{
+                text-align: center;
+                font-size:16px;
+                font-weight:500;
+                line-height:30px;
+              }
+            }
+            .for-title-name-p{
+              margin:0 45px 0 0;
+              line-height:32px;
+              font-size:16px;
+              font-weight:500;
+            }
+            .for-title-dept-p{
+              line-height:32px;
+              font-size:16px;
+              font-weight:500;
+            }
+          }
+          .table-box{
+            margin-bottom: 20px;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 0 - 284
src/views/hierarchicalControl/workExecute/index.vue

@@ -1,284 +0,0 @@
-<!-- 工作执行 -->
-<template>
-  <div class="app-container workExecute">
-    <div class="page-container workExecutePage" v-if="pageType === 1">
-      <div class="page-form-title-box">
-        <el-form :model="queryParams" class="form-box" ref="queryForm"
-                 :inline="true" style="width:100%;">
-          <el-form-item label="" prop="name">
-            <el-input
-              maxLength="30"
-              v-model="queryParams.name"
-              placeholder="管控名称"
-              style="width: 200px"
-            />
-          </el-form-item>
-          <el-form-item label="" prop="deptId">
-            <el-select v-model="queryParams.deptId" placeholder="二级单位" style="width: 200px">
-              <el-option
-                v-for="dict in deptOptions"
-                :key="dict.deptId"
-                :label="dict.deptName"
-                :value="dict.deptId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="typeId">
-            <el-select v-model="queryParams.typeId" placeholder="安全分类" style="width: 200px">
-              <el-option
-                v-for="dict in typeList"
-                :key="dict.typeId"
-                :label="dict.typeName"
-                :value="dict.typeId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="levelId">
-            <el-select v-model="queryParams.levelId" placeholder="安全分级" style="width: 200px">
-              <el-option
-                v-for="dict in levelList"
-                :key="dict.levelId"
-                :label="dict.levelName"
-                :value="dict.levelId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
-          <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
-        </el-form>
-      </div>
-      <div class="page-content-box">
-        <el-table class="table-box" v-loading="loading" border :data="dataList">
-          <el-table-column label="管控名称" prop="name"  show-overflow-tooltip/>
-          <el-table-column label="二级单位" prop="deptName" width="160" show-overflow-tooltip/>
-          <el-table-column label="安全分类" prop="typeName" width="160" show-overflow-tooltip/>
-          <el-table-column label="安全分级" prop="levelName" width="160" show-overflow-tooltip/>
-          <el-table-column label="执行状态" prop="status" width="100" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <span :class="scope.row.status == 1?'colorA':'colorB'">{{scope.row.status == 1?'已执行':'未执行'}}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="创建人" prop="createUser" width="200" show-overflow-tooltip/>
-          <el-table-column label="实验室" prop="subName" width="160" show-overflow-tooltip>
-            <template slot-scope="scope">{{scope.row.subName?scope.row.subName:'--'}}</template>
-          </el-table-column>
-          <el-table-column label="创建时间" prop="createTime" width="150" 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="deadline" width="150" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <span>{{ scope.row.deadline?parseTime(scope.row.deadline,"{y}-{m}-{d}"):'--' }}</span>
-              <span style="margin-left:5px;color:red;" v-if="scope.row.deadlineNum&&deadlineNum>scope.row.deadlineNum">已逾期</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="操作" width="140" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <div class="table-button-box">
-                <p class="table-button-null"></p>
-                <p class="table-button-p"
-                   v-if="scope.row.status == 1"
-                   @click="tableButton(2,scope.row)"
-                >详情</p>
-                <p class="table-button-p"
-                   v-if="scope.row.status == 0"
-                   @click="tableButton(3,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>
-    <info-page :propsData="propsData" v-if="pageType === 2"></info-page>
-  </div>
-</template>
-<script>
-  import {
-    getDeptDropList,
-    laboratoryClassTypeGetList,
-    laboratoryClassLevelGetList,
-  } from '@/api/commonality/permission'
-  import { laboratoryGradeManageList } from "@/api/hierarchicalControl/index";
-  import infoPage from "./infoPage.vue";
-  export default {
-    name: 'index',
-    components: {
-     infoPage
-    },
-    data () {
-      return {
-        //页面状态
-        pageType:1,
-        //页面遮罩
-        loading:false,
-        //下拉列表数据
-        deptOptions:[],
-        typeList:[],
-        levelList:[],
-        //查询条件
-        queryParams:{
-          page:1,
-          pageSize:20,
-          name:"",
-          deptId :null,
-          typeId :null,
-          levelId :null,
-          status :0,
-        },
-        meUserId:localStorage.getItem('userId'),
-        //时间数据
-        dateRange:[],
-        //列表数据
-        dataList:[],
-        //数据数量
-        total:0,
-        //组件传参
-        propsData:{},
-        deadlineNum:null,
-      }
-    },
-    created () {
-
-    },
-    mounted () {
-      const now = new Date();
-      let yy = now.getFullYear()+'-'+now.getMonth()+'-'+now.getDate()
-      this.$set(this,'deadlineNum',new Date(yy).getTime());
-      this.getDeptDropList();
-      this.laboratoryClassTypeGetList();
-      this.laboratoryClassLevelGetList();
-      this.getList();
-    },
-    methods: {
-      //查询按钮
-      handleQuery(){
-        this.$set(this.queryParams,'page',1);
-        this.getList();
-      },
-      //重置按钮
-      resetQuery(){
-        this.$set(this,'dateRange',[])
-        this.$set(this,'queryParams',{
-          page:1,
-          pageSize:20,
-          name:"",
-          deptId :null,
-          typeId :null,
-          levelId :null,
-          status :0,
-        });
-        this.getList();
-      },
-      //获取数据列表
-      getList(){
-        let obj = JSON.parse(JSON.stringify(this.queryParams))
-        obj.executionUserId = this.meUserId;
-        laboratoryGradeManageList(obj).then(response => {
-          //返回时间戳
-          for(let i=0;i<response.data.records.length;i++){
-            if(response.data.records[i].deadline){
-              response.data.records[i].deadlineNum = new Date(response.data.records[i].deadline).getTime()
-            }else{
-              response.data.records[i].deadlineNum = 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);
-          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(() => {});
-        }else if(type == 6){
-          //返回并刷新
-          this.$set(this,'pageType',1);
-          this.getList();
-        }
-      },
-      /** 查询二级单位列表 */
-      getDeptDropList() {
-        getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
-          this.$set(this, 'deptOptions', response.data)
-        })
-      },
-      //查询安全分级
-      laboratoryClassLevelGetList() {
-        laboratoryClassLevelGetList({}).then(response => {
-          this.$set(this, 'levelList', response.data)
-        })
-      },
-      //查询安全分类
-      laboratoryClassTypeGetList() {
-        laboratoryClassTypeGetList({}).then(response => {
-          this.$set(this, 'typeList', response.data)
-        })
-      },
-    },
-  }
-</script>
-<style scoped lang="scss">
-  .workExecute{
-    .workExecutePage{
-
-      .colorA{
-        color:#0183FA;
-      }
-      .colorB{
-        color: #c88400;
-      }
-    }
-  }
-</style>

+ 0 - 167
src/views/hierarchicalControl/workExecute/infoPage.vue

@@ -1,167 +0,0 @@
-<template>
-  <div class="page-container workExecute-infoPage">
-    <div class="page-top-title-box">
-      <p class="page-top-title-name-p">工作执行</p>
-      <p class="page-top-title-out-p" @click="backPage">返回</p>
-      <p class="page-top-title-add-p" v-if="!newData.status" @click="openDialog">完成</p>
-    </div>
-    <div class="content-box scrollbar-box">
-      <el-form class="add-form-box">
-        <div class="text-max-box">
-          <p>管控名称:</p>
-          <p>{{newData.name}}</p>
-        </div>
-        <div class="text-max-box">
-          <p>管控描述:</p>
-          <p>{{newData.manageDes}}</p>
-        </div>
-        <div class="text-max-box">
-          <p>二级单位:</p>
-          <p>{{newData.deptName}}</p>
-        </div>
-        <div class="text-max-box">
-          <p>安全分类:</p>
-          <p>{{newData.typeName}}</p>
-        </div>
-        <div class="text-max-box">
-          <p>安全分级:</p>
-          <p>{{newData.levelName}}</p>
-        </div>
-        <div class="text-max-box">
-          <p>状态:</p>
-          <p :class="newData.status == 1?'colorA':'colorB'">{{newData.status == 1?'已执行':'未执行'}}</p>
-        </div>
-        <div class="text-max-box" v-if="newData.status == 1">
-          <p>执行人:</p>
-          <p>{{newData.executionUser}}</p>
-        </div>
-        <div class="text-max-box" v-if="newData.status == 1">
-          <p>执行时间:</p>
-          <p>{{parseTime(newData.executionTime,"{y}-{m}-{d} {h}:{i}")}}</p>
-        </div>
-        <div class="text-max-box" v-if="newData.status == 1">
-          <p>执行备注:</p>
-          <p>{{newData.remark}}</p>
-        </div>
-      </el-form>
-    </div>
-    <el-dialog class="conditionsSettings-dialog" title='执行完成' width="760px" append-to-body
-               :visible.sync="shadeType" v-if="shadeType" @close="dialogOff()"
-               :close-on-click-modal="false" :close-on-press-escape="false">
-      <div>
-        <el-form :model="addForm" ref="addForm" :inline="true" :rules="rules">
-          <el-form-item label="执行描述" prop="remark">
-            <el-input type="textarea" resize="none" style="width:630px;" show-word-limit
-                      :rows="4"
-                      v-model="addForm.remark" placeholder="请输入执行描述" maxlength="100"/>
-          </el-form-item>
-        </el-form>
-      </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="submitForm">提交</p>
-        <p class="dialog-footer-button-null"></p>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-  import { laboratoryGradeManageExecute } from "@/api/hierarchicalControl/index";
-  export default {
-    name: 'infoPage',
-    props:{
-      propsData:{},
-    },
-    data(){
-      return{
-        newData:{},
-        addForm:{
-          remark:'',
-        },
-        rules: {
-          remark: [
-            { required: true, message: "请输入执行描述", trigger: "blur" },
-            { required: true, message: "请输入执行描述", validator: this.spaceJudgment, trigger: "blur" }
-          ],
-        },
-        shadeType:false,
-      }
-    },
-    created(){
-
-    },
-    mounted(){
-      if(this.propsData.id){
-        this.$set(this,'newData',this.propsData);
-      }
-    },
-    methods:{
-      // 返回按钮
-      backPage(){
-        this.$parent.tableButton(6);
-      },
-      /** 提交按钮 */
-      submitForm() {
-        this.$refs["addForm"].validate(valid => {
-          if (valid) {
-            let obj = {
-              id:this.newData.id,
-              remark:this.addForm.remark,
-              status:1,
-            }
-            laboratoryGradeManageExecute(obj).then(response => {
-              this.msgSuccess(response.message)
-              this.backPage();
-            })
-          }
-        })
-      },
-      openDialog(){
-        this.$set(this,'shadeType',true);
-      },
-      dialogOff(){
-        this.$set(this,'shadeType',false);
-        this.$set(this.addForm,'executeDescribe','');
-      },
-    },
-  }
-</script>
-
-<style scoped lang="scss">
-  .workExecute-infoPage{
-    .content-box{
-      flex:1;
-      display: flex;
-      padding:20px;
-      .text-max-box{
-        display: flex;
-        p{
-          font-size: 16px;
-          line-height:40px;
-        }
-        p:nth-child(1){
-          width:120px;
-          text-align: right;
-        }
-        p:nth-child(2){
-          width:1200px;
-          line-height:20px;
-          padding:10px 0;
-        }
-        .colorA{
-          color:#0183FA;
-        }
-        .colorB{
-          color: #c88400;
-        }
-      }
-      .add-execute-describe-box{
-        margin-top:10px;
-        padding-top:20px;
-        border-top:1px solid #dedede;
-      }
-    }
-  }
-</style>

+ 1 - 1
src/views/integratedManagement/laboratoryManagement/hazard/addLaboratory.vue

@@ -39,7 +39,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="小分类:" prop="smallTypeValue">
-          <el-select v-model="form.smallTypeValue" clearable placeholder="请选择分类"  @change="smallClassifyChange()" style="width: 600px">
+          <el-select v-model="form.smallTypeValue" clearable placeholder="请选择分类"  @change="smallClassifyChange()" style="width: 600px">
             <el-option
               v-for="dict in smallClassifyOptions"
               :key="dict.value"

+ 1 - 1
src/views/integratedManagement/laboratoryManagement/safetyInfoCategory/addSafetyInfoConfig.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="page-container notice-addPage">
     <div class="page-top-title-box">
-      <p class="page-top-title-name-p">{{form.id?'编辑':'新增'}}</p>
+      <p class="page-top-title-name-p">{{form.detailId?'编辑':'新增'}}</p>
       <p class="page-top-title-out-p" @click="backPage">返回</p>
       <p class="page-top-title-add-p" @click="submitForm">提交</p>
     </div>

+ 80 - 10
src/views/integratedManagement/laboratoryManagement/safetyInfoCategory/safetyInfoCategory.vue

@@ -49,6 +49,14 @@
         >信息牌配置</p>
       </el-form>
       <el-table class="table-box" border v-loading="loading" :data="tableData">
+        <el-table-column label="序号" align="left" prop="orderNum" width="75">
+          <template slot-scope="scope">
+            <el-input maxlength="4" type="text" oninput="value=value.replace(/[^0-9.]/g,'')"
+                      v-model="scope.row.orderNum" @focus="liveSort(scope.row)"
+                      @blur="editSort(scope.row)">
+            </el-input>
+          </template>
+        </el-table-column>
         <el-table-column label="类目名称" align="left" prop="brandName"/>
         <el-table-column label="内容类型" align="left"  prop="brandType">
           <template slot-scope="scope">
@@ -101,6 +109,11 @@
     <!-- 添加或修改安全分级对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :before-close="closeDialog" :close-on-click-modal="false">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="序号" prop="orderNum">
+          <el-input maxlength="4" type="text" oninput="value=value.replace(/[^0-9.]/g,'')"
+                    v-model="form.orderNum" placeholder="请输入序号">
+          </el-input>
+        </el-form-item>
         <el-form-item label="类目名称" prop="brandName">
           <el-input v-model="form.brandName" maxlength="30" placeholder="请输入类目名称" />
         </el-form-item>
@@ -132,7 +145,7 @@
 
 <script>
 import { getToken } from "@/utils/auth";
-import { laboratoryInfoBrandAdd, laboratoryInfoBrandDelete, laboratoryInfoBrandList, laboratoryInfoBrandUpdate } from '@/api/integratedManagement/index'
+import { laboratoryInfoBrandAdd, laboratoryInfoBrandDelete, laboratoryInfoBrandList, laboratoryInfoBrandUpdate,laboratoryBoardGetBrandInOrder } from '@/api/integratedManagement/index'
 import infoConfig from "./infoConfig.vue"
 export default {
   name: "Approval",
@@ -174,6 +187,9 @@ export default {
         brandName: [
           { required: true, message: "请输入类目名称", trigger: "blur" },
         ],
+        orderNum: [
+          { required: true, message: "请输入序号", trigger: "blur" },
+        ],
         brandType: [
           { required: true, message: "请选择内容类型", trigger: "blur" },
         ],
@@ -183,12 +199,63 @@ export default {
         showColour: [
           { required: true, message: "请选择颜色", trigger: "blur" }
         ],
-      }
+      },
+      // 临时保存序号
+      orderNum: '',
     };
 
 
   },
   methods: {
+      //获取安全类目最大排序
+      laboratoryBoardGetBrandInOrder(){
+        laboratoryBoardGetBrandInOrder({}).then(response => {
+          this.title='新增安全信息类目';
+          this.$set(this,'form',{
+            brandName:'',
+            brandType:'',
+            isSpecial:'',
+            showColour:'',
+            orderNum:response.data,
+          });
+          this.open = true;
+        })
+      },
+      //保存当前序号
+      liveSort(row) {
+        let obj = {
+          orderNum: row.orderNum
+        }
+        this.orderNum = JSON.parse(JSON.stringify(obj))
+      },
+      //编辑序号
+      editSort(row) {
+        let self = this
+        if (row.orderNum != this.orderNum.orderNum) {
+          self.$confirm('是否确认修改序号?', '', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(function() {
+            let obj = {
+              brandId:row.brandId,
+              brandName:row.brandName,
+              brandType:row.brandType,
+              isSpecial:row.isSpecial,
+              showColour:row.showColour,
+              orderNum: row.orderNum
+            }
+            laboratoryInfoBrandUpdate(obj).then(response => {
+              self.msgSuccess('修改成功')
+              self.getList()
+            })
+          }).then(() => {
+          }).catch(() => {
+            let obj = JSON.parse(JSON.stringify(self.orderNum))
+            row.orderNum = obj.orderNum
+          })
+        }
+      },
       titleClick(type){
         this.$parent.titleClick(type);
       },
@@ -199,14 +266,7 @@ export default {
       handleClick(index,row,doType){
         let _this=this;
         if(doType=='add'){//添加
-          this.title='新增安全信息类目';
-          this.$set(this,'form',{
-            brandName:'',
-            brandType:'',
-            isSpecial:'',
-            showColour:'',
-          });
-          this.open = true;
+          this.laboratoryBoardGetBrandInOrder();
         }else if(doType=='edit'){//编辑
           this.title='编辑安全信息类目';
           this.$set(this,'form',{
@@ -215,6 +275,7 @@ export default {
             brandType:row.brandType,
             isSpecial:row.isSpecial,
             showColour:row.showColour,
+            orderNum:row.orderNum,
           });
           this.open = true;
         }else if(doType=='deploy'){//信息牌配置
@@ -350,6 +411,15 @@ export default {
         width:200px;
         display: flex;
       }
+      .table-box{
+        ::v-deep .el-input--medium .el-input__inner {
+          height: 26px;
+          line-height: 26px;
+          width: 55px;
+          text-align: center;
+          padding: 0 10px;
+        }
+      }
     }
 
   }

+ 1 - 0
src/views/integratedManagement/laboratoryManagement/safetyInfoCategory/safetyInfoConfig.vue

@@ -161,6 +161,7 @@ export default {
       },
       handleTabClick(item,index){
         this.currentIndex = index
+        this.queryParams.page=1;
         this.queryParams.brandId=item.brandId;
         this.infoType=item.brandType;
         this.getList()

+ 2 - 4
src/views/integratedManagement/laboratoryManagement/subject/addSubject.vue

@@ -41,7 +41,7 @@
           </el-select>
         </el-form-item>
         <div style="display: inline-block;">
-          <el-form-item label="安全分级"  prop="levelId" class="form-item" v-if="!form.dynamicLeveling">
+          <el-form-item label="安全分级"  prop="levelId" class="form-item">
             <el-input
               disabled
               style="width:220px;"
@@ -54,7 +54,7 @@
           <p class="page-reset-common-style-button" @click="LevelClick()" style="margin-left:12px;margin-bottom:20px;width:90px;">分级配置</p>
         </div>
         <div style="display: inline-block;">
-          <el-form-item label="安全分类"  prop="typeId" class="form-item" v-if="!form.dynamicLeveling">
+          <el-form-item label="安全分类"  prop="typeId" class="form-item">
             <el-input
               disabled
               style="width:220px;"
@@ -314,7 +314,6 @@ import { chemicalMsdsEdit } from '@/api/chemicalManage'
           form:{
             details:"",
             hardwareType:0,
-            dynamicLeveling:false,
           },
           hardwareTypeTow:0,//临时存储准入设备状态
           // 表单校验
@@ -385,7 +384,6 @@ import { chemicalMsdsEdit } from '@/api/chemicalManage'
           this.$set(this.form,'deptId',this.subjectData.deptId)
           this.$set(this.form,'buildId',this.subjectData.buildId)
           this.$set(this.form,'floorId',this.subjectData.floorId)
-          this.$set(this.form,'dynamicLeveling',this.subjectData.dynamicLeveling)
           this.$set(this.form,'subArea',this.subjectData.subArea != 0 ? this.subjectData.subArea:'')
           //根据楼栋获取楼层
           this.systemBuildingGetOptList(3,this.form.buildId);

+ 597 - 6
src/views/integratedManagement/laboratoryManagement/subject/index.vue

@@ -38,7 +38,7 @@
                 <el-option
                   v-for="dict in typeList"
                   :key="dict.typeId"
-                  :label="dict.typeName"
+                  :label="dict.subType"
                   :value="dict.typeId"
                 ></el-option>
               </el-select>
@@ -48,7 +48,7 @@
                 <el-option
                   v-for="dict in levelList"
                   :key="dict.levelId"
-                  :label="dict.levelName"
+                  :label="dict.titleName"
                   :value="dict.levelId"
                 ></el-option>
               </el-select>
@@ -109,7 +109,7 @@
                   <p class="table-button-null"></p>
                   <p class="table-button-p" v-hasPermiRouter="['system:subject:detail']"
                      @click.stop="clickPage(7,scope.row)">详情</p>
-                  <el-dropdown trigger="click" size="mini" @command="(command) => handleCommand(command, scope.row)">
+                  <el-dropdown trigger="click" size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermiRouter="['system:subject:edit']">
                     <p class="table-button-p">更多>></p>
                     <el-dropdown-menu slot="dropdown" style="margin:0!important;">
                       <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="1"
@@ -124,7 +124,9 @@
                       <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="4"
                                         v-hasPermiRouter="['system:subject:edit']">{{scope.row.accessControl?'关闭准入':'开启准入'}}
                       </el-dropdown-item>
-                    </el-dropdown-menu>
+                      <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="5"
+                                        v-hasPermiRouter="['system:subject:edit']">信息牌下载
+                      </el-dropdown-item>                    </el-dropdown-menu>
                   </el-dropdown>
                   <p class="table-button-null"></p>
                 </div>
@@ -142,6 +144,125 @@
       </div>
       <index-right-page ref="indexRightPage"></index-right-page>
     </div>
+    <!--电子信息牌导出-->
+    <el-dialog class="subject-dialog" title='' width="1267px" append-to-body
+               :visible.sync="dialogType" v-if="dialogType" @close="dialogOff()"
+               :close-on-click-modal="false" :close-on-press-escape="false">
+      <div class="subject-dialog-button-box">
+        <p @click="dialogOff">取消</p>
+        <p @click="downloadImg">下载</p>
+      </div>
+      <div id="subject-dialog-print-box" ref="canvasImg">
+        <div class="subject-dialog-print-big-box">
+          <!--信息栏-->
+          <div class="subject-dialog-print-top-box">
+            <div class="subject-dialog-print-top-left-box">
+              <div class="subject-dialog-print-top-left-top-box">
+                <!--实验室名称-->
+                <div class="subject-dialog-name-box">
+                  <div class="title-box-1">
+                    <div class="title-box-2" :style="'background-color:'+dialogData.filedColor+';'">
+                      <div class="title-box-3">
+                        <p :style="'background-color:'+dialogData.filedColor+';'">{{dialogData.levelName}}丨{{dialogData.typeName}}</p>
+                      </div>
+                    </div>
+                  </div>
+                  <p class="title-p">实验室安全信息牌</p>
+                </div>
+                <!--实验室信息-->
+                <div class="subject-dialog-info-box">
+                  <div class="subject-dialog-info-left-box">
+                    <div class="subject-dialog-info-left-min-box">
+                      <div>
+                        <p class="text-p-left" style="margin-right:10px;">责</p>
+                        <p class="text-p-center">任</p>
+                        <p class="text-p-center">单</p>
+                        <p class="text-p-right" style="margin-left:10px;">位</p>
+                      </div>
+                      <p class="subject-dialog-info-left-p">: {{dialogData.deptName}}</p>
+                    </div>
+                    <div class="subject-dialog-info-left-min-box">
+                      <div>
+                        <p class="text-p-left" style="margin-right:6px;">实</p>
+                        <p class="text-p-center">验</p>
+                        <p class="text-p-center">室</p>
+                        <p class="text-p-center">名</p>
+                        <p class="text-p-right" style="margin-left:6px;">称</p>
+                      </div>
+                      <p class="subject-dialog-info-left-p">: {{dialogData.subjectName}} - {{dialogData.room}}</p>
+                    </div>
+                    <div class="subject-dialog-info-left-min-box">
+                      <div>
+                        <p class="text-p-left" style="margin-right:2px;">实</p>
+                        <p class="text-p-center">验</p>
+                        <p class="text-p-center">室</p>
+                        <p class="text-p-center">负</p>
+                        <p class="text-p-center">责</p>
+                        <p class="text-p-right" style="margin-left:2px;">人</p>
+                      </div>
+                      <p class="subject-dialog-info-left-p">: {{dialogData.adminName}}|{{dialogData.adminPhone}}</p>
+                    </div>
+                    <div class="subject-dialog-info-left-min-box">
+                      <div>
+                        <p class="text-p-left" style="margin-right:2px;">实</p>
+                        <p class="text-p-center">验</p>
+                        <p class="text-p-center">室</p>
+                        <p class="text-p-center">安</p>
+                        <p class="text-p-center">全</p>
+                        <p class="text-p-right" style="margin-left:2px;">员</p>
+                      </div>
+                      <p class="subject-dialog-info-left-p">: <span v-for="(item,index) in dialogData.safeUserVoList" :key="index">{{index==1?' 、':''}}{{item.safeUserName}}|{{item.safeUserPhone}}</span></p>
+                    </div>
+                  </div>
+                  <div class="subject-dialog-info-right-box">
+                    <vue-qr style="display: block;height:110px;width:110px;"
+                      :text="identification+'?'+dialogData.qrCodeUrl" :size="300">
+                    </vue-qr>
+                  </div>
+                </div>
+              </div>
+              <div class="subject-dialog-print-top-left-bottom-box">
+                <!--1号右侧信息栏-->
+                <div class="subject-dialog-print-top-left-bottom-left-box" v-if="dialogData.dataOne">
+                  <p class="data-title" :style="'background-color:'+dialogData.dataOne.showColour+';'">{{dialogData.dataOne.classifyName}}</p>
+                  <div class="data-for-text" v-if="dialogData.dataOne.classifyType == 1">
+                    <p v-for="(item,index) in dialogData.dataOne.classifyList" :key="index">{{index+1}}、{{item}}</p>
+                  </div>
+                  <div class="data-for-img" v-if="dialogData.dataOne.classifyType == 2">
+                    <img v-for="(item,index) in dialogData.dataOne.classifyList" :key="index" :src="item">
+                  </div>
+                </div>
+                <!--2号右侧信息栏-->
+                <div class="subject-dialog-print-top-left-bottom-right-box" v-if="dialogData.dataTwo">
+                  <p class="data-title" :style="'background-color:'+dialogData.dataTwo.showColour+';'">{{dialogData.dataTwo.classifyName}}</p>
+                  <div class="data-for-text" v-if="dialogData.dataTwo.classifyType == 1">
+                    <p v-for="(item,index) in dialogData.dataTwo.classifyList" :key="index">{{index+1}}、{{item}}</p>
+                  </div>
+                  <div class="data-for-img" v-if="dialogData.dataTwo.classifyType == 2">
+                    <img v-for="(item,index) in dialogData.dataTwo.classifyList" :key="index" :src="item">
+                  </div>
+                </div>
+              </div>
+            </div>
+            <!--3号右侧信息栏-->
+            <div class="subject-dialog-print-top-right-box" v-if="dialogData.dataThree">
+              <p class="data-title" :style="'background-color:'+dialogData.dataThree.showColour+';'">{{dialogData.dataThree.classifyName}}</p>
+              <div class="data-for-text" v-if="dialogData.dataThree.classifyType == 1">
+                <p v-for="(item,index) in dialogData.dataThree.classifyList" :key="index">{{index+1}}、{{item}}</p>
+              </div>
+              <div class="data-for-img" v-if="dialogData.dataThree.classifyType == 2">
+                <img v-for="(item,index) in dialogData.dataThree.classifyList" :key="index" :src="item">
+              </div>
+            </div>
+          </div>
+          <!--特殊类目-->
+          <div class="subject-dialog-print-button-box" v-if="dialogData.specialBrandInfo" :style="'background:'+dialogData.specialBrandInfo.showColour+';'">
+            <span v-for="(item,index) in dialogData.specialBrandInfo.classifyList" :key="index">{{item}}</span>
+          </div>
+        </div>
+      </div>
+      <div class="subject-dialog-shade" v-if="dialogShadeType"></div>
+    </el-dialog>
     <!--新增/编辑-->
     <add-subject v-if="pageType == 2" :subjectData="subjectData"></add-subject>
     <!--准入配置-->
@@ -157,6 +278,8 @@
 
 <script>
   /********************** V3 **********************/
+  import vueQr from 'vue-qr'
+  import html2canvas from 'html2canvas'
   import importComponent from "@/components/importComponent/importComponent.vue";
   import batchQrCodeDialog from "@/components/batchQrCodeDialog/batchQrCodeDialog.vue";
   import {
@@ -171,6 +294,7 @@
     laboratorySubRelInfoGetHazardSubRelInfo,
     laboratorySubRelInfoUpdateBySort,
     laboratorySubRelInfoUpdateByControl,
+    laboratoryBoardExportBoardInfo, laboratoryLevelConfigGetLevelTitleList, laboratoryTypeConfigGetList
   } from '@/api/integratedManagement/index'
   import indexRightPage from './indexRightPage/indexRightPage.vue'
   import addSubject from './addSubject.vue'
@@ -180,6 +304,7 @@
   export default {
     name: 'subject',
     components: {
+      vueQr,
       importComponent,
       addSubject,
       admissionConfiguration,
@@ -192,6 +317,10 @@
       return {
         //批量二维码
         batchQrCodeDialogData:{},
+        //电子信息牌
+        dialogType:false,
+        dialogData:{},
+        dialogShadeType:false,
         //导入数据
         importConfig:{
           upLoadApi:'/laboratory/subRelInfo/importSubData',                //上传接口地址
@@ -331,10 +460,138 @@
             }).catch(() => {
             })
             break
+          case '5':
+            laboratoryBoardExportBoardInfo({
+              labId: row.subId,
+            }).then(response => {
+              let textLength = 0;
+              let textIndex = null;
+              for(let i=0;i<response.data.nonspecialBrandList.length;i++){
+                if(response.data.nonspecialBrandList[i].classifyType == 1){
+                  response.data.nonspecialBrandList[i].length = 0;
+                  for(let o=0;o<response.data.nonspecialBrandList[i].classifyList.length;o++){
+                    response.data.nonspecialBrandList[i].length = response.data.nonspecialBrandList[i].length + response.data.nonspecialBrandList[i].classifyList[o].length;
+                  }
+                  if(response.data.nonspecialBrandList[i].length>textLength){
+                    textLength = response.data.nonspecialBrandList[i].length
+                    textIndex = i
+                  }
+                }
+              }
+              if(textIndex != null){
+                for(let i=0;i<response.data.nonspecialBrandList.length;i++){
+                  if(textIndex == i){
+                    response.data.dataThree = response.data.nonspecialBrandList[i]
+                  }else{
+                    if(!response.data.dataOne){
+                      response.data.dataOne = response.data.nonspecialBrandList[i]
+                    }else if(!response.data.dataTwo){
+                      response.data.dataTwo = response.data.nonspecialBrandList[i]
+                    }
+                  }
+                }
+              }else{
+                console.log('2')
+                if (response.data.nonspecialBrandList[0]){
+                  response.data.dataOne = response.data.nonspecialBrandList[0];
+                }
+                if (response.data.nonspecialBrandList[1]){
+                  response.data.dataTwo = response.data.nonspecialBrandList[1];
+                }
+                if (response.data.nonspecialBrandList[2]){
+                  response.data.dataThree = response.data.nonspecialBrandList[2];
+                }
+              }
+              this.$nextTick(() => {
+                this.$set(this,'dialogData',response.data);
+                this.$set(this,'dialogType',true);
+                this.$set(this,'dialogShadeType',false);
+              })
+            })
+            break
           default:
             break
         }
       },
+      //电子信息牌导出关闭按钮
+      dialogOff(){
+        this.$set(this,'dialogType',false);
+        this.$set(this,'dialogData',{});
+      },
+      downloadImg(){
+        if(!this.dialogShadeType){
+          this.$set(this,'dialogShadeType',true);
+          this.$nextTick(() => {
+            this.createImage();
+          })
+        }
+      },
+      //下载电子信息牌
+      async createImage() {
+        try {
+          const config = {
+            useCORS: true,
+          };
+          const canvas = await html2canvas(this.$refs.canvasImg,config) // 在这里,将需要转换成图片的部分作为参数传入html2canvas
+          const image = canvas.toDataURL() // 将生成的canvas转换为DataURL格式
+          this.$nextTick(() => {
+            this.downloadQrCode(image);
+          })
+        } catch (e) {
+          throw new Error(e)
+        }
+      },
+      //下载BASE64图片
+      downloadQrCode(image) {
+        const blob = this.base64ToBlob(image, 'image/png')
+        const url = URL.createObjectURL(blob)
+
+        const link = document.createElement('a')
+        link.href = url
+        link.download = this.dialogData.subjectName+' - '+this.dialogData.room
+        document.body.appendChild(link)
+        link.click()
+        // 清理
+        document.body.removeChild(link)
+        URL.revokeObjectURL(url)
+        this.$nextTick(() => {
+          this.msgSuccess('下载成功')
+          this.$set(this,'dialogType',false);
+          this.$set(this,'dialogData',{});
+        })
+      },
+      base64ToBlob(base64Str, contentType, sliceSize) {
+        contentType = contentType || ''
+        sliceSize = sliceSize || 512
+
+        const byteCharacters = atob(base64Str.split(',')[1])
+        const byteArrays = []
+
+        for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {
+          const slice = byteCharacters.slice(offset, offset + sliceSize)
+
+          const byteNumbers = new Array(slice.length)
+          for (let i = 0; i < slice.length; i++) {
+            byteNumbers[i] = slice.charCodeAt(i)
+          }
+
+          const byteArray = new Uint8Array(byteNumbers)
+          byteArrays.push(byteArray)
+        }
+
+        const blob = new Blob(byteArrays, { type: contentType })
+        return blob
+      },
+      getBase64Image(img) {
+        let canvas = document.createElement("canvas");
+        canvas.width = img.width;
+        canvas.height = img.height;
+        let ctx = canvas.getContext("2d");
+        ctx.drawImage(img, 0, 0, img.width, img.height);
+        let dataURL = canvas.toDataURL("image/png");
+        return dataURL
+        // return dataURL.replace("data:image/png;base64,", "");
+      },
       //获取实验室详情 type:1.详情 2.编辑
       getSubInfo(row,type){
         laboratorySubRelInfoGetDetailInfo({ infoId: row.infoId }).then(response => {
@@ -471,13 +728,13 @@
       },
       //查询安全分级
       laboratoryClassLevelGetList() {
-        laboratoryClassLevelGetList({}).then(response => {
+        laboratoryLevelConfigGetLevelTitleList({}).then(response => {
           this.$set(this, 'levelList', response.data)
         })
       },
       //查询安全分类
       laboratoryClassTypeGetList() {
-        laboratoryClassTypeGetList({}).then(response => {
+        laboratoryTypeConfigGetList({}).then(response => {
           this.$set(this, 'typeList', response.data)
         })
       },
@@ -558,3 +815,337 @@
     }
   }
 </style>
+<style lang="scss">
+  .subject-dialog{
+    .el-dialog__wrapper .el-dialog{
+      margin-top:0% !important;
+    }
+    .el-dialog__header{
+      display: none;
+    }
+    .el-dialog__body{
+      height:890px;
+      position: relative;
+      padding:0;
+      margin:0;
+      overflow: hidden;
+      .subject-dialog-button-box{
+        position: absolute;
+        right:40px;
+        top:20px;
+        display: flex;
+        p{
+          cursor: pointer;
+          width: 70px;
+          height: 30px;
+          font-size:14px;
+          text-align: center;
+          line-height:30px;
+        }
+        p:nth-child(1){
+          border-radius: 6px 6px 6px 6px;
+          border: 1px solid #E0E0E0;
+          margin-right:9px;
+        }
+        p:nth-child(2){
+          background: #0045AF;
+          color: #fff;
+          border-radius: 6px 6px 6px 6px;
+        }
+      }
+    }
+    #subject-dialog-print-box{
+      width:1187px;
+      height:839px;
+      /*background-color: red;*/
+      margin:50px 40px 0;
+      overflow: hidden;
+      .subject-dialog-print-big-box{
+        z-index:5;
+        width:1147px;
+        height:799px;
+        margin:20px;
+        /*background-color: blue;*/
+        display: flex;
+        flex-direction: column;
+        overflow: hidden;
+        .subject-dialog-print-top-box{
+          flex:1;
+          display: flex;
+          overflow: hidden;
+          .subject-dialog-print-top-left-box{
+            flex:1;
+            display: flex;
+            flex-direction: column;
+            overflow: hidden;
+            .subject-dialog-print-top-left-top-box{
+              .subject-dialog-name-box{
+                height:60px;
+                display: flex;
+                overflow: hidden;
+                background-color: #0045AF;
+                border-top-right-radius: 10px;
+                border-bottom-right-radius: 10px;
+                position: relative;
+                .title-box-1{
+                  position: absolute;
+                  left:0;
+                  top:-10px;
+                  width:174px;
+                  height:80px;
+                  background-color: #fff;
+                  border-top-right-radius: 100px;
+                  border-bottom-right-radius: 100px;
+                  overflow: hidden;
+                  .title-box-2{
+                    margin-top:10px;
+                    width:170px;
+                    height:60px;
+                    border-radius: 100px;
+                    overflow: hidden;
+                    .title-box-3{
+                      margin:3px;
+                      width: 164px;
+                      height: 54px;
+                      background-color: #fff;
+                      border-radius: 100px;
+                      overflow: hidden;
+                      p{
+                        margin:3px;
+                        width: 158px;
+                        height: 48px;
+                        line-height:48px;
+                        text-align: center;
+                        border-radius: 100px;
+                        overflow: hidden;
+                        font-size:20px;
+                        color:#fff;
+                      }
+                    }
+                  }
+                }
+                .title-p{
+                  margin-left:204px;
+                  line-height: 60px;
+                  font-size:30px;
+                  color:#fff;
+                }
+              }
+              .subject-dialog-info-box{
+                margin-top:12px;
+                height: 180px;
+                background: #F5F5F5;
+                border-radius: 10px 10px 10px 10px;
+                display: flex;
+                overflow: hidden;
+                .subject-dialog-info-left-box{
+                  flex:1;
+                  padding-top:9px;
+                  .subject-dialog-info-left-min-box{
+                    display: flex;
+                    height:29px;
+                    margin:7px 0 11px 15px;
+                    div{
+                      width:140px;
+                      margin-right:10px;
+                      display: flex;
+                      p{
+                        color:#000;
+                        height:29px;
+                        line-height:29px;
+                        font-size:22px;
+                        overflow: hidden;
+                      }
+                      .text-p-left{
+
+                      }
+                      .text-p-center{
+                        flex:1;
+                        text-align: center;
+                      }
+                      .text-p-right{
+
+                      }
+                    }
+                    .subject-dialog-info-left-p{
+                      color:#000;
+                      height:29px;
+                      line-height:29px;
+                      font-size:22px;
+                      overflow: hidden;
+                    }
+                  }
+                }
+                .subject-dialog-info-right-box{
+                  height:110px;
+                  width:110px;
+                  margin:35px 23px 0 0;
+                  img{
+                    display: block;
+                    height:110px;
+                    width:110px;
+                  }
+                }
+              }
+            }
+            .subject-dialog-print-top-left-bottom-box{
+              flex:1;
+              display: flex;
+              overflow: hidden;
+              .subject-dialog-print-top-left-bottom-left-box{
+                margin-top:17px;
+                flex:1;
+                display: flex;
+                flex-direction: column;
+                overflow: hidden;
+                .data-title{
+                  height:60px;
+                  line-height:60px;
+                  color:#fff;
+                  text-align: center;
+                  font-size:24px;
+                  border-top-left-radius: 10px;
+                  border-top-right-radius: 10px;
+                }
+                .data-for-text{
+                  flex:1;
+                  border: 2px solid #999;
+                  border-top:none;
+                  overflow: hidden;
+                  border-bottom-left-radius: 10px;
+                  border-bottom-right-radius: 10px;
+                  padding:5px 14px;
+                  p{
+                    font-size:20px;
+                    color:#000;
+                    line-height:24px;
+                  }
+                }
+                .data-for-img{
+                  flex:1;
+                  border: 2px solid #999;
+                  border-top:none;
+                  overflow: hidden;
+                  border-bottom-left-radius: 10px;
+                  border-bottom-right-radius: 10px;
+                  line-height:0;
+                  img{
+                    display: inline-block;
+                    height:120px;
+                    width:120px;
+                    margin:10px 0 0 9px;
+                  }
+                }
+              }
+              .subject-dialog-print-top-left-bottom-right-box{
+                margin-left:20px;
+                margin-top:17px;
+                flex:1;
+                display: flex;
+                flex-direction: column;
+                overflow: hidden;
+                .data-title{
+                  height:60px;
+                  line-height:60px;
+                  color:#fff;
+                  text-align: center;
+                  font-size:24px;
+                  border-top-left-radius: 10px;
+                  border-top-right-radius: 10px;
+                }
+                .data-for-text{
+                  flex:1;
+                  border: 2px solid #999;
+                  border-top:none;
+                  overflow: hidden;
+                  border-bottom-left-radius: 10px;
+                  border-bottom-right-radius: 10px;
+                  padding:5px 14px;
+                  p{
+                    font-size:20px;
+                    color:#000;
+                    line-height:24px;
+                  }
+                }
+                .data-for-img{
+                  flex:1;
+                  border: 2px solid #999;
+                  border-top:none;
+                  overflow: hidden;
+                  border-bottom-left-radius: 10px;
+                  border-bottom-right-radius: 10px;
+                  line-height:0;
+                  img{
+                    display: inline-block;
+                    height:120px;
+                    width:120px;
+                    margin:10px 0 0 9px;
+                  }
+                }
+              }
+            }
+          }
+          .subject-dialog-print-top-right-box{
+            margin-left:20px;
+            width:308px;
+            display: flex;
+            flex-direction: column;
+            overflow: hidden;
+            .data-title{
+              height:60px;
+              line-height:60px;
+              color:#fff;
+              text-align: center;
+              font-size:24px;
+              border-top-left-radius: 10px;
+              border-top-right-radius: 10px;
+            }
+            .data-for-text{
+              flex:1;
+              border: 2px solid #999;
+              border-top:none;
+              overflow: hidden;
+              border-bottom-left-radius: 10px;
+              border-bottom-right-radius: 10px;
+              padding:9px 14px;
+              p{
+                font-size:20px;
+                color:#000;
+                line-height:24px;
+              }
+            }
+            .data-for-img{
+              flex:1;
+              border: 2px solid #999;
+              border-top:none;
+              overflow: hidden;
+              border-bottom-left-radius: 10px;
+              border-bottom-right-radius: 10px;
+              line-height:0;
+              img{
+                display: inline-block;
+                height:120px;
+                width:120px;
+                margin:12px 0 0 22px;
+              }
+            }
+          }
+        }
+        .subject-dialog-print-button-box{
+          margin-top:20px;
+          width: 1147px;
+          height: 50px;
+          border-radius: 10px 10px 10px 10px;
+          padding:0 28px;
+          overflow: hidden;
+          span{
+            font-size:18px;
+            line-height:50px;
+            margin-right:10px;
+            color:#fff;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 1 - 1
src/views/integratedManagement/personnelManage/post/index.vue

@@ -66,7 +66,7 @@
           <el-input v-model="form.postName" placeholder="请输入身份名称" maxlength="10" />
         </el-form-item>
         <el-form-item label="身份编码" prop="postCode">
-          <el-input v-model="form.postCode" placeholder="请输入编码名称" maxlength="20" />
+          <el-input v-model="form.postCode" placeholder="请输入编码名称" maxlength="50" />
         </el-form-item>
         <el-form-item label="权限组" prop="roleIds">
           <el-select

+ 3 - 3
src/views/integratedManagement/personnelManage/studentInfo/index.vue

@@ -108,10 +108,10 @@
                   <el-dropdown-menu slot="dropdown">
                     <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;" :command="{row:scope.row,command:1}"
                                       v-hasPermiRouter="['system:user:edit']">编辑</el-dropdown-item>
-                    <el-dropdown-item style="margin:0 10px;" :command="{row:scope.row,command:2}"
+                    <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;" :command="{row:scope.row,command:2}"
                                       v-hasPermiRouter="['system:user:del']">删除</el-dropdown-item>
-                    <!--<el-dropdown-item style="margin:0 10px;" :command="{row:scope.row,command:3}"-->
-                                      <!--v-hasPermiRouter="['system:user:reset']">重置密码</el-dropdown-item>-->
+                    <el-dropdown-item style="margin:0 10px;" :command="{row:scope.row,command:3}"
+                                      v-hasPermiRouter="['system:user:reset']">重置密码</el-dropdown-item>
                   </el-dropdown-menu>
                 </el-dropdown>
                 <p class="table-button-null"></p>

+ 3 - 3
src/views/integratedManagement/personnelManage/teacherInfo/index.vue

@@ -162,10 +162,10 @@
                       <el-dropdown-menu slot="dropdown">
                         <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;" :command="{row:scope.row,command:1}"
                                           v-hasPermiRouter="['system:user:edit']">编辑</el-dropdown-item>
-                        <el-dropdown-item style="margin:0 10px;" :command="{row:scope.row,command:2}"
+                        <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;" :command="{row:scope.row,command:2}"
                                           v-hasPermiRouter="['system:user:del']">删除</el-dropdown-item>
-                        <!--<el-dropdown-item style="margin:0 10px;" :command="{row:scope.row,command:3}"-->
-                                          <!--v-hasPermiRouter="['system:user:reset']">重置密码</el-dropdown-item>-->
+                        <el-dropdown-item style="margin:0 10px;" :command="{row:scope.row,command:3}"
+                                          v-hasPermiRouter="['system:user:reset']">重置密码</el-dropdown-item>
                       </el-dropdown-menu>
                     </el-dropdown>
                     <p class="table-button-null"></p>

+ 2 - 2
src/views/iotDevice/hardwareManagement/hardwareEquipment/index.vue

@@ -160,11 +160,11 @@
                :rules="dialogRules" class="addCheckPage-min" label-width="120px">
         <el-form-item label="名称" prop="hardwareName">
           <el-input v-model="dialogForm.hardwareName" placeholder="请输入名称"
-                    maxLength="10" style="width:320px;"/>
+                    maxLength="20" style="width:320px;"/>
         </el-form-item>
         <el-form-item label="编号" prop="hardwareNo">
           <el-input v-model="dialogForm.hardwareNo" :disabled="!!dialogForm.id"
-                    placeholder="请输入编号" maxLength="10" style="width:320px;"/>
+                    placeholder="请输入编号" maxLength="50" style="width:320px;"/>
         </el-form-item>
         <el-form-item label="类型" prop="hardwareTypeId">
           <el-select v-model="dialogForm.hardwareTypeId" placeholder="请选择类型"

+ 301 - 172
src/views/safetyCheck/collegeInspect/hiddenDangersReview/index.vue

@@ -6,72 +6,71 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
           <div class="table-school-college-toggle-box">
-            <p :class="tableButtonCheckType==1?'p-check':''" @click="tableCheck(1)">全部</p>
-            <p :class="tableButtonCheckType==2?'p-check':''" @click="tableCheck(2)">待复查</p>
-            <p :class="tableButtonCheckType==3?'p-check':''" @click="tableCheck(3)">已复查</p>
+            <p :class="reviewStatus==null?'p-check':''" @click="tableCheck(null)">全部</p>
+            <p :class="reviewStatus==0?'p-check':''" @click="tableCheck(0)">待复查</p>
+            <p :class="reviewStatus==1?'p-check':''" @click="tableCheck(1)">已复查</p>
           </div>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="检查类型" style="width:170px;">
-              <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: 150px"
+            />
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="楼栋" style="width:190px;">
-              <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: 150px"
+              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: 170px"
+            />
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2" v-if="advancedType">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="安全分类" style="width:170px;">
+          <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"
+                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" v-if="advancedType">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="安全分级" style="width:170px;">
+          <el-form-item label="" prop="levelId">
+            <el-select v-model="queryParams.levelId" placeholder="安全分级" style="width: 180px">
               <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" v-if="advancedType">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
+              v-model="queryParams.searchValue"
               placeholder="实验室/房间号"
-              style="width:170px;"
+              style="width: 200px"
             />
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
+          <el-form-item label="" prop="rectifyName" v-if="advancedType">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
-              placeholder="计划标题"
-              style="width:170px;"
-            />
-          </el-form-item>
-          <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
-            <el-input
-              maxLength="30"
-              v-model="queryParams.queryParamsData1"
-              placeholder="检查人"
-              style="width:170px;"
+              v-model="queryParams.rectifyName"
+              placeholder="复查人"
+              style="width: 200px"
             />
           </el-form-item>
           <el-form-item label="" prop="state" v-if="advancedType">
@@ -79,7 +78,7 @@
               :clearable="false"
               v-model="dateRange"
               size="small"
-              style="width: 240px"
+              style="width: 280px"
               value-format="yyyy-MM-dd"
               type="daterange"
               range-separator="-"
@@ -87,15 +86,6 @@
               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>
@@ -104,24 +94,34 @@
       <div class="page-content-box">
         <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="100" show-overflow-tooltip/>
-          <el-table-column label="检查名称" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="检查项目" prop="content" width="260" show-overflow-tooltip/>
-          <el-table-column label="实验室" prop="content" width="165" show-overflow-tooltip/>
-          <el-table-column label="检查人" prop="content" width="80" show-overflow-tooltip/>
-          <el-table-column label="复查人" prop="content" width="80" show-overflow-tooltip/>
-          <el-table-column label="复查状态" prop="state" width="80" show-overflow-tooltip>
+          <el-table-column label="计划标题" prop="planTitle"  show-overflow-tooltip/>
+          <el-table-column label="检查类型" prop="checkTypeName" width="100" show-overflow-tooltip/>
+          <el-table-column label="检查名称" prop="checkName" width="100" show-overflow-tooltip/>
+          <el-table-column label="检查项目" prop="hazardCheckCode" width="260" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.hazardCheckCode}} {{scope.row.hazardCheckName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="实验室" prop="subName" width="165" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.subName}}{{scope.row.roomNum?'('+scope.row.roomNum+')':''}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="检查人" prop="createName" width="80" show-overflow-tooltip/>
+          <el-table-column label="复查人" prop="reviewName" width="80" show-overflow-tooltip/>
+          <el-table-column label="复查状态" prop="reviewStatus" width="80" 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="state" width="80" show-overflow-tooltip>
+          <el-table-column label="复查结果" prop="examineResult" width="80" show-overflow-tooltip>
             <template slot-scope="scope">
+              <span>{{scope.row.examineResult == 1?'复查完毕':(scope.row.examineResult == 0?'退回整改':'')}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="复查时间" prop="createTime" width="160" show-overflow-tooltip>
+          <el-table-column label="复查时间" prop="reviewTime" width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+              <span>{{ parseTime(scope.row.reviewTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
           <el-table-column label="操作" width="130" show-overflow-tooltip >
@@ -129,16 +129,18 @@
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
-                   @click="tableButton(2,scope.row)"
-
+                   v-if="scope.row.reviewButtion && scope.row.isReviewer"
+                   v-hasPermiRouter="['security:myreview:add']"
+                   @click="tableButton(1,scope.row)"
                 >复查</p>
                 <p class="table-button-p"
-                   @click="tableButton(3,scope.row)"
-
-                >编辑</p>
+                   v-if="!scope.row.reviewButtion"
+                   @click="tableButton(2,scope.row)"
+                >详情</p>
                 <p class="table-button-p"
-                   @click="tableButton(4,scope.row)"
-
+                   v-if="scope.row.isAdmin"
+                   v-hasPermiRouter="['security:myreview:edit']"
+                   @click="tableButton(3,scope.row)"
                 >转移</p>
                 <p class="table-button-null"></p>
               </div>
@@ -158,24 +160,33 @@
                :visible.sync="dialogType" v-if="dialogType" @close="dialogOff()"
                :close-on-click-modal="false" :close-on-press-escape="false">
       <div class="hiddenDangersReview-dialog-max-box">
-        <p class="hiddenDangersReview-dialog-name">督导组名称</p>
+        <p class="hiddenDangersReview-dialog-name">{{dialogGroupName}}</p>
         <div class="hiddenDangersReview-dialog-box">
           <img src="@/assets/ZDimages/safetyCheck/icon_xyxc_cy.png">
           <p>成员列表</p>
         </div>
-        <el-table class="table-box table-null-img-20" border :data="dialogData.dialogList1">
+        <el-table class="table-box table-null-img-20" border :data="dialogDataList">
           <el-table-column label="" align="center" width="150">
             <template scope="scope">
-              <div class="check-img-box" @click="tableColumnCheck(scope.row.dialogDataId)">
-                <img src="@/assets/ZDimages/basicsModules/icon_fcrzy_wxz@1x.png" v-if="scope.row.dialogDataId != tableColumnType">
-                <img src="@/assets/ZDimages/basicsModules/icon_fcrzy_xz@1x.png" v-if="scope.row.dialogDataId == tableColumnType">
+              <div class="check-img-box" v-if="dialogUserId != scope.row.userId"
+                   @click="tableColumnCheck(scope.row)">
+                <img src="@/assets/ZDimages/basicsModules/icon_fcrzy_wxz@1x.png" v-if="scope.row.userId != reviewUserid">
+                <img src="@/assets/ZDimages/basicsModules/icon_fcrzy_xz@1x.png" v-if="scope.row.userId == reviewUserid">
               </div>
+              <p v-if="dialogUserId == scope.row.userId" style="text-align: center!important;">负责人</p>
             </template>
           </el-table-column>
-          <el-table-column label="姓名" prop="name" show-overflow-tooltip/>
-          <el-table-column label="工号" prop="name" width="130" show-overflow-tooltip/>
-          <el-table-column label="所在部门" prop="content" width="188" show-overflow-tooltip/>
+          <el-table-column label="姓名" prop="userName" show-overflow-tooltip/>
+          <el-table-column label="工号" prop="account" width="130" show-overflow-tooltip/>
+          <el-table-column label="所在部门" prop="deptName" width="188" show-overflow-tooltip/>
         </el-table>
+        <pagination :page-sizes="[20, 30, 40, 50]"
+                    v-show="dialogTotal>0"
+                    :total="dialogTotal"
+                    :page.sync="dialogQueryParams.page"
+                    :limit.sync="dialogQueryParams.pageSize"
+                    @pagination="securityCheckDangerGetMemberList"
+        />
       </div>
       <div slot="footer" class="dialog-footer dialog-footer-box">
         <p class="dialog-footer-button-null"></p>
@@ -184,83 +195,91 @@
         <p class="dialog-footer-button-null"></p>
       </div>
     </el-dialog>
-    <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
+    <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 addPage from "./addPage.vue";
+  import {
+    getDeptDropList,
+    laboratoryClassLevelGetList,
+  } from '@/api/commonality/permission'
+  import {
+    securityCheckOptionList,
+    securityCheckDangerReviewList,
+    securityCheckDangerGetMemberInfo,
+    securityCheckDangerGetMemberList,
+    securityCheckDangerUpdateByReview,
+  } from "@/api/safetyCheck/index";
+  import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
   export default {
     name: 'index',
-    //components: {
-    //  addPage
-    //},
+    components: {
+      initiateInspect
+    },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
         //页面状态
         pageType:1,
         //复查状态选项卡
-        tableButtonCheckType:1,
+        reviewStatus:null,
         //页面遮罩
         loading:false,
-        //下拉列表数据
-        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        //学院列表
+        deptOption:[],
+        //分级下拉列表
+        levelOption:[],
+        //检查项下拉列表
+        cascaderData:[],
         //查询条件
         queryParams:{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          planTitle:"",
+          hazardCheckPro :null,
+          hazardCheckName:"",
+          deptId :null,
+          levelId :null,
+          searchValue:"",
+          rectifyName:"",
         },
         //时间数据
         dateRange:[],
         //搜索模式切换
         advancedType:false,
         //列表数据
-        dataList:[{}],
+        dataList:[],
         //数据数量
         total:0,
         //组件传参
-        propsData:{},
+        initiateInspectData:{},
         //复查转移
-        dialogData:{
-          dialogData1:'督导组名称',
-          dialogList1:[
-            {
-              dialogDataId:1,
-              dialogDataType:false,
-              dialogDataName:'名称',
-              dialogDataNum:'工号',
-              dialogDataDept:'部门',
-            },
-            {
-              dialogDataId:2,
-              dialogDataType:false,
-              dialogDataName:'名称',
-              dialogDataNum:'工号',
-              dialogDataDept:'部门',
-            },
-          ],
+        dialogGroupName:'',
+        dialogUserId:'',
+        dialogQueryParams:{
+          page:1,
+          pageSize:20,
         },
+        dialogDataList:[],
+        dialogTotal:0,
         dialogType:false,
-        tableColumnType:null
+        dialogDangerId:'',
+        reviewUserid:null,
+        reviewName:null
       }
     },
     created () {
-
+      this.getDeptDropList();
+      this.laboratoryClassLevelGetList();
+      this.securityCheckOptionList();
     },
     mounted () {
-      //this.getList();
+      this.getList();
     },
     methods: {
       //复查状态选项卡切换
       tableCheck(type){
-        if (this.tableButtonCheckType !== type){
-          this.$set(this,'tableButtonCheckType',type);
+        if (this.reviewStatus !== type){
+          this.$set(this,'reviewStatus',type);
           this.resetQuery();
         }
       },
@@ -268,11 +287,6 @@
       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);
@@ -284,9 +298,13 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          planTitle:"",
+          hazardCheckPro :null,
+          hazardCheckName:"",
+          deptId :null,
+          levelId :null,
+          searchValue:"",
+          rectifyName:"",
         });
         this.getList();
       },
@@ -294,61 +312,88 @@
       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 = "";
+        let data = {
+          checkCategory:2,
+          reviewStatus:this.reviewStatus,
+          page:obj.page,
+          pageSize:obj.pageSize,
+          planTitle:obj.planTitle,
+          hazardCheckPro:obj.hazardCheckPro,
+          hazardCheckName:obj.hazardCheckName,
+          deptId:obj.deptId,
+          levelId:obj.levelId,
+        };
+        if(this.advancedType){
+          data.searchValue = obj.searchValue;
+          data.rectifyName = obj.rectifyName;
+          if(this.dateRange[0]){
+            data.startTime = this.dateRange[0]+'T00:00:00'
+            data.endTime = this.dateRange[1]+'T23:59:59'
+          }else{
+            data.startTime = "";
+            data.endTime = "";
+          }
         }
-        // getListFunction(obj).then(response => {
-        //   this.$set(this,'loading',false);
-        //   this.$set(this,'dataList',response.data.records);
-        //   this.$set(this,'total',response.data.total);
-        // });
+        securityCheckDangerReviewList(data).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);
-          this.$set(this,'propsData',{});
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = false;
+          obj.orderTitle = '复查验证';
+          obj.orderType = '5';
+          this.$set(this,'initiateInspectData',obj);
         }else if(type == 2){
           //详情
           this.$set(this,'pageType',2);
           let obj = JSON.parse(JSON.stringify(row))
           obj.showType = true;
-          this.$set(this,'propsData',obj);
+          obj.orderTitle = '复查详情';
+          obj.orderType = '6';
+          this.$set(this,'initiateInspectData',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.dialogOpen();
-        }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(() => {});
+          this.$set(this.dialogQueryParams,'page',1);
+          this.$set(this,'dialogDangerId',row.dangerId);
+          this.securityCheckDangerGetMemberInfo(row.dangerId);
         }else if(type == 6){
           //返回并刷新
           this.$set(this,'pageType',1);
           this.getList();
         }
       },
+      //督导组信息查询
+      securityCheckDangerGetMemberInfo(dangerId){
+        securityCheckDangerGetMemberInfo({dangerId:dangerId}).then(response => {
+          this.$set(this,'dialogGroupName',response.data.groupName);
+          this.$set(this,'dialogUserId',response.data.userId);
+          this.$nextTick(()=>{
+            this.securityCheckDangerGetMemberList(dangerId);
+          })
+        });
+      },
+      //督导组人员查询
+      securityCheckDangerGetMemberList(dangerId){
+        let obj = JSON.parse(JSON.stringify(this.dialogQueryParams))
+        obj.dangerId = dangerId;
+        securityCheckDangerGetMemberList(obj).then(response => {
+          this.$set(this,'dialogDataList',response.data.records);
+          this.$set(this,'dialogTotal',response.data.total);
+          this.$nextTick(()=>{
+            if(!this.dialogType){
+              this.dialogOpen();
+            }
+          })
+        });
+      },
       /******** 转移弹窗 ********/
       //弹层关闭
       dialogOff(){
@@ -356,21 +401,105 @@
       },
       //弹层开启
       dialogOpen(){
-        this.$set(this,'tableColumnType',null);
+        this.$set(this,'reviewUserid',null);
         this.$set(this,'dialogType',true);
       },
       //弹层确定
       dialogSubmit(){
-        if(!this.tableColumnType){
+        if(!this.reviewUserid){
           this.msgError('请选择复查转移人')
           return
         }
-        this.$set(this,'dialogType',false);
+        let obj = {
+          dangerId:this.dialogDangerId,
+          reviewUserid:this.reviewUserid,
+          reviewName:this.reviewName,
+        };
+        securityCheckDangerUpdateByReview(obj).then(response => {
+          this.msgSuccess(response.message)
+          this.$set(this,'dialogType',false);
+          this.getList();
+        });
       },
       tableColumnCheck(row) {
-        if(this.tableColumnType != row){
-          this.$set(this,'tableColumnType',row);
+        if(this.reviewUserid != row.userId){
+          this.$set(this,'reviewUserid',row.userId);
+          this.$set(this,'reviewName',row.userName);
+        }
+      },
+      //学院列表
+      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
       },
     },
   }

+ 270 - 167
src/views/safetyCheck/collegeInspect/selfInspectionManage/index.vue

@@ -8,43 +8,51 @@
         <div>
           <el-form :model="leftQueryParams" class="form-box" ref="leftQueryForm"
                    :inline="true" style="width:100%;">
-            <el-form-item label="" prop="leftQueryParamsData1">
+            <el-form-item label="" prop="searchValue">
               <el-input
                 maxLength="30"
-                v-model="leftQueryParams.leftQueryParamsData1"
+                v-model="leftQueryParams.searchValue"
                 placeholder="计划标题"
                 clearable
                 @clear="leftClear"
-                style="width: 390px"
+                style="width: 365px"
               />
             </el-form-item>
             <p class="page-save-common-style-button" style="width:80px;display: inline-block" @click="leftHandleQuery">查询</p>
           </el-form>
         </div>
         <!--计划栏列表-->
-        <div class="left-list-box">
+        <div class="left-max-list-box scrollbar-box">
           <div class="left-list-for-max-big-box" v-for="(bigItem,bigIndex) in leftListData" :key="bigIndex">
             <div class="left-list-title-box" @click="leftBigCheckButton(bigIndex)">
               <p :class="bigIndex == leftBigCheckType?'el-icon-caret-bottom':'el-icon-caret-right'"></p>
-              <p>{{bigItem.leftData1}}</p>
-              <p>{{bigItem.leftData2}}</p>
+              <p>{{bigItem.planTitle}}</p>
+              <p>{{bigItem.checkTypeName}}</p>
             </div>
             <div class="left-list-box">
               <div class="left-list-for-box" v-if="bigIndex == leftBigCheckType"
-                   @click="leftCheckButton(index)"
+                   @click="leftCheckButton(index,bigIndex)"
                    :class="index == leftCheckType ? 'check-left-list-for-box':''"
-                   v-for="(item,index) in bigItem.leftDataList" :key="index">
+                   v-for="(item,index) in bigItem.checkPlanSetVoList" :key="index">
                 <div class="left-list-text-box">
-                  <p>{{item.leftDataListData1}}</p>
-                  <p>检查开始时间:{{parseTime(item.leftDataListData2,"{y}-{m}-{d}")}}</p>
+                  <p>{{item.checkName}}</p>
+                  <p>检查开始时间:{{parseTime(item.checkStartTime,"{y}-{m}-{d}")}}</p>
                 </div>
                 <div class="left-list-progress-box">
-                  <el-progress :stroke-width="14" :percentage="item.leftDataListData4"></el-progress>
+                  <el-progress :stroke-width="14" :percentage="item.checkSetProgress"></el-progress>
                 </div>
               </div>
             </div>
           </div>
+          <p v-if="!leftListData[0]" class="left-list-for-null-p">暂无数据</p>
         </div>
+        <pagination :page-sizes="[20, 30, 40, 50]"
+                    v-show="titleTotal>0"
+                    :total="titleTotal"
+                    :page.sync="leftQueryParams.page"
+                    :limit.sync="leftQueryParams.pageSize"
+                    @pagination="getTitleList"
+        />
       </div>
       <div class="page-content-center-box"></div>
       <!--右侧数据表格-->
@@ -53,58 +61,69 @@
           <el-form :model="queryParams" class="form-box" ref="queryForm"
                    :inline="true" style="width:100%;">
             <div class="table-school-college-toggle-box">
-              <p :class="tableButtonCheckType==1?'p-check':''" @click="tableCheck(1)">全部</p>
-              <p :class="tableButtonCheckType==2?'p-check':''" @click="tableCheck(2)">待检查</p>
-              <p :class="tableButtonCheckType==3?'p-check':''" @click="tableCheck(3)">检查中</p>
-              <p :class="tableButtonCheckType==4?'p-check':''" @click="tableCheck(4)">已检查</p>
+              <p :class="tableButtonCheckType===''?'p-check':''" @click="tableCheck('')">全部</p>
+              <p :class="tableButtonCheckType===0?'p-check':''" @click="tableCheck(0)">待检查</p>
+              <p :class="tableButtonCheckType===1?'p-check':''" @click="tableCheck(1)">检查中</p>
+              <p :class="tableButtonCheckType===2?'p-check':''" @click="tableCheck(2)">已检查</p>
             </div>
-            <el-form-item label="" prop="queryParamsData2">
-              <el-select v-model="queryParams.queryParamsData2" placeholder="楼栋" style="width:150px;">
+            <el-form-item label="" prop="deptId">
+              <el-select v-model="queryParams.deptId" placeholder="学院单位" style="width:157px;">
                 <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="width:155px;"
-              />
+            <el-form-item label="" prop="floorId">
+              <!--<el-select v-model="queryParams.floorId" placeholder="楼栋" style="width:150px;">-->
+                <!--<el-option-->
+                  <!--v-for="dict in buildOption"-->
+                  <!--:key="dict.id"-->
+                  <!--:label="dict.name"-->
+                  <!--:value="dict.id"-->
+                <!--/>-->
+              <!--</el-select>-->
+
+              <el-cascader
+                style="width: 150px"
+                placeholder="楼栋"
+                v-model="queryParams.floorId"
+                filterable
+                :show-all-levels="false"
+                :options="buildOption"
+                :props="{ value: 'id', label: 'name',emitPath:false }"
+              ></el-cascader>
             </el-form-item>
-            <el-form-item label="" prop="queryParamsData2" v-if="advancedType">
-              <el-select v-model="queryParams.queryParamsData2" placeholder="安全分类" style="width:175px;">
+            <el-form-item label="" prop="typeId" v-if="advancedType">
+              <el-select v-model="queryParams.typeId" placeholder="安全分类" style="width:175px;">
                 <el-option
-                  v-for="dict in optionList"
-                  :key="dict.value"
-                  :label="dict.label"
-                  :value="dict.value"
+                  v-for="dict in classOption"
+                  :key="dict.typeId"
+                  :label="dict.typeName"
+                  :value="dict.typeId"
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="queryParamsData2" v-if="advancedType">
-              <el-select v-model="queryParams.queryParamsData2" placeholder="安全分级" style="width:175px;">
+            <el-form-item label="" prop="levelId" v-if="advancedType">
+              <el-select v-model="queryParams.levelId" placeholder="安全分级" style="width:175px;">
                 <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>
-            <!--与我相关-->
-            <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>
+            <el-form-item label="" prop="searchValue" v-if="advancedType">
+              <el-input
+                maxLength="30"
+                v-model="queryParams.searchValue"
+                placeholder="实验室/房间号"
+                style="width:170px;"
+              />
+            </el-form-item>
             <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>
@@ -113,25 +132,37 @@
         <div class="page-conten-box page-content-right-bottom-box">
           <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="state" width="150" show-overflow-tooltip>
+            <el-table-column label="实验室" prop="subName"  show-overflow-tooltip>
               <template slot-scope="scope">
-
+                <span>{{scope.row.subName}}{{scope.row.roomNum?'('+scope.row.roomNum+')':''}}</span>
               </template>
             </el-table-column>
-            <el-table-column label="检查人" prop="content" width="230" show-overflow-tooltip/>
-            <el-table-column label="操作" width="180" show-overflow-tooltip >
+            <el-table-column label="检查状态" prop="manageStatus" width="150" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span :class="scope.row.manageStatus==0?'colorA':(scope.row.manageStatus==1?'colorB':(scope.row.manageStatus==2?'colorC':''))">
+                  {{scope.row.manageStatus==0?'待检查':(scope.row.manageStatus==1?'检查中':(scope.row.manageStatus==2?'已检查':''))}}
+                </span>
+              </template>
+            </el-table-column>
+            <el-table-column label="检查人" prop="checkUserNames" width="230" show-overflow-tooltip/>
+            <el-table-column label="操作" width="240" show-overflow-tooltip v-if="tableButtonType">
               <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)"
+                     v-hasPermiRouter="['security:checkSetOption_1:list']"
                   >检查项</p>
                   <p class="table-button-p"
-                     @click="tableButton(3,scope.row)"
-
+                     v-if='scope.row.manageStatus !=2'
+                     @click="tableButton(2,scope.row)"
+                     v-hasPermiRouter="['security:checkPlan_1:detail']"
                   >开始检查</p>
+                  <p class="table-button-p"
+                     v-if='scope.row.manageStatus !=2'
+                     @click="tableButton(3,scope.row)"
+                     v-hasPermiRouter="['security:checkSetOption_1:batch']"
+                  >检查完成</p>
                   <p class="table-button-null"></p>
                 </div>
               </template>
@@ -148,40 +179,64 @@
       </div>
     </div>
     <checkItem :propsData="propsData" v-if="pageType === 2"></checkItem>
+    <initiateInspect v-if="pageType == 3" :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,
+    systemBuildingGetOptList,
+    laboratoryClassLevelGetList,
+    laboratoryClassTypeGetList,
+  } from '@/api/commonality/permission'
+  import {
+    securityCheckPlanTitleList,
+    securityCheckManageList,
+    securityCheckSetOptionFinishCheck,
+  } from '@/api/safetyCheck/index'
   import checkItem from "@/views/safetyCheck/components/checkItem.vue";
+  import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
   export default {
     name: 'index',
     components: {
-     checkItem
+      checkItem,
+      initiateInspect,
     },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        tableButtonType:this.hasPermiDom(['security:checkSetOption_1:list','security:checkPlan_1:detail','security:checkSetOption_1:batch',]),
         //页面状态
-        pageType:2,
+        pageType:1,
         //复查状态选项卡
-        tableButtonCheckType:1,
+        tableButtonCheckType:'',
         //页面遮罩
         loading:false,
-        //下拉列表数据
-        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        //学院
+        deptOption:[],
+        //楼栋
+        buildOption:[],
+        //分级
+        levelOption:[],
+        //分类
+        classOption:[],
         //计划查询条件
         leftQueryParams:{
-          leftQueryParamsData1:'',
+          checkCategory:2,
+          searchValue:'',
+          page:1,
+          pageSize:20,
         },
+        titleTotal:0,
         //查询条件
         queryParams:{
           page:1,
           pageSize:20,
           myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          deptId:null,
+          floorId:null,
+          typeId :null,
+          levelId :null,
+          searchValue:'',
         },
         //时间数据
         dateRange:[],
@@ -195,78 +250,46 @@
         propsData:{},
         leftBigCheckType:"0",
         leftCheckType:"0",
-        leftListData:[
-          {
-            leftData1:'计划名称计划名称计划名称计划名称',
-            leftData2:'检查类型',
-            leftData3:'1',
-            leftDataList:[
-              {
-                leftDataListData1:'第一次检查',
-                leftDataListData2:'2024-08-06T11:06:57',
-                leftDataListData3:'11',
-                leftDataListData4:50,
-              },
-              {
-                leftDataListData1:'第二次检查',
-                leftDataListData2:'2024-08-06T11:06:57',
-                leftDataListData3:'12',
-                leftDataListData4:60,
-              },
-            ],
-          },
-          {
-            leftData1:'计划名称计划名称计划名称计划名称',
-            leftData2:'检查类型',
-            leftData3:'2',
-            leftDataList:[
-              {
-                leftDataListData1:'第一次检查',
-                leftDataListData2:'2024-08-06T11:06:57',
-                leftDataListData3:'21',
-                leftDataListData4:50,
-              },
-              {
-                leftDataListData1:'第二次检查',
-                leftDataListData2:'2024-08-06T11:06:57',
-                leftDataListData3:'22',
-                leftDataListData4:60,
-              },
-            ],
-          }
-        ],
+        leftListData:[],
+        checkSetProgress:0,
+        //检查组件
+        initiateInspectData:{},
       }
     },
     created () {
 
     },
     mounted () {
-      //this.getList();
+      this.getTitleList();
+      this.getDeptDropList();
+      this.systemBuildingGetOptList();
+      this.laboratoryClassLevelGetList();
+      this.laboratoryClassTypeGetList();
     },
     methods: {
       //左侧清除查询按钮
       leftClear(){
-        this.$set(this.leftQueryParams,'leftQueryParamsData1','');
-        this.$set(this,'leftBigCheckType',0);
-        this.$set(this,'leftCheckType',0);
+        this.$set(this.leftQueryParams,'searchValue','');
+        this.getTitleList();
       },
       //左侧查询按钮
       leftHandleQuery(){
-        this.$set(this,'leftBigCheckType',0);
-        this.$set(this,'leftCheckType',0);
+        this.getTitleList();
       },
       //左侧计划切换
       leftBigCheckButton(index){
         if(this.leftBigCheckType !== index){
           this.$set(this,'leftBigCheckType',index);
           this.$set(this,'leftCheckType',0);
+          this.$set(this,'checkSetProgress',this.leftListData[index].checkPlanSetVoList[0].checkSetProgress);
           this.resetQuery();
         }
       },
       //左侧计划子级切换
-      leftCheckButton(index){
+      leftCheckButton(index,bigIndex){
         if(this.leftCheckType !== index){
           this.$set(this,'leftCheckType',index);
+          this.$set(this,'checkSetProgress',this.leftListData[bigIndex].checkPlanSetVoList[index].checkSetProgress);
           this.resetQuery();
         }
       },
@@ -281,11 +304,6 @@
       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);
@@ -297,24 +315,56 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          deptId:null,
+          floorId:null,
+          typeId :null,
+          levelId :null,
+          searchValue:'',
         });
         this.getList();
       },
+      //获取计划数据列表
+      getTitleList(){
+        securityCheckPlanTitleList(this.leftQueryParams).then(response => {
+          this.$set(this,'leftListData',response.data.records);
+          this.$set(this,'titleTotal',response.data.total);
+          this.$set(this,'leftBigCheckType',0);
+          this.$set(this,'leftCheckType',0);
+          this.resetQuery();
+          if(response.data.records[0]){
+            this.$set(this,'checkSetProgress',this.leftListData[0].checkPlanSetVoList[0].checkSetProgress);
+          }
+        });
+      },
+      getTitleListTwo(){
+        securityCheckPlanTitleList(this.leftQueryParams).then(response => {
+          this.$set(this,'leftListData',response.data.records);
+          this.$set(this,'titleTotal',response.data.total);
+          this.getList();
+        });
+      },
       //获取数据列表
       getList(){
+        if(!this.leftListData[0]){
+          this.$set(this,'dataList',[]);
+          this.$set(this,'total',0);
+          return
+        }
         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 = "";
+        let obj = {
+          planSetId:this.leftListData[this.leftBigCheckType].checkPlanSetVoList[this.leftCheckType].planSetId,
+          page:this.queryParams.page,
+          pageSize:this.queryParams.pageSize,
+          manageStatus:this.tableButtonCheckType,
+          deptId:this.queryParams.deptId,
+          floorId:this.queryParams.floorId,
         }
-        getListFunction(obj).then(response => {
+        if(this.advancedType){
+          obj.searchValue = this.queryParams.searchValue;
+          obj.typeId = this.queryParams.typeId;
+          obj.levelId = this.queryParams.levelId;
+        }
+        securityCheckManageList(obj).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
@@ -324,54 +374,79 @@
       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;
+          obj.pageType = 2;
+          obj.checkSetProgress = this.checkSetProgress;
           this.$set(this,'propsData',obj);
-        }else if(type == 3){
-          //编辑
-          this.$set(this,'pageType',2);
+        }else if(type == 2){
+          //开始检查
+          this.$set(this,'pageType',3);
           let obj = JSON.parse(JSON.stringify(row))
+          obj.freeChoiceType = true;
           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 + '?', "警告", {
+          obj.orderTitle = '开始检查';
+          obj.orderType = '1';
+          this.$set(this,'initiateInspectData',obj);
+        }else if(type == 3){
+          //批量完成
+          this.$confirm(`是否确认检查完成?`, "提示", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
             type: "warning"
-          }).then(function() {
-          }).then(() => {
-            stateFunction({id:row.id,state:!row.state,}).then(response => {
+          }).then(async () => {
+            securityCheckSetOptionFinishCheck({manageId:row.manageId }).then(response => {
               self.msgSuccess(response.message)
-              self.getList();
+              self.getTitleListTwo();
             });
-          }).catch(() => {});
+          }).catch(() => {
+
+          })
         }else if(type == 6){
           //返回并刷新
           this.$set(this,'pageType',1);
-          this.getList();
+          this.getTitleListTwo();
         }
       },
+      /*********************************** 学院/楼栋/分类/分级 ***********************************/
+      //学院下拉列表
+      getDeptDropList(){
+        getDeptDropList({level: 2, deptType: 1 }).then(response => {
+          this.$set(this,'deptOption',response.data);
+        });
+      },
+      //楼栋下拉列表
+      systemBuildingGetOptList(){
+        systemBuildingGetOptList({}).then(response => {
+          let list = this.handleTree(response.data);
+          pushNode(list)
+          function pushNode(list){
+            for(let i=0;i<list.length;i++){
+              if(!list[i].children && list[i].type!= 3){
+                list.splice(i,1)
+                i--
+              }if(list[i].children){
+                pushNode(list[i].children)
+              }
+            }
+          }
+          this.$set(this,'buildOption',list);
+        });
+      },
+      //分级下拉列表
+      laboratoryClassLevelGetList(){
+        laboratoryClassLevelGetList({}).then(response => {
+          this.$set(this,'levelOption',response.data);
+        });
+      },
+      //分类下拉列表
+      laboratoryClassTypeGetList(){
+        laboratoryClassTypeGetList({}).then(response => {
+          this.$set(this,'classOption',response.data);
+        });
+      },
     },
   }
 </script>
@@ -385,8 +460,14 @@
 
       .page-content-left-box{
         width: 480px;
-        margin:20px;
-        .left-list-box{
+        display: flex;
+        flex-direction: column;
+        overflow: hidden;
+        margin:20px 0 20px 20px;
+        padding-right:10px;
+        .left-max-list-box{
+          flex:1;
+          padding-right:10px;
           .left-list-for-max-big-box{
             .left-list-title-box{
               cursor: pointer;
@@ -432,6 +513,11 @@
                     height:30px;
                     line-height: 30px;
                     font-size:16px;
+                    /*单行省略号*/
+                    display:block;
+                    overflow:hidden;
+                    text-overflow:ellipsis;
+                    white-space:nowrap;
                   }
                   p:nth-child(2){
                     color:#666666;
@@ -440,6 +526,9 @@
                 .left-list-progress-box{
                   flex:1;
                   padding-top:15px;
+                  ::v-deep .el-progress-bar{
+                    margin-right: -62px;
+                  }
                 }
               }
               .check-left-list-for-box{
@@ -447,6 +536,11 @@
               }
             }
           }
+          .left-list-for-null-p{
+            text-align: center;
+            line-height:400px;
+            color:#999;
+          }
         }
       }
       .page-content-center-box{
@@ -464,6 +558,15 @@
           overflow: hidden;
           flex:1;
           padding:0 20px 20px;
+          .colorA{
+            color:#FA4A04;
+          }
+          .colorB{
+            color:#0484FA;
+          }
+          .colorC{
+            color:#039C06;
+          }
         }
       }
       .table-school-college-toggle-box{

+ 28 - 24
src/views/safetyCheck/collegeInspect/selfInspectionProject/index.vue

@@ -5,7 +5,7 @@
       <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
-          <div class="table-college-college-toggle-box">
+          <div class="table-school-college-toggle-box">
             <p :class="planStatus===''?'p-check':''" @click="tableCheck('')">全部</p>
             <p :class="planStatus===0?'p-check':''" @click="tableCheck(0)">未开始</p>
             <p :class="planStatus===1?'p-check':''" @click="tableCheck(1)">进行中</p>
@@ -55,6 +55,8 @@
           <p class="page-submit-common-style-button"
              style="float: right;"
              @click="tableButton(1)"
+             v-if="adminIdentity == 'college'"
+             v-hasPermiRouter="['security:checkPlan_1:add']"
           >创建计划</p>
         </el-form>
       </div>
@@ -86,12 +88,12 @@
             </template>
           </el-table-column>
           <el-table-column label="创建人" prop="createName" width="100" show-overflow-tooltip/>
-          <el-table-column label="创建时间" prop="createTime" width="180" show-overflow-tooltip>
+          <el-table-column label="创建时间" prop="createTime" width="160" 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="130" show-overflow-tooltip >
+          <el-table-column label="操作" width="220" show-overflow-tooltip >
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
@@ -100,13 +102,18 @@
                    @click="tableButton(2,scope.row)"
                 >详情</p>
                 <p class="table-button-p"
-                   v-if="scope.row.planStatus==0"
+                   v-if="scope.row.planStatus==0&&adminIdentity=='college'"
                    @click="tableButton(3,scope.row)"
-
+                   v-hasPermiRouter="['security:checkPlan_1:edit']"
                 >编辑</p>
                 <p class="table-button-p"
-                   @click="tableButton(4,scope.row)"
+                   @click="tableButton(5,scope.row)"
 
+                >检查明细</p>
+                <p class="table-button-p"
+                   v-if="scope.row.planStatus==0&&adminIdentity=='college'"
+                   @click="tableButton(4,scope.row)"
+                   v-hasPermiRouter="['security:checkPlan_1:del']"
                 >删除</p>
                 <p class="table-button-null"></p>
               </div>
@@ -123,21 +130,25 @@
       </div>
     </div>
     <projectAddPage :propsData="propsData" v-if="pageType === 2"></projectAddPage>
+    <inspect-statistics :propsData="propsData" v-if="pageType === 5"></inspect-statistics>
   </div>
 </template>
 <script>
   import {
     securityCheckPlanList,
-  } from '@/api/safetyCheck/indexDemoOne'
+    securityCheckPlanDelete,
+  } from '@/api/safetyCheck/index'
   import projectAddPage from "@/views/safetyCheck/components/projectAddPage.vue";
+  import inspectStatistics from "@/views/safetyCheck/components/inspectStatistics.vue";
   export default {
     name: 'index',
     components: {
-      projectAddPage
+      projectAddPage,
+      inspectStatistics,
     },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        adminIdentity: localStorage.getItem('adminIdentity'),
         //页面状态
         pageType:1,
         //计划状态选项卡
@@ -248,25 +259,18 @@
             type: "warning"
           }).then(function() {
           }).then(() => {
-            deleteFunction({id:row.id}).then(response => {
+            securityCheckPlanDelete({planId:row.planId}).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(() => {});
+          //检查明细
+          this.$set(this,'pageType',5);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = true;
+          obj.rank = 'college';
+          this.$set(this,'propsData',obj);
         }else if(type == 6){
           //返回并刷新
           this.$set(this,'pageType',1);
@@ -279,7 +283,7 @@
 <style scoped lang="scss">
   .selfInspectionProject{
     .selfInspectionProjectPage{
-      .table-college-college-toggle-box{
+      .table-school-college-toggle-box{
         overflow: hidden;
         display: inline-block;
         margin-right:10px;

+ 277 - 0
src/views/safetyCheck/collegeWorktable/annualHiddenDistribution.vue

@@ -0,0 +1,277 @@
+<template>
+  <div class="annualHiddenDistribution" v-on:mouseover.stop="mouseover">
+    <div class="title-max-box-position">
+      <div>
+        <p>序号</p>
+      </div>
+      <div>
+        <p>实验室</p>
+      </div>
+      <div>
+        <p>隐患总数</p>
+      </div>
+      <div class="for-box" v-for="(item,index) in titleList" :key="index">
+        <el-tooltip v-if="item.title.length>4" class="item" effect="dark" :content="item.title" placement="top">
+          <p>
+            {{item.title}}
+          </p>
+        </el-tooltip>
+        <p v-else>
+          {{item.title}}
+        </p>
+      </div>
+    </div>
+    <div class="title-max-box"></div>
+    <dv-scroll-board v-if="showType" :config="config" style="width:534px;height:200px"
+                     @mouseover="mouseoverDv" />
+    <div class="position-suspension-box" v-if="suspensionType"
+         :style="'top:'+suspensionTop+'px;left:'+suspensionLeft+'px;'">
+      <p class="position-suspension-p">
+        {{suspensionText}}
+      </p>
+      <div class="position-suspension-icon-box">
+        <p class="position-suspension-null-left"></p>
+        <p class="position-suspension-icon el-icon-caret-bottom"></p>
+        <p class="position-suspension-null-right"></p>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    reportSecIndexDataGetGaugeOutfit,
+    reportSecIndexDataDistributionHazard,
+  } from '@/api/safetyCheck/index'
+  export default {
+    name: 'annualSecureInspect',
+    props:{
+      propsData:{},
+    },
+    data () {
+      return {
+        showType:false,
+        config:{
+          headerHeight:40,
+          rowNum:5,
+          // header: [],
+          columnWidth:[],
+          headerBGC:'#F5F5F5',
+          oddRowBGC:'#ffffff',
+          evenRowBGC:'#ffffff',
+          data: [],
+          hoverPause:true,
+        },
+        titleList:[],
+        lengthType:false,
+        //鼠标悬浮展示内容
+        suspensionType:false,
+        suspensionText:'',
+        suspensionTop:0,
+        suspensionLeft:0,
+      }
+    },
+    created () {
+
+    },
+    mounted () {
+      this.reportSecIndexDataGetGaugeOutfit();
+    },
+    methods: {
+      //各单位全年指标隐患分布表头数据
+      reportSecIndexDataGetGaugeOutfit(){
+        let self = this;
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        reportSecIndexDataGetGaugeOutfit(obj).then(response => {
+          this.$nextTick(()=>{
+            let list = [];
+            response.data.forEach((item,index)=>{
+              list.push({
+                title:item.name,
+                length:item.name.length
+              })
+            })
+            this.$set(this.config,'columnWidth',[40,94,50,58,58,58,58,58,58]);
+            this.$set(this,'titleList',list);
+            this.reportSecIndexDataDistributionHazard(response.data);
+          })
+        });
+      },
+      //各单位全年指标隐患分布列表
+      reportSecIndexDataDistributionHazard(titleList){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        reportSecIndexDataDistributionHazard(obj).then(response => {
+          let list = [];
+          response.data.forEach((item,index)=>{
+            let minList = [];
+            minList.push(index+1);
+            minList.push(item.subName);
+            minList.push(item.hazardNum);
+            titleList.forEach((minItem,minIndex)=>{
+              minList.push(item[minItem.code]);
+            })
+            list.push(minList)
+          })
+          this.$set(this.config,'data',list);
+          this.$set(this,'showType',true);
+        });
+      },
+      //鼠标悬浮展示内容
+      mouseover(val){
+        if(val.layerY<40){
+          this.suspensionTop = 10;
+        }else if(val.layerY>38&&val.layerY<80){
+          this.suspensionTop = 50;
+        }else if(val.layerY>78&&val.layerY<120){
+          this.suspensionTop = 90;
+        }else if(val.layerY>118&&val.layerY<160){
+          this.suspensionTop = 130;
+        }else if(val.layerY>158&&val.layerY<200){
+          this.suspensionTop = 170;
+        }
+        this.$set(this,'suspensionType',false);
+        this.$set(this,'suspensionText','');
+      },
+      mouseoverDv(row){
+        if(row.columnIndex != 0){
+          this.$set(this,'suspensionLeft',row.columnIndex==1?43:(row.columnIndex==2?137:(row.columnIndex==3?187:(row.columnIndex==4?245:(row.columnIndex==5?303:(row.columnIndex==6?361:(row.columnIndex==7?419:(row.columnIndex==8?477:43))))))));
+          this.$set(this,'suspensionText',row.ceil);
+          this.$set(this,'suspensionType',true);
+        }else{
+          this.$set(this,'suspensionType',false);
+          this.$set(this,'suspensionText','');
+        }
+      },
+    },
+  }
+</script>
+<style scoped lang="scss">
+  .annualHiddenDistribution{
+    position: relative;
+    width:548px;
+    .title-max-box{
+      height: 40px;
+    }
+    .title-max-box-position{
+      z-index:10;
+      position: absolute;
+      top:1px;
+      left:0;
+      display: flex;
+      width:534px;
+      height: 40px;
+      border:1px solid #dfe6ec;
+      background-color: #F5F5F5;
+      p{
+        font-weight:700;
+        text-align: center;
+        line-height:16px;
+        font-size:14px;
+      }
+      div{
+        height: 40px;
+        border-left:1px solid #dfe6ec;
+        align-items: center;
+        display: flex;
+        text-align: center;
+      }
+      div:nth-child(1){;
+        border-left:none;
+        p{
+          width:40px;
+        }
+      }
+      div:nth-child(2){
+        p{
+          width:93px;
+        }
+      }
+      div:nth-child(3){
+        p{
+          padding:0 10px;
+          width:49px;
+        }
+      }
+      .for-box{
+        p{
+          padding:0 10px;
+          width:57px;
+          display: -webkit-box;
+          -webkit-box-orient: vertical;
+          -webkit-line-clamp: 2;
+          overflow: hidden;
+        }
+      }
+    }
+    .position-suspension-box{
+      position: absolute;
+      z-index:10;
+      .position-suspension-p{
+        background-color: rgba(70,70,70);
+        color:#fff;
+        padding: 4px 10px;
+        border-radius:4px;
+        font-size:14px;
+      }
+      .position-suspension-icon-box{
+        display: flex;
+        .position-suspension-icon{
+          display: block;
+          font-size: 14px;
+          width: 14px;
+          height: 14px;
+          margin: -6px;
+          color: rgba(70, 70, 70);
+        }
+        .position-suspension-null-left{
+          width:10px;
+        }
+        .position-suspension-null-right{
+          flex:1;
+        }
+      }
+    }
+    ::v-deep .dv-scroll-board{
+      .header{
+        border-left:1px solid #dfe6ec;
+        border-right:1px solid #dfe6ec;
+        .header-item:nth-child(1){
+          border-left:none !important;
+        }
+        .header-item{
+          color:#333;
+          font-weight: 700;
+          font-size:14px;
+          border-left:1px solid #dfe6ec;
+          border-bottom:1px solid #dfe6ec;
+          border-top:1px solid #dfe6ec;
+        }
+      }
+      .rows{
+        border-left:1px solid #dfe6ec;
+        border-right:1px solid #dfe6ec;
+        border-bottom:1px solid #dfe6ec;
+        .row-item{
+          .ceil:nth-child(1){
+            border-left:none !important;
+          }
+          .ceil{
+            color:#333;
+            font-size:14px;
+            border-left:1px solid #dfe6ec;
+            border-bottom:1px solid #dfe6ec;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 266 - 0
src/views/safetyCheck/collegeWorktable/annualSecureInspect.vue

@@ -0,0 +1,266 @@
+<!-- 人员设备安全 -->
+<template>
+  <div class="annualSecureInspect" v-on:mouseover.stop="mouseover">
+    <div class="title-max-box-position">
+      <div v-for="(item,index) in header" :key="index">
+        <p>{{item}}</p>
+      </div>
+    </div>
+    <div class="title-max-box"></div>
+    <dv-scroll-board v-if="showType" :config="config" style="width:927px;height:200px"
+                     @mouseover="mouseoverDv" />
+    <div class="position-suspension-box" v-if="suspensionType"
+         :style="'top:'+suspensionTop+'px;left:'+suspensionLeft+'px;'">
+      <p class="position-suspension-p">
+        {{suspensionText}}
+      </p>
+      <div class="position-suspension-icon-box">
+        <p class="position-suspension-null-left"></p>
+        <p class="position-suspension-icon el-icon-caret-bottom"></p>
+        <p class="position-suspension-null-right"></p>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    securityIndexStatisticsGetPlanIds,
+    securityIndexStatisticsPlanList,
+  } from '@/api/safetyCheck/index'
+  export default {
+    name: 'annualSecureInspect',
+    props:{
+      propsData:{},
+    },
+    data () {
+      return {
+        header: ['序号', '检查名称', '检查时间', '检查数', '隐患数', '整改数', '多次整改未完成', '整改完成率'],
+        showType:false,
+        config:{
+          headerHeight:40,
+          rowNum:5,
+          columnWidth:[57,190,210,80,80,80,130,100],
+          headerBGC:'#F5F5F5',
+          oddRowBGC:'#ffffff',
+          evenRowBGC:'#ffffff',
+          data: [],
+          hoverPause:true,
+        },
+        //鼠标悬浮展示内容
+        suspensionType:false,
+        suspensionText:'',
+        suspensionTop:0,
+        suspensionLeft:0,
+      }
+    },
+    created () {
+
+    },
+    mounted () {
+      this.securityIndexStatisticsGetPlanIds();
+    },
+    methods: {
+      //查询校级或者院级计划
+      securityIndexStatisticsGetPlanIds(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsGetPlanIds(obj).then(response => {
+          this.securityIndexStatisticsPlanList(response.data);
+        });
+      },
+      //年度全校实验室安全检查统计
+      securityIndexStatisticsPlanList(planIds){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+          planIds:planIds,
+        }
+        securityIndexStatisticsPlanList(obj).then(response => {
+          let list = [];
+          response.data.forEach((item,index)=>{
+            let minList = [];
+            minList.push(index+1);
+            minList.push(item.planTitle);
+            minList.push(item.cycleStartTime+' - '+item.cycleEndTime);
+            minList.push(item.checkNum);
+            minList.push(item.hazardNum);
+            minList.push(item.rectificationNum);
+            minList.push(item.multipleRectificationsNum);
+            minList.push(item.ratio+'%');
+            list.push(minList)
+          })
+          this.$set(this.config,'data',list);
+          this.$set(this,'showType',true);
+        });
+      },
+      //鼠标悬浮展示内容
+      mouseover(val){
+        if(val.layerY<40){
+          this.suspensionTop = 10;
+        }else if(val.layerY>38&&val.layerY<80){
+          this.suspensionTop = 50;
+        }else if(val.layerY>78&&val.layerY<120){
+          this.suspensionTop = 90;
+        }else if(val.layerY>118&&val.layerY<160){
+          this.suspensionTop = 130;
+        }else if(val.layerY>158&&val.layerY<200){
+          this.suspensionTop = 170;
+        }
+        this.$set(this,'suspensionLeft',60);
+        this.$set(this,'suspensionType',false);
+        this.$set(this,'suspensionText','');
+      },
+      mouseoverDv(row){
+        if(row.columnIndex == 1){
+          console.log('row.ceil',row.ceil)
+          this.$set(this,'suspensionText',row.ceil);
+          this.$set(this,'suspensionType',true);
+        }else{
+          this.$set(this,'suspensionType',false);
+          this.$set(this,'suspensionText','');
+        }
+      },
+    },
+  }
+</script>
+<style scoped lang="scss">
+  .annualSecureInspect{
+    position: relative;
+    width:927px;
+    .title-max-box{
+      height: 40px;
+    }
+    .title-max-box-position{
+      z-index:10;
+      position: absolute;
+      top:1px;
+      left:0;
+      display: flex;
+      width:927px;
+      height: 40px;
+      border:1px solid #dfe6ec;
+      background-color: #F5F5F5;
+      p{
+        font-weight:700;
+        text-align: center;
+        line-height:16px;
+        font-size:14px;
+      }
+      div{
+        height: 40px;
+        border-left:1px solid #dfe6ec;
+        align-items: center;
+        display: flex;
+        text-align: center;
+      }
+      div:nth-child(1){;
+        border-left:none;
+        p{
+          width:57px;
+        }
+      }
+      div:nth-child(2){
+        p{
+          width:188px;
+        }
+      }
+      div:nth-child(3){
+        p{
+          width:209px;
+        }
+      }
+      div:nth-child(4){
+        p{
+          width:79px;
+        }
+      }
+      div:nth-child(5){
+        p{
+          width:79px;
+        }
+      }
+      div:nth-child(6){
+        p{
+          width:79px;
+        }
+      }
+      div:nth-child(7){
+        p{
+          width:128px;
+        }
+      }
+      div:nth-child(8){
+        p{
+          width:99px;
+        }
+      }
+    }
+    .position-suspension-box{
+      position: absolute;
+      z-index:10;
+      .position-suspension-p{
+        background-color: rgba(70,70,70);
+        color:#fff;
+        padding: 4px 10px;
+        border-radius:4px;
+        font-size:14px;
+      }
+      .position-suspension-icon-box{
+        display: flex;
+        .position-suspension-icon{
+          display: block;
+          font-size: 14px;
+          width: 14px;
+          height: 14px;
+          margin: -6px;
+          color: rgba(70, 70, 70);
+        }
+        .position-suspension-null-left{
+          width:40px;
+        }
+        .position-suspension-null-right{
+          flex:1;
+        }
+      }
+    }
+    ::v-deep .dv-scroll-board{
+      .header{
+        border-left:1px solid #dfe6ec;
+        border-right:1px solid #dfe6ec;
+        .header-item:nth-child(1){
+          border-left:none !important;
+        }
+        .header-item{
+          color:#333;
+          font-weight: 700;
+          font-size:14px;
+          border-left:1px solid #dfe6ec;
+          border-bottom:1px solid #dfe6ec;
+          border-top:1px solid #dfe6ec;
+        }
+      }
+      .rows{
+        border-left:1px solid #dfe6ec;
+        border-right:1px solid #dfe6ec;
+        border-bottom:1px solid #dfe6ec;
+        .row-item{
+          .ceil:nth-child(1){
+            border-left:none !important;
+          }
+          .ceil{
+            color:#333;
+            font-size:14px;
+            border-left:1px solid #dfe6ec;
+            border-bottom:1px solid #dfe6ec;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 37 - 11
src/views/safetyCheck/collegeWorktable/coverageRateEcharts.vue

@@ -4,27 +4,53 @@
 </template>
 
 <script>
+import {
+  securityIndexStatisticsCheckOverlap,
+} from '@/api/safetyCheck/index'
   import echarts from 'echarts'
   export default {
     name: 'coverageRateEcharts',
+    props:{
+      propsData:{},
+    },
     data(){
       return{
-
+        newData:{},
       }
     },
     created(){
 
     },
     mounted(){
-      this.eCharts();
+      this.securityIndexStatisticsCheckOverlap();
     },
     methods:{
+      securityIndexStatisticsCheckOverlap(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsCheckOverlap(obj).then(response => {
+          this.$set(this,'newData',{
+            notCheckRatio:parseInt(response.data.notCheckRatio),
+            checkRatio:parseInt(response.data.checkRatio),
+            subNum:parseInt(response.data.subNum),
+          });
+
+          this.$nextTick(()=>{
+            this.eCharts(this.newData);
+          })
+        });
+      },
       //eCharts方法
-      eCharts(){
+      eCharts(newData){
         let myChart = this.$echarts.init(document.getElementById('coverageRateEcharts-box'));
+        console.log(this.newData)
         const datalist= [
-          { value: 504, name: '未检查' },
-          { value: 735, name: '已检查' },
+          { value: newData.notCheckRatio, name: '未检查' },
+          { value: newData.checkRatio, name: '已检查' },
         ]
         let option = {
 
@@ -34,7 +60,7 @@
               orient: 'vertical',
               itemWidth: 12,
               itemHeight: 12,
-              right: '10%',
+              left: '60%',
               icon: 'circle',
               top: "38%",
               formatter: (name) => {
@@ -43,10 +69,10 @@
                 var rate;
                 for (var i = 0; i < datalist.length; i++) {
                   total += datalist[i].value;
-                  if (datalist[i].name == name) {
+                  if (datalist[i].name == '未检查') {
                     target = datalist[i].value;
                   }
-                  rate = (total / target).toFixed(2)
+                  rate =  (target / total * 100).toFixed(2)=='NaN'?'0':(target / total * 100).toFixed(2)
                 }
                 return `{one|${name}} {two|${rate}%}`;
               },
@@ -70,7 +96,7 @@
               orient: 'vertical',
               itemWidth: 12,
               itemHeight: 12,
-              right: '10%',
+              left: '60%',
               icon: 'circle',
               top: "54%",
               formatter: (name) => {
@@ -82,7 +108,7 @@
                   if (datalist[i].name == name) {
                     target = datalist[i].value;
                   }
-                  rate = (total / target).toFixed(2)
+                  rate =  (target / total * 100).toFixed(2)=='NaN'?'0':(target / total * 100).toFixed(2)
                 }
                 return `{one|${name}} {two|${rate}%}`;
               },
@@ -105,7 +131,7 @@
           title: [
             {
               text: '实验室',
-              subtext: '2023间',
+              subtext: newData.subNum+'间',
               textStyle: {
                 fontSize: 12,
                 color: "#333333"

+ 44 - 19
src/views/safetyCheck/collegeWorktable/dataScreening.vue

@@ -1,26 +1,26 @@
 <template>
   <!-- 数据总览 -->
   <div class="dataScreening">
-    <div class="top-l-l">
+    <div class="top-l-l" style="width:130px;">
       <div class="top-l-l-t">
-        <i>9</i>
-        <i>9</i>
-        <i>9</i>
-        <b>次</b>
+        <p class="null-p"></p>
+        <p class="for-p" v-for="(item,index) in newData.checkNum">{{item}}</p>
+        <p class="text-p">次</p>
+        <p class="null-p"></p>
       </div>
       <div class="top-l-l-m">2024年</div>
-      <div class="top-l-l-b">校院巡查</div>
+      <div class="top-l-l-b">学院自查</div>
     </div>
     <div class="line"></div>
     <div class="top-l-r">
       <div class="top-l-r-li">
         <img class="top-l-r-li-t" src="@/assets/ZDimages/securityCheck/icon_gzzl_jcxms@1x.png"/>
-        <div class="top-l-r-li-m"><i>6524</i><i>项</i></div>
+        <div class="top-l-r-li-m"><i>{{newData.checkItemsNum}}</i><i>项</i></div>
         <div class="top-l-r-li-b">检查项目数</div>
       </div>
       <div class="top-l-r-li">
         <img class="top-l-r-li-t" src="@/assets/ZDimages/securityCheck/icon_gzzl_xfzgtzs@1x.png"/>
-        <div class="top-l-r-li-m"><i>2546</i><i>项</i></div>
+        <div class="top-l-r-li-m"><i>{{newData.noticeNum}}</i><i>项</i></div>
         <div class="top-l-r-li-b">下发整改通知书</div>
       </div>
     </div>
@@ -28,14 +28,21 @@
 </template>
 
 <script>
-
+  import {
+    securityCollegeStatisticsCollegeCheck,
+  } from '@/api/safetyCheck/index'
   export default {
     name: 'dataScreening',
-    components: {
+    props:{
+      propsData:{},
     },
     data(){
       return{
-
+        newData:{
+          checkNum:'',
+          checkItemsNum:'',
+          noticeNum:'',
+        },
 
       }
     },
@@ -43,10 +50,24 @@
 
     },
     mounted(){
-
+      this.securityCollegeStatisticsCollegeCheck();
     },
     methods: {
-
+      securityCollegeStatisticsCollegeCheck(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityCollegeStatisticsCollegeCheck(obj).then(response => {
+          this.$set(this,'newData',{
+            checkNum:response.data.checkNum+'',
+            checkItemsNum:response.data.checkItemsNum,
+            noticeNum:response.data.noticeNum,
+          });
+        });
+      },
     }
   }
 </script>
@@ -66,8 +87,11 @@
       .top-l-l-t{
         display: flex;
         justify-content: flex-start;
-        margin: 24px 0 0 20px;
-        >i{
+        margin: 24px 0 0 0;
+        .null-p{
+          flex:1;
+        }
+        .for-p{
           font-style: normal;
           width: 20px;
           height: 26px;
@@ -80,7 +104,7 @@
           line-height: 26px;
           text-align: center;
         }
-        >b{
+        .text-p{
           font-weight: 400;
           font-size: 16px;
           color: #333333;
@@ -93,14 +117,16 @@
         font-size: 16px;
         color: #333333;
         line-height: 24px;
-        margin: 22px 0 0 28px;
+        margin: 22px 0 0 0;
+        text-align: center;
       }
       .top-l-l-b{
         font-weight: 400;
         font-size: 14px;
         color: #333333;
         line-height: 24px;
-        margin: 2px 0 0 28px;
+        margin: 2px 0 0 0;
+        text-align: center;
       }
     }
     .line{
@@ -108,7 +134,6 @@
       height:110px;
       border: 1px dashed #D8D8D8;
       margin-top: 14px;
-      margin-left: 10px;
     }
     .top-l-r{
       display: flex;

+ 32 - 15
src/views/safetyCheck/collegeWorktable/dataScreeningChart.vue

@@ -6,46 +6,63 @@
 </template>
 
 <script>
+  import {
+    securityIndexStatisticsProportionChart,
+  } from '@/api/safetyCheck/index'
   import echarts from 'echarts'
   export default {
     name: 'dataScreeningChart',
-    components: {
+    props:{
+      propsData:{},
     },
     data(){
       return{
-
-
+        newData:{},
       }
     },
     created(){
 
     },
     mounted(){
-      this.eCharts();
+      this.securityIndexStatisticsProportionChart();
     },
     methods: {
-      eCharts(){
+      securityIndexStatisticsProportionChart(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsProportionChart(obj).then(response => {
+          this.$set(this,'newData',response.data);
+          this.$nextTick(()=>{
+            this.eCharts(this.newData);
+          })
+        });
+      },
+      eCharts(newData){
         let myChart = this.$echarts.init(document.getElementById('dataScreeningChart-box'));
         let data = [
           {
-            name: "隐患数8724 个",
-            value: 54,
+            name: "隐患数"+newData.hazardNum+" 个",
+            value: newData.hazardRatio,
           },
           {
-            name: "已整改8724 个",
-            value: 44,
+            name: "已整改"+newData.rectifiedNum+" 个",
+            value: newData.rectifiedRatio,
           },
           {
-            name: "暂无法整改4 个",
-            value: 35,
+            name: "暂无法整改"+newData.unableRectifyNum+" 个",
+            value: newData.unableRectifyRatio,
           },
           {
-            name: "多次整改未完成4 个",
-            value: 30,
+            name: "多次整改未完成"+newData.notFinishedNum+" 个",
+            value: newData.notFinishedRatio,
           },
           {
-            name: "复查通过8400 个",
-            value: 20,
+            name: "复查通过"+newData.inspectionPassedNum+" 个",
+            value: newData.inspectionPassedRatio,
           },
         ];
 

+ 45 - 40
src/views/safetyCheck/collegeWorktable/hiddenDangerStatisticsEcharts.vue

@@ -1,53 +1,58 @@
 <template>
-  <div class="hiddenDangerStatisticsEcharts" id="hiddenDangerStatisticsEcharts-box"></div>
+  <div>
+    <div class="hiddenDangerStatisticsEcharts" id="hiddenDangerStatisticsEcharts-box" v-if="eChartsList[0]"></div>
+    <p v-if="!eChartsList[0]" style="color:#999;text-align: center;line-height:330px;">暂无数据</p>
+  </div>
 </template>
 
 <script>
+  import {
+    securityIndexStatisticsHazardScatter,
+  } from '@/api/safetyCheck/index'
   import echarts from 'echarts'
-  import { hiddenCountByType, collegCheckHiddenCountByType,isSCollege } from '@/api/safetyCheck/index'
   export default {
     name: 'hiddenDangerStatisticsEcharts',
+    props:{
+      propsData:{},
+    },
     data(){
       return{
         hdLevel:1,
         userFlg:true,
         nullType:false,
+        eChartsList:[],
       }
     },
     created(){
 
     },
     mounted(){
-        this.schoolEcharts()
+      this.securityIndexStatisticsHazardScatter();
     },
     methods:{
-      schoolEcharts(){
-        let myChart = this.$echarts.init(document.getElementById('hiddenDangerStatisticsEcharts-box'));
-        let data = [{
-          name: "1.基础安全",
-          value: 1,
-        },
-          {
-            name: "10.生物安全",
-            value: 2,
-          },
-          {
-            name: "11.机电安全",
-            value: 3,
-          },
-          {
-            name: "9.特种设备与常规\n冷热设备",
-            value: 4,
-          },];
-       /*  for(let i=0;i<response.rows.length;i++){
-          // substring
-          let obj = {
-            name:response.rows[i].collegeName.length>8?response.rows[i].collegeName.substring(0,8)+'..':response.rows[i].collegeName,
-            nameText:response.rows[i].collegeName,
-            value:response.rows[i].sumTotal,
+      securityIndexStatisticsHazardScatter(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsHazardScatter(obj).then(response => {
+          let list = [];
+          for(let i=0;i<response.data.length;i++){
+            list.push({
+              name:response.data[i].oneLevelName,
+              value:response.data[i].ratio,
+            })
           }
-          data.push(obj);
-        } */
+          this.$set(this,'eChartsList',list[0]?list:[]);
+          this.$nextTick(()=>{
+            this.schoolEcharts(this.eChartsList);
+          })
+        });
+      },
+      schoolEcharts(list){
+        let myChart = this.$echarts.init(document.getElementById('hiddenDangerStatisticsEcharts-box'));
         let option = {
           legend: {
             show:false,
@@ -68,21 +73,21 @@
               radius: ['0%', '40%'],
               label: {
                 normal: {
-                  formatter: '{b} {d}%',
+                  formatter: function(params) {
+                    let name = params.name;
+                    let percent = params.percent+'%';
+                    if (name.length > 10) {
+                      name = name.substring(0, 10) + '...';
+                    }
+                    return name+percent;
+                  },
                   textStyle: {
                     fontSize: 12,
-                    color:'#333'
+                    color: '#333'
                   },
-                  padding: [0, -110, 26, -110],
-                }
-              },
-              labelLine: {
-                normal: {
-                  length: 30,
-                  length2: 110,
                 }
               },
-              data: data,
+              data: list,
               itemStyle: {
                 normal: {
                   color: function (colors) {
@@ -103,6 +108,6 @@
 
 <style scoped lang="scss">
   .hiddenDangerStatisticsEcharts{
-    height:420px;
+    height:330px;
   }
 </style>

+ 158 - 48
src/views/safetyCheck/collegeWorktable/index.vue

@@ -1,16 +1,16 @@
 <template>
   <div class="app-container worktable scrollbar-box">
-      <div class="main">
+    <div class="main" v-if="pageType === 1">
         <div class="top">
           <!-- 数据总览 -->
-          <data-screening></data-screening>
+          <data-screening :propsData="propsData"></data-screening>
           <!-- 数据总览图表 -->
           <div class="top-c">
-            <data-screening-chart></data-screening-chart>
+            <data-screening-chart :propsData="propsData"></data-screening-chart>
           </div>
           <!-- 整改完成率 -->
           <div class="top-r">
-            <rectification-finish></rectification-finish>
+            <rectification-finish :propsData="propsData"></rectification-finish>
           </div>
         </div>
         <div class="center">
@@ -24,11 +24,11 @@
               <div class="center-l-t-b">
                 <div class="center-l-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_gj@1x.png"/>
-                  <p>共计2333项</p>
+                  <p>共计{{dataOne.hazardsNum}}项</p>
                 </div>
                 <div class="center-l-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_wzgyh_sjsys@1x.png"/>
-                  <p>涉及333个实验室</p>
+                  <p>涉及{{dataOne.subNum}}个实验室</p>
                 </div>
               </div>
             </div>
@@ -38,7 +38,7 @@
                 <p></p>
                 <p>检查覆盖率</p>
               </div>
-              <coverage-rate-echarts></coverage-rate-echarts>
+              <coverage-rate-echarts :propsData="propsData"></coverage-rate-echarts>
             </div>
           </div>
           <div class="center-c">
@@ -50,19 +50,19 @@
               <div class="center-c-t-b">
                 <div class="center-c-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_dz@1x.png"/>
-                  <p>当周1项</p>
+                  <p>当周{{dataTwo.weekNum}}项</p>
                 </div>
                 <div class="center-c-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_dy@1x.png"/>
-                  <p>当月1项</p>
+                  <p>当月{{dataTwo.monthNum}}项</p>
                 </div>
                 <div class="center-c-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_sy@1x.png"/>
-                  <p>上月1项</p>
+                  <p>上月{{dataTwo.lastMonthNum}}项</p>
                 </div>
                 <div class="center-c-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_dn@1x.png"/>
-                  <p>当年111项</p>
+                  <p>当年{{dataTwo.yearNum}}项</p>
                 </div>
               </div>
             </div>
@@ -71,7 +71,7 @@
                 <p></p>
                 <p>检查结果统计</p>
               </div>
-              <inspection-statistics-echarts></inspection-statistics-echarts>
+              <inspection-statistics-echarts :propsData="propsData"></inspection-statistics-echarts>
             </div>
           </div>
           <div class="center-c2">
@@ -79,20 +79,20 @@
               <p></p>
               <p>全年指标隐患分布</p>
             </div>
-            <hidden-danger-statistics-echarts></hidden-danger-statistics-echarts>
+            <hidden-danger-statistics-echarts :propsData="propsData"></hidden-danger-statistics-echarts>
           </div>
           <div class="center-r">
-            <div class="center-r-li">
+            <div class="center-r-li" @click="goPage('snapshot')">
               <img  src="@/assets/ZDimages/securityCheck/icon_gzzl_ssp@1x.png"/>
               <p>随手拍</p>
             </div>
             <div class="line"></div>
-            <div class="center-r-li">
+            <div class="center-r-li" @click="goPage('rectificationNotice')">
               <img  src="@/assets/ZDimages/securityCheck/icon_gzzl_zgtz@1x.png"/>
               <p>整改通知</p>
             </div>
             <div class="line"></div>
-            <div class="center-r-li">
+            <div class="center-r-li" @click="goPage('dataStatistics')">
               <img  src="@/assets/ZDimages/securityCheck/icon_gzzl_sjtj@1x.png"/>
               <p>数据统计</p>
             </div>
@@ -102,54 +102,45 @@
           <div class="bottom-l">
             <div class="min-title-box">
               <p></p>
-              <p>2024年学院名称实验室自查统计</p>
-              <p>查看全部</p>
+              <p>{{yearData}}年{{deptName?deptName:'学院'}}实验室自查统计</p>
+              <p @click="goPage('dataStatistics')">查看全部</p>
             </div>
             <div class="bottom-l-b">
-              <el-table class="table-box" border :data="tableList" ref="multipleTable">
-                <el-table-column label="序号" align="center"  type="index" width="60" fixed/>
-                <el-table-column label="检查名称" align="center" prop="title" show-overflow-tooltip  fixed/>
-                <el-table-column label="检查时间" align="center" prop="title" show-overflow-tooltip width="226" fixed/>
-                <el-table-column label="检查数" align="center" prop="title" show-overflow-tooltip width="80" fixed/>
-                <el-table-column label="隐患数" align="center" prop="title" show-overflow-tooltip width="80" fixed/>
-                <el-table-column label="整改数" align="center" prop="title" show-overflow-tooltip width="80" fixed/>
-                <el-table-column label="多次整改未完成" align="center" prop="title" show-overflow-tooltip width="130" fixed/>
-                <el-table-column label="整改完成率" align="center" prop="title" show-overflow-tooltip width="90" fixed/>
-              </el-table>
+              <annualSecureInspect :propsData="propsData"></annualSecureInspect>
             </div>
           </div>
           <div class="bottom-r">
             <div class="min-title-box">
               <p></p>
               <p>实验室全年指标隐患分布</p>
-              <p>查看全部</p>
+              <p @click="goPage('danger')">查看全部</p>
             </div>
             <div class="bottom-r-b">
-              <el-table class="table-box" border :data="tableList" ref="multipleTable">
-                <el-table-column label="序号" align="center"  type="index" width="60" fixed/>
-                <el-table-column label="实验室" align="center" prop="title" show-overflow-tooltip  fixed/>
-                <el-table-column label="隐患总数" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="化学安全" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="安全 设施" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="基础 安全" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="生物安全" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="特种与冷热设备" align="center" prop="title" show-overflow-tooltip width="74" fixed/>
-              </el-table>
+              <annualHiddenDistribution :propsData="propsData"></annualHiddenDistribution>
             </div>
           </div>
         </div>
       </div>
+    <inspection-items-statistics :propsData="minPropsData" v-if="pageType === 4"></inspection-items-statistics>
   </div>
 </template>
 
 <script>
-  import {  } from '@/api/safetyCheck/index'
+  import {
+    securityIndexStatisticsUserIdentity,
+    systemDeptDetail,
+    securityIndexStatisticsUnresolvedHazard,
+    securityIndexStatisticsRectifiedHazard,
+  } from '@/api/safetyCheck/index'
   import dataScreening from './dataScreening.vue'
   import dataScreeningChart from './dataScreeningChart.vue'
   import rectificationFinish from './rectificationFinish.vue'
   import coverageRateEcharts from './coverageRateEcharts.vue'
   import inspectionStatisticsEcharts from './inspectionStatisticsEcharts.vue'
   import hiddenDangerStatisticsEcharts from './hiddenDangerStatisticsEcharts.vue'
+  import annualSecureInspect from './annualSecureInspect.vue'
+  import annualHiddenDistribution from './annualHiddenDistribution.vue'
+  import inspectionItemsStatistics from "@/views/safetyCheck/components/inspectionItemsStatistics.vue";
   export default {
     name: 'index',
     components: {
@@ -159,21 +150,124 @@
       coverageRateEcharts,
       inspectionStatisticsEcharts,
       hiddenDangerStatisticsEcharts,
+      annualSecureInspect,
+      annualHiddenDistribution,
+      inspectionItemsStatistics,
     },
     data(){
       return{
         //用户身份 校级/院级
         userType:"",
-        tableList:[],
+        tableListOne:[],
+        tableListTwoTitle:[],
+        tableType:false,
+        tableListTwo:[],
+        propsData:{},
+        pageType:null,
+        yearData:'',
+        deptName:'',
+        dataOne:{
+          hazardsNum:0,
+          subNum:0,
+        },
+        dataTwo:{
+          weekNum:0,
+          monthNum:0,
+          lastMonthNum:0,
+          yearNum:0,
+        },
+        minPropsData:{},
       }
     },
     created(){
-
+      this.securityIndexStatisticsUserIdentity();
     },
     mounted(){
 
     },
     methods:{
+      //页面跳转
+      goPage(type){
+        if (type == 'snapshot'){
+          //随手拍
+          this.$router.push({ path: '/safetyCheck/snapshot'});
+        } else if (type == 'rectificationNotice'){
+          //整改通知
+          this.$router.push({ path: '/safetyCheck/safetyHazard/rectificationNotice'});
+        } else if (type == 'dataStatistics'){
+          //数据统计
+          this.$router.push({ path: '/safetyCheck/dataStatistics'});
+        } else if (type == 'dataStatistics'){
+          //检查统计
+          this.$router.push({ path: '/safetyCheck/dataStatistics'});
+        } else if (type == 'danger'){
+          //检查项统计
+          this.$set(this,'minPropsData',{
+            deptId :localStorage.getItem('deptId'),
+            checkCategory:2,
+            title:localStorage.getItem('deptName')
+          });
+          this.$set(this,'pageType',4);
+        }
+      },
+      tableButton(type){
+        if(type = 6){
+          this.securityIndexStatisticsUserIdentity();
+        }
+      },
+      //查询用户身份
+      securityIndexStatisticsUserIdentity(){
+        securityIndexStatisticsUserIdentity().then(response => {
+          this.$set(this,'propsData',{
+            source:false,
+            schoolAdmin:response.schoolAdmin,
+            deptId:response.deptId,
+            subIds:response.subIds,
+          });
+          this.$set(this,'pageType',1);
+          this.$set(this,'yearData',new Date().getFullYear());
+          if(!response.schoolAdmin){
+            //未整改隐患
+            this.securityIndexStatisticsUnresolvedHazard();
+            //已整改隐患
+            this.securityIndexStatisticsRectifiedHazard();
+          }
+          this.systemDeptDetail(response.deptId);
+        });
+      },
+      systemDeptDetail(deptId){
+        if(!deptId){
+          this.msgError('非院级用户,无法查看相关数据.')
+          return
+        }
+        systemDeptDetail({deptId:deptId}).then(response => {
+          this.$set(this,'deptName',response.data.deptName);
+        });
+      },
+      //未整改隐患
+      securityIndexStatisticsUnresolvedHazard(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsUnresolvedHazard(obj).then(response => {
+          this.$set(this,'dataOne',response.data);
+        });
+      },
+      //已整改隐患
+      securityIndexStatisticsRectifiedHazard(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsRectifiedHazard(obj).then(response => {
+          this.$set(this,'dataTwo',response.data);
+        });
+      },
       renderheader(h, { column, $index }) {
         return h('span', {}, [
           h('span', {}, column.label.split('/')[0]),
@@ -192,7 +286,7 @@
     display: flex;
     flex-direction: column;
     overflow: hidden;
-    padding:10px!important;
+    padding:10px 0 10px 10px !important;
     font-weight: 400;
     overflow-y: auto;
     .min-title-box{
@@ -372,23 +466,39 @@
       justify-content: flex-start;
       .bottom-l{
         width: 967px;
-        height: 301px;
+        height: 320px;
+        display: flex;
+        flex-direction: column;
+        overflow: hidden;
         background: #FFFFFF;
-        box-shadow: 0px 4px 14px 0px rgba(0,0,0,0.2);
+        box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.1);
         border-radius: 20px 20px 20px 20px;
         .bottom-l-b{
+          display: flex;
+          flex:1;
+          flex-direction: column;
+          overflow: hidden;
           margin: 14px 20px 0;
+          padding-bottom:20px;
         }
       }
       .bottom-r{
-        width: 548px;
-        height: 301px;
+        width: 570px;
+        height: 320px;
+        display: flex;
+        flex-direction: column;
+        overflow: hidden;
         background: #FFFFFF;
         box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.1);
         border-radius: 10px 10px 10px 10px;
         margin-left: 20px;
         .bottom-r-b{
-          margin: 14px 20px 0;
+          display: flex;
+          flex:1;
+          flex-direction: column;
+          overflow: hidden;
+          margin: 14px 18px 0;
+          padding-bottom:20px;
         }
       }
     }

+ 34 - 28
src/views/safetyCheck/collegeWorktable/inspectionStatisticsEcharts.vue

@@ -3,43 +3,49 @@
 </template>
 
 <script>
-  import { checkStatistics } from '@/api/safetyCheck/index'
+  import {
+    securityIndexStatisticsCheckResults
+  } from '@/api/safetyCheck/index'
   export default {
     name: 'inspectionStatisticsEcharts',
+    props:{
+      propsData:{},
+    },
     data(){
       return{
-
+        newData:{},
       }
     },
     created(){
-
     },
     mounted(){
-      this.eCharts();
+      this.securityIndexStatisticsCheckResults();
     },
     methods:{
-      //eCharts方法
-      eCharts(){
-        let data = {
-          name : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月',],
-          standards : [0,0,10,20,30,40,50,40,30,20,10,0,0],
-          notStandards : [0,0,5,10,10,20,25,30,20,20,20,20,20],
+      securityIndexStatisticsCheckResults(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
         }
-        /* for(let i=0;i<response.rows.length;i++){
-          data.name.push(response.rows[i].yearMonth)
-          if(response.rows[i].notStandards.indexOf('%') != -1){
-            response.rows[i].notStandards = response.rows[i].notStandards.split('%')[0]
-            data.notStandards.push(response.rows[i].notStandards)
-          }else{
-            data.notStandards.push(response.rows[i].notStandards)
-          }
-          if(response.rows[i].standards.indexOf('%') != -1){
-            response.rows[i].standards = response.rows[i].standards.split('%')[0]
-            data.standards.push(response.rows[i].standards)
-          }else{
-            data.standards.push(response.rows[i].standards)
+        securityIndexStatisticsCheckResults(obj).then(response => {
+          let nameList = [];
+          let standardsList = [];
+          let notStandardsList = [];
+          for(let i=0;i<response.data.length;i++){
+            nameList.push(response.data[i].month)
+            standardsList.push(response.data[i].qualifiedNum)
+            notStandardsList.push(response.data[i].unqualifiedNum)
+
           }
-        } */
+          this.$nextTick(()=>{
+            this.eCharts(nameList,standardsList,notStandardsList);
+          })
+        });
+      },
+      //eCharts方法
+      eCharts(nameList,standardsList,notStandardsList){
         let myChart = this.$echarts.init(document.getElementById('inspectionStatisticsEcharts-box'));
         let option = {
           //你的代码
@@ -50,7 +56,7 @@
               let html = '<div>';
               html += '<p>'+params[0].name+'</p>'
               for(let i=0;i<params.length;i++){
-                html += '<p>'+params[i].marker+'&nbsp'+params[i].seriesName+'&nbsp:&nbsp'+params[i].data+'%<p>'
+                html += '<p>'+params[i].marker+'&nbsp'+params[i].seriesName+'&nbsp:&nbsp'+params[i].data+'<p>'
               }
               return html;
             },
@@ -100,7 +106,7 @@
               axisTick: {
                 show: false,
               },
-              data: data.name,
+              data: nameList,
             },
           ],
           yAxis: [
@@ -192,7 +198,7 @@
                   global: false,
                 },
               },
-              data: data.standards,
+              data: standardsList,
             },
             {
               name: '不符合',
@@ -247,7 +253,7 @@
                   global: false,
                 },
               },
-              data: data.notStandards,
+              data: notStandardsList,
             }
           ]
         };

+ 29 - 7
src/views/safetyCheck/collegeWorktable/rectificationFinish.vue

@@ -6,25 +6,47 @@
 </template>
 
 <script>
+import {
+  securityIndexStatisticsCompleteRatio,
+} from '@/api/safetyCheck/index'
   import echarts from 'echarts'
   export default {
     name: 'rectificationFinish',
-    components: {
+    props:{
+      propsData:{},
     },
     data(){
       return{
-
-
+        newData:{},
       }
     },
     created(){
 
     },
     mounted(){
-      this.eCharts();
+      this.securityIndexStatisticsCompleteRatio();
     },
     methods: {
-      eCharts(){
+      securityIndexStatisticsCompleteRatio(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsCompleteRatio(obj).then(response => {
+          let nameList = [];
+          let valueList = [];
+          for(let i=0;i<response.data.length;i++){
+            nameList.push(response.data[i].month)
+            valueList.push(response.data[i].ratio)
+          }
+          this.$nextTick(()=>{
+            this.eCharts(nameList,valueList);
+          })
+        });
+      },
+      eCharts(nameList,valueList){
         let myChart = this.$echarts.init(document.getElementById('rectificationFinish-box'));
 
         let option = {
@@ -53,7 +75,7 @@
           xAxis : [
             {
               type : 'category',
-              data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],
+              data : nameList,
               axisLabel: {
                 textStyle: {//改变X轴字体颜色
                   color: '#999999',
@@ -122,7 +144,7 @@
               },
               type:'bar',
               barWidth: '10',
-              data:[10, 52, 200, 334, 390, 330, 220,234,316,123,442,234]
+              data:valueList
             }
           ]
         };

+ 238 - 188
src/views/safetyCheck/components/checkItem.vue

@@ -25,10 +25,10 @@
                 :show-all-levels="false"
                 :options="cascaderData"
                 :props="{ value: 'id', label: 'labelName',emitPath:false }"
-                ></el-cascader>
+              ></el-cascader>
             </el-form-item>
-            <el-form-item label="" prop="checkFlag">
-              <el-select v-model="queryParams.checkFlag" placeholder="检查结果" style="width: 200px">
+            <el-form-item label="" prop="checkFlagInt" v-if="checkFlagIntType">
+              <el-select v-model="queryParams.checkFlagInt" placeholder="检查结果" style="width: 200px">
                 <el-option
                   v-for="dict in optionList"
                   :key="dict.value"
@@ -37,10 +37,10 @@
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="createName">
+            <el-form-item label="" prop="checkUserName">
               <el-input
                 maxLength="30"
-                v-model="queryParams.createName"
+                v-model="queryParams.checkUserName"
                 placeholder="检查人"
                 style="width: 200px"
               />
@@ -63,49 +63,73 @@
           </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 class="table-box" 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="name" show-overflow-tooltip>
               <template slot-scope="scope">
                 <span>{{scope.row.hazardCheckCode}} {{scope.row.hazardCheckName}}</span>
               </template>
             </el-table-column>
-            <el-table-column label="隐患描述" prop="hazardDescribe" width="400" show-overflow-tooltip/>
+            <el-table-column label="隐患描述" prop="hazardDescribe" width="400" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span v-if="scope.row.checkStatus == 0&&scope.row.checkDraftVo">{{scope.row.checkDraftVo.hazardDescribe}}</span>
+                <span v-else>{{scope.row.hazardDescribe}}</span>
+              </template>
+            </el-table-column>
             <el-table-column label="检查结果" prop="checkFlag" width="150" show-overflow-tooltip>
               <template slot-scope="scope">
                 <span>{{scope.row.checkStatus!=1?'-':(scope.row.checkFlag?'符合':'不符合')}}</span>
               </template>
             </el-table-column>
-            <el-table-column label="检查人" prop="createName" width="150" show-overflow-tooltip/>
+            <el-table-column label="检查人" prop="checkUserName" width="150" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.checkStatus == 1?scope.row.checkUserName:'-'}}</span>
+              </template>
+            </el-table-column>
             <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>
+                <span>{{ scope.row.checkStatus == 1?parseTime(scope.row.checkTime,'{y}-{m}-{d} {h}:{i}'):'-' }}</span>
               </template>
             </el-table-column>
             <el-table-column label="状态" prop="checkStatus" width="150" show-overflow-tooltip>
               <template slot-scope="scope">
-                <span>{{scope.row.checkStatus == '0'?'未开始':(scope.row.checkStatus == '1'?'已完成':(scope.row.checkStatus == '2'?'检查中':''))}}</span>
+                <span v-if="scope.row.checkStatus == 0&&scope.row.checkDraftVo">检查中</span>
+                <span v-else>{{scope.row.checkStatus == '0'?'未开始':(scope.row.checkStatus == '1'?'已完成':'')}}</span>
               </template>
             </el-table-column>
             <el-table-column label="操作" width="150" show-overflow-tooltip>
               <template slot-scope="scope">
                 <div class="table-button-box">
                   <p class="table-button-null"></p>
+                  <!-- 校级 -->
                   <p class="table-button-p"
-                     v-if="scope.row.checkStatus == 0"
+                     v-if="scope.row.checkStatus == 0 && propsData.pageType == 1"
                      @click="tableButton(1,scope.row)"
-
+                     v-hasPermiRouter="['security:checkPlan:detail']"
                   >开始检查</p>
+                  <!-- 院级 -->
+                  <p class="table-button-p"
+                     v-if="scope.row.checkStatus == 0 && propsData.pageType == 2"
+                     @click="tableButton(1,scope.row)"
+                     v-hasPermiRouter="['security:checkPlan_1:detail']"
+                  >开始检查</p>
+                  <!-- 校级 -->
+                  <p class="table-button-p"
+                     v-if="(scope.row.checkStatus == 1 && !checkSetType) && propsData.pageType == 1"
+                     @click="tableButton(3,scope.row)"
+                     v-hasPermiRouter="['security:checkPlan:detail']"
+                  >编辑</p>
+                  <!-- 院级 -->
+                  <p class="table-button-p"
+                     v-if="(scope.row.checkStatus == 1 && !checkSetType) && propsData.pageType == 2"
+                     @click="tableButton(3,scope.row)"
+                     v-hasPermiRouter="['security:checkPlan_1:detail']"
+                  >编辑</p>
                   <p class="table-button-p"
                      v-if="scope.row.checkStatus == 1"
                      @click="tableButton(2,scope.row)"
 
                   >详情</p>
-                  <p class="table-button-p"
-                     v-if="scope.row.checkStatus == 2"
-                     @click="tableButton(3,scope.row)"
-
-                  >编辑</p>
                   <p class="table-button-null"></p>
                 </div>
               </template>
@@ -116,7 +140,7 @@
                       :total="total"
                       :page.sync="queryParams.page"
                       :limit.sync="queryParams.pageSize"
-                      @pagination="getList"
+                      @pagination="securityCheckPlanSetFindProgress"
           />
         </div>
       </div>
@@ -131,175 +155,198 @@
   import {
     securityCheckOptionList,
     securityCheckSetOptionList,
-  } from '@/api/safetyCheck/indexDemoOne'
-  import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
+    securityCheckPlanSetFindProgress
+  } from '@/api/safetyCheck/index'
+  import initiateInspect from '@/views/safetyCheck/components/initiateInspect/initiateInspect.vue'
+
   export default {
     name: 'checkItem',
     components: {
       initiateInspect
     },
-    props:{
-      propsData:{},
+    props: {
+      propsData: {}
     },
-    data(){
-      return{
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+    data() {
+      return {
         //页面状态
-        pageType:1,
+        pageType: 1,
         //状态选项卡
-        checkStatus:null,
-        //页面遮罩
-        loading:false,
+        checkStatus: null,
+        checkFlagIntType: true,
         //下拉列表数据
-        optionList:[
-          {value:1,label:'符合'},
-          {value:0,label:'不符合'},
+        optionList: [
+          { value: 1, label: '符合' },
+          { value: 0, label: '不符合' },
+          { value: 2, label: '草稿' }
         ],
-        cascaderData:[],
+        cascaderData: [],
         //查询条件
-        queryParams:{
-          page:1,
-          pageSize:20,
-          hazardCheckPro:null,
-          checkFlag :null,
-          createName :'',
+        queryParams: {
+          page: 1,
+          pageSize: 20,
+          hazardCheckPro: null,
+          checkFlagInt: null,
+          checkUserName: ''
         },
         //时间数据
-        dateRange:[],
+        dateRange: [],
         //列表数据
-        dataList:[],
+        dataList: [],
         //数据数量
-        total:0,
+        total: 0,
+        //批次是否完成
+        checkSetType: false,
         //组件传参
-        initiateInspectData:{},
+        initiateInspectData: {}
       }
     },
-    created(){
-      this.securityCheckOptionList();
-      this.getList();
+    created() {
+      this.securityCheckOptionList()
+      this.securityCheckPlanSetFindProgress()
     },
-    mounted(){
+    mounted() {
 
     },
-    methods:{
+    methods: {
       //选项卡切换
-      tableCheck(type){
-        if (this.checkStatus !== type){
-          this.$set(this,'checkStatus',type);
-          this.resetQuery();
+      tableCheck(type) {
+        if (this.checkStatus !== type) {
+          if (type == null) {
+            //全部
+            this.$set(this, 'optionList',[{ value: 1, label: '符合' },{ value: 0, label: '不符合' },{ value: 2, label: '草稿' }])
+            this.$set(this, 'checkFlagIntType',true)
+          } else if (type == 0) {
+            //待检查
+            this.$set(this, 'checkFlagIntType',false)
+          } else if (type == 2) {
+            //草稿
+            this.$set(this, 'checkFlagIntType',false)
+          } else if (type == 1) {
+            //已检查
+            this.$set(this, 'optionList', [{ value: 1, label: '符合' },{ value: 0, label: '不符合' }])
+            this.$set(this, 'checkFlagIntType',true)
+          }
+          this.$set(this, 'checkStatus', type)
+          this.resetQuery()
         }
       },
       // 返回按钮
-      backPage(){
-        this.$parent.tableButton(6);
+      backPage() {
+        this.$parent.tableButton(6)
       },
       //查询按钮
-      handleQuery(){
-        this.$set(this.queryParams,'page',1);
-        this.getList();
+      handleQuery() {
+        this.$set(this.queryParams, 'page', 1)
+        this.securityCheckPlanSetFindProgress()
       },
       //重置按钮
-      resetQuery(){
-        this.$set(this,'dateRange',[])
-        this.$set(this,'queryParams',{
-          page:1,
-          pageSize:20,
-          hazardCheckPro:null,
-          checkFlag :null,
-          createName :'',
-        });
-        this.getList();
+      resetQuery() {
+        this.$set(this, 'dateRange', [])
+        this.$set(this, 'queryParams', {
+          page: 1,
+          pageSize: 20,
+          hazardCheckPro: null,
+          checkFlagInt: null,
+          checkUserName: ''
+        })
+        this.securityCheckPlanSetFindProgress()
       },
       //获取数据列表
-      getList(){
-        this.$set(this,'loading',true);
+      getList() {
         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 = "";
+        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.manageId = this.propsData.manageId
         obj.checkStatus = this.checkStatus
         securityCheckSetOptionList(obj).then(response => {
-          this.$set(this,'loading',false);
-          this.$set(this,'dataList',response.data.records);
-          this.$set(this,'total',response.data.total);
-        });
+          this.$set(this, 'dataList', response.data.records)
+          this.$set(this, 'total', response.data.total)
+        })
+      },
+      //查询检查批次是否完成
+      securityCheckPlanSetFindProgress() {
+        securityCheckPlanSetFindProgress({ planSetId: this.propsData.planSetId }).then(response => {
+          this.$set(this, 'checkSetType', response.data)
+          this.getList()
+        })
       },
       //检查项列表
-      securityCheckOptionList(){
+      securityCheckOptionList() {
         securityCheckOptionList({}).then(response => {
-          let list = this.getCascaderData(response.data);
-          this.$set(this,'cascaderData',list);
-        });
+          let list = this.getCascaderData(response.data)
+          this.$set(this, 'cascaderData', list)
+        })
       },
-      getCascaderData(list){
-        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].children){
-            if(list[i].children[0]){
-              list[i].children = self.getCascaderData(list[i].children);
-            }else{
-              if(list[i].level != 3){
-                list.splice(i,1);
+      getCascaderData(list) {
+        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].children) {
+            if (list[i].children[0]) {
+              list[i].children = self.getCascaderData(list[i].children)
+            } else {
+              if (list[i].level != 3) {
+                list.splice(i, 1)
                 i--
-              }else{
+              } else {
                 delete list[i].children
               }
             }
-          }else{
-            if(list[i].level != 3){
-              list.splice(i,1);
+          } else {
+            if (list[i].level != 3) {
+              list.splice(i, 1)
               i--
-            }else{
+            } else {
               delete list[i].children
             }
           }
         }
-        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].children){
-            if(list[i].children[0]){
-              list[i].children = self.getCascaderData(list[i].children);
-            }else{
-              if(list[i].level != 3){
-                list.splice(i,1);
+        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].children) {
+            if (list[i].children[0]) {
+              list[i].children = self.getCascaderData(list[i].children)
+            } else {
+              if (list[i].level != 3) {
+                list.splice(i, 1)
                 i--
-              }else{
+              } else {
                 delete list[i].children
               }
             }
-          }else{
-            if(list[i].level != 3){
-              list.splice(i,1);
+          } else {
+            if (list[i].level != 3) {
+              list.splice(i, 1)
               i--
-            }else{
+            } else {
               delete list[i].children
             }
           }
         }
-        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].children){
-            if(list[i].children[0]){
-              list[i].children = self.getCascaderData(list[i].children);
-            }else{
-              if(list[i].level != 3){
-                list.splice(i,1);
+        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].children) {
+            if (list[i].children[0]) {
+              list[i].children = self.getCascaderData(list[i].children)
+            } else {
+              if (list[i].level != 3) {
+                list.splice(i, 1)
                 i--
-              }else{
+              } else {
                 delete list[i].children
               }
             }
-          }else{
-            if(list[i].level != 3){
-              list.splice(i,1);
+          } else {
+            if (list[i].level != 3) {
+              list.splice(i, 1)
               i--
-            }else{
+            } else {
               delete list[i].children
             }
           }
@@ -307,114 +354,117 @@
         return list
       },
       //操作按钮
-      tableButton(type,row){
-        let self = this;
-        if(type == 1){
+      tableButton(type, row) {
+        let self = this
+        if (type == 1) {
           //开始检查
-          this.$set(this,'pageType',2);
+          this.$set(this, 'pageType', 2)
           let obj = JSON.parse(JSON.stringify(row))
-          obj.manageId = this.propsData.manageId;
-          obj.processType = 'inspect';
-          obj.showType = false;
-          this.$set(this,'initiateInspectData',obj);
-        }else if(type == 2){
+          obj.manageId = this.propsData.manageId
+          obj.showType = false
+          obj.orderTitle = '开始检查'
+          obj.orderType = '1'
+          this.$set(this, 'initiateInspectData', obj)
+        } else if (type == 2) {
           //详情
-          this.$set(this,'pageType',2);
+          this.$set(this, 'pageType', 2)
           let obj = JSON.parse(JSON.stringify(row))
-          obj.manageId = this.propsData.manageId;
-          obj.showType = true;
-          this.$set(this,'initiateInspectData',obj);
-        }else if(type == 3){
+          obj.manageId = this.propsData.manageId
+          obj.showType = true
+          obj.orderTitle = '检查详情'
+          obj.orderType = '2'
+          this.$set(this, 'initiateInspectData', obj)
+        } else if (type == 3) {
           //编辑
-          this.$set(this,'pageType',2);
+          this.$set(this, 'pageType', 2)
           let obj = JSON.parse(JSON.stringify(row))
-          obj.manageId = this.propsData.manageId;
-          obj.processType = 'inspect';
-          obj.showType = false;
-          this.$set(this,'initiateInspectData',obj);
-        }else if(type == 6){
+          obj.manageId = this.propsData.manageId
+          obj.showType = false
+          obj.orderType = '1'
+          this.$set(this, 'initiateInspectData', obj)
+        } else if (type == 6) {
           //返回并刷新
-          this.$set(this,'pageType',1);
-          this.getList();
+          this.$set(this, 'pageType', 1)
+          this.securityCheckPlanSetFindProgress()
         }
-      },
-    },
+      }
+    }
   }
 </script>
 
 <style scoped lang="scss">
-  .checkItem{
-    .content-box{
-      flex:1;
+  .checkItem {
+    .content-box {
+      flex: 1;
       display: flex;
       flex-direction: column;
       overflow: hidden;
-      .table-school-college-toggle-box{
+      .table-school-college-toggle-box {
         overflow: hidden;
         display: inline-block;
-        margin-right:10px;
-        p{
+        margin-right: 10px;
+        p {
           display: inline-block;
           text-align: center;
-          width:80px;
-          line-height:40px;
-          height:40px;
-          color:#333;
+          width: 80px;
+          line-height: 40px;
+          height: 40px;
+          color: #333;
           background-color: #fff;
-          border:1px solid #E0E0E0;
-          font-size:14px;
+          border: 1px solid #E0E0E0;
+          font-size: 14px;
           cursor: pointer;
         }
-        p:nth-child(1){
+        p:nth-child(1) {
           border-top-left-radius: 4px;
           border-bottom-left-radius: 4px;
           /*border-right:none;*/
         }
-        p:nth-child(4){
+        p:nth-child(4) {
           border-top-right-radius: 4px;
           border-bottom-right-radius: 4px;
           /*border-left:none;*/
         }
-        .p-check{
-          border:1px solid #0183FA;
+        .p-check {
+          border: 1px solid #0183FA;
           background-color: #0183FA;
-          color:#fff;
+          color: #fff;
         }
       }
-      .form-button-max-big-box-me{
+      .form-button-max-big-box-me {
         display: inline-block;
         overflow: hidden;
-        margin-right:10px;
-        .form-button-big-box-me{
+        margin-right: 10px;
+        .form-button-big-box-me {
           display: flex;
-          div{
+          div {
             position: relative;
-            height:40px;
-            width:100px;
+            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;
+            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;
+            .icon-p-me {
+              width: 15px;
+              height: 15px;
+              line-height: 15px;
               text-align: center;
               position: absolute;
-              right:0;
-              bottom:0;
-              color:#fff;
+              right: 0;
+              bottom: 0;
+              color: #fff;
               background: #0183fa;
-              border-top-left-radius:4px;
+              border-top-left-radius: 4px;
             }
           }
-          .checkDiv-me{
-            color:#0183FA!important;
-            border:1px solid #0183FA!important;
+          .checkDiv-me {
+            color: #0183FA !important;
+            border: 1px solid #0183FA !important;
           }
         }
       }

File diff suppressed because it is too large
+ 170 - 0
src/views/safetyCheck/components/exportComponent/exportComponent.vue


+ 166 - 68
src/views/safetyCheck/components/initiateInspect/historyRecordsComponent.vue

@@ -1,33 +1,117 @@
 <!--历史记录-->
 <template>
   <div class="page-container initiateInspect-historyRecordsComponent">
-    <!--详情/整改展示/复核展示-->
-    <div v-for="(item,index) in dataList" :key="index">
+    <!--检查信息-->
+    <div v-if="!newData.checkFlag">
       <p class="content-right-title-min-p">
-        {{item.dataList1Data1 == 1?'隐患信息':(item.dataList1Data1 == 2?'隐患整改':(item.dataList1Data1 == 3?'复查验证':''))}}
-        <span :class="item.itemShowType?'el-icon-arrow-down':'el-icon-arrow-up'" @click="itemShowButton(index)"></span>
+        隐患信息
+        <span :class="newData.showType?'el-icon-arrow-down':'el-icon-arrow-up'" @click="infoShowButton"></span>
       </p>
-      <div v-if="item.itemShowType" style="margin-top:20px;">
-        <div class="right-text-box" v-if="item.dataList1Data1 == 2 || item.dataList1Data1 == 3">
-          <p class="right-text-name-p">{{item.dataList1Data1 == 2?'整改结果':(item.dataList1Data1 == 3?'复查结果':'')}}</p>
-          <div class="right-check-box">
-            <div class="right-min-check-title-box">
-              <p></p>
-            </div>
-            <p class="right-check-title-p" v-if="item.dataList1Data1 == 2">{{newData.rectifyStatus == 1?'已整改':'暂无法整改'}}</p>
-            <p class="right-check-title-p" v-if="item.dataList1Data1 == 3">{{newData.rectifyStatus == 1?'复查完毕':'退回整改'}}</p>
-          </div>
-        </div>
+      <div v-if="newData.showType" style="margin-top:20px;">
         <div class="right-text-box">
-          <p class="right-text-name-p">{{item.dataList1Data1 == 1?'隐患描述':(item.dataList1Data1 == 2?'整改措施':(item.dataList1Data1 == 3?'验证情况':''))}}</p>
+          <p class="right-text-name-p">隐患描述</p>
           <div class="right-text-text-box" style="width:704px;">
-            <p style="min-height:80px;">{{item.dataList1Data2}}</p>
+            <p style="min-height:80px;">{{newData.hazardDescribe?newData.hazardDescribe:'-'}}</p>
           </div>
         </div>
-        <div class="right-text-box">
+        <div class="right-text-box" v-if="newData.uploadDtoList[0]">
           <p class="right-text-name-p">现场照片</p>
-          <img :src="imgItem" @click="fullScreenViewClick(item.dataList1Data3,imgIndex)"
-               v-for="(imgItem,imgIndex) in item.dataList1Data3" :key="imgIndex">
+          <img class="for-img" :src="imgItem.fileUrl" @click="lookImg(newData.uploadDtoList,imgIndex)"
+               v-for="(imgItem,imgIndex) in newData.uploadDtoList" :key="imgIndex">
+        </div>
+      </div>
+    </div>
+    <!--整改展示/复核展示-->
+    <div v-for="(item,index) in dataList" :key="index">
+      <div>
+        <p class="content-right-title-min-p">
+          隐患整改
+          <span :class="item.topShowType?'el-icon-arrow-down':'el-icon-arrow-up'" @click="topShowButton(index)"></span>
+        </p>
+        <div v-if="item.topShowType" style="margin-top:20px;">
+          <div class="right-text-box">
+            <p class="right-text-name-p">整改结果</p>
+            <div class="right-check-box">
+              <div class="right-min-check-title-box">
+                <p></p>
+              </div>
+              <p class="right-check-title-p">{{item.rectifyResult?'已整改':'暂无法整改'}}</p>
+            </div>
+          </div>
+          <div class="right-text-box">
+            <p class="right-text-name-p">整改措施</p>
+            <div class="right-text-text-box" style="width:704px;">
+              <p style="min-height:80px;">{{item.rectifyMeasure}}</p>
+            </div>
+          </div>
+          <div class="right-text-box">
+            <p class="right-text-name-p">现场照片</p>
+            <img class="for-img" :src="imgItem.fileUrl" @click="lookImg(item.rectifyUploadList,imgIndex)"
+                 v-for="(imgItem,imgIndex) in item.rectifyUploadList" :key="imgIndex">
+          </div>
+          <!--<div class="right-text-box">-->
+            <!--<p class="right-text-name-p">整改方案</p>-->
+            <!--<div class="up-file-box">-->
+              <!--<img src="@/assets/ZDimages/safetyCheck/icon_dr_wj.png">-->
+              <!--<p @click="lookFile(item)">{{item.rectifyMaterialName}}</p>-->
+            <!--</div>-->
+          <!--</div>-->
+          <div class="right-text-box" style="display: flex;">
+            <div class="right-text-box">
+              <p class="right-text-name-p">整改人</p>
+              <div class="right-text-text-box" style="height:40px;width:300px;">
+                <p>{{item.rectifyName}}{{item.rectifyAccount?'-'+item.rectifyAccount:''}}</p>
+              </div>
+            </div>
+            <div class="right-text-box">
+              <p class="right-text-name-p">处理时间</p>
+              <div class="right-text-text-box" style="height:40px;width:300px;">
+                <p>{{parseTime(item.rectifyTime,"{y}-{m}-{d} {h}:{i}")}}</p>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div v-if="item.examineResult !== null">
+        <p class="content-right-title-min-p">
+          复查验证
+          <span :class="item.bottomShowType?'el-icon-arrow-down':'el-icon-arrow-up'" @click="bottomShowButton(index)"></span>
+        </p>
+        <div v-if="item.bottomShowType" style="margin-top:20px;">
+          <div class="right-text-box">
+            <p class="right-text-name-p">复查结果</p>
+            <div class="right-check-box">
+              <div class="right-min-check-title-box">
+                <p></p>
+              </div>
+              <p class="right-check-title-p">{{item.examineResult?'复查完毕':'退回整改'}}</p>
+            </div>
+          </div>
+          <div class="right-text-box">
+            <p class="right-text-name-p">验证情况</p>
+            <div class="right-text-text-box" style="width:704px;">
+              <p style="min-height:80px;">{{item.examineOpinion}}</p>
+            </div>
+          </div>
+          <div class="right-text-box">
+            <p class="right-text-name-p">现场照片</p>
+            <img class="for-img" :src="imgItem.fileUrl" @click="lookImg(item.examineUploadList,imgIndex)"
+                 v-for="(imgItem,imgIndex) in item.examineUploadList" :key="imgIndex">
+          </div>
+          <div class="right-text-box" style="display: flex;">
+            <div class="right-text-box">
+              <p class="right-text-name-p">复查人</p>
+              <div class="right-text-text-box" style="height:40px;width:300px;">
+                <p>{{item.reviewName}}{{item.reviewAccount?'-'+item.reviewAccount:''}}</p>
+              </div>
+            </div>
+            <div class="right-text-box">
+              <p class="right-text-name-p">复查时间</p>
+              <div class="right-text-text-box" style="height:40px;width:300px;">
+                <p>{{parseTime(item.reviewTime,"{y}-{m}-{d} {h}:{i}")}}</p>
+              </div>
+            </div>
+          </div>
         </div>
       </div>
     </div>
@@ -43,61 +127,49 @@
     data(){
       return{
         newData:{
-          rectifyStatus:1,
+          checkFlag:true,
+          showType:true,
+          hazardDescribe:"",
+          uploadDtoList:[],
         },
-        dataList:[
-          {
-            dataList1Data1:'1',
-            dataList1Data2:'现场隐患信息描述内容',
-            dataList1Data3:[
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-            ],
-            itemShowType:true,
-          },
-          {
-            dataList1Data1:'2',
-            dataList1Data2:'整改措施整改措施整改措施整改措施',
-            dataList1Data3:[
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-            ],
-            itemShowType:true,
-          },
-          {
-            dataList1Data1:'3',
-            dataList1Data2:'验证情况验证情况验证情况验证情况验证情况验证情况验证情况验证情况验证情况验证情况验证情况验证情况验证情况验证情况验证情况',
-            dataList1Data3:[
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-              'https://inews.gtimg.com/news_bt/ObxBXJWswEC7oTRhEqLPmyZOq_o2q_HYFD0L4tt-vzEFYAA/641',
-            ],
-            itemShowType:true,
-          },
-        ],
+        dataList:[],
       }
     },
     created(){
-
+      let obj = JSON.parse(JSON.stringify(this.historyRecordsComponentPropsData))
+      for(let i=0;i<obj.checkRectifyVoList.length;i++){
+        obj.checkRectifyVoList[i].topShowType = true;
+        obj.checkRectifyVoList[i].bottomShowType = true;
+      }
+      this.$set(this,'newData',obj.orderInfo);
+      this.$set(this,'dataList',obj.checkRectifyVoList);
     },
     mounted(){
-
     },
     methods:{
-      //子项展开隐藏按钮
-      itemShowButton(index){
-        this.$set(this.dataList[index],'itemShowType',!this.dataList[index].itemShowType);
+      //整改展开隐藏按钮
+      infoShowButton(){
+        this.$set(this.newData,'showType',!this.newData.showType);
+      },
+      //整改展开隐藏按钮
+      topShowButton(index){
+        this.$set(this.dataList[index],'topShowType',!this.dataList[index].topShowType);
+      },
+      //复查展开隐藏按钮
+      bottomShowButton(index){
+        this.$set(this.dataList[index],'bottomShowType',!this.dataList[index].bottomShowType);
+      },
+      //照片预览
+      lookImg(list,index){
+        this.$parent.fullScreenViewClick(list,index);
+      },
+      //文件预览
+      lookFile(item){
+        let obj = {
+          fileName:item.rectifyMaterialName,
+          fileUrl:item.rectifyMaterialUrl,
+        };
+        this.$parent.fullScreenFileLookClick(obj);
       },
     },
   }
@@ -213,13 +285,39 @@
           font-size:16px;
         }
       }
-      img{
+      .for-img{
         cursor: pointer;
         display: block;
         width:100px;
         height:100px;
         margin-right:20px;
       }
+      .up-file-box{
+        display: flex;
+        height:40px;
+        img{
+          margin-top:12px;
+          width:16px;
+          height:16px;
+          display: block;
+        }
+        p:nth-child(2){
+          line-height:40px;
+          font-size:14px;
+          margin:0 30px 0 15px;
+          cursor: pointer;
+        }
+        p:nth-child(3){
+          cursor: pointer;
+          color:red;
+          font-size:16px;
+          height:16px;
+          width:16px;
+          line-height:16px;
+          margin-top:12px;
+          text-align: center
+        }
+      }
     }
   }
 </style>

+ 322 - 146
src/views/safetyCheck/components/initiateInspect/initiateInspect.vue

@@ -2,12 +2,14 @@
 <template>
   <div class="page-container initiateInspect" v-show="loadType">
     <div class="page-top-title-box">
-      <p class="page-top-title-name-p">开展检查/编辑检查/检查详情/整改/复核</p>
-      <p class="page-top-title-edit-p" @click="submitForm(1)" v-if="projectData.checkStatus != 1">保存草稿</p>
-      <p class="page-top-title-edit-p" @click="submitForm(2)" v-if="projectData.checkStatus != 1">继续检查</p>
-      <p class="page-top-title-add-p" @click="submitForm(3)" v-if="projectData.checkStatus != 1">提交查看</p>
+      <!--开始检查/检查详情/隐患整改/整改详情/复查验证/复查详情-->
+      <p class="page-top-title-name-p">{{initiateData.orderTitle}}</p>
+      <p class="page-top-title-edit-p" @click="submitForm(1)" v-if="!lookInfoType&&projectData.checkStatus != 1">保存草稿</p>
+      <p class="page-top-title-edit-p" @click="submitForm(2)" v-if="!lookInfoType&&projectData.checkStatus != 1">继续检查</p>
+      <p class="page-top-title-add-p" @click="submitForm(3)" v-if="!lookInfoType&&projectData.checkStatus != 1">提交查看</p>
+      <p class="page-top-title-add-p" @click="submitForm(3)" v-if="!lookInfoType&&projectData.checkStatus == 1 && projectData.checkSetProgress < 100">编辑</p>
       <p class="page-top-title-out-p" @click="backPage">返回</p>
-      <p class="page-top-title-add-p" @click="submitForm(4)">提交</p>
+      <p class="page-top-title-add-p" @click="submitForm(4)" v-if="!lookInfoType&&(initiateData.orderType == 3||initiateData.orderType == 5)">提交</p>
     </div>
     <div class="content-box">
       <!--校级角标-->
@@ -115,17 +117,17 @@
               </div>
             </div>
           </div>
-          <div class="content-right-flex-border-box">
+          <div class="content-right-flex-border-box" v-if="projectData.checkStatus == 1">
             <div class="right-text-box">
               <p class="right-text-name-p">检查人</p>
               <div class="right-text-title-box">
-                <p>{{checkItemData.data13}}</p>
+                <p>{{projectData.checkUserName}}-{{projectData.checkAccount}}</p>
               </div>
             </div>
             <div class="right-text-box">
               <p class="right-text-name-p" style="width:138px;">检查时间</p>
               <div class="right-text-title-box">
-                <p>{{checkItemData.data14}}</p>
+                <p>{{parseTime(projectData.checkTime,"{y}-{m}-{d} {h}:{i}")}}</p>
               </div>
             </div>
           </div>
@@ -139,6 +141,7 @@
           <div v-if="itemShowType_2" style="margin-top:20px;">
             <el-form-item label="检查项目" prop="hazardCheckPro">
               <el-cascader
+                v-if="!freeChoiceType"
                 :disabled="lookInfoType||!freeChoiceType"
                 placeholder="请选择检查项目"
                 style="width:700px;"
@@ -148,6 +151,17 @@
                 :options="cascaderData"
                 :props="{ value: 'id', label: 'labelName',emitPath:false }"
               ></el-cascader>
+              <el-cascader
+                v-if="freeChoiceType"
+                :disabled="lookInfoType"
+                placeholder="请选择检查项目"
+                style="width:700px;"
+                v-model="addForm.hazardCheckPro"
+                filterable
+                @change="hazardCheckProChange"
+                :options="cascaderData"
+                :props="{ value: 'id', label: 'labelName',emitPath:false }"
+              ></el-cascader>
             </el-form-item>
             <p class="dangers-num-p" v-if="dangersNum>0">此检查项在当前实验室累计出现 <span>{{dangersNum}}</span> 次隐患</p>
             <el-form-item label="检查要点" prop="hazardCheckPoint">
@@ -155,7 +169,8 @@
                         style="width:700px;"></el-input>
             </el-form-item>
             <div style="display: flex;">
-              <el-form-item label="检查结果" prop="checkFlag" v-if="!lookInfoType">
+              <!--未检查-->
+              <el-form-item label="检查结果" prop="checkFlag" v-if="!lookInfoType&& projectData.checkSetProgress < 100">
                 <div class="check-button-box">
                   <div :class="addForm.checkFlag == 0?'check-button-border':''" @click="checkButton(0)">
                     <p>不符合</p>
@@ -167,20 +182,27 @@
                   </div>
                 </div>
               </el-form-item>
-              <el-form-item label="检查结果" prop="checkFlag" v-if="lookInfoType">
+              <!--查看-已检查-->
+              <el-form-item label="检查结果" prop="checkFlag" v-if="lookInfoType&&projectData.checkStatus == 1">
                 <div class="check-button-border-box">
-                  <p>{{addForm.checkFlag == 0?'不符合':'符合'}}</p>
+                  <p>{{projectData.checkFlag == 0?'不符合':'符合'}}</p>
                   <img src="@/assets/ZDimages/safetyCheck/icom_xjjc_jcjc@1x.png">
                 </div>
               </el-form-item>
+              <!--查看-未检查-->
+              <el-form-item label="检查结果" prop="checkFlag" v-if="lookInfoType&&projectData.checkStatus != 1">
+                <div class="check-button-border-box" style="border:1px solid #999!important;color:#666!important;">
+                  <p>待检查</p>
+                </div>
+              </el-form-item>
             </div>
           </div>
           <!--第一次检查时选择不符合时展示-->
-          <p class="content-right-title-min-p" v-if="processType == 'inspect' && addForm.checkFlag == 0 && projectData.checkStatus != 1">
+          <p class="content-right-title-min-p" v-if="addForm.checkFlag == 0 && initiateData.orderType == 1">
             隐患信息
             <span :class="itemShowType_3?'el-icon-arrow-down':'el-icon-arrow-up'" @click="itemShowButton(3)"></span>
           </p>
-          <div v-if="processType == 'inspect' && addForm.checkFlag == 0 && projectData.checkStatus != 1 && itemShowType_3" style="margin-top:20px;">
+          <div v-if="addForm.checkFlag == 0 && initiateData.orderType == 1 && projectData.checkSetProgress < 100 && itemShowType_3" style="margin-top:20px;">
             <el-form-item label="隐患描述" prop="hazardDescribe">
               <el-input placeholder="请输入隐患描述" maxLength='200' type="textarea" style="width:704px;"
                         resize="none" v-model="addForm.hazardDescribe" show-word-limit :rows="3"></el-input>
@@ -212,14 +234,12 @@
           </div>
         </el-form>
         <!--历史记录-->
-        <history-records-component ref="historyRecordsComponent"
+        <history-records-component ref="historyRecordsComponent" v-if="projectData.checkStatus == 1 && initiateData.orderType != 1 && historyRecordsComponentPropsType"
                                    :historyRecordsComponentPropsData="historyRecordsComponentPropsData"></history-records-component>
         <!--整改-->
-        <rectification-component ref="rectificationComponent"
-                                 :recheckComponentPropsData="recheckComponentPropsData"></rectification-component>
+        <rectification-component ref="rectificationComponent" v-if="initiateData.orderType == 3"></rectification-component>
         <!--复核-->
-        <recheck-component ref="recheckComponent"
-                           :rectificationComponentPropsData="rectificationComponentPropsData"></recheck-component>
+        <recheck-component ref="recheckComponent" v-if="initiateData.orderType == 5"></recheck-component>
       </div>
     </div>
     <fullScreenView :fullScreenViewProps="fullScreenViewProps" ref="fullScreenView"></fullScreenView>
@@ -240,11 +260,15 @@
   import {
     securityCheckPlanCheckInfo,
     securityCheckPhotoGetCheckNumBySub,
-    securityCheckOptionList,
-    securityRecordCheckCommit,
+    securityCheckOptionSelAllList,
+    securityCheckSetOptionCheckCommit,
     securityCheckSetOptionUnCheckList,
-    securityCheckDangerDetailList,
-  } from '@/api/safetyCheck/indexDemoOne'
+    securityCheckDangerGetDangerId,
+    securityDraftFindBySetOptionId,
+    securityCheckDangerCheckRectify,
+    securityCheckDangerApprove,
+    securityCheckPlanBatchDownloadFile,
+  } from '@/api/safetyCheck/index'
 
   export default {
     name: 'initiateInspect',
@@ -268,8 +292,7 @@
         },
         //页面加载状态
         loadType:false,
-        //流程状态-用于区分父级入口
-        processType:null,
+        initiateData:{},
         //图片组件数据
         fullScreenViewProps: [],
         //查看详情状态
@@ -283,12 +306,10 @@
           uploadDtoList: []
         },
         //检查项详情
-        checkItemData: {
-          data13: '姓名-工号',
-          data14: '2024-09-06'
-        },
+        checkItemData: {},
         //检查项
         cascaderData: [],
+        cascaderDataList: [],
         dangerLevel: [],
         //子项展开状态
         itemShowType_1: true,
@@ -302,7 +323,19 @@
           uploadDtoList: [],
           speechRemarksList: []
         },
-        rulesNo: {},
+        rulesNo: {
+          checkFlag: [
+            { required: true, message: '请选择检查结果', trigger: 'blur' },
+            { required: true, message: '请选择检查结果', validator: this.spaceJudgment, trigger: 'blur' }
+          ],
+          hazardDescribe: [
+            { required: true, message: '请输入隐患描述', trigger: 'blur' },
+            { required: true, message: '请输入隐患描述', validator: this.spaceJudgment, trigger: 'blur' }
+          ],
+          uploadDtoList: [
+            { required: true, message: '请上传现场照片', trigger: 'blur' }
+          ]
+        },
         rules: {
           hazardCheckPro: [
             { required: true, message: '请选择检查项目', trigger: 'blur' },
@@ -322,15 +355,11 @@
         },
         //历史记录组件数据
         historyRecordsComponentPropsData: {},
-        //开始检查组件数据
-        inspectComponentPropsData: {},
-        //整改组件数据
-        rectificationComponentPropsData: {},
-        //复核组件数据
-        recheckComponentPropsData: {}
+        historyRecordsComponentPropsType:false,
       }
     },
     created() {
+      this.$set(this,'initiateData',this.initiateInspectData);
       this.initialize()
     },
     mounted() {
@@ -340,71 +369,127 @@
       //初始化
       initialize() {
         //计划详情
-        this.securityCheckPlanCheckInfo()
-        // 上级页面检查项状态 指定时false,未指定true
-        if (this.initiateInspectData.freeChoiceType) {
-          this.$set(this, 'freeChoiceType', true)
-          //未执行过的检查项列表
-          this.securityCheckSetOptionUnCheckList();
-        }else{
-          //全部检查项列表
-          this.securityCheckOptionList();
-        }
+        this.securityCheckPlanCheckInfo('initialize');
         // 是否是详情进入
-        if (this.initiateInspectData.showType) {
+        if (this.initiateData.showType) {
           this.$set(this, 'lookInfoType', true)
         } else {
           this.$set(this, 'lookInfoType', false)
         }
       },
       //开始检查计划详情
-      securityCheckPlanCheckInfo() {
+      securityCheckPlanCheckInfo(type) {
+        //type 初始化时为FALSE 提交再次调用为true
         let self = this
         securityCheckPlanCheckInfo({
-          manageId: this.initiateInspectData.manageId,
-          dangerId: this.initiateInspectData.dangerId ? this.initiateInspectData.dangerId : '',
-          setOptionId: this.initiateInspectData.setOptionId ? this.initiateInspectData.setOptionId : ''
+          manageId: this.initiateData.manageId,
+          setOptionId:this.initiateData.setOptionId ? this.initiateData.setOptionId : ''
         }).then(response => {
           this.$set(this, 'projectData', response.data)
           this.$set(this.projectData, 'uploadDtoList', response.data.uploadDtoList?response.data.uploadDtoList:[])
-          //有检查项ID时去查询检查项触发次数
-          if (this.projectData.hazardCheckPro) {
-            //查询次数
-            this.securityCheckPhotoGetCheckNumBySub()
-            if (this.projectData.checkStatus == 1) {
-              //已提交
-              this.securityCheckDangerDetailList();
-            } else if (this.projectData.checkStatus == 2) {
-              //草稿
-              this.$set(this.addForm, 'uploadDtoList', this.projectData.photoList?this.projectData.photoList:[])
-              this.$set(this.addForm, 'speechRemarksList', this.projectData.voiceList?this.projectData.voiceList:[])
-              this.$nextTick(() => {
-                for (let i = 0; i < self.addForm.speechRemarksList.length; i++) {
-                  self.addForm.speechRemarksList[i].playType = false
+          this.$nextTick(()=>{
+            //已制定检查项
+            if (this.projectData.hazardCheckPro) {
+              //查询次数
+              this.securityCheckPhotoGetCheckNumBySub()
+              if (this.projectData.checkStatus == 1) {
+                //已提交
+                this.securityCheckDangerGetDangerId();
+                if(this.projectData.checkSetProgress < 100){
+                  this.$set(this.addForm, 'uploadDtoList', response.data.photoList?response.data.photoList:[])
+                  this.$set(this.addForm, 'checkFlag', response.data.checkFlag?response.data.checkFlag:0)
+                  this.$set(this.addForm, 'hazardDescribe', response.data.hazardDescribe?response.data.hazardDescribe:'')
                 }
-              })
-              this.$set(this.addForm, 'checkFlag', this.projectData.checkFlag)
-              this.$set(this.addForm, 'hazardDescribe', this.projectData.hazardDescribe)
+              } else if (this.projectData.checkStatus == 0&&this.initiateData.checkDraftVo) {
+                //草稿
+                this.securityDraftFindBySetOptionId(this.initiateData.setOptionId);
+              }else{
+                this.$set(this,'loadType',true);
+              }
+            }else{
+              //未指定检查项
+              this.$set(this,'loadType',true);
             }
-          }
+            if(type == 'initialize'){
+              // 上级页面检查项状态 指定时false,未指定true
+              if (this.initiateData.freeChoiceType) {
+                this.$set(this, 'freeChoiceType', true)
+                //开始检查/未指定检查项-获取未执行过的检查项列表
+                this.securityCheckSetOptionUnCheckList();
+              }else{
+                //开始检查/开始整改/开始复查-获取所有检查项列表
+                this.securityCheckOptionSelAllList();
+              }
+            }
+          })
+        })
+      },
+      //草稿数据查询
+      securityDraftFindBySetOptionId(setOptionId){
+        let self = this;
+        securityDraftFindBySetOptionId({setOptionId:setOptionId}).then(response => {
+          this.$set(this.addForm, 'uploadDtoList', response.data.photoList?response.data.photoList:[])
+          this.$set(this.addForm, 'speechRemarksList', response.data.voiceList?response.data.voiceList:[])
+          this.$nextTick(() => {
+            for (let i = 0; i < self.addForm.speechRemarksList.length; i++) {
+              self.addForm.speechRemarksList[i].playType = false
+            }
+          })
+          this.$set(this.addForm, 'checkFlag', response.data.checkFlag?response.data.checkFlag:0)
+          this.$set(this.addForm, 'hazardDescribe', response.data.hazardDescribe?response.data.hazardDescribe:'')
+          this.$refs['addForm'].clearValidate();
           this.$nextTick(() => {
             this.$set(this,'loadType',true);
           })
         })
       },
       //查询检查项流程详情
-      securityCheckDangerDetailList(){
-        securityCheckDangerDetailList({
-          managerId: this.initiateInspectData.manageId,
-          setOptionId: this.initiateInspectData.setOptionId
+      securityCheckDangerGetDangerId(){
+        securityCheckDangerGetDangerId({
+          manageId: this.initiateData.manageId,
+          setOptionId: this.initiateData.setOptionId
         }).then(response => {
-
+          let obj = {
+            orderInfo:{
+              hazardDescribe:this.projectData.hazardDescribe,
+              uploadDtoList:this.projectData.photoList,
+              checkFlag:this.projectData.checkFlag,
+              showType:true,
+            },
+            checkRectifyVoList:[],
+          }
+          if(response.data){
+            if(this.initiateInspectData.editType){
+              let rectifyUploadList = [];
+              for(let i=0;i<response.data.checkRectifyVoList[0].rectifyUploadList.length;i++){
+                rectifyUploadList.push({
+                  fileName:response.data.checkRectifyVoList[0].rectifyUploadList[i].fileName,
+                  fileUrl:response.data.checkRectifyVoList[0].rectifyUploadList[i].fileUrl,
+                  fileType:response.data.checkRectifyVoList[0].rectifyUploadList[i].fileType,
+                })
+              }
+              this.$refs['rectificationComponent'].addForm = {
+                rectifyResult:response.data.checkRectifyVoList[0].rectifyResult?1:0,
+                rectifyMeasure:response.data.checkRectifyVoList[0].rectifyMeasure?response.data.checkRectifyVoList[0].rectifyMeasure:'',
+                rectifyUploadList:rectifyUploadList,
+                rectifyMaterialUrl:'',
+              }
+            }else{
+              obj.checkRectifyVoList = response.data.checkRectifyVoList?response.data.checkRectifyVoList:[]
+            }
+          }
+          this.$set(this,'checkItemData',response.data);
+          this.$set(this,'historyRecordsComponentPropsData',obj);
+          this.$set(this,'historyRecordsComponentPropsType',true);
+          this.$nextTick(() => {
+            this.$set(this,'loadType',true);
+          })
         })
       },
       //查询隐患发生次数
       securityCheckPhotoGetCheckNumBySub() {
         securityCheckPhotoGetCheckNumBySub({
-          subId: this.projectData.subId,
+          subId: this.initiateData.subId,
           hazardCheckId: this.projectData.hazardCheckPro
         }).then(response => {
           this.$set(this, 'dangersNum', response.data)
@@ -412,7 +497,21 @@
       },
       //手动选择检查项目
       hazardCheckProChange(val){
-
+        let self = this;
+        if (val){
+          for (let i=0;i<self.cascaderDataList.length;i++){
+            if(val == self.cascaderDataList[i].hazardCheckPro){
+              self.$set(self.projectData,'setOptionId',self.cascaderDataList[i].setOptionId);
+              self.$set(self.projectData,'hazardCheckPoint',self.cascaderDataList[i].hazardCheckPoint);
+              self.$set(self.projectData,'hazardCheckPro',self.cascaderDataList[i].hazardCheckPro);
+              self.$nextTick(()=>{
+                self.securityDraftFindBySetOptionId(self.cascaderDataList[i].setOptionId);
+                self.securityCheckPhotoGetCheckNumBySub()
+              })
+              break
+            }
+          }
+        }
       },
       // 返回按钮
       backPage() {
@@ -420,48 +519,91 @@
       },
       /** 提交按钮 */
       submitForm(type) {
+        let self = this;
         if (type == 1 || type == 2 || type == 3) {
-          this.$refs['addForm'].validate(valid => {
+          self.$refs['addForm'].validate(valid => {
             if (valid) {
-              //保存草稿/继续检查/提交查看
-              this.securityRecordCheckCommit(type)
+              this.$confirm(type==1?'确认保存草稿?':(type==2?'确认继续检查?':(type==3?'确认提交查看?':'')), "警告", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+              }).then(function() {
+              }).then(() => {
+                //保存草稿/继续检查/提交查看
+                self.securityCheckSetOptionCheckCommit(type)
+              }).catch(() => {});
             }
           })
         } else if (type == 4) {
-          //提交
+          if(this.initiateData.orderType == 3){
+            //整改提交
+            this.$refs['rectificationComponent'].submitData().then(data => {
+              let obj = {
+                checkCategory:this.projectData.checkCategory,
+                dangerId:this.checkItemData.dangerId,
+                rectifyMeasure:data.rectifyMeasure,
+                rectifyMaterialName:data.rectifyMaterialName,
+                rectifyMaterialUrl:data.rectifyMaterialUrl,
+                rectifyResult:data.rectifyResult,
+                rectifyUploadList:data.rectifyUploadList,
+              };
+              securityCheckDangerCheckRectify(obj).then(response => {
+                this.msgSuccess(response.message)
+                this.$parent.tableButton(6)
+              })
+            });
+          }else if(this.initiateData.orderType == 5){
+            //复查提交
+            this.$refs['recheckComponent'].submitData().then(data => {
+              let list = JSON.parse(JSON.stringify(this.$refs['historyRecordsComponent'].dataList))
+              let obj = {
+                rectifyId:list[list.length-1].rectifyId,
+                examineResult:data.examineResult,
+                examineOpinion:data.examineOpinion,
+                examineUploadList:data.examineUploadList,
+              };
+              securityCheckDangerApprove(obj).then(response => {
+                this.msgSuccess(response.message)
+                this.$parent.tableButton(6)
+              })
+            });
+          }
         }
       },
       //检查提交
-      securityRecordCheckCommit(type) {
+      securityCheckSetOptionCheckCommit(type) {
         let obj = {
           checkFlag: this.addForm.checkFlag,
           checkStatus: type == 1 ? '2' : 1,
-          recordId:this.projectData.checkStatus == 2?this.projectData.recordId:'',
           hazardDescribe: this.addForm.hazardDescribe,
-          manageId: this.initiateInspectData.manageId,
-          setOptionId: this.initiateInspectData.setOptionId,
+          setOptionId: this.freeChoiceType?this.projectData.setOptionId:this.initiateData.setOptionId,
           photoList: this.addForm.uploadDtoList,
           voiceList: this.addForm.speechRemarksList,
         }
-        for(let i=0;i<obj.photoList.length;i++){
-          obj.photoList[i].fileType = 2;
-          obj.photoList[i].source = 2;
-        }
-        for(let i=0;i<obj.voiceList.length;i++){
-          obj.photoList[i].fileType = 3;
-          obj.photoList[i].source = 2;
-        }
-        securityRecordCheckCommit(obj).then(response => {
+        securityCheckSetOptionCheckCommit(obj).then(response => {
           this.msgSuccess(response.message)
           if (type == 1) {
             //保存草稿
             this.$parent.tableButton(6)
           } else if (type == 2) {
             //继续检查
+            this.$set(this,'addForm',{
+              checkFlag: 0,
+              hazardDescribe: '',
+              uploadDtoList: [],
+              speechRemarksList: []
+            })
+            this.$set(this,'dangersNum',0)
+            this.$set(this.initiateData,'freeChoiceType',true)
+            this.$set(this.initiateData,'setOptionId',null)
+            this.initialize()
           } else if (type == 3) {
             //提交查看
+            this.$set(this.initiateData, 'setOptionId', this.projectData.setOptionId)
             this.securityCheckPlanCheckInfo();
             this.$set(this, 'lookInfoType', true)
+            this.$set(this, 'historyRecordsComponentPropsType', false)
+            this.$set(this.initiateData, 'orderType', 2)
           }
         })
       },
@@ -484,7 +626,6 @@
 
       /*==========上传相关==========*/
       handleAvatarSuccess(res) {
-        this.$set(this, 'loading', false)
         if (this.addForm.uploadDtoList.length > 5) {
           this.msgError('最多只可上传6张')
           return
@@ -514,7 +655,6 @@
             this.msgError('上传图片大小不能超过2M')
             return false
           }
-          this.$set(this, 'loading', true)
           this.upDataName = file.name
           type = true
         } else {
@@ -529,7 +669,11 @@
       },
       //照片预览
       fullScreenViewClick(list, index) {
-        this.$set(this, 'fullScreenViewProps', list)
+        let newList = [];
+        for(let i=0;i<list.length;i++){
+          newList.push(list[i].fileUrl)
+        }
+        this.$set(this, 'fullScreenViewProps', newList)
         this.$refs['fullScreenView'].initialize(index)
       },
       //文件预览
@@ -552,92 +696,124 @@
       },
       // 下载全部
       downloadAll() {
-
+        this.download('security/checkPlan/batchDownloadFile', {
+          ...{planId:this.initiateData.planId}
+        }, `材料附件.zip`)
       },
       //检查项列表
-      securityCheckOptionList() {
-        securityCheckOptionList({}).then(response => {
-          let list = this.getCascaderData(response.data)
-          this.$set(this, 'cascaderData', list)
+      securityCheckOptionSelAllList() {
+        securityCheckOptionSelAllList({}).then(response => {
+          let list = this.getCascaderData(JSON.parse(JSON.stringify(response.data)),3)
+          this.$nextTick(()=>{
+            this.$set(this, 'cascaderData', list)
+          })
         })
       },
       //未执行过的检查项列表
       securityCheckSetOptionUnCheckList(){
-        securityCheckSetOptionUnCheckList({
-          manageId: this.initiateInspectData.manageId,
-          searchValue: ''
-        }).then(response => {
-          let list = this.getCascaderData(response.data)
-          this.$set(this, 'cascaderData', list)
+        securityCheckOptionSelAllList({}).then(response => {
+          let maxList = this.getCascaderData(JSON.parse(JSON.stringify(response.data)),2)
+          this.$nextTick(()=>{
+            securityCheckSetOptionUnCheckList({
+              manageId: this.initiateData.manageId,
+            }).then(response => {
+              if(response.data[0]){
+                this.$set(this,'cascaderDataList',response.data);
+                for(let i=0;i<maxList.length;i++){
+                  for(let o=0;o<maxList[i].children.length;o++){
+                    for(let x=0;x<response.data.length;x++){
+                      if(maxList[i].children[o].id == response.data[x].hazardCheckPro2){
+                        if(maxList[i].children[o].children){
+                          maxList[i].children[o].children.push({
+                            id: response.data[x].hazardCheckPro,
+                            name: response.data[x].hazardCheckName,
+                            mainPoint: response.data[x].hazardCheckPoint,
+                            hazardLevelName: null,
+                            code: response.data[x].hazardCheckCode,
+                            parentId: response.data[x].hazardCheckPro2,
+                            type: 1,
+                            level: 3,
+                            hazardReid: null,
+                          })
+                        }else{
+                          maxList[i].children[o].children = [{
+                            id: response.data[x].hazardCheckPro,
+                            name: response.data[x].hazardCheckName,
+                            mainPoint: response.data[x].hazardCheckPoint,
+                            hazardLevelName: null,
+                            code: response.data[x].hazardCheckCode,
+                            parentId: response.data[x].hazardCheckPro2,
+                            type: 1,
+                            level: 3,
+                            hazardReid: null,
+                          }]
+                        }
+                      }
+                    }
+                  }
+                }
+                let list = this.getCascaderData(JSON.parse(JSON.stringify(maxList)),3)
+                this.$nextTick(()=>{
+                  this.$set(this, 'cascaderData', list)
+                  this.$set(this.addForm, 'hazardCheckPro', list[0].children[0].children[0].id)
+                  this.hazardCheckProChange(list[0].children[0].children[0].id);
+                })
+              }else{
+                this.$parent.tableButton(6)
+              }
+            })
+          })
         })
       },
       //检查项格式处理
-      getCascaderData(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].children) {
+          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)
+              list[i].children = self.getCascaderData(list[i].children,type)
             } else {
-              if (list[i].level != 3) {
-                list.splice(i, 1)
-                i--
-              } else {
-                delete list[i].children
-              }
-            }
-          } else {
-            if (list[i].level != 3) {
               list.splice(i, 1)
               i--
-            } else {
-              delete list[i].children
             }
+          } 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].children) {
+          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)
+              list[i].children = self.getCascaderData(list[i].children,type)
             } else {
-              if (list[i].level != 3) {
-                list.splice(i, 1)
-                i--
-              } else {
-                delete list[i].children
-              }
-            }
-          } else {
-            if (list[i].level != 3) {
               list.splice(i, 1)
               i--
-            } else {
-              delete list[i].children
             }
+          } 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].children) {
+          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)
+              list[i].children = self.getCascaderData(list[i].children,type)
             } else {
-              if (list[i].level != 3) {
-                list.splice(i, 1)
-                i--
-              } else {
-                delete list[i].children
-              }
-            }
-          } else {
-            if (list[i].level != 3) {
               list.splice(i, 1)
               i--
-            } else {
-              delete list[i].children
             }
+          } else {
+            list.splice(i, 1)
+            i--
           }
         }
         return list

+ 75 - 42
src/views/safetyCheck/components/initiateInspect/recheckComponent.vue

@@ -8,32 +8,33 @@
         <span :class="itemShowType?'el-icon-arrow-down':'el-icon-arrow-up'" @click="itemShowButton()"></span>
       </p>
       <div v-if="itemShowType" style="margin-top:20px;">
-        <div class="right-text-box">
-          <p class="right-text-name-p">复查结果</p>
-          <div :class="addForm.formData7 == 1?'right-check-box':'right-no-check-box'">
-            <div>
-              <p></p>
+        <el-form-item label="复查结果" prop="examineResult">
+          <div class="right-text-box">
+            <div :class="addForm.examineResult == 1?'right-check-box':'right-no-check-box'" @click="checkButton(1)">
+              <div>
+                <p></p>
+              </div>
+              <p class="right-check-title-p">复查完毕</p>
             </div>
-            <p class="right-no-check-title-p">复查完毕</p>
-          </div>
-          <div :class="addForm.formData7 == 2?'right-check-box':'right-no-check-box'">
-            <div>
-              <p></p>
+            <div :class="addForm.examineResult == 0?'right-check-box':'right-no-check-box'" @click="checkButton(0)">
+              <div>
+                <p></p>
+              </div>
+              <p class="right-check-title-p">退回整改</p>
             </div>
-            <p class="right-no-check-title-p">退回整改</p>
           </div>
-        </div>
-        <el-form-item label="验证情况" prop="formData5">
+        </el-form-item>
+        <el-form-item label="验证情况" prop="examineOpinion">
           <el-input placeholder="请输入验证情况" maxLength='200' type="textarea" style="width:704px;"
-                    resize="none" v-model="addForm.formData5" show-word-limit :rows="3"></el-input>
+                    resize="none" v-model="addForm.examineOpinion" show-word-limit :rows="3"></el-input>
         </el-form-item>
-        <el-form-item label="现场照片" prop="imgDtoList">
-          <div class="snapshotManagement-for-img-box" v-for="(img,imgIndex) in addForm.imgDtoList" :key="imgIndex">
-            <img class="for-img" :src="img.fileUrl" @click="fullScreenViewClick(addForm.imgDtoList,imgIndex)">
+        <el-form-item label="现场照片" prop="examineUploadList">
+          <div class="snapshotManagement-for-img-box" v-for="(img,imgIndex) in addForm.examineUploadList" :key="imgIndex">
+            <img class="for-img" :src="img.fileUrl" @click="lookImg(addForm.examineUploadList,imgIndex)">
             <p class="for-del-button el-icon-circle-close" @click="delImg(imgIndex)"></p>
           </div>
           <el-upload
-            v-if="addForm.imgDtoList.length<6"
+            v-if="addForm.examineUploadList.length<6"
             style="display: inline-block;overflow: hidden"
             class="avatar-uploader"
             :action="uploadImgUrl"
@@ -64,6 +65,7 @@
     },
     data(){
       return{
+        loading:false,
         //上传相关
         uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
         headers: {
@@ -73,25 +75,17 @@
         fullScreenViewProps:[],
         itemShowType:true,
         addForm:{
-          imgDtoList:[],
+          examineResult:null,
+          examineOpinion:'',
+          examineUploadList:[],
         },
         rules:{
-          formData1: [
-            { required: true, message: "请选择检查项目", trigger: "blur" },
-            { required: true, message: "请选择检查项目", validator: this.spaceJudgment, trigger: "blur" }
-          ],
-          formData4: [
-            { required: true, message: "请选择检查结果", trigger: "blur" },
-            { required: true, message: "请选择检查结果", validator: this.spaceJudgment, trigger: "blur" }
-          ],
-          formData5: [
-            { required: true, message: "请输入隐患描述", trigger: "blur" },
-            { required: true, message: "请输入隐患描述", validator: this.spaceJudgment, trigger: "blur" }
-          ],
-          imgDtoList: [
-            { required: true, message: "请上传现场照片", trigger: "blur" },
+          examineResult: [
+            { required: true, message: "请选择复查结果", trigger: "blur" },
+            { required: true, message: "请选择复查结果", validator: this.spaceJudgment, trigger: "blur" }
           ],
         },
+        upDataName:'',
       }
     },
     created(){
@@ -101,14 +95,54 @@
 
     },
     methods:{
+      submitData(){
+        return new Promise(resolve=>{
+          this.$refs["addForm"].validate(valid => {
+            if (valid) {
+              resolve(this.addForm)
+            }
+          })
+        })
+      },
       //子项展开隐藏按钮
       itemShowButton(){
         this.$set(this,'itemShowType',!this.itemShowType);
       },
+      checkButton(type){
+        if(this.addForm.examineResult != type){
+          this.$set(this.addForm,'examineResult',type);
+          if(type == 1){
+            this.$set(this,'rules',{
+              examineResult: [
+                { required: true, message: "请选择复查结果", trigger: "blur" },
+                { required: true, message: "请选择复查结果", validator: this.spaceJudgment, trigger: "blur" }
+              ],
+            });
+          }else if(type == 0){
+            this.$set(this,'rules',{
+              examineResult: [
+                { required: true, message: "请选择复查结果", trigger: "blur" },
+                { required: true, message: "请选择复查结果", validator: this.spaceJudgment, trigger: "blur" }
+              ],
+              examineOpinion: [
+                { required: true, message: "请输入验证情况", trigger: "blur" },
+                { required: true, message: "请输入验证情况", validator: this.spaceJudgment, trigger: "blur" }
+              ],
+              examineUploadList: [
+                { required: true, message: "请上传现场照片", trigger: "blur" },
+              ],
+            });
+          }
+          this.$nextTick(()=>{
+            this.$forceUpdate();
+            this.$refs['addForm'].clearValidate()
+          })
+        }
+      },
       /*==========上传相关==========*/
       handleAvatarSuccess(res) {
         this.$set(this,'loading',false);
-        if(this.addForm.imgDtoList.length>5){
+        if(this.addForm.examineUploadList.length>5){
           this.msgError('最多只可上传6张')
           return
         }
@@ -122,12 +156,13 @@
         let obj ={
           fileName:this.upDataName,
           fileUrl:res.data.url,
+          fileType:2,
         };
-        this.addForm.imgDtoList.push(obj);
+        this.addForm.examineUploadList.push(obj);
         this.$forceUpdate()
       },
       beforeAvatarUpload(file) {
-        if(this.addForm.imgDtoList.length>5){
+        if(this.addForm.examineUploadList.length>5){
           this.msgError('最多只可上传6张')
           return false
         }
@@ -148,12 +183,11 @@
       },
       //删除照片
       delImg(imgIndex){
-        this.addForm.imgDtoList.splice(imgIndex,1);
+        this.addForm.examineUploadList.splice(imgIndex,1);
       },
       //照片预览
-      fullScreenViewClick(list,index){
-        this.$set(this,'fullScreenViewProps',list);
-        this.$refs['fullScreenView'].initialize(index);
+      lookImg(list,index){
+        this.$parent.fullScreenViewClick(list,index);
       },
 
     },
@@ -181,7 +215,6 @@
       }
       .right-text-box{
         display: flex;
-        margin-bottom:20px;
         .right-text-name-p{
           width:90px;
           line-height:40px;
@@ -235,7 +268,7 @@
               border-radius:50%;
             }
           }
-          .right-no-check-title-p{
+          .right-check-title-p{
             margin-left:8px;
             height:40px;
             line-height:40px;

+ 63 - 53
src/views/safetyCheck/components/initiateInspect/rectificationComponent.vue

@@ -8,15 +8,15 @@
         <span :class="itemShowType?'el-icon-arrow-down':'el-icon-arrow-up'" @click="itemShowButton()"></span>
       </p>
       <div v-if="itemShowType" style="margin-top:20px;">
-        <el-form-item label="整改结果" prop="rectifyStatus">
+        <el-form-item label="整改结果" prop="rectifyResult">
           <div class="right-text-box">
-            <div :class="addForm.rectifyStatus == 1?'right-check-box':'right-no-check-box'" @click="checkButton(1)">
+            <div :class="addForm.rectifyResult == 1?'right-check-box':'right-no-check-box'" @click="checkButton(1)">
               <div>
                 <p></p>
               </div>
               <p class="right-check-title-p">已整改</p>
             </div>
-            <div :class="addForm.rectifyStatus == 2?'right-check-box':'right-no-check-box'" @click="checkButton(2)">
+            <div :class="addForm.rectifyResult == 0?'right-check-box':'right-no-check-box'" @click="checkButton(0)">
               <div>
                 <p></p>
               </div>
@@ -24,17 +24,17 @@
             </div>
           </div>
         </el-form-item>
-        <el-form-item label="整改措施" prop="rectifyDescribe">
-          <el-input placeholder="请输入整改措施" maxLength='200' type="textarea" style="width:704px;"
-                    resize="none" v-model="addForm.rectifyDescribe" show-word-limit :rows="3"></el-input>
+        <el-form-item label="整改措施" prop="rectifyMeasure">
+          <el-input placeholder="立整立改的请填写相关文字及整改前后照片对比等,不能立整立改的请说明因并附整改计划、措施等" maxlength='500' type="textarea" style="width:704px;"
+                    resize="none" v-model="addForm.rectifyMeasure" :show-word-limit="true" :rows="3"></el-input>
         </el-form-item>
-        <el-form-item label="现场照片" prop="imgDtoList">
-          <div class="snapshotManagement-for-img-box" v-for="(img,imgIndex) in addForm.imgDtoList" :key="imgIndex">
-            <img class="for-img" :src="img.fileUrl" @click="lookImg(addForm.imgDtoList,imgIndex)">
+        <el-form-item label="现场照片" prop="rectifyUploadList">
+          <div class="snapshotManagement-for-img-box" v-for="(img,imgIndex) in addForm.rectifyUploadList" :key="imgIndex">
+            <img class="for-img" :src="img.fileUrl" @click="lookImg(addForm.rectifyUploadList,imgIndex)">
             <p class="for-del-button el-icon-circle-close" @click="delImg(imgIndex)"></p>
           </div>
           <el-upload
-            v-if="addForm.imgDtoList.length<6"
+            v-if="addForm.rectifyUploadList.length<6"
             style="display: inline-block;overflow: hidden"
             class="avatar-uploader"
             :action="uploadImgUrl"
@@ -46,29 +46,29 @@
           </el-upload>
           <p class="up-img-text">支持jpg/png/bmp/gif格式,且不超过2M,最多上传6张</p>
         </el-form-item>
-        <div v-if="addForm.rectifyStatus == 2">
-          <el-form-item label="整改方案" prop="rectifyProjectUrl">
-            <div class="up-file-button" v-if="!addForm.rectifyProjectUrl">
-              <el-upload
-                v-if="addForm.imgDtoList.length<6"
-                style="display: inline-block;overflow: hidden"
-                class="avatar-uploader"
-                :action="uploadImgUrl"
-                :show-file-list="false"
-                :on-success="(res)=>handleAvatarSuccess('file',res)"
-                :headers="headers"
-                :before-upload="(res)=>beforeAvatarUpload('file',res)">
-                <p class="up-file-min-button">+ 上传文件</p>
-              </el-upload>
-              <p class="up-file-text">支持docx/xlsx/pdf格式文件</p>
-            </div>
-            <div class="up-file-box" v-if="addForm.rectifyProjectUrl">
-              <img src="@/assets/ZDimages/safetyCheck/icon_dr_wj.png">
-              <p>{{addForm.rectifyProjectName}}</p>
-              <p class="el-icon-close" @click="delFileButton"></p>
-            </div>
-          </el-form-item>
-        </div>
+        <!--<div v-if="addForm.rectifyResult == 0">-->
+          <!--<el-form-item label="整改方案" prop="rectifyMaterialUrl">-->
+            <!--<div class="up-file-button" v-if="!addForm.rectifyMaterialUrl">-->
+              <!--<el-upload-->
+                <!--v-if="addForm.rectifyUploadList.length<6"-->
+                <!--style="display: inline-block;overflow: hidden"-->
+                <!--class="avatar-uploader"-->
+                <!--:action="uploadImgUrl"-->
+                <!--:show-file-list="false"-->
+                <!--:on-success="(res)=>handleAvatarSuccess('file',res)"-->
+                <!--:headers="headers"-->
+                <!--:before-upload="(res)=>beforeAvatarUpload('file',res)">-->
+                <!--<p class="up-file-min-button">+ 上传文件</p>-->
+              <!--</el-upload>-->
+              <!--<p class="up-file-text">支持docx/xlsx/pdf格式文件</p>-->
+            <!--</div>-->
+            <!--<div class="up-file-box" v-if="addForm.rectifyMaterialUrl">-->
+              <!--<img src="@/assets/ZDimages/safetyCheck/icon_dr_wj.png">-->
+              <!--<p @click="lookFile">{{addForm.rectifyMaterialName}}</p>-->
+              <!--<p class="el-icon-close" @click="delFileButton"></p>-->
+            <!--</div>-->
+          <!--</el-form-item>-->
+        <!--</div>-->
       </div>
     </el-form>
   </div>
@@ -93,23 +93,23 @@
         fullScreenViewProps:[],
         itemShowType:true,
         addForm:{
-          rectifyStatus:null,
-          rectifyDescribe:'',
-          imgDtoList:[],
-          rectifyProjectUrl:'',
+          rectifyResult:null,
+          rectifyMeasure:'',
+          rectifyUploadList:[],
+          rectifyMaterialUrl:'',
         },
         rules:{
-          rectifyStatus: [
+          rectifyResult: [
             { required: true, message: "请选择整改结果", trigger: "blur" },
           ],
-          rectifyDescribe: [
+          rectifyMeasure: [
             { required: true, message: "请输入整改措施", trigger: "blur" },
             { required: true, message: "请输入整改措施", validator: this.spaceJudgment, trigger: "blur" }
           ],
-          imgDtoList: [
+          rectifyUploadList: [
             { required: true, message: "请上传现场照片", trigger: "blur" },
           ],
-          rectifyProjectUrl: [
+          rectifyMaterialUrl: [
             { required: true, message: "请上传整改方案", trigger: "blur" },
           ],
         },
@@ -138,15 +138,16 @@
       },
       //整改选择按钮
       checkButton(type){
-        if(this.addForm.rectifyStatus != type){
-          this.$set(this.addForm,'rectifyStatus',type);
+        if(this.addForm.rectifyResult != type){
+          this.$set(this.addForm,'rectifyResult',type);
+          this.$forceUpdate();
         }
       },
       /*==========上传相关==========*/
       handleAvatarSuccess(srt,res) {
         this.$set(this,'loading',false);
         if(srt == 'img'){
-          if(this.addForm.imgDtoList.length>5){
+          if(this.addForm.rectifyUploadList.length>5){
             this.msgError('最多只可上传6张')
             return
           }
@@ -160,8 +161,9 @@
           let obj ={
             fileName:this.upDataName,
             fileUrl:res.data.url,
+            fileType:2,
           };
-          this.addForm.imgDtoList.push(obj);
+          this.addForm.rectifyUploadList.push(obj);
         } else if(srt == 'file'){
           this.$set(this,'loading',false);
           let suffixName= this.upDataName.split('.')[this.upDataName.split('.').length - 2]
@@ -171,14 +173,14 @@
             this.msgError('文件名里包含逗号或分号,请修改后重新上传!')
             return
           }
-          this.$set(this.addForm,'rectifyProjectUrl',res.data.url);
-          this.$set(this.addForm,'rectifyProjectName',suffixName);
+          this.$set(this.addForm,'rectifyMaterialUrl',res.data.url);
+          this.$set(this.addForm,'rectifyMaterialName',suffixName);
         }
         this.$forceUpdate()
       },
       beforeAvatarUpload(srt,file) {
         if(srt == 'img'){
-          if(this.addForm.imgDtoList.length>5){
+          if(this.addForm.rectifyUploadList.length>5){
             this.msgError('最多只可上传6张')
             return false
           }
@@ -225,17 +227,24 @@
       },
       //删除文件
       delFileButton(){
-        this.$set(this.addForm,'rectifyProjectUrl','');
-        this.$set(this.addForm,'rectifyProjectName','');
+        this.$set(this.addForm,'rectifyMaterialUrl','');
+        this.$set(this.addForm,'rectifyMaterialName','');
       },
       //删除照片
       delImg(imgIndex){
-        this.addForm.imgDtoList.splice(imgIndex,1);
+        this.addForm.rectifyUploadList.splice(imgIndex,1);
       },
       //照片预览
       lookImg(list,index){
-        console.log('this.$parent.$parent',this.$parent.$parent)
-        this.$parent.$parent.fullScreenViewClick(list,index);
+        this.$parent.fullScreenViewClick(list,index);
+      },
+      //文件预览
+      lookFile(){
+        let obj = {
+          fileName:this.addForm.rectifyMaterialName,
+          fileUrl:this.addForm.rectifyMaterialUrl,
+        };
+        this.$parent.fullScreenFileLookClick(obj);
       },
     },
   }
@@ -432,6 +441,7 @@
           line-height:40px;
           font-size:14px;
           margin:0 30px 0 15px;
+          cursor: pointer;
         }
         p:nth-child(3){
           cursor: pointer;

+ 132 - 122
src/views/safetyCheck/components/inspectStatistics.vue

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

+ 38 - 64
src/views/safetyCheck/components/inspectionItemsStatistics.vue

@@ -3,7 +3,7 @@
   <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">{{propsData.planTitle}}</p>
+        <p class="page-top-title-name-p">{{propsData.title}}</p>
         <p class="page-top-title-out-p" @click="backPage">返回</p>
       </div>
       <div class="tabs">
@@ -22,7 +22,7 @@
               <p :class="rectifyStatus==1?'p-check':''" @click="tableCheck(1)">已整改</p>
               <p :class="rectifyStatus==0?'p-check':''" @click="tableCheck(0)">未整改</p>
             </div>
-            <el-form-item label="" prop="deptId" v-if="propsData.checkCategory == 1">
+            <el-form-item label="" prop="deptId" v-if="propsData.checkCategory == 1&&propsData.planId || (propsData.checkCategory == 1&&!propsData.planId&&!propsData.deptId&&!propsData.subId)">
               <el-select v-model="queryParams.deptId" placeholder="学院单位" style="width: 120px">
                 <el-option
                   v-for="dict in optionList"
@@ -32,7 +32,7 @@
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="subName" v-if="propsData.checkCategory == 2">
+            <el-form-item label="" prop="subName" v-if="propsData.checkCategory == 2&&propsData.planId || (propsData.checkCategory == 2&&!propsData.subId)">
               <el-input
                 maxLength="20"
                 v-model="queryParams.subName"
@@ -161,9 +161,6 @@
 </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'
@@ -171,7 +168,7 @@
     securityCheckOptionList,
     securityCheckDangerTodayDangerList,
     reportHazardItemsOneReportRefresh,
-    securityHazardReportTwoReportRefresh,
+    reportHazardItemsTwoReportRefresh,
     reportHazardItemsThreeReportRefresh,
     reportHazardItemsOneReportPie,
     reportHazardItemsOneReportList,
@@ -185,9 +182,9 @@
     reportHazardItemsTwoReportPieCollege,
     reportHazardItemsThreeReportListCollege,
     reportHazardItemsThreeReportPieCollege,
-  } from "@/api/safetyCheck/indexDemoOne";
+  } from "@/api/safetyCheck/index";
   import echarts from 'echarts'
-  import exportComponent from '@/components/exportComponent/exportComponent'
+  import exportComponent from "@/views/safetyCheck/components/exportComponent/exportComponent.vue";
 
   export default {
     name: 'checkItem',
@@ -199,7 +196,6 @@
     },
     data() {
       return {
-        tableButtonType: this.hasPermiDom(['demo:demo:detail', 'demo:demo:edit', 'demo:demo:del']),
         //导出配置
         exportConfig: {
           api:'',             //导出接口地址
@@ -318,16 +314,34 @@
       getList() {
         //列表请求数据
         let obj = JSON.parse(JSON.stringify(this.queryParams))
-        obj.planId = this.propsData.planId;
         obj.rectifyStatus = this.rectifyStatus;
         //饼图请求数据
         let eChartsData = {
-          planId:this.propsData.planId,
           rectifyStatus:this.rectifyStatus,
-          deptId:this.queryParams.deptId,
         }
-        this.$set(this.exportConfig,'customKey','planId');
-        this.$set(this.exportConfig,'customValue',obj.planId);
+        if(this.propsData.planId){
+          obj.planId = this.propsData.planId;
+          eChartsData.planId = this.propsData.planId;
+          this.$set(this.exportConfig,'customKey','planId');
+          this.$set(this.exportConfig,'customValue',obj.planId);
+        }else if(this.propsData.deptId){
+          obj.deptId = this.propsData.deptId;
+          eChartsData.deptId = this.propsData.deptId;
+          obj.planId = this.propsData.deptPlanId
+          eChartsData.planId = this.propsData.deptPlanId;
+          this.$set(this.exportConfig,'customKey','deptId');
+          this.$set(this.exportConfig,'customValue',obj.deptId);
+        }else if(this.propsData.subId){
+          obj.subId = this.propsData.subId;
+          eChartsData.subId = this.propsData.subId;
+          obj.planId = this.propsData.subPlanId
+          eChartsData.planId = this.propsData.subPlanId;
+          this.$set(this.exportConfig,'customKey','subId');
+          this.$set(this.exportConfig,'customValue',obj.subId);
+        }
+        if(this.propsData.planId || (!this.propsData.planId&&!this.propsData.deptId&&!this.propsData.subId)){
+          eChartsData.deptId = this.queryParams.deptId;
+        }
         this.$set(this.exportConfig,'screenData',obj);
         if(this.propsData.checkCategory == 1){
           //校级数据
@@ -338,7 +352,7 @@
               this.$set(this, 'total', response.data.total)
             })
             //一级指标隐患分布 饼图/头部数据
-            reportHazardItemsOneReportPie(eChartsData).then(response => {
+            reportHazardItemsOneReportPie(obj).then(response => {
               let list = [];
               for(let i=0;i<response.data.pie.length;i++){
                 list.push({
@@ -361,7 +375,7 @@
               this.$set(this, 'total', response.data.total)
             })
             //二级指标隐患分布 饼图/头部数据
-            reportHazardItemsTwoReportPie(eChartsData).then(response => {
+            reportHazardItemsTwoReportPie(obj).then(response => {
               this.$set(this,'formTitleData',response.data.topMsg);
             })
             this.$set(this.exportConfig,'api','/report/hazardItems/twoExport');
@@ -373,7 +387,7 @@
               this.$set(this, 'total', response.data.total)
             })
             //三级指标隐患分布 饼图/头部数据
-            reportHazardItemsThreeReportPie(eChartsData).then(response => {
+            reportHazardItemsThreeReportPie(obj).then(response => {
               this.$set(this,'formTitleData',response.data.topMsg);
             })
             this.$set(this.exportConfig,'api','/report/hazardItems/threeExport');
@@ -388,7 +402,7 @@
               this.$set(this, 'total', response.data.total)
             })
             //一级指标隐患分布 饼图/头部数据
-            reportHazardItemsOneReportPieCollege(eChartsData).then(response => {
+            reportHazardItemsOneReportPieCollege(obj).then(response => {
               let list = [];
               for(let i=0;i<response.data.pie.length;i++){
                 list.push({
@@ -411,7 +425,7 @@
               this.$set(this, 'total', response.data.total)
             })
             //二级指标隐患分布 饼图/头部数据
-            reportHazardItemsTwoReportPieCollege(eChartsData).then(response => {
+            reportHazardItemsTwoReportPieCollege(obj).then(response => {
               this.$set(this,'formTitleData',response.data.topMsg);
             })
             this.$set(this.exportConfig,'api','/report/hazardItems/twoExportCollege');
@@ -423,7 +437,7 @@
               this.$set(this, 'total', response.data.total)
             })
             //三级指标隐患分布 饼图/头部数据
-            reportHazardItemsThreeReportPieCollege(eChartsData).then(response => {
+            reportHazardItemsThreeReportPieCollege(obj).then(response => {
               this.$set(this,'formTitleData',response.data.topMsg);
             })
             this.$set(this.exportConfig,'api','/report/hazardItems/threeExportCollege');
@@ -506,7 +520,7 @@
                   this.getList();
                 });
               }else if(this.tabsIndex == 1){
-                securityHazardReportTwoReportRefresh().then(response => {
+                reportHazardItemsTwoReportRefresh().then(response => {
                   this.msgSuccess(response.message)
                   this.getList();
                 });
@@ -520,48 +534,7 @@
               this.msgSuccess('已是最新数据,无需更新.')
             }
           });
-        } 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(() => {
-          })
-        } else if (type == 6) {
+        }else if (type == 6) {
           //返回并刷新
           this.$set(this, 'pageType', 1)
           this.getList()
@@ -717,6 +690,7 @@
     display: flex;
     justify-content: flex-start;
     border-top: 1px solid #D8D8D8;
+    overflow: hidden;
     .main-title {
       width: 159px;
       height: 40px;

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


+ 27 - 12
src/views/safetyCheck/components/projectAddPage.vue

@@ -54,14 +54,14 @@
               <el-form-item label="检查范围" prop="checkRange">
                 <el-radio-group v-model="dialogForm.checkRange" @change="checkRangeChange" :disabled="lookInfoType" style="min-width:90px;">
                   <el-radio :label="1" v-if="schoolCollegeType == 'school'">全校</el-radio>
-                  <el-radio :label="3">实验室</el-radio>
+                  <el-radio :label="3" style="margin-right:40px;">实验室</el-radio>
                 </el-radio-group>
               </el-form-item>
               <div class="sub-button-box"
                    v-if="dialogForm.checkRange == 3">
                 <p @click="subCheckButton(1)">待检查实验室</p>
               </div>
-              <p class="sub-num-p" v-if="dialogForm.checkRange == 3">待检查实验室共{{dialogForm.subjectNum}}间</p>
+              <p class="sub-num-p">待检查实验室共{{dialogForm.subjectNum}}间</p>
             </div>
             <div class="content-right-form-display" v-if="lookInfoType">
               <el-form-item label="检查范围" prop="checkRange">
@@ -130,7 +130,7 @@
               <p v-if="lookInfoType" class="checkDemand-textarea-p">{{dialogForm.checkDemand?dialogForm.checkDemand:'无'}}</p>
             </el-form-item>
             <el-form-item label="材料附件:">
-              <div class="avatar-uploader-button-box" v-if="dialogForm.uploadDtoList.length<10&&!lookInfoType">
+              <div class="avatar-uploader-button-box" v-if="dialogForm.uploadDtoList.length<5&&!lookInfoType">
                 <el-upload
                   class="avatar-uploader"
                   :action="uploadFileUrl"
@@ -203,7 +203,7 @@
                   </div>
                   <p class="overdue-p">逾期未完成整改关闭实验室</p>
                 </div>
-                <div class="overdue-check-box" v-if="item.overdueUnrectify">
+                <div class="overdue-check-box" v-if="lookInfoType&&item.overdueUnrectify">
                   <p class="overdue-p" style="margin-left:20px;">逾期未完成整改关闭实验室</p>
                 </div>
               </div>
@@ -279,10 +279,7 @@
     securityCheckPlanAdd,
     securityCheckPlanUpdate,
     securityCheckPlanFindCheckPlan,
-  } from '@/api/safetyCheck/indexDemoOne'
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
+  } from '@/api/safetyCheck/index'
   export default {
     name: 'addPage',
     components: {
@@ -387,6 +384,7 @@
     },
     created(){
       this.initialize();
+      this.securityCheckGroupFindGroupList();
     },
     mounted(){
 
@@ -421,8 +419,14 @@
             this.securityCheckPlanFindCheckPlan();
           } else {
             //新增
-            //查询全校实验室数量
-            this.laboratorySubRelInfoGetAllSubNum();
+            if (this.propsData.rank == 'school'){
+              this.$set(this.dialogForm,'checkRange',1);
+              //查询全校实验室数量
+              this.laboratorySubRelInfoGetAllSubNum();
+            }else if(this.propsData.rank == 'college'){
+              this.$set(this.dialogForm,'checkRange',3);
+              this.$set(this.dialogForm,'subjectNum',this.dialogForm.subIds.length);
+            }
           }
         }
       },
@@ -568,6 +572,17 @@
               self.msgError('计划周期的开始时间与结束时间不能相同')
               return
             }
+            //交叉检查-督导组成员数量检测
+            if(this.dialogForm.crossCheck){
+              for(let i=0;i<self.supervisorOptions.length;i++){
+                if(self.supervisorOptions[i].groupId == self.dialogForm.checkGroupId){
+                  if(self.supervisorOptions[i].peopleNum < 2){
+                    self.msgError('督导组成员不足两人,无法使用交叉互检')
+                    return
+                  }
+                }
+              }
+            }
             //日期检测
             for(let i=0;i<self.dialogForm.checkPlanSetDtoList.length;i++){
               if(self.dialogForm.checkPlanSetDtoList[i].checkStartTime == self.dialogForm.checkPlanSetDtoList[i].rectifyDeadline){
@@ -654,7 +669,7 @@
       },
       /*==========上传相关==========*/
       handleAvatarSuccess(res) {
-        if(this.dialogForm.uploadDtoList.length>9){
+        if(this.dialogForm.uploadDtoList.length>4){
           this.msgError('已到达上传数量上限')
           return
         }
@@ -1000,7 +1015,7 @@
               }
             }
             .sub-button-box{
-              margin:0 20px 0 40px;
+              margin:0 20px 0 0;
               display: inline-block;
               border-radius:6px;
               cursor: pointer;

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


+ 75 - 29
src/views/safetyCheck/components/snapshotInfo.vue

@@ -64,7 +64,7 @@
             <div class="right-text-box" v-if="lookInfoType||propsData.rectify">
               <p class="right-text-name-p" style="width:138px;">上报人</p>
               <div class="right-text-title-box">
-                <p :style="!addForm.deptName?'color:#999;':'color:#333;'">{{addForm.createName}}</p>
+                <p :style="!addForm.deptName?'color:#999;':'color:#333;'">{{addForm.createName}}-{{addForm.account}}</p>
               </div>
             </div>
             <div class="right-text-box" v-if="lookInfoType||propsData.rectify">
@@ -84,7 +84,7 @@
             <el-cascader
               :disabled="lookInfoType||propsData.rectify"
               clearable
-              placeholder="请选择检查项目"
+              :placeholder="lookInfoType||propsData.rectify?'未选择检查项目':'请选择检查项目'"
               style="width:704px;"
               v-model="addForm.hazardCheckId"
               filterable
@@ -92,20 +92,22 @@
               :props="{ value: 'id', label: 'labelName',emitPath:false }"
               @change="handleChange"></el-cascader>
           </el-form-item>
+          <p class="dangers-num-p" v-if="dangersNum>0">此检查项在当前实验室累计出现 <span>{{dangersNum}}</span> 次隐患</p>
           <div class="right-text-box">
             <p class="right-text-name-p">检查要点</p>
             <div class="right-text-title-box" style="min-height: 80px;width:704px;">
-              <p :style="!addForm.hazardCheckPoint?'color:#999;':'color:#333;'">{{addForm.hazardCheckPoint?addForm.hazardCheckPoint:'请选择检查项目'}}</p>
-            </div>
-          </div>
-          <div class="right-text-box">
-            <p class="right-text-name-p">隐患等级</p>
-            <div class="right-text-title-box" style="width:301px;">
-              <p :style="!addForm.hazardLevel?'color:#999;':'color:#333;'">
-                {{addForm.hazardLevel==1?'轻微隐患':(addForm.hazardLevel==2?'一般隐患':(addForm.hazardLevel==3?'重大隐患':'请选择检查项目'))}}
-              </p>
+              <p :style="!addForm.hazardCheckPoint?'color:#C0C4CC;':'color:#333;'" v-if="lookInfoType||propsData.rectify">{{addForm.hazardCheckPoint?addForm.hazardCheckPoint:'未选择检查项目'}}</p>
+              <p :style="!addForm.hazardCheckPoint?'color:#C0C4CC;':'color:#333;'" v-if="!lookInfoType&&!propsData.rectify">{{addForm.hazardCheckPoint?addForm.hazardCheckPoint:'请选择检查项目'}}</p>
             </div>
           </div>
+          <!--<div class="right-text-box">-->
+            <!--<p class="right-text-name-p">隐患等级</p>-->
+            <!--<div class="right-text-title-box" style="width:301px;">-->
+              <!--<p :style="!addForm.hazardLevel?'color:#999;':'color:#333;'">-->
+                <!--{{addForm.hazardLevel==1?'轻微隐患':(addForm.hazardLevel==2?'一般隐患':(addForm.hazardLevel==3?'重大隐患':'请选择检查项目'))}}-->
+              <!--</p>-->
+            <!--</div>-->
+          <!--</div>-->
         </div>
         <p class="content-right-title-p">
           隐患信息
@@ -148,23 +150,23 @@
             <el-form-item label="整改措施">
               <el-input placeholder="" maxLength='200' type="textarea" style="width:704px;"
                         :disabled="lookInfoType||propsData.rectify"
-                        resize="none" v-model="addForm.hazardDescribe" show-word-limit :rows="3"></el-input>
+                        resize="none" v-model="addForm.rectifyDescribe" show-word-limit :rows="3"></el-input>
             </el-form-item>
             <el-form-item label="现场照片">
-              <div class="snapshotManagement-for-img-box" v-for="(img,imgIndex) in addForm.imgDtoList" :key="imgIndex">
-                <img class="for-img" :src="img.fileUrl" @click="fullScreenViewClick(addForm.imgDtoList,imgIndex)">
+              <div class="snapshotManagement-for-img-box" v-for="(img,imgIndex) in addForm.zgDtoList" :key="imgIndex">
+                <img class="for-img" :src="img.fileUrl" @click="fullScreenViewClick(addForm.zgDtoList,imgIndex)">
                 <p class="for-del-button el-icon-circle-close" v-if="!lookInfoType&&!propsData.rectify" @click="delImg(imgIndex)"></p>
               </div>
             </el-form-item>
-            <el-form-item label="整改方案" v-if="addForm.rectifyStatus==2">
-              <div class="up-file-box" v-if="addForm.rectifyProjectUrl" @click="fullScreenFileLookClick">
-                <img src="@/assets/ZDimages/safetyCheck/icon_dr_wj.png">
-                <p>{{addForm.rectifyProjectName}}</p>
-              </div>
-            </el-form-item>
+            <!--<el-form-item label="整改方案" v-if="addForm.rectifyStatus==2">-->
+              <!--<div class="up-file-box" v-if="addForm.rectifyProjectUrl" @click="fullScreenFileLookClick">-->
+                <!--<img src="@/assets/ZDimages/safetyCheck/icon_dr_wj.png">-->
+                <!--<p>{{addForm.rectifyProjectName}}</p>-->
+              <!--</div>-->
+            <!--</el-form-item>-->
             <div style="display: flex">
               <el-form-item label="整改人">
-                <p class="user-time-p">{{addForm.rectifyUserName}}</p>
+                <p class="user-time-p">{{addForm.rectifyUserName}}-{{addForm.rectifyUserAccount}}</p>
               </el-form-item>
               <el-form-item label="处理时间">
                 <p class="user-time-p">{{ parseTime(addForm.rectifyTime,"{y}-{m}-{d} {h}:{i}") }}</p>
@@ -173,7 +175,7 @@
           </div>
         </div>
         <!--整改-->
-        <rectification-component v-if="propsData.rectify" ref="rectificationComponent" :recheckComponentPropsData="recheckComponentPropsData"></rectification-component>
+        <snapshotRectificationComponent v-if="propsData.rectify" ref="snapshotRectificationComponent" :recheckComponentPropsData="recheckComponentPropsData"></snapshotRectificationComponent>
       </el-form>
     </div>
     <fullScreenView :fullScreenViewProps="fullScreenViewProps" ref="fullScreenView"></fullScreenView>
@@ -186,21 +188,23 @@
   import {
     securityCheckPhotoDetail,
     securityCheckOptionList,
+    securityCheckOptionSelAllList,
     securityCheckPhotoMyAdd,
     securityCheckPhotoUpdate,
-  } from '@/api/safetyCheck/indexDemoOne'
+    securityCheckPhotoGetCheckNumBySub,
+  } from '@/api/safetyCheck/index'
   import {
     laboratorySubRelInfoGetRelList,
   } from '@/api/commonality/noPermission'
   import fullScreenView from "@/components/fullScreenView/fullScreenView.vue";
   import fullScreenFileLook from "@/components/fullScreenFileLook/fullScreenFileLook.vue";
-  import rectificationComponent from "./initiateInspect/rectificationComponent.vue";
+  import snapshotRectificationComponent from "./snapshotRectificationComponent.vue";
   export default {
     name: 'snapshotInfo',
     components: {
       fullScreenView,
       fullScreenFileLook,
-      rectificationComponent,
+      snapshotRectificationComponent,
     },
     props:{
       propsData:{},
@@ -228,6 +232,8 @@
         typeOptions: [],
         //分级
         levelOptions: [],
+        //隐患次数
+        dangersNum: 0,
         //提交表单
         addForm:{
           deptId:'',
@@ -282,7 +288,11 @@
       }
     },
     created(){
-      this.securityCheckOptionList();
+      if(this.propsData.showType){
+        this.securityCheckOptionSelAllList();
+      } else {
+        this.securityCheckOptionList();
+      }
       this.initialize();
     },
     mounted(){
@@ -307,6 +317,7 @@
           response.data.imgDtoList = response.data.yhDtoList;
           this.$set(this,'subOptions',[{subId:response.data.subId,subName:response.data.subName}]);
           this.$set(this,'addForm',response.data);
+          this.securityCheckPhotoGetCheckNumBySub()
         });
       },
       //查询检查项列表
@@ -316,6 +327,13 @@
           this.getCascaderData(this.options)
         });
       },
+      //查询检查项列表-查询所有
+      securityCheckOptionSelAllList(){
+        securityCheckOptionSelAllList({}).then( response => {
+          this.$set(this,'options',this.listChildrenDel(response.data));
+          this.getCascaderData(this.options)
+        });
+      },
       // tree 结构转化成一维数组
       listChildrenDel(list) {
         let listOptions = JSON.parse(JSON.stringify(list))
@@ -398,7 +416,7 @@
       // 整改
       async securityCheckPhotoUpdate(){
         let self = this;
-        let obj = await this.$refs["rectificationComponent"].submitData();
+        let obj = await this.$refs["snapshotRectificationComponent"].submitData();
         obj.photoId = this.addForm.photoId;
         this.$confirm('是否确认提交?', "警告", {
           confirmButtonText: "确定",
@@ -438,6 +456,7 @@
               }
             }
           }
+          this.securityCheckPhotoGetCheckNumBySub();
         }else{
           self.$set(self.addForm,'hazardCheckId1','');
           self.$set(self.addForm,'hazardCheckName1','');
@@ -450,6 +469,7 @@
           self.$set(self.addForm,'hazardCheckCode','');
           self.$set(self.addForm,'hazardCheckPoint','');
           self.$set(self.addForm,'hazardLevel','');
+          self.$set(self,'dangersNum',0);
         }
       },
       //子项展开隐藏按钮
@@ -464,6 +484,17 @@
           this.$set(this,'itemShowType_4',!this.itemShowType_4);
         }
       },
+      //查询隐患发生次数
+      securityCheckPhotoGetCheckNumBySub() {
+        if(this.addForm.subId&&this.addForm.hazardCheckId){
+          securityCheckPhotoGetCheckNumBySub({
+            subId: this.addForm.subId,
+            hazardCheckId: this.addForm.hazardCheckId
+          }).then(response => {
+            this.$set(this, 'dangersNum', response.data)
+          })
+        }
+      },
       //懒加载实验室
       laboratorySubRelInfoGetRelList(e){
         laboratorySubRelInfoGetRelList({searchValue:e}).then(response => {
@@ -479,7 +510,7 @@
             self.$set(self.addForm,"deptName",self.subOptions[i].deptName);
             self.$set(self.addForm,"subId",self.subOptions[i].subId);
             self.$set(self.addForm,"subName",self.subOptions[i].subName);
-            self.$set(self.addForm,"subRoom",self.subOptions[i].subRoom);
+            self.$set(self.addForm,"subRoom",self.subOptions[i].roomNum);
             self.$set(self.addForm,"buildId",self.subOptions[i].buildId);
             self.$set(self.addForm,"buildName",self.subOptions[i].buildName);
             self.$set(self.addForm,"floorId",self.subOptions[i].floorId);
@@ -490,6 +521,7 @@
             self.$set(self.addForm,"classLevelName",self.subOptions[i].classLevelName);
           }
         }
+        this.securityCheckPhotoGetCheckNumBySub();
       },
       //实验室清除
       selectClear(){
@@ -573,7 +605,11 @@
       },
       //照片预览
       fullScreenViewClick(list,index){
-        this.$set(this,'fullScreenViewProps',list);
+        let newList = [];
+        for(let i=0;i<list.length;i++){
+          newList.push(list[i].fileUrl)
+        }
+        this.$set(this,'fullScreenViewProps',newList);
         this.$refs['fullScreenView'].initialize(index);
       },
     },
@@ -621,6 +657,16 @@
           cursor: pointer;
         }
       }
+      .dangers-num-p {
+        margin-left: 110px;
+        margin-bottom: 20px;
+        font-size: 14px;
+        color: #333;
+        display: block;
+        span {
+          color: #FF0000;
+        }
+      }
       .right-text-box{
         display: flex;
         margin-bottom:20px;

+ 459 - 0
src/views/safetyCheck/components/snapshotRectificationComponent.vue

@@ -0,0 +1,459 @@
+<!--随手拍整改-->
+<template>
+  <div class="page-container snapshotRectificationComponent">
+    <!--当前整改-->
+    <el-form class="add-form-box" :model="addForm" ref="addForm" :rules="rules" label-width="110px">
+      <p class="content-right-title-min-p">
+        隐患整改
+        <span :class="itemShowType?'el-icon-arrow-down':'el-icon-arrow-up'" @click="itemShowButton()"></span>
+      </p>
+      <div v-if="itemShowType" style="margin-top:20px;">
+        <el-form-item label="整改结果" prop="rectifyStatus">
+          <div class="right-text-box">
+            <div :class="addForm.rectifyStatus == 1?'right-check-box':'right-no-check-box'" @click="checkButton(1)">
+              <div>
+                <p></p>
+              </div>
+              <p class="right-check-title-p">已整改</p>
+            </div>
+            <div :class="addForm.rectifyStatus == 2?'right-check-box':'right-no-check-box'" @click="checkButton(2)">
+              <div>
+                <p></p>
+              </div>
+              <p class="right-check-title-p">暂无法整改</p>
+            </div>
+          </div>
+        </el-form-item>
+        <el-form-item label="整改措施" prop="rectifyDescribe">
+          <el-input placeholder="立整立改的请填写相关文字及整改前后照片对比等,不能立整立改的请说明因并附整改计划、措施等" maxlength='500' type="textarea" style="width:704px;"
+                    resize="none" v-model="addForm.rectifyDescribe" :show-word-limit="true" :rows="3"></el-input>
+        </el-form-item>
+        <el-form-item label="现场照片" prop="imgDtoList">
+          <div class="snapshotManagement-for-img-box" v-for="(img,imgIndex) in addForm.imgDtoList" :key="imgIndex">
+            <img class="for-img" :src="img.fileUrl" @click="lookImg(addForm.imgDtoList,imgIndex)">
+            <p class="for-del-button el-icon-circle-close" @click="delImg(imgIndex)"></p>
+          </div>
+          <el-upload
+            v-if="addForm.imgDtoList.length<6"
+            style="display: inline-block;overflow: hidden"
+            class="avatar-uploader"
+            :action="uploadImgUrl"
+            :show-file-list="false"
+            :on-success="(res)=>handleAvatarSuccess('img',res)"
+            :headers="headers"
+            :before-upload="(res)=>beforeAvatarUpload('img',res)">
+            <p class="el-icon-plus up-img-p" style="display: inline-block"></p>
+          </el-upload>
+          <p class="up-img-text">支持jpg/png/bmp/gif格式,且不超过2M,最多上传6张</p>
+        </el-form-item>
+        <!--<div v-if="addForm.rectifyStatus == 0">-->
+          <!--<el-form-item label="整改方案" prop="rectifyMaterialUrl">-->
+            <!--<div class="up-file-button" v-if="!addForm.rectifyMaterialUrl">-->
+              <!--<el-upload-->
+                <!--v-if="addForm.imgDtoList.length<6"-->
+                <!--style="display: inline-block;overflow: hidden"-->
+                <!--class="avatar-uploader"-->
+                <!--:action="uploadImgUrl"-->
+                <!--:show-file-list="false"-->
+                <!--:on-success="(res)=>handleAvatarSuccess('file',res)"-->
+                <!--:headers="headers"-->
+                <!--:before-upload="(res)=>beforeAvatarUpload('file',res)">-->
+                <!--<p class="up-file-min-button">+ 上传文件</p>-->
+              <!--</el-upload>-->
+              <!--<p class="up-file-text">支持docx/xlsx/pdf格式文件</p>-->
+            <!--</div>-->
+            <!--<div class="up-file-box" v-if="addForm.rectifyMaterialUrl">-->
+              <!--<img src="@/assets/ZDimages/safetyCheck/icon_dr_wj.png">-->
+              <!--<p @click="lookFile">{{addForm.rectifyMaterialName}}</p>-->
+              <!--<p class="el-icon-close" @click="delFileButton"></p>-->
+            <!--</div>-->
+          <!--</el-form-item>-->
+        <!--</div>-->
+      </div>
+    </el-form>
+  </div>
+</template>
+
+<script>
+  import { getToken } from "@/utils/auth";
+  export default {
+    name: 'rectificationComponent',
+    props:{
+      rectificationComponentPropsData:{},
+    },
+    data(){
+      return{
+        loading:false,
+        //上传相关
+        uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
+        headers: {
+          Authorization:getToken(),
+        },
+        //图片组件数据
+        fullScreenViewProps:[],
+        itemShowType:true,
+        addForm:{
+          rectifyStatus:null,
+          rectifyDescribe:'',
+          imgDtoList:[],
+          rectifyMaterialUrl:'',
+        },
+        rules:{
+          rectifyStatus: [
+            { required: true, message: "请选择整改结果", trigger: "blur" },
+          ],
+          rectifyDescribe: [
+            { required: true, message: "请输入整改措施", trigger: "blur" },
+            { required: true, message: "请输入整改措施", validator: this.spaceJudgment, trigger: "blur" }
+          ],
+          imgDtoList: [
+            { required: true, message: "请上传现场照片", trigger: "blur" },
+          ],
+          rectifyMaterialUrl: [
+            { required: true, message: "请上传整改方案", trigger: "blur" },
+          ],
+        },
+        upDataName:'',
+      }
+    },
+    created(){
+
+    },
+    mounted(){
+
+    },
+    methods:{
+      submitData(){
+        return new Promise(resolve=>{
+          this.$refs["addForm"].validate(valid => {
+            if (valid) {
+              resolve(this.addForm)
+            }
+          })
+        })
+      },
+      //子项展开隐藏按钮
+      itemShowButton(){
+        this.$set(this,'itemShowType',!this.itemShowType);
+      },
+      //整改选择按钮
+      checkButton(type){
+        if(this.addForm.rectifyStatus != type){
+          this.$set(this.addForm,'rectifyStatus',type);
+          this.$forceUpdate();
+        }
+      },
+      /*==========上传相关==========*/
+      handleAvatarSuccess(srt,res) {
+        this.$set(this,'loading',false);
+        if(srt == 'img'){
+          if(this.addForm.imgDtoList.length>5){
+            this.msgError('最多只可上传6张')
+            return
+          }
+          let suffixName= this.upDataName.split('.')[this.upDataName.split('.').length - 2]
+          //判断文件名中是否有逗号和分号
+          if(suffixName.indexOf(',')==-1 && suffixName.indexOf(';')==-1){
+          }else{
+            this.msgError('文件名里包含逗号或分号,请修改后重新上传!')
+            return
+          }
+          let obj ={
+            fileName:this.upDataName,
+            fileUrl:res.data.url,
+            fileType:2,
+          };
+          this.addForm.imgDtoList.push(obj);
+        } else if(srt == 'file'){
+          this.$set(this,'loading',false);
+          let suffixName= this.upDataName.split('.')[this.upDataName.split('.').length - 2]
+          //判断文件名中是否有逗号和分号
+          if(suffixName.indexOf(',')==-1 && suffixName.indexOf(';')==-1){
+          }else{
+            this.msgError('文件名里包含逗号或分号,请修改后重新上传!')
+            return
+          }
+          this.$set(this.addForm,'rectifyMaterialUrl',res.data.url);
+          this.$set(this.addForm,'rectifyMaterialName',suffixName);
+        }
+        this.$forceUpdate()
+      },
+      beforeAvatarUpload(srt,file) {
+        if(srt == 'img'){
+          if(this.addForm.imgDtoList.length>5){
+            this.msgError('最多只可上传6张')
+            return false
+          }
+          let type = false;
+          if (file.type == 'image/png' || file.type == 'image/jpeg' || file.type == 'image/jpg' || file.type == 'image/gif' || file.type == 'image/bmp') {
+            if(file.size> 2100000){
+              this.msgError('上传图片大小不能超过2M')
+              return false
+            }
+            this.$set(this,'loading',true);
+            this.upDataName = file.name;
+            type = true;
+          }else{
+            this.msgError('仅支持jpeg/jpg/png/bmp/gif格式')
+            type = false;
+          }
+          return type;
+        }else if(srt == 'file'){
+          let type = false;
+          let num = 0;
+          for(let i=0;i<file.name.length;i++){
+            if(file.name[i] == '.'){
+              num++
+            }
+          }
+          if(num != 1){
+            this.msgError('文件名称不能包含 " . "')
+            return false
+          }
+          if (file.type == 'application/pdf' || file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' || file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
+            if(file.size> 5250000){
+              this.msgError('上传大小不能超过5M')
+              return false
+            }
+            this.$set(this,'loading',true);
+            this.upDataName = file.name;
+            type = true;
+          }else{
+            this.msgError('只能上传docx/xlsx/pdf格式');
+            type = false;
+          }
+          return type;
+        }
+      },
+      //删除文件
+      delFileButton(){
+        this.$set(this.addForm,'rectifyMaterialUrl','');
+        this.$set(this.addForm,'rectifyMaterialName','');
+      },
+      //删除照片
+      delImg(imgIndex){
+        this.addForm.imgDtoList.splice(imgIndex,1);
+      },
+      //照片预览
+      lookImg(list,index){
+        this.$parent.fullScreenViewClick(list,index);
+      },
+      //文件预览
+      lookFile(){
+        let obj = {
+          fileName:this.addForm.rectifyMaterialName,
+          fileUrl:this.addForm.rectifyMaterialUrl,
+        };
+        this.$parent.fullScreenFileLookClick(obj);
+      },
+    },
+  }
+</script>
+
+<style scoped lang="scss">
+  .snapshotRectificationComponent{
+    .add-form-box{
+      border:1px solid #E0E0E0;
+      border-top:none;
+      .content-right-title-min-p{
+        line-height:40px;
+        background: #F5F5F5;
+        padding-left:23px;
+        border-top:1px solid #E0E0E0;
+        border-bottom:1px solid #E0E0E0;
+        span{
+          float: right;
+          font-size:20px;
+          line-height:40px;
+          margin-right:20px;
+          cursor: pointer;
+        }
+      }
+      .right-text-box{
+        display: flex;
+        .right-text-name-p{
+          width:90px;
+          line-height:40px;
+          text-align: right;
+          margin-right:14px;
+          font-size:16px;
+        }
+        .right-text-title-box{
+          font-size:14px;
+          width:300px;
+          padding:10px 20px;
+          background-color: #f5f5f5;
+          border: 1px solid #E0E0E0;
+          border-radius: 4px 4px 4px 4px;
+          p{
+            line-height:20px;
+            /*单行省略号*/
+            display:block;
+            overflow:hidden;
+            text-overflow:ellipsis;
+            white-space:nowrap;
+          }
+        }
+        .right-text-text-box{
+          font-size:14px;
+          width:300px;
+          padding:10px 20px;
+          background-color: #f5f5f5;
+          border: 1px solid #E0E0E0;
+          border-radius: 4px 4px 4px 4px;
+          p{
+            line-height:20px;
+          }
+        }
+        .right-no-check-box{
+          height:40px;
+          margin-right:20px;
+          overflow: hidden;
+          display: flex;
+          cursor: pointer;
+          div{
+            margin:13px 0 0;
+            width:16px;
+            height:16px;
+            border:1px solid #999;
+            border-radius:50%;
+            p{
+              height:10px;
+              width:10px;
+              margin:2px;
+              border-radius:50%;
+            }
+          }
+          .right-check-title-p{
+            margin-left:8px;
+            height:40px;
+            line-height:40px;
+            color:#333;
+            font-size:16px;
+          }
+        }
+        .right-check-box{
+          height:40px;
+          margin-right:20px;
+          overflow: hidden;
+          display: flex;
+          cursor: pointer;
+          div{
+            margin:13px 0 0;
+            width:16px;
+            height:16px;
+            border:1px solid #0183FA;
+            border-radius:50%;
+            p{
+              height:10px;
+              width:10px;
+              margin:2px;
+              border-radius:50%;
+              background-color: #0183FA;
+            }
+          }
+          .right-check-title-p{
+            margin-left:8px;
+            height:40px;
+            line-height:40px;
+            color:#0183FA;
+            font-size:16px;
+          }
+        }
+        img{
+          cursor: pointer;
+          display: block;
+          width:100px;
+          height:100px;
+          margin-right:20px;
+        }
+      }
+      ::v-deep .snapshotManagement-for-img-box{
+        width:80px;
+        height:80px;
+        border-radius:4px;
+        display: inline-block;
+        overflow: hidden;
+        margin-right:20px;
+        position: relative;
+        .for-img{
+          width:80px;
+          height:80px;
+          display: inline-block;
+          overflow: hidden;
+        }
+        .for-del-button{
+          background: rgba(0,0,0,0.7);
+          width:20px;
+          height:20px;
+          line-height: 20px;
+          text-align: center;
+          color:#fff;
+          border-bottom-left-radius:4px;
+          cursor: pointer;
+          position: absolute;
+          top:0;
+          right:0;
+        }
+      }
+      ::v-deep .up-img-p{
+        height:80px;
+        width:80px;
+        line-height:80px;
+        text-align: center;
+        font-size:16px;
+        border-radius:4px;
+        border:1px dashed #E0E0E0;
+      }
+      .up-img-text{
+        line-height:40px;
+        font-size:14px;
+        color:#999;
+      }
+      .up-file-button{
+        display: flex;
+      }
+      .up-file-min-button{
+        border:1px solid #0183FA;
+        color:#0183FA;
+        border-radius:4px;
+        height:30px;
+        line-height:30px;
+        width:100px;
+        text-align: center;
+        margin:5px 20px 0 0;
+      }
+      .up-file-text{
+        color:#999;
+        height:40px;
+        line-height:40px;
+      }
+      .up-file-box{
+        display: flex;
+        height:40px;
+        img{
+          margin-top:12px;
+          width:16px;
+          height:16px;
+          display: block;
+        }
+        p:nth-child(2){
+          line-height:40px;
+          font-size:14px;
+          margin:0 30px 0 15px;
+          cursor: pointer;
+        }
+        p:nth-child(3){
+          cursor: pointer;
+          color:red;
+          font-size:16px;
+          height:16px;
+          width:16px;
+          line-height:16px;
+          margin-top:12px;
+          text-align: center
+        }
+      }
+    }
+  }
+</style>

+ 25 - 18
src/views/safetyCheck/components/subDialog.vue

@@ -1,6 +1,6 @@
 <!--待检查实验室-->
 <template>
-  <el-dialog class="inspectionPlan-dialog-box"
+  <el-dialog class="inspectionPlan-sub-dialog-box"
              :close-on-click-modal="false"
              title="待检查实验室" :visible.sync="addDialogType" v-if="addDialogType"
              @close="addDialogOff" width="1430px" append-to-body>
@@ -52,13 +52,13 @@
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="hazardType">
-              <el-select v-model="subQueryParamsLeft.hazardType" clearable placeholder="危险源标签" style="width: 144px">
+            <el-form-item label="" prop="subLab">
+              <el-select v-model="subQueryParamsLeft.subLab" clearable placeholder="危险源标签" style="width: 144px">
                 <el-option
                   v-for="item in hazardTypeList"
-                  :key="item.code"
-                  :label="item.name"
-                  :value="item.code">
+                  :key="item.value"
+                  :label="item.msg"
+                  :value="item.value">
                 </el-option>
               </el-select>
             </el-form-item>
@@ -148,13 +148,13 @@
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="hazardType">
-              <el-select v-model="subQueryParamsRight.hazardType" clearable placeholder="危险源标签" :style="!lookInfoType?'width:144px':'width:140px'">
+            <el-form-item label="" prop="subLab">
+              <el-select v-model="subQueryParamsRight.subLab" clearable placeholder="危险源标签" :style="!lookInfoType?'width:144px':'width:140px'">
                 <el-option
                   v-for="item in hazardTypeList"
-                  :key="item.code"
-                  :label="item.name"
-                  :value="item.code">
+                  :key="item.value"
+                  :label="item.msg"
+                  :value="item.value">
                 </el-option>
               </el-select>
             </el-form-item>
@@ -191,7 +191,7 @@
                 <span :style="'color:'+scope.row.classLevelColor+';'">{{scope.row.classLevelName}}</span>
               </template>
             </el-table-column>
-            <el-table-column label="负责人" align="center" prop="deptName" show-overflow-tooltip width="220" v-if="lookInfoType"/>
+            <el-table-column label="负责人" align="center" prop="adminName" show-overflow-tooltip width="220" v-if="lookInfoType"/>
           </el-table>
           <pagination layout="total, prev, pager, next, jumper"
                       v-show="subTotalRight>0"
@@ -214,13 +214,13 @@
 
 <script>  import {
   laboratorySubRelInfoConditionSubjectInfo,
-} from '@/api/safetyCheck/indexDemoOne'
+} from '@/api/safetyCheck/index'
   import {
   getDeptDropList,
   systemBuildingGetOptList,
   laboratoryTypeConfigGetList,
   laboratoryLevelConfigGetLevelTitleList,
-  laboratorySubRelInfoGetHazardTypeList,
+  systemSubjectTags,
 } from "@/api/commonality/permission";
   export default {
     name: 'subDialog',
@@ -242,6 +242,7 @@
           pageSize:20,
           typeId:"",
           levelId:"",
+          subLab:"",
           deptId:"",
           searchValue:"",
           filtType:1
@@ -255,6 +256,7 @@
           pageSize:20,
           typeId:"",
           levelId:"",
+          subLab:"",
           deptId:"",
           searchValue:"",
           filtType:2
@@ -277,7 +279,7 @@
       this.systemBuildingGetOptList();
       this.laboratoryTypeConfigGetList();
       this.laboratoryLevelConfigGetLevelTitleList();
-      this.laboratorySubRelInfoGetHazardTypeList();
+      this.systemSubjectTags();
       this.subResetQueryLeft();
       this.subResetQueryRight();
     },
@@ -322,6 +324,7 @@
           pageSize:20,
           typeId:"",
           levelId:"",
+          subLab:"",
           deptId:"",
           searchValue:"",
           filtType:1
@@ -353,6 +356,7 @@
           pageSize:20,
           typeId:"",
           levelId:"",
+          subLab:"",
           deptId:"",
           searchValue:"",
           filtType:2
@@ -457,8 +461,8 @@
         });
       },
       //危险源下拉列表
-      laboratorySubRelInfoGetHazardTypeList(){
-        laboratorySubRelInfoGetHazardTypeList().then(response => {
+      systemSubjectTags(){
+        systemSubjectTags().then(response => {
           this.$set(this,'hazardTypeList',response.data);
         });
       },
@@ -467,7 +471,7 @@
 </script>
 
 <style scoped lang="scss">
-  .inspectionPlan-dialog-box{
+  .inspectionPlan-sub-dialog-box{
     .el-dialog__body{
       padding:20px 0 20px 30px;
     }
@@ -559,5 +563,8 @@
         }
       }
     }
+    ::v-deep .el-form--inline .el-form-item{
+      margin-right:8px;
+    }
   }
 </style>

+ 106 - 68
src/views/safetyCheck/dataStatistics/hiddenDangerStatistics.vue

@@ -8,7 +8,7 @@
       </div>
       <div class="hiddenDanger" id="hiddenDanger-box" v-if="identityType == 1"></div>
       <div class="tabs">
-        <div class="tabs-li" :class="tabsIndex==index?'color-B':'color-A'" @click="tabsClick(index)" v-for="(item,index) in tabsList">
+        <div class="tabs-li" :class="tabsIndex==index?'color-B':'color-A'" @click="tabsClick(index)" v-for="(item,index) in tabsList" :key="index">
           <img  :src="tabsIndex==index?item.img2:item.img"/>
           <p>{{item.name}}</p>
         </div>
@@ -50,18 +50,47 @@
             </el-form-item>
           </el-form>
         </div>
+        <!--校级列表-->
         <div class="page-content-box" style="padding-top:0;" v-if="tabsIndex==0">
           <el-table class="table-box" v-loading="loading" border ref="table-box" :data="dataList"
                     @selection-change="handleSelectionChange" :row-key="getRowKeys" @sort-change="sortChange">
             <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
             <el-table-column label="序号" type="index" width="60"/>
-            <el-table-column label="学院单位" prop="deptName" v-if="identityType == 1"  show-overflow-tooltip/>
-            <el-table-column label="实验室名称" prop="subName" v-if="identityType != 1"   show-overflow-tooltip/>
-            <el-table-column label="检查数" prop="checkNum" width="180" show-overflow-tooltip/>
-            <el-table-column label="隐患数" sortable="custom"  prop="hazardNum" width="180" show-overflow-tooltip/>
-            <el-table-column label="已整改数" prop="rectifyNum" width="180" show-overflow-tooltip/>
-            <el-table-column label="未整改数" prop="notRectifyNum" width="180" show-overflow-tooltip/>
-            <el-table-column label="整改完成率" prop="ratio" width="180" show-overflow-tooltip/>
+            <el-table-column label="学院单位" prop="deptName" v-if="identityType == 1"  show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.deptName}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="实验室名称" prop="subName" v-if="identityType != 1"   show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.subName}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="检查数" prop="checkNum" width="180" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.checkNum}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="隐患数" sortable="custom"  prop="hazardNum" width="180" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.hazardNum}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="已整改数" prop="rectifyNum" width="180" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.rectifyNum}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="未整改数" prop="notRectifyNum" width="180" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.notRectifyNum}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="整改完成率" prop="ratio" width="180" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.ratio}}</span>
+              </template>
+            </el-table-column>
             <el-table-column label="操作" width="112" show-overflow-tooltip >
               <template slot-scope="scope">
                 <div class="table-button-box">
@@ -83,6 +112,7 @@
                       @pagination="getList"
           />
         </div>
+        <!--院级列表-->
         <div class="page-content-box" style="padding-top:0;" v-if="tabsIndex==1">
           <el-table class="table-box" v-loading="loading" border ref="table-box" :data="dataList" v-if="tableShowType"
                     @selection-change="handleSelectionChange" :row-key="getRowKeysTow" @sort-change="sortChange">
@@ -98,7 +128,7 @@
                 <div class="table-button-box">
                   <p class="table-button-null"></p>
                   <p class="table-button-p"
-                     @click="tableButton(2,scope.row)"
+                     @click="tableButton(3,scope.row)"
 
                   >详情</p>
                   <p class="table-button-null"></p>
@@ -116,8 +146,8 @@
         </div>
       </div>
     </div>
-    <initiateInspect :minPropsData="minPropsData" v-if="pageType == 2"></initiateInspect>
-    <inspect-statistics :minPropsData="minPropsData" v-if="pageType === 3"></inspect-statistics>
+    <inspect-statistics :propsData="minPropsData" v-if="pageType == 2"></inspect-statistics>
+    <inspection-items-statistics :propsData="minPropsData" v-if="pageType === 3"></inspection-items-statistics>
   </div>
 </template>
 
@@ -125,6 +155,7 @@
 //import { getDicts } from "@/api/commonality/noPermission";
 //import { systemUserSelect } from "@/api/commonality/permission";
 import {
+  securityIndexStatisticsUserIdentity,
   reportHazardReportOneHazardGaugeOutfit,
   securityDataStatisticsGetUserIdentity,
   securityHazardReportColumnPicture,
@@ -138,19 +169,19 @@ import {
   reportHazardReportDeptTopCollege,
   reportHazardReportOneItemsScatterCollege,
   reportHazardReportOneItemsScatterCollegeTop,
-} from "@/api/safetyCheck/indexDemoOne";
+} from "@/api/safetyCheck/index";
 import {
   getDeptDropList,
 } from '@/api/commonality/permission'
 import echarts from 'echarts'
-import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
 import inspectStatistics from "@/views/safetyCheck/components/inspectStatistics.vue";
-import exportComponent from '@/components/exportComponent/exportComponent'
+import inspectionItemsStatistics from "@/views/safetyCheck/components/inspectionItemsStatistics.vue";
+import exportComponent from "@/views/safetyCheck/components/exportComponent/exportComponent.vue";
 export default {
   name: 'checkItem',
   components: {
-    initiateInspect,
     inspectStatistics,
+    inspectionItemsStatistics,
     exportComponent,
   },
   props:{
@@ -158,7 +189,6 @@ export default {
   },
   data(){
     return{
-      tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
       //用户身份状态
       identityType:0,
       //导出配置
@@ -212,29 +242,40 @@ export default {
   },
   created(){
     this.getDeptDropList();
+    this.securityDataStatisticsGetUserIdentity();
   },
   mounted(){
-    this.securityDataStatisticsGetUserIdentity();
-    // this.eCharts();
+
   },
   methods:{
     //查询用户身份
     securityDataStatisticsGetUserIdentity(){
-      securityDataStatisticsGetUserIdentity().then(response => {
-        if(response.schoolAdmin){
-          //校级管理员
-          this.$set(this,'identityType',1);
-          //查询隐患柱状图
+      this.$set(this,'identityType',this.propsData.checkCategory);
+      this.$nextTick(()=>{
+        if(this.identityType == 1){
           this.securityHazardReportColumnPicture();
-        }else if(response.collegeAdmin){
-          //院级管理员
-          this.$set(this,'identityType',2);
-        }else{
-          //无权限
-          this.$set(this,'identityType',0);
         }
         this.getList();
-      });
+      })
+      // securityDataStatisticsGetUserIdentity().then(response => {
+      //   if(response.schoolAdmin){
+      //     //校级管理员
+      //     this.$set(this,'identityType',1);
+      //     this.$nextTick(()=>{
+      //       //查询隐患柱状图
+      //       this.securityHazardReportColumnPicture();
+      //     })
+      //   }else if(response.collegeAdmin){
+      //     //院级管理员
+      //     this.$set(this,'identityType',2);
+      //   }else{
+      //     //无权限
+      //     this.$set(this,'identityType',0);
+      //   }
+      //   this.$nextTick(()=>{
+      //     this.getList();
+      //   })
+      // });
     },
     //查询隐患柱状图
     securityHazardReportColumnPicture(){
@@ -431,11 +472,11 @@ export default {
         reportHazardReportDeptTop(obj).then(response => {
           this.$set(this,'formTitleData',response.data);
         });
-        this.$set(this.exportConfig,'api','/report/hazardReport/export');
+        this.$set(this.exportConfig,'api','/security/hazardReport/export');
         this.$set(this.exportConfig,'fileName','各单位隐患整改统计');
       }else if(this.identityType == 1 && this.tabsIndex == 1){
         //一级检查项隐患分布-列表表头数据
-        reportHazardReportOneHazardGaugeOutfit().then(response => {
+        reportHazardReportOneHazardGaugeOutfit({checkCategory:this.propsData.checkCategory}).then(response => {
           this.$set(this,'tableTitleList',response.data);
           this.$set(this,'tableShowType',true);
           this.$nextTick(()=>{
@@ -460,11 +501,11 @@ export default {
         reportHazardReportDeptTopCollege(obj).then(response => {
           this.$set(this,'formTitleData',response.data);
         });
-        this.$set(this.exportConfig,'api','/report/hazardReport/exportCollege');
+        this.$set(this.exportConfig,'api','/security/hazardReport/exportCollege');
         this.$set(this.exportConfig,'fileName','各单位隐患整改统计');
       }else if(this.identityType == 2 && this.tabsIndex == 1){
         //一级检查项隐患分布-列表表头数据
-        reportHazardReportOneHazardGaugeOutfit().then(response => {
+        reportHazardReportOneHazardGaugeOutfit({checkCategory:this.propsData.checkCategory}).then(response => {
           this.$set(this,'tableTitleList',response.data);
           this.$set(this,'tableShowType',true);
           this.$nextTick(()=>{
@@ -498,48 +539,45 @@ export default {
           }
         });
       }else if(type == 2){
-        //详情
+        //检查明细
+        if (this.identityType == 1){
+          this.$set(this,'minPropsData',{
+            deptId : row.deptId,
+            deptPlanId : this.propsData.planId,
+            title:row.deptName
+          });
+        } else{
+          this.$set(this,'minPropsData',{
+            subId : row.subId,
+            subPlanId : this.propsData.planId,
+            title:row.subName
+          });
+        }
         this.$set(this,'pageType',2);
-        let obj = JSON.parse(JSON.stringify(row))
-        obj.showType = true;
-        this.$set(this,'minPropsData',obj);
       }else if(type == 3){
-        //编辑
-        this.$set(this,'pageType',2);
-        let obj = JSON.parse(JSON.stringify(row))
-        obj.showType = false;
-        this.$set(this,'minPropsData',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();
+        //检查项统计
+        if (this.identityType == 1){
+          this.$set(this,'minPropsData',{
+            deptId : row.deptId,
+            deptPlanId : this.propsData.planId,
+            checkCategory:this.propsData.checkCategory,
+            title:row.deptName
           });
-        }).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();
+        } else{
+          this.$set(this,'minPropsData',{
+            subId : row.subId,
+            subPlanId : this.propsData.planId,
+            checkCategory:this.propsData.checkCategory,
+            title:row.subName
           });
-        }).catch(() => {});
+        }
+        this.$set(this,'pageType',3);
       }else if(type == 6){
         //返回并刷新
         this.$set(this,'pageType',1);
         this.getList();
+        //查询隐患柱状图
+        this.securityHazardReportColumnPicture();
       }
     },
     //学院列表

+ 15 - 10
src/views/safetyCheck/dataStatistics/index.vue

@@ -61,11 +61,11 @@
           <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
           <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
 
-          <p class="page-submit-common-style-button"
-             style="float: right;"
-             @click="tableButton(1)"
+          <!--<p class="page-submit-common-style-button"-->
+             <!--style="float: right;"-->
+             <!--@click="tableButton(1)"-->
 
-          >数据刷新</p>
+          <!--&gt;数据刷新</p>-->
           <el-form-item style="float: right;">
             <export-component :exportConfig="exportConfig"></export-component>
           </el-form-item>
@@ -97,11 +97,11 @@
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                    @click="tableButton(3,scope.row)"
-
+                   v-hasPermiRouter="['report:hazardReport:list']"
                 >隐患统计</p>
                 <p class="table-button-p"
                    @click="tableButton(4,scope.row)"
-
+                   v-hasPermiRouter="['report:hazardItems:list']"
                 >检查项统计</p>
                 <p class="table-button-null"></p>
               </div>
@@ -122,10 +122,12 @@
   </div>
 </template>
 <script>
-import exportComponent from '@/components/exportComponent/exportComponent'
+import exportComponent from "@/views/safetyCheck/components/exportComponent/exportComponent.vue";
 import hiddenDangerStatistics from "./hiddenDangerStatistics.vue";
 import inspectionItemsStatistics from "@/views/safetyCheck/components/inspectionItemsStatistics.vue";
-import { securityDataStatisticsList } from "@/api/safetyCheck/indexDemoOne";
+import {
+  securityDataStatisticsList
+} from "@/api/safetyCheck/index";
 
 
 export default {
@@ -150,7 +152,6 @@ export default {
         fileName:'安全检查-数据统计',                         //导出文件的命名,
         screenData:{},
       },
-      tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
       //页面状态
       pageType:1,
       checkCategory:1,
@@ -267,8 +268,12 @@ export default {
         this.$set(this,'propsData',row);
       }else if(type == 4){
         //检查项统计
+        this.$set(this,'propsData',{
+          planId : row.planId,
+          checkCategory:row.checkCategory,
+          title:row.planTitle,
+        });
         this.$set(this,'pageType',4);
-        this.$set(this,'propsData',row);
       }else if(type == 5){
         //启用&停用
         let text = row.state  ? "停用" : "启用";

+ 0 - 289
src/views/safetyCheck/inspectJob/index.vue

@@ -1,289 +0,0 @@
-<!-- 检查作业 -->
-<template>
-  <div class="app-container inspectJob">
-    <div class="page-container inspectJobPage" v-if="pageType === 1">
-      <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">
-            <p :class="planStatus===''?'p-check':''" @click="tableCheck('')">全部</p>
-            <p :class="planStatus===0?'p-check':''" @click="tableCheck(0)">未提交</p>
-            <p :class="planStatus===1?'p-check':''" @click="tableCheck(1)">已提交</p>
-          </div>
-          <el-form-item label="" prop="deptId">
-            <el-select v-model="queryParams.deptId" placeholder="学院单位" style="width: 200px">
-              <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="queryParamsData1">
-            <el-input
-              maxLength="30"
-              v-model="queryParams.queryParamsData1"
-              placeholder="计划标题"
-              style="width: 200px"
-            />
-          </el-form-item>
-          <el-form-item label="" prop="state">
-            <el-date-picker
-              :clearable="false"
-              v-model="dateRange"
-              size="small"
-              style="width: 240px"
-              value-format="yyyy-MM-dd"
-              type="daterange"
-              range-separator="-"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
-            ></el-date-picker>
-          </el-form-item>
-          <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
-          <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
-          <!--<p class="page-submit-common-style-button"-->
-             <!--style="float: right;"-->
-             <!--@click="tableButton(1)"-->
-          <!--&gt;新增</p>-->
-        </el-form>
-      </div>
-      <div class="page-content-box">
-        <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="200" show-overflow-tooltip/>
-          <el-table-column label="负责人" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="学院单位" prop="content" width="200" show-overflow-tooltip/>
-          <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="state" width="100" show-overflow-tooltip>
-            <template slot-scope="scope">
-
-            </template>
-          </el-table-column>
-          <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 >
-            <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(3,scope.row)"
-
-                >编辑</p>
-                <p class="table-button-p"
-                   @click="tableButton(4,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>
-    <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
-  </div>
-</template>
-<script>
-  import {
-    getDeptDropList,
-  } from '@/api/commonality/permission'
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
-  //import addPage from "./addPage.vue";
-  export default {
-    name: 'index',
-    //components: {
-    //  addPage
-    //},
-    data () {
-      return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
-        //页面状态
-        pageType:1,
-        //计划状态选项卡
-        planStatus:'',
-        //页面遮罩
-        loading:false,
-        //下拉列表数据
-        deptOption:[],
-        //查询条件
-        queryParams:{
-          page:1,
-          pageSize:20,
-          queryParamsData1:"",
-          deptId :null,
-        },
-        //时间数据
-        dateRange:[],
-        //列表数据
-        dataList:[],
-        //数据数量
-        total:0,
-        //组件传参
-        propsData:{},
-      }
-    },
-    created () {
-      this.getDeptDropList();
-    },
-    mounted () {
-      //this.getList();
-    },
-    methods: {
-      //整改状态选项卡切换
-      tableCheck(type){
-        if (this.planStatus !== type){
-          this.$set(this,'planStatus',type);
-          this.resetQuery();
-        }
-      },
-      //查询按钮
-      handleQuery(){
-        this.$set(this.queryParams,'page',1);
-        this.getList();
-      },
-      //重置按钮
-      resetQuery(){
-        this.$set(this,'dateRange',[])
-        this.$set(this,'queryParams',{
-          page:1,
-          pageSize:20,
-          queryParamsData1:"",
-          deptId :null,
-        });
-        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 = "";
-        }
-        getListFunction(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);
-          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(() => {});
-        }else if(type == 6){
-          //返回并刷新
-          this.$set(this,'pageType',1);
-          this.getList();
-        }
-      },//学院下拉列表
-      getDeptDropList(){
-        getDeptDropList({level: 2, deptType: 1 }).then(response => {
-          this.$set(this,'deptOption',response.data);
-        });
-      },
-    },
-  }
-</script>
-<style scoped lang="scss">
-  .inspectJob{
-    .inspectJobPage{
-      .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(3){
-          border-top-right-radius: 4px;
-          border-bottom-right-radius: 4px;
-          /*border-left:none;*/
-        }
-        .p-check{
-          border:1px solid #0183FA;
-          background-color: #0183FA;
-          color:#fff;
-        }
-      }
-    }
-  }
-</style>

+ 2 - 2
src/views/safetyCheck/inspectProject/inspectProjectAccording/addPage.vue

@@ -8,7 +8,7 @@
     <div class="addPage-min safe-book-el-dialog">
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-form-item label="名称" prop="basisName" style="width:498px;">
-          <el-input v-model="form.basisName" placeholder="请输入检查依据模板名称" maxLength="10" style="width:500px;"/>
+          <el-input v-model="form.basisName" placeholder="请输入检查依据模板名称" maxLength="20" style="width:500px;"/>
         </el-form-item>
         <el-form-item label="检查项目" prop="hazardCheckPros" style="width:498px;">
           <div class="form-add-box">
@@ -40,7 +40,7 @@
     securityCheckBasisDetail,
     securityCheckBasisAdd,
     securityCheckBasisUpdate,
-  } from '@/api/safetyCheck/indexDemoOne'
+  } from '@/api/safetyCheck/index'
   import itemCheckComponent from "./itemCheckComponent.vue";
   export default {
     name: "addPage",

+ 8 - 6
src/views/safetyCheck/inspectProject/inspectProjectAccording/index.vue

@@ -41,7 +41,7 @@
           <p class="page-submit-common-style-button"
              style="float: right;"
              @click="tableButton(1)"
-
+             v-hasPermiRouter="['security:basis:add']"
           >新增</p>
         </el-form>
       </div>
@@ -56,17 +56,17 @@
               <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="操作" width="130" show-overflow-tooltip >
+          <el-table-column label="操作" width="130" show-overflow-tooltip v-if="tableButtonType">
             <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)"
-
+                   v-hasPermiRouter="['security:basis:edit']"
                 >编辑</p>
                 <p class="table-button-p"
                    @click="tableButton(4,scope.row)"
-
+                   v-hasPermiRouter="['security:basis:del']"
                 >删除</p>
                 <p class="table-button-null"></p>
               </div>
@@ -88,7 +88,9 @@
 <script>
   //import { getDicts } from "@/api/commonality/noPermission";
   //import { systemUserSelect } from "@/api/commonality/permission";
-  import { securityCheckBasisList,securityCheckBasisDelete } from '@/api/safetyCheck/indexDemoOne'
+  import {
+    securityCheckBasisList,securityCheckBasisDelete
+  } from '@/api/safetyCheck/index'
   import addPage from "./addPage.vue";
   export default {
     name: 'index',
@@ -97,7 +99,7 @@
     },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        tableButtonType:this.hasPermiDom(['security:basis:edit','security:basis:del']),
         //页面状态
         pageType:1,
         //整改状态选项卡

+ 3 - 1
src/views/safetyCheck/inspectProject/inspectProjectAccording/itemCheckComponent.vue

@@ -127,7 +127,9 @@
 </template>
 
 <script>
-  import { securityCheckOptionShuttleList,securityCheckOptionShuttleRightList,securityCheckOptionSelList } from '@/api/safetyCheck/indexDemoOne'
+  import {
+    securityCheckOptionShuttleList,securityCheckOptionShuttleRightList,securityCheckOptionSelList
+  } from '@/api/safetyCheck/index'
   import { getDeptDropList } from '@/api/commonality/permission'
   export default {
     name: 'itemCheckComponent',

+ 17 - 9
src/views/safetyCheck/inspectProject/inspectProjectTable/index.vue

@@ -18,16 +18,16 @@
           <p class="page-inquire-common-style-button" @click="onSearch">查询</p>
           <p class="page-reset-common-style-button" @click="resetForm">重置</p>
         </el-form-item>
-        <el-form-item style="float: right;" >
+        <el-form-item style="float: right;" v-hasPermiRouter="['security:option:add']">
           <p class="page-save-common-style-button" style="width:80px;" @click="addDialogOpen(1)">添加</p>
         </el-form-item>
-        <el-form-item style="float: right;" >
+        <el-form-item style="float: right;" v-hasPermiRouter="['security:option:del']">
           <p class="page-add-common-style-button" style="width:100px;" @click="allDel">批量删除</p>
         </el-form-item>
-        <el-form-item style="float: right;" >
+        <el-form-item style="float: right;"  v-hasPermiRouter="['security:option:export']">
           <export-component :exportConfig="exportConfig"></export-component>
         </el-form-item>
-        <el-form-item style="float: right;" >
+        <el-form-item style="float: right;"  v-hasPermiRouter="['security:option:import']">
           <import-component :importConfig="importConfig"></import-component>
         </el-form-item>
       </el-form>
@@ -44,12 +44,16 @@
         <el-table-column label="序号" prop="code" width="240"/>
         <el-table-column label="检查项目" prop="name"/>
         <el-table-column label="检查要点" prop="mainPoint" width="700" show-overflow-tooltip/>
-        <el-table-column label="操作" width="180">
+        <el-table-column label="操作" width="180" v-if="tableButtonType">
           <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="delItem(scope.row)" >删除</p>
+              <p class="table-button-p"
+                 @click="addDialogOpen(3,scope.row)"
+                 v-hasPermiRouter="['security:option:edit']">编辑</p>
+              <p class="table-button-p"
+                 @click="delItem(scope.row)"
+                 v-hasPermiRouter="['security:option:del']">删除</p>
               <p class="table-button-null"></p>
             </div>
           </template>
@@ -135,10 +139,10 @@
     securityCheckOptionUpdate,
     securityCheckOptionDelete,
     securityCheckOptionBatchDelete,
-  } from '@/api/safetyCheck/indexDemoOne'
+  } from '@/api/safetyCheck/index'
   import { getToken } from "@/utils/auth";
   //            V3
-  import exportComponent from "@/components/exportComponent/exportComponent.vue";
+  import exportComponent from "@/views/safetyCheck/components/exportComponent/exportComponent.vue";
   import importComponent from "@/components/importComponent/importComponent.vue";
   export default {
     name: 'index',
@@ -148,11 +152,13 @@
     },
     data(){
       return{
+        tableButtonType:this.hasPermiDom(['security:option:edit','security:option:del']),
         //导出
         exportConfig:{
           api:'/security/checkOption/export/',             //导出接口地址
           ids:'',                                       //勾选导出,勾选的IDS
           fileName:'项目检查库',                         //导出文件的命名
+          screenData:{},
         },
         //导入
         importConfig:{
@@ -502,6 +508,8 @@
       /** 查询检查项选项列表 */
       getList() {
         this.loading = true;
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        this.$set(this.exportConfig,'screenData',obj);
         securityCheckOptionList(this.queryParams).then( response => {
           this.$set(this,'tableData',JSON.parse(JSON.stringify(response.data)));
           let list = [{

+ 0 - 290
src/views/safetyCheck/inspectReport/index.vue

@@ -1,290 +0,0 @@
-<!-- 检查报告 -->
-<template>
-  <div class="app-container inspectReport">
-    <div class="page-container inspectReportPage" v-if="pageType === 1">
-      <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">
-            <p :class="planStatus===''?'p-check':''" @click="tableCheck('')">全部</p>
-            <p :class="planStatus===0?'p-check':''" @click="tableCheck(0)">未提交</p>
-            <p :class="planStatus===1?'p-check':''" @click="tableCheck(1)">已提交</p>
-          </div>
-          <el-form-item label="" prop="deptId">
-            <el-select v-model="queryParams.deptId" placeholder="学院单位" style="width: 200px">
-              <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="queryParamsData1">
-            <el-input
-              maxLength="30"
-              v-model="queryParams.queryParamsData1"
-              placeholder="计划标题"
-              style="width: 200px"
-            />
-          </el-form-item>
-          <el-form-item label="" prop="state">
-            <el-date-picker
-              :clearable="false"
-              v-model="dateRange"
-              size="small"
-              style="width: 240px"
-              value-format="yyyy-MM-dd"
-              type="daterange"
-              range-separator="-"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
-            ></el-date-picker>
-          </el-form-item>
-          <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
-          <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
-          <p class="page-submit-common-style-button"
-             style="float: right;"
-             @click="tableButton(1)"
-
-          >批量提交</p>
-        </el-form>
-      </div>
-      <div class="page-content-box">
-        <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="200" show-overflow-tooltip/>
-          <el-table-column label="负责人" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="学院单位" prop="content" width="200" show-overflow-tooltip/>
-          <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="state" width="100" show-overflow-tooltip>
-            <template slot-scope="scope">
-
-            </template>
-          </el-table-column>
-          <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 >
-            <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(3,scope.row)"
-
-                >编辑</p>
-                <p class="table-button-p"
-                   @click="tableButton(4,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>
-    <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
-  </div>
-</template>
-<script>
-  import {
-    getDeptDropList,
-  } from '@/api/commonality/permission'
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
-  //import addPage from "./addPage.vue";
-  export default {
-    name: 'index',
-    //components: {
-    //  addPage
-    //},
-    data () {
-      return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
-        //页面状态
-        pageType:1,
-        //计划状态选项卡
-        planStatus:'',
-        //页面遮罩
-        loading:false,
-        //下拉列表数据
-        deptOption:[],
-        //查询条件
-        queryParams:{
-          page:1,
-          pageSize:20,
-          queryParamsData1:"",
-          deptId :null,
-        },
-        //时间数据
-        dateRange:[],
-        //列表数据
-        dataList:[],
-        //数据数量
-        total:0,
-        //组件传参
-        propsData:{},
-      }
-    },
-    created () {
-      this.getDeptDropList();
-    },
-    mounted () {
-      //this.getList();
-    },
-    methods: {
-      //整改状态选项卡切换
-      tableCheck(type){
-        if (this.planStatus !== type){
-          this.$set(this,'planStatus',type);
-          this.resetQuery();
-        }
-      },
-      //查询按钮
-      handleQuery(){
-        this.$set(this.queryParams,'page',1);
-        this.getList();
-      },
-      //重置按钮
-      resetQuery(){
-        this.$set(this,'dateRange',[])
-        this.$set(this,'queryParams',{
-          page:1,
-          pageSize:20,
-          queryParamsData1:"",
-          deptId :null,
-        });
-        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 = "";
-        }
-        getListFunction(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);
-          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(() => {});
-        }else if(type == 6){
-          //返回并刷新
-          this.$set(this,'pageType',1);
-          this.getList();
-        }
-      },
-      getDeptDropList(){
-        getDeptDropList({level: 2, deptType: 1 }).then(response => {
-          this.$set(this,'deptOption',response.data);
-        });
-      },
-    },
-  }
-</script>
-<style scoped lang="scss">
-  .inspectReport{
-    .inspectReportPage{
-      .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(3){
-          border-top-right-radius: 4px;
-          border-bottom-right-radius: 4px;
-          /*border-left:none;*/
-        }
-        .p-check{
-          border:1px solid #0183FA;
-          background-color: #0183FA;
-          color:#fff;
-        }
-      }
-    }
-  }
-</style>

+ 27 - 25
src/views/safetyCheck/inspectSupervisorGroup/addPage.vue

@@ -85,14 +85,11 @@
 </template>
 
 <script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
   import {
     securityCheckGroupDetail,
     securityCheckGroupUpdate,
     securityCheckGroupAdd,
-  } from "@/api/safetyCheck/indexDemoOne";
+  } from "@/api/safetyCheck/index";
   import {
     getDeptDropList,
     systemUserDetail,
@@ -143,30 +140,41 @@
     },
     created(){
       this.initialize();
-      this.systemDeptGetLoginUserByDeptList()
     },
     mounted(){
 
     },
     methods:{
-      initialize(){
-        if(this.propsData.showType){
-          this.$set(this,'lookInfoType',true);
-          this.securityCheckGroupDetail();
-        }else{
-          this.$set(this,'lookInfoType',false);
-          if(this.propsData.groupId){
-            //编辑
-            this.securityCheckGroupDetail();
-          }else{
-            //新增
-            this.systemUserDetail();
-          }
-        }
+      /** 查询二级单位列表/初始化 */
+      initialize() {
+        systemDeptGetLoginUserByDeptList({}).then(response => {
+          this.$set(this, 'deptOptions', response.data)
+          this.$set(this.newData, 'deptId', response.data[0].deptId)
+          this.$set(this.newData, 'deptName', response.data[0].deptName)
+          this.$nextTick(()=>{
+            if(this.propsData.showType){
+              this.$set(this,'lookInfoType',true);
+              this.securityCheckGroupDetail();
+            }else{
+              this.$set(this,'lookInfoType',false);
+              if(this.propsData.groupId){
+                //编辑
+                this.securityCheckGroupDetail();
+              }else{
+                //新增
+                this.systemUserDetail();
+              }
+            }
+          })
+        })
       },
       tableButton(type,data,index){
         let self = this;
         if(type == 1){
+          if(self.newData.checkGroupMemberList.length>50){
+            this.msgError('督导组最大成员数量为50人')
+            return
+          }
           //编辑
           this.$set(this,'userCheckComponentData',JSON.parse(JSON.stringify(self.newData.checkGroupMemberList)));
           this.$set(this,'userCheckComponentType',true);
@@ -246,12 +254,6 @@
           this.$set(this,'newData',response.data);
         });
       },
-      /** 查询二级单位列表 */
-      systemDeptGetLoginUserByDeptList() {
-        systemDeptGetLoginUserByDeptList({}).then(response => {
-          this.$set(this, 'deptOptions', response.data)
-        })
-      },
       /** 获取用户详情 */
       systemUserDetail() {
         systemUserDetail({ userId: localStorage.getItem('userId') }).then(response => {

+ 10 - 12
src/views/safetyCheck/inspectSupervisorGroup/index.vue

@@ -46,7 +46,7 @@
           <p class="page-submit-common-style-button"
              style="float: right;width:130px"
              @click="tableButton(1)"
-
+             v-hasPermiRouter="['security:group:add']"
           >创建督导组</p>
         </el-form>
       </div>
@@ -84,15 +84,14 @@
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                    @click="tableButton(2,scope.row)"
-
                 >查看</p>
                 <p class="table-button-p"
                    @click="tableButton(3,scope.row)"
-
+                   v-hasPermiRouter="['security:group:edit']"
                 >编辑</p>
                 <p class="table-button-p"
                    @click="tableButton(4,scope.row)"
-
+                   v-hasPermiRouter="['security:group:del']"
                 >删除</p>
                 <p class="table-button-null"></p>
               </div>
@@ -116,9 +115,9 @@
     securityCheckGroupList,
     securityCheckGroupEnable,
     securityCheckGroupDelete,
-  } from "@/api/safetyCheck/indexDemoOne";
+  } from "@/api/safetyCheck/index";
   import {
-    getDeptDropList,
+    systemDeptGetLoginUserByDeptList,
   } from '@/api/commonality/permission'
   import addPage from "./addPage.vue";
   export default {
@@ -128,7 +127,6 @@
     },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
         //页面状态
         pageType:1,
         //页面遮罩
@@ -156,7 +154,7 @@
       }
     },
     created () {
-      this.getDeptDropList()
+      this.systemDeptGetLoginUserByDeptList()
     },
     mounted () {
       this.getList();
@@ -221,14 +219,14 @@
             type: "warning"
           }).then(function() {
           }).then(() => {
-            deleteFunction({id:row.id}).then(response => {
+            securityCheckGroupDelete({groupId:row.groupId}).then(response => {
               self.msgSuccess(response.message)
               self.getList();
             });
           }).catch(() => {});
         }else if(type == 5){
           //启用&停用
-          let text = row.enable  ? "启用" : "停用";
+          let text = row.enable  ? "停用" : "启用";
           this.$confirm('是否确认' + text + '?', "警告", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
@@ -247,8 +245,8 @@
         }
       },
       /** 查询二级单位列表 */
-      getDeptDropList() {
-        getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
+      systemDeptGetLoginUserByDeptList() {
+        systemDeptGetLoginUserByDeptList({ deptName: '', level: 2, deptType: 1 }).then(response => {
           this.$set(this, 'deptOptions', response.data)
         })
       },

+ 8 - 2
src/views/safetyCheck/inspectSupervisorGroup/userCheckComponent.vue

@@ -84,7 +84,7 @@
               </el-form-item>
             </el-form>
             <el-table class="table-box" ref="rightUserTable" border :data="userTableListRight" @selection-change="userChangeRight" :row-key="getRowKeys">
-              <el-table-column v-if="editType" type="selection" width="50" :reserve-selection="true" align="center"/>
+              <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
               <el-table-column label="姓名" align="center" prop="userName" show-overflow-tooltip/>
               <el-table-column label="工号" align="center" prop="account" show-overflow-tooltip width="150"/>
               <el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="270"/>
@@ -109,7 +109,9 @@
 </template>
 
 <script>
-  import { findUserList } from "@/api/safetyCheck/indexDemoOne";
+  import {
+    findUserList
+  } from "@/api/safetyCheck/index";
   import { getDeptDropList } from '@/api/commonality/permission'
   export default {
     name: 'userCheckComponent',
@@ -191,6 +193,10 @@
           this.msgError('请勾选人员')
           return
         }
+        if(this.userTotalRight>50){
+          this.msgError('督导组最大成员数量为50人')
+          return
+        }
         this.$parent.tableButton(5,this.selectedUserIds)
       },
       /*===================================人员选择相关===================================*/

+ 50 - 50
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,25 @@
       <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="subName" width="220" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.subName}}{{scope.row.roomNum?'('+scope.row.roomNum+')':''}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="整改期限" prop="rectifyDeadline" width="160" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.rectifyDeadline}}</span>
+              <span style="color:red;margin-left:10px;">{{scope.row.isDeadline?'已逾期':''}}</span>
+            </template>
+          </el-table-column>
+          <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,19 +139,30 @@
               <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>
+              <span>{{ scope.row.examineResult ==1 ?'复查完毕':(scope.row.examineResult ==0 ?'退回整改':'') }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="操作" width="100" show-overflow-tooltip >
+          <el-table-column label="操作" width="120" show-overflow-tooltip >
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
+                   v-if="scope.row.isRectify"
+                   @click="tableButton(1,scope.row)"
+                   v-hasPermiRouter="['security:danger:rectify']"
+                >整改</p>
+                <p class="table-button-p"
+                   v-if="!scope.row.isRectify&&!scope.row.finishRectify"
+                   @click="tableButton(3,scope.row)"
+                   v-hasPermiRouter="['security:danger:rectify']"
+                >编辑</p>
+                <p class="table-button-p"
+                   v-if="!scope.row.isRectify"
                    @click="tableButton(2,scope.row)"
 
-                >详情/整改</p>
+                >详情</p>
                 <p class="table-button-null"></p>
               </div>
             </template>
@@ -157,7 +177,7 @@
         />
       </div>
     </div>
-    <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
+    <initiateInspect v-if="pageType == 2" :initiateInspectData="initiateInspectData"></initiateInspect>
   </div>
 </template>
 <script>
@@ -168,16 +188,15 @@
   import {
     securityCheckOptionList,
     securityCheckDangerList,
-  } from "@/api/safetyCheck/indexDemoOne";
-  //import addPage from "./addPage.vue";
+  } from "@/api/safetyCheck/index";
+  import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
   export default {
     name: 'index',
-    //components: {
-    //  addPage
-    //},
+    components: {
+      initiateInspect
+    },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
         //页面状态
         pageType:1,
         //选项卡状态
@@ -204,13 +223,12 @@
         },
         //时间数据
         dateRange:[],
-        advancedType:false,
         //列表数据
         dataList:[],
         //数据数量
         total:0,
         //组件传参
-        propsData:{},
+        initiateInspectData:{},
       }
     },
     created () {
@@ -272,48 +290,30 @@
       tableButton(type,row){
         let self = this;
         if(type == 1){
-          //新增
+          //整改
           this.$set(this,'pageType',2);
-          this.$set(this,'propsData',{});
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = false;
+          obj.orderTitle = '隐患整改';
+          obj.orderType = '3';
+          this.$set(this,'initiateInspectData',obj);
         }else if(type == 2){
           //详情
           this.$set(this,'pageType',2);
           let obj = JSON.parse(JSON.stringify(row))
           obj.showType = true;
-          this.$set(this,'propsData',obj);
+          obj.orderTitle = '整改详情';
+          obj.orderType = '4';
+          this.$set(this,'initiateInspectData',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 = '3';
+          obj.editType = true;
+          this.$set(this,'initiateInspectData',obj);
         }else if(type == 6){
           //返回并刷新
           this.$set(this,'pageType',1);

+ 169 - 137
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:120px;">
               <el-option
                 v-for="dict in optionList"
                 :key="dict.value"
@@ -19,61 +19,61 @@
               />
             </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" v-if="checkCategory==1">
+            <el-select v-model="queryParams.deptId" placeholder="学院单位" style="width:120px;">
               <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-form-item label="" prop="typeId" v-if="checkCategory==2">
+            <el-select v-model="queryParams.typeId" placeholder="安全分类" style="width:120px;">
               <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
+                v-for="dict in classOption"
+                :key="dict.typeId"
+                :label="dict.typeName"
+                :value="dict.typeId"
               />
             </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="levelId" v-if="checkCategory==2">
+            <el-select v-model="queryParams.levelId" placeholder="安全分级" style="width:120px;">
               <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" v-if="checkCategory==2">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
+              v-model="queryParams.searchValue"
               placeholder="实验室/房间号"
-              :style="schoolStanding?'width:185px':'width:175px'"
+              style="width:120px;"
             />
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
+          <el-form-item label="" prop="adminName" v-if="checkCategory==2">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
+              v-model="queryParams.adminName"
               placeholder="实验室负责人"
-              :style="schoolStanding?'width:185px':'width:170px'"
+              style="width:120px;"
             />
           </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:120px;"
             />
           </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 +86,56 @@
               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="120"  show-overflow-tooltip>
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+              <div class="table-button-box">
+                <p class="table-button-p" style="margin:0!important;"
+                   @click="tableButton(1,scope.row)"
+                >{{scope.row.noticeNum}}</p>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="学院单位" prop="deptName" width="180" show-overflow-tooltip v-if="checkCategory==1">
+            <template slot-scope="scope">
+              <span>{{scope.row.deptName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="实验室" prop="subName" width="240" show-overflow-tooltip v-if="checkCategory==2">
+            <template slot-scope="scope">
+              <span>{{scope.row.subName}}{{scope.row.roomNum?' ('+scope.row.roomNum+')':''}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="整改期限" prop="createTime" width="130" show-overflow-tooltip>
+          <el-table-column label="实验室负责人" prop="adminName" width="120" show-overflow-tooltip v-if="checkCategory==2">
+            <template slot-scope="scope">
+              <span>{{scope.row.adminName}}</span>
+            </template>
+          </el-table-column>
+          <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="160" 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="state" width="100" show-overflow-tooltip>
+          <el-table-column label="整改期限" prop="rectifyDeadline" width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-
+              <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>
+            <template slot-scope="scope">
+              {{scope.row.rectifyStatus?'已完成':'未完成'}}
             </template>
           </el-table-column>
           <el-table-column label="操作" width="200" show-overflow-tooltip >
@@ -132,15 +143,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 +169,68 @@
       </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,
+    laboratoryClassLevelGetList,
+    laboratoryClassTypeGetList,
+  } from '@/api/commonality/permission'
+  import {
+    securityRectifyNoticeList,
+  } from "@/api/safetyCheck/index";
   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:[],
+        //分级
+        levelOption:[],
+        //分类
+        classOption:[],
         //查询条件
         queryParams:{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          rectifyStatus:null,
+          planTitle:"",
+          deptId :null,
+          typeId :null,
+          levelId :null,
+          searchValue:'',
+          adminName:'',
         },
         //时间数据
         dateRange:[],
-        //搜索模式切换
-        advancedType:false,
-        //校级身份
-        schoolStanding:true,
         //校院级状态
-        schoolCollegeType:1,
+        checkCategory:1,
         //列表数据
         dataList:[],
         //数据数量
@@ -203,30 +239,26 @@
         ids:[],
         //组件传参
         propsData:{},
+        propsNoticeDomType:false,
+        propsNoticeDomData:{},
       }
     },
     created () {
-
+      this.getDeptDropList();
+      this.laboratoryClassLevelGetList();
+      this.laboratoryClassTypeGetList();
     },
     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 +270,13 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          rectifyStatus:null,
+          planTitle:"",
+          deptId :null,
+          typeId :null,
+          levelId :null,
+          searchValue:'',
+          adminName:'',
         });
         this.getList();
       },
@@ -255,7 +291,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 +302,42 @@
       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,
+            noticeNum:row.noticeNum,
+          })
+          this.$set(this,'propsNoticeDomType',true)
         }else if(type == 2){
-          //详情
+          //整改情况
+          this.$set(this,'propsData',{
+            noticeId:row.noticeId
+          });
           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(() => {});
         }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 +352,31 @@
           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);
+        });
+      },
+      //分级下拉列表
+      laboratoryClassLevelGetList(){
+        laboratoryClassLevelGetList({}).then(response => {
+          this.$set(this,'levelOption',response.data);
+        });
+      },
+      //分类下拉列表
+      laboratoryClassTypeGetList(){
+        laboratoryClassTypeGetList({}).then(response => {
+          this.$set(this,'classOption',response.data);
+        });
       },
     },
   }

+ 186 - 140
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,60 +149,71 @@
         </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/index";
+  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: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 +229,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 +250,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 +261,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>

+ 187 - 122
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:120px;">
               <el-option
                 v-for="dict in optionList"
                 :key="dict.value"
@@ -19,51 +19,61 @@
               />
             </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" v-if="checkCategory==1">
+            <el-select v-model="queryParams.deptId" placeholder="学院单位" style="width:140px;">
               <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:170px':'width:205px'">
+          <el-form-item label="" prop="typeId" v-if="checkCategory==2">
+            <el-select v-model="queryParams.typeId" placeholder="安全分类" style="width:120px;">
               <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
+                v-for="dict in classOption"
+                :key="dict.typeId"
+                :label="dict.typeName"
+                :value="dict.typeId"
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData1">
+          <el-form-item label="" prop="levelId" v-if="checkCategory==2">
+            <el-select v-model="queryParams.levelId" placeholder="安全分级" style="width:120px;">
+              <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" v-if="checkCategory==2">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
+              v-model="queryParams.searchValue"
               placeholder="实验室/房间号"
-              :style="schoolStanding?'width:170px':'width:205px'"
+              style="width:120px;"
             />
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
+          <el-form-item label="" prop="adminName" v-if="checkCategory==2">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
+              v-model="queryParams.adminName"
               placeholder="实验室负责人"
-              :style="schoolStanding?'width:170px':'width:205px'"
+              style="width:120px;"
             />
           </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:170px':'width:205px'"
+              style="width:120px;"
             />
           </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 +86,71 @@
               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="120"  show-overflow-tooltip>
+            <template slot-scope="scope">
+              <div class="table-button-box">
+                <p class="table-button-p" style="margin:0!important;"
+                   @click="tableButton(1,scope.row)"
+                >{{scope.row.reportNum}}</p>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="学院单位" prop="deptName" width="180" show-overflow-tooltip v-if="checkCategory==1">
+            <template slot-scope="scope">
+              <span>{{scope.row.deptName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="实验室" prop="subName" width="240" show-overflow-tooltip v-if="checkCategory==2">
+            <template slot-scope="scope">
+              <span>{{scope.row.subName}}{{scope.row.roomNum?' ('+scope.row.roomNum+')':''}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="实验室负责人" prop="adminName" width="120" show-overflow-tooltip v-if="checkCategory==2">
+            <template slot-scope="scope">
+              <span>{{scope.row.adminName}}</span>
+            </template>
+          </el-table-column>
+          <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,44 +167,70 @@
         />
       </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,
+    laboratoryClassLevelGetList,
+    laboratoryClassTypeGetList,
+  } from '@/api/commonality/permission'
+  import {
+    securityRectifyReportList,
+    securityRectifyReportUpdate
+  } from "@/api/safetyCheck/index";
+  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',]),
         //页面状态
         pageType:1,
         //页面遮罩
         loading:false,
-        //下拉列表数据
-        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        //状态下拉列表
+        optionList:[{value:0,label:'未提交'},{value:1,label:'已提交'}],
+        //学院列表
+        deptOption:[],
+        //分级
+        levelOption:[],
+        //分类
+        classOption:[],
         //查询条件
         queryParams:{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          isApprove:null,
+          planTitle:"",
+          deptId :null,
+          typeId :null,
+          levelId :null,
+          searchValue:'',
+          adminName:'',
         },
         //时间数据
         dateRange:[],
-        //搜索模式切换
-        advancedType:false,
-        //校级身份
-        schoolStanding:true,
         //校院级状态
-        schoolCollegeType:1,
+        checkCategory:1,
         //列表数据
         dataList:[],
         //数据数量
@@ -183,30 +239,26 @@
         ids:[],
         //组件传参
         propsData:{},
+        propsReportDomData:{},
+        propsReportDomType:false,
       }
     },
     created () {
-
+      this.getDeptDropList();
+      this.laboratoryClassLevelGetList();
+      this.laboratoryClassTypeGetList();
     },
     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 +270,13 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          isApprove:null,
+          planTitle:"",
+          deptId :null,
+          typeId :null,
+          levelId :null,
+          searchValue:'',
+          adminName:'',
         });
         this.getList();
       },
@@ -235,7 +291,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 +302,55 @@
       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,
+            reportNum:row.reportNum,
+          })
+          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('是否确认删除?', "警告", {
+          //提交
+          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 => {
+            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 +365,31 @@
           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);
+        });
+      },
+      //分级下拉列表
+      laboratoryClassLevelGetList(){
+        laboratoryClassLevelGetList({}).then(response => {
+          this.$set(this,'levelOption',response.data);
+        });
+      },
+      //分类下拉列表
+      laboratoryClassTypeGetList(){
+        laboratoryClassTypeGetList({}).then(response => {
+          this.$set(this,'classOption',response.data);
+        });
       },
     },
   }

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

@@ -0,0 +1,437 @@
+<!--整改情况-->
+<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="160" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.rectifyDeadline}}</span>
+                <span style="color:red;margin-left:10px;">{{scope.row.isDeadline?'已逾期':''}}</span>
+              </template>
+            </el-table-column>
+            <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/index";
+  import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
+  export default {
+    name: 'listPage',
+    components: {
+      initiateInspect
+    },
+    props:{
+      propsData:{},
+    },
+    data(){
+      return{
+        //页面状态
+        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>

+ 49 - 48
src/views/safetyCheck/safetyHazard/selfInspectionHazard/index.vue

@@ -110,16 +110,25 @@
       <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="subName" width="220" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.subName}}{{scope.row.roomNum?'('+scope.row.roomNum+')':''}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="整改期限" prop="rectifyDeadline" width="160" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.rectifyDeadline}}</span>
+              <span style="color:red;margin-left:10px;">{{scope.row.isDeadline?'已逾期':''}}</span>
+            </template>
+          </el-table-column>
+          <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,19 +139,30 @@
               <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>
+              <span>{{ scope.row.examineResult ==1 ?'复查完毕':(scope.row.examineResult ==0 ?'退回整改':'') }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="操作" width="100" show-overflow-tooltip >
+          <el-table-column label="操作" width="120" show-overflow-tooltip >
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
+                   v-if="scope.row.isRectify"
+                   @click="tableButton(1,scope.row)"
+                   v-hasPermiRouter="['security:danger:selfRectify']"
+                >整改</p>
+                <p class="table-button-p"
+                   v-if="!scope.row.isRectify&&!scope.row.finishRectify"
+                   @click="tableButton(3,scope.row)"
+                   v-hasPermiRouter="['security:danger:selfRectify']"
+                >编辑</p>
+                <p class="table-button-p"
+                   v-if="!scope.row.isRectify"
                    @click="tableButton(2,scope.row)"
 
-                >详情/整改</p>
+                >详情</p>
                 <p class="table-button-null"></p>
               </div>
             </template>
@@ -157,7 +177,7 @@
         />
       </div>
     </div>
-    <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
+    <initiateInspect v-if="pageType == 2" :initiateInspectData="initiateInspectData"></initiateInspect>
   </div>
 </template>
 <script>
@@ -168,16 +188,15 @@
   import {
     securityCheckOptionList,
     securityCheckDangerList,
-  } from "@/api/safetyCheck/indexDemoOne";
-  //import addPage from "./addPage.vue";
+  } from "@/api/safetyCheck/index";
+  import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
   export default {
     name: 'index',
-    //components: {
-    //  addPage
-    //},
+    components: {
+      initiateInspect
+    },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
         //页面状态
         pageType:1,
         //选项卡状态
@@ -210,7 +229,7 @@
         //数据数量
         total:0,
         //组件传参
-        propsData:{},
+        initiateInspectData:{},
       }
     },
     created () {
@@ -272,48 +291,30 @@
       tableButton(type,row){
         let self = this;
         if(type == 1){
-          //新增
+          //整改
           this.$set(this,'pageType',2);
-          this.$set(this,'propsData',{});
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = false;
+          obj.orderTitle = '隐患整改';
+          obj.orderType = '3';
+          this.$set(this,'initiateInspectData',obj);
         }else if(type == 2){
           //详情
           this.$set(this,'pageType',2);
           let obj = JSON.parse(JSON.stringify(row))
           obj.showType = true;
-          this.$set(this,'propsData',obj);
+          obj.orderTitle = '整改详情';
+          obj.orderType = '4';
+          this.$set(this,'initiateInspectData',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 = '3';
+          obj.editType = true;
+          this.$set(this,'initiateInspectData',obj);
         }else if(type == 6){
           //返回并刷新
           this.$set(this,'pageType',1);

+ 8 - 3
src/views/safetyCheck/safetyHazard/snapshotHazard/index.vue

@@ -108,7 +108,11 @@
       <div class="page-content-box" style="padding-top:0;">
         <el-table class="table-box" ref="tableBox" v-loading="loading" border :data="dataList" @sort-change="sortChange">
           <el-table-column label="序号" type="index" width="60"/>
-          <el-table-column label="实验室" prop="subName" width="220" show-overflow-tooltip/>
+          <el-table-column label="实验室" prop="subName" width="220" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.subName}}{{scope.row.subRoom?'('+scope.row.subRoom+')':''}}</span>
+            </template>
+          </el-table-column>
           <el-table-column label="学院单位" prop="deptName" width="150" show-overflow-tooltip/>
           <el-table-column label="实验室负责人" prop="adminName" width="130" show-overflow-tooltip/>
           <el-table-column label="上报人" prop="createName" width="100" show-overflow-tooltip/>
@@ -166,7 +170,9 @@
     laboratoryClassLevelGetList,
     laboratoryClassTypeGetList,
   } from '@/api/commonality/permission'
-  import { securityCheckPhotoList } from "@/api/safetyCheck/indexDemoOne";
+  import {
+    securityCheckPhotoList
+  } from "@/api/safetyCheck/index";
   import snapshotInfo from "@/views/safetyCheck/components/snapshotInfo.vue";
   export default {
     name: 'index',
@@ -175,7 +181,6 @@
     },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
         //页面状态
         pageType:1,
         //选项卡状态

+ 105 - 26
src/views/safetyCheck/schoolInspect/inspectManage/index.vue

@@ -31,7 +31,7 @@
             </div>
             <div class="left-list-box">
               <div class="left-list-for-box" v-if="bigIndex == leftBigCheckType"
-                   @click="leftCheckButton(index)"
+                   @click="leftCheckButton(index,bigIndex)"
                    :class="index == leftCheckType ? 'check-left-list-for-box':''"
                    v-for="(item,index) in bigItem.checkPlanSetVoList" :key="index">
                 <div class="left-list-text-box">
@@ -76,15 +76,24 @@
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="buildId">
-              <el-select v-model="queryParams.buildId" placeholder="楼栋" style="width:150px;">
-                <el-option
-                  v-for="dict in buildOption"
-                  :key="dict.id"
-                  :label="dict.name"
-                  :value="dict.id"
-                />
-              </el-select>
+            <el-form-item label="" prop="floorId">
+              <!--<el-select v-model="queryParams.floorId" placeholder="楼栋" style="width:150px;">-->
+                <!--<el-option-->
+                  <!--v-for="dict in buildOption"-->
+                  <!--:key="dict.id"-->
+                  <!--:label="dict.name"-->
+                  <!--:value="dict.id"-->
+                <!--/>-->
+              <!--</el-select>-->
+              <el-cascader
+                style="width: 150px"
+                placeholder="楼栋"
+                v-model="queryParams.floorId"
+                filterable
+                :show-all-levels="false"
+                :options="buildOption"
+                :props="{ value: 'id', label: 'name',emitPath:false }"
+              ></el-cascader>
             </el-form-item>
             <el-form-item label="" prop="typeId" v-if="advancedType">
               <el-select v-model="queryParams.typeId" placeholder="安全分类" style="width:175px;">
@@ -122,26 +131,37 @@
         <div class="page-conten-box page-content-right-bottom-box">
           <el-table class="table-box" v-loading="loading" border :data="dataList">
             <el-table-column label="序号" type="index" width="60"/>
-            <el-table-column label="实验室" prop="subName"  show-overflow-tooltip/>
+            <el-table-column label="实验室" prop="subName"  show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span>{{scope.row.subName}}{{scope.row.roomNum?'('+scope.row.roomNum+')':''}}</span>
+              </template>
+            </el-table-column>
             <el-table-column label="检查状态" prop="manageStatus" width="150" show-overflow-tooltip>
               <template slot-scope="scope">
-                <span>{{scope.row.manageStatus==0?'待检查':(scope.row.manageStatus==1?'检查中':(scope.row.manageStatus==2?'已检查':''))}}</span>
+                <span :class="scope.row.manageStatus==0?'colorA':(scope.row.manageStatus==1?'colorB':(scope.row.manageStatus==2?'colorC':''))">
+                  {{scope.row.manageStatus==0?'待检查':(scope.row.manageStatus==1?'检查中':(scope.row.manageStatus==2?'已检查':''))}}
+                </span>
               </template>
             </el-table-column>
             <el-table-column label="检查人" prop="checkUserNames" width="230" show-overflow-tooltip/>
-            <el-table-column label="操作" width="180" show-overflow-tooltip >
+            <el-table-column label="操作" width="240" 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)"
-
+                     v-hasPermiRouter="['security:checkSetOption:list']"
                   >检查项</p>
                   <p class="table-button-p"
-                     v-if='scope.row.manageStatus!=2'
+                     v-if='scope.row.manageStatus !=2'
                      @click="tableButton(2,scope.row)"
-
-                  >开始检查</p>
+                     v-hasPermiRouter="['security:checkPlan:detail']"
+                  >检查</p>
+                  <p class="table-button-p"
+                     v-if='scope.row.manageStatus !=2'
+                     @click="tableButton(3,scope.row)"
+                     v-hasPermiRouter="['security:checkSetOption:batch']"
+                  >检查完成</p>
                   <p class="table-button-null"></p>
                 </div>
               </template>
@@ -171,7 +191,8 @@
   import {
     securityCheckPlanTitleList,
     securityCheckManageList,
-  } from '@/api/safetyCheck/indexDemoOne'
+    securityCheckSetOptionFinishCheck,
+  } from '@/api/safetyCheck/index'
   import checkItem from "@/views/safetyCheck/components/checkItem.vue";
   import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
   export default {
@@ -182,7 +203,6 @@
     },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
         //页面状态
         pageType:1,
         //复查状态选项卡
@@ -211,7 +231,7 @@
           pageSize:20,
           myRelated:1,
           deptId:null,
-          buildId:null,
+          floorId:null,
           typeId :null,
           levelId :null,
           searchValue:'',
@@ -229,6 +249,7 @@
         leftBigCheckType:"0",
         leftCheckType:"0",
         leftListData:[],
+        checkSetProgress:0,
         //检查组件
         initiateInspectData:{},
       }
@@ -258,13 +279,15 @@
         if(this.leftBigCheckType !== index){
           this.$set(this,'leftBigCheckType',index);
           this.$set(this,'leftCheckType',0);
+          this.$set(this,'checkSetProgress',this.leftListData[index].checkPlanSetVoList[0].checkSetProgress);
           this.resetQuery();
         }
       },
       //左侧计划子级切换
-      leftCheckButton(index){
+      leftCheckButton(index,bigIndex){
         if(this.leftCheckType !== index){
           this.$set(this,'leftCheckType',index);
+          this.$set(this,'checkSetProgress',this.leftListData[bigIndex].checkPlanSetVoList[index].checkSetProgress);
           this.resetQuery();
         }
       },
@@ -291,7 +314,7 @@
           page:1,
           pageSize:20,
           deptId:null,
-          buildId:null,
+          floorId:null,
           typeId :null,
           levelId :null,
           searchValue:'',
@@ -306,6 +329,16 @@
           this.$set(this,'leftBigCheckType',0);
           this.$set(this,'leftCheckType',0);
           this.resetQuery();
+          if(response.data.records[0]){
+            this.$set(this,'checkSetProgress',this.leftListData[0].checkPlanSetVoList[0].checkSetProgress);
+          }
+        });
+      },
+      getTitleListTwo(){
+        securityCheckPlanTitleList(this.leftQueryParams).then(response => {
+          this.$set(this,'leftListData',response.data.records);
+          this.$set(this,'titleTotal',response.data.total);
+          this.getList();
         });
       },
       //获取数据列表
@@ -322,7 +355,7 @@
           pageSize:this.queryParams.pageSize,
           manageStatus:this.tableButtonCheckType,
           deptId:this.queryParams.deptId,
-          buildId:this.queryParams.buildId,
+          floorId:this.queryParams.floorId,
         }
         if(this.advancedType){
           obj.searchValue = this.queryParams.searchValue;
@@ -343,19 +376,36 @@
           this.$set(this,'pageType',2);
           let obj = JSON.parse(JSON.stringify(row))
           obj.showType = true;
+          obj.pageType = 1;
+          obj.checkSetProgress = this.checkSetProgress;
           this.$set(this,'propsData',obj);
         }else if(type == 2){
           //开始检查
           this.$set(this,'pageType',3);
           let obj = JSON.parse(JSON.stringify(row))
           obj.freeChoiceType = true;
-          obj.processType = 'inspect';
           obj.showType = false;
+          obj.orderTitle = '开始检查';
+          obj.orderType = '1';
           this.$set(this,'initiateInspectData',obj);
+        }else if(type == 3){
+          //批量完成
+          this.$confirm(`是否确认检查完成?`, "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(async () => {
+            securityCheckSetOptionFinishCheck({manageId:row.manageId }).then(response => {
+              self.msgSuccess(response.message)
+              self.getTitleListTwo();
+            });
+          }).catch(() => {
+
+          })
         }else if(type == 6){
           //返回并刷新
           this.$set(this,'pageType',1);
-          this.getList();
+          this.getTitleListTwo();
         }
       },
       /*********************************** 学院/楼栋/分类/分级 ***********************************/
@@ -368,7 +418,19 @@
       //楼栋下拉列表
       systemBuildingGetOptList(){
         systemBuildingGetOptList({}).then(response => {
-          this.$set(this,'buildOption',response.data);
+          let list = this.handleTree(response.data);
+          pushNode(list)
+          function pushNode(list){
+            for(let i=0;i<list.length;i++){
+              if(!list[i].children && list[i].type!= 3){
+                list.splice(i,1)
+                i--
+              }if(list[i].children){
+                pushNode(list[i].children)
+              }
+            }
+          }
+          this.$set(this,'buildOption',list);
         });
       },
       //分级下拉列表
@@ -449,6 +511,11 @@
                     height:30px;
                     line-height: 30px;
                     font-size:16px;
+                    /*单行省略号*/
+                    display:block;
+                    overflow:hidden;
+                    text-overflow:ellipsis;
+                    white-space:nowrap;
                   }
                   p:nth-child(2){
                     color:#666666;
@@ -457,6 +524,9 @@
                 .left-list-progress-box{
                   flex:1;
                   padding-top:15px;
+                  ::v-deep .el-progress-bar{
+                    margin-right: -62px;
+                  }
                 }
               }
               .check-left-list-for-box{
@@ -486,6 +556,15 @@
           overflow: hidden;
           flex:1;
           padding:0 20px 20px;
+          .colorA{
+            color:#FA4A04;
+          }
+          .colorB{
+            color:#0484FA;
+          }
+          .colorC{
+            color:#039C06;
+          }
         }
       }
       .table-school-college-toggle-box{

+ 14 - 12
src/views/safetyCheck/schoolInspect/inspectProject/index.vue

@@ -55,7 +55,8 @@
           <p class="page-submit-common-style-button"
              style="float: right;"
              @click="tableButton(1)"
-
+             v-if="adminIdentity == 'school'"
+             v-hasPermiRouter="['security:checkPlan:add']"
           >创建计划</p>
         </el-form>
       </div>
@@ -99,20 +100,20 @@
                 <p class="table-button-p"
                    v-if="scope.row.planStatus!=0"
                    @click="tableButton(2,scope.row)"
-
                 >详情</p>
                 <p class="table-button-p"
-                   v-if="scope.row.planStatus==0"
+                   v-if="scope.row.planStatus==0&&adminIdentity=='school'"
                    @click="tableButton(3,scope.row)"
-
+                   v-hasPermiRouter="['security:checkPlan:edit']"
                 >编辑</p>
                 <p class="table-button-p"
                    @click="tableButton(5,scope.row)"
 
                 >检查明细</p>
                 <p class="table-button-p"
+                   v-if="scope.row.planStatus==0&&adminIdentity=='school'"
                    @click="tableButton(4,scope.row)"
-
+                   v-hasPermiRouter="['security:checkPlan:del']"
                 >删除</p>
                 <p class="table-button-null"></p>
               </div>
@@ -135,7 +136,8 @@
 <script>
   import {
     securityCheckPlanList,
-  } from '@/api/safetyCheck/indexDemoOne'
+    securityCheckPlanDelete,
+  } from '@/api/safetyCheck/index'
   import projectAddPage from "@/views/safetyCheck/components/projectAddPage.vue";
   import inspectStatistics from "@/views/safetyCheck/components/inspectStatistics.vue";
   export default {
@@ -146,7 +148,7 @@
     },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        adminIdentity: localStorage.getItem('adminIdentity'),
         //页面状态
         pageType:1,
         //计划状态选项卡
@@ -257,18 +259,18 @@
             type: "warning"
           }).then(function() {
           }).then(() => {
-            deleteFunction({id:row.id}).then(response => {
+            securityCheckPlanDelete({planId:row.planId}).then(response => {
               self.msgSuccess(response.message)
               self.getList();
             });
           }).catch(() => {});
         }else if(type == 5){
           //检查明细
+          this.$set(this,'propsData',{
+            planId : row.planId,
+            title:row.planTitle
+          });
           this.$set(this,'pageType',5);
-          let obj = JSON.parse(JSON.stringify(row))
-          obj.showType = true;
-          obj.rank = 'school';
-          this.$set(this,'propsData',obj);
         }else if(type == 6){
           //返回并刷新
           this.$set(this,'pageType',1);

+ 390 - 155
src/views/safetyCheck/schoolInspect/reviewManage/index.vue

@@ -6,82 +6,71 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
           <div class="table-school-college-toggle-box">
-            <p :class="tableButtonCheckType==1?'p-check':''" @click="tableCheck(1)">全部</p>
-            <p :class="tableButtonCheckType==2?'p-check':''" @click="tableCheck(2)">待复查</p>
-            <p :class="tableButtonCheckType==3?'p-check':''" @click="tableCheck(3)">已复查</p>
+            <p :class="reviewStatus==null?'p-check':''" @click="tableCheck(null)">全部</p>
+            <p :class="reviewStatus==0?'p-check':''" @click="tableCheck(0)">待复查</p>
+            <p :class="reviewStatus==1?'p-check':''" @click="tableCheck(1)">已复查</p>
           </div>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="检查类型" style="width:170px;">
-              <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: 150px"
+            />
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="学院单位" style="width:190px;">
-              <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: 150px"
+              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="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="楼栋" style="width:190px;">
-              <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
+          <el-form-item label="" prop="hazardCheckName">
+            <el-input
+              maxLength="30"
+              v-model="queryParams.hazardCheckName"
+              placeholder="模糊搜索检查指标项"
+              style="width: 170px"
+            />
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2" v-if="advancedType">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="安全分类" style="width:170px;">
+          <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"
+                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" v-if="advancedType">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="安全分级" style="width:170px;">
+          <el-form-item label="" prop="levelId">
+            <el-select v-model="queryParams.levelId" placeholder="安全分级" style="width: 180px">
               <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" v-if="advancedType">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
+              v-model="queryParams.searchValue"
               placeholder="实验室/房间号"
-              style="width:170px;"
-            />
-          </el-form-item>
-          <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
-            <el-input
-              maxLength="30"
-              v-model="queryParams.queryParamsData1"
-              placeholder="计划标题"
-              style="width:170px;"
+              style="width: 200px"
             />
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
+          <el-form-item label="" prop="rectifyName" v-if="advancedType">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
-              placeholder="查人"
-              style="width:170px;"
+              v-model="queryParams.rectifyName"
+              placeholder="复查人"
+              style="width: 200px"
             />
           </el-form-item>
           <el-form-item label="" prop="state" v-if="advancedType">
@@ -89,7 +78,7 @@
               :clearable="false"
               v-model="dateRange"
               size="small"
-              style="width: 240px"
+              style="width: 280px"
               value-format="yyyy-MM-dd"
               type="daterange"
               range-separator="-"
@@ -97,15 +86,6 @@
               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>
@@ -114,24 +94,34 @@
       <div class="page-content-box">
         <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="100" show-overflow-tooltip/>
-          <el-table-column label="检查名称" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="检查项目" prop="content" width="260" show-overflow-tooltip/>
-          <el-table-column label="实验室" prop="content" width="165" show-overflow-tooltip/>
-          <el-table-column label="检查人" prop="content" width="80" show-overflow-tooltip/>
-          <el-table-column label="复查人" prop="content" width="80" show-overflow-tooltip/>
-          <el-table-column label="复查状态" prop="state" width="80" show-overflow-tooltip>
+          <el-table-column label="计划标题" prop="planTitle"  show-overflow-tooltip/>
+          <el-table-column label="检查类型" prop="checkTypeName" width="100" show-overflow-tooltip/>
+          <el-table-column label="检查名称" prop="checkName" width="100" show-overflow-tooltip/>
+          <el-table-column label="检查项目" prop="hazardCheckCode" width="260" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.hazardCheckCode}} {{scope.row.hazardCheckName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="实验室" prop="subName" width="165" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.subName}}{{scope.row.roomNum?'('+scope.row.roomNum+')':''}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="检查人" prop="createName" width="80" show-overflow-tooltip/>
+          <el-table-column label="复查人" prop="reviewName" width="80" show-overflow-tooltip/>
+          <el-table-column label="复查状态" prop="reviewStatus" width="80" 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="state" width="80" show-overflow-tooltip>
+          <el-table-column label="复查结果" prop="examineResult" width="80" show-overflow-tooltip>
             <template slot-scope="scope">
+              <span>{{scope.row.examineResult == 1?'复查完毕':(scope.row.examineResult == 0?'退回整改':'')}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="复查时间" prop="createTime" width="160" show-overflow-tooltip>
+          <el-table-column label="复查时间" prop="reviewTime" width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+              <span>{{ parseTime(scope.row.reviewTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
           <el-table-column label="操作" width="130" show-overflow-tooltip >
@@ -139,16 +129,18 @@
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
-                   @click="tableButton(2,scope.row)"
-
+                   v-if="scope.row.reviewButtion && scope.row.isReviewer"
+                   @click="tableButton(1,scope.row)"
+                   v-hasPermiRouter="['security:review:add']"
                 >复查</p>
                 <p class="table-button-p"
-                   @click="tableButton(3,scope.row)"
-
-                >编辑</p>
+                   v-if="!scope.row.reviewButtion"
+                   @click="tableButton(2,scope.row)"
+                >详情</p>
                 <p class="table-button-p"
-                   @click="tableButton(4,scope.row)"
-
+                   v-if="scope.row.isAdmin"
+                   @click="tableButton(3,scope.row)"
+                   v-hasPermiRouter="['security:review:edit']"
                 >转移</p>
                 <p class="table-button-null"></p>
               </div>
@@ -164,37 +156,91 @@
         />
       </div>
     </div>
-    <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
+    <el-dialog class="reviewManage-dialog" title='复查人转移' width="745px" append-to-body
+               :visible.sync="dialogType" v-if="dialogType" @close="dialogOff()"
+               :close-on-click-modal="false" :close-on-press-escape="false">
+      <div class="reviewManage-dialog-max-box">
+        <p class="reviewManage-dialog-name">{{dialogGroupName}}</p>
+        <div class="reviewManage-dialog-box">
+          <img src="@/assets/ZDimages/safetyCheck/icon_xyxc_cy.png">
+          <p>成员列表</p>
+        </div>
+        <el-table class="table-box table-null-img-20" border :data="dialogDataList">
+          <el-table-column label="" align="center" width="150">
+            <template scope="scope">
+              <div class="check-img-box" v-if="dialogUserId != scope.row.userId"
+                   @click="tableColumnCheck(scope.row)">
+                <img src="@/assets/ZDimages/basicsModules/icon_fcrzy_wxz@1x.png" v-if="scope.row.userId != reviewUserid">
+                <img src="@/assets/ZDimages/basicsModules/icon_fcrzy_xz@1x.png" v-if="scope.row.userId == reviewUserid">
+              </div>
+              <p v-if="dialogUserId == scope.row.userId" style="text-align: center!important;">负责人</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="姓名" prop="userName" show-overflow-tooltip/>
+          <el-table-column label="工号" prop="account" width="130" show-overflow-tooltip/>
+          <el-table-column label="所在部门" prop="deptName" width="188" show-overflow-tooltip/>
+        </el-table>
+        <pagination :page-sizes="[20, 30, 40, 50]"
+                    v-show="dialogTotal>0"
+                    :total="dialogTotal"
+                    :page.sync="dialogQueryParams.page"
+                    :limit.sync="dialogQueryParams.pageSize"
+                    @pagination="securityCheckDangerGetMemberList"
+        />
+      </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>
+    <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 addPage from "./addPage.vue";
+  import {
+    getDeptDropList,
+    laboratoryClassLevelGetList,
+  } from '@/api/commonality/permission'
+  import {
+    securityCheckOptionList,
+    securityCheckDangerReviewList,
+    securityCheckDangerGetMemberInfo,
+    securityCheckDangerGetMemberList,
+    securityCheckDangerUpdateByReview,
+  } from "@/api/safetyCheck/index";
+  import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
   export default {
     name: 'index',
-    //components: {
-    //  addPage
-    //},
+    components: {
+      initiateInspect
+    },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
         //页面状态
         pageType:1,
         //复查状态选项卡
-        tableButtonCheckType:1,
+        reviewStatus:null,
         //页面遮罩
         loading:false,
-        //下拉列表数据
-        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        //学院列表
+        deptOption:[],
+        //分级下拉列表
+        levelOption:[],
+        //检查项下拉列表
+        cascaderData:[],
         //查询条件
         queryParams:{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          planTitle:"",
+          hazardCheckPro :null,
+          hazardCheckName:"",
+          deptId :null,
+          levelId :null,
+          searchValue:"",
+          rectifyName:"",
         },
         //时间数据
         dateRange:[],
@@ -205,20 +251,35 @@
         //数据数量
         total:0,
         //组件传参
-        propsData:{},
+        initiateInspectData:{},
+        //复查转移
+        dialogGroupName:'',
+        dialogUserId:'',
+        dialogQueryParams:{
+          page:1,
+          pageSize:20,
+        },
+        dialogDataList:[],
+        dialogTotal:0,
+        dialogType:false,
+        dialogDangerId:'',
+        reviewUserid:null,
+        reviewName:null
       }
     },
     created () {
-
+      this.getDeptDropList();
+      this.laboratoryClassLevelGetList();
+      this.securityCheckOptionList();
     },
     mounted () {
-      //this.getList();
+      this.getList();
     },
     methods: {
       //复查状态选项卡切换
       tableCheck(type){
-        if (this.tableButtonCheckType !== type){
-          this.$set(this,'tableButtonCheckType',type);
+        if (this.reviewStatus !== type){
+          this.$set(this,'reviewStatus',type);
           this.resetQuery();
         }
       },
@@ -226,11 +287,6 @@
       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);
@@ -242,9 +298,13 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          myRelated:1,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          planTitle:"",
+          hazardCheckPro :null,
+          hazardCheckName:"",
+          deptId :null,
+          levelId :null,
+          searchValue:"",
+          rectifyName:"",
         });
         this.getList();
       },
@@ -252,14 +312,29 @@
       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 = "";
+        let data = {
+          checkCategory:1,
+          reviewStatus:this.reviewStatus,
+          page:obj.page,
+          pageSize:obj.pageSize,
+          planTitle:obj.planTitle,
+          hazardCheckPro:obj.hazardCheckPro,
+          hazardCheckName:obj.hazardCheckName,
+          deptId:obj.deptId,
+          levelId:obj.levelId,
+        };
+        if(this.advancedType){
+          data.searchValue = obj.searchValue;
+          data.rectifyName = obj.rectifyName;
+          if(this.dateRange[0]){
+            data.startTime = this.dateRange[0]+'T00:00:00'
+            data.endTime = this.dateRange[1]+'T23:59:59'
+          }else{
+            data.startTime = "";
+            data.endTime = "";
+          }
         }
-        getListFunction(obj).then(response => {
+        securityCheckDangerReviewList(data).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
@@ -269,54 +344,163 @@
       tableButton(type,row){
         let self = this;
         if(type == 1){
-          //新增
+          //整改
           this.$set(this,'pageType',2);
-          this.$set(this,'propsData',{});
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = false;
+          obj.orderTitle = '复查验证';
+          obj.orderType = '5';
+          this.$set(this,'initiateInspectData',obj);
         }else if(type == 2){
           //详情
           this.$set(this,'pageType',2);
           let obj = JSON.parse(JSON.stringify(row))
           obj.showType = true;
-          this.$set(this,'propsData',obj);
+          obj.orderTitle = '复查详情';
+          obj.orderType = '6';
+          this.$set(this,'initiateInspectData',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(() => {});
+          //转移
+          this.$set(this.dialogQueryParams,'page',1);
+          this.$set(this,'dialogDangerId',row.dangerId);
+          this.securityCheckDangerGetMemberInfo(row.dangerId);
         }else if(type == 6){
           //返回并刷新
           this.$set(this,'pageType',1);
           this.getList();
         }
       },
+      //督导组信息查询
+      securityCheckDangerGetMemberInfo(dangerId){
+        securityCheckDangerGetMemberInfo({dangerId:dangerId}).then(response => {
+          this.$set(this,'dialogGroupName',response.data.groupName);
+          this.$set(this,'dialogUserId',response.data.userId);
+          this.$nextTick(()=>{
+            this.securityCheckDangerGetMemberList(dangerId);
+          })
+        });
+      },
+      //督导组人员查询
+      securityCheckDangerGetMemberList(dangerId){
+        let obj = JSON.parse(JSON.stringify(this.dialogQueryParams))
+        obj.dangerId = dangerId;
+        securityCheckDangerGetMemberList(obj).then(response => {
+          this.$set(this,'dialogDataList',response.data.records);
+          this.$set(this,'dialogTotal',response.data.total);
+          this.$nextTick(()=>{
+            if(!this.dialogType){
+              this.dialogOpen();
+            }
+          })
+        });
+      },
+      /******** 转移弹窗 ********/
+      //弹层关闭
+      dialogOff(){
+        this.$set(this,'dialogType',false);
+      },
+      //弹层开启
+      dialogOpen(){
+        this.$set(this,'reviewUserid',null);
+        this.$set(this,'dialogType',true);
+      },
+      //弹层确定
+      dialogSubmit(){
+        if(!this.reviewUserid){
+          this.msgError('请选择复查转移人')
+          return
+        }
+        let obj = {
+          dangerId:this.dialogDangerId,
+          reviewUserid:this.reviewUserid,
+          reviewName:this.reviewName,
+        };
+        securityCheckDangerUpdateByReview(obj).then(response => {
+          this.msgSuccess(response.message)
+          this.$set(this,'dialogType',false);
+          this.getList();
+        });
+      },
+      tableColumnCheck(row) {
+        if(this.reviewUserid != row.userId){
+          this.$set(this,'reviewUserid',row.userId);
+          this.$set(this,'reviewName',row.userName);
+        }
+      },
+      //学院列表
+      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>
@@ -395,3 +579,54 @@
     }
   }
 </style>
+<style lang="scss">
+  .reviewManage-dialog{
+    .el-dialog__body{
+      padding-top: 0;
+    }
+    .reviewManage-dialog-max-box{
+      height:500px;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+      flex:1;
+      .reviewManage-dialog-name{
+        line-height:70px;
+        height:70px;
+        font-size:16px;
+      }
+      .reviewManage-dialog-box{
+        display: flex;
+        border:1px solid #dedede;
+        border-bottom:none;
+        height:40px;
+        img{
+          width:14px;
+          height:14px;
+          display: inline-block;
+          margin:13px 15px;
+        }
+        p:nth-child(2){
+          flex:1;
+          font-size:14px;
+          line-height:40px;
+          color:#333;
+        }
+      }
+      .check-img-box{
+        cursor: pointer;
+        height:27px;
+        width:130px;
+        margin:0 auto;
+        overflow: hidden;
+        img{
+          overflow: hidden;
+          height:20px;
+          width:20px;
+          display: inline-block;
+          margin:3px 55px;
+        }
+      }
+    }
+  }
+</style>

+ 0 - 0
src/views/safetyCheck/schoolWorktable/annualHiddenDistribution.vue


Some files were not shown because too many files changed in this diff