<template>
	<div>
		<common ref="common" @asynCallBack="asynCallBack"></common>
		<top-header :pageTitle="pageTitle"></top-header>

		<div class="mui-content">
			<div class="mui-content-padded vongi-qingjiadt">
				<form class="mui-input-group">
					<div class="mui-input-row">
						<label>报修人</label>
						<span v-text="detail.name"></span>
					</div>
					<div class="mui-input-row">
						<label>房号</label>
						<span v-text="detail.community"></span>
					</div>
				</form>
			</div>
			<div class="mui-content-padded  vongi-qingjiadt vongi-hdsq">
				<form class="mui-input-group vongi-wybx">
					<div class="mui-input-row padd10">
						<label>报修内容</label>
						<span class="vongi-span vongi-meform-pho" v-text="detail.content"></span>
						<span class="vongi-span vongi-wordcard vongi-meform-pho">
							<div v-if="detail.img" class="fyy-upphoto flew">
								<div v-for="(item,index) in detail.img.split(',')" class="mui-col-xs-3">
									<img :src="item" />
								</div>
							</div>
						</span>
					</div>

				</form>
			</div>
			<div class="mui-content-padded vongi-qingjiadt">
				<form class="mui-input-group">
					<div class="mui-input-row">
						<label>报修时间</label>
						<span v-text="detail.createTime"></span>
					</div>
					<div class="mui-input-row">
						<label>报修状态</label>
						<span class="color4fc5f7" v-text="detail.statusN"></span>
					</div>
					<div v-show="detail.status!=0">
						<div class="mui-input-row">
							<label>解决方案</label>
							<span class="vongi-span" v-text="detail.returnContent"></span>
						</div>
						<div class="mui-input-row">
							<label>回复时间</label>
							<span v-text="detail.returnTime"></span>
						</div>
					</div>
					<!-- <div class="mui-input-row">
						<label>关闭时间</label>
						<span>2020-10-10 10:00:00</span>
					</div> -->
				</form>
			</div>
		</div>

		<loading :visible="isLoading"></loading>
	</div>
</template>

<script>
	import * as API_Property from '@/apis/Master/property'
	import Common from '$project/components/Common.vue'
	import Loading from '$project/components/Loading.vue'
	import TopHeader from '$project/components/TopHeader.vue'
	import {
		mapGetters,
		mapMutations
	} from 'vuex'
	export default {
		name: 'MasterPropertyRepairInfo',
		components: {
			Common,
			Loading,
			TopHeader
		},
		data() {
			return {
				pageTitle: '物业报修',

				isLoading: false,

				id: this.$route.query.id,
				detail: [],
			}
		},
		created() {},
		methods: {
			//获取详情
			getDetail(id) {
				this.id = id || this.id;
				this.isLoading = true;
				API_Property.getRepairAndComplaintInfo(this.id).then(response => {

					this.detail = response;

					this.isLoading = false;
				}).catch(error => {
					this.isLoading = false;
					mui.toast(error);
				})
			},
			asynCallBack() {

			},
		},
		mounted() {
			this.getDetail();
		},
		computed: {
			...mapGetters({
				openId: 'wx_openid',
				token: 'token',
			})
		},
	}
</script>

<style scoped src="$project/assets/css/xpwyfyy.css"></style>
<style src="$project/assets/css/iconfont.css"></style>
<style>
</style>
