adminUapi.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <div class="app-container">
  3. <search-form
  4. :list-loading="listLoading"
  5. @change="searchHandle"
  6. />
  7. <table-list
  8. :list-loading="listLoading"
  9. :data="tableData2"
  10. :columns="listConfig"
  11. :current-page="currentPage"
  12. :page-size="pageSize"
  13. :total-records="totalRecords"
  14. @currentChange="pageHandle"
  15. />
  16. </div>
  17. </template>
  18. <script>
  19. import { arrToObj } from '@/utils'
  20. import SearchForm from './components/searchForm/AdminUapi'
  21. import baseTable from '_m/baseTable.js'
  22. import xData from './mixin'
  23. export default {
  24. name: 'index',
  25. components: {
  26. SearchForm,
  27. },
  28. provide() {
  29. return {
  30. parentData: this
  31. }
  32. },
  33. mixins: [baseTable],
  34. data() {
  35. return {
  36. apiStr: 'base.admapiloglist',
  37. searchForm: null,
  38. isDtlShow: false,
  39. curObj: {},
  40. ...xData
  41. }
  42. },
  43. computed: {
  44. tableData2() {
  45. const arr = [...this.tableData]
  46. arr.map(item => {
  47. const cData = item.data ? JSON.parse(item.data) : {}
  48. console.log(cData)
  49. })
  50. return arr
  51. }
  52. },
  53. created() {},
  54. mounted() {
  55. this.listConfig = {
  56. rows: [
  57. { label: '昵称', prop: 'username' },
  58. { label: '接口', prop: 'url' },
  59. { label: '操作时间', prop: 'create_at' },
  60. { label: '操作IP', prop: 'remote_ip' },
  61. ]
  62. }
  63. },
  64. methods: {
  65. }
  66. }
  67. </script>