<template>
  <div class='m-container'>
    <h2>
      <div class="squrt"></div>意见反馈管理
    </h2>
    <div class="m-core">
      <div class="tableWrap">
        <el-table :data="dataList"
                  :header-cell-style="{background:'#EDEEF0',color:'#444'}">

          <el-table-column align="center"
                           label="反馈时间"
                           prop="createTime">
            <template slot-scope="scope">
              {{scope.row.createTime | dateForMinFormat}}
            </template>
          </el-table-column>
          <!-- <el-table-column align="center" prop="name" label="标题"> -->
          <!-- </el-table-column> -->
          <el-table-column align="center"
                           label="内容"
                           prop="content">
            <template slot-scope="scope">
              <tooltip :content="scope.row.content" />
              <!-- <el-popover placement="top-start"
                          width="300"
                          trigger="hover"
                          :content="scope.row.content">
                <span slot="reference">{{ scope.row.content }}</span>
              </el-popover> -->
              <!-- <div :title="scope.row.content">{{ scope.row.content }}</div> -->
            </template>
          </el-table-column>
          <el-table-column align="center"
                           label="用户"
                           prop="username"></el-table-column>
          <el-table-column align="center"
                           prop="mobileNo"
                           label="邮箱或手机号">
          </el-table-column>
          <el-table-column align="center"
                           label="客户端"
                           prop="clientType"></el-table-column>
          <!-- <el-table-column align="center"
                           label="操作">
            <template slot-scope="scope">
              <el-button type="text" v-permission="'/entryOperationLook'" @click="onChargeOperation('look', scope.row)">查看</el-button>
            </template>
          </el-table-column> -->
        </el-table>
        <pagination :total="pageInfo.total"
                    :page.sync="pageInfo.page"
                    :limit.sync="pageInfo.limit"
                    :page-sizes="pageInfo.page_size"
                    @pagination="getList" />
      </div>

    </div>
  </div>
</template>
<script>
import pagination from '@/components/Pagination/index'
import { sysSuggestionList } from '@/api/appTenant'
import Tooltip from '@/components/Tooltip/index'
export default {
  components: { pagination, Tooltip },
  name: 'chargesList',
  data () {
    return {
      id: null,
      dataList: [],
      pageInfo: {
        // 分页规则
        limit: 10, // 限制显示条数
        page: 1, // 当前页
        total: 0, // 总条数
        page_size: [10, 20, 40, 50] // 选择限制显示条数
      }
    }
  },
  activated () {
    this.getList()
  },
  mounted () {
    this.getList()
  },
  methods: {
    getList () {
      let params = {
        rows: this.pageInfo.limit,
        page: this.pageInfo.page
      }
      sysSuggestionList(params).then(res => {
        if (res.code == 200) {
          this.dataList = res.data.rows
          this.pageInfo.total = res.data.total
        }
      })
    }
  }
}
</script>
<style lang="scss" scoped>
/deep/.el-button--primary {
  background: #14928a;
  border-color: #14928a;
  color: #fff;
  &:hover,
  &:active,
  &:focus {
    background: #14928a;
    border-color: #14928a;
    color: #fff;
  }
}
/deep/.el-table .cell {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
/deep/.el-date-editor.el-input {
  width: 100% !important;
}
/deep/.el-select {
  width: 98% !important;
}

/deep/.el-table {
  display: inline-block;
}
</style>