cloud-web-corejs 1.0.54-dev.42 → 1.0.54-dev.421

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 (381) hide show
  1. package/package.json +11 -3
  2. package/src/App.vue +21 -20
  3. package/src/api/user.js +8 -0
  4. package/src/components/Qrcode/fileParse.vue +0 -1
  5. package/src/components/Tinymce/index.vue +75 -53
  6. package/src/components/VabUpload/index.js +49 -1
  7. package/src/components/VabUpload/mixins.js +1736 -2
  8. package/src/components/VabUpload/propertiesDialog.vue +1 -1
  9. package/src/components/VabUpload/view.vue +206 -120
  10. package/src/components/advancedSearchDialog/mixins.js +1 -1
  11. package/src/components/baseAttachment/index.vue +49 -40
  12. package/src/components/baseAttachment/mixins.js +295 -1
  13. package/src/components/baseInputExport/mixins.js +1 -1
  14. package/src/components/baseTabs/mixins.js +166 -1
  15. package/src/components/errorMsg/mixins.js +6 -5
  16. package/src/components/excelExport/button.vue +57 -4
  17. package/src/components/excelExport/index.js +48 -5
  18. package/src/components/excelExport/index.vue +57 -5
  19. package/src/components/excelExport/mixins.js +938 -2
  20. package/src/components/excelImport/mixins.js +2 -1
  21. package/src/components/fileLibrary/fileObjAuthEditDialog.vue +6 -0
  22. package/src/components/fileLibrary/filterDialog.vue +454 -0
  23. package/src/components/fileLibrary/index.vue +594 -254
  24. package/src/components/fileLibrary/mixins/categoryMoveDialogMixins.js +1 -1
  25. package/src/components/fileLibrary/mixins/fileCategoryDialogMixins.js +1 -1
  26. package/src/components/fileLibrary/mixins/fileHistoryDialogMixins.js +2 -2
  27. package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +335 -212
  28. package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +31 -27
  29. package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +4 -4
  30. package/src/components/fileLibrary/mixins/indexMixins.js +220 -101
  31. package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +64 -4
  32. package/src/components/fileLibrary/mixins/recycleBinDialogMixins.js +3 -3
  33. package/src/components/fileLibrary/propertiesDialog.vue +113 -74
  34. package/src/components/fileLibrary/shareDialog.vue +1 -1
  35. package/src/components/formOplog/mixins.js +1 -1
  36. package/src/components/jsonImport/index.js +1 -1
  37. package/src/components/jsonImport/mixins.js +2 -1
  38. package/src/components/langImport/mixins.js +17 -16
  39. package/src/components/obsUpload/index.js +1 -0
  40. package/src/components/obsUpload/index.vue +231 -0
  41. package/src/components/obsUpload/mixins.js +8 -0
  42. package/src/components/scriptDescription/button.vue +12 -4
  43. package/src/components/statusTag/mixins.js +1 -1
  44. package/src/components/table/CellSlot.vue +1 -0
  45. package/src/components/table/index.js +1049 -10
  46. package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js +11028 -0
  47. package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css +200 -0
  48. package/src/components/table/tableForm.vue +99 -63
  49. package/src/components/table/tableFormMixin.js +1 -1
  50. package/src/components/table/util/index.js +328 -0
  51. package/src/components/table/vxeFilter/mixin.js +6 -6
  52. package/src/components/tempStorage/index.vue +76 -55
  53. package/src/components/tempStorage/tempStorageDialog.vue +179 -54
  54. package/src/components/vb-tabs/x-tabs.vue +44 -30
  55. package/src/components/wf/addOpinionButton.vue +57 -0
  56. package/src/components/wf/content.vue +833 -362
  57. package/src/components/wf/mixins/addOpinionButton.js +3 -0
  58. package/src/components/wf/mixins/setCandidateButton.js +6 -0
  59. package/src/components/wf/mixins/setCandidateDialog.js +2 -1
  60. package/src/components/wf/mixins/setCandidateDialog2.js +239 -0
  61. package/src/components/wf/mixins/wfFlowEleScriptDialog.js +3 -0
  62. package/src/components/wf/mixins/wfTaskUserRangeDialog.js +3 -0
  63. package/src/components/wf/setCandidateButton.vue +40 -0
  64. package/src/components/wf/setCandidateDialog.vue +10 -0
  65. package/src/components/wf/setCandidateDialog2.vue +105 -0
  66. package/src/components/wf/wf.js +1 -1
  67. package/src/components/wf/wfFlowEleScriptDialog.vue +89 -0
  68. package/src/components/wf/wfStartDialog.vue +66 -42
  69. package/src/components/wf/wfTaskUserRangeDialog.vue +65 -0
  70. package/src/components/wf/wfUtil.js +1 -1
  71. package/src/components/xform/form-designer/designer.js +1655 -3
  72. package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +419 -0
  73. package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +3 -3
  74. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +9 -8
  75. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +4 -1
  76. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +3 -3
  77. package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog.vue +971 -0
  78. package/src/components/xform/form-designer/form-widget/dialog/exportDialog.vue +13 -0
  79. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +301 -0
  80. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +16 -4
  81. package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +5 -1
  82. package/src/components/xform/form-designer/form-widget/dialog/formulaDialog.vue +799 -0
  83. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +38 -7
  84. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +1639 -0
  85. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1759 -8
  86. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +120 -72
  87. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +1 -1
  88. package/src/components/xform/form-designer/form-widget/field-widget/a-text-widget.vue +1 -1
  89. package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +34 -5
  90. package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +1 -1
  91. package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +19 -1
  92. package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +18 -7
  93. package/src/components/xform/form-designer/form-widget/field-widget/color-widget.vue +4 -1
  94. package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +89 -0
  95. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +14 -2
  96. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +30 -4
  97. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue +77 -0
  98. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +106 -0
  99. package/src/components/xform/form-designer/form-widget/field-widget/echart-bar-widget.vue +1 -1
  100. package/src/components/xform/form-designer/form-widget/field-widget/echart-category-widget.vue +1 -1
  101. package/src/components/xform/form-designer/form-widget/field-widget/echart-pie-widget.vue +1 -1
  102. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1634 -16
  103. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +645 -379
  104. package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +962 -0
  105. package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +10 -8
  106. package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue +81 -0
  107. package/src/components/xform/form-designer/form-widget/field-widget/input-widget.vue +7 -2
  108. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +49 -8
  109. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +61 -88
  110. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +13 -0
  111. package/src/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin.js +179 -0
  112. package/src/components/xform/form-designer/form-widget/field-widget/multiSearch-widget.vue +53 -0
  113. package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +114 -81
  114. package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +186 -0
  115. package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +35 -27
  116. package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +108 -0
  117. package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +154 -47
  118. package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +25 -6
  119. package/src/components/xform/form-designer/form-widget/field-widget/search_button-widget.vue +2 -2
  120. package/src/components/xform/form-designer/form-widget/field-widget/select-export-button-widget.vue +86 -0
  121. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +24 -9
  122. package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +53 -0
  123. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +145 -0
  124. package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +2 -1
  125. package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +31 -17
  126. package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +6 -1
  127. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +99 -0
  128. package/src/components/xform/form-designer/form-widget/field-widget/tempStorage-widget.vue +147 -0
  129. package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +46 -34
  130. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +2 -2
  131. package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +2 -170
  132. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +259 -58
  133. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +733 -0
  134. package/src/components/xform/form-designer/indexMixin.js +3 -2
  135. package/src/components/xform/form-designer/setting-panel/form-setting.vue +891 -157
  136. package/src/components/xform/form-designer/setting-panel/index.vue +4 -0
  137. package/src/components/xform/form-designer/setting-panel/indexMixin.js +1 -1
  138. package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +537 -302
  139. package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +4 -4
  140. package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +3 -3
  141. package/src/components/xform/form-designer/setting-panel/property-editor/autoValueEnabled-editor.vue +38 -0
  142. package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +6 -0
  143. package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +28 -0
  144. package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +41 -0
  145. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +125 -0
  146. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +946 -1042
  147. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/onCheckboxChange-editor.vue +1 -1
  148. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +1118 -512
  149. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +2 -2
  150. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-pane/detail-pane-editor.vue +3 -3
  151. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
  152. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
  153. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
  154. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +0 -8
  155. package/src/components/xform/form-designer/setting-panel/property-editor/copyButton-editor.vue +36 -0
  156. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin.js +2 -2
  157. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onAfterConfirmFile-editor.vue +32 -0
  158. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +2 -2
  159. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +35 -20
  160. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +64 -5
  161. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +27 -0
  162. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-item-editor.vue +21 -0
  163. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -0
  164. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +185 -69
  165. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +188 -86
  166. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +84 -39
  167. package/src/components/xform/form-designer/setting-panel/property-editor/field-gantt/gantt-editor.vue +36 -0
  168. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +70 -19
  169. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +89 -0
  170. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +8 -0
  171. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +91 -0
  172. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
  173. package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +67 -41
  174. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +56 -0
  175. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +26 -7
  176. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +13 -1
  177. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +30 -1
  178. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +63 -0
  179. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +89 -19
  180. package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +721 -466
  181. package/src/components/xform/form-designer/setting-panel/property-editor/labelColor-editor.vue +20 -11
  182. package/src/components/xform/form-designer/setting-panel/property-editor/labelIconClass-editor.vue +1 -1
  183. package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +1 -1
  184. package/src/components/xform/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +1 -1
  185. package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
  186. package/src/components/xform/form-designer/setting-panel/property-editor/multiple-editor.vue +19 -14
  187. package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
  188. package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +31 -0
  189. package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
  190. package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +349 -0
  191. package/src/components/xform/form-designer/setting-panel/property-editor/required-editor.vue +10 -6
  192. package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +3 -3
  193. package/src/components/xform/form-designer/setting-panel/property-editor/showRuleFlag-editor.vue +1 -1
  194. package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +42 -0
  195. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +305 -19
  196. package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +2 -2
  197. package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +2 -2
  198. package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +384 -53
  199. package/src/components/xform/form-designer/setting-panel/property-editor/widgetShowRuleFlag-editor.vue +263 -0
  200. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +31 -11
  201. package/src/components/xform/form-designer/toolbar-panel/index.vue +12 -11
  202. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +1 -1
  203. package/src/components/xform/form-designer/widget-panel/index.vue +21 -1
  204. package/src/components/xform/form-designer/widget-panel/indexMixin.js +19 -18
  205. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1604 -871
  206. package/src/components/xform/form-render/container-item/containerItemMixin.js +386 -11
  207. package/src/components/xform/form-render/container-item/data-table-item.vue +194 -199
  208. package/src/components/xform/form-render/container-item/data-table-mixin.js +2889 -18
  209. package/src/components/xform/form-render/container-item/detail-pane-item.vue +17 -3
  210. package/src/components/xform/form-render/container-item/grid-col-item.vue +10 -3
  211. package/src/components/xform/form-render/container-item/grid-item.vue +1 -1
  212. package/src/components/xform/form-render/container-item/list-h5-item.vue +1 -9
  213. package/src/components/xform/form-render/container-item/list-h5-item2.vue +1 -8
  214. package/src/components/xform/form-render/container-item/tab-item.vue +62 -25
  215. package/src/components/xform/form-render/container-item/table-cell-item.vue +38 -32
  216. package/src/components/xform/form-render/container-item/table-item.vue +4 -2
  217. package/src/components/xform/form-render/container-item/table2-cell-item.vue +53 -34
  218. package/src/components/xform/form-render/container-item/table2-item.vue +141 -88
  219. package/src/components/xform/form-render/index.vue +67 -20
  220. package/src/components/xform/form-render/indexMixin.js +3330 -13
  221. package/src/components/xform/lang/zh-CN.js +26 -4
  222. package/src/components/xform/mixins/defaultHandle.js +340 -1
  223. package/src/components/xform/mixins/scriptHttp.js +174 -1
  224. package/src/components/xform/utils/emitter.js +4 -4
  225. package/src/components/xform/utils/format.js +21 -30
  226. package/src/components/xform/utils/formula-util copy 2.js +945 -0
  227. package/src/components/xform/utils/formula-util copy.js +860 -0
  228. package/src/components/xform/utils/formula-util.js +860 -0
  229. package/src/components/xform/utils/util.js +1461 -1
  230. package/src/components/xform/utils/validators.js +1 -5
  231. package/src/components/xform/utils/vue2js-generator.js +2 -2
  232. package/src/index.js +210 -190
  233. package/src/layout/components/AppMain.vue +5 -1
  234. package/src/layout/components/Sidebar/default.vue +1389 -1222
  235. package/src/layout/components/TagsView/index.vue +37 -12
  236. package/src/layout/components/createCompany/createCompanyDialog.vue +157 -0
  237. package/src/layout/components/extractedCode/createDialog.vue +92 -0
  238. package/src/layout/components/extractedCode/queryDialog.vue +96 -0
  239. package/src/layout/components/extractedCode/viewDialog.vue +193 -0
  240. package/src/layout/components/watermark/index.vue +83 -0
  241. package/src/layout/defaultLayout.vue +1 -1
  242. package/src/mixins/selectDialog/index.js +266 -1
  243. package/src/mixins/table/index.js +151 -0
  244. package/src/mixins/tableTree/index.js +1 -1
  245. package/src/router/modules/customer.js +79 -8
  246. package/src/store/config/index.js +1 -532
  247. package/src/store/getters.js +2 -1
  248. package/src/store/modules/permission.js +1 -1
  249. package/src/store/modules/settings.js +1 -1
  250. package/src/store/modules/tagsView.js +1 -14
  251. package/src/store/modules/user.js +3 -2
  252. package/src/utils/index.js +2 -3
  253. package/src/utils/pddLog.js +103 -0
  254. package/src/utils/pdfUtil.js +71 -0
  255. package/src/utils/request.js +1 -1
  256. package/src/utils/vab.js +1113 -27
  257. package/src/views/bd/setting/bd_attach_setting/edit.vue +5 -5
  258. package/src/views/bd/setting/bd_attach_setting/list.vue +28 -55
  259. package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +4 -5
  260. package/src/views/bd/setting/bd_attach_setting/mixins/list.js +239 -1
  261. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -0
  262. package/src/views/bd/setting/bd_company_env/edit.vue +193 -0
  263. package/src/views/bd/setting/bd_company_env/list.vue +175 -0
  264. package/src/views/bd/setting/config_manage/list.vue +76 -0
  265. package/src/views/bd/setting/form_import_log/edit.vue +127 -0
  266. package/src/views/bd/setting/form_import_log/list.vue +206 -0
  267. package/src/views/bd/setting/form_script/edit.vue +9 -0
  268. package/src/views/bd/setting/form_script/edit1.vue +36 -3
  269. package/src/views/bd/setting/form_script/form_list.vue +1 -1
  270. package/src/views/bd/setting/form_script/list1.vue +4 -4
  271. package/src/views/bd/setting/form_script/mixins/dialog.js +130 -1
  272. package/src/views/bd/setting/form_script/mixins/edit.js +201 -1
  273. package/src/views/bd/setting/form_script/mixins/edit1.js +193 -1
  274. package/src/views/bd/setting/form_script/mixins/form_list.js +1 -1
  275. package/src/views/bd/setting/form_script/mixins/list.js +236 -1
  276. package/src/views/bd/setting/form_script/mixins/list1.js +423 -14
  277. package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +194 -0
  278. package/src/views/bd/setting/form_script/otherAuthDialog.vue +83 -0
  279. package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +105 -0
  280. package/src/views/bd/setting/form_template/edit.vue +22 -1
  281. package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +2 -2
  282. package/src/views/bd/setting/form_template/list.vue +5 -5
  283. package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +282 -0
  284. package/src/views/bd/setting/form_template/mixins/edit.js +234 -9
  285. package/src/views/bd/setting/form_template/mixins/list.js +689 -22
  286. package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +193 -0
  287. package/src/views/bd/setting/form_template/mixins/wf_list.js +12 -0
  288. package/src/views/bd/setting/form_template/otherAuthDialog.vue +83 -0
  289. package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +140 -75
  290. package/src/views/bd/setting/form_template/{list2.vue → wf_list.vue} +25 -35
  291. package/src/views/bd/setting/logic_param/edit.vue +146 -0
  292. package/src/views/bd/setting/logic_param/edit1.vue +106 -0
  293. package/src/views/bd/setting/logic_param/edit2.vue +139 -0
  294. package/src/views/bd/setting/logic_param/list.vue +74 -0
  295. package/src/views/bd/setting/logic_param/list1.vue +12 -0
  296. package/src/views/bd/setting/logic_param/list2.vue +12 -0
  297. package/src/views/bd/setting/logic_param/mixins/edit.js +93 -0
  298. package/src/views/bd/setting/logic_param/mixins/list.js +369 -0
  299. package/src/views/bd/setting/menu_kind/list.vue +4 -0
  300. package/src/views/bd/setting/menu_kind/mixins/authDialog.js +300 -7
  301. package/src/views/bd/setting/menu_kind/mixins/list.js +201 -1
  302. package/src/views/bd/setting/push_data/edit.vue +139 -0
  303. package/src/views/bd/setting/push_data/list.vue +283 -0
  304. package/src/views/bd/setting/push_data_h/edit.vue +153 -0
  305. package/src/views/bd/setting/push_data_h/list.vue +293 -0
  306. package/src/views/bd/setting/request_async_setting/edit.vue +320 -0
  307. package/src/views/bd/setting/request_async_setting/list.vue +372 -0
  308. package/src/views/bd/setting/request_setting/edit.vue +300 -0
  309. package/src/views/bd/setting/request_setting/list.vue +311 -0
  310. package/src/views/bd/setting/table_model/edit.vue +875 -426
  311. package/src/views/bd/setting/table_model/list.vue +4 -4
  312. package/src/views/bd/setting/table_model/mixins/dialog.js +1 -1
  313. package/src/views/bd/setting/table_model/mixins/edit.js +1202 -13
  314. package/src/views/bd/setting/table_model/mixins/list.js +440 -14
  315. package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +201 -0
  316. package/src/views/bd/setting/table_model/otherAuthDialog.vue +83 -0
  317. package/src/views/user/area/dialog.vue +0 -1
  318. package/src/views/user/bill_setting/edit.vue +1 -1
  319. package/src/views/user/bill_setting/list.vue +1 -1
  320. package/src/views/user/common_attribute/itemEdit.vue +2 -2
  321. package/src/views/user/common_attribute/list.vue +1 -1
  322. package/src/views/user/common_script/edit.vue +1 -1
  323. package/src/views/user/common_script/list.vue +1 -1
  324. package/src/views/user/company_info/dialog.vue +164 -154
  325. package/src/views/user/company_info/edit.vue +1 -1
  326. package/src/views/user/extend_datasource/dialog.vue +1 -0
  327. package/src/views/user/extend_datasource/edit.vue +3 -0
  328. package/src/views/user/extend_datasource/list.vue +2 -1
  329. package/src/views/user/fieldTranslation/editDialog.vue +7 -7
  330. package/src/views/user/fieldTranslation/list.vue +32 -32
  331. package/src/views/user/form/vform/designer.vue +775 -749
  332. package/src/views/user/form/vform/out_render.vue +1 -1
  333. package/src/views/user/form/vform/render.vue +8 -4
  334. package/src/views/user/form/view/edit.vue +38 -37
  335. package/src/views/user/form/view/list.vue +142 -45
  336. package/src/views/user/home/default.vue +1025 -979
  337. package/src/views/user/home/dev.vue +29 -0
  338. package/src/views/user/home/index.vue +16 -6
  339. package/src/views/user/home/taili/index.vue +1034 -0
  340. package/src/views/user/ledger_library/list.vue +10 -12
  341. package/src/views/user/login/default.vue +33 -4
  342. package/src/views/user/login/indexMixin.js +117 -3
  343. package/src/views/user/notify_message/dialog.vue +38 -18
  344. package/src/views/user/notify_template/edit.vue +188 -187
  345. package/src/views/user/notify_template/edit2.vue +176 -0
  346. package/src/views/user/notify_template/list.vue +4 -1
  347. package/src/views/user/notify_template/list2.vue +190 -0
  348. package/src/views/user/outLink/form_view.vue +211 -184
  349. package/src/views/user/outLink/index.vue +17 -0
  350. package/src/views/user/outLink/view.vue +28 -23
  351. package/src/views/user/position/edit.vue +116 -83
  352. package/src/views/user/position/list.vue +118 -86
  353. package/src/views/user/project_tag/dialog.vue +9 -4
  354. package/src/views/user/project_tag/edit.vue +2 -2
  355. package/src/views/user/project_tag/list.vue +9 -4
  356. package/src/views/user/push_setting/list.vue +2 -2
  357. package/src/views/user/request_setting/edit.vue +258 -0
  358. package/src/views/user/request_setting/list.vue +248 -0
  359. package/src/views/user/role/dialog.vue +70 -48
  360. package/src/views/user/role/edit.vue +499 -429
  361. package/src/views/user/role/list.vue +4 -4
  362. package/src/views/user/sale_org/dialog.vue +1 -1
  363. package/src/views/user/sale_org/list.vue +4 -1
  364. package/src/views/user/system_notice/edit.vue +232 -186
  365. package/src/views/user/user/dialog.vue +46 -23
  366. package/src/views/user/user/edit.vue +1059 -1021
  367. package/src/views/user/user/form_dialog.vue +158 -0
  368. package/src/views/user/user/form_info.vue +210 -0
  369. package/src/views/user/user/list.vue +647 -563
  370. package/src/views/user/user/modifyPasswordDialog.vue +64 -53
  371. package/src/views/user/wf/wfReport/index.vue +618 -0
  372. package/src/views/user/wf/wf_auto_submit_data/list.vue +2 -0
  373. package/src/views/user/wf/wf_manage/list.vue +371 -249
  374. package/src/views/user/wf/wf_manage/wfContentDialog.vue +1 -1
  375. package/src/views/user/wf/wf_obj_config/importItemDialog.vue +109 -0
  376. package/src/views/user/wf/wf_obj_config/itemEdit.vue +25 -1
  377. package/src/views/user/wf/wf_obj_config/list.vue +114 -9
  378. package/src/views/user/wf/wf_obj_config/wfBizDataSettingDialog.vue +2 -2
  379. package/src/views/user/wf/wf_transfer_setting/edit.vue +230 -0
  380. package/src/views/user/wf/wf_transfer_setting/list.vue +309 -0
  381. package/src/views/bd/setting/form_template/mixins/list2.js +0 -12
@@ -1,429 +1,499 @@
1
- <template>
2
- <div class="detail-wrap">
3
- <el-form ref="editForm" :model="role">
4
- <div class="d-header clearfix">
5
- <div class="fl">
6
- <i class="el-icon-info"/>
7
- {{ dataId ? $t1('查看用户角色') : $t1('新增用户角色') }}
8
- </div>
9
- <div class="fr">
10
- <el-button type="primary" plain class="button-sty" @click="$baseReload()" icon="el-icon-refresh-right">
11
- {{ $t1('重置') }}
12
- </el-button>
13
- <el-button type="primary" class="button-sty" icon="el-icon-check" @click="saveData">{{ $t1('保存') }}
14
- </el-button>
15
- </div>
16
- </div>
17
- <baseTabs>
18
- <baseTabPane :label="$t1('基本信息')">
19
- <template #default>
20
- <table class="table-detail">
21
- <tbody>
22
- <tr>
23
- <th>
24
- <em class="f-red">*</em>
25
- {{ $t1('用户角色') }}
26
- </th>
27
- <td>
28
- <el-form-item prop="name" :rules="[{ required: true, trigger: 'blur' }]" v-if="!role.systems">
29
- <el-input type="text" autocomplete="off" v-model="role.name" clearable/>
30
- </el-form-item>
31
- <template v-else>
32
- {{ role.name }}
33
- </template>
34
- </td>
35
- <th>{{ $t1('角色编码') }}</th>
36
- <td>
37
- <el-form-item prop="code" :rules="[{ required: false, trigger: 'blur' }]" v-if="!dataId">
38
- <el-input type="text" autocomplete="off" v-model="role.code" clearable/>
39
- </el-form-item>
40
- <template v-else>
41
- {{ role.code }}
42
- </template>
43
- </td>
44
- <th>{{ $t1('角色描述') }}</th>
45
- <td>
46
- <el-form-item prop="description" :rules="[{ required: false, trigger: 'blur' }]">
47
- <el-input type="text" autocomplete="off" v-model="role.description" clearable/>
48
- </el-form-item>
49
- </td>
50
- <th>{{ $t1('是否内置') }}</th>
51
- <td>
52
- <template v-if="role.systems">
53
- {{ $t1('是') }}
54
- </template>
55
- <template v-else>
56
- {{ $t1('否') }}
57
- </template>
58
- </td>
59
- </tr>
60
- <tr>
61
- <th>{{ $t1('创建人') }}</th>
62
- <td>{{ role.createBy }}</td>
63
- <th>{{ $t1('创建时间') }}</th>
64
- <td>{{ role.createDate }}</td>
65
- <th>{{ $t1('更新人') }}</th>
66
- <td>{{ role.modifyBy }}</td>
67
- <th>{{ $t1('更新时间') }}</th>
68
- <td>{{ role.modifyDate }}</td>
69
- </tr>
70
- </tbody>
71
- </table>
72
- </template>
73
- </baseTabPane>
74
- <baseTabPane :label="$t1('菜单信息')">
75
- <template #default>
76
- <div class="role-box">
77
- <div class="item" v-for="item in basicMenus" :key="item.id">
78
- <div class="t">
79
- {{ item.menuName }}
80
- <i class="fr" @click="$set(item, 'visibleRole', !item.visibleRole)"
81
- :class="!item.visibleRole?'el-icon-arrow-up':'el-icon-arrow-down'"></i>
82
- </div>
83
- <div class="c" :class="{ hide: item.visibleRole }">
84
- <div v-for="subItem in item.children" :key="subItem.id">
85
- <div class="c-2nd">
86
- <el-checkbox :label="subItem.menuName" v-model="subItem.hasAuth"
87
- @change="selectAll(subItem)"></el-checkbox>
88
- </div>
89
- <div class="c-3rd">
90
- <div class="c-item" v-for="(thrItem, index3) in subItem.children" :key="thrItem.id">
91
- <div class="name">
92
- <el-checkbox :label="thrItem.menuName" v-model="thrItem.hasAuth"
93
- @change="cancelSelect(subItem, index3)"></el-checkbox>
94
- </div>
95
- <div class="c-4th">
96
- <el-checkbox
97
- v-for="(fourthItem, index4) in thrItem.children"
98
- :key="fourthItem.id"
99
- :label="fourthItem.menuName"
100
- v-model="fourthItem.hasAuth"
101
- @change="changeBtnSelect(subItem, index3, index4)"
102
- ></el-checkbox>
103
- </div>
104
- </div>
105
- </div>
106
- </div>
107
- </div>
108
- </div>
109
- <div class="item">
110
- <div class="t">
111
- {{ $t1('首页设置') }}
112
- <i class="fr" @click="visibleHome = !visibleHome"
113
- :class="!visibleHome?'el-icon-arrow-up':'el-icon-arrow-down'"></i>
114
- </div>
115
- <div class="c" :class="{ hide: visibleHome }">
116
- <div>
117
- <div class="c-3rd">
118
- <div class="c-item">
119
- <el-checkbox v-for="homeItem in homeMenus" :key="homeItem.id" :label="homeItem.menuName"
120
- v-model="homeItem.hasAuth" @change="$forceUpdate()"></el-checkbox>
121
- </div>
122
- </div>
123
- </div>
124
- </div>
125
- </div>
126
- </div>
127
- </template>
128
- </baseTabPane>
129
- <baseTabPane :label="$t1('移动端菜单信息')">
130
- <template #default>
131
- <div class="role-box">
132
- <div class="item" v-for="(item,index) in allMobileMenus" :key="index">
133
- <div class="t">
134
- {{ item.menuName }}
135
- <i class="fr" @click="$set(item, 'visibleRole', !item.visibleRole)"
136
- :class="!item.visibleRole?'el-icon-arrow-up':'el-icon-arrow-down'"></i>
137
- </div>
138
- <div class="c" :class="{ hide: item.visibleRole }">
139
- <div>
140
- <div class="c-2nd" style="width: 100%">
141
- <el-checkbox v-for="(subItem,index2) in item.children" :key="index2" :label="subItem.menuName"
142
- v-model="subItem.hasAuth"
143
- @change="selectAll(subItem)"></el-checkbox>
144
- </div>
145
- </div>
146
- </div>
147
- </div>
148
- </div>
149
- </template>
150
- </baseTabPane>
151
- </baseTabs>
152
- </el-form>
153
- </div>
154
- </template>
155
-
156
- <script>
157
- export default {
158
- name: 'roleEdit',
159
- props: ['_dataId'],
160
- components: {},
161
- data() {
162
- return {
163
- tabIndex: 0,
164
- isEdit: false,
165
- dataId: '',
166
- role: {
167
- menus: [],
168
- mobileMenuIds: []
169
- },
170
- allMenus: [],
171
- allMobileMenus: [],
172
- showCompanyDialog: false,
173
- cParam: {selectMulti: false},
174
- visibleHome: false
175
- };
176
- },
177
- computed: {
178
- basicMenus() {
179
- return this.allMenus.filter(menu => menu.type != 2);
180
- },
181
- homeMenus() {
182
- return this.allMenus.filter(menu => menu.type == 2);
183
- }
184
- },
185
- created() {
186
- if (this._dataId) this.dataId = this._dataId;
187
- },
188
- mounted() {
189
- var that = this;
190
- this.getData();
191
- },
192
- methods: {
193
- getData() {
194
- if (this.dataId) {
195
- this.isEdit = true;
196
- this.$commonHttp({
197
- url: USER_PREFIX + `/role/get`,
198
- method: `post`,
199
- data: {
200
- id: this.dataId
201
- },
202
- isLoading: true,
203
- modalStrictly: true,
204
- success: res => {
205
- this.role = res.objx || {};
206
- this.initMenuData();
207
- }
208
- });
209
- } else {
210
- this.initMenuData();
211
- }
212
- },
213
- saveData() {
214
- this.$refs.editForm.$baseValidate(valid => {
215
- if (valid) {
216
- this.$baseConfirm(this.$t1('您确定要保存吗?')).then(() => {
217
- var url = USER_PREFIX + (this.isEdit ? `/role/update` : `/role/save`);
218
- let formData = this.role;
219
- formData.menuIds = this.getMenuFormData();
220
- formData.mobileMenuIds = this.getMobileMenuFormData();
221
-
222
- this.$http({
223
- url: url,
224
- method: `post`,
225
- data: formData,
226
- isLoading: true,
227
- success: res => {
228
- this.$message({
229
- message: res.content,
230
- type: 'success',
231
- duration: 500,
232
- onClose: t => {
233
- if (this.isEdit) {
234
- this.$baseReload();
235
- } else {
236
- this.$baseReload({
237
- updateParam: {
238
- _dataId: res.objx
239
- }
240
- });
241
- }
242
- }
243
- });
244
- }
245
- });
246
- });
247
- }
248
- });
249
- },
250
- initMenuData(menus) {
251
- this.$http({
252
- url: USER_PREFIX + '/menu/getAll',
253
- method: 'POST',
254
- isLoading: true,
255
- modalStrictly: true,
256
- success: res => {
257
- let menus = res.objx || [];
258
- this.handleRoles(menus, this.role.menuIds || []);
259
- this.allMenus = menus;
260
- }
261
- });
262
- this.$http({
263
- url: USER_PREFIX + '/mobile_menu/getAll',
264
- method: 'POST',
265
- isLoading: true,
266
- modalStrictly: true,
267
- success: res => {
268
- let menus = res.objx || [];
269
- this.handleMobileRoles(menus, this.role.mobileMenuIds || []);
270
- this.allMobileMenus = menus;
271
- }
272
- });
273
- },
274
- selectAll(subItem) {
275
- //subItem.hasAuth = !subItem.hasAuth;
276
- let res = subItem.hasAuth;
277
- if (subItem.children) {
278
- subItem.children.forEach(function (thrItem) {
279
- thrItem.hasAuth = res;
280
- if (thrItem.children) {
281
- thrItem.children.forEach(function (fourthItem) {
282
- fourthItem.hasAuth = res;
283
- });
284
- }
285
- });
286
- }
287
- this.$forceUpdate();
288
- },
289
- cancelSelect(subItem, index3) {
290
- let citem = subItem.children[index3];
291
- // citem.hasAuth = !citem.hasAuth;
292
- let res = citem.hasAuth;
293
- let isCheckSubItem = false;
294
- subItem.children.forEach(function (thrItem) {
295
- if (thrItem.hasAuth) {
296
- isCheckSubItem = true;
297
- }
298
- });
299
- subItem.hasAuth = isCheckSubItem;
300
- if (citem.children) {
301
- citem.children.forEach(function (fourthItem) {
302
- fourthItem.hasAuth = res;
303
- });
304
- }
305
- this.$forceUpdate();
306
- },
307
- changeBtnSelect(subItem, index3, index4) {
308
- let citem = subItem.children[index3].children[index4];
309
- // citem.hasAuth = !citem.hasAuth;
310
- let res = citem.hasAuth;
311
- let isCheckthrItem = false;
312
- subItem.children[index3].children.forEach(function (fourthItem) {
313
- if (fourthItem.hasAuth) {
314
- isCheckthrItem = true;
315
- }
316
- });
317
-
318
- let isCheckSubItem = false;
319
- subItem.children.forEach(function (thrItem) {
320
- if (thrItem.hasAuth) {
321
- isCheckSubItem = true;
322
- }
323
- });
324
- subItem.hasAuth = isCheckSubItem;
325
- this.$forceUpdate();
326
- },
327
- getMenuFormData() {
328
- let selectIds = [];
329
- let menus = this.allMenus;
330
- menus.forEach(function (item) {
331
- if (item.type != 2 || item.hasAuth) {
332
- selectIds.push(item.id);
333
- }
334
- if (item.children) {
335
- item.children.forEach(function (subItem) {
336
- if (subItem.hasAuth) {
337
- selectIds.push(subItem.id);
338
- }
339
- if (subItem.children) {
340
- subItem.children.forEach(function (thrItem) {
341
- if (thrItem.hasAuth) {
342
- selectIds.push(thrItem.id);
343
- }
344
- if (thrItem.children) {
345
- thrItem.children.forEach(function (fourthItem) {
346
- if (fourthItem.hasAuth) {
347
- selectIds.push(fourthItem.id);
348
- }
349
- });
350
- }
351
- });
352
- }
353
- });
354
- }
355
- });
356
- return selectIds;
357
- },
358
- getMobileMenuFormData() {
359
- let selectIds = [];
360
- let menus = this.allMobileMenus;
361
- menus.forEach(function (item) {
362
- if (item.type != 2 || item.hasAuth) {
363
- selectIds.push(item.id);
364
- }
365
- if (item.children) {
366
- item.children.forEach(function (subItem) {
367
- if (subItem.hasAuth) {
368
- selectIds.push(subItem.id);
369
- }
370
- if (subItem.children) {
371
- subItem.children.forEach(function (thrItem) {
372
- if (thrItem.hasAuth) {
373
- selectIds.push(thrItem.id);
374
- }
375
- if (thrItem.children) {
376
- thrItem.children.forEach(function (fourthItem) {
377
- if (fourthItem.hasAuth) {
378
- selectIds.push(fourthItem.id);
379
- }
380
- });
381
- }
382
- });
383
- }
384
- });
385
- }
386
- });
387
- return selectIds;
388
- },
389
- handleRoles(rows, menuIds) {
390
- let newRows = [];
391
- for (let i = 0; i < rows.length; i++) {
392
- let row = rows[i];
393
- if (menuIds.includes(row.id)) {
394
- row.hasAuth = true;
395
- } else {
396
- row.hasAuth = false;
397
- }
398
- newRows.push(row);
399
- if (row.children) {
400
- let cRows = this.handleRoles(row.children, menuIds);
401
- if (cRows) {
402
- newRows = newRows.concat(cRows);
403
- }
404
- }
405
- }
406
- return newRows;
407
- },
408
- handleMobileRoles(rows, menuIds) {
409
- let newRows = [];
410
- for (let i = 0; i < rows.length; i++) {
411
- let row = rows[i];
412
- if (menuIds.includes(row.id)) {
413
- row.hasAuth = true;
414
- } else {
415
- row.hasAuth = false;
416
- }
417
- newRows.push(row);
418
- if (row.children) {
419
- let cRows = this.handleMobileRoles(row.children, menuIds);
420
- if (cRows) {
421
- newRows = newRows.concat(cRows);
422
- }
423
- }
424
- }
425
- return newRows;
426
- }
427
- }
428
- };
429
- </script>
1
+ <template>
2
+ <div class="detail-wrap">
3
+ <el-form ref="editForm" :model="role">
4
+ <div class="d-header clearfix">
5
+ <div class="fl">
6
+ <i class="el-icon-info" />
7
+ {{ dataId ? $t1("查看用户角色") : $t1("新增用户角色") }}
8
+ </div>
9
+ <div class="fr">
10
+ <el-button
11
+ type="primary"
12
+ plain
13
+ class="button-sty"
14
+ @click="$baseReload()"
15
+ icon="el-icon-refresh-right"
16
+ >
17
+ {{ $t1("重置") }}
18
+ </el-button>
19
+ <el-button
20
+ type="primary"
21
+ class="button-sty"
22
+ icon="el-icon-check"
23
+ @click="saveData"
24
+ >{{ $t1("保存") }}
25
+ </el-button>
26
+ </div>
27
+ </div>
28
+ <baseTabs>
29
+ <baseTabPane :label="$t1('基本信息')">
30
+ <template #default>
31
+ <table class="table-detail">
32
+ <tbody>
33
+ <tr>
34
+ <th>
35
+ <em class="f-red">*</em>
36
+ {{ $t1("用户角色") }}
37
+ </th>
38
+ <td>
39
+ <el-form-item
40
+ prop="name"
41
+ :rules="[{ required: true, trigger: 'blur' }]"
42
+ v-if="!role.systems"
43
+ >
44
+ <el-input
45
+ type="text"
46
+ autocomplete="off"
47
+ v-model="role.name"
48
+ clearable
49
+ />
50
+ </el-form-item>
51
+ <template v-else>
52
+ {{ role.name }}
53
+ </template>
54
+ </td>
55
+ <th>{{ $t1("角色编码") }}</th>
56
+ <td>
57
+ <el-form-item
58
+ prop="code"
59
+ :rules="[{ required: false, trigger: 'blur' }]"
60
+ v-if="!dataId"
61
+ >
62
+ <el-input
63
+ type="text"
64
+ autocomplete="off"
65
+ v-model="role.code"
66
+ clearable
67
+ />
68
+ </el-form-item>
69
+ <template v-else>
70
+ {{ role.code }}
71
+ </template>
72
+ </td>
73
+ <th>{{ $t1("角色描述") }}</th>
74
+ <td>
75
+ <el-form-item
76
+ prop="description"
77
+ :rules="[{ required: false, trigger: 'blur' }]"
78
+ >
79
+ <el-input
80
+ type="text"
81
+ autocomplete="off"
82
+ v-model="role.description"
83
+ clearable
84
+ />
85
+ </el-form-item>
86
+ </td>
87
+ <th>{{ $t1("是否内置") }}</th>
88
+ <td>
89
+ <template v-if="role.systems">
90
+ {{ $t1("") }}
91
+ </template>
92
+ <template v-else>
93
+ {{ $t1("否") }}
94
+ </template>
95
+ </td>
96
+ </tr>
97
+ <tr>
98
+ <th>{{ $t1("创建人") }}</th>
99
+ <td>{{ role.createBy }}</td>
100
+ <th>{{ $t1("创建时间") }}</th>
101
+ <td>{{ role.createDate }}</td>
102
+ <th>{{ $t1("更新人") }}</th>
103
+ <td>{{ role.modifyBy }}</td>
104
+ <th>{{ $t1("更新时间") }}</th>
105
+ <td>{{ role.modifyDate }}</td>
106
+ </tr>
107
+ </tbody>
108
+ </table>
109
+ </template>
110
+ </baseTabPane>
111
+ <baseTabPane :label="$t1('菜单信息')">
112
+ <template #default>
113
+ <div class="role-box">
114
+ <div class="item" v-for="item in basicMenus" :key="item.id">
115
+ <div class="t">
116
+ {{ item.menuName }}
117
+ <i
118
+ class="fr"
119
+ @click="$set(item, 'visibleRole', !item.visibleRole)"
120
+ :class="!item.visibleRole ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
121
+ ></i>
122
+ </div>
123
+ <div class="c" :class="{ hide: item.visibleRole }">
124
+ <div v-for="subItem in item.children" :key="subItem.id">
125
+ <div class="c-2nd">
126
+ <el-checkbox
127
+ :label="subItem.menuName"
128
+ v-model="subItem.hasAuth"
129
+ @change="selectAll(subItem)"
130
+ ></el-checkbox>
131
+ </div>
132
+ <div class="c-3rd">
133
+ <div
134
+ class="c-item"
135
+ v-for="(thrItem, index3) in subItem.children"
136
+ :key="thrItem.id"
137
+ >
138
+ <div class="name">
139
+ <el-checkbox
140
+ :label="thrItem.menuName"
141
+ v-model="thrItem.hasAuth"
142
+ @change="cancelSelect(subItem, index3)"
143
+ ></el-checkbox>
144
+ </div>
145
+ <div class="c-4th">
146
+ <el-checkbox
147
+ v-for="(fourthItem, index4) in thrItem.children"
148
+ :key="fourthItem.id"
149
+ :label="fourthItem.menuName"
150
+ v-model="fourthItem.hasAuth"
151
+ @change="changeBtnSelect(subItem, index3, index4)"
152
+ ></el-checkbox>
153
+ </div>
154
+ </div>
155
+ </div>
156
+ </div>
157
+ </div>
158
+ </div>
159
+ <div class="item">
160
+ <div class="t">
161
+ {{ $t1("首页设置") }}
162
+ <i
163
+ class="fr"
164
+ @click="visibleHome = !visibleHome"
165
+ :class="!visibleHome ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
166
+ ></i>
167
+ </div>
168
+ <div class="c" :class="{ hide: visibleHome }">
169
+ <div>
170
+ <div class="c-3rd">
171
+ <div class="c-item">
172
+ <el-checkbox
173
+ v-for="homeItem in homeMenus"
174
+ :key="homeItem.id"
175
+ :label="homeItem.menuName"
176
+ v-model="homeItem.hasAuth"
177
+ @change="$forceUpdate()"
178
+ ></el-checkbox>
179
+ </div>
180
+ </div>
181
+ </div>
182
+ </div>
183
+ </div>
184
+ </div>
185
+ </template>
186
+ </baseTabPane>
187
+ <baseTabPane :label="$t1('移动端菜单信息')">
188
+ <template #default>
189
+ <div class="role-box">
190
+ <div class="item" v-for="(item, index) in allMobileMenus" :key="index">
191
+ <div class="t">
192
+ {{ item.menuName }}
193
+ <i
194
+ class="fr"
195
+ @click="$set(item, 'visibleRole', !item.visibleRole)"
196
+ :class="!item.visibleRole ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
197
+ ></i>
198
+ </div>
199
+ <div class="c" :class="{ hide: item.visibleRole }">
200
+ <div>
201
+ <div class="c-2nd" style="width: 100%">
202
+ <el-checkbox
203
+ v-for="(subItem, index2) in item.children"
204
+ :key="index2"
205
+ :label="subItem.menuName"
206
+ v-model="subItem.hasAuth"
207
+ @change="selectAll(subItem)"
208
+ ></el-checkbox>
209
+ </div>
210
+ </div>
211
+ </div>
212
+ </div>
213
+ </div>
214
+ </template>
215
+ </baseTabPane>
216
+ </baseTabs>
217
+ </el-form>
218
+ </div>
219
+ </template>
220
+
221
+ <script>
222
+ export default {
223
+ name: "roleEdit",
224
+ props: ["_dataId"],
225
+ components: {},
226
+ data() {
227
+ return {
228
+ tabIndex: 0,
229
+ isEdit: false,
230
+ dataId: "",
231
+ role: {
232
+ menus: [],
233
+ mobileMenuIds: [],
234
+ },
235
+ allMenus: [],
236
+ allMobileMenus: [],
237
+ showCompanyDialog: false,
238
+ cParam: { selectMulti: false },
239
+ visibleHome: false,
240
+ };
241
+ },
242
+ computed: {
243
+ basicMenus() {
244
+ return this.allMenus.filter((menu) => menu.type != 2);
245
+ },
246
+ homeMenus() {
247
+ return this.allMenus.filter((menu) => menu.type == 2);
248
+ },
249
+ },
250
+ created() {
251
+ if (this._dataId) this.dataId = this._dataId;
252
+ },
253
+ mounted() {
254
+ var that = this;
255
+ this.getData();
256
+ },
257
+ methods: {
258
+ getData() {
259
+ if (this.dataId) {
260
+ this.isEdit = true;
261
+ this.$commonHttp({
262
+ url: USER_PREFIX + `/role/get`,
263
+ method: `post`,
264
+ data: {
265
+ id: this.dataId,
266
+ },
267
+ isLoading: true,
268
+ modalStrictly: true,
269
+ success: (res) => {
270
+ this.role = res.objx || {};
271
+ this.initMenuData();
272
+ },
273
+ });
274
+ } else {
275
+ this.initMenuData();
276
+ }
277
+ },
278
+ saveData() {
279
+ this.$refs.editForm.$baseValidate((valid) => {
280
+ if (valid) {
281
+ this.$baseConfirm(this.$t1("您确定要保存吗?")).then(() => {
282
+ var url = USER_PREFIX + (this.isEdit ? `/role/update` : `/role/save`);
283
+ let formData = this.role;
284
+ formData.menuIds = this.getMenuFormData();
285
+ formData.mobileMenuIds = this.getMobileMenuFormData();
286
+
287
+ this.$http({
288
+ url: url,
289
+ method: `post`,
290
+ data: formData,
291
+ isLoading: true,
292
+ success: (res) => {
293
+ this.$message({
294
+ message: res.content,
295
+ type: "success",
296
+ duration: 500,
297
+ onClose: (t) => {
298
+ if (this.isEdit) {
299
+ this.$baseReload();
300
+ } else {
301
+ this.$baseReload({
302
+ updateParam: {
303
+ _dataId: res.objx,
304
+ },
305
+ });
306
+ }
307
+ },
308
+ });
309
+ },
310
+ });
311
+ });
312
+ }
313
+ });
314
+ },
315
+ initMenuData(menus) {
316
+ this.$http({
317
+ url: USER_PREFIX + "/menu/getAll",
318
+ method: "POST",
319
+ isLoading: true,
320
+ modalStrictly: true,
321
+ success: (res) => {
322
+ let menus = res.objx || [];
323
+ this.handleRoles(menus, this.role.menuIds || []);
324
+ this.allMenus = menus;
325
+ },
326
+ });
327
+ this.$http({
328
+ url: USER_PREFIX + "/mobile_menu/getAll",
329
+ method: "POST",
330
+ isLoading: true,
331
+ modalStrictly: true,
332
+ success: (res) => {
333
+ let menus = res.objx || [];
334
+ this.handleMobileRoles(menus, this.role.mobileMenuIds || []);
335
+ this.allMobileMenus = menus;
336
+ },
337
+ });
338
+ },
339
+ selectAll(subItem) {
340
+ //subItem.hasAuth = !subItem.hasAuth;
341
+ let res = subItem.hasAuth;
342
+ if (subItem.children) {
343
+ subItem.children.forEach(function (thrItem) {
344
+ thrItem.hasAuth = res;
345
+ if (thrItem.children) {
346
+ thrItem.children.forEach(function (fourthItem) {
347
+ fourthItem.hasAuth = res;
348
+ });
349
+ }
350
+ });
351
+ }
352
+ this.$forceUpdate();
353
+ },
354
+ cancelSelect(subItem, index3) {
355
+ let citem = subItem.children[index3];
356
+ // citem.hasAuth = !citem.hasAuth;
357
+ let res = citem.hasAuth;
358
+ let isCheckSubItem = false;
359
+ subItem.children.forEach(function (thrItem) {
360
+ if (thrItem.hasAuth) {
361
+ isCheckSubItem = true;
362
+ }
363
+ });
364
+ if (citem.type !== 1) {
365
+ subItem.hasAuth = isCheckSubItem;
366
+ } else {
367
+ if (isCheckSubItem) subItem.hasAuth = true;
368
+ }
369
+
370
+ if (citem.children) {
371
+ citem.children.forEach(function (fourthItem) {
372
+ fourthItem.hasAuth = res;
373
+ });
374
+ }
375
+ this.$forceUpdate();
376
+ },
377
+ changeBtnSelect(subItem, index3, index4) {
378
+ let citem = subItem.children[index3].children[index4];
379
+ // citem.hasAuth = !citem.hasAuth;
380
+ let res = citem.hasAuth;
381
+ let isCheckthrItem = false;
382
+ subItem.children[index3].children.forEach(function (fourthItem) {
383
+ if (fourthItem.hasAuth) {
384
+ isCheckthrItem = true;
385
+ }
386
+ });
387
+
388
+ let isCheckSubItem = false;
389
+ subItem.children.forEach(function (thrItem) {
390
+ if (thrItem.hasAuth) {
391
+ isCheckSubItem = true;
392
+ }
393
+ });
394
+ subItem.hasAuth = isCheckSubItem;
395
+ this.$forceUpdate();
396
+ },
397
+ getMenuFormData() {
398
+ let selectIds = [];
399
+ let menus = this.allMenus;
400
+ menus.forEach(function (item) {
401
+ if (item.type != 2 || item.hasAuth) {
402
+ selectIds.push(item.id);
403
+ }
404
+ if (item.children) {
405
+ item.children.forEach(function (subItem) {
406
+ if (subItem.hasAuth) {
407
+ selectIds.push(subItem.id);
408
+ }
409
+ if (subItem.children) {
410
+ subItem.children.forEach(function (thrItem) {
411
+ if (thrItem.hasAuth) {
412
+ selectIds.push(thrItem.id);
413
+ }
414
+ if (thrItem.children) {
415
+ thrItem.children.forEach(function (fourthItem) {
416
+ if (fourthItem.hasAuth) {
417
+ selectIds.push(fourthItem.id);
418
+ }
419
+ });
420
+ }
421
+ });
422
+ }
423
+ });
424
+ }
425
+ });
426
+ return selectIds;
427
+ },
428
+ getMobileMenuFormData() {
429
+ let selectIds = [];
430
+ let menus = this.allMobileMenus;
431
+ menus.forEach(function (item) {
432
+ if (item.type != 2 || item.hasAuth) {
433
+ selectIds.push(item.id);
434
+ }
435
+ if (item.children) {
436
+ item.children.forEach(function (subItem) {
437
+ if (subItem.hasAuth) {
438
+ selectIds.push(subItem.id);
439
+ }
440
+ if (subItem.children) {
441
+ subItem.children.forEach(function (thrItem) {
442
+ if (thrItem.hasAuth) {
443
+ selectIds.push(thrItem.id);
444
+ }
445
+ if (thrItem.children) {
446
+ thrItem.children.forEach(function (fourthItem) {
447
+ if (fourthItem.hasAuth) {
448
+ selectIds.push(fourthItem.id);
449
+ }
450
+ });
451
+ }
452
+ });
453
+ }
454
+ });
455
+ }
456
+ });
457
+ return selectIds;
458
+ },
459
+ handleRoles(rows, menuIds) {
460
+ let newRows = [];
461
+ for (let i = 0; i < rows.length; i++) {
462
+ let row = rows[i];
463
+ if (menuIds.includes(row.id)) {
464
+ row.hasAuth = true;
465
+ } else {
466
+ row.hasAuth = false;
467
+ }
468
+ newRows.push(row);
469
+ if (row.children) {
470
+ let cRows = this.handleRoles(row.children, menuIds);
471
+ if (cRows) {
472
+ newRows = newRows.concat(cRows);
473
+ }
474
+ }
475
+ }
476
+ return newRows;
477
+ },
478
+ handleMobileRoles(rows, menuIds) {
479
+ let newRows = [];
480
+ for (let i = 0; i < rows.length; i++) {
481
+ let row = rows[i];
482
+ if (menuIds.includes(row.id)) {
483
+ row.hasAuth = true;
484
+ } else {
485
+ row.hasAuth = false;
486
+ }
487
+ newRows.push(row);
488
+ if (row.children) {
489
+ let cRows = this.handleMobileRoles(row.children, menuIds);
490
+ if (cRows) {
491
+ newRows = newRows.concat(cRows);
492
+ }
493
+ }
494
+ }
495
+ return newRows;
496
+ },
497
+ },
498
+ };
499
+ </script>