vue2-client 1.16.95 → 1.16.98

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 (343) hide show
  1. package/.claude/settings.local.json +20 -20
  2. package/.cursorrules +19 -19
  3. package/.env.apply +19 -19
  4. package/.env.gaslink +19 -19
  5. package/.env.his +19 -19
  6. package/.env.liuli +20 -20
  7. package/.env.scada +19 -19
  8. package/.eslintrc.js +90 -90
  9. package/CHANGELOG.md +830 -830
  10. package/CLAUDE.md +97 -97
  11. package/Components.md +60 -60
  12. package/docs/LowCode/lowcode.md +155 -155
  13. package/docs/LowCode/lowcodeForDeveloper.md +230 -230
  14. package/docs/index.md +30 -30
  15. package/index.js +31 -31
  16. package/jest-transform-stub.js +8 -8
  17. package/jest.setup.js +7 -7
  18. package/jsconfig.json +19 -19
  19. package/package.json +112 -112
  20. package/public/his/editor/editor.html +51 -51
  21. package/public/his/editor/mock/bind_data.html +779 -779
  22. package/public/his/editor/mock/data_table.html +40 -40
  23. package/public/his/editor/mock/sign.html +75 -75
  24. package/public/his/editor/vender/JsBarcode.all.js +3669 -3669
  25. package/public/his/editor/vender/date97/My97DatePicker.htm +65 -65
  26. package/public/his/editor/vender/date97/WdatePicker.js +677 -677
  27. package/public/his/editor/vender/date97/calendar.js +4 -4
  28. package/public/his/editor/vender/date97/lang/en.js +13 -13
  29. package/public/his/editor/vender/date97/lang/zh-cn.js +13 -13
  30. package/public/his/editor/vender/date97/lang/zh-tw.js +13 -13
  31. package/public/his/editor/vender/date97/skin/WdatePicker.css +10 -10
  32. package/public/his/editor/vender/date97/skin/default/datepicker.css +328 -328
  33. package/public/his/editor/vender/date97/skin/ext/datepicker.css +308 -308
  34. package/public/his/editor/vender/date97/skin/whyGreen/datepicker.css +255 -255
  35. package/public/his/editor/vender/diff.js +1627 -1627
  36. package/public/his/editor/vender/editor.js +1 -1
  37. package/public/his/editor/vender/fabric.js +31187 -31187
  38. package/public/his/editor/vender/jquery/jquery.base64.js +190 -190
  39. package/public/his/editor/vender/jquery/jquery.js +10872 -10872
  40. package/public/his/editor/vender/jquery/jquery.print.js +255 -255
  41. package/public/his/editor/vender/jquery/zTreeStyle/zTreeStyle.css +96 -96
  42. package/public/his/editor/vender/mui/mui.min.css +4 -4
  43. package/public/his/editor/vender/mui/mui.min.js +5 -5
  44. package/public/his/editor/vender/mui/mui.picker.min.css +6 -6
  45. package/public/his/editor/vender/mui/mui.picker.min.js +6 -6
  46. package/public/his/editor/vender/qrcode.js +7 -7
  47. package/public/his/editor/vender/requirejs/require.js +2145 -2145
  48. package/public/his/editor/vender/signature/jSignature.CompressorSVG.js +518 -518
  49. package/public/his/editor/vender/signature/jSignature.UndoButton.js +164 -164
  50. package/public/his/editor/vender/signature/jSignature.js +1486 -1486
  51. package/public/his/editor/vender/validator.js +5094 -5094
  52. package/public/his/editor/vender/weui/weui.css +5659 -5659
  53. package/public/his/editor/vender/weui/weui.min.css +4 -4
  54. package/public/his/editor/vender/weui/weui.min.js +11 -11
  55. package/src/assets/img/querySlotDemo.svg +15 -15
  56. package/src/assets/svg/badtwo.svg +1 -1
  57. package/src/assets/svg/female.svg +1 -1
  58. package/src/assets/svg/goodtwo.svg +1 -1
  59. package/src/assets/svg/male.svg +1 -1
  60. package/src/base-client/components/AI/AskAiBtn.vue +136 -136
  61. package/src/base-client/components/AI/demo.vue +31 -31
  62. package/src/base-client/components/common/AddressSearchCombobox/IcMapIcon.vue +16 -16
  63. package/src/base-client/components/common/AddressSearchCombobox/demo.vue +36 -36
  64. package/src/base-client/components/common/AddressSearchCombobox/ic_map.svg +6 -6
  65. package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
  66. package/src/base-client/components/common/CitySelect/index.js +3 -3
  67. package/src/base-client/components/common/CitySelect/index.md +109 -109
  68. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +669 -669
  69. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +1014 -1014
  70. package/src/base-client/components/common/CreateQuery/index.js +3 -3
  71. package/src/base-client/components/common/CreateQuery/index.md +42 -42
  72. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +452 -452
  73. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +511 -511
  74. package/src/base-client/components/common/CreateSimpleFormQuery/index.js +3 -3
  75. package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -42
  76. package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
  77. package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
  78. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +166 -166
  79. package/src/base-client/components/common/FormGroupQuery/index.js +3 -3
  80. package/src/base-client/components/common/FormGroupQuery/index.md +43 -43
  81. package/src/base-client/components/common/HIS/HButtons/HButtons.vue +491 -491
  82. package/src/base-client/components/common/HIS/HForm/HForm.vue +401 -389
  83. package/src/base-client/components/common/HIS/HFormGroup/index.js +3 -3
  84. package/src/base-client/components/common/HIS/HTab/HTab.vue +443 -443
  85. package/src/base-client/components/common/HIS/demo.vue +61 -61
  86. package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
  87. package/src/base-client/components/common/LowCodeComponent/LowCodeEditorModal.vue +108 -108
  88. package/src/base-client/components/common/LowCodeComponent/LowCodeEditorPanel.vue +413 -413
  89. package/src/base-client/components/common/LowCodeComponent/LowCodePageOrganization.vue +502 -502
  90. package/src/base-client/components/common/LowCodeComponent/LowCodeRender.vue +728 -728
  91. package/src/base-client/components/common/LowCodeComponent/LowCodeRenderEnter.vue +29 -29
  92. package/src/base-client/components/common/LowCodeComponent/LowCodeUIStore.vue +219 -219
  93. package/src/base-client/components/common/LowCodeComponent/modal/lowCodeAddPageModal.vue +117 -117
  94. package/src/base-client/components/common/LowCodeComponent/modal/lowCodeCustomJSModal.vue +80 -80
  95. package/src/base-client/components/common/LowCodeComponent/modal/lowCodeEventEditorModal.vue +398 -398
  96. package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLifeCycleModal.vue +65 -65
  97. package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLogicCallbackModal.vue +64 -64
  98. package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLogicParamModal.vue +73 -73
  99. package/src/base-client/components/common/LowCodeComponent/modal/lowCodeRunFunctionParamModal.vue +76 -76
  100. package/src/base-client/components/common/PersonSetting/PersonSetting.vue +208 -208
  101. package/src/base-client/components/common/PersonSetting/index.js +3 -3
  102. package/src/base-client/components/common/Recording/Recording.vue +243 -243
  103. package/src/base-client/components/common/Recording/index.js +3 -3
  104. package/src/base-client/components/common/Tree/Tree.vue +149 -149
  105. package/src/base-client/components/common/Tree/index.js +2 -2
  106. package/src/base-client/components/common/Upload/Upload.vue +334 -334
  107. package/src/base-client/components/common/Upload/index.js +3 -3
  108. package/src/base-client/components/common/XAddForm/XAddForm.vue +113 -113
  109. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +4 -0
  110. package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
  111. package/src/base-client/components/common/XAddNativeFormOA/XAddNativeFormOA.vue +304 -304
  112. package/src/base-client/components/common/XAddNativeFormOA/index.js +3 -3
  113. package/src/base-client/components/common/XAddNativeFormOA/index.md +146 -146
  114. package/src/base-client/components/common/XAddReport/index.js +3 -3
  115. package/src/base-client/components/common/XAddReport/index.md +56 -56
  116. package/src/base-client/components/common/XBadge/XBadge.vue +94 -94
  117. package/src/base-client/components/common/XButtons/XButtonDemo.vue +28 -28
  118. package/src/base-client/components/common/XButtons/index.js +3 -3
  119. package/src/base-client/components/common/XButtons/index.md +61 -61
  120. package/src/base-client/components/common/XCalendar/XCalendar.vue +4 -4
  121. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  122. package/src/base-client/components/common/XCheckList/XCheckList.vue +106 -106
  123. package/src/base-client/components/common/XCheckList/XCheckListDemo.vue +41 -41
  124. package/src/base-client/components/common/XCollapse/XCollapse.vue +833 -833
  125. package/src/base-client/components/common/XDataCard/index.js +3 -3
  126. package/src/base-client/components/common/XDataCard/index.md +1 -1
  127. package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
  128. package/src/base-client/components/common/XDataDrawer/index.js +3 -3
  129. package/src/base-client/components/common/XDataDrawer/index.md +41 -41
  130. package/src/base-client/components/common/XDatePicker/demo.vue +153 -153
  131. package/src/base-client/components/common/XDescriptions/index.js +3 -3
  132. package/src/base-client/components/common/XDescriptions/index.md +83 -83
  133. package/src/base-client/components/common/XDetailsView/XDetailsView.vue +238 -238
  134. package/src/base-client/components/common/XDetailsView/index.js +3 -3
  135. package/src/base-client/components/common/XForm/XFormItem.vue +1530 -1530
  136. package/src/base-client/components/common/XForm/XStatusButton.vue +54 -54
  137. package/src/base-client/components/common/XForm/index.md +178 -178
  138. package/src/base-client/components/common/XForm/itemComponent/XClickChangeBtn/index.vue +49 -49
  139. package/src/base-client/components/common/XFormGroup/index.js +3 -3
  140. package/src/base-client/components/common/XFormGroup/index.md +38 -38
  141. package/src/base-client/components/common/XFormGroupDetails/index.js +3 -3
  142. package/src/base-client/components/common/XFormTable/index.md +92 -92
  143. package/src/base-client/components/common/XLabelSelect/XLabelSelect.vue +110 -110
  144. package/src/base-client/components/common/XLabelSelect/XLabelSelectDemo.vue +35 -35
  145. package/src/base-client/components/common/XLicensePlate/XLicensePlate.vue +193 -193
  146. package/src/base-client/components/common/XLicensePlate/XLicensePlateDemo.vue +48 -48
  147. package/src/base-client/components/common/XPrint/OpenInvoice.vue +21 -21
  148. package/src/base-client/components/common/XPrint/PrintHtml.js +98 -98
  149. package/src/base-client/components/common/XPrint/css/hiPrintCss.js +359 -359
  150. package/src/base-client/components/common/XPrint/css/lodopCss.js +26 -26
  151. package/src/base-client/components/common/XPrint/css/print-lock.css +351 -351
  152. package/src/base-client/components/common/XPrint/index.vue +97 -97
  153. package/src/base-client/components/common/XReport/XReportDesign.vue +463 -463
  154. package/src/base-client/components/common/XReport/XReportJsonRender.vue +381 -381
  155. package/src/base-client/components/common/XReport/index.js +3 -3
  156. package/src/base-client/components/common/XReport/print.js +186 -186
  157. package/src/base-client/components/common/XReportDrawer/index.js +3 -3
  158. package/src/base-client/components/common/XReportGrid/index.js +3 -3
  159. package/src/base-client/components/common/XReportGrid/index.md +44 -44
  160. package/src/base-client/components/common/XReportSlot/XReportSlot.vue +110 -110
  161. package/src/base-client/components/common/XReportSlot/index.js +3 -3
  162. package/src/base-client/components/common/XReportSlot/index.md +48 -48
  163. package/src/base-client/components/common/XSimpleDescriptions/XSimpleDescriptions.vue +166 -166
  164. package/src/base-client/components/common/XSimpleDescriptions/index.js +3 -3
  165. package/src/base-client/components/common/XSimpleDescriptions/index.md +7 -7
  166. package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
  167. package/src/base-client/components/common/XStepView/index.js +3 -3
  168. package/src/base-client/components/common/XStepView/index.md +31 -31
  169. package/src/base-client/components/common/XTab/XTabDemo.vue +22 -22
  170. package/src/base-client/components/common/XTab/index.js +3 -3
  171. package/src/base-client/components/common/XTable/CustomFuncCel.vue +51 -51
  172. package/src/base-client/components/common/XTable/TableCellRenderer.vue +161 -161
  173. package/src/base-client/components/common/XTable/XTable.vue +2 -1
  174. package/src/base-client/components/common/XTable/index.md +255 -255
  175. package/src/base-client/components/common/XTagGroup/index.vue +52 -52
  176. package/src/base-client/components/common/XTimeline/XTimeline.vue +477 -477
  177. package/src/base-client/components/common/XTree/XTree.vue +424 -424
  178. package/src/base-client/components/common/XTree/index.js +3 -3
  179. package/src/base-client/components/common/XTree/index.md +36 -36
  180. package/src/base-client/components/common/XTreeOne/XTreeOne.vue +113 -113
  181. package/src/base-client/components/common/XTreeOne/XTreeOnePro.vue +128 -128
  182. package/src/base-client/components/common/richTextModal/index.vue +56 -56
  183. package/src/base-client/components/common/richTextModal/richDemo.vue +48 -48
  184. package/src/base-client/components/his/XCharge/XChargeDemo.vue +145 -145
  185. package/src/base-client/components/his/XHisEditor/XHisEditor.vue +705 -705
  186. package/src/base-client/components/his/XHisEditor/index.js +3 -3
  187. package/src/base-client/components/his/XList/XList.vue +938 -938
  188. package/src/base-client/components/his/XRadio/XRadio.vue +469 -469
  189. package/src/base-client/components/his/XSimpleTable/XSimpleTable.vue +159 -159
  190. package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +354 -354
  191. package/src/base-client/components/his/XTitle/XTitle.vue +306 -288
  192. package/src/base-client/components/his/XTreeRows/XTreeRows.vue +341 -341
  193. package/src/base-client/components/his/threeTestOrders/editor.vue +113 -113
  194. package/src/base-client/components/index.js +51 -51
  195. package/src/base-client/components/layout/XTreeView/XTreeView.vue +130 -130
  196. package/src/base-client/components/layout/XTreeView/index.js +3 -3
  197. package/src/base-client/components/layout/XTreeView/index.md +46 -46
  198. package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
  199. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
  200. package/src/base-client/plugins/Config.js +19 -19
  201. package/src/base-client/plugins/GetLoginInfoService.js +183 -183
  202. package/src/base-client/plugins/Recording.js +258 -258
  203. package/src/base-client/plugins/index.js +23 -23
  204. package/src/base-client/plugins/tabs-page-plugin.js +39 -39
  205. package/src/components/Charts/Bar.vue +62 -62
  206. package/src/components/Charts/ChartCard.vue +134 -134
  207. package/src/components/Charts/Liquid.vue +67 -67
  208. package/src/components/Charts/MiniArea.vue +39 -39
  209. package/src/components/Charts/MiniBar.vue +39 -39
  210. package/src/components/Charts/MiniProgress.vue +75 -75
  211. package/src/components/Charts/MiniSmoothArea.vue +40 -40
  212. package/src/components/Charts/Radar.vue +68 -68
  213. package/src/components/Charts/RankList.vue +77 -77
  214. package/src/components/Charts/TagCloud.vue +113 -113
  215. package/src/components/Charts/TransferBar.vue +64 -64
  216. package/src/components/Charts/Trend.vue +82 -82
  217. package/src/components/Charts/chart.less +12 -12
  218. package/src/components/Charts/smooth.area.less +13 -13
  219. package/src/components/CodeMirror/inedx.vue +118 -118
  220. package/src/components/CodeMirror/setting.js +40 -40
  221. package/src/components/NumberInfo/NumberInfo.vue +54 -54
  222. package/src/components/NumberInfo/index.js +3 -3
  223. package/src/components/NumberInfo/index.less +54 -54
  224. package/src/components/NumberInfo/index.md +43 -43
  225. package/src/components/card/ChartCard.vue +79 -79
  226. package/src/components/chart/Bar.vue +60 -60
  227. package/src/components/chart/MiniArea.vue +67 -67
  228. package/src/components/chart/MiniBar.vue +59 -59
  229. package/src/components/chart/MiniProgress.vue +57 -57
  230. package/src/components/chart/Radar.vue +80 -80
  231. package/src/components/chart/RankingList.vue +60 -60
  232. package/src/components/chart/Trend.vue +79 -79
  233. package/src/components/chart/index.less +9 -9
  234. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  235. package/src/components/checkbox/ImgCheckbox.vue +117 -117
  236. package/src/components/checkbox/ImgCheckboxGroup.vue +76 -76
  237. package/src/components/checkbox/index.js +9 -9
  238. package/src/components/exception/ExceptionPage.vue +70 -70
  239. package/src/components/g2Charts/constants.js +202 -202
  240. package/src/components/g2Charts/demo.vue +808 -808
  241. package/src/components/g2Charts/designer.vue +228 -228
  242. package/src/components/g2Charts/designerBaseConfig.vue +61 -61
  243. package/src/components/g2Charts/designerDataConfig.vue +259 -259
  244. package/src/components/g2Charts/designerStyleConfig.vue +16 -16
  245. package/src/components/g2Charts/index.vue +397 -397
  246. package/src/components/index.js +36 -36
  247. package/src/components/input/IInput.vue +66 -66
  248. package/src/components/menu/SideMenu.vue +75 -75
  249. package/src/components/menu/menu.js +273 -273
  250. package/src/components/setting/Setting.vue +234 -234
  251. package/src/components/tool/AStepItem.vue +60 -60
  252. package/src/config/CreateQueryConfig.js +325 -325
  253. package/src/config/default/antd.config.js +89 -89
  254. package/src/config/default/setting.config.js +55 -55
  255. package/src/font-style/font.css +60 -60
  256. package/src/layouts/CommonLayout.vue +56 -56
  257. package/src/layouts/PageLayout.vue +151 -151
  258. package/src/layouts/SinglePageView.vue +136 -136
  259. package/src/layouts/header/AdminHeader.vue +132 -132
  260. package/src/layouts/header/HeaderNotice.vue +177 -177
  261. package/src/layouts/header/InstitutionDetail.vue +181 -181
  262. package/src/layouts/tabs/TabsHead.vue +189 -189
  263. package/src/lib.js +1 -1
  264. package/src/mock/extend/index.js +84 -84
  265. package/src/mock/goods/index.js +108 -108
  266. package/src/pages/DefaultExample/index.vue +77 -77
  267. package/src/pages/DynamicStatistics/ChartSelector.vue +331 -331
  268. package/src/pages/DynamicStatistics/DataTabs.vue +83 -83
  269. package/src/pages/DynamicStatistics/DynamicTable.vue +128 -128
  270. package/src/pages/DynamicStatistics/EvaluationArea.vue +69 -69
  271. package/src/pages/DynamicStatistics/FavoriteList.vue +50 -50
  272. package/src/pages/DynamicStatistics/QuestionHistoryAndFavorites.vue +591 -591
  273. package/src/pages/DynamicStatistics/SearchBar.vue +192 -192
  274. package/src/pages/DynamicStatistics/index.vue +282 -282
  275. package/src/pages/Example/childIndex.vue +15 -15
  276. package/src/pages/Example/index.vue +30 -30
  277. package/src/pages/NewDynamicStatistics/ChartSelector.vue +331 -331
  278. package/src/pages/NewDynamicStatistics/DataTabs.vue +122 -122
  279. package/src/pages/NewDynamicStatistics/DynamicTable.vue +128 -128
  280. package/src/pages/NewDynamicStatistics/EvaluationArea.vue +69 -69
  281. package/src/pages/NewDynamicStatistics/FavoriteList.vue +50 -50
  282. package/src/pages/NewDynamicStatistics/QuestionHistoryAndFavorites.vue +289 -289
  283. package/src/pages/NewDynamicStatistics/SearchBar.vue +193 -193
  284. package/src/pages/NewDynamicStatistics/index.vue +258 -258
  285. package/src/pages/Recording/index.vue +77 -77
  286. package/src/pages/ServiceReview/index.vue +284 -284
  287. package/src/pages/SubExample/index.vue +26 -26
  288. package/src/pages/WorkflowDetail/WorkflowPageDetail/TrimTextTail.vue +23 -23
  289. package/src/pages/XReportView/index.vue +64 -64
  290. package/src/pages/XTreeOneProExample/index.vue +67 -67
  291. package/src/pages/dashboard/workplace/WorkPlace.vue +141 -141
  292. package/src/pages/login/Login.vue +379 -379
  293. package/src/pages/login/LoginV3.vue +389 -389
  294. package/src/pages/lowCode/lowCodeEditor.vue +1219 -1219
  295. package/src/pages/lowCode/lowCodeRenderPage.vue +43 -43
  296. package/src/pages/report/ReportTable.js +124 -124
  297. package/src/pages/resourceManage/orgListManage.vue +98 -98
  298. package/src/pages/system/dictionary/index.vue +44 -44
  299. package/src/pages/system/monitor/loginInfor/index.vue +37 -37
  300. package/src/pages/system/monitor/operLog/index.vue +37 -37
  301. package/src/pages/system/settings/modifyPassword.vue +117 -117
  302. package/src/pages/system/ticket/index.vue +480 -480
  303. package/src/pages/system/ticket/submitTicketSuccess.vue +484 -484
  304. package/src/pages/userInfoDetailManage/ChangeMeterRecordQuery/index.vue +64 -64
  305. package/src/pages/userInfoDetailManage/ExceptionRecordQuery/index.vue +45 -45
  306. package/src/pages/userInfoDetailManage/InfoChangeRecordQuery/index.vue +64 -64
  307. package/src/pages/userInfoDetailManage/InstructRecordQuery/index.vue +64 -64
  308. package/src/pages/userInfoDetailManage/MeterParamRecordQuery/index.vue +64 -64
  309. package/src/pages/userInfoDetailManage/TransferRecordQuery/index.vue +66 -66
  310. package/src/pages/userInfoDetailManage/WatchCollectionRecordQuery/index.vue +64 -64
  311. package/src/plugins/EventLogPlugin.js +33 -33
  312. package/src/plugins/FindParentsData.js +17 -17
  313. package/src/services/DataModel.js +30 -30
  314. package/src/services/LodopFuncs.js +137 -137
  315. package/src/services/api/TicketDetailsViewApi.js +46 -46
  316. package/src/services/api/cas.js +79 -79
  317. package/src/services/api/entity.js +18 -18
  318. package/src/services/api/index.js +17 -17
  319. package/src/store/modules/account.js +115 -115
  320. package/src/store/modules/index.js +5 -5
  321. package/src/store/modules/lowCode.js +33 -33
  322. package/src/store/modules/setting.js +119 -119
  323. package/src/theme/default/style.less +58 -58
  324. package/src/utils/authority-utils.js +85 -85
  325. package/src/utils/errorCode.js +6 -6
  326. package/src/utils/formatter.js +74 -74
  327. package/src/utils/htmlToPDF.js +108 -108
  328. package/src/utils/htmlToPDFApi.js +5 -5
  329. package/src/utils/login.js +188 -188
  330. package/src/utils/lowcode/lowcodeComponentMixin.js +120 -120
  331. package/src/utils/lowcode/lowcodeLog.js +29 -29
  332. package/src/utils/lowcode/lowcodeUtils.js +373 -373
  333. package/src/utils/lowcode/registerComponentForEditor.js +1 -1
  334. package/src/utils/lowcode/registerComponentForRender.js +11 -11
  335. package/src/utils/map-utils.js +47 -47
  336. package/src/utils/reg.js +95 -95
  337. package/src/utils/runEvalFunction.js +14 -14
  338. package/src/utils/theme-color-replacer-extend.js +92 -92
  339. package/src/utils/util.js +329 -329
  340. package/src/utils/waterMark.js +31 -31
  341. package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
  342. package/src-base-client/components/common/HIS/HForm/HForm.vue +0 -347
  343. package/src-base-client/components/common/XCollapse/XCollapse.vue +0 -0
@@ -1,833 +1,833 @@
1
- <template>
2
- <div class="x-collapse-wrapper" :class="wrapperClassObject">
3
- <div class="collapse-content-wrapper" :class="{ 'with-pagination': shouldShowPagination }">
4
- <a-collapse
5
- :activeKey="activeKey"
6
- @change="handleChange"
7
- :bordered="config.bordered || true"
8
- :expand-icon-position="config.expandIconPosition || 'right'"
9
- :style="config.style || ''"
10
- >
11
- <a-collapse-panel
12
- v-for="(panel, panelIndex) in pagedPanels"
13
- :key="panelIndex.toString()"
14
- :show-arrow="config.showArrow || false"
15
- :disabled="config.collapsible">
16
- <template #header>
17
- <div class="header-content">
18
- <!-- 新增蓝色圆点图标,根据配置显示 -->
19
- <div
20
- v-if="config.showCircleIcon"
21
- class="blue-circle-icon"
22
- :style="config.circleIconStyle || {}"></div>
23
- <span
24
- class="header-text"
25
- :style="config.titleStyle">
26
- {{ getPanelTitle(panel) }}
27
- </span>
28
- <!-- 当有 title2 数据时显示信息项 -->
29
- <template v-if="panel.title2 && panel.title2.length">
30
- <span
31
- v-for="(item, headerIndex) in panel.title2"
32
- :key="headerIndex"
33
- class="info-item"
34
- :style="config.title2Style">
35
- <!-- 根据showTitle是否显示键名 -->
36
- <span v-if="item.showTitle">{{ item.key }}:</span>
37
- <span>{{ item.value }}</span>
38
- </span>
39
- </template>
40
- <!-- 当有 title3 数据时显示时间项(与 title2 一致:支持数组/单项) -->
41
- <template v-if="panel.title3 && Array.isArray(panel.title3) && panel.title3.length">
42
- <span
43
- v-for="(item, t3Index) in panel.title3"
44
- :key="t3Index"
45
- :class="['time-item', { 'time-first': t3Index === 0 }]"
46
- :style="config.title3Style">
47
- <span v-if="item.showTitle">{{ item.key }}:</span>
48
- <span>{{ item.value }}</span>
49
- </span>
50
- </template>
51
- <span
52
- v-else-if="panel.title3"
53
- class="time-item time-first"
54
- :style="config.title3Style">
55
- {{ panel.title3 }}
56
- </span>
57
- <!-- 修改搜索框的显示条件 -->
58
- <a-input-search
59
- v-if="panel.search"
60
- v-model="searchText[panelIndex]"
61
- :placeholder="panel.searchPlace"
62
- class="search-input"
63
- @search="(value) => onSearch(value, panelIndex)"
64
- @click.stop/>
65
- </div>
66
- </template>
67
-
68
- <!-- 新增设置图标,根据配置显示 -->
69
- <template #extra v-if="config.showSettingIcon">
70
- <a-icon
71
- v-if="activeKey.includes(panelIndex.toString())"
72
- :type="config.settingIconType || 'setting'"
73
- class="setting-icon"
74
- @click.stop="handleSettingClick(panel, panelIndex)"/>
75
- </template>
76
-
77
- <!-- 根据类型显示不同内容 -->
78
- <template v-if="panel.type === 'picture'">
79
- <img :src="panel.configName" alt="图片" style="width: 100%; max-width: 500px;"/>
80
- </template>
81
- <template v-else-if="['x-image-report','x-form-table','x-simple-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse','x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio', 'x-text-card','x-tree-rows'].includes(panel.type)">
82
- <component
83
- :is="getComponentName(panel.type)"
84
- :ref="`dynamicComponent_${ panel.type }_${ panelIndex }`"
85
- :serverName="panel.serverName || 'af-his'"
86
- :queryParamsName="panel.configName"
87
- :parameter="panel.parameter"
88
- :countVisible="false"
89
- :env="env"
90
- :style="config.componentStyle || ''"
91
- v-bind="panel.attrs || {}"
92
- :class="panel.className"
93
- :ipanelIndex="panelIndex"
94
- @deleteData="deleteData"
95
- @add="add"
96
- @listClick="listClick"
97
- @click="click"
98
- @component-mounted="handleMounted"
99
- @search-complete="handleSearchComplete" />
100
- </template>
101
- </a-collapse-panel>
102
- </a-collapse>
103
- <div v-if="shouldShowPagination" class="xcollapse-pagination">
104
- <div class="pagination-extras">
105
- <a-button-group size="small">
106
- <a-button icon="vertical-right" :disabled="paginationCurrent === 1" @click="goFirstPage"/>
107
- <a-pagination
108
- :current="paginationCurrent"
109
- :pageSize="paginationPageSize"
110
- :total="paginationTotal"
111
- :showSizeChanger="false"
112
- show-less-items
113
- @change="onPageChange"/>
114
- <a-button icon="vertical-left" :disabled="paginationCurrent === maxPage" @click="goLastPage"/>
115
- </a-button-group>
116
- <span class="pagination-info">共 {{ maxPage }} 页, {{ paginationTotal }} 条</span>
117
- </div>
118
- </div>
119
- </div>
120
- </div>
121
- </template>
122
-
123
- <script>
124
- import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
125
-
126
- export default {
127
- name: 'XCollapse',
128
- components: {
129
- XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'),
130
- XAddNativeForm: () => import('@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'),
131
- XFormGroup: () => import('@vue2-client/base-client/components/common/XFormGroup/XFormGroup.vue'),
132
- XTreePro: () => import('@vue2-client/base-client/components/common/XTree/XTreePro.vue'),
133
- XHisEditor: () => import('@vue2-client/base-client/components/his/XHisEditor/XHisEditor.vue'),
134
- XTab: () => import('@vue2-client/base-client/components/common/XTab/XTab.vue'),
135
- XReport: () => import('@vue2-client/base-client/components/common/XReport/XReport.vue'),
136
- XButtons: () => import('@vue2-client/base-client/components/common/XButtons/XButtons.vue'),
137
- XLabelSelect: () => import('@vue2-client/base-client/components/common/XLabelSelect/XLabelSelect.vue'),
138
- XConversation: () => import('@vue2-client/base-client/components/common/XConversation/XConversation.vue'),
139
- XCheckList: () => import('@vue2-client/base-client/components/common/XCheckList/XCheckList.vue'),
140
- XCardSet: () => import('@vue2-client/base-client/components/common/XCardSet/XCardSet.vue'),
141
- XCollapse: () => import('@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'),
142
- XHDescriptions: () => import('@vue2-client/base-client/components/his/XHDescriptions/XHDescriptions.vue'),
143
- XImageReport: () => import('@vue2-client/base-client/components/his/XImageReport/XImageReport.vue'),
144
- XSidebar: () => import('@vue2-client/base-client/components/his/XSidebar/XSidebar.vue'),
145
- XList: () => import('@vue2-client/base-client/components/his/XList/XList.vue'),
146
- XInput: () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
147
- XTimeLine: () => import('@vue2-client/base-client/components/common/XTimeline/XTimeline.vue'),
148
- XRadio: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
149
- XTextCard: () => import('@vue2-client/base-client/components/his/XTextCard/XTextCard.vue'),
150
- XTreeRows: () => import('@vue2-client/base-client/components/his/XTreeRows/XTreeRows.vue'),
151
- XSimpleTable: () => import('@vue2-client/base-client/components/his/XSimpleTable/XSimpleTable.vue')
152
- },
153
- data () {
154
- return {
155
- activeKey: [],
156
- config: {},
157
- configName: '',
158
- searchText: {},
159
- sonInstances: [], // 存储子组件实例
160
- paginationCurrent: 1,
161
- paginationPageSize: 5,
162
- lastParams: {}, // 缓存最近一次非分页参数
163
- paginationTotal: 0, // 后端返回的 total(仅分页模式使用)
164
- }
165
- },
166
- props: {
167
- // 环境
168
- env: {
169
- type: String,
170
- default: 'prod'
171
- },
172
- // json名
173
- queryParamsName: {
174
- type: Object,
175
- default: null
176
- },
177
- parameter: {
178
- type: Object,
179
- default: () => {
180
- return {}
181
- }
182
- }
183
- },
184
- created () {
185
- this.getData(this.queryParamsName, this.parameter)
186
- },
187
- beforeDestroy () {},
188
- computed: {
189
- // 基于 $attrs 的样式类开关(与 XHDescriptions.vue 思路一致)
190
- wrapperClassObject () {
191
- const attrs = this.$attrs || {}
192
- const classes = {}
193
- const booleanStyleKeys = [
194
- 'style1',
195
- 'check-result',
196
- 'medical-entry'
197
- ]
198
- booleanStyleKeys.forEach(key => {
199
- const val = attrs[key]
200
- const truthy = val === true || val === '' || val === 'true'
201
- if (truthy) classes[`xcollapse-${key}`] = true
202
- })
203
- const size = attrs.size
204
- if (size && typeof size === 'string') classes[`xcollapse-size-${size}`] = true
205
- if (this.shouldShowPagination) classes['with-pagination'] = true
206
- return classes
207
- },
208
- enablePagination () { return !!this.config?.pagination },
209
- shouldShowPagination () { return this.enablePagination },
210
- maxPage () {
211
- const size = Number(this.paginationPageSize || 1)
212
- const total = this.paginationTotal
213
- return Math.max(1, Math.ceil(total / size))
214
- },
215
- pagedPanels () {
216
- const showData = this.config?.showData || []
217
- if (this.enablePagination) return showData
218
- const start = (this.paginationCurrent - 1) * this.paginationPageSize
219
- const end = start + this.paginationPageSize
220
- return showData.slice(start, end)
221
- }
222
- },
223
- methods: {
224
- handleMounted (instance) {
225
- this.sonInstances.push(instance)
226
- },
227
- handleSearchComplete ({ hasMatch, panelIndex }) {
228
- if (hasMatch && !this.activeKey.includes(panelIndex.toString())) {
229
- // 只展开包含搜索结果的面板
230
- this.activeKey = [panelIndex.toString()]
231
- }
232
- },
233
- getComponentName (componentName) {
234
- return componentName
235
- },
236
- getPanelTitle (panel) {
237
- // 兼容数据为纯对象数组(无 title 字段)时的显示
238
- if (panel && panel.title) return panel.title
239
- if (panel && panel.name) return panel.name
240
- if (panel && panel.code) return panel.code
241
- return ''
242
- },
243
- add (data) {
244
- this.$emit('add', data)
245
- },
246
- deleteData (data) {
247
- this.$emit('deleteData', data)
248
- },
249
- listClick (data) {
250
- this.$emit('listClick', data)
251
- },
252
- click (data) {
253
- this.$emit('click', data)
254
- },
255
- getConfigByName (componentName) {
256
- const refKey = `dynamicComponent_${componentName}`
257
- return this.$refs[refKey]
258
- },
259
- // xTreeRow 组件搜素功能
260
- searchTreeRows (title) {
261
- this.$nextTick(() => {
262
- const instances = this.sonInstances
263
- instances.forEach(comp => {
264
- try {
265
- comp.searchTitleToggle?.(title)
266
- } catch (e) {
267
- console.error('调用失败:', e)
268
- }
269
- })
270
- })
271
- },
272
- async getData (config, parameter) {
273
- this.configName = config
274
- getConfigByName(config, 'af-his', res => {
275
- // 合并配置,保留已有的 pagination 等开关
276
- const original = this.config || {}
277
- this.config = { ...original, ...res }
278
- // 同步分页初值(仅当配置里提供时)
279
- const p = this.config?.pagination || null
280
- if (p && p.pageSize) this.paginationPageSize = Number(p.pageSize)
281
- // 只在初始化时设置默认页码,避免每次重置
282
- if (p && p.current && this.paginationCurrent === 1) {
283
- this.paginationCurrent = Number(p.current)
284
- }
285
-
286
- // 组合请求参数,启用分页时传递页码与页大小
287
- const baseParams = (parameter && Object.keys(parameter).length ? parameter : this.lastParams) || {}
288
- this.lastParams = { ...baseParams }
289
- const requestParams = { ...baseParams }
290
- if (this.enablePagination) {
291
- requestParams.page = this.paginationCurrent
292
- requestParams.pageSize = this.paginationPageSize
293
- }
294
-
295
- runLogic(res.mainLogic, requestParams, 'af-his').then(result => {
296
- let showData = []
297
- let totalCount = 0
298
-
299
- if (this.enablePagination) {
300
- // 启用分页:后端固定返回 { total, data: [], page, pageSize }
301
- showData = result.data
302
- this.paginationTotal = Number(result.total) || 0
303
- totalCount = this.paginationTotal
304
- } else {
305
- // 未启用分页:直接取数组
306
- showData = Array.isArray(result && result.data) ? result.data : (Array.isArray(result) ? result : [])
307
- totalCount = showData.length
308
- }
309
-
310
- // 赋值
311
- this.$set(this.config, 'showData', showData)
312
- this.$set(this.config, 'totalCount', Number(totalCount))
313
-
314
- // 后端分页边界保护:当前页超界时回退到最后一页并重拉
315
- if (this.enablePagination) {
316
- const total = Number(this.config.totalCount || 0)
317
- const size = Number(this.paginationPageSize || 1)
318
- const maxPage = Math.max(1, Math.ceil(total / size))
319
- if (this.paginationCurrent > maxPage) {
320
- this.paginationCurrent = maxPage
321
- this.getData(this.queryParamsName, this.parameter)
322
- return
323
- }
324
- }
325
-
326
- // 更具timeType更改时间类型
327
- if (this.config.timeType && this.config.timeType === '.') {
328
- this.config.showData.forEach(panel => {
329
- // if (panel.title3) {
330
- // panel.title3 = this.convertToCustomFormat(panel.title3)
331
- // }
332
- })
333
- this.$forceUpdate()
334
- }
335
- // 根据配置决定是否展开面板
336
- const shouldCollapseAll = this.config.collapseAllByDefault || false
337
- if (shouldCollapseAll) {
338
- // 如果配置为默认关闭,直接设置为空数组,避免展开动画
339
- this.activeKey = []
340
- } else {
341
- // 默认展开当前页的所有面板
342
- this.activeKey = (this.config.showData || []).map((_, i) => i.toString())
343
- }
344
- })
345
- })
346
- },
347
- onPageChange (page) {
348
- this.paginationCurrent = page
349
- // 后端分页:重新拉数;前端分页:仅切片
350
- this.getData(this.queryParamsName, this.lastParams)
351
- },
352
- goFirstPage () {
353
- if (this.paginationCurrent === 1) return
354
- this.onPageChange(1)
355
- },
356
- goLastPage () {
357
- if (this.paginationCurrent === this.maxPage) return
358
- this.onPageChange(this.maxPage)
359
- },
360
- refreshXCollapse () {
361
- this.getData(this.queryParamsName, this.parameter)
362
- },
363
- convertToCustomFormat (dateString) {
364
- // 创建一个新的 Date 对象
365
- const date = new Date(dateString)
366
- // 获取年、月、日
367
- const year = date.getFullYear()
368
- const month = date.getMonth() + 1 // 月份从0开始,所以需要加1
369
- const day = date.getDate()
370
- // 返回格式化后的字符串
371
- return `${year}.${month}.${day}`
372
- },
373
- handleChange (keys) {
374
- this.activeKey = keys
375
- // console.log(this.activeKey)
376
- },
377
- onSearch (value, panelIndex) {
378
- this.$emit('searchChange', { value: value, panelIndex: panelIndex })
379
- },
380
- handleSettingClick (panel, panelIndex) {
381
- this.$emit('settingClick', { panel, panelIndex })
382
- }
383
- },
384
- watch: {
385
- queryParamsName: {
386
- handler (newValue) {
387
- this.getData(newValue, this.parameter)
388
- },
389
- deep: true
390
- }
391
- }
392
- }
393
- </script>
394
-
395
- <style scoped lang="less">
396
- .x-collapse-wrapper { position: relative; display: flex; flex-direction: column; min-height: 100%; height: 100%; }
397
- .collapse-content-wrapper { flex: 1; min-height: 0; overflow: auto; position: relative; max-height: 79vh; }
398
- .collapse-content-wrapper.with-pagination { padding-bottom: 0px; }
399
- .header-content {
400
- display: flex;
401
- align-items: center;
402
- justify-content: flex-start; // 左对齐,避免圆点被拉开
403
- gap: 8px; // 圆点与标题的基础间距
404
- white-space: nowrap;
405
- overflow: hidden;
406
- flex: 1; // 占满可用宽度,便于空间分配
407
- }
408
-
409
- .header-text {
410
- margin-right: 14.17px;
411
- font-size: 16px;
412
- font-weight: 800;
413
- flex-shrink: 0;
414
- }
415
-
416
- .info-item {
417
- display: inline-flex;
418
- align-items: center;
419
- gap: 8px;
420
- font-size: 12px;
421
- color: #888888;
422
- flex-shrink: 0;
423
- }
424
-
425
- .time-item {
426
- margin-left: 12px;
427
- text-align: right;
428
- flex-shrink: 0;
429
- }
430
-
431
- :deep(.ant-collapse-header) {
432
- display: flex;
433
- position: relative;
434
- // border-bottom: v-bind('config.showLine ? "1px solid #000000" : "none"');
435
- align-items: center !important;
436
- background-color: #ffffff;
437
- padding: 12px 16px !important; /* 确保头部有足够的内边距 */
438
- }
439
-
440
- :deep(.ant-collapse-header-text) {
441
- flex: 1;
442
- }
443
-
444
- :deep(.ant-collapse-content > .ant-collapse-content-box) {
445
- padding: 16px !important; /* 确保内容区域有足够的内边距 */
446
- }
447
-
448
- .search-input {
449
- margin-left: 12px;
450
- width: auto;
451
- max-width: 40%;
452
- }
453
-
454
- // 右侧块定位:首个 info-item 或 time-item 推到右侧
455
- .header-content .info-item:first-of-type { margin-left: auto; }
456
- .header-content .time-item:first-of-type { margin-left: auto; }
457
-
458
- // 右侧块内部兄弟间距统一
459
- .info-item + .info-item { margin-left: 12px; }
460
- :deep(.ant-collapse-item-disabled > .ant-collapse-header) {
461
- cursor: default !important;
462
- }
463
-
464
- /* 新增样式 */
465
- .blue-circle-icon {
466
- width: 12px;
467
- height: 12px;
468
- border-radius: 6px;
469
- background: #3362DA;
470
- margin-top: 15px;
471
- margin-left: 11px;
472
- margin-bottom: 12px;
473
- flex-shrink: 0;
474
- }
475
-
476
- .setting-icon {
477
- font-size: 16px;
478
- cursor: pointer;
479
- display: inline-flex;
480
- align-items: center;
481
- justify-content: center;
482
- width: 19.47px;
483
- height: 20px;
484
- line-height: 20px;
485
- vertical-align: middle;
486
- color: #313131; /* 仅设置图标颜色,不设置背景 */
487
- margin-top: 0; /* 去除向上偏移 */
488
- margin-right: 47px; /* 与下拉箭头保持 20px 距离 */
489
- }
490
-
491
- :deep(.ant-collapse-extra) {
492
- display: flex !important;
493
- align-items: center;
494
- }
495
-
496
- .configurable-area {
497
- //padding: 16px;
498
- min-height: 100px;
499
- border: 1px dashed #d9d9d9;
500
- border-radius: 4px;
501
- background-color: #fafafa;
502
- }
503
-
504
- .empty-hint {
505
- color: #999;
506
- text-align: center;
507
- margin: 20px 0;
508
- }
509
-
510
- .loading-message {
511
- text-align: center;
512
- padding: 20px;
513
- color: #666;
514
- background: #f5f5f5;
515
- border-radius: 4px;
516
- margin: 10px 0;
517
- }
518
-
519
- .empty-state {
520
- text-align: center;
521
- padding: 40px 20px;
522
- color: #999;
523
- background: #fafafa;
524
- border-radius: 4px;
525
- margin: 10px 0;
526
- flex: 1;
527
- display: flex;
528
- align-items: center;
529
- justify-content: center;
530
- }
531
-
532
- /* 分页组件:固定在组件容器底部(不影响全局布局) */
533
- .with-pagination { padding-bottom: 0; }
534
- .xcollapse-pagination { /* 粘在视口底部,宽度随容器 */
535
- position: sticky;
536
- bottom: 0;
537
- display: flex;
538
- justify-content: center;
539
- padding: 12px 0;
540
- background: #fff;
541
- border-top: 1px solid #f0f0f0;
542
- }
543
- .pagination-extras { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
544
- .pagination-extras .ant-btn-group { gap: 8px; }
545
- .pagination-extras .ant-btn-group + .pagination-info { margin-left: 9px; }
546
- .pagination-info {
547
- color: #5D5C5C;
548
- font-family: 'Source Han Sans', sans-serif;
549
- font-size: 16px;
550
- font-weight: normal;
551
- line-height: normal;
552
- letter-spacing: 0em;
553
- font-feature-settings: "kern" on;
554
- }
555
-
556
- /* 自定义分页按钮样式 */
557
- :deep(.pagination-extras .ant-btn) {
558
- font-family: 'Source Han Sans', sans-serif;
559
- font-size: 16px;
560
- font-weight: normal;
561
- line-height: normal;
562
- letter-spacing: 0em;
563
- font-feature-settings: "kern" on;
564
- color: #5D5C5C;
565
- border-radius: 4px;
566
- border: 1px solid #D8D8D8;
567
- background: #FFFFFF;
568
- box-sizing: border-box;
569
- margin-right: 8px;
570
- }
571
-
572
- :deep(.pagination-extras .ant-btn:last-child) {
573
- margin-right: 0;
574
- }
575
-
576
- /* 直达首页末页按钮样式 */
577
- :deep(.pagination-extras .ant-btn[icon="vertical-left"]),
578
- :deep(.pagination-extras .ant-btn[icon="vertical-right"]) {
579
- position: absolute;
580
- left: 24px;
581
- top: 24px;
582
- width: 24px;
583
- height: 24px;
584
- transform: rotate(180deg);
585
- border-radius: 4px;
586
- opacity: 1;
587
- background: #FFFFFF;
588
- box-sizing: border-box;
589
- border: 1px solid #D8D8D8;
590
- }
591
-
592
- /* 上一页下一页按钮样式 */
593
- :deep(.ant-pagination .ant-pagination-prev),
594
- :deep(.ant-pagination .ant-pagination-next) {
595
- width: 24px;
596
- height: 24px;
597
- line-height: 24px;
598
- border-radius: 4px;
599
- opacity: 1;
600
- background: #FFFFFF;
601
- box-sizing: border-box;
602
- border: 1px solid #D8D8D8;
603
- }
604
-
605
- /* 页码选择按钮样式 */
606
- :deep(.ant-pagination .ant-pagination-item) {
607
- width: 36px;
608
- height: 24px;
609
- border-radius: 4px;
610
- border: 1px solid #D8D8D8;
611
- background: #FFFFFF;
612
- box-sizing: border-box;
613
- font-family: 'Source Han Sans', sans-serif;
614
- font-size: 16px;
615
- font-weight: normal;
616
- line-height: normal;
617
- letter-spacing: 0em;
618
- font-feature-settings: "kern" on;
619
- color: #5D5C5C;
620
- margin-right: 8px;
621
- }
622
-
623
- :deep(.ant-pagination .ant-pagination-item:last-child) {
624
- margin-right: 0;
625
- }
626
-
627
- /* 当前页码样式 */
628
- :deep(.ant-pagination .ant-pagination-item-active) {
629
- background: #0057FE !important;
630
- border: 1px solid #1890ff;
631
- color: #FFFFFF !important;
632
- }
633
-
634
- /* 确保选中页码文字颜色生效 */
635
- :deep(.ant-pagination .ant-pagination-item-active a) {
636
- color: #FFFFFF !important;
637
- }
638
-
639
- /* 禁用状态样式 */
640
- :deep(.pagination-extras .ant-btn:disabled) {
641
- opacity: 0.5;
642
- cursor: not-allowed;
643
- }
644
-
645
- /* 移除所有可能导致截断的固定高度 */
646
- :deep(.ant-collapse-item) .ant-collapse-content .ant-collapse-content-box > * {
647
- max-height: none !important; /* 移除可能的最大高度限制 */
648
- height: auto !important; /* 使用自动高度 */
649
- }
650
-
651
- // 基于根容器类进行样式整合:x-collapse-wrapper.xcollapse-style1
652
- .x-collapse-wrapper {
653
- // 检查结果样式
654
- &.xcollapse-check-result {
655
- height: auto; /* 允许根据内容自适应高度,避免滚动被限制 */
656
- min-height: 600px;
657
- // 让每个面板成为独立卡片:去掉 antd 默认的分隔线,增加间距与圆角
658
- :deep(.ant-collapse) {
659
- background: transparent;
660
- border: 0;
661
- }
662
-
663
- :deep(.ant-collapse > .ant-collapse-item) {
664
- width: 562px;
665
- min-height: auto;
666
- height: auto;
667
- margin-bottom:10px;
668
- background: #FFFFFF; // 独立白底
669
- box-sizing: border-box;
670
- border: 1px solid #E5E9F0; // 每个面板自身边框
671
- }
672
-
673
- :deep(.ant-collapse > .ant-collapse-item:first-child) { margin-top: 0; }
674
- :deep(.ant-collapse > .ant-collapse-item:last-child) { margin-bottom: 0; }
675
-
676
- :deep(.ant-collapse-content > .ant-collapse-content-box) {
677
- background: #FFFFFF;
678
- padding: 0px !important;
679
- }
680
-
681
- // 表头:恢复合适的上下内边距,去掉顶部额外空白
682
- :deep(.ant-collapse-header) {
683
- background: #FFFFFF;
684
- padding: 0px 0px !important;
685
- height: 39px !important;
686
- border-bottom: none !important; // 移除标题处下边线,避免与外边框连为一体
687
- border: 1px solid #E5E9F0; // 每个面板自身边框
688
- }
689
-
690
- /* 将右侧留白转移到标题与第一项之间 */
691
- .header-content { padding-right: 0px; gap: 5px; }
692
- .header-content .info-item:first-of-type { margin-left: 24px !important; }
693
- .header-content .time-item:first-of-type { margin-left: 24px !important; }
694
-
695
- .info-item {
696
- height: 20px;
697
- opacity: 1;
698
- font-family: "Source Han Sans";
699
- font-size: 14px;
700
- font-weight: 400;
701
- line-height: 20px;
702
- text-align: right;
703
- letter-spacing: 0em;
704
- font-feature-settings: "kern" on;
705
- color: #313131 !important;
706
- }
707
-
708
- .header-text {
709
- height: 23px;
710
- opacity: 1;
711
- font-family: "Source Han Sans";
712
- font-size: 16px;
713
- font-weight: 700;
714
- line-height: 23px;
715
- letter-spacing: 0em;
716
- padding-right: 40px;
717
- font-feature-settings: "kern" on;
718
- color: #313131 !important;
719
- }
720
- }
721
- // 历史病历样式
722
- &.xcollapse-style1 {
723
- height: auto; /* 允许根据内容自适应高度,避免滚动被限制 */
724
- min-height: 600px;
725
- .header-text {
726
- font-family: "Source Han Sans";
727
- font-size: 16px;
728
- font-weight: 700;
729
- line-height: 23px;
730
- letter-spacing: 0em;
731
- color: #313131;
732
- margin-top: 8px;
733
- margin-bottom: 8px;
734
- margin-right: 0 !important;
735
- }
736
-
737
- .info-item {
738
- font-family: "Source Han Sans";
739
- font-size: 16px;
740
- font-weight: 700;
741
- line-height: 23px;
742
- text-align: right;
743
- color: #313131;
744
- margin-top: 9px;
745
- margin-bottom: 7px;
746
- margin-left: 28.14px;
747
- letter-spacing: 0em
748
- }
749
-
750
- .time-item {
751
- font-family: "Source Han Sans";
752
- font-size: 16px;
753
- font-weight: 400;
754
- line-height: 23px;
755
- text-align: right;
756
- margin-top: 9px;
757
- margin-bottom: 7px;
758
- color: #313131;
759
- letter-spacing: 0em;
760
- }
761
-
762
- // 让每个面板成为独立卡片:去掉 antd 默认的分隔线,增加间距与圆角
763
- :deep(.ant-collapse) {
764
- background: transparent;
765
- border: 0;
766
- }
767
-
768
- :deep(.ant-collapse > .ant-collapse-item) {
769
- width: 562px;
770
- min-height: auto;
771
- height: auto;
772
- margin-bottom:10px;
773
- background: #FFFFFF; // 独立白底
774
- box-sizing: border-box;
775
- border: 1px solid #E5E9F0; // 每个面板自身边框
776
- }
777
-
778
- :deep(.ant-collapse > .ant-collapse-item:first-child) { margin-top: 0; }
779
- :deep(.ant-collapse > .ant-collapse-item:last-child) { margin-bottom: 0; }
780
-
781
- :deep(.ant-collapse-content > .ant-collapse-content-box) {
782
- background: #FFFFFF;
783
- padding: 0px !important;
784
- }
785
-
786
- // 表头:恢复合适的上下内边距,去掉顶部额外空白
787
- :deep(.ant-collapse-header) {
788
- background: #FFFFFF;
789
- padding: 0px 0px !important;
790
- height: 41px !important;
791
- border-bottom: none !important; // 移除标题处下边线,避免与外边框连为一体
792
- border: 1px solid #E5E9F0; // 每个面板自身边框
793
- }
794
- }
795
-
796
- // 医学词条样式
797
- &.xcollapse-medical-entry {
798
- height: auto;
799
- min-height: 600px;
800
- :deep(.ant-collapse) { background: transparent; border: 0; }
801
- :deep(.ant-collapse > .ant-collapse-item) {
802
- width: 564px;
803
- min-height: auto;
804
- height: auto;
805
- margin-bottom: 14px;
806
- background: #FFFFFF;
807
- box-sizing: border-box;
808
- border: 1px solid #E5E9F0;
809
- }
810
- :deep(.ant-collapse > .ant-collapse-item:first-child) { margin-top: 0; }
811
- :deep(.ant-collapse > .ant-collapse-item:last-child) { margin-bottom: 0; }
812
- :deep(.ant-collapse-content > .ant-collapse-content-box) { background: #FFFFFF; padding: 0px !important; }
813
- :deep(.ant-collapse-header) {
814
- background: #FFFFFF;
815
- padding: 0px 0px !important;
816
- height: 39px !important;
817
- border-bottom: none !important;
818
- border: 1px solid #E5E9F0;
819
- }
820
- .header-text {
821
- font-family: "Source Han Sans";
822
- font-size: 16px;
823
- font-weight: 700;
824
- line-height: 23px;
825
- letter-spacing: 0em;
826
- color: #313131;
827
- margin-top: 7px;
828
- margin-bottom: 7px;
829
- margin-right: 0 !important;
830
- }
831
- }
832
- }
833
- </style>
1
+ <template>
2
+ <div class="x-collapse-wrapper" :class="wrapperClassObject">
3
+ <div class="collapse-content-wrapper" :class="{ 'with-pagination': shouldShowPagination }">
4
+ <a-collapse
5
+ :activeKey="activeKey"
6
+ @change="handleChange"
7
+ :bordered="config.bordered || true"
8
+ :expand-icon-position="config.expandIconPosition || 'right'"
9
+ :style="config.style || ''"
10
+ >
11
+ <a-collapse-panel
12
+ v-for="(panel, panelIndex) in pagedPanels"
13
+ :key="panelIndex.toString()"
14
+ :show-arrow="config.showArrow || false"
15
+ :disabled="config.collapsible">
16
+ <template #header>
17
+ <div class="header-content">
18
+ <!-- 新增蓝色圆点图标,根据配置显示 -->
19
+ <div
20
+ v-if="config.showCircleIcon"
21
+ class="blue-circle-icon"
22
+ :style="config.circleIconStyle || {}"></div>
23
+ <span
24
+ class="header-text"
25
+ :style="config.titleStyle">
26
+ {{ getPanelTitle(panel) }}
27
+ </span>
28
+ <!-- 当有 title2 数据时显示信息项 -->
29
+ <template v-if="panel.title2 && panel.title2.length">
30
+ <span
31
+ v-for="(item, headerIndex) in panel.title2"
32
+ :key="headerIndex"
33
+ class="info-item"
34
+ :style="config.title2Style">
35
+ <!-- 根据showTitle是否显示键名 -->
36
+ <span v-if="item.showTitle">{{ item.key }}:</span>
37
+ <span>{{ item.value }}</span>
38
+ </span>
39
+ </template>
40
+ <!-- 当有 title3 数据时显示时间项(与 title2 一致:支持数组/单项) -->
41
+ <template v-if="panel.title3 && Array.isArray(panel.title3) && panel.title3.length">
42
+ <span
43
+ v-for="(item, t3Index) in panel.title3"
44
+ :key="t3Index"
45
+ :class="['time-item', { 'time-first': t3Index === 0 }]"
46
+ :style="config.title3Style">
47
+ <span v-if="item.showTitle">{{ item.key }}:</span>
48
+ <span>{{ item.value }}</span>
49
+ </span>
50
+ </template>
51
+ <span
52
+ v-else-if="panel.title3"
53
+ class="time-item time-first"
54
+ :style="config.title3Style">
55
+ {{ panel.title3 }}
56
+ </span>
57
+ <!-- 修改搜索框的显示条件 -->
58
+ <a-input-search
59
+ v-if="panel.search"
60
+ v-model="searchText[panelIndex]"
61
+ :placeholder="panel.searchPlace"
62
+ class="search-input"
63
+ @search="(value) => onSearch(value, panelIndex)"
64
+ @click.stop/>
65
+ </div>
66
+ </template>
67
+
68
+ <!-- 新增设置图标,根据配置显示 -->
69
+ <template #extra v-if="config.showSettingIcon">
70
+ <a-icon
71
+ v-if="activeKey.includes(panelIndex.toString())"
72
+ :type="config.settingIconType || 'setting'"
73
+ class="setting-icon"
74
+ @click.stop="handleSettingClick(panel, panelIndex)"/>
75
+ </template>
76
+
77
+ <!-- 根据类型显示不同内容 -->
78
+ <template v-if="panel.type === 'picture'">
79
+ <img :src="panel.configName" alt="图片" style="width: 100%; max-width: 500px;"/>
80
+ </template>
81
+ <template v-else-if="['x-image-report','x-form-table','x-simple-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse','x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio', 'x-text-card','x-tree-rows'].includes(panel.type)">
82
+ <component
83
+ :is="getComponentName(panel.type)"
84
+ :ref="`dynamicComponent_${ panel.type }_${ panelIndex }`"
85
+ :serverName="panel.serverName || 'af-his'"
86
+ :queryParamsName="panel.configName"
87
+ :parameter="panel.parameter"
88
+ :countVisible="false"
89
+ :env="env"
90
+ :style="config.componentStyle || ''"
91
+ v-bind="panel.attrs || {}"
92
+ :class="panel.className"
93
+ :ipanelIndex="panelIndex"
94
+ @deleteData="deleteData"
95
+ @add="add"
96
+ @listClick="listClick"
97
+ @click="click"
98
+ @component-mounted="handleMounted"
99
+ @search-complete="handleSearchComplete" />
100
+ </template>
101
+ </a-collapse-panel>
102
+ </a-collapse>
103
+ <div v-if="shouldShowPagination" class="xcollapse-pagination">
104
+ <div class="pagination-extras">
105
+ <a-button-group size="small">
106
+ <a-button icon="vertical-right" :disabled="paginationCurrent === 1" @click="goFirstPage"/>
107
+ <a-pagination
108
+ :current="paginationCurrent"
109
+ :pageSize="paginationPageSize"
110
+ :total="paginationTotal"
111
+ :showSizeChanger="false"
112
+ show-less-items
113
+ @change="onPageChange"/>
114
+ <a-button icon="vertical-left" :disabled="paginationCurrent === maxPage" @click="goLastPage"/>
115
+ </a-button-group>
116
+ <span class="pagination-info">共 {{ maxPage }} 页, {{ paginationTotal }} 条</span>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ </div>
121
+ </template>
122
+
123
+ <script>
124
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
125
+
126
+ export default {
127
+ name: 'XCollapse',
128
+ components: {
129
+ XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'),
130
+ XAddNativeForm: () => import('@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'),
131
+ XFormGroup: () => import('@vue2-client/base-client/components/common/XFormGroup/XFormGroup.vue'),
132
+ XTreePro: () => import('@vue2-client/base-client/components/common/XTree/XTreePro.vue'),
133
+ XHisEditor: () => import('@vue2-client/base-client/components/his/XHisEditor/XHisEditor.vue'),
134
+ XTab: () => import('@vue2-client/base-client/components/common/XTab/XTab.vue'),
135
+ XReport: () => import('@vue2-client/base-client/components/common/XReport/XReport.vue'),
136
+ XButtons: () => import('@vue2-client/base-client/components/common/XButtons/XButtons.vue'),
137
+ XLabelSelect: () => import('@vue2-client/base-client/components/common/XLabelSelect/XLabelSelect.vue'),
138
+ XConversation: () => import('@vue2-client/base-client/components/common/XConversation/XConversation.vue'),
139
+ XCheckList: () => import('@vue2-client/base-client/components/common/XCheckList/XCheckList.vue'),
140
+ XCardSet: () => import('@vue2-client/base-client/components/common/XCardSet/XCardSet.vue'),
141
+ XCollapse: () => import('@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'),
142
+ XHDescriptions: () => import('@vue2-client/base-client/components/his/XHDescriptions/XHDescriptions.vue'),
143
+ XImageReport: () => import('@vue2-client/base-client/components/his/XImageReport/XImageReport.vue'),
144
+ XSidebar: () => import('@vue2-client/base-client/components/his/XSidebar/XSidebar.vue'),
145
+ XList: () => import('@vue2-client/base-client/components/his/XList/XList.vue'),
146
+ XInput: () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
147
+ XTimeLine: () => import('@vue2-client/base-client/components/common/XTimeline/XTimeline.vue'),
148
+ XRadio: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
149
+ XTextCard: () => import('@vue2-client/base-client/components/his/XTextCard/XTextCard.vue'),
150
+ XTreeRows: () => import('@vue2-client/base-client/components/his/XTreeRows/XTreeRows.vue'),
151
+ XSimpleTable: () => import('@vue2-client/base-client/components/his/XSimpleTable/XSimpleTable.vue')
152
+ },
153
+ data () {
154
+ return {
155
+ activeKey: [],
156
+ config: {},
157
+ configName: '',
158
+ searchText: {},
159
+ sonInstances: [], // 存储子组件实例
160
+ paginationCurrent: 1,
161
+ paginationPageSize: 5,
162
+ lastParams: {}, // 缓存最近一次非分页参数
163
+ paginationTotal: 0, // 后端返回的 total(仅分页模式使用)
164
+ }
165
+ },
166
+ props: {
167
+ // 环境
168
+ env: {
169
+ type: String,
170
+ default: 'prod'
171
+ },
172
+ // json名
173
+ queryParamsName: {
174
+ type: Object,
175
+ default: null
176
+ },
177
+ parameter: {
178
+ type: Object,
179
+ default: () => {
180
+ return {}
181
+ }
182
+ }
183
+ },
184
+ created () {
185
+ this.getData(this.queryParamsName, this.parameter)
186
+ },
187
+ beforeDestroy () {},
188
+ computed: {
189
+ // 基于 $attrs 的样式类开关(与 XHDescriptions.vue 思路一致)
190
+ wrapperClassObject () {
191
+ const attrs = this.$attrs || {}
192
+ const classes = {}
193
+ const booleanStyleKeys = [
194
+ 'style1',
195
+ 'check-result',
196
+ 'medical-entry'
197
+ ]
198
+ booleanStyleKeys.forEach(key => {
199
+ const val = attrs[key]
200
+ const truthy = val === true || val === '' || val === 'true'
201
+ if (truthy) classes[`xcollapse-${key}`] = true
202
+ })
203
+ const size = attrs.size
204
+ if (size && typeof size === 'string') classes[`xcollapse-size-${size}`] = true
205
+ if (this.shouldShowPagination) classes['with-pagination'] = true
206
+ return classes
207
+ },
208
+ enablePagination () { return !!this.config?.pagination },
209
+ shouldShowPagination () { return this.enablePagination },
210
+ maxPage () {
211
+ const size = Number(this.paginationPageSize || 1)
212
+ const total = this.paginationTotal
213
+ return Math.max(1, Math.ceil(total / size))
214
+ },
215
+ pagedPanels () {
216
+ const showData = this.config?.showData || []
217
+ if (this.enablePagination) return showData
218
+ const start = (this.paginationCurrent - 1) * this.paginationPageSize
219
+ const end = start + this.paginationPageSize
220
+ return showData.slice(start, end)
221
+ }
222
+ },
223
+ methods: {
224
+ handleMounted (instance) {
225
+ this.sonInstances.push(instance)
226
+ },
227
+ handleSearchComplete ({ hasMatch, panelIndex }) {
228
+ if (hasMatch && !this.activeKey.includes(panelIndex.toString())) {
229
+ // 只展开包含搜索结果的面板
230
+ this.activeKey = [panelIndex.toString()]
231
+ }
232
+ },
233
+ getComponentName (componentName) {
234
+ return componentName
235
+ },
236
+ getPanelTitle (panel) {
237
+ // 兼容数据为纯对象数组(无 title 字段)时的显示
238
+ if (panel && panel.title) return panel.title
239
+ if (panel && panel.name) return panel.name
240
+ if (panel && panel.code) return panel.code
241
+ return ''
242
+ },
243
+ add (data) {
244
+ this.$emit('add', data)
245
+ },
246
+ deleteData (data) {
247
+ this.$emit('deleteData', data)
248
+ },
249
+ listClick (data) {
250
+ this.$emit('listClick', data)
251
+ },
252
+ click (data) {
253
+ this.$emit('click', data)
254
+ },
255
+ getConfigByName (componentName) {
256
+ const refKey = `dynamicComponent_${componentName}`
257
+ return this.$refs[refKey]
258
+ },
259
+ // xTreeRow 组件搜素功能
260
+ searchTreeRows (title) {
261
+ this.$nextTick(() => {
262
+ const instances = this.sonInstances
263
+ instances.forEach(comp => {
264
+ try {
265
+ comp.searchTitleToggle?.(title)
266
+ } catch (e) {
267
+ console.error('调用失败:', e)
268
+ }
269
+ })
270
+ })
271
+ },
272
+ async getData (config, parameter) {
273
+ this.configName = config
274
+ getConfigByName(config, 'af-his', res => {
275
+ // 合并配置,保留已有的 pagination 等开关
276
+ const original = this.config || {}
277
+ this.config = { ...original, ...res }
278
+ // 同步分页初值(仅当配置里提供时)
279
+ const p = this.config?.pagination || null
280
+ if (p && p.pageSize) this.paginationPageSize = Number(p.pageSize)
281
+ // 只在初始化时设置默认页码,避免每次重置
282
+ if (p && p.current && this.paginationCurrent === 1) {
283
+ this.paginationCurrent = Number(p.current)
284
+ }
285
+
286
+ // 组合请求参数,启用分页时传递页码与页大小
287
+ const baseParams = (parameter && Object.keys(parameter).length ? parameter : this.lastParams) || {}
288
+ this.lastParams = { ...baseParams }
289
+ const requestParams = { ...baseParams }
290
+ if (this.enablePagination) {
291
+ requestParams.page = this.paginationCurrent
292
+ requestParams.pageSize = this.paginationPageSize
293
+ }
294
+
295
+ runLogic(res.mainLogic, requestParams, 'af-his').then(result => {
296
+ let showData = []
297
+ let totalCount = 0
298
+
299
+ if (this.enablePagination) {
300
+ // 启用分页:后端固定返回 { total, data: [], page, pageSize }
301
+ showData = result.data
302
+ this.paginationTotal = Number(result.total) || 0
303
+ totalCount = this.paginationTotal
304
+ } else {
305
+ // 未启用分页:直接取数组
306
+ showData = Array.isArray(result && result.data) ? result.data : (Array.isArray(result) ? result : [])
307
+ totalCount = showData.length
308
+ }
309
+
310
+ // 赋值
311
+ this.$set(this.config, 'showData', showData)
312
+ this.$set(this.config, 'totalCount', Number(totalCount))
313
+
314
+ // 后端分页边界保护:当前页超界时回退到最后一页并重拉
315
+ if (this.enablePagination) {
316
+ const total = Number(this.config.totalCount || 0)
317
+ const size = Number(this.paginationPageSize || 1)
318
+ const maxPage = Math.max(1, Math.ceil(total / size))
319
+ if (this.paginationCurrent > maxPage) {
320
+ this.paginationCurrent = maxPage
321
+ this.getData(this.queryParamsName, this.parameter)
322
+ return
323
+ }
324
+ }
325
+
326
+ // 更具timeType更改时间类型
327
+ if (this.config.timeType && this.config.timeType === '.') {
328
+ this.config.showData.forEach(panel => {
329
+ // if (panel.title3) {
330
+ // panel.title3 = this.convertToCustomFormat(panel.title3)
331
+ // }
332
+ })
333
+ this.$forceUpdate()
334
+ }
335
+ // 根据配置决定是否展开面板
336
+ const shouldCollapseAll = this.config.collapseAllByDefault || false
337
+ if (shouldCollapseAll) {
338
+ // 如果配置为默认关闭,直接设置为空数组,避免展开动画
339
+ this.activeKey = []
340
+ } else {
341
+ // 默认展开当前页的所有面板
342
+ this.activeKey = (this.config.showData || []).map((_, i) => i.toString())
343
+ }
344
+ })
345
+ })
346
+ },
347
+ onPageChange (page) {
348
+ this.paginationCurrent = page
349
+ // 后端分页:重新拉数;前端分页:仅切片
350
+ this.getData(this.queryParamsName, this.lastParams)
351
+ },
352
+ goFirstPage () {
353
+ if (this.paginationCurrent === 1) return
354
+ this.onPageChange(1)
355
+ },
356
+ goLastPage () {
357
+ if (this.paginationCurrent === this.maxPage) return
358
+ this.onPageChange(this.maxPage)
359
+ },
360
+ refreshXCollapse () {
361
+ this.getData(this.queryParamsName, this.parameter)
362
+ },
363
+ convertToCustomFormat (dateString) {
364
+ // 创建一个新的 Date 对象
365
+ const date = new Date(dateString)
366
+ // 获取年、月、日
367
+ const year = date.getFullYear()
368
+ const month = date.getMonth() + 1 // 月份从0开始,所以需要加1
369
+ const day = date.getDate()
370
+ // 返回格式化后的字符串
371
+ return `${year}.${month}.${day}`
372
+ },
373
+ handleChange (keys) {
374
+ this.activeKey = keys
375
+ // console.log(this.activeKey)
376
+ },
377
+ onSearch (value, panelIndex) {
378
+ this.$emit('searchChange', { value: value, panelIndex: panelIndex })
379
+ },
380
+ handleSettingClick (panel, panelIndex) {
381
+ this.$emit('settingClick', { panel, panelIndex })
382
+ }
383
+ },
384
+ watch: {
385
+ queryParamsName: {
386
+ handler (newValue) {
387
+ this.getData(newValue, this.parameter)
388
+ },
389
+ deep: true
390
+ }
391
+ }
392
+ }
393
+ </script>
394
+
395
+ <style scoped lang="less">
396
+ .x-collapse-wrapper { position: relative; display: flex; flex-direction: column; min-height: 100%; height: 100%; }
397
+ .collapse-content-wrapper { flex: 1; min-height: 0; overflow: auto; position: relative; max-height: 79vh; }
398
+ .collapse-content-wrapper.with-pagination { padding-bottom: 0px; }
399
+ .header-content {
400
+ display: flex;
401
+ align-items: center;
402
+ justify-content: flex-start; // 左对齐,避免圆点被拉开
403
+ gap: 8px; // 圆点与标题的基础间距
404
+ white-space: nowrap;
405
+ overflow: hidden;
406
+ flex: 1; // 占满可用宽度,便于空间分配
407
+ }
408
+
409
+ .header-text {
410
+ margin-right: 14.17px;
411
+ font-size: 16px;
412
+ font-weight: 800;
413
+ flex-shrink: 0;
414
+ }
415
+
416
+ .info-item {
417
+ display: inline-flex;
418
+ align-items: center;
419
+ gap: 8px;
420
+ font-size: 12px;
421
+ color: #888888;
422
+ flex-shrink: 0;
423
+ }
424
+
425
+ .time-item {
426
+ margin-left: 12px;
427
+ text-align: right;
428
+ flex-shrink: 0;
429
+ }
430
+
431
+ :deep(.ant-collapse-header) {
432
+ display: flex;
433
+ position: relative;
434
+ // border-bottom: v-bind('config.showLine ? "1px solid #000000" : "none"');
435
+ align-items: center !important;
436
+ background-color: #ffffff;
437
+ padding: 12px 16px !important; /* 确保头部有足够的内边距 */
438
+ }
439
+
440
+ :deep(.ant-collapse-header-text) {
441
+ flex: 1;
442
+ }
443
+
444
+ :deep(.ant-collapse-content > .ant-collapse-content-box) {
445
+ padding: 16px !important; /* 确保内容区域有足够的内边距 */
446
+ }
447
+
448
+ .search-input {
449
+ margin-left: 12px;
450
+ width: auto;
451
+ max-width: 40%;
452
+ }
453
+
454
+ // 右侧块定位:首个 info-item 或 time-item 推到右侧
455
+ .header-content .info-item:first-of-type { margin-left: auto; }
456
+ .header-content .time-item:first-of-type { margin-left: auto; }
457
+
458
+ // 右侧块内部兄弟间距统一
459
+ .info-item + .info-item { margin-left: 12px; }
460
+ :deep(.ant-collapse-item-disabled > .ant-collapse-header) {
461
+ cursor: default !important;
462
+ }
463
+
464
+ /* 新增样式 */
465
+ .blue-circle-icon {
466
+ width: 12px;
467
+ height: 12px;
468
+ border-radius: 6px;
469
+ background: #3362DA;
470
+ margin-top: 15px;
471
+ margin-left: 11px;
472
+ margin-bottom: 12px;
473
+ flex-shrink: 0;
474
+ }
475
+
476
+ .setting-icon {
477
+ font-size: 16px;
478
+ cursor: pointer;
479
+ display: inline-flex;
480
+ align-items: center;
481
+ justify-content: center;
482
+ width: 19.47px;
483
+ height: 20px;
484
+ line-height: 20px;
485
+ vertical-align: middle;
486
+ color: #313131; /* 仅设置图标颜色,不设置背景 */
487
+ margin-top: 0; /* 去除向上偏移 */
488
+ margin-right: 47px; /* 与下拉箭头保持 20px 距离 */
489
+ }
490
+
491
+ :deep(.ant-collapse-extra) {
492
+ display: flex !important;
493
+ align-items: center;
494
+ }
495
+
496
+ .configurable-area {
497
+ //padding: 16px;
498
+ min-height: 100px;
499
+ border: 1px dashed #d9d9d9;
500
+ border-radius: 4px;
501
+ background-color: #fafafa;
502
+ }
503
+
504
+ .empty-hint {
505
+ color: #999;
506
+ text-align: center;
507
+ margin: 20px 0;
508
+ }
509
+
510
+ .loading-message {
511
+ text-align: center;
512
+ padding: 20px;
513
+ color: #666;
514
+ background: #f5f5f5;
515
+ border-radius: 4px;
516
+ margin: 10px 0;
517
+ }
518
+
519
+ .empty-state {
520
+ text-align: center;
521
+ padding: 40px 20px;
522
+ color: #999;
523
+ background: #fafafa;
524
+ border-radius: 4px;
525
+ margin: 10px 0;
526
+ flex: 1;
527
+ display: flex;
528
+ align-items: center;
529
+ justify-content: center;
530
+ }
531
+
532
+ /* 分页组件:固定在组件容器底部(不影响全局布局) */
533
+ .with-pagination { padding-bottom: 0; }
534
+ .xcollapse-pagination { /* 粘在视口底部,宽度随容器 */
535
+ position: sticky;
536
+ bottom: 0;
537
+ display: flex;
538
+ justify-content: center;
539
+ padding: 12px 0;
540
+ background: #fff;
541
+ border-top: 1px solid #f0f0f0;
542
+ }
543
+ .pagination-extras { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
544
+ .pagination-extras .ant-btn-group { gap: 8px; }
545
+ .pagination-extras .ant-btn-group + .pagination-info { margin-left: 9px; }
546
+ .pagination-info {
547
+ color: #5D5C5C;
548
+ font-family: 'Source Han Sans', sans-serif;
549
+ font-size: 16px;
550
+ font-weight: normal;
551
+ line-height: normal;
552
+ letter-spacing: 0em;
553
+ font-feature-settings: "kern" on;
554
+ }
555
+
556
+ /* 自定义分页按钮样式 */
557
+ :deep(.pagination-extras .ant-btn) {
558
+ font-family: 'Source Han Sans', sans-serif;
559
+ font-size: 16px;
560
+ font-weight: normal;
561
+ line-height: normal;
562
+ letter-spacing: 0em;
563
+ font-feature-settings: "kern" on;
564
+ color: #5D5C5C;
565
+ border-radius: 4px;
566
+ border: 1px solid #D8D8D8;
567
+ background: #FFFFFF;
568
+ box-sizing: border-box;
569
+ margin-right: 8px;
570
+ }
571
+
572
+ :deep(.pagination-extras .ant-btn:last-child) {
573
+ margin-right: 0;
574
+ }
575
+
576
+ /* 直达首页末页按钮样式 */
577
+ :deep(.pagination-extras .ant-btn[icon="vertical-left"]),
578
+ :deep(.pagination-extras .ant-btn[icon="vertical-right"]) {
579
+ position: absolute;
580
+ left: 24px;
581
+ top: 24px;
582
+ width: 24px;
583
+ height: 24px;
584
+ transform: rotate(180deg);
585
+ border-radius: 4px;
586
+ opacity: 1;
587
+ background: #FFFFFF;
588
+ box-sizing: border-box;
589
+ border: 1px solid #D8D8D8;
590
+ }
591
+
592
+ /* 上一页下一页按钮样式 */
593
+ :deep(.ant-pagination .ant-pagination-prev),
594
+ :deep(.ant-pagination .ant-pagination-next) {
595
+ width: 24px;
596
+ height: 24px;
597
+ line-height: 24px;
598
+ border-radius: 4px;
599
+ opacity: 1;
600
+ background: #FFFFFF;
601
+ box-sizing: border-box;
602
+ border: 1px solid #D8D8D8;
603
+ }
604
+
605
+ /* 页码选择按钮样式 */
606
+ :deep(.ant-pagination .ant-pagination-item) {
607
+ width: 36px;
608
+ height: 24px;
609
+ border-radius: 4px;
610
+ border: 1px solid #D8D8D8;
611
+ background: #FFFFFF;
612
+ box-sizing: border-box;
613
+ font-family: 'Source Han Sans', sans-serif;
614
+ font-size: 16px;
615
+ font-weight: normal;
616
+ line-height: normal;
617
+ letter-spacing: 0em;
618
+ font-feature-settings: "kern" on;
619
+ color: #5D5C5C;
620
+ margin-right: 8px;
621
+ }
622
+
623
+ :deep(.ant-pagination .ant-pagination-item:last-child) {
624
+ margin-right: 0;
625
+ }
626
+
627
+ /* 当前页码样式 */
628
+ :deep(.ant-pagination .ant-pagination-item-active) {
629
+ background: #0057FE !important;
630
+ border: 1px solid #1890ff;
631
+ color: #FFFFFF !important;
632
+ }
633
+
634
+ /* 确保选中页码文字颜色生效 */
635
+ :deep(.ant-pagination .ant-pagination-item-active a) {
636
+ color: #FFFFFF !important;
637
+ }
638
+
639
+ /* 禁用状态样式 */
640
+ :deep(.pagination-extras .ant-btn:disabled) {
641
+ opacity: 0.5;
642
+ cursor: not-allowed;
643
+ }
644
+
645
+ /* 移除所有可能导致截断的固定高度 */
646
+ :deep(.ant-collapse-item) .ant-collapse-content .ant-collapse-content-box > * {
647
+ max-height: none !important; /* 移除可能的最大高度限制 */
648
+ height: auto !important; /* 使用自动高度 */
649
+ }
650
+
651
+ // 基于根容器类进行样式整合:x-collapse-wrapper.xcollapse-style1
652
+ .x-collapse-wrapper {
653
+ // 检查结果样式
654
+ &.xcollapse-check-result {
655
+ height: auto; /* 允许根据内容自适应高度,避免滚动被限制 */
656
+ min-height: 600px;
657
+ // 让每个面板成为独立卡片:去掉 antd 默认的分隔线,增加间距与圆角
658
+ :deep(.ant-collapse) {
659
+ background: transparent;
660
+ border: 0;
661
+ }
662
+
663
+ :deep(.ant-collapse > .ant-collapse-item) {
664
+ width: 562px;
665
+ min-height: auto;
666
+ height: auto;
667
+ margin-bottom:10px;
668
+ background: #FFFFFF; // 独立白底
669
+ box-sizing: border-box;
670
+ border: 1px solid #E5E9F0; // 每个面板自身边框
671
+ }
672
+
673
+ :deep(.ant-collapse > .ant-collapse-item:first-child) { margin-top: 0; }
674
+ :deep(.ant-collapse > .ant-collapse-item:last-child) { margin-bottom: 0; }
675
+
676
+ :deep(.ant-collapse-content > .ant-collapse-content-box) {
677
+ background: #FFFFFF;
678
+ padding: 0px !important;
679
+ }
680
+
681
+ // 表头:恢复合适的上下内边距,去掉顶部额外空白
682
+ :deep(.ant-collapse-header) {
683
+ background: #FFFFFF;
684
+ padding: 0px 0px !important;
685
+ height: 39px !important;
686
+ border-bottom: none !important; // 移除标题处下边线,避免与外边框连为一体
687
+ border: 1px solid #E5E9F0; // 每个面板自身边框
688
+ }
689
+
690
+ /* 将右侧留白转移到标题与第一项之间 */
691
+ .header-content { padding-right: 0px; gap: 5px; }
692
+ .header-content .info-item:first-of-type { margin-left: 24px !important; }
693
+ .header-content .time-item:first-of-type { margin-left: 24px !important; }
694
+
695
+ .info-item {
696
+ height: 20px;
697
+ opacity: 1;
698
+ font-family: "Source Han Sans";
699
+ font-size: 14px;
700
+ font-weight: 400;
701
+ line-height: 20px;
702
+ text-align: right;
703
+ letter-spacing: 0em;
704
+ font-feature-settings: "kern" on;
705
+ color: #313131 !important;
706
+ }
707
+
708
+ .header-text {
709
+ height: 23px;
710
+ opacity: 1;
711
+ font-family: "Source Han Sans";
712
+ font-size: 16px;
713
+ font-weight: 700;
714
+ line-height: 23px;
715
+ letter-spacing: 0em;
716
+ padding-right: 40px;
717
+ font-feature-settings: "kern" on;
718
+ color: #313131 !important;
719
+ }
720
+ }
721
+ // 历史病历样式
722
+ &.xcollapse-style1 {
723
+ height: auto; /* 允许根据内容自适应高度,避免滚动被限制 */
724
+ min-height: 600px;
725
+ .header-text {
726
+ font-family: "Source Han Sans";
727
+ font-size: 16px;
728
+ font-weight: 700;
729
+ line-height: 23px;
730
+ letter-spacing: 0em;
731
+ color: #313131;
732
+ margin-top: 8px;
733
+ margin-bottom: 8px;
734
+ margin-right: 0 !important;
735
+ }
736
+
737
+ .info-item {
738
+ font-family: "Source Han Sans";
739
+ font-size: 16px;
740
+ font-weight: 700;
741
+ line-height: 23px;
742
+ text-align: right;
743
+ color: #313131;
744
+ margin-top: 9px;
745
+ margin-bottom: 7px;
746
+ margin-left: 28.14px;
747
+ letter-spacing: 0em
748
+ }
749
+
750
+ .time-item {
751
+ font-family: "Source Han Sans";
752
+ font-size: 16px;
753
+ font-weight: 400;
754
+ line-height: 23px;
755
+ text-align: right;
756
+ margin-top: 9px;
757
+ margin-bottom: 7px;
758
+ color: #313131;
759
+ letter-spacing: 0em;
760
+ }
761
+
762
+ // 让每个面板成为独立卡片:去掉 antd 默认的分隔线,增加间距与圆角
763
+ :deep(.ant-collapse) {
764
+ background: transparent;
765
+ border: 0;
766
+ }
767
+
768
+ :deep(.ant-collapse > .ant-collapse-item) {
769
+ width: 562px;
770
+ min-height: auto;
771
+ height: auto;
772
+ margin-bottom:10px;
773
+ background: #FFFFFF; // 独立白底
774
+ box-sizing: border-box;
775
+ border: 1px solid #E5E9F0; // 每个面板自身边框
776
+ }
777
+
778
+ :deep(.ant-collapse > .ant-collapse-item:first-child) { margin-top: 0; }
779
+ :deep(.ant-collapse > .ant-collapse-item:last-child) { margin-bottom: 0; }
780
+
781
+ :deep(.ant-collapse-content > .ant-collapse-content-box) {
782
+ background: #FFFFFF;
783
+ padding: 0px !important;
784
+ }
785
+
786
+ // 表头:恢复合适的上下内边距,去掉顶部额外空白
787
+ :deep(.ant-collapse-header) {
788
+ background: #FFFFFF;
789
+ padding: 0px 0px !important;
790
+ height: 41px !important;
791
+ border-bottom: none !important; // 移除标题处下边线,避免与外边框连为一体
792
+ border: 1px solid #E5E9F0; // 每个面板自身边框
793
+ }
794
+ }
795
+
796
+ // 医学词条样式
797
+ &.xcollapse-medical-entry {
798
+ height: auto;
799
+ min-height: 600px;
800
+ :deep(.ant-collapse) { background: transparent; border: 0; }
801
+ :deep(.ant-collapse > .ant-collapse-item) {
802
+ width: 564px;
803
+ min-height: auto;
804
+ height: auto;
805
+ margin-bottom: 14px;
806
+ background: #FFFFFF;
807
+ box-sizing: border-box;
808
+ border: 1px solid #E5E9F0;
809
+ }
810
+ :deep(.ant-collapse > .ant-collapse-item:first-child) { margin-top: 0; }
811
+ :deep(.ant-collapse > .ant-collapse-item:last-child) { margin-bottom: 0; }
812
+ :deep(.ant-collapse-content > .ant-collapse-content-box) { background: #FFFFFF; padding: 0px !important; }
813
+ :deep(.ant-collapse-header) {
814
+ background: #FFFFFF;
815
+ padding: 0px 0px !important;
816
+ height: 39px !important;
817
+ border-bottom: none !important;
818
+ border: 1px solid #E5E9F0;
819
+ }
820
+ .header-text {
821
+ font-family: "Source Han Sans";
822
+ font-size: 16px;
823
+ font-weight: 700;
824
+ line-height: 23px;
825
+ letter-spacing: 0em;
826
+ color: #313131;
827
+ margin-top: 7px;
828
+ margin-bottom: 7px;
829
+ margin-right: 0 !important;
830
+ }
831
+ }
832
+ }
833
+ </style>