Commit 769d1455 by baihong

add:操作日志

parent 12ce1a6a
......@@ -37,4 +37,8 @@ export const getActivityConfigByPay = (data) => {
//审核照片
export const checkActivityFile = (data) => {
return $http.putObj('/cms/activityFiles/checkActivityFile', data)
}
//日志操作
export const adminLogs = (data) => {
return $http.get('/cms/adminLogs', data)
}
\ No newline at end of file
......@@ -268,7 +268,7 @@ export default [
path: "/admin",
name: "admin",
meta: {
icon: "ios-briefcase",
icon: "ios-people",
title: "权限管理"
},
component: Main,
......@@ -277,12 +277,19 @@ export default [
path: "/admin/list",
name: "adminList",
meta: {
icon: "ios-people",
title: "权限管理"
title: "管理员列表"
},
component: () => import("@/view/admin/list.vue")
},
{
path: "/admin/logList",
name: "logList",
meta: {
title: "操作日志"
},
component: () => import("@/view/admin/logList.vue")
},
{
path: "/admin/add",
meta: {
title: "新增/编辑管理员",
......
<template>
<div class="content">
<div class="topSearch">
<div class="left">
管理员搜索:
<Input
v-model="keyword"
style="width:150px"
enter-button
placeholder="请输入"
/>
<span style="margin-left:10px">操作时间:</span>
<DatePicker
v-model="date"
format="yyyy/MM/dd"
type="daterange"
placement="bottom-end"
placeholder="Select date"
style="width: 200px"
></DatePicker>
<Button type="primary" @click="goDetail">查 询</Button>
<Button type="primary" ghost>重 置</Button>
</div>
</div>
<Table
:loading="$store.state.app.isLoading"
border
ref="selection"
:columns="columns"
:data="data"
>
<template slot-scope="{ row }" slot="name">
<span>{{ row.details.name }}</span>
</template>
<template slot-scope="{ row }" slot="title">
<span>{{ row.details.title }}</span>
</template>
<template slot-scope="{ row }" slot="created_at">
<span>{{ row.created_at | format }}</span>
</template>
<template slot-scope="{ row }" slot="enable">
<i-switch
:value="row.is_enable === 1 ? true : false"
@on-change="
value => {
change(value, row);
}
"
/>
</template>
<template slot-scope="{ row }" slot="action">
<a @click="edit(row)">编辑</a>
</template>
<template slot-scope="{ row }" slot="edit">
<a @click="goTheme(row)">编辑</a>
</template>
</Table>
<Pager
class="margin-top-10"
:config="config"
@on-change="handlePager"
></Pager>
</div>
</template>
<script>
import {
adminLogs
} from "@/api/clock/activityClocks";
import Pager from "@/view/common/Pager.vue";
export default {
name: "categories",
components: {
Pager
},
data() {
return {
config: { total: 0, size: 10, current: 1 },
keyword: "",
date: [],
checkStatu: null,
award_amount:null,
comment:'',
remark:'',
data: [],
pageIndex: 1,
pageSize: 10,
columns: [
{
title: "管理员账号",
key: "account"
},
{
title: "姓名",
slot: "admin_name"
},
{
title: "操作菜单",
slot: "desc"
},
{
title: "操作",
key: "action"
},
{
title: "操作时间",
slot: "create_time"
}
]
};
},
methods: {
search() {
let params = {
keyword: this.keyword,
language: "cn",
objectType: 1,
startDate: this.date[0],
endDate: this.date[1],
pageIndex: this.pageIndex,
pageSize: this.pageSize
};
adminLogs(params).then(res => {
this.config.total = res.total;
this.data = res.data;
});
},
checkActivity() {
let params = {
award_amount: this.award_amount,
check_status: 1,
comment: this.comment,
ids:[],
object_type:1,
remark:this.remark
};
checkActivityFile(params).then(res => {
console.log(res)
});
},
handlePager(pager) {
this.pageIndex = pager.current;
this.pageSize = pager.size;
this.search();
}
},
mounted() {}
};
</script>
<style lang="less"></style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment