| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 | <template>	<!-- #ifdef APP -->	<scroll-view style="flex:1">	<!-- #endif -->		<!-- 报告基础信息 -->		<view class="section">			<view class="info-item">				<text class="label">日志内容</text>				<text class="value">{{ log.content}}</text>			</view>			<view class="info-item">				<text class="label">日志模块</text>				<text class="value">{{ log.module}}</text>			</view>			</view>		<view class="section">			<uni-table>				<uni-tr class="section-title" v-for="(item,index) in titleList" :key="index">					<uni-td class="grid-text">{{item.title1}}</uni-td>					<uni-td class="grid-text">{{item.title2}}</uni-td>					<uni-td class="grid-text">{{item.title3}}</uni-td>				</uni-tr>				<uni-tr class="section-title" >					<uni-td class="grid-text">{{log.dataid ===0 ? "新增":"变更"}}</uni-td>					<uni-td class="grid-text">						<text :class="{							'bg-green bg-text': log.status === 1,							'bg-red bg-text': log.status === 0						  }">							{{log.status===1?"操作成功":"操作失败"}}						</text>					</uni-td>					<uni-td class="grid-text">						{{ log.dataid===0? log.createtime:log.updatetime }}					</uni-td>				</uni-tr>			</uni-table>		</view>				<view class="section">			<view class="info-item">				<text class="label">日志传参</text>				<text class="value">{{ log.params}}</text>			</view>		</view>	<!-- #ifdef APP -->	</scroll-view>	<!-- #endif --></template><script setup>	import {		ref,		onMounted	} from 'vue'	import { getList, Download, TaskProcess, getRecordCalculate, RecordCalculate, statusDict } from '@/api/work';	//自定义返回行为,覆盖系统默认返回按钮	const backPressOptions = reactive({		from: 'backbutton'	} as OnBackPressOptions)		const titleList = [{		title1: "类型", title2: "操作结果", title3: "操作时间"	}];		type Log = {	  id : number,	  module : string,	  dataid : number,	  content : string,	  status : number,	  params : string,    	  updatetime : string,	  createtime: string   	}		const log = ref<Log>({		id: 0,		module: "",		dataid: 0,		content: "",		status: 0,		params: "",			updatetime: "",		createtime: "",			})	// #ifdef H5	log.value = {		id: 1,		module: "app_media_info",		dataid: 0,		content : "新增数据成功",		params: "1CFA1040-00#S",    		createtime: "2025-06-23",		updatetime: "2025-06-23",			status: 1  }	// #endif	onLoad((options) => {		const logId = options?.id ?? ""		// 模拟数据加载,建议替换为后端接口请求		// #ifdef APP-ANDROID		//获取下载产品数据			   		getList('app_log', 'id', logId, null, null, null).then((res : UTSJSONObject) => {			console.log(res)			let dataList = res?.['data'] as UTSJSONObject[] ?? Array<UTSJSONObject>()			if (dataList != null && dataList.length > 0) {				dataList.forEach(item => {					if (item != null) {						let data = JSON.parse<Log>(item.toJSONString());						if (data != null) {							log.value = data						}					}				});			}		})		// #endif	})	const goBack = () => {		uni.navigateBack()	}	defineExpose({		backPressOptions	})</script><style scoped>	.container {		padding: 40rpx;		background-color: #f5f7fa;		flex: 1;		box-sizing: border-box;	}	.banner {		background: linear-gradient(135deg, #2193b0, #6dd5ed);		border-radius: 24rpx;		padding: 40rpx 30rpx;		margin-bottom: 40rpx;		box-shadow: 0 8rpx 16rpx rgba(33, 147, 176, 0.3);	}	.banner-title {		color: white;		font-size: 36rpx;		font-weight: bold;		text-align: center;	}	.section {		background-color: #fff;		border-radius: 20rpx;		padding: 30rpx;		margin-bottom: 30rpx;		box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.05);	}	.section-title {		display: flex;		flex-direction: row;		flex: 1;	}	.info-item {		display: flex;		justify-content: space-between;		/* #ifdef APP-NVUE */		font-size: 28rpx;		color: #666;		/* #endif */		margin-bottom: 18rpx;		flex-direction: row;	}	.section-content {		font-size: 28rpx;		color: #444;		line-height: 1.8;		white-space: normal;	}	.grid-text {		/* #ifdef APP-NVUE */		font-size: 24rpx;		color: #000;		/* #endif */		padding: 10rpx 0 10rpx 0rpx;		box-sizing: border-box;		margin: 5rpx 5rpx;		min-width: 200rpx;	}	.footer-btn {		margin-top: 40rpx;		display: flex;		justify-content: center;	}	.main-btn {		width: 80%;		padding: 28rpx 0;		font-size: 30rpx;		color: #fff;		border: none;		border-radius: 100rpx;		background: linear-gradient(to right, #36d1dc, #5b86e5);		box-shadow: 0 10rpx 24rpx rgba(91, 134, 229, 0.3);	}	.label {		font-weight: bold;		color: #102a43;		min-width: 150rpx;		margin-right: 30rpx;	}	.value {		flex: 1;		/* #ifdef APP-NVUE */		white-space: nowrap;		text-overflow: ellipsis;		/* #endif */		overflow: hidden;		margin-left: 30rpx;	}	.my-radius {		border-radius: 10rpx;	}	.bg-text {		width: 150rpx;		min-width: 150rpx;		border-radius: 10rpx;		text-align: center;	}	.bg-green {		background-color: seagreen;		color: #fff;	}	.bg-yellow {		background-color: yellow;	}	.bg-black {		background-color: #102a43;		color: #fff;	}	.bg-red {		background-color: red;		color: #fff;	}	.ft-red {		color: red;	}</style>
 |