普通用户申请成为管理员
This commit is contained in:
parent
17f0aca6ff
commit
ed54d0d345
|
@ -19,4 +19,13 @@ export const auditAnApplication = (row) => request({
|
|||
url: '/api/' + moduleName + '/ui/applyForAdmin/auditAnApplication',
|
||||
method: 'post',
|
||||
data: row,
|
||||
});
|
||||
});
|
||||
|
||||
//修改用户信息
|
||||
export const updateUserById = (row) => {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/administrator/updateUserById',
|
||||
method: 'post',
|
||||
data: row
|
||||
})
|
||||
}
|
|
@ -226,7 +226,7 @@ export const dynamicRoutes = [
|
|||
name: 'applyForAdmin',
|
||||
component: () => import('/@/views/systemManagement/applyForAdmin/index.vue'),
|
||||
meta: {
|
||||
title: 'applyForAdmin',
|
||||
title: 'Administrator review',
|
||||
isLink: '',
|
||||
isHide: false,
|
||||
isKeepAlive: true,
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<el-dialog title="" v-model="state.isShowDialog" width="60%" center>
|
||||
<template #header="{ close, titleId, titleClass }">
|
||||
<div class="my-header">
|
||||
<!-- <div class="my-header">
|
||||
<h4 class="titleClass1">Welcome to apply to become a website administrator</h4>
|
||||
</div><br>
|
||||
<div class="my-header">
|
||||
<h4 class="titleClass2">Looking forward to your wisdom to the growth and development of the community</h4>
|
||||
</div><br>
|
||||
</div><br>-->
|
||||
<div class="my-header">
|
||||
<el-divider class="dividerStyle" content-position="center">Account Information</el-divider>
|
||||
</div>
|
||||
|
@ -75,7 +75,7 @@
|
|||
<script setup>
|
||||
import {onMounted, reactive, ref} from "vue";
|
||||
const adminAddFormRef = ref();
|
||||
import { auditAnApplication } from '/@/api/response/applyForAdmin.js';
|
||||
import { auditAnApplication ,updateUserById} from '/@/api/response/applyForAdmin.js';
|
||||
import {ElMessage} from "element-plus";
|
||||
const emit = defineEmits(['callback']);
|
||||
const state = reactive({
|
||||
|
@ -97,8 +97,21 @@ const Reject = () => {
|
|||
const Pass = () => {
|
||||
state.formData.applyForStatus=2
|
||||
auditAnApplication(state.formData).then(res=>{
|
||||
let submitformData = {
|
||||
id: state.formData.userId,
|
||||
realName: state.formData.realName,
|
||||
country: state.formData.country,
|
||||
organization: state.formData.organization,
|
||||
occupation: state.formData.occupation,
|
||||
education: state.formData.education,
|
||||
researchField: state.formData.researchField,
|
||||
introduction: state.formData.introduction
|
||||
}
|
||||
updateUserById(submitformData).then((res)=>{
|
||||
})
|
||||
ElMessage.success('Audit Completed');
|
||||
})
|
||||
|
||||
closeDialog()
|
||||
}
|
||||
//重置表单
|
||||
|
@ -108,7 +121,6 @@ const resetField = () => {
|
|||
|
||||
// 打开弹窗
|
||||
const openDialog = (row) => {
|
||||
console.log(row)
|
||||
state.formData=row
|
||||
/*getUserById(row.id).then(res => {
|
||||
state.formData = res
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<el-select class="form-select" size="default" clearable placeholder="Apply For Status"
|
||||
v-model="state.search.applyForStatus">
|
||||
<el-option value="0" label="Unreviewed">Unreviewed</el-option>
|
||||
<el-option value="1" label="Declined">Declined</el-option>
|
||||
<el-option value="2" label="Passed">Passed</el-option>
|
||||
<el-option value="1" label="Refuse">Refuse</el-option>
|
||||
<el-option value="2" label="Agree">Agree</el-option>
|
||||
</el-select>
|
||||
<el-button size="default" type="primary" class="ml10" @click="getTableData">
|
||||
<el-icon>
|
||||
|
|
Loading…
Reference in New Issue