cloud-web-corejs 1.0.54-dev.35 → 1.0.54-dev.351

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 (354) hide show
  1. package/package.json +8 -3
  2. package/src/components/Qrcode/fileParse.vue +0 -1
  3. package/src/components/VabUpload/mixins.js +1 -1
  4. package/src/components/VabUpload/propertiesDialog.vue +1 -1
  5. package/src/components/VabUpload/view.vue +218 -120
  6. package/src/components/advancedSearchDialog/mixins.js +1 -1
  7. package/src/components/baseAttachment/index.vue +49 -40
  8. package/src/components/baseAttachment/mixins.js +1 -1
  9. package/src/components/baseInputExport/mixins.js +386 -1
  10. package/src/components/errorMsg/mixins.js +94 -5
  11. package/src/components/excelExport/button.vue +57 -4
  12. package/src/components/excelExport/exportFieldDialog.vue +16 -6
  13. package/src/components/excelExport/index.js +7 -5
  14. package/src/components/excelExport/index.vue +64 -8
  15. package/src/components/excelExport/mixins.js +3 -2
  16. package/src/components/excelImport/mixins.js +750 -1
  17. package/src/components/fileLibrary/fileObjAuthEditDialog.vue +6 -0
  18. package/src/components/fileLibrary/filterDialog.vue +383 -0
  19. package/src/components/fileLibrary/index.vue +23 -24
  20. package/src/components/fileLibrary/mixins/categoryMoveDialogMixins.js +1 -1
  21. package/src/components/fileLibrary/mixins/fileCategoryDialogMixins.js +1 -1
  22. package/src/components/fileLibrary/mixins/fileHistoryDialogMixins.js +2 -2
  23. package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +335 -212
  24. package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +31 -27
  25. package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +4 -4
  26. package/src/components/fileLibrary/mixins/indexMixins.js +69 -26
  27. package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +63 -3
  28. package/src/components/fileLibrary/mixins/recycleBinDialogMixins.js +1 -1
  29. package/src/components/fileLibrary/propertiesDialog.vue +18 -0
  30. package/src/components/fileLibrary/shareDialog.vue +1 -1
  31. package/src/components/formOplog/mixins.js +1 -1
  32. package/src/components/jsonImport/index.js +1 -1
  33. package/src/components/jsonImport/mixins.js +333 -1
  34. package/src/components/langImport/mixins.js +500 -16
  35. package/src/components/statusTag/mixins.js +1 -1
  36. package/src/components/table/CellSlot.vue +1 -0
  37. package/src/components/table/index.js +12 -10
  38. package/src/components/table/tableForm.vue +99 -63
  39. package/src/components/table/tableFormMixin.js +1 -1
  40. package/src/components/table/util/index.js +328 -0
  41. package/src/components/table/vxeFilter/mixin.js +6 -6
  42. package/src/components/tempStorage/index.vue +9 -6
  43. package/src/components/tempStorage/tempStorageDialog.vue +1 -1
  44. package/src/components/vb-tabs/x-tabs.vue +3 -2
  45. package/src/components/wf/addOpinionButton.vue +57 -0
  46. package/src/components/wf/content.vue +833 -362
  47. package/src/components/wf/mixins/addOpinionButton.js +3 -0
  48. package/src/components/wf/mixins/setCandidateButton.js +6 -0
  49. package/src/components/wf/mixins/setCandidateDialog.js +2 -1
  50. package/src/components/wf/mixins/setCandidateDialog2.js +6 -0
  51. package/src/components/wf/mixins/wfFlowEleScriptDialog.js +131 -0
  52. package/src/components/wf/mixins/wfTaskUserRangeDialog.js +3 -0
  53. package/src/components/wf/setCandidateButton.vue +40 -0
  54. package/src/components/wf/setCandidateDialog.vue +10 -0
  55. package/src/components/wf/setCandidateDialog2.vue +95 -0
  56. package/src/components/wf/wf.js +2117 -1
  57. package/src/components/wf/wfFlowEleScriptDialog.vue +89 -0
  58. package/src/components/wf/wfStartDialog.vue +70 -42
  59. package/src/components/wf/wfTaskUserRangeDialog.vue +65 -0
  60. package/src/components/wf/wfUtil.js +1 -1
  61. package/src/components/xform/form-designer/designer.js +1649 -3
  62. package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +3 -3
  63. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +289 -8
  64. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +4 -1
  65. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +3 -3
  66. package/src/components/xform/form-designer/form-widget/dialog/exportDialog.vue +13 -0
  67. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +301 -0
  68. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +16 -4
  69. package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +5 -1
  70. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +37 -6
  71. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1331 -1
  72. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +26 -7
  73. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +1 -1
  74. package/src/components/xform/form-designer/form-widget/field-widget/a-text-widget.vue +1 -1
  75. package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +34 -5
  76. package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +1 -1
  77. package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +14 -6
  78. package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +89 -0
  79. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +1 -0
  80. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +21 -2
  81. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue +77 -0
  82. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +106 -0
  83. package/src/components/xform/form-designer/form-widget/field-widget/echart-bar-widget.vue +1 -1
  84. package/src/components/xform/form-designer/form-widget/field-widget/echart-category-widget.vue +1 -1
  85. package/src/components/xform/form-designer/form-widget/field-widget/echart-pie-widget.vue +1 -1
  86. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1615 -16
  87. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +652 -379
  88. package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +10 -8
  89. package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue +81 -0
  90. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +49 -8
  91. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +61 -88
  92. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +13 -0
  93. package/src/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin.js +176 -0
  94. package/src/components/xform/form-designer/form-widget/field-widget/multiSearch-widget.vue +53 -0
  95. package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +107 -81
  96. package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +185 -0
  97. package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +1 -1
  98. package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +108 -0
  99. package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +70 -3
  100. package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +21 -5
  101. package/src/components/xform/form-designer/form-widget/field-widget/search_button-widget.vue +2 -2
  102. package/src/components/xform/form-designer/form-widget/field-widget/select-export-button-widget.vue +86 -0
  103. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +17 -5
  104. package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +53 -0
  105. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +145 -0
  106. package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +2 -1
  107. package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +31 -17
  108. package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +6 -1
  109. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +99 -0
  110. package/src/components/xform/form-designer/form-widget/field-widget/tempStorage-widget.vue +127 -0
  111. package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +46 -34
  112. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +2 -2
  113. package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +2 -170
  114. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +259 -58
  115. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +725 -0
  116. package/src/components/xform/form-designer/indexMixin.js +825 -2
  117. package/src/components/xform/form-designer/setting-panel/form-setting.vue +927 -159
  118. package/src/components/xform/form-designer/setting-panel/index.vue +4 -0
  119. package/src/components/xform/form-designer/setting-panel/indexMixin.js +1 -1
  120. package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +376 -302
  121. package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +4 -4
  122. package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +3 -3
  123. package/src/components/xform/form-designer/setting-panel/property-editor/autoValueEnabled-editor.vue +38 -0
  124. package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +6 -0
  125. package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +28 -0
  126. package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +41 -0
  127. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +126 -0
  128. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +1196 -1042
  129. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/onCheckboxChange-editor.vue +1 -1
  130. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +1160 -511
  131. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +2 -2
  132. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-pane/detail-pane-editor.vue +3 -3
  133. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
  134. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
  135. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
  136. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +0 -8
  137. package/src/components/xform/form-designer/setting-panel/property-editor/copyButton-editor.vue +36 -0
  138. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin.js +2 -2
  139. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onAfterConfirmFile-editor.vue +32 -0
  140. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +2 -2
  141. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +35 -20
  142. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +64 -5
  143. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +27 -0
  144. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-item-editor.vue +21 -0
  145. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -0
  146. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +185 -69
  147. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +188 -86
  148. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +84 -39
  149. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +32 -9
  150. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +86 -0
  151. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +8 -0
  152. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +91 -0
  153. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
  154. package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +67 -41
  155. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +56 -0
  156. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +26 -7
  157. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +13 -1
  158. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +30 -1
  159. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +62 -0
  160. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +52 -5
  161. package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +721 -466
  162. package/src/components/xform/form-designer/setting-panel/property-editor/labelColor-editor.vue +20 -11
  163. package/src/components/xform/form-designer/setting-panel/property-editor/labelIconClass-editor.vue +1 -1
  164. package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +1 -1
  165. package/src/components/xform/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +1 -1
  166. package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
  167. package/src/components/xform/form-designer/setting-panel/property-editor/multiple-editor.vue +19 -14
  168. package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
  169. package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +31 -0
  170. package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
  171. package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +318 -0
  172. package/src/components/xform/form-designer/setting-panel/property-editor/required-editor.vue +10 -6
  173. package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +3 -3
  174. package/src/components/xform/form-designer/setting-panel/property-editor/showRuleFlag-editor.vue +1 -1
  175. package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +23 -0
  176. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +305 -19
  177. package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +2 -2
  178. package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +2 -2
  179. package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +384 -53
  180. package/src/components/xform/form-designer/setting-panel/property-editor/widgetShowRuleFlag-editor.vue +263 -0
  181. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +30 -11
  182. package/src/components/xform/form-designer/toolbar-panel/index.vue +12 -11
  183. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +1 -1
  184. package/src/components/xform/form-designer/widget-panel/index.vue +21 -1
  185. package/src/components/xform/form-designer/widget-panel/indexMixin.js +19 -18
  186. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1576 -874
  187. package/src/components/xform/form-render/container-item/containerItemMixin.js +359 -11
  188. package/src/components/xform/form-render/container-item/data-table-item.vue +89 -42
  189. package/src/components/xform/form-render/container-item/data-table-mixin.js +22 -18
  190. package/src/components/xform/form-render/container-item/detail-pane-item.vue +17 -3
  191. package/src/components/xform/form-render/container-item/grid-col-item.vue +10 -3
  192. package/src/components/xform/form-render/container-item/grid-item.vue +1 -1
  193. package/src/components/xform/form-render/container-item/list-h5-item.vue +1 -9
  194. package/src/components/xform/form-render/container-item/list-h5-item2.vue +1 -8
  195. package/src/components/xform/form-render/container-item/tab-item.vue +11 -6
  196. package/src/components/xform/form-render/container-item/table-cell-item.vue +38 -32
  197. package/src/components/xform/form-render/container-item/table-item.vue +4 -2
  198. package/src/components/xform/form-render/index.vue +4 -1
  199. package/src/components/xform/form-render/indexMixin.js +13 -26
  200. package/src/components/xform/lang/zh-CN.js +20 -3
  201. package/src/components/xform/mixins/defaultHandle.js +1 -1
  202. package/src/components/xform/mixins/scriptHttp.js +175 -1
  203. package/src/components/xform/utils/emitter.js +4 -4
  204. package/src/components/xform/utils/format.js +21 -30
  205. package/src/components/xform/utils/formula-util.js +669 -0
  206. package/src/components/xform/utils/util.js +1451 -1
  207. package/src/components/xform/utils/validators.js +1 -5
  208. package/src/index.js +2 -2
  209. package/src/layout/components/AppMain.vue +5 -1
  210. package/src/layout/components/Sidebar/default.vue +50 -6
  211. package/src/layout/components/TagsView/index.vue +37 -12
  212. package/src/layout/components/extractedCode/createDialog.vue +92 -0
  213. package/src/layout/components/extractedCode/queryDialog.vue +96 -0
  214. package/src/layout/components/extractedCode/viewDialog.vue +193 -0
  215. package/src/layout/components/watermark/index.vue +83 -0
  216. package/src/layout/defaultLayout.vue +1 -1
  217. package/src/mixins/selectDialog/index.js +1 -1
  218. package/src/mixins/tableTree/index.js +1 -1
  219. package/src/router/modules/customer.js +61 -8
  220. package/src/store/config/index.js +1 -532
  221. package/src/store/modules/permission.js +1 -1
  222. package/src/store/modules/settings.js +1 -1
  223. package/src/store/modules/tagsView.js +1 -14
  224. package/src/store/modules/user.js +1 -1
  225. package/src/utils/index.js +2 -3
  226. package/src/utils/pddLog.js +103 -0
  227. package/src/utils/pdfUtil.js +71 -0
  228. package/src/utils/request.js +359 -1
  229. package/src/utils/vab.js +1113 -27
  230. package/src/views/bd/setting/bd_attach_setting/edit.vue +5 -5
  231. package/src/views/bd/setting/bd_attach_setting/list.vue +28 -55
  232. package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +4 -5
  233. package/src/views/bd/setting/bd_attach_setting/mixins/list.js +239 -1
  234. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -0
  235. package/src/views/bd/setting/bd_company_env/edit.vue +193 -0
  236. package/src/views/bd/setting/bd_company_env/list.vue +175 -0
  237. package/src/views/bd/setting/config_manage/list.vue +66 -0
  238. package/src/views/bd/setting/form_import_log/edit.vue +127 -0
  239. package/src/views/bd/setting/form_import_log/list.vue +206 -0
  240. package/src/views/bd/setting/form_script/edit.vue +9 -0
  241. package/src/views/bd/setting/form_script/edit1.vue +36 -3
  242. package/src/views/bd/setting/form_script/form_list.vue +1 -1
  243. package/src/views/bd/setting/form_script/list1.vue +4 -4
  244. package/src/views/bd/setting/form_script/mixins/dialog.js +130 -1
  245. package/src/views/bd/setting/form_script/mixins/edit.js +201 -1
  246. package/src/views/bd/setting/form_script/mixins/edit1.js +193 -1
  247. package/src/views/bd/setting/form_script/mixins/form_list.js +1 -1
  248. package/src/views/bd/setting/form_script/mixins/list.js +236 -1
  249. package/src/views/bd/setting/form_script/mixins/list1.js +423 -14
  250. package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +194 -0
  251. package/src/views/bd/setting/form_script/otherAuthDialog.vue +83 -0
  252. package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +105 -0
  253. package/src/views/bd/setting/form_template/edit.vue +22 -1
  254. package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +2 -2
  255. package/src/views/bd/setting/form_template/list.vue +5 -5
  256. package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +282 -0
  257. package/src/views/bd/setting/form_template/mixins/edit.js +234 -9
  258. package/src/views/bd/setting/form_template/mixins/list.js +689 -22
  259. package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +193 -0
  260. package/src/views/bd/setting/form_template/mixins/wf_list.js +12 -0
  261. package/src/views/bd/setting/form_template/otherAuthDialog.vue +83 -0
  262. package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +140 -75
  263. package/src/views/bd/setting/form_template/{list2.vue → wf_list.vue} +25 -35
  264. package/src/views/bd/setting/logic_param/edit.vue +146 -0
  265. package/src/views/bd/setting/logic_param/edit1.vue +106 -0
  266. package/src/views/bd/setting/logic_param/edit2.vue +122 -0
  267. package/src/views/bd/setting/logic_param/list.vue +74 -0
  268. package/src/views/bd/setting/logic_param/list1.vue +12 -0
  269. package/src/views/bd/setting/logic_param/list2.vue +12 -0
  270. package/src/views/bd/setting/logic_param/mixins/edit.js +93 -0
  271. package/src/views/bd/setting/logic_param/mixins/list.js +358 -0
  272. package/src/views/bd/setting/menu_kind/list.vue +4 -0
  273. package/src/views/bd/setting/menu_kind/mixins/authDialog.js +300 -7
  274. package/src/views/bd/setting/menu_kind/mixins/list.js +201 -1
  275. package/src/views/bd/setting/push_data/edit.vue +139 -0
  276. package/src/views/bd/setting/push_data/list.vue +283 -0
  277. package/src/views/bd/setting/push_data_h/edit.vue +153 -0
  278. package/src/views/bd/setting/push_data_h/list.vue +293 -0
  279. package/src/views/bd/setting/request_async_setting/edit.vue +320 -0
  280. package/src/views/bd/setting/request_async_setting/list.vue +372 -0
  281. package/src/views/bd/setting/request_setting/edit.vue +300 -0
  282. package/src/views/bd/setting/request_setting/list.vue +311 -0
  283. package/src/views/bd/setting/table_model/edit.vue +875 -426
  284. package/src/views/bd/setting/table_model/list.vue +4 -4
  285. package/src/views/bd/setting/table_model/mixins/dialog.js +1 -1
  286. package/src/views/bd/setting/table_model/mixins/edit.js +1202 -13
  287. package/src/views/bd/setting/table_model/mixins/list.js +440 -14
  288. package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +201 -0
  289. package/src/views/bd/setting/table_model/otherAuthDialog.vue +83 -0
  290. package/src/views/user/area/dialog.vue +21 -9
  291. package/src/views/user/bill_setting/edit.vue +1 -1
  292. package/src/views/user/bill_setting/list.vue +1 -1
  293. package/src/views/user/common_attribute/itemEdit.vue +2 -2
  294. package/src/views/user/common_attribute/list.vue +1 -1
  295. package/src/views/user/common_script/edit.vue +1 -1
  296. package/src/views/user/common_script/list.vue +1 -1
  297. package/src/views/user/company_info/dialog.vue +164 -154
  298. package/src/views/user/company_info/edit.vue +1 -1
  299. package/src/views/user/extend_datasource/dialog.vue +1 -0
  300. package/src/views/user/extend_datasource/edit.vue +3 -0
  301. package/src/views/user/extend_datasource/list.vue +2 -1
  302. package/src/views/user/fieldTranslation/editDialog.vue +7 -7
  303. package/src/views/user/fieldTranslation/list.vue +32 -32
  304. package/src/views/user/form/vform/designer.vue +775 -749
  305. package/src/views/user/form/vform/out_render.vue +1 -1
  306. package/src/views/user/form/vform/render.vue +8 -4
  307. package/src/views/user/form/view/edit.vue +38 -37
  308. package/src/views/user/form/view/list.vue +68 -15
  309. package/src/views/user/groups/edit.vue +2 -0
  310. package/src/views/user/groups/list.vue +1 -0
  311. package/src/views/user/home/default.vue +1025 -979
  312. package/src/views/user/home/dev.vue +29 -0
  313. package/src/views/user/home/index.vue +16 -6
  314. package/src/views/user/home/taili/index.vue +1034 -0
  315. package/src/views/user/login/default.vue +32 -3
  316. package/src/views/user/login/indexMixin.js +117 -3
  317. package/src/views/user/notify_message/dialog.vue +39 -18
  318. package/src/views/user/notify_template/edit.vue +188 -187
  319. package/src/views/user/notify_template/edit2.vue +176 -0
  320. package/src/views/user/notify_template/list.vue +4 -1
  321. package/src/views/user/notify_template/list2.vue +190 -0
  322. package/src/views/user/outLink/form_view.vue +211 -184
  323. package/src/views/user/outLink/index.vue +17 -0
  324. package/src/views/user/outLink/view.vue +28 -23
  325. package/src/views/user/position/edit.vue +116 -83
  326. package/src/views/user/position/list.vue +118 -86
  327. package/src/views/user/project_tag/dialog.vue +9 -4
  328. package/src/views/user/project_tag/edit.vue +2 -2
  329. package/src/views/user/project_tag/list.vue +9 -4
  330. package/src/views/user/push_setting/list.vue +2 -2
  331. package/src/views/user/request_setting/edit.vue +258 -0
  332. package/src/views/user/request_setting/list.vue +248 -0
  333. package/src/views/user/role/dialog.vue +1 -1
  334. package/src/views/user/role/list.vue +4 -4
  335. package/src/views/user/sale_org/dialog.vue +1 -1
  336. package/src/views/user/sale_org/list.vue +4 -1
  337. package/src/views/user/user/dialog.vue +46 -23
  338. package/src/views/user/user/edit.vue +1059 -1021
  339. package/src/views/user/user/form_dialog.vue +158 -0
  340. package/src/views/user/user/form_edit.vue +9 -0
  341. package/src/views/user/user/form_info.vue +210 -0
  342. package/src/views/user/user/form_list.vue +1 -0
  343. package/src/views/user/user/list.vue +647 -563
  344. package/src/views/user/wf/wfReport/index.vue +448 -0
  345. package/src/views/user/wf/wf_auto_submit_data/list.vue +2 -0
  346. package/src/views/user/wf/wf_manage/list.vue +371 -249
  347. package/src/views/user/wf/wf_manage/wfContentDialog.vue +1 -1
  348. package/src/views/user/wf/wf_obj_config/importItemDialog.vue +109 -0
  349. package/src/views/user/wf/wf_obj_config/itemEdit.vue +25 -1
  350. package/src/views/user/wf/wf_obj_config/list.vue +114 -9
  351. package/src/views/user/wf/wf_obj_config/wfBizDataSettingDialog.vue +2 -2
  352. package/src/views/user/wf/wf_transfer_setting/edit.vue +229 -0
  353. package/src/views/user/wf/wf_transfer_setting/list.vue +308 -0
  354. package/src/views/bd/setting/form_template/mixins/list2.js +0 -12
@@ -1,27 +1,31 @@
1
1
  <template>
2
2
  <div>
3
- <el-form-item v-if="optionModel.formulaEnabled" :label="i18nt('designer.setting.formula')">
4
- <el-tooltip effect="light" :content="formulaForView" placement="top">
3
+ <el-form-item
4
+ :label="i18nt('designer.setting.formula')"
5
+ v-if="optionModel.formulaEnabled"
6
+ >
7
+ </el-form-item>
8
+ <el-form-item label-width="0" v-if="optionModel.formulaEnabled">
9
+ <el-tooltip :content="formulaForView" effect="light" placement="top">
5
10
  <el-input v-model="formulaForView" readonly>
6
- <template slot="append">
7
- <el-button icon="el-icon-edit" @click="editFormula"></el-button>
11
+ <template #append>
12
+ <el-button @click="editFormula" icon="el-icon-edit"></el-button>
8
13
  </template>
9
14
  </el-input>
10
15
  </el-tooltip>
11
16
  </el-form-item>
12
17
  <el-dialog
18
+ v-if="formulaDialogVisible"
13
19
  :visible.sync="formulaDialogVisible"
14
20
  :title="i18nt('designer.hint.formulaSetting')"
21
+ custom-class="dialog-style list-dialog"
15
22
  :close-on-click-modal="false"
16
23
  :close-on-press-escape="false"
17
24
  :destroy-on-close="true"
18
25
  :append-to-body="true"
19
- top="0px"
20
26
  width="70%"
27
+ top="0px"
21
28
  ref="colFormulaDialog"
22
- custom-class="dialog-style list-dialog dialog-checkbox pd_0"
23
- v-el-drag-dialog
24
- v-el-dialog-center
25
29
  >
26
30
  <div class="cont">
27
31
  <el-row>
@@ -30,75 +34,50 @@
30
34
  <div class="editor-top">
31
35
  <el-row>
32
36
  <el-col :span="22">
33
- <div style="font-weight: bold;"> {{ optionModel.label }} =</div>
37
+ <div style="font-weight: bold">
38
+ {{ this.optionModel.label }} =
39
+ </div>
34
40
  </el-col>
41
+ <!-- el-tag 模式 按钮 end -->
35
42
  <el-col :span="2">
36
- <el-button size="small" @click="clearFormula" type="danger"
37
- plain=""> 清除
43
+ <el-button
44
+ size="small"
45
+ @click="clearFormula"
46
+ type="danger"
47
+ plain
48
+ >
49
+ {{ i18nt("designer.hint.formulaClear") }}
38
50
  </el-button>
39
51
  </el-col>
40
52
  </el-row>
41
- <!-- <div class="el-row">
42
- <div class="el-col el-col-22">
43
- <div style="font-weight: bold;"> 年龄 =</div>
44
- </div>
45
- <div class="el-col el-col-2">
46
- <button type="button"
47
- class="el-button el-button&#45;&#45;danger el-button&#45;&#45;small is-plain">&lt;!&ndash;&ndash;&gt;&lt;!&ndash;&ndash;&gt;<span> 清除 </span>
48
- </button>
49
- </div>
50
- </div>-->
51
- <div ref="cmRef" style="height: 110px; width: 100%;">
52
- <editor-content :editor="codeMirror" />
53
- </div>
54
- <!-- <div style="height: 110px; width: 100%;">
55
- <codemirror
56
- ref="codeEditor"
57
- v-model="formulaStr"
58
- :options="cmOptions"
59
- @input="codeMirrorChange"
60
- ></codemirror>
61
- </div>-->
53
+ <div ref="cmRef" style="height: 83px; width: 100%"></div>
62
54
  </div>
55
+ <!-- -->
63
56
  <div class="editor-bottom">
64
- <template v-for="(item,index) in operate">
65
- <el-button :key="index" size="default" @click="insertSymbol(item)">{{ item }}</el-button>
66
- </template>
67
- <!-- <button type="button" class="el-button el-button&#45;&#45;default el-button&#45;&#45;default">&lt;!&ndash;&ndash;&gt;
68
- &lt;!&ndash;&ndash;&gt;<span> + </span></button>
69
- <button type="button" class="el-button el-button&#45;&#45;default el-button&#45;&#45;default">&lt;!&ndash;&ndash;&gt;
70
- &lt;!&ndash;&ndash;&gt;<span> - </span></button>
71
- <button type="button" class="el-button el-button&#45;&#45;default el-button&#45;&#45;default">&lt;!&ndash;&ndash;&gt;
72
- &lt;!&ndash;&ndash;&gt;<span> * </span></button>
73
- <button type="button" class="el-button el-button&#45;&#45;default el-button&#45;&#45;default">&lt;!&ndash;&ndash;&gt;
74
- &lt;!&ndash;&ndash;&gt;<span> / </span></button>
75
- <button type="button" class="el-button el-button&#45;&#45;default el-button&#45;&#45;default">&lt;!&ndash;&ndash;&gt;
76
- &lt;!&ndash;&ndash;&gt;<span> != </span></button>
77
- <button type="button" class="el-button el-button&#45;&#45;default el-button&#45;&#45;default">&lt;!&ndash;&ndash;&gt;
78
- &lt;!&ndash;&ndash;&gt;<span> == </span></button>
79
- <button type="button" class="el-button el-button&#45;&#45;default el-button&#45;&#45;default">&lt;!&ndash;&ndash;&gt;
80
- &lt;!&ndash;&ndash;&gt;<span> &lt; </span></button>
81
- <button type="button" class="el-button el-button&#45;&#45;default el-button&#45;&#45;default">&lt;!&ndash;&ndash;&gt;
82
- &lt;!&ndash;&ndash;&gt;<span> &gt; </span></button>
83
- <button type="button" class="el-button el-button&#45;&#45;default el-button&#45;&#45;default">&lt;!&ndash;&ndash;&gt;
84
- &lt;!&ndash;&ndash;&gt;<span> &lt;= </span></button>
85
- <button type="button" class="el-button el-button&#45;&#45;default el-button&#45;&#45;default">&lt;!&ndash;&ndash;&gt;
86
- &lt;!&ndash;&ndash;&gt;<span> &gt;= </span></button>
87
- <button type="button" class="el-button el-button&#45;&#45;default el-button&#45;&#45;default">&lt;!&ndash;&ndash;&gt;
88
- &lt;!&ndash;&ndash;&gt;<span> ( </span></button>
89
- <button type="button" class="el-button el-button&#45;&#45;default el-button&#45;&#45;default">&lt;!&ndash;&ndash;&gt;
90
- &lt;!&ndash;&ndash;&gt;<span> ) </span></button>
91
- <button type="button" class="el-button el-button&#45;&#45;default el-button&#45;&#45;default">&lt;!&ndash;&ndash;&gt;
92
- &lt;!&ndash;&ndash;&gt;<span> , </span></button>-->
57
+ <el-button
58
+ v-on:click="insertSymbol(item)"
59
+ size="default"
60
+ v-for="(item, idx) in operate"
61
+ :key="idx"
62
+ >
63
+ {{ item }}
64
+ </el-button>
93
65
  </div>
66
+ <!-- -->
94
67
  </div>
95
68
  </el-col>
96
69
  </el-row>
97
- <el-row style="margin: 10px;">
70
+ <el-row style="margin: 10px">
98
71
  <el-col :span="6">
99
72
  <div class="group-item-left">
100
- <div class="item-header"> 组件列表</div>
101
- <el-input v-model="filterText" :placeholder="i18nt('designer.hint.formulaSearch')" clearable></el-input>
73
+ <div class="item-header">
74
+ {{ i18nt("designer.hint.formulaWidgetList") }}
75
+ </div>
76
+ <el-input
77
+ :placeholder="i18nt('designer.hint.formulaSearch')"
78
+ v-model="filterText"
79
+ clearable
80
+ ></el-input>
102
81
  <div class="item-body-left">
103
82
  <el-tree
104
83
  ref="fieldTree"
@@ -106,22 +85,18 @@
106
85
  :filter-node-method="filterNode"
107
86
  @node-click="insertField"
108
87
  >
109
- <span class="custom-tree-node" slot-scope="{ node }">
110
- <el-tooltip effect="dark" :content="node.label" placement="right">
111
- <span>{{ node.label }}</span>
112
- </el-tooltip>
113
- </span>
88
+ <template #default="{ node, data }">
89
+ <span class="custom-tree-node">
90
+ <el-tooltip
91
+ effect="dark"
92
+ :content="node.label"
93
+ placement="right"
94
+ >
95
+ <span>{{ node.label }}</span>
96
+ </el-tooltip>
97
+ </span>
98
+ </template>
114
99
  </el-tree>
115
- <!-- <div role="tree" class="el-tree">
116
- <div role="treeitem" tabindex="0" draggable="false" class="el-tree-node is-focusable">
117
- <div class="el-tree-node__content" style="padding-left: 0px;"><span
118
- class="is-leaf el-tree-node__expand-icon el-icon-caret-right"></span>&lt;!&ndash;&ndash;&gt;&lt;!&ndash;&ndash;&gt;
119
- <span
120
- class="custom-tree-node"><span class="el-tooltip"
121
- aria-describedby="el-tooltip-4169" tabindex="0">number</span></span>
122
- </div>&lt;!&ndash;&ndash;&gt;</div>&lt;!&ndash;&ndash;&gt;
123
- <div class="el-tree__drop-indicator" style="display: none;"></div>
124
- </div>-->
125
100
  </div>
126
101
  </div>
127
102
  </el-col>
@@ -129,77 +104,38 @@
129
104
  <el-row>
130
105
  <el-col :span="24">
131
106
  <div class="group-item-right-top">
132
- <div class="item-header"> 函数列表</div>
107
+ <div class="item-header">
108
+ {{ i18nt("designer.hint.formulaFunctionList") }}
109
+ </div>
133
110
  <div class="function-list">
134
111
  <el-collapse v-model="funcActiveCollapseNames">
135
- <el-collapse-item v-for="(item,index) in funcList" :key="index" :name="index"
136
- :title="i18nt(item.fClass)">
137
- <div v-for="(item2,index2) in item.flist" :key="index2" class="field-item"
138
- @click="insertFunction(item2.fName +'(')"
139
- @mouseenter="showIntro(i18nt(item2.fName),i18nt(item.fClass),i18nt(item2.fIntro))"
140
- @mouseleave="resetIntro">
141
- <span>{{ item2.fName }}</span><span
142
- class="el-tag el-tag--light">{{ i18nt(item2.fType) }} </span></div>
143
- <!-- <div class="field-item"><span>SUM</span><span
144
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
145
- <div class="field-item"><span>AVERAGE</span><span
146
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
147
- <div class="field-item"><span>MAX</span><span
148
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
149
- <div class="field-item"><span>MIN</span><span
150
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
151
- <div class="field-item"><span>ABS</span><span
152
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
153
- <div class="field-item"><span>ROUND</span><span
154
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
155
- <div class="field-item"><span>CEILING</span><span
156
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
157
- <div class="field-item"><span>LOG</span><span
158
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
159
- <div class="field-item"><span>MOD</span><span
160
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
161
- <div class="field-item"><span>POWER</span><span
162
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>-->
112
+ <el-collapse-item
113
+ v-for="(item, index) in funcList"
114
+ :key="index"
115
+ :title="i18nt(item.fClass)"
116
+ :name="index"
117
+ >
118
+ <div
119
+ v-for="(info, i) in item.flist"
120
+ :key="i"
121
+ class="field-item"
122
+ @click="insertFunction(info.fName + '(')"
123
+ @mouseenter="
124
+ showIntro(
125
+ i18nt(info.fName),
126
+ i18nt(item.fClass),
127
+ i18nt(info.fIntro)
128
+ )
129
+ "
130
+ v-on:mouseleave="resetIntro"
131
+ >
132
+ <span>{{ info.fName }}</span>
133
+ <el-tag :type="getClass(info.fType)"
134
+ >{{ i18nt(info.fType) }}
135
+ </el-tag>
136
+ </div>
163
137
  </el-collapse-item>
164
138
  </el-collapse>
165
- <!-- <div role="tablist" aria-multiselectable="true" class="el-collapse">
166
- <div class="el-collapse-item is-active">
167
- <div role="tab" aria-expanded="true" aria-controls="el-collapse-content-7683"
168
- aria-describedby="el-collapse-content-7683">
169
- <div role="button" id="el-collapse-head-7683" tabindex="0"
170
- class="el-collapse-item__header is-active">数学函数<i
171
- class="el-collapse-item__arrow el-icon-arrow-right is-active"></i></div>
172
- </div>
173
- <div role="tabpanel" aria-labelledby="el-collapse-head-7683" id="el-collapse-content-7683"
174
- class="el-collapse-item__wrap">
175
- <div class="el-collapse-item__content">
176
- <div class="field-item"><span>INT</span><span
177
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
178
- <div class="field-item"><span>SUM</span><span
179
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
180
- <div class="field-item"><span>AVERAGE</span><span
181
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
182
- <div class="field-item"><span>MAX</span><span
183
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
184
- <div class="field-item"><span>MIN</span><span
185
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
186
- <div class="field-item"><span>ABS</span><span
187
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
188
- <div class="field-item"><span>ROUND</span><span
189
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
190
- <div class="field-item"><span>CEILING</span><span
191
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
192
- <div class="field-item"><span>LOG</span><span
193
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
194
- <div class="field-item"><span>MOD</span><span
195
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
196
- <div class="field-item"><span>POWER</span><span
197
- class="el-tag el-tag&#45;&#45;light">数字 </span></div>
198
- </div>
199
- </div>
200
- </div>
201
- </div>-->
202
-
203
139
  </div>
204
140
  </div>
205
141
  </el-col>
@@ -210,12 +146,17 @@
210
146
  <div class="item-header">{{ introTitle }}</div>
211
147
  <div class="item-body-right-bottom">
212
148
  <ul>
213
- <li v-if="!!introduction.title" style="font-size: 16px; color: rgb(10, 93, 124);"> {{
214
- introduction.title
215
- }}
149
+ <li
150
+ v-if="introduction.title !== ''"
151
+ style="font-size: 16px; color: #0a5d7c"
152
+ >
153
+ {{ introduction.title }}
216
154
  </li>
217
155
  <li>
218
- <div class="intro-content" v-html="introduction.content"></div>
156
+ <div
157
+ class="intro-content"
158
+ v-html="introduction.content"
159
+ ></div>
219
160
  </li>
220
161
  </ul>
221
162
  </div>
@@ -223,84 +164,87 @@
223
164
  </el-col>
224
165
  </el-row>
225
166
  </div>
226
- <span slot="footer" class="dialog-footer">
227
- <el-button @click="formulaDialogVisible = false">{{ $t2('取 消', 'system.button.cancel2') }}</el-button>
228
- <el-button type="primary" @click="saveFormula">{{ $t2('确 定', 'system.button.confirm2') }}</el-button>
229
- </span>
167
+ <div class="dialog-footer" slot="footer">
168
+ <el-button
169
+ @click="formulaDialogVisible = false"
170
+ class="button-sty"
171
+ icon="el-icon-close"
172
+ >
173
+ {{ i18nt("designer.hint.cancel") }}
174
+ </el-button>
175
+ <el-button
176
+ type="primary"
177
+ @click="saveFormula"
178
+ class="button-sty"
179
+ icon="el-icon-check"
180
+ >
181
+ {{ i18nt("designer.hint.confirm") }}
182
+ </el-button>
183
+ </div>
230
184
  </el-dialog>
231
185
  </div>
232
186
  </template>
233
187
 
234
188
  <script>
235
- import i18n from "../../../../../components/xform/utils/i18n"
236
-
237
- /*import { Editor, EditorContent } from '@tiptap/vue-2'
238
- import StarterKit from '@tiptap/starter-kit'
239
- import {Schema, DOMParser} from "prosemirror-model"*/
240
-
241
- import {
242
- formulas,
243
- FORMULA_REG_EXP,
244
- } from "../../../../../components/xform/utils/formula";
189
+ import {basicSetup, EditorView} from "codemirror";
190
+ import {javascript} from "@codemirror/lang-javascript";
191
+ import {EditorState} from "@codemirror/state";
192
+ import i18n from "@base/components/xform/utils/i18n";
245
193
  import {
246
194
  deepClone,
247
- getAllFieldWidgets,
248
195
  getAllContainerWidgets,
249
- traverseFieldWidgetsOfContainer, getFieldWidgetById
250
- } from "../../../../../components/xform/utils/util";
251
-
196
+ getAllFieldWidgets,
197
+ getFieldWidgetById,
198
+ traverseFieldWidgetsOfContainer,
199
+ loopHandleWidget
200
+ } from "@base/components/xform/utils/util";
201
+ import {
202
+ placeholders,
203
+ baseTheme,
204
+ formulas,
205
+ FORMULA_REG_EXP,
206
+ } from "@base/components/xform/utils/formula-util";
252
207
 
253
208
  export default {
254
209
  name: "formula-editor",
255
210
  mixins: [i18n],
256
- components: {/*EditorContent*/},
211
+ components: {},
257
212
  props: {
258
213
  designer: Object,
259
214
  selectedWidget: Object,
260
215
  optionModel: Object,
216
+ tableColumns: Array
261
217
  },
218
+ inject:["columnFlag","sourceData"],
262
219
  computed: {
263
220
  formulaForView() {
264
- const o = this.optionModel.formula.match(FORMULA_REG_EXP);
265
- if (!o) return this.optionModel.formula;
266
- let e = this.optionModel.formula;
267
- return (
268
- o.forEach((n) => {
269
- const l = n.split(".")[1];
270
- e = e.replaceAll(n, l);
271
- }),
272
- e
273
- );
221
+ const matchResult = this.optionModel.formula.match(FORMULA_REG_EXP);
222
+ if (!matchResult) {
223
+ return this.optionModel.formula;
224
+ }
225
+
226
+ let resultFormula = this.optionModel.formula;
227
+ matchResult.forEach((mi) => {
228
+ const secondPart = mi.split(".")[1];
229
+ resultFormula = resultFormula.replaceAll(mi, secondPart);
230
+ });
231
+
232
+ return resultFormula;
274
233
  },
275
234
  },
276
235
  watch: {
277
- filterText(o) {
278
- this.$refs.fieldTree.filter(o);
236
+ filterText(val) {
237
+ this.$refs.fieldTree.filter(val);
279
238
  },
280
239
  },
281
240
  data() {
282
241
  return {
283
- cmOptions: {
284
- // 语言及语法模式
285
- mode: 'text/javascript',
286
- // 主题
287
- theme: "idea",
288
- // 显示函数
289
- line: true,
290
- lineNumbers: false,
291
- // 软换行
292
- lineWrapping: true,
293
- // tab宽度
294
- tabSize: 4,
295
- },
296
- formulaStr:"",
297
-
298
242
  codeMirror: null,
299
243
  formula: "",
300
- tags: [],
301
- fieldTreeData: [],
244
+ tags: [], // 公式页签集合
245
+ fieldTreeData: [], // 设计器字段树
302
246
  filterText: "",
303
- formulaDialogVisible: !1,
247
+ formulaDialogVisible: false,
304
248
  operate: [
305
249
  "+",
306
250
  "-",
@@ -325,9 +269,7 @@ export default {
325
269
  value: "large",
326
270
  },
327
271
  {
328
- label: this.i18nt(
329
- "designer.hint.formulaSizeMedium"
330
- ),
272
+ label: this.i18nt("designer.hint.formulaSizeMedium"),
331
273
  value: "default",
332
274
  },
333
275
  {
@@ -339,19 +281,17 @@ export default {
339
281
  value: "small",
340
282
  },
341
283
  ],
342
- introTitle: this.i18nt(
343
- "designer.hint.formulaFunctionExplain"
344
- ),
284
+ introTitle: this.i18nt("designer.hint.formulaFunctionExplain"),
345
285
  introduction: {
346
286
  title: this.i18nt("designer.hint.formulaPleaseSelect"),
347
287
  content:
348
- '<span class="cg">'
349
- + this.i18nt("designer.hint.formulaSample")
350
- + ':</span><span class="fname">SUM</span><span class="cg">(</span><span class="cs">'
351
- + this.i18nt("designer.hint.formulaPara")
352
- + '1</span><span class="cg">,</span><span class="cs">'
353
- + this.i18nt("designer.hint.formulaPara")
354
- + '2</span><span class="cg">)</span>',
288
+ '<span class="cg">' +
289
+ this.i18nt("designer.hint.formulaSample") +
290
+ ':</span><span class="fname">SUM</span><span class="cg">(</span><span class="cs">' +
291
+ this.i18nt("designer.hint.formulaPara") +
292
+ '1</span><span class="cg">,</span><span class="cs">' +
293
+ this.i18nt("designer.hint.formulaPara") +
294
+ '2</span><span class="cg">)</span>',
355
295
  },
356
296
  funcList: formulas,
357
297
  funcActiveCollapseNames: [0],
@@ -360,332 +300,561 @@ export default {
360
300
  mounted() {
361
301
  },
362
302
  methods: {
363
- clearFormula(o) {
364
- (this.formula = ""),
365
- (this.tags = []),
366
- this.codeMirror.view.dispatch({
367
- changes: {
368
- from: 0,
369
- to: this.codeMirror.view.state.doc.length,
370
- insert: "",
371
- },
303
+ clearFormula(event) {
304
+ this.formula = ""; //CodeMirror 模式
305
+ this.tags = []; //el-tag模式
306
+ this.codeMirror.dispatch({
307
+ changes: {from: 0, to: this.codeMirror.state.doc.length, insert: ""},
308
+ });
309
+ },
310
+
311
+ /** 删除字符串str中的第n个subStr
312
+ * @param {Object} str
313
+ * @param {Object} subStr
314
+ * @param {Object} n
315
+ */
316
+ deleteChar(str, subStr, n) {
317
+ let num = -1;
318
+ return str.replace(/a/g, (item) => {
319
+ num++;
320
+ return num === n ? "" : item;
321
+ });
322
+ },
323
+
324
+ filterNode(value, data) {
325
+ if (!value) return true;
326
+ return data.label.indexOf(value) !== -1;
327
+ },
328
+
329
+ traverseFieldWidgetsOfTableDataWidget(widget, callback) {
330
+ if (widget.type == "data-table") {
331
+ let loopDo = (t) => {
332
+ if (t.children && t.children.length) {
333
+ t.children.forEach((item) => {
334
+ loopDo(item);
335
+ });
336
+ } else {
337
+ if (t.widget) {
338
+ if (t.formatS == "editNumber") {
339
+ t.widget.options.label = t.label;
340
+ this.handleTableConfigData(t.widget, callback);
341
+ }
342
+ }
343
+ }
344
+ };
345
+
346
+ let tableColumns = this.tableColumns;
347
+ let columns = tableColumns ? tableColumns : widget.options.tableColumns
348
+ columns.forEach((item) => {
349
+ loopDo(item);
350
+ loopHandleWidget(item.widgetList, (item1) => {
351
+ if (item1.type == "number") {
352
+ this.handleTableConfigData(item1, callback);
353
+ }
354
+ });
372
355
  });
356
+ }
373
357
  },
374
- deleteChar(o, e, n) {
375
- let l = -1;
376
- return o.replace(/a/g, (s) => (l++, l === n ? "" : s));
358
+ handleTableConfigData(widget, callback) {
359
+ callback(widget);
377
360
  },
378
- filterNode(o, e) {
379
- return o ? e.label.indexOf(o) !== -1 : !0;
361
+ getTargetWidgetList(){
362
+ let widgetList = this.designer.widgetList;
363
+ if(this.columnFlag){
364
+ let sourceData = this.sourceData;
365
+ let formWidgetList = sourceData.getWidgetList(widgetList)
366
+ widgetList = formWidgetList;
367
+ }
368
+ return widgetList;
380
369
  },
381
370
  loadFieldListToTree() {
382
- this.fieldTreeData.length = 0;
383
- const o = getAllFieldWidgets(this.designer.widgetList),
384
- e = getAllContainerWidgets(this.designer.widgetList),
385
- n = [];
386
- let l = [];
387
- const s = {};
388
- e.forEach((c) => {
389
- if (
390
- c.type === "sub-form"
391
- || c.type === "grid-sub-form"
392
- ) {
393
- n.push(c.container);
394
- const u = [],
395
- $ = (g) => {
396
- !!g.formItemFlag
397
- && g.type === "number"
398
- && u.push(g);
399
- };
400
- traverseFieldWidgetsOfContainer(c.container, $),
401
- (s[c.container.options.name] = u),
402
- (l = l.concat(u));
371
+ this.fieldTreeData.length = 0; //先清空
372
+
373
+ let widgetList = this.getTargetWidgetList();
374
+
375
+ const allFields = getAllFieldWidgets(widgetList);
376
+ const allContainers = getAllContainerWidgets(widgetList);
377
+
378
+ const subFormArray = [];
379
+ let sfFieldArray = [];
380
+ const subFormFieldMap = {};
381
+
382
+ //获取子表单容器内部的字段
383
+ allContainers.forEach((con) => {
384
+ if (con.type === "sub-form" || con.type === "grid-sub-form") {
385
+ subFormArray.push(con.container);
386
+
387
+ const tmpFieldArray = [];
388
+ const fwHandler = (fw) => {
389
+ if (!!fw.formItemFlag && fw.type === "number") {
390
+ tmpFieldArray.push(fw);
391
+ }
392
+ };
393
+ traverseFieldWidgetsOfContainer(con.container, fwHandler);
394
+ subFormFieldMap[con.container.options.name] = tmpFieldArray;
395
+ sfFieldArray = sfFieldArray.concat(tmpFieldArray);
396
+ } else if (con.type === "data-table") {
397
+ subFormArray.push(con.container);
398
+
399
+ const tmpFieldArray = [];
400
+ const fwHandler = (fw) => {
401
+ if (!!fw.formItemFlag && fw.type === "number") {
402
+ tmpFieldArray.push(fw);
403
+ }
404
+ };
405
+
406
+ // this.traverseFieldWidgetsOfTableDataWidget(con.container, fwHandler);
407
+ traverseFieldWidgetsOfContainer(con.container, fwHandler);
408
+ subFormFieldMap[con.container.options.name] = tmpFieldArray;
409
+ sfFieldArray = sfFieldArray.concat(tmpFieldArray);
403
410
  }
404
- }),
405
- o.forEach((c) => {
406
- if (!l.find((u) => u.id === c.field.id)) {
407
- const u = {
408
- id: c.field.id,
409
- name: c.field.options.name,
410
- label: c.field.options.label,
411
- type: c.field.type,
412
- formItemFlag: !0,
413
- };
414
- u.name !== this.optionModel.name
415
- && u.type === "number"
416
- && this.fieldTreeData.push(u);
411
+ });
412
+
413
+ //加载到树形组件数据对象
414
+ allFields.forEach((fld) => {
415
+ if (!sfFieldArray.find((item) => item.id === fld.field.id)) {
416
+ //排除子表单字段
417
+ const fieldNode = {
418
+ id: fld.field.id,
419
+ name: fld.field.options.name,
420
+ label: fld.field.options.label,
421
+ type: fld.field.type,
422
+ formItemFlag: true,
423
+ };
424
+
425
+ if (
426
+ fieldNode.name !== this.optionModel.name &&
427
+ fieldNode.type === "number"
428
+ ) {
429
+ //排除当前设置公式字段
430
+ this.fieldTreeData.push(fieldNode);
417
431
  }
418
- }),
419
- n.forEach((c) => {
420
- const u = {
421
- id: c.id,
422
- name: c.options.name,
423
- label: c.options.label || c.options.name,
424
- type: c.type,
425
- formItemFlag: !1,
426
- children: [],
432
+ }
433
+ });
434
+
435
+ subFormArray.forEach((sf) => {
436
+ const subFormNode = {
437
+ id: sf.id,
438
+ name: sf.options.name,
439
+ label: sf.options.label || sf.options.name,
440
+ type: sf.type,
441
+ formItemFlag: false,
442
+ children: [],
443
+ };
444
+
445
+ subFormFieldMap[sf.options.name].forEach((fld) => {
446
+ const fieldNode = {
447
+ id: fld.id,
448
+ name: fld.options.name,
449
+ label: fld.options.label,
450
+ type: fld.type,
451
+ formItemFlag: true,
427
452
  };
428
- s[c.options.name].forEach(($) => {
429
- const g = {
430
- id: $.id,
431
- name: $.options.name,
432
- label: $.options.label,
433
- type: $.type,
434
- formItemFlag: !0,
435
- };
436
- g.name !== this.optionModel.name
437
- && u.children.push(g);
438
- }),
439
- this.fieldTreeData.push(u);
453
+
454
+ if (fieldNode.name !== this.optionModel.name) {
455
+ //排除当前设置公式字段
456
+ subFormNode.children.push(fieldNode);
457
+ }
440
458
  });
459
+
460
+ this.fieldTreeData.push(subFormNode);
461
+ });
441
462
  },
442
- insertField(o, e, n) {
443
- if (o.formItemFlag) {
444
- let l = o.id,
445
- s = "[" + o.label + "]";
446
- this.updateCodeMirror(l, s, "field");
463
+
464
+ // 插入字段
465
+ insertField(obj, node, self) {
466
+ if (!!obj.formItemFlag) {
467
+ let fieldId = obj.id + "";
468
+ let fieldLabel = "[" + obj.label + "]";
469
+ this.updateCodeMirror(fieldId, fieldLabel, "field");
447
470
  }
448
471
  },
449
- insertSymbol(o) {
450
- this.updateCodeMirror(o, o, null);
472
+
473
+ // 插入符号
474
+ insertSymbol(opt) {
475
+ this.updateCodeMirror(opt, opt, null);
451
476
  },
452
- insertFunction(o) {
453
- const e = o.substring(0, o.length - 1);
454
- this.updateCodeMirror(e, e, "func");
477
+
478
+ // 插入函数
479
+ insertFunction(opt) {
480
+ const val = opt.substring(0, opt.length - 1);
481
+ this.updateCodeMirror(val, val, "func");
455
482
  },
456
- updateCodeMirror(o, e, n = null) {
457
- if (n) {
458
- let l = {field: o, text: e, type: n},
459
- s = l.field.length + l.text.length + l.type.length,
460
- c = `{{${l.field}.${l.text}.${l.type}}}`;
461
- n === "func" ? ((c += "()"), (s = s + 7)) : (s = s + 6),
462
- c
463
- && this.codeMirror.view.dispatch({
464
- changes: {
465
- from: this.codeMirror.view.state.selection.head,
466
- to: this.codeMirror.view.state.selection
467
- .head,
468
- insert: c,
469
- },
470
- selection: {
471
- anchor:
472
- this.codeMirror.view.state.selection
473
- .head + s,
474
- },
475
- });
476
- } else
477
- this.codeMirror.view.dispatch({
483
+
484
+ updateCodeMirror(field, text, type = null) {
485
+ if (type) {
486
+ let obj = {
487
+ field: field,
488
+ text: text,
489
+ type: type,
490
+ };
491
+ let selectionLet = obj.field.length + obj.text.length + obj.type.length; //光标位置;
492
+ let code = `{{${obj.field}.${obj.text}.${obj.type}}}`;
493
+ if (type === "func") {
494
+ code += "()";
495
+ selectionLet = selectionLet + 7;
496
+ } else {
497
+ selectionLet = selectionLet + 6;
498
+ }
499
+
500
+ if (code) {
501
+ this.codeMirror.dispatch({
502
+ changes: {
503
+ from: this.codeMirror.state.selection.main.head,
504
+ to: this.codeMirror.state.selection.main.head,
505
+ insert: code,
506
+ },
507
+ selection: {
508
+ anchor: this.codeMirror.state.selection.main.head + selectionLet,
509
+ },
510
+ });
511
+ }
512
+ } else {
513
+ this.codeMirror.dispatch({
478
514
  changes: {
479
- from: this.codeMirror.view.state.selection.head,
480
- to: this.codeMirror.view.state.selection.head,
481
- insert: e,
515
+ from: this.codeMirror.state.selection.main.head,
516
+ to: this.codeMirror.state.selection.main.head,
517
+ insert: text,
482
518
  },
483
519
  selection: {
484
- anchor:
485
- this.codeMirror.view.state.selection.head
486
- + e.length,
520
+ anchor: this.codeMirror.state.selection.main.head + text.length,
487
521
  },
488
522
  });
523
+ }
489
524
  },
490
- removeStr(o) {
491
- let e = o.indexOf("[");
492
- if (e === -1) return o;
493
- let n = o.indexOf("]", e) + 1,
494
- l = o.substring(e, n),
495
- s = o.split(l),
496
- c = "";
497
- for (let u = 0; u < s.length; u++) c += s[u];
498
- return this.removeStr(c);
525
+
526
+ // 在字符串中查找[开始]结尾的字符串,并删除
527
+ removeStr(str) {
528
+ let a = str.indexOf("[");
529
+ if (a === -1) {
530
+ return str;
531
+ }
532
+ let b = str.indexOf("]", a) + 1;
533
+ let c = str.substring(a, b);
534
+ let strArr = str.split(c);
535
+ let newStr = "";
536
+ for (let i = 0; i < strArr.length; i++) {
537
+ newStr += strArr[i];
538
+ }
539
+ return this.removeStr(newStr);
499
540
  },
541
+
542
+ /**
543
+ * 字段label可能在公式保存后再次被修改,当编辑公式时需要再次刷新公式中的字段label(不刷新也不会影响公式计算结果)
544
+ */
500
545
  refreshFormula() {
501
- const o = this.optionModel.formula.match(FORMULA_REG_EXP);
502
- if (!o) return this.optionModel.formula;
503
- o.forEach((e) => {
504
- const n = e.split(".")[0],
505
- l = e.split(".")[2];
506
- if (l.substring(0, l.length - 2) === "func") return;
507
- const c = n.substring(2, n.length),
508
- u = getFieldWidgetById(
509
- this.designer.widgetList,
510
- c,
511
- !1
512
- ),
513
- $ = u.options.label || u.options.name;
514
- this.optionModel.formula
515
- = this.optionModel.formula.replace(
516
- e,
517
- n + ".[" + $ + "]." + l
546
+ const matchResult = this.optionModel.formula.match(FORMULA_REG_EXP);
547
+ if (!matchResult) {
548
+ return this.optionModel.formula;
549
+ }
550
+
551
+ matchResult.forEach((mi) => {
552
+ const firstPart = mi.split(".")[0];
553
+ const secondPart = mi.split(".")[1];
554
+ const thirdPart = mi.split(".")[2];
555
+ const nodeType = thirdPart.substring(0, thirdPart.length - 2);
556
+ if (nodeType === "func") {
557
+ return;
558
+ }
559
+
560
+ const fieldId = firstPart.substring(2, firstPart.length);
561
+ const fieldSchema = getFieldWidgetById(
562
+ // this.designer.widgetList,
563
+ this.getTargetWidgetList(),
564
+ fieldId,
565
+ false
518
566
  );
567
+ if (!!fieldSchema) {
568
+ const newLabel =
569
+ fieldSchema.options.label || fieldSchema.options.name;
570
+ this.optionModel.formula = this.optionModel.formula.replace(
571
+ mi,
572
+ firstPart + ".[" + newLabel + "]." + thirdPart
573
+ );
574
+ } else {
575
+ this.$message.error(
576
+ this.i18nt("designer.hint.deletedFieldInFormula") + secondPart
577
+ );
578
+ }
519
579
  });
520
580
  },
581
+
582
+ // 打开编辑公式弹窗
521
583
  editFormula() {
522
- (this.fieldTreeData.length = 0),
523
- this.designer.widgetList.forEach((e) => {
524
- this.optionModel.name !== e.id
525
- && this.loadFieldListToTree();
526
- }),
527
- console.log(
528
- "设计器字段===>",
529
- this.fieldTreeData
530
- ),
531
- (this.tags = deepClone(this.optionModel.formulaTags)),
532
- this.refreshFormula();
533
- const o = this.optionModel.formula || "";
534
- (this.formulaDialogVisible = !0),
535
- this.$nextTick(() => {
536
-
537
- this.codeMirror = new Editor({
538
- content: o,
584
+ this.fieldTreeData.length = 0;
585
+ // 初始化字段树
586
+ if(this.columnFlag){
587
+ this.loadFieldListToTree();
588
+ }else{
589
+ this.designer.widgetList.forEach((wItem) => {
590
+ if (this.optionModel.name !== wItem.id) {
591
+ //this.buildTreeNodeOfWidget(wItem, this.fieldTreeData);
592
+ this.loadFieldListToTree();
593
+ }
594
+ });
595
+ }
596
+
597
+ console.log("设计器字段===>", this.fieldTreeData);
598
+
599
+ // 加载当前字段计算公式tags
600
+ this.tags = deepClone(this.optionModel.formulaTags);
601
+ // this.formula = deepClone(this.optionModel.formula);
602
+
603
+ //const code = this.optionModel.formulaShow;
604
+ this.refreshFormula();
605
+ const code = this.optionModel.formula;
606
+ this.formulaDialogVisible = true;
607
+
608
+ //==== codeMirror 挂载视图 ====
609
+ this.$nextTick(() => {
610
+ this.codeMirror = new EditorView({
611
+ state: EditorState.create({
612
+ doc: code,
539
613
  extensions: [
540
- StarterKit,
614
+ basicSetup,
615
+ javascript(),
616
+ [baseTheme, [], placeholders],
541
617
  ],
542
- })
543
-
544
- /*(this.codeMirror = new EditorView({
545
- state: EditorState.create({
546
- doc: o,
547
- /!*extensions: [
548
- basicSetup,
549
- javascript(),
550
- [baseTheme, [], placeholders],
551
- ],*!/
552
- }),
553
- parent: this.$refs.cmRef,
554
- })),
555
- console.log(
556
- "编辑器实例==>",
557
- this.codeMirror
558
- );*/
618
+ }),
619
+ parent: this.$refs.cmRef,
559
620
  });
621
+ console.log("编辑器实例==>", this.codeMirror);
622
+ });
560
623
  },
624
+
625
+ // 保存计算公式
561
626
  saveFormula() {
562
- (this.optionModel.formula
563
- = this.codeMirror.view.state.doc.text.join("")),
564
- (this.formulaDialogVisible = !1);
627
+ this.optionModel.formula = this.codeMirror.state.doc.text.join("");
628
+ this.formulaDialogVisible = false;
565
629
  },
566
- analysisFormula(o) {
567
- let e = o.indexOf("[");
568
- if (e === -1) return o;
569
- let n = o.indexOf("]", e) + 1,
570
- l = o.substring(e, n),
571
- s = this.findTreeNodeByCnName(l);
572
- return s
573
- ? ((o = o.replace(l, "{" + s + "}")),
574
- this.analysisFormula(o))
575
- : (this.$message.error(
576
- l + " 字段无法识别"
577
- ),
578
- !1);
630
+
631
+ // 解析计算公式 STEP1:将公式中的字段转换为【英文表名.英文字段名】
632
+ analysisFormula(formula) {
633
+ let a = formula.indexOf("[");
634
+ if (a === -1) {
635
+ return formula;
636
+ }
637
+ let b = formula.indexOf("]", a) + 1;
638
+ let cnField = formula.substring(a, b);
639
+ let enFieldName = this.findTreeNodeByCnName(cnField);
640
+ if (!!enFieldName) {
641
+ formula = formula.replace(cnField, "{" + enFieldName + "}");
642
+ return this.analysisFormula(formula);
643
+ } else {
644
+ this.$message.error(cnField + " 字段无法识别");
645
+ return false;
646
+ }
579
647
  },
580
- findTreeNodeByCnName(o) {
581
- let e = "",
582
- n = "",
583
- l = o.split("[")[1].split("]")[0],
584
- s = l.split("-")[0],
585
- c = l.split("-")[1],
586
- u = this.fieldTreeData;
587
- for (let $ = 0; $ < u.length; $++) {
588
- let g = u[$].children;
589
- for (let y = 0; y < g.length; y++)
590
- if (g[y].cnTitle === s) {
591
- e = g[y].enTitle;
592
- let f = g[y].children;
593
- for (let v = 0; v < f.length; v++)
594
- if (f[v].cnTitle === c)
595
- return (n = f[v].enTitle), e + "-" + n;
648
+
649
+ // 根据树节点中文名查找树节点
650
+ findTreeNodeByCnName(nodeCnName) {
651
+ let enTableName = "",
652
+ enFieldName = "";
653
+ let tableFieldName = nodeCnName.split("[")[1].split("]")[0];
654
+ let tableName = tableFieldName.split("-")[0];
655
+ let fieldName = tableFieldName.split("-")[1];
656
+ let moduleList = this.fieldTreeData;
657
+ for (let i = 0; i < moduleList.length; i++) {
658
+ let tableList = moduleList[i].children;
659
+ for (let j = 0; j < tableList.length; j++) {
660
+ if (tableList[j].cnTitle === tableName) {
661
+ enTableName = tableList[j].enTitle;
662
+ let fieldList = tableList[j].children;
663
+ for (let k = 0; k < fieldList.length; k++) {
664
+ if (fieldList[k].cnTitle === fieldName) {
665
+ enFieldName = fieldList[k].enTitle;
666
+ return enTableName + "-" + enFieldName;
667
+ }
668
+ }
596
669
  }
670
+ }
597
671
  }
672
+ // 没找到节点返回NULL
598
673
  return null;
599
674
  },
600
- getClass(o) {
601
- if (o === this.i18nt("designer.hint.formulaNumber"))
675
+
676
+ getClass(type) {
677
+ if (type === this.i18nt("designer.hint.formulaNumber")) {
602
678
  return "warning";
603
- if (o === this.i18nt("designer.hint.formulaChar"))
679
+ }
680
+ if (type === this.i18nt("designer.hint.formulaChar")) {
604
681
  return "";
605
- if (o === this.i18nt("designer.hint.formulaObject"))
682
+ }
683
+ if (type === this.i18nt("designer.hint.formulaObject")) {
606
684
  return "danger";
685
+ }
607
686
  },
687
+
608
688
  resetIntro() {
609
- (this.introTitle = this.i18nt(
610
- "designer.hint.formulaFunctionExplain"
611
- )),
612
- (this.introduction = {
613
- title: this.i18nt(
614
- "designer.hint.formulaPleaseSelect"
615
- ),
616
- content:
617
- '<span class="cg">'
618
- + this.i18nt("designer.hint.formulaSample")
619
- + ':</span><span class="fname">SUM</span><span class="cg">(</span><span class="cs">参数1</span><span class="cg">,</span><span class="cs">参数2</span><span class="cg">)</span>',
620
- });
689
+ this.introTitle = this.i18nt("designer.hint.formulaFunctionExplain");
690
+ this.introduction = {
691
+ title: this.i18nt("designer.hint.formulaPleaseSelect"),
692
+ content:
693
+ '<span class="cg">' +
694
+ this.i18nt("designer.hint.formulaSample") +
695
+ ':</span><span class="fname">SUM</span><span class="cg">(</span><span class="cs">参数1</span><span class="cg">,</span><span class="cs">参数2</span><span class="cg">)</span>',
696
+ };
621
697
  },
622
- showIntro(o, e, n) {
623
- (n = '<span class="cg">' + n + "</span>"),
624
- (this.introduction = {title: e, content: n}),
625
- (this.introTitle = o);
698
+
699
+ showIntro(name, title, content) {
700
+ content = '<span class="cg">' + content + "</span>";
701
+ this.introduction = {
702
+ title: title,
703
+ content: content,
704
+ };
705
+ this.introTitle = name;
626
706
  },
627
- isValid(o) {
628
- let e = [],
629
- n = o.length,
630
- l = 0,
631
- s = 1,
632
- c;
633
- for (let u = 0; u < n && s; u++)
634
- switch (o[u]) {
707
+
708
+ /**
709
+ * 校验计算公式是否正确
710
+ * @param s
711
+ * @returns {boolean}
712
+ */
713
+ isValid(s) {
714
+ let a = []; //存储左括号出现的地方
715
+ let l = s.length;
716
+ let k = 0;
717
+ let flag = 1;
718
+ let j;
719
+ for (let i = 0; i < l && flag; i++) {
720
+ switch (s[i]) {
635
721
  case "(":
636
- (e[l] = u), l++;
722
+ a[k] = i;
723
+ k++;
637
724
  break;
638
725
  case ")":
639
- (c = e[l - 1]),
640
- o[c] === "(" ? ((e[l] = 0), l--) : (s = 0);
726
+ j = a[k - 1];
727
+ if (s[j] === "(") {
728
+ a[k] = 0;
729
+ k--;
730
+ } else {
731
+ flag = 0;
732
+ }
641
733
  break;
642
734
  case "{":
643
- (e[l] = u), l++;
735
+ a[k] = i;
736
+ k++;
644
737
  break;
645
738
  case "}":
646
- (c = e[l - 1]),
647
- o[c] === "{" ? ((e[l] = 0), l--) : (s = 0);
739
+ j = a[k - 1];
740
+ if (s[j] === "{") {
741
+ a[k] = 0;
742
+ k--;
743
+ } else {
744
+ flag = 0;
745
+ }
648
746
  break;
649
747
  case "[":
650
- (e[l] = u), l++;
748
+ a[k] = i;
749
+ k++;
651
750
  break;
652
751
  case "]":
653
- (c = e[l - 1]),
654
- o[c] === "[" ? ((e[l] = 0), l--) : (s = 0);
752
+ j = a[k - 1];
753
+ if (s[j] === "[") {
754
+ a[k] = 0;
755
+ k--;
756
+ } else {
757
+ flag = 0;
758
+ }
655
759
  break;
656
760
  }
657
- return l !== 0 && (s = 0), s !== 0;
761
+ }
762
+ if (k !== 0) {
763
+ flag = 0;
764
+ }
765
+ return flag !== 0;
658
766
  },
659
767
  },
660
- }
768
+ };
661
769
  </script>
662
770
 
663
- <style scoped>
771
+ <style lang="scss" scoped>
772
+ :deep(.cm-editor) {
773
+ height: 100%;
774
+ }
775
+
776
+ li {
777
+ list-style: none;
778
+ }
779
+
780
+ /*去掉li前面的点*/
781
+ .el-input-group {
782
+ cursor: pointer;
783
+ }
784
+
785
+ .header {
786
+ width: 97%;
787
+ border: 1px solid #ccc;
788
+ border-top-left-radius: 10px;
789
+ border-top-right-radius: 10px;
790
+ height: 31px;
791
+ line-height: 31px;
792
+ padding-left: 15px;
793
+ }
794
+
795
+ .editor {
796
+ margin-left: 10px;
797
+ margin-right: 10px;
798
+ height: 200px;
799
+ border: 1px solid #ccc;
800
+ border-radius: 6px;
801
+ }
802
+
803
+ .editor-top {
804
+ //margin-left: 10px;
805
+ height: 130px;
806
+ width: 100%;
807
+ padding: 8px;
808
+ position: relative;
809
+ overflow-x: hidden;
810
+ overflow-y: scroll;
811
+ }
812
+
813
+ .editor-bottom {
814
+ border-left: 1px solid #ccc;
815
+ display: flex;
816
+ flex-wrap: wrap;
817
+ padding: 5px;
818
+ align-content: flex-start;
819
+ }
820
+
821
+ .body-right-button {
822
+ width: 60px;
823
+ height: 40px;
824
+ }
825
+
826
+ .group-form {
827
+ margin-top: 15px;
828
+ display: flex;
829
+ justify-content: space-between;
830
+ height: 350px;
831
+ }
832
+
664
833
  .group-item-left {
665
- height: 400px;
834
+ height: 350px;
666
835
  border: 1px solid #ccc;
667
836
  border-top-left-radius: 6px;
668
837
  border-bottom-left-radius: 6px;
669
838
  margin-bottom: 5px;
670
839
  padding: 0;
671
- width: 100%
840
+ width: 100%;
672
841
  }
673
842
 
674
843
  .group-item-right-top {
675
- height: 400px;
844
+ height: 350px;
676
845
  border: 1px solid #ccc;
677
846
  border-radius: 0;
678
847
  margin-bottom: 5px;
679
- width: 100%
848
+ width: 100%;
680
849
  }
681
850
 
682
851
  .group-item-right-bottom {
683
- height: 400px;
852
+ height: 350px;
684
853
  border: 1px solid #ccc;
685
854
  border-top-right-radius: 6px;
686
855
  border-bottom-right-radius: 6px;
687
856
  margin-bottom: 5px;
688
- width: 100%
857
+ width: 100%;
689
858
  }
690
859
 
691
860
  .item-header {
@@ -693,25 +862,111 @@ export default {
693
862
  height: 29px;
694
863
  line-height: 29px;
695
864
  padding-left: 15px;
696
- font-weight: 700
865
+ font-weight: bold;
697
866
  }
698
867
 
699
868
  .item-body-left {
700
869
  height: 320px;
701
- overflow-y: auto
870
+ overflow-y: auto;
702
871
  }
703
872
 
704
873
  .function-list {
705
- height: 360px;
706
- overflow-y: auto
707
- }
874
+ height: 320px;
875
+ overflow-y: auto;
708
876
 
709
- .function-list .el-collapse-item__header {
710
- font-weight: 400 !important
877
+ :deep(.el-collapse-item__header) {
878
+ font-weight: normal !important;
879
+ }
711
880
  }
712
881
 
713
882
  .item-body-right-bottom {
714
883
  height: 152px;
715
- overflow-y: auto
884
+ overflow-y: auto;
885
+ }
886
+
887
+ .el-collapse {
888
+ border: none;
889
+ }
890
+
891
+ :deep(.el-dialog) {
892
+ margin-top: 10px !important;
893
+ }
894
+
895
+ :deep(.el-collapse-item__header) {
896
+ padding-left: 10px;
897
+ border: none;
898
+ }
899
+
900
+ :deep(.el-collapse-item__wrap) {
901
+ border: none;
902
+ }
903
+
904
+ :deep(.el-collapse-item__arrow) {
905
+ margin-left: 8px;
906
+ }
907
+
908
+ .field-item {
909
+ display: flex;
910
+ justify-content: space-between;
911
+ align-items: center;
912
+ height: 32px;
913
+ padding-left: 30px;
914
+ padding-right: 15px;
915
+ cursor: pointer;
916
+ }
917
+
918
+ .field-item:hover {
919
+ background-color: #f8f8f8;
920
+ }
921
+
922
+ p::before {
923
+ content: "● ";
924
+ color: #0a5d7c;
925
+ }
926
+
927
+ p {
928
+ height: 24px;
929
+ line-height: 24px;
930
+ padding: 0 15px;
931
+ font-size: 16px;
932
+ color: #0a5d7c;
933
+ }
934
+
935
+ .intro-content {
936
+ padding-left: 30px;
937
+ }
938
+
939
+ .cg {
940
+ color: #0a5d7c;
941
+ }
942
+
943
+ .fname {
944
+ display: inline-block;
945
+ border-radius: 2px;
946
+ padding: 0 5px;
947
+ margin: 1px;
948
+ font-size: 12px;
949
+ line-height: 20px;
950
+ color: #708;
951
+ background: #fff;
952
+ }
953
+
954
+ .cs {
955
+ display: inline-block;
956
+ border-radius: 2px;
957
+ padding: 0 5px;
958
+ margin: 1px;
959
+ color: #fff;
960
+ font-size: 12px;
961
+ line-height: 20px;
962
+ background: #178cdf;
963
+ }
964
+
965
+ :deep(.el-dialog__body) {
966
+ padding: 0;
967
+ }
968
+
969
+ .small-padding-dialog {
970
+ /* margin-top: 0px; */
716
971
  }
717
972
  </style>