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,705 +1,705 @@
1
- <template>
2
- <div>
3
- <div v-show="ready">
4
- <a-row v-if="this.readonly" class="editor-action-container" type="flex" justify="space-between">
5
- <a-col class="editor-tools">
6
- <a-space>
7
- <template v-if="resList.length > 0">
8
- <a-select
9
- style="width: 200px"
10
- v-model="toggleResId"
11
- placeholder="请选择文档"
12
- show-search
13
- @change="changeRes"
14
- >
15
- <a-select-option v-for="item of resListCp" :key="item.value" :value="item.value">{{ item.label }}</a-select-option>
16
- </a-select>
17
- <!-- <template v-if="this.modeType !== 'readonly' && this.resId !== -1">-->
18
- <!-- <a-button icon="plus" @click="addRes"/>-->
19
- <!-- </template>-->
20
- </template>
21
- <a-radio-group
22
- class="custom-radio-group"
23
- v-show="showModeChoose"
24
- button-style="solid"
25
- @change="changeMode"
26
- v-model="modeType">
27
- <a-radio-button v-for="item of modeList" :key="item.value" :value="item.value">
28
- {{ item.label }}
29
- </a-radio-button>
30
- </a-radio-group>
31
- </a-space>
32
- </a-col>
33
- <a-col class="editor-action-button">
34
- <a-space>
35
- <template v-if="this.modeType !== 'readonly'">
36
- <!-- <a-button-->
37
- <!-- type="primary"-->
38
- <!-- v-if = "userTemplateVisible"-->
39
- <!-- @click="useTemplateData"-->
40
- <!-- >-->
41
- <!-- 使用-->
42
- <!-- </a-button>-->
43
- <a-button type="primary" @click="Recording" v-if="canRecord" v-model="recording">
44
- {{ recording? '停止' : '录音' }}
45
- </a-button>
46
- <a-button type="primary" @click="openRenameModal" v-if="this.resId !== -1">
47
- 重命名
48
- </a-button>
49
- <!-- 组合按钮容器 -->
50
- <div class="save-btn-main">
51
- <!-- 保存按钮 (左侧) -->
52
- <a-button
53
- type="primary"
54
- class="save-btn-main"
55
- @click="showSaveModal('normal')"
56
- >
57
- 保存
58
- </a-button>
59
-
60
- <!-- 下拉部分 (右侧) -->
61
- <!-- 下拉触发部分 -->
62
- <template v-if="modeType !== 'design'">
63
- <a-dropdown
64
- :trigger="['click']"
65
- placement="bottomRight">
66
- <a-button
67
- type="primary"
68
- class="dropdown-trigger-btn">
69
- <a-icon type="down" />
70
- </a-button>
71
- <a-menu slot="overlay">
72
- <a-menu-item @click="showSaveModal('template')">
73
- 保存并作为模板
74
- </a-menu-item>
75
- </a-menu>
76
- </a-dropdown>
77
- </template>
78
- </div>
79
- <a-modal
80
- title="保存"
81
- :visible="saveVisible"
82
- :confirm-loading="false"
83
- @ok="handleSaveConfirm"
84
- @cancel="saveVisible = false"
85
- >
86
- <a-form-item label="文件名" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
87
- <a-input
88
- v-model="fileName"
89
- placeholder="请输入文件名"
90
- @pressEnter="handleSaveConfirm"
91
- />
92
- </a-form-item>
93
- </a-modal>
94
- </template>
95
- <a-button type="primary" @click="print">
96
- 打印
97
- </a-button>
98
- <a-button @click="refresh">
99
- 刷新
100
- </a-button>
101
- </a-space>
102
- <a-dropdown>
103
- <a-menu slot="overlay" @click="handleExportMenuClick">
104
- <a-menu-item key="exportPdf">导出为Pdf</a-menu-item>
105
- <a-menu-item key="exportWord">导出为Word</a-menu-item>
106
- <a-menu-item key="exportHtmlWithStyle">导出为Html</a-menu-item>
107
- </a-menu>
108
- <a-button style="margin-left: 8px"> 导出 <a-icon type="down" /> </a-button>
109
- </a-dropdown>
110
- </a-col>
111
- </a-row>
112
- <a-divider/>
113
- <a-spin tip="加载中,马上好" :spinning="loading">
114
- <iframe
115
- id="x-editor"
116
- src="/his/editor/editor.html"
117
- v-bind="objectOfAttrs"
118
- @load="onload"
119
- style="height: calc(-200px - 3rem + 100vh);">
120
- </iframe>
121
- </a-spin>
122
- </div>
123
- <div v-show="!ready">
124
- <a-empty description="请选择文书" />
125
- </div>
126
- <a-modal
127
- :destroyOnClose="true"
128
- :title="this.resDataModalMode === 'modify' ? '修改文档' : '新建文档'"
129
- :visible="resDataModalVisible"
130
- okText="提交"
131
- @cancel="resDataModalVisible = false"
132
- @ok="onSubmit">
133
- <a-form-model ref="resModifyForm" :model="modifyResModel" :rules="resRules">
134
- <a-form-model-item prop="f_file_name" label="文档名">
135
- <a-input v-model="modifyResModel.f_file_name" placeholder="请输入文档名"/>
136
- </a-form-model-item>
137
- </a-form-model>
138
- </a-modal></div>
139
- </template>
140
-
141
- <script>
142
-
143
- import { runLogic } from '@vue2-client/services/api/common'
144
- import { initDiagnosisDropdown } from './diagnosisAutocomplete'
145
-
146
- export default {
147
- name: 'XHisEditor',
148
- computed: {
149
- resListCp () {
150
- const list = this.resList
151
- if (this.resId === -1) {
152
- list.push({
153
- label: '未保存文档*', value: -1
154
- })
155
- }
156
- return list
157
- }
158
- },
159
- data () {
160
- return {
161
- temporaryParameter: {},
162
- canRecord: false,
163
- recording: false, // 是否正在录音
164
- readonly: false,
165
- ready: false,
166
- loading: false,
167
- resDataModalMode: 'modify',
168
- resDataModalVisible: false,
169
- saveVisible: false,
170
- // 使用按钮显隐控制
171
- // userTemplateVisible: false,
172
- objectOfAttrs: {
173
- width: '100%',
174
- height: '650vh',
175
- frameborder: 0
176
- },
177
- // 数据模式
178
- modeType: 'form',
179
- // 是否显示模式切换功能
180
- showModeChoose: true,
181
- // 是否作为模板 1 是,0 否
182
- isTemplate: 0,
183
- // 模板id
184
- templateId: undefined,
185
- admissionId: undefined,
186
- // 保存类型
187
- saveType: 'normal',
188
- fileName: '',
189
- // 数据模式列表
190
- modeList: [
191
- {
192
- label: '预览',
193
- value: 'readonly'
194
- },
195
- {
196
- label: '表单',
197
- value: 'form'
198
- },
199
- {
200
- label: '设计',
201
- value: 'design'
202
- }
203
- ],
204
- // 编辑器实例
205
- editorRef: null,
206
- // 文档资源列表
207
- resList: [],
208
- // 文档资源ID
209
- resId: undefined,
210
- // 文档链接
211
- fileUrl: undefined,
212
- // 文档绑定数据
213
- bindObject: undefined,
214
- // 合并模板数据后文档数据
215
- assignBindObject: undefined,
216
- // 数据模式 template:模板编辑;data:数据编辑
217
- dataMode: undefined,
218
- // 保存数据调用的Logic名称
219
- saveDataLogicName: undefined,
220
- // 保存数据调用Logic传入的额外参数
221
- logicExtraParams: undefined,
222
- // 服务名
223
- serviceName: undefined,
224
- // 当前文档信息
225
- currResData: {},
226
- // 切换的文档id
227
- toggleResId: undefined,
228
- // 待提交的修改信息
229
- modifyResModel: {},
230
- codeData: {},
231
- resRules: {
232
- f_file_name: [{ required: true, message: '请输入文档名', trigger: 'blur' }],
233
- }
234
- }
235
- },
236
- // 初始化 保存后 加载文件后 诊断选择
237
- emits: ['init', 'saveafter', 'afterLoadFile', 'selected'],
238
- methods: {
239
- runLogic,
240
- /* eslint-disable */
241
- async initDiagnosisAutocomplete (dropDownBoxParams) {
242
- console.log('dropDownBoxParams',dropDownBoxParams)
243
- if (!this.editorRef || !this.editorRef.document) {
244
- return
245
- }
246
-
247
- // 添加参数检查
248
- if (!dropDownBoxParams || !Array.isArray(dropDownBoxParams) || dropDownBoxParams.length === 0) {
249
- return
250
- }
251
-
252
- // 创建一个简单的自定义事件系统
253
- // 1. 创建一个隐藏的DOM元素作为事件通道
254
- const eventChannel = this.editorRef.document.createElement('div');
255
- eventChannel.id = 'diagnosis-event-channel';
256
- eventChannel.style.display = 'none';
257
- this.editorRef.document.body.appendChild(eventChannel);
258
- // 2. 在iframe文档中监听自定义事件
259
- const that = this;
260
- this.editorRef.document.addEventListener('diagnosis-selected', function(e) {
261
- if (e && e.detail) {
262
- that.$emit('selected', { item: e.detail, editor: that.editorRef });
263
- that.codeData = { ...that.codeData, ...{[e.detail.codeKey]: e.detail.code} }
264
- }
265
- });
266
-
267
- for (const param of dropDownBoxParams) {
268
- if (param.identificationCode && param.dataLogic) {
269
- try {
270
- let preliDiagnoData = null
271
- // 保留获取后端数据的逻辑
272
- await runLogic(param.dataLogic,
273
- {}, 'af-his').then(res => {
274
- preliDiagnoData = res
275
- })
276
-
277
- // 创建脚本元素
278
- const scriptElement = this.editorRef.document.createElement('script')
279
-
280
- // 注入自定义事件触发函数和初始化代码
281
- scriptElement.textContent = `
282
- // 定义一个函数来触发自定义事件
283
- function triggerDiagnosisSelected(data) {
284
- const event = new CustomEvent('diagnosis-selected', {
285
- detail: data,
286
- bubbles: true
287
- });
288
- document.dispatchEvent(event);
289
- }
290
-
291
- // 初始化诊断下拉菜单,使用自定义事件触发函数
292
- (${initDiagnosisDropdown.toString()})(
293
- editor,
294
- ${JSON.stringify(preliDiagnoData)},
295
- '${param.identificationCode}',
296
- triggerDiagnosisSelected
297
- );
298
- `;
299
-
300
- this.editorRef.document.body.appendChild(scriptElement);
301
- } catch (error) {
302
- console.error('初始化诊断自动完成失败:', error);
303
- }
304
- }
305
- }
306
- },
307
- showSaveModal (type) {
308
- this.saveType = type // 记录当前保存类型
309
- if (type === 'template') {
310
- this.saveVisible = true
311
- }else {
312
- if (this.resId !== -1 || this.resId !== undefined) {
313
- this.save()
314
- } else {
315
- this.openAddResModal()
316
- }
317
- }
318
-
319
- },
320
- handleSaveConfirm () {
321
- if (!this.fileName.trim()) {
322
- this.$message.error('文件名不能为空')
323
- return
324
- }
325
- this.saveAsTemplate()
326
- },
327
- /* eslint-disable */
328
- // 初始化文档
329
- onload (e) {
330
- if (e && e.target && e.target.contentWindow) {
331
- this.editorRef = e.target.contentWindow.editor
332
- // 等待文档加载完成
333
- this.$emit('init', {})
334
- }
335
- },
336
- init (params, loadResList = true) {
337
- console.log("===============>",params)
338
- this.temporaryParameter = params
339
- this.canRecord = params.canRecord == undefined || params.canRecord == null? false : params.canRecord
340
- const {
341
- fileUrl,
342
- resId,
343
- currResData = {},
344
- bindObject,
345
- saveDataLogicName,
346
- logicExtraParams,
347
- dropDownBoxParams,
348
- serviceName,
349
- showModeChoose = true,
350
- modeType = 'form'
351
- } = params
352
- this.resId = resId
353
- if (bindObject) {
354
- this.dataMode = 'data'
355
- this.bindObject = bindObject
356
- } else {
357
- this.dataMode = 'template'
358
- }
359
- if (logicExtraParams?.admissionId !== undefined && logicExtraParams?.templateId !== undefined) {
360
- this.admissionId = logicExtraParams.admissionId
361
- this.templateId = logicExtraParams.templateId
362
- } else {
363
- console.warn('病例id:admissionId不存在或模板id:templateId不存在')
364
- }
365
- this.saveDataLogicName = saveDataLogicName
366
- this.logicExtraParams = logicExtraParams
367
- this.serviceName = serviceName
368
- this.showModeChoose = showModeChoose
369
- this.modeType = (modeType === "readonly!" ? "readonly" :modeType)
370
- this.readonly = (modeType !== "readonly!")
371
- this.ready = true
372
- // 先加载文件
373
- this.loadFile(fileUrl, bindObject, currResData).then(async () => {
374
- // 文件加载完成后再初始化自动完成
375
- await this.initDiagnosisAutocomplete(dropDownBoxParams)
376
- })
377
- if(loadResList){
378
- this.loadResList()
379
- }
380
- },
381
- // 加载文档
382
- loadFile (fileUrl, bindObject, currResData) {
383
- this.loading = true
384
- return new Promise((resolve) => {
385
- this.editorRef.loadUrl(fileUrl).then(() => {
386
- if (bindObject) {
387
- this.editorRef.setBindObject(bindObject)
388
- if (bindObject.template) {
389
- for (const key of Object.keys(bindObject.template)) {
390
- this.editorRef.bindDataList(key, bindObject.template[key])
391
- }
392
- }
393
- }
394
- // 拿取多于模板中的数据
395
- const diff = this.bindObject? Object.fromEntries(
396
- Object.entries(this.bindObject)
397
- .filter(([key]) => !(key in this.editorRef.getBindObject()))
398
- ) : {}
399
- this.codeData = {...this.codeData,...diff}
400
- this.changeMode()
401
- this.fileUrl = fileUrl
402
- if (!currResData.f_file_name) {
403
- currResData.f_file_name = '未命名'
404
- }
405
- this.currResData = currResData
406
- this.loading = false
407
- this.$emit('afterLoadFile', {})
408
- resolve()
409
- })
410
- })
411
- },
412
- // 保存并作为模板
413
- saveAsTemplate () {
414
- this.isTemplate = 1
415
- this.save()
416
- },
417
- // 加载文档列表
418
- loadResList () {
419
- console.log("getTemplateListLogic=======",this.logicExtraParams)
420
- runLogic('getTemplateListLogic', this.logicExtraParams, this.serviceName).then(res => {
421
- this.resList = res
422
- this.toggleResId = this.resId
423
- })
424
- },
425
- // 修改模式
426
- changeMode (e) {
427
- this.editorRef.execCommand(this.modeType)
428
- },
429
- // 启动录音功能
430
- async Recording () {
431
- this.recording = !this.recording
432
- if (this.recording) {
433
- const recording = await this.$recording.startRecording()
434
- this.$message.warn(recording.msg)
435
- } else {
436
- try {
437
- // 1. 获取录音和接口数据
438
- const recording = this.$recording.stopRecording()
439
- this.$message.warn(recording.msg)
440
- const data = await this.$recording.getRecordingData()
441
- const result = await this.runLogic('communacation', {record_content: data}, 'af-his')
442
- // 验证基础结构
443
- if (!result || typeof result.value !== 'string') {
444
- throw new Error('接口返回格式错误,缺少有效的value字段')
445
- }
446
- // 2. 处理外层JSON字符串(关键修复)
447
- let outerJsonStr = result.value
448
- // 修复1:处理布尔值
449
- outerJsonStr = outerJsonStr.replace(/\bTrue\b/g, 'true')
450
- // 修复2:移除所有控制字符
451
- outerJsonStr = outerJsonStr.replace(/[\x00-\x1F]/g, '')
452
- // 修复3:精准转义data字段内的双引号
453
- // 匹配 "data": "..." 结构并转义内容中的双引号
454
- outerJsonStr = outerJsonStr.replace(/"data":\s*"([^"]*)"/g, (match, content) => {
455
- // 转义内容中的双引号为\"
456
- const escapedContent = content.replace(/"/g, '\\"')
457
- return `"data": "${escapedContent}"`
458
- })
459
- // 直接在整个字符串里匹配 ```json{...}```
460
- const regex = /```json([\s\S]*?)```/
461
- const match = outerJsonStr.match(regex)
462
- let extractedJsonStr = ''
463
- if (match && match[1]) {
464
- extractedJsonStr = match[1].trim()
465
- }
466
- const outerObj = JSON.parse(extractedJsonStr)
467
- console.log("outerObj = ", outerObj)
468
- this.temporaryParameter.bindObject = {...this.temporaryParameter.bindObject, ...outerObj}
469
- this.init(this.temporaryParameter)
470
- } catch (e) {
471
- console.error('总错误:', e.message)
472
- this.$message.error(`解析失败: ${e.message}`)
473
- }
474
- }
475
- },
476
- // 打开文档信息修改面板
477
- openRenameModal () {
478
- this.resDataModalMode = 'modify'
479
- this.modifyResModel = {
480
- f_file_name: this.currResData.f_file_name
481
- }
482
- this.resDataModalVisible = true
483
- },
484
- // 提交文档信息修改
485
- onSubmit () {
486
- this.$refs.resModifyForm.validate(valid => {
487
- if (valid) {
488
- if (this.resDataModalMode === 'modify' && this.modifyResModel.f_file_name === this.currResData.f_file_name) {
489
- this.$message.warn('新文档名不能与原文档名一致!')
490
- return false
491
- }
492
- this.save()
493
- return true
494
- } else {
495
- return false
496
- }
497
- })
498
- },
499
- // 打开文档新建面板
500
- openAddResModal () {
501
- this.resDataModalMode = 'add'
502
- this.modifyResModel = {
503
- f_file_name: undefined
504
- }
505
- this.resDataModalVisible = true
506
- },
507
- // 新建文档
508
- addRes () {
509
- this.$emit('add', {})
510
- // const params = Object.assign({
511
- // isAddForce: true
512
- // }, this.logicExtraParams)
513
- // this.reload(params)
514
- },
515
- // 重新加载
516
- reload (params) {
517
- runLogic('getFileInformation', params , this.serviceName).then(res => {
518
- this.resDataModalVisible = false
519
- this.assignBindObject = this.assignTemplates(this.bindObject, res.bindObject)
520
- this.useTemplateData()
521
- })
522
- },
523
- // 合并模板数据
524
- assignTemplates (newBindObject, templateData) {
525
- // 检查templates数组是否存在
526
- if (!templateData.templates || !Array.isArray(templateData.templates)) {
527
- console.warn('templateData.templates不存在或不是数组')
528
- return newBindObject
529
- }
530
- // 遍历templates数组中的每个属性名
531
- templateData.templates.forEach(propName => {
532
- // 检查templateData是否有该属性
533
- if (propName in templateData) {
534
- // 无论newBindObject是否有该属性,都进行赋值/添加
535
- newBindObject[propName] = templateData[propName]
536
- } else {
537
- console.warn(`templateData中不存在属性: ${propName}`)
538
- }
539
- })
540
- return newBindObject
541
- },
542
- useTemplateData () {
543
- // 确认是否有合并后的模板数据
544
- if (!this.assignBindObject) {
545
- this.$message.warning('没有可用的模板数据');
546
- return;
547
- }
548
- this.editorRef.setBindObject(this.assignBindObject)
549
- // console.log('resId', this.resId)
550
- },
551
- // 切换文档
552
- changeRes (value) {
553
- console.log('value', value)
554
- let params = {
555
- resId: value
556
- }
557
- if (value === -1) {
558
- params = {
559
- ...params,
560
- admissionId: this.admissionId,
561
- f_template_id: this.templateId
562
- }
563
- const that = this
564
- this.$confirm({
565
- title: '确认切换文档吗?',
566
- content: '您有尚未保存的文档,切换文档将丢失所有的修改',
567
- onOk () {
568
- that.reload(params)
569
- // that.userTemplateVisible = true
570
- },
571
- onCancel () {
572
- that.toggleResId = that.resId
573
- },
574
- })
575
- } else {
576
- const selectedItem = this.resListCp.find(item => item.value === value);
577
- console.log('selectedItem=================', selectedItem)
578
- if(selectedItem.templateId != this.templateId){
579
- runLogic('getFileInformation', selectedItem.params.params , this.serviceName).then(res => {
580
- this.init({
581
- modeType: this.modeType,
582
- fileUrl: res.url,
583
- resId: res.id,
584
- currResData: res.currResData,
585
- bindObject: res.bindObject,
586
- saveDataLogicName: params?.saveDataLogicName,
587
- serviceName: this.serviceName,
588
- logicExtraParams: params?.logicExtraParams,
589
- dropDownBoxParams: params?.dropDownBoxParams
590
- }, false)
591
- })
592
- }else{
593
- this.reload({resId: selectedItem.id})
594
- }
595
- }
596
- },
597
- // 保存文档
598
- save () {
599
- // 验证必须输入项
600
- if (this.editorRef.validate()) {
601
- // 获取HTML文档和结构化数据(JSON)
602
- console.log('save',this.editorRef.getBindObject())
603
- const data = {
604
- doc: this.editorRef.getHtml(),
605
- dataObject: {
606
- ...this.editorRef.getBindObject(),
607
- ...this.codeData // 合并 codeData 数据
608
- },
609
- dataMode: this.dataMode,
610
- resId: this.resId,
611
- modifyResModel: this.modifyResModel,
612
- logicExtraParams: this.logicExtraParams,
613
- is_template: this.isTemplate,
614
- f_file_name: this.fileName
615
- }
616
- // 保存HTML文档和结构化数据到后端服务
617
- runLogic(this.saveDataLogicName, data, this.serviceName).then(res => {
618
- this.$message.success('保存成功')
619
- this.changeRes(res.currResData.id)
620
- this.$emit('saveafter', data.dataObject)
621
- }).finally(() => {
622
- this.resDataModalVisible = false
623
- this.saveVisible = false
624
- })
625
- } else {
626
- this.$message.error('请检查未填写的项目')
627
- }
628
- },
629
- // 打印文档
630
- print () {
631
- this.editorRef.execCommand('print')
632
- },
633
- // 关闭编辑器
634
- close () {
635
- this.ready = false
636
- },
637
- // 刷新文档
638
- refresh () {
639
- this.loadFile(this.fileUrl, this.bindObject, this.currResData)
640
- },
641
- // 导出下拉菜单
642
- handleExportMenuClick (e) {
643
- const key = e.key
644
- this.editorRef.execCommand(key)
645
- }
646
- }
647
- }
648
- </script>
649
- <style scoped lang="less">
650
- .editor-action-container {
651
- height: 40px;
652
- }
653
- .editor-action-button {
654
- .ant-btn-primary {
655
- background-color: rgb(0, 87, 254) !important;
656
- }
657
- }
658
- :deep(.ant-divider-horizontal) {
659
- margin: 4px 0;
660
- }
661
- /* 组合按钮容器 - 关键修正 */
662
- .combined-save-btn {
663
- display: inline-flex;
664
- height: 32px;
665
- }
666
-
667
- /* 主保存按钮 - 保持原有样式 */
668
- .save-btn-main {
669
- border-top-right-radius: 0 !important;
670
- border-bottom-right-radius: 0 !important;
671
- border-right: none !important;
672
- height: 32px;
673
- padding: 0 15px;
674
- display: inline-flex;
675
- align-items: center;
676
- justify-content: center;
677
- margin-right: -1px; /* 关键:负边距消除间距 */
678
- }
679
-
680
- /* 下拉按钮 - 仅调整间距 */
681
- .dropdown-trigger-btn {
682
- height: 32px !important;
683
- width: 24px !important;
684
- min-width: 24px !important;
685
- padding: 0 !important;
686
- border-top-left-radius: 0 !important;
687
- border-bottom-left-radius: 0 !important;
688
- border-left: 1px solid rgba(255, 255, 255, 0.3) !important;
689
- display: inline-flex;
690
- align-items: center;
691
- justify-content: center;
692
- margin-left: 0px;
693
- }
694
-
695
- /* 下拉图标保持原样 */
696
- .dropdown-trigger-btn .anticon {
697
- font-size: 12px;
698
- margin: 0 !important;
699
- }
700
- .custom-radio-group {
701
- .ant-radio-button-wrapper-checked {
702
- background-color: rgb(0, 87, 254) !important;
703
- }
704
- }
705
- </style>
1
+ <template>
2
+ <div>
3
+ <div v-show="ready">
4
+ <a-row v-if="this.readonly" class="editor-action-container" type="flex" justify="space-between">
5
+ <a-col class="editor-tools">
6
+ <a-space>
7
+ <template v-if="resList.length > 0">
8
+ <a-select
9
+ style="width: 200px"
10
+ v-model="toggleResId"
11
+ placeholder="请选择文档"
12
+ show-search
13
+ @change="changeRes"
14
+ >
15
+ <a-select-option v-for="item of resListCp" :key="item.value" :value="item.value">{{ item.label }}</a-select-option>
16
+ </a-select>
17
+ <!-- <template v-if="this.modeType !== 'readonly' && this.resId !== -1">-->
18
+ <!-- <a-button icon="plus" @click="addRes"/>-->
19
+ <!-- </template>-->
20
+ </template>
21
+ <a-radio-group
22
+ class="custom-radio-group"
23
+ v-show="showModeChoose"
24
+ button-style="solid"
25
+ @change="changeMode"
26
+ v-model="modeType">
27
+ <a-radio-button v-for="item of modeList" :key="item.value" :value="item.value">
28
+ {{ item.label }}
29
+ </a-radio-button>
30
+ </a-radio-group>
31
+ </a-space>
32
+ </a-col>
33
+ <a-col class="editor-action-button">
34
+ <a-space>
35
+ <template v-if="this.modeType !== 'readonly'">
36
+ <!-- <a-button-->
37
+ <!-- type="primary"-->
38
+ <!-- v-if = "userTemplateVisible"-->
39
+ <!-- @click="useTemplateData"-->
40
+ <!-- >-->
41
+ <!-- 使用-->
42
+ <!-- </a-button>-->
43
+ <a-button type="primary" @click="Recording" v-if="canRecord" v-model="recording">
44
+ {{ recording? '停止' : '录音' }}
45
+ </a-button>
46
+ <a-button type="primary" @click="openRenameModal" v-if="this.resId !== -1">
47
+ 重命名
48
+ </a-button>
49
+ <!-- 组合按钮容器 -->
50
+ <div class="save-btn-main">
51
+ <!-- 保存按钮 (左侧) -->
52
+ <a-button
53
+ type="primary"
54
+ class="save-btn-main"
55
+ @click="showSaveModal('normal')"
56
+ >
57
+ 保存
58
+ </a-button>
59
+
60
+ <!-- 下拉部分 (右侧) -->
61
+ <!-- 下拉触发部分 -->
62
+ <template v-if="modeType !== 'design'">
63
+ <a-dropdown
64
+ :trigger="['click']"
65
+ placement="bottomRight">
66
+ <a-button
67
+ type="primary"
68
+ class="dropdown-trigger-btn">
69
+ <a-icon type="down" />
70
+ </a-button>
71
+ <a-menu slot="overlay">
72
+ <a-menu-item @click="showSaveModal('template')">
73
+ 保存并作为模板
74
+ </a-menu-item>
75
+ </a-menu>
76
+ </a-dropdown>
77
+ </template>
78
+ </div>
79
+ <a-modal
80
+ title="保存"
81
+ :visible="saveVisible"
82
+ :confirm-loading="false"
83
+ @ok="handleSaveConfirm"
84
+ @cancel="saveVisible = false"
85
+ >
86
+ <a-form-item label="文件名" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
87
+ <a-input
88
+ v-model="fileName"
89
+ placeholder="请输入文件名"
90
+ @pressEnter="handleSaveConfirm"
91
+ />
92
+ </a-form-item>
93
+ </a-modal>
94
+ </template>
95
+ <a-button type="primary" @click="print">
96
+ 打印
97
+ </a-button>
98
+ <a-button @click="refresh">
99
+ 刷新
100
+ </a-button>
101
+ </a-space>
102
+ <a-dropdown>
103
+ <a-menu slot="overlay" @click="handleExportMenuClick">
104
+ <a-menu-item key="exportPdf">导出为Pdf</a-menu-item>
105
+ <a-menu-item key="exportWord">导出为Word</a-menu-item>
106
+ <a-menu-item key="exportHtmlWithStyle">导出为Html</a-menu-item>
107
+ </a-menu>
108
+ <a-button style="margin-left: 8px"> 导出 <a-icon type="down" /> </a-button>
109
+ </a-dropdown>
110
+ </a-col>
111
+ </a-row>
112
+ <a-divider/>
113
+ <a-spin tip="加载中,马上好" :spinning="loading">
114
+ <iframe
115
+ id="x-editor"
116
+ src="/his/editor/editor.html"
117
+ v-bind="objectOfAttrs"
118
+ @load="onload"
119
+ style="height: calc(-200px - 3rem + 100vh);">
120
+ </iframe>
121
+ </a-spin>
122
+ </div>
123
+ <div v-show="!ready">
124
+ <a-empty description="请选择文书" />
125
+ </div>
126
+ <a-modal
127
+ :destroyOnClose="true"
128
+ :title="this.resDataModalMode === 'modify' ? '修改文档' : '新建文档'"
129
+ :visible="resDataModalVisible"
130
+ okText="提交"
131
+ @cancel="resDataModalVisible = false"
132
+ @ok="onSubmit">
133
+ <a-form-model ref="resModifyForm" :model="modifyResModel" :rules="resRules">
134
+ <a-form-model-item prop="f_file_name" label="文档名">
135
+ <a-input v-model="modifyResModel.f_file_name" placeholder="请输入文档名"/>
136
+ </a-form-model-item>
137
+ </a-form-model>
138
+ </a-modal></div>
139
+ </template>
140
+
141
+ <script>
142
+
143
+ import { runLogic } from '@vue2-client/services/api/common'
144
+ import { initDiagnosisDropdown } from './diagnosisAutocomplete'
145
+
146
+ export default {
147
+ name: 'XHisEditor',
148
+ computed: {
149
+ resListCp () {
150
+ const list = this.resList
151
+ if (this.resId === -1) {
152
+ list.push({
153
+ label: '未保存文档*', value: -1
154
+ })
155
+ }
156
+ return list
157
+ }
158
+ },
159
+ data () {
160
+ return {
161
+ temporaryParameter: {},
162
+ canRecord: false,
163
+ recording: false, // 是否正在录音
164
+ readonly: false,
165
+ ready: false,
166
+ loading: false,
167
+ resDataModalMode: 'modify',
168
+ resDataModalVisible: false,
169
+ saveVisible: false,
170
+ // 使用按钮显隐控制
171
+ // userTemplateVisible: false,
172
+ objectOfAttrs: {
173
+ width: '100%',
174
+ height: '650vh',
175
+ frameborder: 0
176
+ },
177
+ // 数据模式
178
+ modeType: 'form',
179
+ // 是否显示模式切换功能
180
+ showModeChoose: true,
181
+ // 是否作为模板 1 是,0 否
182
+ isTemplate: 0,
183
+ // 模板id
184
+ templateId: undefined,
185
+ admissionId: undefined,
186
+ // 保存类型
187
+ saveType: 'normal',
188
+ fileName: '',
189
+ // 数据模式列表
190
+ modeList: [
191
+ {
192
+ label: '预览',
193
+ value: 'readonly'
194
+ },
195
+ {
196
+ label: '表单',
197
+ value: 'form'
198
+ },
199
+ {
200
+ label: '设计',
201
+ value: 'design'
202
+ }
203
+ ],
204
+ // 编辑器实例
205
+ editorRef: null,
206
+ // 文档资源列表
207
+ resList: [],
208
+ // 文档资源ID
209
+ resId: undefined,
210
+ // 文档链接
211
+ fileUrl: undefined,
212
+ // 文档绑定数据
213
+ bindObject: undefined,
214
+ // 合并模板数据后文档数据
215
+ assignBindObject: undefined,
216
+ // 数据模式 template:模板编辑;data:数据编辑
217
+ dataMode: undefined,
218
+ // 保存数据调用的Logic名称
219
+ saveDataLogicName: undefined,
220
+ // 保存数据调用Logic传入的额外参数
221
+ logicExtraParams: undefined,
222
+ // 服务名
223
+ serviceName: undefined,
224
+ // 当前文档信息
225
+ currResData: {},
226
+ // 切换的文档id
227
+ toggleResId: undefined,
228
+ // 待提交的修改信息
229
+ modifyResModel: {},
230
+ codeData: {},
231
+ resRules: {
232
+ f_file_name: [{ required: true, message: '请输入文档名', trigger: 'blur' }],
233
+ }
234
+ }
235
+ },
236
+ // 初始化 保存后 加载文件后 诊断选择
237
+ emits: ['init', 'saveafter', 'afterLoadFile', 'selected'],
238
+ methods: {
239
+ runLogic,
240
+ /* eslint-disable */
241
+ async initDiagnosisAutocomplete (dropDownBoxParams) {
242
+ console.log('dropDownBoxParams',dropDownBoxParams)
243
+ if (!this.editorRef || !this.editorRef.document) {
244
+ return
245
+ }
246
+
247
+ // 添加参数检查
248
+ if (!dropDownBoxParams || !Array.isArray(dropDownBoxParams) || dropDownBoxParams.length === 0) {
249
+ return
250
+ }
251
+
252
+ // 创建一个简单的自定义事件系统
253
+ // 1. 创建一个隐藏的DOM元素作为事件通道
254
+ const eventChannel = this.editorRef.document.createElement('div');
255
+ eventChannel.id = 'diagnosis-event-channel';
256
+ eventChannel.style.display = 'none';
257
+ this.editorRef.document.body.appendChild(eventChannel);
258
+ // 2. 在iframe文档中监听自定义事件
259
+ const that = this;
260
+ this.editorRef.document.addEventListener('diagnosis-selected', function(e) {
261
+ if (e && e.detail) {
262
+ that.$emit('selected', { item: e.detail, editor: that.editorRef });
263
+ that.codeData = { ...that.codeData, ...{[e.detail.codeKey]: e.detail.code} }
264
+ }
265
+ });
266
+
267
+ for (const param of dropDownBoxParams) {
268
+ if (param.identificationCode && param.dataLogic) {
269
+ try {
270
+ let preliDiagnoData = null
271
+ // 保留获取后端数据的逻辑
272
+ await runLogic(param.dataLogic,
273
+ {}, 'af-his').then(res => {
274
+ preliDiagnoData = res
275
+ })
276
+
277
+ // 创建脚本元素
278
+ const scriptElement = this.editorRef.document.createElement('script')
279
+
280
+ // 注入自定义事件触发函数和初始化代码
281
+ scriptElement.textContent = `
282
+ // 定义一个函数来触发自定义事件
283
+ function triggerDiagnosisSelected(data) {
284
+ const event = new CustomEvent('diagnosis-selected', {
285
+ detail: data,
286
+ bubbles: true
287
+ });
288
+ document.dispatchEvent(event);
289
+ }
290
+
291
+ // 初始化诊断下拉菜单,使用自定义事件触发函数
292
+ (${initDiagnosisDropdown.toString()})(
293
+ editor,
294
+ ${JSON.stringify(preliDiagnoData)},
295
+ '${param.identificationCode}',
296
+ triggerDiagnosisSelected
297
+ );
298
+ `;
299
+
300
+ this.editorRef.document.body.appendChild(scriptElement);
301
+ } catch (error) {
302
+ console.error('初始化诊断自动完成失败:', error);
303
+ }
304
+ }
305
+ }
306
+ },
307
+ showSaveModal (type) {
308
+ this.saveType = type // 记录当前保存类型
309
+ if (type === 'template') {
310
+ this.saveVisible = true
311
+ }else {
312
+ if (this.resId !== -1 || this.resId !== undefined) {
313
+ this.save()
314
+ } else {
315
+ this.openAddResModal()
316
+ }
317
+ }
318
+
319
+ },
320
+ handleSaveConfirm () {
321
+ if (!this.fileName.trim()) {
322
+ this.$message.error('文件名不能为空')
323
+ return
324
+ }
325
+ this.saveAsTemplate()
326
+ },
327
+ /* eslint-disable */
328
+ // 初始化文档
329
+ onload (e) {
330
+ if (e && e.target && e.target.contentWindow) {
331
+ this.editorRef = e.target.contentWindow.editor
332
+ // 等待文档加载完成
333
+ this.$emit('init', {})
334
+ }
335
+ },
336
+ init (params, loadResList = true) {
337
+ console.log("===============>",params)
338
+ this.temporaryParameter = params
339
+ this.canRecord = params.canRecord == undefined || params.canRecord == null? false : params.canRecord
340
+ const {
341
+ fileUrl,
342
+ resId,
343
+ currResData = {},
344
+ bindObject,
345
+ saveDataLogicName,
346
+ logicExtraParams,
347
+ dropDownBoxParams,
348
+ serviceName,
349
+ showModeChoose = true,
350
+ modeType = 'form'
351
+ } = params
352
+ this.resId = resId
353
+ if (bindObject) {
354
+ this.dataMode = 'data'
355
+ this.bindObject = bindObject
356
+ } else {
357
+ this.dataMode = 'template'
358
+ }
359
+ if (logicExtraParams?.admissionId !== undefined && logicExtraParams?.templateId !== undefined) {
360
+ this.admissionId = logicExtraParams.admissionId
361
+ this.templateId = logicExtraParams.templateId
362
+ } else {
363
+ console.warn('病例id:admissionId不存在或模板id:templateId不存在')
364
+ }
365
+ this.saveDataLogicName = saveDataLogicName
366
+ this.logicExtraParams = logicExtraParams
367
+ this.serviceName = serviceName
368
+ this.showModeChoose = showModeChoose
369
+ this.modeType = (modeType === "readonly!" ? "readonly" :modeType)
370
+ this.readonly = (modeType !== "readonly!")
371
+ this.ready = true
372
+ // 先加载文件
373
+ this.loadFile(fileUrl, bindObject, currResData).then(async () => {
374
+ // 文件加载完成后再初始化自动完成
375
+ await this.initDiagnosisAutocomplete(dropDownBoxParams)
376
+ })
377
+ if(loadResList){
378
+ this.loadResList()
379
+ }
380
+ },
381
+ // 加载文档
382
+ loadFile (fileUrl, bindObject, currResData) {
383
+ this.loading = true
384
+ return new Promise((resolve) => {
385
+ this.editorRef.loadUrl(fileUrl).then(() => {
386
+ if (bindObject) {
387
+ this.editorRef.setBindObject(bindObject)
388
+ if (bindObject.template) {
389
+ for (const key of Object.keys(bindObject.template)) {
390
+ this.editorRef.bindDataList(key, bindObject.template[key])
391
+ }
392
+ }
393
+ }
394
+ // 拿取多于模板中的数据
395
+ const diff = this.bindObject? Object.fromEntries(
396
+ Object.entries(this.bindObject)
397
+ .filter(([key]) => !(key in this.editorRef.getBindObject()))
398
+ ) : {}
399
+ this.codeData = {...this.codeData,...diff}
400
+ this.changeMode()
401
+ this.fileUrl = fileUrl
402
+ if (!currResData.f_file_name) {
403
+ currResData.f_file_name = '未命名'
404
+ }
405
+ this.currResData = currResData
406
+ this.loading = false
407
+ this.$emit('afterLoadFile', {})
408
+ resolve()
409
+ })
410
+ })
411
+ },
412
+ // 保存并作为模板
413
+ saveAsTemplate () {
414
+ this.isTemplate = 1
415
+ this.save()
416
+ },
417
+ // 加载文档列表
418
+ loadResList () {
419
+ console.log("getTemplateListLogic=======",this.logicExtraParams)
420
+ runLogic('getTemplateListLogic', this.logicExtraParams, this.serviceName).then(res => {
421
+ this.resList = res
422
+ this.toggleResId = this.resId
423
+ })
424
+ },
425
+ // 修改模式
426
+ changeMode (e) {
427
+ this.editorRef.execCommand(this.modeType)
428
+ },
429
+ // 启动录音功能
430
+ async Recording () {
431
+ this.recording = !this.recording
432
+ if (this.recording) {
433
+ const recording = await this.$recording.startRecording()
434
+ this.$message.warn(recording.msg)
435
+ } else {
436
+ try {
437
+ // 1. 获取录音和接口数据
438
+ const recording = this.$recording.stopRecording()
439
+ this.$message.warn(recording.msg)
440
+ const data = await this.$recording.getRecordingData()
441
+ const result = await this.runLogic('communacation', {record_content: data}, 'af-his')
442
+ // 验证基础结构
443
+ if (!result || typeof result.value !== 'string') {
444
+ throw new Error('接口返回格式错误,缺少有效的value字段')
445
+ }
446
+ // 2. 处理外层JSON字符串(关键修复)
447
+ let outerJsonStr = result.value
448
+ // 修复1:处理布尔值
449
+ outerJsonStr = outerJsonStr.replace(/\bTrue\b/g, 'true')
450
+ // 修复2:移除所有控制字符
451
+ outerJsonStr = outerJsonStr.replace(/[\x00-\x1F]/g, '')
452
+ // 修复3:精准转义data字段内的双引号
453
+ // 匹配 "data": "..." 结构并转义内容中的双引号
454
+ outerJsonStr = outerJsonStr.replace(/"data":\s*"([^"]*)"/g, (match, content) => {
455
+ // 转义内容中的双引号为\"
456
+ const escapedContent = content.replace(/"/g, '\\"')
457
+ return `"data": "${escapedContent}"`
458
+ })
459
+ // 直接在整个字符串里匹配 ```json{...}```
460
+ const regex = /```json([\s\S]*?)```/
461
+ const match = outerJsonStr.match(regex)
462
+ let extractedJsonStr = ''
463
+ if (match && match[1]) {
464
+ extractedJsonStr = match[1].trim()
465
+ }
466
+ const outerObj = JSON.parse(extractedJsonStr)
467
+ console.log("outerObj = ", outerObj)
468
+ this.temporaryParameter.bindObject = {...this.temporaryParameter.bindObject, ...outerObj}
469
+ this.init(this.temporaryParameter)
470
+ } catch (e) {
471
+ console.error('总错误:', e.message)
472
+ this.$message.error(`解析失败: ${e.message}`)
473
+ }
474
+ }
475
+ },
476
+ // 打开文档信息修改面板
477
+ openRenameModal () {
478
+ this.resDataModalMode = 'modify'
479
+ this.modifyResModel = {
480
+ f_file_name: this.currResData.f_file_name
481
+ }
482
+ this.resDataModalVisible = true
483
+ },
484
+ // 提交文档信息修改
485
+ onSubmit () {
486
+ this.$refs.resModifyForm.validate(valid => {
487
+ if (valid) {
488
+ if (this.resDataModalMode === 'modify' && this.modifyResModel.f_file_name === this.currResData.f_file_name) {
489
+ this.$message.warn('新文档名不能与原文档名一致!')
490
+ return false
491
+ }
492
+ this.save()
493
+ return true
494
+ } else {
495
+ return false
496
+ }
497
+ })
498
+ },
499
+ // 打开文档新建面板
500
+ openAddResModal () {
501
+ this.resDataModalMode = 'add'
502
+ this.modifyResModel = {
503
+ f_file_name: undefined
504
+ }
505
+ this.resDataModalVisible = true
506
+ },
507
+ // 新建文档
508
+ addRes () {
509
+ this.$emit('add', {})
510
+ // const params = Object.assign({
511
+ // isAddForce: true
512
+ // }, this.logicExtraParams)
513
+ // this.reload(params)
514
+ },
515
+ // 重新加载
516
+ reload (params) {
517
+ runLogic('getFileInformation', params , this.serviceName).then(res => {
518
+ this.resDataModalVisible = false
519
+ this.assignBindObject = this.assignTemplates(this.bindObject, res.bindObject)
520
+ this.useTemplateData()
521
+ })
522
+ },
523
+ // 合并模板数据
524
+ assignTemplates (newBindObject, templateData) {
525
+ // 检查templates数组是否存在
526
+ if (!templateData.templates || !Array.isArray(templateData.templates)) {
527
+ console.warn('templateData.templates不存在或不是数组')
528
+ return newBindObject
529
+ }
530
+ // 遍历templates数组中的每个属性名
531
+ templateData.templates.forEach(propName => {
532
+ // 检查templateData是否有该属性
533
+ if (propName in templateData) {
534
+ // 无论newBindObject是否有该属性,都进行赋值/添加
535
+ newBindObject[propName] = templateData[propName]
536
+ } else {
537
+ console.warn(`templateData中不存在属性: ${propName}`)
538
+ }
539
+ })
540
+ return newBindObject
541
+ },
542
+ useTemplateData () {
543
+ // 确认是否有合并后的模板数据
544
+ if (!this.assignBindObject) {
545
+ this.$message.warning('没有可用的模板数据');
546
+ return;
547
+ }
548
+ this.editorRef.setBindObject(this.assignBindObject)
549
+ // console.log('resId', this.resId)
550
+ },
551
+ // 切换文档
552
+ changeRes (value) {
553
+ console.log('value', value)
554
+ let params = {
555
+ resId: value
556
+ }
557
+ if (value === -1) {
558
+ params = {
559
+ ...params,
560
+ admissionId: this.admissionId,
561
+ f_template_id: this.templateId
562
+ }
563
+ const that = this
564
+ this.$confirm({
565
+ title: '确认切换文档吗?',
566
+ content: '您有尚未保存的文档,切换文档将丢失所有的修改',
567
+ onOk () {
568
+ that.reload(params)
569
+ // that.userTemplateVisible = true
570
+ },
571
+ onCancel () {
572
+ that.toggleResId = that.resId
573
+ },
574
+ })
575
+ } else {
576
+ const selectedItem = this.resListCp.find(item => item.value === value);
577
+ console.log('selectedItem=================', selectedItem)
578
+ if(selectedItem.templateId != this.templateId){
579
+ runLogic('getFileInformation', selectedItem.params.params , this.serviceName).then(res => {
580
+ this.init({
581
+ modeType: this.modeType,
582
+ fileUrl: res.url,
583
+ resId: res.id,
584
+ currResData: res.currResData,
585
+ bindObject: res.bindObject,
586
+ saveDataLogicName: params?.saveDataLogicName,
587
+ serviceName: this.serviceName,
588
+ logicExtraParams: params?.logicExtraParams,
589
+ dropDownBoxParams: params?.dropDownBoxParams
590
+ }, false)
591
+ })
592
+ }else{
593
+ this.reload({resId: selectedItem.id})
594
+ }
595
+ }
596
+ },
597
+ // 保存文档
598
+ save () {
599
+ // 验证必须输入项
600
+ if (this.editorRef.validate()) {
601
+ // 获取HTML文档和结构化数据(JSON)
602
+ console.log('save',this.editorRef.getBindObject())
603
+ const data = {
604
+ doc: this.editorRef.getHtml(),
605
+ dataObject: {
606
+ ...this.editorRef.getBindObject(),
607
+ ...this.codeData // 合并 codeData 数据
608
+ },
609
+ dataMode: this.dataMode,
610
+ resId: this.resId,
611
+ modifyResModel: this.modifyResModel,
612
+ logicExtraParams: this.logicExtraParams,
613
+ is_template: this.isTemplate,
614
+ f_file_name: this.fileName
615
+ }
616
+ // 保存HTML文档和结构化数据到后端服务
617
+ runLogic(this.saveDataLogicName, data, this.serviceName).then(res => {
618
+ this.$message.success('保存成功')
619
+ this.changeRes(res.currResData.id)
620
+ this.$emit('saveafter', data.dataObject)
621
+ }).finally(() => {
622
+ this.resDataModalVisible = false
623
+ this.saveVisible = false
624
+ })
625
+ } else {
626
+ this.$message.error('请检查未填写的项目')
627
+ }
628
+ },
629
+ // 打印文档
630
+ print () {
631
+ this.editorRef.execCommand('print')
632
+ },
633
+ // 关闭编辑器
634
+ close () {
635
+ this.ready = false
636
+ },
637
+ // 刷新文档
638
+ refresh () {
639
+ this.loadFile(this.fileUrl, this.bindObject, this.currResData)
640
+ },
641
+ // 导出下拉菜单
642
+ handleExportMenuClick (e) {
643
+ const key = e.key
644
+ this.editorRef.execCommand(key)
645
+ }
646
+ }
647
+ }
648
+ </script>
649
+ <style scoped lang="less">
650
+ .editor-action-container {
651
+ height: 40px;
652
+ }
653
+ .editor-action-button {
654
+ .ant-btn-primary {
655
+ background-color: rgb(0, 87, 254) !important;
656
+ }
657
+ }
658
+ :deep(.ant-divider-horizontal) {
659
+ margin: 4px 0;
660
+ }
661
+ /* 组合按钮容器 - 关键修正 */
662
+ .combined-save-btn {
663
+ display: inline-flex;
664
+ height: 32px;
665
+ }
666
+
667
+ /* 主保存按钮 - 保持原有样式 */
668
+ .save-btn-main {
669
+ border-top-right-radius: 0 !important;
670
+ border-bottom-right-radius: 0 !important;
671
+ border-right: none !important;
672
+ height: 32px;
673
+ padding: 0 15px;
674
+ display: inline-flex;
675
+ align-items: center;
676
+ justify-content: center;
677
+ margin-right: -1px; /* 关键:负边距消除间距 */
678
+ }
679
+
680
+ /* 下拉按钮 - 仅调整间距 */
681
+ .dropdown-trigger-btn {
682
+ height: 32px !important;
683
+ width: 24px !important;
684
+ min-width: 24px !important;
685
+ padding: 0 !important;
686
+ border-top-left-radius: 0 !important;
687
+ border-bottom-left-radius: 0 !important;
688
+ border-left: 1px solid rgba(255, 255, 255, 0.3) !important;
689
+ display: inline-flex;
690
+ align-items: center;
691
+ justify-content: center;
692
+ margin-left: 0px;
693
+ }
694
+
695
+ /* 下拉图标保持原样 */
696
+ .dropdown-trigger-btn .anticon {
697
+ font-size: 12px;
698
+ margin: 0 !important;
699
+ }
700
+ .custom-radio-group {
701
+ .ant-radio-button-wrapper-checked {
702
+ background-color: rgb(0, 87, 254) !important;
703
+ }
704
+ }
705
+ </style>