index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <div class="normal-card">
  3. <time-select @timeChange="timeChange" @clearSelect="clearSelect" v-if="tool.checkAuth($route.name,'read')"></time-select>
  4. <list :list="oneData" type="more" v-if="tool.checkAuth($route.name,'read')"></list>
  5. <!--分页-->
  6. <pagination :total="total" :pageSize="param.content.pageSize" :currentPage="param.content.pageNumber" @pageChange="pageChange">
  7. </pagination>
  8. </div>
  9. </template>
  10. <script>
  11. import Pagination from '@/components/pagination/Pagination'
  12. import SelectPanl from '@/SManagement/submitedit_one/components/SelectPanl'
  13. import TimeSelect from '@/SManagement/submitedit_one/components/TimeSelect'
  14. import list from '@/SManagement/submitedit_one/components/list'
  15. export default {
  16. name: 'index',
  17. data () {
  18. return {
  19. param: {
  20. "classname": "saletool.submitedit.submitedit",
  21. "method": "select_submitlist",
  22. "content": {
  23. "nocache":true,
  24. "onceonly":0,
  25. "pageNumber": 1,
  26. "pageSize": 4,
  27. "where":{
  28. "begdate":"",
  29. "enddate":""
  30. }
  31. }
  32. },
  33. oneData:[],
  34. total: 0,
  35. }
  36. },
  37. components: {
  38. Pagination,
  39. SelectPanl,
  40. list,
  41. TimeSelect
  42. },
  43. computed: {
  44. },
  45. watch: {
  46. },
  47. created () {
  48. this.getSubmitEditAction()
  49. },
  50. methods: {
  51. //获取所有一事一报
  52. async getSubmitEditAction () {
  53. let res = await this.$api.requested(this.param)
  54. this.oneData = res.data
  55. this.total = res.total
  56. },
  57. pageChange (n) {
  58. this.param.content.pageNumber = n
  59. this.getSubmitEditAction()
  60. },
  61. timeChange(time) {
  62. this.param.content.where.begdate = time[0]
  63. this.param.content.where.enddate = time[1]
  64. this.param.content.pageNumber = 1
  65. this.getSubmitEditAction()
  66. },
  67. clearSelect() {
  68. this.param.content.where.begdate = ''
  69. this.param.content.where.enddate = ''
  70. this.param.content.pageNumber = 1
  71. this.getSubmitEditAction()
  72. }
  73. },
  74. };
  75. </script>
  76. <style scoped>
  77. * {
  78. box-sizing: border-box;
  79. }
  80. .normal-card {
  81. min-height: 100%;
  82. padding: 18px 20px 30px 10px;
  83. position: relative;
  84. }
  85. .el-pagination {
  86. position: absolute;
  87. right: 16px;
  88. bottom: 0;
  89. }
  90. /deep/.el-empty {
  91. position: absolute;
  92. left: 50%;
  93. top: 50%;
  94. transform: translate(-50%,-50%);
  95. }
  96. </style>