feat: 移除无用方法

pull/2/head
xingyu4j 2022-11-15 10:52:27 +08:00
parent 716266693b
commit ddca5f77e0
23 changed files with 14 additions and 55 deletions

View File

@ -35,8 +35,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -47,8 +47,6 @@ const setDialogTile = (type: string) => {
const handleCreate = () => {
setDialogTile('create')
userIds.value = []
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -37,8 +37,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -36,8 +36,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -30,8 +30,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -36,8 +36,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -46,8 +46,6 @@ const setDialogTile = (type: string) => {
const handleCreate = () => {
cronExpression.value = ''
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -36,8 +36,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -36,8 +36,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -34,8 +34,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -52,7 +52,6 @@ const handleAdd = (data: { id: number }) => {
//
deptParentId.value = data.id
formTitle.value = '新增部门'
unref(formRef)?.getElFormRef()?.resetFields()
showForm.value = true
}
//

View File

@ -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')

View File

@ -105,8 +105,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -104,8 +104,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -116,8 +116,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -57,7 +57,7 @@
<Descriptions
v-if="actionType === 'detail'"
:schema="allSchemas.detailSchema"
:data="detailRef"
:data="detailData"
/>
<template #footer>
<!-- 按钮保存 -->
@ -100,7 +100,7 @@ const dialogTitle = ref('edit') // 弹出层标题
const actionType = ref('') //
const actionLoading = ref(false) // Loading
const formRef = ref<FormExpose>() // 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
}
//

View File

@ -54,8 +54,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -42,8 +42,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -35,8 +35,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -35,8 +35,6 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
}
//

View File

@ -53,10 +53,9 @@ const setDialogTile = (type: string) => {
//
const handleCreate = () => {
setDialogTile('create')
//
tenantPackageId.value = ''
unref(formRef)?.getElFormRef()?.resetFields()
setDialogTile('create')
}
//

View File

@ -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')
}
//

View File

@ -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<FormExpose>() // Ref
const deptId = ref(0) // ID
const deptId = ref() // ID
const postIds = ref<string[]>([]) // ID
const postOptions = ref<PostVO[]>([]) //
@ -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()
}
//