index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <div class="actionDynamic">
  3. <el-tabs v-model="activeName" @tab-click="changeTabs">
  4. <el-tab-pane label="评论" name="Comments">
  5. <div class="Comments">
  6. <div
  7. v-for="(item, index) in comments"
  8. :key="index"
  9. >
  10. <div style="font-size: 14px; color: #333b4a; display: inline-block">
  11. {{ item.commentInfo.name }}
  12. </div>
  13. <div
  14. style="
  15. margin-left: 20px;
  16. display: inline-block;
  17. color: #9b9b9b;
  18. font-size: 12px;
  19. "
  20. >
  21. {{ item.commentInfo.gmtCreater }}
  22. </div>
  23. <p
  24. style="
  25. font-size: 14px;
  26. color: #333b4a;
  27. margin: 0 0 25px 0;
  28. white-space: pre-line;
  29. "
  30. >
  31. {{ item.commentInfo.content }}
  32. </p>
  33. </div>
  34. <el-input
  35. v-model="commentContent"
  36. type="textarea"
  37. placeholder="请输入评论内容"
  38. maxlength="1000"
  39. show-word-limit
  40. :autosize="{ minRows: 3, maxRows: 5 }"
  41. style="margin-bottom: 2%"
  42. />
  43. <el-button
  44. type="primary"
  45. size="small"
  46. style="float: right"
  47. @click="$emit('addComment', commentContent, callback)"
  48. >
  49. 发表评论
  50. </el-button>
  51. </div>
  52. </el-tab-pane>
  53. <el-tab-pane label="变更记录" name="Logs">
  54. <div v-for="(item,index) in changeRecord" :key="index" class="Layout_space_between sign-record">
  55. <span>
  56. <span class="operatorName">{{ item.operator }} : </span>
  57. <span class="remark">{{ item.remark }}</span>
  58. </span>
  59. <span class="createTime">{{ item.createTime }}</span>
  60. </div>
  61. </el-tab-pane>
  62. </el-tabs>
  63. </div>
  64. </template>
  65. <script>
  66. import '@/styles/PublicStyle/index.scss'
  67. export default {
  68. props: {
  69. comments: {
  70. type: Array,
  71. required: false,
  72. default: () => []
  73. },
  74. changeRecord: {
  75. type: Array,
  76. required: false,
  77. default: () => []
  78. }
  79. },
  80. data() {
  81. return {
  82. activeName: 'Comments',
  83. commentContent: ''
  84. // comments: [
  85. // {
  86. // child: [],
  87. // commentInfo: {"id":11529,"joinId":4721,"bizId":null,"type":3,"fatherId":0,"name":"文博","email":"wenbobowen","content":"test111","gmtCreater":"2020-12-31 15:03:37","gmtModify":"2020-12-31 15:03:37"}
  88. // },
  89. // {
  90. // child: [],
  91. // commentInfo: {"id":11529,"joinId":4721,"bizId":null,"type":3,"fatherId":0,"name":"文博","email":"wenbobowen","content":"test222","gmtCreater":"2020-12-31 15:03:37","gmtModify":"2020-12-31 15:03:37"}
  92. // }
  93. // ],
  94. // changeRecord: [
  95. // {
  96. // createTime: "2020-12-29 13:48:55",
  97. // operator: "廖子君",
  98. // remark: "更新了任务状态,从【已准出】到【已上线】"
  99. // },
  100. // {
  101. // createTime: "2020-12-29 13:48:55",
  102. // operator: "廖子君",
  103. // remark: "更新了任务状态,从【已准出】到【已上线】"
  104. // },
  105. // {
  106. // createTime: "2020-12-29 13:48:55",
  107. // operator: "廖子君",
  108. // remark: "更新了任务状态,从【已准出】到【已上线】"
  109. // }
  110. // ]
  111. }
  112. },
  113. methods: {
  114. changeTabs(e) {
  115. console.log(e)
  116. },
  117. callback() {
  118. console.log('chengg')
  119. this.commentContent = ''
  120. }
  121. }
  122. }
  123. </script>
  124. <style scoped lang="scss">
  125. .actionDynamic {
  126. padding: 0px 30px 20px 30px;
  127. .Comments {
  128. padding: 0 34px 20px 34px;
  129. }
  130. }
  131. .sign-record {
  132. margin: 20px 0;
  133. font-size:14px;
  134. line-height:20px;
  135. opacity:1;
  136. font-family:PingFangSC-Regular;
  137. }
  138. .createTime {
  139. min-width:150px;
  140. color:rgba(68,68,68,1);
  141. }
  142. .remark {
  143. min-width:500px;
  144. text-align: left;
  145. color:#444444;
  146. }
  147. .operatorName {
  148. min-width: 60px;
  149. color:rgba(51,59,74,1);
  150. margin-right: 10px;
  151. }
  152. </style>