|
@@ -78,38 +78,20 @@
|
|
|
<van-col span="16">
|
|
<van-col span="16">
|
|
|
<div
|
|
<div
|
|
|
style="
|
|
style="
|
|
|
|
|
+ border-radius: 6px;
|
|
|
text-align: left;
|
|
text-align: left;
|
|
|
background-color: #a0e75a;
|
|
background-color: #a0e75a;
|
|
|
- min-height: 44px;
|
|
|
|
|
margin: 0 10px;
|
|
margin: 0 10px;
|
|
|
- padding: 10px;
|
|
|
|
|
- border-radius: 6px;
|
|
|
|
|
display: inline-block;
|
|
display: inline-block;
|
|
|
float: right;
|
|
float: right;
|
|
|
">
|
|
">
|
|
|
<template v-if="item.chatRecordFile">
|
|
<template v-if="item.chatRecordFile">
|
|
|
- <p @click="audioPlay(item.chatRecordFile)">播放</p>
|
|
|
|
|
- <p
|
|
|
|
|
- class="voice"
|
|
|
|
|
- @click="audioPlay(item.chatRecordFile)"
|
|
|
|
|
- :style="{ width: 3 * 10 + 'px' }">
|
|
|
|
|
- <img
|
|
|
|
|
- src="https://adm-ms.icolor.com.cn/application/1/assets/voice.png"
|
|
|
|
|
- alt="" />
|
|
|
|
|
- <span>{{ 3 }}''</span>
|
|
|
|
|
- </p>
|
|
|
|
|
- <audio controls>
|
|
|
|
|
- <source :src="sample3s" type="audio/mpeg" />
|
|
|
|
|
- <p>
|
|
|
|
|
- Your browser doesn't support HTML5 audio. Here is a
|
|
|
|
|
- <a href="myAudio.mp4">link to download the audio</a> instead.
|
|
|
|
|
- </p>
|
|
|
|
|
- </audio>
|
|
|
|
|
|
|
+ <audioPlayer :fileurl="item.chatRecordFile"></audioPlayer>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
- <p style="word-break: break-all">
|
|
|
|
|
|
|
+ <div class="myContent">
|
|
|
{{ item.chatRecordText }}
|
|
{{ item.chatRecordText }}
|
|
|
- </p>
|
|
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
</div>
|
|
</div>
|
|
|
</van-col>
|
|
</van-col>
|
|
@@ -431,25 +413,24 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</van-overlay>
|
|
</van-overlay>
|
|
|
- <audioRecord :audioUrl="audioUrl"></audioRecord>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import avatar from '@/assets/avatar2.png';
|
|
|
|
|
-import yy from '@/assets/Icon/yy.png';
|
|
|
|
|
-import yt from '@/assets/Icon/yt.png';
|
|
|
|
|
-import aiselect from '@/assets/Icon/avatar1.png';
|
|
|
|
|
-import tabBar from '@/components/tabBar';
|
|
|
|
|
-import { getReportInfo } from '@/api';
|
|
|
|
|
-import { aiDialogue } from '@/api/inventory';
|
|
|
|
|
-import { getPosition, getTicketFun } from '@/utils/TXApiFun';
|
|
|
|
|
-import BenzAMRRecorder from 'benz-amr-recorder';
|
|
|
|
|
-import sample3s from '@/assets/mp3/sample-3s.mp3';
|
|
|
|
|
-import audioRecord from './audioRecord.vue';
|
|
|
|
|
|
|
+import avatar from '@/assets/avatar2.png'
|
|
|
|
|
+import yy from '@/assets/Icon/yy.png'
|
|
|
|
|
+import yt from '@/assets/Icon/yt.png'
|
|
|
|
|
+import aiselect from '@/assets/Icon/avatar1.png'
|
|
|
|
|
+import tabBar from '@/components/tabBar'
|
|
|
|
|
+import { getReportInfo } from '@/api'
|
|
|
|
|
+import { aiDialogue } from '@/api/inventory'
|
|
|
|
|
+import { getPosition, getTicketFun } from '@/utils/TXApiFun'
|
|
|
|
|
+import BenzAMRRecorder from 'benz-amr-recorder'
|
|
|
|
|
+import sample3s from '@/assets/mp3/sample-3s.mp3'
|
|
|
|
|
+import audioPlayer from './audioPlayer.vue'
|
|
|
export default {
|
|
export default {
|
|
|
name: 'ai',
|
|
name: 'ai',
|
|
|
- components: { tabBar, audioRecord },
|
|
|
|
|
|
|
+ components: { tabBar, audioPlayer },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
sample3s: sample3s,
|
|
sample3s: sample3s,
|
|
@@ -495,7 +476,7 @@ export default {
|
|
|
successText: '加载成功', //上拉刷新提示语
|
|
successText: '加载成功', //上拉刷新提示语
|
|
|
tips: '按住 说话',
|
|
tips: '按住 说话',
|
|
|
audioUrl: '',
|
|
audioUrl: '',
|
|
|
- };
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
// watch: {
|
|
// watch: {
|
|
|
// $route(to, from) {
|
|
// $route(to, from) {
|
|
@@ -505,62 +486,63 @@ export default {
|
|
|
// },
|
|
// },
|
|
|
// },
|
|
// },
|
|
|
activated() {
|
|
activated() {
|
|
|
- this.pageNum = 0;
|
|
|
|
|
- this.isNoData = false;
|
|
|
|
|
- this.onLoad();
|
|
|
|
|
|
|
+ this.pageNum = 0
|
|
|
|
|
+ this.isNoData = false
|
|
|
|
|
+ this.onLoad()
|
|
|
// 授权
|
|
// 授权
|
|
|
- getTicketFun(['getLocation', 'startRecord', 'stopRecord', 'onVoiceRecordEnd', 'uploadVoice']);
|
|
|
|
|
|
|
+ getTicketFun(['getLocation', 'startRecord', 'stopRecord', 'onVoiceRecordEnd', 'uploadVoice'])
|
|
|
this.audioUrl =
|
|
this.audioUrl =
|
|
|
- 'https://cdn-svs-test.nipponpaint.com.cn/%E5%90%B4%E5%BA%B7-20240918152244.amr?Expires=2042176973&OSSAccessKeyId=LTAI5tG1DTJFA16BHkzHVxjz&Signature=BvwZFdxp69wRNy7oOPfqG6lxTww%3D';
|
|
|
|
|
|
|
+ // 'https://cdn-svs-test.nipponpaint.com.cn/%E5%90%B4%E5%BA%B7-20240918152244.amr?Expires=2042176973&OSSAccessKeyId=LTAI5tG1DTJFA16BHkzHVxjz&Signature=BvwZFdxp69wRNy7oOPfqG6lxTww%3D'
|
|
|
|
|
+ 'https://cdn-svs-test.nipponpaint.com.cn/%E6%9C%B1%E9%87%91%E5%98%9F-20240918160200.wav?Expires=2042179320&OSSAccessKeyId=LTAI5tG1DTJFA16BHkzHVxjz&Signature=kcsEr4BE11XpV6TAW6lLJWU0rXI%3D'
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
audioPlay(chatRecordFile) {
|
|
audioPlay(chatRecordFile) {
|
|
|
if (chatRecordFile) {
|
|
if (chatRecordFile) {
|
|
|
- const url = chatRecordFile;
|
|
|
|
|
- this.amr = new BenzAMRRecorder();
|
|
|
|
|
|
|
+ const url = chatRecordFile
|
|
|
|
|
+ this.amr = new BenzAMRRecorder()
|
|
|
this.amr.initWithUrl(url).then(() => {
|
|
this.amr.initWithUrl(url).then(() => {
|
|
|
- this.amr.play();
|
|
|
|
|
|
|
+ this.amr.play()
|
|
|
// data.amrTime = Math.ceil(amr.getDuration()); //获取音频总时长
|
|
// data.amrTime = Math.ceil(amr.getDuration()); //获取音频总时长
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
this.amr.onEnded(() => {
|
|
this.amr.onEnded(() => {
|
|
|
// 播放结束重置状态
|
|
// 播放结束重置状态
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
} else {
|
|
} else {
|
|
|
- this.amr.stop();
|
|
|
|
|
|
|
+ this.amr.stop()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
garbageManager() {
|
|
garbageManager() {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.snb.scrollTop = this.$refs.snb.scrollHeight;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.$refs.snb.scrollTop = this.$refs.snb.scrollHeight
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
if (this.isNoData) {
|
|
if (this.isNoData) {
|
|
|
- this.successText = '以下所有内容!';
|
|
|
|
|
- this.$toast('已经加载所有内容!');
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ this.successText = '以下所有内容!'
|
|
|
|
|
+ this.$toast('已经加载所有内容!')
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ return
|
|
|
}
|
|
}
|
|
|
- this.pageNum++;
|
|
|
|
|
- this.aiDialogueGgreet();
|
|
|
|
|
|
|
+ this.pageNum++
|
|
|
|
|
+ this.aiDialogueGgreet()
|
|
|
},
|
|
},
|
|
|
choiceSelct(val, val2) {
|
|
choiceSelct(val, val2) {
|
|
|
if (val.type == 'AI_WIRING_SCENE') {
|
|
if (val.type == 'AI_WIRING_SCENE') {
|
|
|
- localStorage.setItem(val.type, val.content);
|
|
|
|
|
|
|
+ localStorage.setItem(val.type, val.content)
|
|
|
// 跳转高销额列表
|
|
// 跳转高销额列表
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
path: '/topStore',
|
|
path: '/topStore',
|
|
|
query: {
|
|
query: {
|
|
|
AItype: val.type,
|
|
AItype: val.type,
|
|
|
},
|
|
},
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
} else {
|
|
} else {
|
|
|
let loading1 = this.$toast.loading({
|
|
let loading1 = this.$toast.loading({
|
|
|
duration: 0,
|
|
duration: 0,
|
|
|
message: '发送中...',
|
|
message: '发送中...',
|
|
|
forbidClick: true,
|
|
forbidClick: true,
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
aiDialogue({
|
|
aiDialogue({
|
|
|
type: 4,
|
|
type: 4,
|
|
|
content: val.radioName,
|
|
content: val.radioName,
|
|
@@ -570,13 +552,13 @@ export default {
|
|
|
radioValue: val.radioValue,
|
|
radioValue: val.radioValue,
|
|
|
radioName: val.radioName,
|
|
radioName: val.radioName,
|
|
|
}).then((response) => {
|
|
}).then((response) => {
|
|
|
- loading1.clear();
|
|
|
|
|
|
|
+ loading1.clear()
|
|
|
if (response.code == 200) {
|
|
if (response.code == 200) {
|
|
|
- this.pageNum = 1;
|
|
|
|
|
- this.Ggreet = [];
|
|
|
|
|
- this.aiDialogueGgreet();
|
|
|
|
|
|
|
+ this.pageNum = 1
|
|
|
|
|
+ this.Ggreet = []
|
|
|
|
|
+ this.aiDialogueGgreet()
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
aiDialogueGgreet() {
|
|
aiDialogueGgreet() {
|
|
@@ -584,25 +566,25 @@ export default {
|
|
|
duration: 0,
|
|
duration: 0,
|
|
|
message: '发送中...',
|
|
message: '发送中...',
|
|
|
forbidClick: true,
|
|
forbidClick: true,
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
this.aiDialogueCommon({ type: 3, pageNum: this.pageNum, pageSize: 10 })
|
|
this.aiDialogueCommon({ type: 3, pageNum: this.pageNum, pageSize: 10 })
|
|
|
.then((response) => {
|
|
.then((response) => {
|
|
|
- this.Ggreet = response.rows.concat(this.Ggreet);
|
|
|
|
|
|
|
+ this.Ggreet = response.rows.concat(this.Ggreet)
|
|
|
if (this.Ggreet.length >= response.total) {
|
|
if (this.Ggreet.length >= response.total) {
|
|
|
- this.isNoData = true;
|
|
|
|
|
|
|
+ this.isNoData = true
|
|
|
} else {
|
|
} else {
|
|
|
- this.isNoData = false;
|
|
|
|
|
|
|
+ this.isNoData = false
|
|
|
}
|
|
}
|
|
|
if (this.pageNum == 1) {
|
|
if (this.pageNum == 1) {
|
|
|
- this.garbageManager();
|
|
|
|
|
|
|
+ this.garbageManager()
|
|
|
}
|
|
}
|
|
|
- loading1.clear();
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
|
|
+ loading1.clear()
|
|
|
|
|
+ this.loading = false
|
|
|
})
|
|
})
|
|
|
.catch(() => {
|
|
.catch(() => {
|
|
|
- loading1.clear();
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ loading1.clear()
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ })
|
|
|
// aiDialogue({ type: 3, pageNum: this.pageNum, pageSize: 10 }).then((response) => {
|
|
// aiDialogue({ type: 3, pageNum: this.pageNum, pageSize: 10 }).then((response) => {
|
|
|
// loading1.clear();
|
|
// loading1.clear();
|
|
|
// this.loading = false;
|
|
// this.loading = false;
|
|
@@ -621,62 +603,62 @@ export default {
|
|
|
},
|
|
},
|
|
|
Submit() {
|
|
Submit() {
|
|
|
if (this.content.trim() == '') {
|
|
if (this.content.trim() == '') {
|
|
|
- this.$toast('请输入内容!');
|
|
|
|
|
|
|
+ this.$toast('请输入内容!')
|
|
|
}
|
|
}
|
|
|
let loading1 = this.$toast.loading({
|
|
let loading1 = this.$toast.loading({
|
|
|
duration: 0,
|
|
duration: 0,
|
|
|
message: '发送中...',
|
|
message: '发送中...',
|
|
|
forbidClick: true,
|
|
forbidClick: true,
|
|
|
- });
|
|
|
|
|
- this.btnclik = false;
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ this.btnclik = false
|
|
|
// 发送的文本内容添加到对象,减少重新获取接口
|
|
// 发送的文本内容添加到对象,减少重新获取接口
|
|
|
this.Ggreet.push({
|
|
this.Ggreet.push({
|
|
|
chatRecordText: this.content,
|
|
chatRecordText: this.content,
|
|
|
chatRecordFrom: 1,
|
|
chatRecordFrom: 1,
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
aiDialogue({ type: 1, content: this.content }).then((response) => {
|
|
aiDialogue({ type: 1, content: this.content }).then((response) => {
|
|
|
- loading1.clear();
|
|
|
|
|
- this.btnclik = true;
|
|
|
|
|
|
|
+ loading1.clear()
|
|
|
|
|
+ this.btnclik = true
|
|
|
if (response.code == 200) {
|
|
if (response.code == 200) {
|
|
|
- this.content = '';
|
|
|
|
|
|
|
+ this.content = ''
|
|
|
// this.pageNum = 1;
|
|
// this.pageNum = 1;
|
|
|
// this.Ggreet = [];
|
|
// this.Ggreet = [];
|
|
|
- this.Ggreet.push(...response.rows);
|
|
|
|
|
|
|
+ this.Ggreet.push(...response.rows)
|
|
|
// this.aiDialogueGgreet();
|
|
// this.aiDialogueGgreet();
|
|
|
- this.garbageManager();
|
|
|
|
|
|
|
+ this.garbageManager()
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
startRecord() {
|
|
startRecord() {
|
|
|
- this.tips = '松开 发送';
|
|
|
|
|
- this.wx.startRecord();
|
|
|
|
|
- this.shows = true;
|
|
|
|
|
|
|
+ this.tips = '松开 发送'
|
|
|
|
|
+ this.wx.startRecord()
|
|
|
|
|
+ this.shows = true
|
|
|
this.wx.onVoiceRecordEnd({
|
|
this.wx.onVoiceRecordEnd({
|
|
|
// 录音时间超过一分钟没有停止的时候会执行 complete 回调
|
|
// 录音时间超过一分钟没有停止的时候会执行 complete 回调
|
|
|
complete: (res) => {
|
|
complete: (res) => {
|
|
|
- var localId = res.localId;
|
|
|
|
|
- this.shows = false;
|
|
|
|
|
|
|
+ var localId = res.localId
|
|
|
|
|
+ this.shows = false
|
|
|
this.wx.uploadVoice({
|
|
this.wx.uploadVoice({
|
|
|
localId: localId,
|
|
localId: localId,
|
|
|
isShowProgressTips: 1, // 默认为1,显示进度提示
|
|
isShowProgressTips: 1, // 默认为1,显示进度提示
|
|
|
success: (res) => {
|
|
success: (res) => {
|
|
|
- this.shows = false;
|
|
|
|
|
- this.show = false;
|
|
|
|
|
|
|
+ this.shows = false
|
|
|
|
|
+ this.show = false
|
|
|
this.aiDialogueCommon({ type: 2, content: res.serverId }).then((response) => {
|
|
this.aiDialogueCommon({ type: 2, content: res.serverId }).then((response) => {
|
|
|
this.Ggreet.push({
|
|
this.Ggreet.push({
|
|
|
chatRecordFile:
|
|
chatRecordFile:
|
|
|
'https://cdn-svs-test.nipponpaint.com.cn/%E5%90%B4%E5%BA%B7-20240918152244.amr?Expires=2042176973&OSSAccessKeyId=LTAI5tG1DTJFA16BHkzHVxjz&Signature=BvwZFdxp69wRNy7oOPfqG6lxTww%3D',
|
|
'https://cdn-svs-test.nipponpaint.com.cn/%E5%90%B4%E5%BA%B7-20240918152244.amr?Expires=2042176973&OSSAccessKeyId=LTAI5tG1DTJFA16BHkzHVxjz&Signature=BvwZFdxp69wRNy7oOPfqG6lxTww%3D',
|
|
|
chatRecordFrom: 1,
|
|
chatRecordFrom: 1,
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
// 音频内容需要接口传唤格式后添加到对象
|
|
// 音频内容需要接口传唤格式后添加到对象
|
|
|
// this.Ggreet.push(...response.rows);
|
|
// this.Ggreet.push(...response.rows);
|
|
|
// this.Ggreet.push(...response.rows);
|
|
// this.Ggreet.push(...response.rows);
|
|
|
- this.garbageManager();
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.garbageManager()
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
// });
|
|
// });
|
|
|
// }
|
|
// }
|
|
|
// });
|
|
// });
|
|
@@ -684,26 +666,26 @@ export default {
|
|
|
stopRecord() {
|
|
stopRecord() {
|
|
|
this.wx.stopRecord({
|
|
this.wx.stopRecord({
|
|
|
success: (res) => {
|
|
success: (res) => {
|
|
|
- var localId = res.localId;
|
|
|
|
|
|
|
+ var localId = res.localId
|
|
|
this.wx.uploadVoice({
|
|
this.wx.uploadVoice({
|
|
|
localId: localId,
|
|
localId: localId,
|
|
|
isShowProgressTips: 1, // 默认为1,显示进度提示
|
|
isShowProgressTips: 1, // 默认为1,显示进度提示
|
|
|
success: (res) => {
|
|
success: (res) => {
|
|
|
- console.log(res);
|
|
|
|
|
- this.shows = false;
|
|
|
|
|
- this.show = false;
|
|
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ this.shows = false
|
|
|
|
|
+ this.show = false
|
|
|
this.aiDialogueCommon({ type: 2, content: res.serverId })
|
|
this.aiDialogueCommon({ type: 2, content: res.serverId })
|
|
|
.then((response) => {
|
|
.then((response) => {
|
|
|
- this.Ggreet.push(...response.rows);
|
|
|
|
|
- this.garbageManager();
|
|
|
|
|
|
|
+ this.Ggreet.push(...response.rows)
|
|
|
|
|
+ this.garbageManager()
|
|
|
})
|
|
})
|
|
|
.catch(() => {
|
|
.catch(() => {
|
|
|
this.Ggreet.push({
|
|
this.Ggreet.push({
|
|
|
chatRecordFile:
|
|
chatRecordFile:
|
|
|
'https://cdn-svs-test.nipponpaint.com.cn/%E5%90%B4%E5%BA%B7-20240918152244.amr?Expires=2042176973&OSSAccessKeyId=LTAI5tG1DTJFA16BHkzHVxjz&Signature=BvwZFdxp69wRNy7oOPfqG6lxTww%3D',
|
|
'https://cdn-svs-test.nipponpaint.com.cn/%E5%90%B4%E5%BA%B7-20240918152244.amr?Expires=2042176973&OSSAccessKeyId=LTAI5tG1DTJFA16BHkzHVxjz&Signature=BvwZFdxp69wRNy7oOPfqG6lxTww%3D',
|
|
|
chatRecordFrom: 1,
|
|
chatRecordFrom: 1,
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
// aiDialogue({ type: 2, content: res.serverId }).then((response) => {
|
|
// aiDialogue({ type: 2, content: res.serverId }).then((response) => {
|
|
|
// if (response.code == 200) {
|
|
// if (response.code == 200) {
|
|
|
// this.Ggreet.push(...response.rows);
|
|
// this.Ggreet.push(...response.rows);
|
|
@@ -713,9 +695,9 @@ export default {
|
|
|
// this.show = false;
|
|
// this.show = false;
|
|
|
// });
|
|
// });
|
|
|
},
|
|
},
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
//AI对话接口
|
|
//AI对话接口
|
|
|
// type:类型:1-用户文本对话 2-用户语音对话 3-欢迎语/查询历史 4-点击AI回答进行匹配结果
|
|
// type:类型:1-用户文本对话 2-用户语音对话 3-欢迎语/查询历史 4-点击AI回答进行匹配结果
|
|
@@ -724,158 +706,158 @@ export default {
|
|
|
aiDialogue({ ...arguments[0] })
|
|
aiDialogue({ ...arguments[0] })
|
|
|
.then((response) => {
|
|
.then((response) => {
|
|
|
if (response.code == 200) {
|
|
if (response.code == 200) {
|
|
|
- resolve(response);
|
|
|
|
|
|
|
+ resolve(response)
|
|
|
} else {
|
|
} else {
|
|
|
- console.log(response.msg);
|
|
|
|
|
- rejectt(response);
|
|
|
|
|
|
|
+ console.log(response.msg)
|
|
|
|
|
+ rejectt(response)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
|
- console.log(err);
|
|
|
|
|
- rejectt('aiDialogue接口失败');
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.log(err)
|
|
|
|
|
+ rejectt('aiDialogue接口失败')
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
typw(val) {
|
|
typw(val) {
|
|
|
if (val == 1) {
|
|
if (val == 1) {
|
|
|
- this.one14 = true;
|
|
|
|
|
|
|
+ this.one14 = true
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- this.one15 = true;
|
|
|
|
|
- }, 1000);
|
|
|
|
|
|
|
+ this.one15 = true
|
|
|
|
|
+ }, 1000)
|
|
|
}
|
|
}
|
|
|
if (val == 2) {
|
|
if (val == 2) {
|
|
|
- this.one16 = true;
|
|
|
|
|
|
|
+ this.one16 = true
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- this.one17 = true;
|
|
|
|
|
- }, 1000);
|
|
|
|
|
|
|
+ this.one17 = true
|
|
|
|
|
+ }, 1000)
|
|
|
}
|
|
}
|
|
|
if (val == 3) {
|
|
if (val == 3) {
|
|
|
- this.one18 = true;
|
|
|
|
|
|
|
+ this.one18 = true
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- this.one19 = true;
|
|
|
|
|
- }, 1000);
|
|
|
|
|
|
|
+ this.one19 = true
|
|
|
|
|
+ }, 1000)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
send() {
|
|
send() {
|
|
|
- this.one = false;
|
|
|
|
|
- this.two = false;
|
|
|
|
|
- this.one1 = false;
|
|
|
|
|
- this.one9 = false;
|
|
|
|
|
- this.one10 = false;
|
|
|
|
|
- this.one11 = false;
|
|
|
|
|
- this.one12 = false;
|
|
|
|
|
- this.one14 = false;
|
|
|
|
|
- this.one15 = false;
|
|
|
|
|
- this.one16 = false;
|
|
|
|
|
- this.one17 = false;
|
|
|
|
|
- this.one18 = false;
|
|
|
|
|
- this.one19 = false;
|
|
|
|
|
- this.two1 = false;
|
|
|
|
|
|
|
+ this.one = false
|
|
|
|
|
+ this.two = false
|
|
|
|
|
+ this.one1 = false
|
|
|
|
|
+ this.one9 = false
|
|
|
|
|
+ this.one10 = false
|
|
|
|
|
+ this.one11 = false
|
|
|
|
|
+ this.one12 = false
|
|
|
|
|
+ this.one14 = false
|
|
|
|
|
+ this.one15 = false
|
|
|
|
|
+ this.one16 = false
|
|
|
|
|
+ this.one17 = false
|
|
|
|
|
+ this.one18 = false
|
|
|
|
|
+ this.one19 = false
|
|
|
|
|
+ this.two1 = false
|
|
|
if (this.message.indexOf('销量') != -1 || this.num == 1) {
|
|
if (this.message.indexOf('销量') != -1 || this.num == 1) {
|
|
|
- this.one = true;
|
|
|
|
|
|
|
+ this.one = true
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- this.one1 = true;
|
|
|
|
|
- }, 1000);
|
|
|
|
|
|
|
+ this.one1 = true
|
|
|
|
|
+ }, 1000)
|
|
|
}
|
|
}
|
|
|
if (this.message.indexOf('专业时时丽') != -1 || this.num == 2) {
|
|
if (this.message.indexOf('专业时时丽') != -1 || this.num == 2) {
|
|
|
- this.one11 = true;
|
|
|
|
|
|
|
+ this.one11 = true
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- this.one12 = true;
|
|
|
|
|
- }, 1000);
|
|
|
|
|
|
|
+ this.one12 = true
|
|
|
|
|
+ }, 1000)
|
|
|
}
|
|
}
|
|
|
if (this.message.indexOf('碰瓷专案') != -1 || this.num == 3) {
|
|
if (this.message.indexOf('碰瓷专案') != -1 || this.num == 3) {
|
|
|
- this.one9 = true;
|
|
|
|
|
|
|
+ this.one9 = true
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- this.one10 = true;
|
|
|
|
|
- }, 1000);
|
|
|
|
|
|
|
+ this.one10 = true
|
|
|
|
|
+ }, 1000)
|
|
|
}
|
|
}
|
|
|
- this.message = '';
|
|
|
|
|
|
|
+ this.message = ''
|
|
|
},
|
|
},
|
|
|
showFn() {
|
|
showFn() {
|
|
|
- this.tips = '按住 说话';
|
|
|
|
|
- this.shows = false;
|
|
|
|
|
- this.show = true;
|
|
|
|
|
|
|
+ this.tips = '按住 说话'
|
|
|
|
|
+ this.shows = false
|
|
|
|
|
+ this.show = true
|
|
|
},
|
|
},
|
|
|
mousedownFN() {
|
|
mousedownFN() {
|
|
|
- this.shows = true;
|
|
|
|
|
|
|
+ this.shows = true
|
|
|
},
|
|
},
|
|
|
clears() {
|
|
clears() {
|
|
|
- this.show = false;
|
|
|
|
|
|
|
+ this.show = false
|
|
|
// this.two=true
|
|
// this.two=true
|
|
|
//
|
|
//
|
|
|
// setTimeout(()=>{
|
|
// setTimeout(()=>{
|
|
|
// this.two1=true
|
|
// this.two1=true
|
|
|
// },1000)
|
|
// },1000)
|
|
|
- this.one = false;
|
|
|
|
|
- this.two = false;
|
|
|
|
|
- this.one1 = false;
|
|
|
|
|
- this.one9 = false;
|
|
|
|
|
- this.one10 = false;
|
|
|
|
|
- this.one11 = false;
|
|
|
|
|
- this.one12 = false;
|
|
|
|
|
- this.one14 = false;
|
|
|
|
|
- this.one15 = false;
|
|
|
|
|
- this.one16 = false;
|
|
|
|
|
- this.one17 = false;
|
|
|
|
|
- this.one18 = false;
|
|
|
|
|
- this.one19 = false;
|
|
|
|
|
- this.two1 = false;
|
|
|
|
|
|
|
+ this.one = false
|
|
|
|
|
+ this.two = false
|
|
|
|
|
+ this.one1 = false
|
|
|
|
|
+ this.one9 = false
|
|
|
|
|
+ this.one10 = false
|
|
|
|
|
+ this.one11 = false
|
|
|
|
|
+ this.one12 = false
|
|
|
|
|
+ this.one14 = false
|
|
|
|
|
+ this.one15 = false
|
|
|
|
|
+ this.one16 = false
|
|
|
|
|
+ this.one17 = false
|
|
|
|
|
+ this.one18 = false
|
|
|
|
|
+ this.one19 = false
|
|
|
|
|
+ this.two1 = false
|
|
|
},
|
|
},
|
|
|
mouseupfN() {
|
|
mouseupfN() {
|
|
|
- this.show = false;
|
|
|
|
|
|
|
+ this.show = false
|
|
|
// this.two=true
|
|
// this.two=true
|
|
|
//
|
|
//
|
|
|
// setTimeout(()=>{
|
|
// setTimeout(()=>{
|
|
|
// this.two1=true
|
|
// this.two1=true
|
|
|
// },1000)
|
|
// },1000)
|
|
|
- this.one = false;
|
|
|
|
|
- this.two = false;
|
|
|
|
|
- this.one1 = false;
|
|
|
|
|
- this.one9 = false;
|
|
|
|
|
- this.one10 = false;
|
|
|
|
|
- this.one11 = false;
|
|
|
|
|
- this.one12 = false;
|
|
|
|
|
- this.one14 = false;
|
|
|
|
|
- this.one15 = false;
|
|
|
|
|
- this.one16 = false;
|
|
|
|
|
- this.one17 = false;
|
|
|
|
|
- this.one18 = false;
|
|
|
|
|
- this.one19 = false;
|
|
|
|
|
- this.two1 = false;
|
|
|
|
|
|
|
+ this.one = false
|
|
|
|
|
+ this.two = false
|
|
|
|
|
+ this.one1 = false
|
|
|
|
|
+ this.one9 = false
|
|
|
|
|
+ this.one10 = false
|
|
|
|
|
+ this.one11 = false
|
|
|
|
|
+ this.one12 = false
|
|
|
|
|
+ this.one14 = false
|
|
|
|
|
+ this.one15 = false
|
|
|
|
|
+ this.one16 = false
|
|
|
|
|
+ this.one17 = false
|
|
|
|
|
+ this.one18 = false
|
|
|
|
|
+ this.one19 = false
|
|
|
|
|
+ this.two1 = false
|
|
|
if (this.num > 2) {
|
|
if (this.num > 2) {
|
|
|
- this.num = 0;
|
|
|
|
|
|
|
+ this.num = 0
|
|
|
}
|
|
}
|
|
|
- this.num = this.num + 1;
|
|
|
|
|
- this.send();
|
|
|
|
|
|
|
+ this.num = this.num + 1
|
|
|
|
|
+ this.send()
|
|
|
},
|
|
},
|
|
|
goFn(row) {
|
|
goFn(row) {
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
path: '/aipage',
|
|
path: '/aipage',
|
|
|
query: { type: row },
|
|
query: { type: row },
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
getReportInfo() {
|
|
getReportInfo() {
|
|
|
- this.deptLevel = localStorage.getItem('deptLevel');
|
|
|
|
|
|
|
+ this.deptLevel = localStorage.getItem('deptLevel')
|
|
|
let loading1 = this.$toast.loading({
|
|
let loading1 = this.$toast.loading({
|
|
|
duration: 0,
|
|
duration: 0,
|
|
|
message: '加载中...',
|
|
message: '加载中...',
|
|
|
forbidClick: true,
|
|
forbidClick: true,
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
getReportInfo({ isContent: false }).then((res) => {
|
|
getReportInfo({ isContent: false }).then((res) => {
|
|
|
- loading1.clear();
|
|
|
|
|
- this.list = res.data.summaryTasks;
|
|
|
|
|
- this.historyButton = res.data.historyButton;
|
|
|
|
|
- localStorage.setItem('powerGrade', res.data.positionId);
|
|
|
|
|
- this.existReject = res.data.existReject;
|
|
|
|
|
- this.powerGrade = res.data.positionId;
|
|
|
|
|
- this.showButton = res.data.showButton;
|
|
|
|
|
- this.deptLevel = res.data.deptLevel;
|
|
|
|
|
- this.reportTargetAll = res.data.reportTargetAll;
|
|
|
|
|
- this.updataTime = res.data.reportTargetAll.updateTime;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ loading1.clear()
|
|
|
|
|
+ this.list = res.data.summaryTasks
|
|
|
|
|
+ this.historyButton = res.data.historyButton
|
|
|
|
|
+ localStorage.setItem('powerGrade', res.data.positionId)
|
|
|
|
|
+ this.existReject = res.data.existReject
|
|
|
|
|
+ this.powerGrade = res.data.positionId
|
|
|
|
|
+ this.showButton = res.data.showButton
|
|
|
|
|
+ this.deptLevel = res.data.deptLevel
|
|
|
|
|
+ this.reportTargetAll = res.data.reportTargetAll
|
|
|
|
|
+ this.updataTime = res.data.reportTargetAll.updateTime
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
-};
|
|
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
p {
|
|
p {
|
|
@@ -981,4 +963,9 @@ p {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+.myContent {
|
|
|
|
|
+ min-height: 44px;
|
|
|
|
|
+ word-break: break-all;
|
|
|
|
|
+ padding: 5px 10px;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|