Newer
Older
xinJiangMiniProgranm / packageB / recordDetail / recordDetail.vue
liyaguang on 21 Jun 2023 3 KB 举报相关调试完成
<template>
	<view class="record-detail">
		<image src="http://111.198.10.15:11604/png/back_ts.png" style="position:absolute;top: -4rpx;left: 0;z-index: -999; width:100%;height: 300rpx;"></image>
		<view class="main">
			<u--form labelPosition="left" :model="form">
				<!-- <u-form-item label="操作" prop="staffCode" borderBottom labelWidth="100">
					{{form.handle}}
				</u-form-item> -->
				<u-form-item label="描述" borderBottom labelWidth="100" >
					{{form.infoDescribe}}
				</u-form-item>
				<u-form-item label="举报号" borderBottom labelWidth="100" >
					{{form.reportNo}}
				</u-form-item>
				<u-form-item label="举报类型" prop="staffCode" borderBottom labelWidth="100">
					{{form.reportType}}
				</u-form-item>
				<u-form-item label="状态" borderBottom labelWidth="100">
					{{form.status === '2' ? '已评估' : '待评估'}}
				</u-form-item>
				<u-form-item label="信息来源" borderBottom labelWidth="100">
					{{form.webSiteName}}
				</u-form-item>
				<u-form-item label="举报时间" prop="visitorName" labelWidth="100" borderBottom>
					{{stamp2Time(form.createDate)}}
				</u-form-item>
				<!-- <u-form-item label="分数" prop="visitorIdCard" borderBottom labelWidth="100">
					{{form.score}}
				</u-form-item> -->
			</u--form>
		</view>
	</view>
</template>

<script>
	import { getLocationParams, stamp2Time } from '../../common/utils.js'
	import { getReportDetail } from '../../api/tort.js'
	export default {
		data() {
			return {
				form:{
					infoDescribe: '描述', // 操作
					reportNo: '举报号', // 举报号
					reportType: '举报类型', // 举报类型
					status: '状态', //状态
					webSiteName: '信息来源', // 信息来源
					time: '举报时间', // 举报时间
					createDate: '99', // 分数
				},
			}
		},
		// onLoad: function (option) { 
		//         console.log(option); //打印出上个页面传递的参数。
		//     },
		mounted() {
			const code = getLocationParams('code') // 举报号
			//-------------用这个举报号去调搜索接口---获取详情
			this.fetchData(code)
		},
		methods: {
			fetchData(code) {
				// 调接口逻辑
				getReportDetail({reportNo: code}).then(res => {
					this.form = res
					// 5 "其他",填写网址则为:0 网站举报
					this.form.reportType = this.form.reportType === 0 ? '网站举报' : this.form.reportType === 5 ? '其他举报' : '专项举报'
					console.log(res, '举报详情信息')
				}).catch((error) => {
					console.log(error)
				})
			},
			stamp2Time:stamp2Time,
		}
	}
</script>

<style lang="scss" scoped>
	.record-detail {
		padding: 40rpx;
		padding-top: 190rpx;
		.main {
			padding: 60rpx 40rpx;
			padding-top: 20rpx;
			background: #fff;
			border-radius: 20rpx;
			line-height: 70rpx;
		}
	}

</style>
<style>
	page {
		background-color: #f0f0f0;
	}
</style>
<style lang="scss">
	.record-detail {
		.u-form-item__body__right__content__slot {
			text-align: right;
			// color: #999;
		}
		.u-form-item__body__right__message {
			text-align: right !important;
		}
		.u-form-item__body__left__content__label {
			font-weight: 600;
		}
	}
</style>