|
@@ -408,20 +408,20 @@ const handleDetail = async (rowId: number) => {
|
|
|
|
|
|
// 提交按钮
|
|
// 提交按钮
|
|
const submitForm = async () => {
|
|
const submitForm = async () => {
|
|
- // 提交请求
|
|
|
|
const elForm = unref(formRef)?.getElFormRef()
|
|
const elForm = unref(formRef)?.getElFormRef()
|
|
if (!elForm) return
|
|
if (!elForm) return
|
|
elForm.validate(async (valid) => {
|
|
elForm.validate(async (valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
+ // 提交请求
|
|
try {
|
|
try {
|
|
const data = unref(formRef)?.formModel as UserApi.UserVO
|
|
const data = unref(formRef)?.formModel as UserApi.UserVO
|
|
if (actionType.value === 'create') {
|
|
if (actionType.value === 'create') {
|
|
- await UserApi.createUserApi(data)
|
|
|
|
loading.value = true
|
|
loading.value = true
|
|
|
|
+ await UserApi.createUserApi(data)
|
|
message.success(t('common.createSuccess'))
|
|
message.success(t('common.createSuccess'))
|
|
} else {
|
|
} else {
|
|
- await UserApi.updateUserApi(data)
|
|
|
|
loading.value = true
|
|
loading.value = true
|
|
|
|
+ await UserApi.updateUserApi(data)
|
|
message.success(t('common.updateSuccess'))
|
|
message.success(t('common.updateSuccess'))
|
|
}
|
|
}
|
|
dialogVisible.value = false
|
|
dialogVisible.value = false
|