AI销管
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ScoringPlaylist.vue 5.3 KiB

2年前
1年前
2年前
1年前
2年前
2年前
2年前
2年前
2年前
1年前
2年前
2年前
2年前
1年前
2年前
1年前
2年前
1年前
2年前
1年前
2年前
1年前
2年前
1年前
2年前
1年前
2年前
1年前
2年前
1年前
2年前
1年前
2年前
1年前
2年前
1年前
2年前
1年前
2年前
1年前
2年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <template>
  2. <view class="translation">
  3. <view class="cont-box" v-for="(item, index) in listarr" :key="index"
  4. @click="toaidoinfo(item.Content, item.corpusId, item.index)">
  5. <view class="top-cont">
  6. <view style="width: 26rpx; height: 36rpx; margin-top: 4rpx">
  7. <image style="width: 26rpx; height: 28rpx" src="../../static/images/testimg.png" mode=""></image>
  8. </view>
  9. <view v-html="item.Content.onebest"
  10. style="color: #666666;font-size: 28rpx;line-height: 36rpx;margin-left: 10rpx;width: 80%;"></view>
  11. <view style="font-size: 28rpx; width: 10%; width: 14%; text-align: right">{{ item.Content.time }}</view>
  12. </view>
  13. <!-- 1 客户画像 2销讲词 3违禁 4 需求挖掘 -->
  14. <view class="newmark" v-if="item.Content.types">
  15. <view class="mark-item" v-for="(subitem,i) in dealTypes(item.Content.types)" :key="i">
  16. <image v-if="dealword(subitem)[0]==1" class="markicon"
  17. src="https://static.quhouse.com/37e0de3f8d1c421dac8bf699d5e7992d.png"></image>
  18. <image v-if="dealword(subitem)[0]==2" class="markicon"
  19. src="https://static.quhouse.com/b106e8e75db24a59a579a15a78830a76.png"></image>
  20. <image v-if="dealword(subitem)[0]==3" class="markicon"
  21. src="https://static.quhouse.com/8443a2ecb81d4639991ab29c422e9949.png"></image>
  22. <image v-if="dealword(subitem)[0]==4" class="markicon"
  23. src="https://static.quhouse.com/1cd794cb6c974d9dad948a6dd444518b.png"></image>
  24. <view class="marktext" :style="dealword(subitem)[0]==3?'color:#E7483C':'color:#3E50E8'">
  25. {{dealword(subitem)[1]}}
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. var util = require("../../utils/util.js");
  34. var config = require("../../config");
  35. export default {
  36. data() {
  37. return {
  38. customerId: '',
  39. listarr: [],
  40. id: '',
  41. type: '',
  42. tipsFncName: '', // 提醒页面变更的值
  43. from: '', // 标记需要刷新的来源
  44. };
  45. },
  46. onLoad(options) {
  47. this.customerId = options.customerId;
  48. this.id = options.id;
  49. this.type = options.type;
  50. if (options.UpDateEvent) this.tipsFncName = options.UpDateEvent
  51. if (options.from) this.from = options.from
  52. this.searchinfo()
  53. },
  54. methods: {
  55. // 对话加命中标签
  56. dealTypes(type) {
  57. if (type) {
  58. let tem = type.substring(1).split(',')
  59. return tem
  60. } else {
  61. return []
  62. }
  63. },
  64. // 对话加命中标签
  65. dealword(type) {
  66. if (type) {
  67. let a = type.split('-')
  68. let rest = type.substring(2).split('-').join(',')
  69. let arr = [a[0], rest]
  70. return arr
  71. } else {
  72. return []
  73. }
  74. },
  75. formatTime(num) {
  76. //格式化时间格式
  77. num = num.toFixed(0);
  78. let second = num % 60;
  79. if (second < 10) second = '0' + second;
  80. let min = Math.floor(num / 60);
  81. if (min < 10) min = '0' + min;
  82. return min + ":" + second;
  83. },
  84. //搜索
  85. searchinfo() {
  86. let parames = {
  87. marketingId: this.id,
  88. customerId: this.customerId,
  89. type: this.type
  90. }
  91. this.$u.post("/corpus/pinWordMatching", parames).then(res => {
  92. res.forEach(item => {
  93. item.Content = JSON.parse(item.transferContent)
  94. })
  95. res.forEach(cet => {
  96. cet.Content.time = this.formatTime(cet.Content.bg / 1000)
  97. })
  98. this.listarr = res;
  99. })
  100. },
  101. //跳转
  102. toaidoinfo(item, id, index) {
  103. item.customerId = this.customerId;
  104. item.id = id;
  105. item.index = index;
  106. this.infostust(item)
  107. },
  108. //只有一条的时候
  109. infostust(item) {
  110. console.log("zobudao")
  111. let d = JSON.parse(JSON.stringify([item]))
  112. d[0].onebest = "";
  113. console.log(d)
  114. const parames = {
  115. pageNum: 1,
  116. pageSize: 100,
  117. query: {
  118. customerId: this.customerId,
  119. }
  120. }
  121. this.$u.post("/corpus/findByPage", parames).then(res => {
  122. uni.setStorageSync("entrance", 2); //写入缓存
  123. uni.setStorageSync("searchobj", d[0]); //写入缓存
  124. if (res[0].merge == 0) {
  125. let newobj = res[0];
  126. if (this.tipsFncName) {
  127. uni.$emit(this.tipsFncName, d[0])
  128. uni.$emit('newobjStatus', newobj.status)
  129. uni.navigateBack()
  130. return
  131. }
  132. if (this.from == 'consumerDetail') {
  133. uni.navigateTo({
  134. url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}&refresh=true`
  135. })
  136. }
  137. uni.navigateTo({
  138. url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}`
  139. })
  140. } else {
  141. let newobj = res[0];
  142. uni.navigateTo({
  143. url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}`
  144. })
  145. }
  146. })
  147. },
  148. },
  149. }
  150. </script>
  151. <style lang="scss" scoped>
  152. .translation {
  153. width: 100%;
  154. padding: 0 30rpx;
  155. .cont-box {
  156. width: 100%;
  157. margin-bottom: 20rpx;
  158. .top-cont {
  159. display: flex;
  160. border-bottom: 1px solid #e0e0e0;
  161. }
  162. .newmark {
  163. margin-top: 20rpx;
  164. padding-left: 30rpx;
  165. .mark-item {
  166. display: flex;
  167. flex-wrap: wrap;
  168. margin-bottom: 12rpx;
  169. .markicon {
  170. width: 30rpx;
  171. height: 30rpx;
  172. margin-right: 12rpx;
  173. }
  174. .marktext {
  175. flex: 1;
  176. font-size: 24rpx;
  177. font-family: PingFangSC-Regular, PingFang SC;
  178. font-weight: 400;
  179. color: #3E50E8;
  180. min-height: 30rpx;
  181. line-height: 30rpx;
  182. }
  183. }
  184. }
  185. }
  186. }
  187. </style>