From 05fa34d61b8618c3f25e88eee4a87389c62e818b Mon Sep 17 00:00:00 2001 From: douzhuo <17611323298@163.com> Date: Thu, 28 Jul 2022 11:14:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/const/crud/admin/log.js | 106 +++++++++++----------------------- src/views/admin/log/index.vue | 6 +- 2 files changed, 38 insertions(+), 74 deletions(-) diff --git a/src/const/crud/admin/log.js b/src/const/crud/admin/log.js index 868b288..3df6bfe 100644 --- a/src/const/crud/admin/log.js +++ b/src/const/crud/admin/log.js @@ -24,63 +24,34 @@ export const tableOption = { }, { label: "操作手机", - prop: "type", + prop: "createBy", search: true }, - { - label: "终端", - width: 180, - prop: "title" - }, + // { + // label: "终端", + // width: 180, + // prop: "title" + // }, { label: "登录IP", prop: "remoteAddr" }, { label: "操作时间", - prop: "method", - search: true, - type: "datetime", - rangeSeparator: "-", - format: "yyyy-MM-dd", - valueFormat: "yyyy-MM-dd", - searchRange: true, - searchSpan: 8, + prop: "createTime", }, { label: "操作类型", prop: "type", - type: "select", - search: true, - dicData: [{ - label: '新增管理', - value: 0 - }, { - label: '编辑项目', - value: 1 - }, { - label: '删除项目', - value: 2 - }, { - label: '新增公司', - value: 3 - }, { - label: '编辑公司', - value: 4 - }, { - label: '删除公司', - value: 5 - }, { - label: '新增代理商', - value: 6 - }, { - label: '系统运营', - value: 7 - }] + formatter: val => { + let arr = ['新增管理', '编辑项目', '删除项目', '新增公司', '编辑公司', '删除公司', '新增代理商', '系统运营'] + console.log(val, 'dsadjaskljdkasl') + return arr[Number(val.type)] || '' + }, }, { label: '操作内容', - prop: 'time', + prop: 'title', search: true } ] @@ -108,47 +79,40 @@ export const tableOption1 = { }, column: [ { - label: "名称", + label: "用户名称", prop: "name" }, { - label: "类型", - prop: "type", - type: "select", - dicUrl: "/admin/dict/type/log_type" - // search: true + label: "登录手机", + prop: "createBy", + }, + { + label: "登录后台", + prop: "title", + }, + { + label: "组织名称", + prop: "title", }, { - label: "标题", - prop: "title" + label: "登录客户端", + prop: "title", }, { - label: "IP地址", + label: "登录IP", prop: "remoteAddr" }, { - label: "请求方式", - prop: "method" + label: "城市", + prop: "remoteAddr" }, - // { - // label: "客户端", - // prop: "serviceId" - // }, - // { - // width: 80, - // label: '请求时间', - // prop: 'time' - // }, { - width: 150, label: "登录时间", - prop: "createTime", - type: "datetime", - rangeSeparator: "-", - format: "yyyy-MM-dd HH:mm", - valueFormat: "yyyy-MM-dd HH:mm:ss", - // search: true, - searchRange: true - } + prop: "createTime" + }, + { + label: "离线时间", + prop: "createTime" + }, ] }; diff --git a/src/views/admin/log/index.vue b/src/views/admin/log/index.vue index f2fba98..a9fd301 100644 --- a/src/views/admin/log/index.vue +++ b/src/views/admin/log/index.vue @@ -84,7 +84,7 @@ :page.sync="page" :data="tableData" :table-loading="tableLoading" - :option="tableOption" + :option="tableOption1" :permission="permissionList" @on-load="getList" @search-change="searchChange" @@ -100,7 +100,7 @@