AuditRemark.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <div class="audit-remark">
  3. <h5>审校批注</h5>
  4. <ul v-if="remarkList.length > 0">
  5. <li
  6. v-for="{ id: remarkId, content, remark_person_name, remark_time, content_select, component_id } in remarkList"
  7. :key="remarkId"
  8. >
  9. <template v-if="content_select">
  10. <span class="el-icon-notebook-2"> 原文</span>
  11. <span class="content-select">{{ content_select }}</span>
  12. </template>
  13. <p v-html="content"></p>
  14. <div v-if="isAudit" class="remark-bottom">
  15. <span>{{ remark_person_name + ':' + remark_time }}</span>
  16. <div class="btn-box">
  17. <el-link type="primary" class="delete-black delete-btn" @click="deleteRemarks(remarkId)"
  18. ><SvgIcon icon-class="delete-black" size="12"
  19. /></el-link>
  20. <el-link
  21. type="primary"
  22. class="el-icon-place linkLocation"
  23. v-if="component_id !== 'WHOLE'"
  24. @click="handleLocation(component_id)"
  25. />
  26. </div>
  27. </div>
  28. </li>
  29. </ul>
  30. <p v-else style="text-align: center">暂无批注</p>
  31. </div>
  32. </template>
  33. <script>
  34. export default {
  35. name: 'AuditRemark',
  36. props: {
  37. isAudit: {
  38. type: Boolean,
  39. default: false,
  40. },
  41. remarkList: {
  42. type: Array,
  43. required: true,
  44. },
  45. },
  46. data() {
  47. return {};
  48. },
  49. methods: {
  50. deleteRemarks(remarkId) {
  51. this.$emit('deleteRemarks', remarkId);
  52. },
  53. handleLocation(componentId) {
  54. this.$emit('handleLocationRemarks', componentId);
  55. },
  56. },
  57. };
  58. </script>
  59. <style lang="scss" scoped>
  60. .audit-remark {
  61. width: 240px;
  62. height: 100%;
  63. overflow: auto;
  64. border: 1px solid #e5e5e5;
  65. h5 {
  66. padding: 0 5px;
  67. margin: 0;
  68. font-size: 18px;
  69. line-height: 40px;
  70. background: #f2f3f5;
  71. }
  72. .btn-box {
  73. display: flex;
  74. gap: 8px;
  75. align-items: center;
  76. width: 55px;
  77. padding: 0 10px;
  78. border-left: 1px solid #e5e5e5;
  79. }
  80. .delete-btn {
  81. color: #f44444;
  82. }
  83. ul {
  84. height: calc(100% - 40px);
  85. overflow: auto;
  86. li {
  87. border-bottom: 1px solid #e5e5e5;
  88. .el-icon-notebook-2 {
  89. display: block;
  90. padding: 10px 10px 0;
  91. margin-bottom: 4px;
  92. font-size: 12px;
  93. color: grey;
  94. }
  95. .content-select {
  96. display: block;
  97. margin-left: 10px;
  98. border-bottom: 1px solid #eee;
  99. }
  100. > p {
  101. padding: 5px;
  102. }
  103. :deep p {
  104. margin: 0;
  105. }
  106. .remark-bottom {
  107. display: flex;
  108. align-items: center;
  109. justify-content: space-between;
  110. padding: 0 5px;
  111. font-size: 12px;
  112. color: #555;
  113. border-top: 1px solid #e5e5e5;
  114. }
  115. }
  116. }
  117. }
  118. </style>