agilebuilder-ui 1.0.621 → 1.0.962
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.js +115880 -110424
- package/lib/super-ui.umd.cjs +103 -95
- package/package.json +6 -3
- package/packages/department-tree/src/department-tree.vue +27 -10
- package/packages/department-tree-inline/src/department-tree-service.js +20 -41
- package/packages/department-tree-mobile/src/department-tree-app.vue +6 -6
- package/packages/department-tree-mobile/src/department-tree-inline-app.vue +15 -15
- package/packages/department-user-tree/src/department-user-tree.vue +17 -2
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +61 -26
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +64 -22
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -6
- package/packages/department-user-tree-inline/src/group-user/group-input.vue +162 -0
- package/packages/department-user-tree-inline/src/group-user/group-list.vue +99 -0
- package/packages/department-user-tree-inline/src/group-user/group-user.vue +42 -0
- package/packages/department-user-tree-inline/src/group-user-multiple-tree.vue +304 -0
- package/packages/department-user-tree-inline/src/group-user-single-tree.vue +155 -0
- package/packages/department-user-tree-inline/src/group-user-tree-service.js +74 -0
- package/packages/department-user-tree-inline/src/search-result.vue +34 -36
- package/packages/department-user-tree-mobile/src/department-user-tree-app.vue +6 -6
- package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +17 -19
- package/packages/department-user-tree-mobile/src/department-user-tree-service.ts +0 -11
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +795 -799
- package/packages/dynamic-source-select/src/events.js +11 -16
- package/packages/fs-upload-list/src/fs-upload-list.vue +183 -122
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-app.vue +246 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +480 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-component.vue +127 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-input.vue +246 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload.vue +255 -0
- package/packages/fs-upload-new/src/fs-button-upload.vue +10 -13
- package/packages/fs-upload-new/src/fs-drag-upload.vue +4 -8
- package/packages/fs-upload-new/src/fs-preview-new.vue +103 -36
- package/packages/fs-upload-new/src/fs-upload-new.vue +160 -13
- package/packages/index.js +11 -2
- package/packages/organization-input/src/organization-input.vue +493 -539
- package/packages/plugins/export-data-new.js +34 -1
- package/packages/rich-editor/index.vue +29 -0
- package/packages/row-form/index.js +7 -0
- package/packages/row-form/index.vue +211 -0
- package/packages/scan-code-input/src/scan-code-input.vue +136 -104
- package/packages/scan-code-input-browser/index.js +6 -0
- package/packages/{scan-code-input/src/scan-code-input-colse.vue → scan-code-input-browser/src/scan-code-input.vue} +1 -28
- package/packages/secret-info/index.vue +2 -2
- package/packages/super-grid/src/apis.js +158 -10
- package/packages/super-grid/src/components/grid-icon.vue +7 -14
- package/packages/super-grid/src/components/hyperlinks.vue +24 -8
- package/packages/super-grid/src/custom-formatter.js +312 -380
- package/packages/super-grid/src/dynamic-input.vue +346 -43
- package/packages/super-grid/src/formValidatorUtil.js +79 -15
- package/packages/super-grid/src/group-column.vue +5 -0
- package/packages/super-grid/src/normal-column-content.vue +1056 -0
- package/packages/super-grid/src/normal-column.vue +57 -740
- package/packages/super-grid/src/row-detail.vue +50 -0
- package/packages/super-grid/src/row-operation.vue +19 -10
- package/packages/super-grid/src/scan-util.ts +243 -0
- package/packages/super-grid/src/search-button.vue +18 -14
- package/packages/super-grid/src/search-form-advancedQuery.vue +9 -2
- package/packages/super-grid/src/search-form-item.vue +10 -3
- package/packages/super-grid/src/search-form-mobile.vue +250 -0
- package/packages/super-grid/src/search-form.vue +159 -82
- package/packages/super-grid/src/super-grid-service.js +51 -6
- package/packages/super-grid/src/super-grid.vue +657 -761
- package/packages/super-grid/src/utils.js +126 -170
- package/packages/super-nine-grid/src/super-nine-grid.vue +1032 -1141
- package/packages/workflow-button/src/workflow-button.vue +6 -1
- package/packages/workgroup-tree/src/workgroup-tree.vue +31 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +28 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +26 -0
- package/packages/workgroup-tree-mobile/index.js +6 -0
- package/packages/workgroup-tree-mobile/src/dept-result.vue +51 -0
- package/packages/workgroup-tree-mobile/src/workgroup-tree-app.vue +120 -0
- package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +375 -0
- package/packages/workgroup-tree-mobile/src/workgroup-tree-service.ts +62 -0
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +15 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +27 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +11 -0
- package/packages/workgroup-user-tree-mobile/index.js +6 -0
- package/packages/workgroup-user-tree-mobile/src/dept-path.vue +36 -0
- package/packages/workgroup-user-tree-mobile/src/dept-result.vue +58 -0
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue +119 -0
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue +394 -0
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-service.ts +41 -0
- package/src/api/sso-service.js +44 -15
- package/src/directives/permission/permission.js +4 -3
- package/src/i18n/langs/cn.js +19 -3
- package/src/i18n/langs/en.js +18 -2
- package/src/permission.js +114 -122
- package/src/store/modules/user.js +32 -33
- package/src/styles/index.scss +1 -0
- package/src/styles/table.scss +12 -0
- package/src/styles/theme/dark-blue/button.scss +2 -2
- package/src/styles/theme/dark-blue/index.scss +1 -1
- package/src/styles/theme/dark-blue/sidebar.scss +10 -0
- package/src/styles/theme/dark-blue/table.scss +8 -52
- package/src/styles/theme/green/button.scss +2 -2
- package/src/styles/theme/green/green.scss +1 -1
- package/src/styles/theme/green/index.scss +1 -1
- package/src/styles/theme/green/sidebar.scss +20 -0
- package/src/styles/theme/green/table.scss +7 -51
- package/src/styles/theme/ocean-blue/button.scss +2 -2
- package/src/styles/theme/ocean-blue/index.scss +1 -1
- package/src/styles/theme/ocean-blue/ocean-blue.scss +1 -1
- package/src/styles/theme/ocean-blue/sidebar.scss +10 -0
- package/src/styles/theme/ocean-blue/table.scss +7 -52
- package/src/utils/auth.js +23 -3
- package/src/utils/calculator/calculator-factory.js +4 -4
- package/src/utils/calculator/calculator-util.js +14 -0
- package/src/utils/common-util.js +270 -124
- package/src/utils/i18n-util.js +145 -0
- package/src/utils/jump-page-utils.js +245 -314
- package/src/utils/permission.js +7 -1
- package/src/utils/permissionAuth.js +155 -37
- package/src/utils/request.js +10 -11
- package/src/utils/util.js +154 -205
- package/src/views/layout/EmptyLayout.vue +1 -1
- package/src/views/layout/components/Menubar/Item.vue +27 -4
- package/src/views/layout/components/Menubar/SidebarItem.vue +7 -3
- package/src/views/layout/components/Menubar/index.vue +14 -2
- package/src/views/layout/tab-content-index.vue +1 -1
|
@@ -27,28 +27,43 @@
|
|
|
27
27
|
display: inline-block !important;
|
|
28
28
|
"
|
|
29
29
|
>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
30
|
+
<el-tabs v-model="activeTab" class="boe">
|
|
31
|
+
<el-tab-pane :label="$t('departmentUserTreeInline.orgTree')" name="orgTree">
|
|
32
|
+
<el-tree
|
|
33
|
+
ref="deparmentUserTree"
|
|
34
|
+
:load="loadNode"
|
|
35
|
+
:props="defaultProps"
|
|
36
|
+
lazy
|
|
37
|
+
node-key="nodeId"
|
|
38
|
+
@node-click="handleNodeClick"
|
|
39
|
+
>
|
|
40
|
+
<template #default="{ node, data }">
|
|
41
|
+
<span>
|
|
42
|
+
<el-icon>
|
|
43
|
+
<Menu v-if="node.data.id === -1 || node.data.branch"/>
|
|
44
|
+
<Tickets v-else-if="node.data.id === -2 || node.data.id === -3"/>
|
|
45
|
+
<User v-else-if="node.data.nodeType === 'USER'"/>
|
|
46
|
+
<Calendar v-else/>
|
|
47
|
+
</el-icon>
|
|
48
|
+
<span :title="node.label">
|
|
49
|
+
{{ node.label }}
|
|
50
|
+
</span>
|
|
51
|
+
</span>
|
|
52
|
+
</template>
|
|
53
|
+
</el-tree>
|
|
54
|
+
</el-tab-pane>
|
|
55
|
+
<el-tab-pane name="groupTree">
|
|
56
|
+
<template v-slot:label>
|
|
57
|
+
<span>{{ $t('departmentUserTreeInline.group') }}</span>
|
|
58
|
+
<span><GroupUser :active-tab="activeTab" @update-group-tree="updateGroupTree" /></span>
|
|
59
|
+
</template>
|
|
60
|
+
<GroupUserSingleTree
|
|
61
|
+
v-if="isShowGroupTree"
|
|
62
|
+
@singleClick="getGroupUserResult"
|
|
63
|
+
@dblClick="dblClickGroupUserResult"
|
|
64
|
+
/>
|
|
65
|
+
</el-tab-pane>
|
|
66
|
+
</el-tabs>
|
|
52
67
|
</div>
|
|
53
68
|
<div
|
|
54
69
|
v-if="
|
|
@@ -79,6 +94,8 @@ import UserResult from './search-result.vue'
|
|
|
79
94
|
import utils from '../../utils/utils'
|
|
80
95
|
import departmentUserTreeSingleService from './department-user-tree-single-service'
|
|
81
96
|
import memoryCacheUtils from '../../utils/memory-cache-utils'
|
|
97
|
+
import GroupUserSingleTree from './group-user-single-tree.vue'
|
|
98
|
+
import GroupUser from './group-user/group-user.vue'
|
|
82
99
|
|
|
83
100
|
export default {
|
|
84
101
|
data() {
|
|
@@ -125,11 +142,15 @@ export default {
|
|
|
125
142
|
// 记忆选择数据, 搜索框获得焦点后,下拉显示最近选中的10个人,倒序排列,最后选中的在最上面显示。
|
|
126
143
|
memoryCacheData: [],
|
|
127
144
|
ElIconSearch,
|
|
145
|
+
activeTab: 'orgTree', // 当前页签
|
|
146
|
+
isShowGroupTree: true
|
|
128
147
|
}
|
|
129
148
|
},
|
|
130
149
|
name: 'InlineDepartmentUserSingleTree',
|
|
131
150
|
components: {
|
|
132
151
|
UserResult,
|
|
152
|
+
GroupUserSingleTree,
|
|
153
|
+
GroupUser
|
|
133
154
|
},
|
|
134
155
|
props: {
|
|
135
156
|
// 显示指定部门节点及其子节点,不传该属性,表示显示整个组织结构树
|
|
@@ -330,6 +351,27 @@ export default {
|
|
|
330
351
|
this.packageSelectResult(user)
|
|
331
352
|
$emit(this, 'result', this.selectNodeInfo)
|
|
332
353
|
},
|
|
354
|
+
getGroupUserResult(selectNodeInof) {
|
|
355
|
+
console.log('getGroupUserResult----selectNodeInof=', selectNodeInof)
|
|
356
|
+
if (selectNodeInof) {1
|
|
357
|
+
this.selectNodeInfo = selectNodeInof
|
|
358
|
+
// this.$emit('result', this.selectNodeInfo)
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
updateGroupTree() {
|
|
362
|
+
this.isShowGroupTree = false
|
|
363
|
+
const that = this
|
|
364
|
+
setTimeout(() => {
|
|
365
|
+
that.isShowGroupTree = true
|
|
366
|
+
}, 10)
|
|
367
|
+
},
|
|
368
|
+
dblClickGroupUserResult(selectNodeInof) {
|
|
369
|
+
console.log('dblClickGroupUserResult----selectNodeInof=', selectNodeInof)
|
|
370
|
+
if (selectNodeInof) {
|
|
371
|
+
this.selectNodeInfo = selectNodeInof
|
|
372
|
+
this.$emit('result', this.selectNodeInfo)
|
|
373
|
+
}
|
|
374
|
+
}
|
|
333
375
|
},
|
|
334
376
|
emits: ['result'],
|
|
335
377
|
}
|
|
@@ -96,12 +96,6 @@ const departmentUserTreeSingleService = {
|
|
|
96
96
|
if (children && children.length > 0) {
|
|
97
97
|
// 表示加载过该父节点的子节点,只需重新更新一下
|
|
98
98
|
resolve(children)
|
|
99
|
-
// 表示当前展开的节点是选中状态,则应保持其选中状态,并选中其子节点
|
|
100
|
-
if (checkedKeys && checkedKeys.indexOf(parentNodeId) > -1) {
|
|
101
|
-
// 点击部门名称前的三角标识展开节点时,保持当前节点的选中状态
|
|
102
|
-
// 表示当前展开的节点是选中状态,则应保持其选中状态,并选中其子节点
|
|
103
|
-
this.checkedChildrenUserNodes(node.data, node.data.children)
|
|
104
|
-
}
|
|
105
99
|
} else {
|
|
106
100
|
// 表示没有加载过该父节点的子节点集合时
|
|
107
101
|
const param = {
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
model-value
|
|
4
|
+
:title="$t('departmentUserTreeInline.groupForm')"
|
|
5
|
+
:close-on-click-modal="false"
|
|
6
|
+
append-to-body
|
|
7
|
+
width="30%"
|
|
8
|
+
@open="$emit('openDialog')"
|
|
9
|
+
@opend="$emit('opendDialog')"
|
|
10
|
+
@close="closeInput"
|
|
11
|
+
@closed="$emit('closedDialog')"
|
|
12
|
+
>
|
|
13
|
+
<div>
|
|
14
|
+
<el-form
|
|
15
|
+
ref="ruleFormRef"
|
|
16
|
+
:model="group"
|
|
17
|
+
label-width="auto"
|
|
18
|
+
status-icon
|
|
19
|
+
>
|
|
20
|
+
<el-form-item
|
|
21
|
+
:label="$t('departmentUserTreeInline.groupName')"
|
|
22
|
+
prop="name"
|
|
23
|
+
:rules="[
|
|
24
|
+
{ required: true, message: $t('departmentUserTreeInline.groupNameNotEmpty'), trigger: 'blur' }
|
|
25
|
+
]"
|
|
26
|
+
>
|
|
27
|
+
<el-input
|
|
28
|
+
v-model="group.name"
|
|
29
|
+
/>
|
|
30
|
+
</el-form-item>
|
|
31
|
+
</el-form>
|
|
32
|
+
<div v-if="myGroupId">
|
|
33
|
+
<div style="padding-bottom: 5px">
|
|
34
|
+
<el-button size="small" @click="showDeptMultipleTree=true">
|
|
35
|
+
{{ $t('imatrixUIPublicModel.add') }}
|
|
36
|
+
</el-button>
|
|
37
|
+
</div>
|
|
38
|
+
<el-table :data="tableData" border style="width: 100%" max-height="350">
|
|
39
|
+
<el-table-column prop="name" :label="$t('departmentUserTreeInline.name')" />
|
|
40
|
+
<el-table-column prop="loginName" :label="$t('departmentUserTreeInline.loginName')" />
|
|
41
|
+
<el-table-column :label="$t('imatrixUIPublicModel.edit')" align="center" width="60px">
|
|
42
|
+
<template #default="scope">
|
|
43
|
+
<div>
|
|
44
|
+
<el-button type="danger" size="small" :icon="Delete" circle @click="removeUser(scope.$index, scope.row)" />
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
</el-table-column>
|
|
48
|
+
</el-table>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<department-user-tree v-if="showDeptMultipleTree" width="60%" :multiple="true" @close="closeDeptMultiple" />
|
|
52
|
+
</div>
|
|
53
|
+
<div slot="footer" class="dialog-footer">
|
|
54
|
+
<el-button size="small" @click="closeInput">
|
|
55
|
+
{{ $t('imatrixUIPublicModel.cancel') }}
|
|
56
|
+
</el-button>
|
|
57
|
+
<el-button size="small" type="primary" @click="saveGroup">
|
|
58
|
+
{{ $t('imatrixUIPublicModel.sure') }}
|
|
59
|
+
</el-button>
|
|
60
|
+
</div>
|
|
61
|
+
</el-dialog>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<script setup>
|
|
65
|
+
import {Delete} from '@element-plus/icons-vue'
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<script>
|
|
69
|
+
import {Delete} from '@element-plus/icons-vue'
|
|
70
|
+
import groupUserTreeSevice from '../group-user-tree-service'
|
|
71
|
+
import utils from '../../../utils/utils'
|
|
72
|
+
export default {
|
|
73
|
+
name: 'GroupInput',
|
|
74
|
+
components:{
|
|
75
|
+
Delete
|
|
76
|
+
},
|
|
77
|
+
props: {
|
|
78
|
+
groupId: {
|
|
79
|
+
type: Number,
|
|
80
|
+
default: null
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
data() {
|
|
84
|
+
return {
|
|
85
|
+
group: {
|
|
86
|
+
|
|
87
|
+
},
|
|
88
|
+
showDeptMultipleTree: false,
|
|
89
|
+
loginNames: null,
|
|
90
|
+
tableData: [],
|
|
91
|
+
myGroupId: this.groupId
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
created() {
|
|
95
|
+
if (this.myGroupId) {
|
|
96
|
+
this.getGroupById(this.myGroupId).then((result) => {
|
|
97
|
+
this.group = result
|
|
98
|
+
this.tableData = result.users
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
methods: {
|
|
103
|
+
...utils,
|
|
104
|
+
...groupUserTreeSevice,
|
|
105
|
+
saveGroup() {
|
|
106
|
+
this.$refs['ruleFormRef'].validate((valid) => {
|
|
107
|
+
if (valid) {
|
|
108
|
+
this.saveUserGroup(this.group).then((data) => {
|
|
109
|
+
this.group = data
|
|
110
|
+
this.myGroupId = data.id
|
|
111
|
+
this.$message({
|
|
112
|
+
showClose: true,
|
|
113
|
+
type: 'success',
|
|
114
|
+
message: this.$t('imatrixUIMessage.saveSuccessfully')
|
|
115
|
+
})
|
|
116
|
+
if (this.tableData.length > 0) {
|
|
117
|
+
this.$emit('closeDialog')
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
} else {
|
|
121
|
+
return false
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
},
|
|
125
|
+
// 多选树关闭方法
|
|
126
|
+
closeDeptMultiple(selectNodeInfo) {
|
|
127
|
+
if (selectNodeInfo) {
|
|
128
|
+
this.loginNames = selectNodeInfo.loginNames
|
|
129
|
+
if (this.myGroupId) {
|
|
130
|
+
this.saveUserGroupLinks(this.myGroupId, this.loginNames).then(() => {
|
|
131
|
+
this.getUserGroupLinks(this.myGroupId).then((data) => {
|
|
132
|
+
this.tableData = data
|
|
133
|
+
this.showDeptMultipleTree = false
|
|
134
|
+
})
|
|
135
|
+
})
|
|
136
|
+
}
|
|
137
|
+
} else {
|
|
138
|
+
this.showDeptMultipleTree = false
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
removeUser(rowindex, row) {
|
|
142
|
+
if (this.myGroupId) {
|
|
143
|
+
this.deleteGroupUserLink(this.myGroupId, row.loginName).then(() => {
|
|
144
|
+
this.$message({
|
|
145
|
+
showClose: true,
|
|
146
|
+
type: 'success',
|
|
147
|
+
message: this.$t('superGrid.deleteSuccessful')
|
|
148
|
+
})
|
|
149
|
+
this.getUserGroupLinks(this.myGroupId).then((data) => {
|
|
150
|
+
this.tableData = data
|
|
151
|
+
})
|
|
152
|
+
})
|
|
153
|
+
} else {
|
|
154
|
+
this.removeUser(this.tableData, row)
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
closeInput() {
|
|
158
|
+
this.$emit('closeDialog')
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
</script>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-dialog
|
|
4
|
+
model-value
|
|
5
|
+
:title="$t('departmentUserTreeInline.groupList')"
|
|
6
|
+
:close-on-click-modal="false"
|
|
7
|
+
append-to-body
|
|
8
|
+
width="30%"
|
|
9
|
+
@open="$emit('openDialog')"
|
|
10
|
+
@opend="$emit('opendDialog')"
|
|
11
|
+
@close="$emit('closeDialog')"
|
|
12
|
+
@closed="$emit('closedDialog')"
|
|
13
|
+
>
|
|
14
|
+
<div>
|
|
15
|
+
<div style="padding-bottom: 5px">
|
|
16
|
+
<el-button size="small" @click="addGroup()">
|
|
17
|
+
{{ $t('imatrixUIPublicModel.add') }}
|
|
18
|
+
</el-button>
|
|
19
|
+
</div>
|
|
20
|
+
<el-table :data="tableData" border style="width: 100%" max-height="350">
|
|
21
|
+
<el-table-column :label="$t('superGrid.index')" align="center" width="60">
|
|
22
|
+
<template #default="scope">
|
|
23
|
+
{{ scope.$index+1 }}
|
|
24
|
+
</template>
|
|
25
|
+
</el-table-column>
|
|
26
|
+
<el-table-column prop="name" :label="$t('departmentUserTreeInline.groupName')" />
|
|
27
|
+
<el-table-column :label="$t('imatrixUIPublicModel.edit')" align="center" width="130">
|
|
28
|
+
<template #default="scope">
|
|
29
|
+
<div>
|
|
30
|
+
<el-button type="primary" size="small" :icon="EditPen" circle @click="updateGroup(scope.$index, scope.row)" />
|
|
31
|
+
<el-button type="danger" size="small" :icon="Delete" circle @click="removeGroup(scope.$index, scope.row)" />
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
</el-table-column>
|
|
35
|
+
</el-table>
|
|
36
|
+
</div>
|
|
37
|
+
</el-dialog>
|
|
38
|
+
<GroupInput
|
|
39
|
+
v-if="isShowInput2"
|
|
40
|
+
:group-id="groupId"
|
|
41
|
+
@closeDialog="closeGroupInput"
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
45
|
+
<script setup>
|
|
46
|
+
import {EditPen,Delete} from '@element-plus/icons-vue'
|
|
47
|
+
</script>
|
|
48
|
+
<script>
|
|
49
|
+
import GroupInput from './group-input'
|
|
50
|
+
import groupUserTreeSevice from '../group-user-tree-service'
|
|
51
|
+
export default {
|
|
52
|
+
name: 'GroupList',
|
|
53
|
+
components: {
|
|
54
|
+
GroupInput,
|
|
55
|
+
},
|
|
56
|
+
props: {
|
|
57
|
+
},
|
|
58
|
+
data() {
|
|
59
|
+
return {
|
|
60
|
+
tableData: [],
|
|
61
|
+
isShowInput2: false,
|
|
62
|
+
groupId: null
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
created() {
|
|
66
|
+
this.listGroups()
|
|
67
|
+
},
|
|
68
|
+
methods: {
|
|
69
|
+
...groupUserTreeSevice,
|
|
70
|
+
listGroups() {
|
|
71
|
+
this.getUserGroupList().then((data) => {
|
|
72
|
+
this.tableData = data
|
|
73
|
+
})
|
|
74
|
+
},
|
|
75
|
+
updateGroup(rowindex, row) {
|
|
76
|
+
this.groupId = row.id
|
|
77
|
+
this.isShowInput2 = true
|
|
78
|
+
},
|
|
79
|
+
removeGroup(rowindex, row) {
|
|
80
|
+
this.deleteUserGroup(row.id).then(() => {
|
|
81
|
+
this.$message({
|
|
82
|
+
showClose: true,
|
|
83
|
+
type: 'success',
|
|
84
|
+
message: this.$t('superGrid.deleteSuccessful')
|
|
85
|
+
})
|
|
86
|
+
this.listGroups()
|
|
87
|
+
})
|
|
88
|
+
},
|
|
89
|
+
closeGroupInput() {
|
|
90
|
+
this.isShowInput2 = false
|
|
91
|
+
this.listGroups()
|
|
92
|
+
},
|
|
93
|
+
addGroup() {
|
|
94
|
+
this.groupId = null
|
|
95
|
+
this.isShowInput2 = true
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
</script>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span style="padding-left: 10px">
|
|
3
|
+
<el-icon><CirclePlus @click="isShowList = true" /></el-icon>
|
|
4
|
+
<GroupList
|
|
5
|
+
v-if="isShowList"
|
|
6
|
+
@closeDialog="closeList()"
|
|
7
|
+
/>
|
|
8
|
+
</span>
|
|
9
|
+
</template>
|
|
10
|
+
<script>
|
|
11
|
+
import GroupList from './group-list'
|
|
12
|
+
import groupUserTreeService from '../group-user-tree-service'
|
|
13
|
+
import { CirclePlus } from '@element-plus/icons-vue'
|
|
14
|
+
export default {
|
|
15
|
+
name: 'GroupUser',
|
|
16
|
+
components: {
|
|
17
|
+
GroupList,
|
|
18
|
+
CirclePlus
|
|
19
|
+
},
|
|
20
|
+
props: {
|
|
21
|
+
activeTab: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: null
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
data() {
|
|
27
|
+
return {
|
|
28
|
+
isShowList: false,
|
|
29
|
+
groupId: null
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
created() {
|
|
33
|
+
},
|
|
34
|
+
methods: {
|
|
35
|
+
...groupUserTreeService,
|
|
36
|
+
closeList() {
|
|
37
|
+
this.isShowList = false
|
|
38
|
+
this.$emit('update-group-tree')
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</script>
|