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.
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.umd.min.js +5 -35
- package/package.json +4 -2
- package/packages/breadcrumb/index.js +6 -0
- package/packages/breadcrumb/src/breadcrumb.vue +71 -0
- package/packages/department-tree/index.js +6 -0
- package/packages/department-tree/src/department-tree.vue +108 -0
- package/packages/department-tree-inline/index.js +6 -0
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +402 -0
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +284 -0
- package/packages/department-tree-inline/src/department-tree-inline.vue +86 -0
- package/packages/department-tree-inline/src/department-tree-service.js +245 -0
- package/packages/department-tree-inline/src/search-result.vue +176 -0
- package/packages/department-user-tree/index.js +6 -0
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +116 -0
- package/packages/department-user-tree/src/department-user-single-tree.vue +76 -0
- package/packages/department-user-tree/src/department-user-tree.vue +101 -0
- package/packages/department-user-tree-inline/index.js +6 -0
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +626 -0
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +269 -0
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +79 -0
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +230 -0
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +122 -0
- package/packages/department-user-tree-inline/src/search-result.vue +197 -0
- package/packages/directives/prevent-reclick.js +19 -0
- package/packages/dynamic-source-select/index.js +6 -0
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +70 -0
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +440 -0
- package/packages/dynamic-source-select/src/events.js +55 -0
- package/packages/fs-preview/index.js +6 -0
- package/packages/fs-preview/src/fs-preview.vue +226 -0
- package/packages/fs-upload/index.js +6 -0
- package/packages/fs-upload/src/fs-upload-multi.vue +420 -0
- package/packages/fs-upload/src/fs-upload-single.vue +312 -0
- package/packages/fs-upload/src/fs-upload.vue +189 -0
- package/packages/fs-upload/src/see-big-picture.vue +55 -0
- package/packages/fs-upload-list/index.js +6 -0
- package/packages/fs-upload-list/src/fs-upload-list.vue +287 -0
- package/packages/hamburger/index.js +6 -0
- package/packages/hamburger/src/hamburger.vue +38 -0
- package/packages/index.js +121 -0
- package/packages/multipart-upload/index.js +6 -0
- package/packages/multipart-upload/src/index.vue +73 -0
- package/packages/multipart-upload/src/multipart-upload-form.vue +297 -0
- package/packages/multipart-upload/src/multipart-upload-list.vue +378 -0
- package/packages/organization-input/index.js +6 -0
- package/packages/organization-input/src/organization-input.vue +542 -0
- package/packages/plugins/export-data-new.js +453 -0
- package/packages/plugins/export-data.js +361 -0
- package/packages/plugins/index.js +15 -0
- package/packages/plugins/public-method.js +43 -0
- package/packages/remove-department/index.js +6 -0
- package/packages/remove-department/src/remove-department.vue +172 -0
- package/packages/remove-department/src/remove-dept-service.js +20 -0
- package/packages/remove-user/index.js +6 -0
- package/packages/remove-user/src/remove-user-service.js +20 -0
- package/packages/remove-user/src/remove-user.vue +195 -0
- package/packages/remove-workgroup/index.js +6 -0
- package/packages/remove-workgroup/src/remove-workgroup-service.js +20 -0
- package/packages/remove-workgroup/src/remove-workgroup.vue +159 -0
- package/packages/rich-editor/index.js +7 -0
- package/packages/rich-editor/index.vue +278 -0
- package/packages/rich-editor/langs/zh-Hans.js +1 -0
- package/packages/rich-editor/viewer.vue +103 -0
- package/packages/scan-code-input/index.js +6 -0
- package/packages/scan-code-input/src/events.js +33 -0
- package/packages/scan-code-input/src/scan-code-input-colse.vue +131 -0
- package/packages/scan-code-input/src/scan-code-input.vue +116 -0
- package/packages/secret-info/index.js +7 -0
- package/packages/secret-info/index.vue +90 -0
- package/packages/super-grid/index.js +7 -0
- package/packages/super-grid/src/apis.js +763 -0
- package/packages/super-grid/src/columns-config.vue +335 -0
- package/packages/super-grid/src/custom-formatter.js +250 -0
- package/packages/super-grid/src/dynamic-input.vue +1279 -0
- package/packages/super-grid/src/eventBus.js +2 -0
- package/packages/super-grid/src/events.js +55 -0
- package/packages/super-grid/src/formValidatorUtil.js +226 -0
- package/packages/super-grid/src/formatter.js +181 -0
- package/packages/super-grid/src/group-column.vue +100 -0
- package/packages/super-grid/src/header-context-menu.vue +87 -0
- package/packages/super-grid/src/index-column.vue +51 -0
- package/packages/super-grid/src/normal-column.vue +769 -0
- package/packages/super-grid/src/public-methods.js +31 -0
- package/packages/super-grid/src/row-operation.vue +161 -0
- package/packages/super-grid/src/search-button.vue +66 -0
- package/packages/super-grid/src/search-condition-input.vue +61 -0
- package/packages/super-grid/src/search-condition-list.vue +59 -0
- package/packages/super-grid/src/search-form-advancedQuery.vue +653 -0
- package/packages/super-grid/src/search-form-dialog.vue +79 -0
- package/packages/super-grid/src/search-form-item.vue +386 -0
- package/packages/super-grid/src/search-form-number.vue +38 -0
- package/packages/super-grid/src/search-form-open.vue +162 -0
- package/packages/super-grid/src/search-form-ordinarySearch.vue +188 -0
- package/packages/super-grid/src/search-form.vue +634 -0
- package/packages/super-grid/src/search-methods.js +387 -0
- package/packages/super-grid/src/selection-column.vue +43 -0
- package/packages/super-grid/src/store.js +3 -0
- package/packages/super-grid/src/super-grid-service.js +561 -0
- package/packages/super-grid/src/super-grid.vue +2793 -0
- package/packages/super-grid/src/utils.js +763 -0
- package/packages/super-grid/src/view-image-dialog.vue +130 -0
- package/packages/super-nine-grid/index.js +7 -0
- package/packages/super-nine-grid/src/apis.js +103 -0
- package/packages/super-nine-grid/src/custom-formatter.js +66 -0
- package/packages/super-nine-grid/src/formatter.js +132 -0
- package/packages/super-nine-grid/src/search-form-number.vue +38 -0
- package/packages/super-nine-grid/src/search-form.vue +430 -0
- package/packages/super-nine-grid/src/search-methods.js +134 -0
- package/packages/super-nine-grid/src/store.js +3 -0
- package/packages/super-nine-grid/src/super-grid-service.js +91 -0
- package/packages/super-nine-grid/src/super-nine-grid.vue +872 -0
- package/packages/super-nine-grid/src/utils.js +261 -0
- package/packages/svg-icon/index.js +6 -0
- package/packages/svg-icon/src/svg-icon.vue +43 -0
- package/packages/utils/utils.js +152 -0
- package/packages/utils/value-set.js +86 -0
- package/packages/valid-code/index.js +7 -0
- package/packages/valid-code/src/valid-code.vue +95 -0
- package/packages/workflow-button/index.js +6 -0
- package/packages/workflow-button/src/workflow-button.vue +325 -0
- package/packages/workflow-history-list/index.js +6 -0
- package/packages/workflow-history-list/src/api.js +7 -0
- package/packages/workflow-history-list/src/workflow-history-list.vue +185 -0
- package/packages/workgroup-tree/index.js +6 -0
- package/packages/workgroup-tree/src/workgroup-tree.vue +76 -0
- package/packages/workgroup-tree-inline/index.js +6 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +317 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +43 -0
- package/packages/workgroup-user-tree/index.js +6 -0
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +100 -0
- package/packages/workgroup-user-tree-inline/index.js +6 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +163 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +436 -0
- package/packages/year-range-picker/index.js +6 -0
- package/packages/year-range-picker/src/year-range-picker.vue +51 -0
- package/src/i18n/i18n.js +1 -1
- package/src/i18n/langs/cn.js +4 -2
- package/src/i18n/langs/en.js +4 -2
- package/src/index.js +93 -0
- package/src/permission.js +7 -3
- package/src/plugins.js +3 -3
- package/src/router/index.js +24 -0
- package/src/store/getters.js +2 -1
- package/src/store/modules/app.js +10 -1
- package/src/styles/display-layout.scss +34 -0
- package/src/styles/index.scss +32 -4
- package/src/styles/theme/dark-blue/button.scss +9 -0
- package/src/styles/theme/dark-blue/card.scss +64 -0
- package/src/styles/theme/dark-blue/checkbox.scss +10 -0
- package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
- package/src/styles/theme/dark-blue/dialog.scss +21 -0
- package/src/styles/theme/dark-blue/element-variables.scss +7 -0
- package/src/styles/theme/dark-blue/font.scss +71 -0
- package/src/styles/theme/dark-blue/form.scss +51 -0
- package/src/styles/theme/dark-blue/index.scss +247 -0
- package/src/styles/theme/dark-blue/input.scss +15 -0
- package/src/styles/theme/dark-blue/pagination.scss +14 -0
- package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
- package/src/styles/theme/dark-blue/sidebar.scss +296 -0
- package/src/styles/theme/dark-blue/tab.scss +83 -0
- package/src/styles/theme/dark-blue/table.scss +60 -0
- package/src/styles/theme/dark-blue/tree.scss +31 -0
- package/src/styles/theme/dark-blue/var.scss +1028 -0
- package/src/styles/theme/gray/form-style.scss +2 -2
- package/src/styles/theme/gray/input-style.scss +8 -0
- package/src/utils/auth-api.js +115 -0
- package/src/utils/auth.js +34 -42
- package/src/utils/calculator/calculator-factory.js +2 -2
- package/src/utils/common-util.js +34 -0
- package/src/utils/jump-page-utils.js +29 -5
- package/src/utils/menu.js +19 -0
- package/src/utils/permission.js +4 -0
- package/src/utils/request.js +18 -2
- package/src/utils/util.js +7 -3
- package/src/views/dsc-component/Sidebar/Item.vue +4 -4
- package/src/views/dsc-component/Sidebar/Link.vue +11 -2
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +36 -20
- package/src/views/dsc-component/Sidebar/index.vue +24 -12
- package/src/views/dsc-component/tabs/tab-content.vue +16 -1
- package/src/views/login/index.vue +1 -1
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-container style="height: 395px">
|
|
4
|
+
<el-header style="font-size: 12px;height: 35px">
|
|
5
|
+
<el-autocomplete
|
|
6
|
+
v-model="filterText"
|
|
7
|
+
:fetch-suggestions="querySearch"
|
|
8
|
+
:placeholder="$t('departmentUserTree.pleaseEnterUserInformation')"
|
|
9
|
+
:trigger-on-focus="false"
|
|
10
|
+
size="small"
|
|
11
|
+
select-when-unmatched
|
|
12
|
+
class="inline-input"
|
|
13
|
+
@keyup.enter.native="clickSearch"
|
|
14
|
+
@select="handleSelect"
|
|
15
|
+
>
|
|
16
|
+
<!-- <el-select slot="prepend" v-model="searchField" class="inline-select-custom">
|
|
17
|
+
<el-option
|
|
18
|
+
v-for="item in searchFields"
|
|
19
|
+
:key="item.value"
|
|
20
|
+
:label="item.label"
|
|
21
|
+
:value="item.value"
|
|
22
|
+
/>
|
|
23
|
+
</el-select> -->
|
|
24
|
+
<el-button slot="append" icon="el-icon-search" @click="clickSearch" />
|
|
25
|
+
</el-autocomplete>
|
|
26
|
+
</el-header>
|
|
27
|
+
<el-main style="padding: 10px;width: 100%">
|
|
28
|
+
<div v-if="!searchValue || searchResult.length === 0" style="padding-top:5px;overflow:auto;width: auto;display: inline-block !important;">
|
|
29
|
+
<el-tree
|
|
30
|
+
ref="deparmentUserTree"
|
|
31
|
+
:props="defaultProps"
|
|
32
|
+
:load="loadNode"
|
|
33
|
+
lazy
|
|
34
|
+
node-key="nodeId"
|
|
35
|
+
:render-content="renderContent"
|
|
36
|
+
@node-click="handleNodeClick"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
<div v-if="searchValue && searchValue.length > 0 && searchResult.length > 0" style="height:100%;overflow: hidden;">
|
|
40
|
+
<user-result ref="userResult" :grid-data="searchResult" :height="height" :contain-branch="containBranch" :multiple="false" @selectResult="getSelectUser" @resultRowDblclick="resultRowDblclick" />
|
|
41
|
+
</div>
|
|
42
|
+
</el-main>
|
|
43
|
+
</el-container>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
<style>
|
|
47
|
+
.searchResult {
|
|
48
|
+
color:red
|
|
49
|
+
}
|
|
50
|
+
.inline-select-custom {
|
|
51
|
+
width : 100px
|
|
52
|
+
}
|
|
53
|
+
.inline-input-custom {
|
|
54
|
+
width : 98%
|
|
55
|
+
}
|
|
56
|
+
</style>
|
|
57
|
+
<script>
|
|
58
|
+
import localStorage from '../../../src/utils/local-storage'
|
|
59
|
+
import UserResult from './search-result'
|
|
60
|
+
import utils from '../../utils/utils'
|
|
61
|
+
import departmentUserTreeSingleService from './department-user-tree-single-service'
|
|
62
|
+
export default {
|
|
63
|
+
name: 'InlineDepartmentUserSingleTree',
|
|
64
|
+
components: {
|
|
65
|
+
UserResult
|
|
66
|
+
},
|
|
67
|
+
props: {
|
|
68
|
+
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
69
|
+
departmentInfo: {
|
|
70
|
+
type: Array,
|
|
71
|
+
default: null
|
|
72
|
+
},
|
|
73
|
+
// 弹框的高度
|
|
74
|
+
height: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: '300px'
|
|
77
|
+
},
|
|
78
|
+
// 是否需要显示虚拟用户
|
|
79
|
+
isNeedVirtualUser: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: false
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
data() {
|
|
85
|
+
return {
|
|
86
|
+
filterText: '',
|
|
87
|
+
defaultProps: {
|
|
88
|
+
id: 'id',
|
|
89
|
+
label: 'showName',
|
|
90
|
+
children: 'children',
|
|
91
|
+
isLeaf: 'leaf'
|
|
92
|
+
},
|
|
93
|
+
searchParam: {
|
|
94
|
+
userField: null,
|
|
95
|
+
searchValue: null,
|
|
96
|
+
treeType: 'MAN_DEPARTMENT_TREE',
|
|
97
|
+
departmentInfo: null
|
|
98
|
+
},
|
|
99
|
+
count: 0,
|
|
100
|
+
containBranch: false, // 当前租户内是否包含分支机构。获得当前选中用户名称时,如果有分支,则需要将分支名称返回给用户,例如:张三(分支1)
|
|
101
|
+
tenantNodeId: -1, // 公司节点的id
|
|
102
|
+
searchFields: [], // 查询的用户属性集合
|
|
103
|
+
searchField: 'name',
|
|
104
|
+
restaurants: [], // 查询的备选值
|
|
105
|
+
searchValue: null, // 查询条件
|
|
106
|
+
searchResult: [], // 用户的查询结果
|
|
107
|
+
searchStoreKey: 'searchDepartmentUser',
|
|
108
|
+
tenantInfo: {}, // 公司根节点信息
|
|
109
|
+
selectUser: null, // 选择的用户原信息
|
|
110
|
+
selectNodeInfo: null, // 封装后的用户信息,即用户结果
|
|
111
|
+
notMultipleClickNum: null, // 节点没有双击事件,手动实现双击事件,参数用来记录次数
|
|
112
|
+
notMultipleClickNode: null // 节点没有双击事件,手动实现双击事件,参数用来记录节点
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
computed: {
|
|
116
|
+
},
|
|
117
|
+
watch: {
|
|
118
|
+
filterText(val) {
|
|
119
|
+
if (!val) {
|
|
120
|
+
this.searchValue = val
|
|
121
|
+
// 清空查询内容时,重新加载整个树
|
|
122
|
+
if (this.departmentInfo && this.departmentInfo.length > 0) {
|
|
123
|
+
// 加载指定部门时,展开公司节点
|
|
124
|
+
this.loadPointDepartments(this)
|
|
125
|
+
} else {
|
|
126
|
+
// 加载整个组织结构树时,展开公司节点
|
|
127
|
+
this.loadDepartment(this.tenantNodeId, this.tenantNodeId + '')
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
created() {
|
|
133
|
+
this.searchFields = this.getSearchUserFields()
|
|
134
|
+
},
|
|
135
|
+
mounted() {
|
|
136
|
+
var searchDepartmentUser = localStorage.getObject(this.searchStoreKey)
|
|
137
|
+
if (searchDepartmentUser) {
|
|
138
|
+
this.restaurants = searchDepartmentUser
|
|
139
|
+
} else {
|
|
140
|
+
this.restaurants = []
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
methods: {
|
|
144
|
+
...utils,
|
|
145
|
+
...departmentUserTreeSingleService,
|
|
146
|
+
// selectUser(row, column, event) {
|
|
147
|
+
// this.packageSelectResult(row)
|
|
148
|
+
// },
|
|
149
|
+
handleNodeClick(data, node, nodeTree) {
|
|
150
|
+
if (this.isUserNode(data)) {
|
|
151
|
+
const user = JSON.parse(data.data)
|
|
152
|
+
user.tenantName = this.tenantInfo.tenantName
|
|
153
|
+
user.tenantCode = this.tenantInfo.code
|
|
154
|
+
// 点击的是用户节点,并且是单选树时,点击部门节点直接关闭弹框
|
|
155
|
+
this.packageSelectResult(user)
|
|
156
|
+
if (this.notMultipleClickNode && this.notMultipleClickNode.id === node.id) {
|
|
157
|
+
this.notMultipleClickNum++
|
|
158
|
+
// 表示第二次点击
|
|
159
|
+
// 判断次数
|
|
160
|
+
if (this.notMultipleClickNum === 2) {
|
|
161
|
+
this.notMultipleClickNum = 0
|
|
162
|
+
this.notMultipleClickNode = null
|
|
163
|
+
// 关闭弹窗
|
|
164
|
+
this.$emit('result', this.selectNodeInfo)
|
|
165
|
+
}
|
|
166
|
+
} else {
|
|
167
|
+
this.notMultipleClickNode = node
|
|
168
|
+
this.notMultipleClickNum = 1
|
|
169
|
+
}
|
|
170
|
+
const that = this
|
|
171
|
+
setTimeout(function() {
|
|
172
|
+
that.notMultipleClickNum = 0
|
|
173
|
+
that.notMultipleClickNode = null
|
|
174
|
+
}, 300)
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
packageSelectResult(user) {
|
|
178
|
+
let name = user.name
|
|
179
|
+
if (user.enName && user.enName.trim() !== '') {
|
|
180
|
+
name = name + '(' + user.enName + ')'
|
|
181
|
+
}
|
|
182
|
+
if (this.containBranch && user.subCompanyName) {
|
|
183
|
+
// 如果包含分支机构,则拼接分支机构名称
|
|
184
|
+
// name = name + '(' + user.subCompanyName + ')'
|
|
185
|
+
}
|
|
186
|
+
const selectNodeInfo = {
|
|
187
|
+
id: user.id,
|
|
188
|
+
name: name,
|
|
189
|
+
zhName: user.name,
|
|
190
|
+
loginName: user.loginName,
|
|
191
|
+
email: user.email,
|
|
192
|
+
telephone: user.telephone,
|
|
193
|
+
containBranch: this.containBranch,
|
|
194
|
+
user: user,
|
|
195
|
+
enName: user.enName,
|
|
196
|
+
subCompanyName: user.subCompanyName
|
|
197
|
+
}
|
|
198
|
+
// 表示是勾选单选按钮或 选中树节点
|
|
199
|
+
this.selectNodeInfo = selectNodeInfo
|
|
200
|
+
},
|
|
201
|
+
isUserNode(data) {
|
|
202
|
+
// 当前节点不是公司节点,节点类型是用户类型时,表示点击的是用户节点
|
|
203
|
+
return data.id !== this.tenantNodeId && data.nodeType && data.nodeType === 'USER'
|
|
204
|
+
},
|
|
205
|
+
confirmSelectUser() {
|
|
206
|
+
if (this.selectNodeInfo) {
|
|
207
|
+
this.$emit('result', this.selectNodeInfo)
|
|
208
|
+
} else {
|
|
209
|
+
this.$alert(this.$t('imatrixUIMessage.pleaseSelectPersonnel'), this.$t('imatrixUIMessage.tips'), {
|
|
210
|
+
confirmButtonText: this.$t('imatrixUIPublicModel.sure')
|
|
211
|
+
})
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
// 是否选中了公司节点
|
|
215
|
+
isSelectTenantNode(dataId) {
|
|
216
|
+
return dataId === this.tenantNodeId && (!this.departmentInfo || this.departmentInfo.length === 0)
|
|
217
|
+
},
|
|
218
|
+
// 初始化树 或 点击三角展开节点时动态加载子节点
|
|
219
|
+
loadNode(node, resolve) {
|
|
220
|
+
var parentId = 0
|
|
221
|
+
var parentNodeId = '0'
|
|
222
|
+
if (node.level === 0) {
|
|
223
|
+
// 表示初始化树
|
|
224
|
+
parentId = 0
|
|
225
|
+
parentNodeId = parentId + ''
|
|
226
|
+
} else {
|
|
227
|
+
parentId = node.data.id
|
|
228
|
+
parentNodeId = node.data.nodeId
|
|
229
|
+
}
|
|
230
|
+
var checkedKeys = []
|
|
231
|
+
if (this.$refs.deparmentUserTree) {
|
|
232
|
+
checkedKeys = this.$refs.deparmentUserTree.getCheckedKeys()
|
|
233
|
+
}
|
|
234
|
+
// 初始化部门人员树
|
|
235
|
+
this.initLoadDepartment(parentId, node, resolve, checkedKeys, parentNodeId)
|
|
236
|
+
},
|
|
237
|
+
renderContent(h, { node, data, store }) {
|
|
238
|
+
var className
|
|
239
|
+
if (node.data.id === -1 || node.data.branch) {
|
|
240
|
+
// node.id ===-1表示公司节点,node.branch表示是分支机构节点
|
|
241
|
+
className = 'el-icon-menu'
|
|
242
|
+
} else if (node.data.id === -2 || node.data.id === -3) {
|
|
243
|
+
// node.id ===-2表示集团公司无部门用户节点,node.id ===-3表示是分支机构无部门用户节点
|
|
244
|
+
className = 'el-icon-tickets'
|
|
245
|
+
} else if (node.data.nodeType === 'USER') {
|
|
246
|
+
className = 'el-icon-user'
|
|
247
|
+
} else {
|
|
248
|
+
className = 'el-icon-date'
|
|
249
|
+
}
|
|
250
|
+
return (
|
|
251
|
+
<span>
|
|
252
|
+
<i class={className}></i>
|
|
253
|
+
<span title={node.label}>{node.label}</span>
|
|
254
|
+
</span>
|
|
255
|
+
)
|
|
256
|
+
},
|
|
257
|
+
getSelectUser(selectUser) {
|
|
258
|
+
// console.log('getSelectUser==', selectUser)
|
|
259
|
+
this.selectUser = selectUser
|
|
260
|
+
// true参数表示是否是勾选单选框,是勾选单选框时不关闭弹框
|
|
261
|
+
this.packageSelectResult(selectUser)
|
|
262
|
+
},
|
|
263
|
+
resultRowDblclick(user) {
|
|
264
|
+
this.packageSelectResult(user)
|
|
265
|
+
this.$emit('result', this.selectNodeInfo)
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
</script>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<inline-department-user-multi-tree
|
|
4
|
+
v-if="multiple"
|
|
5
|
+
ref="userTree"
|
|
6
|
+
:height="height"
|
|
7
|
+
:department-info="departmentInfo"
|
|
8
|
+
:select-user-info="selectUserInfo"
|
|
9
|
+
:search-field="searchField"
|
|
10
|
+
:separator="separator"
|
|
11
|
+
@result="result"
|
|
12
|
+
/>
|
|
13
|
+
<inline-department-user-single-tree v-if="!multiple" ref="userTree" :height="height" :department-info="departmentInfo" @result="result" />
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
<script>
|
|
17
|
+
import InlineDepartmentUserSingleTree from './department-user-single-tree-inline'
|
|
18
|
+
import InlineDepartmentUserMultiTree from './department-user-multiple-tree-inline'
|
|
19
|
+
export default {
|
|
20
|
+
name: 'InlineDepartmentUserTree',
|
|
21
|
+
components: {
|
|
22
|
+
InlineDepartmentUserSingleTree,
|
|
23
|
+
InlineDepartmentUserMultiTree
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
// 是否是多选树,默认是true
|
|
27
|
+
multiple: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: true
|
|
30
|
+
},
|
|
31
|
+
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
32
|
+
departmentInfo: {
|
|
33
|
+
type: Array,
|
|
34
|
+
default: null
|
|
35
|
+
},
|
|
36
|
+
// 弹框的高度
|
|
37
|
+
height: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: '300px'
|
|
40
|
+
},
|
|
41
|
+
// 是否需要显示虚拟用户
|
|
42
|
+
isNeedVirtualUser: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false
|
|
45
|
+
},
|
|
46
|
+
// 多选用户树时,已选择用户id或登录名集合,多个之间以逗号隔开
|
|
47
|
+
selectUserInfo: {
|
|
48
|
+
type: [String, Number],
|
|
49
|
+
default: null
|
|
50
|
+
},
|
|
51
|
+
// 移除用户时,用户属性名称:id、loginName、email、telephone,默认是loginName
|
|
52
|
+
searchField: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: 'loginName'
|
|
55
|
+
},
|
|
56
|
+
// 多选树时结果之间的分隔符,默认是逗号分隔
|
|
57
|
+
separator: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: ','
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
},
|
|
63
|
+
data() {
|
|
64
|
+
return {
|
|
65
|
+
selectNodeInfo: null // 单选时,选择的用户信息
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
methods: {
|
|
69
|
+
result(selectNodeInfo) {
|
|
70
|
+
this.selectNodeInfo = selectNodeInfo
|
|
71
|
+
this.$emit('result', selectNodeInfo)
|
|
72
|
+
},
|
|
73
|
+
// 嵌入树,多选时,点击确定时调用的方法
|
|
74
|
+
confirmSelectUser() {
|
|
75
|
+
this.$refs.userTree.confirmSelectUser()
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
</script>
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import { getI18n } from '../../../src/utils/util'
|
|
3
|
+
import localStorage from '../../../src/utils/local-storage'
|
|
4
|
+
const departmentUserTreeMultiService = {
|
|
5
|
+
// 后台查询部门,并拼接树节点
|
|
6
|
+
filterAppendNodes(value) {
|
|
7
|
+
this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/search-users', this.searchParam).then(result => {
|
|
8
|
+
if (result) {
|
|
9
|
+
if (result.length === 0) {
|
|
10
|
+
this.searchResult = []
|
|
11
|
+
this.$message({
|
|
12
|
+
showClose: true,
|
|
13
|
+
type: 'error',
|
|
14
|
+
message: getI18n().t('imatrixUIMessage.queryResultIsEmpty')
|
|
15
|
+
})
|
|
16
|
+
return
|
|
17
|
+
}
|
|
18
|
+
this.searchResult = result
|
|
19
|
+
} else {
|
|
20
|
+
if (result.length === 0) {
|
|
21
|
+
this.$message({
|
|
22
|
+
showClose: true,
|
|
23
|
+
type: 'error',
|
|
24
|
+
message: getI18n().t('imatrixUIMessage.queryResultIsEmpty')
|
|
25
|
+
})
|
|
26
|
+
return
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
},
|
|
31
|
+
querySearch(queryString, cb) {
|
|
32
|
+
this.search(this.filterText)
|
|
33
|
+
cb([])
|
|
34
|
+
},
|
|
35
|
+
handleSelect(item) {
|
|
36
|
+
this.handleSelectUtil(item, localStorage)
|
|
37
|
+
},
|
|
38
|
+
search(value) {
|
|
39
|
+
this.searchValue = value
|
|
40
|
+
let mySearchValue = value
|
|
41
|
+
if (mySearchValue) {
|
|
42
|
+
mySearchValue = mySearchValue.trim()
|
|
43
|
+
}
|
|
44
|
+
this.searchParam.searchValue = mySearchValue
|
|
45
|
+
this.searchParam.departmentInfo = this.departmentInfo
|
|
46
|
+
// this.searchParam.userField = this.searchField
|
|
47
|
+
// 后台查询部门,并拼接树节点
|
|
48
|
+
this.filterAppendNodes(value)
|
|
49
|
+
},
|
|
50
|
+
// 点击查询按钮调用的方法
|
|
51
|
+
clickSearch() {
|
|
52
|
+
this.selectNodeInfo = null
|
|
53
|
+
this.storeSeachValue(localStorage, this.searchStoreKey, this.filterText)
|
|
54
|
+
this.search(this.filterText)
|
|
55
|
+
},
|
|
56
|
+
// 选中非叶子类型的部门节点时,首次加载该节点的子节点,需要动态加载该部门下的用户节点及子部门节点,并展开该部门,且选中用户节点
|
|
57
|
+
dynamicCheckedUserNodes(data) {
|
|
58
|
+
var param = {
|
|
59
|
+
parentId: data.id,
|
|
60
|
+
branchId: data.branchId,
|
|
61
|
+
needVirtualUser: this.isNeedVirtualUser
|
|
62
|
+
}
|
|
63
|
+
this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/department-users', param).then(result => {
|
|
64
|
+
// 更新当前点击的节点的子节点
|
|
65
|
+
this.$refs.deparmentUserTree.updateKeyChildren(data.nodeId, result)
|
|
66
|
+
this.$refs.deparmentUserTree.store.nodesMap[data.nodeId].expanded = true
|
|
67
|
+
this.staticCheckedUserNodes(data)
|
|
68
|
+
})
|
|
69
|
+
},
|
|
70
|
+
// 初始化部门人员树
|
|
71
|
+
initLoadDepartment(parentId, node, resolve, checkedKeys, parentNodeId) {
|
|
72
|
+
var children = []
|
|
73
|
+
if (node.data && node.data.children) {
|
|
74
|
+
children = node.data.children
|
|
75
|
+
}
|
|
76
|
+
if (children && children.length > 0) {
|
|
77
|
+
// 表示加载过该父节点的子节点,只需重新更新一下
|
|
78
|
+
resolve(children)
|
|
79
|
+
// 表示当前展开的节点是选中状态,则应保持其选中状态,并选中其子节点
|
|
80
|
+
if (checkedKeys && checkedKeys.indexOf(parentNodeId) > -1) {
|
|
81
|
+
// 点击部门名称前的三角标识展开节点时,保持当前节点的选中状态
|
|
82
|
+
// 表示当前展开的节点是选中状态,则应保持其选中状态,并选中其子节点
|
|
83
|
+
this.checkedChildrenUserNodes(node.data, node.data.children)
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
// 表示没有加载过该父节点的子节点集合时
|
|
87
|
+
const param = {
|
|
88
|
+
parentId: parentId,
|
|
89
|
+
needVirtualUser: this.isNeedVirtualUser
|
|
90
|
+
}
|
|
91
|
+
if (node.data) {
|
|
92
|
+
param.branchId = node.data.branchId
|
|
93
|
+
}
|
|
94
|
+
this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/department-users', param).then(data => {
|
|
95
|
+
resolve(data)
|
|
96
|
+
// 更新当前点击的节点的子节点,必须加该方法,否则会导致子节点无法选中
|
|
97
|
+
this.$refs.deparmentUserTree.updateKeyChildren(parentNodeId, data)
|
|
98
|
+
if (parentId === 0) {
|
|
99
|
+
// 初始化树时,展开公司节点
|
|
100
|
+
const tenantData = data[0].data
|
|
101
|
+
this.tenantInfo = JSON.parse(tenantData)
|
|
102
|
+
this.containBranch = data[0].containBranch
|
|
103
|
+
if (this.departmentInfo && this.departmentInfo.length > 0) {
|
|
104
|
+
// 加载指定部门时,展开公司节点
|
|
105
|
+
this.loadPointDepartments()
|
|
106
|
+
} else {
|
|
107
|
+
// 加载整个组织结构树时,展开公司节点
|
|
108
|
+
this.loadDepartment(this.tenantNodeId, this.tenantNodeId + '')
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (this.isClickNode) {
|
|
112
|
+
// 点击当前节点时,加载树节点时
|
|
113
|
+
// 注意不是点击复选框时
|
|
114
|
+
this.isClickNode = false
|
|
115
|
+
this.staticCheckedUserNodes(node.data)
|
|
116
|
+
} else {
|
|
117
|
+
// 表示是点击三角展开节点时
|
|
118
|
+
if (checkedKeys && checkedKeys.indexOf(parentNodeId) > -1) {
|
|
119
|
+
// 点击部门名称前的三角标识展开节点时,保持当前节点的选中状态
|
|
120
|
+
// 表示当前展开的节点是选中状态,则应保持其选中状态,并选中其子节点
|
|
121
|
+
this.checkedChildrenUserNodes(node.data, node.data.children)
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
// 加载当前节点的子节点
|
|
128
|
+
loadDepartment(parentId, parentNodeId, isSearch, searchValue) {
|
|
129
|
+
const param = {
|
|
130
|
+
parentId: parentId,
|
|
131
|
+
needVirtualUser: this.isNeedVirtualUser
|
|
132
|
+
}
|
|
133
|
+
this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/department-users', param).then(children => {
|
|
134
|
+
this.$refs.deparmentUserTree.updateKeyChildren(parentNodeId, children)
|
|
135
|
+
if (this.$refs.deparmentUserTree.store.nodesMap[parentNodeId]) {
|
|
136
|
+
this.$refs.deparmentUserTree.store.nodesMap[parentNodeId].expanded = true
|
|
137
|
+
}
|
|
138
|
+
if (isSearch) {
|
|
139
|
+
// 查询时处理
|
|
140
|
+
if (this.allExpandNodeIds.indexOf(parentNodeId) === -1) {
|
|
141
|
+
// allExpandNodeIds集合中是否包含当前parentId节点id
|
|
142
|
+
this.allExpandNodeIds.push(parentNodeId)
|
|
143
|
+
}
|
|
144
|
+
if (this.allExpandNodeIds.length === this.allSearchNodeIds.length) {
|
|
145
|
+
// 表示所有节点已展开,执行树的过滤方法
|
|
146
|
+
this.$refs.deparmentUserTree.filter(searchValue)
|
|
147
|
+
this.allExpandNodeIds = []
|
|
148
|
+
this.allSearchNodeIds = []
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
})
|
|
152
|
+
},
|
|
153
|
+
// 加载指定部门节点
|
|
154
|
+
loadPointDepartments() {
|
|
155
|
+
this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/point-department-users', this.departmentInfo).then(children => {
|
|
156
|
+
this.$refs.deparmentUserTree.updateKeyChildren(this.tenantNodeId, children)
|
|
157
|
+
if (this.$refs.deparmentUserTree.store.nodesMap[this.tenantNodeId]) {
|
|
158
|
+
this.$refs.deparmentUserTree.store.nodesMap[this.tenantNodeId].expanded = true
|
|
159
|
+
}
|
|
160
|
+
})
|
|
161
|
+
},
|
|
162
|
+
getChildrenDepartmentUsers(childrenDepartmentIds) {
|
|
163
|
+
return new Promise((resolve, reject) => {
|
|
164
|
+
this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/user-in-departments', childrenDepartmentIds).then(users => {
|
|
165
|
+
resolve(users)
|
|
166
|
+
})
|
|
167
|
+
})
|
|
168
|
+
},
|
|
169
|
+
// 根据指定用户信息获得用户集合
|
|
170
|
+
getSelectUsers(searchField, selectUserInfo, separator) {
|
|
171
|
+
return new Promise((resolve, reject) => {
|
|
172
|
+
if (!searchField) {
|
|
173
|
+
resolve([])
|
|
174
|
+
} else if (!selectUserInfo) {
|
|
175
|
+
resolve([])
|
|
176
|
+
} else {
|
|
177
|
+
Vue.prototype.$http.get(Vue.prototype.baseAPI + '/component/organization-trees/select-users?searchField=' + searchField + '&selectUserInfo=' + selectUserInfo + '&separator=' + separator).then(users => {
|
|
178
|
+
resolve(users)
|
|
179
|
+
}).catch(error => {
|
|
180
|
+
reject(error)
|
|
181
|
+
})
|
|
182
|
+
}
|
|
183
|
+
})
|
|
184
|
+
},
|
|
185
|
+
// 部门人员树选中了组织结构树的根节点
|
|
186
|
+
packageAllUser() {
|
|
187
|
+
// 表示集合中不存在该用户,则封装该用户
|
|
188
|
+
const tenantNodeId = -1
|
|
189
|
+
var allUser = {
|
|
190
|
+
id: tenantNodeId,
|
|
191
|
+
name: '所有用户'
|
|
192
|
+
}
|
|
193
|
+
return allUser
|
|
194
|
+
},
|
|
195
|
+
// 工作组人员树选中了组织结构树的根节点
|
|
196
|
+
packageAllWgUser() {
|
|
197
|
+
// 表示集合中不存在该用户,则封装该用户
|
|
198
|
+
const tenantNodeId = -1
|
|
199
|
+
var allUser = {
|
|
200
|
+
id: tenantNodeId,
|
|
201
|
+
name: '所有工作组人员'
|
|
202
|
+
}
|
|
203
|
+
return allUser
|
|
204
|
+
},
|
|
205
|
+
initSelectUsers(searchField, selectUserInfo, separator) {
|
|
206
|
+
return new Promise((resolve, reject) => {
|
|
207
|
+
const selectDepts = []
|
|
208
|
+
if (selectUserInfo) {
|
|
209
|
+
if (selectUserInfo === '所有用户') {
|
|
210
|
+
// 表示已选择所有用户
|
|
211
|
+
selectDepts.push(this.packageAllUser())
|
|
212
|
+
resolve(selectDepts)
|
|
213
|
+
} else if (selectUserInfo === '所有工作组人员') {
|
|
214
|
+
selectDepts.push(this.packageAllWgUser())
|
|
215
|
+
resolve(selectDepts)
|
|
216
|
+
} else {
|
|
217
|
+
// 表示不是选择的所有用户
|
|
218
|
+
this.getSelectUsers(searchField, selectUserInfo, separator).then(users => {
|
|
219
|
+
resolve(users)
|
|
220
|
+
}).catch(error => {
|
|
221
|
+
reject(error)
|
|
222
|
+
})
|
|
223
|
+
}
|
|
224
|
+
} else {
|
|
225
|
+
resolve(selectDepts)
|
|
226
|
+
}
|
|
227
|
+
})
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
export default departmentUserTreeMultiService
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import { getI18n } from '../../../src/utils/util'
|
|
3
|
+
import localStorage from '../../../src/utils/local-storage'
|
|
4
|
+
const departmentUserTreeSingleService = {
|
|
5
|
+
// 后台查询部门,并拼接树节点
|
|
6
|
+
filterAppendNodes(value) {
|
|
7
|
+
this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/search-users', this.searchParam).then(result => {
|
|
8
|
+
if (result) {
|
|
9
|
+
this.searchResult = result
|
|
10
|
+
if (result.length === 0) {
|
|
11
|
+
this.searchResult = []
|
|
12
|
+
this.$message({
|
|
13
|
+
showClose: true,
|
|
14
|
+
type: 'error',
|
|
15
|
+
message: getI18n().t('imatrixUIMessage.queryResultIsEmpty')
|
|
16
|
+
})
|
|
17
|
+
return
|
|
18
|
+
}
|
|
19
|
+
} else {
|
|
20
|
+
this.searchResult = []
|
|
21
|
+
if (result.length === 0) {
|
|
22
|
+
this.$message({
|
|
23
|
+
showClose: true,
|
|
24
|
+
type: 'error',
|
|
25
|
+
message: getI18n().t('imatrixUIMessage.queryResultIsEmpty')
|
|
26
|
+
})
|
|
27
|
+
return
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
},
|
|
32
|
+
querySearch(queryString, cb) {
|
|
33
|
+
this.search(this.filterText)
|
|
34
|
+
cb([])
|
|
35
|
+
},
|
|
36
|
+
handleSelect(item) {
|
|
37
|
+
this.handleSelectUtil(item, localStorage)
|
|
38
|
+
},
|
|
39
|
+
search(value) {
|
|
40
|
+
this.searchValue = value
|
|
41
|
+
let mySearchValue = value
|
|
42
|
+
if (mySearchValue) {
|
|
43
|
+
mySearchValue = mySearchValue.trim()
|
|
44
|
+
}
|
|
45
|
+
this.searchParam.searchValue = mySearchValue
|
|
46
|
+
this.searchParam.departmentInfo = this.departmentInfo
|
|
47
|
+
// this.searchParam.userField = this.searchField
|
|
48
|
+
// 后台查询部门,并拼接树节点
|
|
49
|
+
this.filterAppendNodes(value)
|
|
50
|
+
},
|
|
51
|
+
// 点击查询按钮调用的方法
|
|
52
|
+
clickSearch() {
|
|
53
|
+
this.selectNodeInfo = null
|
|
54
|
+
this.storeSeachValue(localStorage, this.searchStoreKey, this.filterText)
|
|
55
|
+
this.search(this.filterText)
|
|
56
|
+
},
|
|
57
|
+
// 初始化部门人员树
|
|
58
|
+
initLoadDepartment(parentId, node, resolve, checkedKeys, parentNodeId) {
|
|
59
|
+
var children = []
|
|
60
|
+
if (node.data && node.data.children) {
|
|
61
|
+
children = node.data.children
|
|
62
|
+
}
|
|
63
|
+
if (children && children.length > 0) {
|
|
64
|
+
// 表示加载过该父节点的子节点,只需重新更新一下
|
|
65
|
+
resolve(children)
|
|
66
|
+
// 表示当前展开的节点是选中状态,则应保持其选中状态,并选中其子节点
|
|
67
|
+
if (checkedKeys && checkedKeys.indexOf(parentNodeId) > -1) {
|
|
68
|
+
// 点击部门名称前的三角标识展开节点时,保持当前节点的选中状态
|
|
69
|
+
// 表示当前展开的节点是选中状态,则应保持其选中状态,并选中其子节点
|
|
70
|
+
this.checkedChildrenUserNodes(node.data, node.data.children)
|
|
71
|
+
}
|
|
72
|
+
} else {
|
|
73
|
+
// 表示没有加载过该父节点的子节点集合时
|
|
74
|
+
const param = {
|
|
75
|
+
parentId: parentId,
|
|
76
|
+
needVirtualUser: this.isNeedVirtualUser
|
|
77
|
+
}
|
|
78
|
+
if (node.data) {
|
|
79
|
+
param.branchId = node.data.branchId
|
|
80
|
+
}
|
|
81
|
+
this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/department-users', param).then(data => {
|
|
82
|
+
resolve(data)
|
|
83
|
+
// 更新当前点击的节点的子节点,必须加该方法,否则会导致子节点无法选中
|
|
84
|
+
this.$refs.deparmentUserTree.updateKeyChildren(parentNodeId, data)
|
|
85
|
+
if (parentId === 0) {
|
|
86
|
+
// 初始化树时,展开公司节点
|
|
87
|
+
const tenantData = data[0].data
|
|
88
|
+
this.tenantInfo = JSON.parse(tenantData)
|
|
89
|
+
this.containBranch = data[0].containBranch
|
|
90
|
+
if (this.departmentInfo && this.departmentInfo.length > 0) {
|
|
91
|
+
// 加载指定部门时,展开公司节点
|
|
92
|
+
this.loadPointDepartments(this)
|
|
93
|
+
} else {
|
|
94
|
+
// 加载整个组织结构树时,展开公司节点
|
|
95
|
+
this.loadDepartment(this.tenantNodeId, this.tenantNodeId + '')
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
loadDepartment(parentId, parentNodeId, isSearch, searchValue) {
|
|
102
|
+
const param = {
|
|
103
|
+
parentId: parentId,
|
|
104
|
+
needVirtualUser: this.isNeedVirtualUser
|
|
105
|
+
}
|
|
106
|
+
this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/department-users', param).then(children => {
|
|
107
|
+
this.$refs.deparmentUserTree.updateKeyChildren(parentNodeId, children)
|
|
108
|
+
if (this.$refs.deparmentUserTree.store.nodesMap[parentNodeId]) {
|
|
109
|
+
this.$refs.deparmentUserTree.store.nodesMap[parentNodeId].expanded = true
|
|
110
|
+
}
|
|
111
|
+
})
|
|
112
|
+
},
|
|
113
|
+
loadPointDepartments() {
|
|
114
|
+
this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/point-department-users', this.departmentInfo).then(children => {
|
|
115
|
+
this.$refs.deparmentUserTree.updateKeyChildren(this.tenantNodeId, children)
|
|
116
|
+
if (this.$refs.deparmentUserTree.store.nodesMap[this.tenantNodeId]) {
|
|
117
|
+
this.$refs.deparmentUserTree.store.nodesMap[this.tenantNodeId].expanded = true
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
export default departmentUserTreeSingleService
|