agilebuilder-ui 1.1.32 → 1.1.33-sit2

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 (31) hide show
  1. package/lib/{401-572d1150.js → 401-7b6f6bb7.js} +1 -1
  2. package/lib/{404-442a62d4.js → 404-427a0b5a.js} +1 -1
  3. package/lib/{iframe-page-1b622fa5.js → iframe-page-89815912.js} +1 -1
  4. package/lib/index-e2f27581.js +73223 -0
  5. package/lib/super-ui.css +1 -1
  6. package/lib/super-ui.js +1 -1
  7. package/lib/super-ui.umd.cjs +94 -94
  8. package/lib/{tab-content-iframe-index-285c8311.js → tab-content-iframe-index-2619cf03.js} +1 -1
  9. package/lib/{tab-content-index-ddb9e911.js → tab-content-index-391b0efb.js} +1 -1
  10. package/lib/{tache-subprocess-history-81e8e4f4.js → tache-subprocess-history-2097ae7f.js} +1 -1
  11. package/package.json +1 -1
  12. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +5 -1
  13. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +343 -368
  14. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +193 -101
  15. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-input.vue +74 -62
  16. package/packages/fs-upload-new/src/file-upload-mobile/file-upload.vue +1 -1
  17. package/packages/organization-input/src/organization-input.vue +11 -0
  18. package/packages/super-grid/src/dynamic-input.vue +11 -1
  19. package/packages/super-grid/src/formatter.js +55 -56
  20. package/packages/super-grid/src/normal-column-content.vue +125 -55
  21. package/packages/super-grid/src/row-operation.vue +35 -18
  22. package/packages/super-grid/src/super-grid.vue +135 -97
  23. package/packages/super-icon/src/index.vue +1 -0
  24. package/src/i18n/langs/cn.js +2 -1
  25. package/src/i18n/langs/en.js +2 -1
  26. package/src/styles/display-layout.scss +1 -1
  27. package/src/styles/index.scss +7 -1
  28. package/src/utils/auth-api.js +4 -0
  29. package/src/utils/common-util.js +3 -0
  30. package/src/utils/dingtalk-util.ts +37 -0
  31. package/lib/index-0ffdab4a.js +0 -72771
@@ -1,94 +1,87 @@
1
1
  <template>
2
- <div>
3
- <el-container style="height: 395px">
4
- <el-header style="font-size: 12px; height: 35px;padding: 0">
5
- <el-autocomplete
6
- v-model="filterText"
7
- :fetch-suggestions="querySearch"
8
- :placeholder="$t('departmentUserTree.pleaseEnterUserInformation')"
9
- class="inline-input searchDepartmentUser"
10
- style="width: 100%;"
11
- size="default"
12
- @select="handleSelect"
13
- @keyup.enter="clickSearch"
14
- >
15
- <template v-slot:append>
16
- <el-button :icon="ElIconSearch" @click="clickSearch"/>
17
- </template>
18
- </el-autocomplete>
19
- </el-header>
20
- <el-main style="padding: 10px; width: 100%">
21
- <div
22
- v-if="!searchValue || searchResult.length === 0"
23
- style="
24
- padding-top: 5px;
25
- overflow: auto;
26
- width: auto;
27
- display: inline-block !important;
28
- "
29
- >
30
- <el-tabs v-model="activeTab" class="boe">
31
- <el-tab-pane :label="$t('departmentUserTreeInline.orgTree')" name="orgTree">
32
- <el-tree
33
- ref="deparmentUserTree"
34
- :load="loadNode"
35
- :props="defaultProps"
36
- lazy
37
- node-key="nodeId"
38
- @node-click="handleNodeClick"
39
- >
40
- <template #default="{ node, data }">
41
- <span>
42
- <el-icon>
43
- <Menu v-if="node.data.id === -1 || node.data.branch"/>
44
- <Tickets v-else-if="node.data.id === -2 || node.data.id === -3"/>
45
- <User v-else-if="node.data.nodeType === 'USER'"/>
46
- <Calendar v-else/>
47
- </el-icon>
48
- <span :title="node.label">
49
- {{ node.label }}
50
- </span>
51
- </span>
52
- </template>
53
- </el-tree>
54
- </el-tab-pane>
55
- <el-tab-pane name="groupTree">
56
- <template v-slot:label>
57
- <span>{{ $t('departmentUserTreeInline.group') }}</span>
58
- <span><GroupUser :active-tab="activeTab" @update-group-tree="updateGroupTree" /></span>
59
- </template>
60
- <GroupUserSingleTree
61
- v-if="isShowGroupTree"
62
- @singleClick="getGroupUserResult"
63
- @dblClick="dblClickGroupUserResult"
64
- />
65
- </el-tab-pane>
66
- </el-tabs>
67
- </div>
68
- <div
69
- v-if="
70
- searchValue && searchValue.length > 0 && searchResult.length > 0
71
- "
72
- style="height: 100%; overflow: hidden"
73
- >
74
- <user-result
75
- ref="userResult"
76
- :contain-branch="containBranch"
77
- :grid-data="searchResult"
78
- :height="height"
79
- :multiple="false"
80
- @resultRowDblclick="resultRowDblclick"
81
- @selectResult="getSelectUser"
82
- />
83
- </div>
84
- </el-main>
85
- </el-container>
86
- </div>
2
+ <div>
3
+ <el-container style="height: 395px">
4
+ <el-header style="font-size: 12px; height: 35px; padding: 0">
5
+ <el-autocomplete
6
+ v-model="filterText"
7
+ :fetch-suggestions="querySearch"
8
+ :placeholder="$t('departmentUserTree.pleaseEnterUserInformation')"
9
+ class="inline-input searchDepartmentUser"
10
+ style="width: 100%"
11
+ size="default"
12
+ @select="handleSelect"
13
+ @keyup.enter="clickSearch"
14
+ >
15
+ <template v-slot:append>
16
+ <el-button :icon="ElIconSearch" @click="clickSearch" />
17
+ </template>
18
+ </el-autocomplete>
19
+ </el-header>
20
+ <el-main style="padding: 10px; width: 100%">
21
+ <div
22
+ v-if="!searchValue || searchResult.length === 0"
23
+ style="padding-top: 5px; overflow: auto; width: auto; display: inline-block !important"
24
+ >
25
+ <el-tabs v-model="activeTab" class="boe">
26
+ <el-tab-pane :label="$t('departmentUserTreeInline.orgTree')" name="orgTree">
27
+ <el-tree
28
+ ref="deparmentUserTree"
29
+ :load="loadNode"
30
+ :props="defaultProps"
31
+ lazy
32
+ node-key="nodeId"
33
+ @node-click="handleNodeClick"
34
+ >
35
+ <template #default="{ node, data }">
36
+ <span>
37
+ <el-icon>
38
+ <Menu v-if="node.data.id === -1 || node.data.branch" />
39
+ <Tickets v-else-if="node.data.id === -2 || node.data.id === -3" />
40
+ <User v-else-if="node.data.nodeType === 'USER'" />
41
+ <Calendar v-else />
42
+ </el-icon>
43
+ <span :title="node.label">
44
+ {{ node.label }}
45
+ </span>
46
+ </span>
47
+ </template>
48
+ </el-tree>
49
+ </el-tab-pane>
50
+ <el-tab-pane name="groupTree">
51
+ <template v-slot:label>
52
+ <span>{{ $t('departmentUserTreeInline.group') }}</span>
53
+ <span><GroupUser :active-tab="activeTab" @update-group-tree="updateGroupTree" /></span>
54
+ </template>
55
+ <GroupUserSingleTree
56
+ v-if="isShowGroupTree"
57
+ @singleClick="getGroupUserResult"
58
+ @dblClick="dblClickGroupUserResult"
59
+ />
60
+ </el-tab-pane>
61
+ </el-tabs>
62
+ </div>
63
+ <div
64
+ v-if="searchValue && searchValue.length > 0 && searchResult.length > 0"
65
+ style="height: 100%; overflow: hidden"
66
+ >
67
+ <user-result
68
+ ref="userResult"
69
+ :contain-branch="containBranch"
70
+ :grid-data="searchResult"
71
+ :height="height"
72
+ :multiple="false"
73
+ @resultRowDblclick="resultRowDblclick"
74
+ @selectResult="getSelectUser"
75
+ />
76
+ </div>
77
+ </el-main>
78
+ </el-container>
79
+ </div>
87
80
  </template>
88
81
 
89
82
  <script>
90
- import {Search as ElIconSearch} from '@element-plus/icons-vue'
91
- import {$emit} from '../../utils/gogocodeTransfer'
83
+ import { Search as ElIconSearch } from '@element-plus/icons-vue'
84
+ import { $emit } from '../../utils/gogocodeTransfer'
92
85
  import localStorage from '../../../src/utils/local-storage'
93
86
  import UserResult from './search-result.vue'
94
87
  import utils from '../../utils/utils'
@@ -98,303 +91,285 @@ import GroupUserSingleTree from './group-user-single-tree.vue'
98
91
  import GroupUser from './group-user/group-user.vue'
99
92
 
100
93
  export default {
101
- data() {
102
- return {
103
- filterText: '',
104
- defaultProps: {
105
- id: 'id',
106
- label: 'showName',
107
- children: 'children',
108
- isLeaf: 'leaf',
109
- },
110
- searchParam: {
111
- userField: null,
112
- searchValue: null,
113
- treeType: 'MAN_DEPARTMENT_TREE',
114
- departmentInfo: null,
115
- },
116
- count: 0,
117
- // 当前租户内是否包含分支机构。获得当前选中用户名称时,如果有分支,则需要将分支名称返回给用户,例如:张三(分支1)
118
- containBranch: false,
119
- // 公司节点的id
120
- tenantNodeId: -1,
121
- // 查询的用户属性集合
122
- searchFields: [],
123
- searchField: 'name',
124
- // 查询的备选值
125
- restaurants: [],
126
- // 查询条件
127
- searchValue: null,
128
- // 用户的查询结果
129
- searchResult: [],
130
- searchStoreKey: 'searchDepartmentUser',
131
- // 公司根节点信息
132
- tenantInfo: {},
133
- // 选择的用户原信息
134
- selectUser: null,
135
- // 封装后的用户信息,即用户结果
136
- selectNodeInfo: null,
137
- // 节点没有双击事件,手动实现双击事件,参数用来记录次数
138
- notMultipleClickNum: null,
139
- // 节点没有双击事件,手动实现双击事件,参数用来记录节点
140
- notMultipleClickNode: null,
141
- memoryCacheKey: 'DEPARTMENT_USER_MEMORY_KEY',
142
- // 记忆选择数据, 搜索框获得焦点后,下拉显示最近选中的10个人,倒序排列,最后选中的在最上面显示。
143
- memoryCacheData: [],
144
- ElIconSearch,
145
- activeTab: 'orgTree', // 当前页签
146
- isShowGroupTree: true
147
- }
148
- },
149
- name: 'InlineDepartmentUserSingleTree',
150
- components: {
151
- UserResult,
152
- GroupUserSingleTree,
153
- GroupUser
154
- },
155
- props: {
156
- // 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
157
- departmentInfo: {
158
- type: Array,
159
- default: null,
160
- },
161
- // 弹框的高度
162
- height: {
163
- type: String,
164
- default: '300px',
165
- },
166
- // 是否需要显示虚拟用户
167
- isNeedVirtualUser: {
168
- type: Boolean,
169
- default: false,
170
- },
171
- },
172
- computed: {},
173
- watch: {
174
- filterText(val) {
175
- if (!val) {
176
- this.searchValue = val
177
- // 清空查询内容时,重新加载整个树
178
- if (this.departmentInfo && this.departmentInfo.length > 0) {
179
- // 加载指定部门时,展开公司节点
180
- this.loadPointDepartments(this)
181
- } else {
182
- // 加载整个组织结构树时,展开公司节点
183
- this.loadDepartment(this.tenantNodeId, this.tenantNodeId + '')
184
- }
185
- }
186
- },
187
- },
188
- created() {
189
- this.searchFields = this.getSearchUserFields()
190
- },
191
- mounted() {
192
- var searchDepartmentUser = localStorage.getObject(this.searchStoreKey)
193
- if (searchDepartmentUser) {
194
- this.restaurants = searchDepartmentUser
195
- } else {
196
- this.restaurants = []
197
- }
198
- this.getMemoryCacheData('departmentUser')
199
- },
200
- methods: {
201
- ...utils,
202
- ...departmentUserTreeSingleService,
203
- ...memoryCacheUtils,
204
- // selectUser(row, column, event) {
205
- // this.packageSelectResult(row)
206
- // },
207
- handleNodeClick(data, node, nodeTree) {
208
- if (this.isUserNode(data)) {
209
- const user = JSON.parse(data.data)
210
- user.tenantName = this.tenantInfo.tenantName
211
- user.tenantCode = this.tenantInfo.code
212
- // 搜索选中记忆
213
- this.setMemoryCacheData(user, 'departmentUser')
214
- // 点击的是用户节点,并且是单选树时,点击部门节点直接关闭弹框
215
- this.packageSelectResult(user)
216
- if (
217
- this.notMultipleClickNode &&
218
- this.notMultipleClickNode.id === node.id
219
- ) {
220
- this.notMultipleClickNum++
221
- // 表示第二次点击
222
- // 判断次数
223
- if (this.notMultipleClickNum === 2) {
224
- this.notMultipleClickNum = 0
225
- this.notMultipleClickNode = null
226
- // 关闭弹窗
227
- $emit(this, 'result', this.selectNodeInfo)
228
- }
229
- } else {
230
- this.notMultipleClickNode = node
231
- this.notMultipleClickNum = 1
232
- }
233
- const that = this
234
- setTimeout(function () {
235
- that.notMultipleClickNum = 0
236
- that.notMultipleClickNode = null
237
- }, 300)
238
- }
239
- },
240
- packageSelectResult(user) {
241
- let name = user.name
242
- if (user.enName && user.enName.trim() !== '') {
243
- name = name + '(' + user.enName + ')'
244
- }
245
- if (this.containBranch && user.subCompanyName) {
246
- // 如果包含分支机构,则拼接分支机构名称
247
- // name = name + '(' + user.subCompanyName + ')'
248
- }
249
- const selectNodeInfo = {
250
- id: user.id,
251
- name: name,
252
- zhName: user.name,
253
- loginName: user.loginName,
254
- email: user.email,
255
- telephone: user.telephone,
256
- containBranch: this.containBranch,
257
- user: user,
258
- enName: user.enName,
259
- subCompanyName: user.subCompanyName,
260
- }
261
- // 表示是勾选单选按钮或 选中树节点
262
- this.selectNodeInfo = selectNodeInfo
263
- },
264
- isUserNode(data) {
265
- // 当前节点不是公司节点,节点类型是用户类型时,表示点击的是用户节点
266
- return (
267
- data.id !== this.tenantNodeId &&
268
- data.nodeType &&
269
- data.nodeType === 'USER'
270
- )
271
- },
272
- confirmSelectUser() {
273
- if (this.selectNodeInfo) {
274
- $emit(this, 'result', this.selectNodeInfo)
275
- } else {
276
- this.$alert(
277
- this.$t('imatrixUIMessage.pleaseSelectPersonnel'),
278
- this.$t('imatrixUIMessage.tips'),
279
- {
280
- confirmButtonText: this.$t('imatrixUIPublicModel.sure'),
281
- }
282
- )
283
- }
284
- },
285
- // 是否选中了公司节点
286
- isSelectTenantNode(dataId) {
287
- return (
288
- dataId === this.tenantNodeId &&
289
- (!this.departmentInfo || this.departmentInfo.length === 0)
290
- )
291
- },
292
- // 初始化树 或 点击三角展开节点时动态加载子节点
293
- loadNode(node, resolve) {
294
- var parentId = 0
295
- var parentNodeId = '0'
296
- if (node.level === 0) {
297
- // 表示初始化树
298
- parentId = 0
299
- parentNodeId = parentId + ''
300
- } else {
301
- parentId = node.data.id
302
- parentNodeId = node.data.nodeId
303
- }
304
- var checkedKeys = []
305
- if (this.$refs.deparmentUserTree) {
306
- checkedKeys = this.$refs.deparmentUserTree.getCheckedKeys()
307
- }
308
- // 初始化部门人员树
309
- this.initLoadDepartment(
310
- parentId,
311
- node,
312
- resolve,
313
- checkedKeys,
314
- parentNodeId
315
- )
316
- },
317
- // renderContent(h, {node, data, store}) {
318
- // var className
319
- // if (node.data.id === -1 || node.data.branch) {
320
- // // node.id ===-1表示公司节点,node.branch表示是分支机构节点
321
- // className = 'Menu'
322
- // } else if (node.data.id === -2 || node.data.id === -3) {
323
- // // node.id ===-2表示集团公司无部门用户节点,node.id ===-3表示是分支机构无部门用户节点
324
- // className = 'Tickets'
325
- // } else if (node.data.nodeType === 'USER') {
326
- // className = 'User'
327
- // } else {
328
- // className = 'Date'
329
- // }
330
- // return h(
331
- // 'span',
332
- // h('el-icon', h(className)),
333
- // h('span', {title: node.label}, node.label)
334
- // )
335
- // // return (
336
- // // `<span>
337
- // // <i class={className}></i>
338
- // // <span title={node.label}>{node.label}</span>
339
- // // </span>`
340
- // // )
341
- // },
342
- getSelectUser(selectUser) {
343
- // console.log('getSelectUser==', selectUser)
344
- this.selectUser = selectUser
345
- // 搜索选中记忆
346
- this.setMemoryCacheData(selectUser, 'departmentUser')
347
- // true参数表示是否是勾选单选框,是勾选单选框时不关闭弹框
348
- this.packageSelectResult(selectUser)
349
- },
350
- resultRowDblclick(user) {
351
- this.packageSelectResult(user)
352
- $emit(this, 'result', this.selectNodeInfo)
353
- },
354
- getGroupUserResult(selectNodeInof) {
355
- console.log('getGroupUserResult----selectNodeInof=', selectNodeInof)
356
- if (selectNodeInof) {1
357
- this.selectNodeInfo = selectNodeInof
358
- // this.$emit('result', this.selectNodeInfo)
359
- }
360
- },
361
- updateGroupTree() {
362
- this.isShowGroupTree = false
363
- const that = this
364
- setTimeout(() => {
365
- that.isShowGroupTree = true
366
- }, 10)
367
- },
368
- dblClickGroupUserResult(selectNodeInof) {
369
- console.log('dblClickGroupUserResult----selectNodeInof=', selectNodeInof)
370
- if (selectNodeInof) {
371
- this.selectNodeInfo = selectNodeInof
372
- this.$emit('result', this.selectNodeInfo)
373
- }
374
- }
375
- },
376
- emits: ['result'],
94
+ data() {
95
+ return {
96
+ filterText: '',
97
+ defaultProps: {
98
+ id: 'id',
99
+ label: 'showName',
100
+ children: 'children',
101
+ isLeaf: 'leaf'
102
+ },
103
+ searchParam: {
104
+ userField: null,
105
+ searchValue: null,
106
+ treeType: 'MAN_DEPARTMENT_TREE',
107
+ departmentInfo: null
108
+ },
109
+ count: 0,
110
+ // 当前租户内是否包含分支机构。获得当前选中用户名称时,如果有分支,则需要将分支名称返回给用户,例如:张三(分支1)
111
+ containBranch: false,
112
+ // 公司节点的id
113
+ tenantNodeId: -1,
114
+ // 查询的用户属性集合
115
+ searchFields: [],
116
+ searchField: 'name',
117
+ // 查询的备选值
118
+ restaurants: [],
119
+ // 查询条件
120
+ searchValue: null,
121
+ // 用户的查询结果
122
+ searchResult: [],
123
+ searchStoreKey: 'searchDepartmentUser',
124
+ // 公司根节点信息
125
+ tenantInfo: {},
126
+ // 选择的用户原信息
127
+ selectUser: null,
128
+ // 封装后的用户信息,即用户结果
129
+ selectNodeInfo: null,
130
+ // 节点没有双击事件,手动实现双击事件,参数用来记录次数
131
+ notMultipleClickNum: null,
132
+ // 节点没有双击事件,手动实现双击事件,参数用来记录节点
133
+ notMultipleClickNode: null,
134
+ memoryCacheKey: 'DEPARTMENT_USER_MEMORY_KEY',
135
+ // 记忆选择数据, 搜索框获得焦点后,下拉显示最近选中的10个人,倒序排列,最后选中的在最上面显示。
136
+ memoryCacheData: [],
137
+ ElIconSearch,
138
+ activeTab: 'orgTree', // 当前页签
139
+ isShowGroupTree: true
140
+ }
141
+ },
142
+ name: 'InlineDepartmentUserSingleTree',
143
+ components: {
144
+ UserResult,
145
+ GroupUserSingleTree,
146
+ GroupUser
147
+ },
148
+ props: {
149
+ // 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
150
+ departmentInfo: {
151
+ type: Array,
152
+ default: null
153
+ },
154
+ // 弹框的高度
155
+ height: {
156
+ type: String,
157
+ default: '300px'
158
+ },
159
+ // 是否需要显示虚拟用户
160
+ isNeedVirtualUser: {
161
+ type: Boolean,
162
+ default: false
163
+ }
164
+ },
165
+ computed: {},
166
+ watch: {
167
+ filterText(val) {
168
+ if (!val) {
169
+ this.searchValue = val
170
+ // 清空查询内容时,重新加载整个树
171
+ if (this.departmentInfo && this.departmentInfo.length > 0) {
172
+ // 加载指定部门时,展开公司节点
173
+ this.loadPointDepartments(this)
174
+ } else {
175
+ // 加载整个组织结构树时,展开公司节点
176
+ this.loadDepartment(this.tenantNodeId, this.tenantNodeId + '')
177
+ }
178
+ }
179
+ }
180
+ },
181
+ created() {
182
+ this.searchFields = this.getSearchUserFields()
183
+ },
184
+ mounted() {
185
+ var searchDepartmentUser = localStorage.getObject(this.searchStoreKey)
186
+ if (searchDepartmentUser) {
187
+ this.restaurants = searchDepartmentUser
188
+ } else {
189
+ this.restaurants = []
190
+ }
191
+ this.getMemoryCacheData('departmentUser')
192
+ },
193
+ methods: {
194
+ ...utils,
195
+ ...departmentUserTreeSingleService,
196
+ ...memoryCacheUtils,
197
+ // selectUser(row, column, event) {
198
+ // this.packageSelectResult(row)
199
+ // },
200
+ handleNodeClick(data, node, nodeTree) {
201
+ if (this.isUserNode(data)) {
202
+ const user = JSON.parse(data.data)
203
+ user.tenantName = this.tenantInfo.tenantName
204
+ user.tenantCode = this.tenantInfo.code
205
+ // 搜索选中记忆
206
+ this.setMemoryCacheData(user, 'departmentUser')
207
+ // 点击的是用户节点,并且是单选树时,点击部门节点直接关闭弹框
208
+ this.packageSelectResult(user)
209
+ if (this.notMultipleClickNode && this.notMultipleClickNode.id === node.id) {
210
+ this.notMultipleClickNum++
211
+ // 表示第二次点击
212
+ // 判断次数
213
+ if (this.notMultipleClickNum === 2) {
214
+ this.notMultipleClickNum = 0
215
+ this.notMultipleClickNode = null
216
+ // 关闭弹窗
217
+ $emit(this, 'result', this.selectNodeInfo)
218
+ }
219
+ } else {
220
+ this.notMultipleClickNode = node
221
+ this.notMultipleClickNum = 1
222
+ }
223
+ const that = this
224
+ setTimeout(function () {
225
+ that.notMultipleClickNum = 0
226
+ that.notMultipleClickNode = null
227
+ }, 300)
228
+ }
229
+ },
230
+ packageSelectResult(user) {
231
+ let name = user.name
232
+ if (user.enName && user.enName.trim() !== '') {
233
+ name = name + '(' + user.enName + ')'
234
+ }
235
+ if (this.containBranch && user.subCompanyName) {
236
+ // 如果包含分支机构,则拼接分支机构名称
237
+ // name = name + '(' + user.subCompanyName + ')'
238
+ }
239
+ const selectNodeInfo = {
240
+ id: user.id,
241
+ name: name,
242
+ zhName: user.name,
243
+ loginName: user.loginName,
244
+ email: user.email,
245
+ telephone: user.telephone,
246
+ containBranch: this.containBranch,
247
+ user: user,
248
+ enName: user.enName,
249
+ subCompanyName: user.subCompanyName,
250
+ divisionManager: user.divisionManager
251
+ }
252
+ // 表示是勾选单选按钮或 选中树节点
253
+ this.selectNodeInfo = selectNodeInfo
254
+ },
255
+ isUserNode(data) {
256
+ // 当前节点不是公司节点,节点类型是用户类型时,表示点击的是用户节点
257
+ return data.id !== this.tenantNodeId && data.nodeType && data.nodeType === 'USER'
258
+ },
259
+ confirmSelectUser() {
260
+ if (this.selectNodeInfo) {
261
+ $emit(this, 'result', this.selectNodeInfo)
262
+ } else {
263
+ this.$alert(this.$t('imatrixUIMessage.pleaseSelectPersonnel'), this.$t('imatrixUIMessage.tips'), {
264
+ confirmButtonText: this.$t('imatrixUIPublicModel.sure')
265
+ })
266
+ }
267
+ },
268
+ // 是否选中了公司节点
269
+ isSelectTenantNode(dataId) {
270
+ return dataId === this.tenantNodeId && (!this.departmentInfo || this.departmentInfo.length === 0)
271
+ },
272
+ // 初始化树 或 点击三角展开节点时动态加载子节点
273
+ loadNode(node, resolve) {
274
+ var parentId = 0
275
+ var parentNodeId = '0'
276
+ if (node.level === 0) {
277
+ // 表示初始化树
278
+ parentId = 0
279
+ parentNodeId = parentId + ''
280
+ } else {
281
+ parentId = node.data.id
282
+ parentNodeId = node.data.nodeId
283
+ }
284
+ var checkedKeys = []
285
+ if (this.$refs.deparmentUserTree) {
286
+ checkedKeys = this.$refs.deparmentUserTree.getCheckedKeys()
287
+ }
288
+ // 初始化部门人员树
289
+ this.initLoadDepartment(parentId, node, resolve, checkedKeys, parentNodeId)
290
+ },
291
+ // renderContent(h, {node, data, store}) {
292
+ // var className
293
+ // if (node.data.id === -1 || node.data.branch) {
294
+ // // node.id ===-1表示公司节点,node.branch表示是分支机构节点
295
+ // className = 'Menu'
296
+ // } else if (node.data.id === -2 || node.data.id === -3) {
297
+ // // node.id ===-2表示集团公司无部门用户节点,node.id ===-3表示是分支机构无部门用户节点
298
+ // className = 'Tickets'
299
+ // } else if (node.data.nodeType === 'USER') {
300
+ // className = 'User'
301
+ // } else {
302
+ // className = 'Date'
303
+ // }
304
+ // return h(
305
+ // 'span',
306
+ // h('el-icon', h(className)),
307
+ // h('span', {title: node.label}, node.label)
308
+ // )
309
+ // // return (
310
+ // // `<span>
311
+ // // <i class={className}></i>
312
+ // // <span title={node.label}>{node.label}</span>
313
+ // // </span>`
314
+ // // )
315
+ // },
316
+ getSelectUser(selectUser) {
317
+ // console.log('getSelectUser==', selectUser)
318
+ this.selectUser = selectUser
319
+ // 搜索选中记忆
320
+ this.setMemoryCacheData(selectUser, 'departmentUser')
321
+ // true参数表示是否是勾选单选框,是勾选单选框时不关闭弹框
322
+ this.packageSelectResult(selectUser)
323
+ },
324
+ resultRowDblclick(user) {
325
+ this.packageSelectResult(user)
326
+ $emit(this, 'result', this.selectNodeInfo)
327
+ },
328
+ getGroupUserResult(selectNodeInof) {
329
+ console.log('getGroupUserResult----selectNodeInof=', selectNodeInof)
330
+ if (selectNodeInof) {
331
+ 1
332
+ this.selectNodeInfo = selectNodeInof
333
+ // this.$emit('result', this.selectNodeInfo)
334
+ }
335
+ },
336
+ updateGroupTree() {
337
+ this.isShowGroupTree = false
338
+ const that = this
339
+ setTimeout(() => {
340
+ that.isShowGroupTree = true
341
+ }, 10)
342
+ },
343
+ dblClickGroupUserResult(selectNodeInof) {
344
+ console.log('dblClickGroupUserResult----selectNodeInof=', selectNodeInof)
345
+ if (selectNodeInof) {
346
+ this.selectNodeInfo = selectNodeInof
347
+ this.$emit('result', this.selectNodeInfo)
348
+ }
349
+ }
350
+ },
351
+ emits: ['result']
377
352
  }
378
353
  </script>
379
354
 
380
355
  <style>
381
356
  .searchResult {
382
- color: red;
357
+ color: red;
383
358
  }
384
359
 
385
360
  .inline-select-custom {
386
- width: 100px;
361
+ width: 100px;
387
362
  }
388
363
 
389
364
  .inline-input-custom {
390
- width: 98%;
365
+ width: 98%;
391
366
  }
392
367
 
393
368
  .searchDepartmentUser {
394
- width: 250px;
369
+ width: 250px;
395
370
  }
396
371
 
397
372
  .el-autocomplete-suggestion.el-popper {
398
- min-width: 300px;
373
+ min-width: 300px;
399
374
  }
400
375
  </style>