diff --git a/src/api/management/user.js b/src/api/management/user.js index 6de390470..c967e6622 100644 --- a/src/api/management/user.js +++ b/src/api/management/user.js @@ -17,6 +17,32 @@ export function getUserList(params) { }); } +/** 查询所有用户列表*/ +export function getManageUserList(params) { + return request({ + url: `/api/manage/user/list`, + method: 'get', + params: params + }); +} + +/** 根据用户查询用户角色列表*/ +export function getUserRolesList(uid) { + return request({ + url: `/api/manage/${uid}/roles`, + method: 'get' + }); +} + +/** 绑定用户角色*/ +export function getBindUserRoles(data) { + return request({ + url: `/api/manage/bind/org`, + method: 'post', + data + }); +} + /** 模糊查询用户 昵称、名称、手机号*/ export function getDimUserList(params) { return request({ diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index ac8b6c0b4..c5a8a26df 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -17,6 +17,12 @@ export default { { label: '销售用户', value: '06' } ], + schoolRoleList: [ + { label: '管理员', value: 'Admin' }, + { label: '教师', value: 'Teacher' }, + { label: '学生', value: 'Student' } + ], + examResultList: [ { label: '未计算', value: '01' }, { label: '通过', value: '02' }, diff --git a/src/views/system/companyManage/orgDetail.vue b/src/views/system/companyManage/orgDetail.vue index 0ee631242..bea2a4a9a 100644 --- a/src/views/system/companyManage/orgDetail.vue +++ b/src/views/system/companyManage/orgDetail.vue @@ -36,17 +36,31 @@ 移出 + + + 添加 + + + + diff --git a/src/views/system/userControl/companyRelation.vue b/src/views/system/userControl/companyRelation.vue new file mode 100644 index 000000000..c2b7c4c5d --- /dev/null +++ b/src/views/system/userControl/companyRelation.vue @@ -0,0 +1,104 @@ + + diff --git a/src/views/system/userControl/index.vue b/src/views/system/userControl/index.vue index 86e5e1b1c..4ce1cabf2 100644 --- a/src/views/system/userControl/index.vue +++ b/src/views/system/userControl/index.vue @@ -5,6 +5,7 @@ + @@ -15,6 +16,7 @@ import DictionaryEdit from './edit'; import CreateUser from './createUser'; import CreateSingleUser from './createSingleUser'; import BindCompany from './bindCompany'; +import CompanyRelation from './companyRelation'; import {adminResetUserPassword} from '@/api/management/user'; export default { @@ -23,7 +25,8 @@ export default { DictionaryEdit, CreateUser, CreateSingleUser, - BindCompany + BindCompany, + CompanyRelation }, data() { return { @@ -145,7 +148,7 @@ export default { tagType: (row) => { return 'success'; } }, { - title: this.$t('system.roles'), + title: '权限', prop: 'roles', type: 'tagMore', columnValue: (row) => { return this.$convertField(row.roles, this.$ConstSelect.roleList, ['value', 'label'], true); }, @@ -160,9 +163,13 @@ export default { name: this.$t('global.edit'), handleClick: this.handleUserEdit }, + // { + // name: '绑定组织管理员', + // handleClick: this.handleBind + // }, { - name: '绑定组织管理员', - handleClick: this.handleBind + name: '组织关系', + handleClick: this.handleRelation }, { name: '重置密码', @@ -227,6 +234,9 @@ export default { handleBind(index, row) { this.$refs.bindCompany.doShow(row); }, + handleRelation(index, row) { + this.$refs.companyRelation.doShow(row); + }, resetPassword(index, row) { this.$confirm('操作会将改用户密码重置为初始密码,是否继续', this.$t('global.tips'), { confirmButtonText: this.$t('global.confirm'),