index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <div class="app-container">
  3. <!-- 列表 -->
  4. <el-table v-loading="loading" :data="list">
  5. <el-table-column label="ID" align="center" prop="id" />
  6. <el-table-column label="流程名字" align="center" prop="name" />
  7. </el-table>
  8. <!-- 分页组件 -->
  9. <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
  10. @pagination="getList"/>
  11. </div>
  12. </template>
  13. <script>
  14. import {getDefinitionPage} from "@/api/bpm/definition";
  15. export default {
  16. name: "processDefinition",
  17. data() {
  18. return {
  19. // 遮罩层
  20. loading: true,
  21. // 总条数
  22. total: 0,
  23. // 表格数据
  24. list: [],
  25. // 查询参数
  26. queryParams: {
  27. pageNo: 1,
  28. pageSize: 10
  29. }
  30. };
  31. },
  32. created() {
  33. const key = this.$route.query && this.$route.query.key
  34. if (key) {
  35. this.queryParams['key'] = key
  36. }
  37. this.getList();
  38. },
  39. methods: {
  40. /** 查询流程定义列表 */
  41. getList() {
  42. this.loading = true;
  43. getDefinitionPage(this.queryParams).then(response => {
  44. this.list = response.data.list;
  45. this.total = response.data.total;
  46. this.loading = false;
  47. }
  48. );
  49. },
  50. }
  51. };
  52. </script>