<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.infoSource}} </u-form-item> <u-form-item label="举报时间" prop="visitorName" labelWidth="100" borderBottom> {{stamp2Time(form.createTime)}} </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', // 分数 }, reportTypeList:[ { id: 1, label: '涉领导人类' }, { id: 2, label: '涉党军政类' }, { id: 3, label: '涉爆涉恐类' }, { id: 4, label: '民族宗教类' }, { id: 5, label: '治疆政策类' }, { id: 6, label: '涉疆案(事)件类' }, { id:7, label: '公共安全类' }, { id: 8, label: '组织人事类' }, { id: 9, label: '社会民生类' }, { id: 10, label: '其他类' }, ] } }, // onLoad: function (option) { // console.log(option); //打印出上个页面传递的参数。 // }, mounted() { const info = getLocationParams('info') // 举报号 //-------------用这个举报号去调搜索接口---获取详情 this.fetchData(JSON.parse(info)) }, methods: { fetchData(info) { console.log(info, '举报详情') // 调接口逻辑 // getReportDetail({reportNo: code}).then(res => { // this.form = res // this.form.reportType = this.reportTypeList.filter(item => item.id === this.form.reportType)[0]?.label // console.log(res, '举报详情信息') // }).catch((error) => { // console.log(error) // }) this.form = info this.form.reportType = this.reportTypeList.filter(item => item.id === Number(this.form.reportType))[0]?.label this.form.infoSource = this.form.infoSource === 0 ? '网站' : this.form.infoSource === 5 ? '其他' : '专项' }, 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>