index.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <zj-page-container>
  3. <zj-page-fill class="neibuview">
  4. <zj-form-container>
  5. <zj-form-module title="操作明细">
  6. <zj-table :columns="operationDetailColumns" :tableData="logList" :tableAttributes="{
  7. border: true
  8. }"></zj-table>
  9. </zj-form-module>
  10. </zj-form-container>
  11. </zj-page-fill>
  12. </zj-page-container>
  13. </template>
  14. <script>
  15. import { orderBaseLogList } from "@/api/workOrderPool.js"
  16. export default {
  17. props: {
  18. id: {
  19. type: [String, Number],
  20. default: null,
  21. }
  22. },
  23. data() {
  24. return {
  25. logList: []
  26. }
  27. },
  28. watch: {
  29. id: {
  30. handler(newVal, oldVal) {
  31. this.getOrderBaseLogList()
  32. },
  33. deep: true,
  34. immediate: true,
  35. },
  36. },
  37. computed: {
  38. operationDetailColumns() {
  39. return [
  40. {
  41. columnAttributes: {
  42. label: '操作类别',
  43. prop: 'type',
  44. width: 140
  45. }
  46. },
  47. {
  48. columnAttributes: {
  49. label: '操作内容',
  50. prop: 'content'
  51. }
  52. },
  53. {
  54. columnAttributes: {
  55. label: '操作时间',
  56. prop: 'createTime',
  57. width: 140
  58. }
  59. },
  60. {
  61. columnAttributes: {
  62. label: '操作人',
  63. prop: 'createBy',
  64. width: 140
  65. }
  66. }
  67. ]
  68. }
  69. },
  70. methods: {
  71. // 获取操作记录
  72. getOrderBaseLogList() {
  73. if (this.id) {
  74. orderBaseLogList({
  75. orderBaseId: this.id
  76. }).then(res => {
  77. this.logList = res.data
  78. })
  79. }
  80. },
  81. }
  82. }
  83. </script>
  84. <style lang="scss" scoped>
  85. .neibuview {
  86. box-sizing: border-box;
  87. padding-left: 16px;
  88. ::v-deep & > .zj-page-fill-scroll {
  89. box-sizing: border-box;
  90. padding-right: 16px;
  91. &>div:nth-child(1) {
  92. margin-top: 20px;
  93. }
  94. }
  95. }
  96. </style>