|
@@ -5,7 +5,7 @@
|
|
|
<i class="el-icon-close cursor" @click="closeMsg"></i>
|
|
|
</div>
|
|
|
<div class="counsel-chats" ref="scrollRef">
|
|
|
- <div class="counsel-left flex">
|
|
|
+ <div class="counsel-left flex" v-if="nowType == 'selectLand'">
|
|
|
<div class="header-img">
|
|
|
<img src="/static/images/aiModel/kefu.png" />
|
|
|
</div>
|
|
@@ -14,7 +14,7 @@
|
|
|
<span class="high" @click="sendDefault">{{ defaultMsg }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!--右侧-->
|
|
|
+ <!--会话内容-->
|
|
|
<div v-for="(item, index) in questionList" :key="index">
|
|
|
<!--右侧-->
|
|
|
<div class="counsel-right flex" v-if="item.type == 0">
|
|
@@ -54,7 +54,18 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+ <div class="consel-types">
|
|
|
+ <div
|
|
|
+ v-for="(titem, i) in types"
|
|
|
+ :key="i"
|
|
|
+ class="typeitem cursor"
|
|
|
+ :class="{ heigType: nowType == titem.value }"
|
|
|
+ @click="nowType = titem.value"
|
|
|
+ >
|
|
|
+ <i :class="titem.icon"></i>
|
|
|
+ {{ titem.label }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="voice" v-if="spdisabled">
|
|
|
<div>正在识别</div>
|
|
|
<div class="noise"></div>
|
|
@@ -98,6 +109,11 @@ export default {
|
|
|
"我要在抱坡区进行选址,用地面积30到50亩,选择居住用地,距离幼儿园200米,距离医院300米,距离火葬场大于5000米",
|
|
|
sendContent: "",
|
|
|
spdisabled: false,
|
|
|
+ nowType: "selectLand",
|
|
|
+ types: [
|
|
|
+ { label: "智能选址", value: "selectLand", icon: "el-icon-s-home" },
|
|
|
+ { label: "知识问答", value: "answer", icon: "el-icon-chat-line-round" },
|
|
|
+ ],
|
|
|
};
|
|
|
},
|
|
|
created() {},
|
|
@@ -207,7 +223,7 @@ export default {
|
|
|
},
|
|
|
sendToBackend(msg, mindex) {
|
|
|
this.questionList[mindex].mstatus = 0;
|
|
|
- GetMsg(msg)
|
|
|
+ GetMsg({ msg, type: this.nowType })
|
|
|
.then((mres) => {
|
|
|
if (mres.status == 200) {
|
|
|
this.questionList[mindex].mstatus = 2;
|
|
@@ -215,6 +231,8 @@ export default {
|
|
|
if (mres.data.type == "selectLand") {
|
|
|
this.questionList.push({ content: "分析中...请稍等" });
|
|
|
this.AddFzxz(mres.data.data, mres.data.type);
|
|
|
+ } else {
|
|
|
+ this.questionList.push({ content: mres.data.data });
|
|
|
}
|
|
|
} else {
|
|
|
this.questionList.push({
|
|
@@ -319,7 +337,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.counsel-chats {
|
|
|
- height: calc(100% - 150px);
|
|
|
+ height: calc(100% - 190px);
|
|
|
overflow-x: hidden;
|
|
|
overflow-y: auto;
|
|
|
.header-img {
|
|
@@ -393,6 +411,22 @@ export default {
|
|
|
// color: #fff;
|
|
|
}
|
|
|
}
|
|
|
+.consel-types {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 100px;
|
|
|
+ width: calc(100% - 20px);
|
|
|
+ display: flex;
|
|
|
+ .typeitem {
|
|
|
+ border: 1px solid #ffffff;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 5px 10px;
|
|
|
+ margin-right: 20px;
|
|
|
+ }
|
|
|
+ .heigType {
|
|
|
+ border-color: #f0c472;
|
|
|
+ color: #f0c472;
|
|
|
+ }
|
|
|
+}
|
|
|
.voice {
|
|
|
width: 75%;
|
|
|
// height: 100px;
|