imatrix-ui 2.8.21 → 2.8.22-boe10
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 -5
- package/package.json +2 -2
- package/src/api/sso-service.js +19 -1
- package/src/i18n/langs/cn.js +13 -3
- package/src/i18n/langs/en.js +15 -4
- package/src/router/index.js +10 -0
- package/src/store/modules/tab-content.js +6 -0
- package/src/store/modules/user.js +19 -0
- package/src/styles/index.scss +72 -2
- 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/index.scss +27 -5
- package/src/styles/theme/dark-blue/message.scss +8 -0
- package/src/styles/theme/dark-blue/sidebar.scss +7 -37
- package/src/styles/theme/dark-blue/table.scss +1 -1
- 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 +5 -0
- package/src/utils/auth-api.js +45 -1
- package/src/utils/common-util.js +28 -0
- package/src/utils/range-selector.js +185 -0
- package/src/utils/request.js +5 -2
- package/src/utils/util.js +7 -5
- package/src/views/dsc-component/Sidebar/Item.vue +4 -2
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +1 -2
- package/src/views/dsc-component/Sidebar/index.vue +12 -20
- package/src/views/dsc-component/tabs/tab-content.vue +1 -5
- package/src/views/layout/NewLayout.vue +6 -65
- 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 +160 -0
- package/src/views/layout/tab-content-iframe-index.vue +31 -0
- package/src/views/layout/tab-content-index.vue +85 -0
- 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 -402
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -284
- package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
- package/packages/department-tree-inline/src/department-tree-service.js +0 -245
- 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 -626
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -269
- 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 -230
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -122
- 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 -453
- 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 -763
- package/packages/super-grid/src/columns-config.vue +0 -335
- package/packages/super-grid/src/custom-formatter.js +0 -250
- 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 -769
- 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 -386
- package/packages/super-grid/src/search-form-number.vue +0 -38
- package/packages/super-grid/src/search-form-open.vue +0 -162
- package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -188
- package/packages/super-grid/src/search-form.vue +0 -634
- package/packages/super-grid/src/search-methods.js +0 -387
- 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 -561
- package/packages/super-grid/src/super-grid.vue +0 -2793
- package/packages/super-grid/src/utils.js +0 -763
- 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/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,436 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-container style="height: 395px">
|
|
4
|
-
<el-header style="text-align: right; font-size: 12px;height: 35px">
|
|
5
|
-
<el-autocomplete
|
|
6
|
-
v-model="filterText"
|
|
7
|
-
size="small"
|
|
8
|
-
select-when-unmatched
|
|
9
|
-
class="inline-input inline-input-custom"
|
|
10
|
-
:fetch-suggestions="querySearch"
|
|
11
|
-
:placeholder="$t('departmentUserTree.pleaseEnterUserInformation')"
|
|
12
|
-
:trigger-on-focus="false"
|
|
13
|
-
@select="handleSelect"
|
|
14
|
-
@keyup.enter.native="clickSearch"
|
|
15
|
-
>
|
|
16
|
-
<el-button slot="append" icon="el-icon-search" @click="clickSearch" />
|
|
17
|
-
</el-autocomplete>
|
|
18
|
-
</el-header>
|
|
19
|
-
<el-main style="padding: 10px">
|
|
20
|
-
<div style="padding-top:5px;overflow:auto;width: auto;display: inline-block !important;">
|
|
21
|
-
<el-tree
|
|
22
|
-
ref="workgroupUserTree"
|
|
23
|
-
:props="defaultProps"
|
|
24
|
-
:load="loadNode"
|
|
25
|
-
lazy
|
|
26
|
-
:show-checkbox="multiple"
|
|
27
|
-
node-key="nodeId"
|
|
28
|
-
:render-content="renderContent"
|
|
29
|
-
:filter-node-method="filterNode"
|
|
30
|
-
@check="handleCheckNode"
|
|
31
|
-
@node-click="handleNodeClick"
|
|
32
|
-
/>
|
|
33
|
-
</div>
|
|
34
|
-
</el-main>
|
|
35
|
-
</el-container>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
<style>
|
|
39
|
-
.searchResult {
|
|
40
|
-
color:red
|
|
41
|
-
}
|
|
42
|
-
.inline-input-custom {
|
|
43
|
-
width : 90%
|
|
44
|
-
}
|
|
45
|
-
</style>
|
|
46
|
-
|
|
47
|
-
<script>
|
|
48
|
-
import localStorage from '../../../src/utils/local-storage'
|
|
49
|
-
import utils from '../../utils/utils'
|
|
50
|
-
import workgroupTreeInlineService from './workgroup-tree-inline-service'
|
|
51
|
-
export default {
|
|
52
|
-
name: 'InlineWorkgroupUserTree',
|
|
53
|
-
props: {
|
|
54
|
-
// 是否是多选树,默认是true
|
|
55
|
-
multiple: {
|
|
56
|
-
type: Boolean,
|
|
57
|
-
default: true
|
|
58
|
-
},
|
|
59
|
-
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
60
|
-
branchInfo: {
|
|
61
|
-
type: Array,
|
|
62
|
-
default: null
|
|
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
|
-
return {
|
|
83
|
-
filterText: '',
|
|
84
|
-
defaultProps: {
|
|
85
|
-
id: 'id',
|
|
86
|
-
label: 'name',
|
|
87
|
-
children: 'children',
|
|
88
|
-
isLeaf: 'leaf'
|
|
89
|
-
},
|
|
90
|
-
searchParam: {
|
|
91
|
-
userField: null,
|
|
92
|
-
searchValue: null,
|
|
93
|
-
treeType: 'MAN_GROUP_TREE',
|
|
94
|
-
departmentInfo: null
|
|
95
|
-
},
|
|
96
|
-
containBranch: false, // 当前租户内是否包含分支机构。获得当前选中部门名称时,如果有分支,则需要将分支名称返回给用户,例如:部门1(分支1)
|
|
97
|
-
tenantNodeId: -1, // 公司节点的id
|
|
98
|
-
allSearchNodeIds: [], // 用于保存所有查询出的节点id
|
|
99
|
-
allExpandNodeIds: [], // 用于保存allSearchNodeIds中所有已加载子节点的id集合
|
|
100
|
-
isClickNode: false,
|
|
101
|
-
restaurants: [], // 查询的备选值
|
|
102
|
-
searchValue: null, // 查询条件
|
|
103
|
-
searchStoreKey: 'searchWorkgroupUser',
|
|
104
|
-
selectNodeInfo: null, // 单选时,选择的用户信息
|
|
105
|
-
tenantInfo: {} // 公司根节点信息
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
computed: {
|
|
109
|
-
},
|
|
110
|
-
watch: {
|
|
111
|
-
filterText(val) {
|
|
112
|
-
if (!val) {
|
|
113
|
-
this.searchValue = val
|
|
114
|
-
// 清空查询内容时,重新加载整个树
|
|
115
|
-
this.loadWorkgroup(this.tenantNodeId, this.tenantNodeId + '')
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
created() {
|
|
120
|
-
},
|
|
121
|
-
mounted() {
|
|
122
|
-
var searchWorkgroup = localStorage.getObject(this.searchStoreKey)
|
|
123
|
-
if (searchWorkgroup) {
|
|
124
|
-
this.restaurants = searchWorkgroup
|
|
125
|
-
} else {
|
|
126
|
-
this.restaurants = []
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
methods: {
|
|
130
|
-
...utils,
|
|
131
|
-
...workgroupTreeInlineService,
|
|
132
|
-
handleSelect(item) {
|
|
133
|
-
this.handleSelectUtil(item, localStorage)
|
|
134
|
-
},
|
|
135
|
-
search(value) {
|
|
136
|
-
this.searchValue = value
|
|
137
|
-
let mySearchValue = value
|
|
138
|
-
if (mySearchValue) {
|
|
139
|
-
mySearchValue = mySearchValue.trim()
|
|
140
|
-
}
|
|
141
|
-
this.searchParam.searchValue = mySearchValue
|
|
142
|
-
this.searchParam.departmentInfo = this.branchInfo
|
|
143
|
-
// this.searchParam.userField = this.searchField
|
|
144
|
-
// 后台查询部门,并拼接树节点
|
|
145
|
-
this.filterAppendNodes(value)
|
|
146
|
-
},
|
|
147
|
-
// 点击查询按钮调用的方法
|
|
148
|
-
clickSearch() {
|
|
149
|
-
this.storeSeachValue(localStorage, this.searchStoreKey, this.filterText)
|
|
150
|
-
this.search(this.filterText)
|
|
151
|
-
},
|
|
152
|
-
filterNode(value, data, node) {
|
|
153
|
-
if (!value) {
|
|
154
|
-
return true
|
|
155
|
-
} else {
|
|
156
|
-
if (data.nodeType && data.nodeType === 'USER') {
|
|
157
|
-
// data.data是用户的所有数据
|
|
158
|
-
const user = JSON.parse(data.data)
|
|
159
|
-
return this.filterUserVal(user, value)
|
|
160
|
-
} else {
|
|
161
|
-
// 表示不是用户节点
|
|
162
|
-
return false
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
filterUserVal(user, searchVal) {
|
|
167
|
-
const searchFields = ['name', 'loginName', 'email', 'telephone', 'jobNumber', 'honorificName']
|
|
168
|
-
let isHasVal = false
|
|
169
|
-
for (let i = 0; i < searchFields.length; i++) {
|
|
170
|
-
const searchField = searchFields[i]
|
|
171
|
-
const userValue = user[searchField]
|
|
172
|
-
if (userValue.indexOf(searchVal) !== -1 || (searchField === 'name' && user['enName'] && user['enName'].indexOf(searchVal) !== -1)) {
|
|
173
|
-
isHasVal = true
|
|
174
|
-
} else {
|
|
175
|
-
isHasVal = false
|
|
176
|
-
break
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return isHasVal
|
|
180
|
-
},
|
|
181
|
-
// 点击复选框时处理
|
|
182
|
-
handleCheckNode(data, checkObj) {
|
|
183
|
-
if (checkObj.checkedKeys.indexOf(data.nodeId) > -1) {
|
|
184
|
-
// 表示正选中data节点
|
|
185
|
-
this.checkedNode(data, false)
|
|
186
|
-
} else {
|
|
187
|
-
// 表示正取消选中data节点,同时要取消其子节点的选中状态
|
|
188
|
-
this.cancelCheckedNode(data)
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
// 选中当前节点及其子节点
|
|
192
|
-
checkedNodeAndChildren(data) {
|
|
193
|
-
// 取消选中状态时,保持节点是展开的状态,不要折叠
|
|
194
|
-
this.$refs.workgroupUserTree.store.nodesMap[data.nodeId].expanded = true
|
|
195
|
-
// 获得所有应该选中的节点
|
|
196
|
-
this.$refs.workgroupUserTree.setChecked(data.nodeId, true)
|
|
197
|
-
const children = data.children
|
|
198
|
-
if (children) {
|
|
199
|
-
// 递归设置子子节点的选中状态
|
|
200
|
-
children.forEach(nodeData => {
|
|
201
|
-
this.checkedNodeAndChildren(nodeData)
|
|
202
|
-
})
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
// 取消节点选中状态时
|
|
206
|
-
cancelCheckedNode(data) {
|
|
207
|
-
if (data.id === this.tenantNodeId) {
|
|
208
|
-
// 表示取消公司节点的选中状态,即取消所有节点的勾选状态
|
|
209
|
-
this.$refs.workgroupUserTree.setCheckedKeys([])
|
|
210
|
-
} else if (data.nodeType && data.nodeType === 'WORKGROUP') {
|
|
211
|
-
this.cancelCheckedUserNodesWithWorkgroup(data)
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
// 选中了根节点公司节点时,选中所有工作组
|
|
215
|
-
checkedAllWorkgroups(root) {
|
|
216
|
-
const children = root.children
|
|
217
|
-
if (children) {
|
|
218
|
-
children.forEach(workgroupNode => {
|
|
219
|
-
this.$refs.workgroupUserTree.setChecked(workgroupNode.nodeId, true)
|
|
220
|
-
})
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
// 取消指定工作组下的用户节点的选中状态
|
|
224
|
-
cancelCheckedUserNodesWithWorkgroup(workgroupData) {
|
|
225
|
-
const children = workgroupData.children
|
|
226
|
-
if (children) {
|
|
227
|
-
children.forEach(userNode => {
|
|
228
|
-
this.$refs.workgroupUserTree.setChecked(userNode.nodeId, false)
|
|
229
|
-
})
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
handleNodeClick(data, node, nodeTree) {
|
|
233
|
-
if (this.multiple) {
|
|
234
|
-
// 多选部门树时,处理点击节点事件
|
|
235
|
-
this.clickNodeWhenMultiple(data)
|
|
236
|
-
}
|
|
237
|
-
this.selectSingleNode(data, false)
|
|
238
|
-
},
|
|
239
|
-
selectSingleNode(data, isClickOkBtn) {
|
|
240
|
-
if (this.isUserNode(data) && !this.multiple) {
|
|
241
|
-
// 点击的是工作组节点,并且是单选树时,点击部门节点直接关闭弹框
|
|
242
|
-
const user = JSON.parse(data.data)
|
|
243
|
-
user.tenantCode = this.tenantInfo.code
|
|
244
|
-
user.tenantName = this.tenantInfo.tenantName
|
|
245
|
-
let name = user.name
|
|
246
|
-
if (user.enName && user.enName.trim() !== '') {
|
|
247
|
-
name = name + '(' + user.enName + ')'
|
|
248
|
-
}
|
|
249
|
-
const selectNodeInfo = {
|
|
250
|
-
id: user.id,
|
|
251
|
-
name: name,
|
|
252
|
-
loginName: user.loginName,
|
|
253
|
-
email: user.email,
|
|
254
|
-
telephone: user.telephone,
|
|
255
|
-
containBranch: this.containBranch,
|
|
256
|
-
user: user,
|
|
257
|
-
enName: user.enName,
|
|
258
|
-
subCompanyName: user.subCompanyName
|
|
259
|
-
}
|
|
260
|
-
this.selectNodeInfo = selectNodeInfo
|
|
261
|
-
if (isClickOkBtn === true) {
|
|
262
|
-
// 点击确定按钮时才需要调result回调事件,关闭弹框
|
|
263
|
-
this.$emit('result', selectNodeInfo)
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
// 多选树时,点击节点处理复选框的选中状态
|
|
268
|
-
clickNodeWhenMultiple(data) {
|
|
269
|
-
var checkedKeys = []
|
|
270
|
-
if (this.$refs.workgroupUserTree) {
|
|
271
|
-
checkedKeys = this.$refs.workgroupUserTree.getCheckedKeys()
|
|
272
|
-
}
|
|
273
|
-
// 取消选中状态时,保持节点是展开的状态,不要折叠
|
|
274
|
-
this.$refs.workgroupUserTree.store.nodesMap[data.nodeId].expanded = true
|
|
275
|
-
if (checkedKeys.indexOf(data.nodeId) > -1) {
|
|
276
|
-
// 表示当前节点是选中状态,则需要取消其选中状态
|
|
277
|
-
// 取消当前节点的勾选状态
|
|
278
|
-
this.$refs.workgroupUserTree.setChecked(data.nodeId, false)
|
|
279
|
-
this.cancelCheckedNode(data)
|
|
280
|
-
} else {
|
|
281
|
-
// 表示当前节点不是选中的状态,需要勾选该节点
|
|
282
|
-
this.$refs.workgroupUserTree.setChecked(data.nodeId, true)
|
|
283
|
-
this.checkedNode(data, true)
|
|
284
|
-
}
|
|
285
|
-
},
|
|
286
|
-
isUserNode(data) {
|
|
287
|
-
// 当前节点不是公司节点,也不是分支机构节点,表示是部门节点
|
|
288
|
-
return data.id !== this.tenantNodeId && data.nodeType && data.nodeType === 'USER'
|
|
289
|
-
},
|
|
290
|
-
selectWorkgroupUser() {
|
|
291
|
-
// 是否需要显示提示框,默认不显示
|
|
292
|
-
var showTip = false
|
|
293
|
-
if (this.multiple) {
|
|
294
|
-
// 选中的用户结果
|
|
295
|
-
var selectNodeInfo = {
|
|
296
|
-
userIds: [],
|
|
297
|
-
userNames: [],
|
|
298
|
-
loginNames: [],
|
|
299
|
-
emails: [],
|
|
300
|
-
telephones: [],
|
|
301
|
-
users: []
|
|
302
|
-
}
|
|
303
|
-
var parentIds = []
|
|
304
|
-
|
|
305
|
-
var nodes = this.$refs.workgroupUserTree.getCheckedNodes()
|
|
306
|
-
if (nodes) {
|
|
307
|
-
if (nodes.length === 0) {
|
|
308
|
-
// 没有选择任何节点
|
|
309
|
-
showTip = true
|
|
310
|
-
} else {
|
|
311
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
312
|
-
var node = nodes[i]
|
|
313
|
-
if (this.isSelectTenantNode(node.id)) {
|
|
314
|
-
// 表示选择了所有工作组人员
|
|
315
|
-
selectNodeInfo.userIds = []
|
|
316
|
-
selectNodeInfo.userNames = []
|
|
317
|
-
selectNodeInfo.userIds.push(node.id)
|
|
318
|
-
selectNodeInfo.userNames.push('所有工作组人员')
|
|
319
|
-
break
|
|
320
|
-
} else if (node.id !== this.tenantNodeId) {
|
|
321
|
-
// 不是公司根节点
|
|
322
|
-
if (node.leaf) {
|
|
323
|
-
// 如果是叶子节点
|
|
324
|
-
if (this.isUserNode(node)) {
|
|
325
|
-
const user = JSON.parse(node.data)
|
|
326
|
-
this.addSelectedUserInfo(selectNodeInfo, user)
|
|
327
|
-
}
|
|
328
|
-
} else {
|
|
329
|
-
// 表示是工作组节点,且该节点下存在用户
|
|
330
|
-
const userDatas = node.children
|
|
331
|
-
if (userDatas && userDatas.length > 0) {
|
|
332
|
-
// 表示已展开过该工作组
|
|
333
|
-
userDatas.forEach(userData => {
|
|
334
|
-
const user = JSON.parse(userData.data)
|
|
335
|
-
this.addSelectedUserInfo(selectNodeInfo, user)
|
|
336
|
-
})
|
|
337
|
-
} else {
|
|
338
|
-
// 表示没有展开过该节点,需要去后台获得该工作组下的人员信息
|
|
339
|
-
parentIds.push(node.id)
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
if (parentIds.length > 0) {
|
|
345
|
-
// 表示选中的工作组节点未展开过,则需要去后台查询获得这些工作组下的人员集合
|
|
346
|
-
this.getAllSelectedWorkgroupUsers(parentIds, selectNodeInfo)
|
|
347
|
-
showTip = false
|
|
348
|
-
} else {
|
|
349
|
-
if (selectNodeInfo.userIds.length > 0) {
|
|
350
|
-
this.$emit('result', selectNodeInfo)
|
|
351
|
-
} else {
|
|
352
|
-
showTip = true
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
} else {
|
|
357
|
-
showTip = true
|
|
358
|
-
}
|
|
359
|
-
} else {
|
|
360
|
-
const data = this.$refs.workgroupUserTree.getCurrentNode()
|
|
361
|
-
if (data && data !== null) {
|
|
362
|
-
this.selectSingleNode(data, true)
|
|
363
|
-
} else {
|
|
364
|
-
showTip = true
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
if (showTip) {
|
|
369
|
-
this.$alert(this.$t('imatrixUIMessage.pleaseSelectPersonnel'), this.$t('imatrixUIMessage.tips'), {
|
|
370
|
-
confirmButtonText: this.$t('imatrixUIPublicModel.sure')
|
|
371
|
-
})
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
// 是否选中了公司节点
|
|
375
|
-
isSelectTenantNode(dataId) {
|
|
376
|
-
return dataId === this.tenantNodeId && (!this.branchInfo || this.branchInfo.length === 0)
|
|
377
|
-
},
|
|
378
|
-
// 将选中的部门节点添加到结果集合中
|
|
379
|
-
addSelectedUserInfo(result, user) {
|
|
380
|
-
const filterResult = result.userIds.filter(this.filterUserNode(user))
|
|
381
|
-
if (filterResult.length === 0) {
|
|
382
|
-
let name = user.name
|
|
383
|
-
if (user.enName && user.enName !== '') {
|
|
384
|
-
name = name + '(' + user.enName + ')'
|
|
385
|
-
}
|
|
386
|
-
// if (this.containBranch && user.subCompanyName) {
|
|
387
|
-
// // 如果包含分支机构,则拼接分支机构名称
|
|
388
|
-
// name = name + '(' + user.subCompanyName + ')'
|
|
389
|
-
// }
|
|
390
|
-
user.tenantCode = this.tenantInfo.code
|
|
391
|
-
user.tenantName = this.tenantInfo.tenantName
|
|
392
|
-
result.containBranch = this.containBranch
|
|
393
|
-
result.users.push(user)
|
|
394
|
-
result.userIds.push(user.id)
|
|
395
|
-
result.loginNames.push(user.loginName)
|
|
396
|
-
result.userNames.push(name)
|
|
397
|
-
result.emails.push(user.email)
|
|
398
|
-
result.telephones.push(user.telephone)
|
|
399
|
-
}
|
|
400
|
-
},
|
|
401
|
-
filterUserNode(queryUser) {
|
|
402
|
-
return (userId) => {
|
|
403
|
-
return (userId === queryUser.id)
|
|
404
|
-
}
|
|
405
|
-
},
|
|
406
|
-
// 给节点添加自定义图标
|
|
407
|
-
renderContent(h, { node, data, store }) {
|
|
408
|
-
var className
|
|
409
|
-
if (node.data.id === -1) {
|
|
410
|
-
// node.id ===-1表示公司节点,node.branch表示是分支机构节点
|
|
411
|
-
className = 'el-icon-menu'
|
|
412
|
-
} else {
|
|
413
|
-
// 表示是工作组节点
|
|
414
|
-
className = 'el-icon-date'
|
|
415
|
-
}
|
|
416
|
-
if (data.nodeType && data.nodeType === 'USER' &&
|
|
417
|
-
this.searchValue && this.filterUserVal(data, this.searchValue)) {
|
|
418
|
-
// 如果是查询条件
|
|
419
|
-
return (
|
|
420
|
-
<span>
|
|
421
|
-
<i class={className}></i>
|
|
422
|
-
<span class='searchResult' title={node.label}>{node.label}</span>
|
|
423
|
-
</span>
|
|
424
|
-
)
|
|
425
|
-
}
|
|
426
|
-
return (
|
|
427
|
-
<span>
|
|
428
|
-
<i class={className}></i>
|
|
429
|
-
<span title={node.label}>{node.label}</span>
|
|
430
|
-
</span>
|
|
431
|
-
)
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
</script>
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-date-picker
|
|
4
|
-
v-model="value[0]"
|
|
5
|
-
style="width:47%"
|
|
6
|
-
value-format="yyyy"
|
|
7
|
-
type="year"
|
|
8
|
-
:placeholder="$t('imatrixUIMessage.selectYear')"
|
|
9
|
-
@change="changeStart"
|
|
10
|
-
/>
|
|
11
|
-
-
|
|
12
|
-
<el-date-picker
|
|
13
|
-
v-model="value[1]"
|
|
14
|
-
style="width:47%"
|
|
15
|
-
value-format="yyyy"
|
|
16
|
-
type="year"
|
|
17
|
-
:placeholder="$t('imatrixUIMessage.selectYear')"
|
|
18
|
-
@change="changeEnd"
|
|
19
|
-
/>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
<script>
|
|
23
|
-
export default {
|
|
24
|
-
name: 'YearRangePicker',
|
|
25
|
-
props: {
|
|
26
|
-
value: {
|
|
27
|
-
type: Array,
|
|
28
|
-
default: () => {
|
|
29
|
-
return []
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
data() {
|
|
34
|
-
return {
|
|
35
|
-
yearStart: '',
|
|
36
|
-
yearEnd: ''
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
methods: {
|
|
40
|
-
changeStart(value) {
|
|
41
|
-
this.value[0] = value
|
|
42
|
-
this.$emit('change', this.value)
|
|
43
|
-
},
|
|
44
|
-
changeEnd(value) {
|
|
45
|
-
this.value[1] = value
|
|
46
|
-
this.$emit('change', this.value)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
</script>
|
package/src/index.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
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
|
-
import PreventReclick from '../packages/directives/prevent-reclick'
|
|
17
|
-
// import exportPlugin from '../packages/export-data/index'
|
|
18
|
-
// import ValidCode from '../packages/valid-code'
|
|
19
|
-
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
|
-
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
|
-
import plugins from '../packages/plugins/index'
|
|
36
|
-
import permission from './directives/permission'
|
|
37
|
-
|
|
38
|
-
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
39
|
-
const install = function(Vue) {
|
|
40
|
-
Vue.directive('prevent-reclick', PreventReclick)
|
|
41
|
-
permission.install(Vue)
|
|
42
|
-
Vue.use(customPlugin)
|
|
43
|
-
Vue.use(plugins)
|
|
44
|
-
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
|
-
// 将弹出页面方法注册到window对象上
|
|
50
|
-
window['$plateform_openPage'] = openPage
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// 判断是否是直接引入vue的js文件,即全局引用可自动安装所有组件
|
|
54
|
-
if (typeof window !== 'undefined' && window.Vue) {
|
|
55
|
-
install(window.Vue)
|
|
56
|
-
}
|
|
57
|
-
// 按需引入
|
|
58
|
-
// export {
|
|
59
|
-
// Breadcrumb,
|
|
60
|
-
// DepartmentTree,
|
|
61
|
-
// Hamburger,
|
|
62
|
-
// SvgIcon,
|
|
63
|
-
// SuperGrid,
|
|
64
|
-
// DepartmentUserTree,
|
|
65
|
-
// WorkgroupTree,
|
|
66
|
-
// WorkgroupUserTree,
|
|
67
|
-
// InlineDepartmentTree,
|
|
68
|
-
// InlineDepartmentUserTree,
|
|
69
|
-
// InlineWorkgroupTree,
|
|
70
|
-
// InlineWorkgroupUserTree,
|
|
71
|
-
// WorkflowButton,
|
|
72
|
-
// WorkflowHistoryList,
|
|
73
|
-
// ValidCode,
|
|
74
|
-
// RemoveUser,
|
|
75
|
-
// RemoveDepartment,
|
|
76
|
-
// RemoveWorkgroup,
|
|
77
|
-
// OrganizationInput,
|
|
78
|
-
// SuperNineGrid,
|
|
79
|
-
// DynamicSourceSelect,
|
|
80
|
-
// FsUpload,
|
|
81
|
-
// ScanCodeInput,
|
|
82
|
-
// FsPreview,
|
|
83
|
-
// FsUploadList,
|
|
84
|
-
// YearRangePicker,
|
|
85
|
-
// MultipartUpload,
|
|
86
|
-
// RichEditor,
|
|
87
|
-
// SecretInfo
|
|
88
|
-
// }
|
|
89
|
-
|
|
90
|
-
export default {
|
|
91
|
-
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
|
|
92
|
-
install
|
|
93
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
.gray {
|
|
2
|
-
|
|
3
|
-
.button-at-top {
|
|
4
|
-
width: 100%;
|
|
5
|
-
background: rgb(255, 255, 255);
|
|
6
|
-
line-height: 72px;
|
|
7
|
-
height: 72px;
|
|
8
|
-
position: absolute;
|
|
9
|
-
z-index: 100;
|
|
10
|
-
top: 0px;
|
|
11
|
-
left: 0px;
|
|
12
|
-
right: 0px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.button-at-bottom {
|
|
16
|
-
width: 100%;
|
|
17
|
-
background: rgb(255, 255, 255);
|
|
18
|
-
line-height: 72px;
|
|
19
|
-
height: 72px;
|
|
20
|
-
position: absolute;
|
|
21
|
-
bottom: 0px;
|
|
22
|
-
z-index: 100;
|
|
23
|
-
left: 0px;
|
|
24
|
-
right: 0px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.form-top-button {
|
|
28
|
-
height: 72px;
|
|
29
|
-
float: left;
|
|
30
|
-
padding-left: 24px;
|
|
31
|
-
line-height: 72px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.form-bottom-button {
|
|
35
|
-
height: 72px;
|
|
36
|
-
float: right;
|
|
37
|
-
padding-right: 24px;
|
|
38
|
-
line-height: 72px;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
}
|