levelChange.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <view class="app-content">
  3. <block v-if="!$util.isEmpty(list.data)">
  4. <t-table :headerBackgroundColor="'#F0F2F6'">
  5. <t-tr header>
  6. <t-th>日期</t-th>
  7. <t-th><view style="width:150upx;">事项</view></t-th>
  8. <t-th>人员</t-th>
  9. <t-th>变化前</t-th>
  10. <t-th>变化后</t-th>
  11. </t-tr>
  12. <view v-for="(item, index) in list.data" :key="index">
  13. <t-tr>
  14. <t-td align="center" color="info"><view >{{ item.addTime.substr(5,11) }}</view></t-td>
  15. <t-td align="center" color="info"><view style="width:150upx;">{{ item.event }}</view></t-td>
  16. <t-td align="center" color="info"><view >{{ item.staffName }}</view></t-td>
  17. <t-td align="center" color="info"><view >{{ item.beforeName }}</view></t-td>
  18. <t-td align="center" color="info"><view >{{ item.afterName }}</view></t-td>
  19. </t-tr>
  20. </view>
  21. </t-table>
  22. </block>
  23. <block v-else>
  24. <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
  25. </block>
  26. </view>
  27. </template>
  28. <script>
  29. import AppWrapperEmpty from "@/components/app-wrapper-empty";
  30. import { getMemberChange } from '@/api/member'
  31. import list from '@/mixins/list'
  32. export default {
  33. name: "memberChange",
  34. components: {
  35. AppWrapperEmpty
  36. },
  37. mixins:[list],
  38. data() {
  39. return {
  40. };
  41. },
  42. methods: {
  43. async init(){
  44. let id = this.option.id ? this.option.id : 0
  45. const res = await getMemberChange({ page:this.list.page,customId:id })
  46. if (this.$util.isEmpty(res.data.list)){
  47. this.completes(res)
  48. return
  49. }
  50. let currentList = res.data.list
  51. res.data.list = currentList
  52. this.completes(res)
  53. }
  54. },
  55. async onPullDownRefresh() {
  56. this.resetList()
  57. await this.init()
  58. uni.stopPullDownRefresh()
  59. },
  60. async onReachBottom() {
  61. if (!this.list.finished) {
  62. await this.init()
  63. uni.stopPullDownRefresh();;
  64. } else {
  65. uni.stopPullDownRefresh();
  66. }
  67. }
  68. };
  69. </script>
  70. <style lang="scss" scoped></style>