<template>
  <div class="auto">
    <partial-view v-ref:pv>

      <table class="table table-bordered table-condensed self-table" id="table" >
        <!-- <tr>
           <td><b>享受减免账户</b></td>
           <td>{{data.f_user_name}}</td>
        </tr> -->
          <tr>
             <td><b>终止原因</b></td>
             <td>{{model.f_stop_remarks}}</td>
          </tr>

          <tr>
            <td><b>操作人</b></td>
            <td>{{model.f_operator}}</td>
          </tr>
          <tr>
            <td><b>操作部门</b></td>
            <td>{{model.f_department}}</td>
          </tr>
          <tr>
            <td><b>操作日期</b></td>
            <td>{{model.f_date}}</td>
          </tr>
      </table>

    </partial-view>
  </div>
</template>

<script>
import Table from '../../../../Table'
export default {
  title: '终止报建详情',
  props: ['data'],
  data () {
    return {
      model: {}
    }
  },
  ready () {
    let sql = 'singleTable_OrderBy'
    let condition = {
      items: '*',
      tablename: 't_stopapply',
      condition: 'id = ' + this.data.id,
      orderitem: 'id'
    }
    this.$info(`加载数据中..., sql:${sql}`)
    this.$refs.pv.load('rs/logic/getOneData', {data: {sql: sql, params: condition}}).then((a) => {
      this.$info(`成功获取到数据！, data:${JSON.stringify(a.data)}`)
      this.model = a.data
    }).catch((error) => {
      if (error.status) {
        this.$warn(`加载数据出错, ${JSON.stringify(error)}`)
        return
      }
      throw error
    })
  },
  methods: {
    // 获取表中字段对应的中文名
    getValue (key) {
      return Table.data[key]
    }
  }
}
</script>
