operatorTrajectory.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <el-dialog :close-on-click-modal="false" v-model="dialog" title="轨迹" width="1200">
  3. <ComplexTable :tableData="tableData" tableheight="calc(100vh - 410px)" :columns="columns" :columnwidth="200"
  4. :pageInfo="pageInfo" @getList="getList">
  5. <template v-slot:operation="scope">
  6. <el-button type="primary" link @click="detail(scope.operationData.id)">
  7. 查看详情
  8. </el-button>
  9. </template>
  10. </ComplexTable>
  11. </el-dialog>
  12. </template>
  13. <script lang="ts" setup>
  14. import api from '@/api';
  15. const dialog = ref(false)
  16. const tableData = ref([])
  17. const columns = [
  18. { prop: "operationContent", label: "操作内容描述", minWidth: '500', },
  19. {
  20. prop: "operatorName", label: "操作类型", width: '120',
  21. },
  22. { prop: "createTime", label: "操作时间", width: '240', },
  23. {
  24. prop: "createByName", label: "操作人", width: '120',
  25. },
  26. ];
  27. const pageInfo = ref({
  28. pageNum: 1,
  29. pageSize: 20,
  30. sizes: [10, 20, 30, 40, 50],
  31. total: 100,
  32. });
  33. //分页事件
  34. const getList = (item) => {
  35. pageInfo.value.pageNum = item.pageNum;
  36. pageInfo.value.pageSize = item.pageSize;
  37. findpage();
  38. };
  39. function findpage(primaryValue) {
  40. api.agreementApi.operatorTrajectoryList({ pages: pageInfo.value.pageNum, size: pageInfo.value.pageSize, primaryValue }).then((res: any) => {
  41. if (res.code == '200') {
  42. tableData.value = res.data.records;
  43. pageInfo.value.pageNum = res.data.current;
  44. pageInfo.value.pageSize = res.data.size;
  45. pageInfo.value.total = res.data.total;
  46. }
  47. });
  48. }
  49. const operAtorTrajectory = (primaryValue) => {
  50. findpage(primaryValue)
  51. tableData.value = []
  52. dialog.value = true
  53. }
  54. const myRouter = useRouter()
  55. const detail = (id) => {
  56. myRouter.push({
  57. path: '/systemManage/logManage/logDetail',
  58. query: {
  59. id
  60. }
  61. })
  62. dialog.value = false
  63. }
  64. defineExpose({
  65. operAtorTrajectory,
  66. });
  67. </script>