userCenterExhibition.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <div class="container-box">
  3. <el-table ref="multipleTable" v-loading="loading" element-loading-text="拼命加载中" :aline="center"
  4. element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.6)"
  5. :data="tableData" tooltip-effect="dark" :border="true" size="small" :lazy="true" height="570"
  6. :empty-text="$i18n.locale == 'en' ? 'Sorry no data!' : '暂无数据'" @selection-change="handleSelectionChange">
  7. <el-table-column prop="exhibitionName" :label="$i18n.locale == 'en' ? 'Events' : '会展名称'" align="center">
  8. </el-table-column>
  9. <el-table-column prop="contact" :label="$i18n.locale == 'en' ? 'Contacts' : '联系人'" align="center">
  10. </el-table-column>
  11. <el-table-column prop="unitName" :label="$i18n.locale == 'en' ? 'Company Name' : '公司名称'" align="center">
  12. </el-table-column>
  13. <el-table-column prop="email" :label="$i18n.locale == 'en' ? 'Email' : '邮箱'" align="center">
  14. </el-table-column>
  15. <el-table-column prop="mobile" :label="$i18n.locale == 'en' ? 'Phone' : '电话'" align="center">
  16. </el-table-column>
  17. <el-table-column prop="approvalStatus" :label="$i18n.locale == 'en' ? 'Audit Status' : '审核状态'"
  18. align="center">
  19. <template slot-scope="scope">{{ scope.row.approvalStatus == 0 ? $i18n.locale == 'zh' ? '待审批' : 'Approval pending' : scope.row.approvalStatus == 1 ? $i18n.locale == 'zh' ? '通过' : 'Pass' : $i18n.locale ==
  20. 'zh' ? '不通过' : 'No pass'
  21. }}</template>
  22. </el-table-column>
  23. </el-table>
  24. <div class="ui-bottom">
  25. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  26. :current-page="queryInfo.pageNo" :page-sizes="[5, 10, 15]" :page-size="queryInfo.pageSize"
  27. layout="total, sizes, prev, pager, next, jumper" :total="total">
  28. </el-pagination>
  29. </div>
  30. </div>
  31. </template>
  32. <script>
  33. import { ConventionRegistrationList } from '@/api/exhibition'
  34. // import { getDicts } from "@/api/dict";
  35. export default {
  36. data() {
  37. return {
  38. tableData: [],
  39. multipleSelection: [],
  40. meetingInfoArray: [],
  41. statusArray: [],
  42. statusEnArray: [],
  43. cureentPage: 1,
  44. queryInfo: {
  45. pageNo: 1,
  46. pageSize: 10,
  47. extend2: this.$i18n.locale.toUpperCase()
  48. },
  49. total: 0,
  50. loading: true
  51. }
  52. },
  53. mounted() {
  54. let language = this.$i18n.locale.toUpperCase()
  55. console.log(language);
  56. this.getList();
  57. },
  58. watch: {
  59. "$i18n.locale"() {
  60. this.getList()
  61. this.queryInfo.extend2 = this.$i18n.locale.toUpperCase()
  62. },
  63. },
  64. methods: {
  65. getList() {
  66. let params = this.queryInfo
  67. ConventionRegistrationList(params).then(res => {
  68. let that = this;
  69. if (res.data) {
  70. if (res.data.exhibitionApplys) {
  71. this.total = Number(res.data.page.totalCount);
  72. }
  73. if (res.data.exhibitionApplys) {
  74. that.tableData = res.data.exhibitionApplys;
  75. } else {
  76. that.tableData = []
  77. }
  78. this.loading = false
  79. } else {
  80. that.tableData = []
  81. }
  82. }).catch(() => {
  83. this.loading = false
  84. })
  85. },
  86. handleSizeChange(pagesize) {
  87. this.queryInfo.pageSize = pagesize
  88. this.getList()
  89. },
  90. //监听当前页数
  91. handleCurrentChange(pageNum) {
  92. this.queryInfo.pageNo = pageNum
  93. this.getList()
  94. },
  95. handleSelectionChange(val) {
  96. this.multipleSelection = val;
  97. },
  98. formatDate(t) {
  99. if (!t) {
  100. return ''
  101. } else {
  102. var original = new Date(t);
  103. var year = original.getFullYear();
  104. var month = original.getMonth() + 1;
  105. var date = original.getDate();
  106. var hour = original.getHours();
  107. var minute = original.getMinutes();
  108. var second = original.getSeconds();
  109. // return year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second;
  110. return year + "/" + month + "/" + date;
  111. }
  112. },
  113. toView(router, json) {
  114. this.$router.push({ name: router, params: { key: json } });
  115. },
  116. }
  117. }
  118. </script>
  119. <style scoped>
  120. .container-box {
  121. padding: 20px;
  122. }
  123. .ui-bottom {
  124. width: 100%;
  125. text-align: center;
  126. }
  127. </style>