<template>
  <div>

    <div v-if="initLoading"
         class="m-row">
      <div class="m-info">
        <div class="info-prop">
          <span class="info-title-3">状态：</span>
          <span>{{ dataForm.statusName  }}</span>
        </div>
        <div class="info-prop">
          <span class="info-title-3">所属网格：</span>
          <span>{{ dataForm.gridName  }}</span>
        </div>

        <div class="info-prop">
          <span class="info-title-3">需求类型：</span>
          <span>{{ dataForm.categoryName ?dataForm.categoryName :'--' }}</span>
        </div>

        <div class="info-prop">
          <span class="info-title-3">上报类型：</span>
          <span>{{ dataForm.reportTypeName}}</span>
        </div>

        <div class="info-prop">
          <span class="info-title-3">上报人：</span>
          <span>{{ dataForm.reportUserName?dataForm.reportUserName:'--'}}</span>
        </div>

        <div class="info-prop">
          <span class="info-title-3">上报人手机号：</span>
          <span>{{ dataForm.reportUserMobile?dataForm.reportUserMobile:'--'}}</span>
        </div>
        <div class="info-prop">
          <span class="info-title-3">上报时间：</span>
          <span>{{dataForm.reportTime ?dataForm.reportTime:'--' }}</span>
        </div>

        <div class="info-prop">
          <span class="info-title-3">需求人：</span>
          <span>{{ dataForm.demandUserName?dataForm.demandUserName:'--' }}</span>
        </div>
        <div class="info-prop">
          <span class="info-title-3">服务时间：</span>
          <span>{{ dataForm.wantServiceTime?dataForm.wantServiceTime:'--' }}</span>
        </div>
        <div class="info-prop">
          <span class="info-title-3">需求内容：</span>
          <span>{{ dataForm.content?dataForm.content:'--' }}</span>
        </div>
        <div class="info-prop">
          <span class="info-title-3">服务方：</span>
          <span>{{ dataForm.serviceShowName?dataForm.serviceShowName:'--' }}</span>
        </div>
        <div v-if="dataForm.status == 'canceled'"
             class="info-prop">
          <span class="info-title-3">取消时间：</span>
          <span>{{ dataForm.cancelTime? dataForm.cancelTime:'--'}}</span>
        </div>

        <div v-if="dataForm.status == 'finished' && dataForm.reportType == 'self_help'"
             class="info-prop">
          <span class="info-title-3">实际服务时间：</span>
          <span>{{ dataForm.serviceStartTime? dataForm.serviceStartTime:'--'}}</span>至
          <span>{{ dataForm.serviceEndTime? dataForm.serviceEndTime:'--'}}</span>
        </div>

        <template v-if="dataForm.status == 'finished'  && dataForm.reportType != 'self_help'">

          <div class="info-prop">
            <span class="info-title-3">完成情况：</span>
            <span>{{ dataForm.finishResult==='resolved'?'已解决':dataForm.finishResult==='unresolved'?'未解决':'--' }}</span>
          </div>

          <div class="info-prop">
            <span class="info-title-3">评价：</span>
            <span>{{ dataForm.score? dataForm.score:'--'  }}</span>
          </div>
          <div class="info-prop">
            <span class="info-title-3">备注：</span>
            <span>{{ dataForm.finishDesc ? dataForm.finishDesc :'--' }}</span>
          </div>

        </template>

      </div>
    </div>

  </div>
</template>

<script>
import { mapGetters } from "vuex";

export default {
  props: {

  },

  data () {
    return {
      btnLoading: false,
      pageLoading: false,
      initLoading: false,
      dataForm: {},


    };
  },

  computed: {
    ...mapGetters(["clientHeight", "iframeHeight"]),

  },

  watch: {

  },

  async created () {

  },

  methods: {
    initForm (row) {
      this.dataForm = JSON.parse(JSON.stringify(row))
      console.log(' this.dataForm', this.dataForm)
      this.initLoading = true
    },



  },
};
</script>

<style lang="scss" scoped >
@import "@/assets/scss/modules/management/detail-main.scss";
</style>
