imatrix-ui 2.8.39-dw → 2.8.39-pvtmp

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 (189) hide show
  1. package/lib/super-ui.css +1 -1
  2. package/lib/super-ui.umd.min.js +5 -35
  3. package/package.json +6 -4
  4. package/packages/breadcrumb/index.js +6 -0
  5. package/packages/breadcrumb/src/breadcrumb.vue +71 -0
  6. package/packages/department-tree/index.js +6 -0
  7. package/packages/department-tree/src/department-tree.vue +108 -0
  8. package/packages/department-tree-inline/index.js +6 -0
  9. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +411 -0
  10. package/packages/department-tree-inline/src/department-single-tree-inline.vue +293 -0
  11. package/packages/department-tree-inline/src/department-tree-inline.vue +86 -0
  12. package/packages/department-tree-inline/src/department-tree-service.js +275 -0
  13. package/packages/department-tree-inline/src/search-result.vue +176 -0
  14. package/packages/department-user-tree/index.js +6 -0
  15. package/packages/department-user-tree/src/department-user-multiple-tree.vue +116 -0
  16. package/packages/department-user-tree/src/department-user-single-tree.vue +76 -0
  17. package/packages/department-user-tree/src/department-user-tree.vue +101 -0
  18. package/packages/department-user-tree-inline/index.js +6 -0
  19. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +639 -0
  20. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +274 -0
  21. package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +79 -0
  22. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +248 -0
  23. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +142 -0
  24. package/packages/department-user-tree-inline/src/search-result.vue +197 -0
  25. package/packages/directives/prevent-reclick.js +19 -0
  26. package/packages/dynamic-source-select/index.js +6 -0
  27. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +75 -0
  28. package/packages/dynamic-source-select/src/dynamic-source-select.vue +586 -0
  29. package/packages/dynamic-source-select/src/events.js +55 -0
  30. package/packages/fs-preview/index.js +6 -0
  31. package/packages/fs-preview/src/fs-preview.vue +226 -0
  32. package/packages/fs-upload/index.js +6 -0
  33. package/packages/fs-upload/src/fs-upload-multi.vue +420 -0
  34. package/packages/fs-upload/src/fs-upload-single.vue +312 -0
  35. package/packages/fs-upload/src/fs-upload.vue +189 -0
  36. package/packages/fs-upload/src/see-big-picture.vue +55 -0
  37. package/packages/fs-upload-list/index.js +6 -0
  38. package/packages/fs-upload-list/src/fs-upload-list.vue +287 -0
  39. package/packages/hamburger/index.js +6 -0
  40. package/packages/hamburger/src/hamburger.vue +38 -0
  41. package/packages/index.js +121 -0
  42. package/packages/multipart-upload/index.js +6 -0
  43. package/packages/multipart-upload/src/index.vue +73 -0
  44. package/packages/multipart-upload/src/multipart-upload-form.vue +297 -0
  45. package/packages/multipart-upload/src/multipart-upload-list.vue +378 -0
  46. package/packages/organization-input/index.js +6 -0
  47. package/packages/organization-input/src/organization-input.vue +542 -0
  48. package/packages/plugins/export-data-new.js +468 -0
  49. package/packages/plugins/export-data.js +361 -0
  50. package/packages/plugins/index.js +15 -0
  51. package/packages/plugins/public-method.js +43 -0
  52. package/packages/remove-department/index.js +6 -0
  53. package/packages/remove-department/src/remove-department.vue +172 -0
  54. package/packages/remove-department/src/remove-dept-service.js +20 -0
  55. package/packages/remove-user/index.js +6 -0
  56. package/packages/remove-user/src/remove-user-service.js +20 -0
  57. package/packages/remove-user/src/remove-user.vue +195 -0
  58. package/packages/remove-workgroup/index.js +6 -0
  59. package/packages/remove-workgroup/src/remove-workgroup-service.js +20 -0
  60. package/packages/remove-workgroup/src/remove-workgroup.vue +159 -0
  61. package/packages/rich-editor/index.js +7 -0
  62. package/packages/rich-editor/index.vue +278 -0
  63. package/packages/rich-editor/langs/zh-Hans.js +1 -0
  64. package/packages/rich-editor/viewer.vue +103 -0
  65. package/packages/scan-code-input/index.js +6 -0
  66. package/packages/scan-code-input/src/events.js +33 -0
  67. package/packages/scan-code-input/src/scan-code-input-colse.vue +131 -0
  68. package/packages/scan-code-input/src/scan-code-input.vue +116 -0
  69. package/packages/secret-info/index.js +7 -0
  70. package/packages/secret-info/index.vue +90 -0
  71. package/packages/super-grid/index.js +7 -0
  72. package/packages/super-grid/src/apis.js +825 -0
  73. package/packages/super-grid/src/columns-config.vue +335 -0
  74. package/packages/super-grid/src/custom-formatter.js +280 -0
  75. package/packages/super-grid/src/dynamic-input.vue +1286 -0
  76. package/packages/super-grid/src/eventBus.js +2 -0
  77. package/packages/super-grid/src/events.js +55 -0
  78. package/packages/super-grid/src/formValidatorUtil.js +226 -0
  79. package/packages/super-grid/src/formatter.js +181 -0
  80. package/packages/super-grid/src/group-column.vue +100 -0
  81. package/packages/super-grid/src/header-context-menu.vue +87 -0
  82. package/packages/super-grid/src/index-column.vue +51 -0
  83. package/packages/super-grid/src/normal-column.vue +775 -0
  84. package/packages/super-grid/src/public-methods.js +31 -0
  85. package/packages/super-grid/src/row-operation.vue +161 -0
  86. package/packages/super-grid/src/search-button.vue +66 -0
  87. package/packages/super-grid/src/search-condition-input.vue +61 -0
  88. package/packages/super-grid/src/search-condition-list.vue +59 -0
  89. package/packages/super-grid/src/search-form-advancedQuery.vue +654 -0
  90. package/packages/super-grid/src/search-form-dialog.vue +79 -0
  91. package/packages/super-grid/src/search-form-item.vue +405 -0
  92. package/packages/super-grid/src/search-form-number.vue +38 -0
  93. package/packages/super-grid/src/search-form-open.vue +170 -0
  94. package/packages/super-grid/src/search-form-ordinarySearch.vue +196 -0
  95. package/packages/super-grid/src/search-form.vue +642 -0
  96. package/packages/super-grid/src/search-methods.js +448 -0
  97. package/packages/super-grid/src/selection-column.vue +43 -0
  98. package/packages/super-grid/src/store.js +3 -0
  99. package/packages/super-grid/src/super-grid-service.js +595 -0
  100. package/packages/super-grid/src/super-grid.vue +2936 -0
  101. package/packages/super-grid/src/utils.js +782 -0
  102. package/packages/super-grid/src/view-image-dialog.vue +130 -0
  103. package/packages/super-nine-grid/index.js +7 -0
  104. package/packages/super-nine-grid/src/apis.js +103 -0
  105. package/packages/super-nine-grid/src/custom-formatter.js +66 -0
  106. package/packages/super-nine-grid/src/formatter.js +131 -0
  107. package/packages/super-nine-grid/src/search-form-number.vue +38 -0
  108. package/packages/super-nine-grid/src/search-form.vue +430 -0
  109. package/packages/super-nine-grid/src/search-methods.js +134 -0
  110. package/packages/super-nine-grid/src/store.js +3 -0
  111. package/packages/super-nine-grid/src/super-grid-service.js +93 -0
  112. package/packages/super-nine-grid/src/super-nine-grid.vue +883 -0
  113. package/packages/super-nine-grid/src/utils.js +261 -0
  114. package/packages/svg-icon/index.js +6 -0
  115. package/packages/svg-icon/src/svg-icon.vue +43 -0
  116. package/packages/utils/memory-cache-utils.js +90 -0
  117. package/packages/utils/utils.js +152 -0
  118. package/packages/utils/value-set.js +86 -0
  119. package/packages/valid-code/index.js +7 -0
  120. package/packages/valid-code/src/valid-code.vue +95 -0
  121. package/packages/workflow-button/index.js +6 -0
  122. package/packages/workflow-button/src/workflow-button.vue +325 -0
  123. package/packages/workflow-history-list/index.js +6 -0
  124. package/packages/workflow-history-list/src/api.js +7 -0
  125. package/packages/workflow-history-list/src/workflow-history-list.vue +197 -0
  126. package/packages/workgroup-tree/index.js +6 -0
  127. package/packages/workgroup-tree/src/workgroup-tree.vue +77 -0
  128. package/packages/workgroup-tree-inline/index.js +6 -0
  129. package/packages/workgroup-tree-inline/src/search-result.vue +168 -0
  130. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +458 -0
  131. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +71 -0
  132. package/packages/workgroup-user-tree/index.js +6 -0
  133. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +100 -0
  134. package/packages/workgroup-user-tree-inline/index.js +6 -0
  135. package/packages/workgroup-user-tree-inline/src/search-result.vue +197 -0
  136. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +192 -0
  137. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +584 -0
  138. package/packages/year-range-picker/index.js +6 -0
  139. package/packages/year-range-picker/src/year-range-picker.vue +51 -0
  140. package/src/api/sso-service.js +9 -1
  141. package/src/api/tab.js +3 -3
  142. package/src/i18n/i18n.js +1 -1
  143. package/src/i18n/langs/cn.js +15 -5
  144. package/src/i18n/langs/en.js +15 -5
  145. package/src/index.js +93 -0
  146. package/src/permission.js +51 -17
  147. package/src/plugins.js +3 -3
  148. package/src/store/getters.js +2 -1
  149. package/src/store/modules/app.js +10 -1
  150. package/src/store/modules/user.js +11 -18
  151. package/src/styles/display-layout.scss +34 -0
  152. package/src/styles/index.scss +32 -4
  153. package/src/styles/theme/dark-blue/button.scss +9 -0
  154. package/src/styles/theme/dark-blue/card.scss +64 -0
  155. package/src/styles/theme/dark-blue/checkbox.scss +10 -0
  156. package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
  157. package/src/styles/theme/dark-blue/dialog.scss +21 -0
  158. package/src/styles/theme/dark-blue/element-variables.scss +7 -0
  159. package/src/styles/theme/dark-blue/font.scss +71 -0
  160. package/src/styles/theme/dark-blue/form.scss +51 -0
  161. package/src/styles/theme/dark-blue/index.scss +247 -0
  162. package/src/styles/theme/dark-blue/input.scss +15 -0
  163. package/src/styles/theme/dark-blue/pagination.scss +14 -0
  164. package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
  165. package/src/styles/theme/dark-blue/sidebar.scss +296 -0
  166. package/src/styles/theme/dark-blue/tab.scss +83 -0
  167. package/src/styles/theme/dark-blue/table.scss +60 -0
  168. package/src/styles/theme/dark-blue/tree.scss +31 -0
  169. package/src/styles/theme/dark-blue/var.scss +1028 -0
  170. package/src/styles/theme/gray/input-style.scss +8 -0
  171. package/src/styles/theme/gray/sidebar.scss +14 -2
  172. package/src/utils/auth-api.js +171 -0
  173. package/src/utils/auth.js +75 -41
  174. package/src/utils/calculator/calculator-factory.js +2 -2
  175. package/src/utils/calculator/calculator-util.js +7 -7
  176. package/src/utils/common-util.js +134 -1
  177. package/src/utils/jump-page-utils.js +36 -10
  178. package/src/utils/menu.js +19 -0
  179. package/src/utils/permission.js +4 -0
  180. package/src/utils/permissionAuth.js +46 -25
  181. package/src/utils/request.js +65 -8
  182. package/src/utils/util.js +77 -29
  183. package/src/views/dsc-component/Sidebar/Item.vue +5 -5
  184. package/src/views/dsc-component/Sidebar/Link.vue +11 -2
  185. package/src/views/dsc-component/Sidebar/SidebarItem.vue +37 -21
  186. package/src/views/dsc-component/Sidebar/index.vue +24 -12
  187. package/src/views/dsc-component/tabs/tab-content.vue +18 -2
  188. package/src/views/layout/components/Breadcrumb/index.vue +1 -1
  189. package/src/views/login/index.vue +1 -1
@@ -1,4 +1,4 @@
1
- import zhLocale from '@gcommon/gcommon-ui/lib/locale/lang/zh-CN'
1
+ import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
2
2
  const cn = {
3
3
  imatrixUIPublicModel: {
4
4
  sure: '确定',
@@ -40,7 +40,8 @@ const cn = {
40
40
  switchToAdvancedQuery: '切换为高级查询',
41
41
  isNull: '等于Null',
42
42
  isNotNull: '不等于Null',
43
- previewImage: '预览图片'
43
+ previewImage: '预览图片',
44
+ fullScreen: '全屏'
44
45
  },
45
46
  imatrixUIMessage: {
46
47
  whetherToConfirmDeletion: '是否确认删除',
@@ -71,8 +72,12 @@ const cn = {
71
72
  fileUpload: '文件上传',
72
73
  selectYear: '选择年',
73
74
  search: '查询',
74
- forbiddenException: '您没有权限访问该资源',
75
- theButtonIsNotBoundToAResource: '该按钮未绑定资源,请先绑定资源'
75
+ forbiddenException: '您没有权限访问',
76
+ theButtonIsNotBoundToAResource: '该按钮未绑定资源,请先绑定资源',
77
+ asyncExport: '正在异步导出,请等待消息通知!',
78
+ selectedWorkingGroup: '已选工作组',
79
+ forbiddenExceptionLinkUrl: '请点击进行权限申请',
80
+ forbiddenExceptionLinkUser: '如有疑问请联系'
76
81
  },
77
82
  // 列表组件
78
83
  superGrid: {
@@ -89,6 +94,7 @@ const cn = {
89
94
  isShow: '是否显示',
90
95
  isExportable: '是否导出',
91
96
  recordLine: '第 {row} 行记录',
97
+ pageRecordLine: '第 {pageNum} 页第 {row} 行记录',
92
98
  fileName: '文件名称',
93
99
  deleteSuccessful: '删除成功',
94
100
  index: '序号',
@@ -152,7 +158,10 @@ const cn = {
152
158
  allTeamMembers: '所有工作组人员',
153
159
  name: '工作组名称',
154
160
  code: '工作组编码',
155
- removeWorkgroup: '移除工作组'
161
+ removeWorkgroup: '移除工作组',
162
+ workingGroupName: '工作组名称',
163
+ workingGroupNumber: '工作组编号',
164
+ workgroupDescription: '工作组描述'
156
165
  },
157
166
  // 流程按钮组件。save、submit等属性名不能随便改,和后台的ButtonType枚举名保持一致
158
167
  workflowButton: {
@@ -208,6 +217,7 @@ const cn = {
208
217
  history_abandon_draw: '{1}放弃领取该任务,还原了候选人[{2}]的任务',
209
218
  toDoText: '待处理',
210
219
  operator: '操作人',
220
+ operatorLg: '操作人登录名',
211
221
  operatorDept: '操作人部门',
212
222
  operationTime: '操作时间'
213
223
 
@@ -1,4 +1,4 @@
1
- import enLocale from '@gcommon/gcommon-ui/lib/locale/lang/en'
1
+ import enLocale from 'element-ui/lib/locale/lang/en'
2
2
  const en = {
3
3
  imatrixUIPublicModel: {
4
4
  sure: 'Sure',
@@ -40,7 +40,8 @@ const en = {
40
40
  switchToAdvancedQuery: 'Switch To Advanced Query',
41
41
  isNull: 'Is Null',
42
42
  isNotNull: 'Is Not Null',
43
- previewImage: 'Preview image'
43
+ previewImage: 'Preview image',
44
+ fullScreen: 'Full Screen'
44
45
  },
45
46
  imatrixUIMessage: {
46
47
  whetherToConfirmDeletion: 'Whether To Confirm Deletion',
@@ -71,8 +72,12 @@ const en = {
71
72
  fileUpload: 'File Upload',
72
73
  selectYear: 'Select Year',
73
74
  search: 'Search',
74
- forbiddenException: 'You do not have permission to access this resource',
75
- theButtonIsNotBoundToAResource: 'The button is not bound to a resource, Bind the resource first'
75
+ forbiddenException: 'You do not have permission to access',
76
+ theButtonIsNotBoundToAResource: 'The button is not bound to a resource, Bind the resource first',
77
+ asyncExport: 'Asynchronous export, please wait for message notification!',
78
+ selectedWorkingGroup: 'Selected working group',
79
+ forbiddenExceptionLinkUrl: 'please click to apply',
80
+ forbiddenExceptionLinkUser: 'if you have any questions,please contact'
76
81
  },
77
82
  superGrid: {
78
83
  columnConfig: 'Column Config',
@@ -88,6 +93,7 @@ const en = {
88
93
  isShow: 'Is Show',
89
94
  isExportable: 'Is Exportable',
90
95
  recordLine: 'Record line {row}',
96
+ pageRecordLine: 'Record in row {row} of page {pageNum}',
91
97
  fileName: 'File Name',
92
98
  deleteSuccessful: 'Deleted successfully',
93
99
  index: 'No.',
@@ -149,7 +155,10 @@ const en = {
149
155
  allTeamMembers: 'All Team Members',
150
156
  name: 'Workgroup Name',
151
157
  code: 'Workgroup Code',
152
- removeWorkgroup: 'Remove Workgroup'
158
+ removeWorkgroup: 'Remove Workgroup',
159
+ workingGroupName: 'Working Group Name',
160
+ workingGroupNumber: 'Working Group Number',
161
+ workgroupDescription: 'Workgroup Description'
153
162
  },
154
163
  // 流程按钮组件。save、submit等属性名不能随便改,和后台的ButtonType枚举名保持一致
155
164
  workflowButton: {
@@ -205,6 +214,7 @@ const en = {
205
214
  history_abandon_draw: '{1}gives up the task and restores the task of candidate [{2}]',
206
215
  toDoText: 'Todo',
207
216
  operator: 'Operator',
217
+ operatorLg: 'Operator Login Name',
208
218
  operatorDept: 'Operator Dept',
209
219
  operationTime: 'Operation Time'
210
220
  },
package/src/index.js ADDED
@@ -0,0 +1,93 @@
1
+ // 依次导入组件库的各个组件
2
+ // import Breadcrumb from '../packages/breadcrumb'
3
+ // import DepartmentTree from '../packages/department-tree'
4
+ // import Hamburger from '../packages/hamburger'
5
+ // import SvgIcon from '../packages/svg-icon'
6
+ // import SuperGrid from '../packages/super-grid'
7
+ // import DepartmentUserTree from '../packages/department-user-tree'
8
+ // import WorkgroupTree from '../packages/workgroup-tree'
9
+ // import WorkgroupUserTree from '../packages/workgroup-user-tree'
10
+ // import InlineDepartmentTree from '../packages/department-tree-inline'
11
+ // import InlineDepartmentUserTree from '../packages/department-user-tree-inline'
12
+ // import InlineWorkgroupTree from '../packages/workgroup-tree-inline'
13
+ // import InlineWorkgroupUserTree from '../packages/workgroup-user-tree-inline'
14
+ // import WorkflowButton from '../packages/workflow-button'
15
+ // import WorkflowHistoryList from '../packages/workflow-history-list'
16
+ import PreventReclick from '../packages/directives/prevent-reclick'
17
+ // import exportPlugin from '../packages/export-data/index'
18
+ // import ValidCode from '../packages/valid-code'
19
+ import customPlugin from '../packages/plugins/index'
20
+ // import RemoveUser from '../packages/remove-user'
21
+ // import RemoveDepartment from '../packages/remove-department'
22
+ // import RemoveWorkgroup from '../packages/remove-workgroup'
23
+ // import OrganizationInput from '../packages/organization-input'
24
+ // import SuperNineGrid from '../packages/super-nine-grid'
25
+ // import DynamicSourceSelect from '../packages/dynamic-source-select'
26
+ // import FsUpload from '../packages/fs-upload'
27
+ // import ScanCodeInput from '../packages/scan-code-input'
28
+ // import FsPreview from '../packages/fs-preview'
29
+ // import FsUploadList from '../packages/fs-upload-list'
30
+ import { openPage } from './utils/jump-page-utils'
31
+ // import YearRangePicker from '../packages/year-range-picker'
32
+ // import MultipartUpload from '../packages/multipart-upload'
33
+ // import RichEditor from '../packages/rich-editor'
34
+ // import SecretInfo from '../packages/secret-info'
35
+ import plugins from '../packages/plugins/index'
36
+ import permission from './directives/permission'
37
+
38
+ // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
39
+ const install = function(Vue) {
40
+ Vue.directive('prevent-reclick', PreventReclick)
41
+ permission.install(Vue)
42
+ Vue.use(customPlugin)
43
+ Vue.use(plugins)
44
+ if (install.installed) return
45
+ // components.map(component => Vue.component(component.name, component))
46
+ // components.forEach(component => {
47
+ // Vue.component(component.name, component)
48
+ // })
49
+ // 将弹出页面方法注册到window对象上
50
+ window['$plateform_openPage'] = openPage
51
+ }
52
+
53
+ // 判断是否是直接引入vue的js文件,即全局引用可自动安装所有组件
54
+ if (typeof window !== 'undefined' && window.Vue) {
55
+ install(window.Vue)
56
+ }
57
+ // 按需引入
58
+ // export {
59
+ // Breadcrumb,
60
+ // DepartmentTree,
61
+ // Hamburger,
62
+ // SvgIcon,
63
+ // SuperGrid,
64
+ // DepartmentUserTree,
65
+ // WorkgroupTree,
66
+ // WorkgroupUserTree,
67
+ // InlineDepartmentTree,
68
+ // InlineDepartmentUserTree,
69
+ // InlineWorkgroupTree,
70
+ // InlineWorkgroupUserTree,
71
+ // WorkflowButton,
72
+ // WorkflowHistoryList,
73
+ // ValidCode,
74
+ // RemoveUser,
75
+ // RemoveDepartment,
76
+ // RemoveWorkgroup,
77
+ // OrganizationInput,
78
+ // SuperNineGrid,
79
+ // DynamicSourceSelect,
80
+ // FsUpload,
81
+ // ScanCodeInput,
82
+ // FsPreview,
83
+ // FsUploadList,
84
+ // YearRangePicker,
85
+ // MultipartUpload,
86
+ // RichEditor,
87
+ // SecretInfo
88
+ // }
89
+
90
+ export default {
91
+ // 导出的对象必须具有 install,才能被 Vue.use() 方法安装
92
+ install
93
+ }
package/src/permission.js CHANGED
@@ -4,14 +4,14 @@ import { getToken, setToken } from './utils/auth' // 验权
4
4
  import store from './store'
5
5
  import router, { errorRouterMap } from './router'
6
6
  NProgress.configure({ showSpinner: false })// NProgress Configuration
7
- import { Message } from '@gcommon/gcommon-ui'
7
+ import { Message } from 'element-ui'
8
8
  import Vue from 'vue'
9
9
 
10
10
  const whiteList = ['/login', '/update-password', '/forget-password', '/reset-password', '/redirect'] // 不重定向白名单
11
11
  router.beforeEach((to, from, next) => {
12
12
  NProgress.start()
13
- console.log('router.beforeEach-to=', to)
14
- console.log('router.beforeEach-from=', from)
13
+ // console.log('router.beforeEach-to=', to)
14
+ // console.log('router.beforeEach-from=', from)
15
15
  // console.log('router.beforeEach-to.path=', to.path)
16
16
  let token = getToken()
17
17
  // console.log('router.beforeEach-to.query.JWT=', to.query.JWT)
@@ -29,16 +29,31 @@ router.beforeEach((to, from, next) => {
29
29
  setToken(token)
30
30
  }
31
31
  }
32
+ if (to.query && to.query._systemName_) {
33
+ // 表示需要设置浏览器页签名
34
+ document.title = to.query._systemName_
35
+ }
36
+ // 表示需要显示菜单。为了控制是否需要走获得有权限的菜单集合的接口。单点登录跳转到表单页面时不需要请求菜单,提高页面显示速度。
37
+ let isNeedMenu
38
+ if (to.query && to.query._isNeedMenu_) {
39
+ isNeedMenu = to.query._isNeedMenu_
40
+ }
41
+ if (isNeedMenu !== undefined && isNeedMenu !== null && isNeedMenu === 'false') {
42
+ isNeedMenu = false
43
+ } else {
44
+ isNeedMenu = true
45
+ }
46
+ // console.log('iMatrix-router.beforeEach2-isNeedMenu==', isNeedMenu)
32
47
  // console.log('router.beforeEach-getToken()=', token)
33
- if (['/update-password', '/forget-password', '/reset-password', '/redirect'].indexOf(to.path) === -1 && token) {
48
+ if ((['/update-password', '/forget-password', '/reset-password', '/redirect'].indexOf(to.path) === -1 || store.getters.whiteList.indexOf(to.path) !== -1) && token) {
34
49
  if (to.path === '/login') {
35
50
  next({ path: '/', query: to.query })
36
51
  NProgress.done() // if current page is dashboard will not trigger afterEach hook, so manually handle it
37
52
  } else {
38
- console.log('router.beforeEach-to.path!=login')
53
+ // console.log('router.beforeEach-to.path!=login')
39
54
  if (store.getters.name === '') {
40
55
  // 表示刷新了页面(例如点击了一级菜单)后,会重新走该方法
41
- console.log('router.beforeEach-store.getters.name === ""')
56
+ // console.log('router.beforeEach-store.getters.name === ""')
42
57
  store.dispatch('isLoginTimeOut').then((result) => {
43
58
  if (result === true) {
44
59
  store.dispatch('clearToken').then(() => {
@@ -47,22 +62,29 @@ router.beforeEach((to, from, next) => {
47
62
  })
48
63
  } else {
49
64
  store.dispatch('getCurrentUser').then(user => {
50
- console.log('router.beforeEach-getCurrentUser')
65
+ // console.log('router.beforeEach-getCurrentUser')
51
66
  return store.dispatch('getCurrentUserPermissions', user.loginName)
52
67
  }).then(permissions => {
53
- console.log('router.beforeEach-getCurrentUserPermissions-result==')
68
+ // console.log('router.beforeEach-getCurrentUserPermissions-result==')
54
69
  return store.dispatch('generateRoutes', permissions)
55
70
  }).then(() => {
56
- console.log('iMatrix-router.beforeEach2-getPermissionMenus')
57
- return store.dispatch('getPermissionMenus', Vue.prototype.currentSystem)
71
+ if (isNeedMenu) {
72
+ // 需要显示左侧菜单
73
+ // console.log('iMatrix-router.beforeEach2-getPermissionMenus')
74
+ return store.dispatch('getPermissionMenus', Vue.prototype.currentSystem)
75
+ } else {
76
+ return new Promise((resolve, reject) => {
77
+ resolve()
78
+ })
79
+ }
58
80
  }).then(() => {
59
81
  // 根据roles权限生成可访问的路由表
60
- console.log('router.beforeEach-generateRoutes==to=', to, ',from=', from)
82
+ // console.log('router.beforeEach-generateRoutes==to=', to, ',from=', from)
61
83
  router.addRoutes(store.getters.protectedRouters) // 动态添加可访问路由表
62
84
  // 404等错误路由一定要放到受权限保护的路由之后
63
85
  router.addRoutes(errorRouterMap)
64
- sessionStorage.setItem(new Date().getTime() + '-name=null-from~~toPath', from.path + '~~' + to.path)
65
- console.log('router.beforeEach-generateRoutes==to.path=', to.path)
86
+ // sessionStorage.setItem(new Date().getTime() + '-name=null-from~~toPath', from.path + '~~' + to.path)
87
+ // console.log('router.beforeEach-generateRoutes==to.path=', to.path)
66
88
  next({ ...to, replace: true })
67
89
  }).catch((err) => {
68
90
  store.dispatch('clearToken').then(() => {
@@ -78,13 +100,25 @@ router.beforeEach((to, from, next) => {
78
100
  })
79
101
  })
80
102
  } else {
81
- sessionStorage.setItem(new Date().getTime() + '-name!==null-from~~toPath', from.path + '~~' + to.path)
82
- console.log('router.beforeEach-store.getters.name ==', store.getters.name)
83
- next()
103
+ // sessionStorage.setItem(new Date().getTime() + '-name!==null-from~~toPath', from.path + '~~' + to.path)
104
+ // console.log('router.beforeEach-store.getters.name ==', store.getters.name)
105
+ if (isNeedMenu) {
106
+ // 需要显示左侧菜单
107
+ let systemCode = Vue.prototype.currentSystem
108
+ if (!systemCode && to.query && to.query.customSystem) {
109
+ systemCode = to.query.customSystem
110
+ }
111
+ // console.log('iMatrix-router.beforeEach33-getPermissionMenus,Vue.prototype.currentSystem=', Vue.prototype.currentSystem, 'systemCode=', systemCode)
112
+ return store.dispatch('getPermissionMenus', systemCode).then(() => {
113
+ next()
114
+ })
115
+ } else {
116
+ next()
117
+ }
84
118
  }
85
119
  }
86
120
  } else {
87
- if (whiteList.indexOf(to.path) !== -1) {
121
+ if (whiteList.indexOf(to.path) !== -1 || store.getters.whiteList.indexOf(to.path) !== -1) {
88
122
  next()
89
123
  } else {
90
124
  // 必须使用to.fullPath,fullPath是带有参数的,to.path没有参数,会导致跳转到的页面参数丢失
package/src/plugins.js CHANGED
@@ -3,9 +3,9 @@ import Vue from 'vue'
3
3
  import 'normalize.css/normalize.css' // A modern alternative to CSS resets
4
4
  import './styles/index.scss' // global css
5
5
 
6
- import ElementUI from '@gcommon/gcommon-ui'
7
- import '@gcommon/gcommon-ui/lib/theme-chalk/index.css'
8
- import locale from '@gcommon/gcommon-ui/lib/locale/lang/zh-CN' // lang i18n
6
+ import ElementUI from 'element-ui'
7
+ import 'element-ui/lib/theme-chalk/index.css'
8
+ import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
9
9
 
10
10
  import SuperUI from 'imatrix-ui'
11
11
  import 'imatrix-ui/lib/super-ui.css'
@@ -9,6 +9,7 @@ const getters = {
9
9
  preventReclick: state => state.app.preventReclick,
10
10
  menus: state => state.user.menus,
11
11
  openTab: state => state.tabContent.openTab,
12
- activeIndex: state => state.tabContent.activeIndex
12
+ activeIndex: state => state.tabContent.activeIndex,
13
+ whiteList: state => state.app.whiteList
13
14
  }
14
15
  export default getters
@@ -6,7 +6,8 @@ const app = {
6
6
  withoutAnimation: false
7
7
  },
8
8
  device: 'desktop',
9
- preventReclick: false
9
+ preventReclick: false,
10
+ whiteList: []
10
11
  },
11
12
  mutations: {
12
13
  toggleSidebar: state => {
@@ -28,6 +29,11 @@ const app = {
28
29
  },
29
30
  togglePreventReclick: (state, preventReclick) => {
30
31
  state.preventReclick = preventReclick
32
+ },
33
+ setWhiteList: (state, whiteList) => {
34
+ if (whiteList instanceof Array) {
35
+ state.whiteList = whiteList
36
+ }
31
37
  }
32
38
  },
33
39
  actions: {
@@ -39,6 +45,9 @@ const app = {
39
45
  },
40
46
  toggelDevice({ commit }, device) {
41
47
  commit('toggleDevice', device)
48
+ },
49
+ addWhiteList({ commit }, whiteList) {
50
+ commit('setWhiteList', whiteList)
42
51
  }
43
52
  }
44
53
  }
@@ -1,7 +1,8 @@
1
1
  import ssoService from '../../api/sso-service'
2
- import { setToken, removeToken, setUsername, getUsername, removeUsername, setCurrentUser, removeCurrentUser } from '../../utils/auth'
2
+ import { setToken, setUsername, getUsername, removeUsername, setCurrentUser, removeCurrentUser, setLanguage, clearPermission } from '../../utils/auth'
3
3
 
4
- import { removePermissions, getPermissions, setPermissions, getMenus, setMenus, removeMenus } from '../../utils/permissionAuth'
4
+ import { getPermissions, setPermissions, getMenus, setMenus, removeAllSystemPermissions } from '../../utils/permissionAuth'
5
+ import { isPlateSys } from '../../utils/common-util'
5
6
 
6
7
  const user = {
7
8
  state: {
@@ -25,11 +26,14 @@ const user = {
25
26
  actions: {
26
27
  // 登录
27
28
  login({ commit }, userInfo) {
29
+ // 登录时先清除缓存的登录信息和权限信息
30
+ clearPermission()
28
31
  const username = userInfo.username.trim()
29
32
  return new Promise((resolve, reject) => {
30
33
  ssoService.login(username, userInfo.password, userInfo.language).then(data => {
31
34
  // const data = response.data
32
35
  setToken(data.jwt)
36
+ setLanguage(data.language)
33
37
  commit('setToken', data.jwt)
34
38
  return ssoService.getCurrentUserPermissionsBySystem(data.subject)
35
39
  }).then(permissions => {
@@ -46,6 +50,8 @@ const user = {
46
50
  loginWithCookieToken({ commit }, loginName) {
47
51
  return new Promise((resolve, reject) => {
48
52
  if (loginName) {
53
+ // 登录时清除缓存的资源
54
+ removeAllSystemPermissions()
49
55
  // setToken(tokenInfo.jwt)
50
56
  // commit('setToken', tokenInfo.jwt)
51
57
  ssoService.getCurrentUserPermissionsBySystem(loginName).then(permissions => {
@@ -92,15 +98,9 @@ const user = {
92
98
  return new Promise((resolve, reject) => {
93
99
  ssoService.logout(state.token).then((data) => {
94
100
  commit('setToken', '')
95
- removeToken()
96
101
 
97
102
  commit('setName', '')
98
- removeUsername()
99
- removeCurrentUser()
100
-
101
- removePermissions()
102
-
103
- removeMenus()
103
+ clearPermission()
104
104
 
105
105
  resolve(data)
106
106
  }).catch(error => {
@@ -113,16 +113,9 @@ const user = {
113
113
  clearToken({ commit }) {
114
114
  return new Promise(resolve => {
115
115
  commit('setToken', '')
116
- removeToken()
117
116
 
118
117
  commit('setName', '')
119
- removeUsername()
120
- removeCurrentUser()
121
-
122
- removePermissions()
123
-
124
- removeMenus()
125
-
118
+ clearPermission()
126
119
  resolve()
127
120
  })
128
121
  },
@@ -182,7 +175,7 @@ const user = {
182
175
  getPermissionMenus({ commit }, systemCode) {
183
176
  return new Promise((resolve, reject) => {
184
177
  const storePermissionMenus = getMenus(systemCode)
185
- if (typeof (storePermissionMenus) === 'undefined' || storePermissionMenus === '' || storePermissionMenus === null) {
178
+ if (isPlateSys(systemCode) || (typeof (storePermissionMenus) === 'undefined' || storePermissionMenus === '' || storePermissionMenus === null)) {
186
179
  ssoService.getUserPermissionMenusBySystemCode(systemCode).then(menus => {
187
180
  // commit('setMenus', menus)
188
181
  setMenus(menus, systemCode)
@@ -0,0 +1,34 @@
1
+ .flex-container {
2
+ display: flex;
3
+ width: 100%;
4
+
5
+ .tree-area {
6
+ flex: 0 0 200px;
7
+ overflow: auto;
8
+ }
9
+
10
+ .list-area {
11
+ flex: 1;
12
+ overflow: auto;
13
+ margin-left: 20px;
14
+ }
15
+ }
16
+
17
+ .three-column-layout {
18
+ height: calc(100vh - 20px);
19
+
20
+ .el-aside {
21
+ margin-right: 20px;
22
+ padding-top: 20px;
23
+ background-color: #FFFFFF;
24
+ box-shadow: 0px 1px 8px 0px #00000019;
25
+
26
+ }
27
+
28
+ .el-main {
29
+ padding: 20px 0 0 20px;
30
+ border-radius: 6px;
31
+ background: #FFFFFF;
32
+ box-shadow: 0px 1px 8px 0px #00000019;
33
+ }
34
+ }
@@ -9,6 +9,9 @@
9
9
  @import './theme/blue2/sidebar.scss';
10
10
  @import './theme/gray/index.scss';
11
11
  @import './theme/gray/sidebar.scss';
12
+ @import './theme/dark-blue/index.scss';
13
+ @import './theme/dark-blue/sidebar.scss';
14
+ @import './display-layout.scss';
12
15
 
13
16
  body {
14
17
  overflow: hidden;
@@ -32,19 +35,33 @@ body .el-table th.gutter {
32
35
  body .el-table colgroup.gutter {
33
36
  display: table-cell !important;
34
37
  }
38
+
35
39
  // 日期控件宽度不自适应问题
36
- .formContent .el-date-editor.el-input,.formContent .el-date-editor.el-input__input,.formContent .el-date-editor.el-input__inner,
37
- .grid-search-form .el-date-editor.el-input,.grid-search-form .el-date-editor.el-input__input,.grid-search-form .el-date-editor.el-input__inner {
40
+ .formContent .el-date-editor.el-input,
41
+ .formContent .el-date-editor.el-input__input,
42
+ .formContent .el-date-editor.el-input__inner,
43
+ .grid-search-form .el-date-editor.el-input,
44
+ .grid-search-form .el-date-editor.el-input__input,
45
+ .grid-search-form .el-date-editor.el-input__inner {
38
46
  width: 100%;
39
47
  }
40
- .formContent .el-date-editor--daterange.el-input,.formContent .el-date-editor--daterange.el-input__inner,.formContent .el-date-editor--timerange.el-input,.formContent .el-date-editor--timerange.el-input__inner,
41
- .grid-search-form .el-date-editor--daterange.el-input,.grid-search-form .el-date-editor--daterange.el-input__inner,.grid-search-form .el-date-editor--timerange.el-input,.grid-search-form .el-date-editor--timerange.el-input__inner {
48
+
49
+ .formContent .el-date-editor--daterange.el-input,
50
+ .formContent .el-date-editor--daterange.el-input__inner,
51
+ .formContent .el-date-editor--timerange.el-input,
52
+ .formContent .el-date-editor--timerange.el-input__inner,
53
+ .grid-search-form .el-date-editor--daterange.el-input,
54
+ .grid-search-form .el-date-editor--daterange.el-input__inner,
55
+ .grid-search-form .el-date-editor--timerange.el-input,
56
+ .grid-search-form .el-date-editor--timerange.el-input__inner {
42
57
  width: 100%;
43
58
  }
59
+
44
60
  // 日期选择按钮太小问题(gcommon ui)
45
61
  .el-picker-panel__footer .el-button--mini {
46
62
  font-size: 16px;
47
63
  }
64
+
48
65
  // 显示必填标志
49
66
  .is_req {
50
67
  .required__label::before {
@@ -56,4 +73,15 @@ body .el-table colgroup.gutter {
56
73
 
57
74
  .formContent .el-form-item {
58
75
  margin-bottom: 0;
76
+ }
77
+
78
+ .operation-area-float {
79
+ float: right;
80
+ position: fixed;
81
+ bottom: 5px;
82
+ right: 4%;
83
+ }
84
+
85
+ .el-button+.el-button {
86
+ margin-left: 10px;
59
87
  }
@@ -0,0 +1,9 @@
1
+ @import "./dark-blue-var.scss";
2
+
3
+ .dark-blue {
4
+ .operation-area .el-button--primary {
5
+ border-radius: 4px;
6
+ background: $--button-opt-background-color;
7
+ border-color: $--button-opt-background-color;
8
+ }
9
+ }
@@ -0,0 +1,64 @@
1
+ .dark-blue {
2
+ $titleColor: rgba(0, 0, 0, 0.85);
3
+
4
+ el-card box-card is-always-shadow .card-radius {
5
+ border-radius: 12px
6
+ }
7
+
8
+ .form-card-header {
9
+ width: 3px;
10
+ height: 14px;
11
+ left: 0;
12
+ align-items: center;
13
+ text-align: center;
14
+ }
15
+
16
+ .form-card-header-bgc {
17
+ width: 3px;
18
+ height: 14px;
19
+ display: flex;
20
+ background-color: #3D4CF2
21
+ }
22
+
23
+ .form-card-text {
24
+ padding-left: 8px;
25
+ font-size: 16px;
26
+ line-height: 24px;
27
+ font-weight: 500;
28
+ color: $titleColor;
29
+ display: table-cell;
30
+ position: relative;
31
+ }
32
+
33
+ .superForm {
34
+ .el-card {
35
+ border-radius: 12px;
36
+ box-shadow: 0 1px 4px 0 rgba(0, 13, 31, 0.10);
37
+ }
38
+
39
+
40
+ }
41
+
42
+
43
+ .platform-card {
44
+ .el-card__header {
45
+ height: 40px;
46
+ background: #F0F8FE;
47
+ color: #005EBA;
48
+ font-family: Source Han Sans CN;
49
+ font-weight: medium;
50
+ font-size: 14px;
51
+ text-align: left;
52
+ padding: 9px 0px 9px 20px;
53
+ }
54
+
55
+ .el-card__header>div {
56
+ line-height: 22px;
57
+ }
58
+
59
+ .card-style {
60
+ margin-top: 20px;
61
+ }
62
+ }
63
+
64
+ }
@@ -0,0 +1,10 @@
1
+ @import "./dark-blue-var.scss";
2
+
3
+ .dark-blue {
4
+
5
+ .el-checkbox__input.is-checked .el-checkbox__inner,
6
+ .el-checkbox__input.is-indeterminate .el-checkbox__inner {
7
+ background-color: $--color-primary;
8
+ border-color: $--color-primary;
9
+ }
10
+ }
@@ -0,0 +1,8 @@
1
+ /* 改变主题色变量 */
2
+ $--color-primary: #005EBA;
3
+ $--button-default-border-color: $--color-primary;
4
+ $--button-default-font-color: $--color-primary;
5
+ $--button-font-weight: regular;
6
+ $--button-default-font-color: $--color-primary;
7
+ $--button-opt-background-color:#0780ED;
8
+ $th-cell-background: #F0F8FE;