<template>
<el-card shadow="never" header="近7天操作记录">
	<scTable ref="table" :apiObj="apiObj" :params="search" stripe highlightCurrentRow>
		<el-table-column label="级别" prop="code" width="60">
			<template #default="scope">
				<el-icon v-if="scope.row.code=='500'" style="color: #F56C6C;"><el-icon-circle-close-filled /></el-icon>
				<el-icon v-if="scope.row.code!='200' && scope.row.code!='500'" style="color: #E6A23C;"><el-icon-warning-filled /></el-icon>
				<el-icon v-if="scope.row.code=='200'" style="color: #409EFF;"><el-icon-info-filled /></el-icon>
			</template>
		</el-table-column>
		<el-table-column label="ID" prop="id" width="100"></el-table-column>
		<el-table-column label="日志名" prop="title" width="150"></el-table-column>
		<el-table-column label="请求接口" prop="url" width="220"></el-table-column>
		<el-table-column label="请求方法" prop="method" width="150"></el-table-column>
		<el-table-column label="用户" prop="nickname" width="150"></el-table-column>
		<el-table-column label="客户端IP" prop="client_ip" width="220"></el-table-column>
		<el-table-column label="日志时间" prop="created_at" width="170"></el-table-column>
	</scTable>
</el-card>
</template>

<script>
export default {
	data() {
		return {
			data: [],
			apiObj: this.$API.system.log.my,
			search: {date_type: 'seven'}
		}
	}
}
</script>

<style>
</style>
