|
@@ -25,12 +25,8 @@
|
|
|
@click="sendToBackend(item.content, index)"
|
|
|
></i>
|
|
|
<div class="content">
|
|
|
- <audio
|
|
|
- v-if="item.mp3url"
|
|
|
- controls
|
|
|
- autoplay
|
|
|
- :src="item.mp3url"
|
|
|
- ></audio>
|
|
|
+ <!-- autoplay -->
|
|
|
+ <audio v-if="item.mp3url" controls :src="item.mp3url"></audio>
|
|
|
<div v-if="item.content">
|
|
|
<span>{{ item.content }}</span>
|
|
|
<i class="el-icon-document-copy" @click="copy(item)"></i>
|
|
@@ -46,10 +42,16 @@
|
|
|
<img src="/static/images/aiModel/kefu.png" />
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
- <span v-if="item.type" class="tit">参考意见</span>
|
|
|
- <span :class="{ high: item.type }" @click="onClick(item)">
|
|
|
- {{ item.content }}
|
|
|
- </span>
|
|
|
+ <VueMarkdown
|
|
|
+ v-if="item.type == 'answer'"
|
|
|
+ :source="item.content"
|
|
|
+ ></VueMarkdown>
|
|
|
+ <div v-else>
|
|
|
+ <span v-if="item.data" class="tit">参考意见</span>
|
|
|
+ <span :class="{ high: item.type }" @click="onClick(item)">
|
|
|
+ {{ item.content }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -99,9 +101,13 @@
|
|
|
import { AddFzxz } from "../../api/ghss/ghxz.js";
|
|
|
import { GetMsg, uploadAudio, closeMsg } from "../../api/aiModel.js";
|
|
|
import record from "./record.js";
|
|
|
+import VueMarkdown from "vue-markdown";
|
|
|
let recognition = null;
|
|
|
export default {
|
|
|
props: {},
|
|
|
+ components: {
|
|
|
+ VueMarkdown,
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
questionList: [],
|
|
@@ -229,10 +235,16 @@ export default {
|
|
|
this.questionList[mindex].mstatus = 2;
|
|
|
if (mres.data.code == 200 && mres.data.data) {
|
|
|
if (mres.data.type == "selectLand") {
|
|
|
- this.questionList.push({ content: "分析中...请稍等" });
|
|
|
+ this.questionList.push({
|
|
|
+ type: mres.data.type,
|
|
|
+ content: "分析中...请稍等",
|
|
|
+ });
|
|
|
this.AddFzxz(mres.data.data, mres.data.type);
|
|
|
} else {
|
|
|
- this.questionList.push({ content: mres.data.data });
|
|
|
+ this.questionList.push({
|
|
|
+ type: mres.data.type,
|
|
|
+ content: mres.data.data,
|
|
|
+ });
|
|
|
}
|
|
|
} else {
|
|
|
this.questionList.push({
|
|
@@ -276,6 +288,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
onClick(item) {
|
|
|
+ if (item.data) return;
|
|
|
if (item.type == "selectLand") {
|
|
|
this.$router.push({
|
|
|
path: "/siteselection",
|