cloud-web-corejs 1.0.258 → 1.0.259

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 (248) hide show
  1. package/package.json +32 -25
  2. package/src/components/VabUpload/fileLibraryDialog.vue +296 -0
  3. package/src/components/VabUpload/index.js +22 -2
  4. package/src/components/VabUpload/index.vue +242 -231
  5. package/src/components/VabUpload/mixins/fileLibraryDialog.js +1112 -0
  6. package/src/components/VabUpload/mixins.js +1971 -1829
  7. package/src/components/VabUpload/privateProfileDialog.vue +2 -2
  8. package/src/components/baseArea/index.vue +1628 -0
  9. package/src/components/baseInputExport/mixins.js +48 -31
  10. package/src/components/baseInputNumber/index.vue +9 -9
  11. package/src/components/baseTabs/index.vue +16 -8
  12. package/src/components/code-editor/async.js +29 -0
  13. package/src/components/code-editor/index.vue +93 -4
  14. package/src/components/errorMsg/index.js +10 -9
  15. package/src/components/errorMsg/mixins.js +25 -23
  16. package/src/components/excelExport/exportFieldDialog.vue +40 -18
  17. package/src/components/excelExport/index.js +62 -3
  18. package/src/components/excelExport/index.vue +2 -1
  19. package/src/components/excelExport/mixins.js +496 -340
  20. package/src/components/excelImport/index.js +69 -7
  21. package/src/components/excelImport/mixins.js +841 -9
  22. package/src/components/fileLibrary/categoryMoveDialog.vue +109 -109
  23. package/src/components/fileLibrary/fileHistoryDialog.vue +1 -1
  24. package/src/components/fileLibrary/fileObjAuthDialog.vue +297 -298
  25. package/src/components/fileLibrary/fileObjAuthEdit.vue +1 -1
  26. package/src/components/fileLibrary/filterDialog.vue +1 -1
  27. package/src/components/fileLibrary/index.vue +1109 -1110
  28. package/src/components/fileLibrary/mixins/indexMixins.js +10 -0
  29. package/src/components/fileLibrary/propertiesDialog.vue +190 -190
  30. package/src/components/fileLibrary/recycleBinDialog.vue +237 -236
  31. package/src/components/formOplog/mixins.js +85 -80
  32. package/src/components/hiprint/view/design/index.vue +7 -2
  33. package/src/components/jsonImport/exportUtil.js +106 -0
  34. package/src/components/jsonImport/index.js +75 -50
  35. package/src/components/jsonImport/mixins.js +350 -348
  36. package/src/components/langImport/mixins.js +502 -500
  37. package/src/components/micro-view-host/contract.js +66 -0
  38. package/src/components/micro-view-host/index.vue +148 -0
  39. package/src/components/mobile/file/index.vue +10 -0
  40. package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +51 -47
  41. package/src/components/obsUpload/index.vue +234 -231
  42. package/src/components/obsUpload/mixins.js +1542 -1476
  43. package/src/components/onlineTalk/talkUserDialog.vue +1 -1
  44. package/src/components/table/CellSlot.vue +12 -10
  45. package/src/components/table/config.js +74 -1
  46. package/src/components/table/index.js +1208 -1
  47. package/src/components/table/tableFormMixin.js +285 -1
  48. package/src/components/table/util/index.js +38 -40
  49. package/src/components/table/vxeFilter/index.js +153 -2
  50. package/src/components/table/vxeFilter/mixin.js +305 -3
  51. package/src/components/tempStorage/tempStorageDialog.vue +1 -1
  52. package/src/components/vb-tabs/x-tabs.vue +10 -5
  53. package/src/components/wf/addTaskUserdialog.vue +1 -1
  54. package/src/components/wf/mixins/setCandidateDialog.js +217 -217
  55. package/src/components/wf/mixins/setCandidateDialog2.js +252 -252
  56. package/src/components/wf/wf.js +2224 -2203
  57. package/src/components/wf/wfUtil.js +2 -1
  58. package/src/components/xform/docs/2026-08 /345/210/227/350/241/250/345/257/274/345/207/272/350/204/261/346/225/217/345/210/227/345/211/224/351/231/244/350/220/275/345/234/260/346/226/207/346/241/243.md" +173 -0
  59. package/src/components/xform/form-designer/designer.js +1 -0
  60. package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +110 -1
  61. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +282 -1
  62. package/src/components/xform/form-designer/form-widget/field-widget/area-select-widget.vue +272 -0
  63. package/src/components/xform/form-designer/form-widget/field-widget/autocomplete-widget.vue +119 -0
  64. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +14 -0
  65. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +18 -73
  66. package/src/components/xform/form-designer/form-widget/field-widget/mixins/autocomplete-mixin.js +451 -0
  67. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +157 -0
  68. package/src/components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin.js +75 -0
  69. package/src/components/xform/form-designer/form-widget/field-widget/save_submit_wf_button-widget.vue +112 -0
  70. package/src/components/xform/form-designer/form-widget/field-widget/script-input-widget.vue +149 -0
  71. package/src/components/xform/form-designer/form-widget/indexMixin.js +179 -1
  72. package/src/components/xform/form-designer/indexMixin.js +823 -1
  73. package/src/components/xform/form-designer/refMixinDesign.js +27 -1
  74. package/src/components/xform/form-designer/setting-panel/action-button-config-dialog.vue +241 -0
  75. package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +601 -0
  76. package/src/components/xform/form-designer/setting-panel/form-setting.vue +6 -0
  77. package/src/components/xform/form-designer/setting-panel/index.vue +314 -309
  78. package/src/components/xform/form-designer/setting-panel/indexMixin.js +324 -1
  79. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +8 -7
  80. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +8 -7
  81. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +344 -0
  82. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +2 -2
  83. package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaDataType-editor.vue +25 -0
  84. package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaMinLevel-editor.vue +50 -0
  85. package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaName-editor.vue +20 -0
  86. package/src/components/xform/form-designer/setting-panel/property-editor/field-autocomplete/autocomplete-vabSearchName-editor.vue +199 -0
  87. package/src/components/xform/form-designer/setting-panel/property-editor/field-baseAttachment/baseAttachment-fileTypes-editor.vue +23 -0
  88. package/src/components/xform/form-designer/setting-panel/property-editor/field-cascader/showAllLevels-editor.vue +21 -0
  89. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-dateLimit-editor.vue +157 -0
  90. package/src/components/xform/form-designer/setting-panel/property-editor/field-script-input/script-input-editor.vue +55 -0
  91. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/vabUpload-fileTypes-editor.vue +23 -0
  92. package/src/components/xform/form-designer/setting-panel/property-editor/fileTypesEditorMixin.js +116 -0
  93. package/src/components/xform/form-designer/setting-panel/property-editor/fileTypesSelect.vue +176 -0
  94. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +3 -3
  95. package/src/components/xform/form-designer/setting-panel/property-editor/utcTransformEnabled-editor.vue +19 -0
  96. package/src/components/xform/form-designer/setting-panel/widgetPropertyDialogMixin.js +186 -0
  97. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +566 -1
  98. package/src/components/xform/form-designer/widget-panel/indexMixin.js +290 -1
  99. package/src/components/xform/form-render/compareDelList.vue +83 -0
  100. package/src/components/xform/form-render/compareView.vue +76 -0
  101. package/src/components/xform/form-render/container-item/containerItemMixin.js +378 -1
  102. package/src/components/xform/form-render/container-item/data-table-mixin.js +35 -0
  103. package/src/components/xform/form-render/container-item/detail-item.vue +41 -0
  104. package/src/components/xform/form-render/container-item/dynamicFieldEngine.js +285 -0
  105. package/src/components/xform/form-render/container-item/dynamicFieldMixin.js +416 -0
  106. package/src/components/xform/form-render/container-item/list-h5-item.vue +12 -0
  107. package/src/components/xform/form-render/dynamicDialogRender.js +195 -1
  108. package/src/components/xform/form-render/dynamicDrawerRender.js +229 -0
  109. package/src/components/xform/form-render/formDynamicFieldMixin.js +131 -0
  110. package/src/components/xform/form-render/refMixin.js +29 -1
  111. package/src/components/xform/mixins/scriptHttp.js +172 -1
  112. package/src/components/xform/utils/dynamicSchemaUtil.js +361 -0
  113. package/src/components/xform/utils/tableCellValidateUtil.js +148 -0
  114. package/src/components/xform/utils/textMaskUtil.js +179 -0
  115. package/src/components/xform/utils/treeTableUtil.js +1265 -0
  116. package/src/components/xform/utils/util.js +1 -0
  117. package/src/components/xform/utils/validators.js +133 -1
  118. package/src/directive/LimitNumber/index.js +143 -124
  119. package/src/microRouter/index.js +447 -0
  120. package/src/mixins/tableTree/index.js +77 -14
  121. package/src/permission.js +132 -107
  122. package/src/public-path.js +38 -0
  123. package/src/router/index.js +3 -3
  124. package/src/store/modules/micro.js +57 -0
  125. package/src/store/modules/permission.js +535 -371
  126. package/src/store/modules/tagsView.js +38 -21
  127. package/src/store/modules/user.js +409 -370
  128. package/src/utils/aes.js +9 -3
  129. package/src/utils/auth.js +1 -1
  130. package/src/utils/componentDialog.js +162 -40
  131. package/src/utils/global.js +35 -34
  132. package/src/utils/index.js +579 -579
  133. package/src/utils/keepAlive.js +8 -4
  134. package/src/utils/lazyPlugin.js +66 -0
  135. package/src/utils/menuAdapter.js +277 -0
  136. package/src/utils/repeatOpen.js +48 -0
  137. package/src/utils/request.js +417 -395
  138. package/src/utils/resolveViewComponent.js +203 -0
  139. package/src/utils/vab.js +14 -3
  140. package/src/utils/validate.js +104 -106
  141. package/src/views/bd/setting/bd_attach_setting/dialog.vue +1 -1
  142. package/src/views/bd/setting/bd_attach_setting/list.vue +1 -1
  143. package/src/views/bd/setting/bd_company_env/dialog.vue +1 -1
  144. package/src/views/bd/setting/bd_company_env/list.vue +1 -1
  145. package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +488 -489
  146. package/src/views/bd/setting/form_import_log/list.vue +1 -1
  147. package/src/views/bd/setting/form_script/dialog.vue +1 -1
  148. package/src/views/bd/setting/form_script/form_list.vue +174 -166
  149. package/src/views/bd/setting/form_script/list.vue +1 -1
  150. package/src/views/bd/setting/form_script/list1.vue +1 -1
  151. package/src/views/bd/setting/form_script/mixins/form_list.js +330 -322
  152. package/src/views/bd/setting/form_template/dialog.vue +1 -1
  153. package/src/views/bd/setting/form_template/formDesignerDialog.vue +172 -171
  154. package/src/views/bd/setting/form_template/ftHistoryDialog.vue +1 -1
  155. package/src/views/bd/setting/form_template/itemList.vue +1 -1
  156. package/src/views/bd/setting/form_template/list.vue +3 -3
  157. package/src/views/bd/setting/form_template/mixins/edit.js +3 -3
  158. package/src/views/bd/setting/form_template/mixins/list.js +3 -3
  159. package/src/views/bd/setting/form_template/mixins/list2.js +3 -3
  160. package/src/views/bd/setting/form_template/mixins/wf_list.js +3 -3
  161. package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +253 -254
  162. package/src/views/bd/setting/form_template/wf_list.vue +3 -3
  163. package/src/views/bd/setting/logic_param/edit.vue +20 -20
  164. package/src/views/bd/setting/logic_param/list.vue +1 -1
  165. package/src/views/bd/setting/menu_kind/dialog.vue +1 -1
  166. package/src/views/bd/setting/menu_kind/list.vue +1 -1
  167. package/src/views/bd/setting/push_data/list.vue +1 -1
  168. package/src/views/bd/setting/push_data_h/list.vue +1 -1
  169. package/src/views/bd/setting/request_async_setting/list.vue +1 -1
  170. package/src/views/bd/setting/request_setting/list.vue +1 -1
  171. package/src/views/bd/setting/table_model/dialog.vue +1 -1
  172. package/src/views/bd/setting/table_model/list.vue +1 -1
  173. package/src/views/bd/setting/table_model/zdDialog.vue +1 -1
  174. package/src/views/user/access_log/list.vue +1 -1
  175. package/src/views/user/access_log/list2.vue +1 -1
  176. package/src/views/user/api_request/list.vue +1 -1
  177. package/src/views/user/area/dialog.vue +1 -1
  178. package/src/views/user/area/list.vue +1 -1
  179. package/src/views/user/bill_setting/list.vue +1 -1
  180. package/src/views/user/bill_setting/userDialog.vue +1 -1
  181. package/src/views/user/code_rules/list.vue +1 -1
  182. package/src/views/user/commMenu/index.vue +2 -2
  183. package/src/views/user/common_attribute/list.vue +2 -2
  184. package/src/views/user/common_script/list.vue +1 -1
  185. package/src/views/user/company_info/dialog.vue +1 -1
  186. package/src/views/user/country/dialog.vue +1 -1
  187. package/src/views/user/country/list.vue +1 -1
  188. package/src/views/user/data_type_setting/dialog.vue +1 -1
  189. package/src/views/user/extend_datasource/dialog.vue +4 -1
  190. package/src/views/user/extend_datasource/edit.vue +2 -1
  191. package/src/views/user/extend_datasource/list.vue +4 -1
  192. package/src/views/user/fieldTranslation/list.vue +1 -1
  193. package/src/views/user/field_values_invisible/list.vue +1 -1
  194. package/src/views/user/file_type/list.vue +1 -1
  195. package/src/views/user/file_view_area/list.vue +1 -1
  196. package/src/views/user/file_view_ins/list.vue +22 -1
  197. package/src/views/user/form/view/list.vue +64 -1
  198. package/src/views/user/groups/dialog.vue +1 -1
  199. package/src/views/user/groups/list.vue +1 -1
  200. package/src/views/user/home/default.vue +2 -2
  201. package/src/views/user/home/default2.vue +1158 -1148
  202. package/src/views/user/home/index.vue +3 -10
  203. package/src/views/user/lang_tag/dialog.vue +1 -1
  204. package/src/views/user/lang_tag/list.vue +1 -1
  205. package/src/views/user/language_setting/list.vue +1 -1
  206. package/src/views/user/login/default.vue +0 -8
  207. package/src/views/user/login/indexMixin.js +547 -556
  208. package/src/views/user/menu/list.vue +25 -2
  209. package/src/views/user/menuFallback/index.vue +123 -0
  210. package/src/views/user/mobile_menu/list.vue +1 -1
  211. package/src/views/user/notify_message/dialog.vue +22 -1
  212. package/src/views/user/notify_message/list.vue +1 -1
  213. package/src/views/user/notify_template/list.vue +1 -1
  214. package/src/views/user/notify_template/list2.vue +1 -1
  215. package/src/views/user/oplog/list.vue +1 -1
  216. package/src/views/user/outLink/form_view.vue +5 -14
  217. package/src/views/user/outLink/index.vue +6 -1
  218. package/src/views/user/outLink/view.vue +5 -13
  219. package/src/views/user/position/dialog.vue +1 -1
  220. package/src/views/user/position/list.vue +1 -1
  221. package/src/views/user/project_tag/dialog.vue +1 -1
  222. package/src/views/user/project_tag/list.vue +1 -1
  223. package/src/views/user/push_setting/list.vue +1 -1
  224. package/src/views/user/request_setting/list.vue +1 -1
  225. package/src/views/user/role/dialog.vue +1 -1
  226. package/src/views/user/role/list.vue +1 -1
  227. package/src/views/user/sale_org/dialog.vue +1 -1
  228. package/src/views/user/sale_org/list.vue +1 -1
  229. package/src/views/user/system_notice/list.vue +1 -1
  230. package/src/views/user/system_parameter/list.vue +1 -1
  231. package/src/views/user/user/dialog.vue +1 -1
  232. package/src/views/user/user/edit.vue +306 -159
  233. package/src/views/user/user/form_dialog.vue +1 -1
  234. package/src/views/user/user/form_list.vue +1 -1
  235. package/src/views/user/user/list.vue +2 -2
  236. package/src/views/user/user_log_classify/list.vue +1 -1
  237. package/src/views/user/wf/iframe/index.vue +6 -1
  238. package/src/views/user/wf/iframe/index2.vue +6 -1
  239. package/src/views/user/wf/wfReport/index.vue +12 -6
  240. package/src/views/user/wf/wf_auto_submit_data/list.vue +2 -2
  241. package/src/views/user/wf/wf_manage/list.vue +97 -24
  242. package/src/views/user/wf/wf_manage/list2.vue +875 -0
  243. package/src/views/user/wf/wf_manage/wfContentDialog.vue +23 -1
  244. package/src/views/user/wf/wf_obj_config/dialog.vue +1 -1
  245. package/src/views/user/wf/wf_obj_config/list.vue +1 -1
  246. package/src/views/user/wf/wf_obj_config/list_form.vue +1 -1
  247. package/src/views/user/wf/wf_transfer_setting/list.vue +1 -1
  248. package/src/views/user/workbench_menu/list.vue +1 -1
@@ -1,1148 +1,1158 @@
1
- <template>
2
- <div class="workbenches">
3
- <div class="workbenches-head">
4
- <span class="f-blue">欢迎您</span>
5
-
6
- <el-link
7
- class="fr"
8
- icon="iconfont icon-tuichudenglu"
9
- :underline="false"
10
- @click="logout"
11
- >退出登录</el-link
12
- >
13
- <!-- <el-link class="fr" icon="el-icon-set-up" :underline="false" @click="openCompanyDialog" style="margin-right:10px">切换组织</el-link> -->
14
- <span class="fr">您好,{{ userInfo.nickName }}</span>
15
- </div>
16
- <div class="workbenches-box">
17
- <el-row>
18
- <el-col :span="16">
19
- <div class="w-box" style="margin-right: 16px">
20
- <div class="w-b-head">
21
- <div class="tit fl">
22
- <b>应用场景</b>
23
- </div>
24
- <!-- <div class="fr">
25
- <el-link icon="iconfont icon-shuaxin" :underline="false">刷新</el-link>
26
- <el-link :underline="false">查看更多 +</el-link>
27
- </div> -->
28
- </div>
29
-
30
- <div class="use-cases">
31
- <template v-for="workbenchMenu in workbenchMenus">
32
- <div class="item" :key="workbenchMenu.id">
33
- <div class="t">
34
- <span>{{ workbenchMenu.menuName }}</span>
35
- </div>
36
- <div class="c">
37
- <div
38
- class="i-block"
39
- v-for="(router2, index1) in workbenchMenu.children"
40
- :key="index1"
41
- @click="openRoutePath(router2)"
42
- >
43
- <i
44
- class="icon iconfont"
45
- :class="router2.menuImg || 'icon-charge-fill'"
46
- :style="
47
- 'background-color: ' +
48
- (router2.menuImgColor || '#3B82F6') +
49
- ';'
50
- "
51
- ></i>
52
- <span>{{ router2.menuName }}</span>
53
- <span class="tips" v-if="!!router2.note">{{
54
- router2.note
55
- }}</span>
56
- </div>
57
- <!-- <div class="i-block">
58
- <i class="icon iconfont icon-charge-fill" style="background-color:#3B82F6"></i>
59
-
60
- <span>研发费用付款</span>
61
- <span class="tips">(技术转让费、设计开发费、检测费、试验费、信息费、标准化费用)</span>
62
- </div> -->
63
- </div>
64
- </div>
65
- </template>
66
- </div>
67
-
68
- <!-- <template v-for="menuModule in $baseEventBus.menuModules">
69
- <div class="use-cases" style="height: calc(100vh - 193px);" :key="menuModule.id" v-show="menuModule.id === $baseEventBus.currentMenuId">
70
-
71
- <div class="item" v-for="router1 in menuModule.children" :key="router1.id">
72
- <div class="t"><span>{{router1.menuName}}</span></div>
73
- <div class="c">
74
- <div class="i-block" v-for="(router2, index1) in router1.children"
75
- :key="index1" @click="rourteTo(router2)"><i class="icon" style="background-color: #3B82F6;">{{router2.menuName.substring(0,1)}}</i><span>{{router2.menuName}}</span></div>
76
- </div>
77
- </div>
78
- </div>
79
- </template> -->
80
- </div>
81
- </el-col>
82
- <el-col :span="8">
83
- <div class="w-box" style="height: 60%">
84
- <div class="w-b-head">
85
- <div class="tit fl">
86
- <b>待办事项</b>
87
- <i class="nums">{{ unDoWfRows.length }}</i>
88
- </div>
89
- <div class="fr">
90
- <el-link :underline="false" @click="toWfManageList"
91
- >查看更多 +</el-link
92
- >
93
- </div>
94
- </div>
95
- <div class="agenda-box">
96
- <div
97
- class="item"
98
- v-for="item in unDoWfRows"
99
- :key="item.id"
100
- @click="openWfDialog(item)"
101
- >
102
- <p class="name">{{ item.name }}</p>
103
- <p class="info">
104
- <span>单据类型:{{ item.objTypeName }}</span>
105
- <span>启动人:{{ item.starterName }}</span>
106
- </p>
107
- </div>
108
- </div>
109
- </div>
110
- <div class="w-box" style="margin-top: 16px; height: calc(40% - 16px)">
111
- <div class="w-b-head">
112
- <div class="tit fl">
113
- <b>通知公告</b>
114
- <i class="nums">{{ systemNotices.length }}</i>
115
- </div>
116
- <div class="fr">
117
- <el-link :underline="false" @click="openSystemNoticeDialog()"
118
- >查看更多 +</el-link
119
- >
120
- </div>
121
- </div>
122
- <div class="wnotice-box">
123
- <!-- <div class="item">
124
- <i class="no-read">未读</i>
125
- <span class="name">紧急通知</span>
126
- <span class="date">2025-10-12</span>
127
- </div> -->
128
- <div
129
- class="item"
130
- v-for="systemNotice in systemNotices"
131
- :key="systemNotice.id"
132
- @click="openSystemNoticeDialog(systemNotice)"
133
- >
134
- <span class="name">{{ systemNotice.title }}</span>
135
- <span class="date">{{
136
- systemNotice.modifyDate.substring(0, 10)
137
- }}</span>
138
- </div>
139
- </div>
140
- </div>
141
- </el-col>
142
- </el-row>
143
- </div>
144
- <!-- <div class="workbenches-info">
145
- <div class="w-left">
146
- <span>角色申请:李鹏00575023 (“项目预算与费用管理”模块:郑潇涵19010359)</span>
147
- <span>运维人员:林上家A1010633 | 王瑾瑾01499274<i style="padding-left:24px"></i>©2023 海尔新能源 版权所有</span>
148
- </div>
149
- </div>
150
- -->
151
- <systemNoticeInfoDialog
152
- v-if="showSystemNoticeInfoDialog"
153
- :visiable.sync="showSystemNoticeInfoDialog"
154
- :param="csnRow"
155
- :appendToTop="true"
156
- ></systemNoticeInfoDialog>
157
- <wfContentDialog
158
- v-if="showWfDialog"
159
- :visible.sync="showWfDialog"
160
- @close="wfClose"
161
- :option.sync="wfContentOption"
162
- ></wfContentDialog>
163
- <el-dialog
164
- title="切换组织"
165
- width="355px"
166
- custom-class="dialog-style list-dialog"
167
- v-if="showCompanyDialog"
168
- :visible.sync="showCompanyDialog"
169
- :append-to-body="true"
170
- :modal-append-to-body="true"
171
- :close-on-click-modal="false"
172
- v-el-drag-dialog
173
- v-el-dialog-center
174
- @close="changeCompanyClose"
175
- >
176
- <div class="cont">
177
- <el-input
178
- placeholder="搜索"
179
- class="search-btn"
180
- v-model="filterText"
181
- ></el-input>
182
- <el-tree
183
- :props="defaultProps"
184
- :load="loadNode"
185
- node-key="id"
186
- ref="tree"
187
- highlight-current
188
- lazy
189
- :expand-on-click-node="true"
190
- @node-click="handleNodeClick"
191
- class="organization-tree"
192
- icon-class="el-icon-arrow-right"
193
- :filter-node-method="filterNode"
194
- ></el-tree>
195
- </div>
196
- </el-dialog>
197
- </div>
198
- </template>
199
-
200
- <script>
201
- import systemNoticeInfoDialog from "@base/views/user/system_notice/infoDialog.vue";
202
- import commMenuDialog from "@base/views/user/commMenu/index.vue";
203
- import notifyMessageDialog from "@base/views/user/notify_message/dialog.vue";
204
- import notifyMessageInfoDialog from "@base/views/user/notify_message/infoDialog";
205
-
206
- import { getToken } from "@base/utils/auth";
207
- import wfContentDialog from "@base/views/user/wf/wf_manage/wfContentDialog";
208
- import corejsConfig from "@/corejsConfig";
209
- import { mapGetters } from "vuex";
210
-
211
- export default {
212
- name: "home",
213
- props: {
214
- wf_manage_url: String,
215
- },
216
- components: {
217
- systemNoticeInfoDialog,
218
- commMenuDialog,
219
- notifyMessageDialog,
220
- notifyMessageInfoDialog,
221
- wfContentDialog,
222
- },
223
- data() {
224
- return {
225
- defaultProps: {
226
- label: "label", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
227
- children: [],
228
- isLeaf: "leaf",
229
- },
230
- filterText: null,
231
- showCompanyDialog: false,
232
- choose_company_info: "",
233
-
234
- showNoticeDialog: false,
235
- showGroupDialog: false,
236
- notifyTemplates: [],
237
- userInfo: {},
238
- companyInfo: {},
239
- systemNotices: [],
240
- showSystemNoticeInfoDialog: false,
241
- csnRow: null,
242
- headPhotoUrl: "",
243
- dialogVisible: true,
244
- unDoWfRows: [],
245
- wfOption: {},
246
- showWfDialog: false,
247
- wfContentOption: {},
248
- showWfContent: true,
249
- wfContent: null,
250
- wfDataId: "",
251
- showCommMenuDialog: false,
252
- commMenus: [],
253
- notifyMessages: [],
254
- notifyMessageInfoIndex: null,
255
- notifyMessageInfoId: null,
256
- unreadMessageNum: 0,
257
- activating: true,
258
- wfTimer: null,
259
- homeConfig: corejsConfig.homeConfig || {},
260
- menuModules: [],
261
- workbenchMenus: [],
262
- };
263
- },
264
- watch: {
265
- filterText(val) {
266
- this.$refs.tree.filter(val);
267
- },
268
- },
269
- computed: {
270
- ...mapGetters(["sidebarRouters"]),
271
- },
272
- activated() {
273
- this.activating = true;
274
- if (this.wfTimer) {
275
- this.timerExcFun(true);
276
- }
277
- },
278
- deactivated() {
279
- this.activating = false;
280
- },
281
- beforeDestroy() {
282
- this.clearTimer();
283
- },
284
- created() {
285
- this.getUserInfo();
286
- this.initSystemNotice();
287
- this.initCommMenu();
288
- this.initNotifyMessage();
289
- this.initWfParam();
290
- this.initWfTimer();
291
- this.initMenu();
292
- this.initWorkbenchMenu();
293
- },
294
- mounted() {
295
- // setTimeout(() => {
296
- // debugger
297
- // this.filterRoute();
298
- // }, 100);
299
- },
300
- methods: {
301
- handleNodeClick(data, node, v) {
302
- if (!data.hasChild) {
303
- this.choose_company_info = data;
304
- this.changeCompany();
305
- } else {
306
- this.choose_company_info = {};
307
- }
308
- },
309
- // 异步树叶子节点懒加载逻辑
310
- loadNode(node, resolve) {
311
- let companyCode =
312
- node && node.data && node.data.companyCode
313
- ? node.data.companyCode || ""
314
- : "";
315
- let url = !companyCode
316
- ? USER_PREFIX + "/user_company_info/getAllList"
317
- : USER_PREFIX + "/user_company_info/getChildren";
318
-
319
- this.$http({
320
- url: url,
321
- method: "post",
322
- data: {
323
- parentCompanyCode: companyCode,
324
- },
325
- success: (res) => {
326
- let datas = res.objx || [];
327
- let parentLabel = companyCode ? node.label : null;
328
- datas.forEach((item) => {
329
- item.leaf = !item.hasChild;
330
- let label = item.companyName;
331
- /*if(companyCode){
332
- label = label + '('+companyTypeMap[item.companyType]+')'
333
- }*/
334
- item.label = label;
335
- item.parentLabel = parentLabel;
336
- });
337
-
338
- if (node.level === 0) {
339
- if (datas.length > 0 && datas[0].hasChild) {
340
- this.$nextTick(() => {
341
- let nodedata = node.childNodes[0];
342
- nodedata.expanded = true;
343
- nodedata.loadData();
344
- });
345
- }
346
- }
347
- resolve(datas);
348
- },
349
- });
350
- },
351
- filterNode(value, data) {
352
- if (!value) return true;
353
- let flag1 = data.label.indexOf(value) !== -1;
354
- let flag2 = data.parentLabel && data.parentLabel.indexOf(value) !== -1;
355
- return flag1 || flag2;
356
- },
357
- openCompanyDialog() {
358
- this.filterText = null;
359
- this.showCompanyDialog = true;
360
- },
361
- getWebPrefix(callback) {
362
- this.$http({
363
- url: USER_PREFIX + "/auth/getWebPrefix",
364
- method: `post`,
365
- data: {},
366
- isLoading: true,
367
- success: (res) => {
368
- let webPrefix = res.objx;
369
- callback && callback(webPrefix);
370
- },
371
- });
372
- },
373
- changeCompany() {
374
- let row = this.choose_company_info;
375
- let query = this.$route.query;
376
- let flag = query && query.flag === 1 ? 1 : null;
377
- this.showCompanyDialog = false;
378
- if (row && row.companyCode) {
379
- this.$baseLoading({ target: document.body, fullscreen: true });
380
- this.$http({
381
- url: USER_PREFIX + "/auth/switchCompany",
382
- method: "post",
383
- data: { stringOne: row.companyCode },
384
- isLoading: true,
385
- success: (res) => {
386
- this.getWebPrefix((prefix) => {
387
- let webPrefix = prefix ? "/" + prefix : window.MAIN_WEB_PREFIX;
388
- sessionStorage.removeItem("out-token");
389
- this.$store.dispatch("user/changeCompanyInfo", row);
390
- this.$store.dispatch("tagsView/delAllViews");
391
- window.location.href = webPrefix + "/index.html";
392
- });
393
- },
394
- });
395
- } else {
396
- if (flag === 1) {
397
- this.$router.push({
398
- path: "/",
399
- });
400
- }
401
- }
402
- },
403
- changeCompanyClose() {
404
- let query = this.$route.query;
405
- let flag = query && query.flag === 1 ? 1 : null;
406
- if (flag === 1) {
407
- this.$router.push({
408
- path: "/",
409
- });
410
- }
411
- this.showCompanyDialog = false;
412
- },
413
- initWorkbenchMenu() {
414
- this.$http({
415
- url: USER_PREFIX + "/workbench_menu/getAll",
416
- method: "post",
417
- data: {},
418
- success: (res) => {
419
- let workbenchMenus = res.objx || [];
420
- this.workbenchMenus = workbenchMenus;
421
- },
422
- });
423
- },
424
- jumpOutLink(route) {
425
- let path = route.url || route.path;
426
- if (route.type === 4 && path) {
427
- let params = this.getCustomReqUrlAndCleanUrl(path);
428
- let reqUrl = params.custom_req_url;
429
- if (reqUrl) {
430
- this.$http({
431
- url: reqUrl,
432
- method: `post`,
433
- data: { thirdUrl: params.newUrl },
434
- isLoading: true,
435
- success: (res) => {
436
- path = res.objx;
437
- window.open(path);
438
- },
439
- });
440
- } else {
441
- if (path.indexOf("token={token}") >= 0) {
442
- path = path.replace("token={token}", "token=" + getToken());
443
- }
444
- window.open(path);
445
- }
446
- }
447
- },
448
- flattenTree(data) {
449
- const result = [];
450
-
451
- // 使用深度优先遍历递归函数
452
- function dfs(node) {
453
- if (!node) return;
454
-
455
- // 将当前节点添加到结果数组(排除children属性)
456
- const { children, ...rest } = node;
457
- result.push(rest);
458
-
459
- // 递归处理子节点
460
- if (children && children.length > 0) {
461
- children.forEach((child) => dfs(child));
462
- }
463
- }
464
-
465
- // 处理输入数据(支持数组和单个对象)
466
- if (Array.isArray(data)) {
467
- data.forEach((item) => dfs(item));
468
- } else if (data) {
469
- dfs(data);
470
- }
471
-
472
- return result;
473
- },
474
- getRoute(row) {
475
- let menuCode = row.menuCode;
476
- let routes = this.flattenTree(this.$baseEventBus.menuModules);
477
- let route = routes.find((item) => item.menuCode === menuCode);
478
- return route;
479
- },
480
- openRoutePath(row) {
481
- let menuCode = row.menuCode;
482
- if (menuCode === "todo") {
483
- this.$message.error("功能正在完善,敬请期待。");
484
- return;
485
- }
486
- let routes = this.flattenTree(this.sidebarRouters);
487
- let route = routes.find((item) => item.menuCode === menuCode);
488
- if (!route) {
489
- this.$message.error("菜单没有访问权限");
490
- return;
491
- }
492
- this.rourteTo(route);
493
- },
494
- rourteTo(route) {
495
- let path = route.url || route.path;
496
- if (!path) {
497
- return;
498
- }
499
- this.showMenuModal = true;
500
- setTimeout(() => {
501
- this.showMenuModal = false;
502
- }, 200);
503
- try {
504
- if (route.linkType === 4) {
505
- this.jumpOutLink(route);
506
- } else if (route.linkType === 3) {
507
- this.$router.push({
508
- path: path,
509
- query: { url: route.outLink, route: route.route },
510
- });
511
- } else {
512
- this.$router.push(path);
513
- }
514
- } catch (e) {
515
- console.error(e);
516
- }
517
- },
518
-
519
- initMenu() {
520
- this.$baseEventBus.$on("reloadHomeMenu", (menuId) => {
521
- this.$forceUpdate();
522
- });
523
- },
524
- filterRoute() {
525
- let oldRoutes = JSON.parse(JSON.stringify(this.sidebarRouters));
526
- let nRoute1s = [];
527
- oldRoutes.forEach((route1, index1) => {
528
- let nRoute2s = [];
529
- if (!route1.hidden) {
530
- route1.children.forEach((route2, index2) => {
531
- let nRoute3s = [];
532
- if (!route2.hidden) {
533
- route2.children.forEach((route3, index3) => {
534
- if (!route3.hidden) {
535
- nRoute3s.push(route3);
536
- }
537
- });
538
- }
539
- if (route2.type === 4 || route2.url || nRoute3s.length > 0) {
540
- route2.children = nRoute3s;
541
- nRoute2s.push(route2);
542
- }
543
- });
544
- }
545
- if (route1.type === 4 || route1.url || nRoute2s.length > 0) {
546
- route1.children = nRoute2s;
547
- nRoute1s.push(route1);
548
- }
549
- });
550
-
551
- this.menuModules = nRoute1s || [];
552
- },
553
- logout() {
554
- this.$store.dispatch("user/logout2").then((res) => {
555
- this.$router.push(`/login?redirect=${this.$route.fullPath}`);
556
- });
557
- },
558
- wfClose() {
559
- this.timerExcFun(true);
560
- },
561
- initWfTimer() {
562
- this.wfTimer = setInterval(() => {
563
- this.timerExcFun(false);
564
- }, 10000);
565
- this.timerExcFun(true);
566
- },
567
- timerExcFun(isLoading) {
568
- if (!this.activating) {
569
- return;
570
- }
571
- this.getWfInfoList(isLoading);
572
- this.getUnreadMessageNum(isLoading);
573
- this.$emit("timerHandle");
574
- },
575
- clearTimer() {
576
- clearInterval(this.wfTimer);
577
- this.wfTimer = null;
578
- },
579
- getUserInfo() {
580
- this.$http({
581
- url: USER_PREFIX + "/user/currentUser",
582
- method: "post",
583
- success: (res) => {
584
- let userInfo = res.objx;
585
- this.headPhotoUrl = userInfo.headPhotoUrl
586
- ? userInfo.headPhotoUrl
587
- : require("@/resources/images" + "/default-header.png");
588
-
589
- this.userInfo = userInfo;
590
- },
591
- });
592
- this.$http({
593
- url: USER_PREFIX + "/company_info/getCurrent",
594
- method: `post`,
595
- success: (res) => {
596
- this.companyInfo = res.objx || {};
597
- },
598
- });
599
- },
600
- initSystemNotice() {
601
- this.$http({
602
- url: USER_PREFIX + "/system_notice/listPage",
603
- data: { publish: true, searchCount: false },
604
- method: "post",
605
- success: (res) => {
606
- this.systemNotices =
607
- res.objx && res.objx.records ? res.objx.records : [];
608
- },
609
- });
610
- },
611
- openSystemNoticeDialog(row) {
612
- this.csnRow = row || null;
613
- this.showSystemNoticeInfoDialog = true;
614
- },
615
- initUnDoWfInfo() {
616
- this.$http({
617
- url: AGILEBPM_PREFIX + "/wf_manage/listPage",
618
- data: { type: 0, searchCount: false },
619
- method: "post",
620
- success: (res) => {
621
- this.unDoWfRows = res.objx.records || [];
622
- },
623
- });
624
- },
625
- initWfTableList() {
626
- let that = this;
627
- let paramColumns = this.wfParamDTOs.map((item) => {
628
- return {
629
- title: this.$t1(item.paramName),
630
- field: item.paramKey,
631
- width: 150,
632
- };
633
- });
634
- let statuses = {
635
- running: this.$t1("审核中"),
636
- back: this.$t1("已驳回"),
637
- end: this.$t1("已完成"),
638
- };
639
- let tableOption = {
640
- vue: this,
641
- tableRef: "table-wf",
642
- tableName: "home-table-wf",
643
- config: {
644
- height: "auto",
645
- scrollY: {
646
- enabled: false,
647
- },
648
- },
649
- columns: [
650
- { type: "checkbox", width: 48, resizable: false, fixed: "left" },
651
- {
652
- title: this.$t1("单据类型"),
653
- field: "objTypeName",
654
- width: 150,
655
- fixed: "left",
656
- },
657
- {
658
- title: this.$t1("流程主题"),
659
- field: "name",
660
- width: 150,
661
- },
662
- {
663
- title: this.$t1("启动人"),
664
- field: "starterName",
665
- width: 150,
666
- },
667
- {
668
- title: this.$t1("当前任务"),
669
- field: "taskName",
670
- width: 150,
671
- },
672
- {
673
- title: this.$t1("当前任务用户"),
674
- field: "candidateNames",
675
- width: 150,
676
- },
677
- {
678
- title: this.$t1("启动时间"),
679
- field: "createDate",
680
- width: 150,
681
- },
682
- ...paramColumns,
683
- {
684
- width: 47,
685
- fixed: "right",
686
- title: "",
687
- sortable: false,
688
- slots: {
689
- default: ({ row }) => {
690
- return [
691
- <a
692
- href="javascript:void(0);"
693
- class="a-link"
694
- onclick={() => {
695
- this.openWfDialog(row);
696
- }}
697
- >
698
- <el-tooltip
699
- enterable={false}
700
- effect="dark"
701
- content={this.$t1("查看")}
702
- placement="top"
703
- popper-class="tooltip-skin"
704
- >
705
- <i class="el-icon-view" />
706
- </el-tooltip>
707
- </a>,
708
- ];
709
- },
710
- },
711
- },
712
- ],
713
- };
714
- this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
715
- this.wfOption = opts;
716
- });
717
- },
718
- openWfDialog(row) {
719
- this.wfContentOption = {
720
- objId: row.objId,
721
- url: row.url,
722
- objTypeCode: row.objTypeCode,
723
- };
724
- this.showWfDialog = true;
725
- },
726
- commMenuCallBack(datas) {
727
- this.commMenus = datas || [];
728
- },
729
- initCommMenu() {
730
- this.$http({
731
- url: USER_PREFIX + "/comm_menu/currentList",
732
- data: { longOne: 0 },
733
- method: "POST",
734
- }).then((resultMsg) => {
735
- this.commMenus = resultMsg.objx || [];
736
- });
737
- },
738
- initNotifyMessage() {
739
- return;
740
- this.$http({
741
- url: USER_PREFIX + "/notify_message/listPage",
742
- data: { searchCount: false },
743
- method: "post",
744
- success: (res) => {
745
- this.notifyMessages =
746
- res.objx && res.objx.records ? res.objx.records : [];
747
- },
748
- });
749
- },
750
- openNotifyMessageDialog(row) {
751
- if (row.jumpContent) {
752
- this.$refs.notifyMessageDialog.open(row, () => {
753
- row.readed = 1;
754
- });
755
- }
756
- },
757
- openMoreNotifyMessage(notifyType) {
758
- let data = { notifyType: notifyType || "" };
759
- let view = {
760
- name: "notify_message:list",
761
- query: data,
762
- };
763
- this.$store.dispatch("tagsView/delCachedView", view).then(() => {
764
- this.$router.replace(view);
765
- });
766
-
767
- if (notifyType) {
768
- this.showGroupDialog = false;
769
- }
770
- },
771
- checkNotifyMessage(row, index) {
772
- this.showNoticeDialog = true;
773
- this.notifyMessageInfoIndex = index;
774
- this.notifyMessageInfoId = row.id;
775
- },
776
- notifyMessageReadHanlde() {
777
- this.notifyMessages[this.notifyMessageInfoIndex].readed = 1;
778
- },
779
- openNotifyTemplateGroupDialog() {
780
- this.$http({
781
- url: USER_PREFIX + `/notify_template/listPage`,
782
- method: `post`,
783
- data: { searchCount: false },
784
- isLoading: true,
785
- // loadingTarget: document.body,
786
- success: (res) => {
787
- this.notifyTemplates =
788
- res.objx && res.objx.records ? res.objx.records : [];
789
- this.showGroupDialog = true;
790
- },
791
- });
792
- },
793
- rourteTo(route) {
794
- if (route.type === 4) {
795
- this.jumpOutLink(route);
796
- } else if (route.type === 3) {
797
- let menuCode = route.menuCode;
798
- let path = "/user/outLink/index/" + menuCode;
799
- this.$router.push({ path: path, query: { url: route.url } });
800
- } else {
801
- let path = this.getPath(route);
802
- if (!path) return;
803
- this.$router.push(path);
804
- }
805
- },
806
- getPath(route3) {
807
- let item = null;
808
- let path = null;
809
- if (route3.type === 0) {
810
- //普通菜单
811
- if (route3.url) {
812
- path = route3.route || route3.url;
813
- let str = "/report/vform/render/";
814
- if (path.indexOf(str) === 0) {
815
- } else {
816
- let pIndex = path.indexOf("?");
817
- if (pIndex > 0) {
818
- path = path.substring(0, pIndex);
819
- }
820
- }
821
- }
822
- } else if (route3.type === 5) {
823
- //动态表单
824
- let url = route3.route || route3.url;
825
- path = url;
826
- }
827
- if (path && path.startsWith("@")) {
828
- path = null;
829
- }
830
- return path;
831
- },
832
- jumpOutLink(route) {
833
- let path = route.url;
834
- if (route.type === 4 && path) {
835
- if (path.indexOf("token={token}") >= 0) {
836
- path = path.replace("token={token}", "token=" + getToken());
837
- }
838
- window.open(path);
839
- }
840
- },
841
- initWfParam() {
842
- return this.$http({
843
- url: USER_PREFIX + "/wf_param/list",
844
- method: `post`,
845
- data: {},
846
- isLoading: true,
847
- // loadingTarget: document.body,
848
- modalStrictly: true,
849
- success: (res) => {
850
- this.wfParamDTOs = res.objx || [];
851
- // this.initWfTableList();
852
- },
853
- });
854
- },
855
- getWfInfoList(isLoading) {
856
- if (!this.activating) {
857
- return;
858
- }
859
- this.$http({
860
- url: USER_PREFIX + "/wf_info/listPage",
861
- data: { type: 0, size: 20, searchCount: false },
862
- method: "post",
863
- isLoading: isLoading,
864
- modal: isLoading || false,
865
- // loadingTarget: document.body,
866
- success: (res) => {
867
- this.unDoWfRows =
868
- res.objx && res.objx.records ? res.objx.records : [];
869
- },
870
- failMsg: false,
871
- errorMsg: false,
872
- fail: (res, response) => {
873
- if (response && response.status === 200) {
874
- this.$errorMsg(res);
875
- }
876
- },
877
- });
878
- },
879
- getUnreadMessageNum(isLoading) {
880
- if (!this.activating) {
881
- return;
882
- }
883
- return this.$http({
884
- url: USER_PREFIX + "/notify_message/countMessage",
885
- method: `post`,
886
- data: {},
887
- isLoading: isLoading,
888
- modal: isLoading || false,
889
- // loadingTarget: document.body,
890
- success: (res) => {
891
- this.unreadMessageNum = res.objx || 0;
892
- },
893
- failMsg: false,
894
- errorMsg: false,
895
- fail: (res, response) => {
896
- if (response && response.status === 200) {
897
- this.$errorMsg(res);
898
- }
899
- },
900
- });
901
- },
902
- wfhandleCallback(flag) {
903
- if ([1, 2, 3].includes(flag)) {
904
- this.showWfDialog = false;
905
- this.wfClose();
906
- }
907
- },
908
- toWfManageList() {
909
- let url = this.wf_manage_url || "/basic/wf/wf_manage/list";
910
- this.$router.push(url);
911
- },
912
- },
913
- };
914
- </script>
915
- <style lang="scss" scoped>
916
- @import "~@/styles/variables.scss";
917
- ::v-deep .el-link {
918
- color: rgba(0, 0, 0, 0.65);
919
- .iconfont {
920
- margin-right: 4px;
921
- font-size: 14px;
922
- }
923
- &:hover {
924
- color: $baseColor;
925
- }
926
- }
927
- .workbenches {
928
- padding: 18px 24px 0px;
929
- }
930
- .workbenches-head {
931
- color: rgba(0, 0, 0, 0.65);
932
- margin-bottom: 16px;
933
- line-height: 1;
934
- font-size: 14px;
935
- .icon-haier {
936
- color: $baseColor;
937
- font-size: 24px;
938
- margin-right: 16px;
939
- }
940
- .logo {
941
- height: 30px;
942
- vertical-align: middle;
943
- }
944
- > span {
945
- margin-right: 16px;
946
- &.f-blue {
947
- font-size: 16px;
948
- vertical-align: middle;
949
- line-height: 1;
950
- display: inline-block;
951
- }
952
- }
953
- }
954
- .workbenches-box {
955
- height: calc(100vh - 94px); /**margin-bottom: 16px;*/
956
- > .el-row {
957
- height: 100%;
958
- > .el-col {
959
- height: 100%;
960
- }
961
- }
962
- .w-box {
963
- background: #fff;
964
- border-radius: 4px;
965
- overflow: hidden;
966
- height: 100%;
967
- .w-b-head {
968
- overflow: hidden;
969
- margin: 16px 24px;
970
- .tit {
971
- b {
972
- font-size: 16px;
973
- font-weight: 600;
974
- vertical-align: middle;
975
- }
976
- .nums {
977
- margin-left: 8px;
978
- border-radius: 4px;
979
- width: 20px;
980
- height: 20px;
981
- display: inline-block;
982
- background-color: #ff4d4f;
983
- color: #fff;
984
- text-align: center;
985
- line-height: 20px;
986
- font-style: inherit;
987
- font-size: 12px;
988
- vertical-align: middle;
989
- }
990
- }
991
- .el-link {
992
- margin-left: 24px;
993
- }
994
- }
995
- }
996
- .wnotice-box {
997
- padding: 0 24px 4px;
998
- overflow: auto;
999
- height: calc(100% - 52px);
1000
- .item {
1001
- border: solid 1px rgba(0, 0, 0, 0.15);
1002
- border-radius: 4px;
1003
- padding: 12px;
1004
- display: flex;
1005
- margin-bottom: 12px;
1006
- line-height: 18px;
1007
- cursor: pointer;
1008
- font-size: 14px;
1009
- .no-read {
1010
- background-color: #faad14;
1011
- border-radius: 4px;
1012
- color: #fff;
1013
- font-size: 12px;
1014
- font-style: inherit;
1015
- line-height: 18px;
1016
- padding: 0 4px;
1017
- margin-right: 8px;
1018
- }
1019
- .name {
1020
- flex: 1;
1021
- }
1022
- .date {
1023
- color: rgba(0, 0, 0, 0.45);
1024
- font-size: 12px;
1025
- }
1026
- &:hover {
1027
- border-color: $baseColor;
1028
- .name {
1029
- color: $baseColor;
1030
- }
1031
- }
1032
- }
1033
- }
1034
- .agenda-box {
1035
- padding: 0 24px 4px;
1036
- overflow: auto;
1037
- height: calc(100% - 52px);
1038
- .item {
1039
- border: solid 1px rgba(0, 0, 0, 0.15);
1040
- border-radius: 4px;
1041
- padding: 12px;
1042
- margin-bottom: 12px;
1043
- cursor: pointer;
1044
- p {
1045
- margin: 0;
1046
- }
1047
- .name {
1048
- margin-bottom: 8px;
1049
- font-size: 14px;
1050
- }
1051
- .info {
1052
- font-size: 12px;
1053
- > span {
1054
- margin-right: 32px;
1055
- color: rgba(0, 0, 0, 0.45);
1056
- }
1057
- }
1058
- &:hover {
1059
- border-color: $baseColor;
1060
- .name {
1061
- color: $baseColor;
1062
- }
1063
- }
1064
- }
1065
- }
1066
- .use-cases {
1067
- overflow: auto;
1068
- padding: 0 24px 4px;
1069
- height: calc(100% - 52px);
1070
- .item {
1071
- margin-bottom: 32px;
1072
- .t {
1073
- &:before {
1074
- content: "";
1075
- width: 4px;
1076
- height: 15px;
1077
- border-radius: 4px;
1078
- background: $baseColor;
1079
- margin-right: 8px;
1080
- vertical-align: middle;
1081
- display: inline-block;
1082
- }
1083
- span {
1084
- vertical-align: middle;
1085
- font-size: 14px;
1086
- }
1087
- }
1088
- .c {
1089
- padding: 2px 12px;
1090
- .i-block {
1091
- display: inline-block;
1092
- width: 84px;
1093
- margin-right: 52px;
1094
- text-align: center;
1095
- font-size: 12px;
1096
- margin-top: 18px;
1097
- cursor: pointer;
1098
- vertical-align: top;
1099
- .icon {
1100
- width: 44px;
1101
- height: 44px;
1102
- border-radius: 8px;
1103
- color: #fff;
1104
- display: block;
1105
- margin: 0 auto 8px;
1106
- font-size: 20px;
1107
- font-style: inherit;
1108
- line-height: 44px;
1109
- }
1110
- &:hover {
1111
- color: $baseColor;
1112
- }
1113
- .tips {
1114
- zoom: 0.8;
1115
- display: inline-block;
1116
- line-height: 1.2;
1117
- margin: 0 -42px 8px;
1118
- }
1119
- }
1120
- }
1121
- }
1122
- }
1123
- }
1124
- .workbenches-info {
1125
- padding: 0 24px;
1126
- margin: 0 -24px;
1127
- background: #fff;
1128
- height: 50px;
1129
- display: flex;
1130
- font-size: 12px;
1131
- color: rgba(0, 0, 0, 0.65);
1132
- .w-left {
1133
- padding: 10px 0;
1134
- height: 100%;
1135
- text-align: right;
1136
- vertical-align: middle;
1137
- flex: 1;
1138
- zoom: 0.9;
1139
- span {
1140
- margin: 3px 0px;
1141
- display: block;
1142
- }
1143
- }
1144
- .w-right {
1145
- line-height: 74px;
1146
- }
1147
- }
1148
- </style>
1
+ <template>
2
+ <div class="workbenches">
3
+ <div class="workbenches-head">
4
+ <span class="f-blue">{{ $t1("欢迎您") }}</span>
5
+
6
+ <el-link
7
+ class="fr"
8
+ icon="iconfont icon-tuichudenglu"
9
+ :underline="false"
10
+ @click="logout"
11
+ >{{ $t1("退出登录") }}</el-link
12
+ >
13
+ <!-- <el-link class="fr" icon="el-icon-set-up" :underline="false" @click="openCompanyDialog" style="margin-right:10px">切换组织</el-link> -->
14
+ <span class="fr">{{ $t1("您好") }},{{ userInfo.nickName }}</span>
15
+ </div>
16
+ <div class="workbenches-box">
17
+ <el-row>
18
+ <el-col :span="16">
19
+ <div class="w-box" style="margin-right: 16px">
20
+ <div class="w-b-head">
21
+ <div class="tit fl">
22
+ <b>{{ $t1("应用场景") }}</b>
23
+ </div>
24
+ <!-- <div class="fr">
25
+ <el-link icon="iconfont icon-shuaxin" :underline="false">刷新</el-link>
26
+ <el-link :underline="false">查看更多 +</el-link>
27
+ </div> -->
28
+ </div>
29
+
30
+ <div class="use-cases">
31
+ <template v-for="workbenchMenu in workbenchMenus">
32
+ <div class="item" :key="workbenchMenu.id">
33
+ <div class="t">
34
+ <span>{{ workbenchMenu.menuName }}</span>
35
+ </div>
36
+ <div class="c">
37
+ <div
38
+ class="i-block"
39
+ v-for="(router2, index1) in workbenchMenu.children"
40
+ :key="index1"
41
+ @click="openRoutePath(router2)"
42
+ >
43
+ <i
44
+ class="icon iconfont"
45
+ :class="router2.menuImg || 'icon-charge-fill'"
46
+ :style="
47
+ 'background-color: ' +
48
+ (router2.menuImgColor || '#3B82F6') +
49
+ ';'
50
+ "
51
+ ></i>
52
+ <span>{{ router2.menuName }}</span>
53
+ <span class="tips" v-if="!!router2.note">{{
54
+ router2.note
55
+ }}</span>
56
+ </div>
57
+ <!-- <div class="i-block">
58
+ <i class="icon iconfont icon-charge-fill" style="background-color:#3B82F6"></i>
59
+
60
+ <span>研发费用付款</span>
61
+ <span class="tips">(技术转让费、设计开发费、检测费、试验费、信息费、标准化费用)</span>
62
+ </div> -->
63
+ </div>
64
+ </div>
65
+ </template>
66
+ </div>
67
+
68
+ <!-- <template v-for="menuModule in $baseEventBus.menuModules">
69
+ <div class="use-cases" style="height: calc(100vh - 193px);" :key="menuModule.id" v-show="menuModule.id === $baseEventBus.currentMenuId">
70
+
71
+ <div class="item" v-for="router1 in menuModule.children" :key="router1.id">
72
+ <div class="t"><span>{{router1.menuName}}</span></div>
73
+ <div class="c">
74
+ <div class="i-block" v-for="(router2, index1) in router1.children"
75
+ :key="index1" @click="rourteTo(router2)"><i class="icon" style="background-color: #3B82F6;">{{router2.menuName.substring(0,1)}}</i><span>{{router2.menuName}}</span></div>
76
+ </div>
77
+ </div>
78
+ </div>
79
+ </template> -->
80
+ </div>
81
+ </el-col>
82
+ <el-col :span="8">
83
+ <div class="w-box" style="height: 60%">
84
+ <div class="w-b-head">
85
+ <div class="tit fl">
86
+ <b>{{ $t1("待办事项") }}</b>
87
+ <i class="nums">{{ unDoWfRows.length }}</i>
88
+ </div>
89
+ <div class="fr">
90
+ <el-link :underline="false" @click="toWfManageList"
91
+ >{{ $t1("查看更多") }} +</el-link
92
+ >
93
+ </div>
94
+ </div>
95
+ <div class="agenda-box">
96
+ <div
97
+ class="item"
98
+ v-for="item in unDoWfRows"
99
+ :key="item.id"
100
+ @click="openWfDialog(item)"
101
+ >
102
+ <p class="name">{{ item.name }}</p>
103
+ <p class="info">
104
+ <span>{{ $t1("单据类型") }}:{{ item.objTypeName }}</span>
105
+ <span>{{ $t1("启动人") }}:{{ item.starterName }}</span>
106
+ </p>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ <div class="w-box" style="margin-top: 16px; height: calc(40% - 16px)">
111
+ <div class="w-b-head">
112
+ <div class="tit fl">
113
+ <b>{{ $t1("通知公告") }}</b>
114
+ <i class="nums">{{ systemNotices.length }}</i>
115
+ </div>
116
+ <div class="fr">
117
+ <el-link :underline="false" @click="openSystemNoticeDialog()"
118
+ >{{ $t1("查看更多") }} +</el-link
119
+ >
120
+ </div>
121
+ </div>
122
+ <div class="wnotice-box">
123
+ <!-- <div class="item">
124
+ <i class="no-read">未读</i>
125
+ <span class="name">紧急通知</span>
126
+ <span class="date">2025-10-12</span>
127
+ </div> -->
128
+ <div
129
+ class="item"
130
+ v-for="systemNotice in systemNotices"
131
+ :key="systemNotice.id"
132
+ @click="openSystemNoticeDialog(systemNotice)"
133
+ >
134
+ <span class="name">{{ systemNotice.title }}</span>
135
+ <span class="date">{{
136
+ systemNotice.modifyDate.substring(0, 10)
137
+ }}</span>
138
+ </div>
139
+ </div>
140
+ </div>
141
+ </el-col>
142
+ </el-row>
143
+ </div>
144
+ <!-- <div class="workbenches-info">
145
+ <div class="w-left">
146
+ <span>角色申请:李鹏00575023 (“项目预算与费用管理”模块:郑潇涵19010359)</span>
147
+ <span>运维人员:林上家A1010633 | 王瑾瑾01499274<i style="padding-left:24px"></i>©2023 海尔新能源 版权所有</span>
148
+ </div>
149
+ </div>
150
+ -->
151
+ <systemNoticeInfoDialog
152
+ v-if="showSystemNoticeInfoDialog"
153
+ :visiable.sync="showSystemNoticeInfoDialog"
154
+ :param="csnRow"
155
+ :appendToTop="true"
156
+ ></systemNoticeInfoDialog>
157
+ <wfContentDialog
158
+ v-if="showWfDialog"
159
+ :visible.sync="showWfDialog"
160
+ @close="wfClose"
161
+ :option.sync="wfContentOption"
162
+ ></wfContentDialog>
163
+ <el-dialog
164
+ :title="$t1('切换组织')"
165
+ width="355px"
166
+ custom-class="dialog-style list-dialog"
167
+ v-if="showCompanyDialog"
168
+ :visible.sync="showCompanyDialog"
169
+ :append-to-body="true"
170
+ :modal-append-to-body="true"
171
+ :close-on-click-modal="false"
172
+ v-el-drag-dialog
173
+ v-el-dialog-center
174
+ @close="changeCompanyClose"
175
+ >
176
+ <div class="cont">
177
+ <el-input
178
+ :placeholder="$t1('搜索')"
179
+ class="search-btn"
180
+ v-model="filterText"
181
+ ></el-input>
182
+ <el-tree
183
+ :props="defaultProps"
184
+ :load="loadNode"
185
+ node-key="id"
186
+ ref="tree"
187
+ highlight-current
188
+ lazy
189
+ :expand-on-click-node="true"
190
+ @node-click="handleNodeClick"
191
+ class="organization-tree"
192
+ icon-class="el-icon-arrow-right"
193
+ :filter-node-method="filterNode"
194
+ ></el-tree>
195
+ </div>
196
+ </el-dialog>
197
+ </div>
198
+ </template>
199
+
200
+ <script>
201
+ import systemNoticeInfoDialog from "@base/views/user/system_notice/infoDialog.vue";
202
+ import commMenuDialog from "@base/views/user/commMenu/index.vue";
203
+ import notifyMessageDialog from "@base/views/user/notify_message/dialog.vue";
204
+ import notifyMessageInfoDialog from "@base/views/user/notify_message/infoDialog";
205
+
206
+ import { getToken } from "@base/utils/auth";
207
+ import wfContentDialog from "@base/views/user/wf/wf_manage/wfContentDialog";
208
+ import corejsConfig from "@/corejsConfig";
209
+ import { mapGetters } from "vuex";
210
+
211
+ export default {
212
+ name: "home",
213
+ props: {
214
+ wf_manage_url: String,
215
+ },
216
+ components: {
217
+ systemNoticeInfoDialog,
218
+ commMenuDialog,
219
+ notifyMessageDialog,
220
+ notifyMessageInfoDialog,
221
+ wfContentDialog,
222
+ },
223
+ data() {
224
+ return {
225
+ defaultProps: {
226
+ label: "label", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
227
+ children: [],
228
+ isLeaf: "leaf",
229
+ },
230
+ filterText: null,
231
+ showCompanyDialog: false,
232
+ choose_company_info: "",
233
+
234
+ showNoticeDialog: false,
235
+ showGroupDialog: false,
236
+ notifyTemplates: [],
237
+ userInfo: {},
238
+ companyInfo: {},
239
+ systemNotices: [],
240
+ showSystemNoticeInfoDialog: false,
241
+ csnRow: null,
242
+ headPhotoUrl: "",
243
+ dialogVisible: true,
244
+ unDoWfRows: [],
245
+ wfOption: {},
246
+ showWfDialog: false,
247
+ wfContentOption: {},
248
+ showWfContent: true,
249
+ wfContent: null,
250
+ wfDataId: "",
251
+ showCommMenuDialog: false,
252
+ commMenus: [],
253
+ notifyMessages: [],
254
+ notifyMessageInfoIndex: null,
255
+ notifyMessageInfoId: null,
256
+ unreadMessageNum: 0,
257
+ activating: true,
258
+ wfTimer: null,
259
+ homeConfig: corejsConfig.homeConfig || {},
260
+ menuModules: [],
261
+ workbenchMenus: [],
262
+ };
263
+ },
264
+ watch: {
265
+ filterText(val) {
266
+ this.$refs.tree.filter(val);
267
+ },
268
+ },
269
+ computed: {
270
+ ...mapGetters(["sidebarRouters"]),
271
+ },
272
+ activated() {
273
+ this.activating = true;
274
+ if (this.wfTimer) {
275
+ this.timerExcFun(true);
276
+ }
277
+ },
278
+ deactivated() {
279
+ this.activating = false;
280
+ },
281
+ beforeDestroy() {
282
+ this.clearTimer();
283
+ if (this.reloadHomeMenuHandler) {
284
+ this.$baseEventBus.$off("reloadHomeMenu", this.reloadHomeMenuHandler);
285
+ this.reloadHomeMenuHandler = null;
286
+ }
287
+ },
288
+ created() {
289
+ this.getUserInfo();
290
+ this.initSystemNotice();
291
+ this.initCommMenu();
292
+ this.initNotifyMessage();
293
+ this.initWfParam();
294
+ this.initWfTimer();
295
+ this.initMenu();
296
+ this.initWorkbenchMenu();
297
+ },
298
+ mounted() {
299
+ // setTimeout(() => {
300
+ // debugger
301
+ // this.filterRoute();
302
+ // }, 100);
303
+ },
304
+ methods: {
305
+ handleNodeClick(data, node, v) {
306
+ if (!data.hasChild) {
307
+ this.choose_company_info = data;
308
+ this.changeCompany();
309
+ } else {
310
+ this.choose_company_info = {};
311
+ }
312
+ },
313
+ // 异步树叶子节点懒加载逻辑
314
+ loadNode(node, resolve) {
315
+ let companyCode =
316
+ node && node.data && node.data.companyCode
317
+ ? node.data.companyCode || ""
318
+ : "";
319
+ let url = !companyCode
320
+ ? USER_PREFIX + "/user_company_info/getAllList"
321
+ : USER_PREFIX + "/user_company_info/getChildren";
322
+
323
+ this.$http({
324
+ url: url,
325
+ method: "post",
326
+ data: {
327
+ parentCompanyCode: companyCode,
328
+ },
329
+ success: (res) => {
330
+ let datas = res.objx || [];
331
+ let parentLabel = companyCode ? node.label : null;
332
+ datas.forEach((item) => {
333
+ item.leaf = !item.hasChild;
334
+ let label = item.companyName;
335
+ /*if(companyCode){
336
+ label = label + '('+companyTypeMap[item.companyType]+')'
337
+ }*/
338
+ item.label = label;
339
+ item.parentLabel = parentLabel;
340
+ });
341
+
342
+ if (node.level === 0) {
343
+ if (datas.length > 0 && datas[0].hasChild) {
344
+ this.$nextTick(() => {
345
+ let nodedata = node.childNodes[0];
346
+ nodedata.expanded = true;
347
+ nodedata.loadData();
348
+ });
349
+ }
350
+ }
351
+ resolve(datas);
352
+ },
353
+ });
354
+ },
355
+ filterNode(value, data) {
356
+ if (!value) return true;
357
+ let flag1 = data.label.indexOf(value) !== -1;
358
+ let flag2 = data.parentLabel && data.parentLabel.indexOf(value) !== -1;
359
+ return flag1 || flag2;
360
+ },
361
+ openCompanyDialog() {
362
+ this.filterText = null;
363
+ this.showCompanyDialog = true;
364
+ },
365
+ getWebPrefix(callback) {
366
+ this.$http({
367
+ url: USER_PREFIX + "/auth/getWebPrefix",
368
+ method: `post`,
369
+ data: {},
370
+ isLoading: true,
371
+ success: (res) => {
372
+ let webPrefix = res.objx;
373
+ callback && callback(webPrefix);
374
+ },
375
+ });
376
+ },
377
+ changeCompany() {
378
+ let row = this.choose_company_info;
379
+ let query = this.$route.query;
380
+ let flag = query && query.flag === 1 ? 1 : null;
381
+ this.showCompanyDialog = false;
382
+ if (row && row.companyCode) {
383
+ this.$baseLoading({ target: document.body, fullscreen: true });
384
+ this.$http({
385
+ url: USER_PREFIX + "/auth/switchCompany",
386
+ method: "post",
387
+ data: { stringOne: row.companyCode },
388
+ isLoading: true,
389
+ success: (res) => {
390
+ this.getWebPrefix((prefix) => {
391
+ let webPrefix = prefix ? "/" + prefix : window.MAIN_WEB_PREFIX;
392
+ sessionStorage.removeItem("out-token");
393
+ this.$store.dispatch("user/changeCompanyInfo", row);
394
+ this.$store.dispatch("tagsView/delAllViews");
395
+ window.location.href = webPrefix + "/index.html";
396
+ });
397
+ },
398
+ });
399
+ } else {
400
+ if (flag === 1) {
401
+ this.$router.push({
402
+ path: "/",
403
+ });
404
+ }
405
+ }
406
+ },
407
+ changeCompanyClose() {
408
+ let query = this.$route.query;
409
+ let flag = query && query.flag === 1 ? 1 : null;
410
+ if (flag === 1) {
411
+ this.$router.push({
412
+ path: "/",
413
+ });
414
+ }
415
+ this.showCompanyDialog = false;
416
+ },
417
+ initWorkbenchMenu() {
418
+ this.$http({
419
+ url: USER_PREFIX + "/workbench_menu/getAll",
420
+ method: "post",
421
+ data: {},
422
+ success: (res) => {
423
+ let workbenchMenus = res.objx || [];
424
+ this.workbenchMenus = workbenchMenus;
425
+ },
426
+ });
427
+ },
428
+ jumpOutLink(route) {
429
+ let path = route.url || route.path;
430
+ if (route.type === 4 && path) {
431
+ let params = this.getCustomReqUrlAndCleanUrl(path);
432
+ let reqUrl = params.custom_req_url;
433
+ if (reqUrl) {
434
+ this.$http({
435
+ url: reqUrl,
436
+ method: `post`,
437
+ data: { thirdUrl: params.newUrl },
438
+ isLoading: true,
439
+ success: (res) => {
440
+ path = res.objx;
441
+ window.open(path);
442
+ },
443
+ });
444
+ } else {
445
+ if (path.indexOf("token={token}") >= 0) {
446
+ path = path.replace("token={token}", "token=" + getToken());
447
+ }
448
+ window.open(path);
449
+ }
450
+ }
451
+ },
452
+ flattenTree(data) {
453
+ const result = [];
454
+
455
+ // 使用深度优先遍历递归函数
456
+ function dfs(node) {
457
+ if (!node) return;
458
+
459
+ // 将当前节点添加到结果数组(排除children属性)
460
+ const { children, ...rest } = node;
461
+ result.push(rest);
462
+
463
+ // 递归处理子节点
464
+ if (children && children.length > 0) {
465
+ children.forEach((child) => dfs(child));
466
+ }
467
+ }
468
+
469
+ // 处理输入数据(支持数组和单个对象)
470
+ if (Array.isArray(data)) {
471
+ data.forEach((item) => dfs(item));
472
+ } else if (data) {
473
+ dfs(data);
474
+ }
475
+
476
+ return result;
477
+ },
478
+ getRoute(row) {
479
+ let menuCode = row.menuCode;
480
+ let routes = this.flattenTree(this.$baseEventBus.menuModules);
481
+ let route = routes.find((item) => item.menuCode === menuCode);
482
+ return route;
483
+ },
484
+ openRoutePath(row) {
485
+ let menuCode = row.menuCode;
486
+ if (menuCode === "todo") {
487
+ this.$message.error(this.$t1("功能正在完善,敬请期待。"));
488
+ return;
489
+ }
490
+ let routes = this.flattenTree(this.sidebarRouters);
491
+ let route = routes.find((item) => item.menuCode === menuCode);
492
+ if (!route) {
493
+ this.$message.error(this.$t1("菜单没有访问权限"));
494
+ return;
495
+ }
496
+ this.rourteTo(route);
497
+ },
498
+ rourteTo(route) {
499
+ let path = route.url || route.path;
500
+ if (!path) {
501
+ return;
502
+ }
503
+ this.showMenuModal = true;
504
+ setTimeout(() => {
505
+ this.showMenuModal = false;
506
+ }, 200);
507
+ try {
508
+ if (route.linkType === 4) {
509
+ this.jumpOutLink(route);
510
+ } else if (route.linkType === 3) {
511
+ this.$openView(
512
+ {
513
+ path: path,
514
+ query: { url: route.outLink, route: route.route },
515
+ },
516
+ route
517
+ );
518
+ } else {
519
+ this.$openView(path, route);
520
+ }
521
+ } catch (e) {
522
+ console.error(e);
523
+ }
524
+ },
525
+
526
+ initMenu() {
527
+ // handler 存实例属性并在销毁时 $off:home 每次登出/登录重建都会重新注册,
528
+ // 不解绑会累积 handler 并钉住已销毁的 home 实例(内存泄露)
529
+ this.reloadHomeMenuHandler = (menuId) => {
530
+ this.$forceUpdate();
531
+ };
532
+ this.$baseEventBus.$on("reloadHomeMenu", this.reloadHomeMenuHandler);
533
+ },
534
+ filterRoute() {
535
+ let oldRoutes = JSON.parse(JSON.stringify(this.sidebarRouters));
536
+ let nRoute1s = [];
537
+ oldRoutes.forEach((route1, index1) => {
538
+ let nRoute2s = [];
539
+ if (!route1.hidden) {
540
+ route1.children.forEach((route2, index2) => {
541
+ let nRoute3s = [];
542
+ if (!route2.hidden) {
543
+ route2.children.forEach((route3, index3) => {
544
+ if (!route3.hidden) {
545
+ nRoute3s.push(route3);
546
+ }
547
+ });
548
+ }
549
+ if (route2.type === 4 || route2.url || nRoute3s.length > 0) {
550
+ route2.children = nRoute3s;
551
+ nRoute2s.push(route2);
552
+ }
553
+ });
554
+ }
555
+ if (route1.type === 4 || route1.url || nRoute2s.length > 0) {
556
+ route1.children = nRoute2s;
557
+ nRoute1s.push(route1);
558
+ }
559
+ });
560
+
561
+ this.menuModules = nRoute1s || [];
562
+ },
563
+ logout() {
564
+ this.$store.dispatch("user/logout2").then((res) => {
565
+ this.$router.push(`/login?redirect=${this.$route.fullPath}`);
566
+ });
567
+ },
568
+ wfClose() {
569
+ this.timerExcFun(true);
570
+ },
571
+ initWfTimer() {
572
+ this.wfTimer = setInterval(() => {
573
+ this.timerExcFun(false);
574
+ }, 10000);
575
+ this.timerExcFun(true);
576
+ },
577
+ timerExcFun(isLoading) {
578
+ if (!this.activating) {
579
+ return;
580
+ }
581
+ this.getWfInfoList(isLoading);
582
+ this.getUnreadMessageNum(isLoading);
583
+ this.$emit("timerHandle");
584
+ },
585
+ clearTimer() {
586
+ clearInterval(this.wfTimer);
587
+ this.wfTimer = null;
588
+ },
589
+ getUserInfo() {
590
+ this.$http({
591
+ url: USER_PREFIX + "/user/currentUser",
592
+ method: "post",
593
+ success: (res) => {
594
+ let userInfo = res.objx;
595
+ this.headPhotoUrl = userInfo.headPhotoUrl
596
+ ? userInfo.headPhotoUrl
597
+ : require("@/resources/images" + "/default-header.png");
598
+
599
+ this.userInfo = userInfo;
600
+ },
601
+ });
602
+ this.$http({
603
+ url: USER_PREFIX + "/company_info/getCurrent",
604
+ method: `post`,
605
+ success: (res) => {
606
+ this.companyInfo = res.objx || {};
607
+ },
608
+ });
609
+ },
610
+ initSystemNotice() {
611
+ this.$http({
612
+ url: USER_PREFIX + "/system_notice/listPage",
613
+ data: { publish: true, searchCount: false },
614
+ method: "post",
615
+ success: (res) => {
616
+ this.systemNotices =
617
+ res.objx && res.objx.records ? res.objx.records : [];
618
+ },
619
+ });
620
+ },
621
+ openSystemNoticeDialog(row) {
622
+ this.csnRow = row || null;
623
+ this.showSystemNoticeInfoDialog = true;
624
+ },
625
+ initUnDoWfInfo() {
626
+ this.$http({
627
+ url: AGILEBPM_PREFIX + "/wf_manage/listPage",
628
+ data: { type: 0, searchCount: false },
629
+ method: "post",
630
+ success: (res) => {
631
+ this.unDoWfRows = res.objx.records || [];
632
+ },
633
+ });
634
+ },
635
+ initWfTableList() {
636
+ let that = this;
637
+ let paramColumns = this.wfParamDTOs.map((item) => {
638
+ return {
639
+ title: this.$t1(item.paramName),
640
+ field: item.paramKey,
641
+ width: 150,
642
+ };
643
+ });
644
+ let statuses = {
645
+ running: this.$t1("审核中"),
646
+ back: this.$t1("已驳回"),
647
+ end: this.$t1("已完成"),
648
+ };
649
+ let tableOption = {
650
+ vue: this,
651
+ tableRef: "table-wf",
652
+ tableName: "home-table-wf",
653
+ config: {
654
+ height: "auto",
655
+ scrollY: {
656
+ enabled: false,
657
+ },
658
+ },
659
+ columns: [
660
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
661
+ {
662
+ title: this.$t1("单据类型"),
663
+ field: "objTypeName",
664
+ width: 150,
665
+ fixed: "left",
666
+ },
667
+ {
668
+ title: this.$t1("流程主题"),
669
+ field: "name",
670
+ width: 150,
671
+ },
672
+ {
673
+ title: this.$t1("启动人"),
674
+ field: "starterName",
675
+ width: 150,
676
+ },
677
+ {
678
+ title: this.$t1("当前任务"),
679
+ field: "taskName",
680
+ width: 150,
681
+ },
682
+ {
683
+ title: this.$t1("当前任务用户"),
684
+ field: "candidateNames",
685
+ width: 150,
686
+ },
687
+ {
688
+ title: this.$t1("启动时间"),
689
+ field: "createDate",
690
+ width: 150,
691
+ },
692
+ ...paramColumns,
693
+ {
694
+ width: 47,
695
+ fixed: "right",
696
+ title: "",
697
+ sortable: false,
698
+ slots: {
699
+ default: ({ row }) => {
700
+ return [
701
+ <a
702
+ href="javascript:void(0);"
703
+ class="a-link"
704
+ onclick={() => {
705
+ this.openWfDialog(row);
706
+ }}
707
+ >
708
+ <el-tooltip
709
+ enterable={false}
710
+ effect="dark"
711
+ content={this.$t1("查看")}
712
+ placement="top"
713
+ popper-class="tooltip-skin"
714
+ >
715
+ <i class="el-icon-view" />
716
+ </el-tooltip>
717
+ </a>,
718
+ ];
719
+ },
720
+ },
721
+ },
722
+ ],
723
+ };
724
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
725
+ this.wfOption = opts;
726
+ });
727
+ },
728
+ openWfDialog(row) {
729
+ this.wfContentOption = {
730
+ objId: row.objId,
731
+ url: row.url,
732
+ objTypeCode: row.objTypeCode,
733
+ };
734
+ this.showWfDialog = true;
735
+ },
736
+ commMenuCallBack(datas) {
737
+ this.commMenus = datas || [];
738
+ },
739
+ initCommMenu() {
740
+ this.$http({
741
+ url: USER_PREFIX + "/comm_menu/currentList",
742
+ data: { longOne: 0 },
743
+ method: "POST",
744
+ }).then((resultMsg) => {
745
+ this.commMenus = resultMsg.objx || [];
746
+ });
747
+ },
748
+ initNotifyMessage() {
749
+ return;
750
+ this.$http({
751
+ url: USER_PREFIX + "/notify_message/listPage",
752
+ data: { searchCount: false },
753
+ method: "post",
754
+ success: (res) => {
755
+ this.notifyMessages =
756
+ res.objx && res.objx.records ? res.objx.records : [];
757
+ },
758
+ });
759
+ },
760
+ openNotifyMessageDialog(row) {
761
+ if (row.jumpContent) {
762
+ this.$refs.notifyMessageDialog.open(row, () => {
763
+ row.readed = 1;
764
+ });
765
+ }
766
+ },
767
+ openMoreNotifyMessage(notifyType) {
768
+ let data = { notifyType: notifyType || "" };
769
+ let view = {
770
+ name: "notify_message:list",
771
+ query: data,
772
+ };
773
+ this.$store.dispatch("tagsView/delCachedView", view).then(() => {
774
+ this.$router.replace(view);
775
+ });
776
+
777
+ if (notifyType) {
778
+ this.showGroupDialog = false;
779
+ }
780
+ },
781
+ checkNotifyMessage(row, index) {
782
+ this.showNoticeDialog = true;
783
+ this.notifyMessageInfoIndex = index;
784
+ this.notifyMessageInfoId = row.id;
785
+ },
786
+ notifyMessageReadHanlde() {
787
+ this.notifyMessages[this.notifyMessageInfoIndex].readed = 1;
788
+ },
789
+ openNotifyTemplateGroupDialog() {
790
+ this.$http({
791
+ url: USER_PREFIX + `/notify_template/listPage`,
792
+ method: `post`,
793
+ data: { searchCount: false },
794
+ isLoading: true,
795
+ // loadingTarget: document.body,
796
+ success: (res) => {
797
+ this.notifyTemplates =
798
+ res.objx && res.objx.records ? res.objx.records : [];
799
+ this.showGroupDialog = true;
800
+ },
801
+ });
802
+ },
803
+ rourteTo(route) {
804
+ if (route.type === 4) {
805
+ this.jumpOutLink(route);
806
+ } else if (route.type === 3) {
807
+ let menuCode = route.menuCode;
808
+ let path = "/user/outLink/index/" + menuCode;
809
+ this.$openView({ path: path, query: { url: route.url } }, route);
810
+ } else {
811
+ let path = this.getPath(route);
812
+ if (!path) return;
813
+ this.$openView(path, route);
814
+ }
815
+ },
816
+ getPath(route3) {
817
+ let item = null;
818
+ let path = null;
819
+ if (route3.type === 0) {
820
+ //普通菜单
821
+ if (route3.url) {
822
+ path = route3.route || route3.url;
823
+ let str = "/report/vform/render/";
824
+ if (path.indexOf(str) === 0) {
825
+ } else {
826
+ let pIndex = path.indexOf("?");
827
+ if (pIndex > 0) {
828
+ path = path.substring(0, pIndex);
829
+ }
830
+ }
831
+ }
832
+ } else if (route3.type === 5) {
833
+ //动态表单
834
+ let url = route3.route || route3.url;
835
+ path = url;
836
+ }
837
+ if (path && path.startsWith("@")) {
838
+ path = null;
839
+ }
840
+ return path;
841
+ },
842
+ jumpOutLink(route) {
843
+ let path = route.url;
844
+ if (route.type === 4 && path) {
845
+ if (path.indexOf("token={token}") >= 0) {
846
+ path = path.replace("token={token}", "token=" + getToken());
847
+ }
848
+ window.open(path);
849
+ }
850
+ },
851
+ initWfParam() {
852
+ return this.$http({
853
+ url: USER_PREFIX + "/wf_param/list",
854
+ method: `post`,
855
+ data: {},
856
+ isLoading: true,
857
+ // loadingTarget: document.body,
858
+ modalStrictly: true,
859
+ success: (res) => {
860
+ this.wfParamDTOs = res.objx || [];
861
+ // this.initWfTableList();
862
+ },
863
+ });
864
+ },
865
+ getWfInfoList(isLoading) {
866
+ if (!this.activating) {
867
+ return;
868
+ }
869
+ this.$http({
870
+ url: USER_PREFIX + "/wf_info/listPage",
871
+ data: { type: 0, size: 20, searchCount: false },
872
+ method: "post",
873
+ isLoading: isLoading,
874
+ modal: isLoading || false,
875
+ // loadingTarget: document.body,
876
+ success: (res) => {
877
+ this.unDoWfRows =
878
+ res.objx && res.objx.records ? res.objx.records : [];
879
+ },
880
+ failMsg: false,
881
+ errorMsg: false,
882
+ fail: (res, response) => {
883
+ if (response && response.status === 200) {
884
+ this.$errorMsg(res);
885
+ }
886
+ },
887
+ });
888
+ },
889
+ getUnreadMessageNum(isLoading) {
890
+ if (!this.activating) {
891
+ return;
892
+ }
893
+ return this.$http({
894
+ url: USER_PREFIX + "/notify_message/countMessage",
895
+ method: `post`,
896
+ data: {},
897
+ isLoading: isLoading,
898
+ modal: isLoading || false,
899
+ // loadingTarget: document.body,
900
+ success: (res) => {
901
+ this.unreadMessageNum = res.objx || 0;
902
+ },
903
+ failMsg: false,
904
+ errorMsg: false,
905
+ fail: (res, response) => {
906
+ if (response && response.status === 200) {
907
+ this.$errorMsg(res);
908
+ }
909
+ },
910
+ });
911
+ },
912
+ wfhandleCallback(flag) {
913
+ if ([1, 2, 3].includes(flag)) {
914
+ this.showWfDialog = false;
915
+ this.wfClose();
916
+ }
917
+ },
918
+ toWfManageList() {
919
+ let url = this.wf_manage_url || "/basic/wf/wf_manage/list";
920
+ this.$router.push(url);
921
+ },
922
+ },
923
+ };
924
+ </script>
925
+ <style lang="scss" scoped>
926
+ @import "~@/styles/variables.scss";
927
+ ::v-deep .el-link {
928
+ color: rgba(0, 0, 0, 0.65);
929
+ .iconfont {
930
+ margin-right: 4px;
931
+ font-size: 14px;
932
+ }
933
+ &:hover {
934
+ color: $baseColor;
935
+ }
936
+ }
937
+ .workbenches {
938
+ padding: 18px 24px 0px;
939
+ }
940
+ .workbenches-head {
941
+ color: rgba(0, 0, 0, 0.65);
942
+ margin-bottom: 16px;
943
+ line-height: 1;
944
+ font-size: 14px;
945
+ .icon-haier {
946
+ color: $baseColor;
947
+ font-size: 24px;
948
+ margin-right: 16px;
949
+ }
950
+ .logo {
951
+ height: 30px;
952
+ vertical-align: middle;
953
+ }
954
+ > span {
955
+ margin-right: 16px;
956
+ &.f-blue {
957
+ font-size: 16px;
958
+ vertical-align: middle;
959
+ line-height: 1;
960
+ display: inline-block;
961
+ }
962
+ }
963
+ }
964
+ .workbenches-box {
965
+ height: calc(100vh - 94px); /**margin-bottom: 16px;*/
966
+ > .el-row {
967
+ height: 100%;
968
+ > .el-col {
969
+ height: 100%;
970
+ }
971
+ }
972
+ .w-box {
973
+ background: #fff;
974
+ border-radius: 4px;
975
+ overflow: hidden;
976
+ height: 100%;
977
+ .w-b-head {
978
+ overflow: hidden;
979
+ margin: 16px 24px;
980
+ .tit {
981
+ b {
982
+ font-size: 16px;
983
+ font-weight: 600;
984
+ vertical-align: middle;
985
+ }
986
+ .nums {
987
+ margin-left: 8px;
988
+ border-radius: 4px;
989
+ width: 20px;
990
+ height: 20px;
991
+ display: inline-block;
992
+ background-color: #ff4d4f;
993
+ color: #fff;
994
+ text-align: center;
995
+ line-height: 20px;
996
+ font-style: inherit;
997
+ font-size: 12px;
998
+ vertical-align: middle;
999
+ }
1000
+ }
1001
+ .el-link {
1002
+ margin-left: 24px;
1003
+ }
1004
+ }
1005
+ }
1006
+ .wnotice-box {
1007
+ padding: 0 24px 4px;
1008
+ overflow: auto;
1009
+ height: calc(100% - 52px);
1010
+ .item {
1011
+ border: solid 1px rgba(0, 0, 0, 0.15);
1012
+ border-radius: 4px;
1013
+ padding: 12px;
1014
+ display: flex;
1015
+ margin-bottom: 12px;
1016
+ line-height: 18px;
1017
+ cursor: pointer;
1018
+ font-size: 14px;
1019
+ .no-read {
1020
+ background-color: #faad14;
1021
+ border-radius: 4px;
1022
+ color: #fff;
1023
+ font-size: 12px;
1024
+ font-style: inherit;
1025
+ line-height: 18px;
1026
+ padding: 0 4px;
1027
+ margin-right: 8px;
1028
+ }
1029
+ .name {
1030
+ flex: 1;
1031
+ }
1032
+ .date {
1033
+ color: rgba(0, 0, 0, 0.45);
1034
+ font-size: 12px;
1035
+ }
1036
+ &:hover {
1037
+ border-color: $baseColor;
1038
+ .name {
1039
+ color: $baseColor;
1040
+ }
1041
+ }
1042
+ }
1043
+ }
1044
+ .agenda-box {
1045
+ padding: 0 24px 4px;
1046
+ overflow: auto;
1047
+ height: calc(100% - 52px);
1048
+ .item {
1049
+ border: solid 1px rgba(0, 0, 0, 0.15);
1050
+ border-radius: 4px;
1051
+ padding: 12px;
1052
+ margin-bottom: 12px;
1053
+ cursor: pointer;
1054
+ p {
1055
+ margin: 0;
1056
+ }
1057
+ .name {
1058
+ margin-bottom: 8px;
1059
+ font-size: 14px;
1060
+ }
1061
+ .info {
1062
+ font-size: 12px;
1063
+ > span {
1064
+ margin-right: 32px;
1065
+ color: rgba(0, 0, 0, 0.45);
1066
+ }
1067
+ }
1068
+ &:hover {
1069
+ border-color: $baseColor;
1070
+ .name {
1071
+ color: $baseColor;
1072
+ }
1073
+ }
1074
+ }
1075
+ }
1076
+ .use-cases {
1077
+ overflow: auto;
1078
+ padding: 0 24px 4px;
1079
+ height: calc(100% - 52px);
1080
+ .item {
1081
+ margin-bottom: 32px;
1082
+ .t {
1083
+ &:before {
1084
+ content: "";
1085
+ width: 4px;
1086
+ height: 15px;
1087
+ border-radius: 4px;
1088
+ background: $baseColor;
1089
+ margin-right: 8px;
1090
+ vertical-align: middle;
1091
+ display: inline-block;
1092
+ }
1093
+ span {
1094
+ vertical-align: middle;
1095
+ font-size: 14px;
1096
+ }
1097
+ }
1098
+ .c {
1099
+ padding: 2px 12px;
1100
+ .i-block {
1101
+ display: inline-block;
1102
+ width: 84px;
1103
+ margin-right: 52px;
1104
+ text-align: center;
1105
+ font-size: 12px;
1106
+ margin-top: 18px;
1107
+ cursor: pointer;
1108
+ vertical-align: top;
1109
+ .icon {
1110
+ width: 44px;
1111
+ height: 44px;
1112
+ border-radius: 8px;
1113
+ color: #fff;
1114
+ display: block;
1115
+ margin: 0 auto 8px;
1116
+ font-size: 20px;
1117
+ font-style: inherit;
1118
+ line-height: 44px;
1119
+ }
1120
+ &:hover {
1121
+ color: $baseColor;
1122
+ }
1123
+ .tips {
1124
+ zoom: 0.8;
1125
+ display: inline-block;
1126
+ line-height: 1.2;
1127
+ margin: 0 -42px 8px;
1128
+ }
1129
+ }
1130
+ }
1131
+ }
1132
+ }
1133
+ }
1134
+ .workbenches-info {
1135
+ padding: 0 24px;
1136
+ margin: 0 -24px;
1137
+ background: #fff;
1138
+ height: 50px;
1139
+ display: flex;
1140
+ font-size: 12px;
1141
+ color: rgba(0, 0, 0, 0.65);
1142
+ .w-left {
1143
+ padding: 10px 0;
1144
+ height: 100%;
1145
+ text-align: right;
1146
+ vertical-align: middle;
1147
+ flex: 1;
1148
+ zoom: 0.9;
1149
+ span {
1150
+ margin: 3px 0px;
1151
+ display: block;
1152
+ }
1153
+ }
1154
+ .w-right {
1155
+ line-height: 74px;
1156
+ }
1157
+ }
1158
+ </style>