mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-13 02:25:06 +08:00
refactor: vue3 delete function
This commit is contained in:
@ -25,7 +25,7 @@ const dialogVisible = ref(false) // 是否显示弹出层
|
||||
const dialogTitle = ref('') // 弹出层标题
|
||||
// 导出操作
|
||||
const handleExport = async () => {
|
||||
await exportList('用户数据.xls')
|
||||
await exportList('错误数据.xls')
|
||||
}
|
||||
|
||||
// 详情操作
|
||||
|
@ -49,10 +49,6 @@ const handleGenTable = async (row: CodegenTableVO) => {
|
||||
const res = await CodegenApi.downloadCodegenApi(row.id)
|
||||
download.zip(res, 'codegen-' + row.className + '.zip')
|
||||
}
|
||||
// 删除操作
|
||||
const handleDelete = (row: CodegenTableVO) => {
|
||||
delList(row.id, false)
|
||||
}
|
||||
// 查询操作
|
||||
const handleQuery = () => {
|
||||
getList()
|
||||
@ -112,7 +108,7 @@ getList()
|
||||
link
|
||||
type="primary"
|
||||
v-hasPermi="['infra:codegen:delete']"
|
||||
@click="handleDelete(row)"
|
||||
@click="delList(row.id, false)"
|
||||
>
|
||||
<Icon icon="ep:delete" class="mr-1px" /> {{ t('action.del') }}
|
||||
</el-button>
|
||||
|
@ -74,11 +74,6 @@ const submitForm = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = (row: ConfigVO) => {
|
||||
delList(row.id, false)
|
||||
}
|
||||
|
||||
// ========== 详情相关 ==========
|
||||
const detailRef = ref() // 详情 Ref
|
||||
|
||||
@ -156,7 +151,7 @@ getList()
|
||||
link
|
||||
type="primary"
|
||||
v-hasPermi="['infra:config:delete']"
|
||||
@click="handleDelete(row)"
|
||||
@click="delList(row.id, false)"
|
||||
>
|
||||
<Icon icon="ep:delete" class="mr-1px" /> {{ t('action.del') }}
|
||||
</el-button>
|
||||
|
@ -79,11 +79,6 @@ const submitForm = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = (row: FileConfigVO) => {
|
||||
delList(row.id, false)
|
||||
}
|
||||
|
||||
// ========== 详情相关 ==========
|
||||
const detailRef = ref() // 详情 Ref
|
||||
|
||||
@ -169,7 +164,7 @@ getList()
|
||||
link
|
||||
type="primary"
|
||||
v-hasPermi="['infra:file-config:delete']"
|
||||
@click="handleDelete(row)"
|
||||
@click="delList(row.id, false)"
|
||||
>
|
||||
<Icon icon="ep:delete" class="mr-1px" /> {{ t('action.del') }}
|
||||
</el-button>
|
||||
|
@ -69,10 +69,6 @@ const excelUploadError = (): void => {
|
||||
const detailRef = ref() // 详情 Ref
|
||||
const dialogVisible = ref(false) // 是否显示弹出层
|
||||
const dialogTitle = ref('') // 弹出层标题
|
||||
// 删除操作
|
||||
const handleDelete = (row: FileVO) => {
|
||||
delList(row.id, false)
|
||||
}
|
||||
// 详情操作
|
||||
const handleDetail = (row: FileVO) => {
|
||||
// 设置数据
|
||||
@ -128,7 +124,7 @@ getList()
|
||||
link
|
||||
type="primary"
|
||||
v-hasPermi="['infra:file:delete']"
|
||||
@click="handleDelete(row)"
|
||||
@click="delList(row.id, false)"
|
||||
>
|
||||
<Icon icon="ep:delete" class="mr-1px" /> {{ t('action.del') }}
|
||||
</el-button>
|
||||
|
@ -92,11 +92,6 @@ const submitForm = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = (row: JobVO) => {
|
||||
delList(row.id, false)
|
||||
}
|
||||
|
||||
// ========== 详情相关 ==========
|
||||
const detailRef = ref() // 详情 Ref
|
||||
|
||||
@ -157,7 +152,12 @@ getList()
|
||||
<el-button link type="primary" v-hasPermi="['infra:job:query']" @click="handleDetail(row)">
|
||||
<Icon icon="ep:view" class="mr-1px" /> {{ t('action.detail') }}
|
||||
</el-button>
|
||||
<el-button link type="primary" v-hasPermi="['infra:job:delete']" @click="handleDelete(row)">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
v-hasPermi="['infra:job:delete']"
|
||||
@click="delList(row.id, false)"
|
||||
>
|
||||
<Icon icon="ep:delete" class="mr-1px" /> {{ t('action.del') }}
|
||||
</el-button>
|
||||
<el-button link type="primary" v-hasPermi="['infra:job:trigger']" @click="handleRun(row)">
|
||||
|
Reference in New Issue
Block a user