douzhuo преди 2 години
родител
ревизия
05fa34d61b
променени са 2 файла, в които са добавени 38 реда и са изтрити 74 реда
  1. +35
    -71
      src/const/crud/admin/log.js
  2. +3
    -3
      src/views/admin/log/index.vue

+ 35
- 71
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"
},
]
};

+ 3
- 3
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 @@

<script>
import { delObj, fetchList } from "@/api/admin/log";
import { tableOption } from "@/const/crud/admin/log";
import { tableOption1 } from "@/const/crud/admin/log";
import { mapGetters } from "vuex";
import { exportMethodPost} from "@/util/util";

@@ -125,7 +125,7 @@ export default {
pageSize: 10, // 每页显示多少条
},
tableLoading: false,
tableOption: tableOption,
tableOption1: tableOption1,
};
},
computed: {


Зареждане…
Отказ
Запис