|
@@ -3,7 +3,7 @@
|
|
|
//引入MD5
|
|
|
import { md5 } from 'js-md5'
|
|
|
|
|
|
-import { userGroupApi, userRegisterApi } from '@/api/login';
|
|
|
+import { getPositionApi, userGroupApi, userRegisterApi } from '@/api/login';
|
|
|
import CpmdHeader from '@/components/CpmdHeader.vue';
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
|
|
@@ -27,6 +27,8 @@ const groupName = ref<string>('')
|
|
|
//定义用户姓名
|
|
|
const name = ref('')
|
|
|
|
|
|
+const position = ref('')
|
|
|
+
|
|
|
//选择性别
|
|
|
const sex = ref('')
|
|
|
|
|
@@ -37,7 +39,7 @@ const groupData = ref([])
|
|
|
const ppData = ref<any>([])
|
|
|
|
|
|
|
|
|
-
|
|
|
+const listPosition = ref<any>([])
|
|
|
|
|
|
|
|
|
|
|
@@ -47,7 +49,15 @@ const id = ref<string>('')
|
|
|
//刚进入页面就将高度设置为页面需要的
|
|
|
onMounted(() => {
|
|
|
userGroupFun()
|
|
|
+ getPosition()
|
|
|
})
|
|
|
+
|
|
|
+//调用查询接口职务的接口
|
|
|
+const getPosition = async () => {
|
|
|
+ let res: any = await getPositionApi()
|
|
|
+ listPosition.value = res.data
|
|
|
+}
|
|
|
+
|
|
|
//跳转到注册页面的方法
|
|
|
const router = useRouter()
|
|
|
const loginFun = () => {
|
|
@@ -71,6 +81,14 @@ const registerFun = async () => {
|
|
|
isLock.value = false
|
|
|
return
|
|
|
}
|
|
|
+ if (position.value == '') {
|
|
|
+ ElMessage({
|
|
|
+ message: '请选择职务',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ isLock.value = false
|
|
|
+ return
|
|
|
+ }
|
|
|
if (account.value == '') {
|
|
|
ElMessage({
|
|
|
message: '请填写账号',
|
|
@@ -146,17 +164,18 @@ const registerFun = async () => {
|
|
|
|
|
|
queryOrgName()
|
|
|
//开始组织参数
|
|
|
- let prams = {
|
|
|
+ let params = {
|
|
|
orgNo: group.value,
|
|
|
orgName: groupName.value,
|
|
|
userNo: account.value,
|
|
|
userName: name.value,
|
|
|
gender: sex.value,
|
|
|
password: md5(password.value),
|
|
|
+ position: parseInt(position.value),
|
|
|
roleType: '1'
|
|
|
}
|
|
|
//如果都通过开始调用方法注册的方法
|
|
|
- const res: any = await userRegisterApi(prams)
|
|
|
+ const res: any = await userRegisterApi(params)
|
|
|
isLock.value = false
|
|
|
if (res.code == 200) {
|
|
|
ElMessage({
|
|
@@ -281,20 +300,36 @@ onUnmounted(() => {
|
|
|
style="width:100%" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div style="margin-top:20px">
|
|
|
- <div class="user_account">账号(学号):</div>
|
|
|
- <div class="input_cus"> <el-input v-model="account" style="width: 100%" placeholder="请输入账号" />
|
|
|
+ <div style="margin-top:20px;display: flex;">
|
|
|
+ <div style="flex: 1;">
|
|
|
+ <div class="user_account">职务:</div>
|
|
|
+ <div class="input_cus">
|
|
|
+
|
|
|
+ <el-select v-model="position" placeholder="请选择职务" size="large" style="width: 90%;">
|
|
|
+ <el-option v-for="item in listPosition" :key="item.paramValue"
|
|
|
+ :label="item.paramName" :value="item.paramValue" />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <div style="flex: 1;display: flex;flex-direction: column;justify-content: end;">
|
|
|
+ <div class="user_account" style="width: 90%;margin-left: 10%">账号(学号):</div>
|
|
|
+ <div class="input_cus"> <el-input v-model="account" style="width: 90%;margin-left: 10%"
|
|
|
+ placeholder="请输入账号" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
<div style="margin-top:20px;display: flex;">
|
|
|
- <div>
|
|
|
+ <div style="flex: 1;">
|
|
|
<div class="user_account">姓名:</div>
|
|
|
- <div class="input_cus"> <el-input v-model="name" style="width: 90%" placeholder="请输入姓名" />
|
|
|
+ <div class="input_cus"> <el-input v-model="name" style="width: 90%;" placeholder="请输入姓名" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div>
|
|
|
- <div class="user_account">性别:</div>
|
|
|
- <div class="input_cus"> <el-radio-group size="large" v-model="sex">
|
|
|
+
|
|
|
+ <div style="flex: 1;">
|
|
|
+ <div class="user_account" style="width: 90%;margin-left:10%">性别:</div>
|
|
|
+ <div class="input_cus" style="width: 90%;margin-left:10%"> <el-radio-group size="large"
|
|
|
+ v-model="sex">
|
|
|
<el-radio value="1" size="large">男</el-radio>
|
|
|
<el-radio value="0" size="large">女</el-radio>
|
|
|
</el-radio-group>
|
|
@@ -379,6 +414,7 @@ onUnmounted(() => {
|
|
|
border-radius: 60px;
|
|
|
border: 2px solid #B2F2D2;
|
|
|
padding-left: 20px;
|
|
|
+ height: 40px;
|
|
|
}
|
|
|
|
|
|
:deep(.el-select__input) {
|