AuditInfo.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <section class="content">
  3. <div class="part-box-border">
  4. <el-table :data="auditInfoList">
  5. <el-table-column
  6. prop="operateUserName"
  7. label="执行人"
  8. ></el-table-column>
  9. <el-table-column prop="operateTime" label="执行时间"></el-table-column>
  10. <el-table-column prop="operate" label="执行事项"></el-table-column>
  11. <el-table-column prop="auditRemark" label="审核意见"></el-table-column>
  12. </el-table>
  13. </div>
  14. <div class="part-page">
  15. <el-pagination
  16. :current-page="auditInfoCurPage"
  17. :page-size="auditInfoPageSize"
  18. :page-sizes="[10, 20, 50, 100, 200, 300]"
  19. layout="total, sizes, prev, pager, next, jumper"
  20. :total="auditInfoTotal"
  21. @current-change="auditInfoCurChange"
  22. @size-change="handleAuditInfoSizeChange"
  23. ></el-pagination>
  24. </div>
  25. </section>
  26. </template>
  27. <script>
  28. import { QUESTION_API } from "@/constants/constants.js";
  29. import { mapState } from "vuex";
  30. export default {
  31. props: {
  32. paperId: {
  33. type: String,
  34. default: "",
  35. },
  36. },
  37. data() {
  38. return {
  39. auditInfoLoading: false,
  40. auditInfoList: [],
  41. auditInfoCurPage: 1,
  42. auditInfoPageSize: 10,
  43. auditInfoTotal: 10,
  44. };
  45. },
  46. computed: {
  47. ...mapState({ user: (state) => state.user }),
  48. },
  49. //初始化查询
  50. created() {
  51. this.auditInfoSearch(1);
  52. },
  53. methods: {
  54. auditInfoSearch(curPage) {
  55. this.auditInfoLoading = true;
  56. var url =
  57. QUESTION_API +
  58. "/paper/audit/page/" +
  59. curPage +
  60. "/" +
  61. this.auditInfoPageSize +
  62. "?paperId=" +
  63. this.paperId;
  64. this.$httpWithMsg
  65. .get(url)
  66. .then((response) => {
  67. this.auditInfoList = response.data.content;
  68. this.auditInfoTotal = response.data.totalElements;
  69. this.auditInfoLoading = false;
  70. })
  71. .catch(function () {
  72. this.auditInfoLoading = false;
  73. });
  74. },
  75. auditInfoCurChange(val) {
  76. this.auditInfoCurPage = val;
  77. this.auditInfoSearch(val);
  78. },
  79. handleAuditInfoSizeChange(val) {
  80. this.auditInfoPageSize = val;
  81. this.auditInfoSearch(val);
  82. },
  83. },
  84. };
  85. </script>