ylyx-cli 1.0.14 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. package/README.md +4 -0
  2. package/bin/ylyx.js +168 -168
  3. package/lib/config.js +283 -299
  4. package/lib/deploy.js +529 -415
  5. package/lib/generator.js +192 -192
  6. package/lib/index.js +113 -113
  7. package/lib/interactive.js +87 -87
  8. package/lib/remote.js +179 -179
  9. package/lib/template.js +174 -174
  10. package/lib/utils.js +148 -148
  11. package/package.json +5 -5
  12. package/templates/react-app/files/README.md +23 -23
  13. package/templates/react-app/files/package.json +28 -28
  14. package/templates/react-app/files/public/index.html +11 -11
  15. package/templates/react-app/files/src/App.css +15 -15
  16. package/templates/react-app/files/src/App.js +15 -15
  17. package/templates/react-app/files/src/index.css +10 -10
  18. package/templates/react-app/files/src/index.js +11 -11
  19. package/templates/react-app/template.json +11 -11
  20. package/templates/react-component/files/Component.module.css +5 -5
  21. package/templates/react-component/files/Component.tsx +31 -31
  22. package/templates/react-component/files/index.ts +2 -2
  23. package/templates/react-component/template.json +48 -48
  24. package/templates/vue-app/files/.editorconfig +14 -14
  25. package/templates/vue-app/files/.env.development +21 -21
  26. package/templates/vue-app/files/.env.production +18 -18
  27. package/templates/vue-app/files/.eslintignore +5 -5
  28. package/templates/vue-app/files/.eslintrc.js +267 -267
  29. package/templates/vue-app/files/.prettierignore +11 -11
  30. package/templates/vue-app/files/.travis.yml +5 -5
  31. package/templates/vue-app/files/.vscode/extensions.json +7 -7
  32. package/templates/vue-app/files/.vscode/settings.json +39 -39
  33. package/templates/vue-app/files/LICENSE +191 -191
  34. package/templates/vue-app/files/README.md +87 -87
  35. package/templates/vue-app/files/babel.config.js +11 -11
  36. package/templates/vue-app/files/jest.config.js +24 -24
  37. package/templates/vue-app/files/package.json +136 -136
  38. package/templates/vue-app/files/plopfile.js +7 -7
  39. package/templates/vue-app/files/postcss.config.js +5 -5
  40. package/templates/vue-app/files/public/default.js +25 -25
  41. package/templates/vue-app/files/public/index.html +26 -26
  42. package/templates/vue-app/files/src/App.vue +54 -54
  43. package/templates/vue-app/files/src/api/bigDataV/index.js +198 -198
  44. package/templates/vue-app/files/src/api/data.js +42 -42
  45. package/templates/vue-app/files/src/api/dataArchive/index.js +186 -186
  46. package/templates/vue-app/files/src/api/generator/genConfig.js +16 -16
  47. package/templates/vue-app/files/src/api/generator/generator.js +32 -32
  48. package/templates/vue-app/files/src/api/indexManagement/index.js +39 -39
  49. package/templates/vue-app/files/src/api/institutionMonitor/index.js +396 -396
  50. package/templates/vue-app/files/src/api/institutionSet/index.js +120 -120
  51. package/templates/vue-app/files/src/api/login.js +44 -44
  52. package/templates/vue-app/files/src/api/selfStatistics/index.js +50 -50
  53. package/templates/vue-app/files/src/api/system/code.js +15 -15
  54. package/templates/vue-app/files/src/api/system/dict.js +34 -34
  55. package/templates/vue-app/files/src/api/system/dictDetail.js +52 -52
  56. package/templates/vue-app/files/src/api/system/equipment.js +35 -35
  57. package/templates/vue-app/files/src/api/system/examManage.js +49 -49
  58. package/templates/vue-app/files/src/api/system/examProject.js +48 -48
  59. package/templates/vue-app/files/src/api/system/hosModel.js +35 -35
  60. package/templates/vue-app/files/src/api/system/hospital.js +88 -88
  61. package/templates/vue-app/files/src/api/system/job.js +40 -40
  62. package/templates/vue-app/files/src/api/system/menu.js +67 -67
  63. package/templates/vue-app/files/src/api/system/model.js +42 -42
  64. package/templates/vue-app/files/src/api/system/risConfig.js +9 -9
  65. package/templates/vue-app/files/src/api/system/role.js +64 -64
  66. package/templates/vue-app/files/src/api/system/sysSet.js +19 -19
  67. package/templates/vue-app/files/src/api/system/timing.js +41 -41
  68. package/templates/vue-app/files/src/api/system/user.js +121 -121
  69. package/templates/vue-app/files/src/api/tools/alipay.js +25 -25
  70. package/templates/vue-app/files/src/api/tools/email.js +24 -24
  71. package/templates/vue-app/files/src/api/tools/localStorage.js +27 -27
  72. package/templates/vue-app/files/src/api/tools/qiniu.js +40 -40
  73. package/templates/vue-app/files/src/assets/css/font-awesome.css +2342 -2342
  74. package/templates/vue-app/files/src/assets/css/font-awesome.min.css +2336 -2336
  75. package/templates/vue-app/files/src/assets/fonts/fontawesome-webfont.svg +2671 -2671
  76. package/templates/vue-app/files/src/assets/icons/index.js +9 -9
  77. package/templates/vue-app/files/src/assets/icons/svg/hospital.svg +1 -1
  78. package/templates/vue-app/files/src/assets/icons/svg/hospital1.svg +1 -1
  79. package/templates/vue-app/files/src/assets/icons/svg/loginOne.svg +35 -35
  80. package/templates/vue-app/files/src/assets/icons/svg/loginOneWhite.svg +19 -19
  81. package/templates/vue-app/files/src/assets/icons/svg/loginOr.svg +93 -93
  82. package/templates/vue-app/files/src/assets/icons/svg/loginUp.svg +96 -96
  83. package/templates/vue-app/files/src/assets/icons/svg/monitor.svg +1 -1
  84. package/templates/vue-app/files/src/assets/icons/svg/offline.svg +1 -1
  85. package/templates/vue-app/files/src/assets/icons/svg/online.svg +1 -1
  86. package/templates/vue-app/files/src/assets/icons/svg/system.svg +1 -1
  87. package/templates/vue-app/files/src/assets/icons/svgo.yml +21 -21
  88. package/templates/vue-app/files/src/assets/styles/btn.scss +103 -103
  89. package/templates/vue-app/files/src/assets/styles/eladmin.scss +124 -124
  90. package/templates/vue-app/files/src/assets/styles/element-ui.scss +217 -217
  91. package/templates/vue-app/files/src/assets/styles/element-variables.scss +31 -31
  92. package/templates/vue-app/files/src/assets/styles/global.scss +73 -73
  93. package/templates/vue-app/files/src/assets/styles/index.scss +220 -220
  94. package/templates/vue-app/files/src/assets/styles/mixin.scss +60 -60
  95. package/templates/vue-app/files/src/assets/styles/publicStyle.scss +224 -224
  96. package/templates/vue-app/files/src/assets/styles/sidebar.scss +239 -239
  97. package/templates/vue-app/files/src/assets/styles/transition.scss +48 -48
  98. package/templates/vue-app/files/src/assets/styles/variables.scss +44 -44
  99. package/templates/vue-app/files/src/common/flexible.js +145 -145
  100. package/templates/vue-app/files/src/components/Breadcrumb/index.vue +87 -87
  101. package/templates/vue-app/files/src/components/Crud/CRUD.operation.vue +248 -248
  102. package/templates/vue-app/files/src/components/Crud/Pagination.vue +20 -20
  103. package/templates/vue-app/files/src/components/Crud/RR.operation.vue +39 -39
  104. package/templates/vue-app/files/src/components/Crud/UD.operation.vue +106 -106
  105. package/templates/vue-app/files/src/components/Crud/crud.js +907 -907
  106. package/templates/vue-app/files/src/components/Crud/user/UR.operation.vue +154 -154
  107. package/templates/vue-app/files/src/components/DateRangePicker/index.vue +42 -42
  108. package/templates/vue-app/files/src/components/DateRangePickerProhibitNext/index.vue +42 -42
  109. package/templates/vue-app/files/src/components/DateRangePickerProhibitTodayNext/index.vue +48 -48
  110. package/templates/vue-app/files/src/components/Dict/Dict.js +31 -31
  111. package/templates/vue-app/files/src/components/Dict/index.js +29 -29
  112. package/templates/vue-app/files/src/components/Doc/index.vue +16 -16
  113. package/templates/vue-app/files/src/components/Echarts/BarChart.vue +115 -115
  114. package/templates/vue-app/files/src/components/Echarts/Category.vue +768 -768
  115. package/templates/vue-app/files/src/components/Echarts/Funnel.vue +120 -120
  116. package/templates/vue-app/files/src/components/Echarts/Gauge.vue +74 -74
  117. package/templates/vue-app/files/src/components/Echarts/Graph.vue +101 -101
  118. package/templates/vue-app/files/src/components/Echarts/HeatMap.vue +301 -301
  119. package/templates/vue-app/files/src/components/Echarts/Line3D.vue +110 -110
  120. package/templates/vue-app/files/src/components/Echarts/PieChart.vue +84 -84
  121. package/templates/vue-app/files/src/components/Echarts/Point.vue +161 -161
  122. package/templates/vue-app/files/src/components/Echarts/RadarChart.vue +123 -123
  123. package/templates/vue-app/files/src/components/Echarts/Rich.vue +160 -160
  124. package/templates/vue-app/files/src/components/Echarts/Sankey.vue +114 -114
  125. package/templates/vue-app/files/src/components/Echarts/Scatter.vue +192 -192
  126. package/templates/vue-app/files/src/components/Echarts/Sunburst.vue +127 -127
  127. package/templates/vue-app/files/src/components/Echarts/ThemeRiver.vue +233 -233
  128. package/templates/vue-app/files/src/components/Echarts/WordCloud.vue +201 -201
  129. package/templates/vue-app/files/src/components/GithubCorner/index.vue +55 -55
  130. package/templates/vue-app/files/src/components/Hamburger/index.vue +44 -44
  131. package/templates/vue-app/files/src/components/HeaderSearch/index.vue +196 -196
  132. package/templates/vue-app/files/src/components/IconSelect/index.vue +74 -74
  133. package/templates/vue-app/files/src/components/IconSelect/requireIcons.js +10 -10
  134. package/templates/vue-app/files/src/components/Iframe/index.vue +30 -30
  135. package/templates/vue-app/files/src/components/JavaEdit/index.vue +78 -78
  136. package/templates/vue-app/files/src/components/Pagination/index.vue +100 -100
  137. package/templates/vue-app/files/src/components/PanThumb/index.vue +149 -149
  138. package/templates/vue-app/files/src/components/ParentView/index.vue +3 -3
  139. package/templates/vue-app/files/src/components/Permission/index.js +13 -13
  140. package/templates/vue-app/files/src/components/Permission/permission.js +21 -21
  141. package/templates/vue-app/files/src/components/RightPanel/index.vue +149 -149
  142. package/templates/vue-app/files/src/components/Screenfull/index.vue +60 -60
  143. package/templates/vue-app/files/src/components/SizeSelect/index.vue +60 -60
  144. package/templates/vue-app/files/src/components/SvgIcon/index.vue +66 -66
  145. package/templates/vue-app/files/src/components/ThemePicker/index.vue +177 -177
  146. package/templates/vue-app/files/src/components/UploadExcel/index.vue +149 -149
  147. package/templates/vue-app/files/src/components/WaterMark/setWaterMark.js +68 -68
  148. package/templates/vue-app/files/src/components/WaterMark/waterMark.vue +69 -69
  149. package/templates/vue-app/files/src/components/Xgplayer/index.vue +49 -49
  150. package/templates/vue-app/files/src/components/YamlEdit/index.vue +81 -81
  151. package/templates/vue-app/files/src/layout/components/AppMain.vue +67 -67
  152. package/templates/vue-app/files/src/layout/components/Navbar.vue +209 -209
  153. package/templates/vue-app/files/src/layout/components/Settings/index.vue +125 -125
  154. package/templates/vue-app/files/src/layout/components/Sidebar/FixiOSBug.js +26 -26
  155. package/templates/vue-app/files/src/layout/components/Sidebar/Item.vue +29 -29
  156. package/templates/vue-app/files/src/layout/components/Sidebar/Link.vue +35 -35
  157. package/templates/vue-app/files/src/layout/components/Sidebar/Logo.vue +93 -93
  158. package/templates/vue-app/files/src/layout/components/Sidebar/SidebarItem.vue +104 -104
  159. package/templates/vue-app/files/src/layout/components/Sidebar/index.vue +79 -79
  160. package/templates/vue-app/files/src/layout/components/TagsView/ScrollPane.vue +90 -90
  161. package/templates/vue-app/files/src/layout/components/TagsView/index.vue +299 -299
  162. package/templates/vue-app/files/src/layout/components/index.js +5 -5
  163. package/templates/vue-app/files/src/layout/index.vue +119 -119
  164. package/templates/vue-app/files/src/layout/mixin/ResizeHandler.js +45 -45
  165. package/templates/vue-app/files/src/main.js +89 -89
  166. package/templates/vue-app/files/src/mixins/crud.js +348 -348
  167. package/templates/vue-app/files/src/router/index.js +156 -156
  168. package/templates/vue-app/files/src/router/routers.js +203 -203
  169. package/templates/vue-app/files/src/settings.js +57 -57
  170. package/templates/vue-app/files/src/store/getters.js +29 -29
  171. package/templates/vue-app/files/src/store/index.js +25 -25
  172. package/templates/vue-app/files/src/store/modules/api.js +33 -33
  173. package/templates/vue-app/files/src/store/modules/app.js +55 -55
  174. package/templates/vue-app/files/src/store/modules/permission.js +79 -79
  175. package/templates/vue-app/files/src/store/modules/register.js +17 -17
  176. package/templates/vue-app/files/src/store/modules/settings.js +46 -46
  177. package/templates/vue-app/files/src/store/modules/tagsView.js +168 -168
  178. package/templates/vue-app/files/src/store/modules/user.js +119 -119
  179. package/templates/vue-app/files/src/utils/auth.js +18 -18
  180. package/templates/vue-app/files/src/utils/base64ToFile.js +27 -27
  181. package/templates/vue-app/files/src/utils/clipboard.js +36 -36
  182. package/templates/vue-app/files/src/utils/datetime.js +289 -289
  183. package/templates/vue-app/files/src/utils/getBlobFile.js +10 -10
  184. package/templates/vue-app/files/src/utils/getTime.js +29 -29
  185. package/templates/vue-app/files/src/utils/index.js +520 -520
  186. package/templates/vue-app/files/src/utils/permission.js +29 -29
  187. package/templates/vue-app/files/src/utils/pinyin.js +450 -450
  188. package/templates/vue-app/files/src/utils/request.js +139 -139
  189. package/templates/vue-app/files/src/utils/rsaEncrypt.js +37 -37
  190. package/templates/vue-app/files/src/utils/shortcuts.js +210 -210
  191. package/templates/vue-app/files/src/utils/upload.js +12 -12
  192. package/templates/vue-app/files/src/utils/validate.js +262 -262
  193. package/templates/vue-app/files/src/views/components/Echarts.vue +124 -124
  194. package/templates/vue-app/files/src/views/components/Editor.vue +75 -75
  195. package/templates/vue-app/files/src/views/components/MarkDown.vue +44 -44
  196. package/templates/vue-app/files/src/views/components/UVideo.vue +37 -37
  197. package/templates/vue-app/files/src/views/components/YamlEdit.vue +206 -206
  198. package/templates/vue-app/files/src/views/components/camera/camera.vue +115 -115
  199. package/templates/vue-app/files/src/views/components/camera/cameraTest.vue +158 -158
  200. package/templates/vue-app/files/src/views/components/excel/upload-excel.vue +41 -41
  201. package/templates/vue-app/files/src/views/components/icons/element-icons.js +74 -74
  202. package/templates/vue-app/files/src/views/components/icons/index.vue +106 -106
  203. package/templates/vue-app/files/src/views/components/icons/svg-icons.js +10 -10
  204. package/templates/vue-app/files/src/views/components/scroll/index.vue +107 -107
  205. package/templates/vue-app/files/src/views/components/scrollFull/index.vue +99 -99
  206. package/templates/vue-app/files/src/views/dashboard/LineChart.vue +138 -138
  207. package/templates/vue-app/files/src/views/dashboard/PanelGroup.vue +173 -173
  208. package/templates/vue-app/files/src/views/dashboard/mixins/resize.js +57 -57
  209. package/templates/vue-app/files/src/views/dataArchive/delTable.vue +354 -354
  210. package/templates/vue-app/files/src/views/dataArchive/exportDetail.vue +121 -121
  211. package/templates/vue-app/files/src/views/dataArchive/exportList.vue +160 -160
  212. package/templates/vue-app/files/src/views/dataArchive/index.vue +2104 -2104
  213. package/templates/vue-app/files/src/views/features/401.vue +83 -83
  214. package/templates/vue-app/files/src/views/features/404.vue +226 -226
  215. package/templates/vue-app/files/src/views/features/redirect.vue +12 -12
  216. package/templates/vue-app/files/src/views/generator/config.vue +348 -348
  217. package/templates/vue-app/files/src/views/generator/index.vue +143 -143
  218. package/templates/vue-app/files/src/views/generator/preview.vue +39 -39
  219. package/templates/vue-app/files/src/views/home.vue +80 -80
  220. package/templates/vue-app/files/src/views/indexManagement/index.vue +422 -422
  221. package/templates/vue-app/files/src/views/indexManagement/other.vue +286 -286
  222. package/templates/vue-app/files/src/views/institutionMonitor/components/LineChart.vue +191 -191
  223. package/templates/vue-app/files/src/views/institutionMonitor/index.scss +339 -339
  224. package/templates/vue-app/files/src/views/institutionMonitor/index.vue +1385 -1385
  225. package/templates/vue-app/files/src/views/institutionMonitor/mixins/resize.js +57 -57
  226. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/checkProjectCode.vue +267 -267
  227. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/imageAbnormalMonitor.vue +361 -361
  228. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/index.vue +686 -686
  229. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/leakageAnomaly.vue +270 -270
  230. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/moveMonitore.vue +114 -114
  231. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/qualityMonitore.vue +338 -338
  232. package/templates/vue-app/files/src/views/institutionSet/cloudSet.vue +534 -534
  233. package/templates/vue-app/files/src/views/institutionSet/index.vue +2550 -2550
  234. package/templates/vue-app/files/src/views/login.vue +243 -243
  235. package/templates/vue-app/files/src/views/qualityLogin.vue +280 -280
  236. package/templates/vue-app/files/src/views/selfStatistics/components/LineChart.vue +296 -296
  237. package/templates/vue-app/files/src/views/selfStatistics/hospitalDetail/index.vue +533 -533
  238. package/templates/vue-app/files/src/views/selfStatistics/index.scss +447 -447
  239. package/templates/vue-app/files/src/views/selfStatistics/index.vue +903 -903
  240. package/templates/vue-app/files/src/views/selfStatistics/mixins/resize.js +57 -57
  241. package/templates/vue-app/files/src/views/selfStatistics/monitorDetail/index.vue +285 -285
  242. package/templates/vue-app/files/src/views/selfStatistics/offlineDetail/index.vue +104 -104
  243. package/templates/vue-app/files/src/views/selfStatistics/selfActiveDetail/index.vue +104 -104
  244. package/templates/vue-app/files/src/views/selfStatistics/selfMonitorDetail/index.vue +420 -420
  245. package/templates/vue-app/files/src/views/selfStatistics/setWaterMark/setWaterMark.js +68 -68
  246. package/templates/vue-app/files/src/views/selfStatistics/setWaterMark/waterMark.vue +69 -69
  247. package/templates/vue-app/files/src/views/system/dept/index.vue +144 -144
  248. package/templates/vue-app/files/src/views/system/dict/dictDetail.vue +146 -146
  249. package/templates/vue-app/files/src/views/system/dict/index.vue +159 -159
  250. package/templates/vue-app/files/src/views/system/examModality/index.vue +174 -174
  251. package/templates/vue-app/files/src/views/system/examPart/index.vue +184 -184
  252. package/templates/vue-app/files/src/views/system/examProject/index.vue +321 -321
  253. package/templates/vue-app/files/src/views/system/examine/index.vue +66 -66
  254. package/templates/vue-app/files/src/views/system/job/index.vue +119 -119
  255. package/templates/vue-app/files/src/views/system/job/module/form.vue +72 -72
  256. package/templates/vue-app/files/src/views/system/job/module/header.vue +48 -48
  257. package/templates/vue-app/files/src/views/system/menu/index.vue +327 -327
  258. package/templates/vue-app/files/src/views/system/model/index.vue +285 -285
  259. package/templates/vue-app/files/src/views/system/role/index.vue +434 -434
  260. package/templates/vue-app/files/src/views/system/sysSet/index.vue +84 -84
  261. package/templates/vue-app/files/src/views/system/timing/index.vue +289 -289
  262. package/templates/vue-app/files/src/views/system/timing/log.vue +143 -143
  263. package/templates/vue-app/files/src/views/system/user/admin.vue +414 -414
  264. package/templates/vue-app/files/src/views/system/user/center/updateEmail.vue +146 -146
  265. package/templates/vue-app/files/src/views/system/user/center/updatePass.vue +168 -168
  266. package/templates/vue-app/files/src/views/system/user/center.vue +140 -140
  267. package/templates/vue-app/files/src/views/system/user/index.vue +972 -972
  268. package/templates/vue-app/files/src/views/systemSet/role/index.vue +314 -314
  269. package/templates/vue-app/files/src/views/systemSet/user/admin.vue +414 -414
  270. package/templates/vue-app/files/src/views/systemSet/user/center/updateEmail.vue +146 -146
  271. package/templates/vue-app/files/src/views/systemSet/user/center/updatePass.vue +115 -115
  272. package/templates/vue-app/files/src/views/systemSet/user/center.vue +351 -351
  273. package/templates/vue-app/files/src/views/systemSet/user/index.vue +928 -928
  274. package/templates/vue-app/files/src/views/tools/aliPay/config.vue +102 -102
  275. package/templates/vue-app/files/src/views/tools/aliPay/index.vue +48 -48
  276. package/templates/vue-app/files/src/views/tools/aliPay/toPay.vue +91 -91
  277. package/templates/vue-app/files/src/views/tools/email/config.vue +91 -91
  278. package/templates/vue-app/files/src/views/tools/email/index.vue +42 -42
  279. package/templates/vue-app/files/src/views/tools/email/send.vue +159 -159
  280. package/templates/vue-app/files/src/views/tools/storage/index.vue +35 -35
  281. package/templates/vue-app/files/src/views/tools/storage/local/index.vue +207 -207
  282. package/templates/vue-app/files/src/views/tools/storage/qiniu/form.vue +108 -108
  283. package/templates/vue-app/files/src/views/tools/storage/qiniu/index.vue +241 -241
  284. package/templates/vue-app/files/src/views/tools/swagger/index.vue +14 -14
  285. package/templates/vue-app/files/vue.config.js +173 -173
  286. package/templates/vue-app/template.json +29 -29
@@ -1,1385 +1,1385 @@
1
- <template>
2
- <div class="app-container institutionMonitor" ref="monitorContainer">
3
- <div class="monitor-top" ref="fixedDiv" style="width: calc(100%)">
4
- <el-form
5
- :inline="true"
6
- :model="query"
7
- ref="topForm"
8
- class="form-inline-hospital"
9
- size="small">
10
- <el-form-item prop="address">
11
- <!-- 区域 -->
12
- <el-cascader
13
- v-model="query.address"
14
- clearable
15
- placeholder="机构地区"
16
- :options="provinceList"
17
- :props="props"
18
- @active-item-change="handleItemChange"
19
- @change="provinceChange">
20
- </el-cascader>
21
- </el-form-item>
22
- <!-- 类别 -->
23
- <el-form-item prop="hospitalTypeList">
24
- <el-select
25
- v-model="query.hospitalTypeList"
26
- clearable
27
- multiple
28
- placeholder="机构类别"
29
- class="filter-item"
30
- style="width: 160px"
31
- @change="rightChange">
32
- <el-option
33
- v-for="item in dict.ins_category"
34
- :key="item.value"
35
- :label="item.label"
36
- :value="item.value" />
37
- </el-select>
38
- </el-form-item>
39
- <!-- 机构等级 -->
40
- <el-form-item prop="levelList">
41
- <el-select
42
- v-model="query.levelList"
43
- clearable
44
- multiple
45
- placeholder="机构等级"
46
- class="filter-item"
47
- style="width: 160px"
48
- @change="rightChange">
49
- <el-option
50
- v-for="item in dict.agency_hos_rank"
51
- :key="item.value"
52
- :label="item.label"
53
- :value="item.value" />
54
- </el-select>
55
- </el-form-item>
56
- <!-- 机构名称 -->
57
- <el-form-item prop="hospitalName">
58
- <el-input
59
- placeholder="请输入机构名称"
60
- v-model.trim="query.hospitalName"
61
- class="filter-item"
62
- style="width: 160px"
63
- @input="inputChange"
64
- clearable>
65
- </el-input>
66
- </el-form-item>
67
- <!-- 是否联网 -->
68
- <el-form-item prop="connectStatus">
69
- <el-select
70
- v-model="query.connectStatus"
71
- clearable
72
- placeholder="是否联网"
73
- class="filter-item"
74
- style="width: 160px"
75
- @input="forceUpdate">
76
- <el-option
77
- v-for="item in dict.connect_status"
78
- :key="item.value"
79
- :label="item.label"
80
- :value="item.value" />
81
- </el-select>
82
- </el-form-item>
83
- <!-- 看图情况 -->
84
- <el-form-item prop="lookPicStatus">
85
- <el-select
86
- v-model="query.lookPicStatus"
87
- clearable
88
- placeholder="看图情况"
89
- class="filter-item"
90
- style="width: 160px"
91
- @change="forceUpdate">
92
- <el-option
93
- v-for="item in dict.gateway_status.filter(x => x.label != '停止')"
94
- :key="item.value"
95
- :label="item.label"
96
- :value="item.value" />
97
- </el-select>
98
- </el-form-item>
99
- <el-form-item prop="dayDataStatus">
100
- <el-select
101
- v-model="query.dayDataStatus"
102
- clearable
103
- placeholder="日报上传监测"
104
- class="filter-item"
105
- style="width: 160px"
106
- @change="forceUpdate">
107
- <el-option
108
- v-for="item in dayDataMonitorList"
109
- :key="item.value"
110
- :label="item.label"
111
- :value="item.value" />
112
- </el-select>
113
- </el-form-item>
114
- <el-form-item prop="qualityDataStatus">
115
- <el-select
116
- v-model="query.qualityDataStatus"
117
- clearable
118
- placeholder="归档数据质量情况"
119
- class="filter-item"
120
- style="width: 160px"
121
- @change="forceUpdate">
122
- <el-option
123
- v-for="item in dict.quality_data_status"
124
- :key="item.value"
125
- :label="item.label"
126
- :value="item.value" />
127
- </el-select>
128
- </el-form-item>
129
- <el-form-item prop="chargeAmountStatus">
130
- <el-select
131
- v-model="query.chargeAmountStatus"
132
- clearable
133
- placeholder="客户端运行情况"
134
- class="filter-item"
135
- style="width: 160px"
136
- @change="forceUpdate">
137
- <el-option
138
- v-for="item in dict.chargeAmount_status"
139
- :key="item.value"
140
- :label="item.label"
141
- :value="item.value" />
142
- </el-select>
143
- </el-form-item>
144
- <el-form-item prop="autoUploadType">
145
- <el-select
146
- v-model="query.autoUploadType"
147
- clearable
148
- placeholder="自动上传方式"
149
- class="filter-item"
150
- style="width: 160px"
151
- @change="forceUpdate">
152
- <el-option
153
- v-for="item in dict.auto_upload_type"
154
- :key="item.value"
155
- :label="item.label"
156
- :value="item.value" />
157
- </el-select>
158
- </el-form-item>
159
- <el-form-item prop="runningStatus">
160
- <el-select
161
- v-model="query.runningStatus"
162
- clearable
163
- placeholder="机构状态"
164
- class="filter-item"
165
- style="width: 160px"
166
- @change="forceUpdate">
167
- <el-option
168
- v-for="item in dict.running_status"
169
- :key="item.value"
170
- :label="item.label"
171
- :value="item.value" />
172
- </el-select>
173
- </el-form-item>
174
- <el-form-item prop="monitorStatus">
175
- <el-select
176
- v-model="query.monitorStatus"
177
- clearable
178
- placeholder="是否监测"
179
- class="filter-item"
180
- style="width: 160px"
181
- @change="forceUpdate">
182
- <el-option
183
- v-for="item in dict.monitor_status"
184
- :key="item.value"
185
- :label="item.label"
186
- :value="item.value" />
187
- </el-select>
188
- </el-form-item>
189
- <el-form-item prop="urlKey">
190
- <el-input
191
- placeholder="urlKey"
192
- v-model.trim="query.urlKey"
193
- class="filter-item"
194
- style="width: 160px"
195
- @input="inputChange"
196
- clearable>
197
- </el-input>
198
- </el-form-item>
199
- <el-form-item prop="isMissDrawing">
200
- <el-select
201
- v-model="query.isMissDrawing"
202
- clearable
203
- placeholder="是否漏图"
204
- class="filter-item"
205
- style="width: 120px"
206
- @change="forceUpdate">
207
- <el-option
208
- v-for="item in archiveFlagArr"
209
- :key="item.value"
210
- :label="item.label"
211
- :value="item.value" />
212
- </el-select>
213
- </el-form-item>
214
- <el-form-item prop="lookPicAbnormalMonitor">
215
- <el-select
216
- v-model="query.lookPicAbnormalMonitor"
217
- clearable
218
- placeholder="是否开启看图异常监测"
219
- class="filter-item"
220
- style="width: 180px"
221
- @change="rightChange">
222
- <el-option
223
- v-for="item in archiveFlagArr"
224
- :key="item.value"
225
- :label="item.label"
226
- :value="item.value" />
227
- </el-select>
228
- </el-form-item>
229
- <el-form-item prop="leakageMonitor">
230
- <el-select
231
- v-model="query.leakageMonitor"
232
- clearable
233
- placeholder="是否开启漏图监测"
234
- class="filter-item"
235
- style="width: 180px"
236
- @change="rightChange">
237
- <el-option
238
- v-for="item in archiveFlagArr"
239
- :key="item.value"
240
- :label="item.label"
241
- :value="item.value" />
242
- </el-select>
243
- </el-form-item>
244
- <el-form-item>
245
- <date-range-picker
246
- style="width: 300px; height: 34px"
247
- popper-class="isDisabledDate"
248
- @change="dateChange"
249
- :clearable="false"
250
- v-model="query.checkTime"
251
- valueFormat="yyyy-MM-dd"
252
- :picker-options="pickerOptions"
253
- @blur="forceUpdate" />
254
- </el-form-item>
255
- <el-button @click="getToQuery" class="filter-item" size="small">查询</el-button>
256
- <el-button @click="resetForm" class="filter-item" size="small" style="margin-left: 5px"
257
- >重置</el-button
258
- >
259
- <el-button
260
- @click="exportTable1"
261
- class="filter-item"
262
- size="small"
263
- style="margin-left: 5px"
264
- :loading="downloadLoading1"
265
- >导出列表</el-button
266
- >
267
- <el-button
268
- @click="exportTable"
269
- class="filter-item"
270
- size="small"
271
- style="margin-left: 5px"
272
- :loading="downloadLoading"
273
- >导出维护记录</el-button
274
- >
275
- <el-button
276
- @click="exportMonitorDetail"
277
- class="filter-item"
278
- size="small"
279
- style="margin-left: 5px"
280
- :loading="downloadLoading2"
281
- >导出看图监测详情</el-button
282
- >
283
-
284
- <el-popover placement="top" width="160" v-model="visible">
285
- <p>一键异常监测需要很长时间,请耐心等待,稍后刷新页面查看机构最新状态</p>
286
- <div style="text-align: right; margin: 0">
287
- <el-button size="mini" type="text" @click="visible = false">取消</el-button>
288
- <el-button type="primary" size="mini" @click="fastMonitorFn">确定</el-button>
289
- </div>
290
- <el-button slot="reference" class="filter-item" size="small" style="margin-left: 5px"
291
- >一键异常监测
292
- </el-button>
293
- </el-popover>
294
- <el-button
295
- @click="EmailConfiguration"
296
- class="filter-item"
297
- size="small"
298
- style="margin-left: 5px"
299
- >邮箱配置</el-button
300
- >
301
- </el-form>
302
- <!-- 统计模块 -->
303
- <div class="hospital_statics">
304
- <div class="left">
305
- <!-- 所有机构 -->
306
- <div class="hospital_total">
307
- <img src="~@/assets/images/hospital_icon.png" alt="" />
308
-
309
- <div class="picture">
310
- <p>
311
- 看图异常情况
312
- <el-tooltip
313
- class="item"
314
- effect="dark"
315
- content="统计自开始监测以来的所有被监测机构的总体看图异常情况,异常率=(看图监测异常量+患者扫码异常量+人工统计异常量)/归档量"
316
- placement="top">
317
- <span class="el-icon-question"></span>
318
- </el-tooltip>
319
- </p>
320
- <p class="special">
321
- 归档总量:<span>{{ numberDeal(totalMonitoringData.archivedAmount) }}</span>
322
- </p>
323
- <p class="special">
324
- 异常总量:<span>{{ numberDeal(totalMonitoringData.abnormalTotal) }}</span>
325
- </p>
326
- <p class="special">
327
- 总异常率:<span>{{ totalMonitoringData.abnormalTotalRate }}</span>
328
- </p>
329
- </div>
330
- </div>
331
- <!-- 联网机构 -->
332
- <div class="hospital_network">
333
- <div class="picture" style="width: 90%">
334
- <p>
335
- <img src="~@/assets/images/hospital_icon.png" alt="" />
336
- 漏图情况
337
- <el-tooltip
338
- class="item"
339
- effect="dark"
340
- content="传图异常情况:统计自开始监测以来的所有被监测机构的总体传图异常情况,漏图率=(漏图总张数/应上传图像数量*1000000);多图率=(多图总张数/应上传图像数量*1000000)"
341
- placement="top">
342
- <span class="el-icon-question"></span>
343
- </el-tooltip>
344
- </p>
345
- <p class="special">
346
- 图像总张数:<span>{{ numberDeal(totalMonitoringData.imageCount) }}</span>
347
- </p>
348
- <el-row>
349
- <el-col :span="12">
350
- <p class="special">
351
- 漏图总张数:<span>{{
352
- numberDeal(totalMonitoringData.missingDrawingsTotal)
353
- }}</span>
354
- </p>
355
- <p class="special">
356
- 总漏图率:<span>{{ totalMonitoringData.missingDrawingsRate }} PPM</span>
357
- </p>
358
- </el-col>
359
- <el-col :span="12">
360
- <p class="special">
361
- 多图总张数:<span>{{
362
- totalMonitoringData.moreDrawingsTotal
363
- ? numberDeal(totalMonitoringData.moreDrawingsTotal)
364
- : '0'
365
- }}</span>
366
- </p>
367
- <p class="special">
368
- 总多图率:<span>{{ totalMonitoringData.moreDrawingsRate || 0 }} PPM</span>
369
- </p>
370
- </el-col>
371
- </el-row>
372
- </div>
373
- </div>
374
- <h3 class="title-text">总监测</h3>
375
- </div>
376
- <!-- 关键数据 -->
377
- <div class="left right">
378
- <div class="hospital_total">
379
- <img src="~@/assets/images/archive.png" alt="" />
380
- <div class="picture">
381
- <p>看图情况</p>
382
- <p class="special">
383
- 正常:<span>{{ numberDeal(hospitalTotalData.lookPicNormal) }}</span>
384
- </p>
385
- <p class="special">
386
- 异常:<span>{{ numberDeal(hospitalTotalData.lookPicException) }}</span>
387
- </p>
388
- </div>
389
- </div>
390
- <div class="hospital_network">
391
- <img src="~@/assets/images/archive.png" alt="" />
392
- <div class="picture">
393
- <p>客户端运行情况</p>
394
- <p class="special">
395
- 正常:<span>{{ numberDeal(hospitalTotalData.iuWorkStationNormal) }}</span>
396
- </p>
397
- <p class="special">
398
- 异常:<span>{{ numberDeal(hospitalTotalData.iuWorkStationException) }}</span>
399
- </p>
400
- </div>
401
- </div>
402
- <h3 class="title-text">今日监测</h3>
403
- </div>
404
- </div>
405
- </div>
406
- <!--工具栏-->
407
-
408
- <div class="tableData">
409
- <!-- 查询条件 -->
410
-
411
- <!-- 表格 -->
412
- <div ref="monitorTable">
413
- <el-table :data="crud.data" v-loading="crud.loading" :element-loading-text="loadingText">
414
- <el-table-column label="序号" width="85px" :show-overflow-tooltip="true">
415
- <template slot-scope="scope">
416
- <span>{{ (crud.page.page - 1) * crud.page.size + scope.$index + 1 }}</span>
417
- </template>
418
- </el-table-column>
419
- <el-table-column prop="hospitalName" label="机构名称" min-width="180px">
420
- </el-table-column>
421
- <el-table-column prop="hospitalType" label="机构类别" min-width="80">
422
- <template slot-scope="scope">
423
- {{ hosCategory(scope.row.hospitalType) }}
424
- </template>
425
- </el-table-column>
426
- <el-table-column prop="level" label="机构等级" min-width="80">
427
- <template slot-scope="scope">
428
- {{ hosRank(scope.row.level) }}
429
- </template>
430
- </el-table-column>
431
- <el-table-column prop="connectStatus" label="是否联网" min-width="80">
432
- <template slot-scope="scope">
433
- {{ scope.row.connectStatus == 1 ? '已联网' : '未联网' }}
434
- </template>
435
- </el-table-column>
436
- <el-table-column prop="runningState" label="机构状态" min-width="80">
437
- <template slot-scope="scope">
438
- {{ runningStateFilter(scope.row.runningState) }}
439
- </template>
440
- </el-table-column>
441
- <el-table-column prop="monitorStatus" label="是否监测" min-width="100">
442
- <template slot-scope="scope">
443
- {{ monitorStatusFilter(scope.row.monitorStatus) }}
444
- </template>
445
- </el-table-column>
446
- <el-table-column prop="lookPicStatus" label="看图情况" min-width="100">
447
- <template slot-scope="scope">
448
- <div v-if="scope.row.lookPicStatus == 1" class="warn">
449
- <i></i>
450
- <span>异常</span>
451
- </div>
452
- <div v-if="scope.row.lookPicStatus == 2" class="normal">
453
- <i></i>
454
- <span>正常</span>
455
- </div>
456
- <div v-if="scope.row.lookPicStatus == '-'">
457
- <p>{{ scope.row.lookPicStatus }}</p>
458
- </div>
459
- </template>
460
- </el-table-column>
461
- <el-table-column prop="abnormalRate" label="看图异常率" min-width="120">
462
- </el-table-column>
463
- <el-table-column prop="missingDrawingsRate" label="漏图率(PPM)" min-width="140">
464
- </el-table-column>
465
- <el-table-column prop="moreDrawingsRate" label="多图率(PPM)" min-width="140">
466
- </el-table-column>
467
- <el-table-column prop="qualityDataStatus" label="归档数据质量情况" min-width="80">
468
- <template slot-scope="scope">
469
- <div v-if="scope.row.qualityDataStatus == 1" class="warn">
470
- <i></i>
471
- <span>异常</span>
472
- </div>
473
- <div v-else-if="scope.row.qualityDataStatus == 2" class="normal">
474
- <i></i>
475
- <span>正常</span>
476
- </div>
477
- <div v-else>
478
- <span>{{ '-' }}</span>
479
- </div>
480
- </template>
481
- </el-table-column>
482
- <el-table-column prop="iuWorkStationStatus" label="客户端运行情况" min-width="80">
483
- <template slot-scope="scope">
484
- <div v-if="scope.row.iuWorkStationStatus == 1" class="warn">
485
- <i></i>
486
- <span>异常</span>
487
- </div>
488
- <div v-else-if="scope.row.iuWorkStationStatus == 2" class="normal">
489
- <i></i>
490
- <span>正常</span>
491
- </div>
492
- <div v-else>
493
- <span>{{ '-' }}</span>
494
- </div>
495
- </template>
496
- </el-table-column>
497
- <el-table-column prop="dayDataStatus" label="日报上传监测" min-width="120">
498
- <template slot-scope="scope">
499
- <div v-if="scope.row.dayDataStatus == 1" class="warn">
500
- <i></i>
501
- <span>异常</span>
502
- </div>
503
- <div v-else-if="scope.row.dayDataStatus == 2" class="normal">
504
- <i></i>
505
- <span>正常</span>
506
- </div>
507
- <div v-else>
508
- <span>-</span>
509
- </div>
510
- </template>
511
- </el-table-column>
512
- <el-table-column prop="urlKey" label="urlKey" min-width="70">
513
- <template slot-scope="scope">
514
- {{ scope.row.urlKey || '-' }}
515
- </template>
516
- </el-table-column>
517
- <el-table-column prop="autoUploadType" label="自动上传方式" min-width="120">
518
- <template slot-scope="scope">
519
- {{ autoUploadType(scope.row.autoUploadType) || '-' }}
520
- </template>
521
- </el-table-column>
522
-
523
- <el-table-column label="操作" fixed="right" width="250">
524
- <template slot-scope="scope">
525
- <el-button size="mini" type="text" @click="toAddRecord(scope.row)"
526
- >维护记录</el-button
527
- >
528
- <el-button
529
- size="mini"
530
- type="text"
531
- :disabled="
532
- scope.row.lookPicMonitor == 0 &&
533
- scope.row.gatewayMonitor == 0 &&
534
- scope.row.monitorStatus == 0
535
- "
536
- @click="lookMonitor(scope.row.scenceId)"
537
- >重新监测</el-button
538
- >
539
- <el-button size="mini" type="text" @click="monitorPath(scope.row)"
540
- >监测详情</el-button
541
- >
542
- </template>
543
- </el-table-column>
544
- </el-table>
545
- <!--分页组件-->
546
- <pagination />
547
- </div>
548
- </div>
549
-
550
- <!-- 维护记录弹窗 -->
551
- <el-dialog
552
- :title="hospitalName"
553
- top="5vh"
554
- :visible.sync="recordVisible"
555
- :close-on-click-modal="false"
556
- :before-close="closeDialog"
557
- v-if="recordVisible">
558
- <el-form :model="upHoldForm" ref="upHoldForm" :rules="rules">
559
- <el-form-item prop="maintainContent">
560
- <el-input
561
- type="textarea"
562
- placeholder="请输入信息"
563
- v-model.trim="upHoldForm.maintainContent"></el-input>
564
- </el-form-item>
565
- </el-form>
566
- <div class="dialog-footer-bottom">
567
- <div>
568
- <span class="el-icon-warning"></span>
569
- <span>提示:【保存】后不可修改,请确认无误后再提交!</span>
570
- </div>
571
- <div>
572
- <el-button @click="closeDialog">取 消</el-button>
573
- <el-button class="sure" type="primary" @click="toSubmit('upHoldForm')">保 存</el-button>
574
- </div>
575
- </div>
576
- <!-- 统计次数 -->
577
- <div class="total">
578
- 共维护 <span>{{ maintainRecordTotal }}</span> 次
579
- </div>
580
- <!-- 时间线 -->
581
- <div class="timeLine" ref="rightDiv">
582
- <el-timeline>
583
- <el-timeline-item
584
- v-for="(activity, index) in maintainRecordData"
585
- :key="index"
586
- color="#1890FF"
587
- placement="top">
588
- <div class="content">
589
- <p>
590
- <span>{{ activity.operator }}</span
591
- >&ensp;&ensp;{{ activity.createTime }}
592
- </p>
593
- <p>{{ activity.maintainContent }}</p>
594
- </div>
595
- </el-timeline-item>
596
- </el-timeline>
597
- </div>
598
- </el-dialog>
599
- <el-dialog
600
- title="邮箱配置"
601
- top="10vh"
602
- width="560px"
603
- :visible.sync="emailShow"
604
- :close-on-click-modal="false">
605
- <el-dialog width="300px" title="定时发送cron" :visible.sync="innerVisibleCron" append-to-body>
606
- <span>
607
- <div v-for="(item, index) in innerVisibleCronList" :key="index">
608
- <p style="line-height: 1.75em; font-size: 15px; padding-left: 25px">
609
- {{ item }}
610
- </p>
611
- </div>
612
- </span>
613
- </el-dialog>
614
- <span class="EmailSet">
615
- <el-form size="small" :model="form" ref="form" :rules="rules" label-width="110px">
616
- <el-form-item label="定时发送cron" prop="cron">
617
- <el-input v-model.trim="form.cron" placeholder="请输入定时发送cron"></el-input>
618
- <div class="testCron">
619
- <el-button type="primary" @click="checkCorn">测试cron</el-button>
620
- </div>
621
- </el-form-item>
622
- <div v-for="(item, index) in form.cardForm" :key="index" class="cardForm">
623
- <el-form-item
624
- label="邮箱地址"
625
- :prop="`cardForm.${index}.mailAdress`"
626
- :rules="rules.cardForm.mailAdress">
627
- <!-- " -->
628
- <el-input v-model.trim="item.mailAdress" placeholder="请输入邮箱"></el-input>
629
- </el-form-item>
630
- <div class="emailAdd">
631
- <el-button
632
- type="primary"
633
- size="mini"
634
- icon="el-icon-plus"
635
- @click="EmailCickAdd"
636
- circle></el-button>
637
- <el-button
638
- v-if="form.cardForm.length != 1"
639
- type="danger"
640
- @click="EmailCickDel(index)"
641
- size="mini"
642
- icon="el-icon-minus"
643
- circle></el-button>
644
- </div>
645
- </div>
646
- </el-form>
647
- </span>
648
- <span slot="footer" class="dialog-footer">
649
- <el-button size="small" @click="emailShow = false">取 消</el-button>
650
- <el-button
651
- size="small"
652
- type="primary"
653
- :loading="submitFormLoading"
654
- @click="submitForm('form')"
655
- >确 定</el-button
656
- >
657
- </span>
658
- </el-dialog>
659
- </div>
660
- </template>
661
-
662
- <script>
663
- import { mapGetters } from 'vuex';
664
- import institutionMonitor, {
665
- monitorAllType,
666
- totalMonitoring,
667
- } from '@/api/institutionMonitor/index';
668
- import pagination from '@crud/Pagination';
669
- import CRUD, { presenter, header, crud } from '@crud/crud';
670
- import { downloadFile } from '@/utils/index';
671
- import { download } from '@/api/data';
672
- import DateRangePicker from '@/components/DateRangePicker';
673
- import { getDay } from '@/utils/getTime';
674
-
675
- const start = getDay(-30) + ' 00:00:00';
676
- const end = getDay(-1) + ' 23:59:59';
677
- export default {
678
- name: 'institutionMonitor',
679
- components: {
680
- institutionMonitor,
681
- pagination,
682
- DateRangePicker,
683
- },
684
- dicts: [
685
- 'monitor_status',
686
- 'ins_category',
687
- 'agency_hos_rank',
688
- 'gateway_status',
689
- 'connect_status',
690
- 'running_status',
691
- 'auto_upload_type',
692
- 'quality_data_status',
693
- 'iu_workstation_status',
694
- 'machineInfo_status',
695
- 'chargeAmount_status',
696
- ],
697
- cruds() {
698
- return CRUD({
699
- title: '机构',
700
- url: '',
701
- crudMethod: { ...institutionMonitor },
702
- sort: [],
703
- query: {
704
- checkTime: [start, end],
705
- },
706
- });
707
- },
708
- data() {
709
- var checkEmailAdress = (rule, value, callback) => {
710
- let indexOfNun = rule.field.indexOf('.mailAdress');
711
- let num = Number(rule.field.substring(9, indexOfNun));
712
- if (this.form.cardForm.length > 1) {
713
- let data = [];
714
- this.form.cardForm.forEach((tmp, index) => {
715
- if (tmp.mailAdress == this.form.cardForm[num].mailAdress) {
716
- data.push(tmp);
717
- }
718
- });
719
- if (data.length == 1) {
720
- callback();
721
- } else {
722
- callback(new Error('邮箱地址已存在,请重新输入'));
723
- }
724
- } else {
725
- callback();
726
- }
727
- };
728
- return {
729
- waterMarkProp: {
730
- zIndex: 1,
731
- devicePixelRatio: 2,
732
- text: '',
733
- showTime: true,
734
- },
735
- rules: {
736
- query: {},
737
- maintainContent: [{ required: true, message: '请输入维护记录', trigger: 'blur' }],
738
- },
739
- fixedDivHeight: 0,
740
- tableHeight: '500px',
741
- archiveFlagArr: [
742
- { value: '0', label: '否' },
743
- { value: '1', label: '是' },
744
- ],
745
- dayDataMonitorList: [
746
- { value: '1', label: '异常' },
747
- { value: '2', label: '正常' },
748
- ],
749
- // 机构总数数据
750
- hospitalTotalData: {},
751
- // 维护记录弹窗显示与隐藏
752
- recordVisible: false,
753
- formatEmpty: '-',
754
- // 表单传取参数
755
- upHoldForm: {
756
- maintainContent: '',
757
- },
758
- // 机构地区存取数据
759
- provinceList: [],
760
- // 机构地区绑定的关系
761
- props: {
762
- value: 'value',
763
- children: 'cities',
764
- label: 'label',
765
- checkStrictly: true,
766
- },
767
- // 维护记录
768
- maintainRecordTotal: 0,
769
- maintainRecordData: [],
770
- // 添加维护记录的id
771
- scenceId: '',
772
- hospitalName: '',
773
- // 维护记录分页加载
774
- recordPage: 0,
775
- // 导出加载图标的显示与隐藏
776
- downloadLoading: false,
777
- downloadLoading1: false,
778
- downloadLoading2: false,
779
- emailShow: false,
780
- loadingText: '',
781
- visible: false,
782
- form: {
783
- cron: '',
784
- cardForm: [{ mailAdress: '' }],
785
- },
786
- rules: {
787
- cron: [{ required: true, message: '请输入定时发送cron', trigger: ['blur', 'change'] }],
788
- cardForm: {
789
- mailAdress: [
790
- { required: true, message: '请输入邮箱地址', trigger: ['blur', 'change'] },
791
- {
792
- type: 'email',
793
- message: '请输入正确的邮箱地址',
794
- trigger: ['blur', 'change'],
795
- },
796
- { validator: checkEmailAdress, trigger: ['blur', 'change'] },
797
- ],
798
- },
799
- },
800
- emailList: [],
801
- innerVisibleCron: false,
802
- innerVisibleCronList: [],
803
- submitFormLoading: false,
804
- cron: '',
805
- empty: '-',
806
- crudShow: false,
807
- tableShowHeight: '0',
808
- // 总监测数据
809
- totalMonitoringData: {},
810
- pickerOptions: {
811
- disabledDate(time) {
812
- return time.getTime() > Date.now();
813
- },
814
- shortcuts: [
815
- {
816
- text: '近一周',
817
- onClick(picker) {
818
- const end = new Date();
819
- const start = new Date();
820
- end.setTime(end.getTime() - 3600 * 1000 * 24);
821
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
822
- picker.$emit('pick', [start, end]);
823
- },
824
- },
825
- {
826
- text: '近一个月',
827
- onClick(picker) {
828
- const end = new Date();
829
- const start = new Date();
830
- end.setTime(end.getTime() - 3600 * 1000 * 24);
831
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
832
- picker.$emit('pick', [start, end]);
833
- },
834
- },
835
- {
836
- text: '近三个月',
837
- onClick(picker) {
838
- const end = new Date();
839
- const start = new Date();
840
- end.setTime(end.getTime() - 3600 * 1000 * 24);
841
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
842
- picker.$emit('pick', [start, end]);
843
- },
844
- },
845
- {
846
- text: '最近一年',
847
- onClick: picker => {
848
- const end = new Date(); // 当前日期
849
- const start = new Date(); // 开始日期
850
-
851
- end.setDate(end.getDate() - 1); // 设置结束日期为昨天
852
- start.setFullYear(start.getFullYear() - 1); // 设置开始日期为一年前
853
-
854
- picker.$emit('pick', [start, end]);
855
- },
856
- },
857
- {
858
- text: '本年度',
859
- onClick: picker => {
860
- const end = new Date(); // 当前日期
861
- const start = new Date(); // 开始日期
862
- start.setDate(1);
863
- end.setDate(end.getDate() - 1); // 设置结束日期为昨天
864
- start.setMonth(0); // 设置开始日期为今年的1月份
865
- picker.$emit('pick', [start, end]);
866
- },
867
- },
868
- ],
869
- },
870
- };
871
- },
872
-
873
- created() {
874
- this.query.checkTime = [start, end];
875
- this.dateChange(1);
876
- // 加载机构地区;
877
- this.getPosition(null, () => {});
878
- this.getMailAdress();
879
- },
880
- mounted() {
881
- this.$nextTick(() => {
882
- // console.log(this.$refs.fixedDiv.clientHeight, this.fixedDivHeight);
883
- this.fixedDivHeight = this.$refs.fixedDiv.clientHeight;
884
- if (this.$refs.topForm)
885
- this.tableHeight =
886
- this.$refs.monitorContainer.clientHeight - this.$refs.topForm.$el.offsetHeigh - 150;
887
- window.addEventListener('resize', () => {
888
- this.fixedDivHeight = this.$refs.fixedDiv.clientHeight;
889
- });
890
- this.waterMarkProp.text = this.user.name;
891
- });
892
- // 获取机构总数
893
- },
894
-
895
- computed: {
896
- ...mapGetters(['user', 'sidebar']),
897
- },
898
- mixins: [presenter(), header(), crud()],
899
-
900
- methods: {
901
- inputChange() {
902
- this.$forceUpdate();
903
- },
904
- getToQuery() {
905
- this.crud.url = 'monitor/hospitalPage';
906
- this.getHospitalTotal();
907
- this.totalMonitoring();
908
- this.crud.toQuery();
909
- },
910
- // 转换千分位
911
- numberDeal(value) {
912
- return value != '-' ? parseInt(value).toLocaleString() : value;
913
- },
914
- // 日期改变
915
- dateChange(status) {
916
- this.query.monitorStartDate = this.query.checkTime[0];
917
- this.query.monitorEndDate = this.query.checkTime[1];
918
- if (status == 1) {
919
- this.provinceChange();
920
- } else {
921
- this.getToQuery();
922
- }
923
- this.forceUpdate();
924
- },
925
- // 总监测接口
926
- totalMonitoring() {
927
- let data = JSON.parse(JSON.stringify(this.query));
928
- const query = {
929
- ...data,
930
- hospitalTypeList: this.query.hospitalTypeList
931
- ? this.query.hospitalTypeList.join(',')
932
- : this.query.hospitalTypeList,
933
- levelList: this.query.levelList ? this.query.levelList.join(',') : this.query.levelList,
934
- };
935
- delete query.checkTime;
936
- delete query.address;
937
-
938
- totalMonitoring(query).then(res => {
939
- this.totalMonitoringData = res;
940
- });
941
- },
942
- //一键监测
943
- fastMonitorFn() {
944
- const { city, district, hospitalTypeList, levelList, province } = this.crud.query;
945
- let data = {
946
- city,
947
- district,
948
- ...this.crud.query,
949
- hospitalTypeList: this.crud.query.hospitalTypeList
950
- ? this.crud.query.hospitalTypeList.join(',')
951
- : this.crud.query.hospitalTypeList,
952
- levelList: this.crud.query.levelList
953
- ? this.crud.query.levelList.join(',')
954
- : this.crud.query.levelList,
955
- province,
956
- };
957
- if (this.crud.query.address && this.crud.query.address[0]) {
958
- data.province = this.crud.query.address[0];
959
- }
960
- if (this.crud.query.address && this.crud.query.address[1]) {
961
- data.city = this.crud.query.address[1];
962
- }
963
- if (this.crud.query.address && this.crud.query.address[2]) {
964
- data.district = this.crud.query.address[2];
965
- }
966
- delete data['address'];
967
- delete data['checkTime'];
968
- monitorAllType(data).then(res => {
969
- if (res) {
970
- this.visible = false;
971
- this.$message.success('一键异常监测成功');
972
- } else {
973
- console.log('监测中', 1111);
974
- this.visible = false;
975
- this.$message.warning('监测中,请30秒后再试');
976
- }
977
- });
978
- },
979
- [CRUD.HOOK.beforeRefresh](crud) {
980
- if (!this.query.address && !this.crudShow)
981
- this.query.address = [window.config.defaultAddress];
982
- this.crudShow = true;
983
- // this.setTableHeight();
984
- },
985
- autoUploadType(category) {
986
- return this.dict.label.auto_upload_type[category];
987
- },
988
- runningStateFilter(rank) {
989
- return this.dict.label.running_status[rank] || '-';
990
- },
991
- monitorStatusFilter(rank) {
992
- return this.dict.label.monitor_status[rank] || '-';
993
- },
994
- // 邮箱配置
995
- EmailConfiguration() {
996
- this.$nextTick(() => {
997
- this.form.cron = this.cron;
998
- this.form.cardForm = [{ mailAdress: '' }];
999
- this.form.cardForm = JSON.parse(JSON.stringify(this.emailList));
1000
- if (this.form.cardForm.length == 0) {
1001
- this.form.cardForm = [{ mailAdress: '' }];
1002
- }
1003
- setTimeout(() => {
1004
- this.emailShow = true;
1005
- }, 500);
1006
- // setTimeout(() => { this.$refs['form'].resetFields() }, 800)
1007
- });
1008
- },
1009
- EmailCickAdd() {
1010
- this.form.cardForm.push({ mailAdress: '' });
1011
- this.$nextTick(() => {
1012
- // this.$refs.form.clearValidate();
1013
- this.$refs.form.$el.scrollTop = this.$refs.form.$el.scrollHeight;
1014
- });
1015
- },
1016
- EmailCickDel(index) {
1017
- this.form.cardForm.splice(index, 1);
1018
- },
1019
- submitForm(formName) {
1020
- this.$refs[formName].validate(valid => {
1021
- if (valid) {
1022
- this.submitFormLoading = true;
1023
- institutionMonitor
1024
- .checkCorn(this.form.cron)
1025
- .then(res => {
1026
- if (res.content && res.content.length != 0) {
1027
- this.emailShow = false;
1028
- let data = {
1029
- corn: this.form.cron,
1030
- mailAdress: [],
1031
- taskName: 'SEND_MAIL',
1032
- };
1033
- this.form.cardForm.forEach(tmp => data.mailAdress.push(tmp.mailAdress));
1034
- institutionMonitor.updateMailAdress(data).then(res => {
1035
- this.submitFormLoading = false;
1036
- this.getMailAdress();
1037
- this.emailShow = false;
1038
- this.$message.success('保存成功');
1039
- });
1040
- } else {
1041
- this.submitFormLoading = false;
1042
- this.form.cron = '';
1043
- this.$message.error('定时发送cron输入错误,请重新输入');
1044
- }
1045
- })
1046
- .catch(err => {
1047
- this.submitFormLoading = false;
1048
- this.$message.error('定时发送cron格式错误,请重新输入');
1049
- });
1050
- // this.emailShow = false
1051
- } else {
1052
- console.log('error submit!!');
1053
- return false;
1054
- }
1055
- });
1056
- },
1057
- lookMonitor(id) {
1058
- this.crud.loading = true;
1059
- this.loadingText = '正在监测...';
1060
- institutionMonitor.monitorAgain({ scenceId: id, type: 1 }).then(res => {
1061
- this.crud.toQuery();
1062
- this.loadingText = '';
1063
- this.$message.success('监测完成');
1064
- });
1065
- },
1066
- getMailAdress() {
1067
- institutionMonitor.getMailAdress().then(res => {
1068
- this.cron = res.corn;
1069
- this.emailList = JSON.parse(JSON.stringify(res.mailAdress));
1070
- });
1071
- },
1072
- // 测试cron
1073
- checkCorn() {
1074
- if (this.form.cron) {
1075
- institutionMonitor
1076
- .checkCorn(this.form.cron)
1077
- .then(res => {
1078
- this.innerVisibleCron = true;
1079
- this.innerVisibleCronList = res.content;
1080
- })
1081
- .catch(error => {
1082
- this.$message.error('定时发送cron格式错误,请重新输入');
1083
- });
1084
- } else {
1085
- this.$message.error('请输入定时发送cron');
1086
- }
1087
- },
1088
- // 获取机构总数
1089
- getHospitalTotal() {
1090
- let data = JSON.parse(JSON.stringify(this.query));
1091
- const query = {
1092
- ...data,
1093
- hospitalTypeList: this.query.hospitalTypeList
1094
- ? this.query.hospitalTypeList.join(',')
1095
- : this.query.hospitalTypeList,
1096
- levelList: this.query.levelList ? this.query.levelList.join(',') : this.query.levelList,
1097
- };
1098
- delete query.checkTime;
1099
- delete query.address;
1100
- institutionMonitor.hospitalTotal(query).then(res => {
1101
- this.hospitalTotalData = res;
1102
- });
1103
- },
1104
- // 处理数据
1105
- dealData(query, status) {
1106
- let str;
1107
- if (query && status) {
1108
- str = status;
1109
- } else {
1110
- str = '';
1111
- }
1112
- return str;
1113
- },
1114
- // 监测详情跳转
1115
- monitorPath(row) {
1116
- this.$router.push({
1117
- name: 'monitorDetail',
1118
- params: {
1119
- scenceId: row.scenceId,
1120
- },
1121
- });
1122
- },
1123
- // 导出
1124
- exportTable() {
1125
- if (this.crud.data.length != 0) {
1126
- this.downloadLoading = true;
1127
- download('monitor/download', this.query)
1128
- .then(result => {
1129
- this.downloadLoading = false;
1130
- })
1131
- .catch(e => {
1132
- downloadFile(e, '维护记录', 'xlsx');
1133
- this.downloadLoading = false;
1134
- });
1135
- } else {
1136
- this.$message.error('没有相关详情数据, 无法导出');
1137
- }
1138
- },
1139
- exportMonitorDetail() {
1140
- if (this.crud.data.length != 0) {
1141
- this.downloadLoading2 = true;
1142
- download('monitor/downloadMonitorInfo', this.query)
1143
- .then(result => {
1144
- this.downloadLoading2 = false;
1145
- })
1146
- .catch(e => {
1147
- downloadFile(e, '看图监测详情', 'xlsx');
1148
- this.downloadLoading2 = false;
1149
- });
1150
- } else {
1151
- this.$message.error('没有相关详情数据, 无法导出');
1152
- }
1153
- },
1154
- exportTable1() {
1155
- if (this.crud.data.length != 0) {
1156
- this.downloadLoading1 = true;
1157
- download('monitor/downloadHosp', this.query)
1158
- .then(result => {
1159
- this.downloadLoading1 = false;
1160
- })
1161
- .catch(e => {
1162
- downloadFile(e, '机构监测详情', 'xlsx');
1163
- this.downloadLoading1 = false;
1164
- });
1165
- } else {
1166
- this.$message.error('没有相关详情数据, 无法导出');
1167
- }
1168
- },
1169
- // 机构类别和机构等级改变,接口调用
1170
- rightChange(e) {
1171
- this.crud.toQuery();
1172
- this.getHospitalTotal();
1173
- this.totalMonitoring();
1174
- },
1175
- // 一级二级改变的时候调取下一级数据
1176
- handleItemChange(val) {
1177
- this.getPosition(val);
1178
- },
1179
- // 地区联动获取数据
1180
- getPosition(val, cb) {
1181
- let vm = this; //查询省市县
1182
- let params = { parent: 1 };
1183
- if (!val) {
1184
- //初始化加载 获取所有省份数据
1185
- params = { parent: 1 };
1186
- } else if (val.length === 1) {
1187
- //加载二级 获取市级数据
1188
- params = { parent: val[0] };
1189
- } else {
1190
- //加载3级 获取县级数据
1191
- params = { parent: val[1] };
1192
- }
1193
- institutionMonitor
1194
- .queryNation(params)
1195
- .then(res => {
1196
- if (!val) {
1197
- //初始化加载 查询省份数据
1198
- vm.provinceList = res.content.map(e => {
1199
- return {
1200
- value: e.saleid,
1201
- label: e.province,
1202
- cities: [],
1203
- };
1204
- });
1205
- } else if (val.length === 1) {
1206
- //加载二级 查询该省下市级数据
1207
- vm.provinceList.map(item => {
1208
- if (item.value === val[0]) {
1209
- item.cities = res.content.map(e => {
1210
- return {
1211
- value: e.saleid,
1212
- label: e.city || e.county,
1213
- cities: [],
1214
- };
1215
- });
1216
- }
1217
- });
1218
- } else {
1219
- //加载3级 查询该省市下县级数据
1220
- vm.provinceList.map(item => {
1221
- if (item.value === val[0]) {
1222
- item.cities.map(value => {
1223
- if (value.value === val[1]) {
1224
- value.cities = res.content.map(e => {
1225
- return { value: e.saleid, label: e.county };
1226
- });
1227
- }
1228
- });
1229
- }
1230
- });
1231
- }
1232
- cb && cb(res);
1233
- })
1234
- .catch(err => {
1235
- console.log(err);
1236
- });
1237
- },
1238
- // 地区选择改变,刷新数据
1239
- provinceChange(e) {
1240
- if (e) {
1241
- let provinceList = [];
1242
- let cityList = [];
1243
- let districtList = [];
1244
- for (let item of e) {
1245
- if (item.length == 1) {
1246
- provinceList.push(item[item.length - 1]);
1247
- }
1248
- if (item.length == 2) {
1249
- cityList.push(item[item.length - 1]);
1250
- }
1251
- if (item.length == 3) {
1252
- districtList.push(item[item.length - 1]);
1253
- }
1254
- }
1255
- this.query.provinceList = provinceList;
1256
- this.query.cityList = cityList;
1257
- this.query.districtList = districtList;
1258
- }
1259
- this.query.province = this.dealData(this.query.address, this.query.address[0]);
1260
- this.query.city = this.dealData(this.query.address, this.query.address[1]);
1261
- this.query.district = this.dealData(this.query.address, this.query.address[2]);
1262
- this.getToQuery();
1263
- },
1264
-
1265
- // 返回机构类别对应的名称
1266
- hosCategory(category) {
1267
- return this.dict.label.ins_category[category];
1268
- },
1269
- // 返回机构等级对应的名称
1270
- hosRank(rank) {
1271
- return this.dict.label.agency_hos_rank[rank];
1272
- },
1273
- // 获取维护记录详情
1274
- getMaintainRecordPage() {
1275
- institutionMonitor
1276
- .getRecord({
1277
- scenceId: this.scenceId,
1278
- page: this.recordPage,
1279
- size: 3,
1280
- })
1281
- .then(res => {
1282
- this.maintainRecordTotal = res.totalElements;
1283
- this.maintainRecordData = this.maintainRecordData.concat(res.content);
1284
- });
1285
- },
1286
- // 关闭对话框
1287
- closeDialog() {
1288
- this.recordVisible = false;
1289
- this.upHoldForm = {
1290
- maintainContent: '',
1291
- };
1292
- this.recordPage = 0;
1293
- },
1294
- // 添加记录
1295
- toAddRecord(row) {
1296
- this.maintainRecordData = [];
1297
- this.recordVisible = true;
1298
- this.scenceId = row.scenceId;
1299
- this.hospitalName = '维护记录 ' + '(' + row.hospitalName + ')';
1300
- this.getMaintainRecordPage();
1301
- this.$nextTick(() => {
1302
- this.$refs.rightDiv.addEventListener('scroll', this.scroll);
1303
- });
1304
- },
1305
- // 提交
1306
- toSubmit(formName) {
1307
- this.$refs[formName].validate(valid => {
1308
- if (valid) {
1309
- const query = {
1310
- scenceId: this.scenceId,
1311
- operator: this.user.name || 'ygadmin',
1312
- ...this.upHoldForm,
1313
- };
1314
- institutionMonitor.addRecord(query).then(res => {
1315
- this.$message.success('添加成功');
1316
- this.closeDialog();
1317
- });
1318
- } else {
1319
- this.$message.error('请输入内容');
1320
- return false;
1321
- }
1322
- });
1323
- },
1324
- // 监听滚动,加载下一页
1325
- scroll() {
1326
- const scrollTop = this.$refs.rightDiv.scrollTop;
1327
- // 获取可视区的高度
1328
- const windowHeight = this.$refs.rightDiv.clientHeight;
1329
- // 获取滚动条的总高度
1330
- const scrollHeight = this.$refs.rightDiv.scrollHeight;
1331
- if (scrollTop + windowHeight >= scrollHeight) {
1332
- // 把距离顶部的距离加上可视区域的高度 等于或者大于滚动条的总高度就是到达底部
1333
- // 调用函数
1334
- this.recordPage++;
1335
- this.getMaintainRecordPage();
1336
- }
1337
- },
1338
- // 重置
1339
-
1340
- resetForm() {
1341
- this.$refs.topForm.resetFields();
1342
- this.query.checkTime = [start, end];
1343
- this.query.province = '';
1344
- this.query.city = '';
1345
- this.query.district = '';
1346
- this.dateChange(1);
1347
- },
1348
- forceUpdate() {
1349
- this.$forceUpdate();
1350
- },
1351
- qualityDataFilter(status) {
1352
- return this.dict.label.quality_data_status[status];
1353
- },
1354
- iuWorkStationFilter(status) {
1355
- return this.dict.label.iu_workstation_status[status];
1356
- },
1357
- machineInfoFilter(status) {
1358
- return this.dict.label.machineInfo_status[status];
1359
- },
1360
- },
1361
-
1362
- destroyed() {
1363
- window.removeEventListener('scroll', this.scroll); // 离开页面清除(移除)滚轮滚动事件
1364
- },
1365
- activated() {
1366
- this.$nextTick(() => {
1367
- setTimeout(() => {
1368
- this.fixedDivHeight = this.$refs.fixedDiv.clientHeight;
1369
- // console.log(this.fixedDivHeight);
1370
- }, 1000);
1371
- });
1372
- this.crud.toQuery();
1373
- this.getHospitalTotal();
1374
- },
1375
- };
1376
- </script>
1377
-
1378
- <style rel="stylesheet/scss" lang="scss" scoped>
1379
- @import './index.scss';
1380
- .form-inline-hospital {
1381
- position: relative;
1382
- background-color: #fff;
1383
- // z-index: 10;
1384
- }
1385
- </style>
1
+ <template>
2
+ <div class="app-container institutionMonitor" ref="monitorContainer">
3
+ <div class="monitor-top" ref="fixedDiv" style="width: calc(100%)">
4
+ <el-form
5
+ :inline="true"
6
+ :model="query"
7
+ ref="topForm"
8
+ class="form-inline-hospital"
9
+ size="small">
10
+ <el-form-item prop="address">
11
+ <!-- 区域 -->
12
+ <el-cascader
13
+ v-model="query.address"
14
+ clearable
15
+ placeholder="机构地区"
16
+ :options="provinceList"
17
+ :props="props"
18
+ @active-item-change="handleItemChange"
19
+ @change="provinceChange">
20
+ </el-cascader>
21
+ </el-form-item>
22
+ <!-- 类别 -->
23
+ <el-form-item prop="hospitalTypeList">
24
+ <el-select
25
+ v-model="query.hospitalTypeList"
26
+ clearable
27
+ multiple
28
+ placeholder="机构类别"
29
+ class="filter-item"
30
+ style="width: 160px"
31
+ @change="rightChange">
32
+ <el-option
33
+ v-for="item in dict.ins_category"
34
+ :key="item.value"
35
+ :label="item.label"
36
+ :value="item.value" />
37
+ </el-select>
38
+ </el-form-item>
39
+ <!-- 机构等级 -->
40
+ <el-form-item prop="levelList">
41
+ <el-select
42
+ v-model="query.levelList"
43
+ clearable
44
+ multiple
45
+ placeholder="机构等级"
46
+ class="filter-item"
47
+ style="width: 160px"
48
+ @change="rightChange">
49
+ <el-option
50
+ v-for="item in dict.agency_hos_rank"
51
+ :key="item.value"
52
+ :label="item.label"
53
+ :value="item.value" />
54
+ </el-select>
55
+ </el-form-item>
56
+ <!-- 机构名称 -->
57
+ <el-form-item prop="hospitalName">
58
+ <el-input
59
+ placeholder="请输入机构名称"
60
+ v-model.trim="query.hospitalName"
61
+ class="filter-item"
62
+ style="width: 160px"
63
+ @input="inputChange"
64
+ clearable>
65
+ </el-input>
66
+ </el-form-item>
67
+ <!-- 是否联网 -->
68
+ <el-form-item prop="connectStatus">
69
+ <el-select
70
+ v-model="query.connectStatus"
71
+ clearable
72
+ placeholder="是否联网"
73
+ class="filter-item"
74
+ style="width: 160px"
75
+ @input="forceUpdate">
76
+ <el-option
77
+ v-for="item in dict.connect_status"
78
+ :key="item.value"
79
+ :label="item.label"
80
+ :value="item.value" />
81
+ </el-select>
82
+ </el-form-item>
83
+ <!-- 看图情况 -->
84
+ <el-form-item prop="lookPicStatus">
85
+ <el-select
86
+ v-model="query.lookPicStatus"
87
+ clearable
88
+ placeholder="看图情况"
89
+ class="filter-item"
90
+ style="width: 160px"
91
+ @change="forceUpdate">
92
+ <el-option
93
+ v-for="item in dict.gateway_status.filter(x => x.label != '停止')"
94
+ :key="item.value"
95
+ :label="item.label"
96
+ :value="item.value" />
97
+ </el-select>
98
+ </el-form-item>
99
+ <el-form-item prop="dayDataStatus">
100
+ <el-select
101
+ v-model="query.dayDataStatus"
102
+ clearable
103
+ placeholder="日报上传监测"
104
+ class="filter-item"
105
+ style="width: 160px"
106
+ @change="forceUpdate">
107
+ <el-option
108
+ v-for="item in dayDataMonitorList"
109
+ :key="item.value"
110
+ :label="item.label"
111
+ :value="item.value" />
112
+ </el-select>
113
+ </el-form-item>
114
+ <el-form-item prop="qualityDataStatus">
115
+ <el-select
116
+ v-model="query.qualityDataStatus"
117
+ clearable
118
+ placeholder="归档数据质量情况"
119
+ class="filter-item"
120
+ style="width: 160px"
121
+ @change="forceUpdate">
122
+ <el-option
123
+ v-for="item in dict.quality_data_status"
124
+ :key="item.value"
125
+ :label="item.label"
126
+ :value="item.value" />
127
+ </el-select>
128
+ </el-form-item>
129
+ <el-form-item prop="chargeAmountStatus">
130
+ <el-select
131
+ v-model="query.chargeAmountStatus"
132
+ clearable
133
+ placeholder="客户端运行情况"
134
+ class="filter-item"
135
+ style="width: 160px"
136
+ @change="forceUpdate">
137
+ <el-option
138
+ v-for="item in dict.chargeAmount_status"
139
+ :key="item.value"
140
+ :label="item.label"
141
+ :value="item.value" />
142
+ </el-select>
143
+ </el-form-item>
144
+ <el-form-item prop="autoUploadType">
145
+ <el-select
146
+ v-model="query.autoUploadType"
147
+ clearable
148
+ placeholder="自动上传方式"
149
+ class="filter-item"
150
+ style="width: 160px"
151
+ @change="forceUpdate">
152
+ <el-option
153
+ v-for="item in dict.auto_upload_type"
154
+ :key="item.value"
155
+ :label="item.label"
156
+ :value="item.value" />
157
+ </el-select>
158
+ </el-form-item>
159
+ <el-form-item prop="runningStatus">
160
+ <el-select
161
+ v-model="query.runningStatus"
162
+ clearable
163
+ placeholder="机构状态"
164
+ class="filter-item"
165
+ style="width: 160px"
166
+ @change="forceUpdate">
167
+ <el-option
168
+ v-for="item in dict.running_status"
169
+ :key="item.value"
170
+ :label="item.label"
171
+ :value="item.value" />
172
+ </el-select>
173
+ </el-form-item>
174
+ <el-form-item prop="monitorStatus">
175
+ <el-select
176
+ v-model="query.monitorStatus"
177
+ clearable
178
+ placeholder="是否监测"
179
+ class="filter-item"
180
+ style="width: 160px"
181
+ @change="forceUpdate">
182
+ <el-option
183
+ v-for="item in dict.monitor_status"
184
+ :key="item.value"
185
+ :label="item.label"
186
+ :value="item.value" />
187
+ </el-select>
188
+ </el-form-item>
189
+ <el-form-item prop="urlKey">
190
+ <el-input
191
+ placeholder="urlKey"
192
+ v-model.trim="query.urlKey"
193
+ class="filter-item"
194
+ style="width: 160px"
195
+ @input="inputChange"
196
+ clearable>
197
+ </el-input>
198
+ </el-form-item>
199
+ <el-form-item prop="isMissDrawing">
200
+ <el-select
201
+ v-model="query.isMissDrawing"
202
+ clearable
203
+ placeholder="是否漏图"
204
+ class="filter-item"
205
+ style="width: 120px"
206
+ @change="forceUpdate">
207
+ <el-option
208
+ v-for="item in archiveFlagArr"
209
+ :key="item.value"
210
+ :label="item.label"
211
+ :value="item.value" />
212
+ </el-select>
213
+ </el-form-item>
214
+ <el-form-item prop="lookPicAbnormalMonitor">
215
+ <el-select
216
+ v-model="query.lookPicAbnormalMonitor"
217
+ clearable
218
+ placeholder="是否开启看图异常监测"
219
+ class="filter-item"
220
+ style="width: 180px"
221
+ @change="rightChange">
222
+ <el-option
223
+ v-for="item in archiveFlagArr"
224
+ :key="item.value"
225
+ :label="item.label"
226
+ :value="item.value" />
227
+ </el-select>
228
+ </el-form-item>
229
+ <el-form-item prop="leakageMonitor">
230
+ <el-select
231
+ v-model="query.leakageMonitor"
232
+ clearable
233
+ placeholder="是否开启漏图监测"
234
+ class="filter-item"
235
+ style="width: 180px"
236
+ @change="rightChange">
237
+ <el-option
238
+ v-for="item in archiveFlagArr"
239
+ :key="item.value"
240
+ :label="item.label"
241
+ :value="item.value" />
242
+ </el-select>
243
+ </el-form-item>
244
+ <el-form-item>
245
+ <date-range-picker
246
+ style="width: 300px; height: 34px"
247
+ popper-class="isDisabledDate"
248
+ @change="dateChange"
249
+ :clearable="false"
250
+ v-model="query.checkTime"
251
+ valueFormat="yyyy-MM-dd"
252
+ :picker-options="pickerOptions"
253
+ @blur="forceUpdate" />
254
+ </el-form-item>
255
+ <el-button @click="getToQuery" class="filter-item" size="small">查询</el-button>
256
+ <el-button @click="resetForm" class="filter-item" size="small" style="margin-left: 5px"
257
+ >重置</el-button
258
+ >
259
+ <el-button
260
+ @click="exportTable1"
261
+ class="filter-item"
262
+ size="small"
263
+ style="margin-left: 5px"
264
+ :loading="downloadLoading1"
265
+ >导出列表</el-button
266
+ >
267
+ <el-button
268
+ @click="exportTable"
269
+ class="filter-item"
270
+ size="small"
271
+ style="margin-left: 5px"
272
+ :loading="downloadLoading"
273
+ >导出维护记录</el-button
274
+ >
275
+ <el-button
276
+ @click="exportMonitorDetail"
277
+ class="filter-item"
278
+ size="small"
279
+ style="margin-left: 5px"
280
+ :loading="downloadLoading2"
281
+ >导出看图监测详情</el-button
282
+ >
283
+
284
+ <el-popover placement="top" width="160" v-model="visible">
285
+ <p>一键异常监测需要很长时间,请耐心等待,稍后刷新页面查看机构最新状态</p>
286
+ <div style="text-align: right; margin: 0">
287
+ <el-button size="mini" type="text" @click="visible = false">取消</el-button>
288
+ <el-button type="primary" size="mini" @click="fastMonitorFn">确定</el-button>
289
+ </div>
290
+ <el-button slot="reference" class="filter-item" size="small" style="margin-left: 5px"
291
+ >一键异常监测
292
+ </el-button>
293
+ </el-popover>
294
+ <el-button
295
+ @click="EmailConfiguration"
296
+ class="filter-item"
297
+ size="small"
298
+ style="margin-left: 5px"
299
+ >邮箱配置</el-button
300
+ >
301
+ </el-form>
302
+ <!-- 统计模块 -->
303
+ <div class="hospital_statics">
304
+ <div class="left">
305
+ <!-- 所有机构 -->
306
+ <div class="hospital_total">
307
+ <img src="~@/assets/images/hospital_icon.png" alt="" />
308
+
309
+ <div class="picture">
310
+ <p>
311
+ 看图异常情况
312
+ <el-tooltip
313
+ class="item"
314
+ effect="dark"
315
+ content="统计自开始监测以来的所有被监测机构的总体看图异常情况,异常率=(看图监测异常量+患者扫码异常量+人工统计异常量)/归档量"
316
+ placement="top">
317
+ <span class="el-icon-question"></span>
318
+ </el-tooltip>
319
+ </p>
320
+ <p class="special">
321
+ 归档总量:<span>{{ numberDeal(totalMonitoringData.archivedAmount) }}</span>
322
+ </p>
323
+ <p class="special">
324
+ 异常总量:<span>{{ numberDeal(totalMonitoringData.abnormalTotal) }}</span>
325
+ </p>
326
+ <p class="special">
327
+ 总异常率:<span>{{ totalMonitoringData.abnormalTotalRate }}</span>
328
+ </p>
329
+ </div>
330
+ </div>
331
+ <!-- 联网机构 -->
332
+ <div class="hospital_network">
333
+ <div class="picture" style="width: 90%">
334
+ <p>
335
+ <img src="~@/assets/images/hospital_icon.png" alt="" />
336
+ 漏图情况
337
+ <el-tooltip
338
+ class="item"
339
+ effect="dark"
340
+ content="传图异常情况:统计自开始监测以来的所有被监测机构的总体传图异常情况,漏图率=(漏图总张数/应上传图像数量*1000000);多图率=(多图总张数/应上传图像数量*1000000)"
341
+ placement="top">
342
+ <span class="el-icon-question"></span>
343
+ </el-tooltip>
344
+ </p>
345
+ <p class="special">
346
+ 图像总张数:<span>{{ numberDeal(totalMonitoringData.imageCount) }}</span>
347
+ </p>
348
+ <el-row>
349
+ <el-col :span="12">
350
+ <p class="special">
351
+ 漏图总张数:<span>{{
352
+ numberDeal(totalMonitoringData.missingDrawingsTotal)
353
+ }}</span>
354
+ </p>
355
+ <p class="special">
356
+ 总漏图率:<span>{{ totalMonitoringData.missingDrawingsRate }} PPM</span>
357
+ </p>
358
+ </el-col>
359
+ <el-col :span="12">
360
+ <p class="special">
361
+ 多图总张数:<span>{{
362
+ totalMonitoringData.moreDrawingsTotal
363
+ ? numberDeal(totalMonitoringData.moreDrawingsTotal)
364
+ : '0'
365
+ }}</span>
366
+ </p>
367
+ <p class="special">
368
+ 总多图率:<span>{{ totalMonitoringData.moreDrawingsRate || 0 }} PPM</span>
369
+ </p>
370
+ </el-col>
371
+ </el-row>
372
+ </div>
373
+ </div>
374
+ <h3 class="title-text">总监测</h3>
375
+ </div>
376
+ <!-- 关键数据 -->
377
+ <div class="left right">
378
+ <div class="hospital_total">
379
+ <img src="~@/assets/images/archive.png" alt="" />
380
+ <div class="picture">
381
+ <p>看图情况</p>
382
+ <p class="special">
383
+ 正常:<span>{{ numberDeal(hospitalTotalData.lookPicNormal) }}</span>
384
+ </p>
385
+ <p class="special">
386
+ 异常:<span>{{ numberDeal(hospitalTotalData.lookPicException) }}</span>
387
+ </p>
388
+ </div>
389
+ </div>
390
+ <div class="hospital_network">
391
+ <img src="~@/assets/images/archive.png" alt="" />
392
+ <div class="picture">
393
+ <p>客户端运行情况</p>
394
+ <p class="special">
395
+ 正常:<span>{{ numberDeal(hospitalTotalData.iuWorkStationNormal) }}</span>
396
+ </p>
397
+ <p class="special">
398
+ 异常:<span>{{ numberDeal(hospitalTotalData.iuWorkStationException) }}</span>
399
+ </p>
400
+ </div>
401
+ </div>
402
+ <h3 class="title-text">今日监测</h3>
403
+ </div>
404
+ </div>
405
+ </div>
406
+ <!--工具栏-->
407
+
408
+ <div class="tableData">
409
+ <!-- 查询条件 -->
410
+
411
+ <!-- 表格 -->
412
+ <div ref="monitorTable">
413
+ <el-table :data="crud.data" v-loading="crud.loading" :element-loading-text="loadingText">
414
+ <el-table-column label="序号" width="85px" :show-overflow-tooltip="true">
415
+ <template slot-scope="scope">
416
+ <span>{{ (crud.page.page - 1) * crud.page.size + scope.$index + 1 }}</span>
417
+ </template>
418
+ </el-table-column>
419
+ <el-table-column prop="hospitalName" label="机构名称" min-width="180px">
420
+ </el-table-column>
421
+ <el-table-column prop="hospitalType" label="机构类别" min-width="80">
422
+ <template slot-scope="scope">
423
+ {{ hosCategory(scope.row.hospitalType) }}
424
+ </template>
425
+ </el-table-column>
426
+ <el-table-column prop="level" label="机构等级" min-width="80">
427
+ <template slot-scope="scope">
428
+ {{ hosRank(scope.row.level) }}
429
+ </template>
430
+ </el-table-column>
431
+ <el-table-column prop="connectStatus" label="是否联网" min-width="80">
432
+ <template slot-scope="scope">
433
+ {{ scope.row.connectStatus == 1 ? '已联网' : '未联网' }}
434
+ </template>
435
+ </el-table-column>
436
+ <el-table-column prop="runningState" label="机构状态" min-width="80">
437
+ <template slot-scope="scope">
438
+ {{ runningStateFilter(scope.row.runningState) }}
439
+ </template>
440
+ </el-table-column>
441
+ <el-table-column prop="monitorStatus" label="是否监测" min-width="100">
442
+ <template slot-scope="scope">
443
+ {{ monitorStatusFilter(scope.row.monitorStatus) }}
444
+ </template>
445
+ </el-table-column>
446
+ <el-table-column prop="lookPicStatus" label="看图情况" min-width="100">
447
+ <template slot-scope="scope">
448
+ <div v-if="scope.row.lookPicStatus == 1" class="warn">
449
+ <i></i>
450
+ <span>异常</span>
451
+ </div>
452
+ <div v-if="scope.row.lookPicStatus == 2" class="normal">
453
+ <i></i>
454
+ <span>正常</span>
455
+ </div>
456
+ <div v-if="scope.row.lookPicStatus == '-'">
457
+ <p>{{ scope.row.lookPicStatus }}</p>
458
+ </div>
459
+ </template>
460
+ </el-table-column>
461
+ <el-table-column prop="abnormalRate" label="看图异常率" min-width="120">
462
+ </el-table-column>
463
+ <el-table-column prop="missingDrawingsRate" label="漏图率(PPM)" min-width="140">
464
+ </el-table-column>
465
+ <el-table-column prop="moreDrawingsRate" label="多图率(PPM)" min-width="140">
466
+ </el-table-column>
467
+ <el-table-column prop="qualityDataStatus" label="归档数据质量情况" min-width="80">
468
+ <template slot-scope="scope">
469
+ <div v-if="scope.row.qualityDataStatus == 1" class="warn">
470
+ <i></i>
471
+ <span>异常</span>
472
+ </div>
473
+ <div v-else-if="scope.row.qualityDataStatus == 2" class="normal">
474
+ <i></i>
475
+ <span>正常</span>
476
+ </div>
477
+ <div v-else>
478
+ <span>{{ '-' }}</span>
479
+ </div>
480
+ </template>
481
+ </el-table-column>
482
+ <el-table-column prop="iuWorkStationStatus" label="客户端运行情况" min-width="80">
483
+ <template slot-scope="scope">
484
+ <div v-if="scope.row.iuWorkStationStatus == 1" class="warn">
485
+ <i></i>
486
+ <span>异常</span>
487
+ </div>
488
+ <div v-else-if="scope.row.iuWorkStationStatus == 2" class="normal">
489
+ <i></i>
490
+ <span>正常</span>
491
+ </div>
492
+ <div v-else>
493
+ <span>{{ '-' }}</span>
494
+ </div>
495
+ </template>
496
+ </el-table-column>
497
+ <el-table-column prop="dayDataStatus" label="日报上传监测" min-width="120">
498
+ <template slot-scope="scope">
499
+ <div v-if="scope.row.dayDataStatus == 1" class="warn">
500
+ <i></i>
501
+ <span>异常</span>
502
+ </div>
503
+ <div v-else-if="scope.row.dayDataStatus == 2" class="normal">
504
+ <i></i>
505
+ <span>正常</span>
506
+ </div>
507
+ <div v-else>
508
+ <span>-</span>
509
+ </div>
510
+ </template>
511
+ </el-table-column>
512
+ <el-table-column prop="urlKey" label="urlKey" min-width="70">
513
+ <template slot-scope="scope">
514
+ {{ scope.row.urlKey || '-' }}
515
+ </template>
516
+ </el-table-column>
517
+ <el-table-column prop="autoUploadType" label="自动上传方式" min-width="120">
518
+ <template slot-scope="scope">
519
+ {{ autoUploadType(scope.row.autoUploadType) || '-' }}
520
+ </template>
521
+ </el-table-column>
522
+
523
+ <el-table-column label="操作" fixed="right" width="250">
524
+ <template slot-scope="scope">
525
+ <el-button size="mini" type="text" @click="toAddRecord(scope.row)"
526
+ >维护记录</el-button
527
+ >
528
+ <el-button
529
+ size="mini"
530
+ type="text"
531
+ :disabled="
532
+ scope.row.lookPicMonitor == 0 &&
533
+ scope.row.gatewayMonitor == 0 &&
534
+ scope.row.monitorStatus == 0
535
+ "
536
+ @click="lookMonitor(scope.row.scenceId)"
537
+ >重新监测</el-button
538
+ >
539
+ <el-button size="mini" type="text" @click="monitorPath(scope.row)"
540
+ >监测详情</el-button
541
+ >
542
+ </template>
543
+ </el-table-column>
544
+ </el-table>
545
+ <!--分页组件-->
546
+ <pagination />
547
+ </div>
548
+ </div>
549
+
550
+ <!-- 维护记录弹窗 -->
551
+ <el-dialog
552
+ :title="hospitalName"
553
+ top="5vh"
554
+ :visible.sync="recordVisible"
555
+ :close-on-click-modal="false"
556
+ :before-close="closeDialog"
557
+ v-if="recordVisible">
558
+ <el-form :model="upHoldForm" ref="upHoldForm" :rules="rules">
559
+ <el-form-item prop="maintainContent">
560
+ <el-input
561
+ type="textarea"
562
+ placeholder="请输入信息"
563
+ v-model.trim="upHoldForm.maintainContent"></el-input>
564
+ </el-form-item>
565
+ </el-form>
566
+ <div class="dialog-footer-bottom">
567
+ <div>
568
+ <span class="el-icon-warning"></span>
569
+ <span>提示:【保存】后不可修改,请确认无误后再提交!</span>
570
+ </div>
571
+ <div>
572
+ <el-button @click="closeDialog">取 消</el-button>
573
+ <el-button class="sure" type="primary" @click="toSubmit('upHoldForm')">保 存</el-button>
574
+ </div>
575
+ </div>
576
+ <!-- 统计次数 -->
577
+ <div class="total">
578
+ 共维护 <span>{{ maintainRecordTotal }}</span> 次
579
+ </div>
580
+ <!-- 时间线 -->
581
+ <div class="timeLine" ref="rightDiv">
582
+ <el-timeline>
583
+ <el-timeline-item
584
+ v-for="(activity, index) in maintainRecordData"
585
+ :key="index"
586
+ color="#1890FF"
587
+ placement="top">
588
+ <div class="content">
589
+ <p>
590
+ <span>{{ activity.operator }}</span
591
+ >&ensp;&ensp;{{ activity.createTime }}
592
+ </p>
593
+ <p>{{ activity.maintainContent }}</p>
594
+ </div>
595
+ </el-timeline-item>
596
+ </el-timeline>
597
+ </div>
598
+ </el-dialog>
599
+ <el-dialog
600
+ title="邮箱配置"
601
+ top="10vh"
602
+ width="560px"
603
+ :visible.sync="emailShow"
604
+ :close-on-click-modal="false">
605
+ <el-dialog width="300px" title="定时发送cron" :visible.sync="innerVisibleCron" append-to-body>
606
+ <span>
607
+ <div v-for="(item, index) in innerVisibleCronList" :key="index">
608
+ <p style="line-height: 1.75em; font-size: 15px; padding-left: 25px">
609
+ {{ item }}
610
+ </p>
611
+ </div>
612
+ </span>
613
+ </el-dialog>
614
+ <span class="EmailSet">
615
+ <el-form size="small" :model="form" ref="form" :rules="rules" label-width="110px">
616
+ <el-form-item label="定时发送cron" prop="cron">
617
+ <el-input v-model.trim="form.cron" placeholder="请输入定时发送cron"></el-input>
618
+ <div class="testCron">
619
+ <el-button type="primary" @click="checkCorn">测试cron</el-button>
620
+ </div>
621
+ </el-form-item>
622
+ <div v-for="(item, index) in form.cardForm" :key="index" class="cardForm">
623
+ <el-form-item
624
+ label="邮箱地址"
625
+ :prop="`cardForm.${index}.mailAdress`"
626
+ :rules="rules.cardForm.mailAdress">
627
+ <!-- " -->
628
+ <el-input v-model.trim="item.mailAdress" placeholder="请输入邮箱"></el-input>
629
+ </el-form-item>
630
+ <div class="emailAdd">
631
+ <el-button
632
+ type="primary"
633
+ size="mini"
634
+ icon="el-icon-plus"
635
+ @click="EmailCickAdd"
636
+ circle></el-button>
637
+ <el-button
638
+ v-if="form.cardForm.length != 1"
639
+ type="danger"
640
+ @click="EmailCickDel(index)"
641
+ size="mini"
642
+ icon="el-icon-minus"
643
+ circle></el-button>
644
+ </div>
645
+ </div>
646
+ </el-form>
647
+ </span>
648
+ <span slot="footer" class="dialog-footer">
649
+ <el-button size="small" @click="emailShow = false">取 消</el-button>
650
+ <el-button
651
+ size="small"
652
+ type="primary"
653
+ :loading="submitFormLoading"
654
+ @click="submitForm('form')"
655
+ >确 定</el-button
656
+ >
657
+ </span>
658
+ </el-dialog>
659
+ </div>
660
+ </template>
661
+
662
+ <script>
663
+ import { mapGetters } from 'vuex';
664
+ import institutionMonitor, {
665
+ monitorAllType,
666
+ totalMonitoring,
667
+ } from '@/api/institutionMonitor/index';
668
+ import pagination from '@crud/Pagination';
669
+ import CRUD, { presenter, header, crud } from '@crud/crud';
670
+ import { downloadFile } from '@/utils/index';
671
+ import { download } from '@/api/data';
672
+ import DateRangePicker from '@/components/DateRangePicker';
673
+ import { getDay } from '@/utils/getTime';
674
+
675
+ const start = getDay(-30) + ' 00:00:00';
676
+ const end = getDay(-1) + ' 23:59:59';
677
+ export default {
678
+ name: 'institutionMonitor',
679
+ components: {
680
+ institutionMonitor,
681
+ pagination,
682
+ DateRangePicker,
683
+ },
684
+ dicts: [
685
+ 'monitor_status',
686
+ 'ins_category',
687
+ 'agency_hos_rank',
688
+ 'gateway_status',
689
+ 'connect_status',
690
+ 'running_status',
691
+ 'auto_upload_type',
692
+ 'quality_data_status',
693
+ 'iu_workstation_status',
694
+ 'machineInfo_status',
695
+ 'chargeAmount_status',
696
+ ],
697
+ cruds() {
698
+ return CRUD({
699
+ title: '机构',
700
+ url: '',
701
+ crudMethod: { ...institutionMonitor },
702
+ sort: [],
703
+ query: {
704
+ checkTime: [start, end],
705
+ },
706
+ });
707
+ },
708
+ data() {
709
+ var checkEmailAdress = (rule, value, callback) => {
710
+ let indexOfNun = rule.field.indexOf('.mailAdress');
711
+ let num = Number(rule.field.substring(9, indexOfNun));
712
+ if (this.form.cardForm.length > 1) {
713
+ let data = [];
714
+ this.form.cardForm.forEach((tmp, index) => {
715
+ if (tmp.mailAdress == this.form.cardForm[num].mailAdress) {
716
+ data.push(tmp);
717
+ }
718
+ });
719
+ if (data.length == 1) {
720
+ callback();
721
+ } else {
722
+ callback(new Error('邮箱地址已存在,请重新输入'));
723
+ }
724
+ } else {
725
+ callback();
726
+ }
727
+ };
728
+ return {
729
+ waterMarkProp: {
730
+ zIndex: 1,
731
+ devicePixelRatio: 2,
732
+ text: '',
733
+ showTime: true,
734
+ },
735
+ rules: {
736
+ query: {},
737
+ maintainContent: [{ required: true, message: '请输入维护记录', trigger: 'blur' }],
738
+ },
739
+ fixedDivHeight: 0,
740
+ tableHeight: '500px',
741
+ archiveFlagArr: [
742
+ { value: '0', label: '否' },
743
+ { value: '1', label: '是' },
744
+ ],
745
+ dayDataMonitorList: [
746
+ { value: '1', label: '异常' },
747
+ { value: '2', label: '正常' },
748
+ ],
749
+ // 机构总数数据
750
+ hospitalTotalData: {},
751
+ // 维护记录弹窗显示与隐藏
752
+ recordVisible: false,
753
+ formatEmpty: '-',
754
+ // 表单传取参数
755
+ upHoldForm: {
756
+ maintainContent: '',
757
+ },
758
+ // 机构地区存取数据
759
+ provinceList: [],
760
+ // 机构地区绑定的关系
761
+ props: {
762
+ value: 'value',
763
+ children: 'cities',
764
+ label: 'label',
765
+ checkStrictly: true,
766
+ },
767
+ // 维护记录
768
+ maintainRecordTotal: 0,
769
+ maintainRecordData: [],
770
+ // 添加维护记录的id
771
+ scenceId: '',
772
+ hospitalName: '',
773
+ // 维护记录分页加载
774
+ recordPage: 0,
775
+ // 导出加载图标的显示与隐藏
776
+ downloadLoading: false,
777
+ downloadLoading1: false,
778
+ downloadLoading2: false,
779
+ emailShow: false,
780
+ loadingText: '',
781
+ visible: false,
782
+ form: {
783
+ cron: '',
784
+ cardForm: [{ mailAdress: '' }],
785
+ },
786
+ rules: {
787
+ cron: [{ required: true, message: '请输入定时发送cron', trigger: ['blur', 'change'] }],
788
+ cardForm: {
789
+ mailAdress: [
790
+ { required: true, message: '请输入邮箱地址', trigger: ['blur', 'change'] },
791
+ {
792
+ type: 'email',
793
+ message: '请输入正确的邮箱地址',
794
+ trigger: ['blur', 'change'],
795
+ },
796
+ { validator: checkEmailAdress, trigger: ['blur', 'change'] },
797
+ ],
798
+ },
799
+ },
800
+ emailList: [],
801
+ innerVisibleCron: false,
802
+ innerVisibleCronList: [],
803
+ submitFormLoading: false,
804
+ cron: '',
805
+ empty: '-',
806
+ crudShow: false,
807
+ tableShowHeight: '0',
808
+ // 总监测数据
809
+ totalMonitoringData: {},
810
+ pickerOptions: {
811
+ disabledDate(time) {
812
+ return time.getTime() > Date.now();
813
+ },
814
+ shortcuts: [
815
+ {
816
+ text: '近一周',
817
+ onClick(picker) {
818
+ const end = new Date();
819
+ const start = new Date();
820
+ end.setTime(end.getTime() - 3600 * 1000 * 24);
821
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
822
+ picker.$emit('pick', [start, end]);
823
+ },
824
+ },
825
+ {
826
+ text: '近一个月',
827
+ onClick(picker) {
828
+ const end = new Date();
829
+ const start = new Date();
830
+ end.setTime(end.getTime() - 3600 * 1000 * 24);
831
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
832
+ picker.$emit('pick', [start, end]);
833
+ },
834
+ },
835
+ {
836
+ text: '近三个月',
837
+ onClick(picker) {
838
+ const end = new Date();
839
+ const start = new Date();
840
+ end.setTime(end.getTime() - 3600 * 1000 * 24);
841
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
842
+ picker.$emit('pick', [start, end]);
843
+ },
844
+ },
845
+ {
846
+ text: '最近一年',
847
+ onClick: picker => {
848
+ const end = new Date(); // 当前日期
849
+ const start = new Date(); // 开始日期
850
+
851
+ end.setDate(end.getDate() - 1); // 设置结束日期为昨天
852
+ start.setFullYear(start.getFullYear() - 1); // 设置开始日期为一年前
853
+
854
+ picker.$emit('pick', [start, end]);
855
+ },
856
+ },
857
+ {
858
+ text: '本年度',
859
+ onClick: picker => {
860
+ const end = new Date(); // 当前日期
861
+ const start = new Date(); // 开始日期
862
+ start.setDate(1);
863
+ end.setDate(end.getDate() - 1); // 设置结束日期为昨天
864
+ start.setMonth(0); // 设置开始日期为今年的1月份
865
+ picker.$emit('pick', [start, end]);
866
+ },
867
+ },
868
+ ],
869
+ },
870
+ };
871
+ },
872
+
873
+ created() {
874
+ this.query.checkTime = [start, end];
875
+ this.dateChange(1);
876
+ // 加载机构地区;
877
+ this.getPosition(null, () => {});
878
+ this.getMailAdress();
879
+ },
880
+ mounted() {
881
+ this.$nextTick(() => {
882
+ // console.log(this.$refs.fixedDiv.clientHeight, this.fixedDivHeight);
883
+ this.fixedDivHeight = this.$refs.fixedDiv.clientHeight;
884
+ if (this.$refs.topForm)
885
+ this.tableHeight =
886
+ this.$refs.monitorContainer.clientHeight - this.$refs.topForm.$el.offsetHeigh - 150;
887
+ window.addEventListener('resize', () => {
888
+ this.fixedDivHeight = this.$refs.fixedDiv.clientHeight;
889
+ });
890
+ this.waterMarkProp.text = this.user.name;
891
+ });
892
+ // 获取机构总数
893
+ },
894
+
895
+ computed: {
896
+ ...mapGetters(['user', 'sidebar']),
897
+ },
898
+ mixins: [presenter(), header(), crud()],
899
+
900
+ methods: {
901
+ inputChange() {
902
+ this.$forceUpdate();
903
+ },
904
+ getToQuery() {
905
+ this.crud.url = 'monitor/hospitalPage';
906
+ this.getHospitalTotal();
907
+ this.totalMonitoring();
908
+ this.crud.toQuery();
909
+ },
910
+ // 转换千分位
911
+ numberDeal(value) {
912
+ return value != '-' ? parseInt(value).toLocaleString() : value;
913
+ },
914
+ // 日期改变
915
+ dateChange(status) {
916
+ this.query.monitorStartDate = this.query.checkTime[0];
917
+ this.query.monitorEndDate = this.query.checkTime[1];
918
+ if (status == 1) {
919
+ this.provinceChange();
920
+ } else {
921
+ this.getToQuery();
922
+ }
923
+ this.forceUpdate();
924
+ },
925
+ // 总监测接口
926
+ totalMonitoring() {
927
+ let data = JSON.parse(JSON.stringify(this.query));
928
+ const query = {
929
+ ...data,
930
+ hospitalTypeList: this.query.hospitalTypeList
931
+ ? this.query.hospitalTypeList.join(',')
932
+ : this.query.hospitalTypeList,
933
+ levelList: this.query.levelList ? this.query.levelList.join(',') : this.query.levelList,
934
+ };
935
+ delete query.checkTime;
936
+ delete query.address;
937
+
938
+ totalMonitoring(query).then(res => {
939
+ this.totalMonitoringData = res;
940
+ });
941
+ },
942
+ //一键监测
943
+ fastMonitorFn() {
944
+ const { city, district, hospitalTypeList, levelList, province } = this.crud.query;
945
+ let data = {
946
+ city,
947
+ district,
948
+ ...this.crud.query,
949
+ hospitalTypeList: this.crud.query.hospitalTypeList
950
+ ? this.crud.query.hospitalTypeList.join(',')
951
+ : this.crud.query.hospitalTypeList,
952
+ levelList: this.crud.query.levelList
953
+ ? this.crud.query.levelList.join(',')
954
+ : this.crud.query.levelList,
955
+ province,
956
+ };
957
+ if (this.crud.query.address && this.crud.query.address[0]) {
958
+ data.province = this.crud.query.address[0];
959
+ }
960
+ if (this.crud.query.address && this.crud.query.address[1]) {
961
+ data.city = this.crud.query.address[1];
962
+ }
963
+ if (this.crud.query.address && this.crud.query.address[2]) {
964
+ data.district = this.crud.query.address[2];
965
+ }
966
+ delete data['address'];
967
+ delete data['checkTime'];
968
+ monitorAllType(data).then(res => {
969
+ if (res) {
970
+ this.visible = false;
971
+ this.$message.success('一键异常监测成功');
972
+ } else {
973
+ console.log('监测中', 1111);
974
+ this.visible = false;
975
+ this.$message.warning('监测中,请30秒后再试');
976
+ }
977
+ });
978
+ },
979
+ [CRUD.HOOK.beforeRefresh](crud) {
980
+ if (!this.query.address && !this.crudShow)
981
+ this.query.address = [window.config.defaultAddress];
982
+ this.crudShow = true;
983
+ // this.setTableHeight();
984
+ },
985
+ autoUploadType(category) {
986
+ return this.dict.label.auto_upload_type[category];
987
+ },
988
+ runningStateFilter(rank) {
989
+ return this.dict.label.running_status[rank] || '-';
990
+ },
991
+ monitorStatusFilter(rank) {
992
+ return this.dict.label.monitor_status[rank] || '-';
993
+ },
994
+ // 邮箱配置
995
+ EmailConfiguration() {
996
+ this.$nextTick(() => {
997
+ this.form.cron = this.cron;
998
+ this.form.cardForm = [{ mailAdress: '' }];
999
+ this.form.cardForm = JSON.parse(JSON.stringify(this.emailList));
1000
+ if (this.form.cardForm.length == 0) {
1001
+ this.form.cardForm = [{ mailAdress: '' }];
1002
+ }
1003
+ setTimeout(() => {
1004
+ this.emailShow = true;
1005
+ }, 500);
1006
+ // setTimeout(() => { this.$refs['form'].resetFields() }, 800)
1007
+ });
1008
+ },
1009
+ EmailCickAdd() {
1010
+ this.form.cardForm.push({ mailAdress: '' });
1011
+ this.$nextTick(() => {
1012
+ // this.$refs.form.clearValidate();
1013
+ this.$refs.form.$el.scrollTop = this.$refs.form.$el.scrollHeight;
1014
+ });
1015
+ },
1016
+ EmailCickDel(index) {
1017
+ this.form.cardForm.splice(index, 1);
1018
+ },
1019
+ submitForm(formName) {
1020
+ this.$refs[formName].validate(valid => {
1021
+ if (valid) {
1022
+ this.submitFormLoading = true;
1023
+ institutionMonitor
1024
+ .checkCorn(this.form.cron)
1025
+ .then(res => {
1026
+ if (res.content && res.content.length != 0) {
1027
+ this.emailShow = false;
1028
+ let data = {
1029
+ corn: this.form.cron,
1030
+ mailAdress: [],
1031
+ taskName: 'SEND_MAIL',
1032
+ };
1033
+ this.form.cardForm.forEach(tmp => data.mailAdress.push(tmp.mailAdress));
1034
+ institutionMonitor.updateMailAdress(data).then(res => {
1035
+ this.submitFormLoading = false;
1036
+ this.getMailAdress();
1037
+ this.emailShow = false;
1038
+ this.$message.success('保存成功');
1039
+ });
1040
+ } else {
1041
+ this.submitFormLoading = false;
1042
+ this.form.cron = '';
1043
+ this.$message.error('定时发送cron输入错误,请重新输入');
1044
+ }
1045
+ })
1046
+ .catch(err => {
1047
+ this.submitFormLoading = false;
1048
+ this.$message.error('定时发送cron格式错误,请重新输入');
1049
+ });
1050
+ // this.emailShow = false
1051
+ } else {
1052
+ console.log('error submit!!');
1053
+ return false;
1054
+ }
1055
+ });
1056
+ },
1057
+ lookMonitor(id) {
1058
+ this.crud.loading = true;
1059
+ this.loadingText = '正在监测...';
1060
+ institutionMonitor.monitorAgain({ scenceId: id, type: 1 }).then(res => {
1061
+ this.crud.toQuery();
1062
+ this.loadingText = '';
1063
+ this.$message.success('监测完成');
1064
+ });
1065
+ },
1066
+ getMailAdress() {
1067
+ institutionMonitor.getMailAdress().then(res => {
1068
+ this.cron = res.corn;
1069
+ this.emailList = JSON.parse(JSON.stringify(res.mailAdress));
1070
+ });
1071
+ },
1072
+ // 测试cron
1073
+ checkCorn() {
1074
+ if (this.form.cron) {
1075
+ institutionMonitor
1076
+ .checkCorn(this.form.cron)
1077
+ .then(res => {
1078
+ this.innerVisibleCron = true;
1079
+ this.innerVisibleCronList = res.content;
1080
+ })
1081
+ .catch(error => {
1082
+ this.$message.error('定时发送cron格式错误,请重新输入');
1083
+ });
1084
+ } else {
1085
+ this.$message.error('请输入定时发送cron');
1086
+ }
1087
+ },
1088
+ // 获取机构总数
1089
+ getHospitalTotal() {
1090
+ let data = JSON.parse(JSON.stringify(this.query));
1091
+ const query = {
1092
+ ...data,
1093
+ hospitalTypeList: this.query.hospitalTypeList
1094
+ ? this.query.hospitalTypeList.join(',')
1095
+ : this.query.hospitalTypeList,
1096
+ levelList: this.query.levelList ? this.query.levelList.join(',') : this.query.levelList,
1097
+ };
1098
+ delete query.checkTime;
1099
+ delete query.address;
1100
+ institutionMonitor.hospitalTotal(query).then(res => {
1101
+ this.hospitalTotalData = res;
1102
+ });
1103
+ },
1104
+ // 处理数据
1105
+ dealData(query, status) {
1106
+ let str;
1107
+ if (query && status) {
1108
+ str = status;
1109
+ } else {
1110
+ str = '';
1111
+ }
1112
+ return str;
1113
+ },
1114
+ // 监测详情跳转
1115
+ monitorPath(row) {
1116
+ this.$router.push({
1117
+ name: 'monitorDetail',
1118
+ params: {
1119
+ scenceId: row.scenceId,
1120
+ },
1121
+ });
1122
+ },
1123
+ // 导出
1124
+ exportTable() {
1125
+ if (this.crud.data.length != 0) {
1126
+ this.downloadLoading = true;
1127
+ download('monitor/download', this.query)
1128
+ .then(result => {
1129
+ this.downloadLoading = false;
1130
+ })
1131
+ .catch(e => {
1132
+ downloadFile(e, '维护记录', 'xlsx');
1133
+ this.downloadLoading = false;
1134
+ });
1135
+ } else {
1136
+ this.$message.error('没有相关详情数据, 无法导出');
1137
+ }
1138
+ },
1139
+ exportMonitorDetail() {
1140
+ if (this.crud.data.length != 0) {
1141
+ this.downloadLoading2 = true;
1142
+ download('monitor/downloadMonitorInfo', this.query)
1143
+ .then(result => {
1144
+ this.downloadLoading2 = false;
1145
+ })
1146
+ .catch(e => {
1147
+ downloadFile(e, '看图监测详情', 'xlsx');
1148
+ this.downloadLoading2 = false;
1149
+ });
1150
+ } else {
1151
+ this.$message.error('没有相关详情数据, 无法导出');
1152
+ }
1153
+ },
1154
+ exportTable1() {
1155
+ if (this.crud.data.length != 0) {
1156
+ this.downloadLoading1 = true;
1157
+ download('monitor/downloadHosp', this.query)
1158
+ .then(result => {
1159
+ this.downloadLoading1 = false;
1160
+ })
1161
+ .catch(e => {
1162
+ downloadFile(e, '机构监测详情', 'xlsx');
1163
+ this.downloadLoading1 = false;
1164
+ });
1165
+ } else {
1166
+ this.$message.error('没有相关详情数据, 无法导出');
1167
+ }
1168
+ },
1169
+ // 机构类别和机构等级改变,接口调用
1170
+ rightChange(e) {
1171
+ this.crud.toQuery();
1172
+ this.getHospitalTotal();
1173
+ this.totalMonitoring();
1174
+ },
1175
+ // 一级二级改变的时候调取下一级数据
1176
+ handleItemChange(val) {
1177
+ this.getPosition(val);
1178
+ },
1179
+ // 地区联动获取数据
1180
+ getPosition(val, cb) {
1181
+ let vm = this; //查询省市县
1182
+ let params = { parent: 1 };
1183
+ if (!val) {
1184
+ //初始化加载 获取所有省份数据
1185
+ params = { parent: 1 };
1186
+ } else if (val.length === 1) {
1187
+ //加载二级 获取市级数据
1188
+ params = { parent: val[0] };
1189
+ } else {
1190
+ //加载3级 获取县级数据
1191
+ params = { parent: val[1] };
1192
+ }
1193
+ institutionMonitor
1194
+ .queryNation(params)
1195
+ .then(res => {
1196
+ if (!val) {
1197
+ //初始化加载 查询省份数据
1198
+ vm.provinceList = res.content.map(e => {
1199
+ return {
1200
+ value: e.saleid,
1201
+ label: e.province,
1202
+ cities: [],
1203
+ };
1204
+ });
1205
+ } else if (val.length === 1) {
1206
+ //加载二级 查询该省下市级数据
1207
+ vm.provinceList.map(item => {
1208
+ if (item.value === val[0]) {
1209
+ item.cities = res.content.map(e => {
1210
+ return {
1211
+ value: e.saleid,
1212
+ label: e.city || e.county,
1213
+ cities: [],
1214
+ };
1215
+ });
1216
+ }
1217
+ });
1218
+ } else {
1219
+ //加载3级 查询该省市下县级数据
1220
+ vm.provinceList.map(item => {
1221
+ if (item.value === val[0]) {
1222
+ item.cities.map(value => {
1223
+ if (value.value === val[1]) {
1224
+ value.cities = res.content.map(e => {
1225
+ return { value: e.saleid, label: e.county };
1226
+ });
1227
+ }
1228
+ });
1229
+ }
1230
+ });
1231
+ }
1232
+ cb && cb(res);
1233
+ })
1234
+ .catch(err => {
1235
+ console.log(err);
1236
+ });
1237
+ },
1238
+ // 地区选择改变,刷新数据
1239
+ provinceChange(e) {
1240
+ if (e) {
1241
+ let provinceList = [];
1242
+ let cityList = [];
1243
+ let districtList = [];
1244
+ for (let item of e) {
1245
+ if (item.length == 1) {
1246
+ provinceList.push(item[item.length - 1]);
1247
+ }
1248
+ if (item.length == 2) {
1249
+ cityList.push(item[item.length - 1]);
1250
+ }
1251
+ if (item.length == 3) {
1252
+ districtList.push(item[item.length - 1]);
1253
+ }
1254
+ }
1255
+ this.query.provinceList = provinceList;
1256
+ this.query.cityList = cityList;
1257
+ this.query.districtList = districtList;
1258
+ }
1259
+ this.query.province = this.dealData(this.query.address, this.query.address[0]);
1260
+ this.query.city = this.dealData(this.query.address, this.query.address[1]);
1261
+ this.query.district = this.dealData(this.query.address, this.query.address[2]);
1262
+ this.getToQuery();
1263
+ },
1264
+
1265
+ // 返回机构类别对应的名称
1266
+ hosCategory(category) {
1267
+ return this.dict.label.ins_category[category];
1268
+ },
1269
+ // 返回机构等级对应的名称
1270
+ hosRank(rank) {
1271
+ return this.dict.label.agency_hos_rank[rank];
1272
+ },
1273
+ // 获取维护记录详情
1274
+ getMaintainRecordPage() {
1275
+ institutionMonitor
1276
+ .getRecord({
1277
+ scenceId: this.scenceId,
1278
+ page: this.recordPage,
1279
+ size: 3,
1280
+ })
1281
+ .then(res => {
1282
+ this.maintainRecordTotal = res.totalElements;
1283
+ this.maintainRecordData = this.maintainRecordData.concat(res.content);
1284
+ });
1285
+ },
1286
+ // 关闭对话框
1287
+ closeDialog() {
1288
+ this.recordVisible = false;
1289
+ this.upHoldForm = {
1290
+ maintainContent: '',
1291
+ };
1292
+ this.recordPage = 0;
1293
+ },
1294
+ // 添加记录
1295
+ toAddRecord(row) {
1296
+ this.maintainRecordData = [];
1297
+ this.recordVisible = true;
1298
+ this.scenceId = row.scenceId;
1299
+ this.hospitalName = '维护记录 ' + '(' + row.hospitalName + ')';
1300
+ this.getMaintainRecordPage();
1301
+ this.$nextTick(() => {
1302
+ this.$refs.rightDiv.addEventListener('scroll', this.scroll);
1303
+ });
1304
+ },
1305
+ // 提交
1306
+ toSubmit(formName) {
1307
+ this.$refs[formName].validate(valid => {
1308
+ if (valid) {
1309
+ const query = {
1310
+ scenceId: this.scenceId,
1311
+ operator: this.user.name || 'ygadmin',
1312
+ ...this.upHoldForm,
1313
+ };
1314
+ institutionMonitor.addRecord(query).then(res => {
1315
+ this.$message.success('添加成功');
1316
+ this.closeDialog();
1317
+ });
1318
+ } else {
1319
+ this.$message.error('请输入内容');
1320
+ return false;
1321
+ }
1322
+ });
1323
+ },
1324
+ // 监听滚动,加载下一页
1325
+ scroll() {
1326
+ const scrollTop = this.$refs.rightDiv.scrollTop;
1327
+ // 获取可视区的高度
1328
+ const windowHeight = this.$refs.rightDiv.clientHeight;
1329
+ // 获取滚动条的总高度
1330
+ const scrollHeight = this.$refs.rightDiv.scrollHeight;
1331
+ if (scrollTop + windowHeight >= scrollHeight) {
1332
+ // 把距离顶部的距离加上可视区域的高度 等于或者大于滚动条的总高度就是到达底部
1333
+ // 调用函数
1334
+ this.recordPage++;
1335
+ this.getMaintainRecordPage();
1336
+ }
1337
+ },
1338
+ // 重置
1339
+
1340
+ resetForm() {
1341
+ this.$refs.topForm.resetFields();
1342
+ this.query.checkTime = [start, end];
1343
+ this.query.province = '';
1344
+ this.query.city = '';
1345
+ this.query.district = '';
1346
+ this.dateChange(1);
1347
+ },
1348
+ forceUpdate() {
1349
+ this.$forceUpdate();
1350
+ },
1351
+ qualityDataFilter(status) {
1352
+ return this.dict.label.quality_data_status[status];
1353
+ },
1354
+ iuWorkStationFilter(status) {
1355
+ return this.dict.label.iu_workstation_status[status];
1356
+ },
1357
+ machineInfoFilter(status) {
1358
+ return this.dict.label.machineInfo_status[status];
1359
+ },
1360
+ },
1361
+
1362
+ destroyed() {
1363
+ window.removeEventListener('scroll', this.scroll); // 离开页面清除(移除)滚轮滚动事件
1364
+ },
1365
+ activated() {
1366
+ this.$nextTick(() => {
1367
+ setTimeout(() => {
1368
+ this.fixedDivHeight = this.$refs.fixedDiv.clientHeight;
1369
+ // console.log(this.fixedDivHeight);
1370
+ }, 1000);
1371
+ });
1372
+ this.crud.toQuery();
1373
+ this.getHospitalTotal();
1374
+ },
1375
+ };
1376
+ </script>
1377
+
1378
+ <style rel="stylesheet/scss" lang="scss" scoped>
1379
+ @import './index.scss';
1380
+ .form-inline-hospital {
1381
+ position: relative;
1382
+ background-color: #fff;
1383
+ // z-index: 10;
1384
+ }
1385
+ </style>