agilebuilder-ui 1.1.36-sit5 → 1.1.36-tmp1
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-dff6f99e.js → 401-c55bdcf2.js} +1 -1
- package/lib/{404-1062cf9d.js → 404-c1dbd5e1.js} +1 -1
- package/lib/{iframe-page-e229c419.js → iframe-page-917912ae.js} +1 -1
- package/lib/{index-09cd1ad3.js → index-6ec53ef7.js} +12676 -12738
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +99 -99
- package/lib/{tab-content-iframe-index-0c3b2101.js → tab-content-iframe-index-46a76242.js} +1 -1
- package/lib/{tab-content-index-dcdefb56.js → tab-content-index-132379e6.js} +1 -1
- package/lib/{tache-subprocess-history-06b435b8.js → tache-subprocess-history-384455d6.js} +1 -1
- package/package.json +1 -1
- package/packages/department-tree/src/department-tree.vue +123 -130
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +466 -435
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +342 -335
- package/packages/department-tree-inline/src/department-tree-inline.vue +11 -18
- package/packages/department-tree-inline/src/department-tree-service.js +11 -10
- package/packages/department-tree-mobile/src/department-tree-app.vue +75 -103
- package/packages/department-tree-mobile/src/department-tree-inline-app.vue +225 -256
- package/packages/department-tree-mobile/src/department-tree-service.ts +75 -98
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +115 -112
- package/packages/department-user-tree/src/department-user-single-tree.vue +88 -85
- package/packages/department-user-tree/src/department-user-tree.vue +119 -127
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +1 -6
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -5
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +11 -18
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +51 -26
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +45 -25
- package/packages/department-user-tree-inline/src/group-user/group-list.vue +90 -97
- package/packages/department-user-tree-inline/src/group-user/group-user.vue +32 -28
- package/packages/department-user-tree-mobile/src/department-user-tree-app.vue +75 -103
- package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +224 -282
- package/packages/department-user-tree-mobile/src/department-user-tree-service.ts +51 -58
- package/packages/fs-preview/src/fs-preview.vue +2 -20
- package/packages/fs-upload-list/src/fs-upload-list.vue +7 -30
- 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 +15 -27
- package/packages/index.js +4 -4
- package/packages/organization-input/src/organization-input.vue +12 -34
- package/packages/super-grid/src/apis.js +4 -21
- package/packages/super-grid/src/dynamic-input.vue +13 -58
- package/packages/super-grid/src/normal-column-content.vue +1 -2
- package/packages/super-grid/src/row-operation.vue +13 -23
- package/packages/super-grid/src/super-grid.vue +42 -51
- package/packages/super-grid/src/utils.js +8 -13
- package/packages/super-icon/src/index.vue +1 -4
- package/packages/workgroup-tree/src/workgroup-tree.vue +110 -117
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +1 -6
- package/packages/workgroup-tree-mobile/src/workgroup-tree-app.vue +75 -103
- package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +208 -229
- package/src/api/sso-service.js +5 -6
- package/src/directives/permission/index.js +4 -4
- package/src/index.js +3 -38
- package/src/store/modules/table.js +1 -0
- package/src/styles/theme/dark-blue/sidebar.scss +0 -9
- package/src/styles/theme/gray/sidebar.scss +8 -9
- package/src/styles/theme/green/sidebar.scss +0 -10
- package/src/styles/theme/ocean-blue/sidebar.scss +0 -9
- package/src/styles/theme/tiffany-blue-mobile/sidebar.scss +0 -9
- package/src/utils/insert_css.js +1 -1
- package/src/utils/util.js +0 -19
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -2
- package/src/views/dsc-component/Sidebar/index.vue +18 -36
- package/src/views/layout/components/Menubar/Item.vue +9 -0
- package/src/views/layout/components/Menubar/SidebarItem.vue +2 -2
- package/src/views/layout/components/Sidebar/Item.vue +1 -4
- package/src/views/layout/components/Sidebar/SidebarItem.vue +2 -2
- package/vite.config.js +1 -1
|
@@ -2,134 +2,117 @@
|
|
|
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%;
|
|
8
|
-
<el-checkbox
|
|
9
|
-
v-if="multiple"
|
|
10
|
-
v-model="checkAll"
|
|
11
|
-
:label="$t('departmentTreeInline.allCheck')"
|
|
12
|
-
value="all"
|
|
13
|
-
@change="changeAllCheck"
|
|
14
|
-
/>
|
|
7
|
+
<div style="flex: 0 0 20%;text-align:left">
|
|
8
|
+
<el-checkbox v-if="multiple" v-model="checkAll" :label="$t('departmentTreeInline.allCheck')" value="all" @change="changeAllCheck" />
|
|
15
9
|
</div>
|
|
16
|
-
<div style="flex: 0 0 80%;
|
|
17
|
-
<el-input
|
|
18
|
-
|
|
19
|
-
|
|
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>
|
|
10
|
+
<div style="flex: 0 0 80%;text-align:right">
|
|
11
|
+
<el-input v-model="searchParam.searchValue" :placeholder="$t('departmentTreeInline.pleaseInputNameOrCode')" @clear="filterAppendNodes" @keyup.enter="filterAppendNodes" @blur="filterAppendNodes" clearable>
|
|
12
|
+
<template v-slot:suffix>
|
|
13
|
+
<el-icon @click="filterAppendNodes"><Search /></el-icon>
|
|
27
14
|
</template>
|
|
28
15
|
</el-input>
|
|
29
16
|
</div>
|
|
30
17
|
</div>
|
|
31
|
-
|
|
18
|
+
</el-col>
|
|
32
19
|
</el-row>
|
|
33
20
|
</el-card>
|
|
34
|
-
<el-card
|
|
21
|
+
<el-card v-if="tenantName" class="card-content" style="height: 40px">
|
|
35
22
|
<el-row class="item-row item-row-all">
|
|
36
23
|
<el-col class="item-label dept-path">
|
|
37
24
|
<el-breadcrumb separator="/">
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
25
|
+
<el-breadcrumb-item>
|
|
26
|
+
<span>{{tenantName}}</span>
|
|
27
|
+
</el-breadcrumb-item>
|
|
41
28
|
</el-breadcrumb>
|
|
42
29
|
</el-col>
|
|
43
30
|
</el-row>
|
|
44
31
|
</el-card>
|
|
45
|
-
<el-card class="card-content org-tree" style="overflow: auto">
|
|
32
|
+
<el-card class="card-content org-tree" style="overflow: auto;">
|
|
46
33
|
<el-tree
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
34
|
+
ref="orgTreeRef"
|
|
35
|
+
:data="departments"
|
|
36
|
+
:show-checkbox="multiple"
|
|
37
|
+
node-key="nodeId"
|
|
38
|
+
check-on-click-node
|
|
39
|
+
:default-checked-keys="defaultCheckedKeys"
|
|
40
|
+
@check-change="handleCheckNode"
|
|
41
|
+
@node-click="handleClickNode"
|
|
42
|
+
>
|
|
43
|
+
<template #default="{ node, data }">
|
|
44
|
+
<div class="item-row">
|
|
45
|
+
<div class="item-label">{{ data.name }}</div>
|
|
46
|
+
<!-- <div v-if="!data.leaf" class="item-side" @click="loadChildren(data,false)">
|
|
60
47
|
<el-icon><ArrowRight /></el-icon>
|
|
61
48
|
</div> -->
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
</el-tree>
|
|
65
52
|
</el-card>
|
|
66
|
-
<el-card
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<span style="padding-left: 10px"
|
|
75
|
-
><el-icon><ArrowUpBold /></el-icon
|
|
76
|
-
></span>
|
|
77
|
-
</span>
|
|
53
|
+
<el-card class="card-footer" style="height: 40px">
|
|
54
|
+
<div style="display: flex;">
|
|
55
|
+
<div class="select-result" @click="showResult">
|
|
56
|
+
<!-- 已选择:6人,其中有一个部门(含子部门) -->
|
|
57
|
+
<span v-if="multiple" @click="showResult">
|
|
58
|
+
<span v-if="selectDepts.length > 0">
|
|
59
|
+
{{$t('departmentTreeInline.selectResultInfoHasSelect')}}{{$t('departmentTreeInline.workgroupTree',{num: selectDepts.length })}}
|
|
60
|
+
<span style="padding-left: 10px"><el-icon><ArrowUpBold /></el-icon></span>
|
|
78
61
|
</span>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
</
|
|
83
|
-
<div class="button-area">
|
|
84
|
-
<el-button size="large" type="primary" @click="saveDept">{{ $t('imatrixUIPublicModel.sure') }}</el-button>
|
|
85
|
-
</div>
|
|
62
|
+
</span>
|
|
63
|
+
<span v-else-if="selectDepts.length > 0">
|
|
64
|
+
{{$t('departmentTreeInline.selectResultInfoHasSelect')}}{{selectDepts[0].name }}
|
|
65
|
+
</span>
|
|
86
66
|
</div>
|
|
67
|
+
<div class="button-area">
|
|
68
|
+
<el-button size="large" type="primary" @click="saveDept">{{$t('imatrixUIPublicModel.sure')}}</el-button>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
87
71
|
</el-card>
|
|
88
|
-
<deptResult ref="deptResultRef" :selectDepts="selectDepts" @removeDept="removeResultDept"
|
|
72
|
+
<deptResult ref="deptResultRef" :selectDepts="selectDepts" @removeDept="removeResultDept"/>
|
|
89
73
|
</div>
|
|
90
74
|
</template>
|
|
91
75
|
|
|
92
|
-
<script
|
|
93
|
-
import { reactive,
|
|
94
|
-
import {
|
|
95
|
-
|
|
96
|
-
|
|
76
|
+
<script setup lang="ts">
|
|
77
|
+
import { reactive,ref,onMounted, defineEmits,Ref } from 'vue'
|
|
78
|
+
import {
|
|
79
|
+
ArrowRight,
|
|
80
|
+
Search,
|
|
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'
|
|
97
85
|
import deptResult from './dept-result.vue'
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
86
|
+
import {ElMessage} from 'element-plus'
|
|
87
|
+
import {useI18n} from "vue-i18n"
|
|
100
88
|
const props = defineProps<{
|
|
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
|
-
type: String
|
|
129
|
-
default: 'code'
|
|
130
|
-
}
|
|
131
|
-
}>()
|
|
132
|
-
const emits = defineEmits(['close'])
|
|
89
|
+
// 是否是多选树,默认是true
|
|
90
|
+
multiple: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: true,
|
|
93
|
+
},
|
|
94
|
+
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
95
|
+
branchInfo: {
|
|
96
|
+
type: Array<any>,
|
|
97
|
+
default: null,
|
|
98
|
+
},
|
|
99
|
+
// 多选部门树时,已选择部门id或部门名称或编码集合,多个之间以逗号隔开
|
|
100
|
+
selectWorkgroupInfo: {
|
|
101
|
+
type: [String, Number],
|
|
102
|
+
default: null,
|
|
103
|
+
},
|
|
104
|
+
// 移除部门时,部门属性名称:id、name、code,默认是id
|
|
105
|
+
searchField: {
|
|
106
|
+
type: String,
|
|
107
|
+
default: 'code',
|
|
108
|
+
},
|
|
109
|
+
// 多选树时结果之间的分隔符,默认是逗号分隔
|
|
110
|
+
separator: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: ','
|
|
113
|
+
}
|
|
114
|
+
}>()
|
|
115
|
+
const emits = defineEmits(["close"])
|
|
133
116
|
const orgTreeRef = ref(null)
|
|
134
117
|
let tenantInfo = ref(null)
|
|
135
118
|
let containBranch = ref(false)
|
|
@@ -141,23 +124,23 @@ let selectDepts = ref([])
|
|
|
141
124
|
let selectDeptNodeIds = ref([])
|
|
142
125
|
let clickDepts = ref([])
|
|
143
126
|
let defaultCheckedKeys = ref([])
|
|
144
|
-
let deptResultRef:
|
|
127
|
+
let deptResultRef:Ref<any> = ref(null)
|
|
145
128
|
let checkAll = ref(false)
|
|
146
129
|
let searchParam = ref({
|
|
147
130
|
searchValue: null,
|
|
148
131
|
treeType: 'GROUP_TREE',
|
|
149
132
|
departmentInfo: null
|
|
150
133
|
})
|
|
151
|
-
const {
|
|
152
|
-
onMounted(()
|
|
153
|
-
initSelectGroups(props.searchField, props.selectWorkgroupInfo,
|
|
134
|
+
const {t} = useI18n()
|
|
135
|
+
onMounted(()=>{
|
|
136
|
+
initSelectGroups(props.searchField, props.selectWorkgroupInfo, props.separator ).then((departments)=>{
|
|
154
137
|
selectDepts.value = departments
|
|
155
138
|
getTenantInfo()
|
|
156
139
|
})
|
|
157
140
|
resizeScrollTargetHeight()
|
|
158
141
|
})
|
|
159
142
|
function getTenantInfo() {
|
|
160
|
-
getTenant().then(
|
|
143
|
+
getTenant().then(data=>{
|
|
161
144
|
const tenantData = data[0].data
|
|
162
145
|
tenantInfo.value = JSON.parse(tenantData)
|
|
163
146
|
containBranch.value = data[0].containBranch
|
|
@@ -167,28 +150,28 @@ function getTenantInfo() {
|
|
|
167
150
|
}
|
|
168
151
|
|
|
169
152
|
function getTenantChildrenDept() {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
153
|
+
getTenantChildren(props.branchInfo, tenantNodeId).then(children=>{
|
|
154
|
+
departments.value = children
|
|
155
|
+
checkedDeptDefault(selectDepts.value, defaultCheckedKeys.value)
|
|
156
|
+
})
|
|
174
157
|
}
|
|
175
158
|
|
|
176
|
-
function
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
159
|
+
function resizeScrollTargetHeight () {
|
|
160
|
+
const scrollTarget = document.querySelector('.org-tree')
|
|
161
|
+
let height = resizeScrollTargetHeightUtil(scrollTarget)
|
|
162
|
+
const titleArea = 110
|
|
163
|
+
const deptPathArea = 60
|
|
164
|
+
const allCheckArea = 60
|
|
165
|
+
const buttonArea = 60
|
|
166
|
+
height = height - titleArea - deptPathArea - allCheckArea - buttonArea
|
|
167
|
+
scrollTarget['style'].height = height + 'px'
|
|
168
|
+
scrollTarget['style'].minHeight = '300px'
|
|
169
|
+
// scrollTarget.style.maxHeight = height + 'px'
|
|
187
170
|
}
|
|
188
171
|
// 点击复选框时处理
|
|
189
172
|
function handleCheckNode(data, check, isChildrenCheck) {
|
|
190
|
-
if
|
|
191
|
-
if
|
|
173
|
+
if(props.multiple){
|
|
174
|
+
if(check) {
|
|
192
175
|
// 表示选择节点时
|
|
193
176
|
addToSelectDept(data)
|
|
194
177
|
} else {
|
|
@@ -199,48 +182,49 @@ function handleCheckNode(data, check, isChildrenCheck) {
|
|
|
199
182
|
}
|
|
200
183
|
|
|
201
184
|
function handleClickNode(data, node, treenode, events) {
|
|
202
|
-
if
|
|
185
|
+
if(!props.multiple && data.nodeType && data.nodeType === 'WORKGROUP') {
|
|
203
186
|
selectDepts.value = [data]
|
|
204
187
|
}
|
|
205
188
|
}
|
|
206
189
|
|
|
190
|
+
|
|
207
191
|
function addToSelectDept(dept) {
|
|
208
192
|
console.log('addToSelectDept---selectDepts.value=', selectDepts.value, 'dept=', dept)
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
193
|
+
if(dept.nodeType && dept.nodeType === 'WORKGROUP') {
|
|
194
|
+
const filterValue = selectDepts.value.filter(item=> item.nodeId === dept.nodeId)
|
|
195
|
+
if(!filterValue || filterValue.length === 0) {
|
|
196
|
+
// 表示集合中没有该记录,需要记录到结果集合中
|
|
197
|
+
selectDepts.value.push(JSON.parse(JSON.stringify(dept)))
|
|
198
|
+
}
|
|
214
199
|
}
|
|
215
|
-
}
|
|
216
200
|
}
|
|
217
201
|
|
|
218
202
|
function removeSelectDept(dept) {
|
|
219
|
-
|
|
203
|
+
const index = selectDepts.value.findIndex(selectItem=> selectItem.nodeId === dept.nodeId)
|
|
220
204
|
console.log('removeSelectDept---selectDepts.value=', selectDepts.value, 'dept=', dept, 'index=', index)
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
205
|
+
if(index !== undefined && index !== -1) {
|
|
206
|
+
// 删除指定元素
|
|
207
|
+
selectDepts.value.splice(index, 1)
|
|
208
|
+
}
|
|
209
|
+
checkAll.value =false
|
|
226
210
|
}
|
|
227
211
|
function changeAllCheck(value: boolean) {
|
|
228
212
|
console.log('changeCheck====value=', value)
|
|
229
|
-
if
|
|
213
|
+
if(props.multiple) {
|
|
230
214
|
// 表示是复选组织树
|
|
231
|
-
if
|
|
215
|
+
if(value){
|
|
232
216
|
// 表示全选时
|
|
233
|
-
const allNodeIds = departments.value.map((item)
|
|
234
|
-
|
|
217
|
+
const allNodeIds = departments.value.map((item)=>{
|
|
218
|
+
return item['nodeId'];
|
|
235
219
|
})
|
|
236
220
|
orgTreeRef.value.setCheckedKeys(allNodeIds, false)
|
|
237
|
-
departments.value.forEach(
|
|
221
|
+
departments.value.forEach(item=>{
|
|
238
222
|
addToSelectDept(item)
|
|
239
223
|
})
|
|
240
224
|
} else {
|
|
241
225
|
// 表示取消全选时
|
|
242
|
-
departments.value.forEach(
|
|
243
|
-
|
|
226
|
+
departments.value.forEach(item=>{
|
|
227
|
+
removeSelectDept(item)
|
|
244
228
|
})
|
|
245
229
|
orgTreeRef.value.setCheckedKeys([], false)
|
|
246
230
|
}
|
|
@@ -277,13 +261,13 @@ function showResult() {
|
|
|
277
261
|
}
|
|
278
262
|
|
|
279
263
|
function removeResultDept(dept) {
|
|
280
|
-
const removeDeptInDepts = selectDepts.value.filter(
|
|
281
|
-
|
|
282
|
-
if
|
|
264
|
+
const removeDeptInDepts = selectDepts.value.filter(item=>item.nodeId === dept.nodeId)
|
|
265
|
+
console.log('removeResultDept-----removeDeptInDepts=', removeDeptInDepts)
|
|
266
|
+
if(removeDeptInDepts && removeDeptInDepts.length > 0) {
|
|
283
267
|
// departments结果存在当前移除的节点时,check-change事件会走removeSelectDept的逻辑
|
|
284
268
|
const selectNodeIds = []
|
|
285
|
-
selectDepts.value.forEach(
|
|
286
|
-
if
|
|
269
|
+
selectDepts.value.forEach(item=>{
|
|
270
|
+
if(item.nodeId !== dept.nodeId) {
|
|
287
271
|
selectNodeIds.push(item.nodeId)
|
|
288
272
|
}
|
|
289
273
|
})
|
|
@@ -294,103 +278,98 @@ function removeResultDept(dept) {
|
|
|
294
278
|
}
|
|
295
279
|
|
|
296
280
|
function saveDept() {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
281
|
+
if (props.multiple) {
|
|
282
|
+
let leafSelectNodeInfo = {
|
|
283
|
+
ids: [],
|
|
284
|
+
names: [],
|
|
285
|
+
codes: [],
|
|
286
|
+
workgroups: []
|
|
287
|
+
}
|
|
288
|
+
// const parentIds = []
|
|
289
|
+
selectDepts.value.forEach(node => {
|
|
290
|
+
// node.data是部门对象的json字符串信息,通过JSON.parse(node.data)将json字符串转为对象
|
|
291
|
+
let departmentData
|
|
292
|
+
// 点开initSelectDepts 查询的数据只有一层
|
|
293
|
+
if (node.data !== null && node.data !== undefined) {
|
|
294
|
+
departmentData = JSON.parse(node.data)
|
|
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
|
+
}
|
|
311
315
|
} else {
|
|
312
|
-
|
|
316
|
+
const dept = selectDepts.value[0]
|
|
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)
|
|
313
333
|
}
|
|
314
|
-
addSelectedDepartmentInfo(leafSelectNodeInfo, node, departmentData)
|
|
315
|
-
})
|
|
316
|
-
let selectNodeInfo = {
|
|
317
|
-
ids: [],
|
|
318
|
-
names: [],
|
|
319
|
-
codes: [],
|
|
320
|
-
workgroups: []
|
|
321
334
|
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
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
|
|
335
|
+
// 将选中的部门节点添加到结果集合中
|
|
336
|
+
function addSelectedDepartmentInfo (result, node, department) {
|
|
337
|
+
result.ids.push(node.id)
|
|
338
|
+
result.codes.push(department.code)
|
|
339
|
+
result.containBranch = containBranch.value
|
|
340
|
+
department.tenantCode = tenantInfo.value.code
|
|
341
|
+
department.tenantName = tenantInfo.value.tenantName
|
|
342
|
+
result.workgroups.push(department)
|
|
343
|
+
const showName = department.name
|
|
344
|
+
// if (this.containBranch && node.branchName) {
|
|
345
|
+
// // 如果包含分支机构,则拼接分支机构名称
|
|
346
|
+
// name = name + '(' + node.branchName + ')'
|
|
347
|
+
// }
|
|
348
|
+
result.names.push(showName)
|
|
347
349
|
}
|
|
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
|
-
}
|
|
366
350
|
|
|
367
|
-
function filterAppendNodes() {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
.post(
|
|
373
|
-
window['$vueApp'].config.globalProperties.baseAPI + '/component/organization-trees/search-mobile-workgroups',
|
|
374
|
-
searchParam.value
|
|
375
|
-
)
|
|
376
|
-
.then((result) => {
|
|
351
|
+
function filterAppendNodes ( ) {
|
|
352
|
+
if (searchParam.value.searchValue) {
|
|
353
|
+
searchParam.value.searchValue = searchParam.value.searchValue.trim()
|
|
354
|
+
searchParam.value.departmentInfo = props.branchInfo
|
|
355
|
+
window['$vueApp'].config.globalProperties.$http.post(window['$vueApp'].config.globalProperties.baseAPI + '/component/organization-trees/search-mobile-workgroups', searchParam.value).then(result => {
|
|
377
356
|
if (result) {
|
|
378
357
|
if (result.length === 0) {
|
|
379
358
|
ElMessage({
|
|
380
359
|
message: t('imatrixUIMessage.queryResultIsEmpty'),
|
|
381
|
-
type: 'warning'
|
|
360
|
+
type: 'warning',
|
|
382
361
|
})
|
|
383
362
|
}
|
|
384
363
|
departments.value = result
|
|
385
364
|
} else {
|
|
386
365
|
ElMessage({
|
|
387
366
|
message: t('imatrixUIMessage.queryResultIsEmpty'),
|
|
388
|
-
type: 'warning'
|
|
367
|
+
type: 'warning',
|
|
389
368
|
})
|
|
390
369
|
}
|
|
391
370
|
})
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
371
|
+
} else {
|
|
372
|
+
getTenantChildrenDept()
|
|
373
|
+
}
|
|
395
374
|
}
|
|
396
|
-
</script>
|
|
375
|
+
</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 forgetPasswordSendMail(username, email) {
|
|
145
|
+
const userInfo = {
|
|
146
|
+
username,
|
|
147
|
+
email,
|
|
148
|
+
}
|
|
149
149
|
return request.post(
|
|
150
150
|
window.$vueApp.config.globalProperties.baseAPI +
|
|
151
151
|
'/sso/forget-passwords/send-mails',
|
|
@@ -236,7 +236,6 @@ export default {
|
|
|
236
236
|
getUserLanguage,
|
|
237
237
|
getUserLangAndTheme,
|
|
238
238
|
forgetPasswordSendMail,
|
|
239
|
-
getForgetPasswordMailType,
|
|
240
239
|
isResetPasswordJwtOverdue,
|
|
241
240
|
resetPassword,
|
|
242
241
|
isLoginTimeOut,
|
|
@@ -4,10 +4,10 @@ const install = function (Vue) {
|
|
|
4
4
|
Vue.directive('permission', permission)
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
if (window.Vue) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
7
|
+
// if (window.Vue) {
|
|
8
|
+
// window['permission'] = permission
|
|
9
|
+
// window.$vueApp.use(install) // eslint-disable-line
|
|
10
|
+
// }
|
|
11
11
|
|
|
12
12
|
permission.install = install
|
|
13
13
|
export default permission
|
package/src/index.js
CHANGED
|
@@ -1,51 +1,16 @@
|
|
|
1
|
-
// 依次导入组件库的各个组件
|
|
2
|
-
// import Breadcrumb from '../packages/breadcrumb'
|
|
3
|
-
// import DepartmentTree from '../packages/department-tree'
|
|
4
|
-
// import Hamburger from '../packages/hamburger'
|
|
5
|
-
// import SvgIcon from '../packages/svg-icon'
|
|
6
|
-
// import SuperGrid from '../packages/super-grid'
|
|
7
|
-
// import DepartmentUserTree from '../packages/department-user-tree'
|
|
8
|
-
// import WorkgroupTree from '../packages/workgroup-tree'
|
|
9
|
-
// import WorkgroupUserTree from '../packages/workgroup-user-tree'
|
|
10
|
-
// import InlineDepartmentTree from '../packages/department-tree-inline'
|
|
11
|
-
// import InlineDepartmentUserTree from '../packages/department-user-tree-inline'
|
|
12
|
-
// import InlineWorkgroupTree from '../packages/workgroup-tree-inline'
|
|
13
|
-
// import InlineWorkgroupUserTree from '../packages/workgroup-user-tree-inline'
|
|
14
|
-
// import WorkflowButton from '../packages/workflow-button'
|
|
15
|
-
// import WorkflowHistoryList from '../packages/workflow-history-list'
|
|
16
1
|
import PreventReclick from '../packages/directives/prevent-reclick'
|
|
17
|
-
// import exportPlugin from '../packages/export-data/index'
|
|
18
|
-
// import ValidCode from '../packages/valid-code'
|
|
19
2
|
import customPlugin from '../packages/plugins/index'
|
|
20
|
-
// import RemoveUser from '../packages/remove-user'
|
|
21
|
-
// import RemoveDepartment from '../packages/remove-department'
|
|
22
|
-
// import RemoveWorkgroup from '../packages/remove-workgroup'
|
|
23
|
-
// import OrganizationInput from '../packages/organization-input'
|
|
24
|
-
// import SuperNineGrid from '../packages/super-nine-grid'
|
|
25
|
-
// import DynamicSourceSelect from '../packages/dynamic-source-select'
|
|
26
|
-
// import FsUpload from '../packages/fs-upload'
|
|
27
|
-
// import ScanCodeInput from '../packages/scan-code-input'
|
|
28
|
-
// import FsPreview from '../packages/fs-preview'
|
|
29
|
-
// import FsUploadList from '../packages/fs-upload-list'
|
|
30
3
|
import { openPage } from './utils/jump-page-utils'
|
|
31
|
-
// import YearRangePicker from '../packages/year-range-picker'
|
|
32
|
-
// import MultipartUpload from '../packages/multipart-upload'
|
|
33
|
-
// import RichEditor from '../packages/rich-editor'
|
|
34
|
-
// import SecretInfo from '../packages/secret-info'
|
|
35
4
|
import plugins from '../packages/plugins/index'
|
|
36
5
|
import permission from './directives/permission'
|
|
37
6
|
|
|
38
7
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
39
8
|
const install = function (Vue) {
|
|
40
|
-
|
|
9
|
+
Vue.directive('prevent-reclick', PreventReclick)
|
|
41
10
|
permission.install(Vue)
|
|
42
|
-
|
|
43
|
-
|
|
11
|
+
Vue.use(customPlugin)
|
|
12
|
+
Vue.use(plugins)
|
|
44
13
|
if (install.installed) return
|
|
45
|
-
// components.map(component => Vue.component(component.name, component))
|
|
46
|
-
// components.forEach(component => {
|
|
47
|
-
// Vue.component(component.name, component)
|
|
48
|
-
// })
|
|
49
14
|
// 将弹出页面方法注册到window对象上
|
|
50
15
|
window['$plateform_openPage'] = openPage
|
|
51
16
|
}
|