25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1957 lines
53 KiB

  1. <template>
  2. <view class="box">
  3. <view class="headbox">
  4. <!-- 顶部时间 -->
  5. <view class="headboxhead">
  6. <view class="boxhead1">{{date}}</view>
  7. <view class="boxhead2" v-if="jiaoseshow">
  8. <image v-if="status==1" @click="tappick()" src="../../static/images/pike.png" mode=""></image>
  9. <image v-if="status==0" @click="notappick()" src="../../static/images/nopike.png" mode=""></image>
  10. </view>
  11. </view>
  12. <!-- <view class="inputbox" v-if="guanjianciishow">
  13. <view class="thisinput" @click="toKeywordsearch()">
  14. 请输入或选择
  15. </view>
  16. </view> -->
  17. <!-- 标记顾问 -->
  18. <view class="headboxbott">
  19. <view class="headovfu">
  20. <u-tabs-swiper ref="tabs" font-size="30" :bold="true" swiper-width="600" :current="roleindex" @change="tapspagek()"
  21. inactive-color="#b1b1b1" active-color="#008ef2" :list="tablist" :is-scroll="true">
  22. </u-tabs-swiper>
  23. </view>
  24. <view class="headpade">
  25. <view class="biaoji" @tap="tagtap()">标记</view>
  26. </view>
  27. </view>
  28. </view>
  29. <scroll-view :scroll-top="scrollTop" lower-threshold='100px' @scrolltolower="ltolower()"
  30. upper-threshold='40px' @scrolltoupper="rolltoupper()"
  31. :scroll-into-view="scrollId" scroll-y="true" class="zhuti text scroll-Y">
  32. <!-- 聊天记录-->
  33. <view class="dialog-block" v-for="(dialog,i) in dialogList" :key="i">
  34. <view :id="'dialog'+i" class="fileName">录音文件</view>
  35. <view class="text" :id="'dialog'+csdFileindex+'text'+item.bg"
  36. :class="{active: item.bg < playNow && item.ed > playNow && i==0}"
  37. v-for="(item,index) in dialog.message" :key="index" :data-speaker="item.speaker">
  38. <view class="avatar">
  39. <view v-if="item.speaker == 1" style="color: #60CBEC;">
  40. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  41. <text v-else>A</text>
  42. </view>
  43. <view v-if="item.speaker == 2" style="color: #EC8B47;">
  44. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  45. <text v-else>B</text>
  46. </view>
  47. <view v-if="item.speaker == 3" style="color: #4F861E;">
  48. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  49. <text v-else>C</text>
  50. </view>
  51. <view v-if="item.speaker == 4" style="color: #9F61C8;">
  52. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  53. <text v-else>D</text>
  54. </view>
  55. <view v-if="item.speaker == 5" style="color: #4980C8;">
  56. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  57. <text v-else>E</text>
  58. </view>
  59. <view v-if="item.speaker == 6" style="color: #60CBEC;">
  60. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  61. <text v-else>F</text>
  62. </view>
  63. <view v-if="item.speaker == 7" style="color: #EC8B47;">
  64. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  65. <text v-else>G</text>
  66. </view>
  67. <view v-if="item.speaker == 8" style="color: #4F861E;">
  68. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  69. <text v-else>H</text>
  70. </view>
  71. <view v-if="item.speaker == 9" style="color: #9F61C8;">
  72. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  73. <text v-else>I</text>
  74. </view>
  75. </view>
  76. <view class="content">
  77. <view @longpress="changanxiaoguo(item,index,i)" v-html="item.onebest"></view>
  78. <view class="tankuangcss" v-if="item.isshow">
  79. <view @click="clickcopy()"
  80. style="width: 60rpx;font-size: 24rpx;text-align: center;margin-left: 24rpx;">复制
  81. </view>
  82. <view @click="Oftenthewrongword()"
  83. style="width: 80rpx;font-size: 24rpx;text-align: center;margin-left: 22rpx;">常错词
  84. </view>
  85. <view v-if="jiaoseshow" @click="Addtheessence()"
  86. style="width: 80rpx;font-size: 24rpx;text-align: center;margin-left: 22rpx;">加精华
  87. </view>
  88. <view @click="clickbofang(dialog.backindex,item)"
  89. style="width: 80rpx;font-size: 24rpx;text-align: center;margin-left: 14rpx;">播放
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </scroll-view>
  96. <view class="bottombox">
  97. <!-- 播放块 -->
  98. <view class="bottomhead">
  99. <view class="audio-play" @tap="changePlayState">
  100. <image class="image" mode="widthFix"
  101. :src="audioPlay ? 'https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/pause.png' : 'https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/play.png'">
  102. </image>
  103. </view>
  104. <view class="audio-slider">
  105. <view class="audio-time">
  106. <text>{{currentTimeStr}}</text>
  107. </view>
  108. <slider class="slider" min="0" :max="sliderMax"
  109. @change="sliderChangeComplate" block-size="14" :value="sliderValue" activeColor="blue"></slider>
  110. <view class="audio-time">
  111. <text>{{timeStr}}</text>
  112. </view>
  113. </view>
  114. </view>
  115. <!-- 底部弹框 -->
  116. <view class="botbotmm">
  117. <view class="tmmchen" @click="guanjiancishifo()">
  118. <image src="../../static/images/audioinfo1.png" mode=""></image>
  119. <view>关键词</view>
  120. </view>
  121. <view class="fill"></view>
  122. <view class="tmmchen" @click="Receivedetailsabouttab('intention')">
  123. <image src="../../static/images/audioinfo3.png" mode=""></image>
  124. <view>客户意向</view>
  125. </view>
  126. <view class="fill"></view>
  127. <view class="tmmchen" @click="Receivedetailsabouttab('Pinspeak')">
  128. <image src="../../static/images/audioinfo4.png" mode=""></image>
  129. <view>销讲执行</view>
  130. </view>
  131. <view class="fill"></view>
  132. <view class="tmmchen" @click="Receivedetailsabouttab('Receivedetailsabout')">
  133. <image src="../../static/images/audioinfo2.png" mode=""></image>
  134. <view>接待信息</view>
  135. </view>
  136. </view>
  137. </view>
  138. <!-- 标记 -->
  139. <view class="zhezhoa" v-if="biojiisshow" @tap="unmarktap()"></view>
  140. <view class="bounced" v-if="biojiisshow">
  141. <view class="jiajinghuatit">标记为顾问</view>
  142. <view style="width: 95%;display: flex;flex-wrap: wrap;margin: 0 auto;padding-top: 30rpx;padding-bottom: 30rpx;">
  143. <view class="viewclace" :class="roleindexbiaoji == index ? 'bosdttom' : ''"
  144. @click="biaojixuanze(index)" v-for="(item,index) in tablist.slice(1,tablist.length)" :key="index">
  145. <view>{{item.name}}</view>
  146. </view>
  147. </view>
  148. <view class="bounced3" style="margin-top: 20rpx;">
  149. <view class="bounced3-1" @tap="unmarktap()">取消</view>
  150. <view class="bounced3-2" @tap="Confirmthetag()">确认</view>
  151. </view>
  152. </view>
  153. <!-- 加入常错词 -->
  154. <view class="zhezhoa" v-if="isshow2" @tap="Cancelout"></view>
  155. <view class="bounced" v-if="isshow2">
  156. <view class="tian-view">
  157. <viwe class="tian-view-t1"></viwe>
  158. <viwe class="tian-view-t2">常错词:</viwe>
  159. <viwe class="tian-view-t3">
  160. <input type="text" v-model="thewrongword" class="tian-input" placeholder="请输入" />
  161. </viwe>
  162. </view>
  163. <view class="tian-view">
  164. <viwe class="tian-view-t1"></viwe>
  165. <viwe class="tian-view-t2">正确词:</viwe>
  166. <viwe class="tian-view-t3">
  167. <input class="tian-input" v-model="reswrongword" type="text" placeholder="请输入" />
  168. </viwe>
  169. </view>
  170. <view class="bounced3">
  171. <view class="bounced3-1" @tap="Cancelout">取消</view>
  172. <view class="bounced3-2" @tap="Confirmtheexit">确认</view>
  173. </view>
  174. </view>
  175. <!-- 加精华 -->
  176. <view class="zhezhoa" v-if="isshow3" @tap="Cancelout2"></view>
  177. <view class="bounced" v-if="isshow3">
  178. <view class="jiajinghuatit">加精华</view>
  179. <view style="width: 100%;text-indent: 20rpx;font-size: 28rpx;">选择标签</view>
  180. <view class="jiajinghuaview">
  181. <view class="jighuaview2" v-for="(item,index) in biaoqianlist" :key="index"
  182. :class="biaoqianindex == index ? 'biaoqiantom' : ''">
  183. <view class="view1-text" @click="tapbiaoqianclisck(index)">{{item.name}}</view>
  184. </view>
  185. </view>
  186. <view class="bounced3">
  187. <view class="bounced3-1" @tap="Cancelout2">取消</view>
  188. <view class="bounced3-2" @tap="Confirmtheexit2">确认</view>
  189. </view>
  190. </view>
  191. <!-- 接待详情 -->
  192. <view class="zhezhoa" @click="clenReceivedetailsabout()" v-if="Receivedetailsabout"></view>
  193. <view class="followingpop-up" v-if="Receivedetailsabout">
  194. <view class="guanbibox">
  195. <view class="guanbixen">
  196. <image @click="clenReceivedetailsabout()" src="../../static/images/Shutdown.png" mode=""></image>
  197. </view>
  198. <view class="cenisboxtab">
  199. <view class="cenisboxtabview">
  200. <view>接待详情</view>
  201. </view>
  202. </view>
  203. </view>
  204. <view class="cenisbox">
  205. <view style="width: 96%;height: 26rpx;display: flex;margin: 0 auto; margin-top: 40rpx;align-items: center;">
  206. <view style="width: 25%;color: #666666;font-size: 26rpx;">接待顾问</view>
  207. <view style="width: 75%;color: #333333;font-size: 26rpx;">{{userlistobj.agentName}}</view>
  208. </view>
  209. <view style="width: 96%;height: 26rpx;display: flex;margin: 0 auto; margin-top: 40rpx;align-items: center;">
  210. <view style="width: 25%;color: #666666;font-size: 26rpx;">意向楼盘</view>
  211. <view style="width: 75%;color: #333333;font-size: 26rpx;">{{userlistobj.projectName}}</view>
  212. </view>
  213. <view style="width: 96%;height: 26rpx;display: flex;margin: 0 auto; margin-top: 40rpx;align-items: center;">
  214. <view style="width: 25%;color: #666666;font-size: 26rpx;">接待开始时间</view>
  215. <view style="width: 75%;color: #333333;font-size: 26rpx;">{{userlistobj.staTime}}</view>
  216. </view>
  217. <view style="width: 96%;height: 26rpx;display: flex;margin: 0 auto; margin-top: 40rpx;align-items: center;">
  218. <view style="width: 25%;color: #666666;font-size: 26rpx;">接待结束时间</view>
  219. <view style="width: 75%;color: #333333;font-size: 26rpx;">{{userlistobj.endTime1}}</view>
  220. </view>
  221. <view style="width: 96%;height: 26rpx;display: flex;margin: 0 auto; margin-top: 40rpx;align-items: center;">
  222. <view style="width: 25%;color: #666666;font-size: 26rpx;">录音时长</view>
  223. <view style="width: 75%;color: #333333;font-size: 26rpx;">{{userlistobj.mm}}分钟</view>
  224. </view>
  225. </view>
  226. </view>
  227. <!-- 销讲执行 -->
  228. <view class="zhezhoa" @click="clenReceivedetailsabout()" v-if="Pinspeak"></view>
  229. <view class="followingpop-up" v-if="Pinspeak">
  230. <view class="guanbibox">
  231. <view class="guanbixen">
  232. <image @click="clenReceivedetailsabout()" src="../../static/images/Shutdown.png" mode=""></image>
  233. </view>
  234. <view class="cenisboxtab">
  235. <view class="cenisboxtabview">
  236. <view>销讲执行</view>
  237. </view>
  238. </view>
  239. </view>
  240. <view class="cenisbox">
  241. <!-- 评分模块 -->
  242. <view class="rate-box">
  243. <view class="title">总执行率 {{totalRate}}%</view>
  244. <view v-for="(item,index) in ratelist" :key="index" class="u-m-b-14" style="margin-top: 30rpx;">
  245. <view class="level1">
  246. <view class="level-name u-line-1">
  247. {{item.name}}
  248. </view>
  249. <view class="level-progress">
  250. <view class="color" :style="{width: item.ratepercent/item.rate*100+'%'}"></view>
  251. </view>
  252. <view class="level-rate">{{((item.ratepercent/item.rate).toFixed(2)*100).toFixed()}}%</view>
  253. <image v-if="!item.show" class="arrow rotatearrow" @click="changeshow(item,1)"
  254. src="/static/images/down.png" mode="" />
  255. <image v-else class="arrow" @click="changeshow(item,0)" src="/static/images/up.png"
  256. mode="" />
  257. </view>
  258. <view class="level1-subbox" v-if="item.show">
  259. <view class="sub-name" v-for="(subitem,i) in item.children" :key="i">
  260. <view class="subitem-name u-line-1">{{subitem.name}}</view>
  261. <image class="checkimg" v-if="!subitem.selected"
  262. src="/static/images/rate-checked.png" mode="" />
  263. <image class="checkimg" v-else src="/static/images/rate-nocheck.png" mode="" />
  264. </view>
  265. </view>
  266. </view>
  267. </view>
  268. </view>
  269. </view>
  270. <!-- 客户意向 -->
  271. <view class="zhezhoa" @click="clenReceivedetailsabout()" v-if="intention"></view>
  272. <view class="followingpop-up" v-if="intention">
  273. <view class="guanbibox">
  274. <view class="guanbixen">
  275. <image @click="clenReceivedetailsabout()" src="../../static/images/Shutdown.png" mode=""></image>
  276. </view>
  277. <view class="cenisboxtab">
  278. <view class="cenisboxtabview">
  279. <view>客户意向</view>
  280. </view>
  281. </view>
  282. </view>
  283. <view class="cenisbox">
  284. <view style="width: 100%;height: 100%;text-align: center;margin-top: 200rpx;" v-if="Acquirecustomerintentlist.length==0">
  285. 暂无数据
  286. </view>
  287. <view class="jianbox" v-if="Acquirecustomerintentlist.length!=0" v-for="(item,index) in Acquirecustomerintentlist" :key='index'>
  288. <view class="jianbox-cen">
  289. <view class="jianboxtext">{{item.name}}</view>
  290. <view class="jianboxjian" @click="Acquishow(index)">
  291. <image v-if="item.isshow==false" class="jiantop" src="../../static/images/jiantop.png" mode=""></image>
  292. <image v-if="item.isshow==true" class="jiantop1" src="../../static/images/jianbutton.png" mode=""></image>
  293. </view>
  294. </view>
  295. <view class="bioqianwayl" v-if="item.isshow==true">
  296. <view :class="chend.selected == 0 ? 'jiangshang' : ''"
  297. v-for="(chend,i) in item.children" :key='i' @click="Edittag(item,chend,index,i)">{{chend.text}}</view>
  298. </view>
  299. </view>
  300. </view>
  301. </view>
  302. </view>
  303. </template>
  304. <script>
  305. var util = require("../../utils/util.js");
  306. var config = require("../../config");
  307. export default {
  308. data() {
  309. return {
  310. guanjianciishow:false,
  311. Aimg: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAACqVBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/f3////9/f39/f3////////9/f3////////////9/f3////9/f39/f3////9/f3////////9/f3////9/f3////////////////9/f39/f3////////9/f39/f3////9/f39/f3////////9/f39/f3////////9/f39/f39/f3////////////////+/v7+/v7////+/v7////+/v7////+/v7+/v7////////+/v7+/v7////+/v7////+/v7////////////////////////////+/v7////+/v7////+/v7+/v7////////////+/v7////+/v7////+/v7+/v7////////+/v7////+/v7////////+/v7////////+/v7////+/v7+/v7+/v7////////+/v7+/v7////+/v7+/v7////+/v7////+/v7////+/v7////+/v7+/v7////+/v7+/v7////+/v7////+/v7////+/v7+/v7////+/v5jdC9iAAAA4nRSTlMAAQIDBAUGBwgLDA0ODxARExQVFhgbHB4fICEiIyQmJygpKy4wMTIzNDY3ODk6Oz0+P0BBQkRGR0lKTE5PUFFTVFVXWFlcXV9gYWJjZWZnaGlqa2xtbm9wcXJzdHV2d3h6e319foGBgoODh4mKiouMjI2QkZKSk5OUlpeYmZmam5ycnZ+foKGio6SmqKmpq6yur7CwsbGytba5uru8wMDBwcLCw8XGx8jJysrLzM7P0dLT1dXW1tfY2drc3N7f4OHh5Obm5+jp6uvs7vDx8vLz8/T09fX29/f4+fn6+vz8/f7+RVDt+wAAA55JREFUGBntwf9/1HMAB/DX7XYbuXWV1cyMoixfugrRGNXytW33pbVdJ83XkiMLSb4LJd/zZUi0SKT5FmGS77HUVaixnHP2+kt8vt3Zbp/3+7P3XR5+8XziP1E4uiYcrh1bjMNi6NzXumnoeX3eSOSrpHUv+zi0ogJ5qd3JLN1XuJGzwqW0sW4oclT0Im19XIqcuNdQ4D0vcnEDhdYgB2f+SbFZUHbEdkrsLYeqFko9CEVH7qJUohxqLqODO6BmLR18XwAVRQfpZDxUnExHjVBRR0eroGIZHX0AFe10tA8qdtNZIRR00VEPVLxLRzuh4jk62gIVy+joSaiI0tECqPDT0blQ4f6RDpI+KHmYDjZBzWQ6aIaibZSK+6BoOqViUOXqoER8BJSdlqJYFDm4h0LveJAD7+cUiFciJ1U/01aiGjk65zfaSF6EnE3azQEO1iAPFZuZZes45MUT3cM+emLFyNfwK3fQ8k1sFA6L0cElTzx9d1OVC/8bNG/gzY+GQaKk461gCQZr8iMHSNZD4nySv6wYj0EYFv2UhqcgcTsN70ePhtzER3+lJe6BxXP9jTctvrl1yS1jkLaNlkTbBR6IlF3dyT78sHh+oqkSlrJe/uOH1jGw4apem2I/1yLtGRo6kRZiP73t57mQxb+Z2dqRdikNtyLtBWb78Cz05bomyQH+KIGljIYaWNxxDtC72ouMgsdpZzosHhqqYDmFdraOQNpttHUfLKU0TITlKtra6IZpCu3tgMVPQx0sG2ivDqaVFDgOppk0LIbJm6C9DTB1UCAMU4SGZ2GqocAumL6jQBtMMRq2wLScAik3dMV/UWB/EQwrafgSpk6KlEJ3LIXOgGE9DQdgqKDQSdBNoNAiGL6i6SjowhSaAt1UCm2CzpOk6QTonqfQJdBdSKGkD5pKWqZCU7iHQtdB10KxWmjOpqUJmtMp9gB091LsIWiCtCyFZiHFXoZuHcW+hiZGy0vQvE2xT6DbTolKAI/R8hmA4SmKdUG3jxIhAG/QkigAZlAi6QJQTJk2AF1MGwXcRRkfgJGU2V8EHzP8wBeUqQQwllKTcCozpuFESk0AMJNSC3AxM8KYT6lpAFootRGLmLEQ6ynVCCBAqcSQ1cy4f8ghSs0HcMzvlKp+lRmvVFMqNQ6aaIoyd3Yy49vllOmuh+H4WZFIpFnTpJmjadTM1oQ1oVAgFNQENA0N9f01BIKh8OzGOU3NkbmXzwuV41/wNztgHKhu7WKTAAAAAElFTkSuQmCC",
  312. tablist:[],
  313. roleindex:0,
  314. roleindexbiaoji:0,
  315. audioPlay: false, //当前的播放状态控制
  316. sliderValue: 0, //进度条最小值
  317. sliderMax: 0, //进度条最大值
  318. innerAudioContext: "", //播放实例
  319. currentTimeStr: "00:00", //当前进度的时间
  320. timeStr: "00:00", //总的时间
  321. recordPath: "",
  322. customerId: "",
  323. luyinList: [], //录音文件
  324. newluyinList:[],
  325. dialogList: [], //录音识别列表
  326. csdFileindex: 0,
  327. date: "", //年月日
  328. tab: 0, // 默认是音频识别
  329. scrollTop: 0,
  330. scrollId: "",
  331. playNow: 0,
  332. alltimeStr: "00:00:00",
  333. ratelist: [], //评分列表
  334. totalRate: "",
  335. thewrongword: "", //错误词
  336. reswrongword: "", //正确词
  337. isshow2: false,
  338. messagelisy: [],
  339. isshow3: false,
  340. biaoqianlist: [],
  341. biaoqianindex: 0,
  342. changanitem: {},
  343. duihuawenjianid: "",
  344. biaoqianid: "",
  345. status: 0,
  346. userInfo: {},
  347. jiaoseshow: true,
  348. itemobj:{},
  349. textindex:0,//下拉 转写文件下标
  350. toptextindex:0,//上拉 转写文件下标
  351. biojiisshow:false,
  352. speaker:'',
  353. dshfkjsdkksodofydwfkhwdfkjh:0,
  354. userlistobj:{},
  355. Acquirecustomerintentlist:[],
  356. options1:[],
  357. Receivedetailsabout:false,
  358. Pinspeak:false,
  359. intention:false,
  360. yixingindex:0,//意向,统计切换
  361. buildingID:''
  362. };
  363. },
  364. onLoad: function(options) {
  365. this.status = options.status;
  366. this.customerId = options.customerId;
  367. this.itemobj=JSON.parse(options.itemobj);
  368. this.stateisshow=options.stateisshow;
  369. },
  370. onShow() {
  371. this.buildingID = uni.getStorageSync('buildingID').id;
  372. this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
  373. if (this.userInfo.dataCode == 6) {
  374. this.jiaoseshow = false
  375. }
  376. this.roleindex=0;
  377. if(this.stateisshow==2){
  378. var info =this.itemobj;
  379. }else{
  380. var pages = getCurrentPages();
  381. var currPage = pages[pages.length - 1]; //当前页面
  382. var info = currPage.data.info;
  383. }
  384. this.innerAudioContext = uni.createInnerAudioContext();
  385. this.innerAudioContext.autoplay = false;
  386. this.innerAudioContext.title = '音频';
  387. this.onPlay()
  388. this.onPause()
  389. this.onCanplay()
  390. this.onEnded()
  391. this.onSeeking()
  392. this.onSeeked()
  393. this.TimeUpdate()
  394. this.init(info)
  395. },
  396. // 在组件实例被从页面节点树移除时执行
  397. destroyed: function() {
  398. if (this.innerAudioContext) {
  399. this.innerAudioContext.destroy();
  400. }
  401. },
  402. // 销毁实例
  403. onUnload: function() {
  404. this.innerAudioContext.destroy();
  405. },
  406. methods: {
  407. //获取用户信息
  408. gituserlist(){
  409. this.$u.get("/matchKeywords/personalReceptionRecord", {
  410. customerId: this.customerId
  411. }).then(res => {
  412. res.endTime1=res.endTime.substring(0, 19);
  413. this.userlistobj=res;
  414. })
  415. },
  416. //获取意向信息
  417. Acquirecustomerintent(){
  418. this.$u.get("/matchKeywords/findPersonalMatchData", {
  419. customerId: this.customerId
  420. }).then(res => {
  421. res.forEach(item=>{
  422. item.isshow=true;
  423. item.children.forEach(chend=>{
  424. if(item.name=='意向面积'){
  425. chend.text=chend.name+'m²'+'-'+chend.endName+'m²'
  426. }else if(item.name=='购房预算'){
  427. chend.text=chend.name+'万'+'-'+chend.endName+'万'
  428. }else{
  429. chend.text=chend.name
  430. }
  431. })
  432. })
  433. this.Acquirecustomerintentlist=res;
  434. })
  435. },
  436. Acquishow(i){
  437. this.Acquirecustomerintentlist[i].isshow=!this.Acquirecustomerintentlist[i].isshow;
  438. },
  439. Edittag(item,chend,index,i){
  440. var selected='';
  441. if(chend.selected==0){
  442. selected=1;
  443. this.Acquirecustomerintentlist[index].children[i].selected=1;
  444. }else{
  445. selected=0;
  446. this.Acquirecustomerintentlist[index].children[i].selected=0;
  447. }
  448. this.$u.post("/matchKeywords/updatePersonalMatchData", {
  449. carId: this.customerId,
  450. selected:selected,
  451. name:chend.name,
  452. pid:chend.pid,
  453. level:chend.level,
  454. endName:chend.endName,
  455. keywordsId:chend.keywordsId
  456. }).then(res => {
  457. })
  458. },
  459. //取消接待详情
  460. clenReceivedetailsabout(){
  461. this.Receivedetailsabout=false;
  462. this.Pinspeak=false;
  463. this.intention=false;
  464. },
  465. //意向统计切换
  466. Intentiontoswitch(i){
  467. this.yixingindex=i;
  468. if(i==1){
  469. this.statistical()
  470. }
  471. },
  472. statistical(){
  473. this.$u.get("/matchKeywords/findCARKeywords", {
  474. customerId: this.customerId
  475. }).then(res => {
  476. res.forEach(item=>{
  477. if(item.isInterval==0){
  478. item.name=item.name+item.unit+ '-'+ item.endName+item.unit;
  479. }
  480. })
  481. this.options1=res;
  482. })
  483. },
  484. //接待详情点击
  485. Receivedetailsabouttab(stringa){
  486. if(stringa=='Receivedetailsabout'){
  487. this.gituserlist()
  488. this.Receivedetailsabout=true;
  489. }else if(stringa=='Pinspeak'){
  490. this.getRatelist()
  491. this.Pinspeak=true;
  492. }else{
  493. this.Acquirecustomerintent()
  494. this.intention=true;
  495. }
  496. },
  497. guanjiancishifo(){
  498. // this.guanjianciishow=!this.guanjianciishow;
  499. this.innerAudioContext.destroy();
  500. this.stateisshow=1;
  501. uni.navigateTo({
  502. url: '/pages/learning/Keywordsearch?customerId='+this.customerId +"&status="+this.status +"&skpl="+"1"
  503. })
  504. },
  505. //标记选择角色
  506. biaojixuanze(index){
  507. this.roleindexbiaoji=index;
  508. },
  509. //标记顾问
  510. tagtap(){
  511. this.biojiisshow=!this.biojiisshow;
  512. },
  513. //取消标记
  514. unmarktap(){
  515. this.biojiisshow=false;
  516. this.roleindexbiaoji=this.dshfkjsdkksodofydwfkhwdfkjh;
  517. },
  518. //确认标记
  519. Confirmthetag(){
  520. var num=this.roleindexbiaoji+1;
  521. uni.request({
  522. url: config.service.markConsultant + '?id=' + this.luyinList[this.csdFileindex].id+"&speaker="+num+'&customerId='+this.customerId, //仅为示例,并非真实接口地址。
  523. method: "GET",
  524. header: {
  525. 'content-type': 'application/json',
  526. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  527. },
  528. success: (data) => {
  529. this.biojiisshow=false;
  530. this.biaojiyuyi()
  531. this.fenjiaoseunfo()
  532. uni.showToast({
  533. title: '标记成功',
  534. duration: 2000
  535. });
  536. },
  537. })
  538. },
  539. //标记语义词
  540. biaojiyuyi(){
  541. let parames={
  542. carId:this.customerId
  543. }
  544. this.$u.post("/matchKeywords/toMatchKeywords", parames).then(res => {
  545. console.log(res)
  546. })
  547. },
  548. //分角色
  549. tapspagek(index){
  550. this.roleindex=index;
  551. this.newluyinList=[];
  552. this.fenjiaoseunfo()
  553. },
  554. //分角色标记刷新
  555. fenjiaoseunfo(){
  556. var bgcd=this.sliderValue*1000;
  557. this.newluyinList=[];
  558. this.dialogList = [];
  559. uni.request({
  560. url: config.service.getCorpusAnal + '?corpusId=' + this.luyinList[this.csdFileindex].id+"&bg="+bgcd+"&speaker="+this.roleindex, //仅为示例,并非真实接口地址。
  561. method: "GET",
  562. header: {
  563. 'content-type': 'application/json',
  564. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  565. },
  566. success: (data) => {
  567. this.tablist=[];
  568. let jsonInfo = JSON.parse(data.data.data.audioContent);
  569. for(var i=0;i<=data.data.data.speakerNum;i++){
  570. if(i==0){
  571. this.tablist.push({
  572. name:'全部'
  573. })
  574. }else if(i==1){
  575. this.tablist.push({
  576. name:'A'
  577. })
  578. }else if(i==2){
  579. this.tablist.push({
  580. name:'B'
  581. })
  582. }else if(i==3){
  583. this.tablist.push({
  584. name:'C'
  585. })
  586. }else if(i==4){
  587. this.tablist.push({
  588. name:'D'
  589. })
  590. }else if(i==5){
  591. this.tablist.push({
  592. name:'E'
  593. })
  594. }else if(i==6){
  595. this.tablist.push({
  596. name:'F'
  597. })
  598. }else if(i==7){
  599. this.tablist.push({
  600. name:'G'
  601. })
  602. }else if(i==8){
  603. this.tablist.push({
  604. name:'H'
  605. })
  606. }else{
  607. this.tablist.push({
  608. name:'I'
  609. })
  610. }
  611. }
  612. if(data.data.data.speaker==null){
  613. this.roleindexbiaoji=0;
  614. this.dshfkjsdkksodofydwfkhwdfkjh=0;
  615. }else{
  616. this.tablist[data.data.data.speaker].name=this.tablist[data.data.data.speaker].name+"顾问";
  617. this.roleindexbiaoji=data.data.data.speaker-1;
  618. this.dshfkjsdkksodofydwfkhwdfkjh=data.data.data.speaker-1;
  619. }
  620. this.speaker=data.data.data.speaker;
  621. //上拉标记点
  622. this.textindex=data.data.data.index;
  623. //下拉标记点
  624. this.toptextindex=data.data.data.index;
  625. jsonInfo.forEach(item=>{
  626. item.message=JSON.parse(item.onebest)
  627. item.backindex=this.csdFileindex
  628. })
  629. console.log(jsonInfo)
  630. this.newluyinList=jsonInfo;
  631. if(this.textindex==null){
  632. return
  633. }else{
  634. this.dialogList.push(jsonInfo[this.textindex]);
  635. }
  636. }
  637. })
  638. },
  639. toKeywordsearch(){
  640. this.innerAudioContext.destroy();
  641. this.stateisshow=1;
  642. uni.navigateTo({
  643. url: '/pages/learning/Keywordsearch?customerId='+this.customerId +"&status="+this.status +"&skpl="+"1"
  644. })
  645. },
  646. onPlay(){
  647. this.innerAudioContext.onPlay(() => {
  648. // 播放监听
  649. console.log('播放!');
  650. this.audioPlay = true;
  651. });
  652. },
  653. onPause(){
  654. this.innerAudioContext.onPause(() => {
  655. // 暂停监听
  656. console.log('暂停播放!');
  657. this.audioPlay = false
  658. });
  659. },
  660. onCanplay() {
  661. this.innerAudioContext.onCanplay((callback) => {
  662. console.log("缓冲回调",this.innerAudioContext.duration);
  663. })
  664. },
  665. onEnded(){
  666. this.innerAudioContext.onEnded(() => {
  667. // 结束播放监听
  668. console.log('播放结束!');
  669. this.audioPlay = false;
  670. });
  671. },
  672. onSeeking(){
  673. this.innerAudioContext.onSeeking((res) => {
  674. console.log("进行跳转", res);
  675. })
  676. },
  677. onSeeked(){
  678. this.innerAudioContext.onSeeked((res) => {
  679. console.log("结束跳转", res);
  680. this.$forceUpdate()
  681. });
  682. },
  683. TimeUpdate(){
  684. this.innerAudioContext.onTimeUpdate(() => {
  685. const {
  686. currentTime,
  687. duration
  688. } = this.innerAudioContext;
  689. this.playNow = parseInt(currentTime * 1000)
  690. if (this.dialogList.length == 0) {
  691. return
  692. } else {
  693. const message = this.dialogList[0].message;
  694. for (let i = 0; i < message.length; i++) {
  695. if (Number(message[i].bg) < this.playNow && Number(message[i].ed) > this.playNow) {
  696. this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg;
  697. break;
  698. }
  699. }
  700. }
  701. const currTimeStr = this.formatTime(currentTime);
  702. this.sliderValue = parseInt(currentTime);
  703. // 变动的时间
  704. this.currentTimeStr = currTimeStr;
  705. //进度条最大值
  706. this.sliderMax = this.luyinList[this.csdFileindex].recordDuration;
  707. this.$forceUpdate()
  708. });
  709. },
  710. init(info) {
  711. this.sliderMax = 0; //进度条最大值
  712. this.timeStr = "00:00"; //总的时间
  713. const parames = {
  714. pageNum: 1,
  715. pageSize: 100,
  716. query: {
  717. customerId: this.customerId
  718. }
  719. }
  720. this.$u.post("/corpus/findByPage", parames).then(res => {
  721. if (res && res.length) {
  722. let alltime = 1+res[0].recordDuration;
  723. this.alltimeStr = this.getTime(alltime)
  724. if(info.bg!=0){
  725. this.luyinList = res;
  726. this.recordPath = res[0].recordPath
  727. this.sliderMax = this.getTime(res[0].recordDuration)
  728. this.timeStr = this.getTime(res[0].recordDuration)
  729. this.date = res[0].receptionTime;
  730. this.getCorpusAnalysis(info);
  731. this.creatAudio()
  732. }else{
  733. this.luyinList = res;
  734. this.recordPath = res[0].recordPath
  735. this.sliderMax = this.getTime(res[0].recordDuration)
  736. this.timeStr = this.getTime(res[0].recordDuration)
  737. this.date = res[0].receptionTime;
  738. this.getCorpusAnalysis(info);
  739. this.creatAudio()
  740. }
  741. }
  742. })
  743. },
  744. //搜索跳转
  745. adasdasdasd(e) {
  746. const currTimeStr = this.formatTime(e)
  747. this.currentTimeStr = currTimeStr
  748. this.innerAudioContext.seek(e);
  749. this.innerAudioContext.play();
  750. },
  751. //下一页
  752. ltolower() {
  753. var lengthcz=this.newluyinList.length-1;
  754. if (this.textindex >= lengthcz) {
  755. uni.showToast({
  756. title: '到底了',
  757. duration: 2000
  758. });
  759. return
  760. }else {
  761. this.textindex=this.textindex+1;
  762. this.newluyinList[this.textindex].message.forEach(item=>{
  763. this.dialogList[0].message.push(item)
  764. })
  765. }
  766. console.log("下一页",this.textindex)
  767. },
  768. //上一页
  769. rolltoupper() {
  770. if(this.toptextindex == 0){
  771. // uni.showToast({
  772. // title: '到头了',
  773. // duration: 2000
  774. // });
  775. return
  776. }else {
  777. if(this.dialogList[0]==undefined ){
  778. return
  779. }else{
  780. this.toptextindex=this.toptextindex-1;
  781. let reverselist=this.newluyinList[this.toptextindex].message;
  782. let runlist=reverselist.reverse();
  783. runlist.forEach(item=>{
  784. this.dialogList[0].message.unshift(item)
  785. })
  786. }
  787. }
  788. console.log("上一页",this.toptextindex)
  789. },
  790. // 取消全部加精
  791. notappick() {
  792. var that = this;
  793. uni.showModal({
  794. title: '提示',
  795. content: '确认取消加精?',
  796. success: function(res) {
  797. if (res.confirm) {
  798. console.log('用户点击确定');
  799. uni.request({
  800. url: config.service.delATD + "?carId=" + that.customerId+'&itemId='+that.buildingID,
  801. method: "GET",
  802. header: {
  803. 'content-type': 'application/json',
  804. 'Access-Token': uni.getStorageSync('weapp_session_login_data')
  805. .token
  806. },
  807. success: (data) => {
  808. if (data.data.code == 10000) {
  809. that.status = 1
  810. uni.showToast({
  811. title: '取消成功',
  812. duration: 2000
  813. });
  814. } else {
  815. uni.showToast({
  816. title: data.data.message,
  817. duration: 2000
  818. });
  819. }
  820. }
  821. })
  822. } else if (res.cancel) {
  823. console.log('用户点击取消');
  824. }
  825. }
  826. });
  827. },
  828. //全部加精
  829. tappick(i) {
  830. var that = this;
  831. uni.showModal({
  832. title: '提示',
  833. content: '确认加精?',
  834. success: function(res) {
  835. if (res.confirm) {
  836. console.log('用户点击确定');
  837. let objdata = {
  838. "carId": that.customerId, //客户id
  839. "status": 0,
  840. "itemId":that.buildingID,
  841. }
  842. uni.request({
  843. url: config.service.addATD,
  844. method: "POST",
  845. header: {
  846. 'content-type': 'application/json',
  847. 'Access-Token': uni.getStorageSync('weapp_session_login_data')
  848. .token
  849. },
  850. data: objdata,
  851. success: (data) => {
  852. if (data.data.code == 10000) {
  853. that.status = 0
  854. uni.showToast({
  855. title: '加精成功',
  856. duration: 2000
  857. });
  858. } else {
  859. uni.showToast({
  860. title: data.data.message,
  861. duration: 2000
  862. });
  863. }
  864. }
  865. })
  866. } else if (res.cancel) {
  867. console.log('用户点击取消');
  868. }
  869. }
  870. });
  871. },
  872. //标签选择
  873. tapbiaoqianclisck(index) {
  874. this.biaoqianindex = index;
  875. this.biaoqianid = this.biaoqianlist[index].id
  876. },
  877. //复制
  878. clickcopy() {
  879. var that = this;
  880. uni.setClipboardData({
  881. data: that.thewrongword,
  882. success: function() {
  883. that.dialogList.forEach(res => {
  884. res.message.forEach(asd => {
  885. asd.isshow = false;
  886. })
  887. })
  888. that.$forceUpdate();
  889. console.log('success');
  890. }
  891. });
  892. },
  893. //确认加入常错词
  894. Confirmtheexit() {
  895. if (this.thewrongword) {
  896. if (this.reswrongword) {
  897. let parames = {
  898. customerId:this.customerId,
  899. cupid: this.luyinList[this.csdFileindex].id,
  900. wrongWord: this.thewrongword, //错误词
  901. correctWord: this.reswrongword, //正确词
  902. translateHtmlContent: this.messagelisy,
  903. }
  904. this.$u.post("/corpus/addCorrectWord", parames).then(data => {
  905. this.isshow2 = false;
  906. this.dialogList.forEach(res => {
  907. res.message.forEach(asd => {
  908. asd.isshow = false;
  909. })
  910. })
  911. this.thewrongword = "";
  912. this.reswrongword = "";
  913. })
  914. } else {
  915. uni.showToast({
  916. title: '正确值不能为空',
  917. duration: 2000
  918. });
  919. return
  920. }
  921. } else {
  922. uni.showToast({
  923. title: '错误词不能为空',
  924. duration: 2000
  925. });
  926. return
  927. }
  928. },
  929. //取消加入常错词
  930. Cancelout() {
  931. this.isshow2 = false;
  932. this.dialogList.forEach(res => {
  933. res.message.forEach(asd => {
  934. asd.isshow = false;
  935. })
  936. })
  937. },
  938. //加入长错词
  939. Oftenthewrongword() {
  940. this.reswrongword = "";
  941. this.isshow2 = true;
  942. },
  943. //加精华
  944. Addtheessence() {
  945. this.isshow3 = true;
  946. this.biaoqianlist = []
  947. let parames={
  948. "itemId":this.buildingID
  949. }
  950. this.$u.post("/addtodigest/findAllYi", parames).then(data => {
  951. this.biaoqianlist = data
  952. this.biaoqianlist.unshift({
  953. name: "逼单话术",
  954. id: 0
  955. })
  956. })
  957. // util.getRequestPromise(config.service.findAllYi, {"itemId":this.buildingID}, false).then(data => {
  958. // this.biaoqianlist = data
  959. // this.biaoqianlist.unshift({
  960. // name: "逼单话术",
  961. // id: 0
  962. // })
  963. // });
  964. },
  965. // 取消加精
  966. Cancelout2() {
  967. this.isshow3 = false;
  968. this.dialogList.forEach(res => {
  969. res.message.forEach(asd => {
  970. asd.isshow = false;
  971. })
  972. })
  973. },
  974. // 确认加精
  975. Confirmtheexit2() {
  976. if (this.biaoqianid) {
  977. this.biaoqianid = this.biaoqianid
  978. } else {
  979. this.biaoqianid = 0
  980. }
  981. this.isshow3 = false;
  982. this.dialogList.forEach(res => {
  983. res.message.forEach(asd => {
  984. asd.isshow = false;
  985. })
  986. })
  987. let objdata = {
  988. "itemId":this.buildingID,
  989. "carId": this.customerId, //客户id
  990. "startTime": this.changanitem.bg, //开始时间
  991. "startFile": this.duihuawenjianid, //对话所在录音文件id
  992. "endTime": this.changanitem.ed, //结束时间
  993. "marketingId": this.biaoqianid, //对应一级父id
  994. "jjTransfer": this.changanitem.onebest, //选中对话
  995. "status": 1
  996. }
  997. uni.request({
  998. url: config.service.addATD,
  999. method: "POST",
  1000. header: {
  1001. 'content-type': 'application/json',
  1002. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  1003. },
  1004. data: objdata,
  1005. success: (data) => {
  1006. if (data.data.code == 10000) {
  1007. uni.showToast({
  1008. title: '加精成功',
  1009. duration: 2000
  1010. });
  1011. } else {
  1012. uni.showToast({
  1013. title: data.data.message,
  1014. duration: 2000
  1015. });
  1016. }
  1017. }
  1018. })
  1019. },
  1020. //长按对话
  1021. changanxiaoguo(item, index, i) {
  1022. this.messagelisy = [];
  1023. this.changanitem = {};
  1024. this.duihuawenjianid = "",
  1025. this.dialogList.forEach(res => {
  1026. res.message.forEach(asd => {
  1027. asd.isshow = false;
  1028. })
  1029. })
  1030. this.changanitem = item;
  1031. this.duihuawenjianid = this.luyinList[this.csdFileindex].id;
  1032. this.dialogList[i].message[index].isshow = !this.dialogList[i].message[index].isshow
  1033. this.thewrongword = item.onebest;
  1034. this.messagelisy = this.dialogList[i].message
  1035. console.log(this.dialogList[i], "长按触发")
  1036. },
  1037. //回到顶部
  1038. gotoTop() {
  1039. this.scrollId = null;
  1040. this.$nextTick(() => {
  1041. this.scrollId = "top";
  1042. })
  1043. },
  1044. //切换tab
  1045. changeTab(type) {
  1046. if (type == 0) {
  1047. this.tab = 0
  1048. } else {
  1049. this.tab = 1;
  1050. this.getRatelist();
  1051. }
  1052. },
  1053. //评分上下显隐
  1054. changeshow(item, type) {
  1055. if (type == 1) {
  1056. item.show = true
  1057. } else {
  1058. item.show = false
  1059. }
  1060. },
  1061. // 获取评分
  1062. getRatelist() {
  1063. if (this.ratelist.length == 0) {
  1064. uni.showLoading({
  1065. title: '加载中'
  1066. });
  1067. this.$u.get("/customer/findzkMByCusId", {
  1068. cusId: this.customerId
  1069. }).then(res => {
  1070. if (res.length) {
  1071. let level1 = []
  1072. let level2rate = 0
  1073. res.forEach(item => {
  1074. if (item.pid == 0) {
  1075. level1.push({
  1076. id: item.marketingId,
  1077. rate: item.fraction,
  1078. name: item.name,
  1079. sort: item.sort,
  1080. show: false,
  1081. ratepercent: 0,
  1082. children: []
  1083. })
  1084. } else {
  1085. if (item.selected == 0) {
  1086. level2rate += item.fraction
  1087. }
  1088. }
  1089. })
  1090. this.totalRate = level2rate
  1091. res.forEach(subitem => {
  1092. let subitempid = subitem.pid
  1093. level1.forEach(item => {
  1094. if (subitempid == item.id) {
  1095. if (subitem.selected == 0) {
  1096. item.ratepercent += subitem.fraction
  1097. }
  1098. item.children.push({
  1099. id: subitem.id,
  1100. rate: subitem.fraction,
  1101. selected: subitem.selected,
  1102. name: subitem.name
  1103. })
  1104. }
  1105. })
  1106. })
  1107. level1[0].show = true;
  1108. this.ratelist = level1
  1109. }
  1110. setTimeout(function() {
  1111. uni.hideLoading();
  1112. }, 1000);
  1113. })
  1114. }
  1115. },
  1116. // 获取转义后的对话结果
  1117. getCorpusAnalysis(info) {
  1118. this.dialogList = [];
  1119. this.newluyinList=[]
  1120. uni.request({
  1121. url: config.service.getCorpusAnal + '?corpusId=' + this.luyinList[this.csdFileindex].id+"&bg="+info.bg+"&speaker="+this.roleindex, //仅为示例,并非真实接口地址。
  1122. method: "GET",
  1123. header: {
  1124. 'content-type': 'application/json',
  1125. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  1126. },
  1127. success: (data) => {
  1128. this.tablist=[];
  1129. let jsonInfo = JSON.parse(data.data.data.audioContent);
  1130. for(var i=0;i<=data.data.data.speakerNum;i++){
  1131. if(i==0){
  1132. this.tablist.push({
  1133. name:'全部'
  1134. })
  1135. }else if(i==1){
  1136. this.tablist.push({
  1137. name:'A'
  1138. })
  1139. }else if(i==2){
  1140. this.tablist.push({
  1141. name:'B'
  1142. })
  1143. }else if(i==3){
  1144. this.tablist.push({
  1145. name:'C'
  1146. })
  1147. }else if(i==4){
  1148. this.tablist.push({
  1149. name:'D'
  1150. })
  1151. }else if(i==5){
  1152. this.tablist.push({
  1153. name:'E'
  1154. })
  1155. }else if(i==6){
  1156. this.tablist.push({
  1157. name:'F'
  1158. })
  1159. }else if(i==7){
  1160. this.tablist.push({
  1161. name:'G'
  1162. })
  1163. }else if(i==8){
  1164. this.tablist.push({
  1165. name:'H'
  1166. })
  1167. }else{
  1168. this.tablist.push({
  1169. name:'I'
  1170. })
  1171. }
  1172. }
  1173. if(data.data.data.speaker==null){
  1174. this.roleindexbiaoji=0;
  1175. this.dshfkjsdkksodofydwfkhwdfkjh=0;
  1176. }else{
  1177. this.tablist[data.data.data.speaker].name=this.tablist[data.data.data.speaker].name+"顾问";
  1178. this.roleindexbiaoji=data.data.data.speaker-1;
  1179. this.dshfkjsdkksodofydwfkhwdfkjh=data.data.data.speaker-1;
  1180. }
  1181. this.speaker=data.data.data.speaker;
  1182. //上拉标记点
  1183. this.textindex=data.data.data.index;
  1184. //下拉标记点
  1185. this.toptextindex=data.data.data.index;
  1186. jsonInfo.forEach(item=>{
  1187. item.message=JSON.parse(item.onebest)
  1188. item.backindex=this.csdFileindex
  1189. })
  1190. console.log(jsonInfo)
  1191. this.newluyinList=jsonInfo;
  1192. this.dialogList.push(jsonInfo[this.textindex]);
  1193. var itc=parseInt(info.bg/1000)
  1194. this.adasdasdasd(itc)
  1195. }
  1196. })
  1197. },
  1198. getTime(time) {
  1199. return util.formatSecond(time)
  1200. },
  1201. // 录音暂停播放
  1202. changePlayState() {
  1203. if (this.audioPlay == false) {
  1204. this.innerAudioContext.play();
  1205. } else {
  1206. this.innerAudioContext.pause()
  1207. }
  1208. },
  1209. //音频前进回退
  1210. sliderChangeComplate(e) {
  1211. let platetime=e.detail.value*1000;
  1212. this.dialogList=[]
  1213. uni.request({
  1214. url: config.service.fastForward + '?corpusId=' + this.luyinList[this.csdFileindex].id+"&bg="+platetime, //仅为示例,并非真实接口地址。
  1215. method: "GET",
  1216. header: {
  1217. 'content-type': 'application/json',
  1218. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  1219. },
  1220. success: (data) => {
  1221. this.textindex=data.data.data.index;
  1222. this.toptextindex=data.data.data.index;
  1223. if(data.data.data.index>this.newluyinList.length){
  1224. this.dialogList.push(this.newluyinList[0])
  1225. }else{
  1226. this.dialogList.push(this.newluyinList[data.data.data.index])
  1227. }
  1228. const currTimeStr = this.formatTime(e.detail.value)
  1229. this.currentTimeStr = currTimeStr
  1230. this.innerAudioContext.seek(e.detail.value);
  1231. this.innerAudioContext.play();
  1232. }
  1233. })
  1234. },
  1235. //长按点击播放
  1236. clickbofang(dialog,item) {
  1237. this.innerAudioContext.pause()
  1238. this.dialogList.forEach(res => {
  1239. res.message.forEach(asd => {
  1240. asd.isshow = false;
  1241. })
  1242. })
  1243. this.$forceUpdate()
  1244. let platetime=item.bg;
  1245. let newtime=item.bg/1000;
  1246. this.dialogList=[]
  1247. uni.request({
  1248. url: config.service.fastForward + '?corpusId=' + this.luyinList[this.csdFileindex].id+"&bg="+platetime, //仅为示例,并非真实接口地址。
  1249. method: "GET",
  1250. header: {
  1251. 'content-type': 'application/json',
  1252. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  1253. },
  1254. success: (data) => {
  1255. this.textindex=data.data.data.index;
  1256. this.toptextindex=data.data.data.index;
  1257. this.dialogList.push(this.newluyinList[data.data.data.index])
  1258. const currTimeStr = this.formatTime(newtime)
  1259. this.currentTimeStr = currTimeStr
  1260. this.innerAudioContext.seek(newtime);
  1261. this.innerAudioContext.play();
  1262. }
  1263. })
  1264. },
  1265. //录音实例
  1266. creatAudio() {
  1267. this.innerAudioContext = uni.createInnerAudioContext();
  1268. this.innerAudioContext.autoplay = true;
  1269. this.innerAudioContext.src = this.recordPath;
  1270. this.innerAudioContext.title = '音频';
  1271. this.onPlay()
  1272. this.onPause()
  1273. this.onCanplay()
  1274. this.onEnded()
  1275. this.onSeeking()
  1276. this.onSeeked()
  1277. this.TimeUpdate()
  1278. },
  1279. formatTime(num) {
  1280. //格式化时间格式
  1281. num = num.toFixed(0);
  1282. let second = num % 60;
  1283. if (second < 10) second = '0' + second;
  1284. let min = Math.floor(num / 60);
  1285. if (min < 10) min = '0' + min;
  1286. return min + ":" + second;
  1287. },
  1288. changeEditing() {
  1289. this.dialogListres[0].message.forEach(asd => {
  1290. asd.isshow = false;
  1291. })
  1292. }
  1293. },
  1294. }
  1295. </script>
  1296. <style lang="scss" scoped>
  1297. .box{
  1298. width: 100%;
  1299. height: 100vh;
  1300. display:flex;
  1301. flex-direction:column;
  1302. .headbox{
  1303. width: 100%;
  1304. min-height: 173rpx;
  1305. border-bottom: 1px solid #E0E0E0;
  1306. }
  1307. .zhuti{
  1308. flex:1;
  1309. overflow:auto;
  1310. }
  1311. .bottombox{
  1312. width: 100%;
  1313. height: 150rpx;
  1314. border-top: 1px solid #E0E0E0;
  1315. .bottomhead{
  1316. width: 100%;
  1317. height: 61rpx;
  1318. border-bottom: 1px solid #E0E0E0;
  1319. display: flex;
  1320. justify-content: space-between;
  1321. align-items: center;
  1322. .audio-slider {
  1323. width: 87%;
  1324. display: flex;
  1325. justify-content: space-between;
  1326. align-items: center;
  1327. padding-right: 30rpx;
  1328. }
  1329. .audio-slider .slider {
  1330. width: 100%;
  1331. padding: 0px 15rpx;
  1332. box-sizing: border-box;
  1333. }
  1334. .audio-time {
  1335. width: 110rpx;
  1336. text-align: right;
  1337. font-size: 24rpx;
  1338. line-height: 28rpx;
  1339. color: #70798D;
  1340. display: flex;
  1341. justify-content: space-between;
  1342. }
  1343. .audio-play {
  1344. width: 40rpx;
  1345. height: 40rpx;
  1346. flex-shrink: 0;
  1347. }
  1348. .audio-play .image {
  1349. width: 100%;
  1350. height: 100%;
  1351. margin-left: 30rpx;
  1352. }
  1353. }
  1354. .botbotmm{
  1355. width: 100%;
  1356. height: 88rpx;
  1357. display: flex;
  1358. align-items: center;
  1359. }
  1360. }
  1361. }
  1362. .headboxhead{
  1363. width: 100%;
  1364. height: 84rpx;
  1365. border-bottom: 1px solid #E0E0E0;
  1366. display: flex;
  1367. .boxhead1{
  1368. width: 50%;
  1369. color: #303030;
  1370. height: 84rpx;
  1371. line-height: 84rpx;
  1372. font-size: 28rpx;
  1373. text-indent: 30rpx;
  1374. }
  1375. .boxhead2{
  1376. width: 46%;
  1377. height: 84rpx;
  1378. text-align: right;
  1379. }
  1380. }
  1381. .boxhead2 image{
  1382. width: 36rpx;
  1383. height: 36rpx;
  1384. margin-top: 24rpx;
  1385. }
  1386. .headboxbott{
  1387. width: 100%;
  1388. height:88rpx;
  1389. display: flex;
  1390. align-items: center;
  1391. .headovfu{
  1392. flex: 1;
  1393. height: 88rpx;
  1394. overflow: hidden;
  1395. }
  1396. .headpade{
  1397. width: 160rpx;
  1398. height: 60rpx;
  1399. display: flex;
  1400. justify-content: center;
  1401. align-items: center;
  1402. border-left: 1px solid #D6D6D6;
  1403. .biaoji{
  1404. width: 100rpx;
  1405. height: 48rpx;
  1406. background: #E6625B;
  1407. border-radius: 24rpx;
  1408. text-align: center;
  1409. line-height: 48rpx;
  1410. color: #FFFFFF;
  1411. font-size: 26rpx;
  1412. }
  1413. }
  1414. }
  1415. .fill{
  1416. width: 2rpx;
  1417. height: 41rpx;
  1418. background: #E0E0E0;
  1419. }
  1420. .tmmchen{
  1421. width: 25%;
  1422. height: 88rpx;
  1423. text-align: center;
  1424. color: #666666;
  1425. font-size: 18rpx;
  1426. }
  1427. .tmmchen image{
  1428. width: 40rpx;
  1429. height: 40rpx;
  1430. margin-top: 10rpx;
  1431. margin-bottom: 2rpx;
  1432. }
  1433. .zhezhoa {
  1434. position: fixed;
  1435. top: 0;
  1436. left: 0;
  1437. z-index: 999;
  1438. width: 100%;
  1439. height: 100vh;
  1440. opacity: 0.5;
  1441. background-color: #666666;
  1442. }
  1443. .followingpop-up{
  1444. width: 100%;
  1445. height: 700rpx;
  1446. background: #FFFFFF;
  1447. position: fixed;
  1448. background: #FFFFFF;
  1449. left: 0px;
  1450. bottom: 0px;
  1451. z-index: 1000;
  1452. display:flex;
  1453. flex-direction:column;
  1454. .guanbibox{
  1455. width: 100%;
  1456. padding-bottom: 20rpx;
  1457. border-bottom: 1px solid #E0E0E0;
  1458. .guanbixen{
  1459. width: 95%;
  1460. text-align: right;
  1461. padding-top: 24rpx;
  1462. }
  1463. .guanbixen image{
  1464. width:30rpx;
  1465. height:30rpx;
  1466. }
  1467. .cenisboxtab{
  1468. width: 100%;
  1469. display: flex;
  1470. .cenisboxtabview{
  1471. flex: 1;
  1472. display: flex;
  1473. align-items: center;
  1474. justify-content: center;
  1475. color: #333333;
  1476. font-size: 30rpx;
  1477. font-weight: 600;
  1478. }
  1479. }
  1480. }
  1481. .cenisbox{
  1482. flex:1;
  1483. overflow:auto;
  1484. .jianbox{
  1485. width: 100%;
  1486. border-bottom: 1px solid #E0E0E0;
  1487. padding-top: 24rpx;
  1488. padding-bottom: 24rpx;
  1489. .jianbox-cen{
  1490. width: 100%;
  1491. height: 78rpx;
  1492. border-bottom: 1px solid #E0E0E0;
  1493. display: flex;
  1494. .jianboxtext{
  1495. flex: 1;
  1496. height: 100%;
  1497. font-size: 30rpx;
  1498. font-weight: 600;
  1499. line-height: 78rpx;
  1500. color: #333333;
  1501. text-indent: 30rpx;
  1502. }
  1503. .jianboxjian{
  1504. width: 80rpx;
  1505. height: 100%;
  1506. line-height: 78rpx;
  1507. text-align: center;
  1508. }
  1509. }
  1510. .bioqianwayl{
  1511. width: 690rpx;
  1512. margin: 0 auto;
  1513. display: flex;
  1514. flex-wrap: wrap;
  1515. }
  1516. .bioqianwayl view{
  1517. padding-left: 24rpx;
  1518. padding-right: 24rpx;
  1519. padding-top: 10rpx;
  1520. padding-bottom: 10rpx;
  1521. margin-right: 24rpx;
  1522. margin-top: 20rpx;
  1523. border-radius: 8rpx;
  1524. font-size: 26rpx;
  1525. }
  1526. }
  1527. }
  1528. }
  1529. .jiantop{
  1530. width: 14rpx;
  1531. height: 24rpx;
  1532. }
  1533. .jiantop1{
  1534. width: 20rpx;
  1535. height: 14rpx;
  1536. }
  1537. .yixingindexclass{
  1538. border-bottom: 3px solid #2671E2;
  1539. }
  1540. .cenisboxdspl{
  1541. width: 94%;
  1542. margin: 0 auto;
  1543. padding-bottom: 24rpx;
  1544. display: flex;
  1545. flex-wrap: wrap;
  1546. .cenisboxdsplview{
  1547. padding-left: 24rpx;
  1548. padding-right: 24rpx;
  1549. padding-top: 10rpx;
  1550. padding-bottom: 10rpx;
  1551. background: #F4F8FD;
  1552. color: #2671E2;
  1553. font-size: 26rpx;
  1554. margin-right: 24rpx;
  1555. margin-top: 24rpx;
  1556. }
  1557. }
  1558. .bounced {
  1559. width: 570upx;
  1560. background: #FFFFFF;
  1561. z-index: 1000;
  1562. border-radius: 10upx;
  1563. position: fixed;
  1564. left: 50%;
  1565. top: 50%;
  1566. transform: translate(-50%, -50%);
  1567. /* 50%为自身尺寸的一半 */
  1568. .jiajinghuatit {
  1569. width: 100%;
  1570. height: 68rpx;
  1571. font-size: 30rpx;
  1572. text-align: center;
  1573. line-height: 68rpx;
  1574. }
  1575. .jiajinghuaview {
  1576. padding: 18rpx 18rpx 18rpx 18rpx;
  1577. display: flex;
  1578. flex-wrap: wrap;
  1579. .jiajinghuaview1 {
  1580. padding: 8rpx 8rpx 8rpx 8rpx;
  1581. font-size: 26rpx;
  1582. border-radius: 12rpx;
  1583. border: 1px solid #979797;
  1584. margin-left: 8rpx;
  1585. }
  1586. .jighuaview2 {
  1587. padding: 8rpx 18rpx 8rpx 18rpx;
  1588. font-size: 26rpx;
  1589. border-radius: 12rpx;
  1590. border: 1px solid #979797;
  1591. margin-left: 20rpx;
  1592. margin-top: 10rpx;
  1593. display: flex;
  1594. .view1-text {
  1595. text-align: center;
  1596. }
  1597. .view1-img {
  1598. width: 50rpx;
  1599. }
  1600. }
  1601. }
  1602. .bounced3 {
  1603. height: 100upx;
  1604. width: 100%;
  1605. margin-top: 40upx;
  1606. border-top: 1px solid #dddddd;
  1607. display: flex;
  1608. }
  1609. .bounced3-1 {
  1610. width: 50%;
  1611. height: 100%;
  1612. text-align: center;
  1613. line-height: 100upx;
  1614. border-right: 1px solid #dddddd;
  1615. font-size: 36upx;
  1616. color: #999999;
  1617. }
  1618. .bounced3-2 {
  1619. width: 50%;
  1620. height: 100%;
  1621. text-align: center;
  1622. line-height: 100upx;
  1623. font-size: 36upx;
  1624. color: #108ee9;
  1625. }
  1626. }
  1627. .viewclace{
  1628. width: 100rpx;
  1629. height: 40rpx;
  1630. text-align: center;
  1631. line-height: 40rpx;
  1632. border-radius: 14rpx;
  1633. margin-right: 34rpx;
  1634. margin-top: 16rpx;
  1635. font-size: 24rpx;
  1636. }
  1637. .bosdttom{
  1638. color: #FFFFFF;
  1639. background-color: #2671E2;
  1640. }
  1641. .dialog-block {
  1642. margin: 20rpx 0;
  1643. border-bottom: 1px solid #ccc;
  1644. .fileName {
  1645. text-align: center;
  1646. margin: 10rpx auto;
  1647. width: 115rpx;
  1648. height: 42rpx;
  1649. line-height: 42rpx;
  1650. background: #EFEFEF;
  1651. border-radius: 4rpx;
  1652. font-size: 20rpx;
  1653. font-weight: 400;
  1654. color: #333333;
  1655. }
  1656. }
  1657. .scroll-Y {
  1658. font-size: 36upx;
  1659. color: #999999;
  1660. background: #FFFFFF;
  1661. margin-top: 30upx;
  1662. flex: 1;
  1663. overflow-y: scroll;
  1664. width: 100%;
  1665. }
  1666. .scroll-Y .text {
  1667. margin: 50upx 30upx;
  1668. line-height: 80upx;
  1669. display: flex;
  1670. align-items: center;
  1671. }
  1672. .scroll-Y .text[data-speaker="2"],
  1673. .scroll-Y .text[data-speaker="4"],
  1674. .scroll-Y .text[data-speaker="6"] {
  1675. flex-direction: row-reverse;
  1676. text-align: right;
  1677. .content {
  1678. margin-left: 0;
  1679. margin-right: 30upx;
  1680. background: #F6F6F6;
  1681. color: #999999;
  1682. }
  1683. }
  1684. .scroll-Y .text .avatar {
  1685. width: 64upx;
  1686. height: 64upx;
  1687. line-height: 64upx;
  1688. text-align: center;
  1689. // border: 1rpx solid red;
  1690. font-size: 36rpx;
  1691. border-radius: 50%;
  1692. background: #F2F2F2;
  1693. color: #008EF2;
  1694. // display: flex;
  1695. // justify-content: center;
  1696. // align-items: center;
  1697. image {
  1698. width: 40upx;
  1699. }
  1700. }
  1701. .scroll-Y .text .content {
  1702. margin-left: 30upx;
  1703. line-height: 60rpx;
  1704. text-align: left;
  1705. padding: 0 5px;
  1706. background: #2BC805;
  1707. border-radius: 8upx;
  1708. max-width: 442rpx;
  1709. color: #FFFFFF;
  1710. position: relative;
  1711. .tankuangcss {
  1712. position: absolute;
  1713. top: -140rpx;
  1714. left: -120rpx;
  1715. width: 308rpx;
  1716. height: 130rpx;
  1717. background-color: #333333;
  1718. font-size: 24rpx;
  1719. color: #FFFFFF;
  1720. padding-top: 4rpx;
  1721. padding-bottom: 4rpx;
  1722. display: flex;
  1723. flex-wrap: wrap;
  1724. border-radius: 15rpx;
  1725. z-index: 1000;
  1726. }
  1727. }
  1728. .scroll-Y .text.active .content {
  1729. color: #38FFF1;
  1730. position: relative;
  1731. }
  1732. .scroll-Y .text.active[data-speaker="2"] .content,
  1733. .scroll-Y .text.active[data-speaker="4"] .content,
  1734. .scroll-Y .text.active[data-speaker="6"] .content {
  1735. color: #FF7538;
  1736. position: relative;
  1737. }
  1738. .backTop {
  1739. width: 60upx;
  1740. height: 60upx;
  1741. background: rgba(211, 235, 253, 1);
  1742. box-shadow: 0upx 0upx 2upx 4upx rgba(38, 161, 255, 0.04);
  1743. border-radius: 50%;
  1744. position: fixed;
  1745. bottom: 200upx;
  1746. right: 8upx;
  1747. display: flex;
  1748. justify-content: center;
  1749. align-items: center;
  1750. image {
  1751. width: 26upx;
  1752. height: 34upx;
  1753. }
  1754. }
  1755. // 评分
  1756. .rate-box {
  1757. padding: 10rpx 20rpx;
  1758. .date {
  1759. width: 300rpx;
  1760. height: 33rpx;
  1761. font-size: 24rpx;
  1762. font-weight: 400;
  1763. color: #333333;
  1764. line-height: 33rpx;
  1765. letter-spacing: 1rpx;
  1766. margin-bottom: 8rpx;
  1767. }
  1768. .title {
  1769. width: 100%;
  1770. height: 42rpx;
  1771. font-size: 30rpx;
  1772. font-weight: 500;
  1773. color: #333333;
  1774. line-height: 42rpx;
  1775. letter-spacing: 2rpx;
  1776. margin-bottom: 20rpx;
  1777. }
  1778. .level1 {
  1779. display: flex;
  1780. align-items: center;
  1781. .level-name {
  1782. width: 104rpx;
  1783. height: 33rpx;
  1784. font-size: 24rpx;
  1785. font-weight: 500;
  1786. color: #333333;
  1787. line-height: 33rpx;
  1788. letter-spacing: 1rpx;
  1789. margin-right: 10rpx;
  1790. }
  1791. .level-progress {
  1792. flex: 1;
  1793. border-radius: 11rpx;
  1794. height: 21rpx;
  1795. background-color: #F2F2F2;
  1796. position: relative;
  1797. .color {
  1798. width: 0;
  1799. position: absolute;
  1800. top: 0;
  1801. left: 0;
  1802. height: 21rpx;
  1803. border-radius: 11rpx 0 0 11rpx;
  1804. background-color: #60D7A0;
  1805. }
  1806. }
  1807. .level-rate {
  1808. width: 65rpx;
  1809. height: 33rpx;
  1810. font-size: 24rpx;
  1811. font-weight: 500;
  1812. color: #333333;
  1813. line-height: 33rpx;
  1814. letter-spacing: 1rpx;
  1815. margin: 0 20rpx 0 15rpx;
  1816. }
  1817. .arrow {
  1818. width: 34rpx;
  1819. height:26rpx;
  1820. padding: 5rpx 20rpx;
  1821. }
  1822. .rotatearrow {
  1823. transform: rotate(270deg);
  1824. }
  1825. }
  1826. .level1-subbox {
  1827. display: flex;
  1828. margin-top: 20rpx;
  1829. flex-wrap: wrap;
  1830. .sub-name {
  1831. width: 50%;
  1832. display: flex;
  1833. margin-bottom: 18rpx;
  1834. .subitem-name {
  1835. width: 104rpx;
  1836. height: 33rpx;
  1837. font-size: 24rpx;
  1838. font-weight: 400;
  1839. color: #999999;
  1840. line-height: 33rpx;
  1841. letter-spacing: 1rpx;
  1842. margin-right: 12rpx;
  1843. }
  1844. .checkimg {
  1845. width: 27rpx;
  1846. height: 27rpx;
  1847. }
  1848. }
  1849. }
  1850. }
  1851. .jiangshang{
  1852. color: #2671E2;
  1853. background: #F4F8FD;
  1854. }
  1855. // 表单
  1856. .tian-view {
  1857. width: 570upx;
  1858. background-color: #FFFFFF;
  1859. border-bottom: 1px solid #ededee;
  1860. display: flex;
  1861. min-height: 96rpx;
  1862. .tian-view-t1 {
  1863. width: 20rpx;
  1864. font-size: 34rpx;
  1865. height: 34rpx;
  1866. line-height: 110rpx;
  1867. letter-spacing: 0px;
  1868. color: red;
  1869. }
  1870. .tian-view-t2 {
  1871. width: 30%;
  1872. min-height: 96rpx;
  1873. line-height: 96rpx;
  1874. font-size: 34rpx;
  1875. color: #333;
  1876. }
  1877. .tian-view-t3 {
  1878. width: 61%;
  1879. padding-top: 31rpx;
  1880. padding-bottom: 31rpx;
  1881. display: flex;
  1882. .tian-input {
  1883. width: 98%;
  1884. font-size: 34rpx;
  1885. border: none;
  1886. }
  1887. }
  1888. }
  1889. .inputbox{
  1890. width: 100%;
  1891. height: 100rpx;
  1892. display: flex;
  1893. align-items: center;
  1894. justify-content: center;
  1895. border-bottom: 1px solid #E0E0E0;
  1896. .thisinput{
  1897. width:94%;
  1898. height: 52rpx;
  1899. background: #FFFFFF;
  1900. border-radius: 8rpx;
  1901. border: 1px solid #C9C9C9;
  1902. color: #333333;
  1903. font-size: 26rpx;
  1904. text-indent: 26rpx;
  1905. line-height: 52rpx;
  1906. }
  1907. }
  1908. .biaoqiantom {
  1909. background-color: #008EF2;
  1910. color: #FFFFFF;
  1911. border: none;
  1912. }
  1913. </style>