feat: 整体pure,核心功能对接完成

This commit is contained in:
橙子
2024-09-05 23:10:40 +08:00
parent 4ed44a2a8f
commit 3339e30014
31 changed files with 459 additions and 535 deletions

View File

@@ -66,7 +66,7 @@ export function useRole(tableRef: Ref) {
label: "登录状态",
prop: "state",
minWidth: 100,
cellRenderer: ({ row, props }) => (
cellRenderer: ({ props }) => (
<el-tag size={props.size} style={tagStyle.value(1)}>
{1 === 1 ? "成功" : "失败"}
</el-tag>

View File

@@ -85,11 +85,7 @@ const {
</el-form-item>
</el-form>
<PureTableBar
title="登录日志"
:columns="columns"
@refresh="onSearch"
>
<PureTableBar title="登录日志" :columns="columns" @refresh="onSearch">
<template #buttons>
<el-popconfirm title="确定要删除所有日志数据吗?" @confirm="clearAll">
<template #reference>

View File

@@ -73,7 +73,7 @@ export function useRole(tableRef: Ref) {
label: "操作状态",
prop: "status",
minWidth: 100,
cellRenderer: ({ row, props }) => (
cellRenderer: ({ props }) => (
<el-tag size={props.size} style={tagStyle.value(1)}>
{1 === 1 ? "成功" : "失败"}
</el-tag>
@@ -81,10 +81,10 @@ export function useRole(tableRef: Ref) {
},
{
label: "操作时间",
prop: "operatingTime",
prop: "creationTime",
minWidth: 180,
formatter: ({ operatingTime }) =>
dayjs(operatingTime).format("YYYY-MM-DD HH:mm:ss")
formatter: ({ creationTime }) =>
dayjs(creationTime).format("YYYY-MM-DD HH:mm:ss")
},
{
label: "操作",

View File

@@ -18,7 +18,6 @@ const tableRef = ref();
const {
form,
timeQuery,
loading,
columns,
dataList,

View File

@@ -1,9 +1,8 @@
import dayjs from "dayjs";
import { message } from "@/utils/message";
import { getOnlineLogsList } from "@/api/system";
import { reactive, ref, onMounted, toRaw } from "vue";
import type { PaginationProps } from "@pureadmin/table";
import {forceLogout, getOnlineList} from "@/api/monitor/online";
import { forceLogout, getOnlineList } from "@/api/monitor/online";
export function useRole() {
const form = reactive({