<template>
	<view>
		<u-navbar
		 :title="title" 
		 title-color="#fff" 
		 :custom-back="customBack" 
		 :border-bottom="false" 
		 back-icon-color="#CCE8FF" 
		 :background="{background: 'linear-gradient(99deg, #7A4398 0%, #5A5DB9 100%)' }"></u-navbar>
		<view class="base-info">
			<view class="base-info-item u-flex u-row-between">
				<view class=""><b>路段/停车场：</b>{{pageData.roadName}}</view>
			</view>
			<view class="base-info-item">
				<view class=""><b>上报员：</b>{{pageData.createBy}}</view>
			</view>
			<view class="base-info-item">
				<view class=""><b>收费员：</b>{{pageData.payeeName}}</view>
			</view>
			<view class="base-info-item">
				<view class=""><b>问题类型：</b>{{pageData.payeeExceptionTypeName}}</view>
			</view>
			<view class="base-info-item">
				<view class=""><b>补充说明：</b>{{pageData.exceprionDes}}</view>
			</view>
			<view class="base-info-item">
				<view class="">
					<b>图片：</b>
					<view class="img-list">
						<image class="img" @click="previewImage(index)" v-for="(item,index) in pageData.imgList" :src="item" mode="widthFix" :key="index"></image>
					</view>
				</view>
			</view>
		</view>

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

<script>
	export default{
		data(){
			return{
				title:'巡查收费员',
				pageData:[],
				id:'',
				dataList:[],
			}
		},
		onLoad(page){
			this.id = page.id;
		},
		onShow(){
			this.getReportDetail();
		},
		mounted() {
		},
		onReady() {
			// this.$refs.uForm.setRules(this.rules);
		},
		methods:{
			customBack(){
				uni.navigateBack()
			},
			getReportDetail(){
				this.$u.api.payeeReportDetail({id:this.id}).then(res=>{
					if(res.code==200){
						this.pageData = res.data;
						// console.log('payeeReportDetail',res);
					}else{
						uni.showToast({
							icon:'none',
							title:res.msg
						})
					}
					console.log('res',res);
				}).catch(err=>{
					console.log('err',err);
				})
			},
			previewImage(index){
				uni.previewImage({
					current: index,
					urls: this.pageData.imgList
				});
			}
		}
	}
</script>
<style>
	page{background: #F3F3F3;}
</style>
<style lang="scss" scoped>
@import  '../report.scss'
</style>
