@epxing/designer 0.0.0-stage → 5.3.0-beta.2

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 (491) hide show
  1. package/API.md +160 -0
  2. package/README.md +45 -2
  3. package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
  4. package/dist/_virtual/preload-helper.js +88 -0
  5. package/dist/assets/default-icon-2193FMjv.png +0 -0
  6. package/dist/assets/technology_bg-oWIS2awO.jpg +0 -0
  7. package/dist/assets/theme_black-Ctdygcr4.png +0 -0
  8. package/dist/assets/theme_technology-DJk-2e7g.png +0 -0
  9. package/dist/assets/theme_white-uMQ6JYml.png +0 -0
  10. package/dist/src/assets/images/dashboard/theme_black.png.js +4 -0
  11. package/dist/src/assets/images/dashboard/theme_technology.png.js +4 -0
  12. package/dist/src/assets/images/dashboard/theme_white.png.js +4 -0
  13. package/dist/src/assets/images/default-icon.png.js +4 -0
  14. package/dist/src/index.js +53 -0
  15. package/dist/src/page-designer/PageConfigPreview.js +102 -0
  16. package/dist/src/page-designer/PageDesigner.js +844 -0
  17. package/dist/src/page-designer/designer.js +1120 -0
  18. package/dist/src/page-designer/index.js +52 -0
  19. package/dist/src/page-designer/mixins/dragSourceMixin.js +95 -0
  20. package/dist/src/page-designer/page-variable-panel/JsonEditor.js +106 -0
  21. package/dist/src/page-designer/page-variable-panel/PageVariablePanel.js +939 -0
  22. package/dist/src/page-designer/page-variable-panel/index.js +7 -0
  23. package/dist/src/page-designer/page-variable-panel/jsonlint.js +230 -0
  24. package/dist/src/page-designer/previews/add-form/Preview.js +8 -0
  25. package/dist/src/page-designer/previews/add-form/Preview.vue.js +328 -0
  26. package/dist/src/page-designer/previews/add-form-item/Preview.js +194 -0
  27. package/dist/src/page-designer/previews/button/Preview.js +30 -0
  28. package/dist/src/page-designer/previews/card/Preview.js +87 -0
  29. package/dist/src/page-designer/previews/carousel/CarouselItemPreview.js +33 -0
  30. package/dist/src/page-designer/previews/carousel/Preview.js +61 -0
  31. package/dist/src/page-designer/previews/collapse/CollapseItemPreview.js +118 -0
  32. package/dist/src/page-designer/previews/collapse/Preview.js +35 -0
  33. package/dist/src/page-designer/previews/dropdown/Preview.js +68 -0
  34. package/dist/src/page-designer/previews/entity-list/Preview.js +522 -0
  35. package/dist/src/page-designer/previews/entity-sub-list/Preview.js +352 -0
  36. package/dist/src/page-designer/previews/entity-virtual-list/Preview.js +11 -0
  37. package/dist/src/page-designer/previews/form-field/preview/Checkbox.js +91 -0
  38. package/dist/src/page-designer/previews/form-field/preview/Date.js +77 -0
  39. package/dist/src/page-designer/previews/form-field/preview/Input.js +74 -0
  40. package/dist/src/page-designer/previews/form-field/preview/InputNumber.js +74 -0
  41. package/dist/src/page-designer/previews/form-field/preview/Object.js +77 -0
  42. package/dist/src/page-designer/previews/form-field/preview/Radio.js +146 -0
  43. package/dist/src/page-designer/previews/form-field/preview/Select.js +78 -0
  44. package/dist/src/page-designer/previews/form-field/preview/Textarea.js +78 -0
  45. package/dist/src/page-designer/previews/grid/Preview.js +139 -0
  46. package/dist/src/page-designer/previews/html/Preview.js +18 -0
  47. package/dist/src/page-designer/previews/icon/Preview.js +20 -0
  48. package/dist/src/page-designer/previews/image/Preview.js +36 -0
  49. package/dist/src/page-designer/previews/index.js +74 -0
  50. package/dist/src/page-designer/previews/layout/ColumnPreview.js +47 -0
  51. package/dist/src/page-designer/previews/layout/Preview.js +110 -0
  52. package/dist/src/page-designer/previews/num/Preview.js +132 -0
  53. package/dist/src/page-designer/previews/page-tabs/Preview.js +75 -0
  54. package/dist/src/page-designer/previews/step/Preview.js +207 -0
  55. package/dist/src/page-designer/previews/tabs/Preview.js +95 -0
  56. package/dist/src/page-designer/previews/tabs/tab-pane/Preview.js +33 -0
  57. package/dist/src/page-designer/previews/text/Preview.js +38 -0
  58. package/dist/src/page-designer/previews/text-editor/Preview.js +23 -0
  59. package/dist/src/page-designer/previews/video/Preview.js +10 -0
  60. package/dist/src/page-designer/setting-panel/Advance.js +281 -0
  61. package/dist/src/page-designer/setting-panel/CodeEditor.js +94 -0
  62. package/dist/src/page-designer/setting-panel/Property.js +165 -0
  63. package/dist/src/page-designer/setting-panel/Setting.js +296 -0
  64. package/dist/src/page-designer/setting-panel/Style.js +1591 -0
  65. package/dist/src/page-designer/setting-panel/css-editor/CssEditor.js +98 -0
  66. package/dist/src/page-designer/setting-panel/css-editor/css-hint.js +84 -0
  67. package/dist/src/page-designer/setting-panel/index.js +11 -0
  68. package/dist/src/page-designer/template-attribute-panel/TemplateAttributePanel.js +487 -0
  69. package/dist/src/page-designer/template-attribute-panel/index.js +5 -0
  70. package/dist/src/page-designer/template-library/Library.js +219 -0
  71. package/dist/src/page-designer/template-library/index.js +5 -0
  72. package/dist/src/page-designer/widget-library/Base.js +170 -0
  73. package/dist/src/page-designer/widget-library/Library.js +213 -0
  74. package/dist/src/page-designer/widget-library/index.js +7 -0
  75. package/dist/src/page-designer/widget-preview/Container.js +80 -0
  76. package/dist/src/page-designer/widget-preview/DragGhost.js +54 -0
  77. package/dist/src/page-designer/widget-preview/DropZoneOverlay.js +42 -0
  78. package/dist/src/page-designer/widget-preview/HoverOverlay.js +61 -0
  79. package/dist/src/page-designer/widget-preview/Mixin.js +260 -0
  80. package/dist/src/page-designer/widget-preview/Placeholder.js +28 -0
  81. package/dist/src/page-designer/widget-preview/Preview.js +277 -0
  82. package/dist/src/page-designer/widget-preview/PreviewItem.js +83 -0
  83. package/dist/src/page-designer/widget-preview/SelectedOverlay.js +332 -0
  84. package/dist/src/page-designer/widget-preview/Template.js +66 -0
  85. package/dist/src/page-designer/widget-preview/WidgetWrapper.js +170 -0
  86. package/dist/src/page-designer/widget-preview/directive.js +159 -0
  87. package/dist/src/page-designer/widget-preview/dropPosition.js +50 -0
  88. package/dist/src/page-designer/widget-preview/index.js +23 -0
  89. package/dist/src/page-designer/widget-preview/overlayPositionMixin.js +87 -0
  90. package/dist/src/page-designer/widget-preview/resolvePreviewName.js +32 -0
  91. package/dist/src/page-designer/widget-tree/Item.js +580 -0
  92. package/dist/src/page-designer/widget-tree/Tree.js +855 -0
  93. package/dist/src/page-designer/widget-tree/index.js +7 -0
  94. package/dist/src/visual/AddForm.js +172 -0
  95. package/dist/src/visual/AddFormItem.js +480 -0
  96. package/dist/src/visual/AppIndex.js +243 -0
  97. package/dist/src/visual/ApplyForm.js +135 -0
  98. package/dist/src/visual/AttributeList.js +344 -0
  99. package/dist/src/visual/BasePage.js +77 -0
  100. package/dist/src/visual/Button.js +5 -0
  101. package/dist/src/visual/Button.vue.js +89 -0
  102. package/dist/src/visual/CardNum.js +74 -0
  103. package/dist/src/visual/CategoryList.js +569 -0
  104. package/dist/src/visual/Chart.js +27 -0
  105. package/dist/src/visual/ChartNew.js +5 -0
  106. package/dist/src/visual/ChartNew.vue.js +54 -0
  107. package/dist/src/visual/CheckForm.js +110 -0
  108. package/dist/src/visual/ClientList.js +41 -0
  109. package/dist/src/visual/CodeManage.js +113 -0
  110. package/dist/src/visual/Component.js +6 -0
  111. package/dist/src/visual/Component.vue.js +1332 -0
  112. package/dist/src/visual/ComponentList.js +280 -0
  113. package/dist/src/visual/Config.js +8 -0
  114. package/dist/src/visual/Config.vue.js +862 -0
  115. package/dist/src/visual/ConfigItem.js +8 -0
  116. package/dist/src/visual/ConfigItem.vue.js +192 -0
  117. package/dist/src/visual/ConfigSelectItems.js +8 -0
  118. package/dist/src/visual/ConfigSelectItems.vue.js +260 -0
  119. package/dist/src/visual/CreatePage.js +389 -0
  120. package/dist/src/visual/DashboardDiv.js +58 -0
  121. package/dist/src/visual/DashboardTabs.js +9 -0
  122. package/dist/src/visual/DashboardTabs.vue.js +127 -0
  123. package/dist/src/visual/DashboardWidget.js +5 -0
  124. package/dist/src/visual/DashboardWidget.vue.js +62 -0
  125. package/dist/src/visual/DblogList.js +82 -0
  126. package/dist/src/visual/EntityAddPage.js +49 -0
  127. package/dist/src/visual/EntityApplyPage.js +54 -0
  128. package/dist/src/visual/EntityCardList.js +455 -0
  129. package/dist/src/visual/EntityCheckPage.js +66 -0
  130. package/dist/src/visual/EntityFindPage.js +45 -0
  131. package/dist/src/visual/EntityList.js +6 -0
  132. package/dist/src/visual/EntityList.vue.js +1221 -0
  133. package/dist/src/visual/EntityListPage.js +43 -0
  134. package/dist/src/visual/EntityNoSubmitSubList.js +267 -0
  135. package/dist/src/visual/EntityRightSubList.js +29 -0
  136. package/dist/src/visual/EntitySubAdd.js +10 -0
  137. package/dist/src/visual/EntitySubGridItem.js +66 -0
  138. package/dist/src/visual/EntitySubList.js +434 -0
  139. package/dist/src/visual/EntityTreeFindPage.js +32 -0
  140. package/dist/src/visual/EntityTreeManage.js +49 -0
  141. package/dist/src/visual/EntityTreePage.js +42 -0
  142. package/dist/src/visual/ExcelPreview.js +10 -0
  143. package/dist/src/visual/FormField.js +5 -0
  144. package/dist/src/visual/FormField.vue.js +121 -0
  145. package/dist/src/visual/HeaderNew.js +161 -0
  146. package/dist/src/visual/Html.js +8 -0
  147. package/dist/src/visual/Html.vue.js +109 -0
  148. package/dist/src/visual/Import.js +53 -0
  149. package/dist/src/visual/InterfaceSubList.js +21 -0
  150. package/dist/src/visual/ListFirst.js +704 -0
  151. package/dist/src/visual/MEntityAddPage.js +66 -0
  152. package/dist/src/visual/MEntityList.js +485 -0
  153. package/dist/src/visual/MEntityListPage.js +40 -0
  154. package/dist/src/visual/MEntitySubList.js +237 -0
  155. package/dist/src/visual/MetaList.js +23 -0
  156. package/dist/src/visual/ModuleIndexPage.js +67 -0
  157. package/dist/src/visual/ModuleList.js +47 -0
  158. package/dist/src/visual/NavAddForm.js +173 -0
  159. package/dist/src/visual/NavFormCatalogItem.js +44 -0
  160. package/dist/src/visual/NumItem.js +70 -0
  161. package/dist/src/visual/NumStatistic.js +6 -0
  162. package/dist/src/visual/NumStatistic.vue.js +81 -0
  163. package/dist/src/visual/OrgChart.js +107 -0
  164. package/dist/src/visual/PageCatalog.js +27 -0
  165. package/dist/src/visual/PageConfig.js +223 -0
  166. package/dist/src/visual/PageTabs.js +49 -0
  167. package/dist/src/visual/Progress.js +40 -0
  168. package/dist/src/visual/ProgressItem.js +44 -0
  169. package/dist/src/visual/SystemManager.js +77 -0
  170. package/dist/src/visual/Title.js +45 -0
  171. package/dist/src/visual/TodoList.js +14 -0
  172. package/dist/src/visual/UserFormItem.js +41 -0
  173. package/dist/src/visual/UserManage.js +35 -0
  174. package/dist/src/visual/chart/CircularPie.js +9 -0
  175. package/dist/src/visual/chart/Column.js +70 -0
  176. package/dist/src/visual/chart/HoriColumn.js +9 -0
  177. package/dist/src/visual/chart/Line.js +9 -0
  178. package/dist/src/visual/chart/Pie.js +9 -0
  179. package/dist/src/visual/config/Background.js +526 -0
  180. package/dist/src/visual/config/Chart.js +154 -0
  181. package/dist/src/visual/config/Checkbox.js +63 -0
  182. package/dist/src/visual/config/Color.js +41 -0
  183. package/dist/src/visual/config/DesignReport.js +24 -0
  184. package/dist/src/visual/config/Event.js +304 -0
  185. package/dist/src/visual/config/Field.js +520 -0
  186. package/dist/src/visual/config/Font.js +202 -0
  187. package/dist/src/visual/config/FormItem.js +23 -0
  188. package/dist/src/visual/config/Function.js +114 -0
  189. package/dist/src/visual/config/Html.js +111 -0
  190. package/dist/src/visual/config/Image.js +102 -0
  191. package/dist/src/visual/config/Input.js +177 -0
  192. package/dist/src/visual/config/Input.vue.js +479 -0
  193. package/dist/src/visual/config/LazyDialog.js +41 -0
  194. package/dist/src/visual/config/List.js +65 -0
  195. package/dist/src/visual/config/ListField.js +2080 -0
  196. package/dist/src/visual/config/MField.js +733 -0
  197. package/dist/src/visual/config/Number.js +37 -0
  198. package/dist/src/visual/config/Object.js +168 -0
  199. package/dist/src/visual/config/Operate.js +1109 -0
  200. package/dist/src/visual/config/OperateItem.js +1186 -0
  201. package/dist/src/visual/config/Options.js +8 -0
  202. package/dist/src/visual/config/Options.vue.js +278 -0
  203. package/dist/src/visual/config/OrderField.js +505 -0
  204. package/dist/src/visual/config/Page.js +76 -0
  205. package/dist/src/visual/config/Params.js +353 -0
  206. package/dist/src/visual/config/Radio.js +127 -0
  207. package/dist/src/visual/config/Row.js +104 -0
  208. package/dist/src/visual/config/Scope.js +350 -0
  209. package/dist/src/visual/config/Select.js +95 -0
  210. package/dist/src/visual/config/Switch.js +37 -0
  211. package/dist/src/visual/config/Textarea.js +175 -0
  212. package/dist/src/visual/config/Textarea.vue.js +507 -0
  213. package/dist/src/visual/config/Tree.js +138 -0
  214. package/dist/src/visual/config/remote-cache.js +30 -0
  215. package/dist/src/visual/config/show-condition.js +20 -0
  216. package/dist/src/visual/config/variable-sources.js +27 -0
  217. package/dist/src/visual/config/wait-ref.js +19 -0
  218. package/dist/src/visual/config-page/ComponentLibrary.js +170 -0
  219. package/dist/src/visual/config-page/ComponentLibraryDialog.js +250 -0
  220. package/dist/src/visual/config-page/ComponentList.js +9 -0
  221. package/dist/src/visual/config-page/ComponentList.vue.js +292 -0
  222. package/dist/src/visual/config-page/ComponentPreview.js +8 -0
  223. package/dist/src/visual/config-page/ComponentPreview.vue.js +151 -0
  224. package/dist/src/visual/config-page/ConfigOption.js +13 -0
  225. package/dist/src/visual/config-page/ConfigPanel.js +302 -0
  226. package/dist/src/visual/config-page/Dashboard.js +2160 -0
  227. package/dist/src/visual/config-page/DashboardDesign.js +606 -0
  228. package/dist/src/visual/config-page/DashboardGlobalConfig.js +6 -0
  229. package/dist/src/visual/config-page/DashboardGlobalConfig.vue.js +292 -0
  230. package/dist/src/visual/config-page/DashboardMobile.js +1115 -0
  231. package/dist/src/visual/config-page/DashboardSetting.js +86 -0
  232. package/dist/src/visual/config-page/PagePreview.js +8 -0
  233. package/dist/src/visual/config-page/PagePreview.vue.js +72 -0
  234. package/dist/src/visual/config-page/StyleConfig.js +979 -0
  235. package/dist/src/visual/config-page/VisualConfigPage.js +645 -0
  236. package/dist/src/visual/config-page/dashboard-theme-setting/Background.js +180 -0
  237. package/dist/src/visual/config-page/dashboard-theme-setting/Border.js +314 -0
  238. package/dist/src/visual/config-page/dashboard-theme-setting/Font.js +192 -0
  239. package/dist/src/visual/config-page/dashboard-theme-setting/Index.js +545 -0
  240. package/dist/src/visual/config-page/dashboard-theme-setting/Shadow.js +174 -0
  241. package/dist/src/visual/config-page/index.js +90 -0
  242. package/dist/src/visual/index.js +151 -0
  243. package/dist/src/visual/mixins/innerGridMixin.js +122 -0
  244. package/dist/src/visual/search/Filter.js +49 -0
  245. package/dist/src/visual/step/Index.js +8 -0
  246. package/dist/src/visual/step/Index.vue.js +485 -0
  247. package/dist/src/visual/step/Item.js +139 -0
  248. package/dist/src/visual/widgets/CardFormItemVisual.js +45 -0
  249. package/dist/src/visual/widgets/CarouselVisual.js +8 -0
  250. package/dist/src/visual/widgets/CarouselVisual.vue.js +303 -0
  251. package/dist/src/visual/widgets/CollapseVisual.js +8 -0
  252. package/dist/src/visual/widgets/CollapseVisual.vue.js +202 -0
  253. package/dist/src/visual/widgets/DropdownVisual.js +8 -0
  254. package/dist/src/visual/widgets/DropdownVisual.vue.js +955 -0
  255. package/dist/src/visual/widgets/LayoutConfig.js +8 -0
  256. package/dist/src/visual/widgets/LayoutConfig.vue.js +168 -0
  257. package/dist/src/visual/widgets/ListVisual.js +349 -0
  258. package/dist/src/visual/widgets/MEntityListFindVisual.js +76 -0
  259. package/dist/src/visual/widgets/ProcessFormItemVisual.js +5 -0
  260. package/dist/src/visual/widgets/ProcessFormItemVisual.vue.js +45 -0
  261. package/dist/src/visual/widgets/TabsConfig.js +8 -0
  262. package/dist/src/visual/widgets/TabsConfig.vue.js +343 -0
  263. package/dist/style.css +9907 -0
  264. package/package.json +104 -3
  265. package/src/index.js +27 -0
  266. package/src/page-designer/PageConfigPreview.vue +103 -0
  267. package/src/page-designer/PageDesigner.vue +1017 -0
  268. package/src/page-designer/designer.js +1299 -0
  269. package/src/page-designer/index.js +38 -0
  270. package/src/page-designer/mixins/dragSourceMixin.js +113 -0
  271. package/src/page-designer/page-variable-panel/JsonEditor.vue +109 -0
  272. package/src/page-designer/page-variable-panel/PageVariablePanel.vue +781 -0
  273. package/src/page-designer/page-variable-panel/index.js +6 -0
  274. package/src/page-designer/page-variable-panel/jsonlint.js +2 -0
  275. package/src/page-designer/previews/add-form/Preview.vue +331 -0
  276. package/src/page-designer/previews/add-form-item/Preview.vue +167 -0
  277. package/src/page-designer/previews/button/Preview.vue +27 -0
  278. package/src/page-designer/previews/card/Preview.vue +78 -0
  279. package/src/page-designer/previews/carousel/CarouselItemPreview.vue +32 -0
  280. package/src/page-designer/previews/carousel/Preview.vue +36 -0
  281. package/src/page-designer/previews/collapse/CollapseItemPreview.vue +136 -0
  282. package/src/page-designer/previews/collapse/Preview.vue +28 -0
  283. package/src/page-designer/previews/dropdown/Preview.vue +21 -0
  284. package/src/page-designer/previews/entity-list/Preview.vue +382 -0
  285. package/src/page-designer/previews/entity-sub-list/Preview.vue +283 -0
  286. package/src/page-designer/previews/entity-virtual-list/Preview.vue +14 -0
  287. package/src/page-designer/previews/form-field/preview/Checkbox.vue +57 -0
  288. package/src/page-designer/previews/form-field/preview/Date.vue +56 -0
  289. package/src/page-designer/previews/form-field/preview/Input.vue +53 -0
  290. package/src/page-designer/previews/form-field/preview/InputNumber.vue +53 -0
  291. package/src/page-designer/previews/form-field/preview/Object.vue +53 -0
  292. package/src/page-designer/previews/form-field/preview/Radio.vue +69 -0
  293. package/src/page-designer/previews/form-field/preview/Select.vue +55 -0
  294. package/src/page-designer/previews/form-field/preview/Textarea.vue +57 -0
  295. package/src/page-designer/previews/grid/Preview.vue +156 -0
  296. package/src/page-designer/previews/html/Preview.vue +11 -0
  297. package/src/page-designer/previews/icon/Preview.vue +12 -0
  298. package/src/page-designer/previews/image/Preview.vue +37 -0
  299. package/src/page-designer/previews/index.js +74 -0
  300. package/src/page-designer/previews/layout/ColumnPreview.vue +89 -0
  301. package/src/page-designer/previews/layout/Preview.vue +96 -0
  302. package/src/page-designer/previews/num/Preview.vue +100 -0
  303. package/src/page-designer/previews/page-tabs/Preview.vue +53 -0
  304. package/src/page-designer/previews/step/Preview.vue +190 -0
  305. package/src/page-designer/previews/tabs/Preview.vue +66 -0
  306. package/src/page-designer/previews/tabs/tab-pane/Preview.vue +32 -0
  307. package/src/page-designer/previews/text/Preview.vue +26 -0
  308. package/src/page-designer/previews/text-editor/Preview.vue +14 -0
  309. package/src/page-designer/previews/video/Preview.vue +9 -0
  310. package/src/page-designer/setting-panel/Advance.vue +175 -0
  311. package/src/page-designer/setting-panel/CodeEditor.vue +88 -0
  312. package/src/page-designer/setting-panel/Property.vue +163 -0
  313. package/src/page-designer/setting-panel/Setting.vue +271 -0
  314. package/src/page-designer/setting-panel/Style.vue +1096 -0
  315. package/src/page-designer/setting-panel/css-editor/CssEditor.vue +93 -0
  316. package/src/page-designer/setting-panel/css-editor/css-hint.js +58 -0
  317. package/src/page-designer/setting-panel/index.js +10 -0
  318. package/src/page-designer/template-attribute-panel/TemplateAttributePanel.vue +383 -0
  319. package/src/page-designer/template-attribute-panel/index.js +2 -0
  320. package/src/page-designer/template-library/Library.vue +153 -0
  321. package/src/page-designer/template-library/index.js +4 -0
  322. package/src/page-designer/widget-library/Base.vue +156 -0
  323. package/src/page-designer/widget-library/Library.vue +282 -0
  324. package/src/page-designer/widget-library/index.js +6 -0
  325. package/src/page-designer/widget-preview/Container.vue +89 -0
  326. package/src/page-designer/widget-preview/DragGhost.vue +83 -0
  327. package/src/page-designer/widget-preview/DropZoneOverlay.vue +51 -0
  328. package/src/page-designer/widget-preview/HoverOverlay.vue +85 -0
  329. package/src/page-designer/widget-preview/Mixin.js +285 -0
  330. package/src/page-designer/widget-preview/Placeholder.vue +22 -0
  331. package/src/page-designer/widget-preview/Preview.vue +322 -0
  332. package/src/page-designer/widget-preview/PreviewItem.vue +162 -0
  333. package/src/page-designer/widget-preview/SelectedOverlay.vue +340 -0
  334. package/src/page-designer/widget-preview/Template.vue +77 -0
  335. package/src/page-designer/widget-preview/WidgetWrapper.vue +197 -0
  336. package/src/page-designer/widget-preview/directive.js +258 -0
  337. package/src/page-designer/widget-preview/dropPosition.js +51 -0
  338. package/src/page-designer/widget-preview/index.js +23 -0
  339. package/src/page-designer/widget-preview/overlayPositionMixin.js +88 -0
  340. package/src/page-designer/widget-preview/resolvePreviewName.js +33 -0
  341. package/src/page-designer/widget-tree/Item.vue +719 -0
  342. package/src/page-designer/widget-tree/Tree.vue +995 -0
  343. package/src/page-designer/widget-tree/index.js +6 -0
  344. package/src/visual/AddForm.vue +172 -0
  345. package/src/visual/AddFormItem.vue +482 -0
  346. package/src/visual/AppIndex.vue +245 -0
  347. package/src/visual/ApplyForm.vue +140 -0
  348. package/src/visual/AttributeList.vue +344 -0
  349. package/src/visual/BasePage.vue +76 -0
  350. package/src/visual/Button.vue +80 -0
  351. package/src/visual/CardNum.vue +73 -0
  352. package/src/visual/CategoryList.vue +563 -0
  353. package/src/visual/Chart.vue +29 -0
  354. package/src/visual/ChartNew.vue +49 -0
  355. package/src/visual/CheckForm.vue +106 -0
  356. package/src/visual/ClientList.vue +42 -0
  357. package/src/visual/CodeManage.vue +116 -0
  358. package/src/visual/Component.vue +1342 -0
  359. package/src/visual/ComponentList.vue +280 -0
  360. package/src/visual/Config.vue +881 -0
  361. package/src/visual/ConfigItem.vue +218 -0
  362. package/src/visual/ConfigSelectItems.vue +445 -0
  363. package/src/visual/CreatePage.vue +389 -0
  364. package/src/visual/DashboardDiv.vue +197 -0
  365. package/src/visual/DashboardTabs.vue +118 -0
  366. package/src/visual/DashboardWidget.vue +55 -0
  367. package/src/visual/DblogList.vue +84 -0
  368. package/src/visual/EntityAddPage.vue +52 -0
  369. package/src/visual/EntityApplyPage.vue +57 -0
  370. package/src/visual/EntityCardList.vue +449 -0
  371. package/src/visual/EntityCheckPage.vue +69 -0
  372. package/src/visual/EntityFindPage.vue +55 -0
  373. package/src/visual/EntityList.vue +838 -0
  374. package/src/visual/EntityListPage.vue +97 -0
  375. package/src/visual/EntityNoSubmitSubList.vue +273 -0
  376. package/src/visual/EntityRightSubList.vue +32 -0
  377. package/src/visual/EntitySubAdd.vue +11 -0
  378. package/src/visual/EntitySubGridItem.vue +67 -0
  379. package/src/visual/EntitySubList.vue +440 -0
  380. package/src/visual/EntityTreeFindPage.vue +36 -0
  381. package/src/visual/EntityTreeManage.vue +50 -0
  382. package/src/visual/EntityTreePage.vue +45 -0
  383. package/src/visual/ExcelPreview.vue +11 -0
  384. package/src/visual/FormField.vue +113 -0
  385. package/src/visual/HeaderNew.vue +176 -0
  386. package/src/visual/Html.vue +104 -0
  387. package/src/visual/Import.vue +55 -0
  388. package/src/visual/InterfaceSubList.vue +23 -0
  389. package/src/visual/ListFirst.vue +614 -0
  390. package/src/visual/MEntityAddPage.vue +71 -0
  391. package/src/visual/MEntityList.vue +488 -0
  392. package/src/visual/MEntityListPage.vue +46 -0
  393. package/src/visual/MEntitySubList.vue +237 -0
  394. package/src/visual/MetaList.vue +24 -0
  395. package/src/visual/ModuleIndexPage.vue +70 -0
  396. package/src/visual/ModuleList.vue +46 -0
  397. package/src/visual/NavAddForm.vue +177 -0
  398. package/src/visual/NavFormCatalogItem.vue +47 -0
  399. package/src/visual/NumItem.vue +69 -0
  400. package/src/visual/NumStatistic.vue +242 -0
  401. package/src/visual/OrgChart.vue +113 -0
  402. package/src/visual/PageCatalog.vue +26 -0
  403. package/src/visual/PageConfig.vue +278 -0
  404. package/src/visual/PageTabs.vue +55 -0
  405. package/src/visual/Progress.vue +39 -0
  406. package/src/visual/ProgressItem.vue +43 -0
  407. package/src/visual/SystemManager.vue +80 -0
  408. package/src/visual/Title.vue +44 -0
  409. package/src/visual/TodoList.vue +18 -0
  410. package/src/visual/UserFormItem.vue +49 -0
  411. package/src/visual/UserManage.vue +36 -0
  412. package/src/visual/chart/CircularPie.vue +7 -0
  413. package/src/visual/chart/Column.vue +73 -0
  414. package/src/visual/chart/HoriColumn.vue +7 -0
  415. package/src/visual/chart/Line.vue +7 -0
  416. package/src/visual/chart/Pie.vue +7 -0
  417. package/src/visual/config/Background.vue +398 -0
  418. package/src/visual/config/Chart.vue +139 -0
  419. package/src/visual/config/Checkbox.vue +64 -0
  420. package/src/visual/config/Color.vue +40 -0
  421. package/src/visual/config/DesignReport.vue +20 -0
  422. package/src/visual/config/Event.vue +220 -0
  423. package/src/visual/config/Field.vue +597 -0
  424. package/src/visual/config/Font.vue +149 -0
  425. package/src/visual/config/FormItem.vue +25 -0
  426. package/src/visual/config/Function.vue +78 -0
  427. package/src/visual/config/Html.vue +98 -0
  428. package/src/visual/config/Image.vue +132 -0
  429. package/src/visual/config/Input.vue +712 -0
  430. package/src/visual/config/LazyDialog.vue +44 -0
  431. package/src/visual/config/List.vue +68 -0
  432. package/src/visual/config/ListField.vue +1714 -0
  433. package/src/visual/config/MField.vue +601 -0
  434. package/src/visual/config/Number.vue +41 -0
  435. package/src/visual/config/Object.vue +177 -0
  436. package/src/visual/config/Operate.vue +1083 -0
  437. package/src/visual/config/OperateItem.vue +917 -0
  438. package/src/visual/config/Options.vue +330 -0
  439. package/src/visual/config/OrderField.vue +587 -0
  440. package/src/visual/config/Page.vue +45 -0
  441. package/src/visual/config/Params.vue +228 -0
  442. package/src/visual/config/Radio.vue +93 -0
  443. package/src/visual/config/Row.vue +78 -0
  444. package/src/visual/config/Scope.vue +363 -0
  445. package/src/visual/config/Select.vue +93 -0
  446. package/src/visual/config/Switch.vue +36 -0
  447. package/src/visual/config/Textarea.vue +754 -0
  448. package/src/visual/config/Tree.vue +135 -0
  449. package/src/visual/config/remote-cache.js +35 -0
  450. package/src/visual/config/show-condition.js +21 -0
  451. package/src/visual/config/variable-sources.js +27 -0
  452. package/src/visual/config/wait-ref.js +17 -0
  453. package/src/visual/config-page/ComponentLibrary.vue +220 -0
  454. package/src/visual/config-page/ComponentLibraryDialog.vue +262 -0
  455. package/src/visual/config-page/ComponentList.vue +580 -0
  456. package/src/visual/config-page/ComponentPreview.vue +206 -0
  457. package/src/visual/config-page/ConfigOption.vue +16 -0
  458. package/src/visual/config-page/ConfigPanel.vue +301 -0
  459. package/src/visual/config-page/Dashboard.vue +2331 -0
  460. package/src/visual/config-page/DashboardDesign.vue +656 -0
  461. package/src/visual/config-page/DashboardGlobalConfig.vue +158 -0
  462. package/src/visual/config-page/DashboardMobile.vue +1118 -0
  463. package/src/visual/config-page/DashboardSetting.vue +47 -0
  464. package/src/visual/config-page/PagePreview.vue +105 -0
  465. package/src/visual/config-page/StyleConfig.vue +656 -0
  466. package/src/visual/config-page/VisualConfigPage.vue +746 -0
  467. package/src/visual/config-page/dashboard-theme-setting/Background.vue +98 -0
  468. package/src/visual/config-page/dashboard-theme-setting/Border.vue +185 -0
  469. package/src/visual/config-page/dashboard-theme-setting/Font.vue +101 -0
  470. package/src/visual/config-page/dashboard-theme-setting/Index.vue +471 -0
  471. package/src/visual/config-page/dashboard-theme-setting/Shadow.vue +102 -0
  472. package/src/visual/config-page/index.js +93 -0
  473. package/src/visual/index.js +23 -0
  474. package/src/visual/mixins/innerGridMixin.js +128 -0
  475. package/src/visual/search/Filter.vue +50 -0
  476. package/src/visual/step/Index.vue +361 -0
  477. package/src/visual/step/Item.vue +140 -0
  478. package/src/visual/widgets/CardFormItemVisual.vue +46 -0
  479. package/src/visual/widgets/CarouselVisual.vue +291 -0
  480. package/src/visual/widgets/CollapseVisual.vue +203 -0
  481. package/src/visual/widgets/DropdownVisual.vue +541 -0
  482. package/src/visual/widgets/LayoutConfig.vue +186 -0
  483. package/src/visual/widgets/ListVisual.vue +349 -0
  484. package/src/visual/widgets/MEntityListFindVisual.vue +77 -0
  485. package/src/visual/widgets/ProcessFormItemVisual.vue +58 -0
  486. package/src/visual/widgets/TabsConfig.vue +266 -0
  487. package/types/index.d.ts +22 -0
  488. package/types/page-designer.d.ts +3 -0
  489. package/types/visual-component.d.ts +1 -0
  490. package/types/visual-entity-list.d.ts +1 -0
  491. package/types/visual-entity-sub-list.d.ts +1 -0
@@ -0,0 +1,1332 @@
1
+ import { createVNode, resolveComponent } from "vue";
2
+ import ConfigOptions from "./config/Options.js";
3
+ import { getCached, attributeTreeKey } from "./config/remote-cache.js";
4
+ import { compileShowCondition } from "./config/show-condition.js";
5
+ import { evalWith } from "@epxing/utils/src/eval-with";
6
+ import { mapGetters, mapState } from "vuex";
7
+ import { cloneDeep, isEqual } from "lodash-es";
8
+ function diffPatch(prev, next) {
9
+ const patch = {};
10
+ let changed = false;
11
+ for (const key in next) {
12
+ if (!isEqual(prev[key], next[key])) {
13
+ patch[key] = next[key];
14
+ changed = true;
15
+ }
16
+ }
17
+ for (const key in prev) {
18
+ if (!(key in next)) {
19
+ patch[key] = null;
20
+ changed = true;
21
+ }
22
+ }
23
+ return changed ? patch : null;
24
+ }
25
+ const _sfc_main = {
26
+ name: "epx-visual-component",
27
+ components: {
28
+ [ConfigOptions.name]: ConfigOptions
29
+ },
30
+ props: {
31
+ designer: Object,
32
+ widget: Object,
33
+ id: [String, Number],
34
+ metaId: String,
35
+ upMetaId: String,
36
+ upMetaViewId: String,
37
+ componentInfo: {
38
+ type: Object,
39
+ default() {
40
+ return {};
41
+ }
42
+ },
43
+ compConfig: {
44
+ type: Object,
45
+ default() {
46
+ return {};
47
+ }
48
+ },
49
+ globalConfigs: {
50
+ type: Object,
51
+ default() {
52
+ return {};
53
+ }
54
+ },
55
+ upComponent: {
56
+ type: String,
57
+ default: ""
58
+ },
59
+ upId: String,
60
+ upComponentInstance: Object,
61
+ pageActionList: {
62
+ type: Array
63
+ },
64
+ pageRuleList: {
65
+ type: Array
66
+ },
67
+ pageRelationList: {
68
+ type: Array,
69
+ default() {
70
+ return [];
71
+ }
72
+ },
73
+ pageAllFieldList: {
74
+ type: Array
75
+ },
76
+ pageParams: {
77
+ type: Array,
78
+ default() {
79
+ return [];
80
+ }
81
+ },
82
+ scopeConfigs: Object
83
+ },
84
+ provide() {
85
+ return {
86
+ // 供 epx-visual-config-form-item 调用 renderFormItem:每个配置项在自己的子组件里渲染,只依赖自己读到的 key
87
+ visualComponent: this
88
+ };
89
+ },
90
+ inject: {
91
+ pageId: {
92
+ type: String
93
+ },
94
+ pageConfigs: {
95
+ type: Object,
96
+ default() {
97
+ return {};
98
+ }
99
+ },
100
+ getPageMetaId: {
101
+ type: Function
102
+ },
103
+ getItemConfigs: {
104
+ type: Function
105
+ },
106
+ changeItemConfigs: {
107
+ type: Function
108
+ },
109
+ updateWidget: {
110
+ type: Function
111
+ },
112
+ setContainerDefaultItems: {
113
+ type: Function
114
+ }
115
+ },
116
+ data() {
117
+ return {
118
+ spanOptions: [],
119
+ config: {},
120
+ defaultConfigs: {},
121
+ componentActionList: null,
122
+ // 列表页面单独请求
123
+ componentTreeFieldStore: null,
124
+ // 放在配置页
125
+ configOptions: [],
126
+ FunctionOption: [],
127
+ commonOperates: [],
128
+ componentMetaId: null,
129
+ metaViewId: null,
130
+ componentRuleList: null,
131
+ componentRelationList: null,
132
+ foldMap: {},
133
+ opened: {}
134
+ };
135
+ },
136
+ computed: {
137
+ ...mapState({
138
+ pages: (state) => state.page.configs,
139
+ metas: (state) => state.meta.metas
140
+ }),
141
+ ...mapGetters(["getPageById", "getCodeById", "getMeta", "getMetaRelationFields", "getMetaViewFields"]),
142
+ pageMetaId() {
143
+ return this.getPageMetaId && this.getPageMetaId();
144
+ },
145
+ currentPage() {
146
+ const page = this.getPageById(this.pageId) || this.designer.page;
147
+ return page;
148
+ },
149
+ currentMetaId() {
150
+ return this.componentMetaId || this.upMetaId || this.metaId || this.pageMetaId;
151
+ },
152
+ currentMetaViewId() {
153
+ return this.metaViewId || this.upMetaViewId;
154
+ },
155
+ currentMeta() {
156
+ const meta = this.getMeta(this.currentMetaId);
157
+ if (!meta && this.currentMetaId) {
158
+ this.$store.dispatch({
159
+ type: "ADD_META",
160
+ metaId: this.currentMetaId
161
+ });
162
+ }
163
+ return meta || null;
164
+ },
165
+ pageMeta() {
166
+ return this.getMeta(this.pageMetaId);
167
+ },
168
+ itemConfigs() {
169
+ return this.getItemConfigs();
170
+ },
171
+ allConfigs: {
172
+ get() {
173
+ const all = {
174
+ ...this.config
175
+ };
176
+ const allConfigs = this.$_.assignWith(all, this.defaultConfigs, (value, defaultValue) => {
177
+ return this.$_.isNil(value) ? defaultValue : value;
178
+ });
179
+ return allConfigs;
180
+ },
181
+ set(v) {
182
+ }
183
+ },
184
+ isDefaultValue() {
185
+ return (key) => {
186
+ const {
187
+ [key]: defaultValue
188
+ } = this.defaultConfigs;
189
+ const {
190
+ [key]: value
191
+ } = this.config;
192
+ return defaultValue !== void 0 && (value === void 0 || this.$_.isEqual(value, defaultValue));
193
+ };
194
+ },
195
+ actionList() {
196
+ return this.componentActionList || this.pageActionList || [];
197
+ },
198
+ ruleList() {
199
+ return this.componentRuleList || this.pageRuleList || [];
200
+ },
201
+ relationList() {
202
+ return this.componentRelationList || this.pageRelationList || [];
203
+ },
204
+ treeFieldStore() {
205
+ return this.getMetaViewFields(this.currentMetaId, this.currentMetaViewId);
206
+ },
207
+ functionList() {
208
+ const {
209
+ JS = ""
210
+ } = this.globalConfigs;
211
+ const result = JS.match(/export\sfunction\s(\w+)/g);
212
+ const functionList = [];
213
+ if (!result) return [];
214
+ result.forEach((item2) => {
215
+ functionList.push(item2.replace(/export\sfunction\s/, ""));
216
+ });
217
+ return functionList;
218
+ },
219
+ getConfigMetaId() {
220
+ return (item2) => {
221
+ if (item2.metaId) return item2.metaId;
222
+ else if (item2.dynamicMetaId) {
223
+ const getFieldRelatedMeta = (field) => {
224
+ const fieldConfigs = this.currentMeta.getAllFieldConfigs().find((item3) => item3.attriName === field[0] || field);
225
+ return fieldConfigs.codeKey;
226
+ };
227
+ const el = JSON.parse(item2.dynamicMetaId).el.replace(/^#{(.*)}$/, "$1");
228
+ return evalWith(el, {
229
+ getFieldRelatedMeta,
230
+ configs: this.allConfigs
231
+ }, this);
232
+ }
233
+ return this.currentMetaId;
234
+ };
235
+ },
236
+ showConfigOptions() {
237
+ const showFn = (item2) => {
238
+ let flag = true;
239
+ if (item2.showFlag) {
240
+ for (const key in item2.showFlag) {
241
+ if (Array.isArray(item2.showFlag[key])) {
242
+ if (!item2.showFlag[key].includes(this.allConfigs[key])) flag = false;
243
+ } else {
244
+ if (item2.showFlag[key] != this.allConfigs[key]) flag = false;
245
+ }
246
+ }
247
+ }
248
+ if (flag && item2.showCondition) {
249
+ const compiled = compileShowCondition(item2.showCondition, (msg) => this.$message && this.$message.error(msg));
250
+ if (compiled === false) {
251
+ flag = false;
252
+ } else if (compiled) {
253
+ try {
254
+ flag = compiled.call(this, this.allConfigs);
255
+ } catch (error) {
256
+ console.error(error);
257
+ flag = false;
258
+ }
259
+ }
260
+ }
261
+ return flag;
262
+ };
263
+ const result = [];
264
+ for (const item2 of this.configOptions) {
265
+ if (!showFn(item2)) continue;
266
+ result.push(item2.children ? {
267
+ ...item2,
268
+ children: item2.children.filter(showFn)
269
+ } : item2);
270
+ }
271
+ return result;
272
+ },
273
+ variableTree() {
274
+ var _a;
275
+ const variableSets = ((_a = this.designer.pageConfig) == null ? void 0 : _a.variableSets) || [];
276
+ const {
277
+ iterator
278
+ } = this.allConfigs;
279
+ const variableList = variableSets.map((item2) => ({
280
+ ...item2,
281
+ type: "variable",
282
+ text: item2.name || item2.code,
283
+ code: item2.code
284
+ }));
285
+ if (iterator == null ? void 0 : iterator.data) {
286
+ variableList.push({
287
+ type: "variable",
288
+ text: this.selectedWidget.title + "_迭代变量",
289
+ code: iterator.name || "item"
290
+ });
291
+ }
292
+ return [...this.treeFieldStore || [], {
293
+ code: "PAGE_VARIABLE",
294
+ text: "页面变量",
295
+ children: variableList
296
+ }];
297
+ },
298
+ $formatScope() {
299
+ return (scopeParams, data2 = {}) => {
300
+ const _scopeParams = this.$_.cloneDeep(scopeParams);
301
+ const that = this;
302
+ const paramData = {
303
+ ...this.$tab,
304
+ ...this.$query,
305
+ ...this.$pageParams,
306
+ ...that.$compData
307
+ };
308
+ for (const scopeKey in _scopeParams) {
309
+ const scope = _scopeParams[scopeKey];
310
+ if (!scope) continue;
311
+ let values = scope.values;
312
+ if (/#\{([\w-.|$#]+)\}/.test(values)) {
313
+ values = values.replace(/#\{([\w-.|$#]+)\}/, (match, key) => {
314
+ try {
315
+ return evalWith(`that.${key}`, {
316
+ that
317
+ }) || evalWith(`that.$query.${key}`, {
318
+ that
319
+ }) || evalWith(`that.$tab.${key}`, {
320
+ that
321
+ }) || "";
322
+ } catch (error) {
323
+ return scope.values;
324
+ }
325
+ });
326
+ }
327
+ if (/\$\[([\w-_.|$#]+)\]/.test(values)) {
328
+ values = values.replace(/\$\[([\w-.|$#]+)\]/, (match, key) => {
329
+ try {
330
+ return that.$util.getValueByPath(key, this) || that.$util.getValueByPath(key, paramData) || "";
331
+ } catch (error) {
332
+ return scope.values;
333
+ }
334
+ });
335
+ }
336
+ if (/#\[([\w-.|$#]+)\]/.test(values)) {
337
+ values = values.replace(/#\[([\w-.|$#]+)\]/, (match, key) => {
338
+ try {
339
+ return evalWith(`data.${key}`, {
340
+ data: data2
341
+ }) || "";
342
+ } catch (error) {
343
+ return scope.values;
344
+ }
345
+ });
346
+ }
347
+ if (/\{\{([\w-_.,|$#[\]()"'\s]+)\}\}/g.test(values)) {
348
+ values = values.replace(/\{\{([\w-.,|$#[\]()"'\s]+)\}\}/g, (macth, key) => {
349
+ try {
350
+ return this.$util.evalExpression(key, paramData);
351
+ } catch (error) {
352
+ return `{{${key}}}`;
353
+ }
354
+ });
355
+ }
356
+ scope.values = values;
357
+ if (scope.scopeParams) {
358
+ scope.scopeParams = this.$formatScope(scope.scopeParams, data2);
359
+ }
360
+ }
361
+ return _scopeParams;
362
+ };
363
+ }
364
+ },
365
+ watch: {
366
+ pageParams: {
367
+ handler(v) {
368
+ },
369
+ deep: true
370
+ },
371
+ config: {
372
+ handler(v) {
373
+ if (v.metaId) this.componentMetaId = v.metaId;
374
+ this.metaViewId = v.metaViewId;
375
+ this.scheduleCommit();
376
+ },
377
+ deep: true
378
+ },
379
+ currentMetaId: {
380
+ handler(v) {
381
+ this.getActionList(v);
382
+ this.getRuleList(v);
383
+ this.getAllFields(v);
384
+ this.refreshConfigOptions(true);
385
+ },
386
+ immediate: true
387
+ },
388
+ currentMetaViewId: {
389
+ handler(v) {
390
+ this.getAllFields();
391
+ this.refreshConfigOptions(true);
392
+ },
393
+ immediate: true
394
+ },
395
+ actionList(v) {
396
+ this.refreshConfigOptions(false);
397
+ },
398
+ ruleList(v) {
399
+ this.refreshConfigOptions(false);
400
+ },
401
+ relationList(v) {
402
+ this.refreshConfigOptions(false);
403
+ },
404
+ pageRuleList() {
405
+ this.getOperateOptions();
406
+ }
407
+ },
408
+ methods: {
409
+ // 单 key 取值:config 里为 nil 时退回默认值。渲染配置项时用它而不是 allConfigs[key],
410
+ // 让每个配置项子组件只依赖自己的 key,而不是整个 allConfigs computed
411
+ getConfigValue(key) {
412
+ const value = this.config[key];
413
+ return this.$_.isNil(value) ? this.defaultConfigs[key] : value;
414
+ },
415
+ // deep watch 的回调只排队:同一微任务周期内的多次改动合并成一次提交
416
+ scheduleCommit() {
417
+ if (this._commitScheduled) return;
418
+ this._commitScheduled = true;
419
+ Promise.resolve().then(() => {
420
+ this._commitScheduled = false;
421
+ this.commitConfig();
422
+ });
423
+ },
424
+ // getConfigs / getComponentSetting 仍全量计算(子类可覆盖,且只有几千次比较),
425
+ // 但只把与上次提交不同的 key 写回 designer——此前每次输入都全量写回,整个画布跟着重算
426
+ commitConfig() {
427
+ if (this.$.isUnmounted) return;
428
+ const configs = this.getConfigs() || {};
429
+ const setting = this.getComponentSetting() || {};
430
+ const last = this._lastCommitted || {
431
+ configs: {},
432
+ setting: {}
433
+ };
434
+ const configPatch = diffPatch(last.configs, configs);
435
+ const settingPatch = diffPatch(last.setting, setting);
436
+ this._lastCommitted = {
437
+ configs: cloneDeep(configs),
438
+ setting: cloneDeep(setting)
439
+ };
440
+ if (configPatch) this.changeItemConfigs(this.id, configPatch);
441
+ if (settingPatch && this.designer) this.designer.updateWidget(this.id, settingPatch);
442
+ },
443
+ // 配置项刷新入口:同一微任务周期内只执行首次(两个 immediate watcher 会在挂载期连续同步触发两次)。
444
+ // 首次是同步执行的,不延后——created 里 32 个子类的 initConfig 依赖这个时序。
445
+ refreshConfigOptions(withDefaults) {
446
+ if (this._refreshTicket) return;
447
+ this._refreshTicket = true;
448
+ Promise.resolve().then(() => {
449
+ this._refreshTicket = false;
450
+ });
451
+ if (withDefaults) this.initDefaultConfigs();
452
+ this.initConfigOptions();
453
+ this.afterConfigOptions();
454
+ },
455
+ initDefaultConfigs() {
456
+ this.defaultConfigs = {
457
+ flex: false,
458
+ span: 24,
459
+ xsspan: 24
460
+ };
461
+ },
462
+ getEntityRelation(v) {
463
+ const mainEntity = v || this.currentMetaId;
464
+ getCached("relation:" + mainEntity, () => this.$http.$get({
465
+ entityId: "FM_ENTITY_RELATION",
466
+ action: "getEntityRelationTree",
467
+ mainEntity
468
+ })).then((data2) => {
469
+ data2.forEach((relation) => {
470
+ relation.label = relation.title;
471
+ relation.value = relation.flag;
472
+ relation.children = relation.childrens;
473
+ if (relation.childrens) {
474
+ relation.childrens.forEach((childRelation) => {
475
+ childRelation.value = relation.flag + "#" + childRelation.flag;
476
+ childRelation.label = childRelation.title;
477
+ });
478
+ }
479
+ });
480
+ this.componentRelationList = data2;
481
+ });
482
+ },
483
+ getField(field) {
484
+ const code = typeof field === "string" ? field : field && (field.attriName || field.code);
485
+ if (!code) return null;
486
+ const store = this.treeFieldStore || [];
487
+ for (const meta of store) {
488
+ const fieldInfo = (meta.children || []).find((item2) => item2.linkCode === code || item2.field === code || item2.code === code);
489
+ if (fieldInfo) return fieldInfo;
490
+ }
491
+ if (code.includes("|")) {
492
+ const links = code.split("|");
493
+ const fieldCode = links.pop();
494
+ const linkFlag = links.join("|").toUpperCase();
495
+ const linkMeta = store.find((meta) => meta.linkFlag && String(meta.linkFlag).toUpperCase() === linkFlag);
496
+ if (linkMeta) {
497
+ return (linkMeta.children || []).find((item2) => item2.code === fieldCode || item2.linkCode === code) || null;
498
+ }
499
+ }
500
+ return null;
501
+ },
502
+ // 视图切换时是否允许按新视图过滤已配置字段:
503
+ // 字段树未加载成功时不过滤(否则会误删全部字段);
504
+ // 初次选中组件时 metaViewId 从空变为已保存值属于配置回显,也不过滤,仅用户真正切换视图时才过滤
505
+ canFilterFieldsByView(v) {
506
+ if (!this.treeFieldStore || !this.treeFieldStore.length) return false;
507
+ if (!this._metaViewTouched) {
508
+ this._metaViewTouched = true;
509
+ if (v === this._initialMetaViewId) return false;
510
+ }
511
+ return true;
512
+ },
513
+ async initConfigOptions() {
514
+ var _a, _b;
515
+ const baseOptions = [{
516
+ key: "componentName",
517
+ label: "组件名称"
518
+ }, {
519
+ key: "componentEvents",
520
+ label: "组件事件",
521
+ type: "event"
522
+ }, {
523
+ key: "span",
524
+ label: "宽度",
525
+ type: "select",
526
+ options: this.spanOptions
527
+ }, {
528
+ key: "xsspan",
529
+ label: "移动端宽度",
530
+ type: "select",
531
+ options: this.spanOptions
532
+ }, {
533
+ key: "flex",
534
+ label: "占据页面剩余空间",
535
+ type: "radio",
536
+ options: [{
537
+ label: "是",
538
+ value: true
539
+ }, {
540
+ label: "否",
541
+ value: false
542
+ }]
543
+ }];
544
+ if (!this.configOptions || this.configOptions.length === 0) this.configOptions = baseOptions;
545
+ if (this.componentInfo.ID || this.componentInfo.templateId) {
546
+ let eventList = this.getCodeById("EVENT");
547
+ if (!eventList) {
548
+ await this.$store.dispatch({
549
+ type: "ADD_LIST",
550
+ key: "EVENT"
551
+ }).then((data2) => {
552
+ eventList = data2;
553
+ });
554
+ }
555
+ const params = {
556
+ action: "getPageAttributeTree",
557
+ entityId: "FM_PAGE_ATTRIBUTE",
558
+ pageId: this.componentInfo.ID || this.componentInfo.templateId,
559
+ showEntity: "1",
560
+ order_field: "ORDER_NUM",
561
+ order_mode: "asc"
562
+ };
563
+ if (((_a = this.widget) == null ? void 0 : _a.type) === "template") {
564
+ params["scope.TEMPLATE"] = this.componentInfo.ID;
565
+ params.entityId = "FM_TEMPLATE_ATTRIBUTE";
566
+ } else {
567
+ params["scope.PAGE"] = this.componentInfo.ID || this.componentInfo.templateId;
568
+ }
569
+ const isTemplate = ((_b = this.widget) == null ? void 0 : _b.type) === "template";
570
+ const cacheKey = attributeTreeKey({
571
+ entityId: params.entityId,
572
+ pageId: isTemplate ? this.componentInfo.ID : this.componentInfo.ID || this.componentInfo.templateId,
573
+ isTemplate
574
+ });
575
+ getCached(cacheKey, () => this.$http.getTree(params)).then((data2) => {
576
+ if (data2 && data2.length > 0) {
577
+ const component = this.componentInfo || {};
578
+ const meta = this.currentMeta || {};
579
+ const pageMeta = this.pageMeta || {};
580
+ const that = this;
581
+ let keywordFields = [];
582
+ const {
583
+ label,
584
+ keyNames = []
585
+ } = meta;
586
+ if (meta && meta.id) {
587
+ meta.allFields = meta.getAllFields();
588
+ keywordFields = [...keyNames];
589
+ if (label) {
590
+ keywordFields.push(label);
591
+ }
592
+ }
593
+ const evalScope = {
594
+ component,
595
+ meta,
596
+ pageMeta,
597
+ that,
598
+ keywordFields
599
+ };
600
+ const formatData = (arr, fieldFlag = false) => {
601
+ arr.forEach((item2) => {
602
+ const {
603
+ TYPE,
604
+ CODE,
605
+ NAME,
606
+ CODE_KEY,
607
+ RELATED_ENTITY,
608
+ RELATED_ENTITY_KEY,
609
+ SHOW_CONDITION,
610
+ DYNAMIC_META_ID,
611
+ OBJECT_SCOPE,
612
+ FIELD_EDITABLE,
613
+ DEFAULT_VALUE_TYPE,
614
+ DEFAULT_VALUE,
615
+ DEFAULT_VALUE_DYNAMIC,
616
+ INPUT_VARIABLE,
617
+ NOTE,
618
+ SHOW_NOTE,
619
+ MULTIPLE,
620
+ SHOW_SUB_FIELD,
621
+ LIMIT_DATATYPE,
622
+ OBJECT_FLAG,
623
+ CUSTOM_FUNCTION,
624
+ CODE_KEY_SET,
625
+ CUSTOM_CODE_KEY,
626
+ EVENT,
627
+ IS_TREE,
628
+ FIELD_CONFIGS,
629
+ REG_EXP,
630
+ INPUTABLE,
631
+ DYNAMIC_OPTION
632
+ } = item2.entity.data;
633
+ try {
634
+ if (DEFAULT_VALUE_TYPE === "dynamic") {
635
+ if (DEFAULT_VALUE_DYNAMIC) item2.defaultValue = evalWith(DEFAULT_VALUE_DYNAMIC, {
636
+ ...evalScope,
637
+ item: item2
638
+ }, this);
639
+ } else if (DEFAULT_VALUE) {
640
+ if (TYPE === "switch" || TYPE === "num") {
641
+ item2.defaultValue = evalWith(DEFAULT_VALUE, {
642
+ ...evalScope,
643
+ item: item2
644
+ }, this);
645
+ } else if (TYPE === "operates") {
646
+ item2.defaultValue = JSON.parse(DEFAULT_VALUE);
647
+ } else {
648
+ item2.defaultValue = DEFAULT_VALUE;
649
+ }
650
+ }
651
+ } catch (error) {
652
+ console.error(error);
653
+ }
654
+ if (DYNAMIC_OPTION) {
655
+ try {
656
+ item2.options = evalWith(`that.${DYNAMIC_OPTION}`, {
657
+ that
658
+ }, this);
659
+ } catch (error) {
660
+ console.error(error);
661
+ }
662
+ }
663
+ if (!this.$_.isNil(item2.defaultValue)) {
664
+ this.defaultConfigs[CODE] = item2.defaultValue;
665
+ }
666
+ let attriName = CODE;
667
+ if (fieldFlag && CODE.includes(".")) {
668
+ attriName = CODE.split(".")[1];
669
+ }
670
+ item2.key = attriName;
671
+ item2.label = NAME;
672
+ item2.type = TYPE;
673
+ item2.showCondition = SHOW_CONDITION;
674
+ item2.dynamicMetaId = DYNAMIC_META_ID;
675
+ item2.code = CODE_KEY;
676
+ item2.object = RELATED_ENTITY;
677
+ item2.dataKey = RELATED_ENTITY_KEY;
678
+ item2.fieldEditable = FIELD_EDITABLE;
679
+ item2.inputVariable = INPUT_VARIABLE === "1";
680
+ item2.tip = NOTE;
681
+ item2.showTip = SHOW_NOTE === "1";
682
+ item2.regExp = REG_EXP;
683
+ if (INPUTABLE) item2.inputable = INPUTABLE === "1";
684
+ if (MULTIPLE) item2.multiple = MULTIPLE !== "0";
685
+ if (TYPE === "field") {
686
+ if (SHOW_SUB_FIELD) item2.showSubField = SHOW_SUB_FIELD === "1";
687
+ if (LIMIT_DATATYPE) item2.limit = {
688
+ dataType: LIMIT_DATATYPE.split(",")
689
+ };
690
+ } else if (TYPE === "object") {
691
+ if (OBJECT_FLAG) item2.flag = OBJECT_FLAG;
692
+ if (IS_TREE) item2.isTree = IS_TREE;
693
+ if (FIELD_CONFIGS) item2.fieldConfigs = JSON.parse(FIELD_CONFIGS);
694
+ } else if (TYPE === "custom") {
695
+ if (CUSTOM_FUNCTION) {
696
+ if (typeof this[CUSTOM_FUNCTION] === "function") {
697
+ item2.renderContent = this[CUSTOM_FUNCTION];
698
+ }
699
+ }
700
+ }
701
+ if (EVENT) {
702
+ const event = {};
703
+ eventList.forEach((item3) => {
704
+ if (EVENT.includes(item3.code)) {
705
+ event[item3.code] = item3.name;
706
+ }
707
+ });
708
+ item2.eventList = event;
709
+ }
710
+ if (CODE_KEY_SET === "1" && CUSTOM_CODE_KEY) {
711
+ item2.options = JSON.parse(CUSTOM_CODE_KEY);
712
+ }
713
+ if (OBJECT_SCOPE) {
714
+ const scope = JSON.parse(OBJECT_SCOPE);
715
+ item2.scopeParams = scope.scopeParams;
716
+ }
717
+ if (item2.children) {
718
+ const flag = item2.children.length > 0 && TYPE === "field";
719
+ formatData(item2.children, flag);
720
+ }
721
+ });
722
+ };
723
+ formatData(data2);
724
+ this.configOptions = data2;
725
+ }
726
+ });
727
+ }
728
+ },
729
+ afterConfigOptions() {
730
+ if (this.upComponentInstance) {
731
+ const upComponent = this.upComponentInstance.$refs.component || {};
732
+ const {
733
+ subConfigOptions = [],
734
+ subDefaultConfigs = {}
735
+ } = upComponent;
736
+ this.configOptions = [...subConfigOptions, ...this.configOptions];
737
+ this.defaultConfigs = {
738
+ ...subDefaultConfigs,
739
+ ...this.defaultConfigs
740
+ };
741
+ }
742
+ },
743
+ initConfig() {
744
+ const config = this.$_.cloneDeep(this.compConfig);
745
+ if (this.componentInfo.span) {
746
+ config.span = this.componentInfo.span;
747
+ }
748
+ this.config = config;
749
+ this.afterInitConfig();
750
+ },
751
+ afterInitConfig() {
752
+ },
753
+ getActionList(v) {
754
+ if (!v || v === this.pageMetaId && this.pageActionList) return;
755
+ getCached(`api:${v}`, () => this.$http.list({
756
+ action: "getEntityAllApi",
757
+ entityId: "FM_ENTITY_API",
758
+ metaId: v
759
+ })).then((data2) => {
760
+ if (v === this.currentMetaId) {
761
+ this.componentActionList = data2.entitys.map((item2) => ({
762
+ label: item2.LABEL || item2.NAME,
763
+ value: item2.NAME
764
+ }));
765
+ }
766
+ });
767
+ },
768
+ getRuleList(v) {
769
+ if (!v || v === this.pageMetaId && this.pageRuleList) return;
770
+ getCached(`rule:${v}`, () => this.$http.list({
771
+ entityId: "ACT_RE_MODEL",
772
+ "scope.ENTITY": v,
773
+ "scope.CATEGORY": "2"
774
+ })).then((data2) => {
775
+ if (v === this.currentMetaId) {
776
+ this.componentRuleList = data2.entitys.map((item2) => ({
777
+ label: item2.NAME || item2.KEY,
778
+ value: item2.KEY
779
+ }));
780
+ }
781
+ });
782
+ },
783
+ getFieldOptions() {
784
+ this.fieldOptions = [{
785
+ key: "attriName",
786
+ label: "字段",
787
+ readonly: true
788
+ }, {
789
+ key: "configWay",
790
+ label: "配置方式",
791
+ type: "radio",
792
+ options: [{
793
+ label: "默认配置",
794
+ value: "default"
795
+ }, {
796
+ label: "自定义",
797
+ value: "custom"
798
+ }],
799
+ defaultValue: "default"
800
+ }, {
801
+ key: "attriLabel",
802
+ label: "名称",
803
+ type: "text"
804
+ }, {
805
+ key: "width",
806
+ label: "宽度",
807
+ type: "text",
808
+ defaultValue: "120"
809
+ }, {
810
+ key: "isLabel",
811
+ label: "外部标签",
812
+ type: "radio",
813
+ options: [{
814
+ label: "是",
815
+ value: true
816
+ }, {
817
+ label: "否",
818
+ value: false
819
+ }],
820
+ defaultValue: false
821
+ }, {
822
+ key: "locked",
823
+ label: "是否锁定",
824
+ type: "radio",
825
+ options: [{
826
+ label: "是",
827
+ value: true
828
+ }, {
829
+ label: "否",
830
+ value: false
831
+ }],
832
+ defaultValue: false
833
+ }, {
834
+ key: "color",
835
+ label: "字体颜色",
836
+ type: "color",
837
+ defaultValue: "#333"
838
+ }, {
839
+ key: "detailPageId",
840
+ label: "字段详情页面",
841
+ type: "object",
842
+ object: "FM_PAGE_CONFIG",
843
+ showFlag: {
844
+ dataType: ["object", "multiobject"]
845
+ }
846
+ }];
847
+ },
848
+ // 处理器列表 / 通用操作只跟组件类型(componentInfo.ID)有关:同类型面板全局只请求一次,
849
+ // created 与 pageRuleList 变化各触发一次也共享同一份
850
+ getHandlerList() {
851
+ getCached("handlers:" + this.componentInfo.ID, () => this.$http.list({
852
+ action: "pageHandlersList",
853
+ entityId: "FM_PAGE_HANDLERS",
854
+ pageId: this.componentInfo.ID,
855
+ order_field: "ORDER_NUM",
856
+ order_mode: "asc"
857
+ })).then((data2) => {
858
+ this.handlerList = data2.entitys.map((item2) => ({
859
+ label: item2.NAME,
860
+ value: item2.CODE
861
+ }));
862
+ });
863
+ },
864
+ getCommonOperates() {
865
+ getCached("commonOps:" + this.componentInfo.ID, () => this.$http.list({
866
+ action: "pageCommonOperatesList",
867
+ entityId: "FM_PAGE_COMMON_OPERATES",
868
+ pageId: this.componentInfo.ID,
869
+ link: "handler,component|left join",
870
+ order_field: "ORDER_NUM",
871
+ order_mode: "asc"
872
+ })).then((data) => {
873
+ if (data.entitys && data.entitys.length > 0) {
874
+ this.commonOperates = data.entitys.map((item) => {
875
+ const handler = {};
876
+ if (item.TEXT) handler.text = item.TEXT;
877
+ if (item.HANDLER) handler.handler = item["HANDLER|CODE"];
878
+ if (item.UI) handler.ui = item.UI;
879
+ if (item.ICON) handler.icon = item.ICON;
880
+ if (item.ACTION) handler.action = item.ACTION;
881
+ if (item.COMPONENT) handler.component = item["COMPONENT|CODE"];
882
+ if (item.NUM) handler.num = item.NUM;
883
+ if (item.CONFIRM) handler.confirm = item.CONFIRM === "1";
884
+ if (item.CONFIRM_MSG) handler.confirmMsg = item.CONFIRM_MSG;
885
+ if (item.SUCCESS_MSG) handler.successMsg = item.SUCCESS_MSG;
886
+ if (item.FAIL_MSG) handler.failMsg = item.FAIL_MSG;
887
+ if (item.OPEN_MODE) handler.openMode = item.OPEN_MODE;
888
+ if (item.MOVE_TYPE) handler.moveType = item.MOVE_TYPE;
889
+ if (item.PAGE_TYPE) handler.pageType = item.PAGE_TYPE;
890
+ if (item.PAGE_FLAG) handler.pageFlag = item.PAGE_FLAG;
891
+ if (item.TERMINAL) handler.terminal = item.TERMINAL;
892
+ if (item.PARAMS) {
893
+ handler.params = eval("(" + item.PARAMS + ")");
894
+ }
895
+ return handler;
896
+ });
897
+ }
898
+ });
899
+ },
900
+ // 一对多字段的函数选项(列表类面板的字段设置用):代码表全局只请求一次
901
+ getFunctionOption() {
902
+ getCached("codes:ONEMORE_FIELD_FUNCTION", () => this.$http.getCodes({
903
+ key: "ONEMORE_FIELD_FUNCTION"
904
+ })).then((data2) => {
905
+ this.FunctionOption = data2.map((item2) => ({
906
+ value: item2.code,
907
+ name: item2.name
908
+ }));
909
+ });
910
+ },
911
+ getOperateOptions() {
912
+ this.getHandlerList();
913
+ this.getCommonOperates();
914
+ this.operateConfigs = [{
915
+ key: "base",
916
+ title: "基本",
917
+ options: ["text", "ui", "type", "icon", "preview"]
918
+ }, {
919
+ key: "event",
920
+ title: "事件",
921
+ options: ["metaId", "handler", "action", "rule", "moveType", "openMode", "page", "pageType", "menuId", "serviceId", "webLinkUrl", "printWay", "printCode", "cptName", "destActivityId", "processNode", "function", "params", "beforeTrigger", "afterTrigger", "afterTriggerPage", "afterTriggerPageOpenMode", "afterTriggerParams"]
922
+ }, {
923
+ key: "advance",
924
+ title: "高级",
925
+ options: ["terminal", "num", "limitFlag", "limitCondition", "limitTip", "showConditionType", "showCondition", "showConditionEl", "confirm", "confirmMsg", "confirmButtonText", "cancelButtonText", "successMsg", "failMsg", "mask"]
926
+ }];
927
+ },
928
+ // 筛选条件字段
929
+ getAllFields(v) {
930
+ if (!this.currentMetaId) return [];
931
+ if (!this.treeFieldStore) {
932
+ return this.$store.dispatch({
933
+ type: "ADD_META_VIEW_FIELDS",
934
+ metaId: this.currentMetaId,
935
+ viewId: this.metaViewId
936
+ });
937
+ }
938
+ return this.treeFieldStore;
939
+ },
940
+ changeConfigItem(key, value) {
941
+ this.config[key] = value;
942
+ },
943
+ changeLanguageConfig(key, value) {
944
+ this.config[`${key}.i18n`] = value;
945
+ },
946
+ changeEl(key, value) {
947
+ if (value) {
948
+ this.changeConfigItem(key, JSON.parse(value).el);
949
+ } else {
950
+ this.changeConfigItem(key, null);
951
+ }
952
+ },
953
+ getConfigs() {
954
+ const _configs = {};
955
+ for (const key in this.config) {
956
+ let configOption = {};
957
+ for (const item2 of this.configOptions) {
958
+ if (item2.key === key) {
959
+ configOption = item2;
960
+ break;
961
+ } else if (item2.children) {
962
+ for (const child of item2.children) {
963
+ if (child.key === key) {
964
+ configOption = child;
965
+ break;
966
+ }
967
+ }
968
+ }
969
+ }
970
+ if (configOption.allocation === "component") ;
971
+ else if (!this.$_.isEqual(this.config[key], this.defaultConfigs[key]) || configOption.key === "componentName") {
972
+ _configs[key] = this.config[key];
973
+ } else {
974
+ _configs[key] = null;
975
+ }
976
+ }
977
+ const advanceKeys = ["showIf", "iterator", "showTerminal", "componentEvents"];
978
+ advanceKeys.forEach((key) => {
979
+ if (this.compConfig[key] !== void 0) {
980
+ _configs[key] = this.compConfig[key];
981
+ }
982
+ });
983
+ return _configs;
984
+ },
985
+ getComponentSetting() {
986
+ const _setting = {};
987
+ const componentAttris = ["flex", "layout", "direction", "justify", "align", "style", "componentName", "span", "xsspan", "items", "countScopeParams"];
988
+ for (const key in this.config) {
989
+ const isAttri = componentAttris.find((item2) => item2 === key || item2 + ".i18n" === key);
990
+ const configOption = this.configOptions.find((item2) => item2.key === key) || {};
991
+ if (configOption.allocation === "component" || isAttri) {
992
+ if (!this.$_.isEqual(this.config[key], this.defaultConfigs[key])) {
993
+ _setting[key] = this.config[key];
994
+ }
995
+ }
996
+ }
997
+ return _setting;
998
+ },
999
+ switchAccordion(key) {
1000
+ this.foldMap[key] = !this.foldMap[key];
1001
+ },
1002
+ /**
1003
+ * renderFunctions
1004
+ */
1005
+ renderFormItem(item2) {
1006
+ const defaultValue = this.$_.isNil(item2.defaultValue) ? this.defaultConfigs[item2.key] : item2.defaultValue;
1007
+ if (item2.type === "report") {
1008
+ return createVNode(resolveComponent("epx-visual-config-design-report"), {
1009
+ "value": this.getConfigValue(item2.key),
1010
+ "defaultValue": this.defaultConfigs[item2.key]
1011
+ }, null);
1012
+ }
1013
+ const labelSlot = item2.type === "font" ? () => createVNode("span", null, [createVNode("i", {
1014
+ "class": "epx-visual-component__form-item-fold-icon el-icon-caret-right",
1015
+ "onClick": () => this.opened[item2.key] = !this.opened[item2.key]
1016
+ }, null), item2.label]) : item2.showTip !== false && item2.tip ? () => createVNode("span", null, [item2.label, createVNode(resolveComponent("el-tooltip"), {
1017
+ "content": item2.tip,
1018
+ "placement": "top"
1019
+ }, {
1020
+ default: () => [createVNode("i", {
1021
+ "class": "el-icon-warning epx-visual-component__form-item-tip"
1022
+ }, null)]
1023
+ })]) : null;
1024
+ return createVNode("div", {
1025
+ "class": "el-row",
1026
+ "key": item2.key
1027
+ }, [createVNode(resolveComponent("el-form-item"), {
1028
+ "label": `${item2.label}`,
1029
+ "class": {
1030
+ "is-default": this.isDefaultValue(item2.key),
1031
+ "epx-visual-component__form-item": true,
1032
+ ["epx-visual-component__form-item--" + item2.type]: true,
1033
+ "epx-visual-component__form-item--opened": this.opened[item2.key]
1034
+ }
1035
+ }, {
1036
+ default: () => [item2.renderContent ? createVNode("div", null, [item2.renderContent(item2)]) : item2.type === "radio" ? createVNode(resolveComponent("epx-visual-config-radio"), {
1037
+ "code": item2.code,
1038
+ "option-list": item2.options,
1039
+ "value": this.getConfigValue(item2.key),
1040
+ "inputable": item2.inputable,
1041
+ "defaultValue": defaultValue,
1042
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1043
+ }, null) : item2.type === "checkbox" ? createVNode(resolveComponent("epx-visual-config-checkbox"), {
1044
+ "code": item2.code,
1045
+ "option-list": item2.options,
1046
+ "value": this.getConfigValue(item2.key),
1047
+ "defaultValue": defaultValue,
1048
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1049
+ }, null) : item2.type === "switch" ? createVNode(resolveComponent("epx-visual-config-switch"), {
1050
+ "value": this.getConfigValue(item2.key),
1051
+ "defaultValue": defaultValue,
1052
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1053
+ }, null) : item2.type === "action" ? createVNode(resolveComponent("epx-visual-config-list"), {
1054
+ "option-list": this.actionList,
1055
+ "value": this.getConfigValue(item2.key),
1056
+ "defaultValue": defaultValue,
1057
+ "code": item2.code,
1058
+ "label": item2.label,
1059
+ "multiple": item2.multiple,
1060
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1061
+ }, null) : item2.type === "rule" ? createVNode(resolveComponent("epx-visual-config-list"), {
1062
+ "option-list": this.ruleList,
1063
+ "value": this.getConfigValue(item2.key),
1064
+ "defaultValue": defaultValue,
1065
+ "code": item2.code,
1066
+ "label": item2.label,
1067
+ "multiple": item2.multiple,
1068
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1069
+ }, null) : item2.type === "tree" ? createVNode(resolveComponent("epx-visual-config-tree"), {
1070
+ "option-list": item2.options,
1071
+ "value": this.getConfigValue(item2.key),
1072
+ "defaultValue": defaultValue,
1073
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1074
+ }, null) : item2.type === "row" ? createVNode(resolveComponent("epx-visual-config-row"), {
1075
+ "value": this.config[item2.key],
1076
+ "defaultValue": defaultValue,
1077
+ "treeFieldStore": this.treeFieldStore,
1078
+ "field-options": this.rowFieldOptions || this.fieldOptions,
1079
+ "pageParams": this.pageParams,
1080
+ "pageGlobalConfigs": this.globalConfigs,
1081
+ "changeItemConfigs": this.changeItemConfigs,
1082
+ "scopeConfigs": this.scopeConfigs,
1083
+ "functionOption": this.FunctionOption,
1084
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1085
+ }, null) : item2.type === "list" ? createVNode(resolveComponent("epx-visual-config-list"), {
1086
+ "option-list": item2.options,
1087
+ "value": this.getConfigValue(item2.key),
1088
+ "defaultValue": defaultValue,
1089
+ "code": item2.code,
1090
+ "label": item2.label,
1091
+ "multiple": item2.multiple,
1092
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1093
+ }, null) : item2.type === "select" ? createVNode(resolveComponent("epx-visual-config-select"), {
1094
+ "option-list": item2.options,
1095
+ "value": this.getConfigValue(item2.key),
1096
+ "defaultValue": defaultValue,
1097
+ "onChangeConfigs": item2.change || this.changeConfigItem.bind(this, item2.key)
1098
+ }, null) : item2.type === "list-field" || item2.type === "field" && item2.fieldEditable === "1" ? createVNode(resolveComponent("epx-visual-config-list-field"), {
1099
+ "value": this.config[item2.key],
1100
+ "componentMetaId": this.componentMetaId,
1101
+ "defaultValue": defaultValue,
1102
+ "rule-list": this.ruleList,
1103
+ "treeFieldStore": this.treeFieldStore,
1104
+ "functionOption": this.FunctionOption,
1105
+ "scopeConfigs": this.scopeConfigs,
1106
+ "pageParams": this.pageParams,
1107
+ "pageGlobalConfigs": this.globalConfigs,
1108
+ "field-options": item2.type === "field" && item2.children && item2.children.length > 0 ? item2.children : this.fieldOptions,
1109
+ "changeItemConfigs": this.changeItemConfigs,
1110
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1111
+ }, null) : item2.type === "field" ? createVNode(resolveComponent("epx-visual-config-field"), {
1112
+ "value": this.config[item2.key],
1113
+ "defaultValue": defaultValue,
1114
+ "rule-list": this.ruleList,
1115
+ "metaId": item2.metaId || this.getConfigMetaId(item2),
1116
+ "treeFieldStore": this.treeFieldStore,
1117
+ "multiple": item2.multiple,
1118
+ "limit": item2.limit,
1119
+ "scopeConfigs": this.scopeConfigs,
1120
+ "defaultShowSubField": item2.showSubField,
1121
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1122
+ }, null) : item2.type === "m-field" ? createVNode(resolveComponent("epx-visual-config-m-list-field"), {
1123
+ "value": this.config[item2.key],
1124
+ "defaultValue": this.defaultConfigs[item2.key],
1125
+ "treeFieldStore": this.treeFieldStore,
1126
+ "field-options": this.fieldOptions,
1127
+ "pageParams": this.pageParams,
1128
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1129
+ }, null) : item2.type === "order-field" ? createVNode(resolveComponent("epx-visual-config-order-field"), {
1130
+ "value": this.config[item2.key],
1131
+ "defaultValue": defaultValue,
1132
+ "metaId": item2.metaId || this.getConfigMetaId(item2),
1133
+ "treeFieldStore": this.treeFieldStore,
1134
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1135
+ }, null) : item2.type === "operates" || item2.type === "operate" ? createVNode(resolveComponent("epx-visual-config-operate"), {
1136
+ "designer": this.designer,
1137
+ "value": this.config[item2.key],
1138
+ "defaultValue": defaultValue,
1139
+ "configs": this.config,
1140
+ "metaId": item2.metaId,
1141
+ "compMetaId": this.getConfigMetaId(item2),
1142
+ "common-operates": item2.commonOperates || this.commonOperates,
1143
+ "operate-options": {
1144
+ ...this.operateOptions || {},
1145
+ ...item2.operateOptions || {}
1146
+ },
1147
+ "operate-configs": this.operateConfigs,
1148
+ "treeFieldStore": this.treeFieldStore,
1149
+ "pageParams": this.pageParams,
1150
+ "handlerList": item2.handlerList || this.handlerList,
1151
+ "action-list": this.actionList,
1152
+ "rule-list": this.ruleList,
1153
+ "scopeConfigs": this.scopeConfigs,
1154
+ "pageGlobalConfigs": this.globalConfigs,
1155
+ "changeItemConfigs": this.changeItemConfigs,
1156
+ "onChangeOperate": this.changeOperate && this.changeOperate.bind(this, item2.key),
1157
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1158
+ }, null) : item2.type === "scope" ? createVNode(resolveComponent("epx-visual-config-scope"), {
1159
+ "designer": this.designer,
1160
+ "value": this.config[item2.key],
1161
+ "pageParams": this.pageParams,
1162
+ "treeFieldStore": this.treeFieldStore,
1163
+ "extendFields": item2.extendFields,
1164
+ "componentMetaId": this.getConfigMetaId(item2),
1165
+ "scopeConfigs": this.scopeConfigs,
1166
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1167
+ }, null) : item2.type === "el" ? createVNode(resolveComponent("epx-rule"), {
1168
+ "formulaType": "web",
1169
+ "modelValue": this.getConfigValue(item2.key),
1170
+ "onChange": this.changeEl.bind(this, item2.key),
1171
+ "metaId": this.getConfigMetaId(item2),
1172
+ "variableList": this.variableTree,
1173
+ "fieldConfigs": {
1174
+ state: "EDIT",
1175
+ functionType: "web"
1176
+ }
1177
+ }, null) : item2.type === "num" ? createVNode(resolveComponent("epx-visual-config-number"), {
1178
+ "value": this.getConfigValue(item2.key),
1179
+ "defaultValue": defaultValue,
1180
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1181
+ }, null) : item2.type === "chart" ? createVNode(resolveComponent("epx-visual-config-chart"), {
1182
+ "value": this.getConfigValue(item2.key),
1183
+ "defaultValue": defaultValue,
1184
+ "onCallback": item2.callback,
1185
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1186
+ }, null) : item2.type === "params" ? createVNode(resolveComponent("epx-visual-config-params"), {
1187
+ "value": this.getConfigValue(item2.key),
1188
+ "defaultValue": defaultValue,
1189
+ "treeFieldStore": this.treeFieldStore,
1190
+ "pageParams": this.pageParams,
1191
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1192
+ }, null) : item2.type === "object" || item2.type === "multiobject" ? createVNode(resolveComponent("epx-visual-config-object"), {
1193
+ "type": item2.type,
1194
+ "value": this.getConfigValue(item2.key),
1195
+ "defaultValue": defaultValue,
1196
+ "object": item2.object,
1197
+ "label": item2.label,
1198
+ "dataKey": item2.dataKey,
1199
+ "fieldConfigs": item2.fieldConfigs,
1200
+ "flag": item2.flag,
1201
+ "isTree": item2.isTree,
1202
+ "scopeParams": item2.key === "metaViewId" ? [{
1203
+ field: "ENTITY",
1204
+ values: this.componentMetaId
1205
+ }] : this.$formatScope(item2.scopeParams),
1206
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1207
+ }, null) : item2.type === "font" ? createVNode(resolveComponent("epx-visual-config-font"), {
1208
+ "value": this.getConfigValue(item2.key),
1209
+ "defaultValue": this.defaultConfigs[item2.key],
1210
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1211
+ }, null) : item2.type === "color" ? createVNode(resolveComponent("epx-visual-config-color"), {
1212
+ "value": this.getConfigValue(item2.key),
1213
+ "defaultValue": this.defaultConfigs[item2.key],
1214
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1215
+ }, null) : item2.type === "page" ? createVNode(resolveComponent("epx-visual-config-item-page"), {
1216
+ "value": this.getConfigValue(item2.key),
1217
+ "defaultValue": this.defaultConfigs[item2.key],
1218
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1219
+ }, null) : item2.type === "event" ? createVNode(resolveComponent("epx-visual-config-event"), {
1220
+ "value": this.getConfigValue(item2.key),
1221
+ "defaultValue": defaultValue,
1222
+ "functionList": this.functionList,
1223
+ "eventList": item2.eventList,
1224
+ "pageGlobalConfigs": this.globalConfigs,
1225
+ "changeItemConfigs": this.changeItemConfigs,
1226
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1227
+ }, null) : item2.type === "function" ? createVNode(resolveComponent("epx-visual-config-function"), {
1228
+ "designer": this.designer,
1229
+ "value": this.getConfigValue(item2.key),
1230
+ "defaultValue": defaultValue,
1231
+ "functionList": this.functionList,
1232
+ "pageGlobalConfigs": this.globalConfigs,
1233
+ "onInput": this.changeConfigItem.bind(this, item2.key)
1234
+ }, null) : item2.type === "html" ? createVNode(resolveComponent("epx-visual-config-html"), {
1235
+ "designer": this.designer,
1236
+ "value": this.getConfigValue(item2.key),
1237
+ "defaultValue": this.defaultConfigs[item2.key],
1238
+ "i18nValue": this.getConfigValue(item2.key + ".i18n"),
1239
+ "pageGlobalConfigs": this.globalConfigs,
1240
+ "changeItemConfigs": this.changeItemConfigs,
1241
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key),
1242
+ "onChange-language-config": this.changeLanguageConfig.bind(this, item2.key)
1243
+ }, null) : item2.type === "image" ? createVNode(resolveComponent("epx-visual-config-image"), {
1244
+ "designer": this.designer,
1245
+ "label": item2.label,
1246
+ "value": this.getConfigValue(item2.key),
1247
+ "defaultValue": this.defaultConfigs[item2.key],
1248
+ "pageGlobalConfigs": this.globalConfigs,
1249
+ "changeItemConfigs": this.changeItemConfigs,
1250
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key)
1251
+ }, null) : item2.type === "textarea" ? createVNode(resolveComponent("epx-visual-config-textarea"), {
1252
+ "designer": this.designer,
1253
+ "label": item2.label,
1254
+ "value": this.getConfigValue(item2.key),
1255
+ "i18nValue": this.getConfigValue(item2.key + ".i18n"),
1256
+ "defaultValue": this.defaultConfigs[item2.key],
1257
+ "inputVariable": item2.inputVariable,
1258
+ "change": item2.change,
1259
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key),
1260
+ "onChange-language-config": this.changeLanguageConfig.bind(this, item2.key)
1261
+ }, null) : createVNode(resolveComponent("epx-visual-config-input"), {
1262
+ "designer": this.designer,
1263
+ "label": item2.label,
1264
+ "value": this.getConfigValue(item2.key),
1265
+ "i18nValue": this.getConfigValue(item2.key + ".i18n"),
1266
+ "defaultValue": this.defaultConfigs[item2.key],
1267
+ "inputVariable": item2.inputVariable,
1268
+ "regExp": item2.regExp,
1269
+ "readonly": item2.readonly,
1270
+ "change": item2.change,
1271
+ "onChangeConfigs": this.changeConfigItem.bind(this, item2.key),
1272
+ "onChange-language-config": this.changeLanguageConfig.bind(this, item2.key)
1273
+ }, null)],
1274
+ ...labelSlot ? {
1275
+ label: labelSlot
1276
+ } : {}
1277
+ })]);
1278
+ }
1279
+ },
1280
+ created() {
1281
+ this._lastCommitted = null;
1282
+ this._commitScheduled = false;
1283
+ this._initialMetaViewId = (this.compConfig || {}).metaViewId;
1284
+ for (let i = 0; i <= 24; i++) {
1285
+ this.spanOptions.push({
1286
+ label: i,
1287
+ value: i
1288
+ });
1289
+ }
1290
+ this.handlerList = [{
1291
+ label: "打开指定页面",
1292
+ value: "goPage"
1293
+ }, {
1294
+ label: "打开指定应用",
1295
+ value: "goApp"
1296
+ }, {
1297
+ label: "打开指定链接",
1298
+ value: "Link"
1299
+ }, {
1300
+ label: "发起通用请求",
1301
+ value: "commonAction"
1302
+ }, {
1303
+ label: "发起业务规则",
1304
+ value: "commonRuleAction"
1305
+ }, {
1306
+ label: "报表打印",
1307
+ value: "print"
1308
+ }, {
1309
+ label: "下载文件",
1310
+ value: "downloadFile"
1311
+ }, {
1312
+ label: "返回",
1313
+ value: "backPage"
1314
+ }, {
1315
+ label: "自定义JS",
1316
+ value: "customJs"
1317
+ }];
1318
+ this.initConfig();
1319
+ this.getFieldOptions();
1320
+ this.getOperateOptions();
1321
+ },
1322
+ render() {
1323
+ return createVNode("div", {
1324
+ "class": "epx-visual-component"
1325
+ }, [createVNode(resolveComponent("epx-visual-config-options"), {
1326
+ "configOptions": this.showConfigOptions
1327
+ }, null)]);
1328
+ }
1329
+ };
1330
+ export {
1331
+ _sfc_main as default
1332
+ };