后台添加手机用户
This commit is contained in:
parent
53819a174e
commit
e0b37628a9
|
@ -84,11 +84,10 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog v-model="dialogFormVisible" title="添加用户" width="30%">
|
<el-dialog v-model="dialogFormVisible" title="添加用户" width="30%">
|
||||||
<el-form :model="form">
|
<el-form :model="form" ref="addForm">
|
||||||
<el-form-item label="手机号">
|
<el-form-item label="手机号" prop="mobile">
|
||||||
<el-input v-model="form.mobile" autocomplete="off" />
|
<el-input v-model="form.mobile" autocomplete="off" />
|
||||||
<span>
|
<span>
|
||||||
|
|
||||||
<el-icon><Pointer /></el-icon>
|
<el-icon><Pointer /></el-icon>
|
||||||
初始密码:123456
|
初始密码:123456
|
||||||
</span>
|
</span>
|
||||||
|
@ -125,18 +124,22 @@ const { pager, getLists, resetPage, resetParams } = usePaging({
|
||||||
onActivated(() => {
|
onActivated(() => {
|
||||||
getLists()
|
getLists()
|
||||||
})
|
})
|
||||||
|
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
"mobile": ""
|
"mobile": ""
|
||||||
})
|
})
|
||||||
|
const addForm = ref()
|
||||||
const addUser = () => {
|
const addUser = () => {
|
||||||
addUserApi(form)
|
addUserApi(form).then(() => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '用户添加成功',
|
message: '用户添加成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
})
|
||||||
|
addForm.value.resetFields()
|
||||||
|
dialogFormVisible.value = false
|
||||||
|
getLists()
|
||||||
})
|
})
|
||||||
dialogFormVisible.value = false
|
|
||||||
getLists()
|
|
||||||
}
|
}
|
||||||
getLists()
|
getLists()
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue