ylyx-cli 1.0.15 → 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 (285) hide show
  1. package/bin/ylyx.js +168 -168
  2. package/lib/config.js +283 -299
  3. package/lib/deploy.js +529 -495
  4. package/lib/generator.js +192 -192
  5. package/lib/index.js +113 -113
  6. package/lib/interactive.js +87 -87
  7. package/lib/remote.js +179 -179
  8. package/lib/template.js +174 -174
  9. package/lib/utils.js +148 -148
  10. package/package.json +5 -5
  11. package/templates/react-app/files/README.md +23 -23
  12. package/templates/react-app/files/package.json +28 -28
  13. package/templates/react-app/files/public/index.html +11 -11
  14. package/templates/react-app/files/src/App.css +15 -15
  15. package/templates/react-app/files/src/App.js +15 -15
  16. package/templates/react-app/files/src/index.css +10 -10
  17. package/templates/react-app/files/src/index.js +11 -11
  18. package/templates/react-app/template.json +11 -11
  19. package/templates/react-component/files/Component.module.css +5 -5
  20. package/templates/react-component/files/Component.tsx +31 -31
  21. package/templates/react-component/files/index.ts +2 -2
  22. package/templates/react-component/template.json +48 -48
  23. package/templates/vue-app/files/.editorconfig +14 -14
  24. package/templates/vue-app/files/.env.development +21 -21
  25. package/templates/vue-app/files/.env.production +18 -18
  26. package/templates/vue-app/files/.eslintignore +5 -5
  27. package/templates/vue-app/files/.eslintrc.js +267 -267
  28. package/templates/vue-app/files/.prettierignore +11 -11
  29. package/templates/vue-app/files/.travis.yml +5 -5
  30. package/templates/vue-app/files/.vscode/extensions.json +7 -7
  31. package/templates/vue-app/files/.vscode/settings.json +39 -39
  32. package/templates/vue-app/files/LICENSE +191 -191
  33. package/templates/vue-app/files/README.md +87 -87
  34. package/templates/vue-app/files/babel.config.js +11 -11
  35. package/templates/vue-app/files/jest.config.js +24 -24
  36. package/templates/vue-app/files/package.json +136 -136
  37. package/templates/vue-app/files/plopfile.js +7 -7
  38. package/templates/vue-app/files/postcss.config.js +5 -5
  39. package/templates/vue-app/files/public/default.js +25 -25
  40. package/templates/vue-app/files/public/index.html +26 -26
  41. package/templates/vue-app/files/src/App.vue +54 -54
  42. package/templates/vue-app/files/src/api/bigDataV/index.js +198 -198
  43. package/templates/vue-app/files/src/api/data.js +42 -42
  44. package/templates/vue-app/files/src/api/dataArchive/index.js +186 -186
  45. package/templates/vue-app/files/src/api/generator/genConfig.js +16 -16
  46. package/templates/vue-app/files/src/api/generator/generator.js +32 -32
  47. package/templates/vue-app/files/src/api/indexManagement/index.js +39 -39
  48. package/templates/vue-app/files/src/api/institutionMonitor/index.js +396 -396
  49. package/templates/vue-app/files/src/api/institutionSet/index.js +120 -120
  50. package/templates/vue-app/files/src/api/login.js +44 -44
  51. package/templates/vue-app/files/src/api/selfStatistics/index.js +50 -50
  52. package/templates/vue-app/files/src/api/system/code.js +15 -15
  53. package/templates/vue-app/files/src/api/system/dict.js +34 -34
  54. package/templates/vue-app/files/src/api/system/dictDetail.js +52 -52
  55. package/templates/vue-app/files/src/api/system/equipment.js +35 -35
  56. package/templates/vue-app/files/src/api/system/examManage.js +49 -49
  57. package/templates/vue-app/files/src/api/system/examProject.js +48 -48
  58. package/templates/vue-app/files/src/api/system/hosModel.js +35 -35
  59. package/templates/vue-app/files/src/api/system/hospital.js +88 -88
  60. package/templates/vue-app/files/src/api/system/job.js +40 -40
  61. package/templates/vue-app/files/src/api/system/menu.js +67 -67
  62. package/templates/vue-app/files/src/api/system/model.js +42 -42
  63. package/templates/vue-app/files/src/api/system/risConfig.js +9 -9
  64. package/templates/vue-app/files/src/api/system/role.js +64 -64
  65. package/templates/vue-app/files/src/api/system/sysSet.js +19 -19
  66. package/templates/vue-app/files/src/api/system/timing.js +41 -41
  67. package/templates/vue-app/files/src/api/system/user.js +121 -121
  68. package/templates/vue-app/files/src/api/tools/alipay.js +25 -25
  69. package/templates/vue-app/files/src/api/tools/email.js +24 -24
  70. package/templates/vue-app/files/src/api/tools/localStorage.js +27 -27
  71. package/templates/vue-app/files/src/api/tools/qiniu.js +40 -40
  72. package/templates/vue-app/files/src/assets/css/font-awesome.css +2342 -2342
  73. package/templates/vue-app/files/src/assets/css/font-awesome.min.css +2336 -2336
  74. package/templates/vue-app/files/src/assets/fonts/fontawesome-webfont.svg +2671 -2671
  75. package/templates/vue-app/files/src/assets/icons/index.js +9 -9
  76. package/templates/vue-app/files/src/assets/icons/svg/hospital.svg +1 -1
  77. package/templates/vue-app/files/src/assets/icons/svg/hospital1.svg +1 -1
  78. package/templates/vue-app/files/src/assets/icons/svg/loginOne.svg +35 -35
  79. package/templates/vue-app/files/src/assets/icons/svg/loginOneWhite.svg +19 -19
  80. package/templates/vue-app/files/src/assets/icons/svg/loginOr.svg +93 -93
  81. package/templates/vue-app/files/src/assets/icons/svg/loginUp.svg +96 -96
  82. package/templates/vue-app/files/src/assets/icons/svg/monitor.svg +1 -1
  83. package/templates/vue-app/files/src/assets/icons/svg/offline.svg +1 -1
  84. package/templates/vue-app/files/src/assets/icons/svg/online.svg +1 -1
  85. package/templates/vue-app/files/src/assets/icons/svg/system.svg +1 -1
  86. package/templates/vue-app/files/src/assets/icons/svgo.yml +21 -21
  87. package/templates/vue-app/files/src/assets/styles/btn.scss +103 -103
  88. package/templates/vue-app/files/src/assets/styles/eladmin.scss +124 -124
  89. package/templates/vue-app/files/src/assets/styles/element-ui.scss +217 -217
  90. package/templates/vue-app/files/src/assets/styles/element-variables.scss +31 -31
  91. package/templates/vue-app/files/src/assets/styles/global.scss +73 -73
  92. package/templates/vue-app/files/src/assets/styles/index.scss +220 -220
  93. package/templates/vue-app/files/src/assets/styles/mixin.scss +60 -60
  94. package/templates/vue-app/files/src/assets/styles/publicStyle.scss +224 -224
  95. package/templates/vue-app/files/src/assets/styles/sidebar.scss +239 -239
  96. package/templates/vue-app/files/src/assets/styles/transition.scss +48 -48
  97. package/templates/vue-app/files/src/assets/styles/variables.scss +44 -44
  98. package/templates/vue-app/files/src/common/flexible.js +145 -145
  99. package/templates/vue-app/files/src/components/Breadcrumb/index.vue +87 -87
  100. package/templates/vue-app/files/src/components/Crud/CRUD.operation.vue +248 -248
  101. package/templates/vue-app/files/src/components/Crud/Pagination.vue +20 -20
  102. package/templates/vue-app/files/src/components/Crud/RR.operation.vue +39 -39
  103. package/templates/vue-app/files/src/components/Crud/UD.operation.vue +106 -106
  104. package/templates/vue-app/files/src/components/Crud/crud.js +907 -907
  105. package/templates/vue-app/files/src/components/Crud/user/UR.operation.vue +154 -154
  106. package/templates/vue-app/files/src/components/DateRangePicker/index.vue +42 -42
  107. package/templates/vue-app/files/src/components/DateRangePickerProhibitNext/index.vue +42 -42
  108. package/templates/vue-app/files/src/components/DateRangePickerProhibitTodayNext/index.vue +48 -48
  109. package/templates/vue-app/files/src/components/Dict/Dict.js +31 -31
  110. package/templates/vue-app/files/src/components/Dict/index.js +29 -29
  111. package/templates/vue-app/files/src/components/Doc/index.vue +16 -16
  112. package/templates/vue-app/files/src/components/Echarts/BarChart.vue +115 -115
  113. package/templates/vue-app/files/src/components/Echarts/Category.vue +768 -768
  114. package/templates/vue-app/files/src/components/Echarts/Funnel.vue +120 -120
  115. package/templates/vue-app/files/src/components/Echarts/Gauge.vue +74 -74
  116. package/templates/vue-app/files/src/components/Echarts/Graph.vue +101 -101
  117. package/templates/vue-app/files/src/components/Echarts/HeatMap.vue +301 -301
  118. package/templates/vue-app/files/src/components/Echarts/Line3D.vue +110 -110
  119. package/templates/vue-app/files/src/components/Echarts/PieChart.vue +84 -84
  120. package/templates/vue-app/files/src/components/Echarts/Point.vue +161 -161
  121. package/templates/vue-app/files/src/components/Echarts/RadarChart.vue +123 -123
  122. package/templates/vue-app/files/src/components/Echarts/Rich.vue +160 -160
  123. package/templates/vue-app/files/src/components/Echarts/Sankey.vue +114 -114
  124. package/templates/vue-app/files/src/components/Echarts/Scatter.vue +192 -192
  125. package/templates/vue-app/files/src/components/Echarts/Sunburst.vue +127 -127
  126. package/templates/vue-app/files/src/components/Echarts/ThemeRiver.vue +233 -233
  127. package/templates/vue-app/files/src/components/Echarts/WordCloud.vue +201 -201
  128. package/templates/vue-app/files/src/components/GithubCorner/index.vue +55 -55
  129. package/templates/vue-app/files/src/components/Hamburger/index.vue +44 -44
  130. package/templates/vue-app/files/src/components/HeaderSearch/index.vue +196 -196
  131. package/templates/vue-app/files/src/components/IconSelect/index.vue +74 -74
  132. package/templates/vue-app/files/src/components/IconSelect/requireIcons.js +10 -10
  133. package/templates/vue-app/files/src/components/Iframe/index.vue +30 -30
  134. package/templates/vue-app/files/src/components/JavaEdit/index.vue +78 -78
  135. package/templates/vue-app/files/src/components/Pagination/index.vue +100 -100
  136. package/templates/vue-app/files/src/components/PanThumb/index.vue +149 -149
  137. package/templates/vue-app/files/src/components/ParentView/index.vue +3 -3
  138. package/templates/vue-app/files/src/components/Permission/index.js +13 -13
  139. package/templates/vue-app/files/src/components/Permission/permission.js +21 -21
  140. package/templates/vue-app/files/src/components/RightPanel/index.vue +149 -149
  141. package/templates/vue-app/files/src/components/Screenfull/index.vue +60 -60
  142. package/templates/vue-app/files/src/components/SizeSelect/index.vue +60 -60
  143. package/templates/vue-app/files/src/components/SvgIcon/index.vue +66 -66
  144. package/templates/vue-app/files/src/components/ThemePicker/index.vue +177 -177
  145. package/templates/vue-app/files/src/components/UploadExcel/index.vue +149 -149
  146. package/templates/vue-app/files/src/components/WaterMark/setWaterMark.js +68 -68
  147. package/templates/vue-app/files/src/components/WaterMark/waterMark.vue +69 -69
  148. package/templates/vue-app/files/src/components/Xgplayer/index.vue +49 -49
  149. package/templates/vue-app/files/src/components/YamlEdit/index.vue +81 -81
  150. package/templates/vue-app/files/src/layout/components/AppMain.vue +67 -67
  151. package/templates/vue-app/files/src/layout/components/Navbar.vue +209 -209
  152. package/templates/vue-app/files/src/layout/components/Settings/index.vue +125 -125
  153. package/templates/vue-app/files/src/layout/components/Sidebar/FixiOSBug.js +26 -26
  154. package/templates/vue-app/files/src/layout/components/Sidebar/Item.vue +29 -29
  155. package/templates/vue-app/files/src/layout/components/Sidebar/Link.vue +35 -35
  156. package/templates/vue-app/files/src/layout/components/Sidebar/Logo.vue +93 -93
  157. package/templates/vue-app/files/src/layout/components/Sidebar/SidebarItem.vue +104 -104
  158. package/templates/vue-app/files/src/layout/components/Sidebar/index.vue +79 -79
  159. package/templates/vue-app/files/src/layout/components/TagsView/ScrollPane.vue +90 -90
  160. package/templates/vue-app/files/src/layout/components/TagsView/index.vue +299 -299
  161. package/templates/vue-app/files/src/layout/components/index.js +5 -5
  162. package/templates/vue-app/files/src/layout/index.vue +119 -119
  163. package/templates/vue-app/files/src/layout/mixin/ResizeHandler.js +45 -45
  164. package/templates/vue-app/files/src/main.js +89 -89
  165. package/templates/vue-app/files/src/mixins/crud.js +348 -348
  166. package/templates/vue-app/files/src/router/index.js +156 -156
  167. package/templates/vue-app/files/src/router/routers.js +203 -203
  168. package/templates/vue-app/files/src/settings.js +57 -57
  169. package/templates/vue-app/files/src/store/getters.js +29 -29
  170. package/templates/vue-app/files/src/store/index.js +25 -25
  171. package/templates/vue-app/files/src/store/modules/api.js +33 -33
  172. package/templates/vue-app/files/src/store/modules/app.js +55 -55
  173. package/templates/vue-app/files/src/store/modules/permission.js +79 -79
  174. package/templates/vue-app/files/src/store/modules/register.js +17 -17
  175. package/templates/vue-app/files/src/store/modules/settings.js +46 -46
  176. package/templates/vue-app/files/src/store/modules/tagsView.js +168 -168
  177. package/templates/vue-app/files/src/store/modules/user.js +119 -119
  178. package/templates/vue-app/files/src/utils/auth.js +18 -18
  179. package/templates/vue-app/files/src/utils/base64ToFile.js +27 -27
  180. package/templates/vue-app/files/src/utils/clipboard.js +36 -36
  181. package/templates/vue-app/files/src/utils/datetime.js +289 -289
  182. package/templates/vue-app/files/src/utils/getBlobFile.js +10 -10
  183. package/templates/vue-app/files/src/utils/getTime.js +29 -29
  184. package/templates/vue-app/files/src/utils/index.js +520 -520
  185. package/templates/vue-app/files/src/utils/permission.js +29 -29
  186. package/templates/vue-app/files/src/utils/pinyin.js +450 -450
  187. package/templates/vue-app/files/src/utils/request.js +139 -139
  188. package/templates/vue-app/files/src/utils/rsaEncrypt.js +37 -37
  189. package/templates/vue-app/files/src/utils/shortcuts.js +210 -210
  190. package/templates/vue-app/files/src/utils/upload.js +12 -12
  191. package/templates/vue-app/files/src/utils/validate.js +262 -262
  192. package/templates/vue-app/files/src/views/components/Echarts.vue +124 -124
  193. package/templates/vue-app/files/src/views/components/Editor.vue +75 -75
  194. package/templates/vue-app/files/src/views/components/MarkDown.vue +44 -44
  195. package/templates/vue-app/files/src/views/components/UVideo.vue +37 -37
  196. package/templates/vue-app/files/src/views/components/YamlEdit.vue +206 -206
  197. package/templates/vue-app/files/src/views/components/camera/camera.vue +115 -115
  198. package/templates/vue-app/files/src/views/components/camera/cameraTest.vue +158 -158
  199. package/templates/vue-app/files/src/views/components/excel/upload-excel.vue +41 -41
  200. package/templates/vue-app/files/src/views/components/icons/element-icons.js +74 -74
  201. package/templates/vue-app/files/src/views/components/icons/index.vue +106 -106
  202. package/templates/vue-app/files/src/views/components/icons/svg-icons.js +10 -10
  203. package/templates/vue-app/files/src/views/components/scroll/index.vue +107 -107
  204. package/templates/vue-app/files/src/views/components/scrollFull/index.vue +99 -99
  205. package/templates/vue-app/files/src/views/dashboard/LineChart.vue +138 -138
  206. package/templates/vue-app/files/src/views/dashboard/PanelGroup.vue +173 -173
  207. package/templates/vue-app/files/src/views/dashboard/mixins/resize.js +57 -57
  208. package/templates/vue-app/files/src/views/dataArchive/delTable.vue +354 -354
  209. package/templates/vue-app/files/src/views/dataArchive/exportDetail.vue +121 -121
  210. package/templates/vue-app/files/src/views/dataArchive/exportList.vue +160 -160
  211. package/templates/vue-app/files/src/views/dataArchive/index.vue +2104 -2104
  212. package/templates/vue-app/files/src/views/features/401.vue +83 -83
  213. package/templates/vue-app/files/src/views/features/404.vue +226 -226
  214. package/templates/vue-app/files/src/views/features/redirect.vue +12 -12
  215. package/templates/vue-app/files/src/views/generator/config.vue +348 -348
  216. package/templates/vue-app/files/src/views/generator/index.vue +143 -143
  217. package/templates/vue-app/files/src/views/generator/preview.vue +39 -39
  218. package/templates/vue-app/files/src/views/home.vue +80 -80
  219. package/templates/vue-app/files/src/views/indexManagement/index.vue +422 -422
  220. package/templates/vue-app/files/src/views/indexManagement/other.vue +286 -286
  221. package/templates/vue-app/files/src/views/institutionMonitor/components/LineChart.vue +191 -191
  222. package/templates/vue-app/files/src/views/institutionMonitor/index.scss +339 -339
  223. package/templates/vue-app/files/src/views/institutionMonitor/index.vue +1385 -1385
  224. package/templates/vue-app/files/src/views/institutionMonitor/mixins/resize.js +57 -57
  225. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/checkProjectCode.vue +267 -267
  226. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/imageAbnormalMonitor.vue +361 -361
  227. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/index.vue +686 -686
  228. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/leakageAnomaly.vue +270 -270
  229. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/moveMonitore.vue +114 -114
  230. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/qualityMonitore.vue +338 -338
  231. package/templates/vue-app/files/src/views/institutionSet/cloudSet.vue +534 -534
  232. package/templates/vue-app/files/src/views/institutionSet/index.vue +2550 -2550
  233. package/templates/vue-app/files/src/views/login.vue +243 -243
  234. package/templates/vue-app/files/src/views/qualityLogin.vue +280 -280
  235. package/templates/vue-app/files/src/views/selfStatistics/components/LineChart.vue +296 -296
  236. package/templates/vue-app/files/src/views/selfStatistics/hospitalDetail/index.vue +533 -533
  237. package/templates/vue-app/files/src/views/selfStatistics/index.scss +447 -447
  238. package/templates/vue-app/files/src/views/selfStatistics/index.vue +903 -903
  239. package/templates/vue-app/files/src/views/selfStatistics/mixins/resize.js +57 -57
  240. package/templates/vue-app/files/src/views/selfStatistics/monitorDetail/index.vue +285 -285
  241. package/templates/vue-app/files/src/views/selfStatistics/offlineDetail/index.vue +104 -104
  242. package/templates/vue-app/files/src/views/selfStatistics/selfActiveDetail/index.vue +104 -104
  243. package/templates/vue-app/files/src/views/selfStatistics/selfMonitorDetail/index.vue +420 -420
  244. package/templates/vue-app/files/src/views/selfStatistics/setWaterMark/setWaterMark.js +68 -68
  245. package/templates/vue-app/files/src/views/selfStatistics/setWaterMark/waterMark.vue +69 -69
  246. package/templates/vue-app/files/src/views/system/dept/index.vue +144 -144
  247. package/templates/vue-app/files/src/views/system/dict/dictDetail.vue +146 -146
  248. package/templates/vue-app/files/src/views/system/dict/index.vue +159 -159
  249. package/templates/vue-app/files/src/views/system/examModality/index.vue +174 -174
  250. package/templates/vue-app/files/src/views/system/examPart/index.vue +184 -184
  251. package/templates/vue-app/files/src/views/system/examProject/index.vue +321 -321
  252. package/templates/vue-app/files/src/views/system/examine/index.vue +66 -66
  253. package/templates/vue-app/files/src/views/system/job/index.vue +119 -119
  254. package/templates/vue-app/files/src/views/system/job/module/form.vue +72 -72
  255. package/templates/vue-app/files/src/views/system/job/module/header.vue +48 -48
  256. package/templates/vue-app/files/src/views/system/menu/index.vue +327 -327
  257. package/templates/vue-app/files/src/views/system/model/index.vue +285 -285
  258. package/templates/vue-app/files/src/views/system/role/index.vue +434 -434
  259. package/templates/vue-app/files/src/views/system/sysSet/index.vue +84 -84
  260. package/templates/vue-app/files/src/views/system/timing/index.vue +289 -289
  261. package/templates/vue-app/files/src/views/system/timing/log.vue +143 -143
  262. package/templates/vue-app/files/src/views/system/user/admin.vue +414 -414
  263. package/templates/vue-app/files/src/views/system/user/center/updateEmail.vue +146 -146
  264. package/templates/vue-app/files/src/views/system/user/center/updatePass.vue +168 -168
  265. package/templates/vue-app/files/src/views/system/user/center.vue +140 -140
  266. package/templates/vue-app/files/src/views/system/user/index.vue +972 -972
  267. package/templates/vue-app/files/src/views/systemSet/role/index.vue +314 -314
  268. package/templates/vue-app/files/src/views/systemSet/user/admin.vue +414 -414
  269. package/templates/vue-app/files/src/views/systemSet/user/center/updateEmail.vue +146 -146
  270. package/templates/vue-app/files/src/views/systemSet/user/center/updatePass.vue +115 -115
  271. package/templates/vue-app/files/src/views/systemSet/user/center.vue +351 -351
  272. package/templates/vue-app/files/src/views/systemSet/user/index.vue +928 -928
  273. package/templates/vue-app/files/src/views/tools/aliPay/config.vue +102 -102
  274. package/templates/vue-app/files/src/views/tools/aliPay/index.vue +48 -48
  275. package/templates/vue-app/files/src/views/tools/aliPay/toPay.vue +91 -91
  276. package/templates/vue-app/files/src/views/tools/email/config.vue +91 -91
  277. package/templates/vue-app/files/src/views/tools/email/index.vue +42 -42
  278. package/templates/vue-app/files/src/views/tools/email/send.vue +159 -159
  279. package/templates/vue-app/files/src/views/tools/storage/index.vue +35 -35
  280. package/templates/vue-app/files/src/views/tools/storage/local/index.vue +207 -207
  281. package/templates/vue-app/files/src/views/tools/storage/qiniu/form.vue +108 -108
  282. package/templates/vue-app/files/src/views/tools/storage/qiniu/index.vue +241 -241
  283. package/templates/vue-app/files/src/views/tools/swagger/index.vue +14 -14
  284. package/templates/vue-app/files/vue.config.js +173 -173
  285. package/templates/vue-app/template.json +29 -29
@@ -1,903 +1,903 @@
1
- <template>
2
- <div class="app-container digitalImage">
3
- <!-- 工具栏-->
4
- <el-form :inline="true" :model="query" ref="topForm" class="form-inline-hospital" size="small">
5
- <el-form-item>
6
- <!-- 区域 -->
7
- <el-cascader
8
- v-model="query.address"
9
- placeholder="医院地区"
10
- :options="provinceList"
11
- :props="props"
12
- style="width: 220px"
13
- @active-item-change="handleItemChange"
14
- @change="addressChange"
15
- @blur="forceUpdate">
16
- </el-cascader>
17
- </el-form-item>
18
- <el-form-item>
19
- <el-select
20
- v-model="query.hospitalType"
21
- clearable
22
- placeholder="医院类别"
23
- class="filter-item"
24
- style="width: 160px"
25
- @change="changeHospital"
26
- @clear="changeHospital">
27
- <el-option
28
- v-for="item in dict.hos_category"
29
- :key="item.value"
30
- :label="item.label"
31
- :value="item.value" />
32
- </el-select>
33
- </el-form-item>
34
- <!-- 医院等级 -->
35
- <el-form-item>
36
- <el-select
37
- v-model="query.level"
38
- clearable
39
- @change="changeHospital"
40
- @clear="changeHospital"
41
- placeholder="医院等级(级)"
42
- class="filter-item"
43
- style="width: 160px">
44
- <el-option
45
- v-for="item in dict.hos_rank"
46
- :key="item.value"
47
- :label="item.label"
48
- :value="item.value" />
49
- </el-select>
50
- </el-form-item>
51
- <el-form-item prop="hospitalTypeList">
52
- <el-select
53
- v-model="query.hospitalIdList"
54
- clearable
55
- filterable
56
- multiple
57
- @change="changeHospital"
58
- @clear="changeHospital"
59
- placeholder="医院名称"
60
- class="filter-item"
61
- style="width: 160px">
62
- <el-option
63
- v-for="item in hospitalNames"
64
- :key="item.scenceId"
65
- :label="item.hospitalName"
66
- :value="item.scenceId" />
67
- </el-select>
68
- </el-form-item>
69
- <el-form-item prop="softwareType">
70
- <el-select
71
- v-model="query.softwareType"
72
- clearable
73
- @change="changeHospital"
74
- @clear="changeHospital"
75
- placeholder="软件类型"
76
- class="filter-item"
77
- style="width: 160px">
78
- <el-option v-for="item in softData" :key="item" :label="item" :value="item" />
79
- </el-select>
80
- </el-form-item>
81
- <el-form-item>
82
- <!-- <date-range-picker
83
- v-model="query.consultationTimeList"
84
- :picker-options="pickerOptions"
85
- popper-class="isDisabledDate"
86
- valueFormat="yyyy-MM-dd"
87
- style="width: 250px"
88
- class="date-item"
89
- @change="dateChange"
90
- @blur="forceUpdate"
91
- :clearable="false"
92
- /> -->
93
- <date-range-picker
94
- @blur="forceUpdate"
95
- @change="dateChange"
96
- v-model="query.consultationTimeList"
97
- :picker-options="pickerOptions"
98
- popper-class="isDisabledDate"
99
- valueFormat="yyyy-MM-dd"
100
- style="width: 250px"
101
- class="date-item"
102
- :clearable="false" />
103
- </el-form-item>
104
-
105
- <el-button @click="toQuery" class="filter-item" size="small">查询 </el-button>
106
- <el-button @click="resetQueryClick" class="filter-item" size="small">重置 </el-button>
107
- </el-form>
108
- <!-- 统计模块 -->
109
- <div class="self-statiscs">
110
- <div class="other" @click="offlineClick(1, 'hospitalDetail', '医院数量详情')">
111
- <p class="top">
112
- <span>医院数量</span>
113
- <el-tooltip
114
- class="item"
115
- effect="dark"
116
- content="是【医院管理】模块内录入自助机信息的医院数量及自助机总量,不随检索时间及软件类型变化"
117
- placement="top-start">
118
- <span class="el-icon-question"></span>
119
- </el-tooltip>
120
- <span class="bold">{{ (cloudCount.myHospitalTotal || 0) | NumFormat }}</span>
121
- </p>
122
- <p class="bottom">
123
- <span><i></i>配备自助机</span>
124
- <span class="bold">{{ (cloudCount.myMachineQuantity || 0) | NumFormat }}</span>
125
- </p>
126
- </div>
127
- <div class="other" @click="offlineClick(2, 'hospitalDetail', '监测自助机详情')">
128
- <p class="top">
129
- <span>监测自助机系统</span>
130
- <el-tooltip
131
- class="item"
132
- effect="dark"
133
- content="是系统实际监测到的系统数量,不随检索时间变化"
134
- placement="top-start">
135
- <span class="el-icon-question"></span>
136
- </el-tooltip>
137
- <span class="bold">{{ (cloudCount.machineTotal || 0) | NumFormat }}</span>
138
- </p>
139
- <div class="bottom special-bottom">
140
- <!-- <img src="~@/assets/images/hospital_icon.png" alt="" /> -->
141
- <p>
142
- <i></i>影联系统<span class="bold">{{
143
- (cloudCount.ylyxMachineTotal || 0) | NumFormat
144
- }}</span>
145
- </p>
146
- <p>
147
- <i></i>真实自助机<span class="bold">{{
148
- (cloudCount.realMachine || 0) | NumFormat
149
- }}</span>
150
- </p>
151
- <p :style="{ visibility: query.softwareType == '影联' ? 'hidden' : 'visible' }">
152
- <i class="first"></i>非影联系统<span class="bold">{{
153
- (cloudCount.otherMachineTotal || 0) | NumFormat
154
- }}</span>
155
- </p>
156
- <p>
157
- <i class="first"></i>非真实自助机<span class="bold">{{
158
- (cloudCount.virtualMachine || 0) | NumFormat
159
- }}</span>
160
- </p>
161
- </div>
162
- </div>
163
- <div class="other" @click="offlineClick(3, 'hospitalDetail', '自助机活跃度详情')">
164
- <p class="top">
165
- <span>自助机活跃度</span>
166
- <el-tooltip
167
- class="item"
168
- effect="dark"
169
- content="是实际监测到的真实自助机的活跃度"
170
- placement="top-start">
171
- <span class="el-icon-question"></span>
172
- </el-tooltip>
173
- <span class="bold">{{ dealData(cloudCount.activityRate) }}</span>
174
- </p>
175
- <div class="bottom">
176
- <!-- <img src="~@/assets/images/hospital_icon.png" alt="" /> -->
177
- <p>
178
- <i></i>影联系统<span class="bold">{{
179
- dealData(cloudCount.ylyxMachineActivityRate)
180
- }}</span>
181
- </p>
182
- <p v-show="query.softwareType !== '影联'">
183
- <i class="first"></i>非影联系统<span class="bold">{{
184
- dealData(cloudCount.qtMachineActivityRate)
185
- }}</span>
186
- </p>
187
- </div>
188
- </div>
189
- <div class="other">
190
- <p class="top">
191
- <!-- <img src="~@/assets/images/hospital_icon.png" alt="" /> -->
192
- <span>打印报告</span>
193
- <span class="bold">{{ (cloudCount.cumulativePrintTimes || 0) | NumFormat }}</span>
194
- </p>
195
- <div class="bottom">
196
- <!-- <img src="~@/assets/images/hospital_icon.png" alt="" /> -->
197
- <p>
198
- <i></i>影联系统<span class="bold">{{
199
- (cloudCount.ylyxCumulativePrintTimes || 0) | NumFormat
200
- }}</span>
201
- </p>
202
- <p :style="{ visibility: query.softwareType == '影联' ? 'hidden' : 'visible' }">
203
- <i class="first"></i>非影联系统<span class="bold">{{
204
- (cloudCount.qtCumulativePrintTimes || 0) | NumFormat
205
- }}</span>
206
- </p>
207
- </div>
208
- </div>
209
- <div class="other bg2" @click="offlineClick(5, 'offlineDetail', '客户端状态详情')">
210
- <p class="top">
211
- <span>客户端状态</span>
212
- <el-tooltip
213
- class="item"
214
- effect="dark"
215
- content="影联客户端在线状态,不随检索的时间区间及软件类型变化"
216
- placement="top-start">
217
- <span class="el-icon-question"></span>
218
- </el-tooltip>
219
- </p>
220
- <p class="bottom">
221
- <span>
222
- <svg-icon class-name="online" icon-class="online" />在线<span class="bold">{{
223
- (cloudCount.online || 0) | NumFormat
224
- }}</span></span
225
- >
226
- <span>
227
- <svg-icon class-name="offline" icon-class="offline" />离线<span class="bold">{{
228
- (cloudCount.offline || 0) | NumFormat
229
- }}</span></span
230
- >
231
- </p>
232
- <div class="offline-detail">离线详情</div>
233
- </div>
234
- </div>
235
- <div class="changeBtns">
236
- <div class="frequency">
237
- <ul>
238
- <li
239
- v-for="(item, index) in frequencyArr"
240
- :key="index"
241
- :class="[activeIndex == item.active ? 'frequencyActive' : '']"
242
- @click="clickFrequency(item.active)">
243
- {{ item.name }}
244
- </li>
245
- </ul>
246
- </div>
247
- <div class="radioBtn">
248
- <el-radio-group v-model="radio1" size="small" @change="changeRadio">
249
- <el-radio-button label="day">按天</el-radio-button>
250
- <el-radio-button label="week">按周</el-radio-button>
251
- <el-radio-button label="month">按月</el-radio-button>
252
- <el-radio-button label="year">按年</el-radio-button>
253
- </el-radio-group>
254
- </div>
255
- </div>
256
-
257
- <line-chart :className="'lineChart'" :chart-data="lineChartData" />
258
- <div class="export">
259
- <el-button type="primary" @click="explore" :loading="downloadLoading" plain size="mini"
260
- >导出</el-button
261
- >
262
- </div>
263
- <div class="table-Data">
264
- <!-- 表格 -->
265
- <el-table :data="crud.data" v-loading="crud.loading" @sort-change="sortChange">
266
- <el-table-column label="序号" width="60px">
267
- <template slot-scope="scope">
268
- <span>{{ (crud.page.page - 1) * crud.page.size + scope.$index + 1 }}</span>
269
- </template>
270
- </el-table-column>
271
- <el-table-column
272
- v-for="(item, index) in checkTable"
273
- :key="index.key"
274
- :label="item.label"
275
- :prop="item.prop"
276
- :show-overflow-tooltip="true"
277
- :min-width="item.width"
278
- :sortable="item.sort"
279
- :render-header="renderPrice"
280
- :sort-method="
281
- (a, b) => {
282
- return a[item.prop] - b[item.prop];
283
- }
284
- ">
285
- <template slot-scope="scope">
286
- <div v-if="item.prop == 'hospitalType'">
287
- {{ hosCategory(scope.row.hospitalType) || omitData }}
288
- </div>
289
- <div v-else-if="item.prop == 'level'">
290
- {{ hosRank(scope.row.level) || omitData }}
291
- </div>
292
- <div v-else-if="item.prop == 'printTimes'">
293
- {{ scope.row.printTimes || 0 }}
294
- </div>
295
- <div v-else-if="item.prop == 'printTimeOfDailyAverage'">
296
- {{ scope.row.printTimeOfDailyAverage || 0 }}
297
- </div>
298
- <div v-else-if="item.prop == 'activityMachineTotalRate'">
299
- {{ dealData(scope.row.activityMachineTotalRate) }}
300
- </div>
301
- <div v-else-if="item.prop == 'reportConversionRate'">
302
- {{ dealData(scope.row.reportConversionRate) }}
303
- </div>
304
- <div v-else>
305
- {{ scope.row[item.prop] || omitData }}
306
- </div>
307
- </template>
308
- </el-table-column>
309
- <el-table-column label="操作" width="80" fixed="right">
310
- <template slot-scope="scope">
311
- <el-button size="mini" type="text" @click="goCloudDetail(scope.row)">详情 </el-button>
312
- </template>
313
- </el-table-column>
314
- </el-table>
315
- <!--分页组件-->
316
- <pagination />
317
- </div>
318
-
319
- <!-- 维护记录弹窗 -->
320
- <el-dialog
321
- :title="currentDetail.hospitalName"
322
- top="5vh"
323
- :visible.sync="cloudDetailVisiable"
324
- :close-on-click-modal="false"
325
- width="75%"
326
- @close="dialogClosse">
327
- <span slot="title" class="dialog-footer"
328
- >{{ currentDetail.hospitalName }} {{ currentDetail.startTime }}至{{
329
- currentDetail.endTime
330
- }}</span
331
- >
332
- <cloudListDetail ref="cloudListDetail" :cloudDetail="currentDetail" />
333
- </el-dialog>
334
- <!-- 维护记录弹窗 -->
335
- <el-dialog
336
- :title="dialogText"
337
- top="5vh"
338
- :visible.sync="offlineDetailVisiable"
339
- :close-on-click-modal="false"
340
- width="85%">
341
- <span slot="title" class="dialog-footer"
342
- >{{ dialogText }}
343
- <el-tooltip class="item" effect="dark" placement="top-start">
344
- <div slot="content" v-html="content"></div>
345
- <span class="el-icon-question" v-if="clickIndex !== 5"></span> </el-tooltip
346
- ></span>
347
- <hospital-detail ref="hospitalDetail" v-if="clickIndex !== 5"></hospital-detail>
348
- <!-- <self-monitor-detail
349
- ref="selfMonitorDetail"
350
- v-if="clickIndex == 2"
351
- ></self-monitor-detail>
352
- <self-active-detail
353
- ref="selfActiveDetail"
354
- v-if="clickIndex == 3"
355
- ></self-active-detail> -->
356
- <offline-detail ref="offlineDetail" v-if="clickIndex == 5" :data="query" />
357
- </el-dialog>
358
- <!-- <WaterMark :waterMarkProp="waterMarkProp" /> -->
359
- </div>
360
- </template>
361
-
362
- <script>
363
- import LineChart from './components/LineChart.vue';
364
- import { mapGetters } from 'vuex';
365
- import pagination from '@crud/Pagination';
366
- import cloudListDetail from './monitorDetail/index.vue';
367
- import offlineDetail from './offlineDetail/index.vue';
368
- import hospitalDetail from './hospitalDetail/index.vue';
369
- import selfMonitorDetail from './selfMonitorDetail/index.vue';
370
- import selfActiveDetail from './selfActiveDetail/index.vue';
371
- import CRUD, { presenter, header, crud } from '@crud/crud';
372
- import { getTotalData, getLineData, queryHospital } from '@/api/selfStatistics/index.js';
373
- import DateRangePicker from '@/components/DateRangePicker';
374
- import institutionMonitor from '@/api/institutionMonitor/index';
375
- import { getDay } from '@/utils/getTime';
376
- import WaterMark from './setWaterMark/waterMark.vue';
377
- import { downloadFile } from '@/utils/index';
378
- import { downloadPost } from '@/api/data';
379
- const end = getDay(-1);
380
- const start = getDay(-7);
381
- export default {
382
- name: 'cloudStatistics',
383
- components: {
384
- pagination,
385
- cloudListDetail,
386
- DateRangePicker,
387
- LineChart,
388
- offlineDetail,
389
- WaterMark,
390
- hospitalDetail,
391
- selfMonitorDetail,
392
- selfActiveDetail,
393
- },
394
- dicts: ['cloud_code', 'hos_category', 'hos_rank'],
395
- data() {
396
- return {
397
- waterMarkProp: {
398
- zIndex: 1,
399
- devicePixelRatio: 2,
400
- text: '',
401
- showTime: true,
402
- },
403
- omitData: '-',
404
- provinceList: [],
405
- // 区域
406
- props: {
407
- value: 'value',
408
- children: 'cities',
409
- label: 'label',
410
- checkStrictly: true,
411
- },
412
- hospitalNames: [],
413
- radio1: 'day',
414
- checkTable: [
415
- { label: '医院名称', prop: 'hospitalName', width: '180px' },
416
- { label: '医院类别', prop: 'hospitalType', width: '120px' },
417
- { label: '医院等级(级)', prop: 'level', width: '120px' },
418
- { label: '配备自助机', prop: 'myMachineTotal', width: '120px', sort: true },
419
- { label: '监测自助机', prop: 'machineTotal', width: '120px', sort: true },
420
- {
421
- label: '该时间段活跃自助机',
422
- prop: 'activityMachineTotal',
423
- width: '190px',
424
- sort: true,
425
- },
426
- {
427
- label: '该时间段自助机活跃度',
428
- prop: 'activityMachineTotalRate',
429
- width: '190px',
430
- sort: true,
431
- },
432
-
433
- { label: '审核报告量', prop: 'auditedDataTotal', width: '120px', sort: true },
434
- { label: '打印报告量', prop: 'printTimes', width: '120px', sort: true },
435
- { label: '报告转化率', prop: 'reportConversionRate', width: '120px', sort: true },
436
- {
437
- label: '日均打印报告量',
438
- prop: 'printTimeOfDailyAverage',
439
- width: '160px',
440
- sort: true,
441
- },
442
- ],
443
- // 获取统计数量
444
- cloudCount: {},
445
- // 详情弹窗控制
446
- cloudDetailVisiable: false,
447
- // 当前点击的详情信息
448
- currentDetail: {},
449
- // 导出
450
- downloadLoading: false,
451
- // 离线详情
452
- offlineDetailVisiable: false,
453
- // 判断是否第一次
454
- crudShow: false,
455
- lineChartData: {
456
- times: [],
457
- datas: [],
458
- },
459
- activeIndex: 1,
460
- clickIndex: 1,
461
- dialogText: '',
462
- frequencyArr: [
463
- {
464
- name: '数据趋势',
465
- active: '1',
466
- },
467
- ],
468
- softData: ['影联'],
469
- sortString: {
470
- myMachineTotal: 1,
471
- machineTotal: 2,
472
- activityMachineTotal: 6,
473
- auditedDataTotal: 7,
474
- printTimes: 8,
475
- printTimeOfDailyAverage: 9,
476
- activityMachineTotalRate: 11,
477
- reportConversionRate: 12,
478
- },
479
- downloadLoading: false,
480
- pickerOptions: {
481
- disabledDate(time) {
482
- return time.getTime() > Date.now();
483
- },
484
- shortcuts: [
485
- {
486
- text: '近一周',
487
- onClick(picker) {
488
- const end = new Date();
489
- const start = new Date();
490
- end.setTime(end.getTime() - 3600 * 1000 * 24);
491
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
492
- picker.$emit('pick', [start, end]);
493
- },
494
- },
495
- {
496
- text: '近一个月',
497
- onClick(picker) {
498
- const end = new Date();
499
- const start = new Date();
500
- end.setTime(end.getTime() - 3600 * 1000 * 24);
501
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
502
- picker.$emit('pick', [start, end]);
503
- },
504
- },
505
- {
506
- text: '近三个月',
507
- onClick(picker) {
508
- const end = new Date();
509
- const start = new Date();
510
- end.setTime(end.getTime() - 3600 * 1000 * 24);
511
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
512
- picker.$emit('pick', [start, end]);
513
- },
514
- },
515
- {
516
- text: '最近一年',
517
- onClick: picker => {
518
- const end = new Date(); // 当前日期
519
- const start = new Date(); // 开始日期
520
-
521
- end.setDate(end.getDate() - 1); // 设置结束日期为昨天
522
- start.setFullYear(start.getFullYear() - 1); // 设置开始日期为一年前
523
-
524
- picker.$emit('pick', [start, end]);
525
- },
526
- },
527
- {
528
- text: '本年度',
529
- onClick: picker => {
530
- const end = new Date(); // 当前日期
531
- const start = new Date(); // 开始日期
532
- start.setDate(1);
533
- end.setDate(end.getDate() - 1); // 设置结束日期为昨天
534
- start.setMonth(0); // 设置开始日期为今年的1月份
535
- picker.$emit('pick', [start, end]);
536
- },
537
- },
538
- ],
539
- },
540
- };
541
- },
542
- mounted() {
543
- this.waterMarkProp.text = this.user.name;
544
- },
545
- cruds() {
546
- return CRUD({
547
- title: '医院',
548
- url: 'machine/getHospitalTableData',
549
- crudMethod: {},
550
- sort: [],
551
- query: {},
552
- });
553
- },
554
- computed: {
555
- ...mapGetters(['user']),
556
- content() {
557
- return ` 配备自助机数量:是公司在医疗机构实际安装的自助机数量;<br/>
558
- 监测自助机数量:是系统实际监测到的医疗机构的自助机数量(自助机信息上传成功);<br/>
559
- 影联系统:是监测到的自助机中,有几台安装的是影联自研的打印系统;<br/>
560
- 非影联系统:是监测到的自助机中,有几台安装的不是影联自研的打印系统;<br/>
561
- 近7天是否活跃:是近7天该医疗机构监测到的自助机是否有过打印记录;</br>
562
- 近7天活跃度:是该医疗机构监测到的自助机的活跃度,近7天有过打印记录的自助机数量÷监测到的自助机总数量;<br/>
563
- `;
564
- },
565
- },
566
- mixins: [presenter(), header(), crud()],
567
-
568
- filters: {
569
- NumFormat(value) {
570
- if (value == '-') return '-';
571
- if (!value) return '0';
572
- /*原来用的是Number(value).toFixed(0),这样取整时有问题,例如0.51取整之后为1,感谢Nils指正*/
573
- /*后来改成了 Number(value)|0,但是输入超过十一位就为负数了,具体见评论 */
574
- var intPart = Number(value) - (Number(value) % 1); //获取整数部分(这里是windy93的方法)
575
- var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,'); //将整数部分逢三一断
576
-
577
- var floatPart = ''; //预定义小数部分
578
- var value2Array = value.toString().split('.');
579
-
580
- //=2表示数据有小数位
581
- if (value2Array.length == 2) {
582
- floatPart = value2Array[1].toString(); //拿到小数部分
583
-
584
- if (floatPart.length == 1) {
585
- //补0,实际上用不着
586
- return intPartFormat + '.' + floatPart + '0';
587
- } else {
588
- return intPartFormat + '.' + floatPart;
589
- }
590
- } else {
591
- return intPartFormat + floatPart;
592
- }
593
- },
594
- },
595
-
596
- methods: {
597
- dealData(value) {
598
- if (value == -1 || value === undefined) {
599
- return '-';
600
- } else if (value === 0) {
601
- return value;
602
- } else {
603
- return value + '%';
604
- }
605
- },
606
- sortChange(column) {
607
- if (column.order == 'ascending') {
608
- this.query = {
609
- ...this.query,
610
- sortType: this.sortString[column.prop],
611
- sort: 1,
612
- };
613
- this.crud.toQuery();
614
- } else if (column.order == 'descending') {
615
- this.query = {
616
- ...this.query,
617
- sortType: this.sortString[column.prop],
618
- sort: 2,
619
- };
620
- this.crud.toQuery();
621
- }
622
- },
623
- renderPrice(h, { column, $index }) {
624
- if (column.property == 'activityMachineTotal') {
625
- return [
626
- column.label,
627
- h(
628
- 'el-tooltip',
629
- {
630
- props: {
631
- content: '在上方选择的时间区间内,有过打印记录的被监测到的自助机数量',
632
- placement: 'top', // 悬停内容展示的位置
633
- },
634
- },
635
- [h('span', { class: { 'el-icon-question': true } })] // 图标
636
- ),
637
- ];
638
- } else {
639
- return column.label;
640
- }
641
- },
642
- // 导出
643
- explore() {
644
- this.downloadLoading = true;
645
- // let hospitalId=this.currentDetail.hospitalId
646
- // let hospitalName=this.currentDetail.hospitalName,
647
- let data = {
648
- ...this.query,
649
- };
650
- downloadPost('machine/downloadHospitalTableData', data)
651
- .then(result => {
652
- this.downloadLoading = false;
653
- })
654
- .catch(e => {
655
- let text = `医院列表 ${this.query.startTime}至${this.query.endTime}`;
656
- downloadFile(e, text, 'xlsx');
657
- this.downloadLoading = false;
658
- });
659
- },
660
- // 返回医院类别对应的名称
661
- hosCategory(category) {
662
- return this.dict.label.hos_category[category];
663
- },
664
- // 返回医院等级(级)对应的名称
665
- hosRank(rank) {
666
- return this.dict.label.hos_rank[rank];
667
- },
668
- // 地区联动获取数据
669
- getPosition(val, cb) {
670
- let vm = this; //查询省市县
671
- let params = { parent: 1 };
672
- if (!val) {
673
- //初始化加载 获取所有省份数据
674
- params = { parent: 1 };
675
- } else if (val.length === 1) {
676
- //加载二级 获取市级数据
677
- params = { parent: val[0] };
678
- } else {
679
- //加载3级 获取县级数据
680
- params = { parent: val[1] };
681
- }
682
- institutionMonitor
683
- .queryNation(params)
684
- .then(res => {
685
- if (!val) {
686
- //初始化加载 查询省份数据
687
- vm.provinceList = res.content.map(e => {
688
- return {
689
- value: e.saleid,
690
- label: e.province,
691
- cities: [],
692
- };
693
- });
694
- } else if (val.length === 1) {
695
- //加载二级 查询该省下市级数据
696
- vm.provinceList.map(item => {
697
- if (item.value === val[0]) {
698
- item.cities = res.content.map(e => {
699
- return {
700
- value: e.saleid,
701
- label: e.city || e.county,
702
- cities: [],
703
- };
704
- });
705
- }
706
- });
707
- } else {
708
- //加载3级 查询该省市下县级数据
709
- vm.provinceList.map(item => {
710
- if (item.value === val[0]) {
711
- item.cities.map(value => {
712
- if (value.value === val[1]) {
713
- value.cities = res.content.map(e => {
714
- return { value: e.saleid, label: e.county };
715
- });
716
- }
717
- });
718
- }
719
- });
720
- }
721
- cb && cb(res);
722
- })
723
- .catch(err => {
724
- console.log(err);
725
- });
726
- },
727
- // 一级二级改变的时候调取下一级数据
728
- handleItemChange(val) {
729
- this.getPosition(val);
730
- },
731
- // 查询医院名称
732
- queryHospital() {
733
- let params = JSON.parse(JSON.stringify(this.query));
734
- params.county = params.district;
735
-
736
- // 删除时间 医院名称
737
- delete params.consultationTimeList;
738
- delete params.address;
739
- delete params.startTime;
740
- delete params.endTime;
741
- delete params.hospitalIdList;
742
- params.deleted = 0;
743
- queryHospital(params).then(res => {
744
- this.hospitalNames = [];
745
- res.forEach(k => {
746
- let obj = {
747
- scenceId: k.scenceId,
748
- hospitalName: k.hospitalName,
749
- };
750
- this.hospitalNames.push(obj);
751
- });
752
- });
753
- },
754
- addressChange(status) {
755
- if (this.query.address.length > 0) {
756
- this.query.province = this.query.address[0];
757
- this.query.city = this.query.address[1];
758
- this.query.district = this.query.address[2];
759
- }
760
- this.queryHospital();
761
- this.forceUpdate();
762
- this.getCloudCount();
763
- this.getLineData();
764
- if (status != 1) {
765
- this.crud.toQuery();
766
- }
767
- },
768
- // 选择逐日-逐年
769
- changeRadio() {
770
- this.getLineData();
771
- },
772
- dateChange() {
773
- this.forceUpdate();
774
- if (this.query.consultationTimeList) {
775
- this.query.startTime = this.query.consultationTimeList[0];
776
- this.query.endTime = this.query.consultationTimeList[1];
777
- } else {
778
- this.query.startTime = '';
779
- this.query.endTime = '';
780
- }
781
- },
782
- //获取统计参数
783
- getCloudCount() {
784
- let data = {
785
- ...this.query,
786
- };
787
- delete data.consultationTimeList;
788
- delete data.address;
789
- getTotalData(data).then(res => {
790
- console.log(res);
791
- this.cloudCount = res || {};
792
- });
793
- },
794
- getLineData() {
795
- let data = {
796
- ...this.query,
797
- statisticsType: this.radio1,
798
- };
799
- delete data.consultationTimeList;
800
- delete data.address;
801
- getLineData(data).then(res => {
802
- this.lineChartData = res;
803
- });
804
- },
805
- forceUpdate() {
806
- this.$forceUpdate(); // 强制刷新
807
- },
808
- //重置
809
- resetQueryClick() {
810
- Object.keys(this.query).map(key => {
811
- this.query[key] = '';
812
- });
813
- this.getPosition(null, () => {});
814
-
815
- this.query.address = ['1114'];
816
- this.query.consultationTimeList = [start, end];
817
- this.toQuery();
818
- },
819
-
820
- //弹出框关闭
821
- dialogClosse() {
822
- this.currentDetail = {};
823
- },
824
- offlineClick(status, prop, title) {
825
- this.offlineDetailVisiable = true;
826
- this.clickIndex = status;
827
- this.dialogText = title;
828
- // this.
829
- this.$nextTick(() => {
830
- this.$refs[prop].toQuery(this.query, status, title);
831
- });
832
- },
833
- //详情
834
- goCloudDetail(row) {
835
- // debugger;
836
- this.cloudDetailVisiable = true;
837
- this.currentDetail = {
838
- ...row,
839
- startTime: this.query.startTime,
840
- endTime: this.query.endTime,
841
- softwareType: this.query.softwareType,
842
- };
843
- this.$nextTick(() => {
844
- if (this.currentDetail.hospitalId) {
845
- this.$refs.cloudListDetail.getCloudDetail(this.currentDetail);
846
- }
847
- });
848
- },
849
- //改变选择的医院
850
- changeHospital() {
851
- this.forceUpdate();
852
- this.queryHospital();
853
- this.toQuery();
854
- },
855
- toQuery() {
856
- this.dateChange();
857
- this.addressChange();
858
- this.crud.toQuery();
859
- this.getLineData();
860
- this.getCloudCount();
861
- },
862
-
863
- [CRUD.HOOK.beforeRefresh](crud) {
864
- Object.keys(this.query).map(key => {
865
- if (typeof this.query[key] == 'string') {
866
- this.query[key] = this.query[key].trim();
867
- }
868
- });
869
- if (!this.query.consultationTimeList && !this.crudShow) {
870
- this.getPosition(null, () => {});
871
- this.query.consultationTimeList = [start, end];
872
- this.query.address = ['1114'];
873
- this.dateChange();
874
- this.addressChange(1);
875
- // this.getLineData();
876
- // this.getCloudCount();
877
- this.crudShow = true;
878
- }
879
- crud.query = {
880
- ...this.query,
881
- };
882
- },
883
- [CRUD.HOOK.afterRefresh](crud) {
884
- console.log(crud, 111111);
885
- },
886
- },
887
-
888
- destroyed() {},
889
-
890
- activated() {
891
- // this.getCloudCount()
892
- },
893
- };
894
- </script>
895
- <style lang="scss"></style>
896
- <style rel="stylesheet/scss" lang="scss" scoped>
897
- @import './index.scss';
898
-
899
- .exploreFlex {
900
- padding: 8px;
901
- text-align: right;
902
- }
903
- </style>
1
+ <template>
2
+ <div class="app-container digitalImage">
3
+ <!-- 工具栏-->
4
+ <el-form :inline="true" :model="query" ref="topForm" class="form-inline-hospital" size="small">
5
+ <el-form-item>
6
+ <!-- 区域 -->
7
+ <el-cascader
8
+ v-model="query.address"
9
+ placeholder="医院地区"
10
+ :options="provinceList"
11
+ :props="props"
12
+ style="width: 220px"
13
+ @active-item-change="handleItemChange"
14
+ @change="addressChange"
15
+ @blur="forceUpdate">
16
+ </el-cascader>
17
+ </el-form-item>
18
+ <el-form-item>
19
+ <el-select
20
+ v-model="query.hospitalType"
21
+ clearable
22
+ placeholder="医院类别"
23
+ class="filter-item"
24
+ style="width: 160px"
25
+ @change="changeHospital"
26
+ @clear="changeHospital">
27
+ <el-option
28
+ v-for="item in dict.hos_category"
29
+ :key="item.value"
30
+ :label="item.label"
31
+ :value="item.value" />
32
+ </el-select>
33
+ </el-form-item>
34
+ <!-- 医院等级 -->
35
+ <el-form-item>
36
+ <el-select
37
+ v-model="query.level"
38
+ clearable
39
+ @change="changeHospital"
40
+ @clear="changeHospital"
41
+ placeholder="医院等级(级)"
42
+ class="filter-item"
43
+ style="width: 160px">
44
+ <el-option
45
+ v-for="item in dict.hos_rank"
46
+ :key="item.value"
47
+ :label="item.label"
48
+ :value="item.value" />
49
+ </el-select>
50
+ </el-form-item>
51
+ <el-form-item prop="hospitalTypeList">
52
+ <el-select
53
+ v-model="query.hospitalIdList"
54
+ clearable
55
+ filterable
56
+ multiple
57
+ @change="changeHospital"
58
+ @clear="changeHospital"
59
+ placeholder="医院名称"
60
+ class="filter-item"
61
+ style="width: 160px">
62
+ <el-option
63
+ v-for="item in hospitalNames"
64
+ :key="item.scenceId"
65
+ :label="item.hospitalName"
66
+ :value="item.scenceId" />
67
+ </el-select>
68
+ </el-form-item>
69
+ <el-form-item prop="softwareType">
70
+ <el-select
71
+ v-model="query.softwareType"
72
+ clearable
73
+ @change="changeHospital"
74
+ @clear="changeHospital"
75
+ placeholder="软件类型"
76
+ class="filter-item"
77
+ style="width: 160px">
78
+ <el-option v-for="item in softData" :key="item" :label="item" :value="item" />
79
+ </el-select>
80
+ </el-form-item>
81
+ <el-form-item>
82
+ <!-- <date-range-picker
83
+ v-model="query.consultationTimeList"
84
+ :picker-options="pickerOptions"
85
+ popper-class="isDisabledDate"
86
+ valueFormat="yyyy-MM-dd"
87
+ style="width: 250px"
88
+ class="date-item"
89
+ @change="dateChange"
90
+ @blur="forceUpdate"
91
+ :clearable="false"
92
+ /> -->
93
+ <date-range-picker
94
+ @blur="forceUpdate"
95
+ @change="dateChange"
96
+ v-model="query.consultationTimeList"
97
+ :picker-options="pickerOptions"
98
+ popper-class="isDisabledDate"
99
+ valueFormat="yyyy-MM-dd"
100
+ style="width: 250px"
101
+ class="date-item"
102
+ :clearable="false" />
103
+ </el-form-item>
104
+
105
+ <el-button @click="toQuery" class="filter-item" size="small">查询 </el-button>
106
+ <el-button @click="resetQueryClick" class="filter-item" size="small">重置 </el-button>
107
+ </el-form>
108
+ <!-- 统计模块 -->
109
+ <div class="self-statiscs">
110
+ <div class="other" @click="offlineClick(1, 'hospitalDetail', '医院数量详情')">
111
+ <p class="top">
112
+ <span>医院数量</span>
113
+ <el-tooltip
114
+ class="item"
115
+ effect="dark"
116
+ content="是【医院管理】模块内录入自助机信息的医院数量及自助机总量,不随检索时间及软件类型变化"
117
+ placement="top-start">
118
+ <span class="el-icon-question"></span>
119
+ </el-tooltip>
120
+ <span class="bold">{{ (cloudCount.myHospitalTotal || 0) | NumFormat }}</span>
121
+ </p>
122
+ <p class="bottom">
123
+ <span><i></i>配备自助机</span>
124
+ <span class="bold">{{ (cloudCount.myMachineQuantity || 0) | NumFormat }}</span>
125
+ </p>
126
+ </div>
127
+ <div class="other" @click="offlineClick(2, 'hospitalDetail', '监测自助机详情')">
128
+ <p class="top">
129
+ <span>监测自助机系统</span>
130
+ <el-tooltip
131
+ class="item"
132
+ effect="dark"
133
+ content="是系统实际监测到的系统数量,不随检索时间变化"
134
+ placement="top-start">
135
+ <span class="el-icon-question"></span>
136
+ </el-tooltip>
137
+ <span class="bold">{{ (cloudCount.machineTotal || 0) | NumFormat }}</span>
138
+ </p>
139
+ <div class="bottom special-bottom">
140
+ <!-- <img src="~@/assets/images/hospital_icon.png" alt="" /> -->
141
+ <p>
142
+ <i></i>影联系统<span class="bold">{{
143
+ (cloudCount.ylyxMachineTotal || 0) | NumFormat
144
+ }}</span>
145
+ </p>
146
+ <p>
147
+ <i></i>真实自助机<span class="bold">{{
148
+ (cloudCount.realMachine || 0) | NumFormat
149
+ }}</span>
150
+ </p>
151
+ <p :style="{ visibility: query.softwareType == '影联' ? 'hidden' : 'visible' }">
152
+ <i class="first"></i>非影联系统<span class="bold">{{
153
+ (cloudCount.otherMachineTotal || 0) | NumFormat
154
+ }}</span>
155
+ </p>
156
+ <p>
157
+ <i class="first"></i>非真实自助机<span class="bold">{{
158
+ (cloudCount.virtualMachine || 0) | NumFormat
159
+ }}</span>
160
+ </p>
161
+ </div>
162
+ </div>
163
+ <div class="other" @click="offlineClick(3, 'hospitalDetail', '自助机活跃度详情')">
164
+ <p class="top">
165
+ <span>自助机活跃度</span>
166
+ <el-tooltip
167
+ class="item"
168
+ effect="dark"
169
+ content="是实际监测到的真实自助机的活跃度"
170
+ placement="top-start">
171
+ <span class="el-icon-question"></span>
172
+ </el-tooltip>
173
+ <span class="bold">{{ dealData(cloudCount.activityRate) }}</span>
174
+ </p>
175
+ <div class="bottom">
176
+ <!-- <img src="~@/assets/images/hospital_icon.png" alt="" /> -->
177
+ <p>
178
+ <i></i>影联系统<span class="bold">{{
179
+ dealData(cloudCount.ylyxMachineActivityRate)
180
+ }}</span>
181
+ </p>
182
+ <p v-show="query.softwareType !== '影联'">
183
+ <i class="first"></i>非影联系统<span class="bold">{{
184
+ dealData(cloudCount.qtMachineActivityRate)
185
+ }}</span>
186
+ </p>
187
+ </div>
188
+ </div>
189
+ <div class="other">
190
+ <p class="top">
191
+ <!-- <img src="~@/assets/images/hospital_icon.png" alt="" /> -->
192
+ <span>打印报告</span>
193
+ <span class="bold">{{ (cloudCount.cumulativePrintTimes || 0) | NumFormat }}</span>
194
+ </p>
195
+ <div class="bottom">
196
+ <!-- <img src="~@/assets/images/hospital_icon.png" alt="" /> -->
197
+ <p>
198
+ <i></i>影联系统<span class="bold">{{
199
+ (cloudCount.ylyxCumulativePrintTimes || 0) | NumFormat
200
+ }}</span>
201
+ </p>
202
+ <p :style="{ visibility: query.softwareType == '影联' ? 'hidden' : 'visible' }">
203
+ <i class="first"></i>非影联系统<span class="bold">{{
204
+ (cloudCount.qtCumulativePrintTimes || 0) | NumFormat
205
+ }}</span>
206
+ </p>
207
+ </div>
208
+ </div>
209
+ <div class="other bg2" @click="offlineClick(5, 'offlineDetail', '客户端状态详情')">
210
+ <p class="top">
211
+ <span>客户端状态</span>
212
+ <el-tooltip
213
+ class="item"
214
+ effect="dark"
215
+ content="影联客户端在线状态,不随检索的时间区间及软件类型变化"
216
+ placement="top-start">
217
+ <span class="el-icon-question"></span>
218
+ </el-tooltip>
219
+ </p>
220
+ <p class="bottom">
221
+ <span>
222
+ <svg-icon class-name="online" icon-class="online" />在线<span class="bold">{{
223
+ (cloudCount.online || 0) | NumFormat
224
+ }}</span></span
225
+ >
226
+ <span>
227
+ <svg-icon class-name="offline" icon-class="offline" />离线<span class="bold">{{
228
+ (cloudCount.offline || 0) | NumFormat
229
+ }}</span></span
230
+ >
231
+ </p>
232
+ <div class="offline-detail">离线详情</div>
233
+ </div>
234
+ </div>
235
+ <div class="changeBtns">
236
+ <div class="frequency">
237
+ <ul>
238
+ <li
239
+ v-for="(item, index) in frequencyArr"
240
+ :key="index"
241
+ :class="[activeIndex == item.active ? 'frequencyActive' : '']"
242
+ @click="clickFrequency(item.active)">
243
+ {{ item.name }}
244
+ </li>
245
+ </ul>
246
+ </div>
247
+ <div class="radioBtn">
248
+ <el-radio-group v-model="radio1" size="small" @change="changeRadio">
249
+ <el-radio-button label="day">按天</el-radio-button>
250
+ <el-radio-button label="week">按周</el-radio-button>
251
+ <el-radio-button label="month">按月</el-radio-button>
252
+ <el-radio-button label="year">按年</el-radio-button>
253
+ </el-radio-group>
254
+ </div>
255
+ </div>
256
+
257
+ <line-chart :className="'lineChart'" :chart-data="lineChartData" />
258
+ <div class="export">
259
+ <el-button type="primary" @click="explore" :loading="downloadLoading" plain size="mini"
260
+ >导出</el-button
261
+ >
262
+ </div>
263
+ <div class="table-Data">
264
+ <!-- 表格 -->
265
+ <el-table :data="crud.data" v-loading="crud.loading" @sort-change="sortChange">
266
+ <el-table-column label="序号" width="60px">
267
+ <template slot-scope="scope">
268
+ <span>{{ (crud.page.page - 1) * crud.page.size + scope.$index + 1 }}</span>
269
+ </template>
270
+ </el-table-column>
271
+ <el-table-column
272
+ v-for="(item, index) in checkTable"
273
+ :key="index.key"
274
+ :label="item.label"
275
+ :prop="item.prop"
276
+ :show-overflow-tooltip="true"
277
+ :min-width="item.width"
278
+ :sortable="item.sort"
279
+ :render-header="renderPrice"
280
+ :sort-method="
281
+ (a, b) => {
282
+ return a[item.prop] - b[item.prop];
283
+ }
284
+ ">
285
+ <template slot-scope="scope">
286
+ <div v-if="item.prop == 'hospitalType'">
287
+ {{ hosCategory(scope.row.hospitalType) || omitData }}
288
+ </div>
289
+ <div v-else-if="item.prop == 'level'">
290
+ {{ hosRank(scope.row.level) || omitData }}
291
+ </div>
292
+ <div v-else-if="item.prop == 'printTimes'">
293
+ {{ scope.row.printTimes || 0 }}
294
+ </div>
295
+ <div v-else-if="item.prop == 'printTimeOfDailyAverage'">
296
+ {{ scope.row.printTimeOfDailyAverage || 0 }}
297
+ </div>
298
+ <div v-else-if="item.prop == 'activityMachineTotalRate'">
299
+ {{ dealData(scope.row.activityMachineTotalRate) }}
300
+ </div>
301
+ <div v-else-if="item.prop == 'reportConversionRate'">
302
+ {{ dealData(scope.row.reportConversionRate) }}
303
+ </div>
304
+ <div v-else>
305
+ {{ scope.row[item.prop] || omitData }}
306
+ </div>
307
+ </template>
308
+ </el-table-column>
309
+ <el-table-column label="操作" width="80" fixed="right">
310
+ <template slot-scope="scope">
311
+ <el-button size="mini" type="text" @click="goCloudDetail(scope.row)">详情 </el-button>
312
+ </template>
313
+ </el-table-column>
314
+ </el-table>
315
+ <!--分页组件-->
316
+ <pagination />
317
+ </div>
318
+
319
+ <!-- 维护记录弹窗 -->
320
+ <el-dialog
321
+ :title="currentDetail.hospitalName"
322
+ top="5vh"
323
+ :visible.sync="cloudDetailVisiable"
324
+ :close-on-click-modal="false"
325
+ width="75%"
326
+ @close="dialogClosse">
327
+ <span slot="title" class="dialog-footer"
328
+ >{{ currentDetail.hospitalName }} {{ currentDetail.startTime }}至{{
329
+ currentDetail.endTime
330
+ }}</span
331
+ >
332
+ <cloudListDetail ref="cloudListDetail" :cloudDetail="currentDetail" />
333
+ </el-dialog>
334
+ <!-- 维护记录弹窗 -->
335
+ <el-dialog
336
+ :title="dialogText"
337
+ top="5vh"
338
+ :visible.sync="offlineDetailVisiable"
339
+ :close-on-click-modal="false"
340
+ width="85%">
341
+ <span slot="title" class="dialog-footer"
342
+ >{{ dialogText }}
343
+ <el-tooltip class="item" effect="dark" placement="top-start">
344
+ <div slot="content" v-html="content"></div>
345
+ <span class="el-icon-question" v-if="clickIndex !== 5"></span> </el-tooltip
346
+ ></span>
347
+ <hospital-detail ref="hospitalDetail" v-if="clickIndex !== 5"></hospital-detail>
348
+ <!-- <self-monitor-detail
349
+ ref="selfMonitorDetail"
350
+ v-if="clickIndex == 2"
351
+ ></self-monitor-detail>
352
+ <self-active-detail
353
+ ref="selfActiveDetail"
354
+ v-if="clickIndex == 3"
355
+ ></self-active-detail> -->
356
+ <offline-detail ref="offlineDetail" v-if="clickIndex == 5" :data="query" />
357
+ </el-dialog>
358
+ <!-- <WaterMark :waterMarkProp="waterMarkProp" /> -->
359
+ </div>
360
+ </template>
361
+
362
+ <script>
363
+ import LineChart from './components/LineChart.vue';
364
+ import { mapGetters } from 'vuex';
365
+ import pagination from '@crud/Pagination';
366
+ import cloudListDetail from './monitorDetail/index.vue';
367
+ import offlineDetail from './offlineDetail/index.vue';
368
+ import hospitalDetail from './hospitalDetail/index.vue';
369
+ import selfMonitorDetail from './selfMonitorDetail/index.vue';
370
+ import selfActiveDetail from './selfActiveDetail/index.vue';
371
+ import CRUD, { presenter, header, crud } from '@crud/crud';
372
+ import { getTotalData, getLineData, queryHospital } from '@/api/selfStatistics/index.js';
373
+ import DateRangePicker from '@/components/DateRangePicker';
374
+ import institutionMonitor from '@/api/institutionMonitor/index';
375
+ import { getDay } from '@/utils/getTime';
376
+ import WaterMark from './setWaterMark/waterMark.vue';
377
+ import { downloadFile } from '@/utils/index';
378
+ import { downloadPost } from '@/api/data';
379
+ const end = getDay(-1);
380
+ const start = getDay(-7);
381
+ export default {
382
+ name: 'cloudStatistics',
383
+ components: {
384
+ pagination,
385
+ cloudListDetail,
386
+ DateRangePicker,
387
+ LineChart,
388
+ offlineDetail,
389
+ WaterMark,
390
+ hospitalDetail,
391
+ selfMonitorDetail,
392
+ selfActiveDetail,
393
+ },
394
+ dicts: ['cloud_code', 'hos_category', 'hos_rank'],
395
+ data() {
396
+ return {
397
+ waterMarkProp: {
398
+ zIndex: 1,
399
+ devicePixelRatio: 2,
400
+ text: '',
401
+ showTime: true,
402
+ },
403
+ omitData: '-',
404
+ provinceList: [],
405
+ // 区域
406
+ props: {
407
+ value: 'value',
408
+ children: 'cities',
409
+ label: 'label',
410
+ checkStrictly: true,
411
+ },
412
+ hospitalNames: [],
413
+ radio1: 'day',
414
+ checkTable: [
415
+ { label: '医院名称', prop: 'hospitalName', width: '180px' },
416
+ { label: '医院类别', prop: 'hospitalType', width: '120px' },
417
+ { label: '医院等级(级)', prop: 'level', width: '120px' },
418
+ { label: '配备自助机', prop: 'myMachineTotal', width: '120px', sort: true },
419
+ { label: '监测自助机', prop: 'machineTotal', width: '120px', sort: true },
420
+ {
421
+ label: '该时间段活跃自助机',
422
+ prop: 'activityMachineTotal',
423
+ width: '190px',
424
+ sort: true,
425
+ },
426
+ {
427
+ label: '该时间段自助机活跃度',
428
+ prop: 'activityMachineTotalRate',
429
+ width: '190px',
430
+ sort: true,
431
+ },
432
+
433
+ { label: '审核报告量', prop: 'auditedDataTotal', width: '120px', sort: true },
434
+ { label: '打印报告量', prop: 'printTimes', width: '120px', sort: true },
435
+ { label: '报告转化率', prop: 'reportConversionRate', width: '120px', sort: true },
436
+ {
437
+ label: '日均打印报告量',
438
+ prop: 'printTimeOfDailyAverage',
439
+ width: '160px',
440
+ sort: true,
441
+ },
442
+ ],
443
+ // 获取统计数量
444
+ cloudCount: {},
445
+ // 详情弹窗控制
446
+ cloudDetailVisiable: false,
447
+ // 当前点击的详情信息
448
+ currentDetail: {},
449
+ // 导出
450
+ downloadLoading: false,
451
+ // 离线详情
452
+ offlineDetailVisiable: false,
453
+ // 判断是否第一次
454
+ crudShow: false,
455
+ lineChartData: {
456
+ times: [],
457
+ datas: [],
458
+ },
459
+ activeIndex: 1,
460
+ clickIndex: 1,
461
+ dialogText: '',
462
+ frequencyArr: [
463
+ {
464
+ name: '数据趋势',
465
+ active: '1',
466
+ },
467
+ ],
468
+ softData: ['影联'],
469
+ sortString: {
470
+ myMachineTotal: 1,
471
+ machineTotal: 2,
472
+ activityMachineTotal: 6,
473
+ auditedDataTotal: 7,
474
+ printTimes: 8,
475
+ printTimeOfDailyAverage: 9,
476
+ activityMachineTotalRate: 11,
477
+ reportConversionRate: 12,
478
+ },
479
+ downloadLoading: false,
480
+ pickerOptions: {
481
+ disabledDate(time) {
482
+ return time.getTime() > Date.now();
483
+ },
484
+ shortcuts: [
485
+ {
486
+ text: '近一周',
487
+ onClick(picker) {
488
+ const end = new Date();
489
+ const start = new Date();
490
+ end.setTime(end.getTime() - 3600 * 1000 * 24);
491
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
492
+ picker.$emit('pick', [start, end]);
493
+ },
494
+ },
495
+ {
496
+ text: '近一个月',
497
+ onClick(picker) {
498
+ const end = new Date();
499
+ const start = new Date();
500
+ end.setTime(end.getTime() - 3600 * 1000 * 24);
501
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
502
+ picker.$emit('pick', [start, end]);
503
+ },
504
+ },
505
+ {
506
+ text: '近三个月',
507
+ onClick(picker) {
508
+ const end = new Date();
509
+ const start = new Date();
510
+ end.setTime(end.getTime() - 3600 * 1000 * 24);
511
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
512
+ picker.$emit('pick', [start, end]);
513
+ },
514
+ },
515
+ {
516
+ text: '最近一年',
517
+ onClick: picker => {
518
+ const end = new Date(); // 当前日期
519
+ const start = new Date(); // 开始日期
520
+
521
+ end.setDate(end.getDate() - 1); // 设置结束日期为昨天
522
+ start.setFullYear(start.getFullYear() - 1); // 设置开始日期为一年前
523
+
524
+ picker.$emit('pick', [start, end]);
525
+ },
526
+ },
527
+ {
528
+ text: '本年度',
529
+ onClick: picker => {
530
+ const end = new Date(); // 当前日期
531
+ const start = new Date(); // 开始日期
532
+ start.setDate(1);
533
+ end.setDate(end.getDate() - 1); // 设置结束日期为昨天
534
+ start.setMonth(0); // 设置开始日期为今年的1月份
535
+ picker.$emit('pick', [start, end]);
536
+ },
537
+ },
538
+ ],
539
+ },
540
+ };
541
+ },
542
+ mounted() {
543
+ this.waterMarkProp.text = this.user.name;
544
+ },
545
+ cruds() {
546
+ return CRUD({
547
+ title: '医院',
548
+ url: 'machine/getHospitalTableData',
549
+ crudMethod: {},
550
+ sort: [],
551
+ query: {},
552
+ });
553
+ },
554
+ computed: {
555
+ ...mapGetters(['user']),
556
+ content() {
557
+ return ` 配备自助机数量:是公司在医疗机构实际安装的自助机数量;<br/>
558
+ 监测自助机数量:是系统实际监测到的医疗机构的自助机数量(自助机信息上传成功);<br/>
559
+ 影联系统:是监测到的自助机中,有几台安装的是影联自研的打印系统;<br/>
560
+ 非影联系统:是监测到的自助机中,有几台安装的不是影联自研的打印系统;<br/>
561
+ 近7天是否活跃:是近7天该医疗机构监测到的自助机是否有过打印记录;</br>
562
+ 近7天活跃度:是该医疗机构监测到的自助机的活跃度,近7天有过打印记录的自助机数量÷监测到的自助机总数量;<br/>
563
+ `;
564
+ },
565
+ },
566
+ mixins: [presenter(), header(), crud()],
567
+
568
+ filters: {
569
+ NumFormat(value) {
570
+ if (value == '-') return '-';
571
+ if (!value) return '0';
572
+ /*原来用的是Number(value).toFixed(0),这样取整时有问题,例如0.51取整之后为1,感谢Nils指正*/
573
+ /*后来改成了 Number(value)|0,但是输入超过十一位就为负数了,具体见评论 */
574
+ var intPart = Number(value) - (Number(value) % 1); //获取整数部分(这里是windy93的方法)
575
+ var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,'); //将整数部分逢三一断
576
+
577
+ var floatPart = ''; //预定义小数部分
578
+ var value2Array = value.toString().split('.');
579
+
580
+ //=2表示数据有小数位
581
+ if (value2Array.length == 2) {
582
+ floatPart = value2Array[1].toString(); //拿到小数部分
583
+
584
+ if (floatPart.length == 1) {
585
+ //补0,实际上用不着
586
+ return intPartFormat + '.' + floatPart + '0';
587
+ } else {
588
+ return intPartFormat + '.' + floatPart;
589
+ }
590
+ } else {
591
+ return intPartFormat + floatPart;
592
+ }
593
+ },
594
+ },
595
+
596
+ methods: {
597
+ dealData(value) {
598
+ if (value == -1 || value === undefined) {
599
+ return '-';
600
+ } else if (value === 0) {
601
+ return value;
602
+ } else {
603
+ return value + '%';
604
+ }
605
+ },
606
+ sortChange(column) {
607
+ if (column.order == 'ascending') {
608
+ this.query = {
609
+ ...this.query,
610
+ sortType: this.sortString[column.prop],
611
+ sort: 1,
612
+ };
613
+ this.crud.toQuery();
614
+ } else if (column.order == 'descending') {
615
+ this.query = {
616
+ ...this.query,
617
+ sortType: this.sortString[column.prop],
618
+ sort: 2,
619
+ };
620
+ this.crud.toQuery();
621
+ }
622
+ },
623
+ renderPrice(h, { column, $index }) {
624
+ if (column.property == 'activityMachineTotal') {
625
+ return [
626
+ column.label,
627
+ h(
628
+ 'el-tooltip',
629
+ {
630
+ props: {
631
+ content: '在上方选择的时间区间内,有过打印记录的被监测到的自助机数量',
632
+ placement: 'top', // 悬停内容展示的位置
633
+ },
634
+ },
635
+ [h('span', { class: { 'el-icon-question': true } })] // 图标
636
+ ),
637
+ ];
638
+ } else {
639
+ return column.label;
640
+ }
641
+ },
642
+ // 导出
643
+ explore() {
644
+ this.downloadLoading = true;
645
+ // let hospitalId=this.currentDetail.hospitalId
646
+ // let hospitalName=this.currentDetail.hospitalName,
647
+ let data = {
648
+ ...this.query,
649
+ };
650
+ downloadPost('machine/downloadHospitalTableData', data)
651
+ .then(result => {
652
+ this.downloadLoading = false;
653
+ })
654
+ .catch(e => {
655
+ let text = `医院列表 ${this.query.startTime}至${this.query.endTime}`;
656
+ downloadFile(e, text, 'xlsx');
657
+ this.downloadLoading = false;
658
+ });
659
+ },
660
+ // 返回医院类别对应的名称
661
+ hosCategory(category) {
662
+ return this.dict.label.hos_category[category];
663
+ },
664
+ // 返回医院等级(级)对应的名称
665
+ hosRank(rank) {
666
+ return this.dict.label.hos_rank[rank];
667
+ },
668
+ // 地区联动获取数据
669
+ getPosition(val, cb) {
670
+ let vm = this; //查询省市县
671
+ let params = { parent: 1 };
672
+ if (!val) {
673
+ //初始化加载 获取所有省份数据
674
+ params = { parent: 1 };
675
+ } else if (val.length === 1) {
676
+ //加载二级 获取市级数据
677
+ params = { parent: val[0] };
678
+ } else {
679
+ //加载3级 获取县级数据
680
+ params = { parent: val[1] };
681
+ }
682
+ institutionMonitor
683
+ .queryNation(params)
684
+ .then(res => {
685
+ if (!val) {
686
+ //初始化加载 查询省份数据
687
+ vm.provinceList = res.content.map(e => {
688
+ return {
689
+ value: e.saleid,
690
+ label: e.province,
691
+ cities: [],
692
+ };
693
+ });
694
+ } else if (val.length === 1) {
695
+ //加载二级 查询该省下市级数据
696
+ vm.provinceList.map(item => {
697
+ if (item.value === val[0]) {
698
+ item.cities = res.content.map(e => {
699
+ return {
700
+ value: e.saleid,
701
+ label: e.city || e.county,
702
+ cities: [],
703
+ };
704
+ });
705
+ }
706
+ });
707
+ } else {
708
+ //加载3级 查询该省市下县级数据
709
+ vm.provinceList.map(item => {
710
+ if (item.value === val[0]) {
711
+ item.cities.map(value => {
712
+ if (value.value === val[1]) {
713
+ value.cities = res.content.map(e => {
714
+ return { value: e.saleid, label: e.county };
715
+ });
716
+ }
717
+ });
718
+ }
719
+ });
720
+ }
721
+ cb && cb(res);
722
+ })
723
+ .catch(err => {
724
+ console.log(err);
725
+ });
726
+ },
727
+ // 一级二级改变的时候调取下一级数据
728
+ handleItemChange(val) {
729
+ this.getPosition(val);
730
+ },
731
+ // 查询医院名称
732
+ queryHospital() {
733
+ let params = JSON.parse(JSON.stringify(this.query));
734
+ params.county = params.district;
735
+
736
+ // 删除时间 医院名称
737
+ delete params.consultationTimeList;
738
+ delete params.address;
739
+ delete params.startTime;
740
+ delete params.endTime;
741
+ delete params.hospitalIdList;
742
+ params.deleted = 0;
743
+ queryHospital(params).then(res => {
744
+ this.hospitalNames = [];
745
+ res.forEach(k => {
746
+ let obj = {
747
+ scenceId: k.scenceId,
748
+ hospitalName: k.hospitalName,
749
+ };
750
+ this.hospitalNames.push(obj);
751
+ });
752
+ });
753
+ },
754
+ addressChange(status) {
755
+ if (this.query.address.length > 0) {
756
+ this.query.province = this.query.address[0];
757
+ this.query.city = this.query.address[1];
758
+ this.query.district = this.query.address[2];
759
+ }
760
+ this.queryHospital();
761
+ this.forceUpdate();
762
+ this.getCloudCount();
763
+ this.getLineData();
764
+ if (status != 1) {
765
+ this.crud.toQuery();
766
+ }
767
+ },
768
+ // 选择逐日-逐年
769
+ changeRadio() {
770
+ this.getLineData();
771
+ },
772
+ dateChange() {
773
+ this.forceUpdate();
774
+ if (this.query.consultationTimeList) {
775
+ this.query.startTime = this.query.consultationTimeList[0];
776
+ this.query.endTime = this.query.consultationTimeList[1];
777
+ } else {
778
+ this.query.startTime = '';
779
+ this.query.endTime = '';
780
+ }
781
+ },
782
+ //获取统计参数
783
+ getCloudCount() {
784
+ let data = {
785
+ ...this.query,
786
+ };
787
+ delete data.consultationTimeList;
788
+ delete data.address;
789
+ getTotalData(data).then(res => {
790
+ console.log(res);
791
+ this.cloudCount = res || {};
792
+ });
793
+ },
794
+ getLineData() {
795
+ let data = {
796
+ ...this.query,
797
+ statisticsType: this.radio1,
798
+ };
799
+ delete data.consultationTimeList;
800
+ delete data.address;
801
+ getLineData(data).then(res => {
802
+ this.lineChartData = res;
803
+ });
804
+ },
805
+ forceUpdate() {
806
+ this.$forceUpdate(); // 强制刷新
807
+ },
808
+ //重置
809
+ resetQueryClick() {
810
+ Object.keys(this.query).map(key => {
811
+ this.query[key] = '';
812
+ });
813
+ this.getPosition(null, () => {});
814
+
815
+ this.query.address = ['1114'];
816
+ this.query.consultationTimeList = [start, end];
817
+ this.toQuery();
818
+ },
819
+
820
+ //弹出框关闭
821
+ dialogClosse() {
822
+ this.currentDetail = {};
823
+ },
824
+ offlineClick(status, prop, title) {
825
+ this.offlineDetailVisiable = true;
826
+ this.clickIndex = status;
827
+ this.dialogText = title;
828
+ // this.
829
+ this.$nextTick(() => {
830
+ this.$refs[prop].toQuery(this.query, status, title);
831
+ });
832
+ },
833
+ //详情
834
+ goCloudDetail(row) {
835
+ // debugger;
836
+ this.cloudDetailVisiable = true;
837
+ this.currentDetail = {
838
+ ...row,
839
+ startTime: this.query.startTime,
840
+ endTime: this.query.endTime,
841
+ softwareType: this.query.softwareType,
842
+ };
843
+ this.$nextTick(() => {
844
+ if (this.currentDetail.hospitalId) {
845
+ this.$refs.cloudListDetail.getCloudDetail(this.currentDetail);
846
+ }
847
+ });
848
+ },
849
+ //改变选择的医院
850
+ changeHospital() {
851
+ this.forceUpdate();
852
+ this.queryHospital();
853
+ this.toQuery();
854
+ },
855
+ toQuery() {
856
+ this.dateChange();
857
+ this.addressChange();
858
+ this.crud.toQuery();
859
+ this.getLineData();
860
+ this.getCloudCount();
861
+ },
862
+
863
+ [CRUD.HOOK.beforeRefresh](crud) {
864
+ Object.keys(this.query).map(key => {
865
+ if (typeof this.query[key] == 'string') {
866
+ this.query[key] = this.query[key].trim();
867
+ }
868
+ });
869
+ if (!this.query.consultationTimeList && !this.crudShow) {
870
+ this.getPosition(null, () => {});
871
+ this.query.consultationTimeList = [start, end];
872
+ this.query.address = ['1114'];
873
+ this.dateChange();
874
+ this.addressChange(1);
875
+ // this.getLineData();
876
+ // this.getCloudCount();
877
+ this.crudShow = true;
878
+ }
879
+ crud.query = {
880
+ ...this.query,
881
+ };
882
+ },
883
+ [CRUD.HOOK.afterRefresh](crud) {
884
+ console.log(crud, 111111);
885
+ },
886
+ },
887
+
888
+ destroyed() {},
889
+
890
+ activated() {
891
+ // this.getCloudCount()
892
+ },
893
+ };
894
+ </script>
895
+ <style lang="scss"></style>
896
+ <style rel="stylesheet/scss" lang="scss" scoped>
897
+ @import './index.scss';
898
+
899
+ .exploreFlex {
900
+ padding: 8px;
901
+ text-align: right;
902
+ }
903
+ </style>