Commit ddca5f77e0cc8ae8201c0c415ef63b1bd731e1c1
1 parent
71626669
feat: 移除无用方法
Showing
23 changed files
with
14 additions
and
55 deletions
yudao-ui-admin-vue3/src/views/bpm/form/index.vue
| @@ -35,8 +35,6 @@ const setDialogTile = (type: string) => { | @@ -35,8 +35,6 @@ const setDialogTile = (type: string) => { | ||
| 35 | // 新增操作 | 35 | // 新增操作 |
| 36 | const handleCreate = () => { | 36 | const handleCreate = () => { |
| 37 | setDialogTile('create') | 37 | setDialogTile('create') |
| 38 | - // 重置表单 | ||
| 39 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 40 | } | 38 | } |
| 41 | 39 | ||
| 42 | // 修改操作 | 40 | // 修改操作 |
yudao-ui-admin-vue3/src/views/bpm/group/index.vue
| @@ -47,8 +47,6 @@ const setDialogTile = (type: string) => { | @@ -47,8 +47,6 @@ const setDialogTile = (type: string) => { | ||
| 47 | const handleCreate = () => { | 47 | const handleCreate = () => { |
| 48 | setDialogTile('create') | 48 | setDialogTile('create') |
| 49 | userIds.value = [] | 49 | userIds.value = [] |
| 50 | - // 重置表单 | ||
| 51 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 52 | } | 50 | } |
| 53 | 51 | ||
| 54 | // 修改操作 | 52 | // 修改操作 |
yudao-ui-admin-vue3/src/views/bpm/model/index.vue
| @@ -37,8 +37,6 @@ const setDialogTile = (type: string) => { | @@ -37,8 +37,6 @@ const setDialogTile = (type: string) => { | ||
| 37 | // 新增操作 | 37 | // 新增操作 |
| 38 | const handleCreate = () => { | 38 | const handleCreate = () => { |
| 39 | setDialogTile('create') | 39 | setDialogTile('create') |
| 40 | - // 重置表单 | ||
| 41 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 42 | } | 40 | } |
| 43 | 41 | ||
| 44 | // 修改操作 | 42 | // 修改操作 |
yudao-ui-admin-vue3/src/views/infra/config/index.vue
| @@ -36,8 +36,6 @@ const setDialogTile = (type: string) => { | @@ -36,8 +36,6 @@ const setDialogTile = (type: string) => { | ||
| 36 | // 新增操作 | 36 | // 新增操作 |
| 37 | const handleCreate = () => { | 37 | const handleCreate = () => { |
| 38 | setDialogTile('create') | 38 | setDialogTile('create') |
| 39 | - // 重置表单 | ||
| 40 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 41 | } | 39 | } |
| 42 | 40 | ||
| 43 | // 修改操作 | 41 | // 修改操作 |
yudao-ui-admin-vue3/src/views/infra/dataSourceConfig/index.vue
| @@ -30,8 +30,6 @@ const setDialogTile = (type: string) => { | @@ -30,8 +30,6 @@ const setDialogTile = (type: string) => { | ||
| 30 | // 新增操作 | 30 | // 新增操作 |
| 31 | const handleCreate = () => { | 31 | const handleCreate = () => { |
| 32 | setDialogTile('create') | 32 | setDialogTile('create') |
| 33 | - // 重置表单 | ||
| 34 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 35 | } | 33 | } |
| 36 | 34 | ||
| 37 | // 修改操作 | 35 | // 修改操作 |
yudao-ui-admin-vue3/src/views/infra/fileConfig/index.vue
| @@ -36,8 +36,6 @@ const setDialogTile = (type: string) => { | @@ -36,8 +36,6 @@ const setDialogTile = (type: string) => { | ||
| 36 | // 新增操作 | 36 | // 新增操作 |
| 37 | const handleCreate = () => { | 37 | const handleCreate = () => { |
| 38 | setDialogTile('create') | 38 | setDialogTile('create') |
| 39 | - // 重置表单 | ||
| 40 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 41 | } | 39 | } |
| 42 | 40 | ||
| 43 | // 修改操作 | 41 | // 修改操作 |
yudao-ui-admin-vue3/src/views/infra/job/index.vue
| @@ -46,8 +46,6 @@ const setDialogTile = (type: string) => { | @@ -46,8 +46,6 @@ const setDialogTile = (type: string) => { | ||
| 46 | const handleCreate = () => { | 46 | const handleCreate = () => { |
| 47 | cronExpression.value = '' | 47 | cronExpression.value = '' |
| 48 | setDialogTile('create') | 48 | setDialogTile('create') |
| 49 | - // 重置表单 | ||
| 50 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 51 | } | 49 | } |
| 52 | 50 | ||
| 53 | // 修改操作 | 51 | // 修改操作 |
yudao-ui-admin-vue3/src/views/pay/app/index.vue
| @@ -36,8 +36,6 @@ const setDialogTile = (type: string) => { | @@ -36,8 +36,6 @@ const setDialogTile = (type: string) => { | ||
| 36 | // 新增操作 | 36 | // 新增操作 |
| 37 | const handleCreate = () => { | 37 | const handleCreate = () => { |
| 38 | setDialogTile('create') | 38 | setDialogTile('create') |
| 39 | - // 重置表单 | ||
| 40 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 41 | } | 39 | } |
| 42 | 40 | ||
| 43 | // 修改操作 | 41 | // 修改操作 |
yudao-ui-admin-vue3/src/views/pay/merchant/index.vue
| @@ -36,8 +36,6 @@ const setDialogTile = (type: string) => { | @@ -36,8 +36,6 @@ const setDialogTile = (type: string) => { | ||
| 36 | // 新增操作 | 36 | // 新增操作 |
| 37 | const handleCreate = () => { | 37 | const handleCreate = () => { |
| 38 | setDialogTile('create') | 38 | setDialogTile('create') |
| 39 | - // 重置表单 | ||
| 40 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 41 | } | 39 | } |
| 42 | 40 | ||
| 43 | // 修改操作 | 41 | // 修改操作 |
yudao-ui-admin-vue3/src/views/pay/order/index.vue
| @@ -34,8 +34,6 @@ const setDialogTile = (type: string) => { | @@ -34,8 +34,6 @@ const setDialogTile = (type: string) => { | ||
| 34 | // 新增操作 | 34 | // 新增操作 |
| 35 | const handleCreate = () => { | 35 | const handleCreate = () => { |
| 36 | setDialogTile('create') | 36 | setDialogTile('create') |
| 37 | - // 重置表单 | ||
| 38 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 39 | } | 37 | } |
| 40 | 38 | ||
| 41 | // 修改操作 | 39 | // 修改操作 |
yudao-ui-admin-vue3/src/views/system/dept/index.vue
| @@ -52,7 +52,6 @@ const handleAdd = (data: { id: number }) => { | @@ -52,7 +52,6 @@ const handleAdd = (data: { id: number }) => { | ||
| 52 | // 重置表单 | 52 | // 重置表单 |
| 53 | deptParentId.value = data.id | 53 | deptParentId.value = data.id |
| 54 | formTitle.value = '新增部门' | 54 | formTitle.value = '新增部门' |
| 55 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 56 | showForm.value = true | 55 | showForm.value = true |
| 57 | } | 56 | } |
| 58 | // 编辑 | 57 | // 编辑 |
yudao-ui-admin-vue3/src/views/system/dict/index.vue
| @@ -178,8 +178,6 @@ const { | @@ -178,8 +178,6 @@ const { | ||
| 178 | // 字典分类修改操作 | 178 | // 字典分类修改操作 |
| 179 | const handleTypeCreate = () => { | 179 | const handleTypeCreate = () => { |
| 180 | setDialogTile('typeCreate') | 180 | setDialogTile('typeCreate') |
| 181 | - // 重置表单 | ||
| 182 | - unref(typeFormRef)?.getElFormRef()?.resetFields() | ||
| 183 | } | 181 | } |
| 184 | const handleTypeUpdate = async (row: DictTypeVO) => { | 182 | const handleTypeUpdate = async (row: DictTypeVO) => { |
| 185 | setDialogTile('typeUpdate') | 183 | setDialogTile('typeUpdate') |
| @@ -207,8 +205,6 @@ const { | @@ -207,8 +205,6 @@ const { | ||
| 207 | // 字典数据修改操作 | 205 | // 字典数据修改操作 |
| 208 | const handleDataCreate = () => { | 206 | const handleDataCreate = () => { |
| 209 | setDialogTile('dataCreate') | 207 | setDialogTile('dataCreate') |
| 210 | - // 重置表单 | ||
| 211 | - unref(dataFormRef)?.getElFormRef()?.resetFields() | ||
| 212 | } | 208 | } |
| 213 | const handleDataUpdate = async (row: DictDataVO) => { | 209 | const handleDataUpdate = async (row: DictDataVO) => { |
| 214 | setDialogTile('dataUpdate') | 210 | setDialogTile('dataUpdate') |
yudao-ui-admin-vue3/src/views/system/errorCode/index.vue
| @@ -105,8 +105,6 @@ const setDialogTile = (type: string) => { | @@ -105,8 +105,6 @@ const setDialogTile = (type: string) => { | ||
| 105 | // 新增操作 | 105 | // 新增操作 |
| 106 | const handleCreate = () => { | 106 | const handleCreate = () => { |
| 107 | setDialogTile('create') | 107 | setDialogTile('create') |
| 108 | - // 重置表单 | ||
| 109 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 110 | } | 108 | } |
| 111 | 109 | ||
| 112 | // 修改操作 | 110 | // 修改操作 |
yudao-ui-admin-vue3/src/views/system/notice/index.vue
| @@ -104,8 +104,6 @@ const setDialogTile = (type: string) => { | @@ -104,8 +104,6 @@ const setDialogTile = (type: string) => { | ||
| 104 | // 新增操作 | 104 | // 新增操作 |
| 105 | const handleCreate = () => { | 105 | const handleCreate = () => { |
| 106 | setDialogTile('create') | 106 | setDialogTile('create') |
| 107 | - // 重置表单 | ||
| 108 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 109 | } | 107 | } |
| 110 | 108 | ||
| 111 | // 修改操作 | 109 | // 修改操作 |
yudao-ui-admin-vue3/src/views/system/oauth2/client/index.vue
| @@ -116,8 +116,6 @@ const setDialogTile = (type: string) => { | @@ -116,8 +116,6 @@ const setDialogTile = (type: string) => { | ||
| 116 | // 新增操作 | 116 | // 新增操作 |
| 117 | const handleCreate = () => { | 117 | const handleCreate = () => { |
| 118 | setDialogTile('create') | 118 | setDialogTile('create') |
| 119 | - // 重置表单 | ||
| 120 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 121 | } | 119 | } |
| 122 | 120 | ||
| 123 | // 修改操作 | 121 | // 修改操作 |
yudao-ui-admin-vue3/src/views/system/post/index.vue
| @@ -57,7 +57,7 @@ | @@ -57,7 +57,7 @@ | ||
| 57 | <Descriptions | 57 | <Descriptions |
| 58 | v-if="actionType === 'detail'" | 58 | v-if="actionType === 'detail'" |
| 59 | :schema="allSchemas.detailSchema" | 59 | :schema="allSchemas.detailSchema" |
| 60 | - :data="detailRef" | 60 | + :data="detailData" |
| 61 | /> | 61 | /> |
| 62 | <template #footer> | 62 | <template #footer> |
| 63 | <!-- 按钮:保存 --> | 63 | <!-- 按钮:保存 --> |
| @@ -100,7 +100,7 @@ const dialogTitle = ref('edit') // 弹出层标题 | @@ -100,7 +100,7 @@ const dialogTitle = ref('edit') // 弹出层标题 | ||
| 100 | const actionType = ref('') // 操作按钮的类型 | 100 | const actionType = ref('') // 操作按钮的类型 |
| 101 | const actionLoading = ref(false) // 按钮 Loading | 101 | const actionLoading = ref(false) // 按钮 Loading |
| 102 | const formRef = ref<FormExpose>() // 表单 Ref | 102 | const formRef = ref<FormExpose>() // 表单 Ref |
| 103 | -const detailRef = ref() // 详情 Ref | 103 | +const detailData = ref() // 详情 Ref |
| 104 | 104 | ||
| 105 | // 设置标题 | 105 | // 设置标题 |
| 106 | const setDialogTile = (type: string) => { | 106 | const setDialogTile = (type: string) => { |
| @@ -112,8 +112,6 @@ const setDialogTile = (type: string) => { | @@ -112,8 +112,6 @@ const setDialogTile = (type: string) => { | ||
| 112 | // 新增操作 | 112 | // 新增操作 |
| 113 | const handleCreate = () => { | 113 | const handleCreate = () => { |
| 114 | setDialogTile('create') | 114 | setDialogTile('create') |
| 115 | - // 重置表单 | ||
| 116 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 117 | } | 115 | } |
| 118 | 116 | ||
| 119 | // 导出操作 | 117 | // 导出操作 |
| @@ -138,7 +136,7 @@ const handleUpdate = async (rowId: number) => { | @@ -138,7 +136,7 @@ const handleUpdate = async (rowId: number) => { | ||
| 138 | const handleDetail = async (rowId: number) => { | 136 | const handleDetail = async (rowId: number) => { |
| 139 | setDialogTile('detail') | 137 | setDialogTile('detail') |
| 140 | const res = await PostApi.getPostApi(rowId) | 138 | const res = await PostApi.getPostApi(rowId) |
| 141 | - detailRef.value = res | 139 | + detailData.value = res |
| 142 | } | 140 | } |
| 143 | 141 | ||
| 144 | // 删除操作 | 142 | // 删除操作 |
yudao-ui-admin-vue3/src/views/system/role/index.vue
| @@ -54,8 +54,6 @@ const setDialogTile = (type: string) => { | @@ -54,8 +54,6 @@ const setDialogTile = (type: string) => { | ||
| 54 | // 新增操作 | 54 | // 新增操作 |
| 55 | const handleCreate = () => { | 55 | const handleCreate = () => { |
| 56 | setDialogTile('create') | 56 | setDialogTile('create') |
| 57 | - // 重置表单 | ||
| 58 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 59 | } | 57 | } |
| 60 | 58 | ||
| 61 | // 修改操作 | 59 | // 修改操作 |
yudao-ui-admin-vue3/src/views/system/sensitiveWord/index.vue
| @@ -42,8 +42,6 @@ const setDialogTile = (type: string) => { | @@ -42,8 +42,6 @@ const setDialogTile = (type: string) => { | ||
| 42 | // 新增操作 | 42 | // 新增操作 |
| 43 | const handleCreate = () => { | 43 | const handleCreate = () => { |
| 44 | setDialogTile('create') | 44 | setDialogTile('create') |
| 45 | - // 重置表单 | ||
| 46 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 47 | } | 45 | } |
| 48 | 46 | ||
| 49 | // 修改操作 | 47 | // 修改操作 |
yudao-ui-admin-vue3/src/views/system/sms/smsChannel/index.vue
| @@ -35,8 +35,6 @@ const setDialogTile = (type: string) => { | @@ -35,8 +35,6 @@ const setDialogTile = (type: string) => { | ||
| 35 | // 新增操作 | 35 | // 新增操作 |
| 36 | const handleCreate = () => { | 36 | const handleCreate = () => { |
| 37 | setDialogTile('create') | 37 | setDialogTile('create') |
| 38 | - // 重置表单 | ||
| 39 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 40 | } | 38 | } |
| 41 | 39 | ||
| 42 | // 修改操作 | 40 | // 修改操作 |
yudao-ui-admin-vue3/src/views/system/sms/smsTemplate/index.vue
| @@ -35,8 +35,6 @@ const setDialogTile = (type: string) => { | @@ -35,8 +35,6 @@ const setDialogTile = (type: string) => { | ||
| 35 | // 新增操作 | 35 | // 新增操作 |
| 36 | const handleCreate = () => { | 36 | const handleCreate = () => { |
| 37 | setDialogTile('create') | 37 | setDialogTile('create') |
| 38 | - // 重置表单 | ||
| 39 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 40 | } | 38 | } |
| 41 | 39 | ||
| 42 | // 修改操作 | 40 | // 修改操作 |
yudao-ui-admin-vue3/src/views/system/tenant/index.vue
| @@ -53,10 +53,9 @@ const setDialogTile = (type: string) => { | @@ -53,10 +53,9 @@ const setDialogTile = (type: string) => { | ||
| 53 | 53 | ||
| 54 | // 新增操作 | 54 | // 新增操作 |
| 55 | const handleCreate = () => { | 55 | const handleCreate = () => { |
| 56 | - setDialogTile('create') | ||
| 57 | // 重置表单 | 56 | // 重置表单 |
| 58 | tenantPackageId.value = '' | 57 | tenantPackageId.value = '' |
| 59 | - unref(formRef)?.getElFormRef()?.resetFields() | 58 | + setDialogTile('create') |
| 60 | } | 59 | } |
| 61 | 60 | ||
| 62 | // 修改操作 | 61 | // 修改操作 |
yudao-ui-admin-vue3/src/views/system/tenantPackage/index.vue
| @@ -56,13 +56,11 @@ const setDialogTile = (type: string) => { | @@ -56,13 +56,11 @@ const setDialogTile = (type: string) => { | ||
| 56 | 56 | ||
| 57 | // 新增操作 | 57 | // 新增操作 |
| 58 | const handleCreate = () => { | 58 | const handleCreate = () => { |
| 59 | - setDialogTile('create') | ||
| 60 | - // 重置表单 | ||
| 61 | - unref(formRef)?.getElFormRef()?.resetFields() | ||
| 62 | //重置菜单树 | 59 | //重置菜单树 |
| 63 | unref(treeRef)?.setCheckedKeys([]) | 60 | unref(treeRef)?.setCheckedKeys([]) |
| 64 | menuExpand.value = false | 61 | menuExpand.value = false |
| 65 | menuNodeAll.value = false | 62 | menuNodeAll.value = false |
| 63 | + setDialogTile('create') | ||
| 66 | } | 64 | } |
| 67 | 65 | ||
| 68 | // 修改操作 | 66 | // 修改操作 |
yudao-ui-admin-vue3/src/views/system/user/index.vue
| @@ -24,7 +24,7 @@ import { useI18n } from '@/hooks/web/useI18n' | @@ -24,7 +24,7 @@ import { useI18n } from '@/hooks/web/useI18n' | ||
| 24 | import { useTable } from '@/hooks/web/useTable' | 24 | import { useTable } from '@/hooks/web/useTable' |
| 25 | import { FormExpose } from '@/components/Form' | 25 | import { FormExpose } from '@/components/Form' |
| 26 | import type { UserVO } from '@/api/system/user/types' | 26 | import type { UserVO } from '@/api/system/user/types' |
| 27 | -import type { PostVO } from '@/api/system/post/types' | 27 | +import type { PostVO } from '@/api/system/post' |
| 28 | import type { PermissionAssignUserRoleReqVO } from '@/api/system/permission/types' | 28 | import type { PermissionAssignUserRoleReqVO } from '@/api/system/permission/types' |
| 29 | import { listSimpleDeptApi } from '@/api/system/dept' | 29 | import { listSimpleDeptApi } from '@/api/system/dept' |
| 30 | import { listSimplePostsApi } from '@/api/system/post' | 30 | import { listSimplePostsApi } from '@/api/system/post' |
| @@ -89,7 +89,7 @@ const actionType = ref('') // 操作按钮的类型 | @@ -89,7 +89,7 @@ const actionType = ref('') // 操作按钮的类型 | ||
| 89 | const dialogVisible = ref(false) // 是否显示弹出层 | 89 | const dialogVisible = ref(false) // 是否显示弹出层 |
| 90 | const dialogTitle = ref('edit') // 弹出层标题 | 90 | const dialogTitle = ref('edit') // 弹出层标题 |
| 91 | const formRef = ref<FormExpose>() // 表单 Ref | 91 | const formRef = ref<FormExpose>() // 表单 Ref |
| 92 | -const deptId = ref(0) // 部门ID | 92 | +const deptId = ref() // 部门ID |
| 93 | const postIds = ref<string[]>([]) // 岗位ID | 93 | const postIds = ref<string[]>([]) // 岗位ID |
| 94 | const postOptions = ref<PostVO[]>([]) //岗位列表 | 94 | const postOptions = ref<PostVO[]>([]) //岗位列表 |
| 95 | 95 | ||
| @@ -106,11 +106,14 @@ const setDialogTile = async (type: string) => { | @@ -106,11 +106,14 @@ const setDialogTile = async (type: string) => { | ||
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | // 新增操作 | 108 | // 新增操作 |
| 109 | -const handleAdd = () => { | 109 | +const handleAdd = async () => { |
| 110 | // 重置表单 | 110 | // 重置表单 |
| 111 | - deptId.value = 0 | ||
| 112 | - setDialogTile('create') | ||
| 113 | - unref(formRef)?.getElFormRef()?.resetFields() | 111 | + deptId.value = null |
| 112 | + postIds.value = [] | ||
| 113 | + dialogVisible.value = true | ||
| 114 | + dialogTitle.value = t('action.create') | ||
| 115 | + actionType.value = 'create' | ||
| 116 | + await unref(formRef)?.getElFormRef().resetFields() | ||
| 114 | } | 117 | } |
| 115 | 118 | ||
| 116 | // 修改操作 | 119 | // 修改操作 |