|
@@ -72,8 +72,8 @@
|
|
|
<el-scrollbar>
|
|
|
<li v-for="(item, index) in selected" :key="item.id">
|
|
|
<span class="name">
|
|
|
- <el-avatar size="small">{{ item.name.substring(0, 1) }}</el-avatar>
|
|
|
- <label>{{ item.name }}</label>
|
|
|
+ <el-avatar size="small">{{ item.username }}</el-avatar>
|
|
|
+ <label>{{ item.username }}</label>
|
|
|
</span>
|
|
|
<span class="delete">
|
|
|
<el-button type="danger" icon="el-icon-delete" circle size="small" @click="deleteSelected(index)"></el-button>
|
|
@@ -117,7 +117,7 @@
|
|
|
<el-scrollbar>
|
|
|
<li v-for="(item, index) in selected" :key="item.id">
|
|
|
<span class="name">
|
|
|
- <label>{{ item.name }}</label>
|
|
|
+ <label>{{ item.username }}</label>
|
|
|
</span>
|
|
|
<span class="delete">
|
|
|
<el-button type="danger" icon="el-icon-delete" circle size="small" @click="deleteSelected(index)"></el-button>
|
|
@@ -138,6 +138,8 @@
|
|
|
|
|
|
<script>
|
|
|
import config from '@/config/workflow'
|
|
|
+import department from '@/api/system/department'
|
|
|
+import user from '@/api/system/user'
|
|
|
|
|
|
export default {
|
|
|
props: {
|
|
@@ -145,9 +147,20 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- groupProps: config.group.props,
|
|
|
- userProps: config.user.props,
|
|
|
- roleProps: config.role.props,
|
|
|
+ groupProps: {
|
|
|
+ key: 'id',
|
|
|
+ label: 'name',
|
|
|
+ children: 'children'
|
|
|
+ },
|
|
|
+ userProps: {
|
|
|
+ key: 'id',
|
|
|
+ label: 'username'
|
|
|
+ },
|
|
|
+ roleProps: {
|
|
|
+ key: 'id',
|
|
|
+ label: 'label',
|
|
|
+ children: 'children'
|
|
|
+ },
|
|
|
|
|
|
titleMap: ['人员选择', '角色选择'],
|
|
|
dialogVisible: false,
|
|
@@ -190,25 +203,27 @@ export default {
|
|
|
//获取组织
|
|
|
async getGroup() {
|
|
|
this.showGrouploading = true
|
|
|
- var res = await config.group.apiObj.get()
|
|
|
+ var res = await department.departmentPageApi({ page: 1, pageSize: 20 })
|
|
|
this.showGrouploading = false
|
|
|
- var allNode = { [config.group.props.key]: '', [config.group.props.label]: '所有' }
|
|
|
- res.data.unshift(allNode)
|
|
|
- this.group = config.group.parseData(res).rows
|
|
|
+ var allNode = { id: '', name: '所有' }
|
|
|
+ res.unshift(allNode)
|
|
|
+ this.group = res
|
|
|
},
|
|
|
//获取用户
|
|
|
async getUser() {
|
|
|
this.showUserloading = true
|
|
|
var params = {
|
|
|
- [config.user.request.keyword]: this.keyword || null,
|
|
|
- [config.user.request.groupId]: this.groupId || null,
|
|
|
- [config.user.request.page]: this.currentPage,
|
|
|
- [config.user.request.pageSize]: this.pageSize
|
|
|
+ data: {
|
|
|
+ keyword: this.keyword || null,
|
|
|
+ departmentId: this.groupId || null,
|
|
|
+ },
|
|
|
+ page: this.currentPage,
|
|
|
+ pageSize: this.pageSize
|
|
|
}
|
|
|
- var res = await config.user.apiObj.get(params)
|
|
|
+ var res = await user.userPageApi(params)
|
|
|
this.showUserloading = false
|
|
|
- this.user = config.user.parseData(res).rows
|
|
|
- this.total = config.user.parseData(res).total || 0
|
|
|
+ this.user = res.records
|
|
|
+ this.total = res.total || 0
|
|
|
this.$refs.userScrollbar.setScrollTop(0)
|
|
|
},
|
|
|
//获取角色
|