<template>
	<div class="newsStatus">
	    <div class="newsStatus-wrap">
		   	<div>
	   		   <div class="weui-panel weui-panel_access">
	   			    <div class="weui-media-box weui-media-box_text">
	   		            <h4 class="weui-media-box__title">{{data.title}}</h4>
                    <p class="weui-media-box__desc" v-if="data.applyCode">申请编号：{{data.applyCode}}</p>
                    <p class="weui-media-box__desc" v-if="data.repairCode">维保编号：{{data.repairCode}}</p>
                    <p class="weui-media-box__desc" v-if="data.address">房屋信息：{{data.address}}</p>
	   		            <p class="weui-media-box__desc" v-if="data.address">身份信息：{{data.familyType || '无身份信息数据'}}</p>
	   		            <p class="weui-media-box__desc" v-if="data.typeName">维保类型 ：{{data.typeName}} </p>
	   		            <p class="weui-media-box__desc" v-if="data.goRepairTime">上门时间 ：{{data.goRepairTime | normalDate}}</p>
	   		            <p class="weui-media-box__desc" v-if="data.remark">备注：{{data.remark}}</p>
	   		        </div>	   
	   			    <div class="weui-panel__ft">
	   			        <a href="javascript:void(0);" class="weui-cell weui-cell_access weui-cell_link">
	   			     		<div class="weui-cell__bd" @click="viewLook(data)">点击查看</div>
	   			            <span class="weui-cell__ft"></span>
	   			        </a>    
	   			    </div>
	   			 </div>
		   	</div>
    	</div>  
	</div>
   
</template>

<script>
//import { mapState } from 'vuex'

export default {
  name: "newsStatus",
  props: {
    data: {
      type: Object,
      default: ()=> {
        return {};
      },
      required: false
    },
    isExpect: {
      type: Boolean,
      default: false,
      required: false
    }
  },
  components: {
    //addPane
  },
  computed: {
    // ...mapState({
          
    // })
  },
  mounted() {
      
  },
  data: function() {
    return {
      name: "newsStatus"
    };
  },
  methods: {
    viewLook(data) {
      
      if(data.applyCode) {
        this.$router.push({path: `/applyDetail/${data.id}`});
      }
      if(data.repairCode) {
        this.$router.push({path: `/maintenanceDetail/${data.id}`});
      }
      if(data.address) {
        this.$router.push({path: "/manageOwnedHouse"});
      }
    }
  }
};
</script>
<style scoped lang='less'>
	.newsStatus {
		margin:auto;
		 	.newsStatus-wrap {
		 		width: 342px;
        margin-bottom: 10px;
		 			.weui-media-box {
		 			    text-align: left;
		 			}
		 			.weui-media-box__desc{
						margin-top: 7.5px;
		 			}
		 		    .weui-cell__bd {
		 		    	display: flex;
		 		    	color: #4F7BF2;
		 		    }
		 	}
	}
 	
	
</style>