listContent.vue 992 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <c-scroll-paging
  3. refresherBackground="#f8f8f8"
  4. :queryList="queryList"
  5. v-model="rows"
  6. class="list-content"
  7. >
  8. <itemCell
  9. :item="item"
  10. :type="type"
  11. v-for="item in rows"
  12. :key="item.id"
  13. @approval="$emit('approval', $event)"
  14. @click="openDetail"
  15. ></itemCell>
  16. </c-scroll-paging>
  17. </template>
  18. <script>
  19. import itemCell from './itemCell.vue';
  20. import { processList } from '@/api/approval/index.js';
  21. export default {
  22. name: 'listContent',
  23. components: {
  24. itemCell,
  25. },
  26. props: {
  27. type: Number, // 0我发起,1我审批,2抄送人
  28. },
  29. data() {
  30. return {
  31. rows: [],
  32. };
  33. },
  34. methods: {
  35. openDetail(id) {
  36. uni.$u.route('/pages/waitHandle/approvalDetail/index', {
  37. id,
  38. type: this.type, // 0我发起,1我审批,2抄送人
  39. });
  40. },
  41. async queryList(e) {
  42. const params = {
  43. ...e,
  44. type: this.type,
  45. };
  46. const res = await processList(params);
  47. return res;
  48. },
  49. },
  50. };
  51. </script>
  52. <style scoped lang="scss">
  53. .list-content {
  54. }
  55. </style>