index.vue 973 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <ContentWrap>
  3. <XTable @register="registerTable">
  4. <template #suspensionState_default="{ row }">
  5. <el-tag type="success" v-if="row.suspensionState === 1">激活</el-tag>
  6. <el-tag type="warning" v-if="row.suspensionState === 2">挂起</el-tag>
  7. </template>
  8. <template #actionbtns_default="{ row }">
  9. <!-- 操作: 审批进度 -->
  10. <XTextButton preIcon="ep:view" title="详情" @click="handleAudit(row)" />
  11. </template>
  12. </XTable>
  13. </ContentWrap>
  14. </template>
  15. <script setup lang="ts">
  16. // 业务相关的 import
  17. import { allSchemas } from './done.data'
  18. import * as TaskApi from '@/api/bpm/task'
  19. const { push } = useRouter() // 路由
  20. const [registerTable] = useXTable({
  21. allSchemas: allSchemas,
  22. getListApi: TaskApi.getDoneTaskPage
  23. })
  24. // 处理审批按钮
  25. const handleAudit = (row) => {
  26. push({
  27. name: 'BpmProcessInstanceDetail',
  28. query: {
  29. id: row.processInstance.id
  30. }
  31. })
  32. }
  33. </script>