<template>
  <partial-view v-ref:pv>
    <div class="row">
      <label class = "col-sm-4">客户名称:</label>
      <span class = "col-sm-8" style="text-align:left">{{model.f_user_name}}</span>
    </div>
    <div class="row">
      <label class = "col-sm-4">表编号:</label>
      <span class = "col-sm-8" style="text-align:left">{{model.f_user_id}}</span>
    </div>
    <div class="row">
      <label class = "col-sm-4">启用原因:</label>
      <pre style="padding:0" class = "col-sm-8">{{model.f_reason}}</pre>
    </div>
    <div class="row">
      <label class = "col-sm-4">操作人:</label>
      <span class = "col-sm-8" style="text-align:left">{{model.f_operator}}</span>
    </div>
    <div class="row">
      <label class = "col-sm-4">操作时间:</label>
      <span class = "col-sm-8" style="text-align:left">{{data.f_operate_date}}</span>
    </div>
  </partial-view>
</template>

<script>
export default {
  title: '表具启用详情',
  props: ['data'],
  data () {
    return {
      model: {}
    }
  },
  ready () {
    let sql = 'getEnable'
    let condition = {
      id: this.data.id,
      f_userinfo_id: this.data.f_userinfo_id
    }
    this.$info(`加载数据, sql:${sql}`)
    this.$refs.pv.load('rs/logic/getOneData', {data: {sql: sql, params: condition}}).then((a) => {
      this.model = a.data
    }).catch((error) => {
      if (error.status) {
        this.$warn(`加载数据出错, ${JSON.stringify(error)}`)
        return
      }
      throw error
    })
  }
}
</script>
