record.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <div>
  3. <BaseDialog
  4. width="580px"
  5. :isShow.sync="isShow"
  6. title="操作记录"
  7. @close="close"
  8. :confirmStatus="false"
  9. >
  10. <el-timeline style="max-height: 600px;overflow: auto;">
  11. <el-timeline-item
  12. v-for="(item, index) in checkLogVos"
  13. :timestamp="$methodsTools.onlyForma(item.createTime)"
  14. placement="top"
  15. >
  16. <el-card>
  17. <h4>动作:{{ getlogAction(item.logAction) }}</h4>
  18. <p>操作人:{{ item.operName }}</p>
  19. <p>操作前:{{ item.oldContent }}</p>
  20. <p>操作后:{{ item.newContent }}</p>
  21. </el-card>
  22. </el-timeline-item>
  23. </el-timeline>
  24. </BaseDialog>
  25. </div>
  26. </template>
  27. <script>
  28. export default {
  29. name: "",
  30. props: {
  31. dialogVisible: {
  32. type: Boolean,
  33. default: false,
  34. },
  35. },
  36. data() {
  37. return {
  38. checkLogVos: [],
  39. };
  40. },
  41. mounted() {},
  42. methods: {
  43. getlogAction(i) {
  44. var a = "";
  45. switch (i) {
  46. case 1:
  47. a = "新增";
  48. break;
  49. case 2:
  50. a = "修改";
  51. break;
  52. case 3:
  53. a = "删除";
  54. break;
  55. default:
  56. break;
  57. }
  58. return a;
  59. },
  60. close() {},
  61. init() {
  62. this.$api.systemloglist().then((res) => {
  63. this.checkLogVos = res.rows;
  64. });
  65. },
  66. },
  67. computed: {
  68. isShow: {
  69. get() {
  70. if (this.dialogVisible) {
  71. this.init();
  72. }
  73. return this.dialogVisible;
  74. },
  75. set(val) {
  76. this.$emit("update:dialogVisible", false);
  77. },
  78. },
  79. },
  80. };
  81. </script>
  82. <style lang="scss" scoped></style>