ylyx-cli 1.0.16 → 1.1.1

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 (289) hide show
  1. package/README.md +313 -276
  2. package/bin/ylyx.js +176 -168
  3. package/lib/config.js +325 -283
  4. package/lib/deploy.js +509 -529
  5. package/lib/environments.js +111 -0
  6. package/lib/generator.js +192 -192
  7. package/lib/index.js +113 -113
  8. package/lib/interactive.js +87 -87
  9. package/lib/remote.js +179 -179
  10. package/lib/template.js +174 -174
  11. package/lib/utils.js +148 -148
  12. package/package.json +61 -59
  13. package/templates/react-app/files/.gitignore +22 -0
  14. package/templates/react-app/files/README.md +23 -23
  15. package/templates/react-app/files/package.json +28 -28
  16. package/templates/react-app/files/public/index.html +11 -11
  17. package/templates/react-app/files/src/App.css +15 -15
  18. package/templates/react-app/files/src/App.js +15 -15
  19. package/templates/react-app/files/src/index.css +10 -10
  20. package/templates/react-app/files/src/index.js +11 -11
  21. package/templates/react-app/template.json +11 -11
  22. package/templates/react-component/files/Component.module.css +5 -5
  23. package/templates/react-component/files/Component.tsx +31 -31
  24. package/templates/react-component/files/index.ts +2 -2
  25. package/templates/react-component/template.json +48 -48
  26. package/templates/vue-app/files/.editorconfig +14 -14
  27. package/templates/vue-app/files/.env.development +21 -21
  28. package/templates/vue-app/files/.env.production +18 -18
  29. package/templates/vue-app/files/.eslintignore +5 -5
  30. package/templates/vue-app/files/.eslintrc.js +267 -267
  31. package/templates/vue-app/files/.gitignore +24 -0
  32. package/templates/vue-app/files/.prettierignore +11 -11
  33. package/templates/vue-app/files/.travis.yml +5 -5
  34. package/templates/vue-app/files/.vscode/extensions.json +7 -7
  35. package/templates/vue-app/files/.vscode/settings.json +39 -39
  36. package/templates/vue-app/files/LICENSE +191 -191
  37. package/templates/vue-app/files/README.md +87 -87
  38. package/templates/vue-app/files/babel.config.js +11 -11
  39. package/templates/vue-app/files/jest.config.js +24 -24
  40. package/templates/vue-app/files/package.json +136 -136
  41. package/templates/vue-app/files/plopfile.js +7 -7
  42. package/templates/vue-app/files/postcss.config.js +5 -5
  43. package/templates/vue-app/files/public/default.js +25 -25
  44. package/templates/vue-app/files/public/index.html +26 -26
  45. package/templates/vue-app/files/src/App.vue +54 -54
  46. package/templates/vue-app/files/src/api/bigDataV/index.js +198 -198
  47. package/templates/vue-app/files/src/api/data.js +42 -42
  48. package/templates/vue-app/files/src/api/dataArchive/index.js +186 -186
  49. package/templates/vue-app/files/src/api/generator/genConfig.js +16 -16
  50. package/templates/vue-app/files/src/api/generator/generator.js +32 -32
  51. package/templates/vue-app/files/src/api/indexManagement/index.js +39 -39
  52. package/templates/vue-app/files/src/api/institutionMonitor/index.js +396 -396
  53. package/templates/vue-app/files/src/api/institutionSet/index.js +120 -120
  54. package/templates/vue-app/files/src/api/login.js +44 -44
  55. package/templates/vue-app/files/src/api/selfStatistics/index.js +50 -50
  56. package/templates/vue-app/files/src/api/system/code.js +15 -15
  57. package/templates/vue-app/files/src/api/system/dict.js +34 -34
  58. package/templates/vue-app/files/src/api/system/dictDetail.js +52 -52
  59. package/templates/vue-app/files/src/api/system/equipment.js +35 -35
  60. package/templates/vue-app/files/src/api/system/examManage.js +49 -49
  61. package/templates/vue-app/files/src/api/system/examProject.js +48 -48
  62. package/templates/vue-app/files/src/api/system/hosModel.js +35 -35
  63. package/templates/vue-app/files/src/api/system/hospital.js +88 -88
  64. package/templates/vue-app/files/src/api/system/job.js +40 -40
  65. package/templates/vue-app/files/src/api/system/menu.js +67 -67
  66. package/templates/vue-app/files/src/api/system/model.js +42 -42
  67. package/templates/vue-app/files/src/api/system/risConfig.js +9 -9
  68. package/templates/vue-app/files/src/api/system/role.js +64 -64
  69. package/templates/vue-app/files/src/api/system/sysSet.js +19 -19
  70. package/templates/vue-app/files/src/api/system/timing.js +41 -41
  71. package/templates/vue-app/files/src/api/system/user.js +121 -121
  72. package/templates/vue-app/files/src/api/tools/alipay.js +25 -25
  73. package/templates/vue-app/files/src/api/tools/email.js +24 -24
  74. package/templates/vue-app/files/src/api/tools/localStorage.js +27 -27
  75. package/templates/vue-app/files/src/api/tools/qiniu.js +40 -40
  76. package/templates/vue-app/files/src/assets/css/font-awesome.css +2342 -2342
  77. package/templates/vue-app/files/src/assets/css/font-awesome.min.css +2336 -2336
  78. package/templates/vue-app/files/src/assets/fonts/fontawesome-webfont.svg +2671 -2671
  79. package/templates/vue-app/files/src/assets/icons/index.js +9 -9
  80. package/templates/vue-app/files/src/assets/icons/svg/hospital.svg +1 -1
  81. package/templates/vue-app/files/src/assets/icons/svg/hospital1.svg +1 -1
  82. package/templates/vue-app/files/src/assets/icons/svg/loginOne.svg +35 -35
  83. package/templates/vue-app/files/src/assets/icons/svg/loginOneWhite.svg +19 -19
  84. package/templates/vue-app/files/src/assets/icons/svg/loginOr.svg +93 -93
  85. package/templates/vue-app/files/src/assets/icons/svg/loginUp.svg +96 -96
  86. package/templates/vue-app/files/src/assets/icons/svg/monitor.svg +1 -1
  87. package/templates/vue-app/files/src/assets/icons/svg/offline.svg +1 -1
  88. package/templates/vue-app/files/src/assets/icons/svg/online.svg +1 -1
  89. package/templates/vue-app/files/src/assets/icons/svg/system.svg +1 -1
  90. package/templates/vue-app/files/src/assets/icons/svgo.yml +21 -21
  91. package/templates/vue-app/files/src/assets/styles/btn.scss +103 -103
  92. package/templates/vue-app/files/src/assets/styles/eladmin.scss +124 -124
  93. package/templates/vue-app/files/src/assets/styles/element-ui.scss +217 -217
  94. package/templates/vue-app/files/src/assets/styles/element-variables.scss +31 -31
  95. package/templates/vue-app/files/src/assets/styles/global.scss +73 -73
  96. package/templates/vue-app/files/src/assets/styles/index.scss +220 -220
  97. package/templates/vue-app/files/src/assets/styles/mixin.scss +60 -60
  98. package/templates/vue-app/files/src/assets/styles/publicStyle.scss +224 -224
  99. package/templates/vue-app/files/src/assets/styles/sidebar.scss +239 -239
  100. package/templates/vue-app/files/src/assets/styles/transition.scss +48 -48
  101. package/templates/vue-app/files/src/assets/styles/variables.scss +44 -44
  102. package/templates/vue-app/files/src/common/flexible.js +145 -145
  103. package/templates/vue-app/files/src/components/Breadcrumb/index.vue +87 -87
  104. package/templates/vue-app/files/src/components/Crud/CRUD.operation.vue +248 -248
  105. package/templates/vue-app/files/src/components/Crud/Pagination.vue +20 -20
  106. package/templates/vue-app/files/src/components/Crud/RR.operation.vue +39 -39
  107. package/templates/vue-app/files/src/components/Crud/UD.operation.vue +106 -106
  108. package/templates/vue-app/files/src/components/Crud/crud.js +907 -907
  109. package/templates/vue-app/files/src/components/Crud/user/UR.operation.vue +154 -154
  110. package/templates/vue-app/files/src/components/DateRangePicker/index.vue +42 -42
  111. package/templates/vue-app/files/src/components/DateRangePickerProhibitNext/index.vue +42 -42
  112. package/templates/vue-app/files/src/components/DateRangePickerProhibitTodayNext/index.vue +48 -48
  113. package/templates/vue-app/files/src/components/Dict/Dict.js +31 -31
  114. package/templates/vue-app/files/src/components/Dict/index.js +29 -29
  115. package/templates/vue-app/files/src/components/Doc/index.vue +16 -16
  116. package/templates/vue-app/files/src/components/Echarts/BarChart.vue +115 -115
  117. package/templates/vue-app/files/src/components/Echarts/Category.vue +768 -768
  118. package/templates/vue-app/files/src/components/Echarts/Funnel.vue +120 -120
  119. package/templates/vue-app/files/src/components/Echarts/Gauge.vue +74 -74
  120. package/templates/vue-app/files/src/components/Echarts/Graph.vue +101 -101
  121. package/templates/vue-app/files/src/components/Echarts/HeatMap.vue +301 -301
  122. package/templates/vue-app/files/src/components/Echarts/Line3D.vue +110 -110
  123. package/templates/vue-app/files/src/components/Echarts/PieChart.vue +84 -84
  124. package/templates/vue-app/files/src/components/Echarts/Point.vue +161 -161
  125. package/templates/vue-app/files/src/components/Echarts/RadarChart.vue +123 -123
  126. package/templates/vue-app/files/src/components/Echarts/Rich.vue +160 -160
  127. package/templates/vue-app/files/src/components/Echarts/Sankey.vue +114 -114
  128. package/templates/vue-app/files/src/components/Echarts/Scatter.vue +192 -192
  129. package/templates/vue-app/files/src/components/Echarts/Sunburst.vue +127 -127
  130. package/templates/vue-app/files/src/components/Echarts/ThemeRiver.vue +233 -233
  131. package/templates/vue-app/files/src/components/Echarts/WordCloud.vue +201 -201
  132. package/templates/vue-app/files/src/components/GithubCorner/index.vue +55 -55
  133. package/templates/vue-app/files/src/components/Hamburger/index.vue +44 -44
  134. package/templates/vue-app/files/src/components/HeaderSearch/index.vue +196 -196
  135. package/templates/vue-app/files/src/components/IconSelect/index.vue +74 -74
  136. package/templates/vue-app/files/src/components/IconSelect/requireIcons.js +10 -10
  137. package/templates/vue-app/files/src/components/Iframe/index.vue +30 -30
  138. package/templates/vue-app/files/src/components/JavaEdit/index.vue +78 -78
  139. package/templates/vue-app/files/src/components/Pagination/index.vue +100 -100
  140. package/templates/vue-app/files/src/components/PanThumb/index.vue +149 -149
  141. package/templates/vue-app/files/src/components/ParentView/index.vue +3 -3
  142. package/templates/vue-app/files/src/components/Permission/index.js +13 -13
  143. package/templates/vue-app/files/src/components/Permission/permission.js +21 -21
  144. package/templates/vue-app/files/src/components/RightPanel/index.vue +149 -149
  145. package/templates/vue-app/files/src/components/Screenfull/index.vue +60 -60
  146. package/templates/vue-app/files/src/components/SizeSelect/index.vue +60 -60
  147. package/templates/vue-app/files/src/components/SvgIcon/index.vue +66 -66
  148. package/templates/vue-app/files/src/components/ThemePicker/index.vue +177 -177
  149. package/templates/vue-app/files/src/components/UploadExcel/index.vue +149 -149
  150. package/templates/vue-app/files/src/components/WaterMark/setWaterMark.js +68 -68
  151. package/templates/vue-app/files/src/components/WaterMark/waterMark.vue +69 -69
  152. package/templates/vue-app/files/src/components/Xgplayer/index.vue +49 -49
  153. package/templates/vue-app/files/src/components/YamlEdit/index.vue +81 -81
  154. package/templates/vue-app/files/src/layout/components/AppMain.vue +67 -67
  155. package/templates/vue-app/files/src/layout/components/Navbar.vue +209 -209
  156. package/templates/vue-app/files/src/layout/components/Settings/index.vue +125 -125
  157. package/templates/vue-app/files/src/layout/components/Sidebar/FixiOSBug.js +26 -26
  158. package/templates/vue-app/files/src/layout/components/Sidebar/Item.vue +29 -29
  159. package/templates/vue-app/files/src/layout/components/Sidebar/Link.vue +35 -35
  160. package/templates/vue-app/files/src/layout/components/Sidebar/Logo.vue +93 -93
  161. package/templates/vue-app/files/src/layout/components/Sidebar/SidebarItem.vue +104 -104
  162. package/templates/vue-app/files/src/layout/components/Sidebar/index.vue +79 -79
  163. package/templates/vue-app/files/src/layout/components/TagsView/ScrollPane.vue +90 -90
  164. package/templates/vue-app/files/src/layout/components/TagsView/index.vue +299 -299
  165. package/templates/vue-app/files/src/layout/components/index.js +5 -5
  166. package/templates/vue-app/files/src/layout/index.vue +119 -119
  167. package/templates/vue-app/files/src/layout/mixin/ResizeHandler.js +45 -45
  168. package/templates/vue-app/files/src/main.js +89 -89
  169. package/templates/vue-app/files/src/mixins/crud.js +348 -348
  170. package/templates/vue-app/files/src/router/index.js +156 -156
  171. package/templates/vue-app/files/src/router/routers.js +203 -203
  172. package/templates/vue-app/files/src/settings.js +57 -57
  173. package/templates/vue-app/files/src/store/getters.js +29 -29
  174. package/templates/vue-app/files/src/store/index.js +25 -25
  175. package/templates/vue-app/files/src/store/modules/api.js +33 -33
  176. package/templates/vue-app/files/src/store/modules/app.js +55 -55
  177. package/templates/vue-app/files/src/store/modules/permission.js +79 -79
  178. package/templates/vue-app/files/src/store/modules/register.js +17 -17
  179. package/templates/vue-app/files/src/store/modules/settings.js +46 -46
  180. package/templates/vue-app/files/src/store/modules/tagsView.js +168 -168
  181. package/templates/vue-app/files/src/store/modules/user.js +119 -119
  182. package/templates/vue-app/files/src/utils/auth.js +18 -18
  183. package/templates/vue-app/files/src/utils/base64ToFile.js +27 -27
  184. package/templates/vue-app/files/src/utils/clipboard.js +36 -36
  185. package/templates/vue-app/files/src/utils/datetime.js +289 -289
  186. package/templates/vue-app/files/src/utils/getBlobFile.js +10 -10
  187. package/templates/vue-app/files/src/utils/getTime.js +29 -29
  188. package/templates/vue-app/files/src/utils/index.js +520 -520
  189. package/templates/vue-app/files/src/utils/permission.js +29 -29
  190. package/templates/vue-app/files/src/utils/pinyin.js +450 -450
  191. package/templates/vue-app/files/src/utils/request.js +139 -139
  192. package/templates/vue-app/files/src/utils/rsaEncrypt.js +37 -37
  193. package/templates/vue-app/files/src/utils/shortcuts.js +210 -210
  194. package/templates/vue-app/files/src/utils/upload.js +12 -12
  195. package/templates/vue-app/files/src/utils/validate.js +262 -262
  196. package/templates/vue-app/files/src/views/components/Echarts.vue +124 -124
  197. package/templates/vue-app/files/src/views/components/Editor.vue +75 -75
  198. package/templates/vue-app/files/src/views/components/MarkDown.vue +44 -44
  199. package/templates/vue-app/files/src/views/components/UVideo.vue +37 -37
  200. package/templates/vue-app/files/src/views/components/YamlEdit.vue +206 -206
  201. package/templates/vue-app/files/src/views/components/camera/camera.vue +115 -115
  202. package/templates/vue-app/files/src/views/components/camera/cameraTest.vue +158 -158
  203. package/templates/vue-app/files/src/views/components/excel/upload-excel.vue +41 -41
  204. package/templates/vue-app/files/src/views/components/icons/element-icons.js +74 -74
  205. package/templates/vue-app/files/src/views/components/icons/index.vue +106 -106
  206. package/templates/vue-app/files/src/views/components/icons/svg-icons.js +10 -10
  207. package/templates/vue-app/files/src/views/components/scroll/index.vue +107 -107
  208. package/templates/vue-app/files/src/views/components/scrollFull/index.vue +99 -99
  209. package/templates/vue-app/files/src/views/dashboard/LineChart.vue +138 -138
  210. package/templates/vue-app/files/src/views/dashboard/PanelGroup.vue +173 -173
  211. package/templates/vue-app/files/src/views/dashboard/mixins/resize.js +57 -57
  212. package/templates/vue-app/files/src/views/dataArchive/delTable.vue +354 -354
  213. package/templates/vue-app/files/src/views/dataArchive/exportDetail.vue +121 -121
  214. package/templates/vue-app/files/src/views/dataArchive/exportList.vue +160 -160
  215. package/templates/vue-app/files/src/views/dataArchive/index.vue +2104 -2104
  216. package/templates/vue-app/files/src/views/features/401.vue +83 -83
  217. package/templates/vue-app/files/src/views/features/404.vue +226 -226
  218. package/templates/vue-app/files/src/views/features/redirect.vue +12 -12
  219. package/templates/vue-app/files/src/views/generator/config.vue +348 -348
  220. package/templates/vue-app/files/src/views/generator/index.vue +143 -143
  221. package/templates/vue-app/files/src/views/generator/preview.vue +39 -39
  222. package/templates/vue-app/files/src/views/home.vue +80 -80
  223. package/templates/vue-app/files/src/views/indexManagement/index.vue +422 -422
  224. package/templates/vue-app/files/src/views/indexManagement/other.vue +286 -286
  225. package/templates/vue-app/files/src/views/institutionMonitor/components/LineChart.vue +191 -191
  226. package/templates/vue-app/files/src/views/institutionMonitor/index.scss +339 -339
  227. package/templates/vue-app/files/src/views/institutionMonitor/index.vue +1385 -1385
  228. package/templates/vue-app/files/src/views/institutionMonitor/mixins/resize.js +57 -57
  229. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/checkProjectCode.vue +267 -267
  230. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/imageAbnormalMonitor.vue +361 -361
  231. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/index.vue +686 -686
  232. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/leakageAnomaly.vue +270 -270
  233. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/moveMonitore.vue +114 -114
  234. package/templates/vue-app/files/src/views/institutionMonitor/monitorDetail/qualityMonitore.vue +338 -338
  235. package/templates/vue-app/files/src/views/institutionSet/cloudSet.vue +534 -534
  236. package/templates/vue-app/files/src/views/institutionSet/index.vue +2550 -2550
  237. package/templates/vue-app/files/src/views/login.vue +243 -243
  238. package/templates/vue-app/files/src/views/qualityLogin.vue +280 -280
  239. package/templates/vue-app/files/src/views/selfStatistics/components/LineChart.vue +296 -296
  240. package/templates/vue-app/files/src/views/selfStatistics/hospitalDetail/index.vue +533 -533
  241. package/templates/vue-app/files/src/views/selfStatistics/index.scss +447 -447
  242. package/templates/vue-app/files/src/views/selfStatistics/index.vue +903 -903
  243. package/templates/vue-app/files/src/views/selfStatistics/mixins/resize.js +57 -57
  244. package/templates/vue-app/files/src/views/selfStatistics/monitorDetail/index.vue +285 -285
  245. package/templates/vue-app/files/src/views/selfStatistics/offlineDetail/index.vue +104 -104
  246. package/templates/vue-app/files/src/views/selfStatistics/selfActiveDetail/index.vue +104 -104
  247. package/templates/vue-app/files/src/views/selfStatistics/selfMonitorDetail/index.vue +420 -420
  248. package/templates/vue-app/files/src/views/selfStatistics/setWaterMark/setWaterMark.js +68 -68
  249. package/templates/vue-app/files/src/views/selfStatistics/setWaterMark/waterMark.vue +69 -69
  250. package/templates/vue-app/files/src/views/system/dept/index.vue +144 -144
  251. package/templates/vue-app/files/src/views/system/dict/dictDetail.vue +146 -146
  252. package/templates/vue-app/files/src/views/system/dict/index.vue +159 -159
  253. package/templates/vue-app/files/src/views/system/examModality/index.vue +174 -174
  254. package/templates/vue-app/files/src/views/system/examPart/index.vue +184 -184
  255. package/templates/vue-app/files/src/views/system/examProject/index.vue +321 -321
  256. package/templates/vue-app/files/src/views/system/examine/index.vue +66 -66
  257. package/templates/vue-app/files/src/views/system/job/index.vue +119 -119
  258. package/templates/vue-app/files/src/views/system/job/module/form.vue +72 -72
  259. package/templates/vue-app/files/src/views/system/job/module/header.vue +48 -48
  260. package/templates/vue-app/files/src/views/system/menu/index.vue +327 -327
  261. package/templates/vue-app/files/src/views/system/model/index.vue +285 -285
  262. package/templates/vue-app/files/src/views/system/role/index.vue +434 -434
  263. package/templates/vue-app/files/src/views/system/sysSet/index.vue +84 -84
  264. package/templates/vue-app/files/src/views/system/timing/index.vue +289 -289
  265. package/templates/vue-app/files/src/views/system/timing/log.vue +143 -143
  266. package/templates/vue-app/files/src/views/system/user/admin.vue +414 -414
  267. package/templates/vue-app/files/src/views/system/user/center/updateEmail.vue +146 -146
  268. package/templates/vue-app/files/src/views/system/user/center/updatePass.vue +168 -168
  269. package/templates/vue-app/files/src/views/system/user/center.vue +140 -140
  270. package/templates/vue-app/files/src/views/system/user/index.vue +972 -972
  271. package/templates/vue-app/files/src/views/systemSet/role/index.vue +314 -314
  272. package/templates/vue-app/files/src/views/systemSet/user/admin.vue +414 -414
  273. package/templates/vue-app/files/src/views/systemSet/user/center/updateEmail.vue +146 -146
  274. package/templates/vue-app/files/src/views/systemSet/user/center/updatePass.vue +115 -115
  275. package/templates/vue-app/files/src/views/systemSet/user/center.vue +351 -351
  276. package/templates/vue-app/files/src/views/systemSet/user/index.vue +928 -928
  277. package/templates/vue-app/files/src/views/tools/aliPay/config.vue +102 -102
  278. package/templates/vue-app/files/src/views/tools/aliPay/index.vue +48 -48
  279. package/templates/vue-app/files/src/views/tools/aliPay/toPay.vue +91 -91
  280. package/templates/vue-app/files/src/views/tools/email/config.vue +91 -91
  281. package/templates/vue-app/files/src/views/tools/email/index.vue +42 -42
  282. package/templates/vue-app/files/src/views/tools/email/send.vue +159 -159
  283. package/templates/vue-app/files/src/views/tools/storage/index.vue +35 -35
  284. package/templates/vue-app/files/src/views/tools/storage/local/index.vue +207 -207
  285. package/templates/vue-app/files/src/views/tools/storage/qiniu/form.vue +108 -108
  286. package/templates/vue-app/files/src/views/tools/storage/qiniu/index.vue +241 -241
  287. package/templates/vue-app/files/src/views/tools/swagger/index.vue +14 -14
  288. package/templates/vue-app/files/vue.config.js +173 -173
  289. package/templates/vue-app/template.json +29 -29
@@ -1,534 +1,534 @@
1
- <template>
2
- <div class="app-container">
3
- <div class="cloudSet">
4
- <div class="hosTitle">
5
- <img :src="position" />
6
- {{ this.currentDetail.hospitalName }}
7
- <span @click="hisrecordFn"> 【历史记录】 </span>
8
- </div>
9
- <el-row v-if="warningShow">
10
- <el-col :span="24">
11
- <div class="warning">
12
- <div>
13
- <i class="el-icon-warning warning-icon"></i>
14
- 提示:配置文件中的路径不可以使用 \ (反斜杠),必须使用 /(正斜杠)。
15
- </div>
16
- </div>
17
- </el-col>
18
- </el-row>
19
- <div class="uuidContainer tabContainer">
20
- <div
21
- @click="uuidTabFn(item, index)"
22
- :class="uuidActive == index ? 'uuidTab' : 'uuidTabNarmal'"
23
- v-for="(item, index) in hospInfo"
24
- :key="index">
25
- <div v-if="item.uuid">
26
- <p>{{ item.address }}</p>
27
- </div>
28
- <div v-else>
29
- <p>低版本程序</p>
30
- </div>
31
- <img v-if="uuidActive == index" :src="triAngel" />
32
- <img v-else :src="triAngelNormal" />
33
- </div>
34
- </div>
35
- <div class="tabContainer">
36
- <div class="updateDetail">
37
- <span>{{ currentXmlDetail.updateTime }} {{ currentXmlDetail.updateUser }}更新了配置</span>
38
- </div>
39
- <el-tabs v-model="codeActiveName" @tab-click="handleCodeTabClick">
40
- <el-tab-pane label="公共配置" name="first">
41
- <div>
42
- <codemirror
43
- style="height: calc(100vh - 370px)"
44
- ref="cm"
45
- v-model="commonXmlcode"
46
- :options="cmOptions"
47
- @input="xmlCodeChange"></codemirror>
48
- </div>
49
- </el-tab-pane>
50
- <el-tab-pane label="getway配置" name="second">
51
- <div v-if="xmlShow">
52
- <codemirror
53
- style="height: calc(100vh - 370px)"
54
- ref="cm"
55
- v-model="getWayXmlCode"
56
- :options="cmOptions"
57
- @input="xmlCodeChange"></codemirror>
58
- </div>
59
- </el-tab-pane>
60
- </el-tabs>
61
- </div>
62
- <div class="submitBtn">
63
- <el-popover placement="top" width="160" v-model="visible">
64
- <p>确定要修改该配置吗?</p>
65
- <div style="text-align: right; margin: 0">
66
- <el-button size="mini" type="text" @click="visible = false">取消</el-button>
67
- <el-button type="primary" size="mini" @click="setXmlCodeFn">确定</el-button>
68
- </div>
69
- <el-button type="primary" slot="reference">确定</el-button>
70
- </el-popover>
71
- </div>
72
- </div>
73
- <el-dialog
74
- title="历史记录"
75
- top="5vh"
76
- :visible.sync="hisrecordDialogVisible"
77
- width="900px"
78
- :before-close="handleClose">
79
- <div>
80
- <el-form :inline="true" :model="query" class="form-inline-hospital" size="small">
81
- <el-form-item>
82
- <el-input
83
- style="width: 140px"
84
- v-model="query.address"
85
- placeholder="IP及端口"></el-input>
86
- </el-form-item>
87
- <el-form-item>
88
- <el-input
89
- style="width: 140px"
90
- v-model="query.updateUser"
91
- placeholder="更新人"></el-input>
92
- </el-form-item>
93
- <el-form-item>
94
- <el-form-item>
95
- <el-select
96
- v-model="query.updateType"
97
- clearable
98
- @change="crud.toQuery()"
99
- style="width: 140px"
100
- placeholder="更新类型">
101
- <el-option
102
- v-for="item in dict.hosp_config_record"
103
- :key="item.value"
104
- :label="item.label"
105
- :value="item.value" />
106
- </el-select>
107
- </el-form-item>
108
- </el-form-item>
109
- <el-form-item>
110
- <el-date-picker
111
- style="width: 260px"
112
- v-model="query.startDate"
113
- type="daterange"
114
- align="right"
115
- range-separator="至"
116
- start-placeholder="开始日期"
117
- end-placeholder="结束日期"
118
- size="small"
119
- value-format="yyyy-MM-dd"
120
- :picker-options="pickerOptions">
121
- </el-date-picker>
122
- </el-form-item>
123
- <el-form-item>
124
- <el-button @click="crud.toQuery" type="primary" plain class="filter-item" size="small"
125
- >查询</el-button
126
- >
127
- </el-form-item>
128
- <el-form-item>
129
- <el-button @click="resetQueryClick" class="filter-item" size="small"> 重置 </el-button>
130
- </el-form-item>
131
- </el-form>
132
- <el-table :data="crud.data" height="500px" v-loading="crud.loading">
133
- <!-- :show-overflow-tooltip="true" -->
134
- <el-table-column label="序号" width="60px">
135
- <template slot-scope="scope">
136
- <span>{{ (crud.page.page - 1) * crud.page.size + scope.$index + 1 }}</span>
137
- </template>
138
- </el-table-column>
139
- <el-table-column
140
- v-for="(item, index) in headerTable"
141
- :key="index.key"
142
- :label="item.label"
143
- :prop="item.prop"
144
- :min-width="item.width">
145
- <template slot-scope="scope">
146
- <div v-if="item.prop == 'updateType'">
147
- {{ hospConfigRecordStatus(scope.row.updateType) || omitData }}
148
- </div>
149
- <div v-else-if="item.prop == 'uuid'">
150
- {{ scope.row.uuid || '低版本程序' }}
151
- </div>
152
- <div v-else>
153
- {{ scope.row[item.prop] || omitData }}
154
- </div>
155
- </template>
156
- </el-table-column>
157
- </el-table>
158
- <!--分页组件-->
159
- <pagination />
160
- </div>
161
- <span slot="footer" class="dialog-footer">
162
- <el-button @click="hisrecordDialogVisible = false">取 消</el-button>
163
- <el-button type="primary" @click="hisrecordDialogVisible = false">确 定</el-button>
164
- </span>
165
- </el-dialog>
166
- </div>
167
- </template>
168
-
169
- <script>
170
- import pagination from '@crud/Pagination';
171
- import CRUD, { presenter, header, crud } from '@crud/crud';
172
- import { getHospInfo, hospitadlConfigUpdate } from '@/api/institutionSet/index';
173
- import { codemirror } from 'vue-codemirror';
174
- import 'codemirror/theme/idea.css';
175
- import 'codemirror/mode/sql/sql.js';
176
- import 'codemirror/mode/xml/xml';
177
- import 'codemirror/theme/monokai.css';
178
- import { mapGetters } from 'vuex';
179
- import position from '@/assets/images/position.png';
180
- import triAngel from '@/assets/images/triAngel.png';
181
- import triAngelNormal from '@/assets/images/triAngelNormal.png';
182
- import DateRangePicker from '@/components/DateRangePicker';
183
- import { getDay } from '@/utils/getTime';
184
- const start = getDay(-6) + ' 00:00:00';
185
- const end = getDay(0) + ' 23:59:59';
186
-
187
- export default {
188
- name: 'cloudSet',
189
- components: {
190
- pagination,
191
- codemirror,
192
- DateRangePicker,
193
- },
194
- dicts: ['hosp_config_record'],
195
- cruds() {
196
- return CRUD({
197
- title: '机构管理',
198
- url: '/hospitadlConfig/getHistoryRecord',
199
- sort: ['updateTime,desc'],
200
- query: {
201
- startDate: [start, end],
202
- },
203
- });
204
- },
205
- mixins: [presenter(), header(), crud()],
206
- data() {
207
- return {
208
- cmOptions: {
209
- // 语言及语法模式
210
- mode: 'application/xml',
211
- // 主题
212
- theme: 'monokai',
213
- // 显示函数
214
- line: true,
215
- lineNumbers: true,
216
- // 软换行
217
- lineWrapping: true,
218
- // tab宽度
219
- tabSize: 4,
220
- },
221
- codeActiveName: 'first',
222
- cloudSetClose: false,
223
- commonXmlcode: '',
224
- getWayXmlCode: '',
225
- xmlShow: false,
226
- currentXmlDetail: {},
227
- warningShow: true,
228
- hospInfo: [],
229
- position,
230
- triAngel,
231
- triAngelNormal,
232
- uuidActive: 0,
233
- visible: false,
234
- hisrecordDialogVisible: false,
235
- omitData: '-',
236
- headerTable: [
237
- { label: '更新时间', prop: 'updateTime', width: '150px' },
238
- { label: 'UUID', prop: 'uuid', width: '150px' },
239
- { label: 'IP端口', prop: 'address', width: '150px' },
240
- { label: '更新人', prop: 'updateUser', width: '120px' },
241
- { label: '类型', prop: 'updateType', width: '120px' },
242
- ],
243
- };
244
- },
245
- created() {
246
- this.currentDetail = JSON.parse(sessionStorage.getItem('cloudSet'));
247
- this.codeDialogOpen('first');
248
- this.handleCodeTabClick();
249
- },
250
- computed: {
251
- ...mapGetters(['user', 'cloutSetDetail']),
252
- },
253
- watch: {
254
- cloutSetDetail: {
255
- // 对对象进行深度监听
256
- handler(val) {
257
- this.currentDetail = val || JSON.parse(sessionStorage.getItem('cloudSet'));
258
- this.codeDialogOpen('first');
259
- this.handleCodeTabClick();
260
- },
261
- immediate: true,
262
- deep: true,
263
- },
264
- },
265
- methods: {
266
- [CRUD.HOOK.beforeRefresh](crud) {
267
- Object.keys(this.query).map(key => {
268
- if (typeof this.query[key] == 'string') {
269
- this.query[key] = this.query[key].trim();
270
- }
271
- });
272
- crud.query = {
273
- ...this.query,
274
- startTime: this.query.startDate ? `${this.query.startDate[0]}` : undefined,
275
- endTime: this.query.startDate ? `${this.query.startDate[1]}` : undefined,
276
- hospitalId: this.currentDetail.scenceId,
277
- };
278
- return true;
279
- },
280
- // 是否云配置
281
- hospConfigRecordStatus(state) {
282
- return this.dict.label.hosp_config_record[state];
283
- },
284
- uuidTabFn(item, index) {
285
- this.uuidActive = index;
286
- const { commonConfig, config } = item.hospitalConfigInfo || {};
287
- this.commonXmlcode = commonConfig || '';
288
- this.getWayXmlCode = config || '';
289
- this.currentXmlDetail = item || {};
290
- },
291
- resetQueryClick() {
292
- Object.keys(this.query).forEach(key => {
293
- this.query[key] = '';
294
- });
295
- ((this.query.startDate = [start, end]), this.crud.resetQuery());
296
- this.crud.toQuery();
297
- },
298
- //打开历史检查
299
- hisrecordFn() {
300
- this.query.startDate = [start, end];
301
- this.crud.toQuery();
302
- this.hisrecordDialogVisible = true;
303
- },
304
- handleClose() {
305
- this.hisrecordDialogVisible = false;
306
- },
307
- handleCodeTabClick(tab, event) {
308
- this.xmlShow = false;
309
- setTimeout(() => {
310
- this.xmlShow = true;
311
- }, 20);
312
- },
313
- //关闭提示
314
- closeWarning() {
315
- this.warningShow = false;
316
- },
317
- xmlCodeChange(content) {
318
- this.$nextTick(() => {});
319
- },
320
- codeDialogOpen(val) {
321
- this.codeActiveName = val;
322
- let data = {
323
- hospitalId: this.currentDetail.scenceId,
324
- };
325
- getHospInfo(data).then(res => {
326
- console.log(res, 'res');
327
- const { commonConfig, config } = res.content[this.uuidActive]
328
- ? res.content[this.uuidActive].hospitalConfigInfo
329
- : {};
330
- this.commonXmlcode = commonConfig;
331
- this.getWayXmlCode = config;
332
- this.currentXmlDetail = res.content[this.uuidActive] || {};
333
- this.hospInfo = res.content;
334
- this.handleCodeTabClick();
335
- });
336
- },
337
- setXmlCodeFn() {
338
- console.log(this.currentXmlDetail, 'this.currentXmlDetail');
339
- const { hospitalId } = this.currentXmlDetail.hospitalConfigInfo;
340
- const { updateUser, updateTime, uuid } = this.currentXmlDetail;
341
- let data = {
342
- hospitalId,
343
- updateUser,
344
- updateTime,
345
- uuid,
346
- };
347
- if (this.codeActiveName == 'first') {
348
- data.commonConfig = this.commonXmlcode || '';
349
- }
350
- if (this.codeActiveName == 'second') {
351
- data.config = this.getWayXmlCode || '';
352
- }
353
- hospitadlConfigUpdate(data)
354
- .then(res => {
355
- this.visible = false;
356
- this.$message.success('修改成功!');
357
- this.cloudSetVisible = false;
358
- this.codeDialogOpen(this.codeActiveName);
359
- })
360
- .catch(err => {
361
- this.$message.error(err.message);
362
- });
363
- },
364
- },
365
- };
366
- </script>
367
- <style>
368
- .cm-s-monokai.CodeMirror {
369
- height: calc(100vh - 380px);
370
- }
371
- </style>
372
- <style scoped lang="scss">
373
- .cloudSet {
374
- background-color: #fff;
375
- ::-webkit-scrollbar {
376
- /*滚动条整体样式*/
377
- width: 10px; /*高宽分别对应横竖滚动条的尺寸*/
378
- height: 10px;
379
- }
380
-
381
- ::-webkit-scrollbar-thumb {
382
- /*滚动条里面小方块*/
383
- width: 30px;
384
- background-color: #d8d9d9bf;
385
- border: 2px solid transparent;
386
- border-radius: 9px;
387
- margin: 0 50px;
388
- background-clip: content-Box;
389
- }
390
-
391
- ::-webkit-scrollbar-track {
392
- /*滚动条里面轨道*/
393
- -webkit-box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
394
- border-radius: 0;
395
- background: rgb(239 239 239 / 10%);
396
- }
397
- .inputDefault {
398
- width: 140px;
399
- }
400
-
401
- .hosTitle {
402
- height: 36px;
403
- line-height: 27px;
404
- border-bottom: 1px solid #dcdfe6;
405
- font-size: 14px;
406
- font-family:
407
- PingFangSC-Regular,
408
- PingFang SC;
409
- font-weight: 400;
410
- color: #000000;
411
- display: flex;
412
- align-items: center;
413
-
414
- img {
415
- height: 16px;
416
- width: 12px;
417
- margin-right: 8px;
418
- }
419
- span::before {
420
- content: '';
421
- position: absolute;
422
- height: 1px;
423
- width: 84px;
424
- bottom: 5px;
425
- color: #0090ff;
426
- background-color: #0090ff;
427
- }
428
- span {
429
- display: inline-block;
430
- width: 84px;
431
- margin-left: 12px;
432
- position: relative;
433
-
434
- color: #0090ff;
435
- }
436
- }
437
-
438
- .submitBtn {
439
- display: flex;
440
- justify-content: flex-end;
441
- position: fixed;
442
- bottom: 10px;
443
- right: 8px;
444
- padding: 10px;
445
- z-index: 99;
446
- }
447
-
448
- .uuidContainer {
449
- display: flex;
450
- overflow-x: auto;
451
- overflow-y: hidden;
452
- .uuidTabNarmal {
453
- display: flex;
454
- min-width: 179px;
455
- padding: 0 20px;
456
- height: 49px;
457
- border: 1px solid #dcdfe6;
458
- border-radius: 2px;
459
- margin: 12px 8px 10px 0;
460
- text-align: center;
461
- padding: 6px;
462
- color: #dcdfe6;
463
- position: relative;
464
- align-items: center;
465
- justify-content: center;
466
-
467
- img {
468
- position: absolute;
469
- height: 7px;
470
- width: 7px;
471
- right: 2px;
472
- bottom: 2px;
473
- }
474
- }
475
-
476
- .uuidTab {
477
- display: flex;
478
- align-items: center;
479
- justify-content: center;
480
- min-width: 179px;
481
- padding: 0 20px;
482
- height: 49px;
483
- border: 1px solid #0090ff;
484
- border-radius: 2px;
485
- margin: 12px 8px 10px 0;
486
- text-align: center;
487
- padding: 6px;
488
- color: #0090ff;
489
- position: relative;
490
-
491
- img {
492
- position: absolute;
493
- height: 7px;
494
- width: 7px;
495
- right: 2px;
496
- bottom: 2px;
497
- }
498
- }
499
- }
500
- }
501
-
502
- .tabContainer {
503
- position: relative;
504
-
505
- .updateDetail {
506
- position: absolute;
507
- right: 8px;
508
- top: 12px;
509
- font-size: 14px;
510
- font-family:
511
- PingFangSC-Regular,
512
- PingFang SC;
513
- font-weight: 400;
514
- color: #111111;
515
- }
516
- }
517
-
518
- .warning {
519
- height: 34px;
520
- background-color: #fff7f3;
521
- font-size: 13px;
522
- line-height: 34px;
523
- color: #ff7b35;
524
- padding: 0 12px;
525
- display: flex;
526
- justify-content: space-between;
527
- align-items: center;
528
- margin-top: 12px;
529
-
530
- .warning-icon {
531
- color: #ff7b35;
532
- }
533
- }
534
- </style>
1
+ <template>
2
+ <div class="app-container">
3
+ <div class="cloudSet">
4
+ <div class="hosTitle">
5
+ <img :src="position" />
6
+ {{ this.currentDetail.hospitalName }}
7
+ <span @click="hisrecordFn"> 【历史记录】 </span>
8
+ </div>
9
+ <el-row v-if="warningShow">
10
+ <el-col :span="24">
11
+ <div class="warning">
12
+ <div>
13
+ <i class="el-icon-warning warning-icon"></i>
14
+ 提示:配置文件中的路径不可以使用 \ (反斜杠),必须使用 /(正斜杠)。
15
+ </div>
16
+ </div>
17
+ </el-col>
18
+ </el-row>
19
+ <div class="uuidContainer tabContainer">
20
+ <div
21
+ @click="uuidTabFn(item, index)"
22
+ :class="uuidActive == index ? 'uuidTab' : 'uuidTabNarmal'"
23
+ v-for="(item, index) in hospInfo"
24
+ :key="index">
25
+ <div v-if="item.uuid">
26
+ <p>{{ item.address }}</p>
27
+ </div>
28
+ <div v-else>
29
+ <p>低版本程序</p>
30
+ </div>
31
+ <img v-if="uuidActive == index" :src="triAngel" />
32
+ <img v-else :src="triAngelNormal" />
33
+ </div>
34
+ </div>
35
+ <div class="tabContainer">
36
+ <div class="updateDetail">
37
+ <span>{{ currentXmlDetail.updateTime }} {{ currentXmlDetail.updateUser }}更新了配置</span>
38
+ </div>
39
+ <el-tabs v-model="codeActiveName" @tab-click="handleCodeTabClick">
40
+ <el-tab-pane label="公共配置" name="first">
41
+ <div>
42
+ <codemirror
43
+ style="height: calc(100vh - 370px)"
44
+ ref="cm"
45
+ v-model="commonXmlcode"
46
+ :options="cmOptions"
47
+ @input="xmlCodeChange"></codemirror>
48
+ </div>
49
+ </el-tab-pane>
50
+ <el-tab-pane label="getway配置" name="second">
51
+ <div v-if="xmlShow">
52
+ <codemirror
53
+ style="height: calc(100vh - 370px)"
54
+ ref="cm"
55
+ v-model="getWayXmlCode"
56
+ :options="cmOptions"
57
+ @input="xmlCodeChange"></codemirror>
58
+ </div>
59
+ </el-tab-pane>
60
+ </el-tabs>
61
+ </div>
62
+ <div class="submitBtn">
63
+ <el-popover placement="top" width="160" v-model="visible">
64
+ <p>确定要修改该配置吗?</p>
65
+ <div style="text-align: right; margin: 0">
66
+ <el-button size="mini" type="text" @click="visible = false">取消</el-button>
67
+ <el-button type="primary" size="mini" @click="setXmlCodeFn">确定</el-button>
68
+ </div>
69
+ <el-button type="primary" slot="reference">确定</el-button>
70
+ </el-popover>
71
+ </div>
72
+ </div>
73
+ <el-dialog
74
+ title="历史记录"
75
+ top="5vh"
76
+ :visible.sync="hisrecordDialogVisible"
77
+ width="900px"
78
+ :before-close="handleClose">
79
+ <div>
80
+ <el-form :inline="true" :model="query" class="form-inline-hospital" size="small">
81
+ <el-form-item>
82
+ <el-input
83
+ style="width: 140px"
84
+ v-model="query.address"
85
+ placeholder="IP及端口"></el-input>
86
+ </el-form-item>
87
+ <el-form-item>
88
+ <el-input
89
+ style="width: 140px"
90
+ v-model="query.updateUser"
91
+ placeholder="更新人"></el-input>
92
+ </el-form-item>
93
+ <el-form-item>
94
+ <el-form-item>
95
+ <el-select
96
+ v-model="query.updateType"
97
+ clearable
98
+ @change="crud.toQuery()"
99
+ style="width: 140px"
100
+ placeholder="更新类型">
101
+ <el-option
102
+ v-for="item in dict.hosp_config_record"
103
+ :key="item.value"
104
+ :label="item.label"
105
+ :value="item.value" />
106
+ </el-select>
107
+ </el-form-item>
108
+ </el-form-item>
109
+ <el-form-item>
110
+ <el-date-picker
111
+ style="width: 260px"
112
+ v-model="query.startDate"
113
+ type="daterange"
114
+ align="right"
115
+ range-separator="至"
116
+ start-placeholder="开始日期"
117
+ end-placeholder="结束日期"
118
+ size="small"
119
+ value-format="yyyy-MM-dd"
120
+ :picker-options="pickerOptions">
121
+ </el-date-picker>
122
+ </el-form-item>
123
+ <el-form-item>
124
+ <el-button @click="crud.toQuery" type="primary" plain class="filter-item" size="small"
125
+ >查询</el-button
126
+ >
127
+ </el-form-item>
128
+ <el-form-item>
129
+ <el-button @click="resetQueryClick" class="filter-item" size="small"> 重置 </el-button>
130
+ </el-form-item>
131
+ </el-form>
132
+ <el-table :data="crud.data" height="500px" v-loading="crud.loading">
133
+ <!-- :show-overflow-tooltip="true" -->
134
+ <el-table-column label="序号" width="60px">
135
+ <template slot-scope="scope">
136
+ <span>{{ (crud.page.page - 1) * crud.page.size + scope.$index + 1 }}</span>
137
+ </template>
138
+ </el-table-column>
139
+ <el-table-column
140
+ v-for="(item, index) in headerTable"
141
+ :key="index.key"
142
+ :label="item.label"
143
+ :prop="item.prop"
144
+ :min-width="item.width">
145
+ <template slot-scope="scope">
146
+ <div v-if="item.prop == 'updateType'">
147
+ {{ hospConfigRecordStatus(scope.row.updateType) || omitData }}
148
+ </div>
149
+ <div v-else-if="item.prop == 'uuid'">
150
+ {{ scope.row.uuid || '低版本程序' }}
151
+ </div>
152
+ <div v-else>
153
+ {{ scope.row[item.prop] || omitData }}
154
+ </div>
155
+ </template>
156
+ </el-table-column>
157
+ </el-table>
158
+ <!--分页组件-->
159
+ <pagination />
160
+ </div>
161
+ <span slot="footer" class="dialog-footer">
162
+ <el-button @click="hisrecordDialogVisible = false">取 消</el-button>
163
+ <el-button type="primary" @click="hisrecordDialogVisible = false">确 定</el-button>
164
+ </span>
165
+ </el-dialog>
166
+ </div>
167
+ </template>
168
+
169
+ <script>
170
+ import pagination from '@crud/Pagination';
171
+ import CRUD, { presenter, header, crud } from '@crud/crud';
172
+ import { getHospInfo, hospitadlConfigUpdate } from '@/api/institutionSet/index';
173
+ import { codemirror } from 'vue-codemirror';
174
+ import 'codemirror/theme/idea.css';
175
+ import 'codemirror/mode/sql/sql.js';
176
+ import 'codemirror/mode/xml/xml';
177
+ import 'codemirror/theme/monokai.css';
178
+ import { mapGetters } from 'vuex';
179
+ import position from '@/assets/images/position.png';
180
+ import triAngel from '@/assets/images/triAngel.png';
181
+ import triAngelNormal from '@/assets/images/triAngelNormal.png';
182
+ import DateRangePicker from '@/components/DateRangePicker';
183
+ import { getDay } from '@/utils/getTime';
184
+ const start = getDay(-6) + ' 00:00:00';
185
+ const end = getDay(0) + ' 23:59:59';
186
+
187
+ export default {
188
+ name: 'cloudSet',
189
+ components: {
190
+ pagination,
191
+ codemirror,
192
+ DateRangePicker,
193
+ },
194
+ dicts: ['hosp_config_record'],
195
+ cruds() {
196
+ return CRUD({
197
+ title: '机构管理',
198
+ url: '/hospitadlConfig/getHistoryRecord',
199
+ sort: ['updateTime,desc'],
200
+ query: {
201
+ startDate: [start, end],
202
+ },
203
+ });
204
+ },
205
+ mixins: [presenter(), header(), crud()],
206
+ data() {
207
+ return {
208
+ cmOptions: {
209
+ // 语言及语法模式
210
+ mode: 'application/xml',
211
+ // 主题
212
+ theme: 'monokai',
213
+ // 显示函数
214
+ line: true,
215
+ lineNumbers: true,
216
+ // 软换行
217
+ lineWrapping: true,
218
+ // tab宽度
219
+ tabSize: 4,
220
+ },
221
+ codeActiveName: 'first',
222
+ cloudSetClose: false,
223
+ commonXmlcode: '',
224
+ getWayXmlCode: '',
225
+ xmlShow: false,
226
+ currentXmlDetail: {},
227
+ warningShow: true,
228
+ hospInfo: [],
229
+ position,
230
+ triAngel,
231
+ triAngelNormal,
232
+ uuidActive: 0,
233
+ visible: false,
234
+ hisrecordDialogVisible: false,
235
+ omitData: '-',
236
+ headerTable: [
237
+ { label: '更新时间', prop: 'updateTime', width: '150px' },
238
+ { label: 'UUID', prop: 'uuid', width: '150px' },
239
+ { label: 'IP端口', prop: 'address', width: '150px' },
240
+ { label: '更新人', prop: 'updateUser', width: '120px' },
241
+ { label: '类型', prop: 'updateType', width: '120px' },
242
+ ],
243
+ };
244
+ },
245
+ created() {
246
+ this.currentDetail = JSON.parse(sessionStorage.getItem('cloudSet'));
247
+ this.codeDialogOpen('first');
248
+ this.handleCodeTabClick();
249
+ },
250
+ computed: {
251
+ ...mapGetters(['user', 'cloutSetDetail']),
252
+ },
253
+ watch: {
254
+ cloutSetDetail: {
255
+ // 对对象进行深度监听
256
+ handler(val) {
257
+ this.currentDetail = val || JSON.parse(sessionStorage.getItem('cloudSet'));
258
+ this.codeDialogOpen('first');
259
+ this.handleCodeTabClick();
260
+ },
261
+ immediate: true,
262
+ deep: true,
263
+ },
264
+ },
265
+ methods: {
266
+ [CRUD.HOOK.beforeRefresh](crud) {
267
+ Object.keys(this.query).map(key => {
268
+ if (typeof this.query[key] == 'string') {
269
+ this.query[key] = this.query[key].trim();
270
+ }
271
+ });
272
+ crud.query = {
273
+ ...this.query,
274
+ startTime: this.query.startDate ? `${this.query.startDate[0]}` : undefined,
275
+ endTime: this.query.startDate ? `${this.query.startDate[1]}` : undefined,
276
+ hospitalId: this.currentDetail.scenceId,
277
+ };
278
+ return true;
279
+ },
280
+ // 是否云配置
281
+ hospConfigRecordStatus(state) {
282
+ return this.dict.label.hosp_config_record[state];
283
+ },
284
+ uuidTabFn(item, index) {
285
+ this.uuidActive = index;
286
+ const { commonConfig, config } = item.hospitalConfigInfo || {};
287
+ this.commonXmlcode = commonConfig || '';
288
+ this.getWayXmlCode = config || '';
289
+ this.currentXmlDetail = item || {};
290
+ },
291
+ resetQueryClick() {
292
+ Object.keys(this.query).forEach(key => {
293
+ this.query[key] = '';
294
+ });
295
+ ((this.query.startDate = [start, end]), this.crud.resetQuery());
296
+ this.crud.toQuery();
297
+ },
298
+ //打开历史检查
299
+ hisrecordFn() {
300
+ this.query.startDate = [start, end];
301
+ this.crud.toQuery();
302
+ this.hisrecordDialogVisible = true;
303
+ },
304
+ handleClose() {
305
+ this.hisrecordDialogVisible = false;
306
+ },
307
+ handleCodeTabClick(tab, event) {
308
+ this.xmlShow = false;
309
+ setTimeout(() => {
310
+ this.xmlShow = true;
311
+ }, 20);
312
+ },
313
+ //关闭提示
314
+ closeWarning() {
315
+ this.warningShow = false;
316
+ },
317
+ xmlCodeChange(content) {
318
+ this.$nextTick(() => {});
319
+ },
320
+ codeDialogOpen(val) {
321
+ this.codeActiveName = val;
322
+ let data = {
323
+ hospitalId: this.currentDetail.scenceId,
324
+ };
325
+ getHospInfo(data).then(res => {
326
+ console.log(res, 'res');
327
+ const { commonConfig, config } = res.content[this.uuidActive]
328
+ ? res.content[this.uuidActive].hospitalConfigInfo
329
+ : {};
330
+ this.commonXmlcode = commonConfig;
331
+ this.getWayXmlCode = config;
332
+ this.currentXmlDetail = res.content[this.uuidActive] || {};
333
+ this.hospInfo = res.content;
334
+ this.handleCodeTabClick();
335
+ });
336
+ },
337
+ setXmlCodeFn() {
338
+ console.log(this.currentXmlDetail, 'this.currentXmlDetail');
339
+ const { hospitalId } = this.currentXmlDetail.hospitalConfigInfo;
340
+ const { updateUser, updateTime, uuid } = this.currentXmlDetail;
341
+ let data = {
342
+ hospitalId,
343
+ updateUser,
344
+ updateTime,
345
+ uuid,
346
+ };
347
+ if (this.codeActiveName == 'first') {
348
+ data.commonConfig = this.commonXmlcode || '';
349
+ }
350
+ if (this.codeActiveName == 'second') {
351
+ data.config = this.getWayXmlCode || '';
352
+ }
353
+ hospitadlConfigUpdate(data)
354
+ .then(res => {
355
+ this.visible = false;
356
+ this.$message.success('修改成功!');
357
+ this.cloudSetVisible = false;
358
+ this.codeDialogOpen(this.codeActiveName);
359
+ })
360
+ .catch(err => {
361
+ this.$message.error(err.message);
362
+ });
363
+ },
364
+ },
365
+ };
366
+ </script>
367
+ <style>
368
+ .cm-s-monokai.CodeMirror {
369
+ height: calc(100vh - 380px);
370
+ }
371
+ </style>
372
+ <style scoped lang="scss">
373
+ .cloudSet {
374
+ background-color: #fff;
375
+ ::-webkit-scrollbar {
376
+ /*滚动条整体样式*/
377
+ width: 10px; /*高宽分别对应横竖滚动条的尺寸*/
378
+ height: 10px;
379
+ }
380
+
381
+ ::-webkit-scrollbar-thumb {
382
+ /*滚动条里面小方块*/
383
+ width: 30px;
384
+ background-color: #d8d9d9bf;
385
+ border: 2px solid transparent;
386
+ border-radius: 9px;
387
+ margin: 0 50px;
388
+ background-clip: content-Box;
389
+ }
390
+
391
+ ::-webkit-scrollbar-track {
392
+ /*滚动条里面轨道*/
393
+ -webkit-box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
394
+ border-radius: 0;
395
+ background: rgb(239 239 239 / 10%);
396
+ }
397
+ .inputDefault {
398
+ width: 140px;
399
+ }
400
+
401
+ .hosTitle {
402
+ height: 36px;
403
+ line-height: 27px;
404
+ border-bottom: 1px solid #dcdfe6;
405
+ font-size: 14px;
406
+ font-family:
407
+ PingFangSC-Regular,
408
+ PingFang SC;
409
+ font-weight: 400;
410
+ color: #000000;
411
+ display: flex;
412
+ align-items: center;
413
+
414
+ img {
415
+ height: 16px;
416
+ width: 12px;
417
+ margin-right: 8px;
418
+ }
419
+ span::before {
420
+ content: '';
421
+ position: absolute;
422
+ height: 1px;
423
+ width: 84px;
424
+ bottom: 5px;
425
+ color: #0090ff;
426
+ background-color: #0090ff;
427
+ }
428
+ span {
429
+ display: inline-block;
430
+ width: 84px;
431
+ margin-left: 12px;
432
+ position: relative;
433
+
434
+ color: #0090ff;
435
+ }
436
+ }
437
+
438
+ .submitBtn {
439
+ display: flex;
440
+ justify-content: flex-end;
441
+ position: fixed;
442
+ bottom: 10px;
443
+ right: 8px;
444
+ padding: 10px;
445
+ z-index: 99;
446
+ }
447
+
448
+ .uuidContainer {
449
+ display: flex;
450
+ overflow-x: auto;
451
+ overflow-y: hidden;
452
+ .uuidTabNarmal {
453
+ display: flex;
454
+ min-width: 179px;
455
+ padding: 0 20px;
456
+ height: 49px;
457
+ border: 1px solid #dcdfe6;
458
+ border-radius: 2px;
459
+ margin: 12px 8px 10px 0;
460
+ text-align: center;
461
+ padding: 6px;
462
+ color: #dcdfe6;
463
+ position: relative;
464
+ align-items: center;
465
+ justify-content: center;
466
+
467
+ img {
468
+ position: absolute;
469
+ height: 7px;
470
+ width: 7px;
471
+ right: 2px;
472
+ bottom: 2px;
473
+ }
474
+ }
475
+
476
+ .uuidTab {
477
+ display: flex;
478
+ align-items: center;
479
+ justify-content: center;
480
+ min-width: 179px;
481
+ padding: 0 20px;
482
+ height: 49px;
483
+ border: 1px solid #0090ff;
484
+ border-radius: 2px;
485
+ margin: 12px 8px 10px 0;
486
+ text-align: center;
487
+ padding: 6px;
488
+ color: #0090ff;
489
+ position: relative;
490
+
491
+ img {
492
+ position: absolute;
493
+ height: 7px;
494
+ width: 7px;
495
+ right: 2px;
496
+ bottom: 2px;
497
+ }
498
+ }
499
+ }
500
+ }
501
+
502
+ .tabContainer {
503
+ position: relative;
504
+
505
+ .updateDetail {
506
+ position: absolute;
507
+ right: 8px;
508
+ top: 12px;
509
+ font-size: 14px;
510
+ font-family:
511
+ PingFangSC-Regular,
512
+ PingFang SC;
513
+ font-weight: 400;
514
+ color: #111111;
515
+ }
516
+ }
517
+
518
+ .warning {
519
+ height: 34px;
520
+ background-color: #fff7f3;
521
+ font-size: 13px;
522
+ line-height: 34px;
523
+ color: #ff7b35;
524
+ padding: 0 12px;
525
+ display: flex;
526
+ justify-content: space-between;
527
+ align-items: center;
528
+ margin-top: 12px;
529
+
530
+ .warning-icon {
531
+ color: #ff7b35;
532
+ }
533
+ }
534
+ </style>