<template>
	<view class="wrapper">
		<view class="container">
			<view class="h1">办理信息</view>
			<view class="row" style="--label-width: 160rpx">
				<view class="col col-24">
					<view class="label">申请时间：</view>
					<view class="content">{{ comfort.apply?.applyDate }}</view>
				</view>
				<view class="col col-24">
					<view class="label">是否本人：</view>
					<view class="content">{{ comfort.apply?.isSelf === '1'? '是' : '否' }}</view>
				</view>
				<view class="col col-12" v-if="comfort.apply?.isSelf === '0'">
					<view class="label">代理人姓名：</view>
					<view class="content">{{ comfort.apply?.agentName }}</view>
				</view>
				<view class="col col-12" v-if="comfort.apply?.isSelf === '0'">
					<view class="label">关系：</view>
					<view class="content">{{ comfort.apply?.relation }}</view>
				</view>
			</view>
		</view>
		<view class="container">
			<view class="h1">申请人信息</view>
			<view class="row" style="--label-width: 160rpx">
				<view class="col col-12">
					<view class="label">申请人姓名：</view>
					<view class="content">{{ comfort.apply?.applicantEmpName }}</view>
				</view>
				<view class="col col-12">
					<view class="label">性别：</view>
					<view class="content">{{ comfort.apply?.sex }}</view>
				</view>
				<view class="col col-12">
					<view class="label">警号：</view>
					<view class="content">{{ comfort.person?.empNo }}</view>
				</view>
				<view class="col col-12">
					<view class="label">联系电话：</view>
					<view class="content">{{ comfort.person?.mobile }}</view>
				</view>
				<view class="col col-24">
					<view class="label">单位：</view>
					<view class="content">{{ comfort.apply?.departName }}</view>
				</view>
				<view class="col col-24">
					<view class="label">身份证：</view>
					<view class="content">{{ comfort.person?.idCode }}</view>
				</view>
				<view class="col col-12">
					<view class="label">出生年月：</view>
					<view class="content">{{ comfort.person?.birthday }}</view>
				</view>
				
				<view class="col col-12">
					<view class="label">职务：</view>
					<view class="content">{{ comfort.person?.job || '/' }}</view>
				</view>
				
				<view class="col col-12">
					<view class="label">警衔：</view>
					<view class="content">{{ comfort.person?.policeRank || '/' }}</view>
				</view>
				<view class="col col-12">
					<view class="label">文化程度：</view>
					<view class="content">{{ comfort.person?.levelEducation || '/' }}</view>
				</view>
				<view class="col col-12">
					<view class="label">政治面貌：</view>
					<view class="content">{{ comfort.person?.politicCountenance || '/' }}</view>
				</view>
				<view class="col col-24">
					<view class="label">开户行：</view>
					<view class="content">{{ comfort.person?.bankCardAccount }}{{ comfort.person?.bankBranch }}</view>
				</view>
				<view class="col col-24">
					<view class="label">银行账号：</view>
					<view class="content">{{ comfort.person?.bankCardAccount }}</view>
				</view>
			</view>
		</view>
		<view class="container">
			<view class="h1">案发情况</view>
			<view class="row" style="--label-width: 160rpx">
				<view class="col col-24">
					<view class="label">事发时间：</view>
					<view class="content">{{ comfort.apply?.happenTime }}</view>
				</view>
				<view class="col col-24">
					<view class="label">事实与理由：</view>
					<view class="content">{{ comfort.apply?.factReason }}</view>
				</view>
				<view class="col col-12">
					<view class="label">案发环节：</view>
					<view class="content">{{ comfort.apply?.incidentLink }}</view>
				</view>
				<view class="col col-12">
					<view class="label">受伤程度：</view>
					<view class="content">{{ comfort.apply?.injurySeverity }}</view>
				</view>
				<view class="col col-24">
					<view class="label">侵权形式：</view>
					<view class="content">{{ comfort.apply?.formsOfTort }}</view>
				</view>
				<view class="col col-12">
					<view class="label">侵权人姓名：</view>
					<view class="content">{{ comfort.apply?.infringerName || '/' }}</view>
				</view>
				<view class="col col-12">
					<view class="label">处理方式：</view>
					<view class="content">{{ comfort.apply?.infringerHandle }}</view>
				</view>
			</view>
		</view>
		<view class="container">
			<view class="h1">附件</view>
			<file-list :files="comfort.apply?.documentFile? JSON.parse(comfort.apply?.documentFile) : []" />
			<empty description="无附件" v-if="!comfort.apply?.documentFile" />
		</view>
	</view>
</template>

<script>
	import { getDictOptions } from '@/common/dict'
	import { getComfort } from '@/api/comfort'
	
	let _this;
	export default {
		data() {
			return {
				comfort: {}
			}
		},
		watch : {
			
		},
		setup() {
			const formsOfTort = getDictOptions('formsOfTort')
			const injurySeverity = getDictOptions('injurySeverity')
			const incidentLink = getDictOptions('incidentLink')
			const bank = getDictOptions('bank')
			
			return {
				formsOfTort,
				injurySeverity,
				incidentLink,
				bank
			}
		},
		onLoad() {
			_this = this;
			getComfort(this.$page.options.id).then(data => {
				this.comfort = data
			})
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		background-color: #fff;
		margin-bottom: 12rpx;
	}
	.wrapper {
		background-color: #f5f5f5;
		min-height: 100vh;
	}
	.h1 {
		font-weight: 700;
		margin-bottom: 24rpx;
	}
</style>