<template>
  <div>
    <div class="dialog-h-content scroll-h">
      <div v-if="initLoading"
           class="m-row">
        <div class="m-info">
          <div class="info-prop">
            <span class="info-title-2">服务类型：</span>
            <span>{{ formData.serviceTypeName ?formData.serviceTypeName :'--' }}</span>
          </div>

          <div class="info-prop">
            <span class="info-title-2">所属网格：</span>
            <span>{{ formData.gridName ?formData.gridName :'--' }}</span>
          </div>

          <div class="info-prop">
            <span class="info-title-2">申请人：</span>
            <span>{{ formData.applicantName ?formData.applicantName :'--'}}</span>
          </div>

          <div class="info-prop">
            <span class="info-title-2">住址：</span>
            <span>{{ formData.applicantAddress?formData.applicantAddress:'--'}}</span>
          </div>

          <div class="info-prop">
            <span class="info-title-2">服务内容：</span>
            <span>{{ formData.serviceContent?formData.serviceContent:'--'}}</span>
          </div>

          <div class="info-prop">
            <span class="info-title-2">联系电话：</span>
            <span>{{ formData.mobile?formData.mobile:'--' }}</span>
          </div>
          <div class="info-prop">
            <span class="info-title-2">负责人：</span>
            <span>{{ formData.principalName?formData.principalName:'--' }}</span>
          </div>
          <div class="info-prop">
            <span class="info-title-2">服务时间：</span>
            <span>{{ formData.serviceTime?formData.serviceTime:'--' }}</span>
          </div>
          <div class="info-prop">
            <span class="info-title-2">备注：</span>
            <span>{{ formData.remark?formData.remark:'--' }}</span>
          </div>

        </div>
      </div>

    </div>
    <div class="div-btn">
      <el-button size="small"
                 @click="handleCancle">关 闭</el-button>

    </div>
  </div>
</template>

<script>

import { Loading } from 'element-ui' // 引入Loading服务


let loading // 加载动画
export default {
  data () {
    return {
      formData: {},
      initLoading: false,
    }
  },
  components: {},
  mounted () {
  },

  methods: {
    handleCancle () {

      this.$emit('diaDetailClose')

    },

    async initForm (row) {
      this.startLoading()
      this.formData = { ...row }
      this.initLoading = true
      this.endLoading()

    },

    // 开启加载动画
    startLoading () {
      loading = Loading.service({
        lock: true, // 是否锁定
        text: '正在加载……', // 加载中需要显示的文字
        background: 'rgba(0,0,0,.7)' // 背景颜色
      })
    },
    // 结束加载动画
    endLoading () {
      // clearTimeout(timer);
      if (loading) {
        loading.close()
      }
    }
  },
  computed: {
  },
  props: {

  }
}
</script>

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


