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

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