live.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <view class="live">
  3. <view class="top">
  4. </view>
  5. <view class="head">
  6. <span class="cuIcon-back" @click="back"></span>
  7. <view class="case">
  8. 实况记录
  9. </view>
  10. </view>
  11. <view class="list">
  12. <view class="car_data">
  13. <view class="fat" v-for="item in form" :key="item.id">
  14. <view class="fat_title">{{item.name}}</view>
  15. <view class="sun" v-for="row in item.categoryList" :key="row.id">
  16. {{row.name}}
  17. <span>{{row.names}}</span>
  18. </view>
  19. </view>
  20. </view>
  21. <!-- 备注信息 -->
  22. <view class="car_data">
  23. <view class="fat">
  24. <view class="fat_title">备注信息</view>
  25. <view class="message" v-for="item in historyList" :key="item.id">
  26. <view class="top">
  27. <view class="left">
  28. <view class="img">
  29. <image :src="item.logo" mode=""></image>
  30. </view>
  31. <view class="name">
  32. {{item.merchantName}}<br/>
  33. <span>{{item.createTime}}</span>
  34. </view>
  35. </view>
  36. <view class="play">
  37. <image src="/static/play.png" mode=""></image><br/>
  38. 12.03
  39. </view>
  40. </view>
  41. <view class="content">
  42. {{item.msgContent}}
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. export default {
  52. data() {
  53. return {
  54. taskId: 1,
  55. form: [],
  56. historyList: [{
  57. time: '2025.2.12 13:22:30',
  58. url: 'https://pic.rmb.bdstatic.com/bjh/news/9e4e3aca4eb384cf0ad43e26cae97135.jpeg',
  59. name: '用户昵称',
  60. content: '额外强制消费',
  61. type: 1,
  62. }, ],
  63. }
  64. },
  65. methods: {
  66. //返回
  67. back() {
  68. uni.navigateBack({
  69. delta: 1
  70. });
  71. },
  72. getLive() {
  73. console.log(this.taskId)
  74. this.$http.get("/merchant/localTsCustomerServiceDict/list?taskId=" + this.taskId + '&source=' + '1').then(
  75. res => {
  76. if (res.data.code == 200) {
  77. this.form = res.data.result
  78. console.log(this.form)
  79. this.form.forEach(item => {
  80. item.categoryList.forEach(row => {
  81. const idSet = new Set(row.idList);
  82. // Find the names that match the ids in idList
  83. const matchedNames = row.itemList
  84. .filter(item => idSet.has(item.id)) // Filter items where the id matches
  85. .map(item => item.name) // Extract the name from the matching items
  86. .join(','); // Join names with commas
  87. // Assign the concatenated names to the row
  88. row.names = matchedNames;
  89. })
  90. })
  91. }
  92. })
  93. },
  94. getHistroyList() {
  95. let data = {
  96. taskId: this.taskId
  97. }
  98. this.$http.post('/merchant/localTsCustomerServiceTaskMsg/queryList',data).then((res) => {
  99. console.log(res);
  100. this.historyList = res.data.result
  101. })
  102. },
  103. },
  104. onLoad(options) {
  105. this.taskId = options.taskId
  106. },
  107. mounted() {
  108. this.getLive()
  109. this.getHistroyList()
  110. }
  111. }
  112. </script>
  113. <style lang="scss" scoped>
  114. .live {
  115. width: 100vw;
  116. height: 100vh;
  117. background: #F8F8FA;
  118. display: flex;
  119. flex-direction: column;
  120. // overflow-y: auto;
  121. /*#ifdef APP-PLUS*/
  122. .top {
  123. width: 100%;
  124. height: var(--status-bar-height);
  125. background: #FFFFFF;
  126. }
  127. /*#endif*/
  128. .head {
  129. width: 100%;
  130. height: 112rpx;
  131. padding: 20rpx;
  132. display: flex;
  133. align-items: center;
  134. background: #FFFFFF;
  135. position: relative;
  136. .cuIcon-back {
  137. font-size: 40rpx;
  138. margin-right: 40rpx;
  139. }
  140. .case {
  141. position: absolute;
  142. left: 50%;
  143. transform: translateX(-50%);
  144. font-size: 36rpx;
  145. font-weight: 600;
  146. }
  147. }
  148. .list {
  149. flex: 1;
  150. overflow-y: auto;
  151. background: #F7F7F7;
  152. padding: 24rpx 30rpx;
  153. .car_data {
  154. width: 100%;
  155. .fat {
  156. background: #FFFFFF;
  157. padding: 20rpx;
  158. margin-bottom: 20rpx;
  159. border-radius: 10rpx;
  160. .fat_title {
  161. font-weight: 600;
  162. font-size: 30rpx;
  163. color: #333333;
  164. margin-bottom: 20rpx;
  165. }
  166. .sun {
  167. width: 100%;
  168. height: 73rpx;
  169. border-bottom: 1px solid #eee;
  170. display: flex;
  171. align-items: center;
  172. justify-content: space-between;
  173. font-size: 28rpx;
  174. color: #666666;
  175. span {
  176. color: #181818;
  177. }
  178. }
  179. .message{
  180. border-bottom: 1px solid #eee;
  181. padding-bottom: 16rpx;
  182. margin-bottom: 16rpx;
  183. .top{
  184. width: 100%;
  185. display: flex;
  186. align-items: center;
  187. justify-content: space-between;
  188. margin-bottom: 12rpx;
  189. .left{
  190. display: flex;
  191. align-items: center;
  192. .img{
  193. width: 68rpx;
  194. height: 68rpx;
  195. border-radius: 8rpx;
  196. overflow: hidden;
  197. margin-right: 12rpx;
  198. image{
  199. width: 100%;
  200. height: 100%;
  201. }
  202. }
  203. .name{
  204. font-size: 28rpx;
  205. color: #000000;
  206. span{
  207. font-size: 24rpx;
  208. color: #999999
  209. }
  210. }
  211. }
  212. .play{
  213. font-size: 24rpx;
  214. color: #000000;
  215. text-align: center;
  216. image{
  217. width: 40rpx;
  218. height: 40rpx;
  219. }
  220. }
  221. }
  222. .content{
  223. font-size: 26rpx;
  224. }
  225. }
  226. }
  227. }
  228. }
  229. }
  230. </style>