diff --git a/yudao-ui-admin-vue3/src/views/bpm/form/index.vue b/yudao-ui-admin-vue3/src/views/bpm/form/index.vue
index 2fb70aabf..35156e854 100644
--- a/yudao-ui-admin-vue3/src/views/bpm/form/index.vue
+++ b/yudao-ui-admin-vue3/src/views/bpm/form/index.vue
@@ -35,8 +35,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/bpm/group/index.vue b/yudao-ui-admin-vue3/src/views/bpm/group/index.vue
index fe327f9e4..4278c3636 100644
--- a/yudao-ui-admin-vue3/src/views/bpm/group/index.vue
+++ b/yudao-ui-admin-vue3/src/views/bpm/group/index.vue
@@ -47,8 +47,6 @@ const setDialogTile = (type: string) => {
const handleCreate = () => {
setDialogTile('create')
userIds.value = []
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/bpm/model/index.vue b/yudao-ui-admin-vue3/src/views/bpm/model/index.vue
index b85c50990..96fe717c2 100644
--- a/yudao-ui-admin-vue3/src/views/bpm/model/index.vue
+++ b/yudao-ui-admin-vue3/src/views/bpm/model/index.vue
@@ -37,8 +37,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/infra/config/index.vue b/yudao-ui-admin-vue3/src/views/infra/config/index.vue
index b7a3c4b9d..e7753d3fa 100644
--- a/yudao-ui-admin-vue3/src/views/infra/config/index.vue
+++ b/yudao-ui-admin-vue3/src/views/infra/config/index.vue
@@ -36,8 +36,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/infra/dataSourceConfig/index.vue b/yudao-ui-admin-vue3/src/views/infra/dataSourceConfig/index.vue
index c8b363c1e..0dead0425 100644
--- a/yudao-ui-admin-vue3/src/views/infra/dataSourceConfig/index.vue
+++ b/yudao-ui-admin-vue3/src/views/infra/dataSourceConfig/index.vue
@@ -30,8 +30,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/infra/fileConfig/index.vue b/yudao-ui-admin-vue3/src/views/infra/fileConfig/index.vue
index b24bbb534..60be04373 100644
--- a/yudao-ui-admin-vue3/src/views/infra/fileConfig/index.vue
+++ b/yudao-ui-admin-vue3/src/views/infra/fileConfig/index.vue
@@ -36,8 +36,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/infra/job/index.vue b/yudao-ui-admin-vue3/src/views/infra/job/index.vue
index e5b9fff9e..22c11c275 100644
--- a/yudao-ui-admin-vue3/src/views/infra/job/index.vue
+++ b/yudao-ui-admin-vue3/src/views/infra/job/index.vue
@@ -46,8 +46,6 @@ const setDialogTile = (type: string) => {
const handleCreate = () => {
cronExpression.value = ''
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/pay/app/index.vue b/yudao-ui-admin-vue3/src/views/pay/app/index.vue
index 2968eb6ee..6943fcef7 100644
--- a/yudao-ui-admin-vue3/src/views/pay/app/index.vue
+++ b/yudao-ui-admin-vue3/src/views/pay/app/index.vue
@@ -36,8 +36,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/pay/merchant/index.vue b/yudao-ui-admin-vue3/src/views/pay/merchant/index.vue
index e5f3e7ea1..94c75eec6 100644
--- a/yudao-ui-admin-vue3/src/views/pay/merchant/index.vue
+++ b/yudao-ui-admin-vue3/src/views/pay/merchant/index.vue
@@ -36,8 +36,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/pay/order/index.vue b/yudao-ui-admin-vue3/src/views/pay/order/index.vue
index 25c482560..031240993 100644
--- a/yudao-ui-admin-vue3/src/views/pay/order/index.vue
+++ b/yudao-ui-admin-vue3/src/views/pay/order/index.vue
@@ -34,8 +34,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/system/dept/index.vue b/yudao-ui-admin-vue3/src/views/system/dept/index.vue
index 54e494a19..5d1b90b6f 100644
--- a/yudao-ui-admin-vue3/src/views/system/dept/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/dept/index.vue
@@ -52,7 +52,6 @@ const handleAdd = (data: { id: number }) => {
// 重置表单
deptParentId.value = data.id
formTitle.value = '新增部门'
- unref(formRef)?.getElFormRef()?.resetFields()
showForm.value = true
}
// 编辑
diff --git a/yudao-ui-admin-vue3/src/views/system/dict/index.vue b/yudao-ui-admin-vue3/src/views/system/dict/index.vue
index fb69b8dbe..27bd9ff5d 100644
--- a/yudao-ui-admin-vue3/src/views/system/dict/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/dict/index.vue
@@ -178,8 +178,6 @@ const {
// 字典分类修改操作
const handleTypeCreate = () => {
setDialogTile('typeCreate')
- // 重置表单
- unref(typeFormRef)?.getElFormRef()?.resetFields()
}
const handleTypeUpdate = async (row: DictTypeVO) => {
setDialogTile('typeUpdate')
@@ -207,8 +205,6 @@ const {
// 字典数据修改操作
const handleDataCreate = () => {
setDialogTile('dataCreate')
- // 重置表单
- unref(dataFormRef)?.getElFormRef()?.resetFields()
}
const handleDataUpdate = async (row: DictDataVO) => {
setDialogTile('dataUpdate')
diff --git a/yudao-ui-admin-vue3/src/views/system/errorCode/index.vue b/yudao-ui-admin-vue3/src/views/system/errorCode/index.vue
index 8a8c35e61..aeb9e46c5 100644
--- a/yudao-ui-admin-vue3/src/views/system/errorCode/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/errorCode/index.vue
@@ -105,8 +105,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/system/notice/index.vue b/yudao-ui-admin-vue3/src/views/system/notice/index.vue
index 097c1b271..503a1a000 100644
--- a/yudao-ui-admin-vue3/src/views/system/notice/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/notice/index.vue
@@ -104,8 +104,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/system/oauth2/client/index.vue b/yudao-ui-admin-vue3/src/views/system/oauth2/client/index.vue
index 37ba5f90c..6814c9eee 100644
--- a/yudao-ui-admin-vue3/src/views/system/oauth2/client/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/oauth2/client/index.vue
@@ -116,8 +116,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/system/post/index.vue b/yudao-ui-admin-vue3/src/views/system/post/index.vue
index d44f47d93..9fd4cc5ab 100644
--- a/yudao-ui-admin-vue3/src/views/system/post/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/post/index.vue
@@ -57,7 +57,7 @@
@@ -100,7 +100,7 @@ const dialogTitle = ref('edit') // 弹出层标题
const actionType = ref('') // 操作按钮的类型
const actionLoading = ref(false) // 按钮 Loading
const formRef = ref() // 表单 Ref
-const detailRef = ref() // 详情 Ref
+const detailData = ref() // 详情 Ref
// 设置标题
const setDialogTile = (type: string) => {
@@ -112,8 +112,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 导出操作
@@ -138,7 +136,7 @@ const handleUpdate = async (rowId: number) => {
const handleDetail = async (rowId: number) => {
setDialogTile('detail')
const res = await PostApi.getPostApi(rowId)
- detailRef.value = res
+ detailData.value = res
}
// 删除操作
diff --git a/yudao-ui-admin-vue3/src/views/system/role/index.vue b/yudao-ui-admin-vue3/src/views/system/role/index.vue
index 39273f4f0..584791400 100644
--- a/yudao-ui-admin-vue3/src/views/system/role/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/role/index.vue
@@ -54,8 +54,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue b/yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue
index 5dbd6f5ea..4c8c71ae7 100644
--- a/yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue
@@ -42,8 +42,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/system/sms/smsChannel/index.vue b/yudao-ui-admin-vue3/src/views/system/sms/smsChannel/index.vue
index bb77f2e02..f32a4c9c8 100644
--- a/yudao-ui-admin-vue3/src/views/system/sms/smsChannel/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/sms/smsChannel/index.vue
@@ -35,8 +35,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/system/sms/smsTemplate/index.vue b/yudao-ui-admin-vue3/src/views/system/sms/smsTemplate/index.vue
index e1c192eee..38e8394c3 100644
--- a/yudao-ui-admin-vue3/src/views/system/sms/smsTemplate/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/sms/smsTemplate/index.vue
@@ -35,8 +35,6 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/system/tenant/index.vue b/yudao-ui-admin-vue3/src/views/system/tenant/index.vue
index 696d15e96..639ebdf64 100644
--- a/yudao-ui-admin-vue3/src/views/system/tenant/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/tenant/index.vue
@@ -53,10 +53,9 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
- setDialogTile('create')
// 重置表单
tenantPackageId.value = ''
- unref(formRef)?.getElFormRef()?.resetFields()
+ setDialogTile('create')
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/system/tenantPackage/index.vue b/yudao-ui-admin-vue3/src/views/system/tenantPackage/index.vue
index 9d2cd4970..e29b9af3a 100644
--- a/yudao-ui-admin-vue3/src/views/system/tenantPackage/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/tenantPackage/index.vue
@@ -56,13 +56,11 @@ const setDialogTile = (type: string) => {
// 新增操作
const handleCreate = () => {
- setDialogTile('create')
- // 重置表单
- unref(formRef)?.getElFormRef()?.resetFields()
//重置菜单树
unref(treeRef)?.setCheckedKeys([])
menuExpand.value = false
menuNodeAll.value = false
+ setDialogTile('create')
}
// 修改操作
diff --git a/yudao-ui-admin-vue3/src/views/system/user/index.vue b/yudao-ui-admin-vue3/src/views/system/user/index.vue
index fbfe7b542..20e2caf66 100644
--- a/yudao-ui-admin-vue3/src/views/system/user/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/user/index.vue
@@ -24,7 +24,7 @@ import { useI18n } from '@/hooks/web/useI18n'
import { useTable } from '@/hooks/web/useTable'
import { FormExpose } from '@/components/Form'
import type { UserVO } from '@/api/system/user/types'
-import type { PostVO } from '@/api/system/post/types'
+import type { PostVO } from '@/api/system/post'
import type { PermissionAssignUserRoleReqVO } from '@/api/system/permission/types'
import { listSimpleDeptApi } from '@/api/system/dept'
import { listSimplePostsApi } from '@/api/system/post'
@@ -89,7 +89,7 @@ const actionType = ref('') // 操作按钮的类型
const dialogVisible = ref(false) // 是否显示弹出层
const dialogTitle = ref('edit') // 弹出层标题
const formRef = ref() // 表单 Ref
-const deptId = ref(0) // 部门ID
+const deptId = ref() // 部门ID
const postIds = ref([]) // 岗位ID
const postOptions = ref([]) //岗位列表
@@ -106,11 +106,14 @@ const setDialogTile = async (type: string) => {
}
// 新增操作
-const handleAdd = () => {
+const handleAdd = async () => {
// 重置表单
- deptId.value = 0
- setDialogTile('create')
- unref(formRef)?.getElFormRef()?.resetFields()
+ deptId.value = null
+ postIds.value = []
+ dialogVisible.value = true
+ dialogTitle.value = t('action.create')
+ actionType.value = 'create'
+ await unref(formRef)?.getElFormRef().resetFields()
}
// 修改操作