登录记录&操作记录入参提交
All checks were successful
local-test分支构建发布 / Docker-Build (push) Successful in 1m54s

This commit is contained in:
joylink_fanyuhong 2024-10-25 10:44:35 +08:00
parent 40d57a3fc8
commit 5d6283daa6
3 changed files with 230 additions and 5 deletions

View File

@ -19,7 +19,10 @@ export interface Record {
} }
export class PagingQueryParams extends PageQueryDto { export class PagingQueryParams extends PageQueryDto {
logType = 'logType'; logType?: string;
name?: string;
beginDate?: string;
endDate?: string;
} }
/** /**

View File

@ -15,6 +15,103 @@
binary-state-sort binary-state-sort
@request="onRequest" @request="onRequest"
> >
<template v-slot:top-right>
<q-input
dense
class="q-mr-md"
debounce="1000"
v-model="filter.name"
label="操作人"
></q-input>
<q-input
v-model="filter.beginDate"
label="开始时间"
debounce="1000"
class="q-mr-md"
dense
>
<template v-slot:prepend>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy
cover
transition-show="scale"
transition-hide="scale"
>
<q-date v-model="filter.beginDate" mask="YYYY-MM-DD HH:mm:ss">
<div class="row items-center justify-end">
<q-btn v-close-popup label="关闭" color="primary" flat />
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</template>
<template v-slot:append>
<q-icon name="access_time" class="cursor-pointer">
<q-popup-proxy
cover
transition-show="scale"
transition-hide="scale"
>
<q-time
v-model="filter.beginDate"
mask="YYYY-MM-DD HH:mm:ss"
format24h
with-seconds
>
<div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat />
</div>
</q-time>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
<q-input
v-model="filter.endDate"
label="截止时间"
debounce="1000"
class="q-mr-md"
dense
>
<template v-slot:prepend>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy
cover
transition-show="scale"
transition-hide="scale"
>
<q-date v-model="filter.endDate" mask="YYYY-MM-DD HH:mm:ss">
<div class="row items-center justify-end">
<q-btn v-close-popup label="关闭" color="primary" flat />
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</template>
<template v-slot:append>
<q-icon name="access_time" class="cursor-pointer">
<q-popup-proxy
cover
transition-show="scale"
transition-hide="scale"
>
<q-time
v-model="filter.endDate"
mask="YYYY-MM-DD HH:mm:ss"
format24h
with-seconds
>
<div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat />
</div>
</q-time>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</template>
<template v-slot:body-cell-subEventType="props"> <template v-slot:body-cell-subEventType="props">
<q-td :props="props"> <q-td :props="props">
<div class="q-gutter-sm row justify-center"> <div class="q-gutter-sm row justify-center">
@ -24,6 +121,15 @@
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-requestSuccess="props">
<q-td :props="props">
<div class="q-gutter-sm row justify-center">
<q-chip outline size="sm" color="primary">
{{ props.row.requestSuccess === 1 ? '成功' : '失败' }}
</q-chip>
</div>
</q-td>
</template>
<!-- <template v-slot:top-right> <!-- <template v-slot:top-right>
<q-input <q-input
dense dense
@ -66,11 +172,11 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, onMounted, computed } from 'vue'; import { ref, reactive, onMounted, computed } from 'vue';
import { useQuasar, type QTableColumn } from 'quasar'; import { type QTableColumn } from 'quasar';
import { pageQuery, Record } from '../api/LogApi'; import { pageQuery, Record } from '../api/LogApi';
import { errorNotify } from '../utils/CommonNotify'; import { errorNotify } from '../utils/CommonNotify';
const $q = useQuasar(); // const $q = useQuasar(); useQuasar
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
sizeHeight: number; sizeHeight: number;
@ -123,6 +229,8 @@ const tableRef = ref();
const rows = reactive([]); const rows = reactive([]);
const filter = reactive({ const filter = reactive({
name: '', name: '',
beginDate: '',
endDate: '',
}); });
const loading = ref(false); const loading = ref(false);
const pagination = ref({ const pagination = ref({
@ -143,6 +251,9 @@ async function onRequest(props: any) {
current: page, current: page,
size: rowsPerPage, size: rowsPerPage,
logType: 'LOGIN', logType: 'LOGIN',
name: filter.name,
beginDate: filter.beginDate,
endDate: filter.endDate,
}); });
pagination.value.rowsNumber = response.total; pagination.value.rowsNumber = response.total;

View File

@ -15,6 +15,103 @@
binary-state-sort binary-state-sort
@request="onRequest" @request="onRequest"
> >
<template v-slot:top-right>
<q-input
dense
class="q-mr-md"
debounce="1000"
v-model="filter.name"
label="操作人"
></q-input>
<q-input
v-model="filter.beginDate"
label="开始时间"
debounce="1000"
class="q-mr-md"
dense
>
<template v-slot:prepend>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy
cover
transition-show="scale"
transition-hide="scale"
>
<q-date v-model="filter.beginDate" mask="YYYY-MM-DD HH:mm:ss">
<div class="row items-center justify-end">
<q-btn v-close-popup label="关闭" color="primary" flat />
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</template>
<template v-slot:append>
<q-icon name="access_time" class="cursor-pointer">
<q-popup-proxy
cover
transition-show="scale"
transition-hide="scale"
>
<q-time
v-model="filter.beginDate"
mask="YYYY-MM-DD HH:mm:ss"
format24h
with-seconds
>
<div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat />
</div>
</q-time>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
<q-input
v-model="filter.endDate"
label="截止时间"
debounce="1000"
class="q-mr-md"
dense
>
<template v-slot:prepend>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy
cover
transition-show="scale"
transition-hide="scale"
>
<q-date v-model="filter.endDate" mask="YYYY-MM-DD HH:mm:ss">
<div class="row items-center justify-end">
<q-btn v-close-popup label="关闭" color="primary" flat />
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</template>
<template v-slot:append>
<q-icon name="access_time" class="cursor-pointer">
<q-popup-proxy
cover
transition-show="scale"
transition-hide="scale"
>
<q-time
v-model="filter.endDate"
mask="YYYY-MM-DD HH:mm:ss"
format24h
with-seconds
>
<div class="row items-center justify-end">
<q-btn v-close-popup label="Close" color="primary" flat />
</div>
</q-time>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</template>
<template v-slot:body-cell-subEventType="props"> <template v-slot:body-cell-subEventType="props">
<q-td :props="props"> <q-td :props="props">
<div class="q-gutter-sm row justify-center"> <div class="q-gutter-sm row justify-center">
@ -24,6 +121,15 @@
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-requestSuccess="props">
<q-td :props="props">
<div class="q-gutter-sm row justify-center">
<q-chip outline size="sm" color="primary">
{{ props.row.requestSuccess === 1 ? '成功' : '失败' }}
</q-chip>
</div>
</q-td>
</template>
<!-- <template v-slot:top-right> <!-- <template v-slot:top-right>
<q-input <q-input
dense dense
@ -66,11 +172,11 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, onMounted, computed } from 'vue'; import { ref, reactive, onMounted, computed } from 'vue';
import { useQuasar, type QTableColumn } from 'quasar'; import { type QTableColumn } from 'quasar';
import { pageQuery, Record } from '../api/LogApi'; import { pageQuery, Record } from '../api/LogApi';
import { errorNotify } from '../utils/CommonNotify'; import { errorNotify } from '../utils/CommonNotify';
const $q = useQuasar(); // const $q = useQuasar();
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
sizeHeight: number; sizeHeight: number;
@ -123,6 +229,8 @@ const tableRef = ref();
const rows = reactive([]); const rows = reactive([]);
const filter = reactive({ const filter = reactive({
name: '', name: '',
beginDate: '',
endDate: '',
}); });
const loading = ref(false); const loading = ref(false);
const pagination = ref({ const pagination = ref({
@ -143,6 +251,9 @@ async function onRequest(props: any) {
current: page, current: page,
size: rowsPerPage, size: rowsPerPage,
logType: 'OPERATE', logType: 'OPERATE',
name: filter.name,
beginDate: filter.beginDate,
endDate: filter.endDate,
}); });
pagination.value.rowsNumber = response.total; pagination.value.rowsNumber = response.total;