<template>
	<view>
		<view class="log" v-for="item in operatorLogs" :key="item.code">

<view class="oper">
	<text class="title">操作内容：{{item.content}}</text>
	
</view>
		
			<view class="content">
				<text>操 作 人：{{item.userRealname}}</text>
				<text>操作时间：{{item.updateTime | timeFilter}}</text>
			</view>


		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				operatorLogs: [],
			}
		},
		filters: {
			timeFilter(data) {
				if(data!=='') {
					let time = uni.$moment(data).format("YYYY-MM-DD HH:mm:ss")
					return time
				}
			}
		},
		onLoad() {
			uni.request({
				url: 'http://127.0.0.1:9999/operatorLog/list',
				method: 'GET',
				data: {},
				success: res => {

					this.operatorLogs = res.data.data.operatorLogs;
					console.log(res.data.data.operatorLogs);
				},

			})
		},
		methods: {

		}
	}
</script>

<style>
	.log {
		width: 702rpx;
		height: 329rpx;
		background-color: white;
		margin-top: 30rpx;
		margin-left: 24rpx;
		border-radius: 10rpx;
		padding-top: 30rpx;
	}

	.content {
		display: flex;
		flex-direction: column;
		margin-top: 20rpx;
		margin-left: 30rpx;
		line-height: 55rpx;
		color: #444546;
		font-size: 28rpx;
	}

.oper{
	height: 180rpx;
}
	.title {
		font-size: 36rpx;
		margin-left: 30rpx;
		color: #282828;
		font-weight: 600;
	}
</style>
