imatrix-ui 2.8.21-dw → 2.8.21

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 (181) hide show
  1. package/lib/super-ui.css +1 -1
  2. package/lib/super-ui.umd.min.js +5 -35
  3. package/package.json +4 -2
  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 +402 -0
  10. package/packages/department-tree-inline/src/department-single-tree-inline.vue +284 -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 +245 -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 +626 -0
  20. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +269 -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 +230 -0
  23. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +122 -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 +70 -0
  28. package/packages/dynamic-source-select/src/dynamic-source-select.vue +440 -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 +453 -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 +763 -0
  73. package/packages/super-grid/src/columns-config.vue +335 -0
  74. package/packages/super-grid/src/custom-formatter.js +250 -0
  75. package/packages/super-grid/src/dynamic-input.vue +1279 -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 +769 -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 +653 -0
  90. package/packages/super-grid/src/search-form-dialog.vue +79 -0
  91. package/packages/super-grid/src/search-form-item.vue +386 -0
  92. package/packages/super-grid/src/search-form-number.vue +38 -0
  93. package/packages/super-grid/src/search-form-open.vue +162 -0
  94. package/packages/super-grid/src/search-form-ordinarySearch.vue +188 -0
  95. package/packages/super-grid/src/search-form.vue +634 -0
  96. package/packages/super-grid/src/search-methods.js +387 -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 +561 -0
  100. package/packages/super-grid/src/super-grid.vue +2793 -0
  101. package/packages/super-grid/src/utils.js +763 -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 +132 -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 +91 -0
  112. package/packages/super-nine-grid/src/super-nine-grid.vue +872 -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/utils.js +152 -0
  117. package/packages/utils/value-set.js +86 -0
  118. package/packages/valid-code/index.js +7 -0
  119. package/packages/valid-code/src/valid-code.vue +95 -0
  120. package/packages/workflow-button/index.js +6 -0
  121. package/packages/workflow-button/src/workflow-button.vue +325 -0
  122. package/packages/workflow-history-list/index.js +6 -0
  123. package/packages/workflow-history-list/src/api.js +7 -0
  124. package/packages/workflow-history-list/src/workflow-history-list.vue +185 -0
  125. package/packages/workgroup-tree/index.js +6 -0
  126. package/packages/workgroup-tree/src/workgroup-tree.vue +76 -0
  127. package/packages/workgroup-tree-inline/index.js +6 -0
  128. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +317 -0
  129. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +43 -0
  130. package/packages/workgroup-user-tree/index.js +6 -0
  131. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +100 -0
  132. package/packages/workgroup-user-tree-inline/index.js +6 -0
  133. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +163 -0
  134. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +436 -0
  135. package/packages/year-range-picker/index.js +6 -0
  136. package/packages/year-range-picker/src/year-range-picker.vue +51 -0
  137. package/src/i18n/i18n.js +1 -1
  138. package/src/i18n/langs/cn.js +4 -2
  139. package/src/i18n/langs/en.js +4 -2
  140. package/src/index.js +93 -0
  141. package/src/permission.js +7 -3
  142. package/src/plugins.js +3 -3
  143. package/src/router/index.js +24 -0
  144. package/src/store/getters.js +2 -1
  145. package/src/store/modules/app.js +10 -1
  146. package/src/styles/display-layout.scss +34 -0
  147. package/src/styles/index.scss +32 -4
  148. package/src/styles/theme/dark-blue/button.scss +9 -0
  149. package/src/styles/theme/dark-blue/card.scss +64 -0
  150. package/src/styles/theme/dark-blue/checkbox.scss +10 -0
  151. package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
  152. package/src/styles/theme/dark-blue/dialog.scss +21 -0
  153. package/src/styles/theme/dark-blue/element-variables.scss +7 -0
  154. package/src/styles/theme/dark-blue/font.scss +71 -0
  155. package/src/styles/theme/dark-blue/form.scss +51 -0
  156. package/src/styles/theme/dark-blue/index.scss +247 -0
  157. package/src/styles/theme/dark-blue/input.scss +15 -0
  158. package/src/styles/theme/dark-blue/pagination.scss +14 -0
  159. package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
  160. package/src/styles/theme/dark-blue/sidebar.scss +296 -0
  161. package/src/styles/theme/dark-blue/tab.scss +83 -0
  162. package/src/styles/theme/dark-blue/table.scss +60 -0
  163. package/src/styles/theme/dark-blue/tree.scss +31 -0
  164. package/src/styles/theme/dark-blue/var.scss +1028 -0
  165. package/src/styles/theme/gray/form-style.scss +2 -2
  166. package/src/styles/theme/gray/input-style.scss +8 -0
  167. package/src/utils/auth-api.js +115 -0
  168. package/src/utils/auth.js +34 -42
  169. package/src/utils/calculator/calculator-factory.js +2 -2
  170. package/src/utils/common-util.js +34 -0
  171. package/src/utils/jump-page-utils.js +29 -5
  172. package/src/utils/menu.js +19 -0
  173. package/src/utils/permission.js +4 -0
  174. package/src/utils/request.js +18 -2
  175. package/src/utils/util.js +7 -3
  176. package/src/views/dsc-component/Sidebar/Item.vue +4 -4
  177. package/src/views/dsc-component/Sidebar/Link.vue +11 -2
  178. package/src/views/dsc-component/Sidebar/SidebarItem.vue +36 -20
  179. package/src/views/dsc-component/Sidebar/index.vue +24 -12
  180. package/src/views/dsc-component/tabs/tab-content.vue +16 -1
  181. package/src/views/login/index.vue +1 -1
@@ -0,0 +1,197 @@
1
+ <template>
2
+ <div style="height: 100%">
3
+ <el-table
4
+ ref="superGrid"
5
+ :data="gridData"
6
+ row-key="id"
7
+ :row-class-name="tableRowClassName"
8
+ :max-height="myHeight"
9
+ border
10
+ fit
11
+ @row-click="rowClick"
12
+ @row-dblclick="rowDblclick"
13
+ >
14
+ <el-table-column v-if="multiple === false" width="60" fixed>
15
+ <template slot-scope="scope">
16
+ <el-radio v-model="singleUserIndex" :label="scope.$index" @change="selectUser">
17
+ {{ scope.$index+1 }}
18
+ </el-radio>
19
+ </template>
20
+ </el-table-column>
21
+ <el-table-column v-if="multiple && isSearchResult" fixed :label="$t('imatrixUIPublicModel.edit')" align="center" width="60px">
22
+ <template slot-scope="scope">
23
+ <div>
24
+ <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="isDisable(scope.row)" circle @click="addUser(scope.$index, scope.row)" />
25
+ </div>
26
+ </template>
27
+ </el-table-column>
28
+ <el-table-column v-if="multiple && !isSearchResult" fixed :label="$t('imatrixUIPublicModel.edit')" align="center" width="60px">
29
+ <template slot-scope="scope">
30
+ <div>
31
+ <el-button type="danger" size="mini" icon="el-icon-delete" circle @click="removeUser(scope.$index, scope.row)" />
32
+ </div>
33
+ </template>
34
+ </el-table-column>
35
+ <el-table-column v-if="multiple" :label="$t('superGrid.index')" align="center" width="60px">
36
+ <template slot-scope="scope">
37
+ {{ scope.$index+1 }}
38
+ </template>
39
+ </el-table-column>
40
+ <el-table-column
41
+ :label="$t('departmentUserTreeInline.name')"
42
+ :width="130"
43
+ prop="name"
44
+ >
45
+ <template slot-scope="scope">
46
+ <span v-if="scope.row.enName && scope.row.enName.trim() !== ''" class="ellipsis cell--span" :title="scope.row.name+'('+scope.row.enName+')'">{{ scope.row.name+'('+scope.row.enName+')' }}</span>
47
+ <span v-else class="ellipsis cell--span" :title="scope.row.name">{{ scope.row.name }}</span>
48
+ </template>
49
+ </el-table-column>
50
+ <el-table-column
51
+ :label="$t('departmentUserTreeInline.loginName')"
52
+ :width="110"
53
+ prop="loginName"
54
+ >
55
+ <template slot-scope="scope">
56
+ <span class="ellipsis cell--span" :title="scope.row.loginName">{{ scope.row.loginName }}</span>
57
+ </template>
58
+ </el-table-column>
59
+ <el-table-column
60
+ :label="$t('departmentUserTreeInline.department')"
61
+ :min-width="160"
62
+ prop="mainDepartmentName"
63
+ >
64
+ <template slot-scope="scope">
65
+ <span class="ellipsis cell--span" :title="language && language !== 'cn' && scope.row.mainDepartmentEnName ? scope.row.mainDepartmentEnName : scope.row.mainDepartmentName">{{ language && language !== 'cn' && scope.row.mainDepartmentEnName ? scope.row.mainDepartmentEnName : scope.row.mainDepartmentName }}</span>
66
+ </template>
67
+ </el-table-column>
68
+ <!--由于保密要求,邮箱不能显示,需要脱敏处理,暂时注释掉,不显示-->
69
+ <!-- <el-table-column
70
+ :label="$t('departmentUserTreeInline.email')"
71
+ :width="130"
72
+ prop="email"
73
+ >
74
+ <template slot-scope="scope">
75
+ <span class="ellipsis cell--span" :title="scope.row.email">{{ scope.row.email }}</span>
76
+ </template>
77
+ </el-table-column> -->
78
+ <el-table-column
79
+ v-if="containBranch"
80
+ :label="$t('departmentUserTreeInline.branch')"
81
+ :width="130"
82
+ prop="subCompanyName"
83
+ >
84
+ <template slot-scope="scope">
85
+ <span class="ellipsis cell--span" :title="scope.row.subCompanyName">{{ scope.row.subCompanyName }}</span>
86
+ </template>
87
+ </el-table-column>
88
+ </el-table>
89
+ </div>
90
+ </template>
91
+ <style>
92
+ .searchResult {
93
+ color:red
94
+ }
95
+ .inline-select-custom {
96
+ width : 100px
97
+ }
98
+ .inline-input-custom {
99
+ width : 98%
100
+ }
101
+ </style>
102
+ <script>
103
+ export default {
104
+ name: 'UserResult',
105
+ props: {
106
+ gridData: {
107
+ type: Array,
108
+ default: null
109
+ },
110
+ containBranch: {
111
+ type: Boolean,
112
+ default: false
113
+ },
114
+ multiple: {
115
+ type: Boolean,
116
+ default: false
117
+ },
118
+ // 多选树时是否是查询结果列表,用于控制“操作”列按钮的显示
119
+ isSearchResult: {
120
+ type: Boolean,
121
+ default: true
122
+ },
123
+ height: {
124
+ type: String,
125
+ default: '300px'
126
+ },
127
+ selectResult: {
128
+ type: Array,
129
+ default: function() {
130
+ return []
131
+ }
132
+ }
133
+
134
+ },
135
+ data() {
136
+ let tableHeight = this.height
137
+ tableHeight = tableHeight.substring(0, tableHeight.indexOf('px'))
138
+ const myHeight = (parseInt(tableHeight) + 30) + 'px'
139
+ return {
140
+ singleUserIndex: null, // 选中的用户序号
141
+ selectedUser: null,
142
+ myHeight,
143
+ language: !window.$locale ? 'cn' : window.$locale
144
+ }
145
+ },
146
+ created() {
147
+ },
148
+ methods: {
149
+ // 单选树时,点击行事件
150
+ // rowClick(row, column, event) {
151
+ // this.selectedUser = row
152
+ // // this.$emit('rowClick', row, column, event)
153
+ // },
154
+ // 移除用户
155
+ removeUser(index, row) {
156
+ this.$emit('removeUser', index, row)
157
+ },
158
+ // 添加用户
159
+ addUser(index, row) {
160
+ this.$emit('addUser', index, row)
161
+ },
162
+ selectUser(selectVal) {
163
+ // console.log('selectUser', selectVal)
164
+ this.$emit('selectResult', this.gridData[selectVal])
165
+ },
166
+ rowClick(row, column, event) {
167
+ this.singleUserIndex = row.row_index
168
+ this.$emit('selectResult', row)
169
+ },
170
+ tableRowClassName({ row, rowIndex }) {
171
+ row.row_index = rowIndex
172
+ },
173
+ rowDblclick(row, column, event) {
174
+ if (this.multiple) {
175
+ this.$emit('addUser', null, row)
176
+ } else {
177
+ this.$emit('resultRowDblclick', row)
178
+ }
179
+ },
180
+ isDisable(row) {
181
+ if (this.selectResult) {
182
+ const containUsers = this.selectResult.filter(this.filterDept(row))
183
+ if (containUsers && containUsers.length > 0) {
184
+ return true
185
+ }
186
+ }
187
+ return false
188
+ },
189
+ // 判断用户是否存在的过滤器
190
+ filterDept(queryDept) {
191
+ return (dept) => {
192
+ return (dept.id === queryDept.id)
193
+ }
194
+ }
195
+ }
196
+ }
197
+ </script>
@@ -0,0 +1,19 @@
1
+ function enableButton(el) {
2
+ el.disabled = false
3
+ el.classList.remove('is-disabled')
4
+ }
5
+ export default {
6
+ // 插入dom 时做的事情
7
+ inserted: function(el, bind) {
8
+ el.addEventListener('click', () => {
9
+ el.disabled = true
10
+ el.classList.add('is-disabled')
11
+ bind.value().then(res => {
12
+ enableButton(el)
13
+ }).catch(error => {
14
+ enableButton(el)
15
+ console.log('Error', error.message)
16
+ })
17
+ })
18
+ }
19
+ }
@@ -0,0 +1,6 @@
1
+ import DynamicSourceSelect from './src/dynamic-source-select.vue'
2
+ DynamicSourceSelect.install = function(Vue) {
3
+ Vue.component(DynamicSourceSelect.name, DynamicSourceSelect)
4
+ }
5
+
6
+ export default DynamicSourceSelect
@@ -0,0 +1,70 @@
1
+ import Vue from 'vue'
2
+ const dynamicSourceSelectService = {
3
+ findDynamicDataSourceByCode(dynamicSourceCode, entity, searchParam, additionalParameterStr, backendUrl) {
4
+ let searchText
5
+ let watchAttrValue
6
+ let parentEntity
7
+ let listCode
8
+ let formCode
9
+ let tableName
10
+ if (searchParam) {
11
+ searchText = searchParam.searchText
12
+ if (searchText === undefined || searchText === null) {
13
+ searchText = ''
14
+ }
15
+ watchAttrValue = searchParam.watchAttrValue
16
+ if (watchAttrValue === undefined || watchAttrValue === null) {
17
+ watchAttrValue = ''
18
+ }
19
+ parentEntity = searchParam.parent
20
+ listCode = searchParam._listCode
21
+ formCode = searchParam._formCode
22
+ tableName = searchParam._tableName
23
+ }
24
+ const params = {
25
+ searchText,
26
+ watchAttrValue,
27
+ parent: parentEntity
28
+
29
+ }
30
+ if (additionalParameterStr && additionalParameterStr !== '') {
31
+ params.additionalParamMap = JSON.parse(additionalParameterStr)
32
+ }
33
+ if (params.additionalParamMap === undefined) {
34
+ params.additionalParamMap = {}
35
+ }
36
+ if (listCode) {
37
+ params.additionalParamMap._listCode = listCode
38
+ }
39
+ if (formCode) {
40
+ params.additionalParamMap._formCode = formCode
41
+ }
42
+ if (tableName) {
43
+ params.additionalParamMap._tableName = tableName
44
+ }
45
+ if (entity && entity !== null) {
46
+ params.entity = entity
47
+ }
48
+ if (!backendUrl) {
49
+ backendUrl = Vue.prototype.baseURL
50
+ }
51
+
52
+ return new Promise((resolve, reject) => {
53
+ this.$http.post(backendUrl + '/common/dynamic-data-source/' + dynamicSourceCode, params).then(result => {
54
+ if (result.backendUrl) {
55
+ // result.backendUrl表示需要使用动态数据源所属的系统路径重新获得一次数据
56
+ this.$http.post(result.backendUrl + '/common/dynamic-data-source/' + dynamicSourceCode, params).then(finallyResult => {
57
+ resolve(finallyResult)
58
+ }).catch(error => {
59
+ reject(error)
60
+ })
61
+ } else {
62
+ resolve(result)
63
+ }
64
+ }).catch(error => {
65
+ reject(error)
66
+ })
67
+ })
68
+ }
69
+ }
70
+ export default dynamicSourceSelectService