agilebuilder-ui 1.1.35 → 1.1.36-sit1
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/{401-20f1c97c.js → 401-e367a09a.js} +1 -1
- package/lib/{404-36d09e24.js → 404-45104bc5.js} +1 -1
- package/lib/{iframe-page-51c292dc.js → iframe-page-8a758d4d.js} +1 -1
- package/lib/{index-19f46200.js → index-8c6ab0ba.js} +2054 -1966
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +100 -100
- package/lib/{tab-content-iframe-index-5d9d85c0.js → tab-content-iframe-index-16f7cb65.js} +1 -1
- package/lib/{tab-content-index-bd535c86.js → tab-content-index-f136be89.js} +1 -1
- package/lib/{tache-subprocess-history-56bf69ba.js → tache-subprocess-history-4f9a7773.js} +1 -1
- package/package.json +1 -1
- package/packages/department-tree/src/department-tree.vue +130 -123
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +435 -466
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +335 -342
- package/packages/department-tree-inline/src/department-tree-inline.vue +18 -11
- package/packages/department-tree-inline/src/department-tree-service.js +10 -11
- package/packages/department-tree-mobile/src/department-tree-app.vue +103 -75
- package/packages/department-tree-mobile/src/department-tree-inline-app.vue +256 -225
- package/packages/department-tree-mobile/src/department-tree-service.ts +98 -75
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +111 -115
- package/packages/department-user-tree/src/department-user-single-tree.vue +85 -88
- package/packages/department-user-tree/src/department-user-tree.vue +127 -119
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +6 -1
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +5 -0
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +18 -11
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +25 -51
- package/packages/department-user-tree-inline/src/group-user/group-list.vue +97 -90
- package/packages/department-user-tree-inline/src/group-user/group-user.vue +28 -32
- package/packages/department-user-tree-mobile/src/department-user-tree-app.vue +103 -75
- package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +282 -224
- package/packages/department-user-tree-mobile/src/department-user-tree-service.ts +58 -51
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +1 -1
- package/packages/organization-input/src/organization-input.vue +34 -12
- package/packages/super-grid/src/apis.js +21 -4
- package/packages/super-grid/src/dynamic-input.vue +1 -12
- package/packages/super-grid/src/formatter.js +4 -3
- package/packages/super-grid/src/normal-column-content.vue +25 -1
- package/packages/super-grid/src/row-operation.vue +23 -13
- package/packages/super-grid/src/search-form-open.vue +0 -1
- package/packages/super-grid/src/super-grid-service.js +1 -1
- package/packages/super-grid/src/super-grid.vue +51 -42
- package/packages/super-grid/src/utils.js +19 -6
- package/packages/super-icon/src/index.vue +11 -2
- package/packages/utils/value-set.js +147 -1
- package/packages/workgroup-tree/src/workgroup-tree.vue +117 -110
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +6 -1
- package/packages/workgroup-tree-mobile/src/workgroup-tree-app.vue +103 -75
- package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +229 -208
- package/src/api/sso-service.js +6 -5
- package/src/store/modules/table.js +0 -1
- package/src/styles/theme/black/font-style.scss +2 -0
- package/src/styles/theme/blue/font-style.scss +2 -0
- package/src/styles/theme/blue2/font-style.scss +2 -0
- package/src/styles/theme/dark-blue/font.scss +2 -0
- package/src/styles/theme/dark-blue/sidebar.scss +8 -0
- package/src/styles/theme/gray/font-style.scss +2 -0
- package/src/styles/theme/green/font.scss +3 -1
- package/src/styles/theme/green/sidebar.scss +9 -0
- package/src/styles/theme/ocean-blue/font.scss +3 -1
- package/src/styles/theme/ocean-blue/sidebar.scss +8 -0
- package/src/styles/theme/tiffany-blue-mobile/font.scss +2 -0
- package/src/styles/theme/tiffany-blue-mobile/sidebar.scss +8 -0
- package/src/utils/file-util.ts +32 -0
- package/src/utils/insert_css.js +1 -1
- package/src/utils/util.js +721 -715
- package/src/views/dsc-component/Sidebar/Item.vue +7 -2
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -2
- package/src/views/dsc-component/Sidebar/index.vue +36 -18
- package/src/views/layout/components/Menubar/Item.vue +0 -9
- package/src/views/layout/components/Menubar/SidebarItem.vue +2 -2
- package/src/views/layout/components/Sidebar/Item.vue +4 -1
- package/src/views/layout/components/Sidebar/SidebarItem.vue +2 -2
|
@@ -1,79 +1,81 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<el-container style="height: 395px">
|
|
4
|
+
<el-header style="text-align: right; font-size: 12px; height: 35px">
|
|
5
|
+
<el-autocomplete
|
|
6
|
+
v-model="filterText"
|
|
7
|
+
:fetch-suggestions="querySearch"
|
|
8
|
+
:placeholder="$t('departmentTreeInline.pleaseEnterDepartmentName')"
|
|
9
|
+
class="inline-input inline-input-custom"
|
|
10
|
+
size="default"
|
|
11
|
+
@select="handleSelect"
|
|
12
|
+
@keyup.enter="clickSearch"
|
|
13
|
+
>
|
|
14
|
+
<template v-slot:append>
|
|
15
|
+
<el-button :icon="ElIconSearch" @click="clickSearch" />
|
|
16
|
+
</template>
|
|
17
|
+
</el-autocomplete>
|
|
18
|
+
</el-header>
|
|
19
|
+
<el-main style="padding: 10px">
|
|
20
|
+
<div
|
|
21
|
+
v-if="!searchValue"
|
|
22
|
+
style="padding-top: 5px; overflow: auto; width: 100%; display: inline-block !important"
|
|
23
|
+
>
|
|
24
|
+
<el-tree
|
|
25
|
+
ref="deparmentTree"
|
|
26
|
+
:filter-node-method="filterNode"
|
|
27
|
+
:load="loadNode"
|
|
28
|
+
:props="defaultProps"
|
|
29
|
+
:show-checkbox="false"
|
|
30
|
+
check-strictly
|
|
31
|
+
lazy
|
|
32
|
+
node-key="id"
|
|
33
|
+
@check-change="handleCheckChange"
|
|
34
|
+
@node-expand="handleNodeExpand"
|
|
35
|
+
@node-click="handleNodeClick"
|
|
36
|
+
>
|
|
37
|
+
<template #default="{ node, data }">
|
|
38
|
+
<span>
|
|
39
|
+
<el-icon>
|
|
40
|
+
<Menu v-if="node.data.id === -1 || node.data.branch" />
|
|
41
|
+
<Tickets v-else-if="node.data.id === -2 || node.data.id === -3" />
|
|
42
|
+
<Calendar v-else />
|
|
43
|
+
</el-icon>
|
|
44
|
+
<span
|
|
45
|
+
:class="
|
|
46
|
+
data.nodeType &&
|
|
47
|
+
data.nodeType === 'DEPARTMENT' &&
|
|
48
|
+
searchValue &&
|
|
49
|
+
data.name.indexOf(searchValue) > -1
|
|
50
|
+
? 'searchResult'
|
|
51
|
+
: ''
|
|
52
|
+
"
|
|
53
|
+
:title="node.label"
|
|
54
|
+
>
|
|
55
|
+
{{ node.label }}
|
|
56
|
+
</span>
|
|
57
|
+
</span>
|
|
58
|
+
</template>
|
|
59
|
+
</el-tree>
|
|
60
|
+
</div>
|
|
61
|
+
<div v-if="searchValue && searchValue.length > 0" style="height: 100%; overflow: hidden">
|
|
62
|
+
<user-result
|
|
63
|
+
:grid-data="searchResult"
|
|
64
|
+
:height="height"
|
|
65
|
+
:is-search-result="true"
|
|
66
|
+
:multiple="false"
|
|
67
|
+
@resultRowDblclick="resultRowDblclick"
|
|
68
|
+
@selectResult="getSelectUser"
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
</el-main>
|
|
72
|
+
</el-container>
|
|
73
|
+
</div>
|
|
72
74
|
</template>
|
|
73
75
|
|
|
74
76
|
<script>
|
|
75
|
-
import {Search as ElIconSearch} from '@element-plus/icons-vue'
|
|
76
|
-
import {$emit} from '../../utils/gogocodeTransfer'
|
|
77
|
+
import { Search as ElIconSearch } from '@element-plus/icons-vue'
|
|
78
|
+
import { $emit } from '../../utils/gogocodeTransfer'
|
|
77
79
|
import localStorage from '../../../src/utils/local-storage'
|
|
78
80
|
import utils from '../../utils/utils'
|
|
79
81
|
import departmentTreeService from './department-tree-service'
|
|
@@ -81,287 +83,278 @@ import memoryCacheUtils from '../../utils/memory-cache-utils'
|
|
|
81
83
|
import UserResult from './search-result.vue'
|
|
82
84
|
|
|
83
85
|
export default {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
showTip = true
|
|
273
|
-
}
|
|
86
|
+
data() {
|
|
87
|
+
return {
|
|
88
|
+
filterText: '',
|
|
89
|
+
defaultProps: {
|
|
90
|
+
id: 'id',
|
|
91
|
+
label: 'showName',
|
|
92
|
+
children: 'childDepartments',
|
|
93
|
+
isLeaf: 'leaf'
|
|
94
|
+
},
|
|
95
|
+
searchParam: {
|
|
96
|
+
searchValue: null,
|
|
97
|
+
treeType: 'DEPARTMENT_TREE',
|
|
98
|
+
departmentInfo: null
|
|
99
|
+
},
|
|
100
|
+
count: 0,
|
|
101
|
+
// 当前租户内是否包含分支机构。获得当前选中部门名称时,如果有分支,则需要将分支名称返回给用户,例如:部门1(分支1)
|
|
102
|
+
containBranch: false,
|
|
103
|
+
// 公司节点的id
|
|
104
|
+
tenantNodeId: -1,
|
|
105
|
+
// 用于保存所有查询出的节点id
|
|
106
|
+
allSearchNodeIds: [],
|
|
107
|
+
// 用于保存allSearchNodeIds中所有已加载子节点的id集合
|
|
108
|
+
allExpandNodeIds: [],
|
|
109
|
+
isClickNode: false,
|
|
110
|
+
// 查询的备选值
|
|
111
|
+
restaurants: [],
|
|
112
|
+
// 查询条件
|
|
113
|
+
searchValue: null,
|
|
114
|
+
searchStoreKey: 'searchDepartment',
|
|
115
|
+
// 单选时,选择的部门信息
|
|
116
|
+
selectNodeInfo: null,
|
|
117
|
+
// 公司根节点信息
|
|
118
|
+
tenantInfo: {},
|
|
119
|
+
searchResult: [],
|
|
120
|
+
memoryCacheKey: 'DEPARTMENT_MEMORY_KEY',
|
|
121
|
+
// 记忆选择数据, 搜索框获得焦点后,下拉显示最近选中的10个人,倒序排列,最后选中的在最上面显示。
|
|
122
|
+
memoryCacheData: [],
|
|
123
|
+
ElIconSearch
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
name: 'InlineDepartmentSingleTree',
|
|
127
|
+
components: {
|
|
128
|
+
UserResult
|
|
129
|
+
},
|
|
130
|
+
props: {
|
|
131
|
+
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
132
|
+
departmentInfo: {
|
|
133
|
+
type: Array,
|
|
134
|
+
default: null
|
|
135
|
+
},
|
|
136
|
+
// 弹框的高度
|
|
137
|
+
height: {
|
|
138
|
+
type: String,
|
|
139
|
+
default: '300px'
|
|
140
|
+
},
|
|
141
|
+
// 多选部门树时,已选择部门id或部门名称或编码集合,多个之间以逗号隔开
|
|
142
|
+
selectDepartmentInfo: {
|
|
143
|
+
type: [String, Number],
|
|
144
|
+
default: null
|
|
145
|
+
},
|
|
146
|
+
// 移除部门时,部门属性名称:id、name、code,默认是id
|
|
147
|
+
searchField: {
|
|
148
|
+
type: String,
|
|
149
|
+
default: 'id'
|
|
150
|
+
},
|
|
151
|
+
// 多选树时结果之间的分隔符,默认是逗号分隔
|
|
152
|
+
separator: {
|
|
153
|
+
type: String,
|
|
154
|
+
default: ','
|
|
155
|
+
},
|
|
156
|
+
// 根据变量限制部门时,根据部门表的哪个字段进行过滤,默认是code
|
|
157
|
+
limitFilterColumn: {
|
|
158
|
+
type: String,
|
|
159
|
+
default: 'code'
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
computed: {},
|
|
163
|
+
watch: {
|
|
164
|
+
filterText(val) {
|
|
165
|
+
if (!val) {
|
|
166
|
+
this.searchValue = val
|
|
167
|
+
// 清空查询内容时,重新加载整个树
|
|
168
|
+
if (this.departmentInfo && this.departmentInfo.length > 0) {
|
|
169
|
+
// 加载指定部门时,展开公司节点
|
|
170
|
+
this.loadPointDepartments()
|
|
171
|
+
} else {
|
|
172
|
+
// 加载整个组织结构树时,展开公司节点
|
|
173
|
+
this.loadDepartment(this.tenantNodeId)
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
mounted() {
|
|
179
|
+
var searchDepartment = localStorage.getObject(this.searchStoreKey)
|
|
180
|
+
if (searchDepartment) {
|
|
181
|
+
this.restaurants = searchDepartment
|
|
182
|
+
} else {
|
|
183
|
+
this.restaurants = []
|
|
184
|
+
}
|
|
185
|
+
this.getMemoryCacheData('department')
|
|
186
|
+
},
|
|
187
|
+
methods: {
|
|
188
|
+
...utils,
|
|
189
|
+
...departmentTreeService,
|
|
190
|
+
...memoryCacheUtils,
|
|
191
|
+
filterNode(value, data, node) {
|
|
192
|
+
if (!value) {
|
|
193
|
+
return true
|
|
194
|
+
} else {
|
|
195
|
+
return data.name.indexOf(value) !== -1
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
// 选中当前节点及其子节点
|
|
199
|
+
checkedNodeAndChildren(data) {
|
|
200
|
+
// 取消选中状态时,保持节点是展开的状态,不要折叠
|
|
201
|
+
// this.$refs.deparmentTree.store.nodesMap[data.id].expanded = true
|
|
202
|
+
// 获得所有应该选中的节点
|
|
203
|
+
this.$refs.deparmentTree.setChecked(data.id, true)
|
|
204
|
+
const childDepartments = data.childDepartments
|
|
205
|
+
if (childDepartments) {
|
|
206
|
+
// 递归设置子子节点的选中状态
|
|
207
|
+
childDepartments.forEach((nodeData) => {
|
|
208
|
+
this.checkedNodeAndChildren(nodeData)
|
|
209
|
+
})
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
// 取消当前节点的子节点的选中状态
|
|
213
|
+
cancelChildCheckedNodes(data) {
|
|
214
|
+
if (data.id !== this.tenantNodeId) {
|
|
215
|
+
// 如果当前节点不是公司节点,需要将公司节点的选中状态去掉
|
|
216
|
+
this.$refs.deparmentTree.setChecked(this.tenantNodeId, false)
|
|
217
|
+
}
|
|
218
|
+
const childDepartments = data.childDepartments
|
|
219
|
+
if (childDepartments) {
|
|
220
|
+
childDepartments.forEach((nodeData) => {
|
|
221
|
+
// 取消节点的选中状态
|
|
222
|
+
this.$refs.deparmentTree.setChecked(nodeData.id, false)
|
|
223
|
+
// 递归取消子子节点的选中状态
|
|
224
|
+
this.cancelChildCheckedNodes(nodeData)
|
|
225
|
+
})
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
handleCheckChange(data, checked, indeterminate) {},
|
|
229
|
+
handleNodeExpand(data, node, nodeTree) {},
|
|
230
|
+
handleNodeClick(data, node, nodeTree) {
|
|
231
|
+
this.selectSingleNode(data, false)
|
|
232
|
+
},
|
|
233
|
+
selectSingleNode(data, isClickOkBtn) {
|
|
234
|
+
// 表示是部门树节点
|
|
235
|
+
if (this.isDepartmentNode(data)) {
|
|
236
|
+
// 点击的是部门节点,并且是单选树时,点击部门节点直接关闭弹框
|
|
237
|
+
const department = JSON.parse(data.data)
|
|
238
|
+
this.packageSelectResult(department)
|
|
239
|
+
this.setMemoryCacheData(department, 'department')
|
|
240
|
+
// if (this.selectNodeInfo && isClickOkBtn === true) {
|
|
241
|
+
// // 点击确定按钮时才需要调result回调事件,关闭弹框
|
|
242
|
+
// this.$emit('result', this.selectNodeInfo)
|
|
243
|
+
// }
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
packageSelectResult(department) {
|
|
247
|
+
department.tenantName = this.tenantInfo.tenantName
|
|
248
|
+
department.tenantCode = this.tenantInfo.code
|
|
249
|
+
var selectNodeInfo = {
|
|
250
|
+
id: department.id,
|
|
251
|
+
name: department.showName,
|
|
252
|
+
code: department.code,
|
|
253
|
+
containBranch: this.containBranch,
|
|
254
|
+
zhName: department.name,
|
|
255
|
+
enName: department.enName,
|
|
256
|
+
department: department
|
|
257
|
+
}
|
|
258
|
+
this.selectNodeInfo = selectNodeInfo
|
|
259
|
+
},
|
|
260
|
+
isDepartmentNode(data) {
|
|
261
|
+
// 当前节点不是公司节点,也不是分支机构节点,表示是部门节点
|
|
262
|
+
return data.id !== this.tenantNodeId && data.nodeType && data.nodeType === 'DEPARTMENT' && !data.branch
|
|
263
|
+
},
|
|
264
|
+
selectDepartment() {
|
|
265
|
+
// 是否需要显示提示框,默认不显示
|
|
266
|
+
var showTip = false
|
|
267
|
+
// const data = this.$refs.deparmentTree.getCurrentNode()
|
|
268
|
+
if (this.selectNodeInfo) {
|
|
269
|
+
// this.selectSingleNode(data, true)
|
|
270
|
+
$emit(this, 'result', this.selectNodeInfo)
|
|
271
|
+
} else {
|
|
272
|
+
showTip = true
|
|
273
|
+
}
|
|
274
274
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
},
|
|
346
|
-
resultRowDblclick(user) {
|
|
347
|
-
this.packageSelectResult(user)
|
|
348
|
-
$emit(this, 'result', this.selectNodeInfo)
|
|
349
|
-
},
|
|
350
|
-
},
|
|
351
|
-
emits: ['result'],
|
|
275
|
+
if (showTip) {
|
|
276
|
+
this.$alert(this.$t('imatrixUIMessage.pleaseSelectDepartment'), this.$t('imatrixUIMessage.tips'), {
|
|
277
|
+
confirmButtonText: this.$t('imatrixUIPublicModel.sure')
|
|
278
|
+
})
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
// 是否选中了公司节点
|
|
282
|
+
isSelectTenantNode(dataId) {
|
|
283
|
+
return dataId === this.tenantNodeId && (!this.departmentInfo || this.departmentInfo.length === 0)
|
|
284
|
+
},
|
|
285
|
+
// 给节点添加自定义图标
|
|
286
|
+
// renderContent(h, {node, data, store}) {
|
|
287
|
+
// var className
|
|
288
|
+
// if (node.data.id === -1 || node.data.branch) {
|
|
289
|
+
// // node.id ===-1表示公司节点,node.branch表示是分支机构节点
|
|
290
|
+
// className = 'Menu'
|
|
291
|
+
// } else if (node.data.id === -2 || node.data.id === -3) {
|
|
292
|
+
// // node.id ===-2表示集团公司无部门用户节点,node.id ===-3表示是分支机构无部门用户节点
|
|
293
|
+
// className = 'Tickets'
|
|
294
|
+
// } else {
|
|
295
|
+
// // 表示是部门节点
|
|
296
|
+
// className = 'Date'
|
|
297
|
+
// }
|
|
298
|
+
// if (
|
|
299
|
+
// data.nodeType &&
|
|
300
|
+
// data.nodeType === 'DEPARTMENT' &&
|
|
301
|
+
// this.searchValue &&
|
|
302
|
+
// data.name.indexOf(this.searchValue) > -1
|
|
303
|
+
// ) {
|
|
304
|
+
// // 如果是查询条件
|
|
305
|
+
// return h(
|
|
306
|
+
// 'span',
|
|
307
|
+
// h('el-icon', h(className)),
|
|
308
|
+
// h('span', {class: searchResult, title: node.label}, node.label)
|
|
309
|
+
// )
|
|
310
|
+
// // return (
|
|
311
|
+
// // `<span>
|
|
312
|
+
// // <i class={className}></i>
|
|
313
|
+
// // <span class="searchResult" title={node.label}>
|
|
314
|
+
// // {node.label}
|
|
315
|
+
// // </span>
|
|
316
|
+
// // </span>`
|
|
317
|
+
// // )
|
|
318
|
+
// }
|
|
319
|
+
// return h(
|
|
320
|
+
// 'span',
|
|
321
|
+
// h('el-icon', h(className)),
|
|
322
|
+
// h('span', {title: node.label}, node.label)
|
|
323
|
+
// )
|
|
324
|
+
// // return (
|
|
325
|
+
// // `<span>
|
|
326
|
+
// // <i class={className}></i>
|
|
327
|
+
// // <span title={node.label}>{node.label}</span>
|
|
328
|
+
// // </span>`
|
|
329
|
+
// // )
|
|
330
|
+
// },
|
|
331
|
+
getSelectUser(selectUser) {
|
|
332
|
+
// console.log('getSelectUser==', selectUser)
|
|
333
|
+
// this.selectUser = selectUser
|
|
334
|
+
// true参数表示是否是勾选单选框,是勾选单选框时不关闭弹框
|
|
335
|
+
this.packageSelectResult(selectUser)
|
|
336
|
+
// 搜索选中记忆
|
|
337
|
+
this.setMemoryCacheData(selectUser, 'department')
|
|
338
|
+
},
|
|
339
|
+
resultRowDblclick(user) {
|
|
340
|
+
this.packageSelectResult(user)
|
|
341
|
+
$emit(this, 'result', this.selectNodeInfo)
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
emits: ['result']
|
|
352
345
|
}
|
|
353
346
|
</script>
|
|
354
347
|
|
|
355
348
|
<style>
|
|
356
349
|
.searchResult {
|
|
357
|
-
|
|
350
|
+
color: red;
|
|
358
351
|
}
|
|
359
352
|
|
|
360
353
|
.inline-input-custom {
|
|
361
|
-
|
|
354
|
+
width: 100% !important;
|
|
362
355
|
}
|
|
363
356
|
|
|
364
357
|
.el-autocomplete-suggestion.el-popper {
|
|
365
|
-
|
|
358
|
+
min-width: 300px;
|
|
366
359
|
}
|
|
367
360
|
</style>
|