feat: 新增物联卡操作记录

This commit is contained in:
blp 2023-02-02 13:56:26 +08:00
parent f2bd1d37a2
commit ff87cb9b6d
2 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1,7 @@
import server from '@/utils/request'
/**
*
* @param data
*/
export const queryList = (data: any) => server.post(`/network/card/stateOperate/_log`, data)

View File

@ -0,0 +1,77 @@
<!-- 操作记录 -->
<template>
<page-container>
<Search
:columns="columns"
target="record-search"
@search="handleSearch"
/>
<JTable
ref="RecordRef"
:columns="columns"
:request="queryList"
:defaultParams="{ sorts: [{ name: 'time', order: 'desc' }] }"
:params="params"
:model="'TABLE'"
>
<template #time="slotProps">
{{
slotProps.time
? moment(slotProps.time).format('YYYY-MM-DD HH:mm:ss')
: ''
}}
</template>
</JTable>
</page-container>
</template>
<script setup lang="ts">
import { queryList } from '@/api/iot-card/record';
import moment from 'moment';
const params = ref<Record<string, any>>({});
const columns = [
{
title: '卡号',
dataIndex: 'cardId',
key: 'cardId',
ellipsis: true,
search: {
type: 'string',
},
},
{
title: '操作类型',
dataIndex: 'type',
key: 'type',
search: {
type: 'string',
},
},
{
title: '操作时间',
dataIndex: 'time',
key: 'time',
scopedSlots: true,
search: {
type: 'date',
},
},
{
title: '操作人',
dataIndex: 'operator',
key: 'operator',
ellipsis: true,
search: {
type: 'string',
},
},
];
const handleSearch = (e: any) => {
params.value = e;
};
</script>
<style scoped lang="less"></style>