agilebuilder-ui 1.1.36 → 1.1.37
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-b8934d65.js → 401-9314ce87.js} +1 -1
- package/lib/{404-743a4631.js → 404-572d631d.js} +1 -1
- package/lib/{iframe-page-5e102433.js → iframe-page-87c9c0d0.js} +1 -1
- package/lib/{index-a0c08bb5.js → index-79b98485.js} +9049 -8969
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +97 -97
- package/lib/{tab-content-iframe-index-e9b465bf.js → tab-content-iframe-index-070ce653.js} +1 -1
- package/lib/{tab-content-index-313404d0.js → tab-content-index-3b98efb4.js} +1 -1
- package/lib/{tache-subprocess-history-7d87cd77.js → tache-subprocess-history-46442012.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 +112 -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 +26 -51
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +25 -45
- 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-preview/src/fs-preview.vue +20 -2
- package/packages/fs-upload-list/src/fs-upload-list.vue +30 -7
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +1 -1
- package/packages/fs-upload-new/src/fs-preview-new.vue +27 -15
- 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 +58 -13
- package/packages/super-grid/src/normal-column-content.vue +1 -1
- package/packages/super-grid/src/row-operation.vue +10 -4
- package/packages/super-grid/src/super-grid.vue +51 -42
- package/packages/super-grid/src/utils.js +13 -8
- package/packages/super-icon/src/index.vue +4 -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/dark-blue/sidebar.scss +9 -0
- package/src/styles/theme/gray/sidebar.scss +9 -8
- package/src/styles/theme/green/sidebar.scss +10 -0
- package/src/styles/theme/ocean-blue/sidebar.scss +9 -0
- package/src/styles/theme/tiffany-blue-mobile/sidebar.scss +9 -0
- package/src/utils/insert_css.js +1 -1
- package/src/utils/util.js +19 -0
- 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
|
@@ -2,117 +2,134 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<el-card class="card-content" style="height: 50px">
|
|
4
4
|
<el-row class="item-row item-row-all">
|
|
5
|
-
<el-col style="width: 100
|
|
5
|
+
<el-col style="width: 100%">
|
|
6
6
|
<div style="display: flex">
|
|
7
|
-
<div style="flex: 0 0 20%;text-align:left">
|
|
8
|
-
<el-checkbox
|
|
7
|
+
<div style="flex: 0 0 20%; text-align: left">
|
|
8
|
+
<el-checkbox
|
|
9
|
+
v-if="multiple"
|
|
10
|
+
v-model="checkAll"
|
|
11
|
+
:label="$t('departmentTreeInline.allCheck')"
|
|
12
|
+
value="all"
|
|
13
|
+
@change="changeAllCheck"
|
|
14
|
+
/>
|
|
9
15
|
</div>
|
|
10
|
-
<div style="flex: 0 0 80%;text-align:right">
|
|
11
|
-
<el-input
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
<div style="flex: 0 0 80%; text-align: right">
|
|
17
|
+
<el-input
|
|
18
|
+
v-model="searchParam.searchValue"
|
|
19
|
+
:placeholder="$t('departmentTreeInline.pleaseInputNameOrCode')"
|
|
20
|
+
@clear="filterAppendNodes"
|
|
21
|
+
@keyup.enter="filterAppendNodes"
|
|
22
|
+
@blur="filterAppendNodes"
|
|
23
|
+
clearable
|
|
24
|
+
>
|
|
25
|
+
<template v-slot:suffix>
|
|
26
|
+
<el-icon @click="filterAppendNodes"><Search /></el-icon>
|
|
14
27
|
</template>
|
|
15
28
|
</el-input>
|
|
16
29
|
</div>
|
|
17
30
|
</div>
|
|
18
|
-
|
|
31
|
+
</el-col>
|
|
19
32
|
</el-row>
|
|
20
33
|
</el-card>
|
|
21
|
-
<el-card
|
|
34
|
+
<el-card v-if="tenantName" class="card-content" style="height: 40px">
|
|
22
35
|
<el-row class="item-row item-row-all">
|
|
23
36
|
<el-col class="item-label dept-path">
|
|
24
37
|
<el-breadcrumb separator="/">
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
38
|
+
<el-breadcrumb-item>
|
|
39
|
+
<span>{{ tenantName }}</span>
|
|
40
|
+
</el-breadcrumb-item>
|
|
28
41
|
</el-breadcrumb>
|
|
29
42
|
</el-col>
|
|
30
43
|
</el-row>
|
|
31
44
|
</el-card>
|
|
32
|
-
<el-card class="card-content org-tree" style="overflow: auto
|
|
45
|
+
<el-card class="card-content org-tree" style="overflow: auto">
|
|
33
46
|
<el-tree
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
ref="orgTreeRef"
|
|
48
|
+
:data="departments"
|
|
49
|
+
:show-checkbox="multiple"
|
|
50
|
+
node-key="nodeId"
|
|
51
|
+
check-on-click-node
|
|
52
|
+
:default-checked-keys="defaultCheckedKeys"
|
|
53
|
+
@check-change="handleCheckNode"
|
|
54
|
+
@node-click="handleClickNode"
|
|
55
|
+
>
|
|
56
|
+
<template #default="{ node, data }">
|
|
57
|
+
<div class="item-row">
|
|
58
|
+
<div class="item-label">{{ data.name }}</div>
|
|
59
|
+
<!-- <div v-if="!data.leaf" class="item-side" @click="loadChildren(data,false)">
|
|
47
60
|
<el-icon><ArrowRight /></el-icon>
|
|
48
61
|
</div> -->
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
</el-tree>
|
|
52
65
|
</el-card>
|
|
53
|
-
<el-card
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
<el-card class="card-footer" style="height: 40px">
|
|
67
|
+
<div style="display: flex">
|
|
68
|
+
<div class="select-result" @click="showResult">
|
|
69
|
+
<!-- 已选择:6人,其中有一个部门(含子部门) -->
|
|
70
|
+
<span v-if="multiple" @click="showResult">
|
|
71
|
+
<span v-if="selectDepts.length > 0">
|
|
72
|
+
{{ $t('departmentTreeInline.selectResultInfoHasSelect')
|
|
73
|
+
}}{{ $t('departmentTreeInline.workgroupTree', { num: selectDepts.length }) }}
|
|
74
|
+
<span style="padding-left: 10px"
|
|
75
|
+
><el-icon><ArrowUpBold /></el-icon
|
|
76
|
+
></span>
|
|
77
|
+
</span>
|
|
61
78
|
</span>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
</
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
79
|
+
<span v-else-if="selectDepts.length > 0">
|
|
80
|
+
{{ $t('departmentTreeInline.selectResultInfoHasSelect') }}{{ selectDepts[0].name }}
|
|
81
|
+
</span>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="button-area">
|
|
84
|
+
<el-button size="large" type="primary" @click="saveDept">{{ $t('imatrixUIPublicModel.sure') }}</el-button>
|
|
85
|
+
</div>
|
|
69
86
|
</div>
|
|
70
|
-
</div>
|
|
71
87
|
</el-card>
|
|
72
|
-
<deptResult ref="deptResultRef" :selectDepts="selectDepts" @removeDept="removeResultDept"/>
|
|
88
|
+
<deptResult ref="deptResultRef" :selectDepts="selectDepts" @removeDept="removeResultDept" />
|
|
73
89
|
</div>
|
|
74
90
|
</template>
|
|
75
91
|
|
|
76
|
-
<script
|
|
77
|
-
import { reactive,ref,onMounted, defineEmits,Ref } from 'vue'
|
|
78
|
-
import {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
ArrowUpBold
|
|
82
|
-
} from '@element-plus/icons-vue'
|
|
83
|
-
import {getTenant, getTenantChildren, checkedDeptDefault, initSelectGroups} from './workgroup-tree-service.ts'
|
|
84
|
-
import {resizeScrollTargetHeightUtil, getDeptNamePath} from '../../utils/organization.ts'
|
|
92
|
+
<script setup lang="ts">
|
|
93
|
+
import { reactive, ref, onMounted, defineEmits, Ref } from 'vue'
|
|
94
|
+
import { ArrowRight, Search, ArrowUpBold } from '@element-plus/icons-vue'
|
|
95
|
+
import { getTenant, getTenantChildren, checkedDeptDefault, initSelectGroups } from './workgroup-tree-service.ts'
|
|
96
|
+
import { resizeScrollTargetHeightUtil, getDeptNamePath } from '../../utils/organization.ts'
|
|
85
97
|
import deptResult from './dept-result.vue'
|
|
86
|
-
import {ElMessage} from 'element-plus'
|
|
87
|
-
import {useI18n} from
|
|
98
|
+
import { ElMessage } from 'element-plus'
|
|
99
|
+
import { useI18n } from 'vue-i18n'
|
|
88
100
|
const props = defineProps<{
|
|
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
|
-
|
|
101
|
+
// 是否是多选树,默认是true
|
|
102
|
+
multiple: {
|
|
103
|
+
type: Boolean
|
|
104
|
+
default: true
|
|
105
|
+
}
|
|
106
|
+
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
107
|
+
branchInfo: {
|
|
108
|
+
type: Array<any>
|
|
109
|
+
default: null
|
|
110
|
+
}
|
|
111
|
+
// 多选部门树时,已选择部门id或部门名称或编码集合,多个之间以逗号隔开
|
|
112
|
+
selectWorkgroupInfo: {
|
|
113
|
+
type: [String, Number]
|
|
114
|
+
default: null
|
|
115
|
+
}
|
|
116
|
+
// 移除部门时,部门属性名称:id、name、code,默认是id
|
|
117
|
+
searchField: {
|
|
118
|
+
type: String
|
|
119
|
+
default: 'code'
|
|
120
|
+
}
|
|
121
|
+
// 多选树时结果之间的分隔符,默认是逗号分隔
|
|
122
|
+
separator: {
|
|
123
|
+
type: String
|
|
124
|
+
default: ','
|
|
125
|
+
}
|
|
126
|
+
// 根据变量限制部门时,根据部门表的哪个字段进行过滤,默认是code
|
|
127
|
+
limitFilterColumn: {
|
|
128
|
+
type: String
|
|
129
|
+
default: 'code'
|
|
130
|
+
}
|
|
131
|
+
}>()
|
|
132
|
+
const emits = defineEmits(['close'])
|
|
116
133
|
const orgTreeRef = ref(null)
|
|
117
134
|
let tenantInfo = ref(null)
|
|
118
135
|
let containBranch = ref(false)
|
|
@@ -124,23 +141,23 @@ let selectDepts = ref([])
|
|
|
124
141
|
let selectDeptNodeIds = ref([])
|
|
125
142
|
let clickDepts = ref([])
|
|
126
143
|
let defaultCheckedKeys = ref([])
|
|
127
|
-
let deptResultRef:Ref<any> = ref(null)
|
|
144
|
+
let deptResultRef: Ref<any> = ref(null)
|
|
128
145
|
let checkAll = ref(false)
|
|
129
146
|
let searchParam = ref({
|
|
130
147
|
searchValue: null,
|
|
131
148
|
treeType: 'GROUP_TREE',
|
|
132
149
|
departmentInfo: null
|
|
133
150
|
})
|
|
134
|
-
const {t} = useI18n()
|
|
135
|
-
onMounted(()=>{
|
|
136
|
-
initSelectGroups(props.searchField, props.selectWorkgroupInfo,
|
|
151
|
+
const { t } = useI18n()
|
|
152
|
+
onMounted(() => {
|
|
153
|
+
initSelectGroups(props.searchField, props.selectWorkgroupInfo, props.separator).then((departments) => {
|
|
137
154
|
selectDepts.value = departments
|
|
138
155
|
getTenantInfo()
|
|
139
156
|
})
|
|
140
157
|
resizeScrollTargetHeight()
|
|
141
158
|
})
|
|
142
159
|
function getTenantInfo() {
|
|
143
|
-
getTenant().then(data=>{
|
|
160
|
+
getTenant().then((data) => {
|
|
144
161
|
const tenantData = data[0].data
|
|
145
162
|
tenantInfo.value = JSON.parse(tenantData)
|
|
146
163
|
containBranch.value = data[0].containBranch
|
|
@@ -150,28 +167,28 @@ function getTenantInfo() {
|
|
|
150
167
|
}
|
|
151
168
|
|
|
152
169
|
function getTenantChildrenDept() {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
170
|
+
getTenantChildren(props.branchInfo, tenantNodeId).then((children) => {
|
|
171
|
+
departments.value = children
|
|
172
|
+
checkedDeptDefault(selectDepts.value, defaultCheckedKeys.value)
|
|
173
|
+
})
|
|
157
174
|
}
|
|
158
175
|
|
|
159
|
-
function
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
176
|
+
function resizeScrollTargetHeight() {
|
|
177
|
+
const scrollTarget = document.querySelector('.org-tree')
|
|
178
|
+
let height = resizeScrollTargetHeightUtil(scrollTarget)
|
|
179
|
+
const titleArea = 110
|
|
180
|
+
const deptPathArea = 60
|
|
181
|
+
const allCheckArea = 60
|
|
182
|
+
const buttonArea = 60
|
|
183
|
+
height = height - titleArea - deptPathArea - allCheckArea - buttonArea
|
|
184
|
+
scrollTarget['style'].height = height + 'px'
|
|
185
|
+
scrollTarget['style'].minHeight = '300px'
|
|
186
|
+
// scrollTarget.style.maxHeight = height + 'px'
|
|
170
187
|
}
|
|
171
188
|
// 点击复选框时处理
|
|
172
189
|
function handleCheckNode(data, check, isChildrenCheck) {
|
|
173
|
-
if(props.multiple){
|
|
174
|
-
if(check) {
|
|
190
|
+
if (props.multiple) {
|
|
191
|
+
if (check) {
|
|
175
192
|
// 表示选择节点时
|
|
176
193
|
addToSelectDept(data)
|
|
177
194
|
} else {
|
|
@@ -182,49 +199,48 @@ function handleCheckNode(data, check, isChildrenCheck) {
|
|
|
182
199
|
}
|
|
183
200
|
|
|
184
201
|
function handleClickNode(data, node, treenode, events) {
|
|
185
|
-
if(!props.multiple && data.nodeType && data.nodeType === 'WORKGROUP') {
|
|
202
|
+
if (!props.multiple && data.nodeType && data.nodeType === 'WORKGROUP') {
|
|
186
203
|
selectDepts.value = [data]
|
|
187
204
|
}
|
|
188
205
|
}
|
|
189
206
|
|
|
190
|
-
|
|
191
207
|
function addToSelectDept(dept) {
|
|
192
208
|
console.log('addToSelectDept---selectDepts.value=', selectDepts.value, 'dept=', dept)
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
209
|
+
if (dept.nodeType && dept.nodeType === 'WORKGROUP') {
|
|
210
|
+
const filterValue = selectDepts.value.filter((item) => item.nodeId === dept.nodeId)
|
|
211
|
+
if (!filterValue || filterValue.length === 0) {
|
|
212
|
+
// 表示集合中没有该记录,需要记录到结果集合中
|
|
213
|
+
selectDepts.value.push(JSON.parse(JSON.stringify(dept)))
|
|
199
214
|
}
|
|
215
|
+
}
|
|
200
216
|
}
|
|
201
217
|
|
|
202
218
|
function removeSelectDept(dept) {
|
|
203
|
-
|
|
219
|
+
const index = selectDepts.value.findIndex((selectItem) => selectItem.nodeId === dept.nodeId)
|
|
204
220
|
console.log('removeSelectDept---selectDepts.value=', selectDepts.value, 'dept=', dept, 'index=', index)
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
221
|
+
if (index !== undefined && index !== -1) {
|
|
222
|
+
// 删除指定元素
|
|
223
|
+
selectDepts.value.splice(index, 1)
|
|
224
|
+
}
|
|
225
|
+
checkAll.value = false
|
|
210
226
|
}
|
|
211
227
|
function changeAllCheck(value: boolean) {
|
|
212
228
|
console.log('changeCheck====value=', value)
|
|
213
|
-
if(props.multiple) {
|
|
229
|
+
if (props.multiple) {
|
|
214
230
|
// 表示是复选组织树
|
|
215
|
-
if(value){
|
|
231
|
+
if (value) {
|
|
216
232
|
// 表示全选时
|
|
217
|
-
const allNodeIds = departments.value.map((item)=>{
|
|
218
|
-
|
|
233
|
+
const allNodeIds = departments.value.map((item) => {
|
|
234
|
+
return item['nodeId']
|
|
219
235
|
})
|
|
220
236
|
orgTreeRef.value.setCheckedKeys(allNodeIds, false)
|
|
221
|
-
departments.value.forEach(item=>{
|
|
237
|
+
departments.value.forEach((item) => {
|
|
222
238
|
addToSelectDept(item)
|
|
223
239
|
})
|
|
224
240
|
} else {
|
|
225
241
|
// 表示取消全选时
|
|
226
|
-
departments.value.forEach(item=>{
|
|
227
|
-
|
|
242
|
+
departments.value.forEach((item) => {
|
|
243
|
+
removeSelectDept(item)
|
|
228
244
|
})
|
|
229
245
|
orgTreeRef.value.setCheckedKeys([], false)
|
|
230
246
|
}
|
|
@@ -261,13 +277,13 @@ function showResult() {
|
|
|
261
277
|
}
|
|
262
278
|
|
|
263
279
|
function removeResultDept(dept) {
|
|
264
|
-
const removeDeptInDepts = selectDepts.value.filter(item=>item.nodeId === dept.nodeId)
|
|
265
|
-
|
|
266
|
-
if(removeDeptInDepts && removeDeptInDepts.length > 0) {
|
|
280
|
+
const removeDeptInDepts = selectDepts.value.filter((item) => item.nodeId === dept.nodeId)
|
|
281
|
+
console.log('removeResultDept-----removeDeptInDepts=', removeDeptInDepts)
|
|
282
|
+
if (removeDeptInDepts && removeDeptInDepts.length > 0) {
|
|
267
283
|
// departments结果存在当前移除的节点时,check-change事件会走removeSelectDept的逻辑
|
|
268
284
|
const selectNodeIds = []
|
|
269
|
-
selectDepts.value.forEach(item=>{
|
|
270
|
-
if(item.nodeId !== dept.nodeId) {
|
|
285
|
+
selectDepts.value.forEach((item) => {
|
|
286
|
+
if (item.nodeId !== dept.nodeId) {
|
|
271
287
|
selectNodeIds.push(item.nodeId)
|
|
272
288
|
}
|
|
273
289
|
})
|
|
@@ -278,98 +294,103 @@ function removeResultDept(dept) {
|
|
|
278
294
|
}
|
|
279
295
|
|
|
280
296
|
function saveDept() {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
} else {
|
|
296
|
-
departmentData = node
|
|
297
|
-
}
|
|
298
|
-
addSelectedDepartmentInfo(leafSelectNodeInfo, node, departmentData)
|
|
299
|
-
})
|
|
300
|
-
let selectNodeInfo = {
|
|
301
|
-
ids: [],
|
|
302
|
-
names: [],
|
|
303
|
-
codes: [],
|
|
304
|
-
workgroups: []
|
|
305
|
-
}
|
|
306
|
-
Object.assign(selectNodeInfo, leafSelectNodeInfo)
|
|
307
|
-
if (selectNodeInfo.ids.length > 0) {
|
|
308
|
-
emits('close', selectNodeInfo)
|
|
309
|
-
} else {
|
|
310
|
-
ElMessage({
|
|
311
|
-
message: t('imatrixUIMessage.pleaseSelectDepartment'),
|
|
312
|
-
type: 'warning',
|
|
313
|
-
})
|
|
314
|
-
}
|
|
297
|
+
if (props.multiple) {
|
|
298
|
+
let leafSelectNodeInfo = {
|
|
299
|
+
ids: [],
|
|
300
|
+
names: [],
|
|
301
|
+
codes: [],
|
|
302
|
+
workgroups: []
|
|
303
|
+
}
|
|
304
|
+
// const parentIds = []
|
|
305
|
+
selectDepts.value.forEach((node) => {
|
|
306
|
+
// node.data是部门对象的json字符串信息,通过JSON.parse(node.data)将json字符串转为对象
|
|
307
|
+
let departmentData
|
|
308
|
+
// 点开initSelectDepts 查询的数据只有一层
|
|
309
|
+
if (node.data !== null && node.data !== undefined) {
|
|
310
|
+
departmentData = JSON.parse(node.data)
|
|
315
311
|
} else {
|
|
316
|
-
|
|
317
|
-
const department = JSON.parse(dept.data)
|
|
318
|
-
const showName = dept.name
|
|
319
|
-
// if (this.containBranch && dept.branchName) {
|
|
320
|
-
// // 如果包含分支机构,则拼接分支机构名称
|
|
321
|
-
// name = name + '(' + dept.branchName + ')'
|
|
322
|
-
// }
|
|
323
|
-
department.tenantName = tenantInfo.value.tenantName
|
|
324
|
-
department.tenantCode = tenantInfo.value.code
|
|
325
|
-
const selectNodeInfo = {
|
|
326
|
-
id: dept.id,
|
|
327
|
-
name: showName,
|
|
328
|
-
code: department.code,
|
|
329
|
-
containBranch: containBranch.value,
|
|
330
|
-
workgroup: department
|
|
331
|
-
}
|
|
332
|
-
emits('close', selectNodeInfo)
|
|
312
|
+
departmentData = node
|
|
333
313
|
}
|
|
314
|
+
addSelectedDepartmentInfo(leafSelectNodeInfo, node, departmentData)
|
|
315
|
+
})
|
|
316
|
+
let selectNodeInfo = {
|
|
317
|
+
ids: [],
|
|
318
|
+
names: [],
|
|
319
|
+
codes: [],
|
|
320
|
+
workgroups: []
|
|
334
321
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
322
|
+
Object.assign(selectNodeInfo, leafSelectNodeInfo)
|
|
323
|
+
if (selectNodeInfo.ids.length > 0) {
|
|
324
|
+
emits('close', selectNodeInfo)
|
|
325
|
+
} else {
|
|
326
|
+
ElMessage({
|
|
327
|
+
message: t('imatrixUIMessage.pleaseSelectDepartment'),
|
|
328
|
+
type: 'warning'
|
|
329
|
+
})
|
|
330
|
+
}
|
|
331
|
+
} else {
|
|
332
|
+
const dept = selectDepts.value[0]
|
|
333
|
+
const department = JSON.parse(dept.data)
|
|
334
|
+
const showName = dept.name
|
|
335
|
+
// if (this.containBranch && dept.branchName) {
|
|
336
|
+
// // 如果包含分支机构,则拼接分支机构名称
|
|
337
|
+
// name = name + '(' + dept.branchName + ')'
|
|
338
|
+
// }
|
|
339
|
+
department.tenantName = tenantInfo.value.tenantName
|
|
340
|
+
department.tenantCode = tenantInfo.value.code
|
|
341
|
+
const selectNodeInfo = {
|
|
342
|
+
id: dept.id,
|
|
343
|
+
name: showName,
|
|
344
|
+
code: department.code,
|
|
345
|
+
containBranch: containBranch.value,
|
|
346
|
+
workgroup: department
|
|
349
347
|
}
|
|
348
|
+
emits('close', selectNodeInfo)
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
// 将选中的部门节点添加到结果集合中
|
|
352
|
+
function addSelectedDepartmentInfo(result, node, department) {
|
|
353
|
+
result.ids.push(node.id)
|
|
354
|
+
result.codes.push(department.code)
|
|
355
|
+
result.containBranch = containBranch.value
|
|
356
|
+
department.tenantCode = tenantInfo.value.code
|
|
357
|
+
department.tenantName = tenantInfo.value.tenantName
|
|
358
|
+
result.workgroups.push(department)
|
|
359
|
+
const showName = department.name
|
|
360
|
+
// if (this.containBranch && node.branchName) {
|
|
361
|
+
// // 如果包含分支机构,则拼接分支机构名称
|
|
362
|
+
// name = name + '(' + node.branchName + ')'
|
|
363
|
+
// }
|
|
364
|
+
result.names.push(showName)
|
|
365
|
+
}
|
|
350
366
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
367
|
+
function filterAppendNodes() {
|
|
368
|
+
if (searchParam.value.searchValue) {
|
|
369
|
+
searchParam.value.searchValue = searchParam.value.searchValue.trim()
|
|
370
|
+
searchParam.value.departmentInfo = props.branchInfo
|
|
371
|
+
window['$vueApp'].config.globalProperties.$http
|
|
372
|
+
.post(
|
|
373
|
+
window['$vueApp'].config.globalProperties.baseAPI + '/component/organization-trees/search-mobile-workgroups',
|
|
374
|
+
searchParam.value
|
|
375
|
+
)
|
|
376
|
+
.then((result) => {
|
|
356
377
|
if (result) {
|
|
357
378
|
if (result.length === 0) {
|
|
358
379
|
ElMessage({
|
|
359
380
|
message: t('imatrixUIMessage.queryResultIsEmpty'),
|
|
360
|
-
type: 'warning'
|
|
381
|
+
type: 'warning'
|
|
361
382
|
})
|
|
362
383
|
}
|
|
363
384
|
departments.value = result
|
|
364
385
|
} else {
|
|
365
386
|
ElMessage({
|
|
366
387
|
message: t('imatrixUIMessage.queryResultIsEmpty'),
|
|
367
|
-
type: 'warning'
|
|
388
|
+
type: 'warning'
|
|
368
389
|
})
|
|
369
390
|
}
|
|
370
391
|
})
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
392
|
+
} else {
|
|
393
|
+
getTenantChildrenDept()
|
|
394
|
+
}
|
|
374
395
|
}
|
|
375
|
-
</script>
|
|
396
|
+
</script>
|
package/src/api/sso-service.js
CHANGED
|
@@ -141,11 +141,11 @@ function getUserLangAndTheme() {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
function
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
144
|
+
function getForgetPasswordMailType(username) {
|
|
145
|
+
return request.get(window.$vueApp.config.globalProperties.baseAPI + '/sso/forget-passwords/mail-type?username=' + username)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function forgetPasswordSendMail(userInfo) {
|
|
149
149
|
return request.post(
|
|
150
150
|
window.$vueApp.config.globalProperties.baseAPI +
|
|
151
151
|
'/sso/forget-passwords/send-mails',
|
|
@@ -236,6 +236,7 @@ export default {
|
|
|
236
236
|
getUserLanguage,
|
|
237
237
|
getUserLangAndTheme,
|
|
238
238
|
forgetPasswordSendMail,
|
|
239
|
+
getForgetPasswordMailType,
|
|
239
240
|
isResetPasswordJwtOverdue,
|
|
240
241
|
resetPassword,
|
|
241
242
|
isLoginTimeOut,
|
|
@@ -220,6 +220,15 @@
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
+
// 注释的原因:会导致孙子菜单显示的位置不正确
|
|
224
|
+
// .sidebar-container-popper .el-menu{
|
|
225
|
+
// // height: 100vh;
|
|
226
|
+
// height: auto;
|
|
227
|
+
// max-height: 100vh;
|
|
228
|
+
// overflow-y: auto;
|
|
229
|
+
// overflow-x: hidden;
|
|
230
|
+
// scroll-behavior: smooth;
|
|
231
|
+
// }
|
|
223
232
|
.sidebar-container-popper .el-submenu__title:not(.is-disabled):hover {
|
|
224
233
|
background: #F7F7F8;
|
|
225
234
|
color: rgba(0, 13, 31, 0.85);
|
|
@@ -189,14 +189,15 @@
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
192
|
+
// 注释的原因:会导致孙子菜单显示的位置不正确
|
|
193
|
+
// .sidebar-container-popper .el-menu{
|
|
194
|
+
// // height: 100vh;
|
|
195
|
+
// height: auto;
|
|
196
|
+
// max-height: 100vh;
|
|
197
|
+
// overflow-y: auto;
|
|
198
|
+
// overflow-x: hidden;
|
|
199
|
+
// scroll-behavior: smooth;
|
|
200
|
+
// }
|
|
200
201
|
|
|
201
202
|
.sidebar-container-popper .el-submenu__title:not(.is-disabled):hover {
|
|
202
203
|
background: #F7F7F8;
|
|
@@ -223,6 +223,16 @@
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
+
// 注释的原因:会导致孙子菜单显示的位置不正确
|
|
227
|
+
// .sidebar-container-popper .el-menu{
|
|
228
|
+
// // height: 100vh;
|
|
229
|
+
// height: auto;
|
|
230
|
+
// max-height: 100vh;
|
|
231
|
+
// overflow-y: auto;
|
|
232
|
+
// overflow-x: hidden;
|
|
233
|
+
// scroll-behavior: smooth;
|
|
234
|
+
// }
|
|
235
|
+
|
|
226
236
|
.sidebar-container-popper .el-submenu__title:not(.is-disabled):hover {
|
|
227
237
|
background: #F7F7F8;
|
|
228
238
|
color: rgba(0, 13, 31, 0.85);
|