mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-14 02:55:07 +08:00
refactor:vue3 export function
This commit is contained in:
@ -18,10 +18,6 @@ const detailRef = ref() // 详情 Ref
|
||||
const dialogVisible = ref(false) // 是否显示弹出层
|
||||
const dialogTitle = ref(t('action.detail')) // 弹出层标题
|
||||
const { getList, setSearchParams, exportList } = methods
|
||||
// 导出操作
|
||||
const handleExport = async () => {
|
||||
await exportList('操作日志.xls')
|
||||
}
|
||||
// 详情
|
||||
const handleDetail = (row: OperateLogVO) => {
|
||||
// 设置数据
|
||||
@ -41,7 +37,7 @@ getList()
|
||||
type="warning"
|
||||
v-hasPermi="['system:operate-log:export']"
|
||||
:loading="tableObject.exportLoading"
|
||||
@click="handleExport"
|
||||
@click="exportList('操作日志.xls')"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
|
||||
</el-button>
|
||||
|
@ -19,11 +19,6 @@ const { register, tableObject, methods } = useTable<PostVO>({
|
||||
})
|
||||
const { getList, setSearchParams, delList, exportList } = methods
|
||||
|
||||
// 导出操作
|
||||
const handleExport = async () => {
|
||||
await exportList('岗位数据.xls')
|
||||
}
|
||||
|
||||
// ========== CRUD 相关 ==========
|
||||
const actionLoading = ref(false) // 遮罩层
|
||||
const actionType = ref('') // 操作按钮的类型
|
||||
@ -103,7 +98,7 @@ getList()
|
||||
type="warning"
|
||||
v-hasPermi="['system:post:export']"
|
||||
:loading="tableObject.exportLoading"
|
||||
@click="handleExport"
|
||||
@click="exportList('岗位数据.xls')"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
|
||||
</el-button>
|
||||
|
@ -19,10 +19,6 @@ const { register, tableObject, methods } = useTable<SensitiveWordVO>({
|
||||
})
|
||||
const { getList, setSearchParams, delList, exportList } = methods
|
||||
|
||||
// 导出操作
|
||||
const handleExport = async () => {
|
||||
await exportList('敏感词数据.xls')
|
||||
}
|
||||
// 获取标签
|
||||
const tagsOptions = ref()
|
||||
const getTags = async () => {
|
||||
@ -111,7 +107,7 @@ onMounted(async () => {
|
||||
type="warning"
|
||||
v-hasPermi="['system:post:export']"
|
||||
:loading="tableObject.exportLoading"
|
||||
@click="handleExport"
|
||||
@click="exportList('敏感词数据.xls')"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
|
||||
</el-button>
|
||||
|
@ -21,10 +21,6 @@ const { register, tableObject, methods } = useTable<TenantVO>({
|
||||
})
|
||||
const { getList, setSearchParams, delList, exportList } = methods
|
||||
|
||||
// 导出操作
|
||||
const handleExport = async () => {
|
||||
await exportList('租户数据.xls')
|
||||
}
|
||||
// ========== 套餐 ==========
|
||||
const tenantPackageId = ref() // 套餐
|
||||
const tenantPackageOptions = ref<TenantPackageVO[]>([]) //套餐列表
|
||||
@ -129,7 +125,7 @@ onMounted(async () => {
|
||||
type="warning"
|
||||
v-hasPermi="['system:tenant:export']"
|
||||
:loading="tableObject.exportLoading"
|
||||
@click="handleExport"
|
||||
@click="exportList('租户数据.xls')"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
|
||||
</el-button>
|
||||
|
@ -165,11 +165,6 @@ const handleResetPwd = (row: UserVO) => {
|
||||
})
|
||||
}
|
||||
|
||||
// 导出操作
|
||||
const handleExport = async () => {
|
||||
await exportList('用户数据.xls')
|
||||
}
|
||||
|
||||
// ========== 详情相关 ==========
|
||||
const detailRef = ref()
|
||||
|
||||
@ -296,7 +291,11 @@ getList()
|
||||
>
|
||||
<Icon icon="ep:upload" class="mr-5px" /> {{ t('action.import') }}
|
||||
</el-button>
|
||||
<el-button type="warning" v-hasPermi="['system:user:export']" @click="handleExport">
|
||||
<el-button
|
||||
type="warning"
|
||||
v-hasPermi="['system:user:export']"
|
||||
@click="exportList('用户数据.xls')"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
|
||||
</el-button>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user