imatrix-ui 2.9.15-dw-tmp2 → 2.9.16-boe1
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 +2 -2
- 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 +18 -6
- package/src/i18n/langs/en.js +20 -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/message.scss +8 -0
- package/src/styles/theme/dark-blue/radio.scss +13 -0
- 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 +1 -1
- 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 +32 -0
- package/src/styles/theme/gray/sidebar.scss +7 -14
- package/src/utils/auth-api.js +47 -1
- package/src/utils/common-util.js +22 -81
- package/src/utils/jump-page-utils.js +3 -6
- package/src/utils/range-selector.js +185 -0
- package/src/utils/request.js +6 -3
- 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 +12 -20
- 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/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/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 +85 -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 -408
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -290
- package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
- package/packages/department-tree-inline/src/department-tree-service.js +0 -273
- 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 -636
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -271
- 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 -771
- 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 -653
- package/packages/super-grid/src/search-form-dialog.vue +0 -79
- package/packages/super-grid/src/search-form-item.vue +0 -404
- 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 -2882
- package/packages/super-grid/src/utils.js +0 -762
- 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,76 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-dialog
|
|
4
|
-
class="user-tree"
|
|
5
|
-
visible
|
|
6
|
-
:title="myTitle"
|
|
7
|
-
:close-on-click-modal="false"
|
|
8
|
-
append-to-body
|
|
9
|
-
:width="width"
|
|
10
|
-
@open="$emit('open')"
|
|
11
|
-
@opend="$emit('opend')"
|
|
12
|
-
@close="$emit('close')"
|
|
13
|
-
@closed="$emit('closed')"
|
|
14
|
-
>
|
|
15
|
-
<inline-workgroup-tree ref="workgroupTree" :multiple="multiple" :branch-info="branchInfo" @result="result" />
|
|
16
|
-
<div slot="footer" class="dialog-footer">
|
|
17
|
-
<el-button size="small" @click="$emit('close')">
|
|
18
|
-
{{ $t('imatrixUIPublicModel.cancel') }}
|
|
19
|
-
</el-button>
|
|
20
|
-
<el-button size="small" type="primary" @click="selectWorkgroup">
|
|
21
|
-
{{ $t('imatrixUIPublicModel.sure') }}
|
|
22
|
-
</el-button>
|
|
23
|
-
</div>
|
|
24
|
-
</el-dialog>
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
27
|
-
<script>
|
|
28
|
-
import InlineWorkgroupTree from '../../workgroup-tree-inline/src/workgroup-tree-inline.vue'
|
|
29
|
-
export default {
|
|
30
|
-
name: 'WorkgroupTree',
|
|
31
|
-
components: {
|
|
32
|
-
InlineWorkgroupTree
|
|
33
|
-
},
|
|
34
|
-
props: {
|
|
35
|
-
// 是否是多选树,默认是true
|
|
36
|
-
multiple: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: true
|
|
39
|
-
},
|
|
40
|
-
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
41
|
-
branchInfo: {
|
|
42
|
-
type: Array,
|
|
43
|
-
default: null
|
|
44
|
-
},
|
|
45
|
-
// 弹框的标题
|
|
46
|
-
title: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: null
|
|
49
|
-
},
|
|
50
|
-
// 弹框的宽度
|
|
51
|
-
width: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: '30%'
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
data() {
|
|
58
|
-
let myTitle = this.$t('imatrixUIMessage.pleaseSelectATeam')
|
|
59
|
-
if (this.title) {
|
|
60
|
-
myTitle = this.title
|
|
61
|
-
}
|
|
62
|
-
return {
|
|
63
|
-
myTitle
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
methods: {
|
|
67
|
-
result(selectNodeInfo) {
|
|
68
|
-
this.$emit('close', selectNodeInfo)
|
|
69
|
-
},
|
|
70
|
-
// 嵌入树,多选时,点击确定时调用的方法
|
|
71
|
-
selectWorkgroup() {
|
|
72
|
-
this.$refs.workgroupTree.selectWorkgroup()
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
</script>
|
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-container style="height: 395px">
|
|
4
|
-
<el-header style="text-align: right; font-size: 12px">
|
|
5
|
-
<el-autocomplete
|
|
6
|
-
v-model="filterText"
|
|
7
|
-
select-when-unmatched
|
|
8
|
-
class="inline-input inline-input-custom"
|
|
9
|
-
:fetch-suggestions="querySearch"
|
|
10
|
-
:placeholder="$t('imatrixUIMessage.pleaseEnterTeamName')"
|
|
11
|
-
:trigger-on-focus="false"
|
|
12
|
-
@select="handleSelect"
|
|
13
|
-
@keyup.enter.native="clickSearch"
|
|
14
|
-
>
|
|
15
|
-
<el-button slot="append" icon="el-icon-search" @click="clickSearch" />
|
|
16
|
-
</el-autocomplete>
|
|
17
|
-
</el-header>
|
|
18
|
-
<el-main>
|
|
19
|
-
<el-tree
|
|
20
|
-
ref="workgroupTree"
|
|
21
|
-
:props="defaultProps"
|
|
22
|
-
:load="loadNode"
|
|
23
|
-
lazy
|
|
24
|
-
:show-checkbox="multiple"
|
|
25
|
-
node-key="id"
|
|
26
|
-
:render-content="renderContent"
|
|
27
|
-
:filter-node-method="filterNode"
|
|
28
|
-
@check="handleCheckNode"
|
|
29
|
-
@node-click="handleNodeClick"
|
|
30
|
-
/>
|
|
31
|
-
</el-main>
|
|
32
|
-
</el-container>
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|
|
35
|
-
<style>
|
|
36
|
-
.searchResult {
|
|
37
|
-
color:red
|
|
38
|
-
}
|
|
39
|
-
.inline-input-custom {
|
|
40
|
-
width : 90%
|
|
41
|
-
}
|
|
42
|
-
</style>
|
|
43
|
-
|
|
44
|
-
<script>
|
|
45
|
-
import localStorage from '../../../src/utils/local-storage'
|
|
46
|
-
import utils from '../../utils/utils'
|
|
47
|
-
import workgroupTreeService from './workgroup-tree-service'
|
|
48
|
-
export default {
|
|
49
|
-
name: 'InlineWorkgroupTree',
|
|
50
|
-
props: {
|
|
51
|
-
// 是否是多选树,默认是true
|
|
52
|
-
multiple: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: true
|
|
55
|
-
},
|
|
56
|
-
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
57
|
-
branchInfo: {
|
|
58
|
-
type: Array,
|
|
59
|
-
default: null
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
data() {
|
|
64
|
-
return {
|
|
65
|
-
filterText: '',
|
|
66
|
-
defaultProps: {
|
|
67
|
-
id: 'id',
|
|
68
|
-
label: 'name',
|
|
69
|
-
children: 'children',
|
|
70
|
-
isLeaf: 'leaf'
|
|
71
|
-
},
|
|
72
|
-
containBranch: false, // 当前租户内是否包含分支机构。获得当前选中部门名称时,如果有分支,则需要将分支名称返回给用户,例如:部门1(分支1)
|
|
73
|
-
tenantNodeId: -1, // 公司节点的id
|
|
74
|
-
restaurants: [], // 查询的备选值
|
|
75
|
-
searchValue: null, // 查询条件
|
|
76
|
-
searchStoreKey: 'searchWorkgroup',
|
|
77
|
-
selectNodeInfo: null, // 单选时,选择的工作组信息
|
|
78
|
-
tenantInfo: {} // 公司根节点信息
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
computed: {
|
|
82
|
-
},
|
|
83
|
-
watch: {
|
|
84
|
-
filterText(val) {
|
|
85
|
-
if (!val) {
|
|
86
|
-
this.searchValue = val
|
|
87
|
-
// 清空查询内容时,重新加载整个树
|
|
88
|
-
this.loadWorkgroup(this.tenantNodeId)
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
mounted() {
|
|
93
|
-
var searchWorkgroup = localStorage.getObject(this.searchStoreKey)
|
|
94
|
-
if (searchWorkgroup) {
|
|
95
|
-
this.restaurants = searchWorkgroup
|
|
96
|
-
} else {
|
|
97
|
-
this.restaurants = []
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
methods: {
|
|
101
|
-
...utils,
|
|
102
|
-
...workgroupTreeService,
|
|
103
|
-
handleSelect(item) {
|
|
104
|
-
this.handleSelectUtil(item, localStorage)
|
|
105
|
-
},
|
|
106
|
-
search(value) {
|
|
107
|
-
this.searchValue = value
|
|
108
|
-
this.$refs.workgroupTree.filter(value)
|
|
109
|
-
},
|
|
110
|
-
// 点击查询按钮调用的方法
|
|
111
|
-
clickSearch() {
|
|
112
|
-
this.storeSeachValue(localStorage, this.searchStoreKey, this.filterText)
|
|
113
|
-
this.search(this.filterText)
|
|
114
|
-
},
|
|
115
|
-
filterNode(value, data, node) {
|
|
116
|
-
if (!value) {
|
|
117
|
-
return true
|
|
118
|
-
} else {
|
|
119
|
-
var workgroupName = data.name
|
|
120
|
-
if (data.id === this.tenantNodeId) {
|
|
121
|
-
// 表示是根节点公司节点
|
|
122
|
-
return false
|
|
123
|
-
} else if (this.containBranch) {
|
|
124
|
-
// 如果包含分支,工作组节点显示的格式为:工作组名称(分支名称)
|
|
125
|
-
workgroupName = workgroupName.substring(0, workgroupName.lastIndexOf('('))
|
|
126
|
-
}
|
|
127
|
-
return workgroupName.indexOf(value) !== -1
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
// 点击复选框时处理
|
|
131
|
-
handleCheckNode(data, checkObj) {
|
|
132
|
-
if (checkObj.checkedKeys.indexOf(data.id) > -1) {
|
|
133
|
-
// 表示正选中data节点
|
|
134
|
-
if (data.id === this.tenantNodeId) {
|
|
135
|
-
// 表示选中了公司节点
|
|
136
|
-
this.checkedAllWorkgroups(data)
|
|
137
|
-
}
|
|
138
|
-
} else {
|
|
139
|
-
// 表示正取消选中data节点,同时要取消其子节点的选中状态
|
|
140
|
-
if (data.id === this.tenantNodeId) {
|
|
141
|
-
// 表示取消公司节点的选中状态,即取消所有节点的勾选状态
|
|
142
|
-
this.$refs.workgroupTree.setCheckedKeys([])
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
// 选中了根节点公司节点时,选中所有工作组
|
|
147
|
-
checkedAllWorkgroups(root) {
|
|
148
|
-
const children = root.children
|
|
149
|
-
if (children) {
|
|
150
|
-
children.forEach(workgroupNode => {
|
|
151
|
-
this.$refs.workgroupTree.setChecked(workgroupNode.id, true)
|
|
152
|
-
})
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
handleNodeClick(data, node, nodeTree) {
|
|
156
|
-
if (this.multiple) {
|
|
157
|
-
// 多选部门树时,处理点击节点事件
|
|
158
|
-
this.clickNodeWhenMultiple(data)
|
|
159
|
-
}
|
|
160
|
-
this.selectSingleNode(data, false)
|
|
161
|
-
},
|
|
162
|
-
selectSingleNode(data, isClickOkBtn) {
|
|
163
|
-
if (this.isWorkgroupNode(data) && !this.multiple) {
|
|
164
|
-
// 点击的是工作组节点,并且是单选树时,点击部门节点直接关闭弹框
|
|
165
|
-
const workgroup = JSON.parse(data.data)
|
|
166
|
-
workgroup.tenantCode = this.tenantInfo.code
|
|
167
|
-
workgroup.tenantName = this.tenantInfo.tenantName
|
|
168
|
-
var selectNodeInfo = {
|
|
169
|
-
id: data.id,
|
|
170
|
-
name: data.name,
|
|
171
|
-
code: workgroup.code,
|
|
172
|
-
containBranch: this.containBranch,
|
|
173
|
-
workgroup: workgroup
|
|
174
|
-
}
|
|
175
|
-
this.selectNodeInfo = selectNodeInfo
|
|
176
|
-
if (isClickOkBtn === true) {
|
|
177
|
-
// 点击确定按钮时才需要调result回调事件,关闭弹框
|
|
178
|
-
this.$emit('result', selectNodeInfo)
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
// 多选树时,点击节点处理复选框的选中状态
|
|
183
|
-
clickNodeWhenMultiple(data) {
|
|
184
|
-
var checkedKeys = []
|
|
185
|
-
if (this.$refs.workgroupTree) {
|
|
186
|
-
checkedKeys = this.$refs.workgroupTree.getCheckedKeys()
|
|
187
|
-
}
|
|
188
|
-
// 取消选中状态时,保持节点是展开的状态,不要折叠
|
|
189
|
-
this.$refs.workgroupTree.store.nodesMap[data.id].expanded = true
|
|
190
|
-
if (checkedKeys.indexOf(data.id) > -1) {
|
|
191
|
-
// 表示当前节点是选中状态,则需要取消其选中状态
|
|
192
|
-
// 取消当前节点的勾选状态
|
|
193
|
-
this.$refs.workgroupTree.setChecked(data.id, false)
|
|
194
|
-
if (data.id === this.tenantNodeId) {
|
|
195
|
-
// 表示取消公司节点的选中状态,即取消所有节点的勾选状态
|
|
196
|
-
this.$refs.workgroupTree.setCheckedKeys([])
|
|
197
|
-
}
|
|
198
|
-
} else {
|
|
199
|
-
// 表示当前节点不是选中的状态,需要勾选该节点
|
|
200
|
-
this.$refs.workgroupTree.setChecked(data.id, true)
|
|
201
|
-
if (data.id === this.tenantNodeId) {
|
|
202
|
-
// 表示当前正选中根节点公司节点,则需要勾选所有节点的选中状态
|
|
203
|
-
this.checkedAllWorkgroups(data)
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
isWorkgroupNode(data) {
|
|
208
|
-
// 当前节点不是公司节点,也不是分支机构节点,表示是部门节点
|
|
209
|
-
return data.id !== this.tenantNodeId && data.nodeType && data.nodeType === 'WORKGROUP'
|
|
210
|
-
},
|
|
211
|
-
selectWorkgroup() {
|
|
212
|
-
// 是否需要显示提示框,默认不显示
|
|
213
|
-
var showTip = false
|
|
214
|
-
if (this.multiple) {
|
|
215
|
-
var selectNodeInfo = {
|
|
216
|
-
ids: [],
|
|
217
|
-
names: [],
|
|
218
|
-
codes: [],
|
|
219
|
-
workgroups: []
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
var nodes = this.$refs.workgroupTree.getCheckedNodes()
|
|
223
|
-
if (nodes) {
|
|
224
|
-
if (nodes.length === 0) {
|
|
225
|
-
// 没有选择任何节点
|
|
226
|
-
showTip = true
|
|
227
|
-
} else {
|
|
228
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
229
|
-
var node = nodes[i]
|
|
230
|
-
if (node.id !== this.tenantNodeId) {
|
|
231
|
-
// 不是公司根节点,表示是工作组节点,直接存到结果集合中
|
|
232
|
-
// node.data是部门对象的json字符串信息,通过JSON.parse(node.data)将json字符串转为对象
|
|
233
|
-
const workgroupData = JSON.parse(node.data)
|
|
234
|
-
this.addSelectedWorkgroupInfo(selectNodeInfo, node, workgroupData)
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
if (selectNodeInfo.ids.length > 0) {
|
|
238
|
-
this.$emit('result', selectNodeInfo)
|
|
239
|
-
} else {
|
|
240
|
-
showTip = true
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
} else {
|
|
244
|
-
showTip = true
|
|
245
|
-
}
|
|
246
|
-
} else {
|
|
247
|
-
const data = this.$refs.workgroupTree.getCurrentNode()
|
|
248
|
-
if (data && data !== null) {
|
|
249
|
-
this.selectSingleNode(data, true)
|
|
250
|
-
} else {
|
|
251
|
-
showTip = true
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
if (showTip) {
|
|
256
|
-
this.$alert(this.$t('imatrixUIMessage.pleaseSelectATeam'), this.$t('imatrixUIMessage.tips'), {
|
|
257
|
-
confirmButtonText: this.$t('imatrixUIPublicModel.sure')
|
|
258
|
-
})
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
// 将选中的部门节点添加到结果集合中
|
|
262
|
-
addSelectedWorkgroupInfo(result, node, workgroup) {
|
|
263
|
-
workgroup.tenantCode = this.tenantInfo.code
|
|
264
|
-
workgroup.tenantName = this.tenantInfo.tenantName
|
|
265
|
-
result.containBranch = this.containBranch
|
|
266
|
-
result.ids.push(node.id)
|
|
267
|
-
result.workgroups.push(workgroup)
|
|
268
|
-
result.codes.push(workgroup.code)
|
|
269
|
-
result.names.push(node.name)
|
|
270
|
-
},
|
|
271
|
-
// 初始化树 或 点击三角展开节点时动态加载子节点
|
|
272
|
-
loadNode(node, resolve) {
|
|
273
|
-
var parentId = 0
|
|
274
|
-
if (node.level === 0) {
|
|
275
|
-
// 表示初始化树
|
|
276
|
-
parentId = 0
|
|
277
|
-
} else {
|
|
278
|
-
parentId = node.data.id
|
|
279
|
-
}
|
|
280
|
-
var checkedKeys = []
|
|
281
|
-
if (this.$refs.workgroupTree) {
|
|
282
|
-
checkedKeys = this.$refs.workgroupTree.getCheckedKeys()
|
|
283
|
-
}
|
|
284
|
-
// 初始化部门树
|
|
285
|
-
this.initLoad(parentId, node, resolve, checkedKeys)
|
|
286
|
-
},
|
|
287
|
-
// 给节点添加自定义图标
|
|
288
|
-
renderContent(h, { node, data, store }) {
|
|
289
|
-
var className
|
|
290
|
-
if (node.data.id === -1) {
|
|
291
|
-
// node.id ===-1表示公司节点,node.branch表示是分支机构节点
|
|
292
|
-
className = 'el-icon-menu'
|
|
293
|
-
} else {
|
|
294
|
-
// 表示是工作组节点
|
|
295
|
-
className = 'el-icon-date'
|
|
296
|
-
}
|
|
297
|
-
if (data.nodeType && data.nodeType === 'WORKGROUP' &&
|
|
298
|
-
this.searchValue && data.name.indexOf(this.searchValue) > -1) {
|
|
299
|
-
// 如果是查询条件
|
|
300
|
-
return (
|
|
301
|
-
<span>
|
|
302
|
-
<i class={className}></i>
|
|
303
|
-
<span class='searchResult' title={node.label}>{node.label}</span>
|
|
304
|
-
</span>
|
|
305
|
-
)
|
|
306
|
-
}
|
|
307
|
-
return (
|
|
308
|
-
<span>
|
|
309
|
-
<i class={className}></i>
|
|
310
|
-
<span title={node.label}>{node.label}</span>
|
|
311
|
-
</span>
|
|
312
|
-
)
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
</script>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
const workgroupTreeService = {
|
|
3
|
-
// 初始化部门树
|
|
4
|
-
initLoad(parentId, node, resolve, checkedKeys) {
|
|
5
|
-
const param = {
|
|
6
|
-
parentId: parentId,
|
|
7
|
-
departmentInfo: this.branchInfo
|
|
8
|
-
}
|
|
9
|
-
this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/workgroups', param).then(data => {
|
|
10
|
-
resolve(data)
|
|
11
|
-
// 更新当前点击的节点的子节点
|
|
12
|
-
this.$refs.workgroupTree.updateKeyChildren(parentId, data)
|
|
13
|
-
if (parentId === 0) {
|
|
14
|
-
// 初始化树时,展开公司节点
|
|
15
|
-
const tenantData = data[0].data
|
|
16
|
-
this.tenantInfo = JSON.parse(tenantData)
|
|
17
|
-
this.containBranch = data[0].containBranch
|
|
18
|
-
// 加载整个组织结构树时,展开公司节点
|
|
19
|
-
this.loadWorkgroup(this.tenantNodeId)
|
|
20
|
-
}
|
|
21
|
-
// 表示是点击三角展开节点时
|
|
22
|
-
if (checkedKeys && checkedKeys.indexOf(parentId) > -1 && parentId === this.tenantNodeId) {
|
|
23
|
-
// 点击公司名称前的三角标识展开节点时,保持当前节点的选中状态
|
|
24
|
-
// 表示当前展开的节点是选中状态,则应保持其选中状态,并选中其子节点
|
|
25
|
-
this.checkedAllWorkgroups(node.data)
|
|
26
|
-
}
|
|
27
|
-
})
|
|
28
|
-
},
|
|
29
|
-
// 加载当前节点的子节点
|
|
30
|
-
loadWorkgroup(parentId) {
|
|
31
|
-
const param = {
|
|
32
|
-
parentId: parentId,
|
|
33
|
-
departmentInfo: this.branchInfo
|
|
34
|
-
}
|
|
35
|
-
this.$http.post(Vue.prototype.baseAPI + '/component/organization-trees/workgroups', param).then(children => {
|
|
36
|
-
this.$refs.workgroupTree.updateKeyChildren(parentId, children)
|
|
37
|
-
if (this.$refs.workgroupTree.store.nodesMap[parentId]) {
|
|
38
|
-
this.$refs.workgroupTree.store.nodesMap[parentId].expanded = true
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
export default workgroupTreeService
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-dialog
|
|
4
|
-
class="user-tree"
|
|
5
|
-
visible
|
|
6
|
-
:title="myTitle"
|
|
7
|
-
:close-on-click-modal="false"
|
|
8
|
-
append-to-body
|
|
9
|
-
:width="width"
|
|
10
|
-
@open="$emit('open')"
|
|
11
|
-
@opend="$emit('opend')"
|
|
12
|
-
@close="$emit('close')"
|
|
13
|
-
@closed="$emit('closed')"
|
|
14
|
-
>
|
|
15
|
-
<inline-workgroup-user-tree
|
|
16
|
-
ref="workgroupUserTree"
|
|
17
|
-
:multiple="multiple"
|
|
18
|
-
:branch-info="branchInfo"
|
|
19
|
-
:select-user-info="selectUserInfo"
|
|
20
|
-
:search-field="searchField"
|
|
21
|
-
:separator="separator"
|
|
22
|
-
@result="result"
|
|
23
|
-
/>
|
|
24
|
-
<div slot="footer" class="dialog-footer">
|
|
25
|
-
<el-button size="small" @click="$emit('close')">
|
|
26
|
-
{{ $t('imatrixUIPublicModel.cancel') }}
|
|
27
|
-
</el-button>
|
|
28
|
-
<el-button size="small" type="primary" @click="selectWorkgroupUser">
|
|
29
|
-
{{ $t('imatrixUIPublicModel.sure') }}
|
|
30
|
-
</el-button>
|
|
31
|
-
</div>
|
|
32
|
-
</el-dialog>
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|
|
35
|
-
|
|
36
|
-
<script>
|
|
37
|
-
import InlineWorkgroupUserTree from '../../workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue'
|
|
38
|
-
export default {
|
|
39
|
-
name: 'WorkgroupUserTree',
|
|
40
|
-
components: {
|
|
41
|
-
InlineWorkgroupUserTree
|
|
42
|
-
},
|
|
43
|
-
props: {
|
|
44
|
-
// 是否是多选树,默认是true
|
|
45
|
-
multiple: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
default: true
|
|
48
|
-
},
|
|
49
|
-
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
50
|
-
branchInfo: {
|
|
51
|
-
type: Array,
|
|
52
|
-
default: null
|
|
53
|
-
},
|
|
54
|
-
// 弹框的标题
|
|
55
|
-
title: {
|
|
56
|
-
type: String,
|
|
57
|
-
default: null
|
|
58
|
-
},
|
|
59
|
-
// 弹框的宽度
|
|
60
|
-
width: {
|
|
61
|
-
type: String,
|
|
62
|
-
default: '30%'
|
|
63
|
-
},
|
|
64
|
-
// 多选用户树时,已选择用户id或登录名集合,多个之间以逗号隔开
|
|
65
|
-
selectUserInfo: {
|
|
66
|
-
type: [String, Number],
|
|
67
|
-
default: null
|
|
68
|
-
},
|
|
69
|
-
// 移除用户时,用户属性名称:id、loginName、email、telephone,默认是loginName
|
|
70
|
-
searchField: {
|
|
71
|
-
type: String,
|
|
72
|
-
default: 'loginName'
|
|
73
|
-
},
|
|
74
|
-
// 多选树时结果之间的分隔符,默认是逗号分隔
|
|
75
|
-
separator: {
|
|
76
|
-
type: String,
|
|
77
|
-
default: ','
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
data() {
|
|
82
|
-
let myTitle = this.$t('imatrixUIMessage.pleaseSelectATeam')
|
|
83
|
-
if (this.title) {
|
|
84
|
-
myTitle = this.title
|
|
85
|
-
}
|
|
86
|
-
return {
|
|
87
|
-
myTitle
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
methods: {
|
|
91
|
-
result(selectNodeInfo) {
|
|
92
|
-
this.$emit('close', selectNodeInfo)
|
|
93
|
-
},
|
|
94
|
-
// 嵌入树,多选时,点击确定时调用的方法
|
|
95
|
-
selectWorkgroupUser() {
|
|
96
|
-
this.$refs.workgroupUserTree.selectWorkgroupUser()
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
</script>
|