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.
 
 
 
 

1621 lines
35 KiB

  1. <template>
  2. <view class="translation" @click="changeEditing(false)">
  3. <view class="top" style="margin-top: 30rpx;">
  4. <view class="title">
  5. <view class="call_record_time">{{date}}</view>
  6. <view class="hash" @click="gotoChat" v-if="commentList.length != 0">
  7. 查看全部评论
  8. </view>
  9. </view>
  10. <view class="call_record_time_one">接待时长 {{alltimeStr}}
  11. <u-icon name="list-dot" color="#333" size="48" @click="showFile"></u-icon>
  12. <view class="file-change" v-if="isshowFile">
  13. <view class="file-item" v-for="(item,index) in luyinList" :key="index"
  14. @click="filechange(item,index)" :class="{fileactive: csdFileindex == index}">录音文件{{index+1}}
  15. </view>
  16. </view>
  17. </view>
  18. <zaudio :duration="duration" theme="theme4"></zaudio>
  19. </view>
  20. <scroll-view :scroll-top="scrollTop" lower-threshold='20px' @scrolltolower="ltolower()"
  21. :scroll-into-view="scrollId" scroll-y="true" class="text scroll-Y">
  22. <!-- 音频识别模块 -->
  23. <view>
  24. <!-- 聊天记录-->
  25. <view class="dialog-block" v-for="(dialog,i) in dialogList" :key="i">
  26. <view :id="'dialog'+i" class="fileName">录音文件</view>
  27. <view class="text dingweishiy" :id="'dialog'+csdFileindex+'text'+item.bg"
  28. :class="{active: Math.floor(item.bg/1000) <= playNow && Math.floor(item.ed/1000) > playNow && i==0}"
  29. v-for="(item,index) in dialog.message" :key="index" :data-speaker="item.speaker">
  30. <view class="avatar">
  31. <text :style="[SPEAKERSTYLE(item.speaker)]">{{ item.speaker | toCapital }}</text>
  32. </view>
  33. <view class="content">
  34. <view v-html="item.onebest"></view>
  35. </view>
  36. <view class="tankuangcss" v-if="startTime==item.bg">
  37. <view style="max-width: 85rpx; height: 38rpx;font-size: 24rpx;color: #333333;text-align: center;line-height: 38rpx;
  38. border-radius: 2rpx;border: 1px solid #979797;">标签</view>
  39. <view style="max-width: 171rpx;height: 38rpx;background: #008EF2;border-radius: 2rpx;display: flex;
  40. align-items: center;margin-left: 10rpx;" @click="dianjibiaoqian()">
  41. <view style="width: 126rpx;height: 38rpx;line-height: 38rpx;font-size: 24rpx;color: #FFFFFF;
  42. text-align: center; overflow: hidden;">{{biaoqian}}</view>
  43. <view v-if="biaoqian.length>4" style="width: 37rpx;height: 37rpx;line-height: 37rpx;">
  44. <u-icon name="chat-fill" color="#ffffff" size="32rpx"></u-icon>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="biaoqianya" v-if="startTime==item.bg">
  49. <view class="biaoqianyaisshow" v-if="biaoqianyaisshow">
  50. {{biaoqian}}
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. <!-- 点赞 -->
  56. <view class="likeArea" :class="{'liked':isLiked}">
  57. <image
  58. :src="isLiked?'/static/images/recordingManagement/likeActive.png':'/static/images/recordingManagement/like_gray.png'"
  59. mode=""></image>
  60. </view>
  61. <view class="hash" id="hash">
  62. </view>
  63. </view>
  64. </scroll-view>
  65. <!-- 评语列表 -->
  66. <u-popup v-model="watchAllCommit" mode="bottom">
  67. <scroll-view scroll-y style="height: 70vh;">
  68. <view class="boxs">
  69. <!-- 评语列表 -->
  70. <view class="chat">
  71. <view class="total">
  72. 全部评论(共{{commentList.length}}条)
  73. </view>
  74. <view class="list">
  75. <view class="message" v-for="(item,index) in commentList" :key="index">
  76. <u-avatar class="avator" size="72"
  77. :src="item.commentPic ||'https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/my/headPicture.png'">
  78. </u-avatar>
  79. <view class="right">
  80. <view class="name">
  81. {{item.commentName||"未知昵称"}}
  82. </view>
  83. <view class="subtitle" v-if="item.commentAutoGraph">
  84. {{item.commentAutoGraph}}
  85. </view>
  86. <view class="answer" v-if="item.replyName">
  87. 回复@{{item.replyName}}
  88. </view>
  89. <view class="content" v-if="item.content">
  90. {{item.content}}
  91. </view>
  92. <view class="pic" v-if="item.picUrl">
  93. <image style="width: 100%;max-width: 240px;" :src="item.picUrl" mode="widthFix">
  94. </image>
  95. </view>
  96. <view class="bottom">
  97. <view class="time">
  98. {{item.createTime}}
  99. </view>
  100. <view class="button" v-if="myId != item.commentUser"
  101. @click.stop="answer(item.commentUser,item.id)">
  102. 回复
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. <!-- 写评价 -->
  110. <view class="bottomArea">
  111. <image class="voice" @click.stop="changeVoiceShow"
  112. src="/static/images/recordingManagement/voice.png" mode=""></image>
  113. <view class="inputArea">
  114. <textarea :value="content" :focus="textareaFocus" type="text" @input="changeContent"
  115. :auto-height="true" class="editor" :class="{'active':editing}"
  116. @click.stop="changeEditing(true)" @confirm="sendComment">
  117. </textarea>
  118. <view class="placeholder" :class="{'editing':editing}" v-if="!content && !editing">写评价
  119. </view>
  120. <image class="edit" v-if="!editing && content == ''"
  121. src="/static/images/recordingManagement/edit.png" mode=""></image>
  122. </view>
  123. <image class="like" v-if="myId != createUser && !editing" @click="changeLike"
  124. src="/static/images/recordingManagement/like.png" mode=""></image>
  125. <image class="add" @click.stop="uploadImage" v-if="!editing && content == ''"
  126. src="/static/images/recordingManagement/add.png" mode=""></image>
  127. <view class="send" @click="sendComment" v-if="content!=''">
  128. 发送
  129. </view>
  130. </view>
  131. </view>
  132. </scroll-view>
  133. </u-popup>
  134. <!-- 语音输入 -->
  135. <cover-view class="voiceContent" v-if="voiceShow" @click="changeVoiceShow">
  136. <cover-view class="box" @click.stop="" @touchstart="voiceStart" @touchend="voiceEnd">
  137. <cover-view class="center">
  138. <cover-image class="voice" src="/static/images/voice.png" mode="widthFix"></cover-image>
  139. <cover-view class="text">
  140. {{isRecording?'正在输入':'长按语音输入'}}
  141. </cover-view>
  142. </cover-view>
  143. </cover-view>
  144. </cover-view>
  145. </view>
  146. </template>
  147. <script>
  148. var app = getApp();
  149. var util = require("../../../utils/util.js");
  150. var config = require("../../../config");
  151. var plugin = requirePlugin("WechatSI")
  152. let manager = plugin.getRecordRecognitionManager();
  153. import zaudio from '@/components/uniapp-zaudio/zaudio';
  154. export default {
  155. components: {
  156. zaudio
  157. },
  158. data() {
  159. return {
  160. dialogList: [], // 录音对话转移列表
  161. isshowFile: false, // 录音文件默认隐藏
  162. luyinList: [], //录音文件列表
  163. fileIndex: 0, //文件索引
  164. fileId: '', //选中的录音ID
  165. id: "",
  166. audioStop: false,
  167. customerId: '',
  168. date: "",
  169. time: "",
  170. message: "", //聊天记录表
  171. durationTimeStr: "",
  172. autoLoad: true,
  173. playNow: 0,
  174. scrollTop: 0,
  175. scrollId: "",
  176. editing: false,
  177. isLiked: null,
  178. createUser: null,
  179. commentList: [], //评论列表
  180. content: "",
  181. voiceShow: false,
  182. isRecording: false,
  183. answerUserId: null,
  184. answerId: null,
  185. textareaFocus: false,
  186. myId: uni.getStorageSync("weapp_session_userInfo_data").accountId,
  187. startTime: "",
  188. alltimeStr: "00:00",
  189. end: false,
  190. recordPath: "",
  191. csdFileindex: 0,
  192. biaoqian: "",
  193. biaoqianyaisshow: false,
  194. startFile: '',
  195. num: 0, //上拉 转写文件下标
  196. timer: null,
  197. Bnum: 0, //下拉 转写文件下标
  198. watchAllCommit: false, // 查看全部评论
  199. ACTION: Symbol('zaudio'), // 唯一值区分每个页面的方法
  200. isPageHide: false, // 是否息屏
  201. duration: '', // 播放时长
  202. };
  203. },
  204. onLoad(options) {
  205. this.startTime = options.startTime
  206. this.customerId = options.customerId,
  207. this.biaoqian = options.biaoqian;
  208. this.startFile = options.startFile;
  209. this.getdianzan()
  210. this.getCommentList();
  211. this.getView()
  212. let that = this
  213. this.timer = setTimeout(function() {
  214. that.addHot()
  215. }, 30000)
  216. //注意: 不同的回调方法, 相同的业务函数方法名, 不会相互影响;
  217. this.$zaudio.on('stop', this.ACTION, () => {
  218. console.log('我是强制暂停或关闭小程序音频浮窗触发的')
  219. })
  220. this.$zaudio.on('seek', this.ACTION, (time) => {
  221. this.sliderChangeComplate(this.TIMEEVENT(time))
  222. })
  223. this.$zaudio.on('playing', this.ACTION, (obj) => {
  224. this.duration = obj.duration
  225. this.TimeUpdate(this.TIMEEVENT(obj.current))
  226. })
  227. this.$zaudio.on('ended', this.ACTION, e => {
  228. this.qeihuanwenjian()
  229. })
  230. },
  231. onShow() {
  232. this.initRecord();
  233. !this.isPageHide && this.getluyinList();
  234. },
  235. onHide() {
  236. this.isPageHide = true
  237. },
  238. onUnload() {
  239. //卸载不需要的业务和获取播放状态的业务,提高页面性能
  240. this.$zaudio.off('seek', this.ACTION);
  241. this.$zaudio.off('stop', this.ACTION);
  242. this.$zaudio.off('playing', this.ACTION);
  243. this.$zaudio.off('ended', this.ACTION);
  244. },
  245. methods: {
  246. addHot() {
  247. // console.log('30')
  248. this.$u.post('/zkstudyrecord', {
  249. targetId: this.customerId
  250. })
  251. .then(res => {
  252. // console.log(res)
  253. })
  254. },
  255. getView() {
  256. this.$u.get('/addtodigest/addPageviews', {
  257. id: this.customerId
  258. })
  259. .then(res => {
  260. // console.log(res)
  261. })
  262. // uni.request({
  263. // url: config.service.getView,
  264. // method: "POST",
  265. // data: {id:this.customerId},
  266. // header: {
  267. // 'content-type': 'application/json',
  268. // 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  269. // },
  270. // success: (data) => {
  271. // console.log(data)
  272. // }
  273. // })
  274. },
  275. TimeUpdate(currentTime) {
  276. this.playNow = Number(currentTime)
  277. if (this.dialogList.length == 0) {
  278. return
  279. } else {
  280. const message = this.dialogList[0].message;
  281. if (!message) return
  282. for (let i = 0; i < message.length; i++) {
  283. if ((Math.floor(message[i].bg / 1000) <= this.playNow && this.playNow < Math.floor(message[i].ed /
  284. 1000))) {
  285. this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg;
  286. break;
  287. }
  288. if (i < message.length - 1 && Math.floor(message[i].ed / 1000) < this.playNow && this.playNow <
  289. Math.floor(message[i + 1].bg / 1000)) {
  290. this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg;
  291. break;
  292. }
  293. }
  294. }
  295. this.$forceUpdate()
  296. },
  297. //下一页
  298. ltolower() {
  299. var lengthcz = this.luyinList.length - 1;
  300. if (this.num >= lengthcz) {
  301. uni.showToast({
  302. title: '到底了',
  303. duration: 2000
  304. });
  305. return
  306. } else {
  307. this.num = this.num + 1;
  308. uni.showLoading({
  309. title: '加载中'
  310. });
  311. setTimeout(function() {
  312. uni.hideLoading();
  313. }, 2000);
  314. uni.request({
  315. url: config.service.getCorpusAnalysis + '?corpusId=' + this.luyinList[this.num].id +
  316. "&customerId=" + this.customerId, //仅为示例,并非真实接口地址。
  317. method: "GET",
  318. header: {
  319. 'content-type': 'application/json',
  320. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  321. },
  322. success: (data) => {
  323. if (data.data.code == 10000) {
  324. if (data.data.data.audioContent.length == 0) {
  325. setTimeout(function() {
  326. uni.hideLoading();
  327. }, 2000);
  328. } else {
  329. const jsonInfo = JSON.parse(data.data.data.audioContent);
  330. this.dialogList.push({
  331. message: jsonInfo
  332. });
  333. this.dialogList.forEach((asd, idx) => {
  334. asd.message.forEach((qwe, inde) => {
  335. qwe.isshow = false;
  336. })
  337. })
  338. }
  339. }
  340. },
  341. })
  342. }
  343. },
  344. //点击标签
  345. dianjibiaoqian() {
  346. if (this.biaoqian.length > 4) {
  347. this.biaoqianyaisshow = !this.biaoqianyaisshow;
  348. }
  349. },
  350. //获取点赞列表isLiked likegetLike
  351. getdianzan() {
  352. uni.request({
  353. url: config.service.likegetLike + '?targetId=' + this.customerId, //仅为示例,并非真实接口地址。
  354. method: "GET",
  355. header: {
  356. 'content-type': 'application/json',
  357. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  358. },
  359. success: (data) => {
  360. if (data.data.code == 10000) {
  361. this.isLiked = data.data.data.like;
  362. } else {
  363. uni.hideLoading();
  364. uni.showModal({
  365. title: '提示',
  366. content: '请求数据失败,请重新尝试',
  367. showCancel: false
  368. });
  369. }
  370. },
  371. fail(error) {
  372. uni.hideLoading();
  373. uni.showModal({
  374. title: '提示',
  375. content: '网络异常,请重新尝试',
  376. showCancel: false
  377. });
  378. return false;
  379. }
  380. });
  381. },
  382. // 获取评论列表
  383. getCommentList() {
  384. const that = this;
  385. util.getRequestPromise(config.service.cmmentList + '?targetId=' + this.customerId, {}, false, "GET").then(
  386. data => {
  387. let tmp = data;
  388. tmp.reverse();
  389. that.commentList = tmp;
  390. });
  391. },
  392. // 获取录音记录列表
  393. getluyinList() {
  394. const parames = {
  395. pageNum: 1,
  396. pageSize: 100,
  397. query: {
  398. whetherFinish: 1,
  399. customerId: this.customerId,
  400. id: this.startFile
  401. }
  402. }
  403. this.$u.post("/corpus/fendianFindByPage", parames).then(res => {
  404. try {
  405. let alltime = 1;
  406. res.forEach(item => {
  407. alltime = item.recordDuration
  408. })
  409. this.alltimeStr = this.getTime(alltime)
  410. res.forEach((cet, index) => {
  411. if (cet.id == this.startFile) {
  412. this.csdFileindex = index;
  413. this.recordPath = res[index].recordPath
  414. this.date = res[index].receptionTime
  415. this.num = index; //下拉起始位置
  416. this.Bnum = index;
  417. this.luyinList = res;
  418. this.zyAudio();
  419. this.getCorpusAnalysis()
  420. var itc = parseInt(this.startTime / 1000)
  421. this.adasdasdasd(itc)
  422. } else {
  423. console.log("my")
  424. }
  425. })
  426. } catch (e) {
  427. console.log(e)
  428. }
  429. })
  430. },
  431. //首次跳转
  432. adasdasdasd(e) {
  433. this.stepPlay(e)
  434. },
  435. //录音文件切换隐藏
  436. showFile() {
  437. this.isshowFile = !this.isshowFile
  438. },
  439. changeVoiceShow() {
  440. this.voiceShow = !this.voiceShow;
  441. },
  442. voiceStart: function() {
  443. manager.start({
  444. lang: "zh_CN"
  445. });
  446. },
  447. voiceEnd: function() {
  448. // uni.showToast();
  449. if (this.isRecording) {
  450. uni.showLoading({
  451. title: "识别中"
  452. })
  453. }
  454. this.voiceShow = false;
  455. this.isRecording = false;
  456. manager.stop();
  457. },
  458. // 语音初始化
  459. initRecord() {
  460. const that = this;
  461. manager.onStart = function(res) {
  462. that.isRecording = true;
  463. // this.voiceState = "onStart:" + res.msg + "正在录音"
  464. };
  465. //有新的识别内容返回,则会调用此事件
  466. manager.onRecognize = (res) => {
  467. console.log('ing' + res.result);
  468. }
  469. // 识别结束事件
  470. manager.onStop = (res) => {
  471. uni.hideLoading();
  472. let newText = that.content + res.result;
  473. if (newText.length > 140) {
  474. newText = newText.substring(0, 140)
  475. }
  476. that.content = newText;
  477. that.textareaFocus = true;
  478. }
  479. // 识别错误事件
  480. manager.onError = (res) => {
  481. uni.hideLoading();
  482. }
  483. },
  484. //音频前进回退
  485. sliderChangeComplate(currentTime) {},
  486. // 获取转义后的对话结果
  487. getCorpusAnalysis() {
  488. this.dialogList = [];
  489. uni.showLoading({
  490. title: '加载中'
  491. });
  492. uni.request({
  493. url: config.service.getCorpusAnalysis + '?corpusId=' + this.luyinList[this.csdFileindex].id +
  494. "&customerId=" + this.customerId, //仅为示例,并非真实接口地址。
  495. method: "GET",
  496. header: {
  497. 'content-type': 'application/json',
  498. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  499. },
  500. success: (data) => {
  501. if (data.data.code == 10000) {
  502. const jsonInfo = JSON.parse(data.data.data.audioContent);
  503. this.dialogList.push({
  504. message: jsonInfo
  505. });
  506. setTimeout(function() {
  507. uni.hideLoading();
  508. }, 2000);
  509. } else {
  510. uni.hideLoading();
  511. uni.showModal({
  512. title: '提示',
  513. content: '请求数据失败,请重新尝试',
  514. showCancel: false
  515. });
  516. }
  517. },
  518. fail(error) {
  519. uni.hideLoading();
  520. uni.showModal({
  521. title: '提示',
  522. content: '网络异常,请重新尝试',
  523. showCancel: false
  524. });
  525. return false;
  526. }
  527. });
  528. },
  529. getTime(time) {
  530. return util.formatSecond(time)
  531. },
  532. // 文件切换播放
  533. filechange(item, i) {
  534. this.num = i; //下拉起始位置
  535. this.Bnum = i;
  536. this.csdFileindex = i;
  537. this.recordPath = item.recordPath;
  538. this.date = item.receptionTime;
  539. this.isshowFile = false;
  540. setTimeout(() => {
  541. this.$zaudio.operate(i)
  542. }, 50)
  543. this.getCorpusAnalysis()
  544. },
  545. // 自动播放下一个文件
  546. qeihuanwenjian() {
  547. let index = this.csdFileindex + 1;
  548. if (index < this.luyinList.length) {
  549. this.csdFileindex = index;
  550. this.getCorpusAnalysis()
  551. let item = this.luyinList[this.csdFileindex];
  552. let i = this.csdFileindex;
  553. this.filechange(item, i)
  554. }
  555. },
  556. formatTime(num) {
  557. //格式化时间格式
  558. num = num.toFixed(0);
  559. let second = num % 60;
  560. if (second < 10) second = '0' + second;
  561. let min = Math.floor(num / 60);
  562. if (min < 10) min = '0' + min;
  563. return min + ":" + second;
  564. },
  565. changeContent(e) {
  566. this.content = e.detail.value;
  567. },
  568. answer(userId, tid) {
  569. this.answerId = tid;
  570. this.answerUserId = userId;
  571. this.editing = true;
  572. this.textareaFocus = true;
  573. },
  574. // 保存评论
  575. sendComment() {
  576. if (this.content == "") {
  577. uni.showToast({
  578. icon: "none",
  579. title: "请输入标题"
  580. })
  581. return;
  582. }
  583. let parames = {
  584. targetId: this.customerId,
  585. content: this.content,
  586. commentType: 1
  587. };
  588. if (this.answerUserId) {
  589. parames.replyCommentId = this.answerId;
  590. parames.replyUser = this.answerUserId;
  591. }
  592. const that = this;
  593. util.getRequestPromise(config.service.saveCmment, parames, false).then(data => {
  594. that.getCommentList();
  595. uni.showToast({
  596. title: "评论成功",
  597. icon: "none"
  598. })
  599. that.textareaFocus = false;
  600. that.content = "";
  601. });
  602. },
  603. uploadImage() {
  604. const that = this;
  605. var parames = {
  606. targetId: that.id,
  607. commentType: 1
  608. };
  609. if (this.answerUserId) {
  610. parames.replyCommentId = this.answerId;
  611. parames.replyUser = this.answerUserId;
  612. }
  613. uni.chooseImage({
  614. count: 1, //默认9
  615. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  616. sourceType: ['album', 'camera'],
  617. success: function(res) {
  618. uni.showLoading({
  619. title: "上传中"
  620. })
  621. uni.uploadFile({
  622. url: config.service.saveCmmentUpload,
  623. filePath: res.tempFilePaths[0],
  624. name: 'file',
  625. header: {
  626. 'Authorization': 'Bearer ' + uni.getStorageSync(
  627. 'weapp_session_login_data').token
  628. },
  629. formData: parames,
  630. success: (uploadFileRes) => {
  631. that.getCommentList();
  632. uni.hideLoading();
  633. uni.showToast({
  634. icon: "none",
  635. title: "上传成功"
  636. })
  637. console.log(uploadFileRes.data);
  638. }
  639. });
  640. }
  641. });
  642. },
  643. uploadAudio() {
  644. },
  645. changeLike() {
  646. uni.showLoading({
  647. title: "请求中",
  648. mask: true
  649. })
  650. if (this.isLiked) {
  651. this.cancelLike();
  652. } else {
  653. this.saveLike();
  654. }
  655. },
  656. // 点赞
  657. saveLike() {
  658. const that = this;
  659. util.getRequestPromise(config.service.saveLike, {
  660. targetId: this.customerId
  661. }, false).then(data => {
  662. that.isLiked = true;
  663. uni.hideLoading();
  664. uni.showToast({
  665. icon: "none",
  666. title: "点赞成功"
  667. })
  668. });
  669. },
  670. // 取消点赞
  671. cancelLike() {
  672. const that = this;
  673. util.getRequestPromise(config.service.cancelLike, {
  674. targetId: this.customerId
  675. }, false).then(data => {
  676. that.isLiked = false;
  677. uni.hideLoading();
  678. uni.showToast({
  679. icon: "none",
  680. title: "取消点赞成功"
  681. })
  682. });
  683. },
  684. gotoChat() {
  685. this.watchAllCommit = true
  686. console.log('dsakldjklasjdklas')
  687. },
  688. gotoTop() {
  689. this.scrollId = null;
  690. this.$nextTick(() => {
  691. this.scrollId = "top";
  692. })
  693. },
  694. changeEditing(type) {
  695. this.editing = type;
  696. this.answerId = null;
  697. this.answerUserId = null;
  698. this.textareaFocus = false;
  699. this.dialogList.forEach(res => {
  700. res.message.forEach(asd => {
  701. asd.isshow = false;
  702. })
  703. })
  704. },
  705. //录音实例
  706. zyAudio() {
  707. let data = this.luyinList.map((item, index) => {
  708. return {
  709. src: item.recordPath,
  710. title: `录音文件${index + 1}`,
  711. singer: '',
  712. coverImgUrl: ''
  713. }
  714. })
  715. this.$zaudio.setAudio(data)
  716. //渲染第一首音频
  717. this.$zaudio.setRender(0)
  718. },
  719. // 跳转指定位置播放
  720. stepPlay(t) {
  721. this.$zaudio.seek(t)
  722. if (this.$zaudio.paused) {
  723. this.$zaudio.operate()
  724. }
  725. },
  726. }
  727. };
  728. </script>
  729. <style lang="scss" scoped>
  730. .audio-container {
  731. width: 100%;
  732. display: flex;
  733. justify-content: space-between;
  734. align-items: center;
  735. .audio-head {
  736. width: 60rpx;
  737. height: 60rpx;
  738. flex-shrink: 0;
  739. }
  740. .audio-head .image {
  741. width: 100%;
  742. height: 100%;
  743. }
  744. .audio-slider {
  745. width: 96%;
  746. position: relative;
  747. padding: 2px 0rpx 0px 20px;
  748. display: flex;
  749. justify-content: space-between;
  750. align-items: center;
  751. }
  752. .audio-slider .slider {
  753. width: 100%;
  754. padding: 0px 15rpx;
  755. box-sizing: border-box;
  756. }
  757. .audio-time {
  758. width: 110rpx;
  759. text-align: right;
  760. font-size: 24rpx;
  761. line-height: 28rpx;
  762. color: #70798D;
  763. display: flex;
  764. justify-content: space-between;
  765. }
  766. .audio-play {
  767. width: 40rpx;
  768. height: 40rpx;
  769. flex-shrink: 0;
  770. }
  771. .audio-play .image {
  772. width: 100%;
  773. height: 100%;
  774. }
  775. }
  776. .biaoqiantom {
  777. background-color: #008EF2;
  778. color: #FFFFFF;
  779. border: none;
  780. }
  781. // 表单
  782. .tian-view {
  783. width: 570upx;
  784. background-color: #FFFFFF;
  785. border-bottom: 1px solid #ededee;
  786. display: flex;
  787. min-height: 96rpx;
  788. .tian-view-t1 {
  789. width: 20rpx;
  790. font-size: 34rpx;
  791. height: 34rpx;
  792. line-height: 110rpx;
  793. letter-spacing: 0px;
  794. color: red;
  795. }
  796. .tian-view-t2 {
  797. width: 30%;
  798. min-height: 96rpx;
  799. line-height: 96rpx;
  800. font-size: 34rpx;
  801. color: #333;
  802. }
  803. .tian-view-t3 {
  804. width: 61%;
  805. padding-top: 31rpx;
  806. padding-bottom: 31rpx;
  807. display: flex;
  808. .tian-input {
  809. width: 98%;
  810. font-size: 34rpx;
  811. border: none;
  812. }
  813. }
  814. }
  815. .zhezhoa {
  816. position: fixed;
  817. top: 0;
  818. left: 0;
  819. z-index: 999;
  820. width: 100%;
  821. height: 100vh;
  822. opacity: 0.5;
  823. background-color: #666666;
  824. }
  825. .bounced {
  826. width: 570upx;
  827. background: #FFFFFF;
  828. z-index: 1000;
  829. border-radius: 10upx;
  830. position: fixed;
  831. left: 50%;
  832. top: 50%;
  833. transform: translate(-50%, -50%);
  834. /* 50%为自身尺寸的一半 */
  835. .jiajinghuatit {
  836. width: 100%;
  837. height: 68rpx;
  838. font-size: 30rpx;
  839. text-align: center;
  840. line-height: 68rpx;
  841. }
  842. .jiajinghuaview {
  843. padding: 18rpx 18rpx 18rpx 18rpx;
  844. display: flex;
  845. flex-wrap: wrap;
  846. .jiajinghuaview1 {
  847. padding: 8rpx 8rpx 8rpx 8rpx;
  848. font-size: 26rpx;
  849. border-radius: 12rpx;
  850. border: 1px solid #979797;
  851. margin-left: 8rpx;
  852. }
  853. .jighuaview2 {
  854. padding: 8rpx 8rpx 8rpx 8rpx;
  855. font-size: 26rpx;
  856. border-radius: 12rpx;
  857. border: 1px solid #979797;
  858. margin-left: 8rpx;
  859. display: flex;
  860. .view1-text {
  861. text-align: center;
  862. // border-right: 1rpx solid red;
  863. }
  864. .view1-img {
  865. width: 50rpx;
  866. }
  867. }
  868. }
  869. .bounced3 {
  870. height: 100upx;
  871. width: 100%;
  872. margin-top: 40upx;
  873. border-top: 1px solid #dddddd;
  874. display: flex;
  875. }
  876. .bounced3-1 {
  877. width: 50%;
  878. height: 100%;
  879. text-align: center;
  880. line-height: 100upx;
  881. border-right: 1px solid #dddddd;
  882. font-size: 36upx;
  883. color: #999999;
  884. }
  885. .bounced3-2 {
  886. width: 50%;
  887. height: 100%;
  888. text-align: center;
  889. line-height: 100upx;
  890. font-size: 36upx;
  891. color: #108ee9;
  892. }
  893. }
  894. .bosdttom {
  895. color: #008EF2;
  896. }
  897. .tab-box {
  898. width: 100%;
  899. display: flex;
  900. justify-content: center;
  901. align-items: center;
  902. .yinpinshibie {
  903. width: 156rpx;
  904. height: 50rpx;
  905. font-size: 36rpx;
  906. font-weight: 400;
  907. color: #333333;
  908. text-align: center;
  909. line-height: 50rpx;
  910. letter-spacing: 2rpx;
  911. margin-right: 188rpx;
  912. &.active {
  913. position: relative;
  914. &::after {
  915. position: absolute;
  916. content: '';
  917. width: 119rpx;
  918. height: 8rpx;
  919. background: #008EF2;
  920. border-radius: 4rpx;
  921. top: 50rpx;
  922. right: 0;
  923. left: 0;
  924. margin: 0 auto;
  925. }
  926. }
  927. }
  928. .rate {
  929. width: 156rpx;
  930. height: 50rpx;
  931. font-size: 36rpx;
  932. font-weight: 400;
  933. color: #333333;
  934. line-height: 50rpx;
  935. letter-spacing: 2rpx;
  936. text-align: center;
  937. &.active {
  938. position: relative;
  939. &::after {
  940. position: absolute;
  941. content: '';
  942. width: 119rpx;
  943. height: 8rpx;
  944. background: #008EF2;
  945. border-radius: 4rpx;
  946. top: 50rpx;
  947. right: 0;
  948. left: 0;
  949. margin: 0 auto;
  950. }
  951. }
  952. }
  953. }
  954. .dialog-block {
  955. margin: 20rpx 0;
  956. border-bottom: 1px solid #ccc;
  957. .fileName {
  958. text-align: center;
  959. margin: 10rpx auto;
  960. width: 115rpx;
  961. height: 42rpx;
  962. line-height: 42rpx;
  963. background: #EFEFEF;
  964. border-radius: 4rpx;
  965. font-size: 20rpx;
  966. font-weight: 400;
  967. color: #333333;
  968. }
  969. }
  970. // 评分
  971. .rate-box {
  972. padding: 10rpx 20rpx;
  973. .date {
  974. width: 300rpx;
  975. height: 33rpx;
  976. font-size: 24rpx;
  977. font-weight: 400;
  978. color: #333333;
  979. line-height: 33rpx;
  980. letter-spacing: 1rpx;
  981. margin-bottom: 8rpx;
  982. }
  983. .title {
  984. width: 100%;
  985. height: 42rpx;
  986. font-size: 30rpx;
  987. font-weight: 500;
  988. color: #333333;
  989. line-height: 42rpx;
  990. letter-spacing: 2rpx;
  991. margin-bottom: 20rpx;
  992. }
  993. .level1 {
  994. display: flex;
  995. align-items: center;
  996. .level-name {
  997. width: 104rpx;
  998. height: 33rpx;
  999. font-size: 24rpx;
  1000. font-weight: 500;
  1001. color: #333333;
  1002. line-height: 33rpx;
  1003. letter-spacing: 1rpx;
  1004. margin-right: 10rpx;
  1005. }
  1006. .level-progress {
  1007. flex: 1;
  1008. border-radius: 11rpx;
  1009. height: 21rpx;
  1010. background-color: #BEE4FF;
  1011. position: relative;
  1012. .color {
  1013. width: 0;
  1014. position: absolute;
  1015. top: 0;
  1016. left: 0;
  1017. height: 21rpx;
  1018. border-radius: 11rpx 0 0 11rpx;
  1019. background-color: #008EF2;
  1020. }
  1021. }
  1022. .level-rate {
  1023. width: 65rpx;
  1024. height: 33rpx;
  1025. font-size: 24rpx;
  1026. font-weight: 500;
  1027. color: #333333;
  1028. line-height: 33rpx;
  1029. letter-spacing: 1rpx;
  1030. margin: 0 20rpx 0 15rpx;
  1031. }
  1032. .arrow {
  1033. width: 37rpx;
  1034. height: 21rpx;
  1035. padding: 5rpx 20rpx;
  1036. }
  1037. .rotatearrow {
  1038. transform: rotate(270deg);
  1039. }
  1040. }
  1041. .level1-subbox {
  1042. display: flex;
  1043. margin-top: 20rpx;
  1044. flex-wrap: wrap;
  1045. .sub-name {
  1046. width: 50%;
  1047. display: flex;
  1048. margin-bottom: 18rpx;
  1049. .subitem-name {
  1050. width: 104rpx;
  1051. height: 33rpx;
  1052. font-size: 24rpx;
  1053. font-weight: 400;
  1054. color: #999999;
  1055. line-height: 33rpx;
  1056. letter-spacing: 1rpx;
  1057. margin-right: 12rpx;
  1058. }
  1059. .checkimg {
  1060. width: 27rpx;
  1061. height: 27rpx;
  1062. }
  1063. }
  1064. }
  1065. }
  1066. .luyin {
  1067. height: 100rpx;
  1068. width: 100%;
  1069. }
  1070. .translation {
  1071. padding-left: 30rpx;
  1072. padding-right: 30rpx;
  1073. background: #FFFFFF;
  1074. display: flex;
  1075. flex-direction: column;
  1076. height: 100vh;
  1077. }
  1078. .translation .top {
  1079. margin: 0 -30upx;
  1080. padding: 0 30upx;
  1081. background: #ffffff;
  1082. border-bottom: 1rpx solid #F2F2F2;
  1083. padding-bottom: 10rpx;
  1084. }
  1085. .translation .top .title {
  1086. display: flex;
  1087. justify-content: space-between;
  1088. .hash {
  1089. color: rgba(21, 144, 233, 1);
  1090. font-size: 24upx;
  1091. }
  1092. }
  1093. .call_record_time {
  1094. height: 44rpx;
  1095. font-size: 28rpx;
  1096. font-weight: 600;
  1097. color: #008EF2;
  1098. line-height: 44rpx;
  1099. }
  1100. .call_record_time_one {
  1101. height: 48rpx;
  1102. font-size: 24rpx;
  1103. font-weight: 500;
  1104. color: #70798d;
  1105. line-height: 48rpx;
  1106. display: flex;
  1107. justify-content: space-between;
  1108. position: relative;
  1109. .diangweitupian {
  1110. width: 46rpx;
  1111. height: 46rpx;
  1112. // border: 1px solid red;
  1113. position: absolute;
  1114. top: 0rpx;
  1115. right: 75rpx;
  1116. }
  1117. .file-change {
  1118. position: absolute;
  1119. top: 50rpx;
  1120. right: 0rpx;
  1121. width: 184rpx;
  1122. background: #FFFFFF;
  1123. box-shadow: 0rpx 0rpx 6rpx 2rpx rgba(230, 230, 230, 0.5);
  1124. border-radius: 4rpx;
  1125. z-index: 99;
  1126. height: auto;
  1127. max-height: 600rpx;
  1128. overflow: auto;
  1129. }
  1130. .file-item {
  1131. width: 184rpx;
  1132. height: 60rpx;
  1133. line-height: 60rpx;
  1134. text-align: center;
  1135. font-size: 30rpx;
  1136. font-weight: 400;
  1137. color: #333333;
  1138. border-bottom: 1rpx solid #E2E2E2;
  1139. }
  1140. .file-item:last-child {
  1141. border: 0
  1142. }
  1143. .fileactive {
  1144. color: #008EF2
  1145. }
  1146. }
  1147. .dingweishiy {
  1148. position: relative;
  1149. .tankuangcss {
  1150. position: absolute;
  1151. bottom: -50rpx;
  1152. left: 0rpx;
  1153. width: 100%;
  1154. // border: 1rpx solid red;
  1155. font-size: 24rpx;
  1156. color: #FFFFFF;
  1157. padding-top: 4rpx;
  1158. padding-bottom: 4rpx;
  1159. display: flex;
  1160. justify-content: center;
  1161. border-radius: 15rpx;
  1162. z-index: 1000;
  1163. }
  1164. .biaoqianya {
  1165. width: 631rpx;
  1166. margin: 0 auto;
  1167. position: absolute;
  1168. bottom: -120rpx;
  1169. left: 0rpx;
  1170. z-index: 2000;
  1171. color: #FFFFFF;
  1172. .biaoqianyaisshow {
  1173. background-image: url(../../../static/images/biaoqianya.png);
  1174. background-size: 100% 100%;
  1175. text-align: left;
  1176. text-indent: 20rpx;
  1177. }
  1178. }
  1179. }
  1180. .scroll-Y {
  1181. font-size: 36upx;
  1182. color: #999999;
  1183. background: #FFFFFF;
  1184. margin-top: 30upx;
  1185. flex: 1;
  1186. overflow-y: scroll;
  1187. width: 100%;
  1188. }
  1189. .scroll-Y .text {
  1190. margin: 80upx 30upx;
  1191. line-height: 80upx;
  1192. display: flex;
  1193. align-items: center;
  1194. }
  1195. .scroll-Y .text[data-speaker="2"],
  1196. .scroll-Y .text[data-speaker="4"],
  1197. .scroll-Y .text[data-speaker="6"] {
  1198. flex-direction: row-reverse;
  1199. text-align: right;
  1200. .content {
  1201. margin-left: 0;
  1202. margin-right: 30upx;
  1203. background: #F6F6F6;
  1204. color: #999999;
  1205. }
  1206. }
  1207. .scroll-Y .text .avatar {
  1208. width: 64upx;
  1209. height: 64upx;
  1210. line-height: 64upx;
  1211. text-align: center;
  1212. // border: 1rpx solid red;
  1213. font-size: 36rpx;
  1214. border-radius: 50%;
  1215. background: #F2F2F2;
  1216. color: #008EF2;
  1217. // display: flex;
  1218. // justify-content: center;
  1219. // align-items: center;
  1220. // image {
  1221. // width: 40upx;
  1222. // }
  1223. }
  1224. .scroll-Y .text .content {
  1225. margin-left: 30upx;
  1226. line-height: 60rpx;
  1227. text-align: left;
  1228. padding: 0 5px;
  1229. background: #2BC805;
  1230. border-radius: 8upx;
  1231. max-width: 442rpx;
  1232. color: #FFFFFF;
  1233. }
  1234. .scroll-Y .text.active .content {
  1235. color: #FF7538 !important;
  1236. position: relative;
  1237. }
  1238. .scroll-Y .text.active[data-speaker="2"] .content,
  1239. .scroll-Y .text.active[data-speaker="4"] .content,
  1240. .scroll-Y .text.active[data-speaker="6"] .content {
  1241. color: #FF7538 !important;
  1242. position: relative;
  1243. }
  1244. .likeArea {
  1245. width: 86upx;
  1246. height: 84upx;
  1247. margin: 20upx auto 38upx auto;
  1248. border-radius: 50%;
  1249. display: flex;
  1250. justify-content: center;
  1251. align-items: center;
  1252. border: 1upx solid #C1C2C1;
  1253. &.liked {
  1254. border: 1upx solid rgba(21, 144, 233, 1);
  1255. }
  1256. image {
  1257. width: 38upx;
  1258. height: 39upx;
  1259. }
  1260. }
  1261. .chat {
  1262. display: flex;
  1263. flex-direction: column;
  1264. border-top: 1upx solid rgba(151, 151, 151, 0.4);
  1265. padding: 20rpx 20rpx 0;
  1266. .total {
  1267. color: rgba(21, 144, 233, 1);
  1268. font-size: 24upx;
  1269. }
  1270. .list {
  1271. display: flex;
  1272. flex-direction: column;
  1273. .message {
  1274. display: flex;
  1275. margin-top: 20upx;
  1276. border-bottom: 1upx solid rgba(151, 151, 151, 0.4);
  1277. padding-bottom: 20upx;
  1278. &:last-child {
  1279. border-bottom: 0;
  1280. }
  1281. .avator {
  1282. margin-left: 120upx;
  1283. }
  1284. &:first-child {
  1285. .avator {
  1286. margin-left: 0;
  1287. }
  1288. }
  1289. .right {
  1290. display: flex;
  1291. flex-direction: column;
  1292. margin-left: 20upx;
  1293. flex: 1;
  1294. .name {
  1295. color: rgba(16, 16, 16, 1);
  1296. font-size: 30upx;
  1297. }
  1298. .subtitle {
  1299. color: rgba(120, 120, 120, 1);
  1300. font-size: 24upx;
  1301. margin-top: 16upx;
  1302. }
  1303. .answer {
  1304. font-size: 24upx;
  1305. color: #787878;
  1306. }
  1307. .content {
  1308. color: rgba(49, 48, 48, 1);
  1309. font-size: 30upx;
  1310. margin-top: 20upx;
  1311. position: relative;
  1312. }
  1313. .bottom {
  1314. margin-top: 16upx;
  1315. display: flex;
  1316. justify-content: space-between;
  1317. .time {
  1318. color: rgba(185, 185, 185, 1);
  1319. font-size: 20upx;
  1320. }
  1321. .button {
  1322. color: rgba(144, 144, 144, 1);
  1323. font-size: 30upx;
  1324. width: 111upx;
  1325. height: 44upx;
  1326. border-radius: 22upx;
  1327. border: 1upx solid rgba(151, 151, 151, 1);
  1328. text-align: center;
  1329. }
  1330. }
  1331. }
  1332. }
  1333. }
  1334. }
  1335. .bottomArea {
  1336. min-height: 90upx;
  1337. background: #F0F2F5;
  1338. width: 100%;
  1339. display: flex;
  1340. align-items: center;
  1341. border-top: 1upx solid rgba(151, 151, 151, 0.25);
  1342. .voice {
  1343. width: 44upx;
  1344. height: 44upx;
  1345. margin-left: 38upx;
  1346. }
  1347. .inputArea {
  1348. margin-left: 38upx;
  1349. margin-right: 38upx;
  1350. flex: 1;
  1351. display: flex;
  1352. position: relative;
  1353. .edit {
  1354. width: 30upx;
  1355. height: 28upx;
  1356. position: absolute;
  1357. top: 31upx;
  1358. left: 27upx;
  1359. }
  1360. .editor {
  1361. background: rgba(0, 139, 245, 0.17);
  1362. border-radius: 29upx;
  1363. flex: 1;
  1364. min-height: 58upx;
  1365. width: unset;
  1366. padding: 0 32upx;
  1367. font-size: 30upx;
  1368. margin: 16rpx 0;
  1369. line-height: 29px;
  1370. }
  1371. .placeholder {
  1372. position: absolute;
  1373. left: 70rpx;
  1374. top: 22rpx;
  1375. color: #26A2FF;
  1376. &.editing {
  1377. left: 36rpx;
  1378. }
  1379. }
  1380. }
  1381. .download {
  1382. width: 41upx;
  1383. height: 35upx;
  1384. margin-right: 36upx;
  1385. }
  1386. .like {
  1387. width: 38upx;
  1388. height: 39upx;
  1389. margin-right: 38upx;
  1390. }
  1391. .add {
  1392. width: 50upx;
  1393. height: 50upx;
  1394. margin-right: 38upx;
  1395. }
  1396. .send {
  1397. background: #1590e9;
  1398. color: white;
  1399. padding: 10rpx 20rpx;
  1400. margin: 5px;
  1401. border-radius: 8rpx;
  1402. }
  1403. }
  1404. .backTop {
  1405. width: 60upx;
  1406. height: 60upx;
  1407. background: rgba(211, 235, 253, 1);
  1408. box-shadow: 0upx 0upx 2upx 4upx rgba(38, 161, 255, 0.04);
  1409. border-radius: 50%;
  1410. position: fixed;
  1411. bottom: 200upx;
  1412. right: 8upx;
  1413. display: flex;
  1414. justify-content: center;
  1415. align-items: center;
  1416. image {
  1417. width: 26upx;
  1418. height: 34upx;
  1419. }
  1420. }
  1421. .voiceContent {
  1422. position: fixed;
  1423. top: 0;
  1424. bottom: 0;
  1425. left: 0;
  1426. right: 0;
  1427. width: 100vw;
  1428. height: 100vh;
  1429. display: flex;
  1430. justify-content: center;
  1431. align-items: center;
  1432. background: rgba(30, 30, 30, 0.4592);
  1433. z-index: 10001;
  1434. }
  1435. .box {
  1436. background: rgba(21, 144, 233, 0.299);
  1437. width: 524upx;
  1438. height: 524upx;
  1439. border-radius: 50%;
  1440. display: flex;
  1441. align-items: center;
  1442. justify-content: center;
  1443. .center {
  1444. width: 412upx;
  1445. height: 412upx;
  1446. background: #1590E9;
  1447. border-radius: 50%;
  1448. display: flex;
  1449. align-items: center;
  1450. justify-content: center;
  1451. flex-direction: column;
  1452. .voice {
  1453. width: 110upx;
  1454. height: 133upx;
  1455. }
  1456. .text {
  1457. color: #FFFFFF;
  1458. font-size: 36upx;
  1459. margin-top: 24upx;
  1460. }
  1461. }
  1462. }
  1463. .boxs {
  1464. min-height: 100%;
  1465. display: flex;
  1466. flex-direction: column;
  1467. .chat {
  1468. flex-grow: 1;
  1469. }
  1470. .bottomArea {
  1471. flex-shrink: 0;
  1472. position: sticky;
  1473. bottom: 0;
  1474. }
  1475. }
  1476. </style>