|
@@ -2,62 +2,62 @@
|
|
<BasicTable @register="registerTable" :searchInfo="searchInfo" :columns="logColumns">
|
|
<BasicTable @register="registerTable" :searchInfo="searchInfo" :columns="logColumns">
|
|
<template #tableTitle>
|
|
<template #tableTitle>
|
|
<a-tabs defaultActiveKey="1" @change="tabChange" size="small">
|
|
<a-tabs defaultActiveKey="1" @change="tabChange" size="small">
|
|
- <a-tab-pane tab="浏览器日志" key="1"></a-tab-pane>
|
|
|
|
|
|
+ <a-tab-pane tab="浏览器日志" key="1" />
|
|
</a-tabs>
|
|
</a-tabs>
|
|
</template>
|
|
</template>
|
|
</BasicTable>
|
|
</BasicTable>
|
|
</template>
|
|
</template>
|
|
<script lang="ts" name="monitor-log" setup>
|
|
<script lang="ts" name="monitor-log" setup>
|
|
-import { ref } from 'vue';
|
|
|
|
-import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
|
|
-import { getLogList } from './log.api';
|
|
|
|
-import { columns, searchFormSchema } from './log.data';
|
|
|
|
-import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
|
-import { useListPage } from '/@/hooks/system/useListPage';
|
|
|
|
-const { createMessage } = useMessage();
|
|
|
|
-const checkedKeys = ref<Array<string | number>>([]);
|
|
|
|
|
|
+ import { ref } from 'vue';
|
|
|
|
+ import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
|
|
+ import { getLogList } from './log.api';
|
|
|
|
+ import { columns, searchFormSchema } from './log.data';
|
|
|
|
+ import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
|
+ import { useListPage } from '/@/hooks/system/useListPage';
|
|
|
|
+ const { createMessage } = useMessage();
|
|
|
|
+ const checkedKeys = ref<Array<string | number>>([]);
|
|
|
|
|
|
-const logColumns = ref<any>(columns);
|
|
|
|
-const searchInfo = { logType: '3' };
|
|
|
|
-// 列表页面公共参数、方法
|
|
|
|
-const { prefixCls, tableContext } = useListPage({
|
|
|
|
- designScope: 'user-list',
|
|
|
|
- tableProps: {
|
|
|
|
- title: '日志列表',
|
|
|
|
- api: getLogList,
|
|
|
|
- expandRowByClick: true,
|
|
|
|
- showActionColumn: false,
|
|
|
|
- rowSelection: {
|
|
|
|
- columnWidth: 20,
|
|
|
|
|
|
+ const logColumns = ref<any>(columns);
|
|
|
|
+ const searchInfo = { logType: '3' };
|
|
|
|
+ // 列表页面公共参数、方法
|
|
|
|
+ const { prefixCls, tableContext } = useListPage({
|
|
|
|
+ designScope: 'user-list',
|
|
|
|
+ tableProps: {
|
|
|
|
+ title: '日志列表',
|
|
|
|
+ api: getLogList,
|
|
|
|
+ expandRowByClick: true,
|
|
|
|
+ showActionColumn: false,
|
|
|
|
+ rowSelection: {
|
|
|
|
+ columnWidth: 20,
|
|
|
|
+ },
|
|
|
|
+ formConfig: {
|
|
|
|
+ schemas: searchFormSchema,
|
|
|
|
+ fieldMapToTime: [['fieldTime', ['createTime_begin', 'createTime_end'], 'YYYY-MM-DD']],
|
|
|
|
+ },
|
|
},
|
|
},
|
|
- formConfig: {
|
|
|
|
- schemas: searchFormSchema,
|
|
|
|
- fieldMapToTime: [['fieldTime', ['createTime_begin', 'createTime_end'], 'YYYY-MM-DD']],
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
-});
|
|
|
|
|
|
+ });
|
|
|
|
|
|
-const [registerTable, { reload }] = tableContext;
|
|
|
|
|
|
+ const [registerTable, { reload }] = tableContext;
|
|
|
|
|
|
-// 日志类型
|
|
|
|
-function tabChange(key) {
|
|
|
|
- searchInfo.logType = key;
|
|
|
|
- if (key == '3') {
|
|
|
|
- logColumns.value = columns;
|
|
|
|
|
|
+ // 日志类型
|
|
|
|
+ function tabChange(key) {
|
|
|
|
+ searchInfo.logType = key;
|
|
|
|
+ if (key == '3') {
|
|
|
|
+ logColumns.value = columns;
|
|
|
|
+ }
|
|
|
|
+ reload();
|
|
}
|
|
}
|
|
- reload();
|
|
|
|
-}
|
|
|
|
|
|
|
|
-/**
|
|
|
|
- * 选择事件
|
|
|
|
- */
|
|
|
|
-function onSelectChange(selectedRowKeys: (string | number)[]) {
|
|
|
|
- checkedKeys.value = selectedRowKeys;
|
|
|
|
-}
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 选择事件
|
|
|
|
+ */
|
|
|
|
+ function onSelectChange(selectedRowKeys: (string | number)[]) {
|
|
|
|
+ checkedKeys.value = selectedRowKeys;
|
|
|
|
+ }
|
|
</script>
|
|
</script>
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
-::v-deep .table-form {
|
|
|
|
- padding: 0 !important;
|
|
|
|
- margin: 0 !important;
|
|
|
|
-}
|
|
|
|
|
|
+ ::v-deep .table-form {
|
|
|
|
+ padding: 0 !important;
|
|
|
|
+ margin: 0 !important;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|