负责人选择组件
This commit is contained in:
+4
-1
@@ -13,6 +13,8 @@ const addUser = (params)=>postAction("/sys/user/add",params);
|
|||||||
const editUser = (params)=>putAction("/sys/user/edit",params);
|
const editUser = (params)=>putAction("/sys/user/edit",params);
|
||||||
const queryUserRole = (params)=>getAction("/sys/user/queryUserRole",params);
|
const queryUserRole = (params)=>getAction("/sys/user/queryUserRole",params);
|
||||||
const getUserList = (params)=>getAction("/sys/user/page",params);
|
const getUserList = (params)=>getAction("/sys/user/page",params);
|
||||||
|
// 获取全部用户列表
|
||||||
|
const getAllUserList = (params) => getAction("/sys/user/list", params);
|
||||||
const frozenBatch = (params)=>putAction("/sys/user/frozenBatch",params);
|
const frozenBatch = (params)=>putAction("/sys/user/frozenBatch",params);
|
||||||
//验证用户是否存在
|
//验证用户是否存在
|
||||||
const checkOnlyUser = (params)=>getAction("/sys/user/checkOnlyUser",params);
|
const checkOnlyUser = (params)=>getAction("/sys/user/checkOnlyUser",params);
|
||||||
@@ -23,7 +25,7 @@ const resetUserPassword = (params) => putAction('',params)
|
|||||||
|
|
||||||
//权限管理
|
//权限管理
|
||||||
const addPermission= (params)=>postAction("/sys/permission/add",params);
|
const addPermission= (params)=>postAction("/sys/permission/add",params);
|
||||||
const editPermission= (params)=>putAction("/sys/permission/edit",params);
|
const editPermission= (params)=>postAction("/sys/permission/edit",params);
|
||||||
const getPermissionList = (params)=>getAction("/sys/permission/page",params);
|
const getPermissionList = (params)=>getAction("/sys/permission/page",params);
|
||||||
const getSystemMenuList = (params)=>getAction("/sys/permission/getSystemMenuList",params);
|
const getSystemMenuList = (params)=>getAction("/sys/permission/getSystemMenuList",params);
|
||||||
const getSystemSubmenu = (params)=>getAction("/sys/permission/getSystemSubmenu",params);
|
const getSystemSubmenu = (params)=>getAction("/sys/permission/getSystemSubmenu",params);
|
||||||
@@ -109,6 +111,7 @@ export {
|
|||||||
editUser,
|
editUser,
|
||||||
queryUserRole,
|
queryUserRole,
|
||||||
getUserList,
|
getUserList,
|
||||||
|
getAllUserList,
|
||||||
queryall,
|
queryall,
|
||||||
frozenBatch,
|
frozenBatch,
|
||||||
checkOnlyUser,
|
checkOnlyUser,
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<template>
|
||||||
|
<a-select :value="value" v-bind="$attrs" v-on="$listeners">
|
||||||
|
<a-select-option v-for="item in userList" :key="item.id" :value="item.id">{{ `${item.username}(${item.orgCodeTxt})` }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAllUserList } from '@api/api'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'SelectPrincipal',
|
||||||
|
props: {
|
||||||
|
// 绑定值为用户id
|
||||||
|
value: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
userList: [] // 用户列表
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.initUserList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 获取所有用户
|
||||||
|
*/
|
||||||
|
initUserList() {
|
||||||
|
getAllUserList().then(res => {
|
||||||
|
this.userList = res.result
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
model: {
|
||||||
|
prop: 'value',
|
||||||
|
event: 'change'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user