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.
 
 
 
 

1486 lines
34 KiB

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