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 = () => { const handleCreate = () => {
setDialogTile('create') setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
} }
// //

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -178,8 +178,6 @@ const {
// //
const handleTypeCreate = () => { const handleTypeCreate = () => {
setDialogTile('typeCreate') setDialogTile('typeCreate')
//
unref(typeFormRef)?.getElFormRef()?.resetFields()
} }
const handleTypeUpdate = async (row: DictTypeVO) => { const handleTypeUpdate = async (row: DictTypeVO) => {
setDialogTile('typeUpdate') setDialogTile('typeUpdate')
@ -207,8 +205,6 @@ const {
// //
const handleDataCreate = () => { const handleDataCreate = () => {
setDialogTile('dataCreate') setDialogTile('dataCreate')
//
unref(dataFormRef)?.getElFormRef()?.resetFields()
} }
const handleDataUpdate = async (row: DictDataVO) => { const handleDataUpdate = async (row: DictDataVO) => {
setDialogTile('dataUpdate') setDialogTile('dataUpdate')

View File

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

View File

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

View File

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

View File

@ -57,7 +57,7 @@
<Descriptions <Descriptions
v-if="actionType === 'detail'" v-if="actionType === 'detail'"
:schema="allSchemas.detailSchema" :schema="allSchemas.detailSchema"
:data="detailRef" :data="detailData"
/> />
<template #footer> <template #footer>
<!-- 按钮保存 --> <!-- 按钮保存 -->
@ -100,7 +100,7 @@ const dialogTitle = ref('edit') // 弹出层标题
const actionType = ref('') // const actionType = ref('') //
const actionLoading = ref(false) // Loading const actionLoading = ref(false) // Loading
const formRef = ref<FormExpose>() // Ref const formRef = ref<FormExpose>() // Ref
const detailRef = ref() // Ref const detailData = ref() // Ref
// //
const setDialogTile = (type: string) => { const setDialogTile = (type: string) => {
@ -112,8 +112,6 @@ const setDialogTile = (type: string) => {
// //
const handleCreate = () => { const handleCreate = () => {
setDialogTile('create') setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
} }
// //
@ -138,7 +136,7 @@ const handleUpdate = async (rowId: number) => {
const handleDetail = async (rowId: number) => { const handleDetail = async (rowId: number) => {
setDialogTile('detail') setDialogTile('detail')
const res = await PostApi.getPostApi(rowId) const res = await PostApi.getPostApi(rowId)
detailRef.value = res detailData.value = res
} }
// //

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -56,13 +56,11 @@ const setDialogTile = (type: string) => {
// //
const handleCreate = () => { const handleCreate = () => {
setDialogTile('create')
//
unref(formRef)?.getElFormRef()?.resetFields()
// //
unref(treeRef)?.setCheckedKeys([]) unref(treeRef)?.setCheckedKeys([])
menuExpand.value = false menuExpand.value = false
menuNodeAll.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 { useTable } from '@/hooks/web/useTable'
import { FormExpose } from '@/components/Form' import { FormExpose } from '@/components/Form'
import type { UserVO } from '@/api/system/user/types' 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 type { PermissionAssignUserRoleReqVO } from '@/api/system/permission/types'
import { listSimpleDeptApi } from '@/api/system/dept' import { listSimpleDeptApi } from '@/api/system/dept'
import { listSimplePostsApi } from '@/api/system/post' import { listSimplePostsApi } from '@/api/system/post'
@ -89,7 +89,7 @@ const actionType = ref('') // 操作按钮的类型
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const dialogTitle = ref('edit') // const dialogTitle = ref('edit') //
const formRef = ref<FormExpose>() // Ref const formRef = ref<FormExpose>() // Ref
const deptId = ref(0) // ID const deptId = ref() // ID
const postIds = ref<string[]>([]) // ID const postIds = ref<string[]>([]) // ID
const postOptions = ref<PostVO[]>([]) // const postOptions = ref<PostVO[]>([]) //
@ -106,11 +106,14 @@ const setDialogTile = async (type: string) => {
} }
// //
const handleAdd = () => { const handleAdd = async () => {
// //
deptId.value = 0 deptId.value = null
setDialogTile('create') postIds.value = []
unref(formRef)?.getElFormRef()?.resetFields() dialogVisible.value = true
dialogTitle.value = t('action.create')
actionType.value = 'create'
await unref(formRef)?.getElFormRef().resetFields()
} }
// //