imatrix-ui 2.8.21-dw → 2.8.21
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 -2
- package/packages/breadcrumb/index.js +6 -0
- package/packages/breadcrumb/src/breadcrumb.vue +71 -0
- package/packages/department-tree/index.js +6 -0
- package/packages/department-tree/src/department-tree.vue +108 -0
- package/packages/department-tree-inline/index.js +6 -0
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +402 -0
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +284 -0
- package/packages/department-tree-inline/src/department-tree-inline.vue +86 -0
- package/packages/department-tree-inline/src/department-tree-service.js +245 -0
- package/packages/department-tree-inline/src/search-result.vue +176 -0
- package/packages/department-user-tree/index.js +6 -0
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +116 -0
- package/packages/department-user-tree/src/department-user-single-tree.vue +76 -0
- package/packages/department-user-tree/src/department-user-tree.vue +101 -0
- package/packages/department-user-tree-inline/index.js +6 -0
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +626 -0
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +269 -0
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +79 -0
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +230 -0
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +122 -0
- package/packages/department-user-tree-inline/src/search-result.vue +197 -0
- package/packages/directives/prevent-reclick.js +19 -0
- package/packages/dynamic-source-select/index.js +6 -0
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +70 -0
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +440 -0
- package/packages/dynamic-source-select/src/events.js +55 -0
- package/packages/fs-preview/index.js +6 -0
- package/packages/fs-preview/src/fs-preview.vue +226 -0
- package/packages/fs-upload/index.js +6 -0
- package/packages/fs-upload/src/fs-upload-multi.vue +420 -0
- package/packages/fs-upload/src/fs-upload-single.vue +312 -0
- package/packages/fs-upload/src/fs-upload.vue +189 -0
- package/packages/fs-upload/src/see-big-picture.vue +55 -0
- package/packages/fs-upload-list/index.js +6 -0
- package/packages/fs-upload-list/src/fs-upload-list.vue +287 -0
- package/packages/hamburger/index.js +6 -0
- package/packages/hamburger/src/hamburger.vue +38 -0
- package/packages/index.js +121 -0
- package/packages/multipart-upload/index.js +6 -0
- package/packages/multipart-upload/src/index.vue +73 -0
- package/packages/multipart-upload/src/multipart-upload-form.vue +297 -0
- package/packages/multipart-upload/src/multipart-upload-list.vue +378 -0
- package/packages/organization-input/index.js +6 -0
- package/packages/organization-input/src/organization-input.vue +542 -0
- package/packages/plugins/export-data-new.js +453 -0
- package/packages/plugins/export-data.js +361 -0
- package/packages/plugins/index.js +15 -0
- package/packages/plugins/public-method.js +43 -0
- package/packages/remove-department/index.js +6 -0
- package/packages/remove-department/src/remove-department.vue +172 -0
- package/packages/remove-department/src/remove-dept-service.js +20 -0
- package/packages/remove-user/index.js +6 -0
- package/packages/remove-user/src/remove-user-service.js +20 -0
- package/packages/remove-user/src/remove-user.vue +195 -0
- package/packages/remove-workgroup/index.js +6 -0
- package/packages/remove-workgroup/src/remove-workgroup-service.js +20 -0
- package/packages/remove-workgroup/src/remove-workgroup.vue +159 -0
- package/packages/rich-editor/index.js +7 -0
- package/packages/rich-editor/index.vue +278 -0
- package/packages/rich-editor/langs/zh-Hans.js +1 -0
- package/packages/rich-editor/viewer.vue +103 -0
- package/packages/scan-code-input/index.js +6 -0
- package/packages/scan-code-input/src/events.js +33 -0
- package/packages/scan-code-input/src/scan-code-input-colse.vue +131 -0
- package/packages/scan-code-input/src/scan-code-input.vue +116 -0
- package/packages/secret-info/index.js +7 -0
- package/packages/secret-info/index.vue +90 -0
- package/packages/super-grid/index.js +7 -0
- package/packages/super-grid/src/apis.js +763 -0
- package/packages/super-grid/src/columns-config.vue +335 -0
- package/packages/super-grid/src/custom-formatter.js +250 -0
- package/packages/super-grid/src/dynamic-input.vue +1279 -0
- package/packages/super-grid/src/eventBus.js +2 -0
- package/packages/super-grid/src/events.js +55 -0
- package/packages/super-grid/src/formValidatorUtil.js +226 -0
- package/packages/super-grid/src/formatter.js +181 -0
- package/packages/super-grid/src/group-column.vue +100 -0
- package/packages/super-grid/src/header-context-menu.vue +87 -0
- package/packages/super-grid/src/index-column.vue +51 -0
- package/packages/super-grid/src/normal-column.vue +769 -0
- package/packages/super-grid/src/public-methods.js +31 -0
- package/packages/super-grid/src/row-operation.vue +161 -0
- package/packages/super-grid/src/search-button.vue +66 -0
- package/packages/super-grid/src/search-condition-input.vue +61 -0
- package/packages/super-grid/src/search-condition-list.vue +59 -0
- package/packages/super-grid/src/search-form-advancedQuery.vue +653 -0
- package/packages/super-grid/src/search-form-dialog.vue +79 -0
- package/packages/super-grid/src/search-form-item.vue +386 -0
- package/packages/super-grid/src/search-form-number.vue +38 -0
- package/packages/super-grid/src/search-form-open.vue +162 -0
- package/packages/super-grid/src/search-form-ordinarySearch.vue +188 -0
- package/packages/super-grid/src/search-form.vue +634 -0
- package/packages/super-grid/src/search-methods.js +387 -0
- package/packages/super-grid/src/selection-column.vue +43 -0
- package/packages/super-grid/src/store.js +3 -0
- package/packages/super-grid/src/super-grid-service.js +561 -0
- package/packages/super-grid/src/super-grid.vue +2793 -0
- package/packages/super-grid/src/utils.js +763 -0
- package/packages/super-grid/src/view-image-dialog.vue +130 -0
- package/packages/super-nine-grid/index.js +7 -0
- package/packages/super-nine-grid/src/apis.js +103 -0
- package/packages/super-nine-grid/src/custom-formatter.js +66 -0
- package/packages/super-nine-grid/src/formatter.js +132 -0
- package/packages/super-nine-grid/src/search-form-number.vue +38 -0
- package/packages/super-nine-grid/src/search-form.vue +430 -0
- package/packages/super-nine-grid/src/search-methods.js +134 -0
- package/packages/super-nine-grid/src/store.js +3 -0
- package/packages/super-nine-grid/src/super-grid-service.js +91 -0
- package/packages/super-nine-grid/src/super-nine-grid.vue +872 -0
- package/packages/super-nine-grid/src/utils.js +261 -0
- package/packages/svg-icon/index.js +6 -0
- package/packages/svg-icon/src/svg-icon.vue +43 -0
- package/packages/utils/utils.js +152 -0
- package/packages/utils/value-set.js +86 -0
- package/packages/valid-code/index.js +7 -0
- package/packages/valid-code/src/valid-code.vue +95 -0
- package/packages/workflow-button/index.js +6 -0
- package/packages/workflow-button/src/workflow-button.vue +325 -0
- package/packages/workflow-history-list/index.js +6 -0
- package/packages/workflow-history-list/src/api.js +7 -0
- package/packages/workflow-history-list/src/workflow-history-list.vue +185 -0
- package/packages/workgroup-tree/index.js +6 -0
- package/packages/workgroup-tree/src/workgroup-tree.vue +76 -0
- package/packages/workgroup-tree-inline/index.js +6 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +317 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +43 -0
- package/packages/workgroup-user-tree/index.js +6 -0
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +100 -0
- package/packages/workgroup-user-tree-inline/index.js +6 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +163 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +436 -0
- package/packages/year-range-picker/index.js +6 -0
- package/packages/year-range-picker/src/year-range-picker.vue +51 -0
- package/src/i18n/i18n.js +1 -1
- package/src/i18n/langs/cn.js +4 -2
- package/src/i18n/langs/en.js +4 -2
- package/src/index.js +93 -0
- package/src/permission.js +7 -3
- package/src/plugins.js +3 -3
- package/src/router/index.js +24 -0
- package/src/store/getters.js +2 -1
- package/src/store/modules/app.js +10 -1
- package/src/styles/display-layout.scss +34 -0
- package/src/styles/index.scss +32 -4
- package/src/styles/theme/dark-blue/button.scss +9 -0
- package/src/styles/theme/dark-blue/card.scss +64 -0
- package/src/styles/theme/dark-blue/checkbox.scss +10 -0
- package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
- package/src/styles/theme/dark-blue/dialog.scss +21 -0
- package/src/styles/theme/dark-blue/element-variables.scss +7 -0
- package/src/styles/theme/dark-blue/font.scss +71 -0
- package/src/styles/theme/dark-blue/form.scss +51 -0
- package/src/styles/theme/dark-blue/index.scss +247 -0
- package/src/styles/theme/dark-blue/input.scss +15 -0
- package/src/styles/theme/dark-blue/pagination.scss +14 -0
- package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
- package/src/styles/theme/dark-blue/sidebar.scss +296 -0
- package/src/styles/theme/dark-blue/tab.scss +83 -0
- package/src/styles/theme/dark-blue/table.scss +60 -0
- package/src/styles/theme/dark-blue/tree.scss +31 -0
- package/src/styles/theme/dark-blue/var.scss +1028 -0
- package/src/styles/theme/gray/form-style.scss +2 -2
- package/src/styles/theme/gray/input-style.scss +8 -0
- package/src/utils/auth-api.js +115 -0
- package/src/utils/auth.js +34 -42
- package/src/utils/calculator/calculator-factory.js +2 -2
- package/src/utils/common-util.js +34 -0
- package/src/utils/jump-page-utils.js +29 -5
- package/src/utils/menu.js +19 -0
- package/src/utils/permission.js +4 -0
- package/src/utils/request.js +18 -2
- package/src/utils/util.js +7 -3
- package/src/views/dsc-component/Sidebar/Item.vue +4 -4
- package/src/views/dsc-component/Sidebar/Link.vue +11 -2
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +36 -20
- package/src/views/dsc-component/Sidebar/index.vue +24 -12
- package/src/views/dsc-component/tabs/tab-content.vue +16 -1
- package/src/views/login/index.vue +1 -1
|
@@ -0,0 +1,176 @@
|
|
|
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>
|
|
@@ -0,0 +1,116 @@
|
|
|
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>
|
|
@@ -0,0 +1,76 @@
|
|
|
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('openDialog')"
|
|
11
|
+
@opend="$emit('opendDialog')"
|
|
12
|
+
@close="$emit('closeDialog')"
|
|
13
|
+
@closed="$emit('closedDialog')"
|
|
14
|
+
>
|
|
15
|
+
<inline-department-user-single-tree ref="inlineDepartmentUser" :department-info="departmentInfo" :is-need-virtual-user="isNeedVirtualUser" @result="result" />
|
|
16
|
+
<div slot="footer" class="dialog-footer">
|
|
17
|
+
<el-button size="small" @click="$emit('closeDialog')">
|
|
18
|
+
{{ $t('imatrixUIPublicModel.cancel') }}
|
|
19
|
+
</el-button>
|
|
20
|
+
<el-button size="small" type="primary" @click="confirmSelectUser">
|
|
21
|
+
{{ $t('imatrixUIPublicModel.sure') }}
|
|
22
|
+
</el-button>
|
|
23
|
+
</div>
|
|
24
|
+
</el-dialog>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
<script>
|
|
28
|
+
import InlineDepartmentUserSingleTree from '../../department-user-tree-inline/src/department-user-single-tree-inline.vue'
|
|
29
|
+
export default {
|
|
30
|
+
name: 'DepartmentUserSingleTree',
|
|
31
|
+
components: {
|
|
32
|
+
InlineDepartmentUserSingleTree
|
|
33
|
+
},
|
|
34
|
+
props: {
|
|
35
|
+
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
36
|
+
departmentInfo: {
|
|
37
|
+
type: Array,
|
|
38
|
+
default: null
|
|
39
|
+
},
|
|
40
|
+
// 弹框的标题
|
|
41
|
+
title: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: null
|
|
44
|
+
},
|
|
45
|
+
// 弹框的宽度
|
|
46
|
+
width: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: '30%'
|
|
49
|
+
},
|
|
50
|
+
// 是否需要显示虚拟用户
|
|
51
|
+
isNeedVirtualUser: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
data() {
|
|
57
|
+
let myTitle = this.$t('imatrixUIMessage.pleaseSelectPersonnel')
|
|
58
|
+
if (this.title) {
|
|
59
|
+
myTitle = this.title
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
myTitle
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
methods: {
|
|
66
|
+
result(selectNodeInfo) {
|
|
67
|
+
this.$emit('closeDialog', selectNodeInfo)
|
|
68
|
+
},
|
|
69
|
+
confirmSelectUser() {
|
|
70
|
+
// this.$refs.inlineDepartmentUser.confirmSelectUser()
|
|
71
|
+
// selectNodeInfo
|
|
72
|
+
this.$emit('closeDialog', this.$refs.inlineDepartmentUser.selectNodeInfo)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
</script>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<department-user-multi-tree
|
|
4
|
+
v-if="multiple"
|
|
5
|
+
:title="title"
|
|
6
|
+
:width="width?width:'60%'"
|
|
7
|
+
:height="height"
|
|
8
|
+
:department-info="departmentInfo"
|
|
9
|
+
:is-need-virtual-user="isNeedVirtualUser"
|
|
10
|
+
:select-user-info="selectUserInfo"
|
|
11
|
+
:search-field="searchField"
|
|
12
|
+
:separator="separator"
|
|
13
|
+
@closeDialog="closeDialog"
|
|
14
|
+
@closedDialog="closedDialog"
|
|
15
|
+
@openDialog="openDialog"
|
|
16
|
+
@opendDialog="opendDialog"
|
|
17
|
+
/>
|
|
18
|
+
<department-user-single-tree v-if="!multiple" :title="title" :width="width?width:'40%'" :department-info="departmentInfo" :is-need-virtual-user="isNeedVirtualUser" @closeDialog="closeDialog" @closedDialog="closedDialog" @openDialog="openDialog" @opendDialog="opendDialog" />
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
<script>
|
|
22
|
+
import DepartmentUserSingleTree from './department-user-single-tree.vue'
|
|
23
|
+
import DepartmentUserMultiTree from './department-user-multiple-tree.vue'
|
|
24
|
+
export default {
|
|
25
|
+
name: 'DepartmentUserTree',
|
|
26
|
+
components: {
|
|
27
|
+
DepartmentUserSingleTree,
|
|
28
|
+
DepartmentUserMultiTree
|
|
29
|
+
},
|
|
30
|
+
props: {
|
|
31
|
+
// 是否是多选树,默认是true
|
|
32
|
+
multiple: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: true
|
|
35
|
+
},
|
|
36
|
+
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
37
|
+
departmentInfo: {
|
|
38
|
+
type: Array,
|
|
39
|
+
default: null
|
|
40
|
+
},
|
|
41
|
+
// 弹框的标题
|
|
42
|
+
title: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: null
|
|
45
|
+
},
|
|
46
|
+
// 弹框的宽度
|
|
47
|
+
width: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: null
|
|
50
|
+
},
|
|
51
|
+
// 弹框的高度
|
|
52
|
+
height: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: '300px'
|
|
55
|
+
},
|
|
56
|
+
// 是否需要显示虚拟用户
|
|
57
|
+
isNeedVirtualUser: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false
|
|
60
|
+
},
|
|
61
|
+
// 多选用户树时,已选择用户id或登录名集合,多个之间以逗号隔开
|
|
62
|
+
selectUserInfo: {
|
|
63
|
+
type: [String, Number],
|
|
64
|
+
default: null
|
|
65
|
+
},
|
|
66
|
+
// 移除用户时,用户属性名称:id、loginName、email、telephone,默认是loginName
|
|
67
|
+
searchField: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: 'loginName'
|
|
70
|
+
},
|
|
71
|
+
// 多选树时结果之间的分隔符,默认是逗号分隔
|
|
72
|
+
separator: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: ','
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
data() {
|
|
78
|
+
let myTitle = this.$t('imatrixUIMessage.pleaseSelectPersonnel')
|
|
79
|
+
if (this.title) {
|
|
80
|
+
myTitle = this.title
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
myTitle
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
methods: {
|
|
87
|
+
closeDialog(selectNodeInfo) {
|
|
88
|
+
this.$emit('close', selectNodeInfo)
|
|
89
|
+
},
|
|
90
|
+
closedDialog() {
|
|
91
|
+
this.$emit('closed')
|
|
92
|
+
},
|
|
93
|
+
openDialog() {
|
|
94
|
+
this.$emit('open')
|
|
95
|
+
},
|
|
96
|
+
opendDialog() {
|
|
97
|
+
this.$emit('opend')
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
</script>
|