<template>
  <div class="auto" style = "margin:5px 0;">
    <partial-view v-ref:pv>
      <!-- <h1 text-align="center" @click = "getmsg">变更公告：</h1> -->
      <div class="col-sm-12" v-for = "row in model" style = "padding:2px 0;">
        <div class="col-sm-10" >
          <span>{{$index+1}}.{{row.f_change_message}}</span></br>
          <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{row.f_change_name}}</span>,<span>{{row.f_change_date}}</span>
        </div>
      </div>
      <!-- <p>版本号：0.0.1</p> -->
    </partial-view>
  </div>
</template>

<script>
export default {
  title: '变更公告详情',
  data () {
    return {
      model: {}
    }
  },
  ready () {
    let sql = 'singleTable_OrderBy'
    let condition = {
      items: 'id,f_change_name,f_change_message,f_change_date',
      tablename: 't_changedeclare',
      condition: ' 1=1',
      orderitem: 'f_change_date DESC'
    }
    this.$info(`加载数据中..., sql:${sql}`)
    this.$refs.pv.load('rs/sql/singleTable_OrderBy', {data: 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
    })
  }
}
</script>
