Compare commits

..

No commits in common. "6819587701b8316ef9aa1a81cdf628520c9a42bb" and "9121d9820014bd400fac7e48cbd408a037d3fbbc" have entirely different histories.

1 changed files with 22 additions and 57 deletions

View File

@ -1,26 +1,6 @@
<template>
<div class="container-wrapper" style="padding: 24px">
<div class="title">
<div class="left">
<el-form :inline="true" :model="searchModel">
<el-date-picker
v-model="selectedDate"
type="daterange"
range-separator="-"
@change="handleDateChange"
start-placeholder="开始时间"
end-placeholder="结束时间"
/>
<el-input placeholder="请输入内容" v-model="searchModel.managerName" style="width: 180px;"></el-input>
<el-input placeholder="请输入内容" v-model="searchModel.message" style="width: 180px;"></el-input>
<el-button type="primary" @click="getData">查询</el-button>
</el-form>
</div>
<div class="right">
</div>
</div>
<div class="title">操作日志</div>
<div class="content">
<el-table
:data="tableData"
@ -54,14 +34,21 @@
<script setup lang="ts">
import {onMounted, ref} from 'vue'
import {post} from '@/utils/request.ts'
import {formatDateArray, getEndOfDay} from "@/utils/dateUtils.ts";
const tableData = ref<any>([])
onMounted(() => {
const tableData = ref<any>([
])
onMounted(()=>{
init()
getData()
})
const init = () => {
const init=()=>{
const params = {
currentPage: currentPage.value,
pageSize: pageSize.value,
}
// post("",{params:params}).then((res:any)=>{
// tableData.value=res
// })
}
const currentPage = ref(1)
const pageSize = ref(20)
@ -71,57 +58,35 @@ const handleCurrentChange = (val: any) => {
getData()
}
const getData = () => {
const getData=()=>{
const params = {
pageNum: currentPage.value,
pageSize: pageSize.value,
...searchModel.value,
beginTime: selectedDate.value?selectedDate.value[0]:null,
endTime: selectedDate.value?selectedDate.value[1]:null
}
post("common/log/page", {query: params}).then((res: any) => {
tableData.value = res.list
total.value = res.total_count
post("common/log/page",{query:params}).then((res:any)=>{
tableData.value=res.list
total.value=res.total_count
console.log(tableData.value)
})
}
const searchModel = ref<any>({})
const selectedDate = ref<any>([])
const handleDateChange = (date: any[]) => {
if (selectedDate.value){
selectedDate.value = formatDateArray(date)
selectedDate.value[1] = getEndOfDay(selectedDate.value[1]); // 23:59
}
}
</script>
<style scoped lang="scss">
.container-wrapper {
.container-wrapper{
display: flex;
flex-direction: column;
.title {
.title{
font-size: 20px;
height: 60px;
line-height: 60px;
background: #fff;
font-weight: 500;
.left {
flex: 1;
display: flex;
justify-content: space-between;
margin-right: 24px;
}
}
.content {
.content{
flex: 1;
background: #fff;
}
.pagination {
.pagination{
height: 60px;
background: #fff;
border-top: 1px solid #ebeef5;