imatrix-ui 2.9.18-dw → 2.9.19-boe01
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 -3
- package/src/api/sso-service.js +19 -1
- package/src/assets/nonemessage.png +0 -0
- package/src/i18n/i18n.js +1 -1
- package/src/i18n/langs/cn.js +25 -6
- package/src/i18n/langs/en.js +27 -7
- package/src/permission.js +2 -2
- package/src/plugins.js +3 -3
- package/src/router/index.js +10 -0
- package/src/store/modules/tab-content.js +6 -0
- package/src/store/modules/user.js +32 -2
- package/src/styles/display-layout.scss +1 -1
- package/src/styles/index.scss +74 -4
- package/src/styles/theme/black/font-style.scss +70 -0
- package/src/styles/theme/black/index.scss +6 -30
- package/src/styles/theme/blue/font-style.scss +37 -0
- package/src/styles/theme/blue/index.scss +2 -18
- package/src/styles/theme/blue2/font-style.scss +70 -0
- package/src/styles/theme/blue2/index.scss +3 -13
- package/src/styles/theme/dark-blue/card.scss +4 -6
- package/src/styles/theme/dark-blue/form.scss +7 -4
- package/src/styles/theme/dark-blue/index.scss +30 -5
- package/src/styles/theme/dark-blue/input.scss +4 -1
- package/src/styles/theme/dark-blue/message.scss +8 -0
- package/src/styles/theme/dark-blue/radio.scss +13 -0
- package/src/styles/theme/dark-blue/scrollbar-style.scss +8 -3
- package/src/styles/theme/dark-blue/sidebar.scss +7 -37
- package/src/styles/theme/dark-blue/tab.scss +4 -1
- package/src/styles/theme/dark-blue/table.scss +2 -2
- package/src/styles/theme/dark-blue/tree.scss +35 -10
- package/src/styles/theme/gray/card-style.scss +13 -1
- package/src/styles/theme/gray/font-style.scss +38 -0
- package/src/styles/theme/gray/index.scss +13 -25
- package/src/styles/theme/gray/scrollbar-style.scss +37 -0
- package/src/styles/theme/gray/sidebar.scss +7 -14
- package/src/utils/auth-api.js +47 -1
- package/src/utils/calculator/calculator-util.js +14 -0
- package/src/utils/common-util.js +22 -81
- package/src/utils/jump-page-utils.js +12 -9
- package/src/utils/preview-util.js +32 -0
- package/src/utils/range-selector.js +185 -0
- package/src/utils/request.js +20 -12
- package/src/utils/util.js +13 -11
- package/src/utils/workflow-util.js +3 -0
- package/src/views/dsc-component/Sidebar/Item.vue +7 -5
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -3
- package/src/views/dsc-component/Sidebar/index.vue +14 -22
- package/src/views/dsc-component/tabs/tab-content.vue +8 -9
- package/src/views/layout/EmptyLayout.vue +4 -1
- package/src/views/layout/NewLayout.vue +6 -65
- package/src/views/layout/components/AppMain.vue +2 -1
- package/src/views/layout/components/Breadcrumb/index.vue +1 -1
- package/src/views/layout/components/Menubar/Item.vue +23 -7
- package/src/views/layout/components/Menubar/Link.vue +11 -2
- package/src/views/layout/components/Menubar/SidebarItem.vue +50 -7
- package/src/views/layout/components/Menubar/index.vue +51 -16
- package/src/views/layout/components/Sidebar/index.vue +2 -2
- package/src/views/layout/components/tabs/tab-content.vue +162 -0
- package/src/views/layout/tab-content-iframe-index.vue +31 -0
- package/src/views/layout/tab-content-index.vue +84 -0
- package/src/views/login/index.vue +1 -1
- package/packages/breadcrumb/index.js +0 -6
- package/packages/breadcrumb/src/breadcrumb.vue +0 -71
- package/packages/department-tree/index.js +0 -6
- package/packages/department-tree/src/department-tree.vue +0 -108
- package/packages/department-tree-inline/index.js +0 -6
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +0 -411
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -293
- package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
- package/packages/department-tree-inline/src/department-tree-service.js +0 -275
- package/packages/department-tree-inline/src/search-result.vue +0 -176
- package/packages/department-user-tree/index.js +0 -6
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +0 -116
- package/packages/department-user-tree/src/department-user-single-tree.vue +0 -76
- package/packages/department-user-tree/src/department-user-tree.vue +0 -101
- package/packages/department-user-tree-inline/index.js +0 -6
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +0 -639
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -274
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +0 -79
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -248
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -142
- package/packages/department-user-tree-inline/src/search-result.vue +0 -197
- package/packages/directives/prevent-reclick.js +0 -19
- package/packages/dynamic-source-select/index.js +0 -6
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +0 -70
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +0 -440
- package/packages/dynamic-source-select/src/events.js +0 -55
- package/packages/fs-preview/index.js +0 -6
- package/packages/fs-preview/src/fs-preview.vue +0 -226
- package/packages/fs-upload/index.js +0 -6
- package/packages/fs-upload/src/fs-upload-multi.vue +0 -420
- package/packages/fs-upload/src/fs-upload-single.vue +0 -312
- package/packages/fs-upload/src/fs-upload.vue +0 -189
- package/packages/fs-upload/src/see-big-picture.vue +0 -55
- package/packages/fs-upload-list/index.js +0 -6
- package/packages/fs-upload-list/src/fs-upload-list.vue +0 -287
- package/packages/hamburger/index.js +0 -6
- package/packages/hamburger/src/hamburger.vue +0 -38
- package/packages/index.js +0 -121
- package/packages/multipart-upload/index.js +0 -6
- package/packages/multipart-upload/src/index.vue +0 -73
- package/packages/multipart-upload/src/multipart-upload-form.vue +0 -297
- package/packages/multipart-upload/src/multipart-upload-list.vue +0 -378
- package/packages/organization-input/index.js +0 -6
- package/packages/organization-input/src/organization-input.vue +0 -542
- package/packages/plugins/export-data-new.js +0 -466
- package/packages/plugins/export-data.js +0 -361
- package/packages/plugins/index.js +0 -15
- package/packages/plugins/public-method.js +0 -43
- package/packages/remove-department/index.js +0 -6
- package/packages/remove-department/src/remove-department.vue +0 -172
- package/packages/remove-department/src/remove-dept-service.js +0 -20
- package/packages/remove-user/index.js +0 -6
- package/packages/remove-user/src/remove-user-service.js +0 -20
- package/packages/remove-user/src/remove-user.vue +0 -195
- package/packages/remove-workgroup/index.js +0 -6
- package/packages/remove-workgroup/src/remove-workgroup-service.js +0 -20
- package/packages/remove-workgroup/src/remove-workgroup.vue +0 -159
- package/packages/rich-editor/index.js +0 -7
- package/packages/rich-editor/index.vue +0 -278
- package/packages/rich-editor/langs/zh-Hans.js +0 -1
- package/packages/rich-editor/viewer.vue +0 -103
- package/packages/scan-code-input/index.js +0 -6
- package/packages/scan-code-input/src/events.js +0 -33
- package/packages/scan-code-input/src/scan-code-input-colse.vue +0 -131
- package/packages/scan-code-input/src/scan-code-input.vue +0 -116
- package/packages/secret-info/index.js +0 -7
- package/packages/secret-info/index.vue +0 -90
- package/packages/super-grid/index.js +0 -7
- package/packages/super-grid/src/apis.js +0 -820
- package/packages/super-grid/src/columns-config.vue +0 -335
- package/packages/super-grid/src/custom-formatter.js +0 -278
- package/packages/super-grid/src/dynamic-input.vue +0 -1279
- package/packages/super-grid/src/eventBus.js +0 -2
- package/packages/super-grid/src/events.js +0 -55
- package/packages/super-grid/src/formValidatorUtil.js +0 -226
- package/packages/super-grid/src/formatter.js +0 -181
- package/packages/super-grid/src/group-column.vue +0 -100
- package/packages/super-grid/src/header-context-menu.vue +0 -87
- package/packages/super-grid/src/index-column.vue +0 -51
- package/packages/super-grid/src/normal-column.vue +0 -775
- package/packages/super-grid/src/public-methods.js +0 -31
- package/packages/super-grid/src/row-operation.vue +0 -161
- package/packages/super-grid/src/search-button.vue +0 -66
- package/packages/super-grid/src/search-condition-input.vue +0 -61
- package/packages/super-grid/src/search-condition-list.vue +0 -59
- package/packages/super-grid/src/search-form-advancedQuery.vue +0 -654
- package/packages/super-grid/src/search-form-dialog.vue +0 -79
- package/packages/super-grid/src/search-form-item.vue +0 -405
- package/packages/super-grid/src/search-form-number.vue +0 -38
- package/packages/super-grid/src/search-form-open.vue +0 -170
- package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -196
- package/packages/super-grid/src/search-form.vue +0 -642
- package/packages/super-grid/src/search-methods.js +0 -448
- package/packages/super-grid/src/selection-column.vue +0 -43
- package/packages/super-grid/src/store.js +0 -3
- package/packages/super-grid/src/super-grid-service.js +0 -593
- package/packages/super-grid/src/super-grid.vue +0 -2873
- package/packages/super-grid/src/utils.js +0 -772
- package/packages/super-grid/src/view-image-dialog.vue +0 -130
- package/packages/super-nine-grid/index.js +0 -7
- package/packages/super-nine-grid/src/apis.js +0 -103
- package/packages/super-nine-grid/src/custom-formatter.js +0 -66
- package/packages/super-nine-grid/src/formatter.js +0 -132
- package/packages/super-nine-grid/src/search-form-number.vue +0 -38
- package/packages/super-nine-grid/src/search-form.vue +0 -430
- package/packages/super-nine-grid/src/search-methods.js +0 -134
- package/packages/super-nine-grid/src/store.js +0 -3
- package/packages/super-nine-grid/src/super-grid-service.js +0 -91
- package/packages/super-nine-grid/src/super-nine-grid.vue +0 -872
- package/packages/super-nine-grid/src/utils.js +0 -261
- package/packages/svg-icon/index.js +0 -6
- package/packages/svg-icon/src/svg-icon.vue +0 -43
- package/packages/utils/memory-cache-utils.js +0 -90
- package/packages/utils/utils.js +0 -152
- package/packages/utils/value-set.js +0 -86
- package/packages/valid-code/index.js +0 -7
- package/packages/valid-code/src/valid-code.vue +0 -95
- package/packages/workflow-button/index.js +0 -6
- package/packages/workflow-button/src/workflow-button.vue +0 -325
- package/packages/workflow-history-list/index.js +0 -6
- package/packages/workflow-history-list/src/api.js +0 -7
- package/packages/workflow-history-list/src/workflow-history-list.vue +0 -185
- package/packages/workgroup-tree/index.js +0 -6
- package/packages/workgroup-tree/src/workgroup-tree.vue +0 -76
- package/packages/workgroup-tree-inline/index.js +0 -6
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +0 -317
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +0 -43
- package/packages/workgroup-user-tree/index.js +0 -6
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +0 -100
- package/packages/workgroup-user-tree-inline/index.js +0 -6
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -163
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +0 -436
- package/packages/year-range-picker/index.js +0 -6
- package/packages/year-range-picker/src/year-range-picker.vue +0 -51
- package/src/index.js +0 -93
- package/src/styles/theme/gray/form-style.scss +0 -41
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<inline-department-multi-tree
|
|
4
|
-
v-if="multiple"
|
|
5
|
-
ref="inlineDeparmentTree"
|
|
6
|
-
:height="height"
|
|
7
|
-
:check-strictly="checkStrictly"
|
|
8
|
-
:department-info="departmentInfo"
|
|
9
|
-
:select-department-info="selectDepartmentInfo"
|
|
10
|
-
:search-field="searchField"
|
|
11
|
-
:separator="separator"
|
|
12
|
-
@result="result"
|
|
13
|
-
/>
|
|
14
|
-
<inline-department-single-tree
|
|
15
|
-
v-if="!multiple"
|
|
16
|
-
ref="inlineDeparmentTree"
|
|
17
|
-
:department-info="departmentInfo"
|
|
18
|
-
@result="result"
|
|
19
|
-
/>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script>
|
|
24
|
-
import InlineDepartmentMultiTree from './department-multi-tree-inline.vue'
|
|
25
|
-
import InlineDepartmentSingleTree from './department-single-tree-inline.vue'
|
|
26
|
-
export default {
|
|
27
|
-
name: 'InlineDepartmentTree',
|
|
28
|
-
components: {
|
|
29
|
-
InlineDepartmentMultiTree,
|
|
30
|
-
InlineDepartmentSingleTree
|
|
31
|
-
},
|
|
32
|
-
props: {
|
|
33
|
-
// 是否是多选树,默认是true
|
|
34
|
-
multiple: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: true
|
|
37
|
-
},
|
|
38
|
-
checkStrictly: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: false
|
|
41
|
-
},
|
|
42
|
-
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
43
|
-
departmentInfo: {
|
|
44
|
-
type: Array,
|
|
45
|
-
default: null
|
|
46
|
-
},
|
|
47
|
-
// 弹框的高度
|
|
48
|
-
height: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: '300px'
|
|
51
|
-
},
|
|
52
|
-
// 多选部门树时,已选择部门id或部门名称或编码集合,多个之间以逗号隔开
|
|
53
|
-
selectDepartmentInfo: {
|
|
54
|
-
type: [String, Number],
|
|
55
|
-
default: null
|
|
56
|
-
},
|
|
57
|
-
// 移除部门时,部门属性名称:id、name、code,默认是id
|
|
58
|
-
searchField: {
|
|
59
|
-
type: String,
|
|
60
|
-
default: 'id'
|
|
61
|
-
},
|
|
62
|
-
// 多选树时结果之间的分隔符,默认是逗号分隔
|
|
63
|
-
separator: {
|
|
64
|
-
type: String,
|
|
65
|
-
default: ','
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
data() {
|
|
69
|
-
return {
|
|
70
|
-
selectNodeInfo: null // 单选时,选择的用户信息
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
mounted() {
|
|
74
|
-
},
|
|
75
|
-
methods: {
|
|
76
|
-
result(selectNodeInfo) {
|
|
77
|
-
this.selectNodeInfo = selectNodeInfo
|
|
78
|
-
this.$emit('result', selectNodeInfo)
|
|
79
|
-
},
|
|
80
|
-
selectDepartment() {
|
|
81
|
-
this.$refs.inlineDeparmentTree.selectDepartment()
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
</script>
|
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
import { getI18n } from '../../../src/utils/util'
|
|
3
|
-
const departmentTreeService = {
|
|
4
|
-
// 后台查询部门,并拼接树节点
|
|
5
|
-
filterAppendNodes(value) {
|
|
6
|
-
this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/search-pc-depts', this.searchParam).then(result => {
|
|
7
|
-
if (result) {
|
|
8
|
-
if (result.length === 0) {
|
|
9
|
-
this.searchResult = []
|
|
10
|
-
this.$message({
|
|
11
|
-
showClose: true,
|
|
12
|
-
type: 'error',
|
|
13
|
-
message: getI18n().t('imatrixUIMessage.queryResultIsEmpty')
|
|
14
|
-
})
|
|
15
|
-
return
|
|
16
|
-
}
|
|
17
|
-
this.searchResult = result
|
|
18
|
-
// result的格式为[DEPARTMENT~1,DEPARTMENT~1/DEPARTMENT~4,DEPARTMENT~10]
|
|
19
|
-
// result.forEach(nodeIds => {
|
|
20
|
-
// // nodeId的分隔符
|
|
21
|
-
// var nodeIdSeparator = '/'
|
|
22
|
-
// const nodeIdArr = nodeIds.split(nodeIdSeparator)
|
|
23
|
-
// if (nodeIdArr.length > 0) {
|
|
24
|
-
// this.loadDepartmentWhenSearch(0, nodeIdArr)
|
|
25
|
-
// }
|
|
26
|
-
// })
|
|
27
|
-
} else {
|
|
28
|
-
this.$message({
|
|
29
|
-
showClose: true,
|
|
30
|
-
type: 'error',
|
|
31
|
-
message: getI18n().t('imatrixUIMessage.queryResultIsEmpty')
|
|
32
|
-
})
|
|
33
|
-
}
|
|
34
|
-
})
|
|
35
|
-
},
|
|
36
|
-
search(value) {
|
|
37
|
-
this.searchValue = value
|
|
38
|
-
let mySearchValue = value
|
|
39
|
-
if (mySearchValue) {
|
|
40
|
-
mySearchValue = mySearchValue.trim()
|
|
41
|
-
}
|
|
42
|
-
this.searchParam.searchValue = mySearchValue
|
|
43
|
-
this.searchParam.departmentInfo = this.departmentInfo
|
|
44
|
-
// 后台查询部门,并拼接树节点
|
|
45
|
-
this.filterAppendNodes(value)
|
|
46
|
-
},
|
|
47
|
-
handleSelect(item) {
|
|
48
|
-
// this.handleSelectUtil(item, localStorage)
|
|
49
|
-
// 查询最新部门信息替换,缓存为历史数据 数据库可能发生变化
|
|
50
|
-
this.$http.get(Vue.prototype.baseAPI + '/api/departments?departmentCode=' + item.code).then(departmentDTO => {
|
|
51
|
-
if (departmentDTO !== null) {
|
|
52
|
-
for (const dtoKey in departmentDTO) {
|
|
53
|
-
if (item.hasOwnProperty(dtoKey)) {
|
|
54
|
-
item[dtoKey] = departmentDTO[dtoKey]
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
this.filterText = ''
|
|
59
|
-
this.searchValue = ''
|
|
60
|
-
this.setMemoryCacheData(item, 'department')
|
|
61
|
-
if (this.multiple) {
|
|
62
|
-
const index = this.selectResult.findIndex(selectEntity => selectEntity.code === item.code)
|
|
63
|
-
if (index < 0) {
|
|
64
|
-
this.selectResult.push(item)
|
|
65
|
-
}
|
|
66
|
-
} else {
|
|
67
|
-
this.packageSelectResult(item)
|
|
68
|
-
// 关闭弹窗
|
|
69
|
-
this.$emit('result', this.selectNodeInfo)
|
|
70
|
-
}
|
|
71
|
-
})
|
|
72
|
-
},
|
|
73
|
-
querySearch(queryString, cb) {
|
|
74
|
-
if (!this.filterText && this.filterText.length === 0) {
|
|
75
|
-
this.memorySearch(queryString, cb)
|
|
76
|
-
} else {
|
|
77
|
-
this.search(this.filterText)
|
|
78
|
-
cb([])
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
// 点击查询按钮调用的方法
|
|
82
|
-
clickSearch() {
|
|
83
|
-
this.storeSeachValue()
|
|
84
|
-
this.search(this.filterText)
|
|
85
|
-
},
|
|
86
|
-
loadDepartmentWhenSearch(n, nodeIdArr) {
|
|
87
|
-
return new Promise((resolve, reject) => {
|
|
88
|
-
if (nodeIdArr.length === n) {
|
|
89
|
-
resolve()
|
|
90
|
-
} else {
|
|
91
|
-
const nodeId = nodeIdArr[n]
|
|
92
|
-
let dataId = nodeId
|
|
93
|
-
// 节点类型和数据id的分隔符
|
|
94
|
-
const nodeTypeAndDataIdSeparator = '~'
|
|
95
|
-
// nodeId格式为DEPARTMENT~4
|
|
96
|
-
if (nodeId.indexOf(nodeTypeAndDataIdSeparator) > -1) {
|
|
97
|
-
dataId = nodeId.substring(nodeId.indexOf('~') + 1)
|
|
98
|
-
}
|
|
99
|
-
this.loadDepartment(dataId).then(() => {
|
|
100
|
-
this.loadDepartmentWhenSearch(++n, nodeIdArr)
|
|
101
|
-
}).catch((error) => {
|
|
102
|
-
reject(error)
|
|
103
|
-
})
|
|
104
|
-
}
|
|
105
|
-
})
|
|
106
|
-
},
|
|
107
|
-
// 点击复选框时处理
|
|
108
|
-
handleCheckNode(data, checkObj) {
|
|
109
|
-
if (checkObj.checkedKeys.indexOf(data.id) > -1) {
|
|
110
|
-
// 表示正选中data节点
|
|
111
|
-
this.isloading = true
|
|
112
|
-
if (data.nodeType && data.nodeType === 'DEPARTMENT' && data.data) {
|
|
113
|
-
// 表示当前选中的节点是部门
|
|
114
|
-
const department = JSON.parse(data.data)
|
|
115
|
-
this.selectUser(null, department)
|
|
116
|
-
}
|
|
117
|
-
if (data.childDepartments) {
|
|
118
|
-
// 如果已展开,不需要再走后台获得其子节点。只需要选中已有子节点
|
|
119
|
-
// 展开当前选中的节点
|
|
120
|
-
this.$refs.deparmentTree.store.nodesMap[data.id].expanded = true
|
|
121
|
-
// 选中当前节点及其子节点
|
|
122
|
-
this.checkedNodeAndChildren(data)
|
|
123
|
-
this.isloading = false
|
|
124
|
-
} else {
|
|
125
|
-
// 当前节点未展开。需要走后台获得当前节点的子节点,然后展开当前节点,然后选中这些子节点
|
|
126
|
-
if (!data.leaf) {
|
|
127
|
-
// 不是叶子节点,并且没有加载过该父节点的子节点时,需要走后台展开子节点
|
|
128
|
-
this.$http.get(Vue.prototype.baseAPI + '/component/organization-trees/departments/' + data.id).then(result => {
|
|
129
|
-
// 更新当前点击的节点的子节点
|
|
130
|
-
this.$refs.deparmentTree.updateKeyChildren(data.id, result)
|
|
131
|
-
// 展开当前选中的节点
|
|
132
|
-
this.$refs.deparmentTree.store.nodesMap[data.id].expanded = true
|
|
133
|
-
// 获得所有应该选中的节点
|
|
134
|
-
this.checkedNodeAndChildren(data)
|
|
135
|
-
})
|
|
136
|
-
this.$http.get(Vue.prototype.baseAPI + '/component/organization-trees/child-departments/' + data.id).then(childDepts => {
|
|
137
|
-
if (childDepts && !this.checkStrictly) {
|
|
138
|
-
childDepts.forEach(item => {
|
|
139
|
-
this.selectUser(null, item)
|
|
140
|
-
})
|
|
141
|
-
this.isloading = false
|
|
142
|
-
}
|
|
143
|
-
})
|
|
144
|
-
} else {
|
|
145
|
-
// 如果是叶子节点则不需要loading状态
|
|
146
|
-
this.isloading = false
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
} else {
|
|
150
|
-
// 表示正取消选中data节点,同时要取消其子节点的选中状态
|
|
151
|
-
this.cancelChildCheckedNodes(data)
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
// 初始化树 或 点击三角展开节点时动态加载子节点
|
|
155
|
-
loadNode(node, resolve) {
|
|
156
|
-
var parentId = 0
|
|
157
|
-
if (node.level === 0) {
|
|
158
|
-
// 表示初始化树
|
|
159
|
-
parentId = 0
|
|
160
|
-
} else {
|
|
161
|
-
parentId = node.data.id
|
|
162
|
-
}
|
|
163
|
-
var checkedKeys = []
|
|
164
|
-
if (this.$refs.deparmentTree) {
|
|
165
|
-
checkedKeys = this.$refs.deparmentTree.getCheckedKeys()
|
|
166
|
-
}
|
|
167
|
-
// 初始化部门树
|
|
168
|
-
this.initLoadDepartment(parentId, node, resolve, checkedKeys)
|
|
169
|
-
},
|
|
170
|
-
// 初始化部门树
|
|
171
|
-
initLoadDepartment(parentId, node, resolve, checkedKeys) {
|
|
172
|
-
this.$http.get(Vue.prototype.baseAPI + '/component/organization-trees/departments/' + parentId).then(data => {
|
|
173
|
-
resolve(data)
|
|
174
|
-
// 更新当前点击的节点的子节点
|
|
175
|
-
this.$refs.deparmentTree.updateKeyChildren(parentId, data)
|
|
176
|
-
if (parentId === 0) {
|
|
177
|
-
// 初始化树时,展开公司节点
|
|
178
|
-
const tenantData = data[0].data
|
|
179
|
-
data[0].disable = true
|
|
180
|
-
this.tenantInfo = JSON.parse(tenantData)
|
|
181
|
-
this.containBranch = data[0].containBranch
|
|
182
|
-
if (this.departmentInfo && this.departmentInfo.length > 0) {
|
|
183
|
-
// 加载指定部门时,展开公司节点
|
|
184
|
-
this.loadPointDepartments()
|
|
185
|
-
} else {
|
|
186
|
-
// 加载整个组织结构树时,展开公司节点
|
|
187
|
-
this.loadDepartment(this.tenantNodeId)
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
if (this.isClickNode) {
|
|
192
|
-
// 点击当前节点时,加载树节点时
|
|
193
|
-
// 注意不是点击复选框时
|
|
194
|
-
this.isClickNode = false
|
|
195
|
-
this.checkedNodeAndChildren(node.data)
|
|
196
|
-
} else {
|
|
197
|
-
// 表示是点击三角展开节点时
|
|
198
|
-
if (checkedKeys && checkedKeys.indexOf(parentId) > -1) {
|
|
199
|
-
// 点击部门名称前的三角标识展开节点时,保持当前节点的选中状态
|
|
200
|
-
// 表示当前展开的节点是选中状态,则应保持其选中状态,并选中其子节点
|
|
201
|
-
this.checkedNodeAndChildren(node.data)
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
})
|
|
205
|
-
},
|
|
206
|
-
// 加载当前节点的子节点
|
|
207
|
-
loadDepartment(parentId, isSearch, searchValue) {
|
|
208
|
-
return new Promise((resolve, reject) => {
|
|
209
|
-
this.$http.get(Vue.prototype.baseAPI + '/component/organization-trees/departments/' + parentId).then(children => {
|
|
210
|
-
this.$refs.deparmentTree.updateKeyChildren(parentId, children)
|
|
211
|
-
if (this.$refs.deparmentTree.store.nodesMap[parentId]) {
|
|
212
|
-
this.$refs.deparmentTree.store.nodesMap[parentId].expanded = true
|
|
213
|
-
}
|
|
214
|
-
resolve()
|
|
215
|
-
}).catch((error) => {
|
|
216
|
-
console.log('error', error)
|
|
217
|
-
})
|
|
218
|
-
})
|
|
219
|
-
},
|
|
220
|
-
// 加载指定部门节点
|
|
221
|
-
loadPointDepartments() {
|
|
222
|
-
this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/point-departments', this.departmentInfo).then(children => {
|
|
223
|
-
this.$refs.deparmentTree.updateKeyChildren(this.tenantNodeId, children)
|
|
224
|
-
if (this.$refs.deparmentTree.store.nodesMap[this.tenantNodeId]) {
|
|
225
|
-
this.$refs.deparmentTree.store.nodesMap[this.tenantNodeId].expanded = true
|
|
226
|
-
}
|
|
227
|
-
})
|
|
228
|
-
},
|
|
229
|
-
getSelectDepts(searchField, selectDeptInfo, separator) {
|
|
230
|
-
return new Promise((resolve, reject) => {
|
|
231
|
-
if (!searchField) {
|
|
232
|
-
resolve([])
|
|
233
|
-
} else if (!selectDeptInfo) {
|
|
234
|
-
resolve([])
|
|
235
|
-
} else {
|
|
236
|
-
this.$http.get(Vue.prototype.baseAPI + '/component/organization-trees/select-departments?searchField=' + searchField + '&selectDeptInfo=' + selectDeptInfo + '&separator=' + separator).then(departments => {
|
|
237
|
-
resolve(departments)
|
|
238
|
-
}).catch(error => {
|
|
239
|
-
reject(error)
|
|
240
|
-
})
|
|
241
|
-
}
|
|
242
|
-
})
|
|
243
|
-
},
|
|
244
|
-
// 选中了组织结构树的根节点
|
|
245
|
-
packageAllDept() {
|
|
246
|
-
// 表示集合中不存在该用户,则封装该用户
|
|
247
|
-
var allDept = {
|
|
248
|
-
id: this.tenantNodeId,
|
|
249
|
-
name: '所有部门'
|
|
250
|
-
}
|
|
251
|
-
return allDept
|
|
252
|
-
},
|
|
253
|
-
initSelectDepts() {
|
|
254
|
-
return new Promise((resolve, reject) => {
|
|
255
|
-
const selectDepts = []
|
|
256
|
-
if (this.selectDepartmentInfo) {
|
|
257
|
-
if (this.selectDepartmentInfo === this.tenantNodeId || this.selectDepartmentInfo === '所有部门') {
|
|
258
|
-
// 表示已选择所有用户
|
|
259
|
-
selectDepts.push(this.packageAllDept())
|
|
260
|
-
resolve(selectDepts)
|
|
261
|
-
} else {
|
|
262
|
-
// 表示不是选择的所有用户
|
|
263
|
-
this.getSelectDepts(this.searchField, this.selectDepartmentInfo, this.separator).then(departments => {
|
|
264
|
-
resolve(departments)
|
|
265
|
-
}).catch(error => {
|
|
266
|
-
reject(error)
|
|
267
|
-
})
|
|
268
|
-
}
|
|
269
|
-
} else {
|
|
270
|
-
resolve(selectDepts)
|
|
271
|
-
}
|
|
272
|
-
})
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
export default departmentTreeService
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="height: 100%">
|
|
3
|
-
<el-table
|
|
4
|
-
ref="superGrid"
|
|
5
|
-
:data="gridData"
|
|
6
|
-
row-key="id"
|
|
7
|
-
:row-class-name="tableRowClassName"
|
|
8
|
-
:max-height="myHeight"
|
|
9
|
-
border
|
|
10
|
-
fit
|
|
11
|
-
@row-click="rowClick"
|
|
12
|
-
@row-dblclick="rowDblclick"
|
|
13
|
-
>
|
|
14
|
-
<el-table-column v-if="multiple === false" width="60">
|
|
15
|
-
<template slot-scope="scope">
|
|
16
|
-
<el-radio v-model="singleUserIndex" :label="scope.$index" @change="selectUser">
|
|
17
|
-
{{ scope.$index+1 }}
|
|
18
|
-
</el-radio>
|
|
19
|
-
</template>
|
|
20
|
-
</el-table-column>
|
|
21
|
-
<el-table-column v-if="multiple && isSearchResult" fixed :label="$t('imatrixUIPublicModel.edit')" align="center" width="60px">
|
|
22
|
-
<template slot-scope="scope">
|
|
23
|
-
<div>
|
|
24
|
-
<el-button type="primary" size="mini" icon="el-icon-plus" :disabled="isDisable(scope.row)" circle @click="addUser(scope.$index, scope.row)" />
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
27
|
-
</el-table-column>
|
|
28
|
-
<el-table-column v-if="multiple" :label="$t('superGrid.index')" align="center" width="60px">
|
|
29
|
-
<template slot-scope="scope">
|
|
30
|
-
{{ scope.$index+1 }}
|
|
31
|
-
</template>
|
|
32
|
-
</el-table-column>
|
|
33
|
-
<el-table-column v-if="multiple && !isSearchResult" fixed :label="$t('imatrixUIPublicModel.edit')" align="center" width="60px">
|
|
34
|
-
<template slot-scope="scope">
|
|
35
|
-
<div>
|
|
36
|
-
<el-button type="danger" size="mini" icon="el-icon-delete" circle @click="removeUser(scope.$index, scope.row)" />
|
|
37
|
-
</div>
|
|
38
|
-
</template>
|
|
39
|
-
</el-table-column>
|
|
40
|
-
<el-table-column
|
|
41
|
-
:label="$t('departmentTreeInline.name')"
|
|
42
|
-
:width="170"
|
|
43
|
-
prop="name"
|
|
44
|
-
>
|
|
45
|
-
<template slot-scope="scope">
|
|
46
|
-
<span class="ellipsis cell--span" :title="scope.row.showName">{{ scope.row.showName }}</span>
|
|
47
|
-
</template>
|
|
48
|
-
</el-table-column>
|
|
49
|
-
<el-table-column
|
|
50
|
-
:label="$t('departmentTreeInline.code')"
|
|
51
|
-
:width="140"
|
|
52
|
-
prop="code"
|
|
53
|
-
>
|
|
54
|
-
<template slot-scope="scope">
|
|
55
|
-
<span class="ellipsis cell--span" :title="scope.row.code">{{ scope.row.code }}</span>
|
|
56
|
-
</template>
|
|
57
|
-
</el-table-column>
|
|
58
|
-
<el-table-column
|
|
59
|
-
:label="$t('departmentTreeInline.namePath')"
|
|
60
|
-
:width="140"
|
|
61
|
-
prop="namePath"
|
|
62
|
-
>
|
|
63
|
-
<template slot-scope="scope">
|
|
64
|
-
<span class="ellipsis cell--span" :title="scope.row.namePath">{{ scope.row.namePath }}</span>
|
|
65
|
-
</template>
|
|
66
|
-
</el-table-column>
|
|
67
|
-
</el-table>
|
|
68
|
-
</div>
|
|
69
|
-
</template>
|
|
70
|
-
<style>
|
|
71
|
-
.searchResult {
|
|
72
|
-
color:red
|
|
73
|
-
}
|
|
74
|
-
.inline-select-custom {
|
|
75
|
-
width : 100px
|
|
76
|
-
}
|
|
77
|
-
.inline-input-custom {
|
|
78
|
-
width : 98%
|
|
79
|
-
}
|
|
80
|
-
</style>
|
|
81
|
-
<script>
|
|
82
|
-
export default {
|
|
83
|
-
name: 'UserResult',
|
|
84
|
-
props: {
|
|
85
|
-
gridData: {
|
|
86
|
-
type: Array,
|
|
87
|
-
default: null
|
|
88
|
-
},
|
|
89
|
-
containBranch: {
|
|
90
|
-
type: Boolean,
|
|
91
|
-
default: false
|
|
92
|
-
},
|
|
93
|
-
multiple: {
|
|
94
|
-
type: Boolean,
|
|
95
|
-
default: false
|
|
96
|
-
},
|
|
97
|
-
// 多选树时是否是查询结果列表,用于控制“操作”列按钮的显示
|
|
98
|
-
isSearchResult: {
|
|
99
|
-
type: Boolean,
|
|
100
|
-
default: true
|
|
101
|
-
},
|
|
102
|
-
height: {
|
|
103
|
-
type: String,
|
|
104
|
-
default: '300px'
|
|
105
|
-
},
|
|
106
|
-
selectResult: {
|
|
107
|
-
type: Array,
|
|
108
|
-
default: function() {
|
|
109
|
-
return []
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
data() {
|
|
115
|
-
let tableHeight = this.height
|
|
116
|
-
tableHeight = tableHeight.substring(0, tableHeight.indexOf('px'))
|
|
117
|
-
const myHeight = (parseInt(tableHeight) + 30) + 'px'
|
|
118
|
-
return {
|
|
119
|
-
singleUserIndex: null, // 选中的用户序号
|
|
120
|
-
selectedUser: null,
|
|
121
|
-
myHeight
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
created() {
|
|
125
|
-
console.log('search-result---', this.gridData)
|
|
126
|
-
},
|
|
127
|
-
methods: {
|
|
128
|
-
// 单选树时,点击行事件
|
|
129
|
-
// rowClick(row, column, event) {
|
|
130
|
-
// this.selectedUser = row
|
|
131
|
-
// // this.$emit('rowClick', row, column, event)
|
|
132
|
-
// },
|
|
133
|
-
// 移除用户
|
|
134
|
-
removeUser(index, row) {
|
|
135
|
-
this.$emit('removeUser', index, row)
|
|
136
|
-
},
|
|
137
|
-
// 添加用户
|
|
138
|
-
addUser(index, row) {
|
|
139
|
-
this.$emit('addUser', index, row)
|
|
140
|
-
},
|
|
141
|
-
selectUser(selectVal) {
|
|
142
|
-
// console.log('selectUser', selectVal)
|
|
143
|
-
this.$emit('selectResult', this.gridData[selectVal])
|
|
144
|
-
},
|
|
145
|
-
rowClick(row, column, event) {
|
|
146
|
-
this.singleUserIndex = row.row_index
|
|
147
|
-
this.$emit('selectResult', row)
|
|
148
|
-
},
|
|
149
|
-
tableRowClassName({ row, rowIndex }) {
|
|
150
|
-
row.row_index = rowIndex
|
|
151
|
-
},
|
|
152
|
-
rowDblclick(row, column, event) {
|
|
153
|
-
if (this.multiple) {
|
|
154
|
-
this.$emit('addUser', null, row)
|
|
155
|
-
} else {
|
|
156
|
-
this.$emit('resultRowDblclick', row)
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
isDisable(row) {
|
|
160
|
-
if (this.selectResult) {
|
|
161
|
-
const containUsers = this.selectResult.filter(this.filterDept(row))
|
|
162
|
-
if (containUsers && containUsers.length > 0) {
|
|
163
|
-
return true
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return false
|
|
167
|
-
},
|
|
168
|
-
// 判断用户是否存在的过滤器
|
|
169
|
-
filterDept(queryDept) {
|
|
170
|
-
return (dept) => {
|
|
171
|
-
return (dept.id === queryDept.id)
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
</script>
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-dialog
|
|
4
|
-
ref="userDialog"
|
|
5
|
-
class="user-tree"
|
|
6
|
-
visible
|
|
7
|
-
:title="myTitle"
|
|
8
|
-
append-to-body
|
|
9
|
-
:close-on-click-modal="false"
|
|
10
|
-
:width="width"
|
|
11
|
-
@open="$emit('openDialog')"
|
|
12
|
-
@opend="$emit('opendDialog')"
|
|
13
|
-
@close="$emit('closeDialog')"
|
|
14
|
-
@closed="$emit('closedDialog')"
|
|
15
|
-
>
|
|
16
|
-
<inline-department-user-multi-tree
|
|
17
|
-
ref="inlineDepartmentUser"
|
|
18
|
-
:department-info="departmentInfo"
|
|
19
|
-
:is-need-virtual-user="isNeedVirtualUser"
|
|
20
|
-
:height="height"
|
|
21
|
-
:select-user-info="selectUserInfo"
|
|
22
|
-
:search-field="searchField"
|
|
23
|
-
:separator="separator"
|
|
24
|
-
@result="result"
|
|
25
|
-
/>
|
|
26
|
-
<div slot="footer" class="dialog-footer">
|
|
27
|
-
<el-button size="small" @click="$emit('closeDialog')">
|
|
28
|
-
{{ $t('imatrixUIPublicModel.cancel') }}
|
|
29
|
-
</el-button>
|
|
30
|
-
<el-button size="small" type="primary" @click="confirmSelectUser">
|
|
31
|
-
{{ $t('imatrixUIPublicModel.sure') }}
|
|
32
|
-
</el-button>
|
|
33
|
-
</div>
|
|
34
|
-
</el-dialog>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
<style>
|
|
38
|
-
.searchResult {
|
|
39
|
-
color:red
|
|
40
|
-
}
|
|
41
|
-
.inline-select-custom {
|
|
42
|
-
width : 100px
|
|
43
|
-
}
|
|
44
|
-
.inline-input-custom {
|
|
45
|
-
width : 98%
|
|
46
|
-
}
|
|
47
|
-
</style>
|
|
48
|
-
<script>
|
|
49
|
-
import InlineDepartmentUserMultiTree from '../../department-user-tree-inline/src/department-user-multiple-tree-inline.vue'
|
|
50
|
-
export default {
|
|
51
|
-
name: 'DepartmentUserMultiTree',
|
|
52
|
-
components: {
|
|
53
|
-
InlineDepartmentUserMultiTree
|
|
54
|
-
},
|
|
55
|
-
props: {
|
|
56
|
-
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
57
|
-
departmentInfo: {
|
|
58
|
-
type: Array,
|
|
59
|
-
default: null
|
|
60
|
-
},
|
|
61
|
-
// 弹框的标题
|
|
62
|
-
title: {
|
|
63
|
-
type: String,
|
|
64
|
-
default: null
|
|
65
|
-
},
|
|
66
|
-
// 弹框的宽度
|
|
67
|
-
width: {
|
|
68
|
-
type: String,
|
|
69
|
-
default: '60%'
|
|
70
|
-
},
|
|
71
|
-
// 弹框的高度
|
|
72
|
-
height: {
|
|
73
|
-
type: String,
|
|
74
|
-
default: '300px'
|
|
75
|
-
},
|
|
76
|
-
// 是否需要显示虚拟用户
|
|
77
|
-
isNeedVirtualUser: {
|
|
78
|
-
type: Boolean,
|
|
79
|
-
default: false
|
|
80
|
-
},
|
|
81
|
-
// 多选用户树时,已选择用户id或登录名集合,多个之间以逗号隔开
|
|
82
|
-
selectUserInfo: {
|
|
83
|
-
type: [String, Number],
|
|
84
|
-
default: null
|
|
85
|
-
},
|
|
86
|
-
// 移除用户时,用户属性名称:id、loginName、email、telephone,默认是loginName
|
|
87
|
-
searchField: {
|
|
88
|
-
type: String,
|
|
89
|
-
default: 'loginName'
|
|
90
|
-
},
|
|
91
|
-
// 多选树时结果之间的分隔符,默认是逗号分隔
|
|
92
|
-
separator: {
|
|
93
|
-
type: String,
|
|
94
|
-
default: ','
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
data() {
|
|
98
|
-
let myTitle = this.$t('imatrixUIMessage.pleaseSelectPersonnel')
|
|
99
|
-
if (this.title) {
|
|
100
|
-
myTitle = this.title
|
|
101
|
-
}
|
|
102
|
-
return {
|
|
103
|
-
myTitle
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
methods: {
|
|
107
|
-
result(selectNodeInfo) {
|
|
108
|
-
this.$emit('closeDialog', selectNodeInfo)
|
|
109
|
-
},
|
|
110
|
-
confirmSelectUser() {
|
|
111
|
-
this.$refs.inlineDepartmentUser.confirmSelectUser()
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
</script>
|