imatrix-ui 2.8.97-dw-tmp37 → 2.8.97-dw-tmp39

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 (179) hide show
  1. package/lib/super-ui.common.1.js +368 -0
  2. package/lib/super-ui.css +1 -0
  3. package/lib/super-ui.umd.1.js +368 -0
  4. package/lib/super-ui.umd.min.1.js +2 -0
  5. package/lib/super-ui.umd.min.js +67 -0
  6. package/package.json +1 -1
  7. package/src/views/dsc-component/Sidebar/index.vue +2 -2
  8. package/gulpfile.js +0 -20
  9. package/lib/breadcrumb.js +0 -1
  10. package/lib/department-tree-inline.js +0 -1
  11. package/lib/department-tree.js +0 -1
  12. package/lib/department-user-tree-inline.js +0 -1
  13. package/lib/department-user-tree.js +0 -1
  14. package/lib/dynamic-source-select.js +0 -1
  15. package/lib/fs-preview.js +0 -1
  16. package/lib/fs-upload-list.js +0 -1
  17. package/lib/fs-upload.js +0 -1
  18. package/lib/hamburger.js +0 -1
  19. package/lib/index.js +0 -58
  20. package/lib/index.js.gz +0 -0
  21. package/lib/multipart-upload.js +0 -1
  22. package/lib/organization-input.js +0 -1
  23. package/lib/plugins.js +0 -58
  24. package/lib/plugins.js.gz +0 -0
  25. package/lib/remove-department.js +0 -1
  26. package/lib/remove-user.js +0 -1
  27. package/lib/remove-workgroup.js +0 -1
  28. package/lib/rich-editor.js +0 -1
  29. package/lib/scan-code-input.js +0 -1
  30. package/lib/secret-info.js +0 -1
  31. package/lib/super-grid.js +0 -1
  32. package/lib/super-nine-grid.js +0 -1
  33. package/lib/svg-icon.js +0 -1
  34. package/lib/valid-code.js +0 -1
  35. package/lib/workflow-button.js +0 -1
  36. package/lib/workflow-history-list.js +0 -1
  37. package/lib/workgroup-tree-inline.js +0 -1
  38. package/lib/workgroup-tree.js +0 -1
  39. package/lib/workgroup-user-tree-inline.js +0 -1
  40. package/lib/workgroup-user-tree.js +0 -1
  41. package/lib/year-range-picker.js +0 -1
  42. package/packages/breadcrumb/index.js +0 -6
  43. package/packages/breadcrumb/src/breadcrumb.vue +0 -71
  44. package/packages/department-tree/index.js +0 -6
  45. package/packages/department-tree/src/department-tree.vue +0 -108
  46. package/packages/department-tree-inline/index.js +0 -6
  47. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +0 -402
  48. package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -284
  49. package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
  50. package/packages/department-tree-inline/src/department-tree-service.js +0 -245
  51. package/packages/department-tree-inline/src/search-result.vue +0 -176
  52. package/packages/department-user-tree/index.js +0 -6
  53. package/packages/department-user-tree/src/department-user-multiple-tree.vue +0 -116
  54. package/packages/department-user-tree/src/department-user-single-tree.vue +0 -76
  55. package/packages/department-user-tree/src/department-user-tree.vue +0 -101
  56. package/packages/department-user-tree-inline/index.js +0 -6
  57. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +0 -626
  58. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -269
  59. package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +0 -79
  60. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -230
  61. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -122
  62. package/packages/department-user-tree-inline/src/search-result.vue +0 -197
  63. package/packages/directives/prevent-reclick.js +0 -19
  64. package/packages/dynamic-source-select/index.js +0 -6
  65. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +0 -70
  66. package/packages/dynamic-source-select/src/dynamic-source-select.vue +0 -440
  67. package/packages/dynamic-source-select/src/events.js +0 -55
  68. package/packages/fs-preview/index.js +0 -6
  69. package/packages/fs-preview/src/fs-preview.vue +0 -226
  70. package/packages/fs-upload/index.js +0 -6
  71. package/packages/fs-upload/src/fs-upload-multi.vue +0 -420
  72. package/packages/fs-upload/src/fs-upload-single.vue +0 -312
  73. package/packages/fs-upload/src/fs-upload.vue +0 -189
  74. package/packages/fs-upload/src/see-big-picture.vue +0 -55
  75. package/packages/fs-upload-list/index.js +0 -6
  76. package/packages/fs-upload-list/src/fs-upload-list.vue +0 -287
  77. package/packages/hamburger/index.js +0 -6
  78. package/packages/hamburger/src/hamburger.vue +0 -38
  79. package/packages/index.js +0 -90
  80. package/packages/multipart-upload/index.js +0 -6
  81. package/packages/multipart-upload/src/index.vue +0 -73
  82. package/packages/multipart-upload/src/multipart-upload-form.vue +0 -297
  83. package/packages/multipart-upload/src/multipart-upload-list.vue +0 -378
  84. package/packages/organization-input/index.js +0 -6
  85. package/packages/organization-input/src/organization-input.vue +0 -542
  86. package/packages/plugins/export-data-new.js +0 -453
  87. package/packages/plugins/export-data.js +0 -361
  88. package/packages/plugins/index.js +0 -15
  89. package/packages/plugins/public-method.js +0 -43
  90. package/packages/remove-department/index.js +0 -6
  91. package/packages/remove-department/src/remove-department.vue +0 -172
  92. package/packages/remove-department/src/remove-dept-service.js +0 -20
  93. package/packages/remove-user/index.js +0 -6
  94. package/packages/remove-user/src/remove-user-service.js +0 -20
  95. package/packages/remove-user/src/remove-user.vue +0 -195
  96. package/packages/remove-workgroup/index.js +0 -6
  97. package/packages/remove-workgroup/src/remove-workgroup-service.js +0 -20
  98. package/packages/remove-workgroup/src/remove-workgroup.vue +0 -159
  99. package/packages/rich-editor/index.js +0 -7
  100. package/packages/rich-editor/index.vue +0 -278
  101. package/packages/rich-editor/langs/zh-Hans.js +0 -1
  102. package/packages/rich-editor/viewer.vue +0 -103
  103. package/packages/scan-code-input/index.js +0 -6
  104. package/packages/scan-code-input/src/events.js +0 -33
  105. package/packages/scan-code-input/src/scan-code-input-colse.vue +0 -131
  106. package/packages/scan-code-input/src/scan-code-input.vue +0 -116
  107. package/packages/secret-info/index.js +0 -7
  108. package/packages/secret-info/index.vue +0 -90
  109. package/packages/super-grid/index.js +0 -7
  110. package/packages/super-grid/src/apis.js +0 -763
  111. package/packages/super-grid/src/columns-config.vue +0 -335
  112. package/packages/super-grid/src/custom-formatter.js +0 -250
  113. package/packages/super-grid/src/dynamic-input.vue +0 -1279
  114. package/packages/super-grid/src/eventBus.js +0 -2
  115. package/packages/super-grid/src/events.js +0 -55
  116. package/packages/super-grid/src/formValidatorUtil.js +0 -226
  117. package/packages/super-grid/src/formatter.js +0 -181
  118. package/packages/super-grid/src/group-column.vue +0 -100
  119. package/packages/super-grid/src/header-context-menu.vue +0 -87
  120. package/packages/super-grid/src/index-column.vue +0 -51
  121. package/packages/super-grid/src/normal-column copy.vue +0 -769
  122. package/packages/super-grid/src/normal-column.vue +0 -769
  123. package/packages/super-grid/src/public-methods.js +0 -31
  124. package/packages/super-grid/src/row-operation.vue +0 -161
  125. package/packages/super-grid/src/search-button.vue +0 -66
  126. package/packages/super-grid/src/search-condition-input.vue +0 -61
  127. package/packages/super-grid/src/search-condition-list.vue +0 -59
  128. package/packages/super-grid/src/search-form-advancedQuery.vue +0 -653
  129. package/packages/super-grid/src/search-form-dialog.vue +0 -79
  130. package/packages/super-grid/src/search-form-item.vue +0 -386
  131. package/packages/super-grid/src/search-form-number.vue +0 -38
  132. package/packages/super-grid/src/search-form-open.vue +0 -162
  133. package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -188
  134. package/packages/super-grid/src/search-form.vue +0 -634
  135. package/packages/super-grid/src/search-methods.js +0 -387
  136. package/packages/super-grid/src/selection-column.vue +0 -43
  137. package/packages/super-grid/src/store.js +0 -3
  138. package/packages/super-grid/src/super-grid-service-static.js +0 -1313
  139. package/packages/super-grid/src/super-grid-service.js +0 -561
  140. package/packages/super-grid/src/super-grid-static.vue +0 -3229
  141. package/packages/super-grid/src/super-grid.vue +0 -2793
  142. package/packages/super-grid/src/utils.js +0 -763
  143. package/packages/super-grid/src/view-image-dialog.vue +0 -130
  144. package/packages/super-nine-grid/index.js +0 -7
  145. package/packages/super-nine-grid/src/apis.js +0 -103
  146. package/packages/super-nine-grid/src/custom-formatter.js +0 -66
  147. package/packages/super-nine-grid/src/formatter.js +0 -132
  148. package/packages/super-nine-grid/src/search-form-number.vue +0 -38
  149. package/packages/super-nine-grid/src/search-form.vue +0 -430
  150. package/packages/super-nine-grid/src/search-methods.js +0 -134
  151. package/packages/super-nine-grid/src/store.js +0 -3
  152. package/packages/super-nine-grid/src/super-grid-service.js +0 -91
  153. package/packages/super-nine-grid/src/super-nine-grid.vue +0 -872
  154. package/packages/super-nine-grid/src/utils.js +0 -261
  155. package/packages/svg-icon/index.js +0 -6
  156. package/packages/svg-icon/src/svg-icon.vue +0 -43
  157. package/packages/utils/utils.js +0 -152
  158. package/packages/utils/value-set.js +0 -86
  159. package/packages/valid-code/index.js +0 -7
  160. package/packages/valid-code/src/valid-code.vue +0 -95
  161. package/packages/workflow-button/index.js +0 -6
  162. package/packages/workflow-button/src/workflow-button.vue +0 -325
  163. package/packages/workflow-history-list/index.js +0 -6
  164. package/packages/workflow-history-list/src/api.js +0 -7
  165. package/packages/workflow-history-list/src/workflow-history-list.vue +0 -185
  166. package/packages/workgroup-tree/index.js +0 -6
  167. package/packages/workgroup-tree/src/workgroup-tree.vue +0 -76
  168. package/packages/workgroup-tree-inline/index.js +0 -6
  169. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +0 -317
  170. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +0 -43
  171. package/packages/workgroup-user-tree/index.js +0 -6
  172. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +0 -100
  173. package/packages/workgroup-user-tree-inline/index.js +0 -6
  174. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -163
  175. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +0 -436
  176. package/packages/year-range-picker/index.js +0 -6
  177. package/packages/year-range-picker/src/year-range-picker.vue +0 -51
  178. package/webpack.commonjs.js +0 -60
  179. package/webpack.components.js +0 -75
@@ -1,86 +0,0 @@
1
- <template>
2
- <div>
3
- <inline-department-multi-tree
4
- v-if="multiple"
5
- ref="inlineDeparmentTree"
6
- :height="height"
7
- :check-strictly="checkStrictly"
8
- :department-info="departmentInfo"
9
- :select-department-info="selectDepartmentInfo"
10
- :search-field="searchField"
11
- :separator="separator"
12
- @result="result"
13
- />
14
- <inline-department-single-tree
15
- v-if="!multiple"
16
- ref="inlineDeparmentTree"
17
- :department-info="departmentInfo"
18
- @result="result"
19
- />
20
- </div>
21
- </template>
22
-
23
- <script>
24
- import InlineDepartmentMultiTree from './department-multi-tree-inline.vue'
25
- import InlineDepartmentSingleTree from './department-single-tree-inline.vue'
26
- export default {
27
- name: 'InlineDepartmentTree',
28
- components: {
29
- InlineDepartmentMultiTree,
30
- InlineDepartmentSingleTree
31
- },
32
- props: {
33
- // 是否是多选树,默认是true
34
- multiple: {
35
- type: Boolean,
36
- default: true
37
- },
38
- checkStrictly: {
39
- type: Boolean,
40
- default: false
41
- },
42
- // 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
43
- departmentInfo: {
44
- type: Array,
45
- default: null
46
- },
47
- // 弹框的高度
48
- height: {
49
- type: String,
50
- default: '300px'
51
- },
52
- // 多选部门树时,已选择部门id或部门名称或编码集合,多个之间以逗号隔开
53
- selectDepartmentInfo: {
54
- type: [String, Number],
55
- default: null
56
- },
57
- // 移除部门时,部门属性名称:id、name、code,默认是id
58
- searchField: {
59
- type: String,
60
- default: 'id'
61
- },
62
- // 多选树时结果之间的分隔符,默认是逗号分隔
63
- separator: {
64
- type: String,
65
- default: ','
66
- }
67
- },
68
- data() {
69
- return {
70
- selectNodeInfo: null // 单选时,选择的用户信息
71
- }
72
- },
73
- mounted() {
74
- },
75
- methods: {
76
- result(selectNodeInfo) {
77
- this.selectNodeInfo = selectNodeInfo
78
- this.$emit('result', selectNodeInfo)
79
- },
80
- selectDepartment() {
81
- this.$refs.inlineDeparmentTree.selectDepartment()
82
- }
83
-
84
- }
85
- }
86
- </script>
@@ -1,245 +0,0 @@
1
- import Vue from 'vue'
2
- import { getI18n } from '../../../src/utils/util'
3
- const departmentTreeService = {
4
- // 后台查询部门,并拼接树节点
5
- filterAppendNodes(value) {
6
- this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/search-pc-depts', this.searchParam).then(result => {
7
- if (result) {
8
- if (result.length === 0) {
9
- this.searchResult = []
10
- this.$message({
11
- showClose: true,
12
- type: 'error',
13
- message: getI18n().t('imatrixUIMessage.queryResultIsEmpty')
14
- })
15
- return
16
- }
17
- this.searchResult = result
18
- // result的格式为[DEPARTMENT~1,DEPARTMENT~1/DEPARTMENT~4,DEPARTMENT~10]
19
- // result.forEach(nodeIds => {
20
- // // nodeId的分隔符
21
- // var nodeIdSeparator = '/'
22
- // const nodeIdArr = nodeIds.split(nodeIdSeparator)
23
- // if (nodeIdArr.length > 0) {
24
- // this.loadDepartmentWhenSearch(0, nodeIdArr)
25
- // }
26
- // })
27
- } else {
28
- this.$message({
29
- showClose: true,
30
- type: 'error',
31
- message: getI18n().t('imatrixUIMessage.queryResultIsEmpty')
32
- })
33
- }
34
- })
35
- },
36
- search(value) {
37
- this.searchValue = value
38
- let mySearchValue = value
39
- if (mySearchValue) {
40
- mySearchValue = mySearchValue.trim()
41
- }
42
- this.searchParam.searchValue = mySearchValue
43
- this.searchParam.departmentInfo = this.departmentInfo
44
- // 后台查询部门,并拼接树节点
45
- this.filterAppendNodes(value)
46
- },
47
- handleSelect(item) {
48
- this.handleSelectUtil(item, localStorage)
49
- },
50
- querySearch(queryString, cb) {
51
- this.search(this.filterText)
52
- cb([])
53
- },
54
- // 点击查询按钮调用的方法
55
- clickSearch() {
56
- this.storeSeachValue()
57
- this.search(this.filterText)
58
- },
59
- loadDepartmentWhenSearch(n, nodeIdArr) {
60
- return new Promise((resolve, reject) => {
61
- if (nodeIdArr.length === n) {
62
- resolve()
63
- } else {
64
- const nodeId = nodeIdArr[n]
65
- let dataId = nodeId
66
- // 节点类型和数据id的分隔符
67
- const nodeTypeAndDataIdSeparator = '~'
68
- // nodeId格式为DEPARTMENT~4
69
- if (nodeId.indexOf(nodeTypeAndDataIdSeparator) > -1) {
70
- dataId = nodeId.substring(nodeId.indexOf('~') + 1)
71
- }
72
- this.loadDepartment(dataId).then(() => {
73
- this.loadDepartmentWhenSearch(++n, nodeIdArr)
74
- }).catch((error) => {
75
- reject(error)
76
- })
77
- }
78
- })
79
- },
80
- // 点击复选框时处理
81
- handleCheckNode(data, checkObj) {
82
- if (checkObj.checkedKeys.indexOf(data.id) > -1) {
83
- // 表示正选中data节点
84
- this.isloading = true
85
- if (data.nodeType && data.nodeType === 'DEPARTMENT' && data.data) {
86
- // 表示当前选中的节点是部门
87
- const department = JSON.parse(data.data)
88
- this.selectUser(null, department)
89
- }
90
- if (data.childDepartments) {
91
- // 如果已展开,不需要再走后台获得其子节点。只需要选中已有子节点
92
- // 展开当前选中的节点
93
- this.$refs.deparmentTree.store.nodesMap[data.id].expanded = true
94
- // 选中当前节点及其子节点
95
- this.checkedNodeAndChildren(data)
96
- this.isloading = false
97
- } else {
98
- // 当前节点未展开。需要走后台获得当前节点的子节点,然后展开当前节点,然后选中这些子节点
99
- if (!data.leaf) {
100
- // 不是叶子节点,并且没有加载过该父节点的子节点时,需要走后台展开子节点
101
- this.$http.get(Vue.prototype.baseAPI + '/component/organization-trees/departments/' + data.id).then(result => {
102
- // 更新当前点击的节点的子节点
103
- this.$refs.deparmentTree.updateKeyChildren(data.id, result)
104
- // 展开当前选中的节点
105
- this.$refs.deparmentTree.store.nodesMap[data.id].expanded = true
106
- // 获得所有应该选中的节点
107
- this.checkedNodeAndChildren(data)
108
- })
109
- this.$http.get(Vue.prototype.baseAPI + '/component/organization-trees/child-departments/' + data.id).then(childDepts => {
110
- if (childDepts && !this.checkStrictly) {
111
- childDepts.forEach(item => {
112
- this.selectUser(null, item)
113
- })
114
- this.isloading = false
115
- }
116
- })
117
- }
118
- }
119
- } else {
120
- // 表示正取消选中data节点,同时要取消其子节点的选中状态
121
- this.cancelChildCheckedNodes(data)
122
- }
123
- },
124
- // 初始化树 或 点击三角展开节点时动态加载子节点
125
- loadNode(node, resolve) {
126
- var parentId = 0
127
- if (node.level === 0) {
128
- // 表示初始化树
129
- parentId = 0
130
- } else {
131
- parentId = node.data.id
132
- }
133
- var checkedKeys = []
134
- if (this.$refs.deparmentTree) {
135
- checkedKeys = this.$refs.deparmentTree.getCheckedKeys()
136
- }
137
- // 初始化部门树
138
- this.initLoadDepartment(parentId, node, resolve, checkedKeys)
139
- },
140
- // 初始化部门树
141
- initLoadDepartment(parentId, node, resolve, checkedKeys) {
142
- this.$http.get(Vue.prototype.baseAPI + '/component/organization-trees/departments/' + parentId).then(data => {
143
- resolve(data)
144
- // 更新当前点击的节点的子节点
145
- this.$refs.deparmentTree.updateKeyChildren(parentId, data)
146
- if (parentId === 0) {
147
- // 初始化树时,展开公司节点
148
- const tenantData = data[0].data
149
- data[0].disable = true
150
- this.tenantInfo = JSON.parse(tenantData)
151
- this.containBranch = data[0].containBranch
152
- if (this.departmentInfo && this.departmentInfo.length > 0) {
153
- // 加载指定部门时,展开公司节点
154
- this.loadPointDepartments()
155
- } else {
156
- // 加载整个组织结构树时,展开公司节点
157
- this.loadDepartment(this.tenantNodeId)
158
- }
159
- }
160
-
161
- if (this.isClickNode) {
162
- // 点击当前节点时,加载树节点时
163
- // 注意不是点击复选框时
164
- this.isClickNode = false
165
- this.checkedNodeAndChildren(node.data)
166
- } else {
167
- // 表示是点击三角展开节点时
168
- if (checkedKeys && checkedKeys.indexOf(parentId) > -1) {
169
- // 点击部门名称前的三角标识展开节点时,保持当前节点的选中状态
170
- // 表示当前展开的节点是选中状态,则应保持其选中状态,并选中其子节点
171
- this.checkedNodeAndChildren(node.data)
172
- }
173
- }
174
- })
175
- },
176
- // 加载当前节点的子节点
177
- loadDepartment(parentId, isSearch, searchValue) {
178
- return new Promise((resolve, reject) => {
179
- this.$http.get(Vue.prototype.baseAPI + '/component/organization-trees/departments/' + parentId).then(children => {
180
- this.$refs.deparmentTree.updateKeyChildren(parentId, children)
181
- if (this.$refs.deparmentTree.store.nodesMap[parentId]) {
182
- this.$refs.deparmentTree.store.nodesMap[parentId].expanded = true
183
- }
184
- resolve()
185
- }).catch((error) => {
186
- console.log('error', error)
187
- })
188
- })
189
- },
190
- // 加载指定部门节点
191
- loadPointDepartments() {
192
- this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/point-departments', this.departmentInfo).then(children => {
193
- this.$refs.deparmentTree.updateKeyChildren(this.tenantNodeId, children)
194
- if (this.$refs.deparmentTree.store.nodesMap[this.tenantNodeId]) {
195
- this.$refs.deparmentTree.store.nodesMap[this.tenantNodeId].expanded = true
196
- }
197
- })
198
- },
199
- getSelectDepts(searchField, selectDeptInfo, separator) {
200
- return new Promise((resolve, reject) => {
201
- if (!searchField) {
202
- resolve([])
203
- } else if (!selectDeptInfo) {
204
- resolve([])
205
- } else {
206
- this.$http.get(Vue.prototype.baseAPI + '/component/organization-trees/select-departments?searchField=' + searchField + '&selectDeptInfo=' + selectDeptInfo + '&separator=' + separator).then(departments => {
207
- resolve(departments)
208
- }).catch(error => {
209
- reject(error)
210
- })
211
- }
212
- })
213
- },
214
- // 选中了组织结构树的根节点
215
- packageAllDept() {
216
- // 表示集合中不存在该用户,则封装该用户
217
- var allDept = {
218
- id: this.tenantNodeId,
219
- name: '所有部门'
220
- }
221
- return allDept
222
- },
223
- initSelectDepts() {
224
- return new Promise((resolve, reject) => {
225
- const selectDepts = []
226
- if (this.selectDepartmentInfo) {
227
- if (this.selectDepartmentInfo === this.tenantNodeId || this.selectDepartmentInfo === '所有部门') {
228
- // 表示已选择所有用户
229
- selectDepts.push(this.packageAllDept())
230
- resolve(selectDepts)
231
- } else {
232
- // 表示不是选择的所有用户
233
- this.getSelectDepts(this.searchField, this.selectDepartmentInfo, this.separator).then(departments => {
234
- resolve(departments)
235
- }).catch(error => {
236
- reject(error)
237
- })
238
- }
239
- } else {
240
- resolve(selectDepts)
241
- }
242
- })
243
- }
244
- }
245
- export default departmentTreeService
@@ -1,176 +0,0 @@
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">
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" :label="$t('superGrid.index')" align="center" width="60px">
29
- <template slot-scope="scope">
30
- {{ scope.$index+1 }}
31
- </template>
32
- </el-table-column>
33
- <el-table-column v-if="multiple && !isSearchResult" fixed :label="$t('imatrixUIPublicModel.edit')" align="center" width="60px">
34
- <template slot-scope="scope">
35
- <div>
36
- <el-button type="danger" size="mini" icon="el-icon-delete" circle @click="removeUser(scope.$index, scope.row)" />
37
- </div>
38
- </template>
39
- </el-table-column>
40
- <el-table-column
41
- :label="$t('departmentTreeInline.name')"
42
- :width="170"
43
- prop="name"
44
- >
45
- <template slot-scope="scope">
46
- <span class="ellipsis cell--span" :title="scope.row.showName">{{ scope.row.showName }}</span>
47
- </template>
48
- </el-table-column>
49
- <el-table-column
50
- :label="$t('departmentTreeInline.code')"
51
- :width="140"
52
- prop="code"
53
- >
54
- <template slot-scope="scope">
55
- <span class="ellipsis cell--span" :title="scope.row.code">{{ scope.row.code }}</span>
56
- </template>
57
- </el-table-column>
58
- <el-table-column
59
- :label="$t('departmentTreeInline.namePath')"
60
- :width="140"
61
- prop="namePath"
62
- >
63
- <template slot-scope="scope">
64
- <span class="ellipsis cell--span" :title="scope.row.namePath">{{ scope.row.namePath }}</span>
65
- </template>
66
- </el-table-column>
67
- </el-table>
68
- </div>
69
- </template>
70
- <style>
71
- .searchResult {
72
- color:red
73
- }
74
- .inline-select-custom {
75
- width : 100px
76
- }
77
- .inline-input-custom {
78
- width : 98%
79
- }
80
- </style>
81
- <script>
82
- export default {
83
- name: 'UserResult',
84
- props: {
85
- gridData: {
86
- type: Array,
87
- default: null
88
- },
89
- containBranch: {
90
- type: Boolean,
91
- default: false
92
- },
93
- multiple: {
94
- type: Boolean,
95
- default: false
96
- },
97
- // 多选树时是否是查询结果列表,用于控制“操作”列按钮的显示
98
- isSearchResult: {
99
- type: Boolean,
100
- default: true
101
- },
102
- height: {
103
- type: String,
104
- default: '300px'
105
- },
106
- selectResult: {
107
- type: Array,
108
- default: function() {
109
- return []
110
- }
111
- }
112
-
113
- },
114
- data() {
115
- let tableHeight = this.height
116
- tableHeight = tableHeight.substring(0, tableHeight.indexOf('px'))
117
- const myHeight = (parseInt(tableHeight) + 30) + 'px'
118
- return {
119
- singleUserIndex: null, // 选中的用户序号
120
- selectedUser: null,
121
- myHeight
122
- }
123
- },
124
- created() {
125
- console.log('search-result---', this.gridData)
126
- },
127
- methods: {
128
- // 单选树时,点击行事件
129
- // rowClick(row, column, event) {
130
- // this.selectedUser = row
131
- // // this.$emit('rowClick', row, column, event)
132
- // },
133
- // 移除用户
134
- removeUser(index, row) {
135
- this.$emit('removeUser', index, row)
136
- },
137
- // 添加用户
138
- addUser(index, row) {
139
- this.$emit('addUser', index, row)
140
- },
141
- selectUser(selectVal) {
142
- // console.log('selectUser', selectVal)
143
- this.$emit('selectResult', this.gridData[selectVal])
144
- },
145
- rowClick(row, column, event) {
146
- this.singleUserIndex = row.row_index
147
- this.$emit('selectResult', row)
148
- },
149
- tableRowClassName({ row, rowIndex }) {
150
- row.row_index = rowIndex
151
- },
152
- rowDblclick(row, column, event) {
153
- if (this.multiple) {
154
- this.$emit('addUser', null, row)
155
- } else {
156
- this.$emit('resultRowDblclick', row)
157
- }
158
- },
159
- isDisable(row) {
160
- if (this.selectResult) {
161
- const containUsers = this.selectResult.filter(this.filterDept(row))
162
- if (containUsers && containUsers.length > 0) {
163
- return true
164
- }
165
- }
166
- return false
167
- },
168
- // 判断用户是否存在的过滤器
169
- filterDept(queryDept) {
170
- return (dept) => {
171
- return (dept.id === queryDept.id)
172
- }
173
- }
174
- }
175
- }
176
- </script>
@@ -1,6 +0,0 @@
1
- import DepartmentUserTree from './src/department-user-tree.vue'
2
- DepartmentUserTree.install = function(Vue) {
3
- Vue.component(DepartmentUserTree.name, DepartmentUserTree)
4
- }
5
-
6
- export default DepartmentUserTree
@@ -1,116 +0,0 @@
1
- <template>
2
- <div>
3
- <el-dialog
4
- ref="userDialog"
5
- class="user-tree"
6
- visible
7
- :title="myTitle"
8
- append-to-body
9
- :close-on-click-modal="false"
10
- :width="width"
11
- @open="$emit('openDialog')"
12
- @opend="$emit('opendDialog')"
13
- @close="$emit('closeDialog')"
14
- @closed="$emit('closedDialog')"
15
- >
16
- <inline-department-user-multi-tree
17
- ref="inlineDepartmentUser"
18
- :department-info="departmentInfo"
19
- :is-need-virtual-user="isNeedVirtualUser"
20
- :height="height"
21
- :select-user-info="selectUserInfo"
22
- :search-field="searchField"
23
- :separator="separator"
24
- @result="result"
25
- />
26
- <div slot="footer" class="dialog-footer">
27
- <el-button size="small" @click="$emit('closeDialog')">
28
- {{ $t('imatrixUIPublicModel.cancel') }}
29
- </el-button>
30
- <el-button size="small" type="primary" @click="confirmSelectUser">
31
- {{ $t('imatrixUIPublicModel.sure') }}
32
- </el-button>
33
- </div>
34
- </el-dialog>
35
- </div>
36
- </template>
37
- <style>
38
- .searchResult {
39
- color:red
40
- }
41
- .inline-select-custom {
42
- width : 100px
43
- }
44
- .inline-input-custom {
45
- width : 98%
46
- }
47
- </style>
48
- <script>
49
- import InlineDepartmentUserMultiTree from '../../department-user-tree-inline/src/department-user-multiple-tree-inline.vue'
50
- export default {
51
- name: 'DepartmentUserMultiTree',
52
- components: {
53
- InlineDepartmentUserMultiTree
54
- },
55
- props: {
56
- // 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
57
- departmentInfo: {
58
- type: Array,
59
- default: null
60
- },
61
- // 弹框的标题
62
- title: {
63
- type: String,
64
- default: null
65
- },
66
- // 弹框的宽度
67
- width: {
68
- type: String,
69
- default: '60%'
70
- },
71
- // 弹框的高度
72
- height: {
73
- type: String,
74
- default: '300px'
75
- },
76
- // 是否需要显示虚拟用户
77
- isNeedVirtualUser: {
78
- type: Boolean,
79
- default: false
80
- },
81
- // 多选用户树时,已选择用户id或登录名集合,多个之间以逗号隔开
82
- selectUserInfo: {
83
- type: [String, Number],
84
- default: null
85
- },
86
- // 移除用户时,用户属性名称:id、loginName、email、telephone,默认是loginName
87
- searchField: {
88
- type: String,
89
- default: 'loginName'
90
- },
91
- // 多选树时结果之间的分隔符,默认是逗号分隔
92
- separator: {
93
- type: String,
94
- default: ','
95
- }
96
- },
97
- data() {
98
- let myTitle = this.$t('imatrixUIMessage.pleaseSelectPersonnel')
99
- if (this.title) {
100
- myTitle = this.title
101
- }
102
- return {
103
- myTitle
104
- }
105
- },
106
- methods: {
107
- result(selectNodeInfo) {
108
- this.$emit('closeDialog', selectNodeInfo)
109
- },
110
- confirmSelectUser() {
111
- this.$refs.inlineDepartmentUser.confirmSelectUser()
112
- }
113
-
114
- }
115
- }
116
- </script>