vue2-client 1.13.8 → 1.13.9

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 (387) hide show
  1. package/.cursorrules +19 -19
  2. package/.env.gaslink +19 -19
  3. package/.env.his +19 -19
  4. package/.env.iot +19 -19
  5. package/.env.liuli +19 -19
  6. package/.env.revenue +19 -19
  7. package/.env.scada +19 -19
  8. package/.eslintrc.js +90 -90
  9. package/CHANGELOG.md +824 -824
  10. package/Components.md +60 -60
  11. package/docs/Logic/345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +45 -45
  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 +107 -107
  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/public/index.html +27 -27
  56. package/src/ReportView.js +19 -19
  57. package/src/assets/img/querySlotDemo.svg +15 -15
  58. package/src/assets/svg/badtwo.svg +1 -1
  59. package/src/assets/svg/goodtwo.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/AMisRender/index.js +3 -3
  63. package/src/base-client/components/common/AMisRender/index.vue +263 -263
  64. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +470 -470
  65. package/src/base-client/components/common/AddressSearchCombobox/IcMapIcon.vue +16 -16
  66. package/src/base-client/components/common/AddressSearchCombobox/demo.vue +36 -36
  67. package/src/base-client/components/common/AddressSearchCombobox/ic_map.svg +6 -6
  68. package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
  69. package/src/base-client/components/common/CitySelect/index.js +3 -3
  70. package/src/base-client/components/common/CitySelect/index.md +109 -109
  71. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +669 -669
  72. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +1014 -1014
  73. package/src/base-client/components/common/CreateQuery/index.js +3 -3
  74. package/src/base-client/components/common/CreateQuery/index.md +42 -42
  75. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +452 -452
  76. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +511 -511
  77. package/src/base-client/components/common/CreateSimpleFormQuery/index.js +3 -3
  78. package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -42
  79. package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +149 -149
  80. package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
  81. package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
  82. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +166 -166
  83. package/src/base-client/components/common/FormGroupQuery/index.js +3 -3
  84. package/src/base-client/components/common/FormGroupQuery/index.md +43 -43
  85. package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
  86. package/src/base-client/components/common/LowCodeComponent/LowCodeEditorModal.vue +108 -108
  87. package/src/base-client/components/common/LowCodeComponent/LowCodeEditorPanel.vue +413 -413
  88. package/src/base-client/components/common/LowCodeComponent/LowCodePageOrganization.vue +502 -502
  89. package/src/base-client/components/common/LowCodeComponent/LowCodeRender.vue +728 -728
  90. package/src/base-client/components/common/LowCodeComponent/LowCodeRenderEnter.vue +29 -29
  91. package/src/base-client/components/common/LowCodeComponent/LowCodeUIStore.vue +219 -219
  92. package/src/base-client/components/common/LowCodeComponent/modal/lowCodeAddPageModal.vue +117 -117
  93. package/src/base-client/components/common/LowCodeComponent/modal/lowCodeCustomJSModal.vue +80 -80
  94. package/src/base-client/components/common/LowCodeComponent/modal/lowCodeEventEditorModal.vue +398 -398
  95. package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLifeCycleModal.vue +65 -65
  96. package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLogicCallbackModal.vue +64 -64
  97. package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLogicParamModal.vue +73 -73
  98. package/src/base-client/components/common/LowCodeComponent/modal/lowCodeRunFunctionParamModal.vue +76 -76
  99. package/src/base-client/components/common/PersonSetting/PersonSetting.vue +208 -208
  100. package/src/base-client/components/common/PersonSetting/index.js +3 -3
  101. package/src/base-client/components/common/Recording/Recording.vue +243 -243
  102. package/src/base-client/components/common/Recording/index.js +3 -3
  103. package/src/base-client/components/common/Tree/Tree.vue +149 -149
  104. package/src/base-client/components/common/Tree/index.js +2 -2
  105. package/src/base-client/components/common/Upload/index.js +3 -3
  106. package/src/base-client/components/common/XAddForm/XAddForm.vue +113 -113
  107. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +1156 -1156
  108. package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
  109. package/src/base-client/components/common/XAddNativeFormOA/XAddNativeFormOA.vue +303 -303
  110. package/src/base-client/components/common/XAddNativeFormOA/index.js +3 -3
  111. package/src/base-client/components/common/XAddNativeFormOA/index.md +146 -146
  112. package/src/base-client/components/common/XAddReport/index.js +3 -3
  113. package/src/base-client/components/common/XAddReport/index.md +56 -56
  114. package/src/base-client/components/common/XBadge/XBadge.vue +94 -94
  115. package/src/base-client/components/common/XButtons/XButtonDemo.vue +28 -28
  116. package/src/base-client/components/common/XButtons/XButtons.vue +71 -71
  117. package/src/base-client/components/common/XButtons/index.js +3 -3
  118. package/src/base-client/components/common/XButtons/index.md +61 -61
  119. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  120. package/src/base-client/components/common/XCheckList/XCheckList.vue +106 -106
  121. package/src/base-client/components/common/XCheckList/XCheckListDemo.vue +41 -41
  122. package/src/base-client/components/common/XCollapse/XCollapseDemo.vue +15 -0
  123. package/src/base-client/components/common/XDataCard/index.js +3 -3
  124. package/src/base-client/components/common/XDataCard/index.md +1 -1
  125. package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
  126. package/src/base-client/components/common/XDataDrawer/index.js +3 -3
  127. package/src/base-client/components/common/XDataDrawer/index.md +41 -41
  128. package/src/base-client/components/common/XDatePicker/demo.vue +153 -153
  129. package/src/base-client/components/common/XDescriptions/index.js +3 -3
  130. package/src/base-client/components/common/XDescriptions/index.md +83 -83
  131. package/src/base-client/components/common/XDetailsView/XDetailsView.vue +238 -238
  132. package/src/base-client/components/common/XDetailsView/index.js +3 -3
  133. package/src/base-client/components/common/XForm/XForm.vue +404 -404
  134. package/src/base-client/components/common/XForm/XFormItem.vue +1310 -1310
  135. package/src/base-client/components/common/XForm/XStatusButton.vue +54 -54
  136. package/src/base-client/components/common/XForm/XTreeSelect.vue +270 -270
  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/XFormGroupDetails.vue +72 -72
  142. package/src/base-client/components/common/XFormGroupDetails/index.js +3 -3
  143. package/src/base-client/components/common/XFormTable/demo.vue +76 -76
  144. package/src/base-client/components/common/XFormTable/index.md +92 -92
  145. package/src/base-client/components/common/XImportExcel/XImportExcel.vue +167 -167
  146. package/src/base-client/components/common/XLabelSelect/XLabelSelect.vue +110 -110
  147. package/src/base-client/components/common/XLabelSelect/XLabelSelectDemo.vue +35 -35
  148. package/src/base-client/components/common/XLicensePlate/XLicensePlate.vue +193 -193
  149. package/src/base-client/components/common/XLicensePlate/XLicensePlateDemo.vue +48 -48
  150. package/src/base-client/components/common/XPrint/OpenInvoice.vue +21 -21
  151. package/src/base-client/components/common/XPrint/PrintBill.vue +302 -302
  152. package/src/base-client/components/common/XPrint/PrintHtml.js +98 -98
  153. package/src/base-client/components/common/XPrint/css/hiPrintCss.js +359 -359
  154. package/src/base-client/components/common/XPrint/css/lodopCss.js +26 -26
  155. package/src/base-client/components/common/XPrint/css/print-lock.css +351 -351
  156. package/src/base-client/components/common/XPrint/index.vue +97 -97
  157. package/src/base-client/components/common/XReport/XReport.vue +892 -892
  158. package/src/base-client/components/common/XReport/XReportDesign.vue +463 -463
  159. package/src/base-client/components/common/XReport/XReportJsonRender.vue +381 -381
  160. package/src/base-client/components/common/XReport/index.js +3 -3
  161. package/src/base-client/components/common/XReport/index.md +44 -44
  162. package/src/base-client/components/common/XReport/print.js +186 -186
  163. package/src/base-client/components/common/XReportDrawer/index.js +3 -3
  164. package/src/base-client/components/common/XReportGrid/XReportDemo.vue +44 -44
  165. package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +712 -712
  166. package/src/base-client/components/common/XReportGrid/index.js +3 -3
  167. package/src/base-client/components/common/XReportGrid/index.md +44 -44
  168. package/src/base-client/components/common/XReportSlot/XReportSlot.vue +110 -110
  169. package/src/base-client/components/common/XReportSlot/index.js +3 -3
  170. package/src/base-client/components/common/XReportSlot/index.md +48 -48
  171. package/src/base-client/components/common/XSimpleDescriptions/XSimpleDescriptions.vue +166 -166
  172. package/src/base-client/components/common/XSimpleDescriptions/index.js +3 -3
  173. package/src/base-client/components/common/XSimpleDescriptions/index.md +7 -7
  174. package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
  175. package/src/base-client/components/common/XStepView/index.js +3 -3
  176. package/src/base-client/components/common/XStepView/index.md +31 -31
  177. package/src/base-client/components/common/XTab/XTabDemo.vue +22 -22
  178. package/src/base-client/components/common/XTab/index.js +3 -3
  179. package/src/base-client/components/common/XTable/CustomFuncCel.vue +51 -51
  180. package/src/base-client/components/common/XTable/TableCellRenderer.vue +161 -161
  181. package/src/base-client/components/common/XTable/XTable.vue +1361 -1361
  182. package/src/base-client/components/common/XTable/XTableWrapper.vue +257 -257
  183. package/src/base-client/components/common/XTable/index.md +255 -255
  184. package/src/base-client/components/common/XTagGroup/index.vue +52 -52
  185. package/src/base-client/components/common/XTree/XTree.vue +424 -424
  186. package/src/base-client/components/common/XTree/index.js +3 -3
  187. package/src/base-client/components/common/XTree/index.md +36 -36
  188. package/src/base-client/components/common/XTreeOne/XTreeOne.vue +113 -113
  189. package/src/base-client/components/common/XTreeOne/XTreeOnePro.vue +128 -128
  190. package/src/base-client/components/common/richTextModal/index.vue +56 -56
  191. package/src/base-client/components/common/richTextModal/richDemo.vue +48 -48
  192. package/src/base-client/components/his/XHisEditor/index.js +3 -3
  193. package/src/base-client/components/his/XList/XList.vue +32 -5
  194. package/src/base-client/components/his/XSelect/XSelect.vue +72 -72
  195. package/src/base-client/components/his/XTitle/XTitle.vue +39 -39
  196. package/src/base-client/components/index.js +51 -51
  197. package/src/base-client/components/layout/XPageView/XErrorView.vue +11 -11
  198. package/src/base-client/components/layout/XPageView/XPageView.vue +155 -155
  199. package/src/base-client/components/layout/XPageView/index.js +3 -3
  200. package/src/base-client/components/layout/XPageView/index.md +38 -38
  201. package/src/base-client/components/layout/XTreeView/XTreeView.vue +130 -130
  202. package/src/base-client/components/layout/XTreeView/index.js +3 -3
  203. package/src/base-client/components/layout/XTreeView/index.md +46 -46
  204. package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
  205. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
  206. package/src/base-client/plugins/AppData.js +126 -126
  207. package/src/base-client/plugins/Config.js +19 -19
  208. package/src/base-client/plugins/GetLoginInfoService.js +183 -183
  209. package/src/base-client/plugins/Recording.js +258 -258
  210. package/src/base-client/plugins/index.js +23 -23
  211. package/src/base-client/plugins/tabs-page-plugin.js +39 -39
  212. package/src/components/Charts/Bar.vue +62 -62
  213. package/src/components/Charts/ChartCard.vue +134 -134
  214. package/src/components/Charts/Liquid.vue +67 -67
  215. package/src/components/Charts/MiniArea.vue +39 -39
  216. package/src/components/Charts/MiniBar.vue +39 -39
  217. package/src/components/Charts/MiniProgress.vue +75 -75
  218. package/src/components/Charts/MiniSmoothArea.vue +40 -40
  219. package/src/components/Charts/Radar.vue +68 -68
  220. package/src/components/Charts/RankList.vue +77 -77
  221. package/src/components/Charts/TagCloud.vue +113 -113
  222. package/src/components/Charts/TransferBar.vue +64 -64
  223. package/src/components/Charts/Trend.vue +82 -82
  224. package/src/components/Charts/chart.less +12 -12
  225. package/src/components/Charts/smooth.area.less +13 -13
  226. package/src/components/CodeMirror/inedx.vue +118 -118
  227. package/src/components/CodeMirror/setting.js +40 -40
  228. package/src/components/FilePreview/FilePreviewDemo.vue +30 -30
  229. package/src/components/HeightScanner/index.vue +571 -571
  230. package/src/components/NumberInfo/NumberInfo.vue +54 -54
  231. package/src/components/NumberInfo/index.js +3 -3
  232. package/src/components/NumberInfo/index.less +54 -54
  233. package/src/components/NumberInfo/index.md +43 -43
  234. package/src/components/STable/index.js +437 -437
  235. package/src/components/card/ChartCard.vue +79 -79
  236. package/src/components/chart/Bar.vue +60 -60
  237. package/src/components/chart/MiniArea.vue +67 -67
  238. package/src/components/chart/MiniBar.vue +59 -59
  239. package/src/components/chart/MiniProgress.vue +57 -57
  240. package/src/components/chart/Radar.vue +80 -80
  241. package/src/components/chart/RankingList.vue +60 -60
  242. package/src/components/chart/Trend.vue +79 -79
  243. package/src/components/chart/index.less +9 -9
  244. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  245. package/src/components/checkbox/ImgCheckbox.vue +117 -117
  246. package/src/components/checkbox/ImgCheckboxGroup.vue +76 -76
  247. package/src/components/checkbox/index.js +9 -9
  248. package/src/components/exception/ExceptionPage.vue +70 -70
  249. package/src/components/g2Charts/constants.js +202 -202
  250. package/src/components/g2Charts/demo.vue +808 -808
  251. package/src/components/g2Charts/designer.vue +228 -228
  252. package/src/components/g2Charts/designerBaseConfig.vue +61 -61
  253. package/src/components/g2Charts/designerDataConfig.vue +259 -259
  254. package/src/components/g2Charts/designerStyleConfig.vue +16 -16
  255. package/src/components/g2Charts/index.vue +397 -397
  256. package/src/components/index.js +36 -36
  257. package/src/components/input/IInput.vue +66 -66
  258. package/src/components/menu/SideMenu.vue +75 -75
  259. package/src/components/menu/menu.js +273 -273
  260. package/src/components/setting/Setting.vue +234 -234
  261. package/src/components/tool/AStepItem.vue +60 -60
  262. package/src/config/CreateQueryConfig.js +325 -325
  263. package/src/config/default/antd.config.js +89 -89
  264. package/src/config/default/setting.config.js +55 -55
  265. package/src/font-style/font.css +4 -4
  266. package/src/layouts/CommonLayout.vue +56 -56
  267. package/src/layouts/PageLayout.vue +151 -151
  268. package/src/layouts/SinglePageView.vue +136 -136
  269. package/src/layouts/header/AdminHeader.vue +132 -132
  270. package/src/layouts/header/HeaderNotice.vue +177 -177
  271. package/src/layouts/header/InstitutionDetail.vue +181 -181
  272. package/src/layouts/tabs/TabsHead.vue +189 -189
  273. package/src/layouts/tabs/TabsView.vue +389 -389
  274. package/src/lib.js +1 -1
  275. package/src/main.js +34 -34
  276. package/src/mixins/formValidationMixin.js +46 -46
  277. package/src/mock/extend/index.js +84 -84
  278. package/src/mock/goods/index.js +108 -108
  279. package/src/pages/AMisDemo/AMisDemo.vue +325 -325
  280. package/src/pages/AMisDemo/AMisDemo2.vue +74 -74
  281. package/src/pages/DefaultExample/index.vue +77 -77
  282. package/src/pages/DynamicStatistics/ChartSelector.vue +331 -331
  283. package/src/pages/DynamicStatistics/DataTabs.vue +83 -83
  284. package/src/pages/DynamicStatistics/DynamicTable.vue +128 -128
  285. package/src/pages/DynamicStatistics/EvaluationArea.vue +69 -69
  286. package/src/pages/DynamicStatistics/FavoriteList.vue +50 -50
  287. package/src/pages/DynamicStatistics/QuestionHistoryAndFavorites.vue +591 -591
  288. package/src/pages/DynamicStatistics/SearchBar.vue +192 -192
  289. package/src/pages/DynamicStatistics/index.vue +282 -282
  290. package/src/pages/Example/childIndex.vue +15 -15
  291. package/src/pages/Example/index.vue +30 -30
  292. package/src/pages/NewDynamicStatistics/ChartSelector.vue +331 -331
  293. package/src/pages/NewDynamicStatistics/DataTabs.vue +122 -122
  294. package/src/pages/NewDynamicStatistics/DynamicTable.vue +128 -128
  295. package/src/pages/NewDynamicStatistics/EvaluationArea.vue +69 -69
  296. package/src/pages/NewDynamicStatistics/FavoriteList.vue +50 -50
  297. package/src/pages/NewDynamicStatistics/QuestionHistoryAndFavorites.vue +289 -289
  298. package/src/pages/NewDynamicStatistics/SearchBar.vue +193 -193
  299. package/src/pages/NewDynamicStatistics/index.vue +258 -258
  300. package/src/pages/Recording/index.vue +77 -77
  301. package/src/pages/ReportGrid/index.vue +76 -76
  302. package/src/pages/ServiceReview/index.vue +284 -284
  303. package/src/pages/SubExample/index.vue +26 -26
  304. package/src/pages/WorkflowDetail/WorkflowDetail.vue +235 -235
  305. package/src/pages/WorkflowDetail/WorkflowPageDetail/LeaveMessage.vue +131 -131
  306. package/src/pages/WorkflowDetail/WorkflowPageDetail/TrimTextTail.vue +23 -23
  307. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowBaseInformation.vue +302 -302
  308. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowBaseInformationDetails.vue +276 -276
  309. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandleReso.vue +997 -997
  310. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowTimeline.vue +222 -222
  311. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkOrderParentDetails.vue +233 -233
  312. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkflowDetailResso.vue +261 -261
  313. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkflowListResolution.vue +248 -248
  314. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkflowLog.vue +73 -73
  315. package/src/pages/XPageViewExample/index.vue +38 -38
  316. package/src/pages/XReportView/index.vue +64 -64
  317. package/src/pages/XTreeOneProExample/index.vue +67 -67
  318. package/src/pages/dashboard/workplace/WorkPlace.vue +141 -141
  319. package/src/pages/login/Login.vue +378 -378
  320. package/src/pages/login/LoginV3.vue +389 -389
  321. package/src/pages/lowCode/lowCodeEditor.vue +1219 -1219
  322. package/src/pages/lowCode/lowCodeRenderPage.vue +43 -43
  323. package/src/pages/report/ReportTable.js +124 -124
  324. package/src/pages/resourceManage/orgListManage.vue +98 -98
  325. package/src/pages/system/dictionary/index.vue +44 -44
  326. package/src/pages/system/monitor/loginInfor/index.vue +37 -37
  327. package/src/pages/system/monitor/operLog/index.vue +37 -37
  328. package/src/pages/system/settings/modifyPassword.vue +117 -117
  329. package/src/pages/system/ticket/index.vue +480 -480
  330. package/src/pages/system/ticket/submitTicketSuccess.vue +484 -484
  331. package/src/pages/userInfoDetailManage/ChangeMeterRecordQuery/index.vue +64 -64
  332. package/src/pages/userInfoDetailManage/FillCardRecordQuery/index.vue +76 -76
  333. package/src/pages/userInfoDetailManage/FillGasRecordQuery/index.vue +74 -74
  334. package/src/pages/userInfoDetailManage/InfoChangeRecordQuery/index.vue +64 -64
  335. package/src/pages/userInfoDetailManage/InstructRecordQuery/index.vue +64 -64
  336. package/src/pages/userInfoDetailManage/MachineRecordQuery/index.vue +74 -74
  337. package/src/pages/userInfoDetailManage/MeterParamRecordQuery/index.vue +64 -64
  338. package/src/pages/userInfoDetailManage/OtherChargeRecordQuery/index.vue +74 -74
  339. package/src/pages/userInfoDetailManage/TransferRecordQuery/index.vue +66 -66
  340. package/src/pages/userInfoDetailManage/UserHandRecordQuery/index.vue +86 -86
  341. package/src/pages/userInfoDetailManage/UserRecordQuery/index.vue +73 -73
  342. package/src/pages/userInfoDetailManage/WatchCollectionRecordQuery/index.vue +64 -64
  343. package/src/plugins/EventLogPlugin.js +33 -33
  344. package/src/plugins/FindParentsData.js +17 -17
  345. package/src/router/async/config.async.js +35 -35
  346. package/src/router/async/router.map.js +126 -119
  347. package/src/router/index.js +27 -27
  348. package/src/router.js +19 -19
  349. package/src/services/DataModel.js +30 -30
  350. package/src/services/LodopFuncs.js +137 -137
  351. package/src/services/api/TicketDetailsViewApi.js +46 -46
  352. package/src/services/api/cas.js +79 -79
  353. package/src/services/api/common.js +346 -346
  354. package/src/services/api/entity.js +18 -18
  355. package/src/services/api/index.js +17 -17
  356. package/src/services/api/restTools.js +145 -145
  357. package/src/services/api/workFlow.js +63 -63
  358. package/src/services/apiService.js +16 -16
  359. package/src/store/modules/account.js +115 -115
  360. package/src/store/modules/index.js +5 -5
  361. package/src/store/modules/lowCode.js +33 -33
  362. package/src/store/modules/setting.js +119 -119
  363. package/src/theme/default/style.less +58 -58
  364. package/src/theme/global.less +159 -159
  365. package/src/utils/authority-utils.js +85 -85
  366. package/src/utils/errorCode.js +6 -6
  367. package/src/utils/formatter.js +74 -74
  368. package/src/utils/htmlToPDF.js +108 -108
  369. package/src/utils/htmlToPDFApi.js +5 -5
  370. package/src/utils/login.js +188 -188
  371. package/src/utils/lowcode/lowcodeComponentMixin.js +120 -120
  372. package/src/utils/lowcode/lowcodeLog.js +29 -29
  373. package/src/utils/lowcode/lowcodeUtils.js +373 -373
  374. package/src/utils/lowcode/registerComponentForEditor.js +1 -1
  375. package/src/utils/lowcode/registerComponentForRender.js +11 -11
  376. package/src/utils/map-utils.js +47 -47
  377. package/src/utils/reg.js +95 -95
  378. package/src/utils/runEvalFunction.js +14 -14
  379. package/src/utils/theme-color-replacer-extend.js +92 -92
  380. package/src/utils/util.js +329 -329
  381. package/src/utils/waterMark.js +31 -31
  382. package/test/Amis.spec.js +164 -164
  383. package/test/Tree.spec.js +168 -168
  384. package/test/myDialog.spec.js +47 -47
  385. package/test/util.test.js +53 -53
  386. package/test/v3Api.test.js +1984 -1984
  387. package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
@@ -1,437 +1,437 @@
1
- import T from 'ant-design-vue/es/table/Table'
2
- import get from 'lodash.get'
3
- import { mapState } from 'vuex'
4
-
5
- export default {
6
- data () {
7
- return {
8
- clickedRowKey: null,
9
- needTotalList: [],
10
-
11
- selectedRows: [],
12
- selectedRowKeys: [],
13
-
14
- localLoading: false,
15
- localDataSource: [],
16
- localPagination: Object.assign({}, this.pagination),
17
-
18
- sortField: undefined,
19
- sortOrder: undefined,
20
- pageNum: 1,
21
- pageSize: 10
22
- }
23
- },
24
- props: Object.assign({}, T.props, {
25
- rowKey: {
26
- type: [String, Function],
27
- default: 'key'
28
- },
29
- data: {
30
- type: Function,
31
- required: true
32
- },
33
- setScrollYHeight: {
34
- type: Function,
35
- required: true
36
- },
37
- showSizeChanger: {
38
- type: Boolean,
39
- default: true
40
- },
41
- showSummary: {
42
- type: Boolean,
43
- default: false
44
- },
45
- selectRowMode: {
46
- type: String,
47
- default: 'default'
48
- },
49
- size: {
50
- type: String,
51
- default: 'default'
52
- },
53
- /**
54
- * alert: {
55
- * show: true,
56
- * clear: Function
57
- * }
58
- */
59
- alert: {
60
- type: [Object, Boolean],
61
- default: null
62
- },
63
- rowSelection: {
64
- type: Object,
65
- default: null
66
- },
67
- /** @Deprecated */
68
- showAlertInfo: {
69
- type: Boolean,
70
- default: false
71
- },
72
- showPagination: {
73
- type: String | Boolean,
74
- default: 'auto'
75
- },
76
- // 是否隐藏翻页,如果隐藏,彻底不显示翻译
77
- hidePagination: {
78
- type: Boolean,
79
- default: false
80
- },
81
- // 是否显示表头已选择部分
82
- showSelected: {
83
- type: Boolean,
84
- default: true
85
- },
86
- /**
87
- * enable page URI mode
88
- *
89
- * e.g:
90
- * /users/1
91
- * /users/2
92
- * /users/3?queryParam=test
93
- * ...
94
- */
95
- pageURI: {
96
- type: Boolean,
97
- default: false
98
- }
99
- }),
100
- computed: {
101
- ...mapState('setting', ['theme']), // 添加 theme 到计算属性
102
-
103
- // 计算点击行的背景色,使用 10% 透明度
104
- clickedRowColor () {
105
- const themeColor = this.$store.state.setting.theme.color
106
- return this.hexToRgba(themeColor || '#1890ff', 0.1)
107
- }
108
- },
109
- watch: {
110
- 'localPagination.current' (val) {
111
- this.pageURI && this.$router.push({
112
- ...this.$route,
113
- name: this.$route.name,
114
- params: Object.assign({}, this.$route.params, {
115
- pageNo: val
116
- })
117
- })
118
- // change pagination, reset total data
119
- this.needTotalList = this.initTotalList(this.columns)
120
- if (this.selectRowMode === 'default') {
121
- this.selectedRowKeys = []
122
- this.selectedRows = []
123
- }
124
- },
125
- pageNum (val) {
126
- Object.assign(this.localPagination, {
127
- current: val
128
- })
129
- },
130
- pageSize (val) {
131
- Object.assign(this.localPagination, {
132
- pageSize: val
133
- })
134
- },
135
- showSizeChanger (val) {
136
- Object.assign(this.localPagination, {
137
- showSizeChanger: val
138
- })
139
- }
140
- },
141
- created () {
142
- const { pageNo } = this.$route.params
143
- const localPageNum = this.pageURI && (pageNo && parseInt(pageNo)) || this.pageNum
144
- this.localPagination = ['auto', true].includes(this.showPagination) && Object.assign({}, this.localPagination, {
145
- current: localPageNum,
146
- pageSize: this.pageSize,
147
- showSizeChanger: this.showSizeChanger
148
- }) || false
149
- this.needTotalList = this.initTotalList(this.columns)
150
- // this.loadData()
151
- },
152
- methods: {
153
- /**
154
- * 表格重新加载方法
155
- * 如果参数为 true, 则强制刷新到第一页
156
- * @param Boolean bool
157
- */
158
- refresh (bool = false) {
159
- bool && (this.localPagination = Object.assign({}, {
160
- current: 1, pageSize: this.pageSize
161
- }))
162
- this.loadData()
163
- },
164
- /**
165
- * 加载数据方法
166
- * @param {Object} pagination 分页选项器
167
- * @param {Object} filters 过滤条件
168
- * @param {Object} sorter 排序条件
169
- */
170
- loadData (pagination, filters, sorter) {
171
- this.localLoading = true
172
- // 暂存排序方式,避免 refresh 之后排序失效
173
- if (sorter && sorter.field) {
174
- this.sortField = sorter.field
175
- }
176
- if (sorter && sorter.order) {
177
- this.sortOrder = sorter.order
178
- }
179
- const parameter = Object.assign({
180
- querySummary: !pagination && this.showSummary, // 分页查询的情况不重新获取汇总数据
181
- pageNo: (pagination && pagination.current) ||
182
- this.showPagination && this.localPagination.current || this.pageNum,
183
- pageSize: (pagination && pagination.pageSize) ||
184
- this.showPagination && this.localPagination.pageSize || this.pageSize
185
- },
186
- (this.sortField && { sortField: this.sortField }) || {},
187
- (this.sortOrder && { sortOrder: this.sortOrder }) || {},
188
- { ...filters }
189
- )
190
- const result = this.data(parameter)
191
- // 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.totalCount, r.data
192
- // eslint-disable-next-line
193
- if ((typeof result === 'object' || typeof result === 'function') && typeof result.then === 'function') {
194
- result.then(r => {
195
- this.localPagination = this.showPagination && Object.assign({}, this.localPagination, {
196
- current: r.pageNo, // 返回结果中的当前分页数
197
- total: r.totalCount, // 返回结果中的总记录数
198
- showSizeChanger: this.showSizeChanger,
199
- pageSize: (pagination && pagination.pageSize) || this.localPagination.pageSize
200
- }) || false
201
- // 为防止删除数据后导致页面当前页面数据长度为 0 ,自动翻页到上一页
202
- if (r.data.length === 0 && this.showPagination && this.localPagination.current > 1) {
203
- this.localPagination.current--
204
- this.loadData()
205
- return
206
- }
207
-
208
- // 这里用于判断接口是否有返回 r.totalCount 且 this.showPagination = 'auto' 且 pageNo 和 pageSize 存在 且 totalCount 小于等于 pageNo * pageSize 的大小
209
- // 当情况满足时,表示数据不满足分页大小,关闭 table 分页功能
210
- try {
211
- if ((['auto'].includes(this.showPagination) && r.totalCount <= (r.pageNo * this.localPagination.pageSize))) {
212
- this.localPagination.hideOnSinglePage = true
213
- }
214
- } catch (e) {
215
- this.localPagination = false
216
- }
217
- this.localDataSource = r.data // 返回结果中的数组数据
218
- this.localLoading = false
219
- this.setScrollYHeight({ type: 'default' })
220
- }, () => {
221
- this.localLoading = false
222
- this.setScrollYHeight({ type: 'default' })
223
- })
224
- }
225
- },
226
- setLocalDataSource (data) {
227
- this.localDataSource = data
228
- },
229
- initTotalList (columns) {
230
- const totalList = []
231
- columns && columns instanceof Array && columns.forEach(column => {
232
- if (column.needTotal) {
233
- totalList.push({
234
- ...column,
235
- total: 0
236
- })
237
- }
238
- })
239
- return totalList
240
- },
241
- /**
242
- * 用于更新已选中的列表数据 total 统计
243
- * @param selectedRowKeys
244
- * @param selectedRows
245
- */
246
- updateSelect (selectedRowKeys, selectedRows) {
247
- this.selectedRows = selectedRows
248
- this.selectedRowKeys = selectedRowKeys
249
- const list = this.needTotalList
250
- this.needTotalList = list.map(item => {
251
- return {
252
- ...item,
253
- total: selectedRows.reduce((sum, val) => {
254
- const total = sum + parseInt(get(val, item.dataIndex))
255
- return isNaN(total) ? 0 : total
256
- }, 0)
257
- }
258
- })
259
- },
260
- /**
261
- * 清空 table 已选中项
262
- */
263
- clearSelected () {
264
- if (this.rowSelection) {
265
- this.rowSelection.onChange([], [])
266
- this.updateSelect([], [])
267
- }
268
- },
269
- /**
270
- * 处理交给 table 使用者去处理 clear 事件时,内部选中统计同时调用
271
- * @param callback
272
- * @returns {*}
273
- */
274
- renderClear (callback) {
275
- if (this.selectedRowKeys.length <= 0) return null
276
- return (
277
- <a style="margin-left: 24px" onClick={() => {
278
- callback()
279
- this.clearSelected()
280
- }}>清空</a>
281
- )
282
- },
283
- renderAlert () {
284
- // 绘制统计列数据
285
- const needTotalItems = this.needTotalList.map((item) => {
286
- return (<span style="margin-right: 12px">
287
- {item.title}总计 <a
288
- style="font-weight: 600">{!item.customRender ? item.total : item.customRender(item.total)}</a>
289
- </span>)
290
- })
291
-
292
- // 绘制 清空 按钮
293
- const clearItem = (typeof this.alert.clear === 'boolean' && this.alert.clear) ? (
294
- this.renderClear(this.clearSelected)
295
- ) : (typeof this.alert.clear === 'function') ? (
296
- this.renderClear(this.alert.clear)
297
- ) : null
298
-
299
- // 绘制 alert 组件
300
- return (
301
- <a-alert showIcon={true} style={{ marginBottom: '8px', fontSize: '14px' }}>
302
- <template slot="message">
303
- <span style="margin-right: 12px;">已选择: <a style="font-weight: 600">{this.selectedRows.length}</a></span>
304
- {needTotalItems}
305
- {clearItem}
306
- </template>
307
- </a-alert>
308
- )
309
- },
310
- onExpand (expanded, record) {
311
- this.$emit('expand', expanded, record)
312
- },
313
- handleRowClick (record, index) {
314
- if (this.rowKey === '序号') {
315
- this.clickedRowKey = index
316
- } else {
317
- this.clickedRowKey = record[this.rowKey]
318
- }
319
- this.$emit('rowClick', record)
320
- },
321
- hexToRgba (hex, alpha = 1) {
322
- try {
323
- const r = parseInt(hex.slice(1, 3), 16)
324
- const g = parseInt(hex.slice(3, 5), 16)
325
- const b = parseInt(hex.slice(5, 7), 16)
326
- return `rgba(${r}, ${g}, ${b}, ${alpha})`
327
- } catch (e) {
328
- return '#e6f7ff'
329
- }
330
- },
331
- },
332
-
333
- render () {
334
- const props = {}
335
- const localKeys = Object.keys(this.$data)
336
- const showAlert = (typeof this.alert === 'object' && this.alert !== null && this.alert.show) && typeof this.rowSelection.selectedRowKeys !== 'undefined' || this.alert
337
-
338
- Object.keys(T.props).forEach(k => {
339
- const localKey = `local${k.substring(0, 1).toUpperCase()}${k.substring(1)}`
340
- if (localKeys.includes(localKey)) {
341
- props[k] = this[localKey]
342
- return props[k]
343
- }
344
- if (k === 'rowSelection') {
345
- if (showAlert && this.rowSelection) {
346
- // 如果需要使用alert,则重新绑定 rowSelection 事件
347
- props[k] = {
348
- ...this.rowSelection,
349
- selectedRows: this.selectedRows,
350
- selectedRowKeys: this.selectedRowKeys,
351
- onChange: (selectedRowKeys, selectedRows) => {
352
- this.updateSelect(selectedRowKeys, selectedRows)
353
- typeof this[k].onChange !== 'undefined' && this[k].onChange(selectedRowKeys, selectedRows)
354
- }
355
- }
356
- return props[k]
357
- } else if (!this.rowSelection) {
358
- // 如果没打算开启 rowSelection 则清空默认的选择项
359
- props[k] = null
360
- return props[k]
361
- }
362
- }
363
- this[k] && (props[k] = this[k])
364
- return props[k]
365
- })
366
- // 取消原有的分页组件 产品设计分页组件和汇总在一行 重新分页逻辑
367
- props.pagination = false
368
- // 在 props 中添加自定义行属性
369
- props.customRow = (record, index) => {
370
- const isRowKeySequence = this.rowKey === '序号'
371
- const isCurrentRow = isRowKeySequence
372
- ? this.clickedRowKey === index
373
- : this.clickedRowKey === record[this.rowKey]
374
- return {
375
- on: {
376
- click: () => this.handleRowClick(record, index)
377
- },
378
- style: {
379
- 'background-color': isCurrentRow ? this.clickedRowColor : ''
380
- }
381
- }
382
- }
383
- // 自定义底部汇总插槽组件
384
- const pagination = (
385
- !!this.showPagination && <a-row type={'flex'} justify={'start'} style={{ marginTop: '8px' }}>
386
- <a-col flex="1" style={{
387
- alignItems: 'center',
388
- display: 'flex',
389
- justifyContent: 'start',
390
- boxSizing: 'border-box',
391
- paddingRight: '2rem'
392
- }}>
393
- {this.$slots.fixedfooter}
394
- </a-col>
395
- <a-col flex="0 0">
396
- <a-pagination
397
- total={this.localPagination.total}
398
- onChange={(page, pageSize) => {
399
- this.pageSize = pageSize
400
- this.pageNum = page
401
- this.loadData({
402
- current: page,
403
- pageSize: pageSize
404
- })
405
- }
406
- }
407
- onShowSizeChange={(page, pageSize) => {
408
- this.pageSize = pageSize
409
- this.pageNum = page
410
- this.loadData({
411
- current: page,
412
- pageSize: pageSize
413
- })
414
- }
415
- }
416
- show-total={(total, range) => range[0] === range[1] ? `${range[0]} | 共 ${total} 项` : `${range[0]}-${range[1]} | 共 ${total} 项`}
417
- default-current={this.localPagination.current}
418
- showSizeChanger={this.localPagination.showSizeChanger}/>
419
- </a-col>
420
- </a-row>
421
- )
422
- const table = (
423
- <a-table {...{ props, scopedSlots: { ...this.$scopedSlots } }} onChange={this.loadData}
424
- onExpand={(expanded, record) => this.onExpand(expanded, record)}>
425
- {Object.keys(this.$slots).map(name => (<template slot={name}>{this.$slots[name]}</template>))}
426
- </a-table>
427
- )
428
-
429
- return (
430
- <div class="table-wrapper">
431
- {showAlert && this.showSelected && this.selectRowMode === 'default' ? this.renderAlert() : null}
432
- {table}
433
- {!this.hidePagination ? pagination : null}
434
- </div>
435
- )
436
- }
437
- }
1
+ import T from 'ant-design-vue/es/table/Table'
2
+ import get from 'lodash.get'
3
+ import { mapState } from 'vuex'
4
+
5
+ export default {
6
+ data () {
7
+ return {
8
+ clickedRowKey: null,
9
+ needTotalList: [],
10
+
11
+ selectedRows: [],
12
+ selectedRowKeys: [],
13
+
14
+ localLoading: false,
15
+ localDataSource: [],
16
+ localPagination: Object.assign({}, this.pagination),
17
+
18
+ sortField: undefined,
19
+ sortOrder: undefined,
20
+ pageNum: 1,
21
+ pageSize: 10
22
+ }
23
+ },
24
+ props: Object.assign({}, T.props, {
25
+ rowKey: {
26
+ type: [String, Function],
27
+ default: 'key'
28
+ },
29
+ data: {
30
+ type: Function,
31
+ required: true
32
+ },
33
+ setScrollYHeight: {
34
+ type: Function,
35
+ required: true
36
+ },
37
+ showSizeChanger: {
38
+ type: Boolean,
39
+ default: true
40
+ },
41
+ showSummary: {
42
+ type: Boolean,
43
+ default: false
44
+ },
45
+ selectRowMode: {
46
+ type: String,
47
+ default: 'default'
48
+ },
49
+ size: {
50
+ type: String,
51
+ default: 'default'
52
+ },
53
+ /**
54
+ * alert: {
55
+ * show: true,
56
+ * clear: Function
57
+ * }
58
+ */
59
+ alert: {
60
+ type: [Object, Boolean],
61
+ default: null
62
+ },
63
+ rowSelection: {
64
+ type: Object,
65
+ default: null
66
+ },
67
+ /** @Deprecated */
68
+ showAlertInfo: {
69
+ type: Boolean,
70
+ default: false
71
+ },
72
+ showPagination: {
73
+ type: String | Boolean,
74
+ default: 'auto'
75
+ },
76
+ // 是否隐藏翻页,如果隐藏,彻底不显示翻译
77
+ hidePagination: {
78
+ type: Boolean,
79
+ default: false
80
+ },
81
+ // 是否显示表头已选择部分
82
+ showSelected: {
83
+ type: Boolean,
84
+ default: true
85
+ },
86
+ /**
87
+ * enable page URI mode
88
+ *
89
+ * e.g:
90
+ * /users/1
91
+ * /users/2
92
+ * /users/3?queryParam=test
93
+ * ...
94
+ */
95
+ pageURI: {
96
+ type: Boolean,
97
+ default: false
98
+ }
99
+ }),
100
+ computed: {
101
+ ...mapState('setting', ['theme']), // 添加 theme 到计算属性
102
+
103
+ // 计算点击行的背景色,使用 10% 透明度
104
+ clickedRowColor () {
105
+ const themeColor = this.$store.state.setting.theme.color
106
+ return this.hexToRgba(themeColor || '#1890ff', 0.1)
107
+ }
108
+ },
109
+ watch: {
110
+ 'localPagination.current' (val) {
111
+ this.pageURI && this.$router.push({
112
+ ...this.$route,
113
+ name: this.$route.name,
114
+ params: Object.assign({}, this.$route.params, {
115
+ pageNo: val
116
+ })
117
+ })
118
+ // change pagination, reset total data
119
+ this.needTotalList = this.initTotalList(this.columns)
120
+ if (this.selectRowMode === 'default') {
121
+ this.selectedRowKeys = []
122
+ this.selectedRows = []
123
+ }
124
+ },
125
+ pageNum (val) {
126
+ Object.assign(this.localPagination, {
127
+ current: val
128
+ })
129
+ },
130
+ pageSize (val) {
131
+ Object.assign(this.localPagination, {
132
+ pageSize: val
133
+ })
134
+ },
135
+ showSizeChanger (val) {
136
+ Object.assign(this.localPagination, {
137
+ showSizeChanger: val
138
+ })
139
+ }
140
+ },
141
+ created () {
142
+ const { pageNo } = this.$route.params
143
+ const localPageNum = this.pageURI && (pageNo && parseInt(pageNo)) || this.pageNum
144
+ this.localPagination = ['auto', true].includes(this.showPagination) && Object.assign({}, this.localPagination, {
145
+ current: localPageNum,
146
+ pageSize: this.pageSize,
147
+ showSizeChanger: this.showSizeChanger
148
+ }) || false
149
+ this.needTotalList = this.initTotalList(this.columns)
150
+ // this.loadData()
151
+ },
152
+ methods: {
153
+ /**
154
+ * 表格重新加载方法
155
+ * 如果参数为 true, 则强制刷新到第一页
156
+ * @param Boolean bool
157
+ */
158
+ refresh (bool = false) {
159
+ bool && (this.localPagination = Object.assign({}, {
160
+ current: 1, pageSize: this.pageSize
161
+ }))
162
+ this.loadData()
163
+ },
164
+ /**
165
+ * 加载数据方法
166
+ * @param {Object} pagination 分页选项器
167
+ * @param {Object} filters 过滤条件
168
+ * @param {Object} sorter 排序条件
169
+ */
170
+ loadData (pagination, filters, sorter) {
171
+ this.localLoading = true
172
+ // 暂存排序方式,避免 refresh 之后排序失效
173
+ if (sorter && sorter.field) {
174
+ this.sortField = sorter.field
175
+ }
176
+ if (sorter && sorter.order) {
177
+ this.sortOrder = sorter.order
178
+ }
179
+ const parameter = Object.assign({
180
+ querySummary: !pagination && this.showSummary, // 分页查询的情况不重新获取汇总数据
181
+ pageNo: (pagination && pagination.current) ||
182
+ this.showPagination && this.localPagination.current || this.pageNum,
183
+ pageSize: (pagination && pagination.pageSize) ||
184
+ this.showPagination && this.localPagination.pageSize || this.pageSize
185
+ },
186
+ (this.sortField && { sortField: this.sortField }) || {},
187
+ (this.sortOrder && { sortOrder: this.sortOrder }) || {},
188
+ { ...filters }
189
+ )
190
+ const result = this.data(parameter)
191
+ // 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.totalCount, r.data
192
+ // eslint-disable-next-line
193
+ if ((typeof result === 'object' || typeof result === 'function') && typeof result.then === 'function') {
194
+ result.then(r => {
195
+ this.localPagination = this.showPagination && Object.assign({}, this.localPagination, {
196
+ current: r.pageNo, // 返回结果中的当前分页数
197
+ total: r.totalCount, // 返回结果中的总记录数
198
+ showSizeChanger: this.showSizeChanger,
199
+ pageSize: (pagination && pagination.pageSize) || this.localPagination.pageSize
200
+ }) || false
201
+ // 为防止删除数据后导致页面当前页面数据长度为 0 ,自动翻页到上一页
202
+ if (r.data.length === 0 && this.showPagination && this.localPagination.current > 1) {
203
+ this.localPagination.current--
204
+ this.loadData()
205
+ return
206
+ }
207
+
208
+ // 这里用于判断接口是否有返回 r.totalCount 且 this.showPagination = 'auto' 且 pageNo 和 pageSize 存在 且 totalCount 小于等于 pageNo * pageSize 的大小
209
+ // 当情况满足时,表示数据不满足分页大小,关闭 table 分页功能
210
+ try {
211
+ if ((['auto'].includes(this.showPagination) && r.totalCount <= (r.pageNo * this.localPagination.pageSize))) {
212
+ this.localPagination.hideOnSinglePage = true
213
+ }
214
+ } catch (e) {
215
+ this.localPagination = false
216
+ }
217
+ this.localDataSource = r.data // 返回结果中的数组数据
218
+ this.localLoading = false
219
+ this.setScrollYHeight({ type: 'default' })
220
+ }, () => {
221
+ this.localLoading = false
222
+ this.setScrollYHeight({ type: 'default' })
223
+ })
224
+ }
225
+ },
226
+ setLocalDataSource (data) {
227
+ this.localDataSource = data
228
+ },
229
+ initTotalList (columns) {
230
+ const totalList = []
231
+ columns && columns instanceof Array && columns.forEach(column => {
232
+ if (column.needTotal) {
233
+ totalList.push({
234
+ ...column,
235
+ total: 0
236
+ })
237
+ }
238
+ })
239
+ return totalList
240
+ },
241
+ /**
242
+ * 用于更新已选中的列表数据 total 统计
243
+ * @param selectedRowKeys
244
+ * @param selectedRows
245
+ */
246
+ updateSelect (selectedRowKeys, selectedRows) {
247
+ this.selectedRows = selectedRows
248
+ this.selectedRowKeys = selectedRowKeys
249
+ const list = this.needTotalList
250
+ this.needTotalList = list.map(item => {
251
+ return {
252
+ ...item,
253
+ total: selectedRows.reduce((sum, val) => {
254
+ const total = sum + parseInt(get(val, item.dataIndex))
255
+ return isNaN(total) ? 0 : total
256
+ }, 0)
257
+ }
258
+ })
259
+ },
260
+ /**
261
+ * 清空 table 已选中项
262
+ */
263
+ clearSelected () {
264
+ if (this.rowSelection) {
265
+ this.rowSelection.onChange([], [])
266
+ this.updateSelect([], [])
267
+ }
268
+ },
269
+ /**
270
+ * 处理交给 table 使用者去处理 clear 事件时,内部选中统计同时调用
271
+ * @param callback
272
+ * @returns {*}
273
+ */
274
+ renderClear (callback) {
275
+ if (this.selectedRowKeys.length <= 0) return null
276
+ return (
277
+ <a style="margin-left: 24px" onClick={() => {
278
+ callback()
279
+ this.clearSelected()
280
+ }}>清空</a>
281
+ )
282
+ },
283
+ renderAlert () {
284
+ // 绘制统计列数据
285
+ const needTotalItems = this.needTotalList.map((item) => {
286
+ return (<span style="margin-right: 12px">
287
+ {item.title}总计 <a
288
+ style="font-weight: 600">{!item.customRender ? item.total : item.customRender(item.total)}</a>
289
+ </span>)
290
+ })
291
+
292
+ // 绘制 清空 按钮
293
+ const clearItem = (typeof this.alert.clear === 'boolean' && this.alert.clear) ? (
294
+ this.renderClear(this.clearSelected)
295
+ ) : (typeof this.alert.clear === 'function') ? (
296
+ this.renderClear(this.alert.clear)
297
+ ) : null
298
+
299
+ // 绘制 alert 组件
300
+ return (
301
+ <a-alert showIcon={true} style={{ marginBottom: '8px', fontSize: '14px' }}>
302
+ <template slot="message">
303
+ <span style="margin-right: 12px;">已选择: <a style="font-weight: 600">{this.selectedRows.length}</a></span>
304
+ {needTotalItems}
305
+ {clearItem}
306
+ </template>
307
+ </a-alert>
308
+ )
309
+ },
310
+ onExpand (expanded, record) {
311
+ this.$emit('expand', expanded, record)
312
+ },
313
+ handleRowClick (record, index) {
314
+ if (this.rowKey === '序号') {
315
+ this.clickedRowKey = index
316
+ } else {
317
+ this.clickedRowKey = record[this.rowKey]
318
+ }
319
+ this.$emit('rowClick', record)
320
+ },
321
+ hexToRgba (hex, alpha = 1) {
322
+ try {
323
+ const r = parseInt(hex.slice(1, 3), 16)
324
+ const g = parseInt(hex.slice(3, 5), 16)
325
+ const b = parseInt(hex.slice(5, 7), 16)
326
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`
327
+ } catch (e) {
328
+ return '#e6f7ff'
329
+ }
330
+ },
331
+ },
332
+
333
+ render () {
334
+ const props = {}
335
+ const localKeys = Object.keys(this.$data)
336
+ const showAlert = (typeof this.alert === 'object' && this.alert !== null && this.alert.show) && typeof this.rowSelection.selectedRowKeys !== 'undefined' || this.alert
337
+
338
+ Object.keys(T.props).forEach(k => {
339
+ const localKey = `local${k.substring(0, 1).toUpperCase()}${k.substring(1)}`
340
+ if (localKeys.includes(localKey)) {
341
+ props[k] = this[localKey]
342
+ return props[k]
343
+ }
344
+ if (k === 'rowSelection') {
345
+ if (showAlert && this.rowSelection) {
346
+ // 如果需要使用alert,则重新绑定 rowSelection 事件
347
+ props[k] = {
348
+ ...this.rowSelection,
349
+ selectedRows: this.selectedRows,
350
+ selectedRowKeys: this.selectedRowKeys,
351
+ onChange: (selectedRowKeys, selectedRows) => {
352
+ this.updateSelect(selectedRowKeys, selectedRows)
353
+ typeof this[k].onChange !== 'undefined' && this[k].onChange(selectedRowKeys, selectedRows)
354
+ }
355
+ }
356
+ return props[k]
357
+ } else if (!this.rowSelection) {
358
+ // 如果没打算开启 rowSelection 则清空默认的选择项
359
+ props[k] = null
360
+ return props[k]
361
+ }
362
+ }
363
+ this[k] && (props[k] = this[k])
364
+ return props[k]
365
+ })
366
+ // 取消原有的分页组件 产品设计分页组件和汇总在一行 重新分页逻辑
367
+ props.pagination = false
368
+ // 在 props 中添加自定义行属性
369
+ props.customRow = (record, index) => {
370
+ const isRowKeySequence = this.rowKey === '序号'
371
+ const isCurrentRow = isRowKeySequence
372
+ ? this.clickedRowKey === index
373
+ : this.clickedRowKey === record[this.rowKey]
374
+ return {
375
+ on: {
376
+ click: () => this.handleRowClick(record, index)
377
+ },
378
+ style: {
379
+ 'background-color': isCurrentRow ? this.clickedRowColor : ''
380
+ }
381
+ }
382
+ }
383
+ // 自定义底部汇总插槽组件
384
+ const pagination = (
385
+ !!this.showPagination && <a-row type={'flex'} justify={'start'} style={{ marginTop: '8px' }}>
386
+ <a-col flex="1" style={{
387
+ alignItems: 'center',
388
+ display: 'flex',
389
+ justifyContent: 'start',
390
+ boxSizing: 'border-box',
391
+ paddingRight: '2rem'
392
+ }}>
393
+ {this.$slots.fixedfooter}
394
+ </a-col>
395
+ <a-col flex="0 0">
396
+ <a-pagination
397
+ total={this.localPagination.total}
398
+ onChange={(page, pageSize) => {
399
+ this.pageSize = pageSize
400
+ this.pageNum = page
401
+ this.loadData({
402
+ current: page,
403
+ pageSize: pageSize
404
+ })
405
+ }
406
+ }
407
+ onShowSizeChange={(page, pageSize) => {
408
+ this.pageSize = pageSize
409
+ this.pageNum = page
410
+ this.loadData({
411
+ current: page,
412
+ pageSize: pageSize
413
+ })
414
+ }
415
+ }
416
+ show-total={(total, range) => range[0] === range[1] ? `${range[0]} | 共 ${total} 项` : `${range[0]}-${range[1]} | 共 ${total} 项`}
417
+ default-current={this.localPagination.current}
418
+ showSizeChanger={this.localPagination.showSizeChanger}/>
419
+ </a-col>
420
+ </a-row>
421
+ )
422
+ const table = (
423
+ <a-table {...{ props, scopedSlots: { ...this.$scopedSlots } }} onChange={this.loadData}
424
+ onExpand={(expanded, record) => this.onExpand(expanded, record)}>
425
+ {Object.keys(this.$slots).map(name => (<template slot={name}>{this.$slots[name]}</template>))}
426
+ </a-table>
427
+ )
428
+
429
+ return (
430
+ <div class="table-wrapper">
431
+ {showAlert && this.showSelected && this.selectRowMode === 'default' ? this.renderAlert() : null}
432
+ {table}
433
+ {!this.hidePagination ? pagination : null}
434
+ </div>
435
+ )
436
+ }
437
+ }