Files
ipms-sjy/yudao-ui-admin-vue3/src/views/system/loginlog/index.vue

54 lines
1.6 KiB
Vue
Raw Normal View History

2022-11-13 14:49:59 +08:00
<template>
<ContentWrap>
<!-- 列表 -->
2023-01-03 11:21:27 +08:00
<XTable @register="registerTable">
2022-11-16 09:56:57 +08:00
<!-- 操作导出 -->
2022-11-13 14:49:59 +08:00
<template #toolbar_buttons>
<XButton
2022-11-13 15:13:38 +08:00
type="warning"
2022-11-13 14:49:59 +08:00
preIcon="ep:download"
:title="t('action.export')"
2023-01-04 16:33:51 +08:00
@click="exportList('登录列表.xls')"
2022-11-13 14:49:59 +08:00
/>
</template>
<template #actionbtns_default="{ row }">
<!-- 操作详情 -->
<XTextButton preIcon="ep:view" :title="t('action.detail')" @click="handleDetail(row)" />
</template>
2023-01-03 11:21:27 +08:00
</XTable>
2022-11-13 14:49:59 +08:00
</ContentWrap>
<!-- 弹窗 -->
2022-11-15 12:25:19 +08:00
<XModal id="postModel" v-model="dialogVisible" :title="dialogTitle">
2022-11-14 09:15:11 +08:00
<!-- 表单详情 -->
2022-12-06 23:46:13 +08:00
<Descriptions :schema="allSchemas.detailSchema" :data="detailData" />
2022-11-13 14:49:59 +08:00
<template #footer>
<!-- 按钮关闭 -->
<XButton :title="t('dialog.close')" @click="dialogVisible = false" />
</template>
2022-11-15 12:25:19 +08:00
</XModal>
2022-11-13 14:49:59 +08:00
</template>
2022-11-23 22:26:25 +08:00
<script setup lang="ts" name="Loginlog">
// 业务相关的 import
2022-11-13 14:49:59 +08:00
import { allSchemas } from './loginLog.data'
import { getLoginLogPageApi, exportLoginLogApi, LoginLogVO } from '@/api/system/loginLog'
2022-07-18 19:06:37 +08:00
const { t } = useI18n() // 国际化
2022-11-13 14:49:59 +08:00
// 列表相关的变量
2023-01-03 11:21:27 +08:00
const [registerTable, { exportList }] = useXTable({
2022-11-13 14:49:59 +08:00
allSchemas: allSchemas,
2022-11-15 14:51:39 +08:00
getListApi: getLoginLogPageApi,
exportListApi: exportLoginLogApi
2022-07-18 19:06:37 +08:00
})
2022-07-18 19:06:37 +08:00
// 详情操作
2022-12-06 23:46:13 +08:00
const detailData = ref() // 详情 Ref
2022-07-18 19:06:37 +08:00
const dialogVisible = ref(false) // 是否显示弹出层
const dialogTitle = ref(t('action.detail')) // 弹出层标题
// 详情
2022-07-18 19:06:37 +08:00
const handleDetail = async (row: LoginLogVO) => {
// 设置数据
2022-12-06 23:46:13 +08:00
detailData.value = row
2022-07-18 19:06:37 +08:00
dialogVisible.value = true
}
</script>