AI销管
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ScoringPlaylist.vue 2.8 KiB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view class="translation">
  3. <view style="width: 690rpx;margin: 0 auto;margin-top: 10rpx;">
  4. <view style="width: 100%;border-bottom: 1px solid #E0E0E0;display: flex;padding-bottom: 10rpx;margin-top: 40rpx;"
  5. v-for="(item,index) in listarr" :key='index' @click="toaidoinfo(item.Content,item.corpusId,item.index)">
  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" style="color: #666666;font-size: 28rpx;line-height: 36rpx;margin-left: 10rpx;width: 80%;"></view>
  10. <view style="font-size: 28rpx;width: 10%;width: 14%;text-align: right;">{{item.Content.time}}</view>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. var util = require("../../../utils/util.js");
  17. var config = require("../../../config");
  18. export default {
  19. data() {
  20. return {
  21. customerId:'',
  22. listarr:[],
  23. id:'',
  24. };
  25. },
  26. onLoad: function(options) {
  27. this.customerId = options.customerId;
  28. this.id=options.id;
  29. this.searchinfo()
  30. },
  31. onShow() {
  32. this.$store.commit('stopAduio')
  33. },
  34. methods: {
  35. formatTime(num) {
  36. //格式化时间格式
  37. num = num.toFixed(0);
  38. let second = num % 60;
  39. if (second < 10) second = '0' + second;
  40. let min = Math.floor(num / 60);
  41. if (min < 10) min = '0' + min;
  42. return min + ":" + second;
  43. },
  44. //搜索
  45. searchinfo(){
  46. let parames={
  47. marketingId:this.id,
  48. customerId:this.customerId
  49. }
  50. this.$u.post("/corpus/pinWordMatching", parames).then(res => {
  51. res.forEach(item=>{
  52. item.Content=JSON.parse(item.transferContent)
  53. })
  54. res.forEach(cet=>{
  55. cet.Content.time=this.formatTime(cet.Content.bg/1000)
  56. })
  57. this.listarr=res;
  58. })
  59. },
  60. //跳转
  61. toaidoinfo(item,id,index){
  62. item.customerId=this.customerId;
  63. item.id=id;
  64. item.index=index;
  65. this.infostust(item)
  66. },
  67. //只有一条的时候
  68. infostust(item){
  69. console.log("zobudao")
  70. let d = JSON.parse(JSON.stringify([item]))
  71. d[0].onebest=""
  72. const parames = {
  73. pageNum: 1,
  74. pageSize: 100,
  75. query: {
  76. customerId: this.customerId,
  77. }
  78. }
  79. this.$u.post("/corpus/findByPage", parames).then(res => {
  80. if(res[0].merge==0){
  81. let newobj = res[0];
  82. uni.navigateTo({
  83. url: `/pages/main/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}`
  84. })
  85. }else{
  86. let newobj = res[0];
  87. uni.navigateTo({
  88. url: `/pages/main/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}`
  89. })
  90. }
  91. })
  92. },
  93. },
  94. }
  95. </script>
  96. <style lang="scss" scoped>
  97. </style>